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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-03-25 12:20:19 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-03-25 12:20:19 +0400
commit3b711a6ed009b35bb69cd0ca878eeb8d55fa0e77 (patch)
treeb3fdb366cb49bdea5b57dfa6ba4a82635c68d0ee /source/blender/editors
parenta2ebfc82dbe954acc432ae017ac62a30a11b6a16 (diff)
parente99a23fc6b33b5097eab44aac19c2a089ddebce6 (diff)
Merged changes in the trunk up to revision 45133.
Conflicts resolved: source/blender/blenloader/intern/readfile.c source/blender/blenloader/intern/writefile.c source/blender/bmesh/intern/bmesh_construct.c source/blender/bmesh/intern/bmesh_mesh_conv.c source/blender/bmesh/intern/bmesh_mesh_conv.h source/blender/editors/interface/interface_templates.c source/blender/editors/interface/resources.c source/blender/editors/mesh/bmesh_select.c source/blender/editors/mesh/bmesh_tools.c source/blender/editors/space_view3d/drawobject.c source/blender/render/intern/source/shadeoutput.c
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/CMakeLists.txt4
-rw-r--r--source/blender/editors/animation/SConscript7
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c107
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c212
-rw-r--r--source/blender/editors/animation/anim_deps.c2
-rw-r--r--source/blender/editors/animation/anim_draw.c3
-rw-r--r--source/blender/editors/animation/anim_filter.c2
-rw-r--r--source/blender/editors/animation/anim_markers.c168
-rw-r--r--source/blender/editors/animation/anim_ops.c50
-rw-r--r--source/blender/editors/animation/drivers.c40
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c12
-rw-r--r--source/blender/editors/animation/keyframes_draw.c2
-rw-r--r--source/blender/editors/animation/keyframes_edit.c1
-rw-r--r--source/blender/editors/animation/keyframes_general.c2
-rw-r--r--source/blender/editors/animation/keyframing.c86
-rw-r--r--source/blender/editors/animation/keyingsets.c70
-rw-r--r--source/blender/editors/armature/CMakeLists.txt4
-rw-r--r--source/blender/editors/armature/SConscript7
-rw-r--r--source/blender/editors/armature/armature_ops.c58
-rw-r--r--source/blender/editors/armature/editarmature.c606
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c20
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c92
-rw-r--r--source/blender/editors/armature/meshlaplacian.c454
-rw-r--r--source/blender/editors/armature/poseSlide.c70
-rw-r--r--source/blender/editors/armature/poselib.c84
-rw-r--r--source/blender/editors/armature/poseobject.c350
-rw-r--r--source/blender/editors/armature/reeb.c145
-rw-r--r--source/blender/editors/curve/curve_ops.c16
-rw-r--r--source/blender/editors/curve/editcurve.c2154
-rw-r--r--source/blender/editors/curve/editfont.c718
-rw-r--r--source/blender/editors/datafiles/CMakeLists.txt1
-rw-r--r--source/blender/editors/datafiles/blender_icons.png.c13944
-rw-r--r--source/blender/editors/datafiles/claystrips.png.c290
-rw-r--r--source/blender/editors/gpencil/CMakeLists.txt4
-rw-r--r--source/blender/editors/gpencil/SConscript7
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c16
-rw-r--r--source/blender/editors/gpencil/editaction_gpencil.c10
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c72
-rw-r--r--source/blender/editors/gpencil/gpencil_ops.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c32
-rw-r--r--source/blender/editors/gpencil/gpencil_undo.c22
-rw-r--r--source/blender/editors/include/ED_datafiles.h3
-rw-r--r--source/blender/editors/include/ED_mesh.h2
-rw-r--r--source/blender/editors/include/ED_numinput.h9
-rw-r--r--source/blender/editors/include/ED_screen_types.h1
-rw-r--r--source/blender/editors/include/ED_transform.h4
-rw-r--r--source/blender/editors/include/UI_icons.h37
-rw-r--r--source/blender/editors/include/UI_resources.h5
-rw-r--r--source/blender/editors/interface/interface.c846
-rw-r--r--source/blender/editors/interface/interface_anim.c18
-rw-r--r--source/blender/editors/interface/interface_draw.c206
-rw-r--r--source/blender/editors/interface/interface_handlers.c1732
-rw-r--r--source/blender/editors/interface/interface_icons.c105
-rw-r--r--source/blender/editors/interface/interface_intern.h5
-rw-r--r--source/blender/editors/interface/interface_layout.c585
-rw-r--r--source/blender/editors/interface/interface_ops.c128
-rw-r--r--source/blender/editors/interface/interface_panel.c448
-rw-r--r--source/blender/editors/interface/interface_regions.c731
-rw-r--r--source/blender/editors/interface/interface_style.c36
-rw-r--r--source/blender/editors/interface/interface_templates.c524
-rw-r--r--source/blender/editors/interface/interface_utils.c68
-rw-r--r--source/blender/editors/interface/interface_widgets.c506
-rw-r--r--source/blender/editors/interface/resources.c867
-rw-r--r--source/blender/editors/interface/view2d.c264
-rw-r--r--source/blender/editors/interface/view2d_ops.c186
-rw-r--r--source/blender/editors/mesh/CMakeLists.txt11
-rw-r--r--source/blender/editors/mesh/bmesh_selecthistory.c69
-rw-r--r--source/blender/editors/mesh/editface.c158
-rw-r--r--source/blender/editors/mesh/editmesh_add.c150
-rw-r--r--source/blender/editors/mesh/editmesh_bvh.c69
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c (renamed from source/blender/editors/mesh/knifetool.c)1014
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c (renamed from source/blender/editors/mesh/loopcut.c)129
-rw-r--r--source/blender/editors/mesh/editmesh_select.c (renamed from source/blender/editors/mesh/bmesh_select.c)155
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c (renamed from source/blender/editors/mesh/bmesh_tools.c)879
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c (renamed from source/blender/editors/mesh/bmesh_utils.c)159
-rw-r--r--source/blender/editors/mesh/mesh_data.c275
-rw-r--r--source/blender/editors/mesh/mesh_intern.h5
-rw-r--r--source/blender/editors/mesh/mesh_navmesh.c210
-rw-r--r--source/blender/editors/mesh/mesh_ops.c53
-rw-r--r--source/blender/editors/mesh/meshtools.c253
-rw-r--r--source/blender/editors/metaball/mball_edit.c168
-rw-r--r--source/blender/editors/metaball/mball_ops.c4
-rw-r--r--source/blender/editors/object/object_add.c477
-rw-r--r--source/blender/editors/object/object_bake.c302
-rw-r--r--source/blender/editors/object/object_constraint.c270
-rw-r--r--source/blender/editors/object/object_edit.c558
-rw-r--r--source/blender/editors/object/object_group.c92
-rw-r--r--source/blender/editors/object/object_hook.c213
-rw-r--r--source/blender/editors/object/object_lattice.c76
-rw-r--r--source/blender/editors/object/object_modifier.c456
-rw-r--r--source/blender/editors/object/object_ops.c42
-rw-r--r--source/blender/editors/object/object_relations.c528
-rw-r--r--source/blender/editors/object/object_select.c213
-rw-r--r--source/blender/editors/object/object_shapekey.c142
-rw-r--r--source/blender/editors/object/object_transform.c228
-rw-r--r--source/blender/editors/object/object_vgroup.c675
-rw-r--r--source/blender/editors/physics/dynamicpaint_ops.c66
-rw-r--r--source/blender/editors/physics/particle_boids.c124
-rw-r--r--source/blender/editors/physics/particle_edit.c1013
-rw-r--r--source/blender/editors/physics/particle_object.c242
-rw-r--r--source/blender/editors/physics/physics_fluid.c122
-rw-r--r--source/blender/editors/physics/physics_ops.c6
-rw-r--r--source/blender/editors/physics/physics_pointcache.c112
-rw-r--r--source/blender/editors/render/render_internal.c116
-rw-r--r--source/blender/editors/render/render_opengl.c112
-rw-r--r--source/blender/editors/render/render_preview.c241
-rw-r--r--source/blender/editors/render/render_shading.c322
-rw-r--r--source/blender/editors/render/render_update.c116
-rw-r--r--source/blender/editors/render/render_view.c104
-rw-r--r--source/blender/editors/screen/CMakeLists.txt4
-rw-r--r--source/blender/editors/screen/SConscript5
-rw-r--r--source/blender/editors/screen/area.c432
-rw-r--r--source/blender/editors/screen/glutil.c85
-rw-r--r--source/blender/editors/screen/screen_context.c114
-rw-r--r--source/blender/editors/screen/screen_edit.c436
-rw-r--r--source/blender/editors/screen/screen_ops.c850
-rw-r--r--source/blender/editors/screen/screendump.c80
-rw-r--r--source/blender/editors/sculpt_paint/CMakeLists.txt1
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c36
-rw-r--r--source/blender/editors/sculpt_paint/paint_hide.c392
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c473
-rw-r--r--source/blender/editors/sculpt_paint/paint_intern.h16
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c321
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c54
-rw-r--r--source/blender/editors/sculpt_paint/paint_undo.c74
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c140
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c1557
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c684
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h13
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c284
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c16
-rw-r--r--source/blender/editors/sound/sound_ops.c132
-rw-r--r--source/blender/editors/space_action/action_draw.c4
-rw-r--r--source/blender/editors/space_action/action_edit.c266
-rw-r--r--source/blender/editors/space_action/action_ops.c20
-rw-r--r--source/blender/editors/space_action/action_select.c110
-rw-r--r--source/blender/editors/space_action/space_action.c24
-rw-r--r--source/blender/editors/space_api/spacetypes.c24
-rw-r--r--source/blender/editors/space_buttons/CMakeLists.txt4
-rw-r--r--source/blender/editors/space_buttons/SConscript3
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c325
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c8
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c54
-rw-r--r--source/blender/editors/space_buttons/buttons_texture.c104
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c51
-rw-r--r--source/blender/editors/space_clip/clip_buttons.c57
-rw-r--r--source/blender/editors/space_clip/clip_draw.c430
-rw-r--r--source/blender/editors/space_clip/clip_editor.c57
-rw-r--r--source/blender/editors/space_clip/clip_graph_draw.c27
-rw-r--r--source/blender/editors/space_clip/clip_graph_ops.c88
-rw-r--r--source/blender/editors/space_clip/clip_ops.c243
-rw-r--r--source/blender/editors/space_clip/clip_toolbar.c52
-rw-r--r--source/blender/editors/space_clip/clip_utils.c46
-rw-r--r--source/blender/editors/space_clip/space_clip.c146
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c1091
-rw-r--r--source/blender/editors/space_console/console_draw.c8
-rw-r--r--source/blender/editors/space_console/console_ops.c210
-rw-r--r--source/blender/editors/space_console/space_console.c27
-rw-r--r--source/blender/editors/space_file/CMakeLists.txt4
-rw-r--r--source/blender/editors/space_file/SConscript5
-rw-r--r--source/blender/editors/space_file/file_draw.c34
-rw-r--r--source/blender/editors/space_file/file_ops.c366
-rw-r--r--source/blender/editors/space_file/file_panels.c18
-rw-r--r--source/blender/editors/space_file/filelist.c252
-rw-r--r--source/blender/editors/space_file/filesel.c90
-rw-r--r--source/blender/editors/space_file/fsmenu.c31
-rw-r--r--source/blender/editors/space_file/space_file.c59
-rw-r--r--source/blender/editors/space_graph/CMakeLists.txt4
-rw-r--r--source/blender/editors/space_graph/SConscript7
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c30
-rw-r--r--source/blender/editors/space_graph/graph_draw.c5
-rw-r--r--source/blender/editors/space_graph/graph_edit.c358
-rw-r--r--source/blender/editors/space_graph/graph_ops.c42
-rw-r--r--source/blender/editors/space_graph/graph_select.c104
-rw-r--r--source/blender/editors/space_graph/space_graph.c30
-rw-r--r--source/blender/editors/space_image/image_buttons.c198
-rw-r--r--source/blender/editors/space_image/image_draw.c138
-rw-r--r--source/blender/editors/space_image/image_ops.c590
-rw-r--r--source/blender/editors/space_image/space_image.c138
-rw-r--r--source/blender/editors/space_info/CMakeLists.txt4
-rw-r--r--source/blender/editors/space_info/SConscript3
-rw-r--r--source/blender/editors/space_info/info_draw.c16
-rw-r--r--source/blender/editors/space_info/info_ops.c94
-rw-r--r--source/blender/editors/space_info/info_report.c152
-rw-r--r--source/blender/editors/space_info/info_stats.c128
-rw-r--r--source/blender/editors/space_info/space_info.c25
-rw-r--r--source/blender/editors/space_info/textview.c57
-rw-r--r--source/blender/editors/space_logic/logic_buttons.c60
-rw-r--r--source/blender/editors/space_logic/logic_ops.c142
-rw-r--r--source/blender/editors/space_logic/logic_window.c587
-rw-r--r--source/blender/editors/space_logic/space_logic.c30
-rw-r--r--source/blender/editors/space_nla/CMakeLists.txt4
-rw-r--r--source/blender/editors/space_nla/SConscript7
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c14
-rw-r--r--source/blender/editors/space_nla/nla_channels.c38
-rw-r--r--source/blender/editors/space_nla/nla_draw.c12
-rw-r--r--source/blender/editors/space_nla/nla_edit.c308
-rw-r--r--source/blender/editors/space_nla/nla_ops.c14
-rw-r--r--source/blender/editors/space_nla/nla_select.c66
-rw-r--r--source/blender/editors/space_nla/space_nla.c34
-rw-r--r--source/blender/editors/space_node/CMakeLists.txt4
-rw-r--r--source/blender/editors/space_node/SConscript5
-rw-r--r--source/blender/editors/space_node/drawnode.c171
-rw-r--r--source/blender/editors/space_node/node_buttons.c18
-rw-r--r--source/blender/editors/space_node/node_draw.c260
-rw-r--r--source/blender/editors/space_node/node_edit.c913
-rw-r--r--source/blender/editors/space_node/node_header.c40
-rw-r--r--source/blender/editors/space_node/node_intern.h4
-rw-r--r--source/blender/editors/space_node/node_ops.c16
-rw-r--r--source/blender/editors/space_node/node_select.c147
-rw-r--r--source/blender/editors/space_node/node_state.c30
-rw-r--r--source/blender/editors/space_node/node_templates.c174
-rw-r--r--source/blender/editors/space_node/space_node.c122
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c299
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c324
-rw-r--r--source/blender/editors/space_outliner/outliner_ops.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c269
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c295
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c400
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c38
-rw-r--r--source/blender/editors/space_script/script_edit.c22
-rw-r--r--source/blender/editors/space_script/script_ops.c2
-rw-r--r--source/blender/editors/space_script/space_script.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c278
-rw-r--r--source/blender/editors/space_sequencer/sequencer_buttons.c14
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c206
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c936
-rw-r--r--source/blender/editors/space_sequencer/sequencer_intern.h3
-rw-r--r--source/blender/editors/space_sequencer/sequencer_ops.c25
-rw-r--r--source/blender/editors/space_sequencer/sequencer_scopes.c18
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c273
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c70
-rw-r--r--source/blender/editors/space_text/space_text.c24
-rw-r--r--source/blender/editors/space_text/text_draw.c529
-rw-r--r--source/blender/editors/space_text/text_header.c22
-rw-r--r--source/blender/editors/space_text/text_ops.c1034
-rw-r--r--source/blender/editors/space_text/text_python.c228
-rw-r--r--source/blender/editors/space_time/space_time.c32
-rw-r--r--source/blender/editors/space_time/time_ops.c67
-rw-r--r--source/blender/editors/space_view3d/CMakeLists.txt4
-rw-r--r--source/blender/editors/space_view3d/SConscript3
-rw-r--r--source/blender/editors/space_view3d/drawanimviz.c4
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c62
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c18
-rw-r--r--source/blender/editors/space_view3d/drawobject.c1480
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c48
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c50
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c306
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c14
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c30
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c26
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c115
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c80
-rw-r--r--source/blender/editors/space_view3d/view3d_toolbar.c14
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c102
-rw-r--r--source/blender/editors/transform/CMakeLists.txt4
-rw-r--r--source/blender/editors/transform/SConscript7
-rw-r--r--source/blender/editors/transform/transform.c441
-rw-r--r--source/blender/editors/transform/transform.h6
-rw-r--r--source/blender/editors/transform/transform_constraints.c38
-rw-r--r--source/blender/editors/transform/transform_conversions.c682
-rw-r--r--source/blender/editors/transform/transform_generics.c160
-rw-r--r--source/blender/editors/transform/transform_input.c6
-rw-r--r--source/blender/editors/transform/transform_manipulator.c423
-rw-r--r--source/blender/editors/transform/transform_ops.c116
-rw-r--r--source/blender/editors/transform/transform_orientations.c64
-rw-r--r--source/blender/editors/transform/transform_snap.c98
-rw-r--r--source/blender/editors/util/crazyspace.c108
-rw-r--r--source/blender/editors/util/ed_util.c36
-rw-r--r--source/blender/editors/util/editmode_undo.c80
-rw-r--r--source/blender/editors/util/numinput.c9
-rw-r--r--source/blender/editors/util/undo.c146
-rw-r--r--source/blender/editors/uvedit/uvedit_buttons.c12
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c124
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c806
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c36
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c347
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c280
279 files changed, 33950 insertions, 31724 deletions
diff --git a/source/blender/editors/animation/CMakeLists.txt b/source/blender/editors/animation/CMakeLists.txt
index 2549358f285..9e1e44e411d 100644
--- a/source/blender/editors/animation/CMakeLists.txt
+++ b/source/blender/editors/animation/CMakeLists.txt
@@ -54,4 +54,8 @@ set(SRC
anim_intern.h
)
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_animation "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/animation/SConscript b/source/blender/editors/animation/SConscript
index 120000fedc4..658ad2794a1 100644
--- a/source/blender/editors/animation/SConscript
+++ b/source/blender/editors/animation/SConscript
@@ -6,4 +6,9 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf ../../blenfont'
incs += ' ../../bmesh ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader'
-env.BlenderLib ( 'bf_editors_animation', sources, Split(incs), [], libtype=['core'], priority=[125] )
+defs = []
+
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
+env.BlenderLib ( 'bf_editors_animation', sources, Split(incs), defs, libtype=['core'], priority=[125] )
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index bdeea9402ba..29d5604089d 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -88,12 +88,9 @@
#define ANIM_CHAN_NAME_SIZE 256
/* macros used for type defines */
- /* get the pointer used for some flag */
-#define GET_ACF_FLAG_PTR(ptr) \
- { \
- *type= sizeof((ptr)); \
- return &(ptr); \
- }
+
+/* get the pointer used for some flag and return */
+#define GET_ACF_FLAG_PTR(ptr, type) ((*(type) = sizeof((ptr))), &(ptr))
/* *********************************************** */
@@ -454,7 +451,7 @@ static void *acf_summary_setting_ptr(bAnimListElem *ale, int setting, short *typ
bDopeSheet *ads= &saction->ads;
/* return pointer to DopeSheet's flag */
- GET_ACF_FLAG_PTR(ads->flag);
+ return GET_ACF_FLAG_PTR(ads->flag, type);
}
else {
/* can't return anything useful - unsupported */
@@ -548,15 +545,15 @@ static void *acf_scene_setting_ptr(bAnimListElem *ale, int setting, short *type)
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
- GET_ACF_FLAG_PTR(scene->flag);
+ return GET_ACF_FLAG_PTR(scene->flag, type);
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(scene->flag);
+ return GET_ACF_FLAG_PTR(scene->flag, type);
case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (scene->adt)
- GET_ACF_FLAG_PTR(scene->adt->flag)
+ return GET_ACF_FLAG_PTR(scene->adt->flag, type);
else
return NULL;
@@ -695,15 +692,15 @@ static void *acf_object_setting_ptr(bAnimListElem *ale, int setting, short *type
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
- GET_ACF_FLAG_PTR(ob->flag);
+ return GET_ACF_FLAG_PTR(ob->flag, type);
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(ob->nlaflag); // xxx
+ return GET_ACF_FLAG_PTR(ob->nlaflag, type); // xxx
case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ob->adt)
- GET_ACF_FLAG_PTR(ob->adt->flag)
+ return GET_ACF_FLAG_PTR(ob->adt->flag, type);
else
return NULL;
@@ -836,7 +833,7 @@ static void *acf_group_setting_ptr(bAnimListElem *ale, int UNUSED(setting), shor
bActionGroup *agrp= (bActionGroup *)ale->data;
/* all flags are just in agrp->flag for now... */
- GET_ACF_FLAG_PTR(agrp->flag);
+ return GET_ACF_FLAG_PTR(agrp->flag, type);
}
/* group type define */
@@ -923,7 +920,7 @@ static void *acf_fcurve_setting_ptr(bAnimListElem *ale, int UNUSED(setting), sho
FCurve *fcu= (FCurve *)ale->data;
/* all flags are just in agrp->flag for now... */
- GET_ACF_FLAG_PTR(fcu->flag);
+ return GET_ACF_FLAG_PTR(fcu->flag, type);
}
/* fcurve type define */
@@ -998,13 +995,13 @@ static void *acf_fillactd_setting_ptr(bAnimListElem *ale, int setting, short *ty
switch (setting) {
case ACHANNEL_SETTING_SELECT: /* selected */
if (adt) {
- GET_ACF_FLAG_PTR(adt->flag);
+ return GET_ACF_FLAG_PTR(adt->flag, type);
}
else
return NULL;
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(act->flag);
+ return GET_ACF_FLAG_PTR(act->flag, type);
default: /* unsupported */
return NULL;
@@ -1083,7 +1080,7 @@ static void *acf_filldrivers_setting_ptr(bAnimListElem *ale, int setting, short
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(adt->flag);
+ return GET_ACF_FLAG_PTR(adt->flag, type);
default: /* unsupported */
return NULL;
@@ -1153,13 +1150,13 @@ static void *acf_dsmat_setting_ptr(bAnimListElem *ale, int setting, short *type)
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(ma->flag);
+ return GET_ACF_FLAG_PTR(ma->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ma->adt)
- GET_ACF_FLAG_PTR(ma->adt->flag)
+ return GET_ACF_FLAG_PTR(ma->adt->flag, type);
else
return NULL;
@@ -1230,13 +1227,13 @@ static void *acf_dslam_setting_ptr(bAnimListElem *ale, int setting, short *type)
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(la->flag);
+ return GET_ACF_FLAG_PTR(la->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (la->adt)
- GET_ACF_FLAG_PTR(la->adt->flag)
+ return GET_ACF_FLAG_PTR(la->adt->flag, type);
else
return NULL;
@@ -1314,13 +1311,13 @@ static void *acf_dstex_setting_ptr(bAnimListElem *ale, int setting, short *type)
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(tex->flag);
+ return GET_ACF_FLAG_PTR(tex->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (tex->adt)
- GET_ACF_FLAG_PTR(tex->adt->flag)
+ return GET_ACF_FLAG_PTR(tex->adt->flag, type);
else
return NULL;
@@ -1391,13 +1388,13 @@ static void *acf_dscam_setting_ptr(bAnimListElem *ale, int setting, short *type)
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(ca->flag);
+ return GET_ACF_FLAG_PTR(ca->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ca->adt)
- GET_ACF_FLAG_PTR(ca->adt->flag)
+ return GET_ACF_FLAG_PTR(ca->adt->flag, type);
else
return NULL;
@@ -1478,13 +1475,13 @@ static void *acf_dscur_setting_ptr(bAnimListElem *ale, int setting, short *type)
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(cu->flag);
+ return GET_ACF_FLAG_PTR(cu->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (cu->adt)
- GET_ACF_FLAG_PTR(cu->adt->flag)
+ return GET_ACF_FLAG_PTR(cu->adt->flag, type);
else
return NULL;
@@ -1555,13 +1552,13 @@ static void *acf_dsskey_setting_ptr(bAnimListElem *ale, int setting, short *type
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(key->flag);
+ return GET_ACF_FLAG_PTR(key->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (key->adt)
- GET_ACF_FLAG_PTR(key->adt->flag)
+ return GET_ACF_FLAG_PTR(key->adt->flag, type);
else
return NULL;
@@ -1632,13 +1629,13 @@ static void *acf_dswor_setting_ptr(bAnimListElem *ale, int setting, short *type)
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(wo->flag);
+ return GET_ACF_FLAG_PTR(wo->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (wo->adt)
- GET_ACF_FLAG_PTR(wo->adt->flag)
+ return GET_ACF_FLAG_PTR(wo->adt->flag, type);
else
return NULL;
@@ -1709,13 +1706,13 @@ static void *acf_dspart_setting_ptr(bAnimListElem *ale, int setting, short *type
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(part->flag);
+ return GET_ACF_FLAG_PTR(part->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (part->adt)
- GET_ACF_FLAG_PTR(part->adt->flag)
+ return GET_ACF_FLAG_PTR(part->adt->flag, type);
else
return NULL;
@@ -1786,13 +1783,13 @@ static void *acf_dsmball_setting_ptr(bAnimListElem *ale, int setting, short *typ
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(mb->flag);
+ return GET_ACF_FLAG_PTR(mb->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (mb->adt)
- GET_ACF_FLAG_PTR(mb->adt->flag)
+ return GET_ACF_FLAG_PTR(mb->adt->flag, type);
else
return NULL;
@@ -1863,13 +1860,13 @@ static void *acf_dsarm_setting_ptr(bAnimListElem *ale, int setting, short *type)
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(arm->flag);
+ return GET_ACF_FLAG_PTR(arm->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (arm->adt)
- GET_ACF_FLAG_PTR(arm->adt->flag)
+ return GET_ACF_FLAG_PTR(arm->adt->flag, type);
else
return NULL;
@@ -1951,13 +1948,13 @@ static void *acf_dsntree_setting_ptr(bAnimListElem *ale, int setting, short *typ
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(ntree->flag);
+ return GET_ACF_FLAG_PTR(ntree->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ntree->adt)
- GET_ACF_FLAG_PTR(ntree->adt->flag)
+ return GET_ACF_FLAG_PTR(ntree->adt->flag, type);
else
return NULL;
@@ -2028,13 +2025,13 @@ static void *acf_dslinestyle_setting_ptr(bAnimListElem *ale, int setting, short
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(linestyle->flag);
+ return GET_ACF_FLAG_PTR(linestyle->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (linestyle->adt)
- GET_ACF_FLAG_PTR(linestyle->adt->flag)
+ return GET_ACF_FLAG_PTR(linestyle->adt->flag, type);
else
return NULL;
@@ -2105,13 +2102,13 @@ static void *acf_dsmesh_setting_ptr(bAnimListElem *ale, int setting, short *type
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(me->flag);
+ return GET_ACF_FLAG_PTR(me->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (me->adt)
- GET_ACF_FLAG_PTR(me->adt->flag)
+ return GET_ACF_FLAG_PTR(me->adt->flag, type);
else
return NULL;
@@ -2182,13 +2179,13 @@ static void *acf_dslat_setting_ptr(bAnimListElem *ale, int setting, short *type)
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(lt->flag);
+ return GET_ACF_FLAG_PTR(lt->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (lt->adt)
- GET_ACF_FLAG_PTR(lt->adt->flag)
+ return GET_ACF_FLAG_PTR(lt->adt->flag, type);
else
return NULL;
@@ -2259,13 +2256,13 @@ static void *acf_dsspk_setting_ptr(bAnimListElem *ale, int setting, short *type)
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- GET_ACF_FLAG_PTR(spk->flag);
+ return GET_ACF_FLAG_PTR(spk->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (spk->adt)
- GET_ACF_FLAG_PTR(spk->adt->flag)
+ return GET_ACF_FLAG_PTR(spk->adt->flag, type);
else
return NULL;
@@ -2374,7 +2371,7 @@ static void *acf_shapekey_setting_ptr(bAnimListElem *ale, int setting, short *ty
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted */
case ACHANNEL_SETTING_PROTECT: /* protected */
- GET_ACF_FLAG_PTR(kb->flag)
+ return GET_ACF_FLAG_PTR(kb->flag, type);
default: /* unsupported */
return NULL;
@@ -2453,7 +2450,7 @@ static void *acf_gpd_setting_ptr(bAnimListElem *ale, int UNUSED(setting), short
bGPdata *gpd= (bGPdata *)ale->data;
/* all flags are just in gpd->flag for now... */
- GET_ACF_FLAG_PTR(gpd->flag);
+ return GET_ACF_FLAG_PTR(gpd->flag, type);
}
/* gpencil datablock type define */
@@ -2542,7 +2539,7 @@ static void *acf_gpl_setting_ptr(bAnimListElem *ale, int UNUSED(setting), short
bGPDlayer *gpl= (bGPDlayer *)ale->data;
/* all flags are just in agrp->flag for now... */
- GET_ACF_FLAG_PTR(gpl->flag);
+ return GET_ACF_FLAG_PTR(gpl->flag, type);
}
/* grease pencil layer type define */
@@ -3197,17 +3194,17 @@ static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChan
if (ptr && flag) {
switch (ptrsize) {
case sizeof(int): /* integer pointer for setting */
- but= uiDefIconButBitI(block, butType, flag, 0, icon,
+ but = uiDefIconButBitI(block, butType, flag, 0, icon,
xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
break;
case sizeof(short): /* short pointer for setting */
- but= uiDefIconButBitS(block, butType, flag, 0, icon,
+ but = uiDefIconButBitS(block, butType, flag, 0, icon,
xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
break;
case sizeof(char): /* char pointer for setting */
- but= uiDefIconButBitC(block, butType, flag, 0, icon,
+ but = uiDefIconButBitC(block, butType, flag, 0, icon,
xpos, ypos, ICON_WIDTH, ICON_WIDTH, ptr, 0, 0, 0, 0, tooltip);
break;
}
@@ -3402,7 +3399,7 @@ void ANIM_channel_draw_widgets (bContext *C, bAnimContext *ac, bAnimListElem *al
uiBut *but;
/* create the slider button, and assign relevant callback to ensure keyframes are inserted... */
- but= uiDefAutoButR(block, &ptr, prop, array_index, "", ICON_NONE, (int)v2d->cur.xmax-offset, ymid, SLIDER_WIDTH, (int)ymaxc-yminc);
+ but = uiDefAutoButR(block, &ptr, prop, array_index, "", ICON_NONE, (int)v2d->cur.xmax-offset, ymid, SLIDER_WIDTH, (int)ymaxc-yminc);
/* assign keyframing function according to slider type */
if (ale->type == ANIMTYPE_SHAPEKEY)
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 83755cbcce3..1a2400d7216 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -1108,19 +1108,19 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
static void ANIM_OT_channels_move (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Channels";
- ot->idname= "ANIM_OT_channels_move";
+ ot->name = "Move Channels";
+ ot->idname = "ANIM_OT_channels_move";
ot->description = "Rearrange selected animation channels";
/* api callbacks */
- ot->exec= animchannels_rearrange_exec;
- ot->poll= animedit_poll_channels_nla_tweakmode_off;
+ ot->exec = animchannels_rearrange_exec;
+ ot->poll = animedit_poll_channels_nla_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- ot->prop= RNA_def_enum(ot->srna, "direction", prop_animchannel_rearrange_types, REARRANGE_ANIMCHAN_DOWN, "Direction", "");
+ ot->prop = RNA_def_enum(ot->srna, "direction", prop_animchannel_rearrange_types, REARRANGE_ANIMCHAN_DOWN, "Direction", "");
}
/* ******************** Delete Channel Operator *********************** */
@@ -1224,16 +1224,16 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
static void ANIM_OT_channels_delete (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Channels";
- ot->idname= "ANIM_OT_channels_delete";
- ot->description= "Delete all selected animation channels";
+ ot->name = "Delete Channels";
+ ot->idname = "ANIM_OT_channels_delete";
+ ot->description = "Delete all selected animation channels";
/* api callbacks */
- ot->exec= animchannels_delete_exec;
- ot->poll= animedit_poll_channels_active;
+ ot->exec = animchannels_delete_exec;
+ ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Set Channel Visibility Operator *********************** */
@@ -1316,16 +1316,16 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *UNUSED(op))
static void ANIM_OT_channels_visibility_set (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Visibility";
- ot->idname= "ANIM_OT_channels_visibility_set";
- ot->description= "Make only the selected animation channels visible in the Graph Editor";
+ ot->name = "Set Visibility";
+ ot->idname = "ANIM_OT_channels_visibility_set";
+ ot->description = "Make only the selected animation channels visible in the Graph Editor";
/* api callbacks */
- ot->exec= animchannels_visibility_set_exec;
- ot->poll= ED_operator_graphedit_active;
+ ot->exec = animchannels_visibility_set_exec;
+ ot->poll = ED_operator_graphedit_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1393,16 +1393,16 @@ static int animchannels_visibility_toggle_exec(bContext *C, wmOperator *UNUSED(o
static void ANIM_OT_channels_visibility_toggle (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Visibility";
- ot->idname= "ANIM_OT_channels_visibility_toggle";
- ot->description= "Toggle visibility in Graph Editor of all selected animation channels";
+ ot->name = "Toggle Visibility";
+ ot->idname = "ANIM_OT_channels_visibility_toggle";
+ ot->description = "Toggle visibility in Graph Editor of all selected animation channels";
/* api callbacks */
- ot->exec= animchannels_visibility_toggle_exec;
- ot->poll= ED_operator_graphedit_active;
+ ot->exec = animchannels_visibility_toggle_exec;
+ ot->poll = ED_operator_graphedit_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ********************** Set Flags Operator *********************** */
@@ -1536,82 +1536,82 @@ static int animchannels_setflag_exec(bContext *C, wmOperator *op)
static void ANIM_OT_channels_setting_enable (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Enable Channel Setting";
- ot->idname= "ANIM_OT_channels_setting_enable";
- ot->description= "Enable specified setting on all selected animation channels";
+ ot->name = "Enable Channel Setting";
+ ot->idname = "ANIM_OT_channels_setting_enable";
+ ot->description = "Enable specified setting on all selected animation channels";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= animchannels_setflag_exec;
- ot->poll= animedit_poll_channels_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = animchannels_setflag_exec;
+ ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
/* flag-setting mode */
RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_ADD, "Mode", "");
/* setting to set */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
}
/* duplicate of 'ANIM_OT_channels_setting_toggle' for menu title only, weak! */
static void ANIM_OT_channels_setting_disable (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Disable Channel Setting";
- ot->idname= "ANIM_OT_channels_setting_disable";
- ot->description= "Disable specified setting on all selected animation channels";
+ ot->name = "Disable Channel Setting";
+ ot->idname = "ANIM_OT_channels_setting_disable";
+ ot->description = "Disable specified setting on all selected animation channels";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= animchannels_setflag_exec;
- ot->poll= animedit_poll_channels_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = animchannels_setflag_exec;
+ ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
/* flag-setting mode */
RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_CLEAR, "Mode", "");
/* setting to set */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
}
static void ANIM_OT_channels_setting_toggle (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Channel Setting";
- ot->idname= "ANIM_OT_channels_setting_toggle";
- ot->description= "Toggle specified setting on all selected animation channels";
+ ot->name = "Toggle Channel Setting";
+ ot->idname = "ANIM_OT_channels_setting_toggle";
+ ot->description = "Toggle specified setting on all selected animation channels";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= animchannels_setflag_exec;
- ot->poll= animedit_poll_channels_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = animchannels_setflag_exec;
+ ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
/* flag-setting mode */
RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_TOGGLE, "Mode", "");
/* setting to set */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
}
static void ANIM_OT_channels_editable_toggle (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Channel Editability";
- ot->idname= "ANIM_OT_channels_editable_toggle";
- ot->description= "Toggle editability of selected channels";
+ ot->name = "Toggle Channel Editability";
+ ot->idname = "ANIM_OT_channels_editable_toggle";
+ ot->description = "Toggle editability of selected channels";
/* api callbacks */
- ot->exec= animchannels_setflag_exec;
- ot->poll= animedit_poll_channels_active;
+ ot->exec = animchannels_setflag_exec;
+ ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
/* flag-setting mode */
@@ -1647,19 +1647,19 @@ static int animchannels_expand_exec (bContext *C, wmOperator *op)
static void ANIM_OT_channels_expand (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Expand Channels";
- ot->idname= "ANIM_OT_channels_expand";
- ot->description= "Expand (i.e. open) all selected expandable animation channels";
+ ot->name = "Expand Channels";
+ ot->idname = "ANIM_OT_channels_expand";
+ ot->description = "Expand (i.e. open) all selected expandable animation channels";
/* api callbacks */
- ot->exec= animchannels_expand_exec;
- ot->poll= animedit_poll_channels_active;
+ ot->exec = animchannels_expand_exec;
+ ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- ot->prop= RNA_def_boolean(ot->srna, "all", 1, "All", "Expand all channels (not just selected ones)");
+ ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All", "Expand all channels (not just selected ones)");
}
/* ********************** Collapse Channels Operator *********************** */
@@ -1689,19 +1689,19 @@ static int animchannels_collapse_exec (bContext *C, wmOperator *op)
static void ANIM_OT_channels_collapse (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Collapse Channels";
- ot->idname= "ANIM_OT_channels_collapse";
- ot->description= "Collapse (i.e. close) all selected expandable animation channels";
+ ot->name = "Collapse Channels";
+ ot->idname = "ANIM_OT_channels_collapse";
+ ot->description = "Collapse (i.e. close) all selected expandable animation channels";
/* api callbacks */
- ot->exec= animchannels_collapse_exec;
- ot->poll= animedit_poll_channels_active;
+ ot->exec = animchannels_collapse_exec;
+ ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- ot->prop= RNA_def_boolean(ot->srna, "all", 1, "All", "Collapse all channels (not just selected ones)");
+ ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All", "Collapse all channels (not just selected ones)");
}
/* ******************* Reenable Disabled Operator ******************* */
@@ -1765,16 +1765,16 @@ static int animchannels_enable_exec (bContext *C, wmOperator *UNUSED(op))
static void ANIM_OT_channels_fcurves_enable (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Revive Disabled F-Curves";
- ot->idname= "ANIM_OT_channels_fcurves_enable";
- ot->description= "Clears 'disabled' tag from all F-Curves to get broken F-Curves working again";
+ ot->name = "Revive Disabled F-Curves";
+ ot->idname = "ANIM_OT_channels_fcurves_enable";
+ ot->description = "Clears 'disabled' tag from all F-Curves to get broken F-Curves working again";
/* api callbacks */
- ot->exec= animchannels_enable_exec;
- ot->poll= animchannels_enable_poll;
+ ot->exec = animchannels_enable_exec;
+ ot->poll = animchannels_enable_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ********************** Select All Operator *********************** */
@@ -1802,19 +1802,19 @@ static int animchannels_deselectall_exec (bContext *C, wmOperator *op)
static void ANIM_OT_channels_select_all_toggle (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select All";
- ot->idname= "ANIM_OT_channels_select_all_toggle";
- ot->description= "Toggle selection of all animation channels";
+ ot->name = "Select All";
+ ot->idname = "ANIM_OT_channels_select_all_toggle";
+ ot->description = "Toggle selection of all animation channels";
/* api callbacks */
- ot->exec= animchannels_deselectall_exec;
- ot->poll= animedit_poll_channels_nla_tweakmode_off;
+ ot->exec = animchannels_deselectall_exec;
+ ot->poll = animedit_poll_channels_nla_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- ot->prop= RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
+ ot->prop = RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
}
/* ******************** Borderselect Operator *********************** */
@@ -1905,15 +1905,15 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* get settings from operator */
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
extend= RNA_boolean_get(op->ptr, "extend");
- if(!extend)
+ if (!extend)
ANIM_deselect_anim_channels(&ac, ac.data, ac.datatype, 1, ACHANNEL_SETFLAG_CLEAR);
if (gesture_mode == GESTURE_MODAL_SELECT)
@@ -1933,20 +1933,20 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op)
static void ANIM_OT_channels_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Select";
- ot->idname= "ANIM_OT_channels_select_border";
- ot->description= "Select all animation channels within the specified region";
+ ot->name = "Border Select";
+ ot->idname = "ANIM_OT_channels_select_border";
+ ot->description = "Select all animation channels within the specified region";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= animchannels_borderselect_exec;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = animchannels_borderselect_exec;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= animedit_poll_channels_nla_tweakmode_off;
+ ot->poll = animedit_poll_channels_nla_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* rna */
WM_operator_properties_gesture_border(ot, TRUE);
@@ -2044,13 +2044,13 @@ static int animchannels_rename_invoke (bContext *C, wmOperator *UNUSED(op), wmEv
static void ANIM_OT_channels_rename (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Rename Channels";
- ot->idname= "ANIM_OT_channels_rename";
- ot->description= "Rename animation channel under mouse";
+ ot->name = "Rename Channels";
+ ot->idname = "ANIM_OT_channels_rename";
+ ot->description = "Rename animation channel under mouse";
/* api callbacks */
- ot->invoke= animchannels_rename_invoke;
- ot->poll= animedit_poll_channels_active;
+ ot->invoke = animchannels_rename_invoke;
+ ot->poll = animedit_poll_channels_active;
}
/* ******************** Mouse-Click Operator *********************** */
@@ -2354,16 +2354,16 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *
static void ANIM_OT_channels_click (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mouse Click on Channels";
- ot->idname= "ANIM_OT_channels_click";
- ot->description= "Handle mouse-clicks over animation channels";
+ ot->name = "Mouse Click on Channels";
+ ot->idname = "ANIM_OT_channels_click";
+ ot->description = "Handle mouse-clicks over animation channels";
/* api callbacks */
- ot->invoke= animchannels_mouseclick_invoke;
- ot->poll= animedit_poll_channels_active;
+ ot->invoke = animchannels_mouseclick_invoke;
+ ot->poll = animedit_poll_channels_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c
index be66edb8dc9..3f0e1b1be14 100644
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@ -88,7 +88,7 @@ void ANIM_list_elem_update(Scene *scene, bAnimListElem *ale)
RNA_id_pointer_create(id, &id_ptr);
- if(RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop))
+ if (RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop))
RNA_property_update_main(G.main, scene, &ptr, prop);
}
else {
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 1ef02f46000..bab341ae70b 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -51,9 +51,6 @@
#include "UI_resources.h"
#include "UI_view2d.h"
-/* XXX */
-extern void ui_rasterpos_safe(float x, float y, float aspect);
-
/* *************************************************** */
/* TIME CODE FORMATTING */
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 95cb7dad9a4..76217a7592f 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1202,7 +1202,7 @@ static size_t animfilter_block_data (bAnimContext *ac, ListBase *anim_data, bDop
size_t items = 0;
/* image object datablocks have no anim-data so check for NULL */
- if(adt) {
+ if (adt) {
IdAdtTemplate *iat = (IdAdtTemplate*)id;
/* NOTE: this macro is used instead of inlining the logic here, since this sort of filtering is still needed
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 803516e211b..86e3c8050c2 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -410,7 +410,7 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
}
else {
UI_ThemeColor(TH_TEXT);
- if((marker->frame <= cfra) && (marker->frame+5 > cfra)) {
+ if ((marker->frame <= cfra) && (marker->frame+5 > cfra)) {
x= xpos*xscale + 4.0f;
y= (ypixels <= 39.0f)? (ypixels - 10.0f) : 29.0f;
}
@@ -421,7 +421,7 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
}
#ifdef DURIAN_CAMERA_SWITCH
- if(marker->camera && (marker->camera->restrictflag & OB_RESTRICT_RENDER)) {
+ if (marker->camera && (marker->camera->restrictflag & OB_RESTRICT_RENDER)) {
float col[4];
glGetFloatv(GL_CURRENT_COLOR, col);
col[3]= 0.4;
@@ -582,17 +582,17 @@ static int ed_marker_add(bContext *C, wmOperator *UNUSED(op))
static void MARKER_OT_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Time Marker";
- ot->description= "Add a new time marker";
- ot->idname= "MARKER_OT_add";
+ ot->name = "Add Time Marker";
+ ot->description = "Add a new time marker";
+ ot->idname = "MARKER_OT_add";
/* api callbacks */
- ot->exec= ed_marker_add;
+ ot->exec = ed_marker_add;
ot->invoke = ed_markers_opwrap_invoke;
- ot->poll= ED_operator_animview_active;
+ ot->poll = ED_operator_animview_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************************** transform markers *************************** */
@@ -638,7 +638,7 @@ static int ed_marker_move_init(bContext *C, wmOperator *op)
int totmark=0;
int a;
- if(markers == NULL) return 0;
+ if (markers == NULL) return 0;
for (marker= markers->first; marker; marker= marker->next)
if (marker->flag & SELECT) totmark++;
@@ -681,7 +681,7 @@ static void ed_marker_move_exit(bContext *C, wmOperator *op)
static int ed_marker_move_invoke(bContext *C, wmOperator *op, wmEvent *evt)
{
- if(ed_marker_move_init(C, op)) {
+ if (ed_marker_move_init(C, op)) {
MarkerMove *mm= op->customdata;
mm->evtx= evt->x;
@@ -872,7 +872,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
static int ed_marker_move_exec(bContext *C, wmOperator *op)
{
- if(ed_marker_move_init(C, op)) {
+ if (ed_marker_move_init(C, op)) {
ed_marker_move_apply(op);
ed_marker_move_exit(C, op);
return OPERATOR_FINISHED;
@@ -883,19 +883,19 @@ static int ed_marker_move_exec(bContext *C, wmOperator *op)
static void MARKER_OT_move(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Time Marker";
- ot->description= "Move selected time marker(s)";
- ot->idname= "MARKER_OT_move";
+ ot->name = "Move Time Marker";
+ ot->description = "Move selected time marker(s)";
+ ot->idname = "MARKER_OT_move";
/* api callbacks */
- ot->exec= ed_marker_move_exec;
- ot->invoke= ed_marker_move_invoke_wrapper;
- ot->modal= ed_marker_move_modal;
- ot->poll= ed_markers_poll_selected_markers;
- ot->cancel= ed_marker_move_cancel;
+ ot->exec = ed_marker_move_exec;
+ ot->invoke = ed_marker_move_invoke_wrapper;
+ ot->modal = ed_marker_move_modal;
+ ot->poll = ed_markers_poll_selected_markers;
+ ot->cancel = ed_marker_move_cancel;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
/* rna storage */
RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, "Frames", "", INT_MIN, INT_MAX);
@@ -976,19 +976,19 @@ static int ed_marker_duplicate_invoke_wrapper(bContext *C, wmOperator *op, wmEve
static void MARKER_OT_duplicate(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Duplicate Time Marker";
- ot->description= "Duplicate selected time marker(s)";
- ot->idname= "MARKER_OT_duplicate";
+ ot->name = "Duplicate Time Marker";
+ ot->description = "Duplicate selected time marker(s)";
+ ot->idname = "MARKER_OT_duplicate";
/* api callbacks */
- ot->exec= ed_marker_duplicate_exec;
- ot->invoke= ed_marker_duplicate_invoke_wrapper;
- ot->modal= ed_marker_move_modal;
- ot->poll= ed_markers_poll_selected_markers;
- ot->cancel= ed_marker_move_cancel;
+ ot->exec = ed_marker_duplicate_exec;
+ ot->invoke = ed_marker_duplicate_invoke_wrapper;
+ ot->modal = ed_marker_move_modal;
+ ot->poll = ed_markers_poll_selected_markers;
+ ot->cancel = ed_marker_move_cancel;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* rna storage */
RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, "Frames", "", INT_MIN, INT_MAX);
@@ -1051,7 +1051,7 @@ static int ed_marker_select(bContext *C, wmEvent *evt, int extend, int camera)
scene_deselect_all(scene);
for (marker= markers->first; marker; marker= marker->next) {
- if(marker->frame==cfra) {
+ if (marker->frame==cfra) {
sel= (marker->flag & SELECT);
break;
}
@@ -1063,7 +1063,7 @@ static int ed_marker_select(bContext *C, wmEvent *evt, int extend, int camera)
base= object_in_scene(marker->camera, scene);
if (base) {
ED_base_object_select(base, sel);
- if(sel)
+ if (sel)
ED_base_object_activate(C, base);
}
}
@@ -1101,16 +1101,16 @@ static int ed_marker_select_invoke_wrapper(bContext *C, wmOperator *op, wmEvent
static void MARKER_OT_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Time Marker";
- ot->description= "Select time marker(s)";
- ot->idname= "MARKER_OT_select";
+ ot->name = "Select Time Marker";
+ ot->description = "Select time marker(s)";
+ ot->idname = "MARKER_OT_select";
/* api callbacks */
- ot->invoke= ed_marker_select_invoke_wrapper;
- ot->poll= ed_markers_poll_markers_exist;
+ ot->invoke = ed_marker_select_invoke_wrapper;
+ ot->poll = ed_markers_poll_markers_exist;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection");
#ifdef DURIAN_CAMERA_SWITCH
@@ -1189,20 +1189,20 @@ static int ed_marker_select_border_invoke_wrapper(bContext *C, wmOperator *op, w
static void MARKER_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Marker Border select";
- ot->description= "Select all time markers using border selection";
- ot->idname= "MARKER_OT_select_border";
+ ot->name = "Marker Border select";
+ ot->description = "Select all time markers using border selection";
+ ot->idname = "MARKER_OT_select_border";
/* api callbacks */
- ot->exec= ed_marker_border_select_exec;
- ot->invoke= ed_marker_select_border_invoke_wrapper;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->exec = ed_marker_border_select_exec;
+ ot->invoke = ed_marker_select_border_invoke_wrapper;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= ed_markers_poll_markers_exist;
+ ot->poll = ed_markers_poll_markers_exist;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* rna */
WM_operator_properties_gesture_border(ot, TRUE);
@@ -1223,7 +1223,7 @@ static int ed_marker_select_all_exec(bContext *C, wmOperator *op)
action = (ED_markers_get_first_selected(markers) != NULL) ? SEL_DESELECT : SEL_SELECT;
}
- for(marker= markers->first; marker; marker= marker->next) {
+ for (marker= markers->first; marker; marker= marker->next) {
switch (action) {
case SEL_SELECT:
marker->flag |= SELECT;
@@ -1246,17 +1246,17 @@ static int ed_marker_select_all_exec(bContext *C, wmOperator *op)
static void MARKER_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "(De)select all markers";
- ot->description= "Change selection of all time markers";
- ot->idname= "MARKER_OT_select_all";
+ ot->name = "(De)select all markers";
+ ot->description = "Change selection of all time markers";
+ ot->idname = "MARKER_OT_select_all";
/* api callbacks */
- ot->exec= ed_marker_select_all_exec;
+ ot->exec = ed_marker_select_all_exec;
ot->invoke = ed_markers_opwrap_invoke;
- ot->poll= ed_markers_poll_markers_exist;
+ ot->poll = ed_markers_poll_markers_exist;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* rna */
WM_operator_properties_select_all(ot);
@@ -1299,17 +1299,17 @@ static int ed_marker_delete_invoke_wrapper(bContext *C, wmOperator *op, wmEvent
static void MARKER_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Markers";
- ot->description= "Delete selected time marker(s)";
- ot->idname= "MARKER_OT_delete";
+ ot->name = "Delete Markers";
+ ot->description = "Delete selected time marker(s)";
+ ot->idname = "MARKER_OT_delete";
/* api callbacks */
- ot->invoke= ed_marker_delete_invoke_wrapper;
- ot->exec= ed_marker_delete_exec;
- ot->poll= ed_markers_poll_selected_markers;
+ ot->invoke = ed_marker_delete_invoke_wrapper;
+ ot->exec = ed_marker_delete_exec;
+ ot->poll = ed_markers_poll_selected_markers;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1347,17 +1347,17 @@ static int ed_marker_rename_invoke_wrapper(bContext *C, wmOperator *op, wmEvent
static void MARKER_OT_rename(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Rename Marker";
- ot->description= "Rename first selected time marker";
- ot->idname= "MARKER_OT_rename";
+ ot->name = "Rename Marker";
+ ot->description = "Rename first selected time marker";
+ ot->idname = "MARKER_OT_rename";
/* api callbacks */
- ot->invoke= ed_marker_rename_invoke_wrapper;
- ot->exec= ed_marker_rename_exec;
- ot->poll= ed_markers_poll_selected_markers;
+ ot->invoke = ed_marker_rename_invoke_wrapper;
+ ot->exec = ed_marker_rename_exec;
+ ot->poll = ed_markers_poll_selected_markers;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_string(ot->srna, "name", "RenamedMarker", sizeof(((TimeMarker *)NULL)->name), "Name", "New name for marker");
@@ -1400,22 +1400,22 @@ static void MARKER_OT_make_links_scene(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Make Links to Scene";
- ot->description= "Copy selected markers to another scene";
- ot->idname= "MARKER_OT_make_links_scene";
+ ot->name = "Make Links to Scene";
+ ot->description = "Copy selected markers to another scene";
+ ot->idname = "MARKER_OT_make_links_scene";
/* api callbacks */
- ot->exec= ed_marker_make_links_scene_exec;
+ ot->exec = ed_marker_make_links_scene_exec;
ot->invoke = ed_markers_opwrap_invoke;
- ot->poll= ed_markers_poll_selected_markers;
+ ot->poll = ed_markers_poll_selected_markers;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", "");
RNA_def_enum_funcs(prop, RNA_scene_itemf);
- ot->prop= prop;
+ ot->prop = prop;
}
@@ -1431,7 +1431,7 @@ static int ed_marker_camera_bind_exec(bContext *C, wmOperator *UNUSED(op))
TimeMarker *marker;
marker= ED_markers_get_first_selected(markers);
- if(marker == NULL)
+ if (marker == NULL)
return OPERATOR_CANCELLED;
marker->camera= ob;
@@ -1450,17 +1450,17 @@ static int ed_marker_camera_bind_exec(bContext *C, wmOperator *UNUSED(op))
static void MARKER_OT_camera_bind(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Bind Camera to Markers";
- ot->description= "Bind the active camera to selected markers(s)";
- ot->idname= "MARKER_OT_camera_bind";
+ ot->name = "Bind Camera to Markers";
+ ot->description = "Bind the active camera to selected markers(s)";
+ ot->idname = "MARKER_OT_camera_bind";
/* api callbacks */
- ot->exec= ed_marker_camera_bind_exec;
+ ot->exec = ed_marker_camera_bind_exec;
ot->invoke = ed_markers_opwrap_invoke;
- ot->poll= ed_markers_poll_selected_markers;
+ ot->poll = ed_markers_poll_selected_markers;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
#endif
@@ -1486,7 +1486,7 @@ void ED_operatortypes_marker(void)
/* called in screen_ops.c:ED_keymap_screen() */
void ED_marker_keymap(wmKeyConfig *keyconf)
{
- wmKeyMap *keymap= WM_keymap_find(keyconf, "Markers", 0, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "Markers", 0, 0);
wmKeyMapItem *kmi;
WM_keymap_verify_item(keymap, "MARKER_OT_add", MKEY, KM_PRESS, 0, 0);
@@ -1497,11 +1497,11 @@ void ED_marker_keymap(wmKeyConfig *keyconf)
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);
+ 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);
- kmi= WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+ 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);
#else
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index 5b246e63a20..8286e81b792 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -65,7 +65,7 @@ static int change_frame_poll(bContext *C)
ScrArea *curarea= CTX_wm_area(C);
/* XXX temp? prevent changes during render */
- if(G.rendering) return 0;
+ if (G.rendering) return 0;
/* as long as there is an active area, and it isn't a Graph Editor
* (since the Graph Editor has its own version which does extra stuff),
@@ -161,18 +161,18 @@ static int change_frame_modal(bContext *C, wmOperator *op, wmEvent *event)
static void ANIM_OT_change_frame(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Change frame";
- ot->idname= "ANIM_OT_change_frame";
- ot->description= "Interactively change the current frame number";
+ ot->name = "Change frame";
+ ot->idname = "ANIM_OT_change_frame";
+ ot->description = "Interactively change the current frame number";
/* api callbacks */
- ot->exec= change_frame_exec;
- ot->invoke= change_frame_invoke;
- ot->modal= change_frame_modal;
- ot->poll= change_frame_poll;
+ ot->exec = change_frame_exec;
+ ot->invoke = change_frame_invoke;
+ ot->modal = change_frame_modal;
+ ot->poll = change_frame_poll;
/* flags */
- ot->flag= OPTYPE_BLOCKING|OPTYPE_UNDO;
+ ot->flag = OPTYPE_BLOCKING|OPTYPE_UNDO;
/* rna */
RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME);
@@ -216,20 +216,20 @@ static int previewrange_define_exec(bContext *C, wmOperator *op)
static void ANIM_OT_previewrange_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Preview Range";
- ot->idname= "ANIM_OT_previewrange_set";
- ot->description= "Interactively define frame range used for playback";
+ ot->name = "Set Preview Range";
+ ot->idname = "ANIM_OT_previewrange_set";
+ ot->description = "Interactively define frame range used for playback";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= previewrange_define_exec;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = previewrange_define_exec;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= ED_operator_animview_active;
+ ot->poll = ED_operator_animview_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* rna */
/* used to define frame range */
@@ -264,17 +264,17 @@ static int previewrange_clear_exec(bContext *C, wmOperator *UNUSED(op))
static void ANIM_OT_previewrange_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Preview Range";
- ot->idname= "ANIM_OT_previewrange_clear";
- ot->description= "Clear Preview Range";
+ ot->name = "Clear Preview Range";
+ ot->idname = "ANIM_OT_previewrange_clear";
+ ot->description = "Clear Preview Range";
/* api callbacks */
- ot->exec= previewrange_clear_exec;
+ ot->exec = previewrange_clear_exec;
- ot->poll= ED_operator_animview_active;
+ ot->poll = ED_operator_animview_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************************** registration **********************************/
@@ -315,7 +315,7 @@ void ED_operatortypes_anim(void)
void ED_keymap_anim(wmKeyConfig *keyconf)
{
- wmKeyMap *keymap= WM_keymap_find(keyconf, "Animation", 0, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "Animation", 0, 0);
wmKeyMapItem *kmi;
/* frame management */
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 6af95b35ba8..881de2904f7 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -515,16 +515,16 @@ static int add_driver_button_exec (bContext *C, wmOperator *op)
void ANIM_OT_driver_button_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Driver";
- ot->idname= "ANIM_OT_driver_button_add";
- ot->description= "Add driver(s) for the property(s) connected represented by the highlighted button";
+ ot->name = "Add Driver";
+ ot->idname = "ANIM_OT_driver_button_add";
+ ot->description = "Add driver(s) for the property(s) connected represented by the highlighted button";
/* callbacks */
- ot->exec= add_driver_button_exec;
+ ot->exec = add_driver_button_exec;
//op->poll= ??? // TODO: need to have some animatable property to do this
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 1, "All", "Create drivers for all elements of the array");
@@ -567,16 +567,16 @@ static int remove_driver_button_exec (bContext *C, wmOperator *op)
void ANIM_OT_driver_button_remove (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Driver";
- ot->idname= "ANIM_OT_driver_button_remove";
- ot->description= "Remove the driver(s) for the property(s) connected represented by the highlighted button";
+ ot->name = "Remove Driver";
+ ot->idname = "ANIM_OT_driver_button_remove";
+ ot->description = "Remove the driver(s) for the property(s) connected represented by the highlighted button";
/* callbacks */
- ot->exec= remove_driver_button_exec;
+ ot->exec = remove_driver_button_exec;
//op->poll= ??? // TODO: need to have some driver to be able to do this...
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 1, "All", "Delete drivers for all elements of the array");
@@ -614,16 +614,16 @@ static int copy_driver_button_exec (bContext *C, wmOperator *op)
void ANIM_OT_copy_driver_button (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Driver";
- ot->idname= "ANIM_OT_copy_driver_button";
- ot->description= "Copy the driver for the highlighted button";
+ ot->name = "Copy Driver";
+ ot->idname = "ANIM_OT_copy_driver_button";
+ ot->description = "Copy the driver for the highlighted button";
/* callbacks */
- ot->exec= copy_driver_button_exec;
+ ot->exec = copy_driver_button_exec;
//op->poll= ??? // TODO: need to have some driver to be able to do this...
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* Paste Driver Button Operator ------------------------ */
@@ -658,16 +658,16 @@ static int paste_driver_button_exec (bContext *C, wmOperator *op)
void ANIM_OT_paste_driver_button (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Paste Driver";
- ot->idname= "ANIM_OT_paste_driver_button";
- ot->description= "Paste the driver in the copy/paste buffer for the highlighted button";
+ ot->name = "Paste Driver";
+ ot->idname = "ANIM_OT_paste_driver_button";
+ ot->description = "Paste the driver in the copy/paste buffer for the highlighted button";
/* callbacks */
- ot->exec= paste_driver_button_exec;
+ ot->exec = paste_driver_button_exec;
//op->poll= ??? // TODO: need to have some driver to be able to do this...
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************************************************** */
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index de0af2d8f8f..9b3e481d118 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -126,7 +126,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
/* col= uiLayoutColumn(layout, 1); */ /* UNUSED */
block= uiLayoutGetBlock(layout);
uiBlockBeginAlign(block);
- but= uiDefButR(block, MENU, B_FMODIFIER_REDRAW, NULL, 0, 0, width-30, UI_UNIT_Y, &ptr, "mode", -1, 0, 0, -1, -1, NULL);
+ but = uiDefButR(block, MENU, B_FMODIFIER_REDRAW, NULL, 0, 0, width-30, UI_UNIT_Y, &ptr, "mode", -1, 0, 0, -1, -1, NULL);
uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
uiDefButR(block, TOG, B_FMODIFIER_REDRAW, NULL, 0, 0, width-30, UI_UNIT_Y, &ptr, "use_additive", -1, 0, 0, -1, -1, NULL);
@@ -143,7 +143,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
/* draw polynomial order selector */
row= uiLayoutRow(layout, 0);
block= uiLayoutGetBlock(row);
- but= uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 10, 0, width-30, 19,
+ but = uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 10, 0, width-30, 19,
&data->poly_order, 1, 100, 0, 0,
TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
@@ -196,7 +196,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s
/* draw polynomial order selector */
row= uiLayoutRow(layout, 0);
block= uiLayoutGetBlock(row);
- but= uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 0, 0, width-30, 19,
+ but = uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 0, 0, width-30, 19,
&data->poly_order, 1, 100, 0, 0,
TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
@@ -515,7 +515,7 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh
uiDefBut(block, LABEL, 1, IFACE_("Control Points:"), 0, 0, 150, 20, NULL, 0.0, 0.0, 0, 0, "");
- but= uiDefBut(block, BUT, B_FMODIFIER_REDRAW, IFACE_("Add Point"), 0, 0, 150, 19,
+ but = uiDefBut(block, BUT, B_FMODIFIER_REDRAW, IFACE_("Add Point"), 0, 0, 150, 19,
NULL, 0, 0, 0, 0, TIP_("Add a new control-point to the envelope on the current frame"));
uiButSetFunc(but, fmod_envelope_addpoint_cb, env, NULL);
@@ -535,7 +535,7 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh
uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Max:"), 0, 0, 100, 20,
&fed->max, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, TIP_("Maximum bound of envelope at this point"));
- but= uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 0, 0, 18, 20,
+ but = uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 0, 0, 18, 20,
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete envelope control point"));
uiButSetFunc(but, fmod_envelope_deletepoint_cb, env, SET_INT_IN_POINTER(i));
uiBlockBeginAlign(block);
@@ -674,7 +674,7 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie
uiBlockSetEmboss(block, UI_EMBOSSN);
/* delete button */
- but= uiDefIconBut(block, BUT, B_REDR, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y,
+ but = uiDefIconBut(block, BUT, B_REDR, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y,
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete F-Curve Modifier"));
uiButSetFunc(but, delete_fmodifier_cb, modifiers, fcm);
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index 8b93688f4cb..1c0bb9beaa1 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -269,7 +269,7 @@ static void nupdate_abk_bezt (void *node, void *data)
if (abk->numBezts >= MAX_ABK_BUFSIZE) {
// TODO: need to allocate new array to cater...
//bezts_extra= MEM_callocN(...);
- if(G.f & G_DEBUG)
+ if (G.f & G_DEBUG)
printf("FIXME: nupdate_abk_bezt() missing case for too many overlapping BezTriples \n");
}
else {
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index f140c408e68..c6aed3133e2 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -751,7 +751,6 @@ KeyframeEditFunc ANIM_editkeyframes_mirror(short type)
return mirror_bezier_value;
default: /* just in case */
return mirror_bezier_yaxis;
- break;
}
}
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 9ce148bc083..5d6d02bef63 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -853,7 +853,7 @@ short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data,
}
}
- /* dont continue if some fcurves were pasted */
+ /* don't continue if some fcurves were pasted */
if (totmatch)
break;
}
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index e82f234d2b6..71e70536d15 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -317,9 +317,9 @@ int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag)
/* use default interpolation mode, with exceptions for int/discrete values */
beztr.ipo= U.ipo_new;
- if(fcu->flag & FCURVE_DISCRETE_VALUES)
+ if (fcu->flag & FCURVE_DISCRETE_VALUES)
beztr.ipo = BEZT_IPO_CONST;
- else if(beztr.ipo == BEZT_IPO_BEZ && (fcu->flag & FCURVE_INT_VALUES))
+ else if (beztr.ipo == BEZT_IPO_BEZ && (fcu->flag & FCURVE_INT_VALUES))
beztr.ipo = BEZT_IPO_LIN;
/* add temp beztriple to keyframes */
@@ -573,7 +573,7 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop)
return 0;
/* location or rotation identifiers only... */
- if(identifier == NULL) {
+ if (identifier == NULL) {
printf("%s failed: NULL identifier\n", __func__);
return 0;
}
@@ -1158,22 +1158,22 @@ void ANIM_OT_keyframe_insert (wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Insert Keyframe";
- ot->idname= "ANIM_OT_keyframe_insert";
- ot->description= "Insert keyframes on the current frame for all properties in the specified Keying Set";
+ ot->name = "Insert Keyframe";
+ ot->idname = "ANIM_OT_keyframe_insert";
+ ot->description = "Insert keyframes on the current frame for all properties in the specified Keying Set";
/* callbacks */
- ot->exec= insert_key_exec;
- ot->poll= modify_key_op_poll;
+ ot->exec = insert_key_exec;
+ ot->poll = modify_key_op_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* keyingset to use (dynamic enum) */
prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
RNA_def_enum_funcs(prop, ANIM_keying_sets_enum_itemf);
RNA_def_property_flag(prop, PROP_HIDDEN);
- ot->prop= prop;
+ ot->prop = prop;
/* confirm whether a keyframe was added by showing a popup
* - by default, this is enabled, since this operator is assumed to be called independently
@@ -1219,23 +1219,23 @@ void ANIM_OT_keyframe_insert_menu (wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Insert Keyframe Menu";
- ot->idname= "ANIM_OT_keyframe_insert_menu";
- ot->description= "Insert Keyframes for specified Keying Set, with menu of available Keying Sets if undefined";
+ ot->name = "Insert Keyframe Menu";
+ ot->idname = "ANIM_OT_keyframe_insert_menu";
+ ot->description = "Insert Keyframes for specified Keying Set, with menu of available Keying Sets if undefined";
/* callbacks */
- ot->invoke= insert_key_menu_invoke;
- ot->exec= insert_key_exec;
- ot->poll= ED_operator_areaactive;
+ ot->invoke = insert_key_menu_invoke;
+ ot->exec = insert_key_exec;
+ ot->poll = ED_operator_areaactive;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* keyingset to use (dynamic enum) */
prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
RNA_def_enum_funcs(prop, ANIM_keying_sets_enum_itemf);
RNA_def_property_flag(prop, PROP_HIDDEN);
- ot->prop= prop;
+ ot->prop = prop;
/* confirm whether a keyframe was added by showing a popup
* - by default, this is disabled so that if a menu is shown, this doesn't come up too
@@ -1314,22 +1314,22 @@ void ANIM_OT_keyframe_delete (wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Delete Keying-Set Keyframe";
- ot->idname= "ANIM_OT_keyframe_delete";
- ot->description= "Delete keyframes on the current frame for all properties in the specified Keying Set";
+ ot->name = "Delete Keying-Set Keyframe";
+ ot->idname = "ANIM_OT_keyframe_delete";
+ ot->description = "Delete keyframes on the current frame for all properties in the specified Keying Set";
/* callbacks */
- ot->exec= delete_key_exec;
- ot->poll= modify_key_op_poll;
+ ot->exec = delete_key_exec;
+ ot->poll = modify_key_op_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* keyingset to use (dynamic enum) */
prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
RNA_def_enum_funcs(prop, ANIM_keying_sets_enum_itemf);
RNA_def_property_flag(prop, PROP_HIDDEN);
- ot->prop= prop;
+ ot->prop = prop;
/* confirm whether a keyframe was added by showing a popup
* - by default, this is enabled, since this operator is assumed to be called independently
@@ -1387,18 +1387,18 @@ static int delete_key_v3d_exec (bContext *C, wmOperator *op)
void ANIM_OT_keyframe_delete_v3d (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Keyframe";
- ot->description= "Remove keyframes on current frame for selected object";
- ot->idname= "ANIM_OT_keyframe_delete_v3d";
+ ot->name = "Delete Keyframe";
+ ot->description = "Remove keyframes on current frame for selected object";
+ ot->idname = "ANIM_OT_keyframe_delete_v3d";
/* callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= delete_key_v3d_exec;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = delete_key_v3d_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll = ED_operator_areaactive;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1429,7 +1429,7 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
if (all) {
length= RNA_property_array_length(&ptr, prop);
- if(length) index= 0;
+ if (length) index= 0;
else length= 1;
}
else
@@ -1477,15 +1477,15 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
void ANIM_OT_keyframe_insert_button (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Insert Keyframe (Buttons)";
- ot->idname= "ANIM_OT_keyframe_insert_button";
+ ot->name = "Insert Keyframe (Buttons)";
+ ot->idname = "ANIM_OT_keyframe_insert_button";
/* callbacks */
- ot->exec= insert_key_button_exec;
- ot->poll= modify_key_op_poll;
+ ot->exec = insert_key_button_exec;
+ ot->poll = modify_key_op_poll;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 1, "All", "Insert a keyframe for all element of the array");
@@ -1549,15 +1549,15 @@ static int delete_key_button_exec (bContext *C, wmOperator *op)
void ANIM_OT_keyframe_delete_button (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Keyframe (Buttons)";
- ot->idname= "ANIM_OT_keyframe_delete_button";
+ ot->name = "Delete Keyframe (Buttons)";
+ ot->idname = "ANIM_OT_keyframe_delete_button";
/* callbacks */
- ot->exec= delete_key_button_exec;
- ot->poll= modify_key_op_poll;
+ ot->exec = delete_key_button_exec;
+ ot->poll = modify_key_op_poll;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 1, "All", "Delete keyfames from all elements of the array");
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index bc066b074ea..f66aa31f3f4 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -140,13 +140,13 @@ static int add_default_keyingset_exec (bContext *C, wmOperator *UNUSED(op))
void ANIM_OT_keying_set_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Empty Keying Set";
- ot->idname= "ANIM_OT_keying_set_add";
- ot->description= "Add a new (empty) Keying Set to the active Scene";
+ ot->name = "Add Empty Keying Set";
+ ot->idname = "ANIM_OT_keying_set_add";
+ ot->description = "Add a new (empty) Keying Set to the active Scene";
/* callbacks */
- ot->exec= add_default_keyingset_exec;
- ot->poll= keyingset_poll_default_add;
+ ot->exec = add_default_keyingset_exec;
+ ot->poll = keyingset_poll_default_add;
}
/* Remove 'Active' Keying Set ------------------------- */
@@ -187,13 +187,13 @@ static int remove_active_keyingset_exec (bContext *C, wmOperator *op)
void ANIM_OT_keying_set_remove (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Removed Active Keying Set";
- ot->idname= "ANIM_OT_keying_set_remove";
- ot->description= "Remove the active Keying Set";
+ ot->name = "Remove Active Keying Set";
+ ot->idname = "ANIM_OT_keying_set_remove";
+ ot->description = "Remove the active Keying Set";
/* callbacks */
- ot->exec= remove_active_keyingset_exec;
- ot->poll= keyingset_poll_active_edit;
+ ot->exec = remove_active_keyingset_exec;
+ ot->poll = keyingset_poll_active_edit;
}
/* Add Empty Keying Set Path ------------------------- */
@@ -230,13 +230,13 @@ static int add_empty_ks_path_exec (bContext *C, wmOperator *op)
void ANIM_OT_keying_set_path_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Empty Keying Set Path";
- ot->idname= "ANIM_OT_keying_set_path_add";
- ot->description= "Add empty path to active Keying Set";
+ ot->name = "Add Empty Keying Set Path";
+ ot->idname = "ANIM_OT_keying_set_path_add";
+ ot->description = "Add empty path to active Keying Set";
/* callbacks */
- ot->exec= add_empty_ks_path_exec;
- ot->poll= keyingset_poll_active_edit;
+ ot->exec = add_empty_ks_path_exec;
+ ot->poll = keyingset_poll_active_edit;
}
/* Remove Active Keying Set Path ------------------------- */
@@ -273,13 +273,13 @@ static int remove_active_ks_path_exec (bContext *C, wmOperator *op)
void ANIM_OT_keying_set_path_remove (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Active Keying Set Path";
- ot->idname= "ANIM_OT_keying_set_path_remove";
- ot->description= "Remove active Path from active Keying Set";
+ ot->name = "Remove Active Keying Set Path";
+ ot->idname = "ANIM_OT_keying_set_path_remove";
+ ot->description = "Remove active Path from active Keying Set";
/* callbacks */
- ot->exec= remove_active_ks_path_exec;
- ot->poll= keyingset_poll_activePath_edit;
+ ot->exec = remove_active_ks_path_exec;
+ ot->poll = keyingset_poll_activePath_edit;
}
/* ************************************************** */
@@ -371,15 +371,15 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op)
void ANIM_OT_keyingset_button_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add to Keying Set";
- ot->idname= "ANIM_OT_keyingset_button_add";
+ ot->name = "Add to Keying Set";
+ ot->idname = "ANIM_OT_keyingset_button_add";
/* callbacks */
- ot->exec= add_keyingset_button_exec;
+ ot->exec = add_keyingset_button_exec;
//op->poll= ???
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 1, "All", "Add all elements of the array to a Keying Set");
@@ -450,15 +450,15 @@ static int remove_keyingset_button_exec (bContext *C, wmOperator *op)
void ANIM_OT_keyingset_button_remove (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove from Keying Set";
- ot->idname= "ANIM_OT_keyingset_button_remove";
+ ot->name = "Remove from Keying Set";
+ ot->idname = "ANIM_OT_keyingset_button_remove";
/* callbacks */
- ot->exec= remove_keyingset_button_exec;
+ ot->exec = remove_keyingset_button_exec;
//op->poll= ???
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************************************* */
@@ -499,16 +499,16 @@ void ANIM_OT_keying_set_active_set (wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Set Active Keying Set";
- ot->idname= "ANIM_OT_keying_set_active_set";
+ ot->name = "Set Active Keying Set";
+ ot->idname = "ANIM_OT_keying_set_active_set";
/* callbacks */
- ot->invoke= keyingset_active_menu_invoke;
- ot->exec= keyingset_active_menu_exec;
- ot->poll= ED_operator_areaactive;
+ ot->invoke = keyingset_active_menu_invoke;
+ ot->exec = keyingset_active_menu_exec;
+ ot->poll = ED_operator_areaactive;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* keyingset to use (dynamic enum) */
prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
@@ -607,7 +607,7 @@ void ANIM_keyingset_info_unregister (Main *bmain, KeyingSetInfo *ksi)
BKE_keyingset_free(ks);
BLI_remlink(&builtin_keyingsets, ks);
- for(scene= bmain->scene.first; scene; scene= scene->id.next)
+ for (scene= bmain->scene.first; scene; scene= scene->id.next)
BLI_remlink_safe(&scene->keyingsets, ks);
MEM_freeN(ks);
diff --git a/source/blender/editors/armature/CMakeLists.txt b/source/blender/editors/armature/CMakeLists.txt
index 8c1243ee300..2bd9956ef5a 100644
--- a/source/blender/editors/armature/CMakeLists.txt
+++ b/source/blender/editors/armature/CMakeLists.txt
@@ -55,4 +55,8 @@ set(SRC
reeb.h
)
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_armature "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/armature/SConscript b/source/blender/editors/armature/SConscript
index b85a13ced85..e5c96d3530f 100644
--- a/source/blender/editors/armature/SConscript
+++ b/source/blender/editors/armature/SConscript
@@ -8,6 +8,8 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../render/extern/include ../../bmesh'
incs += ' ../../gpu ../../makesrna #/intern/opennl/extern'
+defs = []
+
if env['OURPLATFORM'] == 'linux':
cflags='-pthread'
incs += ' ../../../extern/binreloc/include'
@@ -15,4 +17,7 @@ if env['OURPLATFORM'] == 'linux':
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
-env.BlenderLib ( 'bf_editors_armature', sources, Split(incs), [], libtype=['core'], priority=[44] )
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
+env.BlenderLib ( 'bf_editors_armature', sources, Split(incs), defs, libtype=['core'], priority=[44] )
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c
index ad52f4e61cb..21b97188522 100644
--- a/source/blender/editors/armature/armature_ops.c
+++ b/source/blender/editors/armature/armature_ops.c
@@ -170,31 +170,31 @@ void ED_operatormacros_armature(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot= WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
- if(ot) {
- ot->description= "Make copies of the selected bones within the same armature and move them";
+ ot = WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ if (ot) {
+ ot->description = "Make copies of the selected bones within the same armature and move them";
WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
}
- ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER);
- if(ot) {
- ot->description= "Create new bones from the selected joints and move them";
+ ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER);
+ if (ot) {
+ ot->description = "Create new bones from the selected joints and move them";
otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
RNA_boolean_set(otmacro->ptr, "forked", FALSE);
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
}
// XXX would it be nicer to just be able to have standard extrude_move, but set the forked property separate?
// that would require fixing a properties bug 19733
- ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked", OPTYPE_UNDO|OPTYPE_REGISTER);
- if(ot) {
- ot->description= "Create new bones from the selected joints and move them";
+ ot = WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked", OPTYPE_UNDO|OPTYPE_REGISTER);
+ if (ot) {
+ ot->description = "Create new bones from the selected joints and move them";
otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
RNA_boolean_set(otmacro->ptr, "forked", TRUE);
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
}
}
@@ -205,8 +205,8 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
wmKeyMapItem *kmi;
/* Armature ------------------------ */
- keymap= WM_keymap_find(keyconf, "Armature", 0, 0);
- keymap->poll= ED_operator_editarmature;
+ keymap = WM_keymap_find(keyconf, "Armature", 0, 0);
+ keymap->poll = ED_operator_editarmature;
/* Armature -> Etch-A-Ton ------------------------ */
WM_keymap_add_item(keymap, "SKETCH_OT_delete", XKEY, KM_PRESS, 0, 0);
@@ -228,7 +228,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
/* 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);
- kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "unselected", TRUE);
WM_keymap_add_item(keymap, "ARMATURE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
@@ -247,17 +247,17 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
- kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+ 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);
@@ -286,10 +286,10 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
/* special transforms: */
/* 1) envelope/b-bone size */
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_BONESIZE);
/* 2) set roll */
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", RKEY, KM_PRESS, KM_CTRL, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", RKEY, KM_PRESS, KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_BONE_ROLL);
/* menus */
@@ -297,8 +297,8 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
/* Pose ------------------------ */
/* only set in posemode, by space_view3d listener */
- keymap= WM_keymap_find(keyconf, "Pose", 0, 0);
- keymap->poll= ED_operator_posemode;
+ keymap = WM_keymap_find(keyconf, "Pose", 0, 0);
+ keymap->poll = ED_operator_posemode;
/* set parent and add object are object-based operators, but we make them
* available here because it's useful to do in pose mode too */
@@ -327,7 +327,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
RNA_boolean_set(kmi->ptr, "flipped", FALSE);
- kmi= WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "flipped", TRUE);
kmi = WM_keymap_add_item(keymap, "POSE_OT_select_all", AKEY, KM_PRESS, 0, 0);
@@ -337,17 +337,17 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "POSE_OT_select_parent", PKEY, KM_PRESS, KM_SHIFT, 0);
- kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+ 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);
@@ -374,7 +374,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
/* special transforms: */
/* 1) envelope/b-bone size */
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_BONESIZE);
/* keyframes management */
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 2a9436fdb41..4090fc1acaa 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -123,18 +123,18 @@ void ED_armature_validate_active(struct bArmature *arm)
{
EditBone *ebone= arm->act_edbone;
- if(ebone) {
- if(ebone->flag & BONE_HIDDEN_A)
+ if (ebone) {
+ if (ebone->flag & BONE_HIDDEN_A)
arm->act_edbone= NULL;
}
}
static void bone_free(bArmature *arm, EditBone *bone)
{
- if(arm->act_edbone==bone)
+ if (arm->act_edbone==bone)
arm->act_edbone= NULL;
- if(bone->prop) {
+ if (bone->prop) {
IDP_FreeProperty(bone->prop);
MEM_freeN(bone->prop);
}
@@ -275,9 +275,9 @@ EditBone *make_boneList(ListBase *edbo, ListBase *bones, EditBone *parent, Bone
else {
/* if the bone is not selected, but connected to its parent
* copy the parents tip selection state */
- if(eBone->parent && (eBone->flag & BONE_CONNECTED)) {
+ if (eBone->parent && (eBone->flag & BONE_CONNECTED)) {
/* selecting with the mouse gives this behavior */
- if(eBone->parent->flag & BONE_TIPSEL) {
+ if (eBone->parent->flag & BONE_TIPSEL) {
eBone->flag |= BONE_ROOTSEL;
}
else {
@@ -306,7 +306,7 @@ EditBone *make_boneList(ListBase *edbo, ListBase *bones, EditBone *parent, Bone
eBone->segments = curBone->segments;
eBone->layer = curBone->layer;
- if(curBone->prop)
+ if (curBone->prop)
eBone->prop= IDP_CopyProperty(curBone->prop);
BLI_addtail(edbo, eBone);
@@ -314,11 +314,11 @@ EditBone *make_boneList(ListBase *edbo, ListBase *bones, EditBone *parent, Bone
/* Add children if necessary */
if (curBone->childbase.first) {
eBoneTest= make_boneList(edbo, &curBone->childbase, eBone, actBone);
- if(eBoneTest)
+ if (eBoneTest)
eBoneAct= eBoneTest;
}
- if(curBone==actBone)
+ if (curBone==actBone)
eBoneAct= eBone;
}
@@ -434,7 +434,7 @@ void ED_armature_from_edit(Object *obedit)
newBone->segments= eBone->segments;
newBone->layer = eBone->layer;
- if(eBone->prop)
+ if (eBone->prop)
newBone->prop= IDP_CopyProperty(eBone->prop);
}
@@ -542,7 +542,7 @@ void docenter_armature (Scene *scene, Object *ob, float cursor[3], int centermod
float cent[3];
/* Put the armature into editmode */
- if(ob != obedit) {
+ if (ob != obedit) {
ED_armature_to_edit(ob);
obedit= NULL; /* we cant use this so behave as if there is no obedit */
}
@@ -554,7 +554,7 @@ void docenter_armature (Scene *scene, Object *ob, float cursor[3], int centermod
mul_m4_v3(ob->imat, cent);
}
else {
- if(around==V3D_CENTROID) {
+ if (around==V3D_CENTROID) {
int total= 0;
zero_v3(cent);
for (ebone= arm->edbo->first; ebone; ebone=ebone->next) {
@@ -582,13 +582,13 @@ void docenter_armature (Scene *scene, Object *ob, float cursor[3], int centermod
}
/* Turn the list into an armature */
- if(obedit==NULL) {
+ if (obedit==NULL) {
ED_armature_from_edit(ob);
ED_armature_edit_free(ob);
}
/* Adjust object location for new centerpoint */
- if(centermode && obedit==NULL) {
+ if (centermode && obedit==NULL) {
mul_mat3_m4_v3(ob->obmat, cent); /* ommit translation part */
add_v3_v3(ob->loc, cent);
}
@@ -729,16 +729,16 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
void POSE_OT_armature_apply (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Apply Pose as Rest Pose";
- ot->idname= "POSE_OT_armature_apply";
- ot->description= "Apply the current pose as the new rest pose";
+ ot->name = "Apply Pose as Rest Pose";
+ ot->idname = "POSE_OT_armature_apply";
+ ot->description = "Apply the current pose as the new rest pose";
/* callbacks */
- ot->exec= apply_armature_pose2bones_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = apply_armature_pose2bones_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -780,16 +780,16 @@ static int pose_visual_transform_apply_exec (bContext *C, wmOperator *UNUSED(op)
void POSE_OT_visual_transform_apply (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Apply Visual Transform to Pose";
- ot->idname= "POSE_OT_visual_transform_apply";
- ot->description= "Apply final constrained position of pose bones to their transform";
+ ot->name = "Apply Visual Transform to Pose";
+ ot->idname = "POSE_OT_visual_transform_apply";
+ ot->description = "Apply final constrained position of pose bones to their transform";
/* callbacks */
- ot->exec= pose_visual_transform_apply_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_visual_transform_apply_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ---------------------- */
@@ -1043,12 +1043,12 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm)
*/
if (ct->subtarget[0] != 0) {
if (ct->tar == origArm) {
- if(BLI_findstring(npchans, ct->subtarget, offsetof(bPoseChannel, name))) {
+ if (BLI_findstring(npchans, ct->subtarget, offsetof(bPoseChannel, name))) {
ct->tar= newArm;
}
}
else if (ct->tar == newArm) {
- if(BLI_findstring(opchans, ct->subtarget, offsetof(bPoseChannel, name))) {
+ if (BLI_findstring(opchans, ct->subtarget, offsetof(bPoseChannel, name))) {
ct->tar= origArm;
}
}
@@ -1079,14 +1079,14 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm)
* - the target isn't origArm/newArm itself
* - the target is one that can be found in newArm/origArm
*/
- if(ct->subtarget[0] != '\0') {
+ if (ct->subtarget[0] != '\0') {
if (ct->tar == origArm) {
- if(BLI_findstring(npchans, ct->subtarget, offsetof(bPoseChannel, name))) {
+ if (BLI_findstring(npchans, ct->subtarget, offsetof(bPoseChannel, name))) {
ct->tar= newArm;
}
}
else if (ct->tar == newArm) {
- if(BLI_findstring(opchans, ct->subtarget, offsetof(bPoseChannel, name))) {
+ if (BLI_findstring(opchans, ct->subtarget, offsetof(bPoseChannel, name))) {
ct->tar= origArm;
}
}
@@ -1104,7 +1104,7 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm)
if (ob->parent && (ob->parent == origArm)) {
/* Is object parented to a bone of this src armature? */
if ((ob->partype == PARBONE) && (ob->parsubstr[0] != '\0')) {
- if(BLI_findstring(npchans, ob->parsubstr, offsetof(bPoseChannel, name))) {
+ if (BLI_findstring(npchans, ob->parsubstr, offsetof(bPoseChannel, name))) {
ob->parent= newArm;
}
}
@@ -1243,17 +1243,17 @@ static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op))
void ARMATURE_OT_separate (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Separate Bones";
- ot->idname= "ARMATURE_OT_separate";
- ot->description= "Isolate selected bones into a separate armature";
+ ot->name = "Separate Bones";
+ ot->idname = "ARMATURE_OT_separate";
+ ot->description = "Isolate selected bones into a separate armature";
/* callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= separate_armature_exec;
- ot->poll= ED_operator_editarmature;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = separate_armature_exec;
+ ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* **************** END tools on Editmode Armature **************** */
@@ -1263,7 +1263,7 @@ void ARMATURE_OT_separate (wmOperatorType *ot)
Bone *get_indexed_bone (Object *ob, int index)
{
bPoseChannel *pchan;
- if(ob->pose==NULL) return NULL;
+ if (ob->pose==NULL) return NULL;
index>>=16; // bone selection codes use left 2 bytes
pchan= BLI_findlink(&ob->pose->chanbase, index);
@@ -1281,17 +1281,17 @@ static void *get_bone_from_selectbuffer(Scene *scene, Base *base, unsigned int *
unsigned int hitresult;
short i, takeNext=0, sel;
- for (i=0; i< hits; i++){
+ for (i=0; i< hits; i++) {
hitresult = buffer[3+(i*4)];
if (!(hitresult & BONESEL_NOSEL)) { // -1
- if(hitresult & BONESEL_ANY) { // to avoid including objects in selection
+ if (hitresult & BONESEL_ANY) { // to avoid including objects in selection
hitresult &= ~(BONESEL_ANY);
/* Determine what the current bone is */
if (obedit==NULL || base->object!=obedit) {
/* no singular posemode, so check for correct object */
- if(base->selcol == (hitresult & 0xFFFF)) {
+ if (base->selcol == (hitresult & 0xFFFF)) {
bone = get_indexed_bone(base->object, hitresult);
if (findunsel)
@@ -1306,7 +1306,7 @@ static void *get_bone_from_selectbuffer(Scene *scene, Base *base, unsigned int *
sel= 0;
}
}
- else{
+ else {
bArmature *arm= obedit->data;
ebone = BLI_findlink(arm->edbo, hitresult);
@@ -1318,9 +1318,9 @@ static void *get_bone_from_selectbuffer(Scene *scene, Base *base, unsigned int *
data = ebone;
}
- if(data) {
+ if (data) {
if (sel) {
- if(!firstSel) firstSel= data;
+ if (!firstSel) firstSel= data;
takeNext=1;
}
else {
@@ -1354,9 +1354,9 @@ static void *get_nearest_bone (bContext *C, short findunsel, int x, int y)
view3d_set_viewcontext(C, &vc);
- // rect.xmin= ... mouseco!
- rect.xmin= rect.xmax= x;
- rect.ymin= rect.ymax= y;
+ // rect.xmin = ... mouseco!
+ rect.xmin = rect.xmax = x;
+ rect.ymin = rect.ymax = y;
glInitNames();
hits= view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
@@ -1430,7 +1430,7 @@ static int pose_select_connected_invoke(bContext *C, wmOperator *op, wmEvent *ev
return OPERATOR_CANCELLED;
/* Select parents */
- for (curBone=bone; curBone; curBone=next){
+ for (curBone=bone; curBone; curBone=next) {
/* ignore bone if cannot be selected */
if ((curBone->flag & BONE_UNSELECTABLE) == 0) {
// XXX old cruft! use notifiers instead
@@ -1467,17 +1467,17 @@ static int pose_select_linked_poll(bContext *C)
void POSE_OT_select_linked(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Connected";
- ot->idname= "POSE_OT_select_linked";
- ot->description= "Select bones related to selected ones by parent/child relationships";
+ ot->name = "Select Connected";
+ ot->idname = "POSE_OT_select_linked";
+ ot->description = "Select bones related to selected ones by parent/child relationships";
/* api callbacks */
- ot->exec= NULL;
- ot->invoke= pose_select_connected_invoke;
- ot->poll= pose_select_linked_poll;
+ ot->exec = NULL;
+ ot->invoke = pose_select_connected_invoke;
+ ot->poll = pose_select_linked_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
@@ -1512,7 +1512,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, wmEvent *e
if (extend) {
curBone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
}
- else{
+ else {
curBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
}
}
@@ -1561,17 +1561,17 @@ static int armature_select_linked_poll(bContext *C)
void ARMATURE_OT_select_linked(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Connected";
- ot->idname= "ARMATURE_OT_select_linked";
- ot->description= "Select bones related to selected ones by parent/child relationships";
+ ot->name = "Select Connected";
+ ot->idname = "ARMATURE_OT_select_linked";
+ ot->description = "Select bones related to selected ones by parent/child relationships";
/* api callbacks */
- ot->exec= NULL;
- ot->invoke= armature_select_linked_invoke;
- ot->poll= armature_select_linked_poll;
+ ot->exec = NULL;
+ ot->invoke = armature_select_linked_invoke;
+ ot->poll = armature_select_linked_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties s*/
RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
@@ -1590,23 +1590,23 @@ static EditBone *get_nearest_editbonepoint (ViewContext *vc, const int mval[2],
glInitNames();
- rect.xmin= mval[0]-5;
- rect.xmax= mval[0]+5;
- rect.ymin= mval[1]-5;
- rect.ymax= mval[1]+5;
+ rect.xmin = mval[0]-5;
+ rect.xmax = mval[0]+5;
+ rect.ymin = mval[1]-5;
+ rect.ymax = mval[1]+5;
hits= view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect);
- if(hits==0) {
- rect.xmin= mval[0]-12;
- rect.xmax= mval[0]+12;
- rect.ymin= mval[1]-12;
- rect.ymax= mval[1]+12;
+ if (hits==0) {
+ rect.xmin = mval[0]-12;
+ rect.xmax = mval[0]+12;
+ rect.ymin = mval[1]-12;
+ rect.ymax = mval[1]+12;
hits= view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect);
}
/* See if there are any selected bones in this group */
if (hits>0) {
- if(hits==1) {
+ if (hits==1) {
if (!(buffer[3] & BONESEL_NOSEL))
besthitresult= buffer[3];
}
@@ -1619,12 +1619,12 @@ static EditBone *get_nearest_editbonepoint (ViewContext *vc, const int mval[2],
ebone = BLI_findlink(edbo, hitresult & ~BONESEL_ANY);
/* clicks on bone points get advantage */
- if( hitresult & (BONESEL_ROOT|BONESEL_TIP)) {
+ if ( hitresult & (BONESEL_ROOT|BONESEL_TIP)) {
/* but also the unselected one */
- if(findunsel) {
- if( (hitresult & BONESEL_ROOT) && (ebone->flag & BONE_ROOTSEL)==0)
+ if (findunsel) {
+ if ( (hitresult & BONESEL_ROOT) && (ebone->flag & BONE_ROOTSEL)==0)
dep= 1;
- else if( (hitresult & BONESEL_TIP) && (ebone->flag & BONE_TIPSEL)==0)
+ else if ( (hitresult & BONESEL_TIP) && (ebone->flag & BONE_TIPSEL)==0)
dep= 1;
else
dep= 2;
@@ -1633,15 +1633,15 @@ static EditBone *get_nearest_editbonepoint (ViewContext *vc, const int mval[2],
}
else {
/* bone found */
- if(findunsel) {
- if((ebone->flag & BONE_SELECTED)==0)
+ if (findunsel) {
+ if ((ebone->flag & BONE_SELECTED)==0)
dep= 2;
else
dep= 3;
}
else dep= 3;
}
- if(dep < mindep) {
+ if (dep < mindep) {
mindep= dep;
besthitresult= hitresult;
}
@@ -1729,7 +1729,7 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
ebone_next= curBone->next;
if (arm->layer & curBone->layer) {
if (curBone->flag & BONE_SELECTED) {
- if(curBone==arm->act_edbone) arm->act_edbone= NULL;
+ if (curBone==arm->act_edbone) arm->act_edbone= NULL;
ED_armature_edit_bone_remove(arm, curBone);
}
}
@@ -1746,9 +1746,9 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
void ARMATURE_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Selected Bone(s)";
- ot->idname= "ARMATURE_OT_delete";
- ot->description= "Remove selected bones from the armature";
+ ot->name = "Delete Selected Bone(s)";
+ ot->idname = "ARMATURE_OT_delete";
+ ot->description = "Remove selected bones from the armature";
/* api callbacks */
ot->invoke = WM_operator_confirm;
@@ -1756,7 +1756,7 @@ void ARMATURE_OT_delete(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* toggle==0: deselect
@@ -1769,12 +1769,12 @@ void ED_armature_deselect_all(Object *obedit, int toggle)
EditBone *eBone;
int sel=1;
- if(toggle==1) {
+ if (toggle==1) {
/* Determine if there are any selected bones
* and therefore whether we are selecting or deselecting */
- for (eBone=arm->edbo->first;eBone;eBone=eBone->next){
- // if(arm->layer & eBone->layer) {
- if (eBone->flag & (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL)){
+ for (eBone=arm->edbo->first;eBone;eBone=eBone->next) {
+ // if (arm->layer & eBone->layer) {
+ if (eBone->flag & (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL)) {
sel=0;
break;
}
@@ -1787,24 +1787,24 @@ void ED_armature_deselect_all(Object *obedit, int toggle)
for (eBone=arm->edbo->first;eBone;eBone=eBone->next) {
if (sel==2) {
/* invert selection of bone */
- if(EBONE_VISIBLE(arm, eBone)) {
+ if (EBONE_VISIBLE(arm, eBone)) {
eBone->flag ^= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- if(arm->act_edbone==eBone)
+ if (arm->act_edbone==eBone)
arm->act_edbone= NULL;
}
}
else if (sel==1) {
/* select bone */
- if(EBONE_VISIBLE(arm, eBone)) {
+ if (EBONE_VISIBLE(arm, eBone)) {
eBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- if(eBone->parent)
+ if (eBone->parent)
eBone->parent->flag |= (BONE_TIPSEL);
}
}
else {
/* deselect bone */
eBone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- if(arm->act_edbone==eBone)
+ if (arm->act_edbone==eBone)
arm->act_edbone= NULL;
}
}
@@ -1830,7 +1830,7 @@ void ED_armature_deselect_all_visible(Object *obedit)
/* accounts for connected parents */
static int ebone_select_flag(EditBone *ebone)
{
- if(ebone->parent && (ebone->flag & BONE_CONNECTED)) {
+ if (ebone->parent && (ebone->flag & BONE_CONNECTED)) {
return ((ebone->parent->flag & BONE_TIPSEL) ? BONE_ROOTSEL : 0) | (ebone->flag & (BONE_SELECTED|BONE_TIPSEL));
}
else {
@@ -1860,16 +1860,16 @@ int mouse_armature(bContext *C, const int mval[2], int extend)
/* by definition the non-root connected bones have no root point drawn,
* so a root selection needs to be delivered to the parent tip */
- if(selmask & BONE_SELECTED) {
- if(nearBone->parent && (nearBone->flag & BONE_CONNECTED)) {
+ if (selmask & BONE_SELECTED) {
+ if (nearBone->parent && (nearBone->flag & BONE_CONNECTED)) {
/* click in a chain */
- if(extend) {
+ if (extend) {
/* hold shift inverts this bone's selection */
- if(nearBone->flag & BONE_SELECTED) {
+ if (nearBone->flag & BONE_SELECTED) {
/* deselect this bone */
nearBone->flag &= ~(BONE_TIPSEL|BONE_SELECTED);
/* only deselect parent tip if it is not selected */
- if(!(nearBone->parent->flag & BONE_SELECTED))
+ if (!(nearBone->parent->flag & BONE_SELECTED))
nearBone->parent->flag &= ~BONE_TIPSEL;
}
else {
@@ -1885,9 +1885,9 @@ int mouse_armature(bContext *C, const int mval[2], int extend)
}
}
else {
- if(extend) {
+ if (extend) {
/* hold shift inverts this bone's selection */
- if(nearBone->flag & BONE_SELECTED)
+ if (nearBone->flag & BONE_SELECTED)
nearBone->flag &= ~(BONE_TIPSEL|BONE_ROOTSEL);
else
nearBone->flag |= (BONE_TIPSEL|BONE_ROOTSEL);
@@ -1904,9 +1904,9 @@ int mouse_armature(bContext *C, const int mval[2], int extend)
ED_armature_sync_selection(arm->edbo);
- if(nearBone) {
+ if (nearBone) {
/* then now check for active status */
- if(ebone_select_flag(nearBone)) {
+ if (ebone_select_flag(nearBone)) {
arm->act_edbone= nearBone;
}
}
@@ -1965,16 +1965,16 @@ float ED_rollBoneToVector(EditBone *bone, const float align_axis[3], const short
sub_v3_v3v3(nor, bone->tail, bone->head);
vec_roll_to_mat3(nor, 0.0f, mat);
- /* check the bone isnt aligned with the axis */
- if(!is_zero_v3(align_axis) && angle_v3v3(align_axis, mat[2]) > FLT_EPSILON) {
+ /* check the bone isn't aligned with the axis */
+ if (!is_zero_v3(align_axis) && angle_v3v3(align_axis, mat[2]) > FLT_EPSILON) {
float vec[3], align_axis_proj[3], roll;
/* project the new_up_axis along the normal */
project_v3_v3v3(vec, align_axis, nor);
sub_v3_v3v3(align_axis_proj, align_axis, vec);
- if(axis_only) {
- if(angle_v3v3(align_axis_proj, mat[2]) > (float)(M_PI/2.0)) {
+ if (axis_only) {
+ if (angle_v3v3(align_axis_proj, mat[2]) > (float)(M_PI/2.0)) {
negate_v3(align_axis_proj);
}
}
@@ -2020,7 +2020,7 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
copy_m3_m4(imat, ob->obmat);
invert_m3(imat);
- if(type==7) { /* Cursor */
+ if (type==7) { /* Cursor */
Scene *scene= CTX_data_scene(C);
View3D *v3d= CTX_wm_view3d(C); /* can be NULL */
float cursor_local[3];
@@ -2031,20 +2031,20 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
mul_m3_v3(imat, cursor_local);
/* cursor */
- for(ebone= arm->edbo->first; ebone; ebone= ebone->next) {
- if(EBONE_VISIBLE(arm, ebone) && EBONE_EDITABLE(ebone)) {
+ for (ebone= arm->edbo->first; ebone; ebone= ebone->next) {
+ if (EBONE_VISIBLE(arm, ebone) && EBONE_EDITABLE(ebone)) {
float cursor_rel[3];
sub_v3_v3v3(cursor_rel, cursor_local, ebone->head);
- if(axis_flip) negate_v3(cursor_rel);
+ if (axis_flip) negate_v3(cursor_rel);
ebone->roll= ED_rollBoneToVector(ebone, cursor_rel, axis_only);
}
}
}
else {
float vec[3]= {0.0f, 0.0f, 0.0f};
- if(type==6) { /* View */
+ if (type==6) { /* View */
RegionView3D *rv3d= CTX_wm_region_view3d(C);
- if(rv3d==NULL) {
+ if (rv3d==NULL) {
BKE_report(op->reports, RPT_ERROR, "No region view3d available");
return OPERATOR_CANCELLED;
}
@@ -2055,7 +2055,7 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
else if (type==5) {
float mat[3][3], nor[3];
ebone= (EditBone *)arm->act_edbone;
- if(ebone==NULL) {
+ if (ebone==NULL) {
BKE_report(op->reports, RPT_ERROR, "No active bone set");
return OPERATOR_CANCELLED;
}
@@ -2066,15 +2066,15 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
}
else { /* Axis */
assert(type >= 0 && type <= 5);
- if(type<3) vec[type]= 1.0f;
+ if (type<3) vec[type]= 1.0f;
else vec[type-2]= -1.0f;
mul_m3_v3(imat, vec);
}
- if(axis_flip) negate_v3(vec);
+ if (axis_flip) negate_v3(vec);
- for(ebone= arm->edbo->first; ebone; ebone= ebone->next) {
- if(EBONE_VISIBLE(arm, ebone) && EBONE_EDITABLE(ebone)) {
+ for (ebone= arm->edbo->first; ebone; ebone= ebone->next) {
+ if (EBONE_VISIBLE(arm, ebone) && EBONE_EDITABLE(ebone)) {
/* roll func is a callback which assumes that all is well */
ebone->roll= ED_rollBoneToVector(ebone, vec, axis_only);
}
@@ -2082,8 +2082,8 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
}
if (arm->flag & ARM_MIRROR_EDIT) {
- for(ebone= arm->edbo->first; ebone; ebone= ebone->next) {
- if((EBONE_VISIBLE(arm, ebone) && EBONE_EDITABLE(ebone)) == 0) {
+ for (ebone= arm->edbo->first; ebone; ebone= ebone->next) {
+ if ((EBONE_VISIBLE(arm, ebone) && EBONE_EDITABLE(ebone)) == 0) {
EditBone *ebone_mirr= ED_armature_bone_get_mirrored(arm->edbo, ebone);
if (ebone_mirr && (EBONE_VISIBLE(arm, ebone_mirr) && EBONE_EDITABLE(ebone_mirr))) {
ebone->roll= -ebone_mirr->roll;
@@ -2101,9 +2101,9 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_calculate_roll(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Recalculate Roll";
- ot->idname= "ARMATURE_OT_calculate_roll";
- ot->description= "Automatically fix alignment of select bones' axes";
+ ot->name = "Recalculate Roll";
+ ot->idname = "ARMATURE_OT_calculate_roll";
+ ot->description = "Automatically fix alignment of select bones' axes";
/* api callbacks */
ot->invoke = WM_menu_invoke;
@@ -2111,10 +2111,10 @@ void ARMATURE_OT_calculate_roll(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_calc_roll_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_calc_roll_types, 0, "Type", "");
RNA_def_boolean(ot->srna, "axis_flip", 0, "Flip Axis", "Negate the alignment axis");
RNA_def_boolean(ot->srna, "axis_only", 0, "Shortest Rotation", "Ignore the axis direction, use the shortest rotation to align");
}
@@ -2135,14 +2135,14 @@ static void undoBones_to_editBones(void *uarmv, void *armv, void *UNUSED(data))
BLI_freelistN(arm->edbo);
/* copy */
- for(ebo= uarm->lb.first; ebo; ebo= ebo->next) {
+ for (ebo= uarm->lb.first; ebo; ebo= ebo->next) {
newebo= MEM_dupallocN(ebo);
ebo->temp= newebo;
BLI_addtail(arm->edbo, newebo);
}
/* active bone */
- if(uarm->act_edbone) {
+ if (uarm->act_edbone) {
ebo= uarm->act_edbone;
arm->act_edbone= ebo->temp;
}
@@ -2150,11 +2150,11 @@ static void undoBones_to_editBones(void *uarmv, void *armv, void *UNUSED(data))
arm->act_edbone= NULL;
/* set pointers */
- for(newebo= arm->edbo->first; newebo; newebo= newebo->next) {
- if(newebo->parent) newebo->parent= newebo->parent->temp;
+ for (newebo= arm->edbo->first; newebo; newebo= newebo->next) {
+ if (newebo->parent) newebo->parent= newebo->parent->temp;
}
- /* be sure they dont hang ever */
- for(newebo= arm->edbo->first; newebo; newebo= newebo->next) {
+ /* be sure they don't hang ever */
+ for (newebo= arm->edbo->first; newebo; newebo= newebo->next) {
newebo->temp= NULL;
}
}
@@ -2168,21 +2168,21 @@ static void *editBones_to_undoBones(void *armv, void *UNUSED(obdata))
uarm= MEM_callocN(sizeof(UndoArmature), "listbase undo");
/* copy */
- for(ebo= arm->edbo->first; ebo; ebo= ebo->next) {
+ for (ebo= arm->edbo->first; ebo; ebo= ebo->next) {
newebo= MEM_dupallocN(ebo);
ebo->temp= newebo;
BLI_addtail(&uarm->lb, newebo);
}
/* active bone */
- if(arm->act_edbone) {
+ if (arm->act_edbone) {
ebo= arm->act_edbone;
uarm->act_edbone= ebo->temp;
}
/* set pointers */
- for(newebo= uarm->lb.first; newebo; newebo= newebo->next) {
- if(newebo->parent) newebo->parent= newebo->parent->temp;
+ for (newebo= uarm->lb.first; newebo; newebo= newebo->next) {
+ if (newebo->parent) newebo->parent= newebo->parent->temp;
}
return uarm;
@@ -2199,7 +2199,7 @@ static void free_undoBones(void *uarmv)
static void *get_armature_edit(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- if(obedit && obedit->type==OB_ARMATURE) {
+ if (obedit && obedit->type==OB_ARMATURE) {
return obedit->data;
}
return NULL;
@@ -2408,9 +2408,9 @@ static int armature_click_extrude_invoke(bContext *C, wmOperator *op, wmEvent *e
void ARMATURE_OT_click_extrude(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Click-Extrude";
- ot->idname= "ARMATURE_OT_click_extrude";
- ot->description= "Create a new bone going from the last selected joint to the mouse position";
+ ot->name = "Click-Extrude";
+ ot->idname = "ARMATURE_OT_click_extrude";
+ ot->description = "Create a new bone going from the last selected joint to the mouse position";
/* api callbacks */
ot->invoke = armature_click_extrude_invoke;
@@ -2418,7 +2418,7 @@ void ARMATURE_OT_click_extrude(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
}
@@ -2541,7 +2541,7 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase
BLI_addtail(editbones, eBone);
/* copy the ID property */
- if(curBone->prop)
+ if (curBone->prop)
eBone->prop= IDP_CopyProperty(curBone->prop);
/* Lets duplicate the list of constraints that the
@@ -2557,7 +2557,7 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase
*/
channew= verify_pose_channel(dst_ob->pose, eBone->name);
- if(channew) {
+ if (channew) {
duplicate_pose_channel_data(channew, chanold);
}
}
@@ -2653,9 +2653,9 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op))
}
/* correct the active bone */
- if(arm->act_edbone) {
+ if (arm->act_edbone) {
eBone= arm->act_edbone;
- if(eBone->temp)
+ if (eBone->temp)
arm->act_edbone= eBone->temp;
}
@@ -2676,16 +2676,16 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op))
void ARMATURE_OT_duplicate(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Duplicate Selected Bone(s)";
- ot->idname= "ARMATURE_OT_duplicate";
- ot->description= "Make copies of the selected bones within the same armature";
+ ot->name = "Duplicate Selected Bone(s)";
+ ot->idname = "ARMATURE_OT_duplicate";
+ ot->description = "Make copies of the selected bones within the same armature";
/* api callbacks */
ot->exec = armature_duplicate_selected_exec;
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -2950,16 +2950,16 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op)
void ARMATURE_OT_fill (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Fill Between Joints";
- ot->idname= "ARMATURE_OT_fill";
- ot->description= "Add bone between selected joint(s) and/or 3D-Cursor";
+ ot->name = "Fill Between Joints";
+ ot->idname = "ARMATURE_OT_fill";
+ ot->description = "Add bone between selected joint(s) and/or 3D-Cursor";
/* callbacks */
- ot->exec= armature_fill_bones_exec;
- ot->poll= ED_operator_editarmature;
+ ot->exec = armature_fill_bones_exec;
+ ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* --------------------- */
@@ -3134,20 +3134,20 @@ void ARMATURE_OT_merge (wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Merge Bones";
- ot->idname= "ARMATURE_OT_merge";
- ot->description= "Merge continuous chains of selected bones";
+ ot->name = "Merge Bones";
+ ot->idname = "ARMATURE_OT_merge";
+ ot->description = "Merge continuous chains of selected bones";
/* callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= armature_merge_exec;
- ot->poll= ED_operator_editarmature;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = armature_merge_exec;
+ ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", merge_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", merge_types, 0, "Type", "");
}
/* ************** END Add/Remove stuff in editmode ************ */
@@ -3183,16 +3183,16 @@ static int armature_hide_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_hide(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Hide Selected Bones";
- ot->idname= "ARMATURE_OT_hide";
- ot->description= "Tag selected bones to not be visible in Edit Mode";
+ ot->name = "Hide Selected Bones";
+ ot->idname = "ARMATURE_OT_hide";
+ ot->description = "Tag selected bones to not be visible in Edit Mode";
/* api callbacks */
- ot->exec= armature_hide_exec;
- ot->poll= ED_operator_editarmature;
+ ot->exec = armature_hide_exec;
+ ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
@@ -3205,7 +3205,7 @@ static int armature_reveal_exec(bContext *C, wmOperator *UNUSED(op))
EditBone *ebone;
for (ebone = arm->edbo->first; ebone; ebone=ebone->next) {
- if(arm->layer & ebone->layer) {
+ if (arm->layer & ebone->layer) {
if (ebone->flag & BONE_HIDDEN_A) {
ebone->flag |= (BONE_TIPSEL|BONE_SELECTED|BONE_ROOTSEL);
ebone->flag &= ~BONE_HIDDEN_A;
@@ -3223,16 +3223,16 @@ static int armature_reveal_exec(bContext *C, wmOperator *UNUSED(op))
void ARMATURE_OT_reveal(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reveal Bones";
- ot->idname= "ARMATURE_OT_reveal";
- ot->description= "Unhide all bones that have been tagged to be hidden in Edit Mode";
+ ot->name = "Reveal Bones";
+ ot->idname = "ARMATURE_OT_reveal";
+ ot->description = "Unhide all bones that have been tagged to be hidden in Edit Mode";
/* api callbacks */
- ot->exec= armature_reveal_exec;
- ot->poll= ED_operator_editarmature;
+ ot->exec = armature_reveal_exec;
+ ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
#if 0 // remove this?
@@ -3281,7 +3281,7 @@ void show_all_armature_bones(Scene *scene)
EditBone *ebone;
for (ebone = arm->edbo->first; ebone; ebone=ebone->next) {
- if(arm->layer & ebone->layer) {
+ if (arm->layer & ebone->layer) {
if (ebone->flag & BONE_HIDDEN_A) {
ebone->flag |= (BONE_TIPSEL|BONE_SELECTED|BONE_ROOTSEL);
ebone->flag &= ~BONE_HIDDEN_A;
@@ -3386,7 +3386,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
newbone->zwidth= ebone->zwidth;
newbone->ease1= ebone->ease1;
newbone->ease2= ebone->ease2;
- newbone->rad_head= ebone->rad_tail; // dont copy entire bone...
+ newbone->rad_head= ebone->rad_tail; // don't copy entire bone...
newbone->rad_tail= ebone->rad_tail;
newbone->segments= 1;
newbone->layer= ebone->layer;
@@ -3432,16 +3432,16 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_extrude(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Extrude";
- ot->idname= "ARMATURE_OT_extrude";
- ot->description= "Create new bones from the selected joints";
+ ot->name = "Extrude";
+ ot->idname = "ARMATURE_OT_extrude";
+ ot->description = "Create new bones from the selected joints";
/* api callbacks */
- ot->exec= armature_extrude_exec;
- ot->poll= ED_operator_editarmature;
+ ot->exec = armature_extrude_exec;
+ ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_boolean(ot->srna, "forked", 0, "Forked", "");
@@ -3481,7 +3481,7 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
copy_v3_v3(bone->head, curs);
- if(rv3d && (U.flag & USER_ADD_VIEWALIGNED))
+ if (rv3d && (U.flag & USER_ADD_VIEWALIGNED))
add_v3_v3v3(bone->tail, bone->head, imat[1]); // bone with unit length 1
else
add_v3_v3v3(bone->tail, bone->head, imat[2]); // bone with unit length 1, pointing up Z
@@ -3495,16 +3495,16 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_bone_primitive_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Bone";
- ot->idname= "ARMATURE_OT_bone_primitive_add";
- ot->description= "Add a new bone located at the 3D-Cursor";
+ ot->name = "Add Bone";
+ ot->idname = "ARMATURE_OT_bone_primitive_add";
+ ot->description = "Add a new bone located at the 3D-Cursor";
/* api callbacks */
ot->exec = armature_bone_primitive_add_exec;
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_string(ot->srna, "name", "Bone", MAXBONENAME, "Name", "Name of the newly created bone");
@@ -3584,20 +3584,24 @@ static int armature_subdivide_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_subdivide(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
- ot->name= "Subdivide Multi";
- ot->idname= "ARMATURE_OT_subdivide";
- ot->description= "Break selected bones into chains of smaller bones";
+ ot->name = "Subdivide Multi";
+ ot->idname = "ARMATURE_OT_subdivide";
+ ot->description = "Break selected bones into chains of smaller bones";
/* api callbacks */
ot->exec = armature_subdivide_exec;
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* Properties */
- RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10);
+ prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10);
+ /* avoid re-using last var because it can cause _very_ high poly meshes and annoy users (or worse crash) */
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
/* ----------- */
@@ -3687,16 +3691,16 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
void ARMATURE_OT_switch_direction(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Switch Direction";
- ot->idname= "ARMATURE_OT_switch_direction";
- ot->description= "Change the direction that a chain of bones points in (head <-> tail swap)";
+ ot->name = "Switch Direction";
+ ot->idname = "ARMATURE_OT_switch_direction";
+ ot->description = "Change the direction that a chain of bones points in (head <-> tail swap)";
/* api callbacks */
ot->exec = armature_switch_direction_exec;
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ***************** Parenting *********************** */
@@ -3862,9 +3866,9 @@ static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEve
void ARMATURE_OT_parent_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Parent";
- ot->idname= "ARMATURE_OT_parent_set";
- ot->description= "Set the active bone as the parent of the selected bones";
+ ot->name = "Make Parent";
+ ot->idname = "ARMATURE_OT_parent_set";
+ ot->description = "Set the active bone as the parent of the selected bones";
/* api callbacks */
ot->invoke = armature_parent_set_invoke;
@@ -3872,7 +3876,7 @@ void ARMATURE_OT_parent_set(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", prop_editarm_make_parent_types, 0, "ParentType", "Type of parenting");
}
@@ -3916,9 +3920,9 @@ static int armature_parent_clear_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_parent_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Parent";
- ot->idname= "ARMATURE_OT_parent_clear";
- ot->description= "Remove the parent-child relationship between selected bones and their parents";
+ ot->name = "Clear Parent";
+ ot->idname = "ARMATURE_OT_parent_clear";
+ ot->description = "Remove the parent-child relationship between selected bones and their parents";
/* api callbacks */
ot->invoke = WM_menu_invoke;
@@ -3926,9 +3930,9 @@ void ARMATURE_OT_parent_clear(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
- ot->prop= RNA_def_enum(ot->srna, "type", prop_editarm_clear_parent_types, 0, "ClearType", "What way to clear parenting");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_editarm_clear_parent_types, 0, "ClearType", "What way to clear parenting");
}
/* **************** Selections ******************/
@@ -3953,16 +3957,16 @@ static int armature_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
void ARMATURE_OT_select_inverse(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Inverse";
- ot->idname= "ARMATURE_OT_select_inverse";
- ot->description= "Flip the selection status of bones (selected -> unselected, unselected -> selected)";
+ ot->name = "Select Inverse";
+ ot->idname = "ARMATURE_OT_select_inverse";
+ ot->description = "Flip the selection status of bones (selected -> unselected, unselected -> selected)";
/* api callbacks */
- ot->exec= armature_select_inverse_exec;
- ot->poll= ED_operator_editarmature;
+ ot->exec = armature_select_inverse_exec;
+ ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int armature_de_select_all_exec(bContext *C, wmOperator *op)
@@ -3984,7 +3988,7 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op)
switch (action) {
case SEL_SELECT:
ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- if(ebone->parent)
+ if (ebone->parent)
ebone->parent->flag |= (BONE_TIPSEL);
break;
case SEL_DESELECT:
@@ -3996,7 +4000,7 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op)
}
else {
ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
- if(ebone->parent)
+ if (ebone->parent)
ebone->parent->flag |= (BONE_TIPSEL);
}
break;
@@ -4013,16 +4017,16 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select or Deselect All";
- ot->idname= "ARMATURE_OT_select_all";
- ot->description= "Toggle selection status of all bones";
+ ot->name = "(De)select All";
+ ot->idname = "ARMATURE_OT_select_all";
+ ot->description = "Toggle selection status of all bones";
/* api callbacks */
- ot->exec= armature_de_select_all_exec;
- ot->poll= ED_operator_editarmature;
+ ot->exec = armature_de_select_all_exec;
+ ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -4094,16 +4098,16 @@ void ARMATURE_OT_select_hierarchy(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Select Hierarchy";
- ot->idname= "ARMATURE_OT_select_hierarchy";
- ot->description= "Select immediate parent/children of selected bones";
+ ot->name = "Select Hierarchy";
+ ot->idname = "ARMATURE_OT_select_hierarchy";
+ ot->description = "Select immediate parent/children of selected bones";
/* api callbacks */
- ot->exec= armature_select_hierarchy_exec;
- ot->poll= ED_operator_editarmature;
+ ot->exec = armature_select_hierarchy_exec;
+ ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_enum(ot->srna, "direction", direction_items,
@@ -4233,9 +4237,9 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_align(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Align Bones";
- ot->idname= "ARMATURE_OT_align";
- ot->description= "Align selected bones to the active bone (or to their parent)";
+ ot->name = "Align Bones";
+ ot->idname = "ARMATURE_OT_align";
+ ot->description = "Align selected bones to the active bone (or to their parent)";
/* api callbacks */
ot->invoke = WM_operator_confirm;
@@ -4243,7 +4247,7 @@ void ARMATURE_OT_align(wmOperatorType *ot)
ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ***************** Pose tools ********************* */
@@ -4308,7 +4312,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
else {
if (nearBone->flag & BONE_SELECTED) {
/* if not active, we make it active */
- if(nearBone != arm->act_bone) {
+ if (nearBone != arm->act_bone) {
arm->act_bone= nearBone;
}
else {
@@ -4412,7 +4416,7 @@ static int bone_skinnable_cb(Object *ob, Bone *bone, void *datap)
int a, segments;
struct { Object *armob; void *list; int heat; } *data = datap;
- if(!(ob->mode & OB_MODE_WEIGHT_PAINT) || !(bone->flag & BONE_HIDDEN_P)) {
+ if (!(ob->mode & OB_MODE_WEIGHT_PAINT) || !(bone->flag & BONE_HIDDEN_P)) {
if (!(bone->flag & BONE_NO_DEFORM)) {
if (data->heat && data->armob->pose && get_pose_channel(data->armob->pose, bone->name))
segments = bone->segments;
@@ -4486,7 +4490,7 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap)
else
segments = 1;
- if(!wpmode || ((arm->layer & bone->layer) && (bone->flag & BONE_SELECTED)))
+ if (!wpmode || ((arm->layer & bone->layer) && (bone->flag & BONE_SELECTED)))
if (!(defgroup = defgroup_find_name(ob, bone->name)))
defgroup = ED_vgroup_add_name(ob, bone->name);
@@ -4706,7 +4710,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
heat_bone_weighting(ob, mesh, verts, numbones, dgrouplist, dgroupflip,
root, tip, selected, &error);
- if(error) {
+ if (error) {
BKE_report(reports, RPT_WARNING, error);
}
}
@@ -4735,7 +4739,7 @@ void create_vgroups_from_armature(ReportList *reports, Scene *scene, Object *ob,
*/
bArmature *arm= par->data;
- if(mode == ARM_GROUPS_NAME) {
+ if (mode == ARM_GROUPS_NAME) {
/* Traverse the bone list, trying to create empty vertex
* groups corresponding to the bone.
*/
@@ -4744,7 +4748,7 @@ void create_vgroups_from_armature(ReportList *reports, Scene *scene, Object *ob,
if (ob->type == OB_MESH)
ED_vgroup_data_create(ob->data);
}
- else if(mode == ARM_GROUPS_ENVELOPE || mode == ARM_GROUPS_AUTO) {
+ else if (mode == ARM_GROUPS_ENVELOPE || mode == ARM_GROUPS_AUTO) {
/* Traverse the bone list, trying to create vertex groups
* that are populated with the vertices for which the
* bone is closest.
@@ -4953,8 +4957,8 @@ static int pose_clear_scale_exec(bContext *C, wmOperator *op)
void POSE_OT_scale_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Pose Scale";
- ot->idname= "POSE_OT_scale_clear";
+ ot->name = "Clear Pose Scale";
+ ot->idname = "POSE_OT_scale_clear";
ot->description = "Reset scaling of selected bones to their default values";
/* api callbacks */
@@ -4962,7 +4966,7 @@ void POSE_OT_scale_clear(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -4974,8 +4978,8 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *op)
void POSE_OT_rot_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Pose Rotation";
- ot->idname= "POSE_OT_rot_clear";
+ ot->name = "Clear Pose Rotation";
+ ot->idname = "POSE_OT_rot_clear";
ot->description = "Reset rotations of selected bones to their default values";
/* api callbacks */
@@ -4983,7 +4987,7 @@ void POSE_OT_rot_clear(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -4995,8 +4999,8 @@ static int pose_clear_loc_exec(bContext *C, wmOperator *op)
void POSE_OT_loc_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Pose Location";
- ot->idname= "POSE_OT_loc_clear";
+ ot->name = "Clear Pose Location";
+ ot->idname = "POSE_OT_loc_clear";
ot->description = "Reset locations of selected bones to their default values";
/* api callbacks */
@@ -5004,7 +5008,7 @@ void POSE_OT_loc_clear(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -5016,8 +5020,8 @@ static int pose_clear_transforms_exec(bContext *C, wmOperator *op)
void POSE_OT_transforms_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Pose Transforms";
- ot->idname= "POSE_OT_transforms_clear";
+ ot->name = "Clear Pose Transforms";
+ ot->idname = "POSE_OT_transforms_clear";
ot->description = "Reset location, rotation, and scaling of selected bones to their default values";
/* api callbacks */
@@ -5025,7 +5029,7 @@ void POSE_OT_transforms_clear(wmOperatorType *ot)
ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ***************** selections ********************** */
@@ -5077,16 +5081,16 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op)
void POSE_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select or Deselect All";
- ot->idname= "POSE_OT_select_all";
- ot->description= "Toggle selection status of all bones";
+ ot->name = "(De)select All";
+ ot->idname = "POSE_OT_select_all";
+ ot->description = "Toggle selection status of all bones";
/* api callbacks */
- ot->exec= pose_de_select_all_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_de_select_all_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -5121,16 +5125,16 @@ static int pose_select_parent_exec(bContext *C, wmOperator *UNUSED(op))
void POSE_OT_select_parent(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Parent Bone";
- ot->idname= "POSE_OT_select_parent";
- ot->description= "Select bones that are parents of the currently selected bones";
+ ot->name = "Select Parent Bone";
+ ot->idname = "POSE_OT_select_parent";
+ ot->description = "Select bones that are parents of the currently selected bones";
/* api callbacks */
- ot->exec= pose_select_parent_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_select_parent_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -5144,7 +5148,7 @@ static int hide_selected_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr))
if (bone->flag & BONE_SELECTED) {
bone->flag |= BONE_HIDDEN_P;
bone->flag &= ~BONE_SELECTED;
- if(arm->act_bone==bone)
+ if (arm->act_bone==bone)
arm->act_bone= NULL;
}
}
@@ -5159,7 +5163,7 @@ static int hide_unselected_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr
// hrm... typo here?
if ((bone->flag & BONE_SELECTED)==0) {
bone->flag |= BONE_HIDDEN_P;
- if(arm->act_bone==bone)
+ if (arm->act_bone==bone)
arm->act_bone= NULL;
}
}
@@ -5172,7 +5176,7 @@ static int pose_hide_exec(bContext *C, wmOperator *op)
Object *ob= object_pose_armature_get(CTX_data_active_object(C));
bArmature *arm= ob->data;
- if(RNA_boolean_get(op->ptr, "unselected"))
+ if (RNA_boolean_get(op->ptr, "unselected"))
bone_looper(ob, arm->bonebase.first, NULL, hide_unselected_pose_bone_cb);
else
bone_looper(ob, arm->bonebase.first, NULL, hide_selected_pose_bone_cb);
@@ -5186,16 +5190,16 @@ static int pose_hide_exec(bContext *C, wmOperator *op)
void POSE_OT_hide(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Hide Selected";
- ot->idname= "POSE_OT_hide";
- ot->description= "Tag selected bones to not be visible in Pose Mode";
+ ot->name = "Hide Selected";
+ ot->idname = "POSE_OT_hide";
+ ot->description = "Tag selected bones to not be visible in Pose Mode";
/* api callbacks */
- ot->exec= pose_hide_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_hide_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "");
@@ -5232,16 +5236,16 @@ static int pose_reveal_exec(bContext *C, wmOperator *UNUSED(op))
void POSE_OT_reveal(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reveal Selected";
- ot->idname= "POSE_OT_reveal";
- ot->description= "Unhide all bones that have been tagged to be hidden in Pose Mode";
+ ot->name = "Reveal Selected";
+ ot->idname = "POSE_OT_reveal";
+ ot->description = "Unhide all bones that have been tagged to be hidden in Pose Mode";
/* api callbacks */
- ot->exec= pose_reveal_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_reveal_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************* RENAMING DISASTERS ************ */
@@ -5292,7 +5296,7 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
char oldname[MAXBONENAME];
/* names better differ! */
- if(strncmp(oldnamep, newnamep, MAXBONENAME)) {
+ if (strncmp(oldnamep, newnamep, MAXBONENAME)) {
/* we alter newname string... so make copy */
BLI_strncpy(newname, newnamep, MAXBONENAME);
@@ -5367,7 +5371,7 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
if (modifiers_usesArmature(ob, arm)) {
bDeformGroup *dg= defgroup_find_name(ob, oldname);
- if(dg) {
+ if (dg) {
BLI_strncpy(dg->name, newname, MAXBONENAME);
}
}
@@ -5394,15 +5398,15 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
/* correct view locking */
{
bScreen *screen;
- for(screen= G.main->screen.first; screen; screen= screen->id.next) {
+ for (screen= G.main->screen.first; screen; screen= screen->id.next) {
ScrArea *sa;
/* add regions */
- for(sa= screen->areabase.first; sa; sa= sa->next) {
+ for (sa= screen->areabase.first; sa; sa= sa->next) {
SpaceLink *sl;
for (sl= sa->spacedata.first; sl; sl= sl->next) {
- if(sl->spacetype==SPACE_VIEW3D) {
+ if (sl->spacetype==SPACE_VIEW3D) {
View3D *v3d= (View3D *)sl;
- if(v3d->ob_centre && v3d->ob_centre->data == arm) {
+ if (v3d->ob_centre && v3d->ob_centre->data == arm) {
if (!strcmp(v3d->ob_centre_bone, oldname)) {
BLI_strncpy(v3d->ob_centre_bone, newname, MAXBONENAME);
}
@@ -5447,16 +5451,16 @@ static int armature_flip_names_exec (bContext *C, wmOperator *UNUSED(op))
void ARMATURE_OT_flip_names (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Flip Names";
- ot->idname= "ARMATURE_OT_flip_names";
- ot->description= "Flips (and corrects) the axis suffixes of the names of selected bones";
+ ot->name = "Flip Names";
+ ot->idname = "ARMATURE_OT_flip_names";
+ ot->description = "Flips (and corrects) the axis suffixes of the names of selected bones";
/* api callbacks */
- ot->exec= armature_flip_names_exec;
- ot->poll= ED_operator_editarmature;
+ ot->exec = armature_flip_names_exec;
+ ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -5476,7 +5480,7 @@ static int armature_autoside_names_exec (bContext *C, wmOperator *op)
CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones)
{
BLI_strncpy(newname, ebone->name, sizeof(newname));
- if(bone_autoside_name(newname, 1, axis, ebone->head[axis], ebone->tail[axis]))
+ if (bone_autoside_name(newname, 1, axis, ebone->head[axis], ebone->tail[axis]))
ED_armature_bone_rename(arm, ebone->name, newname);
}
CTX_DATA_END;
@@ -5499,20 +5503,20 @@ void ARMATURE_OT_autoside_names (wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "AutoName by Axis";
- ot->idname= "ARMATURE_OT_autoside_names";
- ot->description= "Automatically renames the selected bones according to which side of the target axis they fall on";
+ ot->name = "AutoName by Axis";
+ ot->idname = "ARMATURE_OT_autoside_names";
+ ot->description = "Automatically renames the selected bones according to which side of the target axis they fall on";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= armature_autoside_names_exec;
- ot->poll= ED_operator_editarmature;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = armature_autoside_names_exec;
+ ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* settings */
- ot->prop= RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with");
+ ot->prop = RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with");
}
@@ -5638,7 +5642,7 @@ EditBone * subdivideByAngle(Scene *scene, Object *obedit, ReebArc *arc, ReebNode
* to let subsequent subdivision methods do their thing.
* */
if (parent == root) {
- if(parent==arm->act_edbone) arm->act_edbone= NULL;
+ if (parent==arm->act_edbone) arm->act_edbone= NULL;
ED_armature_edit_bone_remove(arm, parent);
parent = NULL;
}
@@ -5858,7 +5862,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
EditBone *childBone = BLI_ghash_lookup(arcBoneMap, arc);
/* find the root bone */
- while(childBone->parent != NULL)
+ while (childBone->parent != NULL)
{
childBone = childBone->parent;
}
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 375184d3229..261018329ab 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -323,7 +323,7 @@ static RigGraph *newRigGraph(void)
rg->free_node = NULL;
#ifdef USE_THREADS
-// if(G.scene->r.mode & R_FIXED_THREADS)
+// if (G.scene->r.mode & R_FIXED_THREADS)
// {
// totthread = G.scene->r.threads;
// }
@@ -1008,7 +1008,7 @@ static void RIG_reconnectControlBones(RigGraph *rg)
/* look on deform bones first */
BLI_ghashIterator_init(&ghi, rg->bones_map);
- for( ; !BLI_ghashIterator_isDone(&ghi); BLI_ghashIterator_step(&ghi))
+ for ( ; !BLI_ghashIterator_isDone(&ghi); BLI_ghashIterator_step(&ghi))
{
EditBone *bone = (EditBone*)BLI_ghashIterator_getValue(&ghi);
@@ -1298,7 +1298,7 @@ static void RIG_arcFromBoneChain(RigGraph *rg, ListBase *list, EditBone *root_bo
RigArc *arc = NULL;
int contain_head = 0;
- for(bone = root_bone; bone; bone = nextEditBoneChild(list, bone, 0))
+ for (bone = root_bone; bone; bone = nextEditBoneChild(list, bone, 0))
{
int nb_children;
@@ -1550,7 +1550,7 @@ RigGraph *RIG_graphFromArmature(const bContext *C, Object *ob, bArmature *arm)
rg->ob = ob;
/* Do the rotations */
- for (ebone = rg->editbones->first; ebone; ebone=ebone->next){
+ for (ebone = rg->editbones->first; ebone; ebone=ebone->next) {
if (ebone->parent == NULL)
{
RIG_arcFromBoneChain(rg, rg->editbones, ebone, NULL, 0);
@@ -1602,7 +1602,7 @@ static RigGraph *armatureSelectedToGraph(bContext *C, Object *ob, bArmature *arm
rg->ob = ob;
/* Do the rotations */
- for (ebone = rg->editbones->first; ebone; ebone=ebone->next){
+ for (ebone = rg->editbones->first; ebone; ebone=ebone->next) {
if (ebone->parent == NULL)
{
RIG_arcFromBoneChain(rg, rg->editbones, ebone, NULL, 1);
@@ -2488,7 +2488,7 @@ static void markMultiResolutionChildArc(ReebNode *end_enode, ReebNode *enode)
{
int i;
- for(i = 0; i < enode->degree; i++)
+ for (i = 0; i < enode->degree; i++)
{
ReebArc *earc = (ReebArc*)enode->arcs[i];
@@ -2593,7 +2593,7 @@ static void findCorrespondingArc(RigGraph *rigg, RigArc *start_arc, RigNode *sta
// RIG_printArcBones(next_iarc);
// }
- for(i = 0; i < enode->degree; i++)
+ for (i = 0; i < enode->degree; i++)
{
next_earc = (ReebArc*)enode->arcs[i];
@@ -2644,14 +2644,14 @@ static void findCorrespondingArc(RigGraph *rigg, RigArc *start_arc, RigNode *sta
// printf("flag %i -- level %i -- flag %i -- group %i\n", ARC_FREE, symmetry_level, symmetry_flag, symmetry_group);
//
// printf("CANDIDATES\n");
-// for(i = 0; i < enode->degree; i++)
+// for (i = 0; i < enode->degree; i++)
// {
// next_earc = (ReebArc*)enode->arcs[i];
// printf("flag %i -- level %i -- flag %i -- group %i\n", next_earc->flag, next_earc->symmetry_level, next_earc->symmetry_flag, next_earc->symmetry_group);
// }
/* Emergency matching */
- for(i = 0; i < enode->degree; i++)
+ for (i = 0; i < enode->degree; i++)
{
next_earc = (ReebArc*)enode->arcs[i];
@@ -2687,7 +2687,7 @@ static void retargetSubgraph(bContext *C, RigGraph *rigg, RigArc *start_arc, Rig
matchMultiResolutionNode(rigg, inode, enode);
}
- for(i = 0; i < inode->degree; i++)
+ for (i = 0; i < inode->degree; i++)
{
RigArc *next_iarc = (RigArc*)inode->arcs[i];
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 9ea731150e8..81b020a4cf9 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -1079,7 +1079,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
mvalf[0]= dd->mval[0];
mvalf[1]= dd->mval[1];
- peelObjectsContext(C, &sketch->depth_peels, mvalf);
+ peelObjectsContext(C, &sketch->depth_peels, mvalf, SNAP_ALL);
if (stk->nb_points > 0 && stk->points[stk->nb_points - 1].type == PT_CONTINUOUS)
{
@@ -1870,7 +1870,7 @@ int sk_detectCommandGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UN
SK_Intersection *isect, *self_isect;
/* get the the last intersection of the first pair */
- for( isect = gest->intersections.first; isect; isect = isect->next )
+ for ( isect = gest->intersections.first; isect; isect = isect->next )
{
if (isect->stroke == isect->next->stroke)
{
@@ -1897,7 +1897,7 @@ void sk_applyCommandGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UN
// XXX
// command = pupmenu("Action %t|Flatten %x1|Straighten %x2|Polygonize %x3");
- if(command < 1) return;
+ if (command < 1) return;
for (isect = gest->intersections.first; isect; isect = isect->next)
{
@@ -2166,10 +2166,10 @@ static int sk_selectStroke(bContext *C, SK_Sketch *sketch, const int mval[2], in
view3d_set_viewcontext(C, &vc);
- rect.xmin= mval[0]-5;
- rect.xmax= mval[0]+5;
- rect.ymin= mval[1]-5;
- rect.ymax= mval[1]+5;
+ rect.xmin = mval[0]-5;
+ rect.xmax = mval[0]+5;
+ rect.ymin = mval[1]-5;
+ rect.ymax = mval[1]+5;
hits = view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
@@ -2177,7 +2177,7 @@ static int sk_selectStroke(bContext *C, SK_Sketch *sketch, const int mval[2], in
{
int besthitresult = -1;
- if(hits == 1) {
+ if (hits == 1) {
besthitresult = buffer[3];
}
else {
@@ -2839,130 +2839,130 @@ int ED_operator_sketch_mode(const bContext *C)
void SKETCH_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete";
- ot->idname= "SKETCH_OT_delete";
+ ot->name = "Delete";
+ ot->idname = "SKETCH_OT_delete";
/* api callbacks */
- ot->invoke= sketch_delete;
+ ot->invoke = sketch_delete;
- ot->poll= ED_operator_sketch_full_mode;
+ ot->poll = ED_operator_sketch_full_mode;
/* flags */
-// ot->flag= OPTYPE_UNDO;
+// ot->flag = OPTYPE_UNDO;
}
void SKETCH_OT_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select";
- ot->idname= "SKETCH_OT_select";
+ ot->name = "Select";
+ ot->idname = "SKETCH_OT_select";
/* api callbacks */
- ot->invoke= sketch_select;
+ ot->invoke = sketch_select;
- ot->poll= ED_operator_sketch_full_mode;
+ ot->poll = ED_operator_sketch_full_mode;
/* flags */
-// ot->flag= OPTYPE_UNDO;
+// ot->flag = OPTYPE_UNDO;
}
void SKETCH_OT_cancel_stroke(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Cancel Stroke";
- ot->idname= "SKETCH_OT_cancel_stroke";
+ ot->name = "Cancel Stroke";
+ ot->idname = "SKETCH_OT_cancel_stroke";
/* api callbacks */
- ot->invoke= sketch_cancel;
+ ot->invoke = sketch_cancel;
- ot->poll= ED_operator_sketch_mode_active_stroke;
+ ot->poll = ED_operator_sketch_mode_active_stroke;
/* flags */
-// ot->flag= OPTYPE_UNDO;
+// ot->flag = OPTYPE_UNDO;
}
void SKETCH_OT_convert(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Convert";
- ot->idname= "SKETCH_OT_convert";
+ ot->name = "Convert";
+ ot->idname = "SKETCH_OT_convert";
/* api callbacks */
- ot->invoke= sketch_convert;
+ ot->invoke = sketch_convert;
- ot->poll= ED_operator_sketch_full_mode;
+ ot->poll = ED_operator_sketch_full_mode;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
}
void SKETCH_OT_finish_stroke(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "End Stroke";
- ot->idname= "SKETCH_OT_finish_stroke";
+ ot->name = "End Stroke";
+ ot->idname = "SKETCH_OT_finish_stroke";
/* api callbacks */
- ot->invoke= sketch_finish;
+ ot->invoke = sketch_finish;
- ot->poll= ED_operator_sketch_mode_active_stroke;
+ ot->poll = ED_operator_sketch_mode_active_stroke;
/* flags */
-// ot->flag= OPTYPE_UNDO;
+// ot->flag = OPTYPE_UNDO;
}
void SKETCH_OT_draw_preview(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Draw Preview";
- ot->idname= "SKETCH_OT_draw_preview";
+ ot->name = "Draw Preview";
+ ot->idname = "SKETCH_OT_draw_preview";
/* api callbacks */
- ot->invoke= sketch_draw_preview;
+ ot->invoke = sketch_draw_preview;
- ot->poll= ED_operator_sketch_mode_active_stroke;
+ ot->poll = ED_operator_sketch_mode_active_stroke;
RNA_def_boolean(ot->srna, "snap", 0, "Snap", "");
/* flags */
-// ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+// ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
void SKETCH_OT_draw_stroke(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Draw Stroke";
- ot->idname= "SKETCH_OT_draw_stroke";
+ ot->name = "Draw Stroke";
+ ot->idname = "SKETCH_OT_draw_stroke";
/* api callbacks */
ot->invoke = sketch_draw_stroke;
ot->modal = sketch_draw_stroke_modal;
ot->cancel = sketch_draw_stroke_cancel;
- ot->poll= (int (*)(bContext *))ED_operator_sketch_mode;
+ ot->poll = (int (*)(bContext *))ED_operator_sketch_mode;
RNA_def_boolean(ot->srna, "snap", 0, "Snap", "");
/* flags */
- ot->flag= OPTYPE_BLOCKING; // OPTYPE_REGISTER|OPTYPE_UNDO
+ ot->flag = OPTYPE_BLOCKING; // OPTYPE_REGISTER|OPTYPE_UNDO
}
void SKETCH_OT_gesture(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Gesture";
- ot->idname= "SKETCH_OT_gesture";
+ ot->name = "Gesture";
+ ot->idname = "SKETCH_OT_gesture";
/* api callbacks */
ot->invoke = sketch_draw_gesture;
ot->modal = sketch_draw_gesture_modal;
ot->cancel = sketch_draw_gesture_cancel;
- ot->poll= ED_operator_sketch_mode_gesture;
+ ot->poll = ED_operator_sketch_mode_gesture;
RNA_def_boolean(ot->srna, "snap", 0, "Snap", "");
/* flags */
- ot->flag= OPTYPE_BLOCKING; // OPTYPE_UNDO
+ ot->flag = OPTYPE_BLOCKING; // OPTYPE_UNDO
}
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index eb707119263..4c1315e847e 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -47,6 +47,8 @@
#include "BLI_memarena.h"
#include "BLI_string.h"
+#include "BLF_translation.h"
+
#include "BKE_DerivedMesh.h"
#include "BKE_modifier.h"
#include "BKE_mesh.h"
@@ -140,7 +142,7 @@ static void laplacian_increase_edge_count(EdgeHash *edgehash, int v1, int v2)
{
void **p = BLI_edgehash_lookup_p(edgehash, v1, v2);
- if(p)
+ if (p)
*p = (void*)((intptr_t)*p + (intptr_t)1);
else
BLI_edgehash_insert(edgehash, v1, v2, (void*)(intptr_t)1);
@@ -182,8 +184,8 @@ static void laplacian_triangle_area(LaplacianSystem *sys, int i1, int i2, int i3
t3= cotan_weight(v3, v1, v2);
if (angle_v3v3v3(v2, v1, v3) > DEG2RADF(90.0f)) obtuse= 1;
- else if(angle_v3v3v3(v1, v2, v3) > DEG2RADF(90.0f)) obtuse= 2;
- else if(angle_v3v3v3(v1, v3, v2) > DEG2RADF(90.0f)) obtuse= 3;
+ else if (angle_v3v3v3(v1, v2, v3) > DEG2RADF(90.0f)) obtuse= 2;
+ else if (angle_v3v3v3(v1, v3, v2) > DEG2RADF(90.0f)) obtuse= 3;
if (obtuse > 0) {
area= area_tri_v3(v1, v2, v3);
@@ -235,7 +237,7 @@ static void laplacian_triangle_weights(LaplacianSystem *sys, int f, int i1, int
nlMatrixAdd(i3, i1, -t2*varea[i3]);
nlMatrixAdd(i1, i3, -t2*varea[i1]);
- if(sys->storeweights) {
+ if (sys->storeweights) {
sys->fweights[f][0]= t1*varea[i1];
sys->fweights[f][1]= t2*varea[i2];
sys->fweights[f][2]= t3*varea[i3];
@@ -261,7 +263,7 @@ static LaplacianSystem *laplacian_system_construct_begin(int totvert, int totfac
/* create opennl context */
nlNewContext();
nlSolverParameteri(NL_NB_VARIABLES, totvert);
- if(lsq)
+ if (lsq)
nlSolverParameteri(NL_LEAST_SQUARES, NL_TRUE);
sys->context= nlGetCurrent();
@@ -294,39 +296,39 @@ static void laplacian_system_construct_end(LaplacianSystem *sys)
sys->varea= MEM_callocN(sizeof(float)*totvert, "LaplacianSystemVarea");
sys->edgehash= BLI_edgehash_new();
- for(a=0, face=sys->faces; a<sys->totface; a++, face++) {
+ for (a=0, face=sys->faces; a<sys->totface; a++, face++) {
laplacian_increase_edge_count(sys->edgehash, (*face)[0], (*face)[1]);
laplacian_increase_edge_count(sys->edgehash, (*face)[1], (*face)[2]);
laplacian_increase_edge_count(sys->edgehash, (*face)[2], (*face)[0]);
}
- if(sys->areaweights)
- for(a=0, face=sys->faces; a<sys->totface; a++, face++)
+ if (sys->areaweights)
+ for (a=0, face=sys->faces; a<sys->totface; a++, face++)
laplacian_triangle_area(sys, (*face)[0], (*face)[1], (*face)[2]);
- for(a=0; a<totvert; a++) {
- if(sys->areaweights) {
- if(sys->varea[a] != 0.0f)
+ for (a=0; a<totvert; a++) {
+ if (sys->areaweights) {
+ if (sys->varea[a] != 0.0f)
sys->varea[a]= 0.5f/sys->varea[a];
}
else
sys->varea[a]= 1.0f;
/* for heat weighting */
- if(sys->heat.H)
+ if (sys->heat.H)
nlMatrixAdd(a, a, sys->heat.H[a]);
}
- if(sys->storeweights)
+ if (sys->storeweights)
sys->fweights= MEM_callocN(sizeof(float)*3*totface, "LaplacianFWeight");
- for(a=0, face=sys->faces; a<totface; a++, face++)
+ for (a=0, face=sys->faces; a<totface; a++, face++)
laplacian_triangle_weights(sys, a, (*face)[0], (*face)[1], (*face)[2]);
MEM_freeN(sys->faces);
sys->faces= NULL;
- if(sys->varea) {
+ if (sys->varea) {
MEM_freeN(sys->varea);
sys->varea= NULL;
}
@@ -337,11 +339,11 @@ static void laplacian_system_construct_end(LaplacianSystem *sys)
static void laplacian_system_delete(LaplacianSystem *sys)
{
- if(sys->verts) MEM_freeN(sys->verts);
- if(sys->varea) MEM_freeN(sys->varea);
- if(sys->vpinned) MEM_freeN(sys->vpinned);
- if(sys->faces) MEM_freeN(sys->faces);
- if(sys->fweights) MEM_freeN(sys->fweights);
+ if (sys->verts) MEM_freeN(sys->verts);
+ if (sys->varea) MEM_freeN(sys->varea);
+ if (sys->vpinned) MEM_freeN(sys->vpinned);
+ if (sys->faces) MEM_freeN(sys->faces);
+ if (sys->fweights) MEM_freeN(sys->fweights);
nlDeleteContext(sys->context);
MEM_freeN(sys);
@@ -354,9 +356,9 @@ void laplacian_begin_solve(LaplacianSystem *sys, int index)
if (!sys->nlbegun) {
nlBegin(NL_SYSTEM);
- if(index >= 0) {
- for(a=0; a<sys->totvert; a++) {
- if(sys->vpinned[a]) {
+ if (index >= 0) {
+ for (a=0; a<sys->totvert; a++) {
+ if (sys->vpinned[a]) {
nlSetVariable(0, a, sys->verts[a][index]);
nlLockVariable(a);
}
@@ -413,9 +415,9 @@ static void bvh_callback(void *userdata, int index, const BVHTreeRay *UNUSED(ray
mul_v3_v3fl(dir, data->vec, hit->dist);
- if(isect_ray_tri_v3(data->start, dir, verts[mf->v1], verts[mf->v2], verts[mf->v3], &lambda, uv)) {
+ if (isect_ray_tri_v3(data->start, dir, verts[mf->v1], verts[mf->v2], verts[mf->v3], &lambda, uv)) {
normal_tri_v3(n, verts[mf->v1], verts[mf->v2], verts[mf->v3]);
- if(lambda < 1.0f && dot_v3v3(n, data->vec) < -1e-5f) {
+ if (lambda < 1.0f && dot_v3v3(n, data->vec) < -1e-5f) {
hit->index = index;
hit->dist *= lambda;
}
@@ -423,9 +425,9 @@ static void bvh_callback(void *userdata, int index, const BVHTreeRay *UNUSED(ray
mul_v3_v3fl(dir, data->vec, hit->dist);
- if(isect_ray_tri_v3(data->start, dir, verts[mf->v1], verts[mf->v3], verts[mf->v4], &lambda, uv)) {
+ if (isect_ray_tri_v3(data->start, dir, verts[mf->v1], verts[mf->v3], verts[mf->v4], &lambda, uv)) {
normal_tri_v3(n, verts[mf->v1], verts[mf->v3], verts[mf->v4]);
- if(lambda < 1.0f && dot_v3v3(n, data->vec) < -1e-5f) {
+ if (lambda < 1.0f && dot_v3v3(n, data->vec) < -1e-5f) {
hit->index = index;
hit->dist *= lambda;
}
@@ -444,7 +446,7 @@ static void heat_ray_tree_create(LaplacianSystem *sys)
sys->heat.bvhtree = BLI_bvhtree_new(totface, 0.0f, 4, 6);
sys->heat.vface = MEM_callocN(sizeof(MFace*)*totvert, "HeatVFaces");
- for(a=0; a<totface; a++) {
+ for (a=0; a<totface; a++) {
MFace *mf = mface+a;
float bb[6];
@@ -452,7 +454,7 @@ static void heat_ray_tree_create(LaplacianSystem *sys)
DO_MINMAX(verts[mf->v1], bb, bb+3);
DO_MINMAX(verts[mf->v2], bb, bb+3);
DO_MINMAX(verts[mf->v3], bb, bb+3);
- if(mf->v4) {
+ if (mf->v4) {
DO_MINMAX(verts[mf->v4], bb, bb+3);
}
@@ -462,7 +464,7 @@ static void heat_ray_tree_create(LaplacianSystem *sys)
sys->heat.vface[mf->v1]= mf;
sys->heat.vface[mf->v2]= mf;
sys->heat.vface[mf->v3]= mf;
- if(mf->v4) sys->heat.vface[mf->v4]= mf;
+ if (mf->v4) sys->heat.vface[mf->v4]= mf;
}
BLI_bvhtree_balance(sys->heat.bvhtree);
@@ -477,13 +479,13 @@ static int heat_ray_source_visible(LaplacianSystem *sys, int vertex, int source)
int visible;
mface= sys->heat.vface[vertex];
- if(!mface)
+ if (!mface)
return 1;
data.sys= sys;
copy_v3_v3(data.start, sys->heat.verts[vertex]);
- if(sys->heat.root) /* bone */
+ if (sys->heat.root) /* bone */
closest_to_line_segment_v3(end, data.start,
sys->heat.root[source], sys->heat.tip[source]);
else /* vertex */
@@ -507,7 +509,7 @@ static float heat_source_distance(LaplacianSystem *sys, int vertex, int source)
float closest[3], d[3], dist, cosine;
/* compute euclidian distance */
- if(sys->heat.root) /* bone */
+ if (sys->heat.root) /* bone */
closest_to_line_segment_v3(closest, sys->heat.verts[vertex],
sys->heat.root[source], sys->heat.tip[source]);
else /* vertex */
@@ -528,8 +530,8 @@ static int heat_source_closest(LaplacianSystem *sys, int vertex, int source)
dist= heat_source_distance(sys, vertex, source);
- if(dist <= sys->heat.mindist[vertex]*(1.0f + DISTANCE_EPSILON))
- if(heat_ray_source_visible(sys, vertex, source))
+ if (dist <= sys->heat.mindist[vertex]*(1.0f + DISTANCE_EPSILON))
+ if (heat_ray_source_visible(sys, vertex, source))
return 1;
return 0;
@@ -543,24 +545,24 @@ static void heat_set_H(LaplacianSystem *sys, int vertex)
mindist= 1e10;
/* compute minimum distance */
- for(j=0; j<sys->heat.numsource; j++) {
+ for (j=0; j<sys->heat.numsource; j++) {
dist= heat_source_distance(sys, vertex, j);
- if(dist < mindist)
+ if (dist < mindist)
mindist= dist;
}
sys->heat.mindist[vertex]= mindist;
/* count number of sources with approximately this minimum distance */
- for(j=0; j<sys->heat.numsource; j++)
- if(heat_source_closest(sys, vertex, j))
+ for (j=0; j<sys->heat.numsource; j++)
+ if (heat_source_closest(sys, vertex, j))
numclosest++;
sys->heat.p[vertex]= (numclosest > 0)? 1.0f/numclosest: 0.0f;
/* compute H entry */
- if(numclosest > 0) {
+ if (numclosest > 0) {
mindist= maxf(mindist, 1e-4f);
h= numclosest*C_WEIGHT/(mindist*mindist);
}
@@ -577,7 +579,7 @@ static void heat_calc_vnormals(LaplacianSystem *sys)
sys->heat.vnors= MEM_callocN(sizeof(float)*3*sys->totvert, "HeatVNors");
- for(a=0, face=sys->faces; a<sys->totface; a++, face++) {
+ for (a=0, face=sys->faces; a<sys->totface; a++, face++) {
v1= (*face)[0];
v2= (*face)[1];
v3= (*face)[2];
@@ -589,7 +591,7 @@ static void heat_calc_vnormals(LaplacianSystem *sys)
add_v3_v3(sys->heat.vnors[v3], fnor);
}
- for(a=0; a<sys->totvert; a++)
+ for (a=0; a<sys->totvert; a++)
normalize_v3(sys->heat.vnors[a]);
}
@@ -606,19 +608,19 @@ static void heat_laplacian_create(LaplacianSystem *sys)
sys->heat.p= MEM_callocN(sizeof(float)*totvert, "HeatP");
/* add verts and faces to laplacian */
- for(a=0; a<totvert; a++)
+ for (a=0; a<totvert; a++)
laplacian_add_vertex(sys, sys->heat.verts[a], 0);
- for(a=0, mf=mface; a<totface; a++, mf++) {
+ for (a=0, mf=mface; a<totface; a++, mf++) {
laplacian_add_triangle(sys, mf->v1, mf->v2, mf->v3);
- if(mf->v4)
+ if (mf->v4)
laplacian_add_triangle(sys, mf->v1, mf->v3, mf->v4);
}
/* for distance computation in set_H */
heat_calc_vnormals(sys);
- for(a=0; a<totvert; a++)
+ for (a=0; a<totvert; a++)
heat_set_H(sys, a);
}
@@ -637,10 +639,10 @@ static float heat_limit_weight(float weight)
{
float t;
- if(weight < WEIGHT_LIMIT_END) {
+ if (weight < WEIGHT_LIMIT_END) {
return 0.0f;
}
- else if(weight < WEIGHT_LIMIT_START) {
+ else if (weight < WEIGHT_LIMIT_START) {
t= (weight - WEIGHT_LIMIT_END)/(WEIGHT_LIMIT_START - WEIGHT_LIMIT_END);
return t*WEIGHT_LIMIT_START;
}
@@ -665,15 +667,15 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
*err_str= NULL;
/* count triangles and create mask */
- if( (use_face_sel= (me->editflag & ME_EDIT_PAINT_MASK) != 0) ||
+ if ( (use_face_sel= (me->editflag & ME_EDIT_PAINT_MASK) != 0) ||
(use_vert_sel= ((me->editflag & ME_EDIT_VERT_SEL) != 0)))
{
mask= MEM_callocN(sizeof(int)*me->totvert, "heat_bone_weighting mask");
}
- for(a = 0, mp=me->mpoly; a < me->totpoly; mp++, a++) {
+ for (a = 0, mp=me->mpoly; a < me->totpoly; mp++, a++) {
/* (added selectedVerts content for vertex mask, they used to just equal 1) */
- if(use_vert_sel) {
+ if (use_vert_sel) {
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;
@@ -692,9 +694,9 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
/* bone heat needs triangulated faces */
BKE_mesh_tessface_ensure(me);
- for(tottri = 0, a = 0, mf = me->mface; a < me->totface; mf++, a++) {
+ for (tottri = 0, a = 0, mf = me->mface; a < me->totface; mf++, a++) {
tottri++;
- if(mf->v4) tottri++;
+ if (mf->v4) tottri++;
}
/* create laplacian */
@@ -713,15 +715,15 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
laplacian_system_construct_end(sys);
- if(dgroupflip) {
+ if (dgroupflip) {
vertsflipped = MEM_callocN(sizeof(int)*me->totvert, "vertsflipped");
- for(a=0; a<me->totvert; a++)
+ for (a=0; a<me->totvert; a++)
vertsflipped[a] = mesh_get_x_mirror_vert(ob, a);
}
/* compute weights per bone */
- for(j=0; j<numsource; j++) {
- if(!selected[j])
+ for (j=0; j<numsource; j++) {
+ if (!selected[j])
continue;
firstsegment= (j == 0 || dgrouplist[j-1] != dgrouplist[j]);
@@ -729,13 +731,13 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
bbone= !(firstsegment && lastsegment);
/* clear weights */
- if(bbone && firstsegment) {
- for(a=0; a<me->totvert; a++) {
- if(mask && !mask[a])
+ if (bbone && firstsegment) {
+ for (a=0; a<me->totvert; a++) {
+ if (mask && !mask[a])
continue;
ED_vgroup_vert_remove(ob, dgrouplist[j], a);
- if(vertsflipped && dgroupflip[j] && vertsflipped[a] >= 0)
+ if (vertsflipped && dgroupflip[j] && vertsflipped[a] >= 0)
ED_vgroup_vert_remove(ob, dgroupflip[j], vertsflipped[a]);
}
}
@@ -743,28 +745,28 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
/* fill right hand side */
laplacian_begin_solve(sys, -1);
- for(a=0; a<me->totvert; a++)
- if(heat_source_closest(sys, a, j))
+ for (a=0; a<me->totvert; a++)
+ if (heat_source_closest(sys, a, j))
laplacian_add_right_hand_side(sys, a,
sys->heat.H[a]*sys->heat.p[a]);
/* solve */
- if(laplacian_system_solve(sys)) {
+ if (laplacian_system_solve(sys)) {
/* load solution into vertex groups */
- for(a=0; a<me->totvert; a++) {
- if(mask && !mask[a])
+ for (a=0; a<me->totvert; a++) {
+ if (mask && !mask[a])
continue;
solution= laplacian_system_get_solution(a);
- if(bbone) {
- if(solution > 0.0f)
+ if (bbone) {
+ if (solution > 0.0f)
ED_vgroup_vert_add(ob, dgrouplist[j], a, solution,
WEIGHT_ADD);
}
else {
weight= heat_limit_weight(solution);
- if(weight > 0.0f)
+ if (weight > 0.0f)
ED_vgroup_vert_add(ob, dgrouplist[j], a, weight,
WEIGHT_REPLACE);
else
@@ -772,15 +774,15 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
}
/* do same for mirror */
- if(vertsflipped && dgroupflip[j] && vertsflipped[a] >= 0) {
- if(bbone) {
- if(solution > 0.0f)
+ if (vertsflipped && dgroupflip[j] && vertsflipped[a] >= 0) {
+ if (bbone) {
+ if (solution > 0.0f)
ED_vgroup_vert_add(ob, dgroupflip[j], vertsflipped[a],
solution, WEIGHT_ADD);
}
else {
weight= heat_limit_weight(solution);
- if(weight > 0.0f)
+ if (weight > 0.0f)
ED_vgroup_vert_add(ob, dgroupflip[j], vertsflipped[a],
weight, WEIGHT_REPLACE);
else
@@ -789,26 +791,26 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
}
}
}
- else if(*err_str == NULL) {
+ else if (*err_str == NULL) {
*err_str= "Bone Heat Weighting: failed to find solution for one or more bones";
break;
}
/* remove too small vertex weights */
- if(bbone && lastsegment) {
- for(a=0; a<me->totvert; a++) {
- if(mask && !mask[a])
+ if (bbone && lastsegment) {
+ for (a=0; a<me->totvert; a++) {
+ if (mask && !mask[a])
continue;
weight= ED_vgroup_vert_weight(ob, dgrouplist[j], a);
weight= heat_limit_weight(weight);
- if(weight <= 0.0f)
+ if (weight <= 0.0f)
ED_vgroup_vert_remove(ob, dgrouplist[j], a);
- if(vertsflipped && dgroupflip[j] && vertsflipped[a] >= 0) {
+ if (vertsflipped && dgroupflip[j] && vertsflipped[a] >= 0) {
weight= ED_vgroup_vert_weight(ob, dgroupflip[j], vertsflipped[a]);
weight= heat_limit_weight(weight);
- if(weight <= 0.0f)
+ if (weight <= 0.0f)
ED_vgroup_vert_remove(ob, dgroupflip[j], vertsflipped[a]);
}
}
@@ -816,8 +818,8 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
}
/* free */
- if(vertsflipped) MEM_freeN(vertsflipped);
- if(mask) MEM_freeN(mask);
+ if (vertsflipped) MEM_freeN(vertsflipped);
+ if (mask) MEM_freeN(mask);
heat_system_free(sys);
@@ -901,7 +903,7 @@ void rigid_deform_iteration()
EditFace *efa;
int a, i;
- if(!sys)
+ if (!sys)
return;
nlMakeCurrent(sys->context);
@@ -911,12 +913,12 @@ void rigid_deform_iteration()
memset(sys->rigid.R, 0, sizeof(float)*3*3*sys->totvert);
memset(sys->rigid.rhs, 0, sizeof(float)*3*sys->totvert);
- for(a=0, efa=em->faces.first; efa; efa=efa->next, a++) {
+ for (a=0, efa=em->faces.first; efa; efa=efa->next, a++) {
rigid_add_edge_to_R(sys, efa->v1, efa->v2, sys->fweights[a][2]);
rigid_add_edge_to_R(sys, efa->v2, efa->v3, sys->fweights[a][0]);
rigid_add_edge_to_R(sys, efa->v3, efa->v1, sys->fweights[a][1]);
- if(efa->v4) {
+ if (efa->v4) {
a++;
rigid_add_edge_to_R(sys, efa->v1, efa->v3, sys->fweights[a][2]);
rigid_add_edge_to_R(sys, efa->v3, efa->v4, sys->fweights[a][0]);
@@ -924,18 +926,18 @@ void rigid_deform_iteration()
}
}
- for(a=0, eve=em->verts.first; eve; eve=eve->next, a++) {
+ for (a=0, eve=em->verts.first; eve; eve=eve->next, a++) {
rigid_orthogonalize_R(sys->rigid.R[a]);
eve->tmp.l= a;
}
/* compute right hand sides for solving */
- for(a=0, efa=em->faces.first; efa; efa=efa->next, a++) {
+ for (a=0, efa=em->faces.first; efa; efa=efa->next, a++) {
rigid_add_edge_to_rhs(sys, efa->v1, efa->v2, sys->fweights[a][2]);
rigid_add_edge_to_rhs(sys, efa->v2, efa->v3, sys->fweights[a][0]);
rigid_add_edge_to_rhs(sys, efa->v3, efa->v1, sys->fweights[a][1]);
- if(efa->v4) {
+ if (efa->v4) {
a++;
rigid_add_edge_to_rhs(sys, efa->v1, efa->v3, sys->fweights[a][2]);
rigid_add_edge_to_rhs(sys, efa->v3, efa->v4, sys->fweights[a][0]);
@@ -944,19 +946,19 @@ void rigid_deform_iteration()
}
/* solve for positions, for X,Y and Z separately */
- for(i=0; i<3; i++) {
+ for (i=0; i<3; i++) {
laplacian_begin_solve(sys, i);
- for(a=0; a<sys->totvert; a++)
- if(!sys->vpinned[a])
+ for (a=0; a<sys->totvert; a++)
+ if (!sys->vpinned[a])
laplacian_add_right_hand_side(sys, a, sys->rigid.rhs[a][i]);
- if(laplacian_system_solve(sys)) {
- for(a=0, eve=em->verts.first; eve; eve=eve->next, a++)
+ if (laplacian_system_solve(sys)) {
+ for (a=0, eve=em->verts.first; eve; eve=eve->next, a++)
eve->co[i]= laplacian_system_get_solution(a);
}
else {
- if(!sys->rigid.thrownerror) {
+ if (!sys->rigid.thrownerror) {
error("RigidDeform: failed to find solution");
sys->rigid.thrownerror= 1;
}
@@ -973,15 +975,15 @@ static void rigid_laplacian_create(LaplacianSystem *sys)
int a;
/* add verts and faces to laplacian */
- for(a=0, eve=em->verts.first; eve; eve=eve->next, a++) {
+ for (a=0, eve=em->verts.first; eve; eve=eve->next, a++) {
laplacian_add_vertex(sys, eve->co, eve->pinned);
eve->tmp.l= a;
}
- for(efa=em->faces.first; efa; efa=efa->next) {
+ for (efa=em->faces.first; efa; efa=efa->next) {
laplacian_add_triangle(sys,
efa->v1->tmp.l, efa->v2->tmp.l, efa->v3->tmp.l);
- if(efa->v4)
+ if (efa->v4)
laplacian_add_triangle(sys,
efa->v1->tmp.l, efa->v3->tmp.l, efa->v4->tmp.l);
}
@@ -995,12 +997,12 @@ void rigid_deform_begin(EditMesh *em)
int a, totvert, totface;
/* count vertices, triangles */
- for(totvert=0, eve=em->verts.first; eve; eve=eve->next)
+ for (totvert=0, eve=em->verts.first; eve; eve=eve->next)
totvert++;
- for(totface=0, efa=em->faces.first; efa; efa=efa->next) {
+ for (totface=0, efa=em->faces.first; efa; efa=efa->next) {
totface++;
- if(efa->v4) totface++;
+ if (efa->v4) totface++;
}
/* create laplacian */
@@ -1011,7 +1013,7 @@ void rigid_deform_begin(EditMesh *em)
sys->rigid.rhs = MEM_callocN(sizeof(float)*3*totvert, "RigidDeformRHS");
sys->rigid.origco = MEM_callocN(sizeof(float)*3*totvert, "RigidDeformCo");
- for(a=0, eve=em->verts.first; eve; eve=eve->next, a++)
+ for (a=0, eve=em->verts.first; eve; eve=eve->next, a++)
copy_v3_v3(sys->rigid.origco[a], eve->co);
sys->areaweights= 0;
@@ -1028,19 +1030,19 @@ void rigid_deform_end(int cancel)
{
LaplacianSystem *sys = RigidDeformSystem;
- if(sys) {
+ if (sys) {
EditMesh *em = sys->rigid.mesh;
EditVert *eve;
int a;
- if(cancel)
- for(a=0, eve=em->verts.first; eve; eve=eve->next, a++)
- if(!eve->pinned)
+ if (cancel)
+ for (a=0, eve=em->verts.first; eve; eve=eve->next, a++)
+ if (!eve->pinned)
copy_v3_v3(eve->co, sys->rigid.origco[a]);
- if(sys->rigid.R) MEM_freeN(sys->rigid.R);
- if(sys->rigid.rhs) MEM_freeN(sys->rigid.rhs);
- if(sys->rigid.origco) MEM_freeN(sys->rigid.origco);
+ if (sys->rigid.R) MEM_freeN(sys->rigid.R);
+ if (sys->rigid.rhs) MEM_freeN(sys->rigid.rhs);
+ if (sys->rigid.origco) MEM_freeN(sys->rigid.origco);
/* free */
laplacian_system_delete(sys);
@@ -1174,10 +1176,10 @@ static int meshdeform_tri_intersect(float orig[3], float end[3], float vert0[3],
/* check if it is within the length of the line segment */
sub_v3_v3v3(isectdir, isectco, orig);
- if(dot_v3v3(dir, isectdir) < -EPSILON)
+ if (dot_v3v3(dir, isectdir) < -EPSILON)
return 0;
- if(dot_v3v3(dir, dir) + EPSILON < dot_v3v3(isectdir, isectdir))
+ if (dot_v3v3(dir, dir) + EPSILON < dot_v3v3(isectdir, isectdir))
return 0;
return 1;
@@ -1196,16 +1198,16 @@ static int meshdeform_intersect(MeshDeformBind *mdb, MeshDeformIsect *isec)
add_v3_v3v3(end, isec->start, isec->vec);
- for(f=0; f<totface; f++, mface++) {
+ for (f=0; f<totface; f++, mface++) {
copy_v3_v3(face[0], mdb->cagecos[mface->v1]);
copy_v3_v3(face[1], mdb->cagecos[mface->v2]);
copy_v3_v3(face[2], mdb->cagecos[mface->v3]);
- if(mface->v4) {
+ if (mface->v4) {
copy_v3_v3(face[3], mdb->cagecos[mface->v4]);
hit = meshdeform_tri_intersect(isec->start, end, face[0], face[1], face[2], co, uvw);
- if(hit) {
+ if (hit) {
normal_tri_v3( nor,face[0], face[1], face[2]);
}
else {
@@ -1218,9 +1220,9 @@ static int meshdeform_intersect(MeshDeformBind *mdb, MeshDeformIsect *isec)
normal_tri_v3( nor,face[0], face[1], face[2]);
}
- if(hit) {
+ if (hit) {
len= len_v3v3(isec->start, co)/len_v3v3(isec->start, end);
- if(len < isec->labda) {
+ if (len < isec->labda) {
isec->labda= len;
isec->face = mface;
isec->isect= (dot_v3v3(isec->vec, nor) <= 0.0f);
@@ -1249,7 +1251,7 @@ static MDefBoundIsect *meshdeform_ray_tree_intersect(MeshDeformBind *mdb, float
add_v3_v3v3(end, co2, epsilon);
sub_v3_v3v3(isec.vec, end, isec.start);
- if(meshdeform_intersect(mdb, &isec)) {
+ if (meshdeform_intersect(mdb, &isec)) {
len= isec.labda;
mface=(MFace*)isec.face;
@@ -1262,7 +1264,7 @@ static MDefBoundIsect *meshdeform_ray_tree_intersect(MeshDeformBind *mdb, float
isect->co[2]= co1[2] + isec.vec[2]*len;
isect->len= len_v3v3(co1, isect->co);
- if(isect->len < MESHDEFORM_LEN_THRESHOLD)
+ if (isect->len < MESHDEFORM_LEN_THRESHOLD)
isect->len= MESHDEFORM_LEN_THRESHOLD;
isect->v[0]= mface->v1;
@@ -1278,7 +1280,7 @@ static MDefBoundIsect *meshdeform_ray_tree_intersect(MeshDeformBind *mdb, float
copy_v3_v3(vert[0], cagecos[mface->v1]);
copy_v3_v3(vert[1], cagecos[mface->v2]);
copy_v3_v3(vert[2], cagecos[mface->v3]);
- if(mface->v4) copy_v3_v3(vert[3], cagecos[mface->v4]);
+ if (mface->v4) copy_v3_v3(vert[3], cagecos[mface->v4]);
interp_weights_poly_v3( isect->uvw,vert, isect->nvert, isect->co);
return isect;
@@ -1293,7 +1295,7 @@ static int meshdeform_inside_cage(MeshDeformBind *mdb, float *co)
float outside[3], start[3], dir[3];
int i;
- for(i=1; i<=6; i++) {
+ for (i=1; i<=6; i++) {
outside[0] = co[0] + (mdb->max[0] - mdb->min[0] + 1.0f)*MESHDEFORM_OFFSET[i][0];
outside[1] = co[1] + (mdb->max[1] - mdb->min[1] + 1.0f)*MESHDEFORM_OFFSET[i][1];
outside[2] = co[2] + (mdb->max[2] - mdb->min[2] + 1.0f)*MESHDEFORM_OFFSET[i][2];
@@ -1303,7 +1305,7 @@ static int meshdeform_inside_cage(MeshDeformBind *mdb, float *co)
normalize_v3(dir);
isect = meshdeform_ray_tree_intersect(mdb, start, outside);
- if(isect && !isect->facing)
+ if (isect && !isect->facing)
return 1;
}
@@ -1320,11 +1322,11 @@ static int meshdeform_index(MeshDeformBind *mdb, int x, int y, int z, int n)
y += MESHDEFORM_OFFSET[n][1];
z += MESHDEFORM_OFFSET[n][2];
- if(x < 0 || x >= mdb->size)
+ if (x < 0 || x >= mdb->size)
return -1;
- if(y < 0 || y >= mdb->size)
+ if (y < 0 || y >= mdb->size)
return -1;
- if(z < 0 || z >= mdb->size)
+ if (z < 0 || z >= mdb->size)
return -1;
return x + y*size + z*size*size;
@@ -1351,14 +1353,14 @@ static void meshdeform_add_intersections(MeshDeformBind *mdb, int x, int y, int
meshdeform_cell_center(mdb, x, y, z, 0, center);
/* check each outgoing edge for intersection */
- for(i=1; i<=6; i++) {
- if(meshdeform_index(mdb, x, y, z, i) == -1)
+ for (i=1; i<=6; i++) {
+ if (meshdeform_index(mdb, x, y, z, i) == -1)
continue;
meshdeform_cell_center(mdb, x, y, z, i, ncenter);
isect= meshdeform_ray_tree_intersect(mdb, center, ncenter);
- if(isect) {
+ if (isect) {
mdb->boundisect[a][i-1]= isect;
mdb->tag[a]= MESHDEFORM_TAG_BOUNDARY;
}
@@ -1378,18 +1380,18 @@ static void meshdeform_bind_floodfill(MeshDeformBind *mdb)
stacksize= 1;
/* floodfill exterior tag */
- while(stacksize > 0) {
+ while (stacksize > 0) {
a= stack[--stacksize];
xyz[2]= a/(size*size);
xyz[1]= (a - xyz[2]*size*size)/size;
xyz[0]= a - xyz[1]*size - xyz[2]*size*size;
- for(i=1; i<=6; i++) {
+ for (i=1; i<=6; i++) {
b= meshdeform_index(mdb, xyz[0], xyz[1], xyz[2], i);
- if(b != -1) {
- if(tag[b] == MESHDEFORM_TAG_UNTYPED ||
+ if (b != -1) {
+ if (tag[b] == MESHDEFORM_TAG_UNTYPED ||
(tag[b] == MESHDEFORM_TAG_BOUNDARY && !mdb->boundisect[a][i-1])) {
tag[b]= MESHDEFORM_TAG_EXTERIOR;
stack[stacksize++]= b;
@@ -1399,23 +1401,23 @@ static void meshdeform_bind_floodfill(MeshDeformBind *mdb)
}
/* other cells are interior */
- for(a=0; a<size*size*size; a++)
- if(tag[a]==MESHDEFORM_TAG_UNTYPED)
+ for (a=0; a<size*size*size; a++)
+ if (tag[a]==MESHDEFORM_TAG_UNTYPED)
tag[a]= MESHDEFORM_TAG_INTERIOR;
#if 0
{
int tb, ti, te, ts;
tb= ti= te= ts= 0;
- for(a=0; a<size*size*size; a++)
- if(tag[a]==MESHDEFORM_TAG_BOUNDARY)
+ for (a=0; a<size*size*size; a++)
+ if (tag[a]==MESHDEFORM_TAG_BOUNDARY)
tb++;
- else if(tag[a]==MESHDEFORM_TAG_INTERIOR)
+ else if (tag[a]==MESHDEFORM_TAG_INTERIOR)
ti++;
- else if(tag[a]==MESHDEFORM_TAG_EXTERIOR) {
+ else if (tag[a]==MESHDEFORM_TAG_EXTERIOR) {
te++;
- if(mdb->semibound[a])
+ if (mdb->semibound[a])
ts++;
}
@@ -1430,8 +1432,8 @@ static float meshdeform_boundary_phi(MeshDeformBind *UNUSED(mdb), MDefBoundIsect
{
int a;
- for(a=0; a<isect->nvert; a++)
- if(isect->v[a] == cagevert)
+ for (a=0; a<isect->nvert; a++)
+ if (isect->v[a] == cagevert)
return isect->uvw[a];
return 0.0f;
@@ -1443,19 +1445,19 @@ static float meshdeform_interp_w(MeshDeformBind *mdb, float *gridvec, float *UNU
float weight, totweight= 0.0f;
int i, a, x, y, z;
- for(i=0; i<3; i++) {
+ for (i=0; i<3; i++) {
ivec[i]= (int)gridvec[i];
dvec[i]= gridvec[i] - ivec[i];
}
- for(i=0; i<8; i++) {
- if(i & 1) { x= ivec[0]+1; wx= dvec[0]; }
+ for (i=0; i<8; i++) {
+ if (i & 1) { x= ivec[0]+1; wx= dvec[0]; }
else { x= ivec[0]; wx= 1.0f-dvec[0]; }
- if(i & 2) { y= ivec[1]+1; wy= dvec[1]; }
+ if (i & 2) { y= ivec[1]+1; wy= dvec[1]; }
else { y= ivec[1]; wy= 1.0f-dvec[1]; }
- if(i & 4) { z= ivec[2]+1; wz= dvec[2]; }
+ if (i & 4) { z= ivec[2]+1; wz= dvec[2]; }
else { z= ivec[2]; wz= 1.0f-dvec[2]; }
CLAMP(x, 0, mdb->size-1);
@@ -1468,7 +1470,7 @@ static float meshdeform_interp_w(MeshDeformBind *mdb, float *gridvec, float *UNU
totweight += weight;
}
- if(totweight > 0.0f)
+ if (totweight > 0.0f)
result /= totweight;
return result;
@@ -1479,11 +1481,11 @@ static void meshdeform_check_semibound(MeshDeformBind *mdb, int x, int y, int z)
int i, a;
a= meshdeform_index(mdb, x, y, z, 0);
- if(mdb->tag[a] != MESHDEFORM_TAG_EXTERIOR)
+ if (mdb->tag[a] != MESHDEFORM_TAG_EXTERIOR)
return;
- for(i=1; i<=6; i++)
- if(mdb->boundisect[a][i-1])
+ for (i=1; i<=6; i++)
+ if (mdb->boundisect[a][i-1])
mdb->semibound[a]= 1;
}
@@ -1495,13 +1497,13 @@ static float meshdeform_boundary_total_weight(MeshDeformBind *mdb, int x, int y,
a= meshdeform_index(mdb, x, y, z, 0);
/* count weight for neighbor cells */
- for(i=1; i<=6; i++) {
- if(meshdeform_index(mdb, x, y, z, i) == -1)
+ for (i=1; i<=6; i++) {
+ if (meshdeform_index(mdb, x, y, z, i) == -1)
continue;
- if(mdb->boundisect[a][i-1])
+ if (mdb->boundisect[a][i-1])
weight= 1.0f/mdb->boundisect[a][i-1]->len;
- else if(!mdb->semibound[a])
+ else if (!mdb->semibound[a])
weight= 1.0f/mdb->width[0];
else
weight= 0.0f;
@@ -1519,15 +1521,15 @@ static void meshdeform_matrix_add_cell(MeshDeformBind *mdb, int x, int y, int z)
int i, a, acenter;
acenter= meshdeform_index(mdb, x, y, z, 0);
- if(mdb->tag[acenter] == MESHDEFORM_TAG_EXTERIOR)
+ if (mdb->tag[acenter] == MESHDEFORM_TAG_EXTERIOR)
return;
nlMatrixAdd(mdb->varidx[acenter], mdb->varidx[acenter], 1.0f);
totweight= meshdeform_boundary_total_weight(mdb, x, y, z);
- for(i=1; i<=6; i++) {
+ for (i=1; i<=6; i++) {
a= meshdeform_index(mdb, x, y, z, i);
- if(a == -1 || mdb->tag[a] == MESHDEFORM_TAG_EXTERIOR)
+ if (a == -1 || mdb->tag[a] == MESHDEFORM_TAG_EXTERIOR)
continue;
isect= mdb->boundisect[acenter][i-1];
@@ -1545,13 +1547,13 @@ static void meshdeform_matrix_add_rhs(MeshDeformBind *mdb, int x, int y, int z,
int i, a, acenter;
acenter= meshdeform_index(mdb, x, y, z, 0);
- if(mdb->tag[acenter] == MESHDEFORM_TAG_EXTERIOR)
+ if (mdb->tag[acenter] == MESHDEFORM_TAG_EXTERIOR)
return;
totweight= meshdeform_boundary_total_weight(mdb, x, y, z);
- for(i=1; i<=6; i++) {
+ for (i=1; i<=6; i++) {
a= meshdeform_index(mdb, x, y, z, i);
- if(a == -1)
+ if (a == -1)
continue;
isect= mdb->boundisect[acenter][i-1];
@@ -1571,13 +1573,13 @@ static void meshdeform_matrix_add_semibound_phi(MeshDeformBind *mdb, int x, int
int i, a;
a= meshdeform_index(mdb, x, y, z, 0);
- if(!mdb->semibound[a])
+ if (!mdb->semibound[a])
return;
mdb->phi[a]= 0.0f;
totweight= meshdeform_boundary_total_weight(mdb, x, y, z);
- for(i=1; i<=6; i++) {
+ for (i=1; i<=6; i++) {
isect= mdb->boundisect[a][i-1];
if (isect) {
@@ -1594,21 +1596,21 @@ static void meshdeform_matrix_add_exterior_phi(MeshDeformBind *mdb, int x, int y
int i, a, acenter;
acenter= meshdeform_index(mdb, x, y, z, 0);
- if(mdb->tag[acenter] != MESHDEFORM_TAG_EXTERIOR || mdb->semibound[acenter])
+ if (mdb->tag[acenter] != MESHDEFORM_TAG_EXTERIOR || mdb->semibound[acenter])
return;
phi= 0.0f;
totweight= 0.0f;
- for(i=1; i<=6; i++) {
+ for (i=1; i<=6; i++) {
a= meshdeform_index(mdb, x, y, z, i);
- if(a != -1 && mdb->semibound[a]) {
+ if (a != -1 && mdb->semibound[a]) {
phi += mdb->phi[a];
totweight += 1.0f;
}
}
- if(totweight != 0.0f)
+ if (totweight != 0.0f)
mdb->phi[acenter]= phi/totweight;
}
@@ -1621,10 +1623,10 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind
/* setup variable indices */
mdb->varidx= MEM_callocN(sizeof(int)*mdb->size3, "MeshDeformDSvaridx");
- for(a=0, totvar=0; a<mdb->size3; a++)
+ for (a=0, totvar=0; a<mdb->size3; a++)
mdb->varidx[a]= (mdb->tag[a] == MESHDEFORM_TAG_EXTERIOR)? -1: totvar++;
- if(totvar == 0) {
+ if (totvar == 0) {
MEM_freeN(mdb->varidx);
return;
}
@@ -1643,22 +1645,22 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind
nlBegin(NL_MATRIX);
/* build matrix */
- for(z=0; z<mdb->size; z++)
- for(y=0; y<mdb->size; y++)
- for(x=0; x<mdb->size; x++)
+ for (z=0; z<mdb->size; z++)
+ for (y=0; y<mdb->size; y++)
+ for (x=0; x<mdb->size; x++)
meshdeform_matrix_add_cell(mdb, x, y, z);
/* solve for each cage vert */
- for(a=0; a<mdb->totcagevert; a++) {
- if(a != 0) {
+ for (a=0; a<mdb->totcagevert; a++) {
+ if (a != 0) {
nlBegin(NL_SYSTEM);
nlBegin(NL_MATRIX);
}
/* fill in right hand side and solve */
- for(z=0; z<mdb->size; z++)
- for(y=0; y<mdb->size; y++)
- for(x=0; x<mdb->size; x++)
+ for (z=0; z<mdb->size; z++)
+ for (y=0; y<mdb->size; y++)
+ for (x=0; x<mdb->size; x++)
meshdeform_matrix_add_rhs(mdb, x, y, z, a);
nlEnd(NL_MATRIX);
@@ -1668,27 +1670,27 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind
nlPrintMatrix();
#endif
- if(nlSolveAdvanced(NULL, NL_TRUE)) {
- for(z=0; z<mdb->size; z++)
- for(y=0; y<mdb->size; y++)
- for(x=0; x<mdb->size; x++)
+ if (nlSolveAdvanced(NULL, NL_TRUE)) {
+ for (z=0; z<mdb->size; z++)
+ for (y=0; y<mdb->size; y++)
+ for (x=0; x<mdb->size; x++)
meshdeform_matrix_add_semibound_phi(mdb, x, y, z, a);
- for(z=0; z<mdb->size; z++)
- for(y=0; y<mdb->size; y++)
- for(x=0; x<mdb->size; x++)
+ for (z=0; z<mdb->size; z++)
+ for (y=0; y<mdb->size; y++)
+ for (x=0; x<mdb->size; x++)
meshdeform_matrix_add_exterior_phi(mdb, x, y, z, a);
- for(b=0; b<mdb->size3; b++) {
- if(mdb->tag[b] != MESHDEFORM_TAG_EXTERIOR)
+ for (b=0; b<mdb->size3; b++) {
+ if (mdb->tag[b] != MESHDEFORM_TAG_EXTERIOR)
mdb->phi[b]= nlGetVariable(0, mdb->varidx[b]);
mdb->totalphi[b] += mdb->phi[b];
}
- if(mdb->weights) {
+ if (mdb->weights) {
/* static bind : compute weights for each vertex */
- for(b=0; b<mdb->totvert; b++) {
- if(mdb->inside[b]) {
+ for (b=0; b<mdb->totvert; b++) {
+ if (mdb->inside[b]) {
copy_v3_v3(vec, mdb->vertexcos[b]);
gridvec[0]= (vec[0] - mdb->min[0] - mdb->halfwidth[0])/mdb->width[0];
gridvec[1]= (vec[1] - mdb->min[1] - mdb->halfwidth[1])/mdb->width[1];
@@ -1702,8 +1704,8 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind
MDefBindInfluence *inf;
/* dynamic bind */
- for(b=0; b<mdb->size3; b++) {
- if(mdb->phi[b] >= MESHDEFORM_MIN_INFLUENCE) {
+ for (b=0; b<mdb->size3; b++) {
+ if (mdb->phi[b] >= MESHDEFORM_MIN_INFLUENCE) {
inf= BLI_memarena_alloc(mdb->memarena, sizeof(*inf));
inf->vertex= a;
inf->weight= mdb->phi[b];
@@ -1714,7 +1716,7 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind
}
}
else {
- modifier_setError(&mmd->modifier, "Failed to find bind solution (increase precision?).");
+ modifier_setError(&mmd->modifier, "%s", TIP_("Failed to find bind solution (increase precision?)."));
error("Mesh Deform: failed to find bind solution.");
break;
}
@@ -1725,9 +1727,9 @@ static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind
#if 0
/* sanity check */
- for(b=0; b<mdb->size3; b++)
- if(mdb->tag[b] != MESHDEFORM_TAG_EXTERIOR)
- if(fabs(mdb->totalphi[b] - 1.0f) > 1e-4)
+ for (b=0; b<mdb->size3; b++)
+ if (mdb->tag[b] != MESHDEFORM_TAG_EXTERIOR)
+ if (fabs(mdb->totalphi[b] - 1.0f) > 1e-4)
printf("totalphi deficiency [%s|%d] %d: %.10f\n",
(mdb->tag[b] == MESHDEFORM_TAG_INTERIOR)? "interior": "boundary", mdb->semibound[b], mdb->varidx[b], mdb->totalphi[b]);
#endif
@@ -1749,7 +1751,7 @@ static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierDa
/* compute bounding box of the cage mesh */
INIT_MINMAX(mdb->min, mdb->max);
- for(a=0; a<mdb->totcagevert; a++)
+ for (a=0; a<mdb->totcagevert; a++)
DO_MINMAX(mdb->cagecos[a], mdb->min, mdb->max);
/* allocate memory */
@@ -1763,7 +1765,7 @@ static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierDa
mdb->inside= MEM_callocN(sizeof(int)*mdb->totvert, "MDefInside");
- if(mmd->flag & MOD_MDEF_DYNAMIC_BIND)
+ if (mmd->flag & MOD_MDEF_DYNAMIC_BIND)
mdb->dyngrid= MEM_callocN(sizeof(MDefBindInfluence*)*mdb->size3, "MDefDynGrid");
else
mdb->weights= MEM_callocN(sizeof(float)*mdb->totvert*mdb->totcagevert, "MDefWeights");
@@ -1774,11 +1776,11 @@ static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierDa
/* make bounding box equal size in all directions, add padding, and compute
* width of the cells */
maxwidth = -1.0f;
- for(a=0; a<3; a++)
- if(mdb->max[a]-mdb->min[a] > maxwidth)
+ for (a=0; a<3; a++)
+ if (mdb->max[a]-mdb->min[a] > maxwidth)
maxwidth= mdb->max[a]-mdb->min[a];
- for(a=0; a<3; a++) {
+ for (a=0; a<3; a++) {
center[a]= (mdb->min[a]+mdb->max[a])*0.5f;
mdb->min[a]= center[a] - maxwidth*0.5f;
mdb->max[a]= center[a] + maxwidth*0.5f;
@@ -1794,10 +1796,10 @@ static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierDa
progress_bar(0, "Setting up mesh deform system");
totinside= 0;
- for(a=0; a<mdb->totvert; a++) {
+ for (a=0; a<mdb->totvert; a++) {
copy_v3_v3(vec, mdb->vertexcos[a]);
mdb->inside[a]= meshdeform_inside_cage(mdb, vec);
- if(mdb->inside[a])
+ if (mdb->inside[a])
totinside++;
}
@@ -1806,53 +1808,53 @@ static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierDa
mdb->memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "harmonic coords arena");
/* start with all cells untyped */
- for(a=0; a<mdb->size3; a++)
+ for (a=0; a<mdb->size3; a++)
mdb->tag[a]= MESHDEFORM_TAG_UNTYPED;
/* detect intersections and tag boundary cells */
- for(z=0; z<mdb->size; z++)
- for(y=0; y<mdb->size; y++)
- for(x=0; x<mdb->size; x++)
+ for (z=0; z<mdb->size; z++)
+ for (y=0; y<mdb->size; y++)
+ for (x=0; x<mdb->size; x++)
meshdeform_add_intersections(mdb, x, y, z);
/* compute exterior and interior tags */
meshdeform_bind_floodfill(mdb);
- for(z=0; z<mdb->size; z++)
- for(y=0; y<mdb->size; y++)
- for(x=0; x<mdb->size; x++)
+ for (z=0; z<mdb->size; z++)
+ for (y=0; y<mdb->size; y++)
+ for (x=0; x<mdb->size; x++)
meshdeform_check_semibound(mdb, x, y, z);
/* solve */
meshdeform_matrix_solve(mmd, mdb);
/* assign results */
- if(mmd->flag & MOD_MDEF_DYNAMIC_BIND) {
+ if (mmd->flag & MOD_MDEF_DYNAMIC_BIND) {
mmd->totinfluence= 0;
- for(a=0; a<mdb->size3; a++)
- for(inf=mdb->dyngrid[a]; inf; inf=inf->next)
+ for (a=0; a<mdb->size3; a++)
+ for (inf=mdb->dyngrid[a]; inf; inf=inf->next)
mmd->totinfluence++;
/* convert MDefBindInfluences to smaller MDefInfluences */
mmd->dyngrid= MEM_callocN(sizeof(MDefCell)*mdb->size3, "MDefDynGrid");
mmd->dyninfluences= MEM_callocN(sizeof(MDefInfluence)*mmd->totinfluence, "MDefInfluence");
offset= 0;
- for(a=0; a<mdb->size3; a++) {
+ for (a=0; a<mdb->size3; a++) {
cell= &mmd->dyngrid[a];
cell->offset= offset;
totweight= 0.0f;
mdinf= mmd->dyninfluences + cell->offset;
- for(inf=mdb->dyngrid[a]; inf; inf=inf->next, mdinf++) {
+ for (inf=mdb->dyngrid[a]; inf; inf=inf->next, mdinf++) {
mdinf->weight= inf->weight;
mdinf->vertex= inf->vertex;
totweight += mdinf->weight;
cell->totinfluence++;
}
- if(totweight > 0.0f) {
+ if (totweight > 0.0f) {
mdinf= mmd->dyninfluences + cell->offset;
- for(b=0; b<cell->totinfluence; b++, mdinf++)
+ for (b=0; b<cell->totinfluence; b++, mdinf++)
mdinf->weight /= totweight;
}
@@ -1891,9 +1893,9 @@ static void heat_weighting_bind(Scene *scene, DerivedMesh *dm, MeshDeformModifie
mdb->weights= MEM_callocN(sizeof(float)*mdb->totvert*mdb->totcagevert, "MDefWeights");
/* count triangles */
- for(tottri=0, a=0, mf=mface; a<totface; a++, mf++) {
+ for (tottri=0, a=0, mf=mface; a<totface; a++, mf++) {
tottri++;
- if(mf->v4) tottri++;
+ if (mf->v4) tottri++;
}
/* create laplacian */
@@ -1912,27 +1914,27 @@ static void heat_weighting_bind(Scene *scene, DerivedMesh *dm, MeshDeformModifie
laplacian_system_construct_end(sys);
/* compute weights per bone */
- for(j=0; j<mdb->totcagevert; j++) {
+ for (j=0; j<mdb->totcagevert; j++) {
/* fill right hand side */
laplacian_begin_solve(sys, -1);
- for(a=0; a<totvert; a++)
- if(heat_source_closest(sys, a, j))
+ for (a=0; a<totvert; a++)
+ if (heat_source_closest(sys, a, j))
laplacian_add_right_hand_side(sys, a,
sys->heat.H[a]*sys->heat.p[a]);
/* solve */
- if(laplacian_system_solve(sys)) {
+ if (laplacian_system_solve(sys)) {
/* load solution into vertex groups */
- for(a=0; a<totvert; a++) {
+ for (a=0; a<totvert; a++) {
solution= laplacian_system_get_solution(a);
weight= heat_limit_weight(solution);
- if(weight > 0.0f)
+ if (weight > 0.0f)
mdb->weights[a*mdb->totcagevert + j] = weight;
}
}
- else if(!thrownerror) {
+ else if (!thrownerror) {
error("Mesh Deform Heat Weighting:"
" failed to find solution for one or more vertices");
thrownerror= 1;
@@ -1969,14 +1971,14 @@ void mesh_deform_bind(Scene *scene, MeshDeformModifierData *mmd, float *vertexco
copy_m4_m4(mdb.cagemat, cagemat);
mvert= mdb.cagedm->getVertArray(mdb.cagedm);
- for(a=0; a<mdb.totcagevert; a++)
+ for (a=0; a<mdb.totcagevert; a++)
copy_v3_v3(mdb.cagecos[a], mvert[a].co);
- for(a=0; a<mdb.totvert; a++)
+ for (a=0; a<mdb.totvert; a++)
mul_v3_m4v3(mdb.vertexcos[a], mdb.cagemat, vertexcos + a*3);
/* solve */
#if 0
- if(mmd->mode == MOD_MDEF_VOLUME)
+ if (mmd->mode == MOD_MDEF_VOLUME)
harmonic_coordinates_bind(scene, mmd, &mdb);
else
heat_weighting_bind(scene, dm, mmd, &mdb);
@@ -1991,7 +1993,7 @@ void mesh_deform_bind(Scene *scene, MeshDeformModifierData *mmd, float *vertexco
copy_m4_m4(mmd->bindmat, mmd->object->obmat);
/* transform bindcagecos to world space */
- for(a=0; a<mdb.totcagevert; a++)
+ for (a=0; a<mdb.totcagevert; a++)
mul_m4_v3(mmd->object->obmat, mmd->bindcagecos+a*3);
/* free */
diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c
index adabf7405d6..be520d1e8a0 100644
--- a/source/blender/editors/armature/poseSlide.c
+++ b/source/blender/editors/armature/poseSlide.c
@@ -762,19 +762,19 @@ static int pose_slide_push_exec (bContext *C, wmOperator *op)
void POSE_OT_push (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Push Pose";
- ot->idname= "POSE_OT_push";
- ot->description= "Exaggerate the current pose";
+ ot->name = "Push Pose";
+ ot->idname = "POSE_OT_push";
+ ot->description = "Exaggerate the current pose";
/* callbacks */
- ot->exec= pose_slide_push_exec;
- ot->invoke= pose_slide_push_invoke;
- ot->modal= pose_slide_modal;
- ot->cancel= pose_slide_cancel;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_slide_push_exec;
+ ot->invoke = pose_slide_push_invoke;
+ ot->modal = pose_slide_modal;
+ ot->cancel = pose_slide_cancel;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* Properties */
pose_slide_opdef_properties(ot);
@@ -819,19 +819,19 @@ static int pose_slide_relax_exec (bContext *C, wmOperator *op)
void POSE_OT_relax (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Relax Pose";
- ot->idname= "POSE_OT_relax";
- ot->description= "Make the current pose more similar to its surrounding ones";
+ ot->name = "Relax Pose";
+ ot->idname = "POSE_OT_relax";
+ ot->description = "Make the current pose more similar to its surrounding ones";
/* callbacks */
- ot->exec= pose_slide_relax_exec;
- ot->invoke= pose_slide_relax_invoke;
- ot->modal= pose_slide_modal;
- ot->cancel= pose_slide_cancel;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_slide_relax_exec;
+ ot->invoke = pose_slide_relax_invoke;
+ ot->modal = pose_slide_modal;
+ ot->cancel = pose_slide_cancel;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* Properties */
pose_slide_opdef_properties(ot);
@@ -876,19 +876,19 @@ static int pose_slide_breakdown_exec (bContext *C, wmOperator *op)
void POSE_OT_breakdown (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Pose Breakdowner";
- ot->idname= "POSE_OT_breakdown";
- ot->description= "Create a suitable breakdown pose on the current frame";
+ ot->name = "Pose Breakdowner";
+ ot->idname = "POSE_OT_breakdown";
+ ot->description = "Create a suitable breakdown pose on the current frame";
/* callbacks */
- ot->exec= pose_slide_breakdown_exec;
- ot->invoke= pose_slide_breakdown_invoke;
- ot->modal= pose_slide_modal;
- ot->cancel= pose_slide_cancel;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_slide_breakdown_exec;
+ ot->invoke = pose_slide_breakdown_invoke;
+ ot->modal = pose_slide_modal;
+ ot->cancel = pose_slide_cancel;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* Properties */
pose_slide_opdef_properties(ot);
@@ -1102,7 +1102,7 @@ static void pose_propagate_fcurve (wmOperator *op, Object *ob, FCurve *fcu,
* doesn't need to firstly keyframe the pose (though this doesn't mean that
* they can't either)
*/
- if( !pose_propagate_get_refVal(ob, fcu, &refVal))
+ if ( !pose_propagate_get_refVal(ob, fcu, &refVal))
return;
/* find the first keyframe to start propagating from
@@ -1240,20 +1240,20 @@ void POSE_OT_propagate (wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Propagate Pose";
- ot->idname= "POSE_OT_propagate";
- ot->description= "Copy selected aspects of the current pose to subsequent poses already keyframed";
+ ot->name = "Propagate Pose";
+ ot->idname = "POSE_OT_propagate";
+ ot->description = "Copy selected aspects of the current pose to subsequent poses already keyframed";
/* callbacks */
- ot->exec= pose_propagate_exec;
- ot->poll= ED_operator_posemode; // XXX: needs selected bones!
+ ot->exec = pose_propagate_exec;
+ ot->poll = ED_operator_posemode; // XXX: needs selected bones!
/* flag */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
// TODO: add "fade out" control for tapering off amount of propagation as time goes by?
- ot->prop= RNA_def_enum(ot->srna, "mode", terminate_items, POSE_PROPAGATE_SMART_HOLDS, "Terminate Mode", "Method used to determine when to stop propagating pose to keyframes");
+ ot->prop = RNA_def_enum(ot->srna, "mode", terminate_items, POSE_PROPAGATE_SMART_HOLDS, "Terminate Mode", "Method used to determine when to stop propagating pose to keyframes");
RNA_def_float(ot->srna, "end_frame", 250.0, FLT_MIN, FLT_MAX, "End Frame", "Frame to stop propagating frames to (for 'Before Frame' mode)", 1.0, 250.0);
}
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index ef01b895f38..fbe05d7ef49 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -241,10 +241,10 @@ void POSELIB_OT_new (wmOperatorType *ot)
/* callbacks */
ot->exec = poselib_new_exec;
- ot->poll= ED_operator_posemode;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ------------------------------------------------ */
@@ -276,10 +276,10 @@ void POSELIB_OT_unlink (wmOperatorType *ot)
/* callbacks */
ot->exec = poselib_unlink_exec;
- ot->poll= has_poselib_pose_data_poll;
+ ot->poll = has_poselib_pose_data_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************************************************************* */
@@ -365,7 +365,7 @@ void POSELIB_OT_action_sanitise (wmOperatorType *ot)
ot->poll = has_poselib_pose_data_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ------------------------------------------ */
@@ -486,17 +486,17 @@ static int poselib_add_exec (bContext *C, wmOperator *op)
void POSELIB_OT_pose_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "PoseLib Add Pose";
- ot->idname= "POSELIB_OT_pose_add";
- ot->description= "Add the current Pose to the active Pose Library";
+ ot->name = "PoseLib Add Pose";
+ ot->idname = "POSELIB_OT_pose_add";
+ ot->description = "Add the current Pose to the active Pose Library";
/* api callbacks */
- ot->invoke= poselib_add_menu_invoke;
- ot->exec= poselib_add_exec;
- ot->poll= ED_operator_posemode;
+ ot->invoke = poselib_add_menu_invoke;
+ ot->exec = poselib_add_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "frame", 1, 0, INT_MAX, "Frame", "Frame to store pose on", 0, INT_MAX);
@@ -592,22 +592,22 @@ void POSELIB_OT_pose_remove (wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "PoseLib Remove Pose";
- ot->idname= "POSELIB_OT_pose_remove";
- ot->description= "Remove nth pose from the active Pose Library";
+ ot->name = "PoseLib Remove Pose";
+ ot->idname = "POSELIB_OT_pose_remove";
+ ot->description = "Remove nth pose from the active Pose Library";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= poselib_remove_exec;
- ot->poll= has_poselib_pose_data_poll;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = poselib_remove_exec;
+ ot->poll = has_poselib_pose_data_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "pose", DummyRNA_DEFAULT_items, 0, "Pose", "The pose to remove");
RNA_def_enum_funcs(prop, poselib_stored_pose_itemf);
- ot->prop= prop;
+ ot->prop = prop;
}
static int poselib_rename_invoke (bContext *C, wmOperator *op, wmEvent *evt)
@@ -682,21 +682,21 @@ void POSELIB_OT_pose_rename (wmOperatorType *ot)
};
/* identifiers */
- ot->name= "PoseLib Rename Pose";
- ot->idname= "POSELIB_OT_pose_rename";
- ot->description= "Rename specified pose from the active Pose Library";
+ ot->name = "PoseLib Rename Pose";
+ ot->idname = "POSELIB_OT_pose_rename";
+ ot->description = "Rename specified pose from the active Pose Library";
/* api callbacks */
- ot->invoke= poselib_rename_invoke;
- ot->exec= poselib_rename_exec;
- ot->poll= has_poselib_pose_data_poll;
+ ot->invoke = poselib_rename_invoke;
+ ot->exec = poselib_rename_exec;
+ ot->poll = has_poselib_pose_data_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
/* NOTE: name not pose is the operator's "main" property, so that it will get activated in the popup for easy renaming */
- ot->prop= RNA_def_string(ot->srna, "name", "RenamedPose", 64, "New Pose Name", "New name for pose");
+ ot->prop = RNA_def_string(ot->srna, "name", "RenamedPose", 64, "New Pose Name", "New name for pose");
prop= RNA_def_enum(ot->srna, "pose", prop_poses_dummy_types, 0, "Pose", "The pose to rename");
RNA_def_enum_funcs(prop, poselib_stored_pose_itemf);
}
@@ -1613,23 +1613,23 @@ static int poselib_preview_exec (bContext *C, wmOperator *op)
void POSELIB_OT_browse_interactive (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "PoseLib Browse Poses";
- ot->idname= "POSELIB_OT_browse_interactive";
- ot->description= "Interactively browse poses in 3D-View";
+ ot->name = "PoseLib Browse Poses";
+ ot->idname = "POSELIB_OT_browse_interactive";
+ ot->description = "Interactively browse poses in 3D-View";
/* callbacks */
- ot->invoke= poselib_preview_invoke;
- ot->modal= poselib_preview_modal;
- ot->cancel= poselib_preview_cancel;
- ot->exec= poselib_preview_exec;
- ot->poll= has_poselib_pose_data_poll;
+ ot->invoke = poselib_preview_invoke;
+ ot->modal = poselib_preview_modal;
+ ot->cancel = poselib_preview_cancel;
+ ot->exec = poselib_preview_exec;
+ ot->poll = has_poselib_pose_data_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* properties */
// TODO: make the pose_index into a proper enum instead of a cryptic int...
- ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX);
+ ot->prop = RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX);
// XXX: percentage vs factor?
/* not used yet */
@@ -1644,13 +1644,13 @@ void POSELIB_OT_apply_pose (wmOperatorType *ot)
ot->description = "Apply specified Pose Library pose to the rig";
/* callbacks */
- ot->exec= poselib_preview_exec;
- ot->poll= has_poselib_pose_data_poll;
+ ot->exec = poselib_preview_exec;
+ ot->poll = has_poselib_pose_data_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
// TODO: make the pose_index into a proper enum instead of a cryptic int...
- ot->prop= RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX);
+ ot->prop = RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX);
}
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 282519896c7..3d33930fa49 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -109,7 +109,7 @@ void ED_armature_enter_posemode(bContext *C, Base *base)
void ED_armature_exit_posemode(bContext *C, Base *base)
{
- if(base) {
+ if (base) {
Object *ob= base->object;
ob->restore_mode = ob->mode;
@@ -154,18 +154,18 @@ static int pose_channel_in_IK_chain(Object *ob, bPoseChannel *pchan, int level)
/* No need to check if constraint is active (has influence),
* since all constraints with CONSTRAINT_IK_AUTO are active */
- for(con= pchan->constraints.first; con; con= con->next) {
- if(con->type==CONSTRAINT_TYPE_KINEMATIC) {
+ for (con= pchan->constraints.first; con; con= con->next) {
+ if (con->type==CONSTRAINT_TYPE_KINEMATIC) {
bKinematicConstraint *data= con->data;
- if(data->rootbone == 0 || data->rootbone > level) {
- if((data->flag & CONSTRAINT_IK_AUTO)==0)
+ if (data->rootbone == 0 || data->rootbone > level) {
+ if ((data->flag & CONSTRAINT_IK_AUTO)==0)
return 1;
}
}
}
- for(bone= pchan->bone->childbase.first; bone; bone= bone->next) {
+ for (bone= pchan->bone->childbase.first; bone; bone= bone->next) {
pchan= get_pose_channel(ob->pose, bone->name);
- if(pchan && pose_channel_in_IK_chain(ob, pchan, level + 1))
+ if (pchan && pose_channel_in_IK_chain(ob, pchan, level + 1))
return 1;
}
return 0;
@@ -236,16 +236,16 @@ static int pose_calculate_paths_exec (bContext *C, wmOperator *op)
void POSE_OT_paths_calculate (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Calculate Bone Paths";
- ot->idname= "POSE_OT_paths_calculate";
- ot->description= "Calculate paths for the selected bones";
+ ot->name = "Calculate Bone Paths";
+ ot->idname = "POSE_OT_paths_calculate";
+ ot->description = "Calculate paths for the selected bones";
/* api callbacks */
- ot->exec= pose_calculate_paths_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_calculate_paths_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* --------- */
@@ -304,13 +304,13 @@ static int pose_clear_paths_exec (bContext *C, wmOperator *UNUSED(op))
void POSE_OT_paths_clear (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Bone Paths";
- ot->idname= "POSE_OT_paths_clear";
- ot->description= "Clear path caches for selected bones";
+ ot->name = "Clear Bone Paths";
+ ot->idname = "POSE_OT_paths_clear";
+ ot->description = "Clear path caches for selected bones";
/* api callbacks */
- ot->exec= pose_clear_paths_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_clear_paths_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -338,7 +338,7 @@ static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op
for (ct= targets.first; ct; ct= ct->next) {
if ((ct->tar == ob) && (ct->subtarget[0])) {
bPoseChannel *pchanc= get_pose_channel(ob->pose, ct->subtarget);
- if((pchanc) && !(pchanc->bone->flag & BONE_UNSELECTABLE)) {
+ if ((pchanc) && !(pchanc->bone->flag & BONE_UNSELECTABLE)) {
pchanc->bone->flag |= BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
found= 1;
}
@@ -364,16 +364,16 @@ static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op
void POSE_OT_select_constraint_target(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Constraint Target";
- ot->idname= "POSE_OT_select_constraint_target";
- ot->description= "Select bones used as targets for the currently selected bones";
+ ot->name = "Select Constraint Target";
+ ot->idname = "POSE_OT_select_constraint_target";
+ ot->description = "Select bones used as targets for the currently selected bones";
/* api callbacks */
- ot->exec= pose_select_constraint_target_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_select_constraint_target_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************* select hierarchy operator ************* */
@@ -441,19 +441,19 @@ void POSE_OT_select_hierarchy(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Select Hierarchy";
- ot->idname= "POSE_OT_select_hierarchy";
- ot->description= "Select immediate parent/children of selected bones";
+ ot->name = "Select Hierarchy";
+ ot->idname = "POSE_OT_select_hierarchy";
+ ot->description = "Select immediate parent/children of selected bones";
/* api callbacks */
- ot->exec= pose_select_hierarchy_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_select_hierarchy_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- ot->prop= RNA_def_enum(ot->srna, "direction", direction_items, BONE_SELECT_PARENT, "Direction", "");
+ ot->prop = RNA_def_enum(ot->srna, "direction", direction_items, BONE_SELECT_PARENT, "Direction", "");
RNA_def_boolean(ot->srna, "extend", 0, "Add to Selection", "");
}
@@ -661,21 +661,21 @@ void POSE_OT_select_grouped (wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Select Grouped";
+ ot->name = "Select Grouped";
ot->description = "Select all visible bones grouped by similar properties";
- ot->idname= "POSE_OT_select_grouped";
+ ot->idname = "POSE_OT_select_grouped";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= pose_select_grouped_exec;
- ot->poll= ED_operator_posemode;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = pose_select_grouped_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
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", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", "");
}
@@ -687,23 +687,23 @@ static int pose_bone_flip_active_exec (bContext *C, wmOperator *UNUSED(op))
Object *ob_act= CTX_data_active_object(C);
Object *ob= object_pose_armature_get(ob_act);
- if(ob && (ob->mode & OB_MODE_POSE)) {
+ if (ob && (ob->mode & OB_MODE_POSE)) {
bArmature *arm= ob->data;
- if(arm->act_bone) {
+ if (arm->act_bone) {
bPoseChannel *pchanf;
char name[MAXBONENAME];
flip_side_name(name, arm->act_bone->name, TRUE);
pchanf= get_pose_channel(ob->pose, name);
- if(pchanf && pchanf->bone != arm->act_bone) {
+ if (pchanf && pchanf->bone != arm->act_bone) {
arm->act_bone->flag &= ~BONE_SELECTED;
pchanf->bone->flag |= BONE_SELECTED;
arm->act_bone= pchanf->bone;
/* in weightpaint we select the associated vertex group too */
- if(ob_act->mode & OB_MODE_WEIGHT_PAINT) {
+ if (ob_act->mode & OB_MODE_WEIGHT_PAINT) {
ED_vgroup_select_by_name(ob_act, name);
DAG_id_tag_update(&ob_act->id, OB_RECALC_DATA);
}
@@ -721,13 +721,13 @@ static int pose_bone_flip_active_exec (bContext *C, wmOperator *UNUSED(op))
void POSE_OT_select_flip_active(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Flip Selected Active Bone";
- ot->idname= "POSE_OT_select_flip_active";
- ot->description= "Activate the bone with a flipped name";
+ ot->name = "Flip Selected Active Bone";
+ ot->idname = "POSE_OT_select_flip_active";
+ ot->description = "Activate the bone with a flipped name";
/* api callbacks */
- ot->exec= pose_bone_flip_active_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_bone_flip_active_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -876,7 +876,7 @@ static void pose_copy_menu(Scene *scene)
BLI_duplicatelist(&const_copy, &(pchanact->constraints));
/* build the puplist of constraints */
- for (con = pchanact->constraints.first, i=0; con; con=con->next, i++){
+ for (con = pchanact->constraints.first, i=0; con; con=con->next, i++) {
const_toggle[i]= 1;
// add_numbut(i, TOG|INT, con->name, 0, 0, &(const_toggle[i]), "");
}
@@ -946,7 +946,7 @@ void free_posebuf(void)
bPoseChannel *pchan;
for (pchan= g_posebuf->chanbase.first; pchan; pchan= pchan->next) {
- if(pchan->prop) {
+ if (pchan->prop) {
IDP_FreeProperty(pchan->prop);
MEM_freeN(pchan->prop);
}
@@ -968,8 +968,8 @@ static void set_pose_keys (Object *ob)
bArmature *arm= ob->data;
bPoseChannel *chan;
- if (ob->pose){
- for (chan=ob->pose->chanbase.first; chan; chan=chan->next){
+ if (ob->pose) {
+ for (chan=ob->pose->chanbase.first; chan; chan=chan->next) {
Bone *bone= chan->bone;
if ((bone) && (bone->flag & BONE_SELECTED) && (arm->layer & bone->layer))
chan->flag |= POSE_KEY;
@@ -1129,16 +1129,16 @@ static int pose_copy_exec (bContext *C, wmOperator *op)
void POSE_OT_copy (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Pose";
- ot->idname= "POSE_OT_copy";
- ot->description= "Copies the current pose of the selected bones to copy/paste buffer";
+ ot->name = "Copy Pose";
+ ot->idname = "POSE_OT_copy";
+ ot->description = "Copies the current pose of the selected bones to copy/paste buffer";
/* api callbacks */
- ot->exec= pose_copy_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_copy_exec;
+ ot->poll = ED_operator_posemode;
/* flag */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
}
/* ---- */
@@ -1196,16 +1196,16 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
void POSE_OT_paste (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Paste Pose";
- ot->idname= "POSE_OT_paste";
- ot->description= "Paste the stored pose on to the current pose";
+ ot->name = "Paste Pose";
+ ot->idname = "POSE_OT_paste";
+ ot->description = "Paste the stored pose on to the current pose";
/* api callbacks */
- ot->exec= pose_paste_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_paste_exec;
+ ot->poll = ED_operator_posemode;
/* flag */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "flipped", FALSE, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose");
@@ -1242,13 +1242,13 @@ static int pose_group_add_exec (bContext *C, wmOperator *UNUSED(op))
void POSE_OT_group_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Bone Group";
- ot->idname= "POSE_OT_group_add";
- ot->description= "Add a new bone group";
+ ot->name = "Add Bone Group";
+ ot->idname = "POSE_OT_group_add";
+ ot->description = "Add a new bone group";
/* api callbacks */
- ot->exec= pose_group_add_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_group_add_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1282,13 +1282,13 @@ static int pose_group_remove_exec (bContext *C, wmOperator *UNUSED(op))
void POSE_OT_group_remove (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Bone Group";
- ot->idname= "POSE_OT_group_remove";
- ot->description= "Removes the active bone group";
+ ot->name = "Remove Bone Group";
+ ot->idname = "POSE_OT_group_remove";
+ ot->description = "Removes the active bone group";
/* api callbacks */
- ot->exec= pose_group_remove_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_group_remove_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1397,14 +1397,14 @@ static int pose_group_assign_exec (bContext *C, wmOperator *op)
void POSE_OT_group_assign (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Selected to Bone Group";
- ot->idname= "POSE_OT_group_assign";
- ot->description= "Add selected bones to the chosen bone group";
+ ot->name = "Add Selected to Bone Group";
+ ot->idname = "POSE_OT_group_assign";
+ ot->description = "Add selected bones to the chosen bone group";
/* api callbacks */
- ot->invoke= pose_groups_menu_invoke;
- ot->exec= pose_group_assign_exec;
- ot->poll= ED_operator_posemode;
+ ot->invoke = pose_groups_menu_invoke;
+ ot->exec = pose_group_assign_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1453,13 +1453,13 @@ static int pose_group_unassign_exec (bContext *C, wmOperator *UNUSED(op))
void POSE_OT_group_unassign (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Selected from Bone Groups";
- ot->idname= "POSE_OT_group_unassign";
- ot->description= "Remove selected bones from all bone groups";
+ ot->name = "Remove Selected from Bone Groups";
+ ot->idname = "POSE_OT_group_unassign";
+ ot->description = "Remove selected bones from all bone groups";
/* api callbacks */
- ot->exec= pose_group_unassign_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_group_unassign_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1534,16 +1534,16 @@ void POSE_OT_group_move(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Move Bone Group";
- ot->idname= "POSE_OT_group_move";
- ot->description= "Change position of active Bone Group in list of Bone Groups";
+ ot->name = "Move Bone Group";
+ ot->idname = "POSE_OT_group_move";
+ ot->description = "Change position of active Bone Group in list of Bone Groups";
/* api callbacks */
- ot->exec= group_move_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = group_move_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "direction", group_slot_move, 0, "Direction", "Direction to move, UP or DOWN");
}
@@ -1618,16 +1618,16 @@ static int group_sort_exec(bContext *C, wmOperator *UNUSED(op))
void POSE_OT_group_sort(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Sort Bone Groups";
- ot->idname= "POSE_OT_group_sort";
- ot->description= "Sort Bone Groups by their names in ascending order";
+ ot->name = "Sort Bone Groups";
+ ot->idname = "POSE_OT_group_sort";
+ ot->description = "Sort Bone Groups by their names in ascending order";
/* api callbacks */
- ot->exec= group_sort_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = group_sort_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static void pose_group_select(bContext *C, Object *ob, int select)
@@ -1676,13 +1676,13 @@ static int pose_group_select_exec (bContext *C, wmOperator *UNUSED(op))
void POSE_OT_group_select (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Bones of Bone Group";
- ot->idname= "POSE_OT_group_select";
- ot->description= "Select bones in active Bone Group";
+ ot->name = "Select Bones of Bone Group";
+ ot->idname = "POSE_OT_group_select";
+ ot->description = "Select bones in active Bone Group";
/* api callbacks */
- ot->exec= pose_group_select_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_group_select_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1714,13 +1714,13 @@ static int pose_group_deselect_exec (bContext *C, wmOperator *UNUSED(op))
void POSE_OT_group_deselect (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Deselect Bone Group";
- ot->idname= "POSE_OT_group_deselect";
- ot->description= "Deselect bones of active Bone Group";
+ ot->name = "Deselect Bone Group";
+ ot->idname = "POSE_OT_group_deselect";
+ ot->description = "Deselect bones of active Bone Group";
/* api callbacks */
- ot->exec= pose_group_deselect_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_group_deselect_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1759,16 +1759,16 @@ static int pose_flip_names_exec (bContext *C, wmOperator *UNUSED(op))
void POSE_OT_flip_names (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Flip Names";
- ot->idname= "POSE_OT_flip_names";
- ot->description= "Flips (and corrects) the axis suffixes of the the names of selected bones";
+ ot->name = "Flip Names";
+ ot->idname = "POSE_OT_flip_names";
+ ot->description = "Flips (and corrects) the axis suffixes of the the names of selected bones";
/* api callbacks */
- ot->exec= pose_flip_names_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_flip_names_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ------------------ */
@@ -1789,7 +1789,7 @@ static int pose_autoside_names_exec (bContext *C, wmOperator *op)
CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
{
BLI_strncpy(newname, pchan->name, sizeof(newname));
- if(bone_autoside_name(newname, 1, axis, pchan->bone->head[axis], pchan->bone->tail[axis]))
+ if (bone_autoside_name(newname, 1, axis, pchan->bone->head[axis], pchan->bone->tail[axis]))
ED_armature_bone_rename(arm, pchan->name, newname);
}
CTX_DATA_END;
@@ -1812,20 +1812,20 @@ void POSE_OT_autoside_names (wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "AutoName by Axis";
- ot->idname= "POSE_OT_autoside_names";
- ot->description= "Automatically renames the selected bones according to which side of the target axis they fall on";
+ ot->name = "AutoName by Axis";
+ ot->idname = "POSE_OT_autoside_names";
+ ot->description = "Automatically renames the selected bones according to which side of the target axis they fall on";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= pose_autoside_names_exec;
- ot->poll= ED_operator_posemode;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = pose_autoside_names_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* settings */
- ot->prop= RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Axis tag names with");
+ ot->prop = RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Axis tag names with");
}
/* ********************************************** */
@@ -1852,20 +1852,20 @@ static int pose_bone_rotmode_exec (bContext *C, wmOperator *op)
void POSE_OT_rotation_mode_set (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Rotation Mode";
- ot->idname= "POSE_OT_rotation_mode_set";
- ot->description= "Set the rotation representation used by selected bones";
+ ot->name = "Set Rotation Mode";
+ ot->idname = "POSE_OT_rotation_mode_set";
+ ot->description = "Set the rotation representation used by selected bones";
/* callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= pose_bone_rotmode_exec;
- ot->poll= ED_operator_posemode;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = pose_bone_rotmode_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", posebone_rotmode_items, 0, "Rotation Mode", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", posebone_rotmode_items, 0, "Rotation Mode", "");
}
/* ********************************************** */
@@ -1911,16 +1911,16 @@ static int pose_armature_layers_showall_exec (bContext *C, wmOperator *op)
void ARMATURE_OT_layers_show_all (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Show All Layers";
- ot->idname= "ARMATURE_OT_layers_show_all";
- ot->description= "Make all armature layers visible";
+ ot->name = "Show All Layers";
+ ot->idname = "ARMATURE_OT_layers_show_all";
+ ot->description = "Make all armature layers visible";
/* callbacks */
- ot->exec= pose_armature_layers_showall_exec;
- ot->poll= pose_armature_layers_showall_poll;
+ ot->exec = pose_armature_layers_showall_exec;
+ ot->poll = pose_armature_layers_showall_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All Layers", "Enable all layers or just the first 16 (top row)");
@@ -1977,17 +1977,17 @@ static int pose_armature_layers_exec (bContext *C, wmOperator *op)
void POSE_OT_armature_layers (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Change Armature Layers";
- ot->idname= "POSE_OT_armature_layers";
- ot->description= "Change the visible armature layers";
+ ot->name = "Change Armature Layers";
+ ot->idname = "POSE_OT_armature_layers";
+ ot->description = "Change the visible armature layers";
/* callbacks */
- ot->invoke= pose_armature_layers_invoke;
- ot->exec= pose_armature_layers_exec;
- ot->poll= ED_operator_posemode;
+ ot->invoke = pose_armature_layers_invoke;
+ ot->exec = pose_armature_layers_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers to make visible");
@@ -1996,17 +1996,17 @@ void POSE_OT_armature_layers (wmOperatorType *ot)
void ARMATURE_OT_armature_layers (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Change Armature Layers";
- ot->idname= "ARMATURE_OT_armature_layers";
- ot->description= "Change the visible armature layers";
+ ot->name = "Change Armature Layers";
+ ot->idname = "ARMATURE_OT_armature_layers";
+ ot->description = "Change the visible armature layers";
/* callbacks */
- ot->invoke= pose_armature_layers_invoke;
- ot->exec= pose_armature_layers_exec;
- ot->poll= ED_operator_editarmature;
+ ot->invoke = pose_armature_layers_invoke;
+ ot->exec = pose_armature_layers_exec;
+ ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers to make visible");
@@ -2046,7 +2046,7 @@ static int pose_bone_layers_exec (bContext *C, wmOperator *op)
PointerRNA ptr;
int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
- if(ob==NULL || ob->data==NULL) {
+ if (ob==NULL || ob->data==NULL) {
return OPERATOR_CANCELLED;
}
@@ -2071,17 +2071,17 @@ static int pose_bone_layers_exec (bContext *C, wmOperator *op)
void POSE_OT_bone_layers (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Change Bone Layers";
- ot->idname= "POSE_OT_bone_layers";
- ot->description= "Change the layers that the selected bones belong to";
+ ot->name = "Change Bone Layers";
+ ot->idname = "POSE_OT_bone_layers";
+ ot->description = "Change the layers that the selected bones belong to";
/* callbacks */
- ot->invoke= pose_bone_layers_invoke;
- ot->exec= pose_bone_layers_exec;
- ot->poll= ED_operator_posemode;
+ ot->invoke = pose_bone_layers_invoke;
+ ot->exec = pose_bone_layers_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers that bone belongs to");
@@ -2143,17 +2143,17 @@ static int armature_bone_layers_exec (bContext *C, wmOperator *op)
void ARMATURE_OT_bone_layers (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Change Bone Layers";
- ot->idname= "ARMATURE_OT_bone_layers";
- ot->description= "Change the layers that the selected bones belong to";
+ ot->name = "Change Bone Layers";
+ ot->idname = "ARMATURE_OT_bone_layers";
+ ot->description = "Change the layers that the selected bones belong to";
/* callbacks */
- ot->invoke= armature_bone_layers_invoke;
- ot->exec= armature_bone_layers_exec;
- ot->poll= ED_operator_editarmature;
+ ot->invoke = armature_bone_layers_invoke;
+ ot->exec = armature_bone_layers_exec;
+ ot->poll = ED_operator_editarmature;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean_layer_member(ot->srna, "layers", 32, NULL, "Layer", "Armature layers that bone belongs to");
@@ -2192,15 +2192,15 @@ void POSE_OT_quaternions_flip (wmOperatorType *ot)
{
/* identifiers */
ot->name = "Flip Quats";
- ot->idname= "POSE_OT_quaternions_flip";
- ot->description= "Flip quaternion values to achieve desired rotations, while maintaining the same orientations";
+ ot->idname = "POSE_OT_quaternions_flip";
+ ot->description = "Flip quaternion values to achieve desired rotations, while maintaining the same orientations";
/* callbacks */
- ot->exec= pose_flip_quats_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_flip_quats_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ********************************************** */
@@ -2268,14 +2268,14 @@ void POSE_OT_user_transforms_clear (wmOperatorType *ot)
{
/* identifiers */
ot->name = "Clear User Transforms";
- ot->idname= "POSE_OT_user_transforms_clear";
- ot->description= "Reset pose on selected bones to keyframed state";
+ ot->idname = "POSE_OT_user_transforms_clear";
+ ot->description = "Reset pose on selected bones to keyframed state";
/* callbacks */
- ot->exec= pose_clear_user_transforms_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_clear_user_transforms_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index 97113109981..30f929c9603 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -115,6 +115,7 @@ void flipArcBuckets(ReebArc *arc);
/***************************************** UTILS **********************************************/
+#if 0 /* UNUSED */
static VertexData *allocVertexData(EditMesh *em)
{
VertexData *data;
@@ -125,7 +126,7 @@ static VertexData *allocVertexData(EditMesh *em)
data = MEM_callocN(sizeof(VertexData) * totvert, "VertexData");
- for(index = 0, eve = em->verts.first; eve; index++, eve = eve->next)
+ for (index = 0, eve = em->verts.first; eve; index++, eve = eve->next)
{
data[index].i = index;
data[index].w = 0;
@@ -160,6 +161,8 @@ static void nodeSetData(EditVert *eve, ReebNode *n)
((VertexData*)eve->tmp.p)->n = n;
}
+#endif
+
void REEB_freeArc(BArc *barc)
{
ReebArc *arc = (ReebArc*)barc;
@@ -180,7 +183,7 @@ void REEB_freeGraph(ReebGraph *rg)
ReebNode *node;
// free nodes
- for( node = rg->nodes.first; node; node = node->next )
+ for ( node = rg->nodes.first; node; node = node->next )
{
BLI_freeNode((BGraph*)rg, (BNode*)node);
}
@@ -188,7 +191,7 @@ void REEB_freeGraph(ReebGraph *rg)
// free arcs
arc = rg->arcs.first;
- while( arc )
+ while ( arc )
{
ReebArc *next = arc->next;
REEB_freeArc((BArc*)arc);
@@ -232,6 +235,7 @@ void BIF_flagMultiArcs(ReebGraph *rg, int flag)
}
}
+#if 0 /* UNUSED */
static ReebNode * addNode(ReebGraph *rg, EditVert *eve)
{
float weight;
@@ -300,6 +304,7 @@ static void relinkNodes(ReebGraph *low_rg, ReebGraph *high_rg)
}
}
}
+#endif
ReebNode *BIF_otherNodeFromIndex(ReebArc *arc, ReebNode *node)
{
@@ -321,6 +326,7 @@ ReebNode *BIF_lowestLevelNode(ReebNode *node)
return node;
}
+#if 0 /* UNUSED */
static ReebArc * copyArc(ReebGraph *rg, ReebArc *arc)
{
ReebArc *cp_arc;
@@ -395,12 +401,13 @@ static ReebGraph * copyReebGraph(ReebGraph *rg, int level)
return cp_rg;
}
+#endif
ReebGraph *BIF_graphForMultiNode(ReebGraph *rg, ReebNode *node)
{
ReebGraph *multi_rg = rg;
- while(multi_rg && multi_rg->multi_level != node->multi_level)
+ while (multi_rg && multi_rg->multi_level != node->multi_level)
{
multi_rg = multi_rg->link_up;
}
@@ -408,6 +415,7 @@ ReebGraph *BIF_graphForMultiNode(ReebGraph *rg, ReebNode *node)
return multi_rg;
}
+#if 0 /* UNUSED */
static ReebEdge * copyEdge(ReebEdge *edge)
{
ReebEdge *newEdge = NULL;
@@ -428,7 +436,7 @@ static void printArc(ReebArc *arc)
ReebNode *tail = (ReebNode*)arc->tail;
printf("arc: (%i) %f -> (%i) %f\n", head->index, head->weight, tail->index, tail->weight);
- for(edge = arc->edges.first; edge ; edge = edge->next)
+ for (edge = arc->edges.first; edge ; edge = edge->next)
{
printf("\tedge (%i, %i)\n", edge->v1->index, edge->v2->index);
}
@@ -476,12 +484,12 @@ void repositionNodes(ReebGraph *rg)
BNode *node = NULL;
// Reset node positions
- for(node = rg->nodes.first; node; node = node->next)
+ for (node = rg->nodes.first; node; node = node->next)
{
node->p[0] = node->p[1] = node->p[2] = 0;
}
- for(arc = rg->arcs.first; arc; arc = arc->next)
+ for (arc = rg->arcs.first; arc; arc = arc->next)
{
if (((ReebArc*)arc)->bcount > 0)
{
@@ -504,10 +512,10 @@ void verifyNodeDegree(ReebGraph *rg)
ReebNode *node = NULL;
ReebArc *arc = NULL;
- for(node = rg->nodes.first; node; node = node->next)
+ for (node = rg->nodes.first; node; node = node->next)
{
int count = 0;
- for(arc = rg->arcs.first; arc; arc = arc->next)
+ for (arc = rg->arcs.first; arc; arc = arc->next)
{
if (arc->head == node || arc->tail == node)
{
@@ -534,7 +542,7 @@ static void verifyBucketsArc(ReebGraph *UNUSED(rg), ReebArc *arc)
if (arc->bcount > 0)
{
int i;
- for(i = 0; i < arc->bcount; i++)
+ for (i = 0; i < arc->bcount; i++)
{
if (arc->buckets[i].nv == 0)
{
@@ -560,7 +568,7 @@ void verifyBuckets(ReebGraph *rg)
{
#ifdef DEBUG_REEB
ReebArc *arc = NULL;
- for(arc = rg->arcs.first; arc; arc = arc->next)
+ for (arc = rg->arcs.first; arc; arc = arc->next)
{
verifyBucketsArc(rg, arc);
}
@@ -572,7 +580,7 @@ void verifyFaces(ReebGraph *rg)
#ifdef DEBUG_REEB
int total = 0;
ReebArc *arc = NULL;
- for(arc = rg->arcs.first; arc; arc = arc->next)
+ for (arc = rg->arcs.first; arc; arc = arc->next)
{
total += BLI_ghash_size(arc->faces);
}
@@ -659,17 +667,17 @@ static void mergeArcBuckets(ReebArc *aDst, ReebArc *aSrc, float start, float end
start = MAX3(start, aDst->buckets[0].val, aSrc->buckets[0].val);
- while(indexDst < aDst->bcount && aDst->buckets[indexDst].val < start)
+ while (indexDst < aDst->bcount && aDst->buckets[indexDst].val < start)
{
indexDst++;
}
- while(indexSrc < aSrc->bcount && aSrc->buckets[indexSrc].val < start)
+ while (indexSrc < aSrc->bcount && aSrc->buckets[indexSrc].val < start)
{
indexSrc++;
}
- for( ; indexDst < aDst->bcount &&
+ for ( ; indexDst < aDst->bcount &&
indexSrc < aSrc->bcount &&
aDst->buckets[indexDst].val <= end &&
aSrc->buckets[indexSrc].val <= end
@@ -710,7 +718,7 @@ static void allocArcBuckets(ReebArc *arc)
{
arc->buckets = MEM_callocN(sizeof(EmbedBucket) * arc->bcount, "embed bucket");
- for(i = 0; i < arc->bcount; i++)
+ for (i = 0; i < arc->bcount; i++)
{
arc->buckets[i].val = start + i;
}
@@ -771,7 +779,7 @@ static void reweightBuckets(ReebArc *arc)
if (arc->bcount > 0)
{
- for(i = 0; i < arc->bcount; i++)
+ for (i = 0; i < arc->bcount; i++)
{
arc->buckets[i].val = start + i;
}
@@ -802,7 +810,7 @@ static void fillArcEmptyBuckets(ReebArc *arc)
start_p = arc->head->p;
- for(i = 0; i < arc->bcount; i++)
+ for (i = 0; i < arc->bcount; i++)
{
EmbedBucket *bucket = arc->buckets + i;
@@ -954,6 +962,7 @@ static void calculateGraphLength(ReebGraph *rg)
calculateArcLength(arc);
}
}
+#endif
/**************************************** SYMMETRY HANDLING ******************************************/
@@ -1004,12 +1013,12 @@ void REEB_RadialSymmetry(BNode* root_node, RadialArc* ring, int count)
bucket2 = IT_next(iter2);
/* Make sure they both start at the same value */
- while(bucket1 && bucket2 && bucket1->val < bucket2->val)
+ while (bucket1 && bucket2 && bucket1->val < bucket2->val)
{
bucket1 = IT_next(iter1);
}
- while(bucket1 && bucket2 && bucket2->val < bucket1->val)
+ while (bucket1 && bucket2 && bucket2->val < bucket1->val)
{
bucket2 = IT_next(iter2);
}
@@ -1066,12 +1075,12 @@ void REEB_RadialSymmetry(BNode* root_node, RadialArc* ring, int count)
bucket2 = IT_next(iter2);
/* Make sure they both start at the same value */
- while(bucket1 && bucket1->val < bucket2->val)
+ while (bucket1 && bucket1->val < bucket2->val)
{
bucket1 = IT_next(iter1);
}
- while(bucket2 && bucket2->val < bucket1->val)
+ while (bucket2 && bucket2->val < bucket1->val)
{
bucket2 = IT_next(iter2);
}
@@ -1127,12 +1136,12 @@ void REEB_AxialSymmetry(BNode* root_node, BNode* node1, BNode* node2, struct BAr
bucket2 = IT_next(iter2);
/* Make sure they both start at the same value */
- while(bucket1 && bucket1->val < bucket2->val)
+ while (bucket1 && bucket1->val < bucket2->val)
{
bucket1 = IT_next(iter1);
}
- while(bucket2 && bucket2->val < bucket1->val)
+ while (bucket2 && bucket2->val < bucket1->val)
{
bucket2 = IT_next(iter2);
}
@@ -1160,6 +1169,7 @@ void REEB_AxialSymmetry(BNode* root_node, BNode* node1, BNode* node2, struct BAr
/****************************************** SMOOTHING **************************************************/
+#if 0 /* UNUSED */
void postprocessGraph(ReebGraph *rg, char mode)
{
ReebArc *arc;
@@ -1184,13 +1194,13 @@ void postprocessGraph(ReebGraph *rg, char mode)
return;
}
- for(arc = rg->arcs.first; arc; arc = arc->next)
+ for (arc = rg->arcs.first; arc; arc = arc->next)
{
EmbedBucket *buckets = arc->buckets;
int bcount = arc->bcount;
int index;
- for(index = 1; index < bcount - 1; index++)
+ for (index = 1; index < bcount - 1; index++)
{
interp_v3_v3v3(buckets[index].p, buckets[index].p, buckets[index - 1].p, fac1 / (fac1 + fac2));
interp_v3_v3v3(buckets[index].p, buckets[index].p, buckets[index + 1].p, fac3 / (fac1 + fac2 + fac3));
@@ -1501,7 +1511,7 @@ static void filterArc(ReebGraph *rg, ReebNode *newNode, ReebNode *removedNode, R
if (merging)
{
/* first pass, merge buckets for arcs that spawned the two nodes into the source arc*/
- for(arc = rg->arcs.first; arc; arc = arc->next)
+ for (arc = rg->arcs.first; arc; arc = arc->next)
{
if (arc->head == srcArc->head && arc->tail == srcArc->tail && arc != srcArc)
{
@@ -1514,7 +1524,7 @@ static void filterArc(ReebGraph *rg, ReebNode *newNode, ReebNode *removedNode, R
/* second pass, replace removedNode by newNode, remove arcs that are collapsed in a loop */
arc = rg->arcs.first;
- while(arc)
+ while (arc)
{
nextArc = arc->next;
@@ -1577,7 +1587,7 @@ void filterNullReebGraph(ReebGraph *rg)
ReebArc *arc = NULL, *nextArc = NULL;
arc = rg->arcs.first;
- while(arc)
+ while (arc)
{
nextArc = arc->next;
// Only collapse arcs too short to have any embed bucket
@@ -1739,14 +1749,14 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
#ifdef DEBUG_REEB
{
EditFace *efa;
- for(efa=G.editMesh->faces.first; efa; efa=efa->next) {
+ for (efa=G.editMesh->faces.first; efa; efa=efa->next) {
efa->tmp.fp = -1;
}
}
#endif
arc = rg->arcs.first;
- while(arc)
+ while (arc)
{
nextArc = arc->next;
@@ -1762,7 +1772,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
float avg_angle = 0;
float avg_vec[3] = {0,0,0};
- for(BLI_ghashIterator_init(&ghi, arc->faces);
+ for (BLI_ghashIterator_init(&ghi, arc->faces);
!BLI_ghashIterator_isDone(&ghi);
BLI_ghashIterator_step(&ghi))
{
@@ -1953,7 +1963,7 @@ static void finalizeGraph(ReebGraph *rg, char passes, char method)
sortArcs(rg);
- for(i = 0; i < passes; i++)
+ for (i = 0; i < passes; i++)
{
postprocessGraph(rg, method);
}
@@ -1991,17 +2001,17 @@ static void spreadWeight(EditMesh *em)
verts = MEM_callocN(sizeof(EditVert*) * totvert, "verts array");
- for(eve = em->verts.first, i = 0; eve; eve = eve->next, i++)
+ for (eve = em->verts.first, i = 0; eve; eve = eve->next, i++)
{
verts[i] = eve;
}
- while(work_needed == 1)
+ while (work_needed == 1)
{
work_needed = 0;
qsort(verts, totvert, sizeof(EditVert*), compareVerts);
- for(i = 0; i < totvert; i++)
+ for (i = 0; i < totvert; i++)
{
eve = verts[i];
@@ -2041,16 +2051,16 @@ void REEB_exportGraph(ReebGraph *rg, int count)
else {
sprintf(filename, "test%05i.txt", count);
}
- f = fopen(filename, "w");
+ f = BLI_fopen(filename, "w");
- for(arc = rg->arcs.first; arc; arc = arc->next)
+ for (arc = rg->arcs.first; arc; arc = arc->next)
{
int i;
float p[3];
exportNode(f, "v1", arc->head);
- for(i = 0; i < arc->bcount; i++)
+ for (i = 0; i < arc->bcount; i++)
{
fprintf(f, "b nv:%i %f %f %f\n", arc->buckets[i].nv, arc->buckets[i].p[0], arc->buckets[i].p[1], arc->buckets[i].p[2]);
}
@@ -2088,7 +2098,7 @@ void removeNormalNodes(ReebGraph *rg)
ReebArc *arc, *nextArc;
// Merge degree 2 nodes
- for(arc = rg->arcs.first; arc; arc = nextArc)
+ for (arc = rg->arcs.first; arc; arc = nextArc)
{
nextArc = arc->next;
@@ -2166,7 +2176,7 @@ static ReebArc *nextArcMappedToEdge(ReebArc *arc, ReebEdge *e)
ReebArc *result = NULL;
/* Find the ReebEdge in the edge list */
- for(edge = arc->edges.first; edge && !edgeEquals(edge, e); edge = edge->next)
+ for (edge = arc->edges.first; edge && !edgeEquals(edge, e); edge = edge->next)
{ }
nextEdge = edge->nextEdge;
@@ -2188,7 +2198,7 @@ void mergeArcFaces(ReebGraph *UNUSED(rg), ReebArc *aDst, ReebArc *aSrc)
{
GHashIterator ghi;
- for(BLI_ghashIterator_init(&ghi, aSrc->faces);
+ for (BLI_ghashIterator_init(&ghi, aSrc->faces);
!BLI_ghashIterator_isDone(&ghi);
BLI_ghashIterator_step(&ghi))
{
@@ -2203,7 +2213,7 @@ void mergeArcEdges(ReebGraph *rg, ReebArc *aDst, ReebArc *aSrc, MergeDirection d
if (direction == MERGE_APPEND)
{
- for(e = aSrc->edges.first; e; e = e->next)
+ for (e = aSrc->edges.first; e; e = e->next)
{
e->arc = aDst; // Edge is stolen by new arc
}
@@ -2212,7 +2222,7 @@ void mergeArcEdges(ReebGraph *rg, ReebArc *aDst, ReebArc *aSrc, MergeDirection d
}
else
{
- for(e = aSrc->edges.first; e; e = e->next)
+ for (e = aSrc->edges.first; e; e = e->next)
{
ReebEdge *newEdge = copyEdge(e);
@@ -2236,7 +2246,7 @@ void mergeArcEdges(ReebGraph *rg, ReebArc *aDst, ReebArc *aSrc, MergeDirection d
{
ReebEdge *previous = (ReebEdge*)*p;
- while(previous->nextEdge != e)
+ while (previous->nextEdge != e)
{
previous = previous->nextEdge;
}
@@ -2487,7 +2497,7 @@ static ReebEdge * createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2)
addVertToBucket(&(arc->buckets[arc->bcount - 1]), arc->tail->co);
}
#else
- for(i = 0; i < arc->bcount; i++)
+ for (i = 0; i < arc->bcount; i++)
{
float co[3];
float f = (arc->buckets[i].val - offset) / len;
@@ -2585,7 +2595,7 @@ ReebGraph * generateReebGraph(EditMesh *em, int subdivisions)
renormalizeWeight(em, (float)rg->resolution);
/* Adding vertice */
- for(index = 0, eve = em->verts.first; eve; eve = eve->next)
+ for (index = 0, eve = em->verts.first; eve; eve = eve->next)
{
if (eve->h == 0)
{
@@ -2596,7 +2606,7 @@ ReebGraph * generateReebGraph(EditMesh *em, int subdivisions)
}
/* Adding face, edge per edge */
- for(efa = em->faces.first; efa; efa = efa->next)
+ for (efa = em->faces.first; efa; efa = efa->next)
{
if (efa->h == 0)
{
@@ -2646,7 +2656,7 @@ void renormalizeWeight(EditMesh *em, float newmax)
eve = em->verts.first;
minimum = weightData(eve);
maximum = minimum;
- for(; eve; eve = eve->next)
+ for (; eve; eve = eve->next)
{
maximum = MAX2(maximum, weightData(eve));
minimum = MIN2(minimum, weightData(eve));
@@ -2655,7 +2665,7 @@ void renormalizeWeight(EditMesh *em, float newmax)
range = maximum - minimum;
/* Normalize weights */
- for(eve = em->verts.first; eve; eve = eve->next)
+ for (eve = em->verts.first; eve; eve = eve->next)
{
float weight = (weightData(eve) - minimum) / range * newmax;
weightSetData(eve, weight);
@@ -2671,7 +2681,7 @@ int weightFromLoc(EditMesh *em, int axis)
return 0;
/* Copy coordinate in weight */
- for(eve = em->verts.first; eve; eve = eve->next)
+ for (eve = em->verts.first; eve; eve = eve->next)
{
weightSetData(eve, eve->co[axis]);
}
@@ -2735,7 +2745,7 @@ int weightToHarmonic(EditMesh *em, EdgeIndex *indexed_edges)
int rval;
/* Find local extrema */
- for(eve = em->verts.first; eve; eve = eve->next)
+ for (eve = em->verts.first; eve; eve = eve->next)
{
totvert++;
}
@@ -2749,7 +2759,7 @@ int weightToHarmonic(EditMesh *em, EdgeIndex *indexed_edges)
nlBegin(NL_SYSTEM);
/* Find local extrema */
- for(index = 0, eve = em->verts.first; eve; index++, eve = eve->next)
+ for (index = 0, eve = em->verts.first; eve; index++, eve = eve->next)
{
if (eve->h == 0)
{
@@ -2758,7 +2768,7 @@ int weightToHarmonic(EditMesh *em, EdgeIndex *indexed_edges)
int minimum = 1;
NextEdgeForVert(indexed_edges, -1); /* Reset next edge */
- for(eed = NextEdgeForVert(indexed_edges, index); eed && (maximum || minimum); eed = NextEdgeForVert(indexed_edges, index))
+ for (eed = NextEdgeForVert(indexed_edges, index); eed && (maximum || minimum); eed = NextEdgeForVert(indexed_edges, index))
{
EditVert *eve2;
@@ -2803,13 +2813,13 @@ int weightToHarmonic(EditMesh *em, EdgeIndex *indexed_edges)
nlBegin(NL_MATRIX);
/* Zero edge weight */
- for(eed = em->edges.first; eed; eed = eed->next)
+ for (eed = em->edges.first; eed; eed = eed->next)
{
eed->tmp.l = 0;
}
/* Add faces count to the edge weight */
- for(efa = em->faces.first; efa; efa = efa->next)
+ for (efa = em->faces.first; efa; efa = efa->next)
{
if (efa->h == 0)
{
@@ -2825,7 +2835,7 @@ int weightToHarmonic(EditMesh *em, EdgeIndex *indexed_edges)
}
/* Add faces angle to the edge weight */
- for(efa = em->faces.first; efa; efa = efa->next)
+ for (efa = em->faces.first; efa; efa = efa->next)
{
if (efa->h == 0)
{
@@ -2850,7 +2860,7 @@ int weightToHarmonic(EditMesh *em, EdgeIndex *indexed_edges)
if (success)
{
rval = 1;
- for(index = 0, eve = em->verts.first; eve; index++, eve = eve->next)
+ for (index = 0, eve = em->verts.first; eve; index++, eve = eve->next)
{
weightSetData(eve, nlGetVariable(0, index));
}
@@ -2906,7 +2916,7 @@ static void shortestPathsFromVert(EditMesh *em, EditVert *starting_vert, EdgeInd
BLI_heap_insert(edge_heap, FLT_MAX, NULL);
/* Initialize edge flag */
- for(eed= em->edges.first; eed; eed= eed->next)
+ for (eed= em->edges.first; eed; eed= eed->next)
{
eed->f1 = 0;
}
@@ -2919,7 +2929,7 @@ static void shortestPathsFromVert(EditMesh *em, EditVert *starting_vert, EdgeInd
/* Add all new edges connected to current_eve to the list */
NextEdgeForVert(indexed_edges, -1); // Reset next edge
- for(eed = NextEdgeForVert(indexed_edges, indexData(current_eve)); eed; eed = NextEdgeForVert(indexed_edges, indexData(current_eve)))
+ for (eed = NextEdgeForVert(indexed_edges, indexData(current_eve)); eed; eed = NextEdgeForVert(indexed_edges, indexData(current_eve)))
{
if (eed->f1 == 0)
{
@@ -2973,7 +2983,7 @@ static void buildIndexedEdges(EditMesh *em, EdgeIndex *indexed_edges)
indexed_edges->offset = MEM_callocN(totvert * sizeof(int), "EdgeIndex offset");
- for(eed = em->edges.first; eed; eed = eed->next)
+ for (eed = em->edges.first; eed; eed = eed->next)
{
if (eed->v1->h == 0 && eed->v2->h == 0)
{
@@ -2988,7 +2998,7 @@ static void buildIndexedEdges(EditMesh *em, EdgeIndex *indexed_edges)
indexed_edges->edges = MEM_callocN(tot_indexed * sizeof(EditEdge*), "EdgeIndex edges");
/* setting vert offsets */
- for(eve = em->verts.first; eve; eve = eve->next)
+ for (eve = em->verts.first; eve; eve = eve->next)
{
if (eve->h == 0)
{
@@ -2999,7 +3009,7 @@ static void buildIndexedEdges(EditMesh *em, EdgeIndex *indexed_edges)
}
/* adding edges in array */
- for(eed = em->edges.first; eed; eed= eed->next)
+ for (eed = em->edges.first; eed; eed= eed->next)
{
if (eed->v1->h == 0 && eed->v2->h == 0)
{
@@ -3047,7 +3057,7 @@ int weightFromDistance(EditMesh *em, EdgeIndex *indexed_edges)
}
/* Initialize vertice flag and find at least one selected vertex */
- for(eve = em->verts.first; eve; eve = eve->next)
+ for (eve = em->verts.first; eve; eve = eve->next)
{
eve->f1 = 0;
if (eve->f & SELECT)
@@ -3066,7 +3076,7 @@ int weightFromDistance(EditMesh *em, EdgeIndex *indexed_edges)
int allDone = 0;
/* Calculate edge weight */
- for(eed = em->edges.first; eed; eed= eed->next)
+ for (eed = em->edges.first; eed; eed= eed->next)
{
if (eed->v1->h == 0 && eed->v2->h == 0)
{
@@ -3075,7 +3085,7 @@ int weightFromDistance(EditMesh *em, EdgeIndex *indexed_edges)
}
/* Apply dijkstra spf for each selected vert */
- for(eve = em->verts.first; eve; eve = eve->next)
+ for (eve = em->verts.first; eve; eve = eve->next)
{
if (eve->f & SELECT)
{
@@ -3127,7 +3137,7 @@ int weightFromDistance(EditMesh *em, EdgeIndex *indexed_edges)
}
}
- for(eve = em->verts.first; eve && vCount == 0; eve = eve->next)
+ for (eve = em->verts.first; eve && vCount == 0; eve = eve->next)
{
if (eve->f1 == 0)
{
@@ -3138,6 +3148,7 @@ int weightFromDistance(EditMesh *em, EdgeIndex *indexed_edges)
return 1;
}
+#endif
/****************************************** BUCKET ITERATOR **************************************************/
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c
index b213f797d47..94ec7c7ce93 100644
--- a/source/blender/editors/curve/curve_ops.c
+++ b/source/blender/editors/curve/curve_ops.c
@@ -140,17 +140,17 @@ void ED_operatormacros_curve(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot= WM_operatortype_append_macro("CURVE_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("CURVE_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Duplicate curve and move";
WM_operatortype_macro_define(ot, "CURVE_OT_duplicate");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
- ot= WM_operatortype_append_macro("CURVE_OT_extrude_move", "Extrude Curve and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("CURVE_OT_extrude_move", "Extrude Curve and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Extrude curve and move result";
WM_operatortype_macro_define(ot, "CURVE_OT_extrude");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
}
@@ -160,8 +160,8 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
wmKeyMap *keymap;
wmKeyMapItem *kmi;
- keymap= WM_keymap_find(keyconf, "Font", 0, 0);
- keymap->poll= ED_operator_editfont;
+ keymap = WM_keymap_find(keyconf, "Font", 0, 0);
+ keymap->poll = ED_operator_editfont;
/* only set in editmode font, by space_view3d listener */
RNA_enum_set(WM_keymap_add_item(keymap, "FONT_OT_style_toggle", BKEY, KM_PRESS, KM_CTRL, 0)->ptr, "style", CU_CHINFO_BOLD);
@@ -214,8 +214,8 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
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);
- keymap->poll= ED_operator_editsurfcurve;
+ keymap = WM_keymap_find(keyconf, "Curve", 0, 0);
+ keymap->poll = ED_operator_editsurfcurve;
WM_keymap_add_menu(keymap, "INFO_MT_edit_curve_add", AKEY, KM_PRESS, KM_SHIFT, 0);
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index aa8dad08ac2..aeab4f27179 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -117,7 +117,7 @@ static float nurbcircle[8][2]= {
ListBase *object_editcurve_get(Object *ob)
{
- if(ob && ELEM(ob->type, OB_CURVE, OB_SURF)) {
+ if (ob && ELEM(ob->type, OB_CURVE, OB_SURF)) {
Curve *cu= ob->data;
return &cu->editnurb->nurbs;
}
@@ -129,7 +129,7 @@ static void set_actNurb(Object *obedit, Nurb *nu)
{
Curve *cu= obedit->data;
- if(nu==NULL)
+ if (nu==NULL)
cu->actnu = -1;
else {
ListBase *nurbs= curve_editnurbs(cu);
@@ -157,9 +157,9 @@ static Nurb *get_actNurb(Object *obedit)
/* returns 1 in case (de)selection was successful */
static short select_beztriple(BezTriple *bezt, short selstatus, short flag, short hidden)
{
- if(bezt) {
- if((bezt->hide==0) || (hidden==1)) {
- if(selstatus==1) { /* selects */
+ if (bezt) {
+ if ((bezt->hide==0) || (hidden==1)) {
+ if (selstatus==1) { /* selects */
bezt->f1 |= flag;
bezt->f2 |= flag;
bezt->f3 |= flag;
@@ -180,9 +180,9 @@ static short select_beztriple(BezTriple *bezt, short selstatus, short flag, shor
/* returns 1 in case (de)selection was successful */
static short select_bpoint(BPoint *bp, short selstatus, short flag, short hidden)
{
- if(bp) {
- if((bp->hide==0) || (hidden==1)) {
- if(selstatus==1) {
+ if (bp) {
+ if ((bp->hide==0) || (hidden==1)) {
+ if (selstatus==1) {
bp->f1 |= flag;
return 1;
}
@@ -198,7 +198,7 @@ static short select_bpoint(BPoint *bp, short selstatus, short flag, short hidden
static short swap_selection_beztriple(BezTriple *bezt)
{
- if(bezt->f2 & SELECT)
+ if (bezt->f2 & SELECT)
return select_beztriple(bezt, DESELECT, 1, VISIBLE);
else
return select_beztriple(bezt, SELECT, 1, VISIBLE);
@@ -206,7 +206,7 @@ static short swap_selection_beztriple(BezTriple *bezt)
static short swap_selection_bpoint(BPoint *bp)
{
- if(bp->f1 & SELECT)
+ if (bp->f1 & SELECT)
return select_bpoint(bp, DESELECT, 1, VISIBLE);
else
return select_bpoint(bp, SELECT, 1, VISIBLE);
@@ -218,19 +218,19 @@ int isNurbsel(Nurb *nu)
BPoint *bp;
int a;
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
- if( (bezt->f1 & SELECT) || (bezt->f2 & SELECT) || (bezt->f3 & SELECT) ) return 1;
+ while (a--) {
+ if ( (bezt->f1 & SELECT) || (bezt->f2 & SELECT) || (bezt->f3 & SELECT) ) return 1;
bezt++;
}
}
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
- if( (bp->f1 & SELECT) ) return 1;
+ while (a--) {
+ if ( (bp->f1 & SELECT) ) return 1;
bp++;
}
}
@@ -243,10 +243,10 @@ static int isNurbsel_count(Curve *cu, Nurb *nu)
BPoint *bp;
int a, sel=0;
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
+ while (a--) {
if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) sel++;
bezt++;
}
@@ -254,8 +254,8 @@ static int isNurbsel_count(Curve *cu, Nurb *nu)
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
- if( (bp->f1 & SELECT) ) sel++;
+ while (a--) {
+ if ( (bp->f1 & SELECT) ) sel++;
bp++;
}
}
@@ -270,15 +270,15 @@ void printknots(Object *obedit)
Nurb *nu;
int a, num;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(isNurbsel(nu) && nu->type == CU_NURBS) {
- if(nu->knotsu) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (isNurbsel(nu) && nu->type == CU_NURBS) {
+ if (nu->knotsu) {
num= KNOTSU(nu);
- for(a=0;a<num;a++) printf("knotu %d: %f\n", a, nu->knotsu[a]);
+ for (a=0;a<num;a++) printf("knotu %d: %f\n", a, nu->knotsu[a]);
}
- if(nu->knotsv) {
+ if (nu->knotsv) {
num= KNOTSV(nu);
- for(a=0;a<num;a++) printf("knotv %d: %f\n", a, nu->knotsv[a]);
+ for (a=0;a<num;a++) printf("knotv %d: %f\n", a, nu->knotsv[a]);
}
}
}
@@ -310,7 +310,7 @@ static void init_editNurb_keyIndex(EditNurb *editnurb, ListBase *origBase)
CVKeyIndex *keyIndex;
int a, key_index= 0, nu_index= 0, pt_index= 0;
- if(editnurb->keyindex) return;
+ if (editnurb->keyindex) return;
gh= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "editNurb keyIndex");
@@ -328,7 +328,8 @@ static void init_editNurb_keyIndex(EditNurb *editnurb, ListBase *origBase)
origbezt++;
pt_index++;
}
- } else {
+ }
+ else {
a= orignu->pntsu * orignu->pntsv;
bp= nu->bp;
origbp= orignu->bp;
@@ -424,7 +425,8 @@ static void keyIndex_delNurb(EditNurb *editnurb, Nurb *nu)
BLI_ghash_remove(editnurb->keyindex, bezt, NULL, (GHashValFreeFP)MEM_freeN);
++bezt;
}
- } else {
+ }
+ else {
BPoint *bp= nu->bp;
a= nu->pntsu * nu->pntsv;
@@ -487,7 +489,8 @@ static void keyIndex_updateNurb(EditNurb *editnurb, Nurb *nu, Nurb *newnu)
{
if (nu->bezt) {
keyIndex_updateBezt(editnurb, nu->bezt, newnu->bezt, newnu->pntsu);
- } else {
+ }
+ else {
keyIndex_updateBP(editnurb, nu->bp, newnu->bp, newnu->pntsu * newnu->pntsv);
}
}
@@ -500,8 +503,8 @@ static void keyIndex_swap(EditNurb *editnurb, void *a, void *b)
BLI_ghash_remove(editnurb->keyindex, a, NULL, NULL);
BLI_ghash_remove(editnurb->keyindex, b, NULL, NULL);
- if(index2) BLI_ghash_insert(editnurb->keyindex, a, index2);
- if(index1) BLI_ghash_insert(editnurb->keyindex, b, index1);
+ if (index2) BLI_ghash_insert(editnurb->keyindex, a, index2);
+ if (index1) BLI_ghash_insert(editnurb->keyindex, b, index1);
}
static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu)
@@ -525,18 +528,19 @@ static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu)
index1= getCVKeyIndex(editnurb, bezt1);
index2= getCVKeyIndex(editnurb, bezt2);
- if(index1) index1->switched= !index1->switched;
+ if (index1) index1->switched= !index1->switched;
if (bezt1 != bezt2) {
keyIndex_swap(editnurb, bezt1, bezt2);
- if(index2) index2->switched= !index2->switched;
+ if (index2) index2->switched= !index2->switched;
}
bezt1++;
bezt2--;
}
- } else {
+ }
+ else {
BPoint *bp1, *bp2;
if (nu->pntsv == 1) {
@@ -544,14 +548,14 @@ static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu)
bp1= nu->bp;
bp2= bp1+(a-1);
a/= 2;
- while(bp1!=bp2 && a>0) {
+ while (bp1!=bp2 && a>0) {
index1= getCVKeyIndex(editnurb, bp1);
index2= getCVKeyIndex(editnurb, bp2);
- if(index1) index1->switched= !index1->switched;
+ if (index1) index1->switched= !index1->switched;
if (bp1 != bp2) {
- if(index2) index2->switched= !index2->switched;
+ if (index2) index2->switched= !index2->switched;
keyIndex_swap(editnurb, bp1, bp2);
}
@@ -560,24 +564,25 @@ static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu)
bp1++;
bp2--;
}
- } else {
+ }
+ else {
int b;
- for(b=0; b<nu->pntsv; b++) {
+ for (b=0; b<nu->pntsv; b++) {
bp1= nu->bp+b*nu->pntsu;
a= nu->pntsu;
bp2= bp1+(a-1);
a/= 2;
- while(bp1!=bp2 && a>0) {
+ while (bp1!=bp2 && a>0) {
index1= getCVKeyIndex(editnurb, bp1);
index2= getCVKeyIndex(editnurb, bp2);
- if(index1) index1->switched= !index1->switched;
+ if (index1) index1->switched= !index1->switched;
if (bp1 != bp2) {
- if(index2) index2->switched= !index2->switched;
+ if (index2) index2->switched= !index2->switched;
keyIndex_swap(editnurb, bp1, bp2);
}
@@ -602,7 +607,7 @@ static void switch_keys_direction(Curve *cu, Nurb *actnu)
int a;
currkey = cu->key->block.first;
- while(currkey) {
+ while (currkey) {
fp= currkey->data;
nu= nubase->first;
@@ -612,26 +617,29 @@ static void switch_keys_direction(Curve *cu, Nurb *actnu)
a= nu->pntsu;
if (nu == actnu) {
while (a--) {
- if(getKeyIndexOrig_bezt(editnurb, bezt)) {
+ if (getKeyIndexOrig_bezt(editnurb, bezt)) {
swap_v3_v3(fp, fp + 6);
*(fp+9) = -*(fp+9);
fp += 12;
}
bezt++;
}
- } else fp += a * 12;
- } else {
+ }
+ else fp += a * 12;
+ }
+ else {
BPoint *bp= nu->bp;
a= nu->pntsu * nu->pntsv;
if (nu == actnu) {
while (a--) {
- if(getKeyIndexOrig_bp(editnurb, bp)) {
+ if (getKeyIndexOrig_bp(editnurb, bp)) {
*(fp+3) = -*(fp+3);
fp += 4;
}
bp++;
}
- } else fp += a * 4;
+ }
+ else fp += a * 4;
}
nu= nu->next;
@@ -651,7 +659,7 @@ static void keyData_switchDirectionNurb(Curve *cu, Nurb *nu)
}
keyIndex_switchDirection(editnurb, nu);
- if(cu->key)
+ if (cu->key)
switch_keys_direction(cu, nu);
}
@@ -662,7 +670,7 @@ static GHash *dupli_keyIndexHash(GHash *keyindex)
gh= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "dupli_keyIndex gh");
- for(hashIter = BLI_ghashIterator_new(keyindex);
+ for (hashIter = BLI_ghashIterator_new(keyindex);
!BLI_ghashIterator_isDone(hashIter);
BLI_ghashIterator_step(hashIter)) {
void *cv = BLI_ghashIterator_getKey(hashIter);
@@ -710,10 +718,11 @@ static void calc_keyHandles(ListBase *nurb, float *key)
a= nu->pntsu;
startfp= fp;
- if(nu->flagu & CU_NURB_CYCLIC) {
+ if (nu->flagu & CU_NURB_CYCLIC) {
prevp= bezt+(a-1);
prevfp= fp+(12 * (a-1));
- } else {
+ }
+ else {
prevp= NULL;
prevfp= NULL;
}
@@ -732,11 +741,12 @@ static void calc_keyHandles(ListBase *nurb, float *key)
prevp= bezt;
prevfp= fp;
- if(a==1) {
- if(nu->flagu & CU_NURB_CYCLIC) {
+ if (a==1) {
+ if (nu->flagu & CU_NURB_CYCLIC) {
nextp= nu->bezt;
nextfp= startfp;
- } else {
+ }
+ else {
nextp= NULL;
nextfp= NULL;
}
@@ -749,7 +759,8 @@ static void calc_keyHandles(ListBase *nurb, float *key)
++bezt;
fp += 12;
}
- } else {
+ }
+ else {
a= nu->pntsu * nu->pntsv;
fp += a * 4;
}
@@ -763,7 +774,7 @@ static void calc_shapeKeys(Object *obedit)
Curve *cu= (Curve*)obedit->data;
/* are there keys? */
- if(cu->key) {
+ if (cu->key) {
int a, i;
EditNurb *editnurb= cu->editnurb;
KeyBlock *currkey;
@@ -777,26 +788,27 @@ static void calc_shapeKeys(Object *obedit)
float *oldkey, *newkey, *ofp;
/* editing the base key should update others */
- if(cu->key->type==KEY_RELATIVE) {
+ if (cu->key->type==KEY_RELATIVE) {
int act_is_basis = 0;
/* find if this key is a basis for any others */
- for(currkey = cu->key->block.first; currkey; currkey= currkey->next) {
- if(editnurb->shapenr-1 == currkey->relative) {
+ for (currkey = cu->key->block.first; currkey; currkey= currkey->next) {
+ if (editnurb->shapenr-1 == currkey->relative) {
act_is_basis = 1;
break;
}
}
- if(act_is_basis) { /* active key is a base */
+ if (act_is_basis) { /* active key is a base */
int totvec= 0;
/* Calculate needed memory to store offset */
nu= editnurb->nurbs.first;
- while(nu) {
+ while (nu) {
if (nu->bezt) {
/* Three vects to store handles and one for alfa */
totvec+= nu->pntsu * 4;
- } else {
+ }
+ else {
totvec+= 2 * nu->pntsu * nu->pntsv;
}
@@ -806,11 +818,11 @@ static void calc_shapeKeys(Object *obedit)
ofs= MEM_callocN(sizeof(float) * 3 * totvec, "currkey->data");
nu= editnurb->nurbs.first;
i= 0;
- while(nu) {
- if(nu->bezt) {
+ while (nu) {
+ if (nu->bezt) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
+ while (a--) {
oldbezt= getKeyIndexOrig_bezt(editnurb, bezt);
if (oldbezt) {
@@ -820,7 +832,8 @@ static void calc_shapeKeys(Object *obedit)
i++;
}
ofs[i++][0]= bezt->alfa - oldbezt->alfa;
- } else {
+ }
+ else {
i += 4;
}
bezt++;
@@ -829,7 +842,7 @@ static void calc_shapeKeys(Object *obedit)
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
+ while (a--) {
oldbp= getKeyIndexOrig_bp(editnurb, bp);
if (oldbp) {
sub_v3_v3v3(ofs[i], bp->vec, oldbp->vec);
@@ -846,7 +859,7 @@ static void calc_shapeKeys(Object *obedit)
}
currkey = cu->key->block.first;
- while(currkey) {
+ while (currkey) {
int apply_offset = (ofs && (currkey != actkey) && (editnurb->shapenr-1 == currkey->relative));
float *fp= newkey= MEM_callocN(cu->key->elemsize * totvert, "currkey->data");
@@ -854,14 +867,14 @@ static void calc_shapeKeys(Object *obedit)
nu= editnurb->nurbs.first;
i = 0;
- while(nu) {
- if(currkey == actkey) {
+ while (nu) {
+ if (currkey == actkey) {
int restore= actkey != cu->key->refkey;
- if(nu->bezt) {
+ if (nu->bezt) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
+ while (a--) {
int j;
oldbezt= getKeyIndexOrig_bezt(editnurb, bezt);
@@ -876,7 +889,7 @@ static void calc_shapeKeys(Object *obedit)
}
fp[0]= bezt->alfa;
- if(restore && oldbezt) {
+ if (restore && oldbezt) {
bezt->alfa= oldbezt->alfa;
}
@@ -887,14 +900,14 @@ static void calc_shapeKeys(Object *obedit)
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
+ while (a--) {
oldbp= getKeyIndexOrig_bp(editnurb, bp);
copy_v3_v3(fp, bp->vec);
fp[3]= bp->alfa;
- if(restore && oldbp) {
+ if (restore && oldbp) {
copy_v3_v3(bp->vec, oldbp->vec);
bp->alfa= oldbp->alfa;
}
@@ -909,12 +922,12 @@ static void calc_shapeKeys(Object *obedit)
int index;
float *curofp;
- if(oldkey) {
- if(nu->bezt) {
+ if (oldkey) {
+ if (nu->bezt) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
+ while (a--) {
index= getKeyIndexOrig_keyIndex(editnurb, bezt);
if (index >= 0) {
int j;
@@ -923,7 +936,7 @@ static void calc_shapeKeys(Object *obedit)
for (j= 0; j < 3; ++j, ++i) {
copy_v3_v3(fp, curofp);
- if(apply_offset) {
+ if (apply_offset) {
add_v3_v3(fp, ofs[i]);
}
@@ -931,14 +944,15 @@ static void calc_shapeKeys(Object *obedit)
}
fp[0]= curofp[0];
- if(apply_offset) {
+ if (apply_offset) {
/* apply alfa offsets */
add_v3_v3(fp, ofs[i]);
++i;
}
fp+= 3; /* alphas */
- } else {
+ }
+ else {
int j;
for (j= 0; j < 3; ++j, ++i) {
copy_v3_v3(fp, bezt->vec[j]);
@@ -954,7 +968,7 @@ static void calc_shapeKeys(Object *obedit)
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
+ while (a--) {
index= getKeyIndexOrig_keyIndex(editnurb, bp);
if (index >= 0) {
@@ -962,11 +976,12 @@ static void calc_shapeKeys(Object *obedit)
copy_v3_v3(fp, curofp);
fp[3]= curofp[3];
- if(apply_offset) {
+ if (apply_offset) {
add_v3_v3(fp, ofs[i]);
fp[3]+=ofs[i+1][0];
}
- } else {
+ }
+ else {
copy_v3_v3(fp, bp->vec);
fp[3]= bp->alfa;
}
@@ -988,13 +1003,13 @@ static void calc_shapeKeys(Object *obedit)
}
currkey->totelem= totvert;
- if(currkey->data) MEM_freeN(currkey->data);
+ if (currkey->data) MEM_freeN(currkey->data);
currkey->data = newkey;
currkey= currkey->next;
}
- if(ofs) MEM_freeN(ofs);
+ if (ofs) MEM_freeN(ofs);
}
}
@@ -1016,7 +1031,7 @@ static void fcurve_path_rename(AnimData *ad, char *orig_rna_path, char *rna_path
fcu= orig_curves->first;
while (fcu) {
nextfcu= fcu->next;
- if(!strncmp(fcu->rna_path, orig_rna_path, len)) {
+ if (!strncmp(fcu->rna_path, orig_rna_path, len)) {
char *spath, *suffix= fcu->rna_path + len;
nfcu= copy_fcurve(fcu);
spath= nfcu->rna_path;
@@ -1042,7 +1057,7 @@ static void fcurve_path_rename(AnimData *ad, char *orig_rna_path, char *rna_path
static void fcurve_remove(AnimData *ad, ListBase *orig_curves, FCurve *fcu)
{
- if(orig_curves==&ad->drivers) BLI_remlink(&ad->drivers, fcu);
+ if (orig_curves==&ad->drivers) BLI_remlink(&ad->drivers, fcu);
else action_groups_remove_channel(ad->action, fcu);
free_fcurve(fcu);
@@ -1060,19 +1075,19 @@ static void curve_rename_fcurves(Object *obedit, ListBase *orig_curves)
ListBase curves= {NULL, NULL};
FCurve *fcu, *next;
- while(nu) {
- if(nu->bezt) {
+ while (nu) {
+ if (nu->bezt) {
BezTriple *bezt= nu->bezt;
a= nu->pntsu;
pt_index= 0;
while (a--) {
keyIndex= getCVKeyIndex(editnurb, bezt);
- if(keyIndex) {
+ if (keyIndex) {
BLI_snprintf(rna_path, sizeof(rna_path), "splines[%d].bezier_points[%d]", nu_index, pt_index);
BLI_snprintf(orig_rna_path, sizeof(orig_rna_path), "splines[%d].bezier_points[%d]", keyIndex->nu_index, keyIndex->pt_index);
- if(keyIndex->switched) {
+ if (keyIndex->switched) {
char handle_path[64], orig_handle_path[64];
BLI_snprintf(orig_handle_path, sizeof(orig_rna_path), "%s.handle_left", orig_rna_path);
BLI_snprintf(handle_path, sizeof(rna_path), "%s.handle_right", rna_path);
@@ -1092,14 +1107,15 @@ static void curve_rename_fcurves(Object *obedit, ListBase *orig_curves)
bezt++;
pt_index++;
}
- } else {
+ }
+ else {
BPoint *bp= nu->bp;
a= nu->pntsu * nu->pntsv;
pt_index= 0;
while (a--) {
keyIndex= getCVKeyIndex(editnurb, bp);
- if(keyIndex) {
+ if (keyIndex) {
BLI_snprintf(rna_path, sizeof(rna_path), "splines[%d].points[%d]", nu_index, pt_index);
BLI_snprintf(orig_rna_path, sizeof(orig_rna_path), "splines[%d].points[%d]", keyIndex->nu_index, keyIndex->pt_index);
fcurve_path_rename(ad, orig_rna_path, rna_path, orig_curves, &curves);
@@ -1119,10 +1135,10 @@ static void curve_rename_fcurves(Object *obedit, ListBase *orig_curves)
/* remove paths for removed control points
* need this to make further step with copying non-cv related curves copying
* not touching cv's f-curves */
- for(fcu= orig_curves->first; fcu; fcu= next) {
+ for (fcu= orig_curves->first; fcu; fcu= next) {
next= fcu->next;
- if(!strncmp(fcu->rna_path, "splines", 7)) {
+ if (!strncmp(fcu->rna_path, "splines", 7)) {
char *ch= strchr(fcu->rna_path, '.');
if (ch && (!strncmp(ch, ".bezier_points", 14) || !strncmp(ch, ".points", 7)))
@@ -1132,14 +1148,14 @@ static void curve_rename_fcurves(Object *obedit, ListBase *orig_curves)
nu_index= 0;
nu= editnurb->nurbs.first;
- while(nu) {
+ while (nu) {
keyIndex= NULL;
- if(nu->pntsu) {
- if(nu->bezt) keyIndex= getCVKeyIndex(editnurb, &nu->bezt[0]);
+ if (nu->pntsu) {
+ if (nu->bezt) keyIndex= getCVKeyIndex(editnurb, &nu->bezt[0]);
else keyIndex= getCVKeyIndex(editnurb, &nu->bp[0]);
}
- if(keyIndex) {
+ if (keyIndex) {
BLI_snprintf(rna_path, sizeof(rna_path), "splines[%d]", nu_index);
BLI_snprintf(orig_rna_path, sizeof(orig_rna_path), "splines[%d]", keyIndex->nu_index);
fcurve_path_rename(ad, orig_rna_path, rna_path, orig_curves, &curves);
@@ -1151,10 +1167,10 @@ static void curve_rename_fcurves(Object *obedit, ListBase *orig_curves)
/* the remainders in orig_curves can be copied back (like follow path) */
/* (if it's not path to spline) */
- for(fcu= orig_curves->first; fcu; fcu= next) {
+ for (fcu= orig_curves->first; fcu; fcu= next) {
next= fcu->next;
- if(!strncmp(fcu->rna_path, "splines", 7)) fcurve_remove(ad, orig_curves, fcu);
+ if (!strncmp(fcu->rna_path, "splines", 7)) fcurve_remove(ad, orig_curves, fcu);
else BLI_addtail(&curves, fcu);
}
@@ -1167,9 +1183,9 @@ int ED_curve_updateAnimPaths(Object *obedit)
Curve *cu= (Curve*)obedit->data;
AnimData *ad= BKE_animdata_from_id(&cu->id);
- if(!curve_is_animated(obedit)) return 0;
+ if (!curve_is_animated(obedit)) return 0;
- if(ad->action)
+ if (ad->action)
curve_rename_fcurves(obedit, &ad->action->curves);
curve_rename_fcurves(obedit, &ad->drivers);
@@ -1184,7 +1200,7 @@ void load_editNurb(Object *obedit)
{
ListBase *editnurb= object_editcurve_get(obedit);
- if(obedit==NULL) return;
+ if (obedit==NULL) return;
set_actNurb(obedit, NULL);
@@ -1193,11 +1209,11 @@ void load_editNurb(Object *obedit)
Nurb *nu, *newnu;
ListBase newnurb= {NULL, NULL}, oldnurb= cu->nurb;
- for(nu= editnurb->first; nu; nu= nu->next) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
newnu= duplicateNurb(nu);
BLI_addtail(&newnurb, newnu);
- if(nu->type == CU_NURBS) {
+ if (nu->type == CU_NURBS) {
clamp_nurb_order_u(nu);
}
}
@@ -1227,17 +1243,18 @@ void make_editNurb(Object *obedit)
if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
actkey= ob_get_keyblock(obedit);
- if(actkey) {
+ if (actkey) {
// XXX strcpy(G.editModeTitleExtra, "(Key) ");
undo_editmode_clear();
key_to_curve(actkey, cu, &cu->nurb);
}
- if(editnurb) {
+ if (editnurb) {
freeNurblist(&editnurb->nurbs);
free_curve_editNurb_keyIndex(editnurb);
editnurb->keyindex= NULL;
- } else {
+ }
+ else {
editnurb= MEM_callocN(sizeof(EditNurb), "editnurb");
cu->editnurb= editnurb;
}
@@ -1245,7 +1262,7 @@ void make_editNurb(Object *obedit)
nu= cu->nurb.first;
cu->lastsel= NULL; /* for select row */
- while(nu) {
+ while (nu) {
newnu= duplicateNurb(nu);
test2DNurb(newnu); // after join, or any other creation of curve
BLI_addtail(&editnurb->nurbs, newnu);
@@ -1258,7 +1275,7 @@ void make_editNurb(Object *obedit)
nu= nu->next;
}
- if(actkey)
+ if (actkey)
editnurb->shapenr= obedit->shapenr;
/* animation could be added in editmode even if there was no animdata i
@@ -1307,14 +1324,14 @@ void CU_select_swap(Object *obedit)
cu->lastsel= NULL;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
- if(bezt->hide==0) {
+ while (a--) {
+ if (bezt->hide==0) {
bezt->f2 ^= SELECT; /* always do the center point */
- if((cu->drawflag & CU_HIDE_HANDLES)==0) {
+ if ((cu->drawflag & CU_HIDE_HANDLES)==0) {
bezt->f1 ^= SELECT;
bezt->f3 ^= SELECT;
}
@@ -1325,7 +1342,7 @@ void CU_select_swap(Object *obedit)
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
+ while (a--) {
swap_selection_bpoint(bp);
bp++;
}
@@ -1351,7 +1368,7 @@ static int separate_exec(bContext *C, wmOperator *op)
oldcu= oldob->data;
oldedit= oldcu->editnurb;
- if(oldcu->key) {
+ if (oldcu->key) {
BKE_report(op->reports, RPT_ERROR, "Can't separate a curve with vertex keys");
return OPERATOR_CANCELLED;
}
@@ -1374,10 +1391,10 @@ static int separate_exec(bContext *C, wmOperator *op)
free_curve_editNurb_keyIndex(newedit);
/* 3. move over parts from old object */
- for(nu= oldedit->nurbs.first; nu; nu=nu1) {
+ for (nu= oldedit->nurbs.first; nu; nu=nu1) {
nu1= nu->next;
- if(isNurbsel(nu)) {
+ if (isNurbsel(nu)) {
BLI_remlink(&oldedit->nurbs, nu);
BLI_addtail(&newedit->nurbs, nu);
}
@@ -1400,15 +1417,15 @@ static int separate_exec(bContext *C, wmOperator *op)
void CURVE_OT_separate(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Separate";
- ot->idname= "CURVE_OT_separate";
+ ot->name = "Separate";
+ ot->idname = "CURVE_OT_separate";
/* api callbacks */
- ot->exec= separate_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = separate_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************* FLAGS ********************* */
@@ -1424,33 +1441,33 @@ static short isNurbselUV(Nurb *nu, int *u, int *v, int flag)
*u= *v= -1;
bp= nu->bp;
- for(b=0; b<nu->pntsv; b++) {
+ for (b=0; b<nu->pntsv; b++) {
sel= 0;
- for(a=0; a<nu->pntsu; a++, bp++) {
- if(bp->f1 & flag) sel++;
+ for (a=0; a<nu->pntsu; a++, bp++) {
+ if (bp->f1 & flag) sel++;
}
- if(sel==nu->pntsu) {
- if(*u== -1) *u= b;
+ if (sel==nu->pntsu) {
+ if (*u== -1) *u= b;
else return 0;
}
- else if(sel>1) return 0; /* because sel==1 is still ok */
+ else if (sel>1) return 0; /* because sel==1 is still ok */
}
- for(a=0; a<nu->pntsu; a++) {
+ for (a=0; a<nu->pntsu; a++) {
sel= 0;
bp= nu->bp+a;
- for(b=0; b<nu->pntsv; b++, bp+=nu->pntsu) {
- if(bp->f1 & flag) sel++;
+ for (b=0; b<nu->pntsv; b++, bp+=nu->pntsu) {
+ if (bp->f1 & flag) sel++;
}
- if(sel==nu->pntsv) {
- if(*v== -1) *v= a;
+ if (sel==nu->pntsv) {
+ if (*v== -1) *v= a;
else return 0;
}
- else if(sel>1) return 0;
+ else if (sel>1) return 0;
}
- if(*u==-1 && *v>-1) return 1;
- if(*v==-1 && *u>-1) return 1;
+ if (*u==-1 && *v>-1) return 1;
+ if (*v==-1 && *u>-1) return 1;
return 0;
}
@@ -1461,11 +1478,11 @@ static void setflagsNurb(ListBase *editnurb, short flag)
BPoint *bp;
int a;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
- while(a--) {
+ while (a--) {
bezt->f1= bezt->f2= bezt->f3= flag;
bezt++;
}
@@ -1473,7 +1490,7 @@ static void setflagsNurb(ListBase *editnurb, short flag)
else {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- while(a--) {
+ while (a--) {
bp->f1= flag;
bp++;
}
@@ -1488,13 +1505,13 @@ static void rotateflagNurb(ListBase *editnurb, short flag, float *cent, float ro
BPoint *bp;
int a;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_NURBS) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->type == CU_NURBS) {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
- if(bp->f1 & flag) {
+ while (a--) {
+ if (bp->f1 & flag) {
sub_v3_v3(bp->vec, cent);
mul_m3_v3(rotmat, bp->vec);
add_v3_v3(bp->vec, cent);
@@ -1513,22 +1530,22 @@ static void translateflagNurb(ListBase *editnurb, short flag, const float vec[3]
BPoint *bp;
int a;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
- while(a--) {
- if(bezt->f1 & flag) add_v3_v3(bezt->vec[0], vec);
- if(bezt->f2 & flag) add_v3_v3(bezt->vec[1], vec);
- if(bezt->f3 & flag) add_v3_v3(bezt->vec[2], vec);
+ while (a--) {
+ if (bezt->f1 & flag) add_v3_v3(bezt->vec[0], vec);
+ if (bezt->f2 & flag) add_v3_v3(bezt->vec[1], vec);
+ if (bezt->f3 & flag) add_v3_v3(bezt->vec[2], vec);
bezt++;
}
}
else {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- while(a--) {
- if(bp->f1 & flag) add_v3_v3(bp->vec, vec);
+ while (a--) {
+ if (bp->f1 & flag) add_v3_v3(bp->vec, vec);
bp++;
}
}
@@ -1543,12 +1560,12 @@ static void weightflagNurb(ListBase *editnurb, short flag, float w)
BPoint *bp;
int a;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_NURBS) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->type == CU_NURBS) {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- while(a--) {
- if(bp->f1 & flag) {
+ while (a--) {
+ if (bp->f1 & flag) {
/* a mode used to exist for replace/multiple but is was unused */
bp->vec[3]*= w;
}
@@ -1567,25 +1584,25 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
BPoint *bp, *bpn, *newbp;
int a, b, newu, newv, sel;
- if(obedit->type==OB_SURF);
+ if (obedit->type==OB_SURF);
else return OPERATOR_CANCELLED;
cu->lastsel= NULL;
nu= editnurb->first;
- while(nu) {
+ while (nu) {
next= nu->next;
/* is entire nurb selected */
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a) {
+ while (a) {
a--;
- if(bp->f1 & flag);
+ if (bp->f1 & flag);
else break;
bp++;
}
- if(a==0) {
+ if (a==0) {
BLI_remlink(editnurb, nu);
keyIndex_delNurb(cu->editnurb, nu);
freeNurb(nu); nu=NULL;
@@ -1594,30 +1611,31 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
/* is nurb in U direction selected */
newv= nu->pntsv;
bp= nu->bp;
- for(b=0; b<nu->pntsv; b++) {
+ for (b=0; b<nu->pntsv; b++) {
sel= 0;
- for(a=0; a<nu->pntsu; a++, bp++) {
- if(bp->f1 & flag) sel++;
+ for (a=0; a<nu->pntsu; a++, bp++) {
+ if (bp->f1 & flag) sel++;
}
- if(sel==nu->pntsu) {
+ if (sel==nu->pntsu) {
newv--;
}
- else if(sel>=1) {
+ else if (sel>=1) {
/* don't delete */
break;
}
}
- if(newv!=nu->pntsv && b==nu->pntsv) {
+ if (newv!=nu->pntsv && b==nu->pntsv) {
/* delete */
bp= nu->bp;
bpn = newbp =
(BPoint*) MEM_mallocN(newv * nu->pntsu * sizeof(BPoint), "deleteNurb");
- for(b=0; b<nu->pntsv; b++) {
- if((bp->f1 & flag)==0) {
+ for (b=0; b<nu->pntsv; b++) {
+ if ((bp->f1 & flag)==0) {
memcpy(bpn, bp, nu->pntsu*sizeof(BPoint));
keyIndex_updateBP(cu->editnurb, bp, bpn, nu->pntsu);
bpn+= nu->pntsu;
- } else {
+ }
+ else {
keyIndex_delBP(cu->editnurb, bp);
}
bp+= nu->pntsu;
@@ -1632,44 +1650,45 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
else {
/* is the nurb in V direction selected */
newu= nu->pntsu;
- for(a=0; a<nu->pntsu; a++) {
+ for (a=0; a<nu->pntsu; a++) {
bp= nu->bp+a;
sel= 0;
- for(b=0; b<nu->pntsv; b++, bp+=nu->pntsu) {
- if(bp->f1 & flag) sel++;
+ for (b=0; b<nu->pntsv; b++, bp+=nu->pntsu) {
+ if (bp->f1 & flag) sel++;
}
- if(sel==nu->pntsv) {
+ if (sel==nu->pntsv) {
newu--;
}
- else if(sel>=1) {
+ else if (sel>=1) {
/* don't delete */
break;
}
}
- if(newu!=nu->pntsu && a==nu->pntsu) {
+ if (newu!=nu->pntsu && a==nu->pntsu) {
/* delete */
bp= nu->bp;
bpn = newbp =
(BPoint*) MEM_mallocN(newu * nu->pntsv * sizeof(BPoint), "deleteNurb");
- for(b=0; b<nu->pntsv; b++) {
- for(a=0; a<nu->pntsu; a++, bp++) {
- if((bp->f1 & flag)==0) {
+ for (b=0; b<nu->pntsv; b++) {
+ for (a=0; a<nu->pntsu; a++, bp++) {
+ if ((bp->f1 & flag)==0) {
*bpn= *bp;
keyIndex_updateBP(cu->editnurb, bp, bpn, 1);
bpn++;
- } else {
+ }
+ else {
keyIndex_delBP(cu->editnurb, bp);
}
}
}
MEM_freeN(nu->bp);
nu->bp= newbp;
- if(newu==1 && nu->pntsv>1) { /* make a U spline */
+ if (newu==1 && nu->pntsv>1) { /* make a U spline */
nu->pntsu= nu->pntsv;
nu->pntsv= 1;
SWAP(short, nu->orderu, nu->orderv);
clamp_nurb_order_u(nu);
- if(nu->knotsv) MEM_freeN(nu->knotsv);
+ if (nu->knotsv) MEM_freeN(nu->knotsv);
nu->knotsv= NULL;
}
else {
@@ -1683,7 +1702,7 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
nu= next;
}
- if(ED_curve_updateAnimPaths(obedit))
+ if (ED_curve_updateAnimPaths(obedit))
WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
return OPERATOR_FINISHED;
@@ -1697,18 +1716,18 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
int ok= 0, a, u, v, len;
nu= editnurb->nurbs.first;
- while(nu) {
+ while (nu) {
- if(nu->pntsv==1) {
+ if (nu->pntsv==1) {
bp= nu->bp;
a= nu->pntsu;
- while(a) {
- if(bp->f1 & flag);
+ while (a) {
+ if (bp->f1 & flag);
else break;
bp++;
a--;
}
- if(a==0) {
+ if (a==0) {
ok= 1;
newbp =
(BPoint*)MEM_mallocN(2 * nu->pntsu * sizeof(BPoint), "extrudeNurb1");
@@ -1718,7 +1737,7 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
MEM_freeN(nu->bp);
nu->bp= newbp;
a= nu->pntsu;
- while(a--) {
+ while (a--) {
select_bpoint(bp, SELECT, flag, HIDDEN);
select_bpoint(newbp, DESELECT, flag, HIDDEN);
bp++;
@@ -1733,22 +1752,22 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
else {
/* which row or column is selected */
- if( isNurbselUV(nu, &u, &v, flag) ) {
+ if ( isNurbselUV(nu, &u, &v, flag) ) {
/* deselect all */
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
+ while (a--) {
select_bpoint(bp, DESELECT, flag, HIDDEN);
bp++;
}
- if(u==0 || u== nu->pntsv-1) { /* row in u-direction selected */
+ if (u==0 || u== nu->pntsv-1) { /* row in u-direction selected */
ok= 1;
newbp =
(BPoint*) MEM_mallocN(nu->pntsu*(nu->pntsv + 1)
* sizeof(BPoint), "extrudeNurb1");
- if(u==0) {
+ if (u==0) {
len= nu->pntsv*nu->pntsu;
ED_curve_bpcpy(editnurb, newbp+nu->pntsu, nu->bp, len);
ED_curve_bpcpy(editnurb, newbp, nu->bp, nu->pntsu);
@@ -1762,7 +1781,7 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
}
a= nu->pntsu;
- while(a--) {
+ while (a--) {
select_bpoint(bp, SELECT, flag, HIDDEN);
bp++;
}
@@ -1772,14 +1791,14 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
nu->pntsv++;
nurbs_knot_calc_v(nu);
}
- else if(v==0 || v== nu->pntsu-1) { /* column in v-direction selected */
+ else if (v==0 || v== nu->pntsu-1) { /* column in v-direction selected */
ok= 1;
bpn = newbp =
(BPoint*) MEM_mallocN((nu->pntsu + 1) * nu->pntsv * sizeof(BPoint), "extrudeNurb1");
bp= nu->bp;
- for(a=0; a<nu->pntsv; a++) {
- if(v==0) {
+ for (a=0; a<nu->pntsv; a++) {
+ if (v==0) {
*bpn= *bp;
bpn->f1 |= flag;
bpn++;
@@ -1787,7 +1806,7 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
ED_curve_bpcpy(editnurb, bpn, bp, nu->pntsu);
bp+= nu->pntsu;
bpn+= nu->pntsu;
- if(v== nu->pntsu-1) {
+ if (v== nu->pntsu-1) {
*bpn= *(bp-1);
bpn->f1 |= flag;
bpn++;
@@ -1820,20 +1839,20 @@ static void adduplicateflagNurb(Object *obedit, short flag)
cu->lastsel= NULL;
nu= editnurb->last;
- while(nu) {
- if(nu->type == CU_BEZIER) {
+ while (nu) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
- for(a=0; a<nu->pntsu; a++) {
+ for (a=0; a<nu->pntsu; a++) {
enda= -1;
starta= a;
- while( (bezt->f1 & flag) || (bezt->f2 & flag) || (bezt->f3 & flag) ) {
+ while ( (bezt->f1 & flag) || (bezt->f2 & flag) || (bezt->f3 & flag) ) {
select_beztriple(bezt, DESELECT, flag, HIDDEN);
enda=a;
- if(a>=nu->pntsu-1) break;
+ if (a>=nu->pntsu-1) break;
a++;
bezt++;
}
- if(enda>=starta) {
+ if (enda>=starta) {
newnu = (Nurb*)MEM_mallocN(sizeof(Nurb), "adduplicateN");
memcpy(newnu, nu, sizeof(Nurb));
BLI_addtail(editnurb, newnu);
@@ -1845,13 +1864,13 @@ static void adduplicateflagNurb(Object *obedit, short flag)
b= newnu->pntsu;
bezt1= newnu->bezt;
- while(b--) {
+ while (b--) {
select_beztriple(bezt1, SELECT, flag, HIDDEN);
bezt1++;
}
- if(nu->flagu & CU_NURB_CYCLIC) {
- if(starta!=0 || enda!=nu->pntsu-1) {
+ if (nu->flagu & CU_NURB_CYCLIC) {
+ if (starta!=0 || enda!=nu->pntsu-1) {
newnu->flagu &= ~CU_NURB_CYCLIC;
}
}
@@ -1859,19 +1878,19 @@ static void adduplicateflagNurb(Object *obedit, short flag)
bezt++;
}
}
- else if(nu->pntsv==1) { /* because UV Nurb has a different method for dupli */
+ else if (nu->pntsv==1) { /* because UV Nurb has a different method for dupli */
bp= nu->bp;
- for(a=0; a<nu->pntsu; a++) {
+ for (a=0; a<nu->pntsu; a++) {
enda= -1;
starta= a;
- while(bp->f1 & flag) {
+ while (bp->f1 & flag) {
select_bpoint(bp, DESELECT, flag, HIDDEN);
enda= a;
- if(a>=nu->pntsu-1) break;
+ if (a>=nu->pntsu-1) break;
a++;
bp++;
}
- if(enda>=starta) {
+ if (enda>=starta) {
newnu = (Nurb*)MEM_mallocN(sizeof(Nurb), "adduplicateN3");
memcpy(newnu, nu, sizeof(Nurb));
set_actNurb(obedit, newnu);
@@ -1882,13 +1901,13 @@ static void adduplicateflagNurb(Object *obedit, short flag)
b= newnu->pntsu;
bp1= newnu->bp;
- while(b--) {
+ while (b--) {
select_bpoint(bp1, SELECT, flag, HIDDEN);
bp1++;
}
- if(nu->flagu & CU_NURB_CYCLIC) {
- if(starta!=0 || enda!=nu->pntsu-1) {
+ if (nu->flagu & CU_NURB_CYCLIC) {
+ if (starta!=0 || enda!=nu->pntsu-1) {
newnu->flagu &= ~CU_NURB_CYCLIC;
}
}
@@ -1902,19 +1921,19 @@ static void adduplicateflagNurb(Object *obedit, short flag)
}
else {
/* a rectangular area in nurb has to be selected */
- if(isNurbsel(nu)) {
+ if (isNurbsel(nu)) {
usel= MEM_callocN(nu->pntsu, "adduplicateN4");
bp= nu->bp;
- for(a=0; a<nu->pntsv; a++) {
- for(b=0; b<nu->pntsu; b++, bp++) {
- if(bp->f1 & flag) usel[b]++;
+ for (a=0; a<nu->pntsv; a++) {
+ for (b=0; b<nu->pntsu; b++, bp++) {
+ if (bp->f1 & flag) usel[b]++;
}
}
newu= 0;
newv= 0;
- for(a=0; a<nu->pntsu; a++) {
- if(usel[a]) {
- if(newv==0 || usel[a]==newv) {
+ for (a=0; a<nu->pntsu; a++) {
+ if (usel[a]) {
+ if (newv==0 || usel[a]==newv) {
newv= usel[a];
newu++;
}
@@ -1924,13 +1943,13 @@ static void adduplicateflagNurb(Object *obedit, short flag)
}
}
}
- if(newu==0 || newv==0) {
+ if (newu==0 || newv==0) {
if (G.f & G_DEBUG)
printf("Can't duplicate Nurb\n");
}
else {
- if(newu==1) SWAP(short, newu, newv);
+ if (newu==1) SWAP(short, newu, newv);
newnu = (Nurb*)MEM_mallocN(sizeof(Nurb), "adduplicateN5");
memcpy(newnu, nu, sizeof(Nurb));
@@ -1947,9 +1966,9 @@ static void adduplicateflagNurb(Object *obedit, short flag)
bp= newnu->bp;
bp1= nu->bp;
- for(a=0; a<nu->pntsv; a++) {
- for(b=0; b<nu->pntsu; b++, bp1++) {
- if(bp1->f1 & flag) {
+ for (a=0; a<nu->pntsv; a++) {
+ for (b=0; b<nu->pntsu; b++, bp1++) {
+ if (bp1->f1 & flag) {
memcpy(bp, bp1, sizeof(BPoint));
select_bpoint(bp1, DESELECT, flag, HIDDEN);
bp++;
@@ -1957,16 +1976,18 @@ static void adduplicateflagNurb(Object *obedit, short flag)
}
}
if (check_valid_nurb_u(newnu)) {
- if(nu->pntsu==newnu->pntsu && nu->knotsu) {
+ if (nu->pntsu==newnu->pntsu && nu->knotsu) {
newnu->knotsu= MEM_dupallocN( nu->knotsu );
- } else {
+ }
+ else {
nurbs_knot_calc_u(newnu);
}
}
if (check_valid_nurb_v(newnu)) {
- if(nu->pntsv==newnu->pntsv && nu->knotsv) {
+ if (nu->pntsv==newnu->pntsv && nu->knotsv) {
newnu->knotsv= MEM_dupallocN( nu->knotsv );
- } else {
+ }
+ else {
nurbs_knot_calc_v(newnu);
}
}
@@ -1990,13 +2011,13 @@ static int switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
EditNurb *editnurb= cu->editnurb;
Nurb *nu;
- for(nu= editnurb->nurbs.first; nu; nu= nu->next)
- if(isNurbsel(nu)) {
+ for (nu= editnurb->nurbs.first; nu; nu= nu->next)
+ if (isNurbsel(nu)) {
switchdirectionNurb(nu);
keyData_switchDirectionNurb(cu, nu);
}
- if(ED_curve_updateAnimPaths(obedit))
+ if (ED_curve_updateAnimPaths(obedit))
WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
DAG_id_tag_update(obedit->data, 0);
@@ -2008,16 +2029,16 @@ static int switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_switch_direction(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Switch Direction";
- ot->description= "Switch direction of selected splines";
- ot->idname= "CURVE_OT_switch_direction";
+ ot->name = "Switch Direction";
+ ot->description = "Switch direction of selected splines";
+ ot->idname = "CURVE_OT_switch_direction";
/* api callbacks */
- ot->exec= switch_direction_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = switch_direction_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/****************** set weight operator *******************/
@@ -2032,16 +2053,16 @@ static int set_goal_weight_exec(bContext *C, wmOperator *op)
float weight= RNA_float_get(op->ptr, "weight");
int a;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->bezt) {
- for(bezt=nu->bezt, a=0; a<nu->pntsu; a++, bezt++) {
- if(bezt->f2 & SELECT)
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->bezt) {
+ for (bezt=nu->bezt, a=0; a<nu->pntsu; a++, bezt++) {
+ if (bezt->f2 & SELECT)
bezt->weight= weight;
}
}
- else if(nu->bp) {
- for(bp=nu->bp, a=0; a<nu->pntsu*nu->pntsv; a++, bp++) {
- if(bp->f1 & SELECT)
+ else if (nu->bp) {
+ for (bp=nu->bp, a=0; a<nu->pntsu*nu->pntsv; a++, bp++) {
+ if (bp->f1 & SELECT)
bp->weight= weight;
}
}
@@ -2056,17 +2077,17 @@ static int set_goal_weight_exec(bContext *C, wmOperator *op)
void CURVE_OT_spline_weight_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Goal Weight";
- ot->description= "Set softbody goal weight for selected points";
- ot->idname= "CURVE_OT_spline_weight_set";
+ ot->name = "Set Goal Weight";
+ ot->description = "Set softbody goal weight for selected points";
+ ot->idname = "CURVE_OT_spline_weight_set";
/* api callbacks */
- ot->exec= set_goal_weight_exec;
- ot->invoke= WM_operator_props_popup;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = set_goal_weight_exec;
+ ot->invoke = WM_operator_props_popup;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_float_factor(ot->srna, "weight", 1.0f, 0.0f, 1.0f, "Weight", "", 0.0f, 1.0f);
@@ -2084,16 +2105,16 @@ static int set_radius_exec(bContext *C, wmOperator *op)
float radius= RNA_float_get(op->ptr, "radius");
int a;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->bezt) {
- for(bezt=nu->bezt, a=0; a<nu->pntsu; a++, bezt++) {
- if(bezt->f2 & SELECT)
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->bezt) {
+ for (bezt=nu->bezt, a=0; a<nu->pntsu; a++, bezt++) {
+ if (bezt->f2 & SELECT)
bezt->radius= radius;
}
}
- else if(nu->bp) {
- for(bp=nu->bp, a=0; a<nu->pntsu*nu->pntsv; a++, bp++) {
- if(bp->f1 & SELECT)
+ else if (nu->bp) {
+ for (bp=nu->bp, a=0; a<nu->pntsu*nu->pntsv; a++, bp++) {
+ if (bp->f1 & SELECT)
bp->radius= radius;
}
}
@@ -2108,17 +2129,17 @@ static int set_radius_exec(bContext *C, wmOperator *op)
void CURVE_OT_radius_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Curve Radius";
- ot->description= "Set per-point radius which is used for bevel tapering";
- ot->idname= "CURVE_OT_radius_set";
+ ot->name = "Set Curve Radius";
+ ot->description = "Set per-point radius which is used for bevel tapering";
+ ot->idname = "CURVE_OT_radius_set";
/* api callbacks */
- ot->exec= set_radius_exec;
- ot->invoke= WM_operator_props_popup;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = set_radius_exec;
+ ot->invoke = WM_operator_props_popup;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_float(ot->srna, "radius", 1.0f, 0.0f, FLT_MAX, "Radius", "", 0.0001f, 10.0f);
@@ -2136,13 +2157,13 @@ static int smooth_exec(bContext *C, wmOperator *UNUSED(op))
float val, newval, offset;
int a, i, change = 0;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->bezt) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->bezt) {
change = 0;
beztOrig = MEM_dupallocN( nu->bezt );
- for(bezt=nu->bezt+1, a=1; a<nu->pntsu-1; a++, bezt++) {
- if(bezt->f2 & SELECT) {
- for(i=0; i<3; i++) {
+ for (bezt=nu->bezt+1, a=1; a<nu->pntsu-1; a++, bezt++) {
+ if (bezt->f2 & SELECT) {
+ for (i=0; i<3; i++) {
val = bezt->vec[1][i];
newval = ((beztOrig+(a-1))->vec[1][i] * 0.5f) + ((beztOrig+(a+1))->vec[1][i] * 0.5f);
offset = (val*((1.0f/6.0f)*5.0f)) + (newval*(1.0f/6.0f)) - val;
@@ -2157,12 +2178,13 @@ static int smooth_exec(bContext *C, wmOperator *UNUSED(op))
MEM_freeN(beztOrig);
if (change)
calchandlesNurb(nu);
- } else if (nu->bp) {
+ }
+ else if (nu->bp) {
bpOrig = MEM_dupallocN( nu->bp );
/* Same as above, keep these the same! */
- for(bp=nu->bp+1, a=1; a<nu->pntsu-1; a++, bp++) {
- if(bp->f1 & SELECT) {
- for(i=0; i<3; i++) {
+ for (bp=nu->bp+1, a=1; a<nu->pntsu-1; a++, bp++) {
+ if (bp->f1 & SELECT) {
+ for (i=0; i<3; i++) {
val = bp->vec[i];
newval = ((bpOrig+(a-1))->vec[i] * 0.5f) + ((bpOrig+(a+1))->vec[i] * 0.5f);
offset = (val*((1.0f/6.0f)*5.0f)) + (newval*(1.0f/6.0f)) - val;
@@ -2184,16 +2206,16 @@ static int smooth_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_smooth(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Smooth";
- ot->description= "Flatten angles of selected points";
- ot->idname= "CURVE_OT_smooth";
+ ot->name = "Smooth";
+ ot->description = "Flatten angles of selected points";
+ ot->idname = "CURVE_OT_smooth";
/* api callbacks */
- ot->exec= smooth_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = smooth_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/**************** smooth curve radius operator *************/
@@ -2213,24 +2235,24 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
int start_sel, end_sel; /* selection indices, inclusive */
float start_rad, end_rad, fac, range;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->bezt) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->bezt) {
for (last_sel=0; last_sel < nu->pntsu; last_sel++) {
/* loop over selection segments of a curve, smooth each */
/* Start BezTriple code, this is duplicated below for points, make sure these functions stay in sync */
start_sel = -1;
- for(bezt=nu->bezt+last_sel, a=last_sel; a<nu->pntsu; a++, bezt++) {
- if(bezt->f2 & SELECT) {
+ for (bezt=nu->bezt+last_sel, a=last_sel; a<nu->pntsu; a++, bezt++) {
+ if (bezt->f2 & SELECT) {
start_sel = a;
break;
}
}
/* in case there are no other selected verts */
end_sel = start_sel;
- for(bezt=nu->bezt+(start_sel+1), a=start_sel+1; a<nu->pntsu; a++, bezt++) {
- if((bezt->f2 & SELECT)==0) {
+ for (bezt=nu->bezt+(start_sel+1), a=start_sel+1; a<nu->pntsu; a++, bezt++) {
+ if ((bezt->f2 & SELECT)==0) {
break;
}
end_sel = a;
@@ -2238,7 +2260,8 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
if (start_sel == -1) {
last_sel = nu->pntsu; /* next... */
- } else {
+ }
+ else {
last_sel = end_sel; /* before we modify it */
/* now blend between start and end sel */
@@ -2252,47 +2275,51 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
if (start_rad >= 0.0f && end_rad >= 0.0f) (nu->bezt+start_sel)->radius = (start_rad + end_rad)/2;
else if (start_rad >= 0.0f) (nu->bezt+start_sel)->radius = start_rad;
else if (end_rad >= 0.0f) (nu->bezt+start_sel)->radius = end_rad;
- } else {
+ }
+ else {
/* if endpoints selected, then use them */
if (start_sel==0) {
start_rad = (nu->bezt+start_sel)->radius;
- start_sel++; /* we dont want to edit the selected endpoint */
- } else {
+ start_sel++; /* we don't want to edit the selected endpoint */
+ }
+ else {
start_rad = (nu->bezt+start_sel-1)->radius;
}
if (end_sel==nu->pntsu-1) {
end_rad = (nu->bezt+end_sel)->radius;
- end_sel--; /* we dont want to edit the selected endpoint */
- } else {
+ end_sel--; /* we don't want to edit the selected endpoint */
+ }
+ else {
end_rad = (nu->bezt+end_sel+1)->radius;
}
/* Now Blend between the points */
range = (float)(end_sel - start_sel) + 2.0f;
- for(bezt=nu->bezt+start_sel, a=start_sel; a<=end_sel; a++, bezt++) {
+ for (bezt=nu->bezt+start_sel, a=start_sel; a<=end_sel; a++, bezt++) {
fac = (float)(1+a-start_sel) / range;
bezt->radius = start_rad*(1.0f-fac) + end_rad*fac;
}
}
}
}
- } else if (nu->bp) {
+ }
+ else if (nu->bp) {
/* Same as above, keep these the same! */
for (last_sel=0; last_sel < nu->pntsu; last_sel++) {
/* loop over selection segments of a curve, smooth each */
/* Start BezTriple code, this is duplicated below for points, make sure these functions stay in sync */
start_sel = -1;
- for(bp=nu->bp+last_sel, a=last_sel; a<nu->pntsu; a++, bp++) {
- if(bp->f1 & SELECT) {
+ for (bp=nu->bp+last_sel, a=last_sel; a<nu->pntsu; a++, bp++) {
+ if (bp->f1 & SELECT) {
start_sel = a;
break;
}
}
/* in case there are no other selected verts */
end_sel = start_sel;
- for(bp=nu->bp+(start_sel+1), a=start_sel+1; a<nu->pntsu; a++, bp++) {
- if((bp->f1 & SELECT)==0) {
+ for (bp=nu->bp+(start_sel+1), a=start_sel+1; a<nu->pntsu; a++, bp++) {
+ if ((bp->f1 & SELECT)==0) {
break;
}
end_sel = a;
@@ -2300,7 +2327,8 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
if (start_sel == -1) {
last_sel = nu->pntsu; /* next... */
- } else {
+ }
+ else {
last_sel = end_sel; /* before we modify it */
/* now blend between start and end sel */
@@ -2314,24 +2342,27 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
if (start_rad >= 0.0f && end_rad >= 0.0f) (nu->bp+start_sel)->radius = (start_rad + end_rad)/2;
else if (start_rad >= 0.0f) (nu->bp+start_sel)->radius = start_rad;
else if (end_rad >= 0.0f) (nu->bp+start_sel)->radius = end_rad;
- } else {
+ }
+ else {
/* if endpoints selected, then use them */
if (start_sel==0) {
start_rad = (nu->bp+start_sel)->radius;
- start_sel++; /* we dont want to edit the selected endpoint */
- } else {
+ start_sel++; /* we don't want to edit the selected endpoint */
+ }
+ else {
start_rad = (nu->bp+start_sel-1)->radius;
}
if (end_sel==nu->pntsu-1) {
end_rad = (nu->bp+end_sel)->radius;
- end_sel--; /* we dont want to edit the selected endpoint */
- } else {
+ end_sel--; /* we don't want to edit the selected endpoint */
+ }
+ else {
end_rad = (nu->bp+end_sel+1)->radius;
}
/* Now Blend between the points */
range = (float)(end_sel - start_sel) + 2.0f;
- for(bp=nu->bp+start_sel, a=start_sel; a<=end_sel; a++, bp++) {
+ for (bp=nu->bp+start_sel, a=start_sel; a<=end_sel; a++, bp++) {
fac = (float)(1+a-start_sel) / range;
bp->radius = start_rad*(1.0f-fac) + end_rad*fac;
}
@@ -2350,16 +2381,16 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_smooth_radius(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Smooth Curve Radius";
- ot->description= "Flatten radiuses of selected points";
- ot->idname= "CURVE_OT_smooth_radius";
+ ot->name = "Smooth Curve Radius";
+ ot->description = "Flatten radiuses of selected points";
+ ot->idname = "CURVE_OT_smooth_radius";
/* api clastbacks */
- ot->exec= smooth_radius_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = smooth_radius_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/***************** selection utility *************************/
@@ -2376,21 +2407,21 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
int a;
short lastsel= 0;
- if(next==0) return;
+ if (next==0) return;
- for(nu= editnurb->first; nu; nu= nu->next) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
lastsel=0;
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
- if(next < 0) bezt= (nu->bezt + (a-1));
- while(a--) {
- if(a-abs(next) < 0) break;
- if((lastsel==0) && (bezt->hide==0) && ((bezt->f2 & SELECT) || (selstatus==0))) {
+ if (next < 0) bezt= (nu->bezt + (a-1));
+ while (a--) {
+ if (a-abs(next) < 0) break;
+ if ((lastsel==0) && (bezt->hide==0) && ((bezt->f2 & SELECT) || (selstatus==0))) {
bezt+=next;
- if(!(bezt->f2 & SELECT) || (selstatus==0)) {
+ if (!(bezt->f2 & SELECT) || (selstatus==0)) {
short sel= select_beztriple(bezt, selstatus, 1, VISIBLE);
- if((sel==1) && (cont==0)) lastsel= 1;
+ if ((sel==1) && (cont==0)) lastsel= 1;
}
}
else {
@@ -2404,14 +2435,14 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
else {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- if(next < 0) bp= (nu->bp + (a-1));
- while(a--) {
- if(a-abs(next) < 0) break;
- if((lastsel==0) && (bp->hide==0) && ((bp->f1 & SELECT) || (selstatus==0))) {
+ if (next < 0) bp= (nu->bp + (a-1));
+ while (a--) {
+ if (a-abs(next) < 0) break;
+ if ((lastsel==0) && (bp->hide==0) && ((bp->f1 & SELECT) || (selstatus==0))) {
bp+=next;
- if(!(bp->f1 & SELECT) || (selstatus==0)) {
+ if (!(bp->f1 & SELECT) || (selstatus==0)) {
short sel= select_bpoint(bp, selstatus, 1, VISIBLE);
- if((sel==1) && (cont==0)) lastsel= 1;
+ if ((sel==1) && (cont==0)) lastsel= 1;
}
}
else {
@@ -2440,49 +2471,49 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
Curve *cu;
int a;
- if(obedit==NULL) return;
+ if (obedit==NULL) return;
cu= (Curve*)obedit->data;
cu->lastsel= NULL;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
a= nu->pntsu;
/* which point? */
- if(selfirst==0) { /* select last */
+ if (selfirst==0) { /* select last */
bezt= (nu->bezt + (a-1));
}
else { /* select first */
bezt= nu->bezt;
}
- while(a--) {
+ while (a--) {
short sel;
- if(doswap) sel= swap_selection_beztriple(bezt);
+ if (doswap) sel= swap_selection_beztriple(bezt);
else sel= select_beztriple(bezt, selstatus, 1, VISIBLE);
- if(sel==1) break;
+ if (sel==1) break;
}
}
else {
a= nu->pntsu*nu->pntsv;
/* which point? */
- if(selfirst==0) { /* select last */
+ if (selfirst==0) { /* select last */
bp= (nu->bp + (a-1));
}
- else{ /* select first */
+ else { /* select first */
bp= nu->bp;
}
- while(a--) {
+ while (a--) {
if (bp->hide == 0) {
short sel;
- if(doswap) sel= swap_selection_bpoint(bp);
+ if (doswap) sel= swap_selection_bpoint(bp);
else sel= select_bpoint(bp, selstatus, 1, VISIBLE);
- if(sel==1) break;
+ if (sel==1) break;
}
}
}
@@ -2502,15 +2533,15 @@ static int de_select_first_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_de_select_first(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select or Deselect First";
- ot->idname= "CURVE_OT_de_select_first";
+ ot->name = "(De)select First";
+ ot->idname = "CURVE_OT_de_select_first";
/* api cfirstbacks */
- ot->exec= de_select_first_exec;
- ot->poll= ED_operator_editcurve;
+ ot->exec = de_select_first_exec;
+ ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int de_select_last_exec(bContext *C, wmOperator *UNUSED(op))
@@ -2526,15 +2557,15 @@ static int de_select_last_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_de_select_last(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select or Deselect Last";
- ot->idname= "CURVE_OT_de_select_last";
+ ot->name = "(De)select Last";
+ ot->idname = "CURVE_OT_de_select_last";
/* api clastbacks */
- ot->exec= de_select_last_exec;
- ot->poll= ED_operator_editcurve;
+ ot->exec = de_select_last_exec;
+ ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/******************* de select all operator ***************/
@@ -2546,13 +2577,13 @@ static short nurb_has_selected_cps(ListBase *editnurb)
BPoint *bp;
int a;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
- while(a--) {
- if(bezt->hide==0) {
- if((bezt->f1 & SELECT)
+ while (a--) {
+ if (bezt->hide==0) {
+ if ((bezt->f1 & SELECT)
|| (bezt->f2 & SELECT)
|| (bezt->f3 & SELECT)) return 1;
}
@@ -2562,8 +2593,8 @@ static short nurb_has_selected_cps(ListBase *editnurb)
else {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- while(a--) {
- if((bp->hide==0) && (bp->f1 & SELECT)) return 1;
+ while (a--) {
+ if ((bp->hide==0) && (bp->f1 & SELECT)) return 1;
bp++;
}
}
@@ -2580,7 +2611,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op)
if (action == SEL_TOGGLE) {
action = SEL_SELECT;
- if(nurb_has_selected_cps(editnurb))
+ if (nurb_has_selected_cps(editnurb))
action = SEL_DESELECT;
}
@@ -2604,15 +2635,15 @@ static int de_select_all_exec(bContext *C, wmOperator *op)
void CURVE_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select or Deselect All";
- ot->idname= "CURVE_OT_select_all";
+ ot->name = "(De)select All";
+ ot->idname = "CURVE_OT_select_all";
/* api callbacks */
- ot->exec= de_select_all_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = de_select_all_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
WM_operator_properties_select_all(ot);
@@ -2630,42 +2661,42 @@ static int hide_exec(bContext *C, wmOperator *op)
BezTriple *bezt;
int a, sel, invert= RNA_boolean_get(op->ptr, "unselected");
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
sel= 0;
- while(a--) {
- if(invert == 0 && BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
+ while (a--) {
+ if (invert == 0 && BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
select_beztriple(bezt, DESELECT, 1, HIDDEN);
bezt->hide= 1;
}
- else if(invert && !BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
+ else if (invert && !BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
select_beztriple(bezt, DESELECT, 1, HIDDEN);
bezt->hide= 1;
}
- if(bezt->hide) sel++;
+ if (bezt->hide) sel++;
bezt++;
}
- if(sel==nu->pntsu) nu->hide= 1;
+ if (sel==nu->pntsu) nu->hide= 1;
}
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
sel= 0;
- while(a--) {
- if(invert==0 && (bp->f1 & SELECT)) {
+ while (a--) {
+ if (invert==0 && (bp->f1 & SELECT)) {
select_bpoint(bp, DESELECT, 1, HIDDEN);
bp->hide= 1;
}
- else if(invert && (bp->f1 & SELECT)==0) {
+ else if (invert && (bp->f1 & SELECT)==0) {
select_bpoint(bp, DESELECT, 1, HIDDEN);
bp->hide= 1;
}
- if(bp->hide) sel++;
+ if (bp->hide) sel++;
bp++;
}
- if(sel==nu->pntsu*nu->pntsv) nu->hide= 1;
+ if (sel==nu->pntsu*nu->pntsv) nu->hide= 1;
}
}
@@ -2678,15 +2709,15 @@ static int hide_exec(bContext *C, wmOperator *op)
void CURVE_OT_hide(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Hide Selected";
- ot->idname= "CURVE_OT_hide";
+ ot->name = "Hide Selected";
+ ot->idname = "CURVE_OT_hide";
/* api callbacks */
- ot->exec= hide_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = hide_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
@@ -2703,13 +2734,13 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
BezTriple *bezt;
int a;
- for(nu= editnurb->first; nu; nu= nu->next) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
nu->hide= 0;
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
- if(bezt->hide) {
+ while (a--) {
+ if (bezt->hide) {
select_beztriple(bezt, SELECT, 1, HIDDEN);
bezt->hide= 0;
}
@@ -2719,8 +2750,8 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
- if(bp->hide) {
+ while (a--) {
+ if (bp->hide) {
select_bpoint(bp, SELECT, 1, HIDDEN);
bp->hide= 0;
}
@@ -2738,15 +2769,15 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_reveal(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reveal Hidden";
- ot->idname= "CURVE_OT_reveal";
+ ot->name = "Reveal Hidden";
+ ot->idname = "CURVE_OT_reveal";
/* api callbacks */
- ot->exec= reveal_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = reveal_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** subdivide operator *********************/
@@ -2768,16 +2799,16 @@ static void subdividenurb(Object *obedit, int number_cuts)
// printf("*** subdivideNurb: entering subdivide\n");
- for(nu= editnurb->nurbs.first; nu; nu= nu->next) {
+ for (nu= editnurb->nurbs.first; nu; nu= nu->next) {
amount= 0;
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
/*
* Insert a point into a 2D Bezier curve.
* Endpoints are preserved. Otherwise, all selected and inserted points are
* newly created. Old points are discarded.
*/
/* count */
- if(nu->flagu & CU_NURB_CYCLIC) {
+ if (nu->flagu & CU_NURB_CYCLIC) {
a= nu->pntsu;
bezt= nu->bezt;
prevbezt= bezt+(a-1);
@@ -2787,18 +2818,18 @@ static void subdividenurb(Object *obedit, int number_cuts)
prevbezt= nu->bezt;
bezt= prevbezt+1;
}
- while(a--) {
- if( BEZSELECTED_HIDDENHANDLES(cu, prevbezt) && BEZSELECTED_HIDDENHANDLES(cu, bezt) ) amount+=number_cuts;
+ while (a--) {
+ if ( BEZSELECTED_HIDDENHANDLES(cu, prevbezt) && BEZSELECTED_HIDDENHANDLES(cu, bezt) ) amount+=number_cuts;
prevbezt= bezt;
bezt++;
}
- if(amount) {
+ if (amount) {
/* insert */
beztnew =
(BezTriple*)MEM_mallocN((amount + nu->pntsu) * sizeof(BezTriple), "subdivNurb");
beztn= beztnew;
- if(nu->flagu & CU_NURB_CYCLIC) {
+ if (nu->flagu & CU_NURB_CYCLIC) {
a= nu->pntsu;
bezt= nu->bezt;
prevbezt= bezt+(a-1);
@@ -2808,12 +2839,12 @@ static void subdividenurb(Object *obedit, int number_cuts)
prevbezt= nu->bezt;
bezt= prevbezt+1;
}
- while(a--) {
+ while (a--) {
memcpy(beztn, prevbezt, sizeof(BezTriple));
keyIndex_updateBezt(editnurb, prevbezt, beztn, 1);
beztn++;
- if( BEZSELECTED_HIDDENHANDLES(cu, prevbezt) && BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ if ( BEZSELECTED_HIDDENHANDLES(cu, prevbezt) && BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
float prevvec[3][3];
memcpy(prevvec, prevbezt->vec, sizeof(float) * 9);
@@ -2838,7 +2869,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
interp_v3_v3v3(beztn->vec[1], vec+9, vec+12, factor);
copy_v3_v3(beztn->vec[2], vec+12);
/* handle of next bezt */
- if(a==0 && i == number_cuts - 1 && (nu->flagu & CU_NURB_CYCLIC)) {copy_v3_v3(beztnew->vec[0], vec+6);}
+ if (a==0 && i == number_cuts - 1 && (nu->flagu & CU_NURB_CYCLIC)) {copy_v3_v3(beztnew->vec[0], vec+6);}
else {copy_v3_v3(bezt->vec[0], vec+6);}
beztn->radius = (prevbezt->radius + bezt->radius)/2;
@@ -2853,7 +2884,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
bezt++;
}
/* last point */
- if((nu->flagu & CU_NURB_CYCLIC)==0) {
+ if ((nu->flagu & CU_NURB_CYCLIC)==0) {
memcpy(beztn, prevbezt, sizeof(BezTriple));
keyIndex_updateBezt(editnurb, prevbezt, beztn, 1);
}
@@ -2873,7 +2904,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
* stable... nzc 30-5-'00
*/
/* count */
- if(nu->flagu & CU_NURB_CYCLIC) {
+ if (nu->flagu & CU_NURB_CYCLIC) {
a= nu->pntsu;
bp= nu->bp;
prevbp= bp+(a-1);
@@ -2883,19 +2914,19 @@ static void subdividenurb(Object *obedit, int number_cuts)
prevbp= nu->bp;
bp= prevbp+1;
}
- while(a--) {
- if( (bp->f1 & SELECT) && (prevbp->f1 & SELECT) ) amount+=number_cuts;
+ while (a--) {
+ if ( (bp->f1 & SELECT) && (prevbp->f1 & SELECT) ) amount+=number_cuts;
prevbp= bp;
bp++;
}
- if(amount) {
+ if (amount) {
/* insert */
bpnew =
(BPoint*)MEM_mallocN((amount + nu->pntsu) * sizeof(BPoint), "subdivNurb2");
bpn= bpnew;
- if(nu->flagu & CU_NURB_CYCLIC) {
+ if (nu->flagu & CU_NURB_CYCLIC) {
a= nu->pntsu;
bp= nu->bp;
prevbp= bp+(a-1);
@@ -2905,12 +2936,12 @@ static void subdividenurb(Object *obedit, int number_cuts)
prevbp= nu->bp;
bp= prevbp+1;
}
- while(a--) {
+ while (a--) {
memcpy(bpn, prevbp, sizeof(BPoint));
keyIndex_updateBP(editnurb, prevbp, bpn, 1);
bpn++;
- if( (bp->f1 & SELECT) && (prevbp->f1 & SELECT) ) {
+ if ( (bp->f1 & SELECT) && (prevbp->f1 & SELECT) ) {
// printf("*** subdivideNurb: insert 'linear' point\n");
for (i = 0; i < number_cuts; i++) {
factor = (float)(i + 1) / (number_cuts + 1);
@@ -2924,7 +2955,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
prevbp= bp;
bp++;
}
- if((nu->flagu & CU_NURB_CYCLIC)==0) { /* last point */
+ if ((nu->flagu & CU_NURB_CYCLIC)==0) { /* last point */
memcpy(bpn, prevbp, sizeof(BPoint));
keyIndex_updateBP(editnurb, prevbp, bpn, 1);
}
@@ -2933,12 +2964,12 @@ static void subdividenurb(Object *obedit, int number_cuts)
nu->bp= bpnew;
nu->pntsu+= amount;
- if(nu->type & CU_NURBS) {
+ if (nu->type & CU_NURBS) {
nurbs_knot_calc_u(nu);
}
}
- } /* End of 'else if(nu->pntsv==1)' */
- else if(nu->type == CU_NURBS) {
+ } /* End of 'else if (nu->pntsv==1)' */
+ else if (nu->type == CU_NURBS) {
/* This is a very strange test ... */
/**
* Subdivide NURB surfaces - nzc 30-5-'00 -
@@ -2988,9 +3019,9 @@ static void subdividenurb(Object *obedit, int number_cuts)
/* Count the number of selected points. */
bp= nu->bp;
- for(a=0; a<nu->pntsv; a++) {
- for(b=0; b<nu->pntsu; b++) {
- if(bp->f1 & SELECT) {
+ for (a=0; a<nu->pntsv; a++) {
+ for (b=0; b<nu->pntsu; b++) {
+ if (bp->f1 & SELECT) {
usel[b]++;
vsel[a]++;
sel++;
@@ -2998,7 +3029,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
bp++;
}
}
- if( sel == (nu->pntsu*nu->pntsv) ) { /* subdivide entire nurb */
+ if ( sel == (nu->pntsu*nu->pntsv) ) { /* subdivide entire nurb */
/* Global subdivision is a special case of partial
* subdivision. Strange it is considered separately... */
@@ -3011,13 +3042,13 @@ static void subdividenurb(Object *obedit, int number_cuts)
bpn=bpnew= MEM_mallocN( tot*sizeof(BPoint), "subdivideNurb4");
bp= nu->bp;
/* first subdivide rows */
- for(a=0; a<nu->pntsv; a++) {
- for(b=0; b<nu->pntsu; b++) {
+ for (a=0; a<nu->pntsv; a++) {
+ for (b=0; b<nu->pntsu; b++) {
*bpn= *bp;
keyIndex_updateBP(editnurb, bp, bpn, 1);
bpn++;
bp++;
- if(b<nu->pntsu-1) {
+ if (b<nu->pntsu-1) {
prevbp= bp-1;
for (i = 0; i < number_cuts; i++) {
factor = (float)(i + 1) / (number_cuts + 1);
@@ -3033,9 +3064,9 @@ static void subdividenurb(Object *obedit, int number_cuts)
bpn= bpnew+((number_cuts+1)*nu->pntsu - number_cuts);
bp= bpnew+(number_cuts+1)*((number_cuts+1)*nu->pntsu-number_cuts);
prevbp= bpnew;
- for(a=1; a<nu->pntsv; a++) {
+ for (a=1; a<nu->pntsv; a++) {
- for(b=0; b<(number_cuts+1)*nu->pntsu-number_cuts; b++) {
+ for (b=0; b<(number_cuts+1)*nu->pntsu-number_cuts; b++) {
BPoint *tmp= bpn;
for (i = 0; i < number_cuts; i++) {
factor = (float)(i + 1) / (number_cuts + 1);
@@ -3061,25 +3092,25 @@ static void subdividenurb(Object *obedit, int number_cuts)
else {
/* subdivide in v direction? */
sel= 0;
- for(a=0; a<nu->pntsv-1; a++) {
- if(vsel[a]==nu->pntsu && vsel[a+1]==nu->pntsu) sel+=number_cuts;
+ for (a=0; a<nu->pntsv-1; a++) {
+ if (vsel[a]==nu->pntsu && vsel[a+1]==nu->pntsu) sel+=number_cuts;
}
- if(sel) { /* V ! */
+ if (sel) { /* V ! */
bpn=bpnew= MEM_mallocN( (sel+nu->pntsv)*nu->pntsu*sizeof(BPoint), "subdivideNurb4");
bp= nu->bp;
- for(a=0; a<nu->pntsv; a++) {
- for(b=0; b<nu->pntsu; b++) {
+ for (a=0; a<nu->pntsv; a++) {
+ for (b=0; b<nu->pntsu; b++) {
*bpn= *bp;
keyIndex_updateBP(editnurb, bp, bpn, 1);
bpn++;
bp++;
}
- if( (a<nu->pntsv-1) && vsel[a]==nu->pntsu && vsel[a+1]==nu->pntsu ) {
+ if ( (a<nu->pntsv-1) && vsel[a]==nu->pntsu && vsel[a+1]==nu->pntsu ) {
for (i = 0; i < number_cuts; i++) {
factor = (float)(i + 1) / (number_cuts + 1);
prevbp= bp- nu->pntsu;
- for(b=0; b<nu->pntsu; b++) {
+ for (b=0; b<nu->pntsu; b++) {
/*
* This simple bisection must be replaces by a
* subtle resampling of a number of points. Our
@@ -3106,22 +3137,22 @@ static void subdividenurb(Object *obedit, int number_cuts)
else {
/* or in u direction? */
sel= 0;
- for(a=0; a<nu->pntsu-1; a++) {
- if(usel[a]==nu->pntsv && usel[a+1]==nu->pntsv) sel+=number_cuts;
+ for (a=0; a<nu->pntsu-1; a++) {
+ if (usel[a]==nu->pntsv && usel[a+1]==nu->pntsv) sel+=number_cuts;
}
- if(sel) { /* U ! */
+ if (sel) { /* U ! */
/* Inserting U points is sort of 'default' Flat curves only get */
/* U points inserted in them. */
bpn=bpnew= MEM_mallocN( (sel+nu->pntsu)*nu->pntsv*sizeof(BPoint), "subdivideNurb4");
bp= nu->bp;
- for(a=0; a<nu->pntsv; a++) {
- for(b=0; b<nu->pntsu; b++) {
+ for (a=0; a<nu->pntsv; a++) {
+ for (b=0; b<nu->pntsu; b++) {
*bpn= *bp;
keyIndex_updateBP(editnurb, bp, bpn, 1);
bpn++;
bp++;
- if( (b<nu->pntsu-1) && usel[b]==nu->pntsv && usel[b+1]==nu->pntsv ) {
+ if ( (b<nu->pntsu-1) && usel[b]==nu->pntsv && usel[b+1]==nu->pntsv ) {
/*
* One thing that bugs me here is that the
* orders of things are not the same as in
@@ -3160,7 +3191,7 @@ static int subdivide_exec(bContext *C, wmOperator *op)
subdividenurb(obedit, number_cuts);
- if(ED_curve_updateAnimPaths(obedit))
+ if (ED_curve_updateAnimPaths(obedit))
WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
@@ -3171,19 +3202,23 @@ static int subdivide_exec(bContext *C, wmOperator *op)
void CURVE_OT_subdivide(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
- ot->name= "Subdivide";
- ot->description= "Subdivide selected segments";
- ot->idname= "CURVE_OT_subdivide";
+ ot->name = "Subdivide";
+ ot->description = "Subdivide selected segments";
+ ot->idname = "CURVE_OT_subdivide";
/* api callbacks */
- ot->exec= subdivide_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = subdivide_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of cuts", "", 1, 10);
+ prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of cuts", "", 1, 10);
+ /* avoid re-using last var because it can cause _very_ high poly meshes and annoy users (or worse crash) */
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
/******************** find nearest ************************/
@@ -3197,12 +3232,15 @@ static void findnearestNurbvert__doClosest(void *userData, Nurb *nu, BPoint *bp,
if (bp) {
flag = bp->f1;
- } else {
+ }
+ else {
if (beztindex==0) {
flag = bezt->f1;
- } else if (beztindex==1) {
+ }
+ else if (beztindex==1) {
flag = bezt->f2;
- } else {
+ }
+ else {
flag = bezt->f3;
}
}
@@ -3256,19 +3294,19 @@ static void findselectedNurbvert(ListBase *editnurb, Nurb **nu, BezTriple **bezt
*nu= NULL;
*bezt= NULL;
*bp= NULL;
- for(nu1= editnurb->first; nu1; nu1= nu1->next) {
- if(nu1->type == CU_BEZIER) {
+ for (nu1= editnurb->first; nu1; nu1= nu1->next) {
+ if (nu1->type == CU_BEZIER) {
bezt1= nu1->bezt;
a= nu1->pntsu;
- while(a--) {
- if( (bezt1->f1 & SELECT) || (bezt1->f2 & SELECT) || (bezt1->f3 & SELECT) ) {
- if(*nu != NULL && *nu != nu1) {
+ while (a--) {
+ if ( (bezt1->f1 & SELECT) || (bezt1->f2 & SELECT) || (bezt1->f3 & SELECT) ) {
+ if (*nu != NULL && *nu != nu1) {
*nu= NULL;
*bp= NULL;
*bezt= NULL;
return;
}
- else if(*bezt || *bp) {
+ else if (*bezt || *bp) {
*bp= NULL;
*bezt= NULL;
}
@@ -3283,15 +3321,15 @@ static void findselectedNurbvert(ListBase *editnurb, Nurb **nu, BezTriple **bezt
else {
bp1= nu1->bp;
a= nu1->pntsu*nu1->pntsv;
- while(a--) {
- if( bp1->f1 & 1 ) {
- if(*nu != NULL && *nu != nu1) {
+ while (a--) {
+ if ( bp1->f1 & 1 ) {
+ if (*nu != NULL && *nu != nu1) {
*bp= NULL;
*bezt= NULL;
*nu= NULL;
return;
}
- else if(*bezt || *bp) {
+ else if (*bezt || *bp) {
*bp= NULL;
*bezt= NULL;
}
@@ -3314,15 +3352,15 @@ static int convertspline(short type, Nurb *nu)
BPoint *bp;
int a, c, nr;
- if(nu->type == CU_POLY) {
- if(type==CU_BEZIER) { /* to Bezier with vecthandles */
+ if (nu->type == CU_POLY) {
+ if (type==CU_BEZIER) { /* to Bezier with vecthandles */
nr= nu->pntsu;
bezt =
(BezTriple*)MEM_callocN(nr * sizeof(BezTriple), "setsplinetype2");
nu->bezt= bezt;
a= nr;
bp= nu->bp;
- while(a--) {
+ while (a--) {
copy_v3_v3(bezt->vec[1], bp->vec);
bezt->f1=bezt->f2=bezt->f3= bp->f1;
bezt->h1= bezt->h2= HD_VECT;
@@ -3337,28 +3375,28 @@ static int convertspline(short type, Nurb *nu)
nu->type = CU_BEZIER;
calchandlesNurb(nu);
}
- else if(type==CU_NURBS) {
+ else if (type==CU_NURBS) {
nu->type = CU_NURBS;
nu->orderu= 4;
nu->flagu &= CU_NURB_CYCLIC; /* disable all flags except for cyclic */
nurbs_knot_calc_u(nu);
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- while(a--) {
+ while (a--) {
bp->vec[3]= 1.0;
bp++;
}
}
}
- else if(nu->type == CU_BEZIER) { /* Bezier */
- if(type==CU_POLY || type==CU_NURBS) {
+ else if (nu->type == CU_BEZIER) { /* Bezier */
+ if (type==CU_POLY || type==CU_NURBS) {
nr= 3*nu->pntsu;
nu->bp = MEM_callocN(nr * sizeof(BPoint), "setsplinetype");
a= nu->pntsu;
bezt= nu->bezt;
bp= nu->bp;
- while(a--) {
- if(type==CU_POLY && bezt->h1==HD_VECT && bezt->h2==HD_VECT) {
+ while (a--) {
+ if (type==CU_POLY && bezt->h1==HD_VECT && bezt->h2==HD_VECT) {
/* vector handle becomes 1 poly vertice */
copy_v3_v3(bp->vec, bezt->vec[1]);
bp->vec[3]= 1.0;
@@ -3369,11 +3407,11 @@ static int convertspline(short type, Nurb *nu)
bp++;
}
else {
- for(c=0;c<3;c++) {
+ for (c=0;c<3;c++) {
copy_v3_v3(bp->vec, bezt->vec[c]);
bp->vec[3]= 1.0;
- if(c==0) bp->f1= bezt->f1;
- else if(c==1) bp->f1= bezt->f2;
+ if (c==0) bp->f1= bezt->f1;
+ else if (c==1) bp->f1= bezt->f2;
else bp->f1= bezt->f3;
bp->radius= bezt->radius;
bp->weight= bezt->weight;
@@ -3391,36 +3429,36 @@ static int convertspline(short type, Nurb *nu)
nu->type = type;
#if 0 /* UNUSED */
- if(nu->flagu & CU_NURB_CYCLIC) c= nu->orderu-1;
+ if (nu->flagu & CU_NURB_CYCLIC) c= nu->orderu-1;
else c= 0;
#endif
- if(type== CU_NURBS) {
+ if (type== CU_NURBS) {
nu->flagu &= CU_NURB_CYCLIC; /* disable all flags except for cyclic */
nu->flagu |= CU_NURB_BEZIER;
nurbs_knot_calc_u(nu);
}
}
}
- else if(nu->type == CU_NURBS) {
- if(type==CU_POLY) {
+ else if (nu->type == CU_NURBS) {
+ if (type==CU_POLY) {
nu->type = CU_POLY;
- if(nu->knotsu) MEM_freeN(nu->knotsu); /* python created nurbs have a knotsu of zero */
+ if (nu->knotsu) MEM_freeN(nu->knotsu); /* python created nurbs have a knotsu of zero */
nu->knotsu= NULL;
- if(nu->knotsv) MEM_freeN(nu->knotsv);
+ if (nu->knotsv) MEM_freeN(nu->knotsv);
nu->knotsv= NULL;
}
- else if(type==CU_BEZIER) { /* to Bezier */
+ else if (type==CU_BEZIER) { /* to Bezier */
nr= nu->pntsu/3;
- if(nr<2)
+ if (nr<2)
return 1; /* conversion impossible */
else {
bezt = MEM_callocN(nr * sizeof(BezTriple), "setsplinetype2");
nu->bezt= bezt;
a= nr;
bp= nu->bp;
- while(a--) {
+ while (a--) {
copy_v3_v3(bezt->vec[0], bp->vec);
bezt->f1= bp->f1;
bp++;
@@ -3459,22 +3497,22 @@ static int set_spline_type_exec(bContext *C, wmOperator *op)
Nurb *nu;
int changed=0, type= RNA_enum_get(op->ptr, "type");
- if(type==CU_CARDINAL || type==CU_BSPLINE) {
+ if (type==CU_CARDINAL || type==CU_BSPLINE) {
BKE_report(op->reports, RPT_ERROR, "Not implemented yet");
return OPERATOR_CANCELLED;
}
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(isNurbsel(nu)) {
- if(convertspline(type, nu))
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (isNurbsel(nu)) {
+ if (convertspline(type, nu))
BKE_report(op->reports, RPT_ERROR, "No conversion possible");
else
changed= 1;
}
}
- if(changed) {
- if(ED_curve_updateAnimPaths(obedit))
+ if (changed) {
+ if (ED_curve_updateAnimPaths(obedit))
WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
DAG_id_tag_update(obedit->data, 0);
@@ -3498,20 +3536,20 @@ void CURVE_OT_spline_type_set(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Set Spline Type";
+ ot->name = "Set Spline Type";
ot->description = "Set type of active spline";
- ot->idname= "CURVE_OT_spline_type_set";
+ ot->idname = "CURVE_OT_spline_type_set";
/* api callbacks */
- ot->exec= set_spline_type_exec;
- ot->invoke= WM_menu_invoke;
- ot->poll= ED_operator_editcurve;
+ ot->exec = set_spline_type_exec;
+ ot->invoke = WM_menu_invoke;
+ ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", type_items, CU_POLY, "Type", "Spline type");
+ ot->prop = RNA_def_enum(ot->srna, "type", type_items, CU_POLY, "Type", "Spline type");
}
/***************** set handle type operator *******************/
@@ -3541,20 +3579,20 @@ void CURVE_OT_handle_type_set(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Set Handle Type";
+ ot->name = "Set Handle Type";
ot->description = "Set type of handles for selected control points";
- ot->idname= "CURVE_OT_handle_type_set";
+ ot->idname = "CURVE_OT_handle_type_set";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= set_handle_type_exec;
- ot->poll= ED_operator_editcurve;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = set_handle_type_exec;
+ ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", editcurve_handle_type_items, 1, "Type", "Spline type");
+ ot->prop = RNA_def_enum(ot->srna, "type", editcurve_handle_type_items, 1, "Type", "Spline type");
}
/***************** make segment operator **********************/
@@ -3566,14 +3604,14 @@ static void switchdirection_knots(float *base, int tot)
float *fp1, *fp2, *tempf;
int a;
- if(base==NULL || tot==0) return;
+ if (base==NULL || tot==0) return;
/* reverse knots */
a= tot;
fp1= base;
fp2= fp1+(a-1);
a/= 2;
- while(fp1!=fp2 && a>0) {
+ while (fp1!=fp2 && a>0) {
SWAP(float, *fp1, *fp2);
a--;
fp1++;
@@ -3583,7 +3621,7 @@ static void switchdirection_knots(float *base, int tot)
a= tot;
fp1= base;
fp2=tempf= MEM_mallocN(sizeof(float)*a, "switchdirect");
- while(a--) {
+ while (a--) {
fp2[0]= fabs(fp1[1]-fp1[0]);
fp1++;
fp2++;
@@ -3594,7 +3632,7 @@ static void switchdirection_knots(float *base, int tot)
fp2= tempf;
fp1[0]= 0.0;
fp1++;
- while(a--) {
+ while (a--) {
fp1[0]= fp1[-1]+fp2[0];
fp1++;
fp2++;
@@ -3617,8 +3655,8 @@ static void rotate_direction_nurb(Nurb *nu)
temp= MEM_dupallocN(nu->bp);
bp1= nu->bp;
- for(v=0; v<nu->pntsv; v++) {
- for(u=0; u<nu->pntsu; u++, bp1++) {
+ for (v=0; v<nu->pntsv; v++) {
+ for (u=0; u<nu->pntsu; u++, bp1++) {
bp2= temp + (nu->pntsu-u-1)*(nu->pntsv) + v;
*bp1= *bp2;
}
@@ -3634,8 +3672,8 @@ static int is_u_selected(Nurb *nu, int u)
/* what about resolu == 2? */
bp= nu->bp+u;
- for(v=0; v<nu->pntsv-1; v++, bp+=nu->pntsu) {
- if(v) if(bp->f1 & SELECT) return 1;
+ for (v=0; v<nu->pntsv-1; v++, bp+=nu->pntsu) {
+ if (v) if (bp->f1 & SELECT) return 1;
}
return 0;
@@ -3659,8 +3697,8 @@ static void make_selection_list_nurb(ListBase *editnurb)
float dist, headdist, taildist;
int a;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if( isNurbsel(nu) ) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if ( isNurbsel(nu) ) {
nus = (NurbSort*)MEM_callocN(sizeof(NurbSort), "sort");
BLI_addhead(&nbase, nus);
@@ -3668,7 +3706,7 @@ static void make_selection_list_nurb(ListBase *editnurb)
bp= nu->bp;
a= nu->pntsu;
- while(a--) {
+ while (a--) {
add_v3_v3(nus->vec, bp->vec);
bp++;
}
@@ -3684,29 +3722,29 @@ static void make_selection_list_nurb(ListBase *editnurb)
BLI_addtail( &nsortbase, nus);
/* now add, either at head or tail, the closest one */
- while(nbase.first) {
+ while (nbase.first) {
headdist= taildist= 1.0e30;
headdo= taildo= NULL;
nustest= nbase.first;
- while(nustest) {
+ while (nustest) {
dist= len_v3v3(nustest->vec, ((NurbSort *)nsortbase.first)->vec);
- if(dist<headdist) {
+ if (dist<headdist) {
headdist= dist;
headdo= nustest;
}
dist= len_v3v3(nustest->vec, ((NurbSort *)nsortbase.last)->vec);
- if(dist<taildist) {
+ if (dist<taildist) {
taildist= dist;
taildo= nustest;
}
nustest= nustest->next;
}
- if(headdist<taildist) {
+ if (headdist<taildist) {
BLI_remlink(&nbase, headdo);
BLI_addhead(&nsortbase, headdo);
}
@@ -3728,23 +3766,23 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
/* first nurbs: u = resolu-1 selected */
- if( is_u_selected(nu1, nu1->pntsu-1) );
+ if ( is_u_selected(nu1, nu1->pntsu-1) );
else {
/* For 2D curves blender uses orderv=0. It doesn't make any sense mathematically. */
/* but after rotating orderu=0 will be confusing. */
if (nu1->orderv == 0) nu1->orderv= 1;
rotate_direction_nurb(nu1);
- if( is_u_selected(nu1, nu1->pntsu-1) );
+ if ( is_u_selected(nu1, nu1->pntsu-1) );
else {
rotate_direction_nurb(nu1);
- if( is_u_selected(nu1, nu1->pntsu-1) );
+ if ( is_u_selected(nu1, nu1->pntsu-1) );
else {
rotate_direction_nurb(nu1);
- if( is_u_selected(nu1, nu1->pntsu-1) );
+ if ( is_u_selected(nu1, nu1->pntsu-1) );
else {
/* rotate again, now its OK! */
- if(nu1->pntsv!=1) rotate_direction_nurb(nu1);
+ if (nu1->pntsv!=1) rotate_direction_nurb(nu1);
return;
}
}
@@ -3752,28 +3790,28 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
}
/* 2nd nurbs: u = 0 selected */
- if( is_u_selected(nu2, 0) );
+ if ( is_u_selected(nu2, 0) );
else {
if (nu2->orderv == 0) nu2->orderv= 1;
rotate_direction_nurb(nu2);
- if( is_u_selected(nu2, 0) );
+ if ( is_u_selected(nu2, 0) );
else {
rotate_direction_nurb(nu2);
- if( is_u_selected(nu2, 0) );
+ if ( is_u_selected(nu2, 0) );
else {
rotate_direction_nurb(nu2);
- if( is_u_selected(nu2, 0) );
+ if ( is_u_selected(nu2, 0) );
else {
/* rotate again, now its OK! */
- if(nu1->pntsu==1) rotate_direction_nurb(nu1);
- if(nu2->pntsv!=1) rotate_direction_nurb(nu2);
+ if (nu1->pntsu==1) rotate_direction_nurb(nu1);
+ if (nu2->pntsv!=1) rotate_direction_nurb(nu2);
return;
}
}
}
}
- if( nu1->pntsv != nu2->pntsv ) {
+ if ( nu1->pntsv != nu2->pntsv ) {
BKE_report(op->reports, RPT_ERROR, "Resolution doesn't match");
return;
}
@@ -3785,7 +3823,7 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
bp2= nu2->bp;
len1= 0.0;
- for(v=0; v<nu1->pntsv; v++, bp1+=nu1->pntsu, bp2+=nu2->pntsu) {
+ for (v=0; v<nu1->pntsv; v++, bp1+=nu1->pntsu, bp2+=nu2->pntsu) {
len1+= len_v3v3(bp1->vec, bp2->vec);
}
@@ -3793,29 +3831,29 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
bp2= nu2->bp + nu2->pntsu*(nu2->pntsv-1);
len2= 0.0;
- for(v=0; v<nu1->pntsv; v++, bp1+=nu1->pntsu, bp2-=nu2->pntsu) {
+ for (v=0; v<nu1->pntsv; v++, bp1+=nu1->pntsu, bp2-=nu2->pntsu) {
len2+= len_v3v3(bp1->vec, bp2->vec);
}
/* merge */
origu= nu1->pntsu;
nu1->pntsu+= nu2->pntsu;
- if(nu1->orderu<3 && nu1->orderu<nu1->pntsu) nu1->orderu++;
- if(nu1->orderv<3 && nu1->orderv<nu1->pntsv) nu1->orderv++;
+ if (nu1->orderu<3 && nu1->orderu<nu1->pntsu) nu1->orderu++;
+ if (nu1->orderv<3 && nu1->orderv<nu1->pntsv) nu1->orderv++;
temp= nu1->bp;
nu1->bp= MEM_mallocN(nu1->pntsu*nu1->pntsv*sizeof(BPoint), "mergeBP");
bp= nu1->bp;
bp1= temp;
- for(v=0; v<nu1->pntsv; v++) {
+ for (v=0; v<nu1->pntsv; v++) {
/* switch direction? */
- if(len1<len2) bp2= nu2->bp + v*nu2->pntsu;
+ if (len1<len2) bp2= nu2->bp + v*nu2->pntsu;
else bp2= nu2->bp + (nu1->pntsv-v-1)*nu2->pntsu;
- for(u=0; u<nu1->pntsu; u++, bp++) {
- if(u<origu) {
+ for (u=0; u<nu1->pntsu; u++, bp++) {
+ if (u<origu) {
*bp= *bp1; bp1++;
select_bpoint(bp, SELECT, 1, HIDDEN);
}
@@ -3825,7 +3863,7 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
}
}
- if(nu1->type == CU_NURBS) {
+ if (nu1->type == CU_NURBS) {
/* merge knots */
nurbs_knot_calc_u(nu1);
@@ -3847,7 +3885,7 @@ static int merge_nurb(bContext *C, wmOperator *op)
make_selection_list_nurb(editnurb);
- if(nsortbase.first == nsortbase.last) {
+ if (nsortbase.first == nsortbase.last) {
BLI_freelistN(&nsortbase);
BKE_report(op->reports, RPT_ERROR, "Too few selections to merge");
return OPERATOR_CANCELLED;
@@ -3857,27 +3895,27 @@ static int merge_nurb(bContext *C, wmOperator *op)
nus2= nus1->next;
/* resolution match, to avoid uv rotations */
- if(nus1->nu->pntsv==1) {
- if(nus1->nu->pntsu==nus2->nu->pntsu || nus1->nu->pntsu==nus2->nu->pntsv);
+ if (nus1->nu->pntsv==1) {
+ if (nus1->nu->pntsu==nus2->nu->pntsu || nus1->nu->pntsu==nus2->nu->pntsv);
else ok= 0;
}
- else if(nus2->nu->pntsv==1) {
- if(nus2->nu->pntsu==nus1->nu->pntsu || nus2->nu->pntsu==nus1->nu->pntsv);
+ else if (nus2->nu->pntsv==1) {
+ if (nus2->nu->pntsu==nus1->nu->pntsu || nus2->nu->pntsu==nus1->nu->pntsv);
else ok= 0;
}
- else if( nus1->nu->pntsu==nus2->nu->pntsu || nus1->nu->pntsv==nus2->nu->pntsv);
- else if( nus1->nu->pntsu==nus2->nu->pntsv || nus1->nu->pntsv==nus2->nu->pntsu);
+ else if ( nus1->nu->pntsu==nus2->nu->pntsu || nus1->nu->pntsv==nus2->nu->pntsv);
+ else if ( nus1->nu->pntsu==nus2->nu->pntsv || nus1->nu->pntsv==nus2->nu->pntsu);
else {
ok= 0;
}
- if(ok==0) {
+ if (ok==0) {
BKE_report(op->reports, RPT_ERROR, "Resolution doesn't match");
BLI_freelistN(&nsortbase);
return OPERATOR_CANCELLED;
}
- while(nus2) {
+ while (nus2) {
merge_2_nurb(op, editnurb, nus1->nu, nus2->nu);
nus2= nus2->next;
}
@@ -3904,18 +3942,18 @@ static int make_segment_exec(bContext *C, wmOperator *op)
int a, ok= 0;
/* first decide if this is a surface merge! */
- if(obedit->type==OB_SURF) nu= nubase->first;
+ if (obedit->type==OB_SURF) nu= nubase->first;
else nu= NULL;
- while(nu) {
- if( isNurbsel(nu) ) {
+ while (nu) {
+ if ( isNurbsel(nu) ) {
- if(nu->pntsu>1 && nu->pntsv>1) break;
- if(isNurbsel_count(cu, nu)>1) break;
- if(isNurbsel_count(cu, nu)==1) {
+ if (nu->pntsu>1 && nu->pntsv>1) break;
+ if (isNurbsel_count(cu, nu)>1) break;
+ if (isNurbsel_count(cu, nu)==1) {
/* only 1 selected, not first or last, a little complex, but intuitive */
- if(nu->pntsv==1) {
- if( (nu->bp->f1 & SELECT) || ((nu->bp+nu->pntsu-1)->f1 & SELECT));
+ if (nu->pntsv==1) {
+ if ( (nu->bp->f1 & SELECT) || ((nu->bp+nu->pntsu-1)->f1 & SELECT));
else break;
}
}
@@ -3923,62 +3961,62 @@ static int make_segment_exec(bContext *C, wmOperator *op)
nu= nu->next;
}
- if(nu)
+ if (nu)
return merge_nurb(C, op);
/* find both nurbs and points, nu1 will be put behind nu2 */
- for(nu= nubase->first; nu; nu= nu->next) {
- if(nu->pntsu == 1)
+ for (nu= nubase->first; nu; nu= nu->next) {
+ if (nu->pntsu == 1)
nu->flagu&= ~CU_NURB_CYCLIC;
- if((nu->flagu & CU_NURB_CYCLIC)==0) { /* not cyclic */
- if(nu->type == CU_BEZIER) {
- if(nu1==NULL) {
- if( BEZSELECTED_HIDDENHANDLES(cu, nu->bezt) ) nu1= nu;
+ if ((nu->flagu & CU_NURB_CYCLIC)==0) { /* not cyclic */
+ if (nu->type == CU_BEZIER) {
+ if (nu1==NULL) {
+ if ( BEZSELECTED_HIDDENHANDLES(cu, nu->bezt) ) nu1= nu;
else {
- if( BEZSELECTED_HIDDENHANDLES(cu, &(nu->bezt[nu->pntsu-1])) ) {
+ if ( BEZSELECTED_HIDDENHANDLES(cu, &(nu->bezt[nu->pntsu-1])) ) {
nu1= nu;
switchdirectionNurb(nu);
keyData_switchDirectionNurb(cu, nu);
}
}
}
- else if(nu2==NULL) {
- if( BEZSELECTED_HIDDENHANDLES(cu, nu->bezt) ) {
+ else if (nu2==NULL) {
+ if ( BEZSELECTED_HIDDENHANDLES(cu, nu->bezt) ) {
nu2= nu;
switchdirectionNurb(nu);
keyData_switchDirectionNurb(cu, nu);
}
else {
- if( BEZSELECTED_HIDDENHANDLES(cu, &(nu->bezt[nu->pntsu-1])) ) {
+ if ( BEZSELECTED_HIDDENHANDLES(cu, &(nu->bezt[nu->pntsu-1])) ) {
nu2= nu;
}
}
}
else break;
}
- else if(nu->pntsv==1) {
+ else if (nu->pntsv==1) {
bp= nu->bp;
- if(nu1==NULL) {
- if( bp->f1 & SELECT) nu1= nu;
+ if (nu1==NULL) {
+ if ( bp->f1 & SELECT) nu1= nu;
else {
bp= bp+(nu->pntsu-1);
- if( bp->f1 & SELECT ) {
+ if ( bp->f1 & SELECT ) {
nu1= nu;
switchdirectionNurb(nu);
keyData_switchDirectionNurb(cu, nu);
}
}
}
- else if(nu2==NULL) {
- if( bp->f1 & SELECT ) {
+ else if (nu2==NULL) {
+ if ( bp->f1 & SELECT ) {
nu2= nu;
switchdirectionNurb(nu);
keyData_switchDirectionNurb(cu, nu);
}
else {
bp= bp+(nu->pntsu-1);
- if( bp->f1 & SELECT ) {
+ if ( bp->f1 & SELECT ) {
nu2= nu;
}
}
@@ -3988,9 +4026,9 @@ static int make_segment_exec(bContext *C, wmOperator *op)
}
}
- if((nu1 && nu2) && (nu1!=nu2)) {
- if( nu1->type==nu2->type) {
- if(nu1->type == CU_BEZIER) {
+ if ((nu1 && nu2) && (nu1!=nu2)) {
+ if ( nu1->type==nu2->type) {
+ if (nu1->type == CU_BEZIER) {
BezTriple *bezt =
(BezTriple*)MEM_mallocN((nu1->pntsu+nu2->pntsu) * sizeof(BezTriple), "addsegmentN");
ED_curve_beztcpy(cu->editnurb, bezt, nu2->bezt, nu2->pntsu);
@@ -4017,8 +4055,8 @@ static int make_segment_exec(bContext *C, wmOperator *op)
BLI_remlink(nubase, nu2);
/* now join the knots */
- if(nu1->type == CU_NURBS) {
- if(nu1->knotsu==NULL) {
+ if (nu1->type == CU_NURBS) {
+ if (nu1->knotsu==NULL) {
nurbs_knot_calc_u(nu1);
}
else {
@@ -4030,8 +4068,8 @@ static int make_segment_exec(bContext *C, wmOperator *op)
offset= nu1->knotsu[a-1] + 1.0f;
fp= nu1->knotsu+a;
- for(a=0; a<nu2->pntsu; a++, fp++) {
- if(nu2->knotsu)
+ for (a=0; a<nu2->pntsu; a++, fp++) {
+ if (nu2->knotsu)
*fp= offset+nu2->knotsu[a+1];
else
*fp = offset;
@@ -4044,14 +4082,16 @@ static int make_segment_exec(bContext *C, wmOperator *op)
set_actNurb(obedit, nu1); /* for selected */
ok= 1;
}
- } else if(nu1 && !nu2) {
- if(!(nu1->flagu & CU_NURB_CYCLIC) && nu1->pntsu>1) {
+ }
+ else if (nu1 && !nu2) {
+ if (!(nu1->flagu & CU_NURB_CYCLIC) && nu1->pntsu>1) {
if (nu1->type == CU_BEZIER && BEZSELECTED_HIDDENHANDLES(cu, nu1->bezt) &&
BEZSELECTED_HIDDENHANDLES(cu, nu1->bezt+(nu1->pntsu-1))) {
nu1->flagu|= CU_NURB_CYCLIC;
calchandlesNurb(nu1);
ok= 1;
- } else if (nu1->type == CU_NURBS && nu1->bp->f1&SELECT && (nu1->bp+(nu1->pntsu-1))->f1&SELECT) {
+ }
+ else if (nu1->type == CU_NURBS && nu1->bp->f1&SELECT && (nu1->bp+(nu1->pntsu-1))->f1&SELECT) {
nu1->flagu|= CU_NURB_CYCLIC;
nurbs_knot_calc_u(nu1);
ok= 1;
@@ -4059,12 +4099,12 @@ static int make_segment_exec(bContext *C, wmOperator *op)
}
}
- if(!ok) {
+ if (!ok) {
BKE_report(op->reports, RPT_ERROR, "Can't make segment");
return OPERATOR_CANCELLED;
}
- if(ED_curve_updateAnimPaths(obedit))
+ if (ED_curve_updateAnimPaths(obedit))
WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
@@ -4076,15 +4116,15 @@ static int make_segment_exec(bContext *C, wmOperator *op)
void CURVE_OT_make_segment(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Segment";
- ot->idname= "CURVE_OT_make_segment";
+ ot->name = "Make Segment";
+ ot->idname = "CURVE_OT_make_segment";
/* api callbacks */
- ot->exec= make_segment_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = make_segment_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/***************** pick select from 3d view **********************/
@@ -4108,18 +4148,19 @@ int mouse_nurb(bContext *C, const int mval[2], int extend)
location[1]= mval[1];
hand= findnearestNurbvert(&vc, 1, location, &nu, &bezt, &bp);
- if(bezt || bp) {
- if(extend==0) {
+ if (bezt || bp) {
+ if (extend==0) {
setflagsNurb(editnurb, 0);
- if(bezt) {
+ if (bezt) {
- if(hand==1) {
+ if (hand==1) {
select_beztriple(bezt, SELECT, 1, HIDDEN);
cu->lastsel= bezt;
- } else {
- if(hand==0) bezt->f1|= SELECT;
+ }
+ else {
+ if (hand==0) bezt->f1|= SELECT;
else bezt->f3|= SELECT;
cu->lastsel= NULL;
@@ -4132,26 +4173,30 @@ int mouse_nurb(bContext *C, const int mval[2], int extend)
}
else {
- if(bezt) {
- if(hand==1) {
- if(bezt->f2 & SELECT) {
+ if (bezt) {
+ if (hand==1) {
+ if (bezt->f2 & SELECT) {
select_beztriple(bezt, DESELECT, 1, HIDDEN);
if (bezt == cu->lastsel) cu->lastsel = NULL;
- } else {
+ }
+ else {
select_beztriple(bezt, SELECT, 1, HIDDEN);
cu->lastsel= bezt;
}
- } else if(hand==0) {
+ }
+ else if (hand==0) {
bezt->f1 ^= SELECT;
- } else {
+ }
+ else {
bezt->f3 ^= SELECT;
}
}
else {
- if(bp->f1 & SELECT) {
+ if (bp->f1 & SELECT) {
select_bpoint(bp, DESELECT, 1, HIDDEN);
if (cu->lastsel == bp) cu->lastsel = NULL;
- } else {
+ }
+ else {
select_bpoint(bp, SELECT, 1, HIDDEN);
cu->lastsel= bp;
}
@@ -4159,7 +4204,7 @@ int mouse_nurb(bContext *C, const int mval[2], int extend)
}
- if(nu!=get_actNurb(obedit))
+ if (nu!=get_actNurb(obedit))
set_actNurb(obedit, nu);
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
@@ -4223,17 +4268,17 @@ static int spin_nurb(float viewmat[][4], Object *obedit, float *axis, float *cen
ok= 1;
- for(a=0;a<7;a++) {
+ for (a=0;a<7;a++) {
ok= extrudeflagNurb(cu->editnurb, 1);
- if(ok==0)
+ if (ok==0)
return changed;
changed= 1;
rotateflagNurb(editnurb, SELECT, cent, rotmat);
- if( (a & SELECT)==0 ) {
+ if ( (a & SELECT)==0 ) {
rotateflagNurb(editnurb, SELECT, cent, scalemat1);
weightflagNurb(editnurb, SELECT, 0.25*M_SQRT2);
}
@@ -4243,9 +4288,9 @@ static int spin_nurb(float viewmat[][4], Object *obedit, float *axis, float *cen
}
}
- if(ok) {
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(isNurbsel(nu)) {
+ if (ok) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (isNurbsel(nu)) {
nu->orderv= 4;
nu->flagv |= CU_NURB_CYCLIC;
nurbs_knot_calc_v(nu);
@@ -4268,17 +4313,17 @@ static int spin_exec(bContext *C, wmOperator *op)
invert_m4_m4(obedit->imat, obedit->obmat);
mul_m4_v3(obedit->imat, cent);
- if(rv3d)
+ if (rv3d)
copy_m4_m4(viewmat, rv3d->viewmat);
else
unit_m4(viewmat);
- if(!spin_nurb(viewmat, obedit, axis, cent)) {
+ if (!spin_nurb(viewmat, obedit, axis, cent)) {
BKE_report(op->reports, RPT_ERROR, "Can't spin");
return OPERATOR_CANCELLED;
}
- if(ED_curve_updateAnimPaths(obedit))
+ if (ED_curve_updateAnimPaths(obedit))
WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
@@ -4294,7 +4339,7 @@ static int spin_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
RegionView3D *rv3d= ED_view3d_context_rv3d(C);
float axis[3]= {0.0f, 0.0f, 1.0f};
- if(rv3d)
+ if (rv3d)
copy_v3_v3(axis, rv3d->viewinv[2]);
RNA_float_set_array(op->ptr, "center", give_cursor(scene, v3d));
@@ -4306,16 +4351,16 @@ static int spin_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void CURVE_OT_spin(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Spin";
- ot->idname= "CURVE_OT_spin";
+ ot->name = "Spin";
+ ot->idname = "CURVE_OT_spin";
/* api callbacks */
- ot->exec= spin_exec;
+ ot->exec = spin_exec;
ot->invoke = spin_invoke;
- ot->poll= ED_operator_editsurf;
+ ot->poll = ED_operator_editsurf;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_float_vector_xyz(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX, "Center", "Center in global view space", -FLT_MAX, FLT_MAX);
RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, "Axis", "Axis in global view space", -FLT_MAX, FLT_MAX);
@@ -4339,11 +4384,11 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
findselectedNurbvert(&editnurb->nurbs, &nu, &bezt, &bp);
if ((nu == NULL) || (nu->type==CU_BEZIER && bezt==NULL) || (nu->type!=CU_BEZIER && bp==NULL)) {
- if(mode!='e') {
- if(cu->actnu >= 0)
+ if (mode!='e') {
+ if (cu->actnu >= 0)
nu= BLI_findlink(&editnurb->nurbs, cu->actnu);
- if(!nu || nu->type==CU_BEZIER) {
+ if (!nu || nu->type==CU_BEZIER) {
newbezt= (BezTriple*)MEM_callocN(sizeof(BezTriple), "addvert_Nurb");
newbezt->radius= 1;
newbezt->alfa= 0;
@@ -4351,14 +4396,15 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
newbezt->h2= newbezt->h1= HD_AUTO;
newnu= (Nurb*)MEM_callocN(sizeof(Nurb), "addvert_Nurb newnu");
- if(!nu) {
+ if (!nu) {
/* no selected sement -- create new one which is BEZIER tpye
* type couldn't be determined from Curve bt could be changed
* in the future, so shouldn't make much headache */
newnu->type= CU_BEZIER;
newnu->resolu= cu->resolu;
newnu->flag |= CU_SMOOTH;
- } else memcpy(newnu, nu, sizeof(Nurb));
+ }
+ else memcpy(newnu, nu, sizeof(Nurb));
BLI_addtail(&editnurb->nurbs, newnu);
set_actNurb(obedit, newnu);
@@ -4379,7 +4425,8 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
ok= 1;
nu= newnu;
- } else if(nu->pntsv == 1) {
+ }
+ else if (nu->pntsv == 1) {
newbp= (BPoint*)MEM_callocN(sizeof(BPoint), "addvert_Nurb5");
newbp->radius= 1;
newbp->alfa= 0;
@@ -4406,13 +4453,13 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
}
- if(!ok)
+ if (!ok)
return OPERATOR_CANCELLED;
}
- if(!ok && nu->type == CU_BEZIER) {
+ if (!ok && nu->type == CU_BEZIER) {
/* which bezpoint? */
- if(bezt== (nu->bezt+nu->pntsu-1)) { /* last */
+ if (bezt== (nu->bezt+nu->pntsu-1)) { /* last */
BEZ_DESEL(bezt);
newbezt =
(BezTriple*)MEM_callocN((nu->pntsu+1) * sizeof(BezTriple), "addvert_Nurb");
@@ -4428,7 +4475,7 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
bezt= nu->bezt+nu->pntsu-1;
ok= 1;
}
- else if(bezt== nu->bezt) { /* first */
+ else if (bezt== nu->bezt) { /* first */
BEZ_DESEL(bezt);
newbezt =
(BezTriple*)MEM_callocN((nu->pntsu+1) * sizeof(BezTriple), "addvert_Nurb");
@@ -4443,7 +4490,7 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
bezt= newbezt+1;
ok= 1;
}
- else if(mode!='e') {
+ else if (mode!='e') {
BEZ_DESEL(bezt);
newbezt= (BezTriple*)MEM_callocN(sizeof(BezTriple), "addvert_Nurb");
*newbezt= *bezt;
@@ -4465,10 +4512,10 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
}
else bezt= NULL;
- if(bezt) {
- if(!newnu) nu->pntsu++;
+ if (bezt) {
+ if (!newnu) nu->pntsu++;
- if(mode=='e') {
+ if (mode=='e') {
copy_v3_v3(newbezt->vec[0], bezt->vec[0]);
copy_v3_v3(newbezt->vec[1], bezt->vec[1]);
copy_v3_v3(newbezt->vec[2], bezt->vec[2]);
@@ -4479,14 +4526,14 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
add_v3_v3v3(newbezt->vec[0], bezt->vec[0],temp);
add_v3_v3v3(newbezt->vec[2], bezt->vec[2],temp);
- if(newnu) calchandlesNurb(newnu);
+ if (newnu) calchandlesNurb(newnu);
else calchandlesNurb(nu);
}
}
}
- else if(!ok && nu->pntsv==1) {
+ else if (!ok && nu->pntsv==1) {
/* which b-point? */
- if(bp== (nu->bp+nu->pntsu-1)) { /* last */
+ if (bp== (nu->bp+nu->pntsu-1)) { /* last */
bp->f1= 0;
newbp =
(BPoint*)MEM_callocN((nu->pntsu+1) * sizeof(BPoint), "addvert_Nurb4");
@@ -4500,7 +4547,7 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
bp= newbp - 1;
ok= 1;
}
- else if(bp== nu->bp) { /* first */
+ else if (bp== nu->bp) { /* first */
bp->f1= 0;
newbp =
(BPoint*)MEM_callocN((nu->pntsu+1) * sizeof(BPoint), "addvert_Nurb3");
@@ -4513,7 +4560,7 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
bp= newbp + 1;
ok= 1;
}
- else if(mode!='e') {
+ else if (mode!='e') {
bp->f1= 0;
newbp= (BPoint*)MEM_callocN(sizeof(BPoint), "addvert_Nurb5");
*newbp= *bp;
@@ -4534,29 +4581,30 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
}
else bp= NULL;
- if(bp) {
- if(mode=='e') {
+ if (bp) {
+ if (mode=='e') {
copy_v3_v3(newbp->vec, bp->vec);
}
else {
mul_v3_m4v3(newbp->vec, imat, location);
newbp->vec[3]= 1.0;
- if(!newnu && nu->orderu<4 && nu->orderu<=nu->pntsu)
+ if (!newnu && nu->orderu<4 && nu->orderu<=nu->pntsu)
nu->orderu++;
}
- if(!newnu) {
+ if (!newnu) {
nu->pntsu++;
nurbs_knot_calc_u(nu);
- } else nurbs_knot_calc_u(newnu);
+ }
+ else nurbs_knot_calc_u(newnu);
}
}
- if(ok) {
+ if (ok) {
test2DNurb(nu);
- if(ED_curve_updateAnimPaths(obedit))
+ if (ED_curve_updateAnimPaths(obedit))
WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
@@ -4580,7 +4628,7 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
RegionView3D *rv3d= CTX_wm_region_view3d(C);
- if(rv3d && !RNA_struct_property_is_set(op->ptr, "location")) {
+ if (rv3d && !RNA_struct_property_is_set(op->ptr, "location")) {
Curve *cu;
ViewContext vc;
float location[3];
@@ -4595,7 +4643,7 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, wmEvent *event)
findselectedNurbvert(&cu->editnurb->nurbs, &nu, &bezt, &bp);
- if(bezt) {
+ if (bezt) {
mul_v3_m4v3(location, vc.obedit->obmat, bezt->vec[1]);
}
else if (bp) {
@@ -4615,16 +4663,16 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, wmEvent *event)
void CURVE_OT_vertex_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Vertex";
- ot->idname= "CURVE_OT_vertex_add";
+ ot->name = "Add Vertex";
+ ot->idname = "CURVE_OT_vertex_add";
/* api callbacks */
- ot->exec= add_vertex_exec;
- ot->invoke= add_vertex_invoke;
- ot->poll= ED_operator_editcurve;
+ ot->exec = add_vertex_exec;
+ ot->invoke = add_vertex_invoke;
+ ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location to add new vertex at", -1e4, 1e4);
@@ -4640,16 +4688,16 @@ static int extrude_exec(bContext *C, wmOperator *UNUSED(op))
Nurb *nu;
/* first test: curve? */
- for(nu= editnurb->nurbs.first; nu; nu= nu->next)
- if(nu->pntsv==1 && isNurbsel_count(cu, nu)==1)
+ for (nu= editnurb->nurbs.first; nu; nu= nu->next)
+ if (nu->pntsv==1 && isNurbsel_count(cu, nu)==1)
break;
- if(obedit->type==OB_CURVE || nu) {
+ if (obedit->type==OB_CURVE || nu) {
addvert_Nurb(C, 'e', NULL);
}
else {
- if(extrudeflagNurb(editnurb, 1)) { /* '1'= flag */
- if(ED_curve_updateAnimPaths(obedit))
+ if (extrudeflagNurb(editnurb, 1)) { /* '1'= flag */
+ if (ED_curve_updateAnimPaths(obedit))
WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
@@ -4663,16 +4711,16 @@ static int extrude_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_extrude(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Extrude";
+ ot->name = "Extrude";
ot->description = "Extrude selected control point(s) and move";
- ot->idname= "CURVE_OT_extrude";
+ ot->idname = "CURVE_OT_extrude";
/* api callbacks */
- ot->exec= extrude_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = extrude_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* to give to transform */
RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
@@ -4690,24 +4738,24 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
BPoint *bp;
int a, direction= RNA_enum_get(op->ptr, "direction");
- for(nu= editnurb->first; nu; nu= nu->next) {
- if( nu->pntsu>1 || nu->pntsv>1) {
- if(nu->type == CU_POLY) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if ( nu->pntsu>1 || nu->pntsv>1) {
+ if (nu->type == CU_POLY) {
a= nu->pntsu;
bp= nu->bp;
- while(a--) {
- if( bp->f1 & SELECT ) {
+ while (a--) {
+ if ( bp->f1 & SELECT ) {
nu->flagu ^= CU_NURB_CYCLIC;
break;
}
bp++;
}
}
- else if(nu->type == CU_BEZIER) {
+ else if (nu->type == CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
- while(a--) {
- if( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ while (a--) {
+ if ( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
nu->flagu ^= CU_NURB_CYCLIC;
break;
}
@@ -4715,12 +4763,12 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
}
calchandlesNurb(nu);
}
- else if(nu->pntsv==1 && nu->type == CU_NURBS) {
+ else if (nu->pntsv==1 && nu->type == CU_NURBS) {
if (nu->knotsu) { /* if check_valid_nurb_u fails the knotsu can be NULL */
a= nu->pntsu;
bp= nu->bp;
- while(a--) {
- if( bp->f1 & SELECT ) {
+ while (a--) {
+ if ( bp->f1 & SELECT ) {
nu->flagu ^= CU_NURB_CYCLIC;
nurbs_knot_calc_u(nu); /* 1==u type is ignored for cyclic curves */
break;
@@ -4729,17 +4777,17 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
}
}
}
- else if(nu->type==CU_NURBS) {
+ else if (nu->type==CU_NURBS) {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- while(a--) {
+ while (a--) {
- if( bp->f1 & SELECT) {
- if(direction==0 && nu->pntsu>1) {
+ if ( bp->f1 & SELECT) {
+ if (direction==0 && nu->pntsu>1) {
nu->flagu ^= CU_NURB_CYCLIC;
nurbs_knot_calc_u(nu); /* 1==u type is ignored for cyclic curves */
}
- if(direction==1 && nu->pntsv>1) {
+ if (direction==1 && nu->pntsv>1) {
nu->flagv ^= CU_NURB_CYCLIC;
nurbs_knot_calc_v(nu); /* 2==v type is ignored for cyclic curves */
}
@@ -4766,10 +4814,10 @@ static int toggle_cyclic_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
uiLayout *layout;
Nurb *nu;
- if(obedit->type == OB_SURF) {
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->pntsu>1 || nu->pntsv>1) {
- if(nu->type==CU_NURBS) {
+ if (obedit->type == OB_SURF) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->pntsu>1 || nu->pntsv>1) {
+ if (nu->type==CU_NURBS) {
pup= uiPupMenuBegin(C, "Direction", ICON_NONE);
layout= uiPupMenuLayout(pup);
uiItemsEnumO(layout, op->type->idname, "direction");
@@ -4791,17 +4839,17 @@ void CURVE_OT_cyclic_toggle(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Toggle Cyclic";
+ ot->name = "Toggle Cyclic";
ot->description = "Make active spline closed/opened loop";
- ot->idname= "CURVE_OT_cyclic_toggle";
+ ot->idname = "CURVE_OT_cyclic_toggle";
/* api callbacks */
- ot->exec= toggle_cyclic_exec;
- ot->invoke= toggle_cyclic_invoke;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = toggle_cyclic_exec;
+ ot->invoke = toggle_cyclic_invoke;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to make surface cyclic in");
@@ -4820,15 +4868,15 @@ static int select_linked_exec(bContext *C, wmOperator *UNUSED(op))
BPoint *bp;
int a;
- for(nu= nurbs->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu= nurbs->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
- if( (bezt->f1 & SELECT) || (bezt->f2 & SELECT) || (bezt->f3 & SELECT) ) {
+ while (a--) {
+ if ( (bezt->f1 & SELECT) || (bezt->f2 & SELECT) || (bezt->f3 & SELECT) ) {
a= nu->pntsu;
bezt= nu->bezt;
- while(a--) {
+ while (a--) {
select_beztriple(bezt, SELECT, 1, VISIBLE);
bezt++;
}
@@ -4840,11 +4888,11 @@ static int select_linked_exec(bContext *C, wmOperator *UNUSED(op))
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
- if( bp->f1 & 1 ) {
+ while (a--) {
+ if ( bp->f1 & 1 ) {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- while(a--) {
+ while (a--) {
select_bpoint(bp, SELECT, 1, VISIBLE);
bp++;
}
@@ -4868,16 +4916,16 @@ static int select_linked_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
void CURVE_OT_select_linked(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Linked All";
- ot->idname= "CURVE_OT_select_linked";
+ ot->name = "Select Linked All";
+ ot->idname = "CURVE_OT_select_linked";
/* api callbacks */
- ot->exec= select_linked_exec;
- ot->invoke= select_linked_invoke;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = select_linked_exec;
+ ot->invoke = select_linked_invoke;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
}
@@ -4901,20 +4949,20 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event
findnearestNurbvert(&vc, 1, event->mval, &nu, &bezt, &bp);
- if(bezt) {
+ if (bezt) {
a= nu->pntsu;
bezt= nu->bezt;
- while(a--) {
- if(deselect) select_beztriple(bezt, DESELECT, 1, VISIBLE);
+ while (a--) {
+ if (deselect) select_beztriple(bezt, DESELECT, 1, VISIBLE);
else select_beztriple(bezt, SELECT, 1, VISIBLE);
bezt++;
}
}
- else if(bp) {
+ else if (bp) {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- while(a--) {
- if(deselect) select_bpoint(bp, DESELECT, 1, VISIBLE);
+ while (a--) {
+ if (deselect) select_bpoint(bp, DESELECT, 1, VISIBLE);
else select_bpoint(bp, SELECT, 1, VISIBLE);
bp++;
}
@@ -4928,15 +4976,15 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event
void CURVE_OT_select_linked_pick(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Linked";
- ot->idname= "CURVE_OT_select_linked_pick";
+ ot->name = "Select Linked";
+ ot->idname = "CURVE_OT_select_linked_pick";
/* api callbacks */
- ot->invoke= select_linked_pick_invoke;
- ot->poll= ED_operator_editsurfcurve_region_view3d;
+ ot->invoke = select_linked_pick_invoke;
+ ot->poll = ED_operator_editsurfcurve_region_view3d;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked control points rather than selecting them");
@@ -4955,41 +5003,41 @@ static int select_row_exec(bContext *C, wmOperator *UNUSED(op))
BPoint *bp;
int u = 0, v = 0, a, b, ok=0;
- if(editnurb->first == NULL)
+ if (editnurb->first == NULL)
return OPERATOR_CANCELLED;
- if(cu->lastsel==NULL)
+ if (cu->lastsel==NULL)
return OPERATOR_CANCELLED;
/* find the correct nurb and toggle with u of v */
- for(nu= editnurb->first; nu; nu= nu->next) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
bp= nu->bp;
- for(v=0; v<nu->pntsv; v++) {
- for(u=0; u<nu->pntsu; u++, bp++) {
- if(bp==cu->lastsel) {
- if(bp->f1 & SELECT) {
+ for (v=0; v<nu->pntsv; v++) {
+ for (u=0; u<nu->pntsu; u++, bp++) {
+ if (bp==cu->lastsel) {
+ if (bp->f1 & SELECT) {
ok= 1;
break;
}
}
}
- if(ok) break;
+ if (ok) break;
}
- if(ok) {
- if(last==cu->lastsel) {
+ if (ok) {
+ if (last==cu->lastsel) {
direction= 1-direction;
setflagsNurb(editnurb, 0);
}
last= cu->lastsel;
bp= nu->bp;
- for(a=0; a<nu->pntsv; a++) {
- for(b=0; b<nu->pntsu; b++, bp++) {
- if(direction) {
- if(a==v) select_bpoint(bp, SELECT, 1, VISIBLE);
+ for (a=0; a<nu->pntsv; a++) {
+ for (b=0; b<nu->pntsu; b++, bp++) {
+ if (direction) {
+ if (a==v) select_bpoint(bp, SELECT, 1, VISIBLE);
}
else {
- if(b==u) select_bpoint(bp, SELECT, 1, VISIBLE);
+ if (b==u) select_bpoint(bp, SELECT, 1, VISIBLE);
}
}
}
@@ -5006,15 +5054,15 @@ static int select_row_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_select_row(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Control Point Row";
- ot->idname= "CURVE_OT_select_row";
+ ot->name = "Select Control Point Row";
+ ot->idname = "CURVE_OT_select_row";
/* api callbacks */
- ot->exec= select_row_exec;
- ot->poll= ED_operator_editsurf;
+ ot->exec = select_row_exec;
+ ot->poll = ED_operator_editsurf;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/***************** select next operator **********************/
@@ -5033,15 +5081,15 @@ static int select_next_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_select_next(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Next";
- ot->idname= "CURVE_OT_select_next";
+ ot->name = "Select Next";
+ ot->idname = "CURVE_OT_select_next";
/* api callbacks */
- ot->exec= select_next_exec;
- ot->poll= ED_operator_editcurve;
+ ot->exec = select_next_exec;
+ ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/***************** select previous operator **********************/
@@ -5060,15 +5108,15 @@ static int select_previous_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_select_previous(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Previous";
- ot->idname= "CURVE_OT_select_previous";
+ ot->name = "Select Previous";
+ ot->idname = "CURVE_OT_select_previous";
/* api callbacks */
- ot->exec= select_previous_exec;
- ot->poll= ED_operator_editcurve;
+ ot->exec = select_previous_exec;
+ ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/***************** select more operator **********************/
@@ -5087,40 +5135,40 @@ static int select_more_exec(bContext *C, wmOperator *UNUSED(op))
/* the behavior of "select more" of mesh tools. */
/* The algorithm is designed to work in planar cases so it */
/* may not be optimal always (example: end of NURBS sphere) */
- if(obedit->type==OB_SURF) {
- for(nu= editnurb->first; nu; nu= nu->next) {
+ if (obedit->type==OB_SURF) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
selbpoints= MEM_callocN(sizeof(short)*a-nu->pntsu, "selectlist");
- while(a > 0) {
- if((selbpoints[a]!=1) && (bp->hide==0) && (bp->f1 & SELECT)) {
+ while (a > 0) {
+ if ((selbpoints[a]!=1) && (bp->hide==0) && (bp->f1 & SELECT)) {
/* upper control point */
- if(a%nu->pntsu != 0) {
+ if (a%nu->pntsu != 0) {
tempbp= bp-1;
- if(!(tempbp->f1 & SELECT)) select_bpoint(tempbp, SELECT, 1, VISIBLE);
+ if (!(tempbp->f1 & SELECT)) select_bpoint(tempbp, SELECT, 1, VISIBLE);
}
/* left control point. select only if it is not selected already */
- if(a-nu->pntsu > 0) {
+ if (a-nu->pntsu > 0) {
sel= 0;
tempbp= bp+nu->pntsu;
- if(!(tempbp->f1 & SELECT)) sel= select_bpoint(tempbp, SELECT, 1, VISIBLE);
+ if (!(tempbp->f1 & SELECT)) sel= select_bpoint(tempbp, SELECT, 1, VISIBLE);
/* make sure selected bpoint is discarded */
- if(sel == 1) selbpoints[a-nu->pntsu]= 1;
+ if (sel == 1) selbpoints[a-nu->pntsu]= 1;
}
/* right control point */
- if(a+nu->pntsu < nu->pntsu*nu->pntsv) {
+ if (a+nu->pntsu < nu->pntsu*nu->pntsv) {
tempbp= bp-nu->pntsu;
- if(!(tempbp->f1 & SELECT)) select_bpoint(tempbp, SELECT, 1, VISIBLE);
+ if (!(tempbp->f1 & SELECT)) select_bpoint(tempbp, SELECT, 1, VISIBLE);
}
/* lower control point. skip next bp in case selection was made */
- if(a%nu->pntsu != 1) {
+ if (a%nu->pntsu != 1) {
sel= 0;
tempbp= bp+1;
- if(!(tempbp->f1 & 1)) sel= select_bpoint(tempbp, SELECT, 1, VISIBLE);
- if(sel) {
+ if (!(tempbp->f1 & 1)) sel= select_bpoint(tempbp, SELECT, 1, VISIBLE);
+ if (sel) {
bp++;
a--;
}
@@ -5147,15 +5195,15 @@ static int select_more_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_select_more(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select More";
- ot->idname= "CURVE_OT_select_more";
+ ot->name = "Select More";
+ ot->idname = "CURVE_OT_select_more";
/* api callbacks */
- ot->exec= select_more_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = select_more_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/******************** select less operator *****************/
@@ -5172,46 +5220,46 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
short sel= 0, lastsel= 0;
short *selbpoints;
- if(obedit->type==OB_SURF) {
- for(nu= editnurb->first; nu; nu= nu->next) {
+ if (obedit->type==OB_SURF) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
selbpoints= MEM_callocN(sizeof(short)*a, "selectlist");
- while(a--) {
- if((bp->hide==0) && (bp->f1 & SELECT)) {
+ while (a--) {
+ if ((bp->hide==0) && (bp->f1 & SELECT)) {
sel= 0;
/* check if neighbors have been selected */
/* edges of surface are an exception */
- if((a+1)%nu->pntsu==0) sel++;
+ if ((a+1)%nu->pntsu==0) sel++;
else {
bp--;
- if((selbpoints[a+1]==1) || ((bp->hide==0) && (bp->f1 & SELECT))) sel++;
+ if ((selbpoints[a+1]==1) || ((bp->hide==0) && (bp->f1 & SELECT))) sel++;
bp++;
}
- if((a+1)%nu->pntsu==1) sel++;
+ if ((a+1)%nu->pntsu==1) sel++;
else {
bp++;
- if((bp->hide==0) && (bp->f1 & SELECT)) sel++;
+ if ((bp->hide==0) && (bp->f1 & SELECT)) sel++;
bp--;
}
- if(a+1 > nu->pntsu*nu->pntsv-nu->pntsu) sel++;
+ if (a+1 > nu->pntsu*nu->pntsv-nu->pntsu) sel++;
else {
bp-=nu->pntsu;
- if((selbpoints[a+nu->pntsu]==1) || ((bp->hide==0) && (bp->f1 & SELECT))) sel++;
+ if ((selbpoints[a+nu->pntsu]==1) || ((bp->hide==0) && (bp->f1 & SELECT))) sel++;
bp+=nu->pntsu;
}
- if(a < nu->pntsu) sel++;
+ if (a < nu->pntsu) sel++;
else {
bp+=nu->pntsu;
- if((bp->hide==0) && (bp->f1 & SELECT)) sel++;
+ if ((bp->hide==0) && (bp->f1 & SELECT)) sel++;
bp-=nu->pntsu;
}
- if(sel!=4) {
+ if (sel!=4) {
select_bpoint(bp, DESELECT, 1, VISIBLE);
selbpoints[a]= 1;
}
@@ -5225,34 +5273,34 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
}
}
else {
- for(nu= editnurb->first; nu; nu= nu->next) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
lastsel=0;
/* check what type of curve/nurb it is */
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
- while(a--) {
- if((bezt->hide==0) && (bezt->f2 & SELECT)) {
- if(lastsel==1) sel= 1;
+ while (a--) {
+ if ((bezt->hide==0) && (bezt->f2 & SELECT)) {
+ if (lastsel==1) sel= 1;
else sel= 0;
/* check if neighbors have been selected */
/* first and last are exceptions */
- if(a==nu->pntsu-1) sel++;
+ if (a==nu->pntsu-1) sel++;
else {
bezt--;
- if((bezt->hide==0) && (bezt->f2 & SELECT)) sel++;
+ if ((bezt->hide==0) && (bezt->f2 & SELECT)) sel++;
bezt++;
}
- if(a==0) sel++;
+ if (a==0) sel++;
else {
bezt++;
- if((bezt->hide==0) && (bezt->f2 & SELECT)) sel++;
+ if ((bezt->hide==0) && (bezt->f2 & SELECT)) sel++;
bezt--;
}
- if(sel!=2) {
+ if (sel!=2) {
select_beztriple(bezt, DESELECT, 1, VISIBLE);
lastsel= 1;
}
@@ -5266,27 +5314,27 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
else {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- while(a--) {
- if((lastsel==0) && (bp->hide==0) && (bp->f1 & SELECT)) {
- if(lastsel!=0) sel= 1;
+ while (a--) {
+ if ((lastsel==0) && (bp->hide==0) && (bp->f1 & SELECT)) {
+ if (lastsel!=0) sel= 1;
else sel= 0;
/* first and last are exceptions */
- if(a==nu->pntsu*nu->pntsv-1) sel++;
+ if (a==nu->pntsu*nu->pntsv-1) sel++;
else {
bp--;
- if((bp->hide==0) && (bp->f1 & SELECT)) sel++;
+ if ((bp->hide==0) && (bp->f1 & SELECT)) sel++;
bp++;
}
- if(a==0) sel++;
+ if (a==0) sel++;
else {
bp++;
- if((bp->hide==0) && (bp->f1 & SELECT)) sel++;
+ if ((bp->hide==0) && (bp->f1 & SELECT)) sel++;
bp--;
}
- if(sel!=2) {
+ if (sel!=2) {
select_bpoint(bp, DESELECT, 1, VISIBLE);
lastsel= 1;
}
@@ -5308,15 +5356,15 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_select_less(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Less";
- ot->idname= "CURVE_OT_select_less";
+ ot->name = "Select Less";
+ ot->idname = "CURVE_OT_select_less";
/* api callbacks */
- ot->exec= select_less_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = select_less_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** select random *********************/
@@ -5330,11 +5378,11 @@ static void selectrandom_curve(ListBase *editnurb, float randfac)
BLI_srand( BLI_rand() ); /* random seed */
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
+ while (a--) {
if (BLI_frand() < randfac)
select_beztriple(bezt, SELECT, 1, VISIBLE);
bezt++;
@@ -5344,7 +5392,7 @@ static void selectrandom_curve(ListBase *editnurb, float randfac)
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
+ while (a--) {
if (BLI_frand() < randfac)
select_bpoint(bp, SELECT, 1, VISIBLE);
bp++;
@@ -5358,7 +5406,7 @@ static int select_random_exec(bContext *C, wmOperator *op)
Object *obedit= CTX_data_edit_object(C);
ListBase *editnurb= object_editcurve_get(obedit);
- if(!RNA_boolean_get(op->ptr, "extend"))
+ if (!RNA_boolean_get(op->ptr, "extend"))
CU_deselect_all(obedit);
selectrandom_curve(editnurb, RNA_float_get(op->ptr, "percent")/100.0f);
@@ -5371,15 +5419,15 @@ static int select_random_exec(bContext *C, wmOperator *op)
void CURVE_OT_select_random(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Random";
- ot->idname= "CURVE_OT_select_random";
+ ot->name = "Select Random";
+ ot->idname = "CURVE_OT_select_random";
/* api callbacks */
- ot->exec= select_random_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = select_random_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of elements to select randomly", 0.f, 100.0f);
@@ -5393,7 +5441,8 @@ static int point_on_nurb(Nurb *nu, void *point)
if (nu->bezt) {
BezTriple *bezt= (BezTriple*)point;
return bezt >= nu->bezt && bezt < nu->bezt + nu->pntsu;
- } else {
+ }
+ else {
BPoint *bp= (BPoint*)point;
return bp >= nu->bp && bp < nu->bp + nu->pntsu * nu->pntsv;
}
@@ -5404,7 +5453,7 @@ static Nurb *get_lastsel_nurb(Curve *cu)
ListBase *nubase= curve_editnurbs(cu);
Nurb *nu= nubase->first;
- if(!cu->lastsel)
+ if (!cu->lastsel)
return NULL;
while (nu) {
@@ -5474,7 +5523,8 @@ int CU_select_nth(Object *obedit, int nth)
if (nu->bezt) {
select_nth_bezt(nu, cu->lastsel, nth);
- } else {
+ }
+ else {
select_nth_bp(nu, cu->lastsel, nth);
}
@@ -5489,7 +5539,8 @@ static int select_nth_exec(bContext *C, wmOperator *op)
if (!CU_select_nth(obedit, nth)) {
if (obedit->type == OB_SURF) {
BKE_report(op->reports, RPT_ERROR, "Surface hasn't got active point");
- } else {
+ }
+ else {
BKE_report(op->reports, RPT_ERROR, "Curve hasn't got active point");
}
@@ -5504,16 +5555,16 @@ static int select_nth_exec(bContext *C, wmOperator *op)
void CURVE_OT_select_nth(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Nth";
- ot->description= "";
- ot->idname= "CURVE_OT_select_nth";
+ ot->name = "Select Nth";
+ ot->description = "";
+ ot->idname = "CURVE_OT_select_nth";
/* api callbacks */
- ot->exec= select_nth_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = select_nth_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_int(ot->srna, "nth", 2, 2, 100, "Nth Selection", "", 1, INT_MAX);
}
@@ -5533,16 +5584,16 @@ static int duplicate_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_duplicate(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Duplicate Curve";
+ ot->name = "Duplicate Curve";
ot->description = "Duplicate selected control points and segments between them";
- ot->idname= "CURVE_OT_duplicate";
+ ot->idname = "CURVE_OT_duplicate";
/* api callbacks */
- ot->exec= duplicate_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = duplicate_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** delete operator *********************/
@@ -5559,14 +5610,15 @@ static int delete_exec(bContext *C, wmOperator *op)
int a, cut= 0, type= RNA_enum_get(op->ptr, "type");
int nuindex= 0;
- if(obedit->type==OB_SURF) {
- if(type==0) {
+ if (obedit->type==OB_SURF) {
+ if (type==0) {
deleteflagNurb(C, op, 1);
- } else {
+ }
+ else {
keyIndex_delNurbList(editnurb, nubase);
freeNurblist(nubase);
- if(ED_curve_updateAnimPaths(obedit))
+ if (ED_curve_updateAnimPaths(obedit))
WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
}
@@ -5576,24 +5628,24 @@ static int delete_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
- if(type==0) {
+ if (type==0) {
/* first loop, can we remove entire pieces? */
Nurb *next;
nu= nubase->first;
- while(nu) {
+ while (nu) {
next= nu->next;
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- if(a) {
- while(a) {
- if( BEZSELECTED_HIDDENHANDLES(cu, bezt) );
+ if (a) {
+ while (a) {
+ if ( BEZSELECTED_HIDDENHANDLES(cu, bezt) );
else break;
a--;
bezt++;
}
- if(a==0) {
- if(cu->actnu == nuindex)
+ if (a==0) {
+ if (cu->actnu == nuindex)
cu->actnu= -1;
BLI_remlink(nubase, nu);
@@ -5605,15 +5657,15 @@ static int delete_exec(bContext *C, wmOperator *op)
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- if(a) {
- while(a) {
- if(bp->f1 & SELECT);
+ if (a) {
+ while (a) {
+ if (bp->f1 & SELECT);
else break;
a--;
bp++;
}
- if(a==0) {
- if(cu->actnu == nuindex)
+ if (a==0) {
+ if (cu->actnu == nuindex)
cu->actnu= -1;
BLI_remlink(nubase, nu);
@@ -5635,14 +5687,14 @@ static int delete_exec(bContext *C, wmOperator *op)
}
/* 2nd loop, delete small pieces: just for curves */
nu= nubase->first;
- while(nu) {
+ while (nu) {
next= nu->next;
type= 0;
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
int delta= 0;
bezt= nu->bezt;
- for(a=0;a<nu->pntsu;a++) {
- if( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ for (a=0;a<nu->pntsu;a++) {
+ if ( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
memmove(bezt, bezt+1, (nu->pntsu-a-1)*sizeof(BezTriple));
keyIndex_delBezt(editnurb, bezt + delta);
keyIndex_updateBezt(editnurb, bezt + 1, bezt, nu->pntsu-a-1);
@@ -5653,7 +5705,7 @@ static int delete_exec(bContext *C, wmOperator *op)
}
else bezt++;
}
- if(type) {
+ if (type) {
bezt1 =
(BezTriple*)MEM_mallocN((nu->pntsu) * sizeof(BezTriple), "delNurb");
memcpy(bezt1, nu->bezt, (nu->pntsu)*sizeof(BezTriple) );
@@ -5663,12 +5715,12 @@ static int delete_exec(bContext *C, wmOperator *op)
calchandlesNurb(nu);
}
}
- else if(nu->pntsv==1) {
+ else if (nu->pntsv==1) {
int delta= 0;
bp= nu->bp;
- for(a=0;a<nu->pntsu;a++) {
- if( bp->f1 & SELECT ) {
+ for (a=0;a<nu->pntsu;a++) {
+ if ( bp->f1 & SELECT ) {
memmove(bp, bp+1, (nu->pntsu-a-1)*sizeof(BPoint));
keyIndex_delBP(editnurb, bp + delta);
keyIndex_updateBP(editnurb, bp+1, bp, nu->pntsu-a-1);
@@ -5681,7 +5733,7 @@ static int delete_exec(bContext *C, wmOperator *op)
bp++;
}
}
- if(type) {
+ if (type) {
bp1 = (BPoint*)MEM_mallocN(nu->pntsu * sizeof(BPoint), "delNurb2");
memcpy(bp1, nu->bp, (nu->pntsu)*sizeof(BPoint) );
keyIndex_updateBP(editnurb, nu->bp, bp1, nu->pntsu);
@@ -5702,26 +5754,26 @@ static int delete_exec(bContext *C, wmOperator *op)
nu= next;
}
}
- else if(type==1) { /* erase segment */
+ else if (type==1) { /* erase segment */
/* find the 2 selected points */
bezt1= bezt2= NULL;
bp1= bp2= NULL;
nu1= NULL;
nuindex= 0;
- for(nu= nubase->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu= nubase->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
- for(a=0; a<nu->pntsu-1; a++) {
- if( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ for (a=0; a<nu->pntsu-1; a++) {
+ if ( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
bezt1= bezt;
bezt2= bezt+1;
if ((bezt2->f1 & SELECT) || (bezt2->f2 & SELECT) || (bezt2->f3 & SELECT)) {
/* pass */
}
else { /* maybe do not make cyclic */
- if(a==0 && (nu->flagu & CU_NURB_CYCLIC) ) {
+ if (a==0 && (nu->flagu & CU_NURB_CYCLIC) ) {
bezt2= bezt+(nu->pntsu-1);
- if( (bezt2->f1 & SELECT) || (bezt2->f2 & SELECT) || (bezt2->f3 & SELECT) ) {
+ if ( (bezt2->f1 & SELECT) || (bezt2->f2 & SELECT) || (bezt2->f3 & SELECT) ) {
nu->flagu &= ~CU_NURB_CYCLIC;
calchandlesNurb(nu);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
@@ -5738,19 +5790,19 @@ static int delete_exec(bContext *C, wmOperator *op)
bezt++;
}
}
- else if(nu->pntsv==1) {
+ else if (nu->pntsv==1) {
bp= nu->bp;
- for(a=0; a<nu->pntsu-1; a++) {
- if( bp->f1 & SELECT ) {
+ for (a=0; a<nu->pntsu-1; a++) {
+ if ( bp->f1 & SELECT ) {
bp1= bp;
bp2= bp+1;
if (bp2->f1 & 1) {
/* pass */
}
else { /* maybe do not make cyclic */
- if(a==0 && (nu->flagu & CU_NURB_CYCLIC) ) {
+ if (a==0 && (nu->flagu & CU_NURB_CYCLIC) ) {
bp2= bp+(nu->pntsu-1);
- if( bp2->f1 & SELECT ) {
+ if ( bp2->f1 & SELECT ) {
nu->flagu &= ~CU_NURB_CYCLIC;
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
@@ -5766,19 +5818,19 @@ static int delete_exec(bContext *C, wmOperator *op)
bp++;
}
}
- if(nu1) break;
+ if (nu1) break;
nuindex++;
}
- if(nu1) {
- if(bezt1) {
- if(nu1->pntsu==2) { /* remove completely */
- if(cu->actnu == nuindex)
+ if (nu1) {
+ if (bezt1) {
+ if (nu1->pntsu==2) { /* remove completely */
+ if (cu->actnu == nuindex)
cu->actnu= -1;
BLI_remlink(nubase, nu);
freeNurb(nu); nu = NULL;
}
- else if(nu1->flagu & CU_NURB_CYCLIC) { /* cyclic */
+ else if (nu1->flagu & CU_NURB_CYCLIC) { /* cyclic */
bezt =
(BezTriple*)MEM_mallocN((cut+1) * sizeof(BezTriple), "delNurb1");
ED_curve_beztcpy(editnurb, bezt, nu1->bezt, cut+1);
@@ -5816,15 +5868,15 @@ static int delete_exec(bContext *C, wmOperator *op)
calchandlesNurb(nu1);
}
}
- else if(bp1) {
- if(nu1->pntsu==2) { /* remove completely */
- if(cu->actnu == nuindex)
+ else if (bp1) {
+ if (nu1->pntsu==2) { /* remove completely */
+ if (cu->actnu == nuindex)
cu->actnu= -1;
BLI_remlink(nubase, nu);
freeNurb(nu); nu= NULL;
}
- else if(nu1->flagu & CU_NURB_CYCLIC) { /* cyclic */
+ else if (nu1->flagu & CU_NURB_CYCLIC) { /* cyclic */
bp =
(BPoint*)MEM_mallocN((cut+1) * sizeof(BPoint), "delNurb5");
ED_curve_bpcpy(editnurb, bp, nu1->bp, cut+1);
@@ -5861,13 +5913,13 @@ static int delete_exec(bContext *C, wmOperator *op)
}
}
}
- else if(type==2) {
+ else if (type==2) {
cu->actnu= -1;
keyIndex_delNurbList(editnurb, nubase);
freeNurblist(nubase);
}
- if(ED_curve_updateAnimPaths(obedit))
+ if (ED_curve_updateAnimPaths(obedit))
WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
@@ -5882,7 +5934,7 @@ static int delete_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
uiPopupMenu *pup;
uiLayout *layout;
- if(obedit->type==OB_SURF) {
+ if (obedit->type==OB_SURF) {
pup= uiPupMenuBegin(C, "Delete", ICON_NONE);
layout= uiPupMenuLayout(pup);
uiItemEnumO_ptr(layout, op->type, NULL, 0, "type", 0);
@@ -5908,17 +5960,17 @@ void CURVE_OT_delete(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Delete";
+ ot->name = "Delete";
ot->description = "Delete selected control points or segments";
- ot->idname= "CURVE_OT_delete";
+ ot->idname = "CURVE_OT_delete";
/* api callbacks */
- ot->exec= delete_exec;
- ot->invoke= delete_invoke;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = delete_exec;
+ ot->invoke = delete_invoke;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Which elements to delete");
@@ -5933,12 +5985,12 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
Nurb *nu;
int clear= (strcmp(op->idname, "CURVE_OT_shade_flat") == 0);
- if(obedit->type != OB_CURVE)
+ if (obedit->type != OB_CURVE)
return OPERATOR_CANCELLED;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(isNurbsel(nu)) {
- if(!clear) nu->flag |= CU_SMOOTH;
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (isNurbsel(nu)) {
+ if (!clear) nu->flag |= CU_SMOOTH;
else nu->flag &= ~CU_SMOOTH;
}
}
@@ -5952,29 +6004,29 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
void CURVE_OT_shade_smooth(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Shade Smooth";
- ot->idname= "CURVE_OT_shade_smooth";
+ ot->name = "Shade Smooth";
+ ot->idname = "CURVE_OT_shade_smooth";
/* api callbacks */
- ot->exec= shade_smooth_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = shade_smooth_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
void CURVE_OT_shade_flat(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Shade Flat";
- ot->idname= "CURVE_OT_shade_flat";
+ ot->name = "Shade Flat";
+ ot->idname = "CURVE_OT_shade_flat";
/* api callbacks */
- ot->exec= shade_smooth_exec;
- ot->poll= ED_operator_editsurfcurve;
+ ot->exec = shade_smooth_exec;
+ ot->poll = ED_operator_editsurfcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************** join operator, to be used externally? ****************/
@@ -5998,26 +6050,27 @@ int join_curve_exec(bContext *C, wmOperator *UNUSED(op))
invert_m4_m4(imat, ob->obmat);
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- if(base->object->type==ob->type) {
- if(base->object != ob) {
+ if (base->object->type==ob->type) {
+ if (base->object != ob) {
cu= base->object->data;
- if(cu->nurb.first) {
+ if (cu->nurb.first) {
/* watch it: switch order here really goes wrong */
mult_m4_m4m4(cmat, imat, base->object->obmat);
nu= cu->nurb.first;
- while(nu) {
+ while (nu) {
newnu= duplicateNurb(nu);
- if(ob->totcol) { /* TODO, merge material lists */
+ if (ob->totcol) { /* TODO, merge material lists */
CLAMP(newnu->mat_nr, 0, ob->totcol-1);
- } else newnu->mat_nr= 0;
+ }
+ else newnu->mat_nr= 0;
BLI_addtail(&tempbase, newnu);
- if( (bezt= newnu->bezt) ) {
+ if ( (bezt= newnu->bezt) ) {
a= newnu->pntsu;
- while(a--) {
+ while (a--) {
mul_m4_v3(cmat, bezt->vec[0]);
mul_m4_v3(cmat, bezt->vec[1]);
mul_m4_v3(cmat, bezt->vec[2]);
@@ -6025,9 +6078,9 @@ int join_curve_exec(bContext *C, wmOperator *UNUSED(op))
}
calchandlesNurb(newnu);
}
- if( (bp= newnu->bp) ) {
+ if ( (bp= newnu->bp) ) {
a= newnu->pntsu*nu->pntsv;
- while(a--) {
+ while (a--) {
mul_m4_v3(cmat, bp->vec);
bp++;
}
@@ -6061,7 +6114,7 @@ static const char *get_curve_defname(int type)
{
int stype= type & CU_PRIMITIVE;
- if((type & CU_TYPE)==CU_BEZIER) {
+ if ((type & CU_TYPE)==CU_BEZIER) {
switch (stype) {
case CU_PRIM_CURVE: return "BezierCurve";
case CU_PRIM_CIRCLE: return "BezierCircle";
@@ -6117,7 +6170,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
const int stype= (type & CU_PRIMITIVE);
const int force_3d = ((Curve *)obedit->data)->flag & CU_3D; /* could be adding to an existing 3D curve */
- if(rv3d) {
+ if (rv3d) {
copy_m4_m4(viewmat, rv3d->viewmat);
copy_v3_v3(zvec, rv3d->viewinv[2]);
}
@@ -6135,7 +6188,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
switch(stype) {
case CU_PRIM_CURVE: /* curve */
nu->resolu= cu->resolu;
- if(cutype==CU_BEZIER) {
+ if (cutype==CU_BEZIER) {
if (!force_3d) nu->flag |= CU_2D;
nu->pntsu= 2;
nu->bezt =
@@ -6150,7 +6203,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
bezt->vec[0][1]+= -0.5f*grid;
bezt->vec[2][0]+= -0.5f*grid;
bezt->vec[2][1]+= 0.5f*grid;
- for(a=0;a<3;a++) mul_m4_v3(mat, bezt->vec[a]);
+ for (a=0;a<3;a++) mul_m4_v3(mat, bezt->vec[a]);
bezt++;
bezt->h1= bezt->h2= HD_ALIGN;
@@ -6163,7 +6216,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
bezt->vec[1][1] = 0;
bezt->vec[2][0] = grid*2;
bezt->vec[2][1] = 0;
- for(a=0;a<3;a++) mul_m4_v3(mat, bezt->vec[a]);
+ for (a=0;a<3;a++) mul_m4_v3(mat, bezt->vec[a]);
calchandlesNurb(nu);
}
@@ -6175,7 +6228,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
nu->bp= callocstructN(BPoint, 4, "addNurbprim3");
bp= nu->bp;
- for(a=0;a<4;a++, bp++) {
+ for (a=0;a<4;a++, bp++) {
bp->vec[3]= 1.0;
bp->f1= SELECT;
bp->radius = bp->weight = 1.0;
@@ -6193,9 +6246,9 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
bp->vec[0]+= 1.5f*grid;
bp= nu->bp;
- for(a=0;a<4;a++, bp++) mul_m4_v3(mat,bp->vec);
+ for (a=0;a<4;a++, bp++) mul_m4_v3(mat,bp->vec);
- if(cutype==CU_NURBS) {
+ if (cutype==CU_NURBS) {
nu->knotsu= NULL; /* nurbs_knot_calc_u allocates */
nurbs_knot_calc_u(nu);
}
@@ -6211,7 +6264,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
nu->bp= callocstructN(BPoint, 5, "addNurbprim3");
bp= nu->bp;
- for(a=0;a<5;a++, bp++) {
+ for (a=0;a<5;a++, bp++) {
bp->vec[3]= 1.0;
bp->f1= SELECT;
bp->radius = bp->weight = 1.0;
@@ -6227,9 +6280,9 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
bp->vec[0]+= 2.0f*grid;
bp= nu->bp;
- for(a=0;a<5;a++, bp++) mul_m4_v3(mat,bp->vec);
+ for (a=0;a<5;a++, bp++) mul_m4_v3(mat,bp->vec);
- if(cutype==CU_NURBS) {
+ if (cutype==CU_NURBS) {
nu->knotsu= NULL; /* nurbs_knot_calc_u allocates */
nurbs_knot_calc_u(nu);
}
@@ -6238,7 +6291,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
case CU_PRIM_CIRCLE: /* circle */
nu->resolu= cu->resolu;
- if(cutype==CU_BEZIER) {
+ if (cutype==CU_BEZIER) {
if (!force_3d) nu->flag |= CU_2D;
nu->pntsu= 4;
nu->bezt= callocstructN(BezTriple, 4, "addNurbprim1");
@@ -6248,33 +6301,33 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
bezt->h1= bezt->h2= HD_AUTO;
bezt->f1= bezt->f2= bezt->f3= SELECT;
bezt->vec[1][0]+= -grid;
- for(a=0;a<3;a++) mul_m4_v3(mat,bezt->vec[a]);
+ for (a=0;a<3;a++) mul_m4_v3(mat,bezt->vec[a]);
bezt->radius = bezt->weight = 1.0;
bezt++;
bezt->h1= bezt->h2= HD_AUTO;
bezt->f1= bezt->f2= bezt->f3= SELECT;
bezt->vec[1][1]+= grid;
- for(a=0;a<3;a++) mul_m4_v3(mat,bezt->vec[a]);
+ for (a=0;a<3;a++) mul_m4_v3(mat,bezt->vec[a]);
bezt->radius = bezt->weight = 1.0;
bezt++;
bezt->h1= bezt->h2= HD_AUTO;
bezt->f1= bezt->f2= bezt->f3= SELECT;
bezt->vec[1][0]+= grid;
- for(a=0;a<3;a++) mul_m4_v3(mat,bezt->vec[a]);
+ for (a=0;a<3;a++) mul_m4_v3(mat,bezt->vec[a]);
bezt->radius = bezt->weight = 1.0;
bezt++;
bezt->h1= bezt->h2= HD_AUTO;
bezt->f1= bezt->f2= bezt->f3= SELECT;
bezt->vec[1][1]+= -grid;
- for(a=0;a<3;a++) mul_m4_v3(mat,bezt->vec[a]);
+ for (a=0;a<3;a++) mul_m4_v3(mat,bezt->vec[a]);
bezt->radius = bezt->weight = 1.0;
calchandlesNurb(nu);
}
- else if( cutype==CU_NURBS ) { /* nurb */
+ else if ( cutype==CU_NURBS ) { /* nurb */
nu->pntsu= 8;
nu->pntsv= 1;
nu->orderu= 4;
@@ -6282,9 +6335,9 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
nu->flagu= CU_NURB_CYCLIC;
bp= nu->bp;
- for(a=0; a<8; a++) {
+ for (a=0; a<8; a++) {
bp->f1= SELECT;
- if(xzproj==0) {
+ if (xzproj==0) {
bp->vec[0]+= nurbcircle[a][0]*grid;
bp->vec[1]+= nurbcircle[a][1]*grid;
}
@@ -6292,7 +6345,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
bp->vec[0]+= 0.25f*nurbcircle[a][0]*grid-0.75f*grid;
bp->vec[2]+= 0.25f*nurbcircle[a][1]*grid;
}
- if(a & 1) bp->vec[3]= 0.25*M_SQRT2;
+ if (a & 1) bp->vec[3]= 0.25*M_SQRT2;
else bp->vec[3]= 1.0;
mul_m4_v3(mat,bp->vec);
bp->radius = bp->weight = 1.0;
@@ -6304,7 +6357,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
}
break;
case CU_PRIM_PATCH: /* 4x4 patch */
- if( cutype==CU_NURBS ) { /* nurb */
+ if ( cutype==CU_NURBS ) { /* nurb */
nu->pntsu= 4;
nu->pntsv= 4;
@@ -6316,14 +6369,14 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
nu->flagv= 0;
bp= nu->bp;
- for(a=0; a<4; a++) {
- for(b=0; b<4; b++) {
+ for (a=0; a<4; a++) {
+ for (b=0; b<4; b++) {
bp->f1= SELECT;
fac= (float)a -1.5f;
bp->vec[0]+= fac*grid;
fac= (float)b -1.5f;
bp->vec[1]+= fac*grid;
- if(a==1 || a==2) if(b==1 || b==2) {
+ if (a==1 || a==2) if (b==1 || b==2) {
bp->vec[2]+= grid;
}
mul_m4_v3(mat,bp->vec);
@@ -6337,7 +6390,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
}
break;
case CU_PRIM_TUBE: /* Cylinder */
- if( cutype==CU_NURBS ) {
+ if ( cutype==CU_NURBS ) {
nu= add_nurbs_primitive(C, mat, CU_NURBS|CU_PRIM_CIRCLE, 0); /* circle */
nu->resolu= cu->resolu;
nu->flag= CU_SMOOTH;
@@ -6345,7 +6398,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
vec[0]=vec[1]= 0.0;
vec[2]= -grid;
- if(newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) {
+ if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) {
/* pass */
}
else {
@@ -6363,14 +6416,14 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- while(a-- >0) {
+ while (a-- >0) {
bp->f1 |= SELECT;
bp++;
}
}
break;
case CU_PRIM_SPHERE: /* sphere */
- if( cutype==CU_NURBS ) {
+ if ( cutype==CU_NURBS ) {
float tmp_cent[3] = {0.f, 0.f, 0.f};
float tmp_vec[3] = {0.f, 0.f, 1.f};
@@ -6384,11 +6437,11 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
nu->flagu= 0;
bp= nu->bp;
- for(a=0; a<5; a++) {
+ for (a=0; a<5; a++) {
bp->f1= SELECT;
bp->vec[0]+= nurbcircle[a][0]*grid;
bp->vec[2]+= nurbcircle[a][1]*grid;
- if(a & 1) bp->vec[3]= 0.5*M_SQRT2;
+ if (a & 1) bp->vec[3]= 0.5*M_SQRT2;
else bp->vec[3]= 1.0;
mul_m4_v3(mat,bp->vec);
bp++;
@@ -6398,7 +6451,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
BLI_addtail(editnurb, nu); /* temporal for spin */
- if(newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) spin_nurb(umat, obedit, tmp_vec, tmp_cent);
+ if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) spin_nurb(umat, obedit, tmp_vec, tmp_cent);
else if ((U.flag & USER_ADD_VIEWALIGNED)) spin_nurb(viewmat, obedit, zvec, mat[3]);
else spin_nurb(umat, obedit, tmp_vec, mat[3]);
@@ -6406,7 +6459,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- while(a-- >0) {
+ while (a-- >0) {
bp->f1 |= SELECT;
bp++;
}
@@ -6414,7 +6467,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
}
break;
case CU_PRIM_DONUT: /* torus */
- if( cutype==CU_NURBS ) {
+ if ( cutype==CU_NURBS ) {
float tmp_cent[3] = {0.f, 0.f, 0.f};
float tmp_vec[3] = {0.f, 0.f, 1.f};
@@ -6427,7 +6480,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
BLI_addtail(editnurb, nu); /* temporal for spin */
/* same as above */
- if(newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) spin_nurb(umat, obedit, tmp_vec, tmp_cent);
+ if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) spin_nurb(umat, obedit, tmp_vec, tmp_cent);
else if ((U.flag & USER_ADD_VIEWALIGNED)) spin_nurb(viewmat, obedit, zvec, mat[3]);
else spin_nurb(umat, obedit, tmp_vec, mat[3]);
@@ -6436,7 +6489,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- while(a-- >0) {
+ while (a-- >0) {
bp->f1 |= SELECT;
bp++;
}
@@ -6451,7 +6504,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
BLI_assert(nu != NULL);
- if(nu) { /* should always be set */
+ if (nu) { /* should always be set */
nu->flag |= CU_SMOOTH;
test2DNurb(nu);
@@ -6471,11 +6524,11 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
float loc[3], rot[3];
float mat[4][4];
- if(!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, &is_aligned))
+ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, &is_aligned))
return OPERATOR_CANCELLED;
if (!isSurf) { /* adding curve */
- if(obedit==NULL || obedit->type!=OB_CURVE) {
+ if (obedit==NULL || obedit->type!=OB_CURVE) {
Curve *cu;
obedit= ED_object_add_type(C, OB_CURVE, loc, rot, TRUE, layer);
@@ -6484,13 +6537,13 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
cu= (Curve*)obedit->data;
cu->flag |= CU_DEFORM_FILL;
- if(type & CU_PRIM_PATH)
+ if (type & CU_PRIM_PATH)
cu->flag |= CU_PATH|CU_3D;
}
else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
}
else { /* adding surface */
- if(obedit==NULL || obedit->type!=OB_SURF) {
+ if (obedit==NULL || obedit->type!=OB_SURF) {
obedit= ED_object_add_type(C, OB_SURF, loc, rot, TRUE, layer);
newob = 1;
}
@@ -6498,9 +6551,9 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
}
/* rename here, the undo stack checks name for valid undo pushes */
- if(newob) {
+ if (newob) {
- if(obedit->type==OB_CURVE) {
+ if (obedit->type==OB_CURVE) {
rename_id((ID *)obedit, get_curve_defname(type));
rename_id((ID *)obedit->data, get_curve_defname(type));
}
@@ -6511,7 +6564,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
}
/* ED_object_add_type doesnt do an undo, is needed for redo operator on primitive */
- if(newob && enter_editmode)
+ if (newob && enter_editmode)
ED_undo_push(C, "Enter Editmode");
ED_object_new_primitive_matrix(C, obedit, loc, rot, mat);
@@ -6550,17 +6603,17 @@ static int add_primitive_bezier_exec(bContext *C, wmOperator *op)
void CURVE_OT_primitive_bezier_curve_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Bezier";
- ot->description= "Construct a Bezier Curve";
- ot->idname= "CURVE_OT_primitive_bezier_curve_add";
+ ot->name = "Add Bezier";
+ ot->description = "Construct a Bezier Curve";
+ ot->idname = "CURVE_OT_primitive_bezier_curve_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_bezier_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_bezier_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -6573,17 +6626,17 @@ static int add_primitive_bezier_circle_exec(bContext *C, wmOperator *op)
void CURVE_OT_primitive_bezier_circle_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Bezier Circle";
- ot->description= "Construct a Bezier Circle";
- ot->idname= "CURVE_OT_primitive_bezier_circle_add";
+ ot->name = "Add Bezier Circle";
+ ot->description = "Construct a Bezier Circle";
+ ot->idname = "CURVE_OT_primitive_bezier_circle_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_bezier_circle_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_bezier_circle_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -6596,17 +6649,17 @@ static int add_primitive_nurbs_curve_exec(bContext *C, wmOperator *op)
void CURVE_OT_primitive_nurbs_curve_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Nurbs Curve";
- ot->description= "Construct a Nurbs Curve";
- ot->idname= "CURVE_OT_primitive_nurbs_curve_add";
+ ot->name = "Add Nurbs Curve";
+ ot->description = "Construct a Nurbs Curve";
+ ot->idname = "CURVE_OT_primitive_nurbs_curve_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_nurbs_curve_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_nurbs_curve_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -6619,17 +6672,17 @@ static int add_primitive_nurbs_circle_exec(bContext *C, wmOperator *op)
void CURVE_OT_primitive_nurbs_circle_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Nurbs Circle";
- ot->description= "Construct a Nurbs Circle";
- ot->idname= "CURVE_OT_primitive_nurbs_circle_add";
+ ot->name = "Add Nurbs Circle";
+ ot->description = "Construct a Nurbs Circle";
+ ot->idname = "CURVE_OT_primitive_nurbs_circle_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_nurbs_circle_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_nurbs_circle_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -6642,17 +6695,17 @@ static int add_primitive_curve_path_exec(bContext *C, wmOperator *op)
void CURVE_OT_primitive_nurbs_path_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Path";
- ot->description= "Construct a Path";
- ot->idname= "CURVE_OT_primitive_nurbs_path_add";
+ ot->name = "Add Path";
+ ot->description = "Construct a Path";
+ ot->idname = "CURVE_OT_primitive_nurbs_path_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_curve_path_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_curve_path_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -6666,17 +6719,17 @@ static int add_primitive_nurbs_surface_curve_exec(bContext *C, wmOperator *op)
void SURFACE_OT_primitive_nurbs_surface_curve_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Surface Curve";
- ot->description= "Construct a Nurbs surface Curve";
- ot->idname= "SURFACE_OT_primitive_nurbs_surface_curve_add";
+ ot->name = "Add Surface Curve";
+ ot->description = "Construct a Nurbs surface Curve";
+ ot->idname = "SURFACE_OT_primitive_nurbs_surface_curve_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_nurbs_surface_curve_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_nurbs_surface_curve_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -6689,17 +6742,17 @@ static int add_primitive_nurbs_surface_circle_exec(bContext *C, wmOperator *op)
void SURFACE_OT_primitive_nurbs_surface_circle_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Surface Circle";
- ot->description= "Construct a Nurbs surface Circle";
- ot->idname= "SURFACE_OT_primitive_nurbs_surface_circle_add";
+ ot->name = "Add Surface Circle";
+ ot->description = "Construct a Nurbs surface Circle";
+ ot->idname = "SURFACE_OT_primitive_nurbs_surface_circle_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_nurbs_surface_circle_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_nurbs_surface_circle_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -6712,17 +6765,17 @@ static int add_primitive_nurbs_surface_surface_exec(bContext *C, wmOperator *op)
void SURFACE_OT_primitive_nurbs_surface_surface_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Surface Patch";
- ot->description= "Construct a Nurbs surface Patch";
- ot->idname= "SURFACE_OT_primitive_nurbs_surface_surface_add";
+ ot->name = "Add Surface Patch";
+ ot->description = "Construct a Nurbs surface Patch";
+ ot->idname = "SURFACE_OT_primitive_nurbs_surface_surface_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_nurbs_surface_surface_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_nurbs_surface_surface_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -6735,17 +6788,17 @@ static int add_primitive_nurbs_surface_cylinder_exec(bContext *C, wmOperator *op
void SURFACE_OT_primitive_nurbs_surface_cylinder_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Surface Cylinder";
- ot->description= "Construct a Nurbs surface Cylinder";
- ot->idname= "SURFACE_OT_primitive_nurbs_surface_cylinder_add";
+ ot->name = "Add Surface Cylinder";
+ ot->description = "Construct a Nurbs surface Cylinder";
+ ot->idname = "SURFACE_OT_primitive_nurbs_surface_cylinder_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_nurbs_surface_cylinder_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_nurbs_surface_cylinder_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -6758,17 +6811,17 @@ static int add_primitive_nurbs_surface_sphere_exec(bContext *C, wmOperator *op)
void SURFACE_OT_primitive_nurbs_surface_sphere_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Surface Sphere";
- ot->description= "Construct a Nurbs surface Sphere";
- ot->idname= "SURFACE_OT_primitive_nurbs_surface_sphere_add";
+ ot->name = "Add Surface Sphere";
+ ot->description = "Construct a Nurbs surface Sphere";
+ ot->idname = "SURFACE_OT_primitive_nurbs_surface_sphere_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_nurbs_surface_sphere_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_nurbs_surface_sphere_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -6781,17 +6834,17 @@ static int add_primitive_nurbs_surface_torus_exec(bContext *C, wmOperator *op)
void SURFACE_OT_primitive_nurbs_surface_torus_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Surface Torus";
- ot->description= "Construct a Nurbs surface Torus";
- ot->idname= "SURFACE_OT_primitive_nurbs_surface_torus_add";
+ ot->name = "Add Surface Torus";
+ ot->description = "Construct a Nurbs surface Torus";
+ ot->idname = "SURFACE_OT_primitive_nurbs_surface_torus_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_nurbs_surface_torus_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_nurbs_surface_torus_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -6808,20 +6861,20 @@ static int clear_tilt_exec(bContext *C, wmOperator *UNUSED(op))
BPoint *bp;
int a;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if( nu->bezt ) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if ( nu->bezt ) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
- if(BEZSELECTED_HIDDENHANDLES(cu, bezt)) bezt->alfa= 0.0;
+ while (a--) {
+ if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) bezt->alfa= 0.0;
bezt++;
}
}
- else if(nu->bp) {
+ else if (nu->bp) {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
- if(bp->f1 & SELECT) bp->alfa= 0.0;
+ while (a--) {
+ if (bp->f1 & SELECT) bp->alfa= 0.0;
bp++;
}
}
@@ -6836,15 +6889,15 @@ static int clear_tilt_exec(bContext *C, wmOperator *UNUSED(op))
void CURVE_OT_tilt_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Tilt";
- ot->idname= "CURVE_OT_tilt_clear";
+ ot->name = "Clear Tilt";
+ ot->idname = "CURVE_OT_tilt_clear";
/* api callbacks */
- ot->exec= clear_tilt_exec;
- ot->poll= ED_operator_editcurve;
+ ot->exec = clear_tilt_exec;
+ ot->poll = ED_operator_editcurve;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/****************** undo for curves ****************/
@@ -6856,7 +6909,8 @@ static void *undo_check_lastsel(void *lastsel, Nurb *nu, Nurb *newnu)
if (lastbezt >= nu->bezt && lastbezt < nu->bezt + nu->pntsu) {
return newnu->bezt + (lastbezt - nu->bezt);
}
- } else {
+ }
+ else {
BPoint *lastbp= (BPoint*)lastsel;
if (lastbp >= nu->bp && lastbp < nu->bp + nu->pntsu*nu->pntsv) {
return newnu->bp + (lastbp - nu->bp);
@@ -6884,8 +6938,8 @@ static void undoCurve_to_editCurve(void *ucu, void *UNUSED(edata), void *cu_v)
editnurb->keyindex= dupli_keyIndexHash(undoCurve->undoIndex);
}
- if(ad) {
- if(ad->action) {
+ if (ad) {
+ if (ad->action) {
free_fcurves(&ad->action->curves);
copy_fcurves(&ad->action->curves, &undoCurve->fcurves);
}
@@ -6895,7 +6949,7 @@ static void undoCurve_to_editCurve(void *ucu, void *UNUSED(edata), void *cu_v)
}
/* copy */
- for(nu= undobase->first; nu; nu= nu->next) {
+ for (nu= undobase->first; nu; nu= nu->next) {
newnu= duplicateNurb(nu);
if (lastsel == NULL) {
@@ -6934,15 +6988,15 @@ static void *editCurve_to_undoCurve(void *UNUSED(edata), void *cu_v)
tmpEditnurb.keyindex= undoCurve->undoIndex;
}
- if(ad) {
- if(ad->action)
+ if (ad) {
+ if (ad->action)
copy_fcurves(&undoCurve->fcurves, &ad->action->curves);
copy_fcurves(&undoCurve->drivers, &ad->drivers);
}
/* copy */
- for(nu= nubase->first; nu; nu= nu->next) {
+ for (nu= nubase->first; nu; nu= nu->next) {
newnu= duplicateNurb(nu);
if (lastsel == NULL) {
@@ -6968,7 +7022,7 @@ static void free_undoCurve(void *ucv)
freeNurblist(&undoCurve->nubase);
- if(undoCurve->undoIndex)
+ if (undoCurve->undoIndex)
BLI_ghash_free(undoCurve->undoIndex, NULL, (GHashValFreeFP)MEM_freeN);
free_fcurves(&undoCurve->fcurves);
@@ -7005,10 +7059,10 @@ int ED_curve_actSelection(Curve *cu, float center[3])
{
Nurb *nu= get_lastsel_nurb(cu);
- if(!nu)
+ if (!nu)
return 0;
- if(nu->bezt) {
+ if (nu->bezt) {
BezTriple *bezt= cu->lastsel;
copy_v3_v3(center, bezt->vec[1]);
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index efde93b4ad7..1f1d1495276 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -82,130 +82,130 @@ static char findaccent(char char1, unsigned int code)
{
char new= 0;
- if(char1=='a') {
- if(code=='`') new= 224;
- else if(code==39) new= 225;
- else if(code=='^') new= 226;
- else if(code=='~') new= 227;
- else if(code=='"') new= 228;
- else if(code=='o') new= 229;
- else if(code=='e') new= 230;
- else if(code=='-') new= 170;
+ if (char1=='a') {
+ if (code=='`') new= 224;
+ else if (code==39) new= 225;
+ else if (code=='^') new= 226;
+ else if (code=='~') new= 227;
+ else if (code=='"') new= 228;
+ else if (code=='o') new= 229;
+ else if (code=='e') new= 230;
+ else if (code=='-') new= 170;
}
- else if(char1=='c') {
- if(code==',') new= 231;
- if(code=='|') new= 162;
+ else if (char1=='c') {
+ if (code==',') new= 231;
+ if (code=='|') new= 162;
}
- else if(char1=='e') {
- if(code=='`') new= 232;
- else if(code==39) new= 233;
- else if(code=='^') new= 234;
- else if(code=='"') new= 235;
+ else if (char1=='e') {
+ if (code=='`') new= 232;
+ else if (code==39) new= 233;
+ else if (code=='^') new= 234;
+ else if (code=='"') new= 235;
}
- else if(char1=='i') {
- if(code=='`') new= 236;
- else if(code==39) new= 237;
- else if(code=='^') new= 238;
- else if(code=='"') new= 239;
+ else if (char1=='i') {
+ if (code=='`') new= 236;
+ else if (code==39) new= 237;
+ else if (code=='^') new= 238;
+ else if (code=='"') new= 239;
}
- else if(char1=='n') {
- if(code=='~') new= 241;
+ else if (char1=='n') {
+ if (code=='~') new= 241;
}
- else if(char1=='o') {
- if(code=='`') new= 242;
- else if(code==39) new= 243;
- else if(code=='^') new= 244;
- else if(code=='~') new= 245;
- else if(code=='"') new= 246;
- else if(code=='/') new= 248;
- else if(code=='-') new= 186;
- else if(code=='e') new= 143;
+ else if (char1=='o') {
+ if (code=='`') new= 242;
+ else if (code==39) new= 243;
+ else if (code=='^') new= 244;
+ else if (code=='~') new= 245;
+ else if (code=='"') new= 246;
+ else if (code=='/') new= 248;
+ else if (code=='-') new= 186;
+ else if (code=='e') new= 143;
}
- else if(char1=='s') {
- if(code=='s') new= 167;
+ else if (char1=='s') {
+ if (code=='s') new= 167;
}
- else if(char1=='u') {
- if(code=='`') new= 249;
- else if(code==39) new= 250;
- else if(code=='^') new= 251;
- else if(code=='"') new= 252;
+ else if (char1=='u') {
+ if (code=='`') new= 249;
+ else if (code==39) new= 250;
+ else if (code=='^') new= 251;
+ else if (code=='"') new= 252;
}
- else if(char1=='y') {
- if(code==39) new= 253;
- else if(code=='"') new= 255;
+ else if (char1=='y') {
+ if (code==39) new= 253;
+ else if (code=='"') new= 255;
}
- else if(char1=='A') {
- if(code=='`') new= 192;
- else if(code==39) new= 193;
- else if(code=='^') new= 194;
- else if(code=='~') new= 195;
- else if(code=='"') new= 196;
- else if(code=='o') new= 197;
- else if(code=='e') new= 198;
+ else if (char1=='A') {
+ if (code=='`') new= 192;
+ else if (code==39) new= 193;
+ else if (code=='^') new= 194;
+ else if (code=='~') new= 195;
+ else if (code=='"') new= 196;
+ else if (code=='o') new= 197;
+ else if (code=='e') new= 198;
}
- else if(char1=='C') {
- if(code==',') new= 199;
+ else if (char1=='C') {
+ if (code==',') new= 199;
}
- else if(char1=='E') {
- if(code=='`') new= 200;
- else if(code==39) new= 201;
- else if(code=='^') new= 202;
- else if(code=='"') new= 203;
+ else if (char1=='E') {
+ if (code=='`') new= 200;
+ else if (code==39) new= 201;
+ else if (code=='^') new= 202;
+ else if (code=='"') new= 203;
}
- else if(char1=='I') {
- if(code=='`') new= 204;
- else if(code==39) new= 205;
- else if(code=='^') new= 206;
- else if(code=='"') new= 207;
+ else if (char1=='I') {
+ if (code=='`') new= 204;
+ else if (code==39) new= 205;
+ else if (code=='^') new= 206;
+ else if (code=='"') new= 207;
}
- else if(char1=='N') {
- if(code=='~') new= 209;
+ else if (char1=='N') {
+ if (code=='~') new= 209;
}
- else if(char1=='O') {
- if(code=='`') new= 210;
- else if(code==39) new= 211;
- else if(code=='^') new= 212;
- else if(code=='~') new= 213;
- else if(code=='"') new= 214;
- else if(code=='/') new= 216;
- else if(code=='e') new= 141;
+ else if (char1=='O') {
+ if (code=='`') new= 210;
+ else if (code==39) new= 211;
+ else if (code=='^') new= 212;
+ else if (code=='~') new= 213;
+ else if (code=='"') new= 214;
+ else if (code=='/') new= 216;
+ else if (code=='e') new= 141;
}
- else if(char1=='U') {
- if(code=='`') new= 217;
- else if(code==39) new= 218;
- else if(code=='^') new= 219;
- else if(code=='"') new= 220;
+ else if (char1=='U') {
+ if (code=='`') new= 217;
+ else if (code==39) new= 218;
+ else if (code=='^') new= 219;
+ else if (code=='"') new= 220;
}
- else if(char1=='Y') {
- if(code==39) new= 221;
+ else if (char1=='Y') {
+ if (code==39) new= 221;
}
- else if(char1=='1') {
- if(code=='4') new= 188;
- if(code=='2') new= 189;
+ else if (char1=='1') {
+ if (code=='4') new= 188;
+ if (code=='2') new= 189;
}
- else if(char1=='3') {
- if(code=='4') new= 190;
+ else if (char1=='3') {
+ if (code=='4') new= 190;
}
- else if(char1==':') {
- if(code=='-') new= 247;
+ else if (char1==':') {
+ if (code=='-') new= 247;
}
- else if(char1=='-') {
- if(code==':') new= 247;
- if(code=='|') new= 135;
- if(code=='+') new= 177;
+ else if (char1=='-') {
+ if (code==':') new= 247;
+ if (code=='|') new= 135;
+ if (code=='+') new= 177;
}
- else if(char1=='|') {
- if(code=='-') new= 135;
- if(code=='=') new= 136;
+ else if (char1=='|') {
+ if (code=='-') new= 135;
+ if (code=='=') new= 136;
}
- else if(char1=='=') {
- if(code=='|') new= 136;
+ else if (char1=='=') {
+ if (code=='|') new= 136;
}
- else if(char1=='+') {
- if(code=='-') new= 177;
+ else if (char1=='+') {
+ if (code=='-') new= 177;
}
- if(new) return new;
+ if (new) return new;
else return char1;
}
@@ -232,12 +232,12 @@ static int insert_into_textbuf(Object *obedit, uintptr_t c)
{
Curve *cu= obedit->data;
- if(cu->len<MAXTEXT-1) {
+ if (cu->len<MAXTEXT-1) {
EditFont *ef= cu->editfont;
int x;
- for(x= cu->len; x>cu->pos; x--) ef->textbuf[x]= ef->textbuf[x-1];
- for(x= cu->len; x>cu->pos; x--) ef->textbufinfo[x]= ef->textbufinfo[x-1];
+ for (x= cu->len; x>cu->pos; x--) ef->textbuf[x]= ef->textbuf[x-1];
+ for (x= cu->len; x>cu->pos; x--) ef->textbufinfo[x]= ef->textbufinfo[x-1];
ef->textbuf[cu->pos]= c;
ef->textbufinfo[cu->pos] = cu->curinfo;
ef->textbufinfo[cu->pos].kern = 0;
@@ -262,7 +262,7 @@ static void text_update_edited(bContext *C, Scene *scene, Object *obedit, int re
EditFont *ef= cu->editfont;
cu->curinfo = ef->textbufinfo[cu->pos?cu->pos-1:0];
- if(obedit->totcol > 0) {
+ if (obedit->totcol > 0) {
obedit->actcol= ef->textbufinfo[cu->pos?cu->pos-1:0].mat_nr;
/* since this array is calloc'd, it can be 0 even though we try ensure
@@ -272,12 +272,12 @@ static void text_update_edited(bContext *C, Scene *scene, Object *obedit, int re
}
}
- if(mode == FO_EDIT)
+ if (mode == FO_EDIT)
update_string(cu);
BKE_text_to_curve(bmain, scene, obedit, mode);
- if(recalc)
+ if (recalc)
DAG_id_tag_update(obedit->data, 0);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
}
@@ -291,22 +291,22 @@ static int insert_lorem_exec(bContext *C, wmOperator *UNUSED(op))
int i;
static const char *lastlorem;
- if(lastlorem)
+ if (lastlorem)
p= lastlorem;
else
p= ED_lorem;
i= rand()/(RAND_MAX/6)+4;
- for(p2=p; *p2 && i; p2++) {
+ for (p2=p; *p2 && i; p2++) {
insert_into_textbuf(obedit, *p2);
- if(*p2=='.')
+ if (*p2=='.')
i--;
}
lastlorem = p2+1;
- if(strlen(lastlorem)<5)
+ if (strlen(lastlorem)<5)
lastlorem = ED_lorem;
insert_into_textbuf(obedit, '\n');
@@ -321,16 +321,16 @@ static int insert_lorem_exec(bContext *C, wmOperator *UNUSED(op))
void FONT_OT_insert_lorem(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Insert Lorem";
- ot->description= "Insert placeholder text";
- ot->idname= "FONT_OT_insert_lorem";
+ ot->name = "Insert Lorem";
+ ot->description = "Insert placeholder text";
+ ot->idname = "FONT_OT_insert_lorem";
/* api callbacks */
- ot->exec= insert_lorem_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = insert_lorem_exec;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/******************* paste file operator ********************/
@@ -348,10 +348,10 @@ static int paste_file(bContext *C, ReportList *reports, const char *filename)
int filelen;
char *strp;
- fp= fopen(filename, "r");
+ fp= BLI_fopen(filename, "r");
- if(!fp) {
- if(reports)
+ if (!fp) {
+ if (reports)
BKE_reportf(reports, RPT_ERROR, "Failed to open file %s", filename);
return OPERATOR_CANCELLED;
}
@@ -368,7 +368,7 @@ static int paste_file(bContext *C, ReportList *reports, const char *filename)
fclose(fp);
strp[filelen]= 0;
- if(cu->len+filelen<MAXTEXT) {
+ if (cu->len+filelen<MAXTEXT) {
int tmplen;
wchar_t *mem = MEM_callocN((sizeof(wchar_t)*filelen)+(4*sizeof(wchar_t)), "temporary");
tmplen = BLI_strncpy_wchar_from_utf8(mem, strp, filelen + 1);
@@ -398,7 +398,7 @@ static int paste_file_exec(bContext *C, wmOperator *op)
static int paste_file_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
- if(RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath"))
return paste_file_exec(C, op);
WM_event_add_fileselect(C, op);
@@ -409,17 +409,17 @@ static int paste_file_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
void FONT_OT_file_paste(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Paste File";
- ot->description= "Paste contents from file";
- ot->idname= "FONT_OT_file_paste";
+ ot->name = "Paste File";
+ ot->description = "Paste contents from file";
+ ot->idname = "FONT_OT_file_paste";
/* api callbacks */
- ot->exec= paste_file_exec;
- ot->invoke= paste_file_invoke;
- ot->poll= ED_operator_editfont;
+ ot->exec = paste_file_exec;
+ ot->invoke = paste_file_invoke;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
@@ -452,11 +452,11 @@ static void txt_add_object(bContext *C, TextLine *firstline, int totline, float
cu->vfont= get_builtin_font();
cu->vfont->id.us++;
- for(tmp=firstline, a=0; cu->len<MAXTEXT && a<totline; tmp=tmp->next, a++)
+ for (tmp=firstline, a=0; cu->len<MAXTEXT && a<totline; tmp=tmp->next, a++)
nchars += strlen(tmp->line) + 1;
- if(cu->str) MEM_freeN(cu->str);
- if(cu->strinfo) MEM_freeN(cu->strinfo);
+ if (cu->str) MEM_freeN(cu->str);
+ if (cu->strinfo) MEM_freeN(cu->strinfo);
cu->str= MEM_callocN(nchars+4, "str");
cu->strinfo= MEM_callocN((nchars+4)*sizeof(CharInfo), "strinfo");
@@ -465,11 +465,11 @@ static void txt_add_object(bContext *C, TextLine *firstline, int totline, float
cu->len= 0;
cu->pos= 0;
- for(tmp=firstline, a=0; cu->len<MAXTEXT && a<totline; tmp=tmp->next, a++) {
+ for (tmp=firstline, a=0; cu->len<MAXTEXT && a<totline; tmp=tmp->next, a++) {
strcat(cu->str, tmp->line);
cu->len+= strlen(tmp->line);
- if(tmp->next) {
+ if (tmp->next) {
strcat(cu->str, "\n");
cu->len++;
}
@@ -487,12 +487,12 @@ void ED_text_to_object(bContext *C, Text *text, int split_lines)
float offset[3];
int linenum= 0;
- if(!text || !text->lines.first) return;
+ if (!text || !text->lines.first) return;
- if(split_lines) {
- for(line=text->lines.first; line; line=line->next) {
+ if (split_lines) {
+ for (line=text->lines.first; line; line=line->next) {
/* skip lines with no text, but still make space for them */
- if(line->line[0] == '\0') {
+ if (line->line[0] == '\0') {
linenum++;
continue;
}
@@ -502,7 +502,7 @@ void ED_text_to_object(bContext *C, Text *text, int split_lines)
offset[1] = -linenum;
offset[2] = 0;
- if(rv3d)
+ if (rv3d)
mul_mat3_m4_v3(rv3d->viewinv, offset);
txt_add_object(C, line, 1, offset);
@@ -524,19 +524,19 @@ void ED_text_to_object(bContext *C, Text *text, int split_lines)
static short next_word(Curve *cu)
{
short s;
- for(s=cu->pos; (cu->str[s]) && (cu->str[s]!=' ') && (cu->str[s]!='\n') &&
+ for (s=cu->pos; (cu->str[s]) && (cu->str[s]!=' ') && (cu->str[s]!='\n') &&
(cu->str[s]!=1) && (cu->str[s]!='\r'); s++);
- if(cu->str[s]) return(s+1); else return(s);
+ if (cu->str[s]) return(s+1); else return(s);
}
static short prev_word(Curve *cu)
{
short s;
- if(cu->pos==0) return(0);
- for(s=cu->pos-2; (cu->str[s]) && (cu->str[s]!=' ') && (cu->str[s]!='\n') &&
+ if (cu->pos==0) return(0);
+ for (s=cu->pos-2; (cu->str[s]) && (cu->str[s]!=' ') && (cu->str[s]!='\n') &&
(cu->str[s]!=1) && (cu->str[s]!='\r'); s--);
- if(cu->str[s]) return(s+1); else return(s);
+ if (cu->str[s]) return(s+1); else return(s);
}
static int kill_selection(Object *obedit, int ins) /* 1 == new character */
@@ -548,16 +548,16 @@ static int kill_selection(Object *obedit, int ins) /* 1 == new character */
int getfrom;
direction = BKE_font_getselection(obedit, &selstart, &selend);
- if(direction) {
+ if (direction) {
int size;
- if(ins) offset = 1;
- if(cu->pos >= selstart) cu->pos = selstart+offset;
- if((direction == -1) && ins) {
+ if (ins) offset = 1;
+ if (cu->pos >= selstart) cu->pos = selstart+offset;
+ if ((direction == -1) && ins) {
selstart++;
selend++;
}
getfrom = selend+offset;
- if(ins==0) getfrom++;
+ if (ins==0) getfrom++;
size = (cu->len * sizeof(wchar_t)) - (selstart * sizeof(wchar_t)) + (offset*sizeof(wchar_t));
memmove(ef->textbuf+selstart, ef->textbuf+getfrom, size);
memmove(ef->textbufinfo+selstart, ef->textbufinfo+getfrom, ((cu->len-selstart)+offset)*sizeof(CharInfo));
@@ -584,11 +584,11 @@ static int set_style(bContext *C, const int style, const int clear)
EditFont *ef= cu->editfont;
int i, selstart, selend;
- if(!BKE_font_getselection(obedit, &selstart, &selend))
+ if (!BKE_font_getselection(obedit, &selstart, &selend))
return OPERATOR_CANCELLED;
- for(i=selstart; i<=selend; i++) {
- if(clear)
+ for (i=selstart; i<=selend; i++) {
+ if (clear)
ef->textbufinfo[i].flag &= ~style;
else
ef->textbufinfo[i].flag |= style;
@@ -611,16 +611,16 @@ static int set_style_exec(bContext *C, wmOperator *op)
void FONT_OT_style_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Style";
- ot->description= "Set font style";
- ot->idname= "FONT_OT_style_set";
+ ot->name = "Set Style";
+ ot->description = "Set font style";
+ ot->idname = "FONT_OT_style_set";
/* api callbacks */
- ot->exec= set_style_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = set_style_exec;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to");
@@ -635,7 +635,7 @@ static int toggle_style_exec(bContext *C, wmOperator *op)
Curve *cu= obedit->data;
int style, clear, selstart, selend;
- if(!BKE_font_getselection(obedit, &selstart, &selend))
+ if (!BKE_font_getselection(obedit, &selstart, &selend))
return OPERATOR_CANCELLED;
style= RNA_enum_get(op->ptr, "style");
@@ -649,16 +649,16 @@ static int toggle_style_exec(bContext *C, wmOperator *op)
void FONT_OT_style_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Style";
- ot->description= "Toggle font style";
- ot->idname= "FONT_OT_style_toggle";
+ ot->name = "Toggle Style";
+ ot->description = "Toggle font style";
+ ot->idname = "FONT_OT_style_toggle";
/* api callbacks */
- ot->exec= toggle_style_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = toggle_style_exec;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to");
@@ -670,7 +670,7 @@ static void copy_selection(Object *obedit)
{
int selstart, selend;
- if(BKE_font_getselection(obedit, &selstart, &selend)) {
+ if (BKE_font_getselection(obedit, &selstart, &selend)) {
Curve *cu= obedit->data;
EditFont *ef= cu->editfont;
@@ -692,13 +692,13 @@ static int copy_text_exec(bContext *C, wmOperator *UNUSED(op))
void FONT_OT_text_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Text";
- ot->description= "Copy selected text to clipboard";
- ot->idname= "FONT_OT_text_copy";
+ ot->name = "Copy Text";
+ ot->description = "Copy selected text to clipboard";
+ ot->idname = "FONT_OT_text_copy";
/* api callbacks */
- ot->exec= copy_text_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = copy_text_exec;
+ ot->poll = ED_operator_editfont;
}
/******************* cut text operator ********************/
@@ -709,7 +709,7 @@ static int cut_text_exec(bContext *C, wmOperator *UNUSED(op))
Object *obedit= CTX_data_edit_object(C);
int selstart, selend;
- if(!BKE_font_getselection(obedit, &selstart, &selend))
+ if (!BKE_font_getselection(obedit, &selstart, &selend))
return OPERATOR_CANCELLED;
copy_selection(obedit);
@@ -723,16 +723,16 @@ static int cut_text_exec(bContext *C, wmOperator *UNUSED(op))
void FONT_OT_text_cut(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Cut Text";
- ot->description= "Cut selected text to clipboard";
- ot->idname= "FONT_OT_text_cut";
+ ot->name = "Cut Text";
+ ot->description = "Cut selected text to clipboard";
+ ot->idname = "FONT_OT_text_cut";
/* api callbacks */
- ot->exec= cut_text_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = cut_text_exec;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/******************* paste text operator ********************/
@@ -744,8 +744,8 @@ static int paste_selection(Object *obedit, ReportList *reports)
int len= wcslen(ef->copybuf);
// Verify that the copy buffer => [copy buffer len] + cu->len < MAXTEXT
- if(cu->len + len <= MAXTEXT) {
- if(len) {
+ if (cu->len + len <= MAXTEXT) {
+ if (len) {
int size = (cu->len * sizeof(wchar_t)) - (cu->pos*sizeof(wchar_t)) + sizeof(wchar_t);
memmove(ef->textbuf+cu->pos+len, ef->textbuf+cu->pos, size);
memcpy(ef->textbuf+cu->pos, ef->copybuf, len * sizeof(wchar_t));
@@ -770,7 +770,7 @@ static int paste_text_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
- if(!paste_selection(obedit, op->reports))
+ if (!paste_selection(obedit, op->reports))
return OPERATOR_CANCELLED;
text_update_edited(C, scene, obedit, 1, FO_EDIT);
@@ -781,16 +781,16 @@ static int paste_text_exec(bContext *C, wmOperator *op)
void FONT_OT_text_paste(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Paste Text";
- ot->description= "Paste text from clipboard";
- ot->idname= "FONT_OT_text_paste";
+ ot->name = "Paste Text";
+ ot->description = "Paste text from clipboard";
+ ot->idname = "FONT_OT_text_paste";
/* api callbacks */
- ot->exec= paste_text_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = paste_text_exec;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ move operator ************************/
@@ -818,77 +818,77 @@ static int move_cursor(bContext *C, int type, int select)
switch(type) {
case LINE_BEGIN:
- if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
- while(cu->pos>0) {
- if(ef->textbuf[cu->pos-1]=='\n') break;
- if(ef->textbufinfo[cu->pos-1].flag & CU_CHINFO_WRAP) break;
+ if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
+ while (cu->pos>0) {
+ if (ef->textbuf[cu->pos-1]=='\n') break;
+ if (ef->textbufinfo[cu->pos-1].flag & CU_CHINFO_WRAP) break;
cu->pos--;
}
cursmove=FO_CURS;
break;
case LINE_END:
- if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
- while(cu->pos<cu->len) {
- if(ef->textbuf[cu->pos]==0) break;
- if(ef->textbuf[cu->pos]=='\n') break;
- if(ef->textbufinfo[cu->pos].flag & CU_CHINFO_WRAP ) break;
+ if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
+ while (cu->pos<cu->len) {
+ if (ef->textbuf[cu->pos]==0) break;
+ if (ef->textbuf[cu->pos]=='\n') break;
+ if (ef->textbufinfo[cu->pos].flag & CU_CHINFO_WRAP ) break;
cu->pos++;
}
cursmove=FO_CURS;
break;
case PREV_WORD:
- if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
+ if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
cu->pos= prev_word(cu);
cursmove= FO_CURS;
break;
case NEXT_WORD:
- if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
+ if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
cu->pos= next_word(cu);
cursmove= FO_CURS;
break;
case PREV_CHAR:
- if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
+ if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
cu->pos--;
cursmove=FO_CURS;
break;
case NEXT_CHAR:
- if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
+ if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
cu->pos++;
cursmove= FO_CURS;
break;
case PREV_LINE:
- if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
+ if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
cursmove=FO_CURSUP;
break;
case NEXT_LINE:
- if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
+ if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
cursmove= FO_CURSDOWN;
break;
case PREV_PAGE:
- if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
+ if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
cursmove=FO_PAGEUP;
break;
case NEXT_PAGE:
- if((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
+ if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1;
cursmove=FO_PAGEDOWN;
break;
}
- if(cursmove == -1)
+ if (cursmove == -1)
return OPERATOR_CANCELLED;
- if(select == 0) {
- if(cu->selstart) {
+ if (select == 0) {
+ if (cu->selstart) {
struct Main *bmain= CTX_data_main(C);
cu->selstart = cu->selend = 0;
update_string(cu);
@@ -896,13 +896,13 @@ static int move_cursor(bContext *C, int type, int select)
}
}
- if(cu->pos>cu->len) cu->pos= cu->len;
- else if(cu->pos>=MAXTEXT) cu->pos= MAXTEXT;
- else if(cu->pos<0) cu->pos= 0;
+ if (cu->pos>cu->len) cu->pos= cu->len;
+ else if (cu->pos>=MAXTEXT) cu->pos= MAXTEXT;
+ else if (cu->pos<0) cu->pos= 0;
text_update_edited(C, scene, obedit, select, cursmove);
- if(select)
+ if (select)
cu->selend = cu->pos;
return OPERATOR_FINISHED;
@@ -918,16 +918,16 @@ static int move_exec(bContext *C, wmOperator *op)
void FONT_OT_move(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Cursor";
- ot->description= "Move cursor to position type";
- ot->idname= "FONT_OT_move";
+ ot->name = "Move Cursor";
+ ot->description = "Move cursor to position type";
+ ot->idname = "FONT_OT_move";
/* api callbacks */
- ot->exec= move_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = move_exec;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to");
@@ -945,16 +945,16 @@ static int move_select_exec(bContext *C, wmOperator *op)
void FONT_OT_move_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Select";
- ot->description= "Make selection from current cursor position to new cursor position type";
- ot->idname= "FONT_OT_move_select";
+ ot->name = "Move Select";
+ ot->description = "Make selection from current cursor position to new cursor position type";
+ ot->idname = "FONT_OT_move_select";
/* api callbacks */
- ot->exec= move_select_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = move_select_exec;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to, to make a selection");
@@ -974,7 +974,7 @@ static int change_spacing_exec(bContext *C, wmOperator *op)
kern += delta;
CLAMP(kern, -20, 20);
- if(ef->textbufinfo[cu->pos-1].kern == kern)
+ if (ef->textbufinfo[cu->pos-1].kern == kern)
return OPERATOR_CANCELLED;
ef->textbufinfo[cu->pos-1].kern = kern;
@@ -987,16 +987,16 @@ static int change_spacing_exec(bContext *C, wmOperator *op)
void FONT_OT_change_spacing(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Change Spacing";
- ot->description= "Change font spacing";
- ot->idname= "FONT_OT_change_spacing";
+ ot->name = "Change Spacing";
+ ot->description = "Change font spacing";
+ ot->idname = "FONT_OT_change_spacing";
/* api callbacks */
- ot->exec= change_spacing_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = change_spacing_exec;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "delta", 1, -20, 20, "Delta", "Amount to decrease or increase character spacing with", -20, 20);
@@ -1012,14 +1012,14 @@ static int change_character_exec(bContext *C, wmOperator *op)
EditFont *ef= cu->editfont;
int character, delta= RNA_int_get(op->ptr, "delta");
- if(cu->pos <= 0)
+ if (cu->pos <= 0)
return OPERATOR_CANCELLED;
character= ef->textbuf[cu->pos - 1];
character += delta;
CLAMP(character, 0, 255);
- if(character == ef->textbuf[cu->pos - 1])
+ if (character == ef->textbuf[cu->pos - 1])
return OPERATOR_CANCELLED;
ef->textbuf[cu->pos - 1]= character;
@@ -1032,16 +1032,16 @@ static int change_character_exec(bContext *C, wmOperator *op)
void FONT_OT_change_character(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Change Character";
- ot->description= "Change font character code";
- ot->idname= "FONT_OT_change_character";
+ ot->name = "Change Character";
+ ot->description = "Change font character code";
+ ot->idname = "FONT_OT_change_character";
/* api callbacks */
- ot->exec= change_character_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = change_character_exec;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "delta", 1, -255, 255, "Delta", "Number to increase or decrease character code with", -255, 255);
@@ -1057,9 +1057,9 @@ static int line_break_exec(bContext *C, wmOperator *op)
EditFont *ef= cu->editfont;
const int ctrl= RNA_boolean_get(op->ptr, "ctrl");
- if(ctrl) {
+ if (ctrl) {
insert_into_textbuf(obedit, 1);
- if(ef->textbuf[cu->pos]!='\n')
+ if (ef->textbuf[cu->pos]!='\n')
insert_into_textbuf(obedit, '\n');
}
else
@@ -1075,16 +1075,16 @@ static int line_break_exec(bContext *C, wmOperator *op)
void FONT_OT_line_break(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Line Break";
- ot->description= "Insert line break at cursor position";
- ot->idname= "FONT_OT_line_break";
+ ot->name = "Line Break";
+ ot->description = "Insert line break at cursor position";
+ ot->idname = "FONT_OT_line_break";
/* api callbacks */
- ot->exec= line_break_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = line_break_exec;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "ctrl", 0, "Ctrl", ""); // XXX what is this?
@@ -1109,16 +1109,16 @@ static int delete_exec(bContext *C, wmOperator *op)
EditFont *ef= cu->editfont;
int x, selstart, selend, type= RNA_enum_get(op->ptr, "type");
- if(cu->len == 0)
+ if (cu->len == 0)
return OPERATOR_CANCELLED;
- if(BKE_font_getselection(obedit, &selstart, &selend)) {
- if(type == DEL_NEXT_SEL) type= DEL_SELECTION;
- else if(type == DEL_PREV_SEL) type= DEL_SELECTION;
+ if (BKE_font_getselection(obedit, &selstart, &selend)) {
+ if (type == DEL_NEXT_SEL) type= DEL_SELECTION;
+ else if (type == DEL_PREV_SEL) type= DEL_SELECTION;
}
else {
- if(type == DEL_NEXT_SEL) type= DEL_NEXT_CHAR;
- else if(type == DEL_PREV_SEL) type= DEL_PREV_CHAR;
+ if (type == DEL_NEXT_SEL) type= DEL_NEXT_CHAR;
+ else if (type == DEL_PREV_SEL) type= DEL_PREV_CHAR;
}
switch(type) {
@@ -1127,28 +1127,28 @@ static int delete_exec(bContext *C, wmOperator *op)
ef->textbuf[0]= 0;
break;
case DEL_SELECTION:
- if(!kill_selection(obedit, 0))
+ if (!kill_selection(obedit, 0))
return OPERATOR_CANCELLED;
break;
case DEL_PREV_CHAR:
- if(cu->pos<=0)
+ if (cu->pos<=0)
return OPERATOR_CANCELLED;
- for(x=cu->pos;x<=cu->len;x++)
+ for (x=cu->pos;x<=cu->len;x++)
ef->textbuf[x-1]= ef->textbuf[x];
- for(x=cu->pos;x<=cu->len;x++)
+ for (x=cu->pos;x<=cu->len;x++)
ef->textbufinfo[x-1]= ef->textbufinfo[x];
cu->pos--;
ef->textbuf[--cu->len]='\0';
break;
case DEL_NEXT_CHAR:
- if(cu->pos>=cu->len)
+ if (cu->pos>=cu->len)
return OPERATOR_CANCELLED;
- for(x=cu->pos;x<cu->len;x++)
+ for (x=cu->pos;x<cu->len;x++)
ef->textbuf[x]= ef->textbuf[x+1];
- for(x=cu->pos;x<cu->len;x++)
+ for (x=cu->pos;x<cu->len;x++)
ef->textbufinfo[x]= ef->textbufinfo[x+1];
ef->textbuf[--cu->len]='\0';
@@ -1165,16 +1165,16 @@ static int delete_exec(bContext *C, wmOperator *op)
void FONT_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete";
- ot->description= "Delete text by cursor position";
- ot->idname= "FONT_OT_delete";
+ ot->name = "Delete";
+ ot->description = "Delete text by cursor position";
+ ot->idname = "FONT_OT_delete";
/* api callbacks */
- ot->exec= delete_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = delete_exec;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "type", delete_type_items, DEL_ALL, "Type", "Which part of the text to delete");
@@ -1190,7 +1190,7 @@ static int insert_text_exec(bContext *C, wmOperator *op)
wchar_t *inserted_text;
int a, len;
- if(!RNA_struct_property_is_set(op->ptr, "text"))
+ if (!RNA_struct_property_is_set(op->ptr, "text"))
return OPERATOR_CANCELLED;
inserted_utf8= RNA_string_get_alloc(op->ptr, "text", NULL, 0);
@@ -1199,7 +1199,7 @@ static int insert_text_exec(bContext *C, wmOperator *op)
inserted_text= MEM_callocN(sizeof(wchar_t)*(len+1), "FONT_insert_text");
BLI_strncpy_wchar_from_utf8(inserted_text, inserted_utf8, len+1);
- for(a=0; a<len; a++)
+ for (a=0; a<len; a++)
insert_into_textbuf(obedit, inserted_text[a]);
MEM_freeN(inserted_text);
@@ -1223,28 +1223,28 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt)
int event= evt->type, val= evt->val;
wchar_t inserted_text[2]= {0};
- if(RNA_struct_property_is_set(op->ptr, "text"))
+ if (RNA_struct_property_is_set(op->ptr, "text"))
return insert_text_exec(C, op);
- if(RNA_struct_property_is_set(op->ptr, "accent")) {
- if(cu->len!=0 && cu->pos>0)
+ if (RNA_struct_property_is_set(op->ptr, "accent")) {
+ if (cu->len!=0 && cu->pos>0)
accentcode= 1;
return OPERATOR_FINISHED;
}
/* tab should exit editmode, but we allow it to be typed using modifier keys */
- if(event==TABKEY) {
- if((alt||ctrl||shift) == 0)
+ if (event==TABKEY) {
+ if ((alt||ctrl||shift) == 0)
return OPERATOR_PASS_THROUGH;
else
ascii= 9;
}
- else if(event==BACKSPACEKEY)
+ else if (event==BACKSPACEKEY)
ascii= 0;
- if(val && (ascii || evt->utf8_buf[0])) {
+ if (val && (ascii || evt->utf8_buf[0])) {
/* handle case like TAB (== 9) */
- if( (ascii > 31 && ascii < 254 && ascii != 127) ||
+ if ( (ascii > 31 && ascii < 254 && ascii != 127) ||
(ascii==13) ||
(ascii==10) ||
(ascii==8) ||
@@ -1257,34 +1257,34 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt)
insert_into_textbuf(obedit, ascii);
accentcode= 0;
}
- else if(accentcode) {
- if(cu->pos>0) {
+ else if (accentcode) {
+ if (cu->pos>0) {
inserted_text[0]= findaccent(ef->textbuf[cu->pos-1], ascii);
ef->textbuf[cu->pos-1]= inserted_text[0];
}
accentcode= 0;
}
- else if(cu->len<MAXTEXT-1) {
- if(alt) {
+ else if (cu->len<MAXTEXT-1) {
+ if (alt) {
/* might become obsolete, apple has default values for this, other OS's too? */
- if(ascii=='t') ascii= 137;
- else if(ascii=='c') ascii= 169;
- else if(ascii=='f') ascii= 164;
- else if(ascii=='g') ascii= 176;
- else if(ascii=='l') ascii= 163;
- else if(ascii=='r') ascii= 174;
- else if(ascii=='s') ascii= 223;
- else if(ascii=='y') ascii= 165;
- else if(ascii=='.') ascii= 138;
- else if(ascii=='1') ascii= 185;
- else if(ascii=='2') ascii= 178;
- else if(ascii=='3') ascii= 179;
- else if(ascii=='%') ascii= 139;
- else if(ascii=='?') ascii= 191;
- else if(ascii=='!') ascii= 161;
- else if(ascii=='x') ascii= 215;
- else if(ascii=='>') ascii= 187;
- else if(ascii=='<') ascii= 171;
+ if (ascii=='t') ascii= 137;
+ else if (ascii=='c') ascii= 169;
+ else if (ascii=='f') ascii= 164;
+ else if (ascii=='g') ascii= 176;
+ else if (ascii=='l') ascii= 163;
+ else if (ascii=='r') ascii= 174;
+ else if (ascii=='s') ascii= 223;
+ else if (ascii=='y') ascii= 165;
+ else if (ascii=='.') ascii= 138;
+ else if (ascii=='1') ascii= 185;
+ else if (ascii=='2') ascii= 178;
+ else if (ascii=='3') ascii= 179;
+ else if (ascii=='%') ascii= 139;
+ else if (ascii=='?') ascii= 191;
+ else if (ascii=='!') ascii= 161;
+ else if (ascii=='x') ascii= 215;
+ else if (ascii=='>') ascii= 187;
+ else if (ascii=='<') ascii= 171;
}
inserted_text[0]= ascii;
@@ -1300,8 +1300,8 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt)
text_update_edited(C, scene, obedit, 1, FO_EDIT);
}
}
- else if(val && event == BACKSPACEKEY) {
- if(alt && cu->len!=0 && cu->pos>0)
+ else if (val && event == BACKSPACEKEY) {
+ if (alt && cu->len!=0 && cu->pos>0)
accentcode= 1;
return OPERATOR_PASS_THROUGH;
@@ -1309,7 +1309,7 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt)
else
return OPERATOR_PASS_THROUGH;
- if(inserted_text[0]) {
+ if (inserted_text[0]) {
/* store as utf8 in RNA string */
char inserted_utf8[8] = {0};
@@ -1326,17 +1326,17 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt)
void FONT_OT_text_insert(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Insert Text";
- ot->description= "Insert text at cursor position";
- ot->idname= "FONT_OT_text_insert";
+ ot->name = "Insert Text";
+ ot->description = "Insert text at cursor position";
+ ot->idname = "FONT_OT_text_insert";
/* api callbacks */
- ot->exec= insert_text_exec;
- ot->invoke= insert_text_invoke;
- ot->poll= ED_operator_editfont;
+ ot->exec = insert_text_exec;
+ ot->invoke = insert_text_invoke;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
@@ -1365,16 +1365,16 @@ static int textbox_add_exec(bContext *C, wmOperator *UNUSED(op))
void FONT_OT_textbox_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Textbox";
- ot->description= "Add a new text box";
- ot->idname= "FONT_OT_textbox_add";
+ ot->name = "Add Textbox";
+ ot->description = "Add a new text box";
+ ot->idname = "FONT_OT_textbox_add";
/* api callbacks */
- ot->exec= textbox_add_exec;
- ot->poll= ED_operator_object_active_editable_font;
+ ot->exec = textbox_add_exec;
+ ot->poll = ED_operator_object_active_editable_font;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1408,16 +1408,16 @@ static int textbox_remove_exec(bContext *C, wmOperator *op)
void FONT_OT_textbox_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Textbox";
- ot->description= "Remove the textbox";
- ot->idname= "FONT_OT_textbox_remove";
+ ot->name = "Remove Textbox";
+ ot->description = "Remove the textbox";
+ ot->idname = "FONT_OT_textbox_remove";
/* api callbacks */
- ot->exec= textbox_remove_exec;
- ot->poll= ED_operator_object_active_editable_font;
+ ot->exec = textbox_remove_exec;
+ ot->poll = ED_operator_object_active_editable_font;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "The current text box", 0, INT_MAX);
}
@@ -1431,7 +1431,7 @@ void make_editText(Object *obedit)
Curve *cu= obedit->data;
EditFont *ef= cu->editfont;
- if(ef==NULL) {
+ if (ef==NULL) {
ef= cu->editfont= MEM_callocN(sizeof(EditFont), "editfont");
ef->textbuf= MEM_callocN((MAXTEXT+4)*sizeof(wchar_t), "texteditbuf");
@@ -1451,9 +1451,9 @@ void make_editText(Object *obedit)
memcpy(ef->textbufinfo, cu->strinfo, (cu->len)*sizeof(CharInfo));
memcpy(ef->oldstrinfo, cu->strinfo, (cu->len)*sizeof(CharInfo));
- if(cu->pos>cu->len) cu->pos= cu->len;
+ if (cu->pos>cu->len) cu->pos= cu->len;
- if(cu->pos)
+ if (cu->pos)
cu->curinfo = ef->textbufinfo[cu->pos-1];
else
cu->curinfo = ef->textbufinfo[0];
@@ -1474,7 +1474,7 @@ void load_editText(Object *obedit)
update_string(cu);
- if(cu->strinfo)
+ if (cu->strinfo)
MEM_freeN(cu->strinfo);
cu->strinfo= MEM_callocN((cu->len+4)*sizeof(CharInfo), "texteditinfo");
memcpy(cu->strinfo, ef->textbufinfo, (cu->len)*sizeof(CharInfo));
@@ -1483,7 +1483,7 @@ void load_editText(Object *obedit)
/* this memory system is weak... */
- if(cu->selboxes) {
+ if (cu->selboxes) {
MEM_freeN(cu->selboxes);
cu->selboxes= NULL;
}
@@ -1512,18 +1512,18 @@ static int set_case(bContext *C, int ccase)
len= wcslen(ef->textbuf);
str= ef->textbuf;
- while(len) {
- if(*str>='a' && *str<='z')
+ while (len) {
+ if (*str>='a' && *str<='z')
*str-= 32;
len--;
str++;
}
- if(ccase == CASE_LOWER) {
+ if (ccase == CASE_LOWER) {
len= wcslen(ef->textbuf);
str= ef->textbuf;
- while(len) {
- if(*str>='A' && *str<='Z') {
+ while (len) {
+ if (*str>='A' && *str<='Z') {
*str+= 32;
}
len--;
@@ -1544,16 +1544,16 @@ static int set_case_exec(bContext *C, wmOperator *op)
void FONT_OT_case_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Case";
- ot->description= "Set font case";
- ot->idname= "FONT_OT_case_set";
+ ot->name = "Set Case";
+ ot->description = "Set font case";
+ ot->idname = "FONT_OT_case_set";
/* api callbacks */
- ot->exec= set_case_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = set_case_exec;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "case", case_items, CASE_LOWER, "Case", "Lower or upper case");
@@ -1571,8 +1571,8 @@ static int toggle_case_exec(bContext *C, wmOperator *UNUSED(op))
len= wcslen(ef->textbuf);
str= ef->textbuf;
- while(len) {
- if(*str>='a' && *str<='z') {
+ while (len) {
+ if (*str>='a' && *str<='z') {
ccase= CASE_LOWER;
break;
}
@@ -1587,16 +1587,16 @@ static int toggle_case_exec(bContext *C, wmOperator *UNUSED(op))
void FONT_OT_case_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Case";
- ot->description= "Toggle font case";
- ot->idname= "FONT_OT_case_toggle";
+ ot->name = "Toggle Case";
+ ot->description = "Toggle font case";
+ ot->idname = "FONT_OT_case_toggle";
/* api callbacks */
- ot->exec= toggle_case_exec;
- ot->poll= ED_operator_editfont;
+ ot->exec = toggle_case_exec;
+ ot->poll = ED_operator_editfont;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* **************** Open Font ************** */
@@ -1627,18 +1627,18 @@ static int font_open_exec(bContext *C, wmOperator *op)
font= load_vfont(bmain, filepath);
- if(!font) {
- if(op->customdata) MEM_freeN(op->customdata);
+ if (!font) {
+ if (op->customdata) MEM_freeN(op->customdata);
return OPERATOR_CANCELLED;
}
- if(!op->customdata)
+ if (!op->customdata)
font_ui_template_init(C, op);
/* hook into UI */
pprop= op->customdata;
- if(pprop->prop) {
+ if (pprop->prop) {
/* when creating new ID blocks, use is already 1, but RNA
* pointer se also increases user, so this compensates it */
font->id.us--;
@@ -1666,14 +1666,14 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
/* hook into UI */
pprop= op->customdata;
- if(pprop->prop) {
+ if (pprop->prop) {
idptr= RNA_property_pointer_get((PointerRNA *)pprop, pprop->prop);
font= idptr.id.data;
}
path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0)? font->name: U.fontdir;
- if(RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath"))
return font_open_exec(C, op);
RNA_string_set(op->ptr, "filepath", path);
@@ -1685,16 +1685,16 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void FONT_OT_open(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Open Font";
- ot->idname= "FONT_OT_open";
+ ot->name = "Open Font";
+ ot->idname = "FONT_OT_open";
/* api callbacks */
- ot->exec= font_open_exec;
- ot->invoke= open_invoke;
- ot->cancel= font_open_cancel;
+ ot->exec = font_open_exec;
+ ot->invoke = open_invoke;
+ ot->cancel = font_open_cancel;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|FTFONTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
@@ -1711,7 +1711,7 @@ static int font_unlink_exec(bContext *C, wmOperator *op)
uiIDContextProperty(C, &pprop.ptr, &pprop.prop);
- if(pprop.prop==NULL) {
+ if (pprop.prop==NULL) {
BKE_report(op->reports, RPT_ERROR, "Incorrect context for running font unlink");
return OPERATOR_CANCELLED;
}
@@ -1728,12 +1728,12 @@ static int font_unlink_exec(bContext *C, wmOperator *op)
void FONT_OT_unlink(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Unlink";
- ot->idname= "FONT_OT_unlink";
- ot->description= "Unlink active font data block";
+ ot->name = "Unlink";
+ ot->idname = "FONT_OT_unlink";
+ ot->description = "Unlink active font data block";
/* api callbacks */
- ot->exec= font_unlink_exec;
+ ot->exec = font_unlink_exec;
}
@@ -1783,7 +1783,7 @@ static void free_undoFont(void *strv)
static void *get_undoFont(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- if(obedit && obedit->type==OB_FONT) {
+ if (obedit && obedit->type==OB_FONT) {
return obedit->data;
}
return NULL;
diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt
index 946e1c66ad7..b27901c2667 100644
--- a/source/blender/editors/datafiles/CMakeLists.txt
+++ b/source/blender/editors/datafiles/CMakeLists.txt
@@ -74,6 +74,7 @@ if(WITH_BLENDER)
smooth.png.c
snake_hook.png.c
soften.png.c
+ claystrips.png.c
subtract.png.c
texdraw.png.c
thumb.png.c
diff --git a/source/blender/editors/datafiles/blender_icons.png.c b/source/blender/editors/datafiles/blender_icons.png.c
index d7582a118ca..85e469717de 100644
--- a/source/blender/editors/datafiles/blender_icons.png.c
+++ b/source/blender/editors/datafiles/blender_icons.png.c
@@ -1,6865 +1,7089 @@
/* DataToC output of file <blender_icons_png> */
-int datatoc_blender_icons_png_size= 219467;
+int datatoc_blender_icons_png_size= 226647;
char datatoc_blender_icons_png[]= {
-137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0,
- 13, 73, 72, 68, 82, 0, 0, 2, 90, 0, 0, 2,128, 8, 6, 0, 0, 0, 68,254,214,163, 0, 0, 10, 79,105, 67, 67, 80, 80,104,
-111,116,111,115,104,111,112, 32, 73, 67, 67, 32,112,114,111,102,105,108,101, 0, 0,120,218,157, 83,103, 84, 83,233, 22, 61,247,
-222,244, 66, 75,136,128,148, 75,111, 82, 21, 8, 32, 82, 66,139,128, 20,145, 38, 42, 33, 9, 16, 74,136, 33,161,217, 21, 81,193,
- 17, 69, 69, 4, 27,200,160,136, 3,142,142,128,140, 21, 81, 44, 12,138, 10,216, 7,228, 33,162,142,131,163,136,138,202,251,225,
-123,163,107,214,188,247,230,205,254,181,215, 62,231,172,243,157,179,207, 7,192, 8, 12,150, 72, 51, 81, 53,128, 12,169, 66, 30,
- 17,224,131,199,196,198,225,228, 46, 64,129, 10, 36,112, 0, 16, 8,179,100, 33,115,253, 35, 1, 0,248,126, 60, 60, 43, 34,192,
- 7,190, 0, 1,120,211, 11, 8, 0,192, 77,155,192, 48, 28,135,255, 15,234, 66,153, 92, 1,128,132, 1,192,116,145, 56, 75, 8,
-128, 20, 0, 64,122,142, 66,166, 0, 64, 70, 1,128,157,152, 38, 83, 0,160, 4, 0, 96,203, 99, 98,227, 0, 80, 45, 0, 96, 39,
-127,230,211, 0,128,157,248,153,123, 1, 0, 91,148, 33, 21, 1,160,145, 0, 32, 19,101,136, 68, 0,104, 59, 0,172,207, 86,138,
- 69, 0, 88, 48, 0, 20,102, 75,196, 57, 0,216, 45, 0, 48, 73, 87,102, 72, 0,176,183, 0,192,206, 16, 11,178, 0, 8, 12, 0,
- 48, 81,136,133, 41, 0, 4,123, 0, 96,200, 35, 35,120, 0,132,153, 0, 20, 70,242, 87, 60,241, 43,174, 16,231, 42, 0, 0,120,
-153,178, 60,185, 36, 57, 69,129, 91, 8, 45,113, 7, 87, 87, 46, 30, 40,206, 73, 23, 43, 20, 54, 97, 2, 97,154, 64, 46,194,121,
-153, 25, 50,129, 52, 15,224,243,204, 0, 0,160,145, 21, 17,224,131,243,253,120,206, 14,174,206,206, 54,142,182, 14, 95, 45,234,
-191, 6,255, 34, 98, 98,227,254,229,207,171,112, 64, 0, 0,225,116,126,209,254, 44, 47,179, 26,128, 59, 6,128,109,254,162, 37,
-238, 4,104, 94, 11,160,117,247,139,102,178, 15, 64,181, 0,160,233,218, 87,243,112,248,126, 60, 60, 69,161,144,185,217,217,229,
-228,228,216, 74,196, 66, 91, 97,202, 87,125,254,103,194, 95,192, 87,253,108,249,126, 60,252,247,245,224,190,226, 36,129, 50, 93,
-129, 71, 4,248,224,194,204,244, 76,165, 28,207,146, 9,132, 98,220,230,143, 71,252,183, 11,255,252, 29,211, 34,196, 73, 98,185,
- 88, 42, 20,227, 81, 18,113,142, 68,154,140,243, 50,165, 34,137, 66,146, 41,197, 37,210,255,100,226,223, 44,251, 3, 62,223, 53,
- 0,176,106, 62, 1,123,145, 45,168, 93, 99, 3,246, 75, 39, 16, 88,116,192,226,247, 0, 0,242,187,111,193,212, 40, 8, 3,128,
-104,131,225,207,119,255,239, 63,253, 71,160, 37, 0,128,102, 73,146,113, 0, 0, 94, 68, 36, 46, 84,202,179, 63,199, 8, 0, 0,
- 68,160,129, 42,176, 65, 27,244,193, 24, 44,192, 6, 28,193, 5,220,193, 11,252, 96, 54,132, 66, 36,196,194, 66, 16, 66, 10,100,
-128, 28,114, 96, 41,172,130, 66, 40,134,205,176, 29, 42, 96, 47,212, 64, 29, 52,192, 81,104,134,147,112, 14, 46,194, 85,184, 14,
- 61,112, 15,250, 97, 8,158,193, 40,188,129, 9, 4, 65,200, 8, 19, 97, 33,218,136, 1, 98,138, 88, 35,142, 8, 23,153,133,248,
- 33,193, 72, 4, 18,139, 36, 32,201,136, 20, 81, 34, 75,145, 53, 72, 49, 82,138, 84, 32, 85, 72, 29,242, 61,114, 2, 57,135, 92,
- 70,186,145, 59,200, 0, 50,130,252,134,188, 71, 49,148,129,178, 81, 61,212, 12,181, 67,185,168, 55, 26,132, 70,162, 11,208,100,
-116, 49,154,143, 22,160,155,208,114,180, 26, 61,140, 54,161,231,208,171,104, 15,218,143, 62, 67,199, 48,192,232, 24, 7, 51,196,
-108, 48, 46,198,195, 66,177, 56, 44, 9,147, 99,203,177, 34,172, 12,171,198, 26,176, 86,172, 3,187,137,245, 99,207,177,119, 4,
- 18,129, 69,192, 9, 54, 4,119, 66, 32, 97, 30, 65, 72, 88, 76, 88, 78,216, 72,168, 32, 28, 36, 52, 17,218, 9, 55, 9, 3,132,
- 81,194, 39, 34,147,168, 75,180, 38,186, 17,249,196, 24, 98, 50, 49,135, 88, 72, 44, 35,214, 18,143, 19, 47, 16,123,136, 67,196,
- 55, 36, 18,137, 67, 50, 39,185,144, 2, 73,177,164, 84,210, 18,210, 70,210,110, 82, 35,233, 44,169,155, 52, 72, 26, 35,147,201,
-218,100,107,178, 7, 57,148, 44, 32, 43,200,133,228,157,228,195,228, 51,228, 27,228, 33,242, 91, 10,157, 98, 64,113,164,248, 83,
-226, 40, 82,202,106, 74, 25,229, 16,229, 52,229, 6,101,152, 50, 65, 85,163,154, 82,221,168,161, 84, 17, 53,143, 90, 66,173,161,
-182, 82,175, 81,135,168, 19, 52,117,154, 57,205,131, 22, 73, 75,165,173,162,149,211, 26,104, 23,104,247,105,175,232,116,186, 17,
-221,149, 30, 78,151,208, 87,210,203,233, 71,232,151,232, 3,244,119, 12, 13,134, 21,131,199,136,103, 40, 25,155, 24, 7, 24,103,
- 25,119, 24,175,152, 76,166, 25,211,139, 25,199, 84, 48, 55, 49,235,152,231,153, 15,153,111, 85, 88, 42,182, 42,124, 21,145,202,
- 10,149, 74,149, 38,149, 27, 42, 47, 84,169,170,166,170,222,170, 11, 85,243, 85,203, 84,143,169, 94, 83,125,174, 70, 85, 51, 83,
-227,169, 9,212,150,171, 85,170,157, 80,235, 83, 27, 83,103,169, 59,168,135,170,103,168,111, 84, 63,164,126, 89,253,137, 6, 89,
-195, 76,195, 79, 67,164, 81,160,177, 95,227,188,198, 32, 11, 99, 25,179,120, 44, 33,107, 13,171,134,117,129, 53,196, 38,177,205,
-217,124,118, 42,187,152,253, 29,187,139, 61,170,169,161, 57, 67, 51, 74, 51, 87,179, 82,243,148,102, 63, 7,227,152,113,248,156,
-116, 78, 9,231, 40,167,151,243,126,138,222, 20,239, 41,226, 41, 27,166, 52, 76,185, 49,101, 92,107,170,150,151,150, 88,171, 72,
-171, 81,171, 71,235,189, 54,174,237,167,157,166,189, 69,187, 89,251,129, 14, 65,199, 74, 39, 92, 39, 71,103,143,206, 5,157,231,
- 83,217, 83,221,167, 10,167, 22, 77, 61, 58,245,174, 46,170,107,165, 27,161,187, 68,119,191,110,167,238,152,158,190, 94,128,158,
- 76,111,167,222,121,189,231,250, 28,125, 47,253, 84,253,109,250,167,245, 71, 12, 88, 6,179, 12, 36, 6,219, 12,206, 24, 60,197,
- 53,113,111, 60, 29, 47,199,219,241, 81, 67, 93,195, 64, 67,165, 97,149, 97,151,225,132,145,185,209, 60,163,213, 70,141, 70, 15,
-140,105,198, 92,227, 36,227,109,198,109,198,163, 38, 6, 38, 33, 38, 75, 77,234, 77,238,154, 82, 77,185,166, 41,166, 59, 76, 59,
- 76,199,205,204,205,162,205,214,153, 53,155, 61, 49,215, 50,231,155,231,155,215,155,223,183, 96, 90,120, 90, 44,182,168,182,184,
-101, 73,178,228, 90,166, 89,238,182,188,110,133, 90, 57, 89,165, 88, 85, 90, 93,179, 70,173,157,173, 37,214,187,173,187,167, 17,
-167,185, 78,147, 78,171,158,214,103,195,176,241,182,201,182,169,183, 25,176,229,216, 6,219,174,182,109,182,125, 97,103, 98, 23,
-103,183,197,174,195,238,147,189,147,125,186,125,141,253, 61, 7, 13,135,217, 14,171, 29, 90, 29,126,115,180,114, 20, 58, 86, 58,
-222,154,206,156,238, 63,125,197,244,150,233, 47,103, 88,207, 16,207,216, 51,227,182, 19,203, 41,196,105,157, 83,155,211, 71,103,
- 23,103,185,115,131,243,136,139,137, 75,130,203, 46,151, 62, 46,155, 27,198,221,200,189,228, 74,116,245,113, 93,225,122,210,245,
-157,155,179,155,194,237,168,219,175,238, 54,238,105,238,135,220,159,204, 52,159, 41,158, 89, 51,115,208,195,200, 67,224, 81,229,
-209, 63, 11,159,149, 48,107,223,172,126, 79, 67, 79,129,103,181,231, 35, 47, 99, 47,145, 87,173,215,176,183,165,119,170,247, 97,
-239, 23, 62,246, 62,114,159,227, 62,227, 60, 55,222, 50,222, 89, 95,204, 55,192,183,200,183,203, 79,195,111,158, 95,133,223, 67,
-127, 35,255,100,255,122,255,209, 0,167,128, 37, 1,103, 3,137,129, 65,129, 91, 2,251,248,122,124, 33,191,142, 63, 58,219,101,
-246,178,217,237, 65,140,160,185, 65, 21, 65,143,130,173,130,229,193,173, 33,104,200,236,144,173, 33,247,231,152,206,145,206,105,
- 14,133, 80,126,232,214,208, 7, 97,230, 97,139,195,126, 12, 39,133,135,133, 87,134, 63,142,112,136, 88, 26,209, 49,151, 53,119,
-209,220, 67,115,223, 68,250, 68,150, 68,222,155,103, 49, 79, 57,175, 45, 74, 53, 42, 62,170, 46,106, 60,218, 55,186, 52,186, 63,
-198, 46,102, 89,204,213, 88,157, 88, 73,108, 75, 28, 57, 46, 42,174, 54,110,108,190,223,252,237,243,135,226,157,226, 11,227,123,
- 23,152, 47,200, 93,112,121,161,206,194,244,133,167, 22,169, 46, 18, 44, 58,150, 64, 76,136, 78, 56,148,240, 65, 16, 42,168, 22,
-140, 37,242, 19,119, 37,142, 10,121,194, 29,194,103, 34, 47,209, 54,209,136,216, 67, 92, 42, 30, 78,242, 72, 42, 77,122,146,236,
-145,188, 53,121, 36,197, 51,165, 44,229,185,132, 39,169,144,188, 76, 13, 76,221,155, 58,158, 22,154,118, 32,109, 50, 61, 58,189,
- 49,131,146,145,144,113, 66,170, 33, 77,147,182,103,234,103,230,102,118,203,172,101,133,178,254,197,110,139,183, 47, 30,149, 7,
-201,107,179,144,172, 5, 89, 45, 10,182, 66,166,232, 84, 90, 40,215, 42, 7,178,103,101, 87,102,191,205,137,202, 57,150,171,158,
- 43,205,237,204,179,202,219,144, 55,156,239,159,255,237, 18,194, 18,225,146,182,165,134, 75, 87, 45, 29, 88,230,189,172,106, 57,
-178, 60,113,121,219, 10,227, 21, 5, 43,134, 86, 6,172, 60,184,138,182, 42,109,213, 79,171,237, 87,151,174,126,189, 38,122, 77,
-107,129, 94,193,202,130,193,181, 1,107,235, 11, 85, 10,229,133,125,235,220,215,237, 93, 79, 88, 47, 89,223,181, 97,250,134,157,
- 27, 62, 21,137,138,174, 20,219, 23,151, 21,127,216, 40,220,120,229, 27,135,111,202,191,153,220,148,180,169,171,196,185,100,207,
-102,210,102,233,230,222, 45,158, 91, 14,150,170,151,230,151, 14,110, 13,217,218,180, 13,223, 86,180,237,245,246, 69,219, 47,151,
-205, 40,219,187,131,182, 67,185,163,191, 60,184,188,101,167,201,206,205, 59, 63, 84,164, 84,244, 84,250, 84, 54,238,210,221,181,
- 97,215,248,110,209,238, 27,123,188,246, 52,236,213,219, 91,188,247,253, 62,201,190,219, 85, 1, 85, 77,213,102,213,101,251, 73,
-251,179,247, 63,174,137,170,233,248,150,251,109, 93,173, 78,109,113,237,199, 3,210, 3,253, 7, 35, 14,182,215,185,212,213, 29,
-210, 61, 84, 82,143,214, 43,235, 71, 14,199, 31,190,254,157,239,119, 45, 13, 54, 13, 85,141,156,198,226, 35,112, 68,121,228,233,
-247, 9,223,247, 30, 13, 58,218,118,140,123,172,225, 7,211, 31,118, 29,103, 29, 47,106, 66,154,242,154, 70,155, 83,154,251, 91,
- 98, 91,186, 79,204, 62,209,214,234,222,122,252, 71,219, 31, 15,156, 52, 60, 89,121, 74,243, 84,201,105,218,233,130,211,147,103,
-242,207,140,157,149,157,125,126, 46,249,220, 96,219,162,182,123,231, 99,206,223,106, 15,111,239,186, 16,116,225,210, 69,255,139,
-231, 59,188, 59,206, 92,242,184,116,242,178,219,229, 19, 87,184, 87,154,175, 58, 95,109,234,116,234, 60,254,147,211, 79,199,187,
-156,187,154,174,185, 92,107,185,238,122,189,181,123,102,247,233, 27,158, 55,206,221,244,189,121,241, 22,255,214,213,158, 57, 61,
-221,189,243,122,111,247,197,247,245,223, 22,221,126,114, 39,253,206,203,187,217,119, 39,238,173,188, 79,188, 95,244, 64,237, 65,
-217, 67,221,135,213, 63, 91,254,220,216,239,220,127,106,192,119,160,243,209,220, 71,247, 6,133,131,207,254,145,245,143, 15, 67,
- 5,143,153,143,203,134, 13,134,235,158, 56, 62, 57, 57,226, 63,114,253,233,252,167, 67,207,100,207, 38,158, 23,254,162,254,203,
-174, 23, 22, 47,126,248,213,235,215,206,209,152,209,161,151,242,151,147,191,109,124,165,253,234,192,235, 25,175,219,198,194,198,
- 30,190,201,120, 51, 49, 94,244, 86,251,237,193,119,220,119, 29,239,163,223, 15, 79,228,124, 32,127, 40,255,104,249,177,245, 83,
-208,167,251,147, 25,147,147,255, 4, 3,152,243,252, 99, 51, 45,219, 0, 0, 0, 6, 98, 75, 71, 68, 0,255, 0,255, 0,255,160,
-189,167,147, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,213, 0, 0, 13,213, 1, 61,214, 88,241, 0, 0, 0, 7,116, 73, 77, 69,
- 7,220, 2, 12, 19, 45, 40,146,193,117, 16, 0, 0, 32, 0, 73, 68, 65, 84,120,218,236, 93,119,120, 20,213,226, 61, 51, 59,179,
-187,217,146, 77, 35, 61,144, 66, 9, 96, 0, 67, 81,130, 84, 65, 80,140,138, 10, 86,132,167,207,103,197,134, 5, 84, 68, 68, 32,
- 54, 64,240, 39,242,208,167,128,160,128, 5, 4,164, 68, 74,232, 29,233, 9,144, 4, 18, 66, 58,201, 38,219,203,220,223, 31,217,
- 89, 55,203,182, 64, 98,129,123,190,111,190,221,157,157, 57,115,239,157,123,239,156, 57,183, 1, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,215, 52, 86,175, 94, 77,154,112,248,144, 64, 57, 29,219,128,191, 59,103, 11,198,157, 52,
- 35,231, 0, 7,231,187,255,144,112, 14,248,187,114,138,241,109, 2,239,144,166,228,163,230, 74, 79,151,112,146,230, 14,103, 75,
-113, 54, 87, 57,242, 16, 78,210, 2,247,253,221,127, 72, 56, 7,252,221, 56,221,243, 79,128,188, 77,226, 12, 48, 79, 53, 53,156,
-164,185,195,217, 82,156, 87, 91,142,124,132,147, 92,109, 94,242,114,239,223,197,117, 4,174, 5, 69, 86,192,200,204,204,100, 92,
-248,153,191, 43,167,107, 58,136,252,205, 25,214,102,196,150,230,230,116, 75,207,230,194,187,153,153,153,204,234,213,171,183, 2,
- 24,208,156,113,111,142,251,238, 22,215,102,225,189, 2,145,213, 36,206,230,202,247, 45,205,217, 92,101,201,157,179, 57,242,189,
-167,251,222,130,247,168,185,194,217, 44,101,169, 37,242,188,135,252,115,213,188,238,156,205, 81,150,220, 57,155, 35,223,255, 25,
-156,205, 81,150, 60,113, 54, 71,190,247,118,239,175, 55,131,138,253,139, 5,129,123, 1, 31,248,119, 22, 68, 45, 37, 54,155,224,
-192,252,229,156,205,124,143,222,117,112, 54,231,219,205,192,230,186, 71, 45,145,223, 93, 57,155,139,223,157,167, 57,238,147, 39,
-206,171, 13,175,151,112, 54,123,220,175, 54,223,255, 89,156,205,124,143,154,165, 44,185,113, 14,108,230,151,129,129, 46,191,223,
-109, 78,206,230, 42, 75, 30,194,121,213,247,201, 19,231,213,134,215, 75, 56,155, 61,238,205,241, 12,105, 41,222,107, 26, 45,213,
-124,214,220,156, 77,228,190,166, 56,155,216, 60, 51,164, 5,238,253, 95, 26,206,230,228,116, 15, 99,115, 54,247,180,100, 56,155,
-147,179, 9, 97,189,230, 56,255,105,247,253,239,152,158,222,248,174,166, 89,202,155, 59,218, 18,225,108, 78,206, 0,185,175, 9,
-206,171,184,247,215, 28,184,191, 75, 64,196,132,111,230, 55, 19, 52,179, 3,211,146,194,181, 57,195, 57,176, 37, 28,194, 22, 64,
-179,135,211,241,166, 60,185, 5,226,254, 79, 73, 83, 90,150,104, 89,250,219,149, 37,183, 60, 57,176, 25,157,162,102,117,158,221,
- 57,155,227, 26,174, 28,205,149, 71, 91, 58,238,205, 89,150, 90,226,222, 83, 92,133, 11, 65, 57, 41, 39,229,164,156,148,147,114,
- 82,206,235,150,243,154, 4, 75,147,128,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,226, 31, 5,175,237,187,
-113,113,113,171,149, 74,101, 59,111,255,235,116,186,139, 23, 47, 94, 28, 68,147,240,175, 3,189, 71, 20,255, 32,176,248,195, 65,
- 23, 0, 16,199, 70, 65, 65, 65,113, 77,195,107,103,120,185, 92,158,114,242,228,201, 14,130, 32,192,110,183,195,102,179, 57, 63,
-205,102, 51,250,247,239,223,228,142,244,209,209,209, 57, 18,137, 36,169, 41,231,216,237,246,243,101,101,101,125,125, 28,178, 19,
- 64, 10,195,252,161, 25,197,239,222, 62, 1,148, 88,173,214,238,190, 56, 25,134, 73,113,231,243,194, 37,126,247,201, 25, 18, 18,
-178,159,227,184, 4, 79, 92,222,190, 11,130,144, 95, 81, 81,209,231,207,188, 71,215, 51,162,163,163,115, 56,142,107,114,254, 44,
- 45, 45,245,154, 63, 99, 99, 99, 15,177, 44, 27,215, 4, 74,137, 32, 8,185, 23, 47, 94,236,235, 67,136,236, 4,144,226,243, 13,
-202, 45, 63, 49, 12, 83,108,183,219,123,250, 43, 71,190,184, 60,228, 81,127,156, 78,145,197,113, 92, 86, 84, 84,212, 51,122,189,
-222, 8,128, 72, 36, 18,226, 18, 54, 0,128,205,102,171,168,169,169,233, 66,115, 34, 5, 5,197,117, 33,180, 4, 65, 96, 77, 38,
- 19,242,242,242, 64,136,199,250,222,126, 5,215,235,112,224,183,141, 81,193, 81,209,176, 89, 44, 80,181,138,116,114,151,157, 56,
- 6,155,213, 2,155,217,140, 54,189,122,139, 97, 64,231,206,157, 37,126, 56, 19, 62,248,224,131,168,224,224, 96, 24,141, 70, 24,
-141, 70,152, 76, 38, 24,141, 70,152,205,102,152,205,102, 88, 44, 22, 88, 44, 22,216,108, 54,152, 76, 38,100,103,103,219,173, 86,
-171, 79,206,105,211,166, 69,105, 52, 26, 39,159,184,137,156, 34,175,213,106,133,209,104,196,166, 77,155,124,114,114, 28,151, 80,
- 82, 82, 18, 37,149, 74, 65, 8,129, 32, 8, 32,132, 52,218,220,209,182,109, 91,139,175, 64,182,208, 61,186,158,209, 97,218,210,
- 53, 81, 33, 10, 57,108,130,128,204,110,109,157,127,228,127,185, 28,196,102,135, 96,179,161,253,243,163,157,251, 59,117,234,228,
- 51,127, 18, 66, 18,167, 45, 93, 19, 26, 40,103, 85, 85,149,161, 99,199,142, 37,104,112,155,189, 9,173, 4,131,193, 16,229,224,
-191, 76, 16,177, 44,219,104, 91,191,126, 61, 50, 51, 51,253,197, 61,225,229,151, 95,142,178, 90,173, 48,155,205, 48,153, 76,176,
- 90,173,176,217,108,206,205,110,183, 59, 55,179,217,140, 61,123,246, 4,234,100,125,112,219,109,183, 61,190,102,205, 26,213,207,
- 63,255,172, 74, 74, 74,130, 84, 42,133, 68, 34,129, 68, 34, 1,203,178,224, 56, 14, 55,223,124, 51, 67,179, 32, 5, 5,197,117,
- 35,180, 76, 38, 83, 65,122,122, 58,113,124,143,151,203,229, 82,183,183,220,184,246,237,219,231,186,159,231,175,185, 42, 56, 42,
- 26, 19, 91,135, 3, 0,222, 57, 87,229,124, 64,124,216,231, 70,231, 49,239, 93,168, 5, 0, 40, 20, 10, 48,174,175,209, 94,160,
- 82,169,112,219,109,183, 65, 38,147,161,103,207,158,224,121,222,227, 38,149, 74,193,243,188,223, 68, 97, 24, 6,106,181, 26, 83,
-166, 76, 17, 69, 18, 84, 65,114,140,235,211, 19, 65, 32,248,239,177,211, 48, 11, 4, 28,199, 57,183, 64, 56,165, 82, 41,142, 30,
- 61, 10,142,227, 32,145, 72,156,159,226,247, 85,171, 86, 97,228,200,145,224, 56, 14, 10,133, 2,240, 51,115,176,235, 61, 50,155,
-205,177, 50,153,204, 2, 64, 20,103, 82,134, 97, 98,174,228, 30, 93,207, 8, 81,200, 49,102,222, 79, 0,128,162, 89,207, 59,239,
-221,158,103,223,113, 30,147,248,159, 7,192, 48, 12,120,158, 7,203,178,205,198, 89, 93, 93,109,120,232,161,135,182, 7, 7, 7,
-175,215,106,181,240, 35,224, 80, 84, 84, 4,142,227,188,230,119,150,101, 49,115,230, 76,156, 57,115, 38,160,184, 27,141, 70, 44,
- 88,176, 0,118,187,189, 17,175,248,221,125, 95,128, 34,235,253,161, 67,135,142, 94,179,102, 77, 24,195, 48,248,236,179,207, 32,
-149, 74, 49,124,248,112, 68, 68, 68, 96,195,134, 13,144, 74,165,120,253,245,215,105,230,163,160,160,240, 85,231,241, 0,110, 4,
- 16,233, 48, 17,234, 0,132,186, 28, 82,225,248,140, 20,127, 51, 12,179,207, 3, 79, 47,199, 49, 21, 12,195,236,115,249,109, 6,
- 32,243,176,191, 10,128,194,177,153,208,224,254,167,185, 92, 71, 60, 15,222,174,203, 1, 13,235, 15, 1,216, 2, 96, 96,102,102,
-230, 86, 0, 40, 45, 45,189,163,180,180, 20, 0,144,146,146,114, 50, 55, 55,183,163,168,121, 28,205, 83, 82,155,205,214, 65,108,
-170, 18,221,162, 33, 67,134,248,124,195,183, 89, 44,151, 9, 16, 79, 90,202, 83,115,133, 55, 1, 99,177, 88,240,192, 3, 15, 0,
-128,215,135,142,235, 22,128,118,131,217,108, 6,199,113, 72,109, 29,137, 73,195,210,113, 19,177, 66, 87,207,192, 86,171,195, 61,
-106, 43, 78,118,238,142,249,231, 43,112, 78, 91, 15,142,227, 2,226, 20, 4,193,171,200,146, 72, 36,152, 55,111, 30, 30,122,232,
- 33, 72, 36,146,128,248, 92,239, 81,114,114,242,154,220,220,220, 8,134, 97, 76,142,123, 36,183,217,108, 26,155,205, 22, 97,183,
-219, 35,154,114,143,174,103,216, 4,193, 99, 62,244,150,103, 3,185, 79,129,112, 86, 87, 87, 27, 50, 51, 51,119,203,229,242,133,
-209,209,209, 37,197,197,197,126,133,150,187,248,113,127,169,248,228,147, 79, 48,103,206, 28, 12, 26, 52, 40,160,112,154, 76, 38,
- 48, 12,131,249,243,231, 95,246,223,212,169, 83, 47,187,158, 31, 78, 6, 0, 27, 23, 23,247,236,186,117,235, 52,226,177,173, 90,
-181, 2,207,243,232,210,165, 11,130,131,131,177,125,251,118,216,237,246,128,203, 37, 5, 5,197,181, 11, 79, 90,196, 5,253, 39,
- 78,156,216, 51, 43, 43,107,122, 70, 70,198,119, 59,119,238, 92,202, 48,204,106,151, 58, 49,211, 81,191,174, 22,127, 19, 66,122,
-185,138, 30,135, 88,139,100, 24,102,181,120,188,235,111,241,147, 16, 50, 4,128, 76,252, 61,113,226,196,180,172,172,172,233, 19,
- 38, 76,120,115,198,140, 25,210,137, 19, 39,118,205,202,202,154, 46, 94,199, 83, 56, 60, 57, 90, 62,215,158, 18,155,168, 78,157,
- 58,229,173,137,202,245, 1,224,179,182, 84,181,138,116, 58, 89,239, 37, 70, 56,247, 79, 41,174,113, 62,192,230,246,104, 7,149,
- 74,133, 97,239,125, 20,144, 83,100, 54,155, 81, 94, 94,238,116, 25,252,109,129,114, 42, 21, 65,200,126,185, 11,138,170,100,120,
-119, 87, 53,214, 28, 62, 3,158,231,113,123,231, 46,184, 67, 26,140,183, 19,101,120,249,116, 33,172, 36,176, 62,189,132, 16,143,
- 2, 75,252, 46, 54,161, 4, 42,180,220,238, 81,145,209,104,172,202,203,203, 51, 8, 13, 15,118, 5, 33, 36,140, 97,152, 58,135,
-203, 21, 27,232, 61,186,158,145,217,173,173,211,117,218, 19, 60,216,185,127,164,238,168,243,158,140,159,247, 33, 0, 96, 80,247,
-155,253,150,135, 64, 56,171,170,170, 12,125, 7, 15,220,106, 55,152,191, 25, 61,122,116,193,230,205,155, 21,129,132,213,147,208,
- 18, 93, 91, 81,100,113, 28, 7,179,217, 28, 80,220,205,102,179,215,242, 33,149, 74,175,196,209,130, 78,167, 51,175, 92,185, 18,
-115,231,206, 69, 68, 68, 4,134, 14, 29,138,216,216, 88, 44, 95,190, 28,132, 16, 60,255,252,243, 80, 40, 20,162,123, 77, 51, 32,
- 5,197,245, 13, 95, 90, 68,158,149,149, 53,221, 93,200,184,254,118, 21, 80,110, 98,202, 85,172,165,249,121,254,175,118, 23, 79,
-226,117, 25,134, 89, 61, 99,198,140, 76, 63,225,168,240, 38,180,124, 78,137,111, 50,153, 10,186,117,235, 22,144,154,208,235,245,
-165,254,196,134,167,183,122, 87,151, 64,173, 86, 67,165, 81,131, 13,176,222,181, 90,173, 78,161,178,113,227, 70, 40, 20, 10, 12,
- 31, 62,252,170, 28, 45,139,197, 2,153,148, 7,219, 42, 26, 99,102,109, 70, 85,157,193,249,128,217,146, 95,128,131,101,229,120,
- 57, 99, 48, 84,138,114,212,155,205, 1, 57,111,130, 32, 92, 38,178, 56,142,195, 3, 15, 60,224,116, 19, 92,251,173,192, 71,211,
- 97, 68, 68,196,126,142,227, 18, 92,238, 81, 80, 74, 74, 10,240, 71,191, 30, 70, 16,132,250,208,208,208, 31, 1,196, 17, 66, 18,
- 0, 4, 7,114,143, 40, 60,231, 79,247,253,130,155, 83,117, 37,156, 85, 85, 85,134,204,204,204,221,118,131,249,155, 11, 23, 46,
-236, 6, 16,116,211, 77, 55, 53, 89,104,137, 2,139,231,121,204,156, 57, 19,115,230,204,113,254, 31,168,208,178,217,108,141, 4,
-212,233,211,167, 27, 93,203, 93,216,249,105, 54, 37,104, 24, 93, 40,164,164,164, 56,207,137,137,137, 65,104,104, 40, 4, 65,128,
- 32, 8, 8, 10, 10,130, 66,161,128, 84, 42,165,153,142,130,130,194,151, 22, 49, 76,152, 48,225, 77,134, 97, 86, 59,156,165, 99,
- 62, 4,149, 39,237,209,203, 77,172, 85,120, 57, 46,211,147,216,114,253, 46, 98,226,196,137,105,238,225,240,212, 92,233,172, 85,
-221,166,221,111, 4,215, 38,170,230,122,136,249,122,144,169, 67, 53, 80,168, 84,144, 72, 88, 48, 12, 67,252,113, 89, 44, 22,103,
-197,255,204, 51,207,248,236,183, 18,104,127, 42,139,197, 2,150,147,224, 98, 76, 50,236,236, 54,231,185,226,198,114, 60,206,197,
-116,132,228,212, 33,240, 1, 62,112,221, 29,173,231,159,127, 30, 11, 22, 44, 0,203,178,206, 52,225, 56, 14,237,219,183, 71, 65,
- 65,129, 79, 46,142,227, 18,206,157, 59, 23,229,154,142,162,136, 37,132,192,110,183,163,109,219,182,198,188,188,188, 23,105,209,
-189, 58,145,229,109,191,221, 46, 4,236,194,120, 58,174,170,170,202, 48,106,212,168,173,181,181,181,223,220,112,195, 13,167,209,
-120, 10, 4,191,124, 28,199, 53, 18, 88,162,200,250,244,211, 79, 27,137, 34,171,213, 26,208,139,128,213,106,189, 76,240,124,252,
-241,199,141, 62, 1,160, 79,159, 62, 1, 57,195, 0, 8,203,178, 68, 42,149,226,182,219,110, 67,215,174, 93,241,243,207, 63, 67,
- 16, 4, 60,247,220,115, 80, 40, 20,152, 61,123, 54,108, 54, 27, 62,248,224, 3,234,104, 81, 80, 80,248,210, 34,166, 25, 51,102,
- 28,155, 49, 99,134,211, 89,114,119,180,188, 60,119,239,116,136,170, 72, 81,164, 1, 48,121, 18, 68,158, 92, 50,119, 1,230,186,
- 47, 43, 43,107,186,123, 56,220,155, 43, 27, 9,173, 63, 11,165,199,143,226,163, 91,210, 1, 52,110, 46,156,119,115, 71,168,212,
- 42,168,130,213, 24,181,106, 27, 0, 56, 42,253, 9, 1, 57, 90,162,208,170,170,170,242, 41,178,154,226,104,177, 50, 14, 43, 18,
- 46,129,200,120,112,102,107, 35,161, 37,225,120, 20, 69, 36,131,229,165,224,236,182,128, 56, 9, 33,151, 53, 21,142, 29, 59, 22,
- 12,195, 56, 71,136,117,235,214,205,149,139,241,247,112,124, 45,188,161, 15,158,123,115,236, 7,149, 70, 90, 98,175, 36,127,238,
-255, 18, 39,127,120, 22, 0,208, 87,167,115,222,139,105,221,254, 24, 59, 48,235,232, 86,167,251,248, 30, 94,189, 34,206,170,170,
- 42,195, 77,157,210,118, 75,195, 67,190, 57,127,254,252,110, 0,236,131, 15, 62, 24,218,173, 91,183,128,202,164, 56,184,194, 93,
-100,185, 58, 89,226,167,159, 17,182, 46,194,209, 30,144,128, 18,155, 17, 3,200,243, 68,204,219, 26,141, 6,106,181,218, 57,226,
- 54, 40, 40, 8, 74,165,210,217,191, 51, 64,225, 70, 65, 65,113,253, 34, 76, 20, 58, 14,177,212,200,105,114,244,173,202,116,253,
-237,201,241,114, 56, 80, 57,126,234,215, 53, 14,129,230, 17,162,179,230,118,206,106,111, 34,141, 19, 21,164,235,103, 76, 76,204,
-175,106,181, 58, 57,208,216, 55,101, 20,155,221,106,185,204,217, 98, 24, 6,234, 96, 53, 20,106, 21, 20,193,106,175,174,151, 47,
-161, 37, 58, 69,226, 67,103,225,194,133, 80,171,213,248,215,191,254,213,228, 62, 90, 78,161, 37,101,177, 65,190, 9, 18, 25,215,
- 72,100,113, 28, 7, 9,207,163, 84, 29, 11,150,231,193,217, 2,115,201,106,107,107,193,113, 28, 38, 77,154,228,124,131,119, 21,
- 89, 77,137,179, 47,176, 12, 35,186, 91,242,118,237,218,189,202, 48, 76, 34,128, 36,157, 78, 39,191,120,241,226,173,180,188,250,
- 80, 6,118,235,101, 46,148, 55,247,245, 74, 57, 69, 39, 75, 26, 30,242, 77,199,142, 29,157, 78,150, 82,169, 20, 71,155,250,191,
-199, 44,235, 81,100,185,143, 16,228, 56,174, 33, 47,251, 25, 29,233,234,104,205,152, 49,195,201,235,234,100,137,104, 74, 57, 18,
-195,186,117,235, 86, 28, 60,120, 16,207, 60,243, 12, 20, 10, 5,230,204,153, 3,155,205,134,169, 83,167, 66,161, 80, 64, 38,147,
-209,204, 71, 65, 65,221,172, 70, 90,196, 13, 21,110,253,160, 24, 55, 81, 83,225, 73, 96,185, 54, 19,138,223, 25,134,177,122,224,
- 53,187, 53, 41,186,239, 23, 63,171,102,204,152,177, 89,116,178, 92,246, 55, 10,135, 95, 71, 75, 46,151, 39,231,229,229, 57, 39,
-194,244,245,105, 54,155, 49,104,208,160,128,157, 49,113,212, 33,199, 73, 26, 9, 11,101,176, 26, 74, 77, 48, 20,106,181,187,224,
- 96,252, 85,226,226, 27,177,171,208,154, 60,121, 50, 56,142,195,130, 5, 11, 0, 0,175,190,250,106,192,125,180, 68, 78,216, 25,
- 20,147,179, 72,159, 53, 18,230,111,173, 40,219,241, 59, 56,142, 67, 84,239, 59, 32,220, 52, 18,122,133, 26,156,221, 22,240,168,
-195,234,234,106, 20, 20, 20, 64, 34,145,224,149, 87, 94,105, 52,215,145,251, 72,182,141, 27, 55,250,141,187, 39, 39,107,242,249,
-106, 39,143, 66,161, 96,127,255,253,247,100, 65, 16, 82, 12, 6, 67,187, 62,125,250, 8,180, 40,251, 17, 69,130, 45, 32, 81, 21,
-104,254,116,231, 20,251,100,213,214,214,126,115,254,252,249, 61, 0,216,209,163, 71,135, 42,149, 74,124,245,213, 87,122, 0,178,
-229,203,151, 43,252,137, 34, 49,223,248, 19, 89, 60,207, 55,228,229, 64,226, 78, 26, 79, 89,226,175, 99,124, 32,121, 94, 12, 43,
-195, 48,176,219,237, 80, 40, 20,141,156,172,160,160, 32,200,229,114,154,241, 40, 40, 40,252,213, 37,251, 2,174,199, 9,233,229,
- 34,170,246, 93, 9,111, 83,174,231, 15,156, 55,161, 97, 50,153,112,226,196,137, 64,121, 2,158, 24,179,117,207,155,241,222,133,
- 90, 48, 12,131,255,246,185, 1, 42,141, 26, 74,149, 10,247,255,188,213, 89,113, 31,157,254, 42,228, 42, 53,226,250, 13, 13,168,
- 34, 23,155, 14, 93,133, 86, 77, 77, 13,120,158,199,251,239,191, 15,150,101,241,193, 7, 31, 32, 62, 62, 30, 23, 47, 94,196,242,
-229,203, 3,114,180, 36,118, 9, 98, 31,235, 4,229,216, 16,104, 30,235,143,176,219, 38,227,130,153,195, 78,163, 18,253,141,199,
- 33,219,240, 41,204,130, 61,224, 17, 88, 54,155, 13, 91,183,110,117,239,240,238,236, 83,101,179,217, 96,181, 90, 97,177, 88,240,
-193, 7, 31, 4, 50,194,243,178,251, 38,166,161, 99, 18, 84, 73,110,110,110, 36, 33, 36, 28, 64, 8,128, 74, 90, 92,125, 35,182,
-247,243,136,236,249, 52, 0, 96,213,140, 39,156,251, 39, 29,253, 35,127,206,252,182, 97, 1,128,142, 73, 67,155,196, 89, 85, 85,
-101,184,125, 80,159, 28,163,192,127,221,165, 75,151, 70, 78, 86, 80, 80, 16,227,248, 29,144, 93,198,178, 44, 36, 18,201,101,205,
-133,222,196, 86, 32,125,180,108, 54,155,115, 34, 81, 95,253, 25,175,196,209,122,226,137, 39, 16, 27, 27,235,116,178,222,123,239,
- 61, 40, 20, 10, 76,156, 56, 17, 86,171, 21,159,126,250, 41,205,124, 20, 20, 20,127,186, 40,251, 51,224,177, 38, 53, 26,141,133,
- 93,187,118,133,151,255,226,131,130,130,120,183, 72,197,181,111,223, 62,215, 67, 19,226, 16, 0,217,158, 42,117,134, 97, 16,172,
- 9, 70,144, 90, 5,165,155,139, 21, 20,172,129, 92,173, 6, 43,245, 88,153, 95,198, 41,246, 45,113, 21, 90,226, 86, 91, 91, 11,
-158,231, 49,119,238, 92,104, 52, 26,152, 76, 38,191,156,226, 67, 71, 34,145, 64, 95, 84,135,147,211,179, 33, 11,218,137,118, 67,
- 31, 66, 44,175,128,116,251,143, 48,216,173,254, 38, 44,189,140,179, 67,135, 14,120,231,157,119, 46,155,214,193, 27,226,227,227,
-253,198,221,221,201,154,121, 67, 27, 72,101, 82,140, 63, 94, 4,147,201,196, 60,244,208, 67, 2, 0, 3,128, 10,131,193,112, 62,
-144,244,108, 6,252,227, 57,125,141,138, 21, 33, 16,187, 39, 1,227,145, 83,116,178,140, 2,255,117, 65, 65,129,232,100,133, 40,
-149, 74,124,241,197, 23,122, 0,236,212,169, 83,149,137,137,137,146, 64,242,146, 68, 34,193,172, 89,179, 60,246,201,242, 36,186,
-154, 82,142, 92,207, 29, 48, 96,128,199, 9, 75,189,136,183,203, 56,197,176, 70, 68, 68, 56,157, 44,187,221,238, 28,109, 40,206,
- 62,239,227,165,130,230, 79,202, 73, 57,175, 31,206,107, 18, 30,107,224,139, 23, 47,222,238,237,132,182,109,219,230,229,229,229,
-181, 23,151,226,112, 84,156, 82,163,209,216,161, 79,159, 62,126,173, 29, 65, 16, 32,151,203, 65, 8,193,173,239,100,129, 97, 1,
- 22,141, 31, 98, 81,183, 12,134, 68,194, 65,104, 88,234,195,239,168, 67,131,193,208,232,225,224,105,171,175,175,135,201,100, 10,
-120, 54,111,163,209,216,104, 10, 6,134, 8, 56,247,219,178,203, 70, 31,138, 91,160,253,118,130,130,130, 26, 53,253,248,113,172,
-152, 64, 28, 45,215,166, 71,169, 76, 10, 78,202,139,142, 86,221,233,211,167, 71,209,108, 30, 56,196, 1, 11, 0,144,218,103, 56,
- 4,193, 14, 98,183, 55, 90, 38,169, 83,242,237, 16,136, 29, 22,171, 30, 38,147,201,223,180, 39, 76,101,101,165, 97,212,168, 81,
- 91, 1,252,239,158,123,238,201, 69,195,236,194, 68,173, 86,203,121,158, 23, 0, 84, 3, 32,151, 46, 93, 10,185,112,225,130, 96,
- 52, 26,219,248, 11,231,154, 53,107,112,226,196, 9,244,235,215,175,209,114, 80,162, 43,234, 58,187,123, 32,249, 83,108, 46,247,
- 52, 35,188, 55, 33, 23, 40, 36, 18, 9, 66, 66, 66, 32,149, 74,241,254,251,239, 67, 42,149, 66,169, 84, 2, 0, 62,253,244, 83,
-231,228,171, 20, 20, 20, 20,215,141,208,242, 87,111,250,104, 86,244,217,132,104,179,217,138, 19, 19, 19,155,116, 49,187,221, 94,
-230, 71,184, 21, 47, 95,190, 92,234,234, 66,248,251, 36,132,148,249,121,216, 22,175, 90,181, 74,234,201,221,240,182,192,180, 63,
- 78,187,221, 94,156,148,148,228,213, 49,241, 4,171,213,122,193,159,104,205,170, 48, 52, 18, 9,227,143, 23,121, 93, 59,145,194,
-111, 94,243,145, 63,223,186,210,252,121, 58, 53, 53,245, 66,104,104,232,218,232,232,232,170, 29, 59,118, 68,244,234,213, 43,194,
-245,152, 94,189,122,197,186,157,102,134,247,117, 14,193, 48, 76,241, 61,247,220,227, 49,207,139,162,201, 67,254, 44,246,151,231,
-247,238,221, 43,117, 61,223, 27,191, 75, 57, 42, 14, 64,184,158, 75, 79, 79,103, 93,121,188,229,125,171,213, 90, 65,115, 33, 5,
- 5,197,117, 47,180, 12, 6, 67, 81,215,174, 93,109, 94,254, 59,239,235,220,170,170,170,158,205, 29, 1,171,213,218,231,159,192,
- 89, 89, 89,217,172,113,183,217,108,197,142, 9, 74,125, 30, 67,179,248, 95,119,143, 0,160,188,188,252, 38, 0,208,233,116,240,
-183,172, 78, 19, 4, 97,179,231, 79,155,205,214,167, 37,210,180,186,186, 58,131,230, 44, 10, 10, 10, 42,180,154, 0,186, 24,241,
-223, 3, 45, 33, 90, 41, 40, 40, 40, 40, 40, 40,154, 23, 44, 77, 2, 10, 10, 10, 10, 10, 10, 10,138,150, 1,131,134,145, 3,158,
-208,148,209, 4, 67,174,224,218,217,148,147,114, 82, 78,202, 73, 57, 41, 39,229,188,238, 56,253,113,211,209,140, 45, 44,192, 40,
- 39,229,164,156,148,147,114, 82, 78,202,121,253,113, 94,147,160, 77,135, 20, 20, 20, 20, 20, 20, 20, 20, 45, 4,142, 38,193, 95,
- 6, 9,154, 48,163,190, 63, 16, 66,194, 0,120, 91, 48,206,204, 48,204,165, 43,224,100, 0, 72, 29,155, 56,209,145, 21,128, 5,
-128,133, 97, 24,226,159,227, 93,182,164, 36, 44,141,216,249, 94,132, 97,120, 65,192,225, 54,109, 90, 31, 98,152, 59,204, 0,160,
-138,238,212, 89,173, 82, 12, 49, 89,204,201,114, 94,118,162, 70, 87,191,209, 84,158, 87, 72,179, 7, 5,197, 95,130,187, 0, 76,
- 65, 67,183,146, 25, 0,150,209, 36,161,160,104, 33,161,165, 86,171,247,179, 44,155,224,111,126, 30, 17,142,181,204,138, 47, 93,
-186,212,179, 9,215, 30,165, 86,171, 7,241, 60,127, 11, 0, 88,173,214, 29,245,245,245,155, 1, 44, 7, 96,187,194, 56,105, 0,
- 60, 0,224, 17,199,239, 37,142,202, 66,123,133,124, 93, 67, 66, 66,126,224,121,158, 84, 86, 86,246, 6,128,136,136,136,221, 86,
-171,149,209,106,181,247, 3, 56,210, 68, 62,150,231,249,153,189,123,247,238,191,109,219,182,255, 1,152,219, 76,247, 82,206,178,
-172, 71,129, 34, 8, 66,210, 21,136, 44, 41,128,144,185,115,231, 70, 44, 94,188, 56,189,184,184,184, 11, 0, 36, 36, 36, 28, 29,
- 61,122,244,161,113,227,198, 85, 17, 66,106, 25,134,177,248,226, 41, 41, 9, 75, 43, 47,205,127,166,172,252,196, 3, 0, 16, 19,
-219,101,153, 68,194, 74, 9, 57,176, 75,217,234,145, 86,237,219, 37, 61,253,221, 87,115,165, 73,201,173,177,105,231,193, 27,199,
-189,248,102,218, 5,224, 19, 42,182,254, 60, 4, 7, 7,239,103, 89, 54,193, 87, 25,247, 84,230,237,118,123,113,117,117,117, 79,
-111,156, 28,199, 37,248,170, 47, 60,237, 19, 4, 33,191,178,178,210,227, 84, 19, 26,141,102, 23,199,113,201,129,114,137,159, 54,
-155,173,216,219, 40, 93,141, 70,179, 95, 34,145, 36,248,138,167,167,255, 4, 65,200,175,168,168,240, 22,206,203,226,222, 28,225,
-188, 18, 78, 95,225, 20,235, 35, 0,159, 70, 68, 68,220, 92, 85, 85,245, 40,128, 55,181, 90,109, 55,137, 68,130,240,240,240, 55,
-205,102,243,153,144,144,144, 47,107,107,107,119, 2,120, 17, 0, 93, 47,149,130,162,185,160,209,104,202,234,235,235,137, 8, 65,
- 16,136,213,106, 37, 38,147,137, 24, 12, 6,162,211,233, 72,125,125, 61,209,106,181,164,182,182,150, 84, 85, 85,145,200,200, 72,
-247,201, 27,189,181,225,118,209,104, 52,121, 89, 89, 89,166,130,130, 2, 98,177, 88,136,197, 98, 33,133,133,133,228,163,143, 62,
- 50,105, 52,154, 60, 0, 93,188,156, 59,196, 75,101,113, 27,128,165,233,233,233,230, 53,107,214, 16,163,209, 72,116, 58, 29, 89,
-182,108, 25,185,225,134, 27,204, 0,150, 58,142, 97, 3,228, 4,128,190, 49, 49, 49,197,103,207,158,181,111,220,184,209, 18, 18,
- 18,146, 29, 18, 18,146, 93, 88, 88,104, 63,123,246,172,208,170, 85,171, 98, 0,125,155, 16, 78, 0, 24, 57,126,252,248,178,194,
-194, 66, 50, 96,192,128,195, 46,251, 25,248, 95,231,110,136, 39, 39,139, 16, 18, 67, 8,137, 69,195, 36,151,151,109,132,144, 88,
-199, 49, 97, 1,114,170,242,243,243, 91, 71, 71, 71,103, 49, 12, 99,118,231, 99, 24,198, 28, 29, 29,157,149,159,159,223,154, 16,
-162,242,197, 89,124,126,222,147,107,215, 12,174,209, 93, 58, 69,116,151, 78,145,255,125, 61, 80,251,212,184, 71,151,198,182,237,
-190, 32, 52, 33,109,238,137, 83,167,231, 19, 66,230,111,222,151, 55,127,242,231,191,206,191,119,220,236, 47, 34, 18,211,159,106,
- 66,122, 94, 13, 40, 39,128,208,208,208, 82,157, 78, 71, 8, 33,196,110,183, 19,139,197, 66, 76, 38, 19,209,235,245,164,190,190,
-158,212,213,213, 57,203,121,109,109,173,243,123, 84, 84,148,215,242, 30, 22, 22, 86,102, 48, 24, 26,213, 29,102,179,217, 89,127,
-232,245,122,162,215,235,137, 78,167,115,110,245,245,245, 36, 46, 46,174,200, 71, 56, 47,138,225, 20, 4,129,216,108, 54, 98,177,
- 88,156,188, 70,163,177,209,102, 50,153,136,201,100, 34,137,137,137, 1,135, 51, 16, 78,163,209, 72, 18, 18, 18, 74,188,113,134,
-135,135,151, 25,141,198, 70,156,174,241,119,231, 21,127,199,196,196,148, 54,133, 51,144,112,250, 74, 79, 7,230,230,230,230, 18,
-131,193, 64,226,227,227,171,238,191,255,126,171,221,110, 39,107,214,172, 33,233,233,233,194,192,129, 3, 45,149,149,149,228, 95,
-255,250, 23,241,241, 82, 72,203, 17,229,164,184, 18, 71,139, 97, 24,168, 84, 42,124,255,253,247, 94,151,227,112,253,222,166, 77,
-155, 64,175,217, 51, 57, 57,121,235,246,237,219, 21,177,177,127, 76,136,109, 54,155, 17, 22, 22,134,231,158,123, 78,118,215, 93,
-119,181, 31, 58,116,232,238,115,231,206, 13, 0,176,223, 15,223,125,145,145,145,159, 77,154, 52, 41,250,193, 7, 31, 68, 68, 68,
-163, 73,183, 49,106,212, 40,220,127,255,253,210,220,220,220,135, 22, 46, 92,248,208,188,121,243, 74,235,235,235,199, 1,248,209,
- 23,169, 66,161,184, 39, 46, 46,238,139,237,219,183, 71, 69, 69, 69, 33, 37, 37,133,125,253,245,215,219,119,232,208, 65,145,144,
-144,192, 94,188,120, 17, 63,255,252,115,252,195, 15, 63,188,162,172,172,236,105,139,197,178, 50,128,184,203, 34, 34, 34,222,124,
-250,233,167, 91,105,181, 90,219,129, 3, 7,242,196,253, 50,153,108,106, 70, 70, 70,175, 45, 91,182,124, 11,224,203, 43,113,178,
- 8, 33, 90,252,209,196, 39,194, 42,254, 31,136,179, 69, 8,145, 29, 62,124, 56, 60, 35, 35,227, 71,147,201,212,253,153,103,158,
- 57, 63,125,250,116,133, 70,163,209, 0, 96,180, 90,237,165, 41, 83,166,152,103,207,158,253, 70,231,206,157, 7,239,218,181,235,
- 62, 66,136,213, 33,200, 46,231, 99, 24,103,120,138, 46, 84, 96,235, 78, 65,246,206,196, 87, 19, 62,156,150,124,110,223,241, 34,
-129, 83,104,240, 75,206, 49,148, 85,213,227,215, 93,199, 17, 19, 17,204, 72,229,124, 90, 72,252, 13, 3,106, 47, 28,207,129,143,
- 25,210, 41,154, 7, 12,195, 64,169, 84,226,151, 95,126,185,108,233, 42, 79,203, 90,113, 28,135,208,208, 80,191,171, 27, 4, 5,
- 5, 97,227,198,141, 30,215, 94,244,180,164, 79, 72, 72, 8,124,189,108, 48, 12,131,160,160, 32,236,216,177, 3, 44,203,122, 92,
- 26,200,125,159, 74,165, 2,235, 99,173, 43,145, 51, 39, 39,199, 47,151,248,169, 86,171,129,134,166,127,239,133, 82, 46,199,246,
-237,219,189,198,217,253,187,218,177,222,171, 63,206, 29, 59,118, 52, 90,250,203,125, 73, 48,215,223, 42,149, 10,140, 31,210,176,
-176,176,222, 9, 9, 9,216,187,119, 47,150, 47, 95, 30,158,150,150,134,211,167, 79,131, 97, 24, 76,159, 62,157,185,225,134, 27,
-248,210,210, 82,244,235,215, 15, 63,253,244, 83, 31,173, 86, 75, 11, 12,197, 95, 2, 66, 8, 15,224, 70, 0,145,104,232,118, 83,
- 7, 32, 20, 13, 43,105,200, 0, 84, 1, 80, 56, 54, 19,128,122, 0,173, 28,167, 87, 58,234, 22, 87,129, 80,225,186,248, 52, 33,
-164,151,131, 91, 92,161, 34,210,229, 88,241, 26,238,191,221, 63, 61,114,115, 0,176,122,245,106,241, 97, 54, 48, 51, 51,115,171,
-107,228, 2, 17, 89,226, 58,101, 30,202,180,251, 16, 77,185, 74,165,250, 97,247,238,221,138,200,200, 63,226, 96, 50,153, 80, 87,
- 87,135,250,250,122,212,213,213, 33, 56, 56, 24,203,151, 47, 87, 12, 30, 60,248,135,186,186,186, 14,142, 68,243,198, 57,235,226,
-197,139,209, 54,155, 13, 50,153,231, 46, 74, 44,203,162, 83,167, 78,120,243,205, 55, 49,108,216,176,152, 65,131, 6,205,114, 19,
- 90,151, 13, 37, 85, 42,149, 95, 28, 56,112, 32, 74,169, 84, 34, 47, 47, 15,197,197,197, 24, 63,126,124,107, 65, 16, 80, 84, 84,
-132,211,167, 79,227,194,133, 11, 88,184,112, 97,212,136, 17, 35,190,240, 32,180, 60, 13, 79,125,230,229,151, 95,238, 24, 22, 22,
-198,126,244,209, 71, 53, 58,157,238,255, 28,251,223,153, 51,103,206, 99,253,251,247,143,250,247,191,255, 77,118,236,216,177,216,
-113,227,188,166,167,107,159, 44, 71, 51, 31, 28,153,239,164,219, 57,157, 92,254, 7, 33, 36, 6,128,137, 97,152, 26, 15,156, 12,
-128,144,161, 67,135,190, 98, 50,153,186,111,223,190,253,204, 45,183,220,146, 8,224,162,152,249, 66, 66, 66, 84,179,102,205,138,
-206,204,204,204,189,245,214, 91,187, 15, 29, 58,244,149,138,138,138,233,132,144, 10,151, 62, 91, 78, 78, 65,192,225,152,216, 46,
-203,114,118,141,123, 96,203, 14,179,244,213, 23, 39,159,111,211, 58,169,246,112, 94,181,253,120,126, 5,234, 12, 54,220,123,107,
-195, 2,230,189,187,180,193,103,223,111,199,115, 47,189,197,255,184,108,209,253,103, 8, 84,245, 37,199,215,248, 72,207,171, 5,
-229,132,179,137, 9, 60,207,227,142, 59,238, 0,195, 48,151,173,229,201,243, 60,118,237,218,133, 91,111,189, 21, 60,207,227,137,
- 39,158, 8,136,147,227, 56, 12, 29, 58,212,185,142,162, 43,159,187,104,240,162, 9,178,221, 42, 91,112, 28, 7,150,101,189, 46,
-164,237,206,233,175, 94, 18,195,233,139,203,245, 63,127,225,116, 44,121, 20,176,200, 10,148, 83, 12, 39,199,113,232,211,167, 15,
- 14, 29, 58,228, 83,116,121,209,151,141,226,126,233,210,165, 49, 29, 58,116,200,153, 59,119,110, 56, 0, 84, 85, 85, 57, 23,188,
-151, 72, 36, 56,117,234, 20,204,102, 51,222,125,247, 93,139, 86,171,253, 55, 45, 71,148,179, 37, 57,125,105, 17, 0,253, 39, 78,
-156,216, 51, 43, 43,107,122, 70, 70,198,119, 59,119,238, 92,202, 48,204,106, 66, 72,166,248, 57,113,226,196,180,172,172,172,233,
- 19, 38, 76,120,115,198,140, 25,199, 24,134, 89, 13, 0,238,191, 29,117, 73,166,155,136,139, 20,121, 28,101,174,209,177,158,126,
-187,127,122,226,110,228,104,101,102,102, 50,142, 72, 50,174,149, 90,160, 66, 43,144,181,251, 56,142,123,126,250,244,233,209,190,
- 68, 86,125,125, 61, 74, 74, 74,144,152,152,136, 39,158,120, 34,122,238,220,185,207,219,108,182,143,125,208, 74, 37, 18, 9,246,
-238,221,139,242,242,114,116,237,218, 21,201,201,201,141, 14, 56,123,246, 44,214,174, 93,139,154,154, 26,244,232,209, 3,104,232,
-220,237, 17,221,186,117,123,183, 83,167, 78, 67, 89,150,181, 41, 20, 10, 28, 62,124, 24,221,187,119,199,247,223,127,143, 54,109,
-218, 64,169, 84, 34, 55, 55, 23, 93,187,118,197,214,173, 91, 17, 25, 25,137,244,244,116,155, 86,171,221, 86, 93, 93,189,249,220,
-185,115,239,122, 11,103,124,124,252,228,167,158,122, 74, 86, 82, 82, 34,124,243,205, 55,219, 1,108, 7,240,252, 91,111,189,245,
-248,176, 97,195,162, 14, 30, 60, 88,187,111,223,190, 61, 94, 68, 86, 32, 78,150,205,253,161,100,183,219, 77, 6,131,193,108, 50,
-153,172, 44,203, 22, 50, 12, 99,182,219,237, 29,188,153, 16, 99,199,142,109, 91, 89, 89,249,220, 75, 47,189, 84,224, 16, 89,167,
-208,208, 1, 30, 0, 96,179,217, 76,245,245,245,218,140,140,140,196,135, 31,126,248,204,210,165, 75,159, 27, 59,118,236,242,111,
-190,249,166, 30,128,193,157,176, 77,155,214,135, 36, 18, 86,170,171, 11,207, 95,177,252,203,151,215,174,122,190,117, 81,209,133,
-246, 17,173, 34,117, 82,117,100,201,242, 37, 95,239, 7, 96, 46,169,208,226,200,217, 82,240,188, 4, 39,138,106,209,255,246, 81,
-252,153,188,105,125, 1,172,161,239,114, 45,255,178, 40, 46, 66,189,101,203, 22,159,142,214,174, 93,187,192,243, 60, 20, 10, 5,
-102,207,158,237,147, 84, 20, 6,162, 91,228, 79,204,136,139,163,251,114,159, 4, 65,112, 46,244,238,190,253,223,255,253, 31, 94,
-122,233,165, 70,215,112,136, 13,198, 31,167,183,240, 37, 38, 37,161,188,172,172,209,190, 64, 22,165,183,219,237,224,121, 30, 11,
- 22, 44, 64,102,102, 38, 86,175, 94,237,243,243,142, 59,238, 0,203,178, 36,144,244,236,211,167, 15, 44, 22,139, 51,204,167, 78,
-157,242,200, 59,111,222, 60,127,193,188, 11,192,148,238,221,187,107, 6, 13, 26,132,156,156, 28,220,127,255,253, 38,139,197,146,
- 7, 0,119,222,121,103,234,220,185,115,101, 7, 14, 28, 64, 68, 68, 4,127,254,252,249,255,129,118,144,167,104, 97,120,210, 34,
-226, 51, 47, 43, 43,107,186,187,136,113,133,248, 63,195, 48,171,103,204,152,145,233, 42,138, 92,127,139,174,147,155,136, 75,115,
-117,164, 92, 69,148, 55, 1,229,246,188,117, 61,190,194,163,208,114, 68,108,160,171, 11, 36, 86,190,254, 68,150,143, 55,199, 70,
- 8, 9, 9, 25,126,239,189,247, 58, 69,142,209,104,116, 10, 44, 81,100,137,191,115,115,115,209,179,103, 79,105, 72, 72,200,240,
-170,170,170,143, 3, 16,113,136,139,139, 67,101,101, 37,142, 30, 61,138,196,196, 68, 88,173, 86,172, 95,191, 30,181,181,181,224,
-121, 30, 82,169, 20, 22,139,207,190,219,232,212,169,211, 29,139, 23, 47,238,185,104,209,162, 75,226, 27,221,146, 37, 75, 64, 8,
- 65,100,100, 36,244,122, 61,202,202,202,176,121,243,102,216,108, 54,168,213,106,164,164,164,200,238,185,231,158,190, 83,166, 76,
-225,125, 8,173, 62,247,223,127,127,136, 70,163,193,139, 47,190, 72, 44, 22,203, 12,199,190,201,227,198,141,139, 40, 44, 44, 52,
- 63,249,228,147,123, 45, 22,203, 71,162,153,232, 42,112,188,220, 88,175, 78,150,213,106, 21,211,180,160,190,190, 30,173, 90,181,
- 74,116,117,182,188,137,193, 29, 59,118,244, 1, 32,153, 58,117,106, 16,128, 50,215, 48,152,205,102,212,215,215, 67,167,211, 89,
-107,107,107,203, 95,123,237, 53,219,210,165, 75, 37,142,115, 78,120, 18, 90, 12,115,135, 89,163, 81,202, 8,145,188, 53,127,254,
-124,245,176, 97,195, 88,181, 90,141,186,186, 58,205,175,235,214,169, 7, 15,234,155, 50, 61,235,195, 13,154,132,174,101, 59, 14,
-231,227, 66,105, 45,204, 86, 43, 82, 98, 67, 26,252, 48,138, 22,135, 99, 32,139,211,209,114, 21, 21, 57, 57, 57,184,253,246,219,
-157,101, 93, 42,149, 54,114,190,252,113,114, 28,135,219,111,191,253, 50,135,103,203,150, 45, 30,221, 39,127,112, 21, 69,238,226,
-200,147, 0, 99, 89,214,239, 2,235,162,155,231, 73,108,185,186,250,110,226,205, 95, 51, 7, 56,142,195,184,113,227,192,243, 60,
- 94,127,253,117,112, 28,135,244,244,116,112, 28,135,140,140, 12,240, 60,143, 91,111,189,181,201,113,223,189,123, 55,186,119,239,
-238, 12, 83,122,122, 58,122,245,234, 5,142,227,208,175, 95, 63,240, 60,143,161, 67,135, 6,194,249,102, 93, 93, 93, 55,181, 90,
-141,220,220, 92, 72, 36, 18, 48, 12,115, 26, 64, 55, 0,136,141,141, 61,163, 6,111,130,189, 0, 0, 32, 0, 73, 68, 65, 84,215,
-235,219, 26,141, 70, 60,245,212, 83,140,217,108,238,250,250,235,175,191,101, 52, 26,169,208,162,104, 49,184,107, 17, 23, 24, 38,
- 76,152,240, 38,195, 48,171, 69,135,202,221,121,242,244,219, 67,221, 36, 58, 80,251, 28,101,181,151,155,136,171, 96, 24,102, 31,
- 33,228, 78,111,231, 2, 48,187, 9,171, 70, 77,135,174,205,134,126, 29, 45,177,242, 13, 84,104,249,131,209,104,188, 49, 42, 42,
-202,171,200,114,253, 52,155,205, 72, 78, 78,134,209,104,188,177,169, 15,141,216,216, 88, 88, 44, 22,124,249,229,151,144, 74,165,
-144, 74,255,208, 23,102,179,111,179,232,248,241,227, 5,187,119,239,238,222,163, 71,143,176,159,126,250,169, 98,192,128, 1,145,
-195,134, 13,131, 66,161,128,193, 96,128,213,106, 69,239,222,189,209,169, 83, 39, 20, 23, 23,227,215, 95,127,173,236,208,161, 67,
-171, 61,123,246, 8,165,165,165,231,124, 80,223, 54,120,240, 96, 48, 12,131,117,235,214, 85, 2,216, 39,151,203,215, 78,155, 54,
- 45,204,108, 54, 11,163, 71,143, 62, 95, 93, 93,253, 18, 0,139, 76, 38,155, 51, 96,192,128,140,236,236,236,111, 5, 65,152,221,
-212,140,234,158,182, 58,157, 14, 65, 65, 65,129, 76, 37,193, 87, 87, 87,119, 1, 0,149, 74, 21, 14,224,140, 51,135, 27, 12,141,
-196,176,217,108, 54,134,135,135,171, 0,192,113, 14,239,133, 51,210,102,195,138,115,231,242,131, 93,251,207,133,134,134,226,145,
-135, 31,102,111,233,211, 71,214,237,198, 27,135,190,253,201,162,239,227, 34, 52,230,148,184, 8, 88,237, 86,100,111, 88, 47, 16,
-193,186,129, 86, 59,127,142,208, 18,197,134,187,163,197,243, 60,182,110,221,122,217, 62,169, 84,138,255,254,247,191, 1, 9, 3,
- 81, 84,121,107, 58,115,107,234, 98,252, 9, 24,158,231, 33,145, 72,176, 96,193, 2, 8,130,128,151, 95,126,185, 81,115,162, 43,
-127, 64,118,158,139, 8,236, 52, 89, 0, 96, 70,241, 76,185,243,124,247,240, 58,206, 9,200, 37,155, 59,119,110, 64,142,214,157,
-119,222,233, 87,184,186,182, 48,184,134,235,208,161, 67, 30,121,231,207,159,239, 55, 61,237,118, 59,214,172, 89,227, 20,169, 34,
-222,126,251,237,167,100, 50, 89,244,182,109,219, 80, 90, 90, 10,157, 78,135,250,250,122,244,238,221, 59,133,101,217,195,165,165,
-165,133, 39, 78,156,184,151,150, 30,138, 63,209,209, 50,205,152, 49,227,216,140, 25, 51, 60, 58, 86,238,206,146, 47,231, 73, 20,
- 88, 14, 65, 20, 41,138, 55, 52,116,171,217,231,239, 92, 0, 50,247,166, 67,159, 70,144,155,138,156,226,169,242, 13,164,249, 48,
- 64, 59,157, 99, 24, 6, 70,163,209,163,192,114, 21, 7, 22,139, 5,213,213,213,176,219,237, 87, 60,215,151,167, 55, 89,127, 66,
-235,232,209,163,255,122,252,241,199, 75, 66, 66, 66,186, 85, 84, 84,148, 11,130,112,235,174, 93,187, 34, 57,142,131, 70,163,129,
- 70,163,193,218,181,107,161, 84, 42, 49,110,220,184,114,187,221,158, 19, 28, 28, 28, 97, 48, 24,126, 47, 45, 45,125,219,171,130,
-225,249,161,253,250,245,195,129, 3, 7,112,233,210,165,141, 0,210, 31,125,244,209,219, 91,183,110,205, 76,155, 54,205,120,246,
-236,217,217, 0,202, 85, 42,213,226,197,139, 23, 15,234,209,163, 71,240,232,209,163,177,117,235,214,249, 0,140,129,198, 89,167,
-211, 53, 18, 88, 90,173, 22,117,117,117, 80,169, 84,182, 0,211,140,199, 31, 35, 12, 65, 8,113,222, 27,135,155, 37,222, 31,194,
-113,156, 56,170,209,155,200,130, 74,165,154,186,104,209, 34,133,251, 32, 5,187,221,142,178,178, 50,104, 52, 26, 76,122,251,109,
-233,123,227,255,221, 93,162,142,222,197,178, 12,204, 22, 82, 67, 4,243,122, 93,217,131,219,128,119,105,205,243, 39, 64, 20, 6,
-119,223,125,247,101,205,133, 82,169, 20, 27, 55,110,196,136, 17, 35,156, 47, 46, 61,122,244,240,251,114, 37, 10,131,187,238,186,
-203,233, 12,173, 95,191,222, 99,179,159,232, 72, 5, 34, 8,197, 99, 95,120,225, 5,112, 28,135,207, 62,251, 12,175,188,242, 10,
- 88,150,197,204,153, 51,193,178, 44,222,121,231,157,128, 69,166,171,128, 41,252,176,225, 51,225, 21, 45,170,230, 69, 3, 0,130,
- 53, 26, 49, 66, 77,170,123, 56,142,115, 58, 89, 55,222,120, 35,120,158, 71, 70, 70, 6, 56,142,115, 58, 89,195,135, 15,119, 77,
- 71, 18, 8, 39,199,113,200,203,203,115,134, 57, 35, 35,163,145,147,197,113, 28,238,188,243,206, 64,130, 57, 61, 52, 52,116, 74,
-167, 78,157, 58,207,154, 53,139,151, 72, 36, 24, 60,120,112,106, 76, 76,204, 57,155,205, 22, 49,117,234, 84,165,135,115, 20, 0,
-186,117,238,220, 89, 69, 75, 13, 69, 11, 58, 90, 83, 60,252, 21,230,218,231,170, 9, 47,146,171, 93,143, 23, 57,220,197,145,195,
- 33,203,241,199,229,233, 92,127,224, 68, 5,233,203, 82, 15, 68,104, 57,108,103,159, 23, 83, 42,149, 71,202,203,203, 51, 20, 10,
- 69, 35,145,229, 73,112, 73, 36, 18,148,150,150, 66,169, 84, 30, 49,153, 76,205,118, 19,253, 53, 29, 2, 48,158, 62,125,122,188,
-203,239, 33,195,135, 15,255,102,227,198,141,177,217,217,217,216,179,103, 15, 34, 35, 35, 49,119,238,220,139,101,101,101,255, 2,
-176,177,178,178,210,239,117,219,182,109,219, 69,173, 86, 99,199,142, 29, 0,176, 21,192,191,159,123,238, 57,198,106,181, 98,222,
-188,121, 58, 0,235, 66, 67, 67,215, 44, 95,190,188,123,183,110,221,100,217,217,217,218, 61,123,246,252, 22,160,200,178, 11,130,
-112,153,192,114, 77,211,224,224,224, 64, 28, 45,107, 72, 72,200, 81,173, 86, 59,202, 96, 48,104,229,114,121,176, 86,171, 53,185,
- 10, 44,145,159,227, 56, 62, 47, 47,175, 4, 64, 74, 72, 72,200, 81,120,105,230,228, 56,110,240,224,193,131, 57,247,123, 80, 86,
- 86,134,210,210, 82, 88, 44, 22,244,232,209,131,145, 48, 86,201,165,162, 35,110,211, 58, 80,145,245, 39, 57, 90, 68, 44,235,226,
- 40, 65, 79, 35, 13,215,175, 95,239,252,205,178, 44,190,254,250,235,128, 68,209,198,141, 27,125,118, 88,119,107, 58,244,107,141,
-139,199,127,254,249,231, 32,132, 56,157, 44,150,101, 49, 97,194, 4,200,229,114, 76,155, 54, 13, 19, 38, 76, 0,199,113,126,155,
- 14, 93, 5, 76,210,235,122,215,151,163,134, 66,225,232, 15,197, 48,140,171,216, 98, 2, 21,111,190,220,188, 64, 90, 2, 92, 57,
-197,243,130,130,130,188,118,132,119,227,244,117,129, 95, 0,228,199,198,198,238,200,200,200, 8,217,191,127, 63,102,206,156, 41,
- 53,153, 76,109,178,179,179,157,215,245,148, 94, 58,157, 78, 65, 75, 14, 69, 75,184, 89, 62,254,174,112,235, 95,197,184, 54,227,
-249,248,116, 63, 30, 46,251, 92,121, 43, 24,134,177,122,184, 94,133, 7,113,229,126, 13,215, 99, 42,188, 58, 90,254, 42, 11,127,
-130, 43, 16, 71, 75,175,215,255,182,110,221,186, 94, 15, 63,252, 48,231,171,217, 80,167,211, 33, 58, 58, 26,199,142, 29,179,233,
-245,250,223, 2,112,202,154, 83,104,185, 35,187,188,188, 92, 98,181, 90,209,190,125,123,196,199,199,195,104, 52,162,166,166, 70,
- 2, 96, 99,128, 28, 82,149, 74, 37, 1,128,154,154, 26,160, 97,168,105,106,135, 14, 29,112,224,192, 1, 84, 87, 87,255, 8, 96,
-216,148, 41, 83,122,244,238,221, 91,250,253,247,223,235,159,121,230,153, 31,173, 86,107, 64, 74, 67, 16, 4,179,205,102, 75,102,
- 89,214, 82, 83, 83,115,193, 53, 61,163,163,163,195, 85, 42, 21, 83, 86, 86,102, 13, 68,104,117,235,214,109,239,249,243,231, 49,
-117,234,212,138,233,211,167,119,168,171,171,187, 84, 91, 91,107,115, 21, 91, 70,163,145,109,213,170,149,124,222,188,121, 10, 0,
-232,214,173,219, 94,111, 66, 75,167,211,181, 86, 42,255,120, 49, 54,153, 76, 40, 45, 45, 69,105,105, 41,202,202,202, 80, 87, 87,
-135,148,148, 20,232,245,250, 68, 90,205,252,101, 66,171, 81,243,153,107,249,118,125,144, 55,165,172,187, 10,152,187,239,190,219,
-217,183, 75,116,200,196,109,197,138, 21,238, 29,204, 3, 18, 90,159,127,254, 57, 94,120,225, 5, 4, 5, 5, 97,214,172, 89,141,
-154, 14,221,197,129, 32, 8, 76, 32,113, 79,126,195,128,210, 57,225,224,121, 30, 17,207,148, 53,106,162,243, 32, 56, 2, 10,231,
-244,233,211,155,165,233,208,149, 51, 49,177,161,168, 44, 88,176, 0,163, 70,141,194,182,109,219,174,184,233, 48, 45, 45,109,201,
-234,213,171, 67,142, 31, 63, 14,173, 86,139,138,138, 10,152, 76, 38, 20, 23, 23,123,109, 21,112,212,229, 65,180,228, 80,252,201,
-245,212,190, 63,147,183, 57,175,199,249,121,128, 7, 44,180, 2,113,180, 76, 38,211,172, 23, 95,124,241,185, 33, 67,134,132, 7,
- 7, 7,163,164,164,228, 50,145, 85, 95, 95, 15,181, 90, 13,131,193,128, 85,171, 86,105, 77, 38,211, 44,127,226,192,106,181, 34,
- 42, 42, 10,149,149,149, 16,188,244,159,102, 89, 22, 10,133, 2,245,245,245,128,159, 78,230,158, 30, 24, 22,139, 5, 86,171, 21,
- 86,171, 21, 22,139,197,239, 91,178,187,153,167, 82,169, 68,225, 1, 0,186,184,184,184,246, 65, 65, 65, 40, 40, 40, 0, 26, 70,
-246, 13,185,253,246,219,249,170,170, 42,242,228,147, 79,110, 39,132, 60, 5,223,179,227,155,115,114,114,146, 1, 64,161, 80,228,
- 2, 64,113,113,177,181,166,166,166,145, 83,168, 84, 42,201,136, 17, 35, 98, 9, 33,200,201,201, 73,150, 74,165, 4,222, 71, 53,
- 26, 87,174, 92,121, 60, 36, 36,100,105, 86, 86,214,195,153,153,153,199,186,116,233,146,172,211,233,202, 13, 6,131,193,104, 52,
- 18,137, 68, 34, 13, 11, 11, 11,218,176, 97,195,153, 93,187,118, 13,209,104, 52, 75, 87,174, 92,121,220,155,243,166, 82,169,138,
-245,122,125,146,120, 79, 93, 69, 86,105,105, 41, 8, 33,200,207,207,135, 82,169, 60,239,175, 89,151,162,229, 32,190, 84,185, 59,
- 47,238,251, 2, 21, 89,174,194, 96,195,134, 13, 62,231,208, 10,148,211, 85, 20,189,242,202, 43,152, 51,103,206,101,142,214,180,
-105,211, 0, 0,111,191,253,118,192,125,180, 68,247,170,116, 78, 56, 98, 94,168,110, 20,118, 0, 96,196,240, 53,173,204,131,227,
- 56, 76,157, 58,245,178, 78,234,174, 77,123, 1, 54,241, 53, 10,103,121,121, 57, 56,142, 67,120,120, 56, 30,121,228, 17, 12, 29,
- 58,212,217, 4,217, 84,222,147, 39, 79,238,120,227,141, 55,186,166,165,165,225,253,247,223,175, 14, 13, 13, 13,254,207,127,254,
-195,213,212,212, 48,190, 28, 45, 42,180, 40, 40,154, 65,104,137, 5, 44,208, 81,135, 94, 42,203, 33,104, 60,215, 70,173, 94,175,
-127,228,182,219,110,251,105,217,178,101,138,182,109,219,226,228,201,147,168,174,174,134,217,108,134, 84, 42, 69,108,108, 44,106,
-106,106,240,245,215, 95, 27,244,122,253, 35, 0,106,253,112,190,213,179,103,207, 47, 62,254,248,227,160,244,244,116, 84, 87, 87,
-163,190,190,222, 41,132, 24,134,129, 70,163,129, 66,161,192,222,189,123,177,126,253,122, 3,128,183,252,112,122, 82,115,176, 88,
- 44, 78,193, 21,128,208,114,229, 84,137,174,142, 94,175, 7, 0,107,235,214,173, 99, 0, 32, 63, 63, 31, 0, 10, 83, 82, 82,166,
-180,109,219,150, 89,188,120, 49, 33,132,172,247, 34,178,156,156, 12,195, 84, 19, 66, 46, 1,136, 49,155,205, 82, 0,168,173,173,
-181,180,106,213, 42, 74, 46,151, 11, 10,133, 66, 8, 10, 10, 18, 74, 74, 74,108, 54,155, 77, 10, 0,253,250,245, 51, 3, 40,117,
- 91,163,208,149, 83, 32,132,104,231,207,159, 63,101,244,232,209, 25,125,250,244, 73,123,246,217,103,143, 62,249,228,147,108,124,
-124,124, 88, 93, 93,157,241,244,233,211,151, 62,249,228,147,186,221,187,119, 15,225,121,254,220,252,249,243,167, 0,208, 50, 12,
- 35,120,226,180,217,108,191,101,103,103,255, 43, 51, 51,147,187,112,225, 2,202,202,202,156, 34,171,172,172, 12,157, 58,117,194,
-174, 93,187,236, 22,139, 37,187, 9,233,217, 92,160,156, 13, 47, 33, 68, 44,235,222, 4,150,248, 50, 21, 40,167,171, 40, 26, 53,
-106, 84, 35, 23, 75, 42,149,226,135, 31,126,240, 88,111,120, 40, 87,141,226,238, 58,199,215, 27,111,188,209, 72,180, 77,154, 52,
-201,107,117,230, 47, 61, 69,158,218, 5,241,141, 71, 29,122, 41,231,190,194, 41,214,157, 60,207, 99,210,164, 73, 1, 59, 90,184,
-188,143,214,101,156, 98,220, 7, 12, 24, 0,189, 94,239, 20,178,222, 28, 45,127,233,105,183,219, 95,152, 51,103, 14,209,104, 52,
- 55,107,181,218, 71,207,159, 63,191, 80,175,215,223, 84, 91, 91,235,211,209, 50,153, 76,114, 90,142, 40, 39, 90,102,126,174,235,
- 71,104, 57, 30,146,104,221,186,117,163,181,179, 88,150,109,180, 53,165,159,129, 3, 27,242,242,242,238,187,229,150, 91,190,125,
-225,133, 23,130,211,211,211,249,164,164, 36,232,116, 58, 20, 20, 20,224,216,177, 99,182,149, 43, 87,106,245,122,253,163, 0, 2,
- 25,117,182,232,248,241,227,235,135, 13, 27,246, 78,239,222,189,159,158, 60,121,178, 36, 53, 53, 21,181,181,181, 8, 11, 11, 67,
- 84, 84, 20, 78,157, 58,133, 85,171, 86,217, 43, 43, 43,191, 0,240, 30, 60,180,161,250,123,225,183, 88, 44,120,232,161,135, 32,
- 8, 2,102,207,158,141, 64, 22, 84,118,129,197, 98,177, 16, 0,140,163, 63,151,222, 49,187, 52, 78,159, 62, 13, 0,231,146,147,
-147,131, 1, 32, 59, 59,155, 65,195,252, 90,129,188,225, 19, 66,136,211,217,234,212,169, 83,129,123,229, 40, 58, 89,162, 11,230,
- 47,220, 12,195, 24, 9, 33,229,122,189,126,216, 43,175,188,242,206,231,159,127,254,240,231,159,127,126,217,113, 26,141,102,233,
-204,153, 51,223,123,224,129, 7,202, 25,134,241,218,143, 76,167,211,189, 61,102,204,152, 7,142, 28, 57, 18, 28, 20, 20, 4,157,
- 78,135,170,170, 42, 88, 44, 22,164,164,164,160,188,188, 28,139, 22, 45,170, 51, 24, 12,239,210,226,248,215,192, 85, 24,120,115,
-181, 2, 16, 89, 94, 93,157, 95,126,249,197,227, 28, 85, 77,229,116, 23, 27,129,206,109,229,235,165, 72,156,150,198,211,148, 17,
- 77,172,215, 46,227,229, 56, 14, 31,125,244,145,115,210, 86, 79, 78, 86, 83, 28, 45,145, 51, 60, 60,188,193, 38, 87, 42, 33, 8,
- 2,238,188,243,206,171,225, 21, 0,140,115,153,241,125,250,107,175,189, 54,165, 83,167, 78,169, 0,228,174,105,208, 68, 23,159,
-130,130,194,159,208,178,219,237,197, 29, 59,118,108, 84,193,249, 91,204,212,106,181, 22, 7,120,221,245, 58,157, 46,101,230,204,
-153, 47,170, 84,170, 33,122,189,190,171,163,226, 56,162,211,233,178, 77, 38,211,167,104,218, 34,208, 21, 0,158,223,189,123,247,
-236, 97,195,134, 77,187,245,214, 91, 71,142, 31, 63,158, 33,132, 96,222,188,121,228,236,217,179, 43, 28, 46,214,217, 43, 73,164,
-240,240,240,227, 95,127,253,117,244, 79, 63,253, 4,171,213,138, 79, 63,253, 20,193,193,193,199,171,171,171, 3,165, 40,223,180,
-105,211, 55,125,250,244,121,108,215,174, 93,139, 0,252,190,117,235,214,133,125,251,246, 29,179,107,215,174, 37, 0,142,109,222,
-188,121, 97,239,222,189,199,236,219,183,111, 57,128, 67, 77,168,124,157,206,150,205,230,185,165,209,139,147,229,139, 83, 75, 8,
-177, 60,254,248,227,227, 31,120,224,129, 47,247,237,219,119, 83, 77, 77, 77, 87, 0, 8, 13, 13, 61,210,171, 87,175,189,203,150,
- 45, 59,229,112,178,252,117,214,175,208,233,116, 35,186,118,237,250,227,251,239,191,175, 74, 75, 75,227,218,183,111,143,194,194,
- 66, 28, 61,122,212,246,191,255,253,175,222, 96, 48,220, 13,224, 18, 45,142,127,157,208, 34,132, 32, 52, 52,180,209, 75,148, 56,
-228,191,169,205,133,174, 15,102,113,169, 30,119, 94,111,156,190,166, 77, 16,161, 86,171,157,147,155, 6,210,101, 65, 16,124,207,
-199, 70, 8,113,114,138, 91, 0, 34,203,239, 8, 65,199, 18, 56, 1,115, 6, 50,189,131, 74,165,130,213,106,117,242, 6, 48,242,
-179,169,106,241, 23, 0,191, 88,173,214,211, 0,218, 81,113, 69, 65,209,130, 66,235,210,165, 75, 61, 91,248,218, 90,147,201,244,
-158,201,100,122, 79,220, 97, 52, 26,175,150,243, 44,128, 7, 54,109,218,244,241,166, 77,155,196,118,132,169,240,191, 94,162, 79,
-156, 60,121, 50,147,231,249,255, 46, 93,186,180, 55, 33, 4, 33, 33, 33,187, 11, 11, 11,255,211, 20, 14,187,221,254,248,174, 93,
-187,158,131,163, 47,147,197, 98,121,124,199,142, 29, 47,162, 97, 61, 38,216,237,246,199,247,236,217,227,252,221,196, 7, 37, 33,
-132,152, 8, 33,113, 94, 14, 49, 53,209,129, 19,157, 45,243,178,101,203,234, 1, 28,198, 31,243,100, 89, 29,155,209,173,185,208,
- 23, 54,235,116,186,246,147, 38, 77,154, 46,145, 72, 6,235,116,186,120,149, 74, 85,100,179,217,126,211,235,245,111,161, 97,141,
- 42,138,191, 8,102,179,249, 66,199,142, 29, 57, 79, 47, 80,190, 30,228,190, 94,172,236,118,123,113,135, 14, 29,252,190,156,121,
-224,188,224, 67, 52,156, 75, 73, 73, 97, 3,229, 18, 97,177, 88,202,125,133, 51, 37, 37, 5, 77,229,244, 23,247,228,228,100,143,
-113,247, 35, 8,189,198,221,102,179, 93, 17,167,175,244,244, 5,131,193,112, 41, 50, 50,178,222,104, 52,242, 38,147,137,183,217,
-108,141,236, 71,133, 66, 81, 97, 48, 24,104,225,161,160,184, 26,161,245, 15,199,126, 52, 44, 47,209, 92, 48, 29, 57,114,228, 49,
-167, 61, 85, 94,126,165, 60,238, 74,178,222,207,239,166, 8,163,102,119,132, 28, 66, 74,223, 76,116,149,245,245,245, 79,138, 63,
-196, 62, 32, 20,127, 61,170,170,170,110,110,110,206,234,234,234,102,127, 81,171,172,172,204,104,129,184,247,188, 94, 57,125,161,
-164,164,228,102, 63, 66,140, 22, 28, 10,138, 0,193,210, 36,160,160,160,160,160,160,160,160,104, 25, 48,104, 24, 57,224, 9, 77,
- 25, 77, 48,228, 10,174,157, 77, 57, 41, 39,229,164,156,148,147,114, 82,206,235,142,211, 31, 55, 29,205,216,194, 2,140,114, 82,
- 78,202, 73, 57, 41, 39,229,164,156,215, 31,231, 53, 9,218,116, 72, 65, 65, 65, 65, 65, 65, 65, 65,133, 22, 5, 5, 5, 5, 5,
- 5, 5, 5, 21, 90, 20, 20, 20, 20,174, 72,109,221,186,245,137,212,212,212, 11, 0,198,182,240,181, 30,233,221,187,119,149, 92,
- 46,223, 0, 32,149, 38, 61, 5, 5, 5, 21, 90, 20, 20, 20,215,180,200,234,218,181,235,246,147, 39, 79,118,202,206,206,142,139,
-143,143,255,176, 37, 47,214,179,103,207, 15,182,109,219, 22,190,110,221,186,219, 98, 98, 98,114,174, 80,108,165,182,105,211,230,
- 68,106,106,106, 49,128, 71,154, 57,136, 99, 51, 50, 50,170,101, 50,217,122, 42, 4, 41,174, 3,116, 1,208,149, 10, 45, 10, 10,
- 10,138, 22, 20, 89, 59,119,238,140, 48, 26,141, 56,121,242, 36, 42, 42, 42, 14,181,228, 5,115,115,115, 47,237,220,185, 19, 9,
- 9, 9, 88,178,100, 73,100,114,114,242,182, 38, 10,154,212,174, 93,187,110, 63,113,226, 68,167,236,236,236,248,168,168,168, 79,
-154, 51,124, 55,221,116,211,180,109,219,182,133,109,216,176, 97,104,100,100,228,149, 10, 65, 10,138,191, 51,228, 0, 30, 99, 24,
-102,111,151, 46, 93,142,164,165,165,253,206, 48,204, 46, 0,163,112,237,206,221, 25, 24, 86,175, 94,189,117,245,234,213, 91,105,
- 30,161,160,160,104, 6,164,165,165,165,233,116, 58, 29,169,168,168, 32,159,125,246, 25, 9, 15, 15,183, 0,248, 13,192, 74, 15,
-219,155, 0, 52, 1,114,107, 28,199,123,226,249, 45, 60, 60,220,242,217,103,159,145,252,252,124,114,252,248,113,146,154,154,106,
- 8, 80,208,164,118,237,218,181, 82, 12,243,218,181,107, 9,199,113,235,155, 51, 81, 52, 26,205,177,156,156, 28,114,246,236, 89,
-178, 97,195, 6, 18, 29, 29, 93, 78,197, 22,197, 53,130, 36, 0, 31,168,213,234,234,187,238,186,139,124,245,213, 87,100,213,170,
- 85,228,199, 31,127, 36,179,102,205, 34,131, 6, 13, 34, 50,153,236, 2,128,215, 1,132, 94, 79, 90,132,113, 68,140, 0, 24, 8,
- 0,153,153,153, 84,108, 81, 80, 80, 92, 45,118,234,245,250, 12,189, 94,143,186,186, 58,180,110,221, 26, 60,207,123, 60,176,188,
-188, 28, 59,118,236,192,184,113,227,142,151,150,150,246,135,239,117, 47,195,186,119,239,190,115,243,230,205,169,193,193,193,206,
-157,130, 32,192, 98,177,192,106,181,194, 98,177,192,100, 50,193,100, 50, 65, 38,147, 65,161, 80, 32, 60, 60,252, 40,124, 55, 97,
- 56,221, 55,131,193,128,131, 7, 15, 98,244,232,209, 21, 85, 85, 85,253, 1,228, 54, 99,186,164, 70, 69, 69,229, 44, 90,180, 40,
- 50, 37, 37, 5,231,207,159,199, 19, 79, 60, 81,121,238,220,185,126,205,124, 29, 10,138, 63, 19, 19,238,187,239,190,105,209,209,
-209,108,151, 46, 93, 16, 27, 27, 11,147,201, 4,131,193, 0, 66, 8, 56,142, 3, 33, 4,181,181,181,200,201,201,193,230,205,155,
- 77,151, 46, 93,250, 26,192,167, 0,242, 92, 68,214, 53,169, 69,156, 66, 43, 51, 51,147,161,121,133,130,130,162,153,112,164,182,
-182,182,139,201,100,130, 78,167, 11,232,132,252,252,124,140, 29, 59,246,120,105,105,233, 45,240,188,168,188,166,123,247,238,123,
-114,114,114, 82,141, 70, 35,180, 90,255,235,206,203,100, 50, 4, 5, 5, 33, 34, 34, 98, 23,128, 62,222,222,196,187,116,233,178,
-127,215,174, 93,225, 6,131, 1,135, 14, 29,194, 35,143, 60, 98,169,174,174,222, 14,192, 91,224,171,209,176,142,234, 57, 15,255,
- 37, 2,120,209,241,134,239, 9,170,200,200,200,190,139, 23, 47,150,182,109,219, 22,122,189, 30,163, 70,141,170,206,205,205,237,
- 5,160,128,102, 29,138,127, 32,114, 79,158, 60,217,193,110,183,163,178,178, 18, 38,147, 9,122,189,222, 41,180, 36, 18, 9, 8,
- 33,176,217,108,206, 23,163, 3, 7, 14, 32, 59, 59,155,228,231,231, 79,118,148,165,107, 86,139, 80,161, 69, 65, 65,209, 18, 72,
-237,208,161,195,161, 95,127,253, 53, 72, 42,149, 98,213,170, 85,152, 60,121,178,181,186,186,122,155,187,120,137,142,142, 78, 91,
-184,112, 97,114, 74, 74, 10,126,255,253,119,220,127,255,253,111, 1,152,238,129,243, 77,173, 86, 59,205, 98,177,224,208,161, 67,
- 24, 51,102, 76, 65, 89, 89,217, 49,119, 17,147,156,156,220,239,147, 79, 62,225,123,244,232, 1,173, 86,139,145, 35, 71,234, 79,
-157, 58,213, 27,192, 49, 47, 97,253,164,186,186,250, 21,187,221,142,186,186, 58, 36, 36, 36, 64, 42,149,250,140,156,193, 96, 64,
- 82, 82,210,174,138,138,138,203,196, 91, 68, 68,196,166,243,231,207, 15, 82, 40, 20, 62, 57, 44, 22, 11,138,139,139, 33,147,201,
- 96, 50,153,208,174, 93,187,175, 1, 60, 78,179, 14,197, 63, 81,104, 29, 62,124,184,195,119,223,125,135,238,221,187,163,115,231,
-206,168,175,175,119,138, 46,179,217, 12,171,213,122,217, 73, 90,173, 22, 47,191,252,114, 30, 28,205,231,215,170, 22, 17, 59,166,
- 77, 17,219, 68, 51, 51, 51, 7,208, 60, 67, 65, 65,113,181, 21,111, 94, 94, 94,250,144, 33, 67,182,173, 88,177,162,213,240,225,
-195,209,174, 93, 59,254,222,123,239,141,212,235,245,131, 93, 15, 44, 43, 43, 11, 27, 51,102,204,254,162,162,162,100,199,174, 94,
- 94, 56,123, 5, 7, 7, 35, 63, 63, 95, 20, 89, 61,225,214,204, 40,147,201,214, 31, 62,124,152,151,201,100,216,183,111, 31,198,
-142, 29, 91, 89, 80, 80,224,175, 89, 46,212,108, 54, 67, 34,145, 0, 0,138,139,139,253, 70,238,252,249,243, 16, 4,193,228,233,
- 63,150,101,229, 7, 14, 28, 64, 92, 92,156, 79, 14,150,101,221, 5, 93, 13,205, 54, 20,255, 80, 88,205,102, 51,122,246,236,137,
-130,130, 2, 28, 56,112,192, 41,184, 42, 43, 43, 81, 82, 82,210,232,224,189,123,247,226,224,193,131,232,223,191,191, 59,207, 53,
-169, 69,156,202,113,245,234,213, 3, 28,145,219, 74,243, 12, 5, 5, 69, 51, 33, 53, 46, 46, 46,103,209,162, 69,145,177,177,177,
- 24, 52,104, 80, 81,105,105,105, 27, 15,199,173, 36,132,220,157,159,159,143,182,109,219,174, 2,112,207,149, 28,147,152,152, 88,
-177,111,223,190, 86,199,143, 31,199, 35,143, 60, 82,225,232,243,229,175,239, 83,114,167, 78,157,246,109,216,176, 33,156,101, 89,
- 28, 59,118, 44,144,166,195, 66, 52,244, 47, 57,231,225,191, 68, 0,147, 0,132,123, 57, 87,213,161, 67,135,190,251,247,239,151,
- 50, 12,131,194,194, 66,177,233,176,167,131,151,130,226,159,134, 17,113,113,113,255,123,238,185,231, 66,122,247,238,141,226,226,
- 98, 92,184,112, 1,151, 46, 93, 66,122,122, 58,210,210,210,112,246,236, 89,172, 95,191, 30, 7, 15, 30,132, 92, 46, 71, 66, 66,
- 2,212, 75,191,195,127, 25, 28, 7,144, 70,181, 8, 5, 5, 5,197, 85,136, 45,169, 84,186, 62, 62, 62,190, 28,158,231,165, 10,
- 27, 57,114,100,137,221,110, 39,103,207,158, 37,104, 24, 61, 8, 47, 66,139,156, 61,123,150, 68, 71, 71,231, 3, 8,243,112,204,
-216,152,152,152, 34,165, 82,121, 20, 77,156,214,161,125,251,246, 21,167, 78,157, 34, 69, 69, 69,100,221,186,117, 36, 34, 34,162,
- 37, 70, 4,166,118,236,216,177,178,174,174,142, 24,141, 70,146,147,147, 67, 18, 19, 19, 43, 64, 71, 30, 82,252,243, 17, 12, 96,
-106, 74, 74,138,241,227,143, 63, 38,235,215,175, 39, 11, 22, 44, 32,211,166, 77, 35,227,199,143, 39, 25, 25, 25, 36, 35, 35,131,
-140, 26, 53,138,188,242,202, 43,228,246,219,111, 39,106,181,186, 22,192,189, 52,233, 40, 40, 40, 40,154, 23,137, 0,102, 57, 4,
-213,202,145, 35, 71,150,152, 76, 38,114,225,194, 5,242,195, 15, 63, 16, 52, 76,221,224, 9,111,150,150,150,146,210,210, 82,113,
-106,132,124,252, 49,173,195, 87, 14,222,171, 18, 65, 73, 73, 73, 21,251,247,239, 39,133,133,133,100,237,218,181,196, 33,216,154,
- 13, 10,133, 98,131, 86,171, 37, 70,163,145,108,218,180,137, 78,239, 64,113, 45, 34, 10,192,220, 27,110,184,193, 58,123,246,108,
-178,114,229, 74,242,217,103,159,145, 17, 35, 70,144,215, 95,127,157, 60,248,224,131, 36, 50, 50,210, 4, 32, 11, 64, 8, 77,174,
-171, 7, 93,217,156,114, 82, 78,202,233,142,245,199,143, 31, 39, 34,236,118, 59,185,112,225, 2,217,176, 97, 3,137,137,137, 57,
-134,198,243,105,185,114,106, 58,119,238,124,242,212,169, 83,228,252,249,243,196, 98,177, 56, 57, 78,158, 60, 73, 0,108,109,134,
-112,166,198,199,199,151,111,217,178,133,156, 58,117,138,196,196,196, 20, 53,103,220,147,146,146,202, 43, 42, 42,200,166, 77,155,
- 72,100,100,164, 63,145, 69,243, 18,229,252, 39,115, 38, 1, 88,220,163, 71, 15,251,156, 57,115,200,211, 79, 63, 77, 18, 19, 19,
-237,142,151,162,248,235, 73, 8, 93,223,179,180, 82, 80, 80,252, 21,144,239,222,189, 27,114,185,220,185,227,247,223,127,119,157,
- 71,203,219,188, 13,218, 19, 39, 78,220, 50,124,248,240,109,115,230,204,233,236, 58,138,105,203,150, 45, 0, 96,106,134,176,229,
- 94,184,112,161,255,176, 97,195, 62,141,136,136,184,177,180,180,244,157,230,140,120, 97, 97,225, 43, 93,187,118,157, 94, 87, 87,
-167,213,235,245,163, 64,231,206,162,184,118, 81, 8, 96,244,129, 3, 7, 62, 60,112,224,192, 91, 0, 8,128,247, 1,156,184,222,
- 18,130, 10, 45, 10, 10,138, 63, 27, 99,159,124,242, 73,247,206,226,251, 0,252,159, 15,145, 37,226, 82, 65, 65, 65,159, 59,239,
-188,243, 57, 52, 30,157, 40,118, 78,111, 14,228,154,205,230,161,238, 35,165,154, 9, 75, 74, 75, 75,151,208, 44, 64,113, 29,225,
- 24,128, 7,175,231, 4,160, 66,139,130,130,226,207,198, 57, 0, 79, 92,197,249, 90,120,158,103,139,130,130,130,226,111, 7,186,
-168, 52, 5, 5, 5, 5, 5, 5, 5, 5, 21, 90, 20, 20, 20, 20, 20, 20, 20, 20,255, 44, 48,240, 62,114, 32,187, 9, 60, 87, 50,
-162, 33,155,114, 82, 78,202, 73, 57, 41, 39,229,164,156,215, 29,167, 63,238,108, 80,180,168, 0,163,156,148,147,114, 82, 78,202,
-249,207,230,100, 28, 27,235,216,196,223,127,231,184, 51,127,227,184, 95, 47,156,215, 36,254,170,206,240,226,141, 16,208, 48,228,
-147,226,239, 7,215, 2, 66,232,125,162,160,160,104, 98,221, 33,113,121,216,218, 29, 27,254,134,117,137,171, 40, 16,174,242,185,
-212, 18,113,191,158, 57,175,121,161,117,163, 74,165,154, 44,147,201, 82, 24,134,177,235,116,186, 35, 38,147,105, 62,128, 93, 87,
-121,205,175,162,163,163,199, 86, 85, 85, 9, 44,203,130,101, 89, 48, 12, 3,150,101,193,243,188,161,182,182, 86,115, 37,164,145,
- 93, 70,188,202, 49,204, 11,118, 98,159, 95,126,116,213, 52,127,251, 41,124, 23, 24,169, 84,122, 95,120,120,120,104, 69, 69, 5,
- 97,217,134,174,124, 18,137, 68, 92, 8,215, 86, 91, 91,251, 77,160,100, 97, 97, 97,123,195,195,195, 67,197,243, 25,134, 65, 85,
- 85, 85, 77,121,121,249, 77, 0, 16, 20, 20,180, 67,165, 82, 69,112, 28, 7,137, 68, 2,137, 68, 2,189, 94, 95, 85, 85, 85,117,
- 11,189, 21,255, 76, 44, 95,190, 92, 50, 44,254,137,118, 28, 49,116, 99, 89, 18, 34, 8, 76,173,141, 81,252,190,254,194, 87,103,
- 2, 57,127,212,168, 81,118,154,138,127, 30,100, 50,217,236,232,232,232,127,215,215,215,235, 25,134, 33, 12,195,128, 97, 26,222,
-179,220, 63,237,118,123,113, 85, 85, 85, 79, 63, 15, 91, 94, 38,147,205,140,137,137, 25,163,215,235,245, 14, 62,143,188, 0, 96,
-181, 90,139, 43, 43, 43,123, 6, 84,215, 71, 70,206, 87, 40, 20,143,234,245,122, 29,195, 48,130,235,127,132, 16,215,135,249,217,
-202,202,202,126,254,132,129, 76, 38,251, 52, 58, 58,250, 95,142,184, 59,195,121,181,113,143,142,142, 30,163,211,233, 2,226,244,
- 17,247,203, 56, 91, 34,156,127, 83,206,107, 95,104,165,167,167,127,183,103,207,158, 14, 60,207, 3, 0,140, 70, 99,215,185,115,
-231, 62,246,198, 27,111,100, 1,152,120,133,215, 91,216,175, 95,191,135,114,114,114,216,149, 43, 87,178,189,122,245, 2,195, 48,
-176,219,237,176,219,237,232,210,165,139,226, 74, 35, 18,162, 82, 78, 56,184,241,191, 65, 55, 14,121,242,133,114, 96,154,191,253,
-190, 4, 38,128,183, 1,164, 52, 49, 8, 21,142,116, 57,232, 69,108,236,100, 89,182, 73,156,130, 32,228, 95,186,116,169,143, 15,
- 1,211,236,156, 14,145,117,127,191,126,253, 66,178,179,179,153,162,162, 34, 70,161, 80, 64, 16, 4,216,237,118, 88,173, 86,220,
-112,195, 13, 77,114, 66, 67, 67, 67, 53, 19, 38, 76,104,119,199, 29,119,224,135, 31,126,192, 99,143, 61,134,190,125,251,230,149,
-151,151, 3, 0, 84, 42, 85,196,241,227,199, 59,132,135,135, 67,175,215,163,182,182, 22,183,221,118, 27,170,170,170,254,209,133,
-235,230,244,132,247, 25,150,113,206, 21, 69,108,246,234, 61,191,151,188,125,181,188,225,225,225, 7,229,114,121,180, 95,181,236,
-242, 32, 51, 26,141,101,213,213,213,221,253,156,146, 4,224, 46,137, 68,210,158,227,184,142, 0,146,108, 54, 91, 52, 0, 72,165,
-210, 50,137, 68, 82,104,181, 90, 79,153,205,230,211, 0,126,129,143, 5,144,135,197, 63,209,142,177,233, 71,214,153,132,225,202,
-182, 89,169,250,179, 19,114,149,114,253,218, 97,241, 79,172, 8, 84,108,253,133, 72, 5,176, 12, 13, 11, 74, 63,141,134,121,128,
-174, 6,241, 0,238, 70,195,154,143,201, 22,139,165, 18,192, 1, 52,244, 67,201, 3,144, 24, 25, 25,185, 68, 16, 4, 83, 85, 85,
-213, 19,240,176, 80,117,239, 30,173,247,179, 44,155, 32,122, 2, 2,177, 23,239, 62, 80,220, 44, 15, 40,150,101, 63,205,204,204,
-252,215,138, 21, 43,148, 7, 14, 28, 80,118,238,220,217,249, 66, 36, 8, 2, 26,107, 23, 32, 57, 57,217,159,171,193,177, 44, 59,
-123,228,200,145, 15, 47, 94,188, 88,121,238,220, 57,101, 92, 92,156,147,211, 85,108,137,136,139,139, 11, 52,239,127, 53,116,232,
-208,209,139, 22, 45,226, 87,173, 90,165,104,213,170, 21, 34, 34, 34, 32,149, 74, 47, 59,246,150, 91,110, 17,252, 71,157,253,244,
-158,123,238, 25,253,253,247,223, 43,247,236,217,163,236,210,165, 11, 36, 18,201, 85,199,125,196,136, 17, 15,127,247,221,119,202,
- 35, 71,142, 40,219,183,111, 15,209, 84,112,231, 99, 89, 22,173, 91,183, 14,136,243,238,187,239,126,120,217,178,101,202,131, 7,
- 15, 42, 59,118,236,232, 76, 79, 66,200, 21,135,243,111,206,121, 93, 56, 90, 50,139,197,130,173, 91,183,130,101, 89,132,135,135,
- 99,236,216,177,216,184,113,227,132, 77,155, 54,173,190, 2,103,235, 43,135,200,226, 1,224,199, 71, 71, 32,159, 7,198,149,155,
- 33,149, 74,113,246,236, 89, 72, 36,146, 38, 91,139,114,185,124, 12, 33,100,146,254,194, 62,185,193, 96,133,177,100,191, 82,161,
- 80, 56, 31, 0,250, 18,199,254,139,251,149, 10,133,226,172, 68, 34,153, 90, 95, 95,191,208, 27, 95,251,246,237,191, 61,118,236,
- 88, 39, 79, 5,215, 23,244,122, 61,218,180,105,147, 88, 93, 93,221,222,211,255, 60,207, 39,156, 59,119, 46, 74, 38,147,129, 16,
-226, 44,196,238,159,226,119,139,197,130, 27,110,184,193,226,235,154,190, 56,109, 54, 27,130,130,130, 32,186, 81,102,179, 25,245,
-245,245,254, 56, 25,169, 84,122,159, 40,178, 0, 96,233,210,165,136,137,137, 65, 84, 84, 20, 84, 42, 21, 20, 10,133,147, 51, 80,
- 72, 36, 18, 12, 27, 54, 12,239,190,251, 46,178,178,178,240,218,107,175, 53,170,104,121,158, 71,120,120, 56,214,173, 91, 7,141,
- 70,131,196,196, 68,136, 2,255, 31,109, 11,178, 76,248,174,253,231,157, 14,237,237,183,118,226,110,238,206,125,238,120, 84,130,
-101, 1, 65,104,120,116, 50, 12,136,205, 42, 92,218,127,164,228,157, 0,210, 51,174,176,176, 48, 42,208, 52,178,217,108,136,139,
-139,147,248, 57,108,120, 90, 90,218,143,207, 62,251,172,180,125,251,246,140, 84, 42, 5,199,113,224, 56, 78, 20,232,137,132,144,
- 68, 65, 16, 6,150,149,149,145,185,115,231,126,184,101,203,150,123, 1,172,245, 88,177, 16, 67,183, 58,147, 48,124,219, 33,220,
- 52,114,200, 27, 88,183,124,194, 77,253,210, 5, 4, 43, 13,103, 0,252,157,133, 86,106, 90, 90,218,161, 61,123,246, 4, 89, 44,
- 22,244,238,221,123,119,110,110,110, 15, 92,217, 12,238, 97, 0, 62,153, 56,113,226,232,103,159,125, 86, 18, 26, 26, 10,153, 76,
-134,186,186, 58,156, 57,115,102,204, 55,223,124, 67,190,248,226,139,255, 3, 16, 92, 88, 88,152,177,119,239, 94, 12, 26, 52,232,
- 69, 0, 47, 95,174, 8, 36, 9, 59,246, 22, 68,137,191,239, 30,214, 85,154,209,147, 45,107,112,113,220,143, 38, 16,236, 66,241,
-222,195, 23, 2, 17, 98, 31,142, 24, 49,226,145, 21, 43, 86,168, 1, 96,222,188,121,184,239,190,251, 16, 30, 30, 14,165, 82, 9,
-169, 84, 10,158,231, 27,125,250,121,216, 74, 0,124,248,224,131, 15,142, 92,188,120,113, 48, 0, 44, 94,188, 24, 35, 70,140, 64,
- 68, 68, 4,130,131,131, 33,147,201, 32,145, 72,154,156,152,225,225,225, 95,245,189,233,166,199, 23, 45, 90, 4, 0,120,235,165,
-151,112,199,205, 55, 67,173, 84, 64,169,144, 65, 76, 11,153,132,199,237,227, 94,240,171, 47, 1,124,124,223,125,247, 61,240,253,
-247,223, 7, 3,192,129, 3, 7, 80, 94, 94,142,232,232,104, 40, 20, 10,200,100, 50,103,156, 25,134,129, 66,161, 8, 40,238,247,
-221,119,223,200,239,190,251, 46, 24, 0, 22, 46, 92,136, 97,195,134, 57,227, 46,151,203, 33,149, 74, 27,109,238,162,211, 19,231,
-189,247,222, 59,114,217,178,101,193, 0,240,205, 55,223, 96,200,144, 33, 8, 11, 11,115,166,167,200,213,148,123,244, 55,231,188,
- 62,132,214,161, 67,135,238, 87,169, 84, 51, 0, 68,202,100,178,208,135, 31,126,184,245,227,143, 63,142, 7, 31,124, 16,155, 54,
-109,122,170,137, 66,139,137,142,142, 30,155,147,147,227,124, 66,155,201,101,130,169,201, 15,112, 7, 38,237,127,234,169,152,172,
- 51,245,216,189,247, 20,130,192, 50,123, 63,254, 56,210,120,250, 52,236,102, 51,222, 59, 91,215,176,223, 70,152,173,175,140,139,
-185,113,246,255, 77, 2,176,208,135, 11, 32, 55,153, 76,200,203,203,107, 82, 32,138,138,138, 32, 8,130,201,151,187, 32,149, 74,
-113,244,232,209,203, 84,189, 39, 36, 38, 38,250, 42,128,126, 57,215,175, 95,143,241,227,199,227,212,169, 83, 16,151, 42, 9,128,
-147, 9, 15, 15, 15, 21, 69,150, 40,130, 20, 10, 5,120,158,103, 56,142, 99,196,166, 61, 71,225, 10, 72, 24,179, 44,139,111,191,
-253, 22, 31,124,240, 1, 94,127,253,117,204,159, 63, 31,221,186,117,251, 35, 19,114, 28,180, 90, 45,194,194,194, 16, 22, 22,214,
- 72, 32,254,147,225,126,155,103,206,154,163,132, 64, 26, 58,129, 16, 1, 16, 0, 2, 2,129, 8, 40,187,112, 6,147,223,253, 40,
-224,167, 15,207,243, 56,125,250,180, 51, 31,136,206,176, 40,140, 92, 93,131,164,164, 36,191,121, 73, 42,149, 78,249,249,231,159,
-101,223,126,251, 45,190,255,254,123, 48, 12, 3,185, 92, 14,149, 74,133,208,208, 80, 68, 68, 68, 56,183,132,132, 4,230,127, 61,
-184,254,121, 0, 0, 32, 0, 73, 68, 65, 84,255,251,159,180, 91,183,110, 83,180, 90,237, 90,207,247,156,132, 40,219,102,165,142,
- 28,242, 6, 0, 96,228, 27, 4,151,242,166,221,200,214,188,243,119, 94, 68, 54,181,107,215,174,219,119,238,220, 25,164,215,235,
- 33, 8, 2,214,174, 93,171, 28, 50,100,200,182,130,130,130,126, 77, 21, 91, 73, 73, 73,171,118,238,220,121, 75,100,100, 36,106,
-107,107,161,213,106, 97,181, 90, 33,145, 72,144,152,152,136, 15, 63,252,144,185,231,158,123,158, 31, 51,102,140, 81,161, 80,136,
-206, 70,146,231,188,212, 56, 51,205,253,236,243, 80, 66, 26,242, 15, 17, 72,163,207,234,242, 66,188,244,202,228,128,194,216,186,
-117,235,167,127,248,225, 7,181,171,179,228, 42, 2, 92, 69,150,184,249, 17, 6,108,155, 54,109, 30, 95,178,100,137,147,179, 85,
-171, 86,224, 56, 14, 60,207,131,227, 56,176, 44,139,109,219,182, 97,198,148,137, 8,139,140,195,156,207,230,249, 13,103,100,100,
-228,252, 97,195,134, 61,186,112,225, 31, 85,119,215,182,109,113,231, 45, 55, 35,170,149, 6,173,194,130, 27,210, 73, 96,240,251,
-169, 2,191,207, 35, 0,108,235,214,173,159, 88,190,124,185,218,245,133, 80,140,171,248,242, 44,186,248,102,179, 25, 61,123,246,
- 12, 40,238,174,156,162,219, 38,138, 54, 49, 61,197,235,136,229,213, 79, 56, 31, 23,133,176, 67,112, 54,226,224,121, 30,203,215,
- 45,242,234,102, 95, 41,103, 83,239,187, 59,103, 97, 97, 33,166, 79,159, 14,241,165,205,181,171, 80,124,124, 60,230,204,153,227,
-183, 94,114, 43, 3,189, 0, 68,186,236, 50, 3,144,185,124, 86, 48, 12,179,207,195,113,226,126,222,209, 98, 21,137,134,126, 99,
-117, 0, 66, 61,240,121,227,169,116, 60,243, 34,221,142,111,116, 29,175, 66,107,245,234,213, 98, 41, 30,152,153,153,185,213,241,
-189, 70, 46,151, 23, 41,149,202, 24, 0,117,107,215,174,197,127,254,243, 31, 56,172,213,187, 67, 66, 66,142,121,112,117, 14,153,
- 76,166, 55, 0,148, 57,118,137, 67, 52,217,234,234,106, 97,227,198,141,236,226,123,135,194, 76,128,244, 73, 51, 48, 44, 51, 19,
-235,227,101,144, 0,184,233,100, 37,148, 74, 37,167,213,106,173,174,253,182, 60,244,221,202,118,203, 80,146, 32,142, 67,239,237,
-107, 48,126,251, 26,220,164,146,161,106,197, 50,212,237,200, 1,203, 50,232,175,106,133,215, 30,217,136, 62, 26, 57,100, 38, 29,
- 88,150,245,148,179,157,156,121,121,121,163, 52, 26,205, 12,183, 4, 14, 4,249,104, 88,199, 9, 94,194, 9, 66, 8,186,117,235,
- 6,134, 97,156,110,129,184,137,133, 78,220, 14, 30,244,216, 2,233,149,211,209, 4, 7,149, 74,133,223,126,251,205,121,204,224,
-193,131, 97, 52, 26, 17, 30, 30, 30, 16,103, 69, 69, 5, 41, 41, 41, 97, 22, 47, 94, 12,158,231, 17, 17, 17, 1,165, 82,201, 44,
- 90,180,104,162, 84, 42, 77, 48, 26,141,130,217,108,134, 76, 38,155, 35,222, 31,142,227,116, 90,173, 54,194, 27,167, 68, 34,193,
-179,207, 62,139, 87, 95,125, 21,243,231,207,199, 83, 79, 61,117,153,227,101, 52, 26,209,170, 85, 43,167,216,242, 80, 0, 91, 98,
-184,111,203,114, 10, 4,199, 14,174,199,241, 35,217, 16,236, 2,236, 2, 1, 33,118, 8, 54,224,192,198,221, 29, 46,230,151,196,
- 19,144,134,174,183, 0,228,181,245,182, 1, 17,178,142, 0, 86,110,173, 50,207,246, 23, 78,142,227, 96, 52, 26,241,243,207, 63,
-227,228,201,147, 88,187,118, 45, 12, 6, 3, 90,181,106,133,208,208, 80,220,124,243,205, 24, 51,102, 12,146,146,146,252,198,157,
- 16,178,176,168,168, 40,189,111,223,190, 76, 77, 77, 13,106,106,106, 96, 48, 24, 96,183,219, 97,179,217,192,113, 28,130,130,130,
-160, 80, 40, 16, 29, 29, 13,163,209, 72, 76, 38,211, 66,111,156,130,192,212,234,207, 78,200, 93,183,124,194, 77, 35,223, 32, 88,
-241, 1,131,118,109,228,250,223,246, 7, 63,190,114,251,107,183, 1, 32, 2,113, 90, 11,196,106, 23, 42, 95,157,248,201,243,127,
-250, 61,186, 92,100, 69, 24, 12, 6,212,213,213, 53,216,250, 50, 25, 86,172, 88,209,234,174,187,238,202, 41, 41, 41,233,239, 67,
-108, 93,198, 25, 28, 28,156, 40,145, 72,112,244,232, 81,124,241,197, 23,248,237,183,223, 80, 86, 86,118, 41, 46, 46, 46,100,224,
-192,129,236, 75, 47,189,132,244,244,116,124,253,245,215, 65,254, 56, 9, 33, 40,204,219,134,194,211,219, 33, 8, 13,174,117,195,
-230,249, 59, 9, 48,238, 58,157,206,120,232,208, 33,245,151, 95,126,137,168,168, 40, 36, 39, 39, 67,169, 84, 34, 40, 40,168,209,
- 67,214,245,193,235,175,108, 26, 12, 6, 99, 97, 97,161,250,187,239,190, 67, 68, 68, 4,146,146,146,160, 84, 42, 33,147,201,192,
-113, 28, 24,134,193,226,197,139,177,244,221, 71, 80,120,234, 8, 70,220,121,155,223,112, 42,149,202, 71, 23, 46, 92,216,200, 2,
-137, 14, 11, 3,199,179,144,240, 12,194, 6,223, 11, 0,184,180,233, 39, 95,179, 67,186,114, 50,117,117,117,198, 61,123,246,168,
-247,239,223, 15, 65, 16,144,148,148, 4,189, 94, 15,141, 70,227,140,255,198,141, 27,113,207, 61,247,224,219,111,191, 69, 70, 70,
-134,223,184,215,215,215, 27,143, 28, 57,162, 94,178,100, 9,194,195,195,209,186,117,107,103,220,197,141,231,121, 72, 36, 18,164,
-164,164,160,182,182, 22,106,181,218,239, 61, 58,112,224,128,122,201,146, 37, 8, 11, 11, 67, 66, 66,130,211,113, 19,197,209, 7,
-159,191,219,136, 32,136,137,189,106,206,166,222,119,119,206, 17, 35, 70,160, 93,187,118,208,104, 52, 80,169, 84, 78,110, 95,156,
- 94,180,136, 83,111, 51, 12,179,218,165, 76,100, 50, 12,179,218,245,211,219,113,142,175,253, 39, 78,156,216, 51, 43, 43,107,122,
- 70, 70,198,119, 59,119,238, 92,234,141,207, 27,207,196,137, 19,211,178,178,178,166,187, 30,239,225, 58,222, 29,173,204,204, 76,
-198, 17, 73, 6, 64,114,143, 30, 61,246,109,218,180, 41, 60, 56, 56,216,121,240,249,243,231, 81, 83, 83,131,224,224, 96,205,204,
-153, 51, 53, 3, 7, 14, 68,116,116,180,243, 13, 32, 47, 47,239,134,212,212, 84, 45, 0,119,223, 86, 96, 89, 22,125,250,244,193,
- 49, 71,107,199,176,204, 76, 36, 36, 36, 56, 59,121, 4, 5, 5,225,249,231,159,103,198,143, 31,207,137,110, 6, 33, 4, 6,131,
- 1,177,177,177, 10, 95,174, 14, 0,164, 25, 42,241,211,192,254, 96, 25, 64,127,112, 47,164, 50, 6,172,132, 65,119, 82,133, 95,
- 7,245, 7, 3,192,124,120, 23, 2,112, 97, 14, 2,184,173,101, 28, 14,130, 51,103,206, 4,228,104, 57,226,197, 92, 41,167,232,
-104,236,220,185, 19,118,187, 61, 80, 78,194,178, 44, 84, 42, 21, 98, 98, 98,160, 80, 40,160, 84, 42,153,239,190,251,238,237,228,
-228,228,216,241,227,199,179, 90,173,150,237,211,167, 15,238,187,239, 62, 78,108,226, 76, 75, 75,243, 27,151,173, 91,183,226,139,
- 47,190,192, 83, 79, 61,229,209,209, 98, 24, 6,145,145,145,208,104, 52,184, 86, 32, 0,176,216,172,208,215, 27,156, 77,186,118,
-187, 29, 71,182, 28,238,144,127, 56, 47,109,245,119,223,242, 0, 96,220,242,147,235,105,177,247,125,190, 44,117, 64, 24,191,103,
-235, 37,235, 30, 95,121,158,227, 56,140, 29, 59, 22, 89, 89, 89,120,244,209, 71,177,118,237, 90,188,243,206, 59,248,247,191,255,
-125,153,171,229,239,205,209,106,181,254,247,177,199, 30,123,106,197,138, 21, 29,223,120,227, 13, 86,116,180,148, 74, 37, 24,134,
-129,209,104,132,201,100,130,193, 96,192,169, 83,167,132, 39,159,124, 50,215,108, 54,255,215,107,115, 37,163,248, 93, 41,215,175,
-109,155,192,182,211, 21,124, 20,220,247,230, 36, 3,163,232, 81,123,111,234, 16, 50,124,108, 82, 24, 8, 1, 17, 0,129, 0, 38,
-147, 14,207, 63,255,162,228, 47,188, 85, 78,145,101, 52, 26,113,232,208, 33, 12, 26, 52, 8, 69, 69, 69, 56,113,226, 4, 58,116,
-232,128, 69,139, 22, 69, 62,252,240,195, 57,229,229,229,253, 3,117,182,142, 28, 57, 50,241,198, 27,111,252,180,190,190,190,186,
-190,190,254, 83, 0, 75, 1,212,156, 57,115,166,243,153, 51,103,230,174, 95,191,190,223,228,201,147, 37,110,125,116, 36,222,236,
- 81,171,213, 6,131,193,228, 83, 96,137,191, 9, 17, 2,138, 56,195, 48,164, 99,199,142,184,235,174,187,192,243, 60,148, 74, 37,
-212,106,117,163,102, 51,119,193,229,171,254, 0, 32, 48, 12,131,184,184, 56, 12, 31, 62, 28, 82,169,180, 17,167,152, 15,135, 15,
- 31,142, 23,222,155,132,255,190,112, 43,190,120,172, 3,134,188, 95,230, 51,156,122,189,190,126,243,230,205,138, 87,159,122, 10,
- 55,182,111,143, 86, 26, 13,218, 68, 71, 66, 33,151, 65,234, 26, 38, 38, 32,147,157, 0, 16, 36, 18, 9,186,116,233,130,178,178,
- 50, 20, 20, 20,160,160,160, 0, 44,203,162,111,223,190, 78, 23,230,244,233,211,120,239,189,247, 96, 50,153, 2,142,123,251,246,
-237,113,235,173,183, 66, 38,147, 65,169, 84, 54,106, 50, 20,211,180,174,174, 14,237,218,181,195,202,149, 43,145,154,154,234,151,
-179, 83,167, 78, 24, 48, 96, 64,163,244, 84, 40, 20, 78, 81, 4, 0, 69,123,234,157,215,136,143,143,111, 18,231,134,189,231,241,
-229,198,205, 48,153, 5,104,245,214, 70, 39,196,182,210, 96,251,146, 55, 2,138,187,200,185, 96,193, 2,212,212,212, 56,141, 3,
-241,165, 92, 52, 81, 90,183,110,141,121,243, 60, 59,153,110, 90,196,211, 51, 47, 51,192,231,173,120,156,152,185,228, 89, 89, 89,
-211,221,207,247,199,231,250,191,219,249,102, 55,113, 86,214,164,166, 67,185, 92,254,230,230,205,155,195,107,107,107,113,250,244,
-105,176, 44,235,108, 83,231, 56, 14, 22,139, 5,103,207,158, 69,120,120, 56,202,203,203, 33,151,203, 33,145, 72, 96, 54,155, 1,
-160,187,183, 7, 56, 33, 4, 47, 84, 52,116, 17, 90, 23, 39, 69, 33,128, 59, 43, 26, 10,134,216, 33,254,135, 31,126,128, 90,173,
- 70,112,112,176,243,211, 95, 51,210,145,130, 51, 40,227, 25,176,187,182,129, 97, 1,150, 1, 24, 9,192,178, 4, 44,195,128,221,
-149, 3,134, 1, 84, 17, 97, 77,173,128,253,117,140,247,217, 1,222,155,251,228,201,197,114,255,190,101,203, 22, 4,202,217,174,
- 93, 59,168,213,106,231,182,126,253,250, 70,142,150,221,110, 71, 68, 68, 68, 32,156,164,193,141, 16, 16, 21, 21, 5,158,231,153,
- 69,139, 22, 77, 76,249,127,246,174, 59, 60,138,106,125,191, 51,219,119,147,108, 54, 61, 33, 33,148, 0, 82, 34, 77,225,194,165,
-151, 0, 66,104, 34, 69, 46, 4, 17, 81,138,168, 40, 17,129, 31, 42, 32,161, 73,147, 42,200, 37, 32, 72,151, 46, 69,164,131, 5,
- 20, 36,129, 64, 8, 9,164,111,234,246, 50,237,247, 71,118,227,102,179, 73, 54, 33,194, 5,231,125,158,121,118,167,189,115,206,
-156, 51,103,222,243,157,239,124,211,176, 97,200,244,233,211, 73,129, 64,128,235,215,175, 35, 33, 33, 1,245,235,215,119,219,103,
-171,168,168, 40,235,147, 79, 62, 97, 62,249,164,100, 14, 69,100,100, 36,138,138,138,114,237,251, 53, 26, 77,126,159, 62,125,202,
-248,109,228,229,229, 61,219,158,240,182,251, 72, 91,105, 24, 76, 38,232,180,134, 82,235, 80,110,102,142,234,227, 15, 63, 16, 45,
-155,250, 6, 0,224,195,149,107,160,221,248, 87, 67,118,224,195, 81,129, 67,191,220, 53, 19,192,224,202,248,117, 58, 29, 76, 38,
- 19, 34, 34, 34,112,249,242,101,104,181, 90,244,235,215, 15, 4, 65,148,206, 16,173, 6, 44, 25, 25, 25,157,162,163,163,127, 93,
-177, 98, 69, 68,243,230,205, 9,189, 94, 15,131,193, 0,199,223,155, 55,111,114, 59,119,238, 76, 49, 24, 12,255,182,153,206, 93,
-226, 68,198, 55,201,125, 67,223,220,251,227,117, 65,116, 96,163, 36,101, 70, 97, 4,157,159, 33,213,107,140,119, 76, 12,151, 0,
-142, 1, 24,176,224,104, 22,140,109,216,235,105, 65, 46,151,127,117,241,226, 69, 63,147,201,132,107,215,174, 97,204,152, 49,150,
-188,188, 60, 9, 0,252,231, 63,255,177,108,223,190, 93,210,168, 81, 35,108,219,182, 45,224,213, 87, 95,221,163,215,235, 95,116,
-147,250,219,172,172,172,111,157, 55,250,249,249,173,126,248,240, 97,119, 71,159, 31,154,166, 75,147,227,242,193,100, 1,138,162,
- 96, 52,154, 81, 92,172,133,197, 74,217,218, 76, 22, 12, 67,219,126, 89,208,182,118, 84, 34, 22,122,181,125, 49, 88,199,113, 28,
- 72,130, 40,186,246,103,118,221,202, 68,187,171, 33, 46, 55,173, 89,206, 96,236,179,204,252,252,252, 32, 18,137,240,237,183,223,
-226,198,165, 19,144, 8, 56, 48, 52, 5,154,178,130,161, 44, 16, 9, 4,248,241,250, 3, 68, 53,243,114, 75, 16,250,251,251, 99,
- 64,199,142,136,238,216,177,100,122,155, 80, 8, 79,169, 20, 10,177,172,196,146, 5,128, 99, 72,119,131, 8,176,246,116, 6, 5,
- 5,225,183,223,126,195,180,105,211,176,120,241, 98,200,229,242,210,217,207,183,111,223,198,238,221,187, 17, 21, 21, 85,237,188,
-219, 45,120, 51,103,206, 68,102,102, 38, 86,174, 92,137,151, 94,122, 9, 34,145, 8, 69, 69, 69,248,247,191,255,141,156,156, 28,
-183, 56, 29,135,247, 36, 18, 73, 25,235,147, 93, 0, 86,183,140, 28, 57,223, 24, 18,130, 67,151,118,130, 0,129,171, 59, 62, 40,
- 35, 10,215,239,186, 80,109,206,185,115,231,150, 73,167, 59,214, 44,119,225,100,117,170,242, 56,130, 32,174,217,141,173, 51,103,
-206,156, 69, 16,196,145,153, 51,103,206,138,139,139,187,229, 14,159,171,253, 4, 65, 28,181,137,176, 1, 14,219,174, 85, 75,104,
- 41, 20,138,246,158,158,158,184,119,239, 30,250,245,235,103,201,207,207, 79, 18,137, 68, 77,242,242,242,164,185,185,185, 48, 24,
- 12,186,249,243,231, 63, 0, 32,239,208,161, 67,163, 31,127,252, 17,143, 30, 61,194,246,237,219, 1,224,128,107,159, 13, 18, 44,
-203,150, 86, 10,231,110,155, 64, 32,192,149, 43, 87,112,229, 74, 89,215,175,205,155, 55, 87,249,194,120,245,251,195,184,126,253,
- 58, 28,195, 3,216,255, 59,110,147,201,100, 64,229, 51, 60,202,160, 42,199,248,170, 28,224, 93,193, 93,223, 47, 87, 51,115, 42,
- 66, 70, 70, 70,133,231, 95,185,114,165,140, 69,171, 42, 78,129, 64, 0,134, 97, 32,151,203, 9,177, 88, 76,136,197,226, 48,187,
-200, 18, 8, 4,165, 15,140, 84, 42,133, 84, 42, 45,211, 75,173, 8,153,153,153, 61, 50, 51, 51, 43,220,175, 86,171, 59,169,213,
-106, 60,143,176, 82, 20,140, 6, 11,180, 58, 35, 62,143,251,111,201,198,207,241, 51,128,159, 59,189, 51, 13,147,251, 70,245,172,
-238, 48,181,253,126, 7, 6, 6,226,220,185,115, 32, 8, 2,123,246,236,129,183,183, 55,250,246,237, 11,165, 82,137,153, 51,103,
- 98,248,240,225,213,109,204,138,243,243,243, 59,189,255,254,251,191, 46, 93,186, 52,188,110,221,186,176, 88, 44,176, 90,173,176,
- 88, 44, 72, 78, 78,198,206,157, 59, 31, 25, 12,134, 78, 0,138,171, 34, 59,145,241, 77,242,254,243, 31,102,246, 30,249,170,241,
-118,206, 15,200,206,206, 7, 77,103,128,101,104, 88,105,166,196,194, 71,211,160,105, 6, 98,177, 64,185,244,139, 15, 78,177,224,
- 64,146,132, 5,192, 43, 79,170,140, 84, 42, 85,164, 90,173,198,221,187,119, 17, 19, 19,147,157,159,159,159, 8,160, 23, 0,228,
-231,231, 95, 28, 51,102, 76,243,248,248,248,224, 6, 13, 26,192,211,211, 83,169,215,235,171,162,244, 4, 48, 25, 64, 31,148,248,
-129,216, 81, 0, 96, 62, 73,146,210,107,215,174,149,155,105,119,254,252,121, 0,248,217,117, 15,200,102,209, 50,153,160,206, 47,
-196,132,119,230,252,213, 51, 2, 87, 70, 92,112,224, 48,233, 93,200, 0, 32, 47, 39, 25,111, 76,152, 38,173,170, 67,224,234, 69,
- 88, 13, 31,157, 50, 29, 53,123, 29,245,244,244, 44, 25,126, 59,184, 19, 71,191,124, 7, 96,172,224, 40, 35, 96, 53, 0, 86, 29,
- 88,139, 1,132, 88, 14, 80, 70,183,132,150,167,167, 39, 60,229,114, 4,170, 84,224, 56, 14, 66,129, 0, 34,145, 16, 44, 5, 16,
- 12, 81, 42, 72, 89,247, 2,131,148,118, 42,229,114, 57, 82, 83, 83, 49,121,242,100, 88,173, 86, 12, 25, 50, 4, 22,139, 5, 38,
-147, 9, 70,163, 17, 13, 27, 54,132,193, 96,112,139,207, 62, 91,209,211,211, 19, 98,177, 24, 31,124,240, 1, 94,126,249,101,204,
-155, 55, 15,177,177,177,104,216,176, 33, 38, 77,154,132,157, 59,119, 34, 50, 50,178, 42, 94,206,177,140,236,247,211, 46,182, 28,
-135,248, 0, 84,187,140,156, 57, 9,130, 44, 35,216,236,203,123, 99,123, 85,155,115,209,162, 69, 80,171,213,229, 44, 89,246,255,
-161,161,161, 88,183,110, 93, 77, 71,134,236,214,163, 32, 23,251, 6, 56, 91,162, 56,142,107,103,243,157, 50,199,197,197,221,138,
-139,139,139, 38, 8,226, 72, 92, 92, 92,116, 69, 22, 45, 87, 60, 46,246,187,253,210, 18, 58,141,141,118,119,220,105,191,209,190,
-190,190,130,240,240,112, 82,169, 84,162,168,168, 8, 1, 1, 1,156, 90,173, 30,169, 80, 40, 62,251,238,187,239, 26,233,116, 58,
-220,190,125, 27,171, 87,175,254, 25,192,170,202,132,214,177, 0,155,233,216,102,201,114, 92, 31, 56,112, 32, 26, 52,104, 80,198,
-154, 37,151,203, 43,173, 60,246,125,118,139,144, 64, 32,192, 11, 47,188, 32, 79, 73, 73, 49,138,197, 98,132,133,133,201,179,179,
-179,141, 98,177,184,218, 51, 93,170,114,140,175,202, 1,222,149,240,105,215,174, 93, 25, 11,150,227,175,227,255, 67,135, 14, 85,
- 57,116,104,231,108,222,188,121,233,253,242,242,242,178,159, 11, 0,232,215,175, 31, 88,150,133,191,191,191, 91,156,118, 81,107,
-115,128,135,201,100, 98,181, 90, 45,121,237,218, 53, 72, 36, 18,120,121,121,149,250,234,200,100,178, 82,107, 38, 15, 87, 13, 2,
- 11, 11, 69,193,104, 52, 66,167,211, 1, 0,146,255,220, 87, 86,136,153, 53, 53,230,183, 55,176, 5, 5, 5, 56,113,226, 4,126,
-248,225, 7,188,252,242,203, 46, 69,117, 53, 4,151,186,160,160,160,243,140, 25, 51,174, 46, 88,176,160,142,175,175, 47,172, 86,
- 43, 30, 62,124,136, 45, 91,182,100, 26, 12,134,206,213,105, 96,192, 1, 20, 69,195,100, 48,163, 88,163,197,103, 95,108,173,176,
-234, 1, 64, 65,238, 29, 12, 28, 52, 92,242, 36,203, 41, 51, 51,115,122,231,206,157,191,208,106,181, 69, 6,131, 97, 56,128,101,
-142,253,169,252,252,252, 46,131, 6, 13, 90,225,235,235,251, 82,110,110,238, 44, 55, 40,103,166,166,166,206,170, 87,175, 94,153,
-141,102,179, 25,245,234,213,123, 33, 55, 55,119,116,215,174, 93,255, 15,128,175,195,110, 47, 0, 39, 1,172,171,168, 46,217,135,
- 14,117, 58, 35,148,170, 16,100, 60, 56, 87,101, 66,196, 2, 19, 56,150,173,180, 13,177,119,128, 43, 90,170,152, 25, 87, 46,169,
-246, 99,237, 47,236, 87,134,141,197, 43,147, 23, 65, 33, 2, 22,190,209, 9, 13, 85, 0,228,190, 16,119,253, 24,132,202,118,143,
- 38, 31,118,139, 60,118,195, 6, 92,183,181,199, 97, 1, 1,152, 49,114, 36, 56, 10,184,156,144,128, 93, 63,253,132,145, 61,122,
- 64, 33,147,185,221, 97, 97, 89, 22, 98,177, 24,201,201,201,184,124,249, 50,154, 53,107,134,123,247,238,149, 9, 67,193,113,156,
-187,249, 47,205,187, 84, 42,133, 72, 36, 66,118,118, 54,162,163,163, 33, 22,139,177,117,235, 86,156, 59,119, 14, 51,102,204,192,
-248,241,227,209,189,123,119, 36, 38, 38,186,197,201,113, 92,185,217,138,206,195,185,213, 45, 35,103, 78,231,247,126, 77,202,221,
-206,185, 96,193, 2,151, 19, 42,220,225,116,165, 69, 92,148,221, 53, 71, 49,100,183, 60, 57, 10, 35,231,117, 0, 62,246,109, 51,
-103,206,156,229,238,121,142,235,118,139, 88,117,134, 48, 75,133, 86,116,116,116,153,156, 23, 20, 20, 92,189,122,245,106, 11, 15,
- 15, 15,220,185,115, 71,162, 84, 42, 91,216, 27,116,146, 36,177,103,207, 30,175,254,253,251,159, 90,182,108, 89, 24,203,178,200,
-201,201,193, 71, 31,125,164,163,105,122, 20, 0,186,162, 23,120, 85,150,169,195,135,203, 63,108, 7, 15, 30,116,107, 8,196, 46,
-164,132, 66, 33,124,124,124,140, 70,163, 17, 10,133, 2, 62, 62, 62, 70,131,193, 0, 15, 15, 15,251, 88, 49,137,191,102, 42, 84,
-101,125,170,202, 49,222,217, 1,190, 74, 36, 36, 36,184,117,156,109,168,213,173, 90,158,154,154, 90, 97, 67,114,238,220, 57,176,
-182,134,214, 93, 78, 91, 47,143,179, 11, 63,133, 66, 1, 95, 95, 95, 72,165, 82,200,229,242, 50, 34, 75, 42,149, 86,249,224, 84,
- 21,144, 84, 38,147,253,226,225,225,161,178,239, 23,137, 68,208,106,181, 69, 5, 5, 5,237,159,233,161, 67,112,160,173, 52,140,
- 70, 19,116, 90, 99,173,243, 91, 44, 22, 72,165, 82,236,220,185, 19,157, 58,117, 66,135, 14, 29,202,137,172, 26,154,231,211, 11,
- 10, 10,186,175, 90,181,234,231,229,203,151,251,232,116, 58,252,247,191,255, 45,214,233,116,221, 1,164, 87, 75,108,178, 28, 40,
-171, 21, 6,147, 25,122, 93,201, 61,184,127,107,223,255, 90, 81,237,204,206,206,222, 89,201,254,251, 52, 77, 71,219,227,190,185,
-129,127,213,171, 87, 15,217,217,217,101, 54,166,165,165,129, 97, 24, 51, 74,226,100,189,233,104, 72,198, 95,209,179, 43,234,197,
-151, 88, 71,141,102,232,116, 37, 86, 16,147, 62,175,118,234,169, 77,108, 84,228,147, 85,147, 58, 68, 16, 68,169,211,247,212,169,
- 83,113,243,198, 13,244,170,163, 65,195, 96, 47,112,154, 12,136,123,126,138, 63,212,114, 44, 91,113,172,218,220,187, 29, 92, 32,
-150,237,222,237,114,223,253,193,131,171,149,247,164,164, 36,200,229,114, 48, 12, 83,238,125, 83,221,252, 59, 10,152, 21, 43, 86,
- 96,198,140, 25,216,186,117, 43,110,222,188,137,214,173, 91,163,119,239,222,200,205,205,197,141, 27, 55, 96, 54,155,221, 78,167,
-163,223, 92, 82, 74, 2, 78, 95, 62,142,180,244, 7,200,204,126, 84,227,114,119,228,116, 22, 90,251, 79,255,142, 97, 81,109,107,
-196,249,217,103,159, 33, 55, 55,183,140, 37,203,177, 93,170,200,162,229,172, 69,156,144,231,228, 11,101, 95,183, 56,137, 30,231,
-117,231,227, 1, 32, 23,128,160,138,243,156,215,243,226,226,226,206,218, 45, 97, 54, 94, 65, 85,254, 89,101, 44, 90, 78, 88, 52,
-120,240,224, 65,171, 87,175, 14,144,201,100,165, 51,144,102,206,156,137, 25, 51,102, 32, 34, 34, 2,254,254,254,161, 42,149, 10,
-249,249,249, 88,188,120, 49, 82, 83, 83, 39,194, 69,160, 61,103,161,213, 37, 69, 11,137,228,175, 14,171,221,178, 5, 0,227,199,
-143, 47,103,209,178, 23, 80,101,160, 40, 10,126,126,126, 48, 24, 12, 16, 8, 4, 24, 50,100,136,224,207, 63,255,100,250,246,237,
-139,161, 67,135, 10,110,220,184,193, 12, 24, 48, 0, 2,129, 0, 61,123,246,212,236,223,191,255, 67, 0, 95,186, 33,182,106,205,
- 49,222, 94,201,220,141,125,228,142,184,172,140,147, 32, 8, 24, 12, 6, 8,133,194, 82, 71,121,119, 56,237, 67,135,142, 15, 32,
- 73,146, 80,169, 84,165,141,135,221,162,101, 23, 90, 85,241, 86, 21,144, 84,161, 80, 40,239,220,185,211,200, 62,241, 34, 47, 47,
- 15, 61,123,246,188, 91, 80, 80,240,108,155,180, 88,192, 74, 51,208, 25, 77,208, 25, 13,181, 70,107,127, 30, 54,110,220,136,196,
-196, 68,152, 76, 38,124,245,213, 87,165,147, 10, 28, 69,214, 99, 8,174,100,185, 92,206,246,235,215, 15, 87,175, 94,133, 84, 42,
-165, 80,131,248, 87, 44,199,194, 74,211, 48, 25,141,208, 85, 61,228,246,188,160, 84, 85, 39, 38, 38,194, 98,177, 96,222,188,121,
-204,175,191,254,122, 22, 37, 1, 80,237, 22,188,209,221,186,117,155,239,225,225,161, 58,122,244,232,123, 0,182, 86,246,242,166,
-104,155,104,175,197,251,232, 56, 34,224,202, 39,171, 38, 97, 86, 28, 95,172, 44,203, 98,226, 91,111,161,119, 29, 13,134,190, 20,
- 0,125,214, 93, 40,188, 3, 64,168,234, 99,217,138, 99,184,149,226,182, 43, 38, 7, 0,253,186, 13, 70,171,102,229,195,131,117,
-238, 85,210, 39,187,248,227, 47,200,201,203,172,118,222,245,122,125,133,150,171,106, 88,180, 74,159, 57,251,253,107,211,166, 13,
-154, 52,105,130,179,103,207,162,109,219,182,184,119,239, 30,238,221,187,135,212,212, 84,220,188,121, 19,133,133,133,213, 46,163,
-239, 79,238, 66,161,182, 0, 18,177, 4, 5, 69,121, 72,203,120,128, 32,191,224,199, 46,119, 59,154, 14,248, 12, 0, 80, 39,192,
-187, 90, 66,203,145,115,201,146, 37,229,196,251,227,134,236, 33, 8,226,151,202,214,171,123,254,147, 68, 69, 66,235,129, 90,173,
-238, 48,114,228,200,153, 0,218,217,182, 21, 3,216,125,234,212,169,193,129,129,129, 61, 58,118,236, 40,148, 72, 36,184,124,249,
- 50,246,239,223,191, 21,192,174,202, 46, 36,145, 72,140,245,235,215,151,219, 43,162,253, 65, 84, 42,149,130,197,139, 23, 19,155,
- 55,111,174,208,202, 85, 85, 1, 21, 23, 23, 67,175,215,195,219,219, 27, 86,171, 21,253,250,245, 99, 18, 19, 19, 33, 22,139, 49,
-104,208, 32, 38, 33, 33,161,180,160, 55,109,218, 20,102, 52, 26,255,253,195, 15, 63,244, 1,208,181, 26,247,202,238, 24,239, 9,
- 55, 29,224, 43,234,229,185, 3,119,135,227, 42,226,156, 54,109, 90,141, 56,197, 98, 49,109,143,252, 78,146, 36,172, 86, 43,218,
-182,109,139,220,220,220,210,135,198,195,195,163, 84,100,185, 35,180,170, 10, 72, 42, 20, 10, 97,177, 88,208,181,107, 87, 16, 4,
-129, 53,107,214, 60, 31,195,145, 44, 75,120,122,250,161, 78,157, 23, 16, 16,104, 2,203,214,238, 87,101, 98, 99, 99,203,136, 41,
- 87,145,151,237,247,191, 38,176,115,185, 51, 75,182,178,183,163,125,200, 75,175, 55, 61,115, 69, 24, 24, 24,216, 33, 55, 55,247,
-160,211,230, 2, 0,243, 43,233, 88,150, 22,244,163, 71,143,208,183,111, 95, 28, 63,126, 92,112,224,192,129, 94,135, 14, 29, 74,
-184,123,247,238,163,182,109,219,214,125,251,237,183,165, 93,187,118, 69, 94, 94, 30, 94,122,233,165,207, 51, 50, 50, 42, 17, 90,
-182,251,104, 50, 67,175,175,125,235,168, 43,107,214,227,188, 24,237,117,114,238,220,255, 67,239,144, 34, 12,105,237,141,248, 35,
-151, 48,186,141, 28,176, 72,171,205,103, 79,139,111,157, 6,168, 31,217,161,220,126,169,178, 36,150,107,253,200, 14, 32, 31,221,
-171,118,222, 29,211,236, 44,170,106, 98,209,115,188,159, 19, 38, 76,192,199, 31,127,140, 62,125,250,224,222,189,123, 56,127,254,
- 60,238,221,187,135,105,211,166, 33, 50, 50, 18,173, 91,183,174, 22,231,161,211,123,161,209, 21,131, 36, 72, 20, 20,231,195,100,
- 54, 34,118,210,220,199, 46,247,210,151,255,233, 56, 0,192,190, 83,215,107,204, 57,123,246,108,100,103,103,151,177,100, 61,142,
- 95,214,179,142,202,162,165, 61, 0, 48,209,121,163,197, 98,241,154, 55,111, 94,148,191,191, 63, 8,130,192,138, 21, 43,224,235,
-235,219, 9,192, 45,139,197,146,167,215,235,103, 56,136,144,222,176,197,218,200,201,201,113, 57,111, 95,175,215, 91,163,162,162,
- 68, 33, 33, 33,101,102, 27,122,120,120, 84,100,221, 41,229,180,239,163,105, 26,177,177,177, 88,184,112, 33,194,195,195, 49, 96,
-192, 0, 68, 71, 71,131, 32, 8,244,235,215, 15, 3, 6,252, 53,148,171, 82,169,196,199,143, 31,239, 70,146,100,130,195, 11,164,
- 12,167, 43,216, 29,227, 41,138,114,215, 1,190, 12,167,189,178, 77,155, 54, 13, 11, 23, 46,196,172, 89,149,187,122,108,216,176,
- 1, 40,239, 79,245,183,115, 22, 20, 20,148,105,236, 21, 10,197,154,161, 67,135, 10, 31, 61,122, 84, 70, 92, 57, 46, 46, 26,162,
- 50,156, 85, 5, 36, 21, 8, 4, 8, 10, 10,194,130, 5, 11,224,231,231,135,224,224, 96, 87,129,252,170, 44,163, 26,224,111,229,
-100, 56,246,218,210, 69,255,215,249,191,219, 15,137,164, 18,224,202,249,125,208, 20,150, 29, 78, 50, 91,255,154, 74, 45,105,219,
- 11,150,235, 63,186, 85,151,236, 98,250,179,207, 62,195,103,159,125, 86,105,130, 54,110,220,248,216,121,119, 83,108,149,231,100,
- 57, 66,225,225, 3,153, 71, 29,180,136,244, 1,203,209,255, 83,101, 84, 1,126,253,229,151, 95, 6,249,249,249, 33, 61, 61, 61,
- 64, 36, 18, 13, 42, 99,174, 50, 26, 81,191,126,253, 23,212,106,245,191,171,226,156, 54,109,154,121,206,156, 57,210, 81,163, 70,
- 97,232,208,161, 24, 53,106,148, 84, 44, 22, 55,230, 56, 14, 86,171, 21,233,233,233,248,241,199, 31,161, 86,171,111, 87,150, 78,
-150,227, 8,185, 66, 5,153, 71, 8, 90,188,168, 2,203,210,181,146,119, 71,171,184,163, 53,171,154, 34,203,101,253, 4,128, 95,
-127, 60,136,185, 31,188,136,173, 71,127,198,234, 95,128, 86,170, 92,180, 8, 80,131, 85,223,198, 71,163, 95,198,178, 29,191, 1,
- 0,206,159,171,178,140,184,202,234,160,201,104,125,172,188, 59, 90,174, 28,175,227,134,143, 86, 57, 78,123, 39, 81,171,213,162,
-168,168, 8,241,241,241,120,227,141, 55,144,155,155,139,212,212, 84,220,189,123, 23,223,125,247, 29, 20, 10, 69,141,202,232,195,
-183,102, 99,206,178,233,224,192,161,105,163, 22,152, 57,249, 51,180,107,213,241,177,203,221, 25,110, 88,179, 42,228, 92,185,114,
-101, 77,235,210, 63, 78,104,185,132,191,191,255,168,110,221,186,193,100, 50, 33, 32, 32, 0,169,169,169, 32, 73, 50, 2, 40, 25,
-194, 11, 13, 13,221,173, 86,171, 35,220,229, 19, 8, 4,160,105,186,212,247,199,190, 0,192,192,129, 3,113,248,240,225, 42,123,
- 20,193,193,193,168, 91,183, 46,222,127,255,253,114,179, 28, 28,103, 58,200,229,114, 28, 61,122, 52,187,160,160,160,128,227,184,
-106, 77,115,179, 59,198, 95,188,120,209,109, 7,120, 71, 88,173,214, 71,119,239,222, 13,217,184,113,163,160,146,151, 95, 41,206,
-159, 63, 79,163,138,161,154,191,131,211, 85,207,148,227,184, 10, 69,150, 59, 97, 4,170, 10, 72, 42, 20, 10,145,148,148,132,185,
-115,231,130, 32, 8,236,219,183,239,185,120,184,254,188,147,191,153, 36, 73,159,129,175,116,110, 9,130,128,213, 82,126,164,218,
-179, 80, 87, 42,178,134,126,185, 11, 7, 62, 28,233,142,232, 73,190,112,225,130,239,198,141, 27,133,238,148,251,133, 11, 23,104,
-142,227,170, 61,236,103,127,225, 88,173, 86, 24,141, 53,179,162,112, 28,119, 57,238,139, 57, 81,219,190, 61, 38, 34, 8, 11,174,
-156,219,135,226, 34,215,238, 12, 18,145, 16,155,227,247,211, 98,145,224,209, 83, 46,186,181, 67,134, 12, 25,245,213, 87, 95,181,
-112,181,211,141, 73, 48,169, 38,147, 9, 25, 25, 25, 48, 24, 12,123, 63,249,228, 19,235,177, 99,199,222,124,245,213, 87,209,186,
-117,107,132,132,132, 32, 43, 43, 11,201,201,201,136,143,143,231, 46, 93,186,180, 23,192,148, 42,238,227,193, 69, 95,204,137,137,
-223,113, 76, 66, 18, 86, 92, 57,191, 15,197, 78,162,189,188,117, 90,132,111,182,238,183,138,197,162, 59, 85, 89,139, 28,173, 89,
-181,249, 98, 28, 52,102, 50,134,174, 90,141,136,118,125,177,104,113,111,124,243,197,112, 44,239, 39,134,117,207,104,180,122,109,
- 27,118,206,235, 15, 0,168,243,141,155,214, 18,161, 24, 15, 93, 88,172,138,138,101, 54,113, 83, 61,171,169, 61,239,149, 89,174,
-170,107,209, 34, 73, 18, 13, 26, 52, 64, 68, 68, 4, 58,117,234,132,182,109,219,162, 71,143, 30,184,113,227, 6,110,220,184,129,
-105,211,166, 85, 38,178,170, 44,163,238,255,142,194,207, 93,238, 60,118,217, 56,151,123,109,192,157,186, 52,121,242,100, 0,248,
- 71, 89,183,170, 45,180, 52, 26,205, 13,150,101, 91,122,123,123,219, 45, 82,165,251,210,210,210,192,178,172,161,186, 5, 99,177,
- 88,236,193, 49,203,196,101,178, 59,199, 87,246,224,115, 28,199, 20, 20, 20,160, 91,183,110,232,210,165, 75,233,240,137,227,226,
- 32, 76,112,224,192, 1,112, 28, 87,109, 39,107, 7,199,120, 29,170,233, 0, 15, 0,185,185,185,125,187,118,237,122, 74, 40, 20,
-186,245, 21, 77,150,101, 83,115,114,114, 94,121,210,156,174,202,135,101,217, 10, 69,150, 59, 13, 81, 85, 1, 73,133, 66, 33, 60,
- 60, 60,240,253,247,223,195,223,223,255,185,122,192,110, 36,170,151, 84,182,191,155,159,228, 28,128,128,161, 95,238,122,120, 46,
-223, 90,111,232,151,187,210, 14,124, 56, 50,188,178,115,178,179,179,251,140, 28, 57,242,184,187,229, 78,211,244,131,236,236,236,
-106,135, 75,224, 56, 14,119,238,220, 97, 39, 76,152,144,167, 86,171,135,215, 36,255, 51,231,174, 94,190,240,243,169,126,253,162,
- 58,180, 3, 9, 88, 42,118,254,229, 8,128, 19,138, 4,143,102,204, 90,249,214,240,225,195,159,102,177,105,178,179,179, 59, 13,
- 27, 54,108, 10,254,114,157, 40, 35,164, 80,193,236,106, 27, 86,213,173, 91,247, 69,129, 64, 32, 5, 48, 23, 64,218,165, 75,151,
-214, 94,186,116,169, 15,128,127, 9, 4,130, 16,134, 97, 50,108,157,158, 93, 0,254,168,186, 30,229,190, 13,142, 13,235,215,251,
- 95,125, 65, 16,156,197, 98,174,162,131, 4, 14, 28,199,137,197,162, 59,191,222,200,106, 85, 89, 71,202,225, 11, 28,181, 62,100,
- 63,101,202, 20, 76,153, 50,165,180, 62,173, 89,211, 5,123,255,188,136,215, 90,165,195,252,117,103, 16,202,112,183, 59,124, 0,
- 48,251,255, 38,212, 90,218, 28,243,238,104,209,114,245, 28, 84,199, 71, 75, 32, 16, 32, 47, 47, 15, 73, 73, 73,200,201,201,129,
-193, 96, 64, 98, 98, 34,172, 86, 43, 10, 11, 11,241,226,139, 47,214, 56,157,181, 85, 70, 79,147,243,159, 56,124, 88,109,161,101,
-181, 90, 63,109,208,160,129, 72, 38,147,181, 96, 24, 6, 28,199,129, 97, 24,206, 38,106,170, 61, 11, 79, 36, 18,153,154, 52,105,
- 66,184,154,157, 96,255,239,225,225, 97,172,196, 90, 18, 87,191,126,253, 79, 8,130, 16, 84,212, 11,177,255,103, 89,150, 17, 10,
-133,113, 53,188, 87,143,235, 24,175, 87,171,213, 29,107,185,252,254, 14, 78,231,242,209, 55,107,214,172,244,139,246,206, 49, 81,
-108, 31, 91,213, 87, 33,206, 43, 13, 72,170,215,235,179,250,246,237,203, 56,238,119, 12,104,250, 92,131,224,210,250,143,122,179,
-222,185,124,107, 61, 0,176,139, 45,112, 92, 90, 37,103, 25,179,179,179,187,253,221, 73, 75, 73, 73,177,252,235, 95,255,250, 86,
-171,213, 78, 6, 80, 99,111,254, 89,159,174,153,245, 12,150,140, 6,192,194, 26,158,155,150,159,159,223,211,105,219, 31,118, 65,
-101,143,107, 87,109,209,126, 59,175,214, 99,139,209, 52,157, 30, 17, 17, 81, 45,203, 13, 69, 81,233, 85,237,119,142, 17,230,136,
- 91,240,198,172,171, 64,201,228,239,124,183, 56, 77, 38, 83, 65,199,142, 29, 69,213,204, 91,174,187,121, 15, 9, 9, 65,157, 58,
-117, 74,127,237,112,222, 94, 85, 58,105,154, 78, 15, 11, 11,131,191,191,127,133, 17,223,157,125,178,220,225,172,237, 50,170,140,
-179, 78,157,109,181,206, 89,211,116,242,112, 15,189,121, 78,158,147,231,124,102, 57, 5,252,253,228, 57,121, 78,158,243, 9,114,
- 62,151,224,189,212,120,240,224, 81, 17, 24,254, 22,240,224,193,131,199,227,129,168, 68,149, 86,103,166, 79, 77,148,237,105,158,
-147,231,228, 57,121, 78,158,147,231,228, 57,255,113,156, 85,113,215,246, 76,227,231, 26,188, 89,149,231,228, 57,121, 78,158,147,
-231,228, 57,121,206,127, 44,248,161, 67, 30, 60,120,240,224,193,131, 7, 15, 94,104,241,224,193,131, 7, 15, 30, 60,120,240, 66,
-139, 7, 15, 30, 60,120,240,224,193,131, 7, 47,180,120,240,224,193,131, 7, 15, 30, 60,120,161,197,131, 7, 15, 30, 60,120,240,
-224,193,131, 7, 15, 30, 60,120,240,224,193,131, 71, 9, 8, 0, 56,114,228, 72,233, 7, 1,163,163,163, 9,254,182,240,224,193,
-131, 7, 15, 30, 60,158, 36,158,107, 45,226,152, 57, 30, 60,120,240,224,193,131, 7, 15, 94,139,212, 14, 72, 94,108,241,224,193,
-131, 7, 15, 30, 60,120,177,197,103,140, 7, 15, 30, 60,120,240,224,193,139,172,103, 10,101, 44, 90,188,224,226,193,131, 7, 15,
- 30, 60,120, 60, 77,177,245,140,106, 17,206,182, 56,174,243,224,193,131, 7, 15, 30, 60,120,240,120, 76,129, 85,217, 47, 15, 30,
- 60,120,240,224,193,131, 7,143, 90, 18, 92,246,255, 79, 76,104,241, 95, 54,231, 57,121, 78,158,147,231,228, 57,121, 78,158,243,
- 31, 11, 33,127, 11,120,240,224,193,131, 7, 15, 30, 60, 30, 27,142, 86, 44,130, 23, 90, 60,120,240,224,193,131, 7, 15, 30,181,
- 39,178, 8, 87,235,252,183, 14,121,240,224,193,131, 7, 15, 30, 60,254, 38,240, 22, 45, 30, 60,120,240,224,193,131, 7,143,199,
- 3, 1,126,232,144, 7, 15, 30, 60,120,240,224,193,227,111, 21, 91, 46, 55, 86, 52,115,224,116, 53,200,107, 50,251,224, 52,207,
-201,115,242,156, 60, 39,207,201,115,242,156,255, 56,206,170,184, 79,227,217, 67, 55, 0,103, 1,116,183,253, 86, 40,188,106, 27,
-252,212, 87,158,147,231,228, 57,121, 78,158,147,231,228, 57,159,119, 84, 24,168,148,119,134,231, 81, 21,132,168,124,136,185,170,
-253, 60,120,240,224,193,131,199, 63, 77,108, 17,225, 72,218, 0, 0, 32, 0, 73, 68, 65, 84,113,142, 47, 73, 87,104, 12, 96, 22,
- 0,111,135,109,191, 0,136,115, 58,110, 7, 0,133,195,186, 30,192, 60, 0,247,170, 76, 13,199,137,109,252, 82,219,194, 2, 48,
- 1, 48, 3,208, 18, 4, 65,241,101,246,212,209, 17, 64,180,237,255, 17, 0, 87,170,185,255,185, 66, 72, 72,136,220,199,199,167,
-207,245,235,215, 37,137,137,137,184,112,225, 2,183,121,243,102,107, 97, 97,225,201,172,172, 44, 35, 95, 93,158, 11,244, 5, 48,
-211,246,127, 17,128, 19,143,201, 71, 40, 20,138,105, 30, 30, 30,253,165, 82,105, 29,154,166, 9,131,193,144,169,215,235, 79,209,
- 52,253,165,173,221,171, 46, 6,251,250,250,190,217,180,105,211,198,169,169,169, 25,153,153,153, 59, 0,236, 1, 48,188, 78,157,
- 58,163,235,215,175, 31,122,231,206,157,123, 5, 5, 5,223, 0, 56,248, 20,211,201,131,199, 63, 9, 68,101,214, 8, 87,152,203,
-113,220,232, 50, 12, 68,121,142,158, 61,123, 14, 58,121,242,164,130,101, 89,216, 23,185, 92, 78, 3, 24, 87,133,200,242,187,124,
-249,114,189,201,147, 39, 15,205,204,204,124, 89,171,213,182, 7, 0,133, 66,241,115, 96, 96,224,175,171, 86,173,250,142,227,184,
-116,130, 32,180,213,204,168, 80, 36, 18,189,225,227,227,211,159,166,233,182, 28,199, 65, 36, 18, 93, 47, 44, 44, 60, 65, 81,212,
- 55, 0,106, 34,222, 36, 66,161,112,138, 84, 42,237, 75,211,116, 75, 0, 16, 10,133, 55,205,102,243, 9,154,166,215, 2,176,212,
-128, 83, 38,145, 72,166, 40,149,202, 40,139,197,210, 18, 0, 36, 18,201, 77,141, 70,115,202, 98,177,172,181, 9,206,167, 13, 33,
-128,104,142,227, 68, 0, 32, 16, 8, 6,183,111,223,190, 30, 65, 16, 44, 65, 16, 28,199,113,196,207, 63,255,220,134, 97, 24,210,
- 86, 63,162, 1,252, 10,128,126, 22,159, 16,127,127,255,133, 44,203,214,169,180,208,100,178,151,175, 95,191,222,116,247,238,221,
-204,215, 95,127, 93, 52,126,252,120,207,201,147, 39, 11,215,172, 89,179, 54, 43, 43,235, 61,231,227,253,252,252,150,147, 36,233,
-239,206,245, 89,150,205,203,207,207,159,254,180,242, 31, 19, 99, 42, 99,238,142,143,151, 53, 2,144, 94,195,250,253,247,113,154,
- 98, 56, 0,136,151,197, 55,138, 49,197, 36,219,255, 63, 46,175, 3,102,174, 59,173,237,202,113,192,148, 40, 47,242,113,133, 86,
-104,104,104,124, 76, 76,204,168,150, 45, 91, 10, 57,142, 3, 69, 81, 48,155,205, 77,175, 92,185,210,125,223,190,125, 47,107,181,
-218,225,213,164,124,235,227,143, 63, 94, 48,127,254,124,127,145, 72, 68, 80, 20,213,104,247,238,221,109,223,126,251,237,247, 55,
-110,220, 88,119,196,136, 17, 94,246,237,115,231,206,109,183,104,209,162,134, 0,190,124, 10,233,228,193,227,159,134,110, 40,235,
-163,245, 57,128,207, 42, 19, 90, 30,182,151,103,142,205,146, 5,135,223, 82,156, 57,115,230,144, 80, 40,180, 91,180,218,235,245,
-250, 32, 39, 43,152, 43,145, 85,127,204,152, 49, 29,247,238,221,187,112,196,136, 17,217, 10,133,162,201,171,175,190,170, 37, 8,
- 66,176,123,247,238, 54, 17, 17, 17,242,129, 3, 7,142,233,217,179,231,135, 28,199, 93, 32, 8, 66,237,102, 38, 91,248,250,250,
-238, 95,178,100, 73,189,190,125,251,138,253,253,253,193,113, 28, 50, 51, 51, 67,143, 30, 61,218,239,243,207, 63,255,176,160,160,
- 96, 8,128,132,106,220,184,118,114,185,124,239,231,159,127, 30,210,175, 95, 63, 97,112,112, 48, 76, 38, 19, 18, 19, 19,123,159,
- 56,113,162,235,198,141, 27,223, 51, 26,141,175,217, 4,134,187,104,239,237,237,189,239,191, 31,127, 28,212,225,141, 55,132,190,
-190,190,224, 56, 14,106,181,186,247,197,109,219,186, 79, 90,178,228,189,226,226,226, 97,174,238,247,211,132, 68, 34, 33,183,111,
-223,222, 90, 34,145, 0, 0, 44, 22, 11, 34, 35, 35,137,231,229, 9, 33, 8, 34, 44, 51, 51,211, 91, 44, 22,187,220,207, 48, 12,
-186,118,237,218, 64, 44, 22,227,203, 47,191,164,242,242,242,218,124,245,213, 87,215,119,238,220,233,191,118,237,218,215, 0,148,
- 19, 90, 36, 73,250,167,167,167,187,228,100, 24, 6, 86,171, 21, 52, 77,195, 98,177,160,121,243,230, 79, 53,255,241,241,178, 48,
- 0,211, 99, 98, 76, 31,216, 54,125, 9,224, 67, 0, 41,168,225, 55,187,254, 6, 78,199,250,182,220,225,255, 99,167,213, 1,245,
- 0,224,216, 13, 19, 0,248, 62,238,125,245,240,240,104,246,250,235,175, 11,213,106, 53, 68, 34, 17,172, 86, 43,178,179,179, 17,
- 25, 25, 41,248,246,219,111, 95,168, 46, 95,163, 70,141,198, 47, 90,180, 40,224,216,177, 99,214,237,219,183, 91,162,162,162, 68,
-227,199,143, 87,118,237,218,181,121, 88, 88, 24,185,101,203, 22,243,169, 83,167,168, 49, 99,198, 72,226,226,226, 2,142, 30, 61,
- 58, 48, 33, 33,225,203, 39,157, 78, 30, 60,254,129, 56,139,191, 66, 60,216,127, 43, 21, 90,112, 16, 87,131, 1, 64, 36, 18,181,
- 9, 10, 10,138,167,105, 58,216,102,213,201,206,201,201,249,146,162,168,223,109,199, 30,100, 89,118, 80, 85,150,172, 49, 99,198,
-116, 60,126,252,248,178, 43, 87,174, 20,231,231,231, 7, 31, 58,116,200,244,225,135, 31,166, 2, 64, 74, 74, 74,195,129, 3, 7,
-134, 78,157, 58, 53,189, 79,159, 62,171,122,244,232,241, 46,199,113,167, 8,130,208, 87, 37,178, 34, 35, 35, 47,159, 63,127,222,
- 75,165, 82,149,217, 81,191,126,125,188,251,238,187,226, 65,131, 6, 69,244,234,213,235, 82,114,114,114, 23, 0,127,186, 35,136,
- 26, 55,110,124,250,204,153, 51,158, 62, 62, 62, 40, 42, 42, 66,118,118, 54, 12, 6, 3,148, 74, 37, 70,140, 24, 33,238,214,185,
- 83,221,169,211,222, 59,157,158,145,209,219, 77,177,213,190, 83,139, 22,167,119,198,197,121, 82, 15, 31, 66, 46,151, 67,167,211,
- 1, 0,188,188,188,240,114,131, 6,194,223,182,109, 11, 29, 29, 27,123,250,215,164,164,222, 79, 73,108, 73,109,191,102, 0, 71,
- 4, 2,193, 96,137, 68, 66, 14, 30, 60, 24,167, 79,159, 38, 76, 38,147,208,102,221,161, 7, 15, 30, 12,185, 92, 14,139,197,194,
-162,100,232,144,126,150,159, 18,137, 68,130,228,228,228, 50,219,180, 90, 45,212,106, 53,242,243,243, 97, 54,155, 81, 84, 84, 4,
-150,101, 9,185, 92,174,102, 89, 22, 36, 73, 58, 11,128, 50, 16,139,197, 72, 74, 74, 42,179,141,166,105,232,245,122,152,205,102,
- 88,173, 86,104,181, 90,185,151,151, 87, 99,127,127,255,116, 0, 7, 11, 10, 10,190,204,201,201, 73,123,194,217,207,179, 11,162,
-248,120,217,125, 0,146,255, 69, 78, 7, 75, 86,168,109,253,143, 90, 74,171, 29, 15,143,252,110, 10,183, 89,199, 30,212, 2, 31,
- 11, 0, 23, 46, 92, 64, 78, 78, 14,242,242,242,160, 86,171, 17, 22, 22, 6,142,227,170, 61, 28,151,156,156,188,238,197, 23, 95,
- 36,110,221,186,117, 2,192,154,221,187,119,143, 43, 40, 40,152, 57, 99,198, 12,223,165, 75,151, 22,196,198,198, 46, 2,176,117,
-247,238,221,239, 52,107,214,172,255,237,219,183, 55, 62,141,116,242,224, 81,219,224, 56,174, 29,128, 0,123,219, 98,107,119,253,
- 28,214,111, 16, 4, 97,113, 56,206, 98,107, 27,156,127,237,176,175,171, 9,130,248,213,225, 60, 53, 65, 16,191,214, 52,153, 78,
-191, 37,157,110, 0, 56,114,228, 8,103, 95, 92,157, 25, 24, 24, 56,173,103,207,158,203,174, 93,187,214, 60, 43, 43,203, 39, 43,
- 43,203,231,218,181,107,205,123,246,236,185, 44, 48, 48,112,154,195,141,112, 62,245,180,195, 62,241,229,203,151,235,237,223,191,
-127,209,233,211,167,139,219,180,105, 99, 57,115,230, 12,221,167, 79,159, 92,219, 11,154,238,211,167, 79,238, 79, 63,253,196,116,
-232,208, 65,126,252,248,241, 71,151, 46, 93, 90,190,119,239,222, 32,142,227, 4,174, 56,109, 16,169, 84,170,239,207,157, 59, 87,
- 78,100, 57,162,110,221,186, 56,114,228,136, 82,165, 82, 29, 4, 32,174, 40,157, 54,200,100, 50,217,190,159,126,250,201,211,203,
-203, 11,185,185,185, 16,137, 68, 8, 12, 12, 68,113,113, 49,178,179,178,144,118,247, 46, 72,139, 5, 43,190,152,239, 37,151,203,
-247,186,104,236,203,113,122,123,123,239,219,185,112,161,103,254,233,211,248, 99,193, 2, 88,173,214,210, 33, 87,171,213,138, 75,
-147, 39, 67,253,227,143,216, 50,119,174,167,183,183,247, 62, 0,178, 42, 56,107, 3,142,156,147, 1, 20,216,150,201, 0,174, 68,
- 70, 70, 94, 75, 76, 76, 68,151, 46, 93,176,103,207,158, 86, 51,102,204,152, 60, 99,198,140,201,123,246,236,105,213,165, 75, 23,
- 36, 38, 38, 34, 50, 50,242, 26,202,250,103,253,221,233,252,219, 56, 25,134, 41,179,176,236, 95,239,152, 58,117,234,228,238,223,
-191, 31, 35, 70,140, 32, 37, 18, 73,214,200,145, 35,165, 23, 47, 94,228,108, 34,211,237,116,154, 76, 38, 24,141, 70,232,245,122,
-164,164,164,200,151, 44, 89,210,249,179,207, 62,107,116,250,244,233,208, 89,179,102, 77, 10, 8, 8,184, 30, 20, 20, 84,239, 9,
-231,221,234,244,127, 5,128,140,106, 90,136,254,110, 78,206,118, 62, 98, 76, 49,173, 29, 26,216,234,242, 86,118, 63,179,109,105,
-213, 3, 72,123,156,186,212,179,103,207, 23, 27, 53,106, 20,180,251,150, 15, 10,197, 77,193,138, 85, 96,197, 42, 48,126,237,144,
- 44,121, 5,225,225,225, 65,158,158,158, 29,171,153,206,237,183,110,221,250,151,173,167,156, 15, 96, 89,108,108,236,231, 4, 65,
- 92,136,141,141,157, 15, 96,153,109,251,130,219,183,111,119, 0,176,243, 41,165,243,153,120,222,121,206,255, 45,206, 42,180, 72,
- 0, 65, 16, 71, 8,130, 56,242,201, 39,159,244, 0,224,231,180,254,111,199,227, 0, 72, 92,253,218, 23,135,237, 1, 28,199, 13,
-112, 56, 47,160,134,201, 39, 92, 44,127, 9, 45, 0,136,142,142, 38,162,163,163,237, 59,126, 33, 8,226, 16,128, 95, 68, 34, 81,
-155,214,173, 91, 15,254,225,135, 31,188, 2, 2,254,186,126, 64, 64, 0,246,238,221,235,213,162, 69,139,193, 34,145,168, 13,128,
- 95,148, 74,229,161, 74,172, 48,170,201,147, 39, 15, 29, 59,118,172,166, 77,155, 54, 0, 80,148,144,144,160,232,208,161,131,158,
-166,105,130,166,105,162, 67,135, 14,250,132,132, 4, 5, 69, 81,218,118,237,218,121,244,234,213, 43,117,250,244,233, 99, 92, 8,
- 14, 71,188,190,120,241,226, 48, 31, 31,159,202,148, 48,180, 90, 45,130,130,130, 48,121,242,228, 96,145, 72,244,102,101,119, 75,
- 40, 20, 78, 89,188,120,113,160, 74,165, 66, 97, 97, 33,194,194,194, 96,177, 88,144,148,148, 4,147, 94, 7, 74,171, 1,165, 41,
-130,250,254, 61,168, 68, 66,140, 25, 20, 29, 36, 20, 10,167, 84, 97, 45,153,242, 77,108,108,144, 37, 53, 21, 41,123,246,128,161,
-203, 27,127,104,171, 21, 55, 55,109,130, 41, 61, 29,139, 38, 76, 8,146, 72, 36, 83,158,176, 37,107, 41,199,113,114,142,227,228,
- 4, 65,172,234,216,177,227,183,114,185,124,114, 92, 92, 92,223,147, 39, 79,246, 59,127,254,124,119,154,166, 69, 52, 77,139, 46,
- 92,184,208,197,100, 50, 9,165, 82, 41,132, 66, 33,135,231, 20, 34,145, 8, 98,177, 24,114,185, 28,157, 59,119,190,191,121,243,
-102, 42, 44, 44, 76,180,111,223, 62,159, 58,117,234,120,172, 89,179,166, 72,171,213, 46,118,151,207,106,181,194,108, 54,195,104,
- 52,194,100, 50,225,204,153, 51, 13,166, 78,157, 42, 52,153, 76,204,192,129, 3, 11, 40,138, 50,199,198,198, 42,125,125,125, 63,
-124,146,249,140,137, 49,177, 54,203,211,109,155,104,121,128,199,244,121,250, 59, 56, 1, 88,108, 62, 89,118,248,219,184, 45,181,
-116, 43,104, 0, 58,155,208, 50, 59, 61, 31, 45, 29, 44,190, 85,162,168,168,104,227, 55,223,124, 19, 70, 74, 85,184,104,233,143,
-239,216,207,113,210,123, 13,114,235,125,132,192,176, 70, 24, 53,106, 84, 32,199,113,107,106, 33,205, 95, 1,232, 10, 96, 85, 77,
- 78,126, 2,233,172,231,225,225,177,199,203,203,235,162,135,135,199, 30,216,134,103, 31, 7, 81,141,208,123, 80, 51, 50, 61, 42,
- 2,220,160,102,100,122, 84, 35, 62,212,192,243, 2, 39, 45,226, 8, 53,199,113,209, 28,199, 69, 47, 90,180,104,161,195,251,221,
-190, 46,119,211, 50, 22,205,113, 92,116, 25,133, 84, 34,176, 30,219,232,230, 98, 41,209, 20,142, 74,210, 33,115,165,179, 11,131,
-130,130,226,227,227,227,189,156, 25,179,178,178,160,209,104, 48,103,206, 28,175,177, 99,199,190,151,158,158, 30, 83, 69, 34, 36,
-217,217,217,109, 71,143, 30, 45,179, 90,173,133, 44,203,146, 26,141, 70,232,237,237,205,216, 15,240,246,246,102,138,139,139, 69,
-122,189, 94,192, 48,140,121,236,216,177,146, 9, 19, 38,188, 12, 64, 80, 17,105, 64, 64, 64, 84,255,254,253, 43, 28, 58,160, 40,
- 10,122,189, 30,122,189, 30, 86,171, 21,157, 59,119,150,110,222,188,185, 79,110,110,238,250, 10, 21,135, 84, 26, 21, 21, 21, 37,
- 42, 40, 40,128,183,183, 55,210,210,210,240,224,193, 3,152,117, 58, 88,117, 26, 88,117, 90,208, 90, 13, 56, 77, 49,242,239,221,
- 65,135,102, 77,197, 59,164,210,190,122,189,126,121, 69,156, 74,165, 50,170,195,184,113, 66, 15, 15, 15,116, 31, 93, 50,207,224,
-120,179,102,224, 24, 6, 44,195,128,161,105,244, 77, 74, 2, 69, 81, 32, 73, 18,237, 10, 10,132,202,109,219,162,212,106,245,178,
-167, 81,217,165, 82,169,112,251,246,237,175, 75, 36, 18,112, 28, 71, 88, 44, 22,156, 60,121,242, 31,247,208, 75, 36, 18,200,100,
- 50, 88,173, 86,212,175, 95,223, 56,122,244,232,203, 95,124,241, 69, 56, 73,146, 30, 98,177,248,135,252,252,252,133, 89, 89, 89,
- 41,238,242, 81, 20, 5,139,197, 2,139,197, 2,163,209,136,251,247,239, 7, 55,104,208,128,152, 60,121, 50, 99, 48, 24, 26,174,
- 94,189, 58,249,228,201,147,138,197,139, 23,191, 10,224,221, 39,157,223,152, 24, 83, 51, 0,205,226,227,101, 98,155,229,215,242,
- 63,198,201,161,196,241, 29,241,178,248, 68, 0,234, 90, 20, 89, 18, 0,222,225,126, 66,189, 72, 0, 29, 0, 47,155, 40,120,149,
- 32,136, 14,205,155, 55,247, 73, 76, 76, 44,228, 56,238, 42,128,239, 0,100, 85, 70,198,178, 44,193,178, 44,222,110, 95,132,201,
- 29, 5,160,168, 98, 20, 23, 23, 35, 45, 45, 13, 9, 9, 9,248,249,231,132,154, 62,155,111,122,122,122,246,145,201,100,245,105,
-154, 38,117, 58, 93,154,193, 96, 56,205,178,236, 70,212,192, 71,237,239, 74,167, 29, 30, 30, 30, 75,102,205,154,213,201,219,219,
- 27,191,255,254,123,195, 93,187,118, 45,209,235,245,143,229, 92, 47, 19,145, 91,150,175, 92, 19, 26, 26,168,194,141,243,135, 67,
- 23,110,216,189, 5, 96,195,120,153,242,236,195, 73,139, 56,138,161, 95, 57,142, 27, 64, 16,196, 17,103,161, 84, 45,179,211, 99,
-158, 95,133, 69,203,249,195,210,101,133, 86, 5, 10, 18, 52, 77, 7, 59, 90,178, 56,142, 67, 86, 86, 22, 50, 50, 50,160, 86,171,
-225,227,227, 3,171,213, 26,236, 78,251,160,213,106,219,251,249,249, 25, 68, 34,145,217,104, 52, 66,161, 80,176, 34,145,136,179,
- 93,135,176,205, 90,100,204,102, 51, 33, 20, 10, 41, 47, 47, 47, 79,179,217,220, 20,149,248,146,113, 28,215,222,207,207,207,229,
- 62,179,217, 12,157, 78, 7,189, 94, 15,157, 78, 7,179,217,140,160,160, 32,208, 52,221,182,210, 46, 45, 77,183, 12, 8, 8, 64,
-102,102, 38,228,114, 57,210,211,211, 97,209,105, 97,213,106, 65,235, 53, 96,138,139,193,106, 52, 96,245, 26, 80, 22, 3, 66,155,
- 52,131,125, 70, 98,133,221,112,139,165,165,159,159, 31,244,250,191,220,205, 56,155,192,162,105, 26,180,205, 57,218, 62,156,232,
-239,239, 15,251,140,196, 39, 4, 51,128, 25, 36, 73,174,146, 74,165,194, 73,147, 38, 33, 43, 43,171, 76,157,152, 52,105, 82,169,
- 79, 86,215,174, 93, 47,200,100, 50, 90,173, 86,195,108, 54,139,158,215,135,158, 32, 8, 16, 4, 81, 82, 70, 52, 13,127,127,127,
-125, 94, 94,222,207, 69, 69, 69,175,215,132,143,162, 40,251,140, 46, 24,141, 70,112, 28,135,223,127,255, 29, 50,153, 76,196, 48,
-204, 45,154,166, 21, 34,145, 8,164,205,249,235, 73,193, 54, 35,240, 75, 0, 97, 54, 11,209,155, 40,113, 56,207,112,209,144,184,
-117,235,220,228,172,190,112, 51,197,216, 45, 77, 25,168,217,112,164, 43,116,111,170,146, 44,143,235, 16,168,106, 61,208, 67,175,
-144, 8,244,108, 90,235,250,255, 93,154,176,107,236,152, 55,189,230,205,155, 87,207,223,223, 95,150,156,156,108,154, 63,127,126,
-131,237,219,183, 19, 40, 25,166,171, 16, 15, 31, 62, 60, 48,107,214, 44,223,254,253,251, 55,148, 74,165, 68,113,113, 49,212,106,
- 53,114,114,114,240,224,193, 3,238,198,141, 27,247,205,102,243,158,234, 36, 50, 36, 36,100,243,235,175,191, 62,246,165,151, 94,
- 18,217, 45,164,122,189,190,205,185,115,231, 6, 29, 63,126,188,139, 94,175,175,118,189,124,244,232,209,158,217,179,103,123,188,
-242,202, 43, 77,165, 82, 41, 89, 27,233,116, 4, 73,146, 65,158,158,158, 56,125,250, 52, 84, 42, 21, 72,146, 12,122,220,250,106,
-178,178,161,117,130,253, 96,186,180, 28, 77, 3,234,193,100,101, 67,121,137,242,252, 88,180, 42,120,215,183,179, 91,164,170, 16,
- 75,198,153, 51,103,206, 34, 8,226,200,204,153, 51,103,185,178,104,217,254, 50,142,199, 57, 28,111,174,109,177, 85,173, 64,147,
- 44,203, 34, 35, 35, 3,153,153,153,200,200,200, 64,126,126, 62, 72,146, 4,199,113,238,204, 62,227, 8,130, 96, 79,157, 58,229,
-115,249,242,101,125,187,118,237,138,236,254, 47, 52, 77, 19, 20, 69, 17, 54,191, 24, 34, 45, 45, 77,124,241,226, 69,213,237,219,
-183,131,108,189, 85,182, 10, 83, 96,185,109,118,129,229,184,152, 76, 38,200,100, 50,247, 84,135,237, 69,248,251,181,107, 37, 34,
- 75,167,181, 13, 25, 22,131,209, 20,131,211,107, 33, 97, 40, 72,192,129, 48, 25,220,190,127,142,176,139, 44,171, 77,104, 89, 44,
- 22, 80, 20, 5,150,101, 65,211, 79,197,175,124, 93,171, 86,173,218, 30, 56,112, 96,124, 70, 70,249,119,225,144, 33, 67,240,238,
-187,239, 98,234,212,169,183, 7, 12, 24,112,227,240,225,195,152, 50,101, 10, 88,150,109, 13,160, 24,192,241,231,237,161, 55,155,
-205,165, 22, 40,147,201, 4,171,213, 10, 84,227,179, 10,206,117,211, 94,182, 52, 77,219,185,137, 3, 7,246,227,194,133, 11,100,
- 66,194,173,176, 73,147, 38,219, 29,238,159,116, 86,211, 81, 50,115, 79, 98,107, 40, 44, 40,241,127,170, 40,164, 66, 4, 42, 31,
-178,227, 42,227,124, 28,180,218,208,106,196, 7, 31,124, 16,133,146, 25,206, 41,143,105,209,122, 69, 66, 18, 95, 79,107,233, 43,
-251,176,149,159, 94, 34, 36,116, 73, 95,207,210, 61, 8, 87,234,131,234, 42, 44, 97, 13, 84,117, 22, 46,252, 34,228,246,237, 59,
-230, 57,115,230, 36,142, 28, 57, 50,240,195, 15, 63,108,190,111,223,190, 46, 38,147,233, 27, 0, 69, 21, 25, 93, 6, 13, 26,116,
- 53, 48, 48,176,193,134, 13, 27,114, 31, 61,122,228, 67, 81,148,135,213,106,101,245,122,253, 3,163,209,120,218,106,181,158, 6,
-112,173, 58,137,245,242,242,106, 53,110,220, 56, 81, 81, 81, 17,132, 66, 33,172, 86, 43,114,115,115,209,169, 83, 39,193,161, 67,
-135, 90,212,228, 6, 20, 22, 22, 46,255,230,155,111,206,238,220,185,179,143, 82,169,124, 73, 42,149, 6, 3, 96,180, 90,109,142,
- 94,175,255,163, 38,233, 44,211,206, 49, 76,206,181,107,215, 34,148, 74, 37, 30, 62,124, 8,134, 97,114, 30,183, 14,200,196,228,
-163,155,231, 15,213,109,230,223, 0, 23, 47, 95,133, 76, 76, 62,226, 67,125, 61,247,176,251, 80,193, 81, 64,185, 16, 72,151,227,
-226,226,228,139, 22, 45, 66, 92, 92,220, 45, 87, 22, 45,187,224,138,139,139,187,101, 63,206,225,248,243,143,145,198,138, 45, 90,
- 21, 41, 72,160,100,118,161, 90,173,246, 81,169, 84,165, 2, 43, 51, 51, 19,153,153,153,144, 72, 36, 72, 75, 75,131, 68, 34,201,
-114,167, 19, 34,151,203,127,107,211,166,205, 11, 41, 41, 41,226,249,243,231,215,189,118,237,154,178, 83,167, 78, 47,202,229,114,
-134,227, 56,152, 76, 38, 50, 49, 49,209,115,217,178,101,161,237,219,183,183,180,111,223,254,250,238,221,187,141,168, 36,254, 21,
- 65, 16,191,100,101,101, 53,172, 95,191,190, 93,180,149, 17, 87,142,130, 11, 40, 25,242, 20, 10,133,215, 43, 75,168, 80, 40,188,
-153,148,148,212, 91, 33,147,194,162,213,192,170,211,128,214,106,193,104,139,193, 20, 23, 3,122, 13, 36, 52, 13, 17, 67, 65, 46,
-147, 33, 35, 61, 29, 66,161,240,102,101,156, 18,137,228,102, 78, 78, 78,111,149, 74, 85,250, 18,165,104,186,100, 97, 24, 88,104,
-186,212,162, 37, 18,137,240,232,209, 35, 72, 36,146,155, 79,186, 38,147, 36,201,216, 67, 56, 84,144, 15, 4, 5, 5,177, 29, 58,
-116,192,148, 41, 83,192, 48,140,173, 24,136,238, 0, 46,162,196,191,229,153,132, 43,113,107,119, 90, 55, 26,141,208,233,116, 40,
- 44, 44, 20,202,229,242, 23, 66, 67, 67,175, 90, 44,150, 61, 52, 77,111,121,240,224,129,166, 34, 78,155, 48, 43, 21, 93, 44,203,
-130,227, 56, 48, 12, 3,138,162, 32, 22,139,217,115,231,206, 99,217,138, 37,136,223,178,157, 27, 52,104, 16,113,232,208, 33,176,
- 44,155,254,132,179,111,177,137,150,202, 26, 13,231,144, 10, 31,161,242,144, 10, 21,113, 58,246,254, 28,183, 17, 46,142, 41,135,
- 15, 62,248,224, 4, 74,134, 12,243,108, 98,238,113, 56,191, 44,250,238, 11, 25,104, 70,111, 62,183, 83,247,237, 93,141,126,222,
-183, 43,127,179, 72, 4,154,151,187, 5,181,108,216,224, 5,129, 74,229, 67,174,223,184, 42,127,199,246,189,201, 15, 31, 62,212,
-172, 93,187,182,227, 11, 47,188,224,253,199, 31,127,132, 86, 36,180, 20, 10, 69,227, 55,223,124,115, 92, 97, 97,161, 56, 62, 62,
-126,119, 86, 86,214,111, 40, 9, 45,227, 56,131,122, 0,128,173, 54, 33, 26,100,107,231, 46, 2,152, 95, 89,127,141, 32, 8,252,
-244,211, 79,229,102, 7,178,143,167,206, 85,141, 26, 53, 26,145,146,146,114, 33, 39, 39,103,152,243, 78,177, 88, 60,175, 73,147,
- 38,125,111,221,186,245, 57,128, 99,213, 33, 54, 24, 12,177,123,247,238, 93, 42, 16, 8,234, 48, 12,147,105, 52, 26, 99, 31,219,
-162, 69,177, 19,226,214,239,218,100,180, 48,225,114,137,224,161,137, 98,223,226,117,200,243,107,205,178, 65,237, 96,141, 82, 3,
- 32,156,214,255,176,189,140, 44, 28,199,217,143, 85, 59, 88,177, 44, 78, 86, 48, 87,251,212,143, 17, 44,157,171,168,141,171,200,
-162,245, 9,128,246, 0,126,201,201,201, 89, 53,118,236,216,101, 59,118,236,240,210,104, 52,200,201,201, 65,110,110, 46,132, 66,
- 33,148, 74, 37,214,173, 91,103,204,201,201, 89,229,120, 14,202, 71,144, 7, 0,147,191,191,255,111,219,183,111, 15,254,250,235,
-175,133, 49, 49, 49,105, 3, 6, 12,104,186,110,221,186, 20,177, 88,204, 49, 12, 67,152,205,102,226,237,183,223,142, 88,177, 98,
- 69,170, 64, 32, 80,140, 24, 49,130,240,240,240,248, 5,149,132, 13, 80,171,213,167,190,255,254,251,161,211,167, 79,151, 90, 44,
- 22,151,150, 44,251, 54,149, 74,133, 75,151, 46, 89, 10, 11, 11, 79, 86, 97,197, 56,245,195,177,163, 93,255, 51,114,164,152,210,
-106, 64,105, 53,160, 53, 26, 48,218, 34, 16, 58, 13, 68, 12, 13,185,152, 69,112,152, 12,180,209, 19, 71,127,253,131, 50,155,205,
-149, 6, 54,212,104, 52,167, 46,198,199,119,111, 95,175,158,240,210,180,105,176, 82, 20, 94, 73, 74, 42, 21, 87, 86,171, 21, 7,
- 91,182, 4, 67, 16,104, 61,113, 34,238,209, 52,173,209,104, 78,253, 47, 62, 12, 55,110,220,200, 29, 61,122,244, 53,150,101,219,
-226, 9,125, 52,243, 73,128,162,168,114,214, 40,134, 97, 74,172,142, 37,150, 3,201,209,163, 71,187, 38, 38, 38,138,255,252,243,
- 79, 92,184,112,161,245,142, 29, 59, 62, 9, 15, 15,111,249,240,225,195,236,170,196,155,171,160,191,176,249, 31,238,222,185, 7,
-239,188,243, 14,145,157,157,141,239,190,251, 14, 85, 5, 79,253, 59, 16, 19, 99, 98,227,227,101,117,225,228,247,228, 34,164,194,
-239,112, 51,164, 66, 69,156,166,152, 18, 43,153, 44,190, 36,216,168, 41,166,100, 56, 80, 22, 95,165,165, 12, 49,166, 24,141,205,
- 33, 62,171, 22, 56,245,160, 25,185,229,220, 78,221,128, 99, 15,181, 87,178,140,243, 1,156,128,137,225,238, 93,231,110,188,244,
-146,143, 63, 0,152, 77, 76,112,227,198,141,187, 9,133, 66, 9, 0,120,122,122,190,228,231,231,183, 46, 63, 63,191,179,171, 50,
-141,142,142,238, 16, 24, 24,216,230,248,241,227,127,100,101,101,221, 2,240,179,243, 65, 17, 17, 17,115,110,223,190,221, 78, 36,
- 18, 17, 85,212, 17, 0, 64,183,110,221, 94,144, 74,165,126,199,238,122, 67, 35,110, 4, 78, 80, 12, 8,101, 96, 84,173,144, 38,
-110,142,176,176,171,126,133,133,133,173,139,139,139,255,168,102,209,247, 24, 58,116,232,150,248,248,248,176,110,221,186,113,215,
-175, 95, 39,157, 71, 17, 34, 34, 34,250, 92,185,114,165,237, 91,111,189,181, 97,215,174, 93,147, 81,118,166,109, 85, 72,179,197,
- 27,172, 53,156, 74,198,105,128,169,103,179,153,241, 10,229, 31,128,234,132, 92,120,140,240, 12,143,149,196, 10, 13, 24, 21,108,
-111,111,139,137,213,158,162,168,223,111,220,184,113,112,196,136, 17,186,252,252,124,248,249,249,161,126,253,250, 32, 8, 2,235,
-214,173, 51, 62,120,240, 96,159, 45,150, 86,251,204,204,204, 65, 54,177,229, 10,218,213,171, 87,239,218,182,109,155,234,218,181,
-107, 2,154,166,149, 77,155, 54, 53, 92,190,124,217, 83, 36, 18,113, 98,177,152,189,118,237,154, 34, 34, 34,194, 68, 16,132,244,
-199, 31,127,204,191,122,245,106,248,140, 25, 51,190, 65,217,105,226,206,216,185, 96,193,130,140,148,148, 20,152,205,102,104, 52,
- 26, 20, 23, 23,151, 46, 69, 69, 69, 40, 46, 46,134, 72, 36, 66,118,118, 54,246,239,223,159,101,139, 18, 95,153,101, 99,237,154,
-117,235,213, 89, 15,211,160, 84,200, 65,107,138,192, 20,231, 3,218, 98, 72, 40, 43, 60, 68, 12,234, 54,146, 67,166, 80, 34, 71,
-163, 67,252,229, 95,179,109, 81,226, 43, 54, 23, 88, 44,107,223, 93,177, 34,135, 22,139, 81,111,248,112, 88,109, 67,133,142, 66,
-139, 33, 8,132,247,234, 5,210,219, 27, 11,247,237,203,177, 69,137,127,162, 96, 89, 86, 96,177, 88, 42,203, 7, 88,150, 77, 79,
- 76, 76,220, 5,224, 44, 65, 16, 28, 65, 16, 28, 74,130,181,233,158,229, 7,153,162, 40,204,157, 59, 23, 98,177, 24,115,231,206,
-197,167,159,126,138,101,203,150, 97,253,250,245,248,246,219,111,113,244,232,209, 6, 23, 47, 94, 20,159, 63,127,158,139,139,139,
-203,139,136,136, 16, 76,156, 56, 81, 37,151,203, 63,168,140, 51, 54, 54, 22, 94, 94, 94,136,141,141,197,146, 37, 75,176,121,243,
-102, 28, 60,120, 16,151, 46, 93,130, 64, 32, 96,211,211, 31,193,100, 50,113,171, 87,175,206, 56,120,240,160,113,213,170, 85, 16,
- 10,133,196, 83,106, 36, 62,176, 9, 42, 71, 75,144,115, 72,133,124, 0, 43, 81,181,111, 84, 69,156,144,197,199,215,181,137,163,
-100, 7, 65,116, 24,192,116, 84, 62,189,218,206, 49, 25, 64,112, 45,112,206,150,143,254,191, 68,213,166, 59,247,175,100, 25,103,
- 3,248,193,158, 39,165, 82, 41, 63,112,224,123, 33, 0,236,219,187, 95,148,148,148,228,253,253,247,223,203, 2, 3, 3,241,237,
-183,223,202,228,114,121, 96, 5,156,204,193,131, 7,205, 18,137,196,111,194,132, 9,253,218,181,107,247,190,173, 35,218, 11, 64,
- 11,148,204, 94,140,186,127,255,126,130,191,191,255,221,147, 39, 79,234,221, 41, 32,173, 86,251,205,214,173, 91,235, 23, 48,190,
- 56,166, 31,138,120,118, 41,142,170,182, 32,173,222,167, 80,212,121, 25,175,191,254,122, 29,134, 97, 54, 85,179,220, 95, 31, 50,
-100,200,214,248,248,248,176, 9, 19, 38,100, 95,191,126, 61, 7, 64, 60,128,237,142,203,237,219,183,243,198,142, 29,155,181,105,
-211,166,144, 17, 35, 70,172, 7, 48,140,127,245,243,224, 81,182, 47,132,170,102, 29,186,120,225,150,254,207,205,205, 93, 93, 88,
- 88,120,233,222,189,123,239, 89, 44,150, 16,130, 32, 56,177, 88,156,157,147,147,179,202, 33, 96,169, 43,191,146,222,176,197,218,
- 32, 8,130,226, 56, 46,189, 71,143, 30, 31,244,234,213,235,171, 35, 71,142,152,186,119,239,142,189,123,247,250,247,232,209,195,
-192,178, 44,119,236,216, 49,255,190,125,251, 26,206,158, 61,171,127,251,237,183,155, 54,105,210,100, 98,108,108,172,154, 32, 8,
-214, 21,167,253, 93, 86, 84, 84, 52,164, 95,191,126,151,246,237,219,167, 84,169, 84,160,105, 26, 6,131, 1, 6,131, 1, 28,199,
-193,219,219, 27,106,181, 26,243,231,207,215, 20, 23, 23, 15,118, 33,220,156, 57, 77, 38,147,105,216,228,247,167,159, 90,245,249,
- 92,175,240, 6, 13,144,127,199, 4,218,100,128,136, 35, 81,247, 5,111,136, 37,114,220, 75,210,226,163, 93, 7,180, 70,147,233,
- 53, 23,189,229,114,156,197,197,197,195, 98, 62,253,244,244,134, 25, 51, 60,219, 4, 5, 65, 32, 16,192,108, 54,131, 97, 24,136,
- 68, 34, 68,198,196, 64, 28, 16,128, 57,187,118,233, 53, 26,205, 48,148,255, 20,143, 51,103,109,192,145,115,242,141, 27, 55,198,
- 54,107,214, 12,147, 38, 77,194,144, 33, 67,202, 28,248,253,247,223, 99,253,250,245, 48,155,205, 99, 1, 92, 7,176, 14, 37, 67,
- 29,112, 18, 89,127,119, 58,107,157,147, 97,152,194,164,164, 36,229,210,165, 75, 9,171,213,138,207, 63,255, 28,118,193,105,175,
-215, 83,166, 76,169,227,229,229,133,207, 62,251,204,146,151,151,215,115,201,146, 37,103,182,111,223,238,255,205, 55,223,188, 14,
- 32,214,153,147,101,217,220,155, 55,111,122,109,216,176,129,164,105, 26,203,151, 47, 47, 55, 60, 57,126,252,120, 88,173, 20, 4,
- 2,161,197,100, 50,183,144,203,229,201,126,126,126,114,174,172,115,215,147,188,159,161, 40, 9, 97,224,232,248,110,113,244,207,
- 66,197, 33, 21,170,195,169,150,197,199,119, 55,197,196,156,181, 9,162, 68,219, 49,123,237, 38,253,106,112,218, 5, 97, 77, 56,
- 79,217,150, 42, 97, 50,153,160, 86,171,145,151,151, 7,149, 74, 5,129, 64, 64, 84,148, 78,179,217,252,231, 71, 31,125,116, 99,
-211,166, 77,189,175, 92,185, 50,240,252,249,243, 61, 78,159, 62,109, 74, 75, 75,163, 41,138,226, 66, 66, 66,132,157, 59,119,150,
-245,239,223,223, 67, 42,149,146,179,103,207,206,251,226,139, 47,252, 81,214,135,205, 57,239, 2,130, 32,240, 97, 87, 45, 98,123,
- 8, 96,177, 88, 81, 84, 84,132,140,140,116, 36, 36, 36,224,202,149, 59,224, 56,142,172, 70,185,251, 1,152,253,221,119,223,133,
- 74, 36, 18, 98,215,174, 93,117,118,237,218, 85,165, 37,117,199,142, 29,117,118,239,222, 61,207, 54,122,145,254, 44, 62,239, 60,
-231,255, 44,231,179, 12,231,200,240,168, 82,104,217,218,249,246,176,125,148,148,162,168, 95, 92,132,112,248, 4,192, 92, 7, 43,
- 88, 85,230, 60, 13,199,113, 23,122,247,238, 61,165, 87,175, 94, 43,250,244,233,147,149,149,149,213,112,249,242,229, 97, 52, 77,
- 91, 19, 18, 18,200,228,228,228,180,223,126,251,173, 81,147, 38, 77, 38,222,190,125,251, 28, 65, 16, 86, 55, 50,152,144,156,156,
-220,169, 71,143, 30,251, 39, 78,156, 24,222,161, 67, 7,137, 74,165,130, 80, 40, 68, 74, 74, 10,254,248,227, 15,203,238,221,187,
-211,139,138,138,170,243, 9,158, 95, 82, 51, 50,162, 70, 76,125,111,223,196, 33, 3,253,255,213,244, 5, 73, 72, 72, 8, 96, 52,
-226,206,195,108, 92,189,243,135,117,243,133,171,106,179,217, 60, 12,238,127,130,231,151,223,238,221,235,221,115,198,140,125,243,
-254,243,159, 32,100,101, 9, 67, 66, 66, 32,145, 72,240,224,193, 3, 36,179, 44,189,120,227,198, 28,155,200,122,210, 81,225,165,
- 0,150,178, 44, 43, 4, 0,185, 92,142,119,223,125, 23,142,159,220, 89,191,126, 61,140, 70, 35, 0, 8, 9,130, 88, 10, 96,203,
-179,110,197,178,163,160,160, 96,206, 43,175,188, 18, 39, 20, 10, 43,140,122,235,227,227, 3,173, 86, 11,154,166,153,140,140,140,
- 59, 62, 62, 62, 16,137, 68,224, 56,206,229,115,148,159,159, 63,103,216,176, 97, 11, 72,146,172,200,242, 1,165, 82,153,118,230,
-204,153,198,111,189,245, 22,249,223,255,254, 55,101,194,132, 9,210, 51,103,206, 48, 28,199,237,127,210,247,160, 75,151,157,192,
-134,152,215, 0,188, 6,148,115,120,207,176,109,171, 86, 72,133, 46, 93,118, 98, 3,254,226,116, 28,198,179, 11, 34,155, 21,170,
-185, 44, 62,126, 5, 74,252, 44, 42,229,238,178,179, 11, 54,196,160, 86, 57,221,129,163,246,213,235,245, 96, 24,166, 50,107,222,
-239,123,247,238, 93,241,219,111,191, 5, 76,153, 50,165,225,127,254,243, 31,101,143, 30, 61, 60, 29, 15, 48, 26,141,236,225,195,
-135,245,235,215,175, 47,190,112,225, 66,234,248,241,227, 59, 84,150,206,135, 15, 31, 30, 93,184,112,161,119,255,254,253,155, 0,
- 40,245,207, 82,171,213, 72, 75, 75,195,159,127,254,153,102,181, 90, 15, 85, 35, 75,249, 0,230,141, 26, 53,106,233,182,109,219,
-234, 76,152, 48, 33,123,247,238,221,127,162, 36, 96,177, 51, 84, 67,134, 12,105,185,109,219,182,144, 9, 19, 38,100,163,196,143,
- 44, 29, 60,120,240,176,163, 59,202,251,105, 85, 58, 50,177,213, 98,177,112, 38,147,137, 51, 24, 12,156, 78,167,227,224,250, 43,
-240, 7, 51, 51, 51,185,244,244,116,238,225,195,135, 92,106,106, 42, 7,224, 91, 39,197,235,170,193,242,216,177, 99, 71,163,208,
-208,208,207, 21, 10,197, 9,129, 64,160, 17, 8, 4, 26,169, 84,250,131,159,159,223,167,139, 23, 47, 14,229, 56, 78, 92,137,138,
-174, 8, 66,145, 72,244, 86, 96, 96,224, 65, 95, 95,223,116, 31, 31,159,244,192,192,192,131, 34,145,232, 29, 0,162, 42,148,121,
- 69,144, 9,133,194,143, 60, 60, 60, 78, 73,165,210, 92,169, 84,154,235,225,225,113, 74, 40, 20,126,132,202, 3,169, 86,202, 41,
-145, 72, 62, 10, 8, 8, 56,165, 84, 42,115,149, 74,101,110, 64, 64,192, 41,137, 68,242, 56,156,143,211, 43,177, 11, 45, 3,103,
- 3, 65, 16, 84,235,214,173, 55,180,109,219,118, 93,219,182,109,215,181,106,213,234,107,155, 85,146,179, 89, 91, 12,168, 56,120,
-227,223,153,206,167,198, 25, 25, 25,185,125,219,182,109,236,156, 57,115, 52, 77,154, 52, 41,152, 51,103,142,102,219,182,109,108,
-100,100,228,246,154,114, 6, 5, 5,213,139,140,140, 44,216,180,105, 19,157,148,148,196,109,218,180,137,142,140,140, 44,112,138,
- 12,255, 36,242, 78, 0,136,176, 89,127, 14, 1,216,131, 18,231,247, 80, 0, 68,140, 41,134,179,205, 62, 60, 1,160, 79, 5,101,
-239, 46,103,152, 41, 38,134,179,249, 84,157, 4,144,232,176,222, 13,101,253,191,158, 4,167, 75,180,104,209,226, 30,231, 0,139,
-197,194,169,213,106, 46, 41, 41,137,187,112,225, 2, 23, 22, 22,118,207, 13, 78, 63, 0,111, 3, 56, 28, 28, 28,124,187, 99,199,
-142, 15, 59,117,234,244,176, 94,189,122, 41, 34,145,232, 10, 74, 34,188, 71,218,150,165, 0,154, 84,193,217, 81,165, 82, 45, 12,
- 11, 11, 59,212,184,113,227, 75,245,235,215,191,226,235,235,123, 68, 38,147, 45,194, 95,145,177,171, 91,231,123, 12, 29, 58, 52,
- 77,167,211, 49, 47,189,244,210,109, 87, 39, 53,107,214,236,162, 78,167, 99, 70,142, 28,153, 14, 32,250,159,240,188,243,156, 79,
-133,243, 31,133,198, 54,193,116,208, 97,249,196,197,113,159, 56, 29,179,213,118,110,149, 5,193,113,156,128,227, 56, 15,142,227,
-188, 57,142,243,229, 56, 78,197,113,156, 39,199,113,210, 42,204,223,124,197,254,251, 56, 39,219, 4,148,193,246,223, 25, 85,237,
-127,174,239,103,104,104,168, 79,187,118,237,166, 30, 56,112,224,163,251,247,239,127,116,224,192,129,143,218,181,107, 55, 53, 52,
- 52,212,231,113,210, 25, 20, 20, 84,175,121,243,230, 95, 53,107,214, 44,189,121,243,230, 95, 57,137,172, 39,153,119,137, 77,196,
- 52,179, 45, 13,109,219, 8,148,196,194, 90,107, 19, 54, 17, 21,244,212,170,195,105,231, 59, 4,160,175,109, 57,100,219, 22,246,
- 20, 56,203,161, 65,131, 6,199, 91,182,108,121,175, 85,171, 86,201,173, 90,181,186,215,162, 69,139,123, 77,155, 54,189, 23, 17,
- 17,113,175,110,221,186,247,252,253,253,143,215,160,140,124, 1,132,160,252,103,192,158,118,157,239, 30, 25, 25,121, 85, 38,147,
-185,140, 13, 38, 20, 10,231,181,106,213,234, 38, 74,102, 74,242,237, 39,207,201, 11,173,255, 33,240,149,240,217,227,148,162,242,
-207,140, 84,181,159,191,159,207, 54,167,203,111,117,217,132, 76, 67,155,192,145,212, 2,167, 35,159,189, 78, 69, 56,136,166,167,
-193,201,215, 37,158,147,231,228,133, 86,173, 67,200,223, 2, 30, 78, 48, 63,230,126, 30,207,197,104, 60,126, 0, 0, 32, 0, 73,
- 68, 65, 84, 54,170, 19, 19,235,113, 56, 93,241,221,127,202,156, 60,120,240,224, 81, 91,109,103,119, 0,231,236,189,194,138, 84,
-105,117,102, 19,212, 68,217,158,230, 57,121, 78,158,147,231,228, 57,121, 78,158,243, 31,199,105,199,138, 10,182,223,113, 90,255,
-250, 25, 21, 94, 79, 36, 76, 15,111, 86,229, 57,121, 78,158,147,231,228, 57,121, 78,158,179,166,152,248,140,138,172,110,246, 21,
-126,232,144, 7, 15, 30, 60,120,240,224,193,163,246, 80,117, 28,173, 61,123,246, 8,236,255, 71,141, 26, 53,158, 97,152,169,246,
-117,129, 64,176,230,187,239,190,219, 82,217, 21,134, 15, 31,206, 84,198,233, 10, 85, 93,199, 21,103,139, 38,202, 73,126,222,138,
-247,138,138, 13, 43, 83, 50,153, 11, 38,147,169,185,125,159, 76, 38, 75,220,178,101,203,221,218, 78,231,248,241,227,155, 56, 95,
-167,126,152,168,187,175,151,236,221,130, 34,221,242, 91,247,116, 95,243,117,236,169,192, 31, 64,180,151, 76, 60,168,133, 74,220,
-241,207,124,211,101,189,149, 57,140,146,217,176,133,207, 99,134,131,131,131,155, 42,149,202, 49, 0, 90, 24, 12,134, 64,133, 66,
-145, 11, 32, 65,163,209,108,207,206,206,190,227, 46, 79,183,250, 72, 3, 16,110, 91,125,120, 46, 21,245,220,217, 87, 21,250, 68,
-192,196, 1, 82,130,128,245,100,242, 95,206,232,125, 27,193,196,114,229,183,247,105, 4, 11,199, 65, 76, 0,230,147,247, 33,123,
-142,138, 74, 9, 32, 10, 37, 33, 28,110,160, 36,252,132,129,127,100,121,240,120,174,224, 60, 84, 88,186, 46,172, 64, 76,116, 21,
- 11,137,175, 56,112, 42,128,243, 51,155,205, 34,137, 68, 2,139,197, 2,133, 66,190,246,237, 9,227, 63, 7,137, 34,138,198,187,
- 91,182,108,169,241,151,174,171,115, 29, 0, 63, 57,159,239,163,148, 47, 56,123,248, 99,159,174, 3, 22, 47,178, 60,200,139,213,
-106,181,164, 84, 42,133,217,108,134,183,183,119,167, 73, 19, 39,190, 68,138, 56,139, 88,236,113,121,197,138, 21,217, 53, 77,231,
- 7, 31,124, 16,108,181,154,254,205,178,172,196, 98,177, 72,157,175,227,173,240, 88,124,246,240,199,138,110,209,139, 62, 7,120,
-161,245, 20, 32,169,231,227,113,110,229,168,238,205, 58,182,104, 12, 54,225, 60, 76, 22,235,160,179,233,186, 65,159, 94,201,156,
-158,174,179,182, 69, 45, 4,172,252, 31,130,160, 97,195,134, 83, 2, 2, 2, 70,110,220,184, 81,220,176, 97, 67,200,100, 50, 24,
-141,198,144,251,247,239,135, 76,154, 52,169,155, 92, 46,223,149,146,146,178, 22,238,125, 8, 46,252,236,214,255, 3, 0,116, 26,
- 51, 63, 28, 37, 31,139, 54, 56,239,235, 62,110,126, 56,128, 25, 40,251, 97,228, 44,148,132, 80,112,213,234, 72,142,108, 91,134,
- 65, 99, 63, 18, 2,152, 84,154,120, 18,248,225,219, 85,232, 55,234,189, 50,219, 9, 14,194,195,219,150, 33,122,236, 71, 21,126,
- 71,177,111, 99,130, 98, 89,174, 66, 75, 60, 73, 18,244,137,123,156,171, 15, 12,231,160, 36, 6, 88, 57, 74,148,124,208,217,229,
-241, 3,154, 10,114,172, 20,227, 50,224,172, 88, 36,200, 61,122,135, 41,119,110, 76, 27, 80, 20, 83,210,182,138,133, 96, 14,166,
-120,159,157, 61,123,182, 48, 58, 58, 26,155, 55,111,238,252,245,215, 95, 79,212,106,181, 63,218,238, 91, 50,255,248,242,224,241,
- 92, 11, 46,215, 66, 75, 40,192,134, 67,251,182, 52,202,201,205, 67,204, 91, 31, 98,231,206,157, 40, 44, 44,132,143,143, 15, 36,
- 98,177,104,229,210,255, 11, 86, 42, 61,130, 99, 38,198,110, 0,208,180,166,169,169,230,117, 26, 59,159, 79,216, 62,165, 35, 20,
-144, 34,137, 68, 66,238,218,181, 11, 69, 69, 69, 80,169, 84,144, 72, 68,228,138, 69,159,200,149, 74, 79,249,155,147,103,118, 70,
- 73,252,159, 26,193, 98,209,117, 62,176,115,139, 82,173, 86, 99,220, 59,177,112,190,142, 88, 44,102,236, 47, 22,190,142, 61, 21,
-204,222,248,238,216,102, 47,122, 1,214, 91,151, 32, 18, 8,160,240,246, 65,148, 80, 0, 1,129,230, 49, 39, 82,103, 1,248,244,
-121,201,108,195,134, 13,167, 12, 31, 62,124,228,130, 5, 11,196, 36, 89, 18,114, 78,175,215,195,104, 52, 34, 52, 52, 20,103,207,
-158, 21,207,153, 51,103,228,247,223,127,143,148,148,148,213,213,229,191,117,235, 86,253,240,240,112, 19, 0, 12,108,233,229,188,
-175,158,125, 31, 0,120,121,121, 85,201,231,167,242, 48,223,186,117,181,133,253,188, 41,189, 66,153, 10,182,155, 0, 40, 42,227,
- 98, 89, 78,120,242,171, 73, 21,238,127,107,193, 14,250,198,158, 11, 77, 27, 54,108,104,116,220,238,233,233, 89,209, 41, 65, 58,
-157, 46,220,121,163,253,120, 43,197, 4, 86,116,189, 62,239,174,119, 41,192, 40, 6,194, 29, 59,118, 0, 0,190,252,104,180, 96,
-211,207,121, 66,161,176,164,169, 93,186,116, 41,230,205,155, 39, 57,113,226, 68,255,109,219,182,245, 63,120,240,224,202,138,132,
- 42, 15, 30, 60,158, 73,145,229,248, 91,177,208, 34, 9,194, 75,233,229,137,215, 94,127, 27,199,143,255,128,174, 93,187,150,238,
-107,208,160, 1,134, 15, 27,140,239,182,174, 0, 0,175,199, 73,209,227, 94,167,176, 88,255,105,191,145, 95,205,127,152,173,187,
-114,228,200, 17,116,233,210,165,204,249,175,143,120, 13,223,126,179, 20,149, 68,153,119, 11, 4, 71,138,189,148, 30, 24, 21,243,
- 14, 92, 93,103,226,184, 33, 71,250, 14, 95,213, 59, 39, 95,191,130,175,103, 79, 30,141,130,253,250,180,108,214, 20,133,251,215,
-226,143, 34, 19,142,103,154,240,102,212,191, 16,233, 43, 71, 23,154, 65,176,135,168,103,182,158,122, 46,132, 86,112,112,112,211,
-128,128,128, 50, 34, 75,171,213, 66,167,211, 65,163,209, 64,171,213,130, 36, 73,196,198,198,138,207,157, 59, 55, 50, 56, 56,248,
-180, 27,195,136, 15,109,150, 44, 64, 32,210,205,157, 59,215, 28, 24, 24,104, 86, 40, 20,156, 80, 44,213,118, 31, 55,223, 11, 0,
- 72,161, 88,187,114,229, 74, 75,104,104,168, 73, 40, 20, 74,222,123,239, 61,210,157, 52,155,205,102,206,145,211, 98, 49,151,110,
- 95,188,120,177, 37, 40, 40,200,172, 80, 40, 56,171,213,125,163,227,205, 7, 5,144,138, 5,144,138, 5,144, 73, 68,240,170,223,
- 14,210,194, 63, 65,211, 52,150, 44, 89, 98, 13, 14, 14,182, 40, 20, 10, 78, 34,145,136,167, 77,155, 86,101, 58,199,143, 31,207,
-169, 84, 42,171, 66,161, 16,207,155, 55,175,220, 76,161, 51, 55, 50, 32,151,136,160,144, 10,209,184, 65, 24,164,156,209,237,180,
- 10, 4,101,189, 17,164, 82, 41, 58,119,238,140, 22, 45, 90,224,224,193,131,221,121,161,197,131,199,115,129, 10,103, 24, 10, 1,
-224,200,145, 35,221, 80,242, 65, 68, 68, 71, 71, 19, 37,103,112,152, 49,101, 24,222, 28, 55, 10, 12,195,150,126,231,139, 32, 9,
- 76,126,163, 63, 88,214,157, 17,137,170,167,120,214,224, 58,165,156, 28, 65, 10, 0,160, 81,189, 16,110,226,155,255, 1,195,178,
-127, 13,148, 8,128,183,199,245, 43,217, 86, 11,233, 20,128,193,135,147, 94,133,171,235, 52,109, 84,135,164,173, 38, 16,101, 63,
-246,248,119,124,108,147,231,116,129, 22,117, 67, 34, 40,163, 17, 38, 19,133,248, 59, 5,198, 83, 25,250, 64, 82,149,170, 94,245,
- 90, 7,153, 64,157,137,122, 94,146,198,217,122,234,185,200,187, 82,169, 28,179,113,227,198,114, 34, 43, 39, 39,135,212,233,116,
-176, 90,173,172, 86,171, 5,195, 48,152, 57,115,166,104,206,156, 57, 99,178,179,179,231,217, 53,143, 43, 78,155,223,213,140, 91,
-183,110,213,155, 61,123,182,181,103,207,158, 15, 27, 52,104,160, 23, 8, 4, 8, 9, 9, 89, 21, 21, 21,229,187, 96,193, 2,107,
-255,254,253, 83, 5, 2, 1, 26, 55,110,172,255,243,207, 63,235, 1,144,187,155,119, 71,206, 45,103,214,112, 0, 64, 16, 4,162,
-162,162,210, 26, 55,110,172, 23, 8, 4,184,123,120, 49,231,238,253, 20, 9, 73, 52, 9,245,182, 53, 34, 4, 32,247, 44,245,196,
-139,138,138, 74,111,218,180,169,142, 36, 73,220,188,121, 51, 12,229, 63,107, 85,142, 83, 46,151, 83,175,191,254,250,195, 59,119,
-238,184, 58, 30, 66, 1,137, 14, 77,109, 6,172,208,182, 64,250,197, 10,211, 41, 18,128,158, 51,101,180, 80, 37, 3,164, 94,254,
-102,141, 70, 3,165, 82, 89, 98, 33,179, 90,241,251,239,191,163, 99,199,142,221,246,236,217,115,142,127,222,121, 78,158,243, 47,
-184,210, 34,207,160, 53,203,241, 67,247,101,124,180,206, 58,103,138, 97,104, 52, 8, 15,194,226,255, 27, 15,134, 97,193, 48, 12,
-104,219, 47,195, 48,160,172,214, 90, 73,217,227, 92,199, 71, 41, 95,240,195,174,119,125,122, 14, 89,218, 43,110,246,184, 83, 12,
- 3,176, 44, 5,138, 2, 24,150, 2,203, 48,160,168,218,113,205,161, 88, 22,245,194,130, 17, 55,123, 28,156,175,179,253,187, 61,
- 3,207, 28,138, 85,116,141, 94,244,225,221, 52,195, 18, 94,216, 63, 89,200,196, 82, 33, 39,148,193, 98,161,161,181,176, 22, 0,
-122, 19,197, 90, 57, 15,127, 25, 0, 8, 73,226,121,154, 93,219,162, 97,195,134,101, 68,214,178,101,203,252,215,173, 91, 23, 10,
- 0,195,134, 13,203,232,213,171, 87, 94, 82, 82, 18, 66, 66, 66,136,188,188,188, 1, 0,222,179,157, 59, 3,192,186, 10,120,245,
-225,225,225,166,128,128, 0,179, 93, 16,145, 36, 9,161, 80,136,240,240,112, 83, 96, 96,160,185,113,227,198,122,177, 88, 12,146,
- 36, 97, 23,122,110,117,243, 8, 2, 2,129, 0,118, 78,103,107,143,157,179, 58, 16, 9,201,242,205,155, 3, 39, 73,146, 46,175,
- 87, 97, 29,146,201, 56, 0, 21, 30, 47, 32, 29,154, 71, 97,229, 30, 2,241,191, 67, 4,224, 44,199,113,184,126,253, 58, 82, 82,
- 82, 32, 22,139, 17, 28, 28,140,121,243,230,193,108, 46,209,187,195,135, 15,239, 6,224, 38,255, 4,243,224, 81,138,179,207,160,
-192,114,182,106, 85,238,163,117,228,200,145,110,209,209,209,231,236, 2,168, 68,236,184, 16, 63, 20, 13,138,178, 2, 28, 87, 43,
- 66,171,162,235, 48, 12, 91,233,117,236, 62, 90, 44,203, 9, 93,138, 44,150, 5, 77, 81,181,114,247, 88,134, 2,203, 82,112,117,
- 29,130, 32, 25, 91,131, 47,230,159,147, 39,143,224,240,122, 36, 21,222, 0, 23,104, 19, 66,253,164, 18,228, 25,209,240,133,102,
-130,223, 13, 20, 46,221, 72,132,191,167,242,185, 41, 23,131,193, 16, 40,147,201,160,215,235, 75, 45, 89,235,214,173, 11,181, 88,
- 44, 36, 0, 8,133,162, 48, 53, 27, 42, 99, 88,192, 91,153,133,194,194, 98, 63,142,227, 8,155,224, 89, 10, 96, 11, 42,137,238,
- 47, 22,139, 75, 5,138,163, 0,146, 74,165, 53, 18, 48,118,216,197,153, 88, 44,118,185,221,121,120,173, 42,136, 29,133, 22,184,
- 18,171,150,147,216, 18, 8, 4,176,251, 70, 85, 5,137, 68, 82,154,119, 87, 16, 10, 28,174, 39,168,190, 43,166,213,106,133, 78,
-167, 67, 81, 81, 17,100,178, 18,131, 25,199,113, 32, 8,226, 61, 0,239,243, 79, 49, 15, 30,174,181,200, 51, 44,182, 92, 11, 45,
-148,152,236, 8, 0,160, 41,171, 75,241,179,231,240, 37, 60,204,214, 35,216,255, 23,112,213,140,122, 58,114,228,200,173, 33, 33,
- 33, 29,236,235, 82,185,167,223,196,119, 63, 3, 77, 91,225, 37, 39,241,214,152,126,101, 68, 86,137, 69,203, 82,225, 55, 65, 10,
-139,245,159,246, 27,190,122,190,183,210,239,138,179,248,137,139,191,246, 90,161,198, 28, 70,146,191,162,144, 8, 97,134,191,253,
-217,120,135,198,253,198,174,245,115,167,187,109, 15, 36, 72,209,107,147, 86, 77,228,132,158,205, 21,164,246,252,199,227,254,117,
-192, 81,204,249,250,250, 30,233,243,218,202,222, 57, 5,188,143,214,211,128,151,183,138, 12,123,185, 59, 94,126,239, 43,156,249,
-228, 99, 14, 40,132, 95, 72, 40,217, 99,202, 23,240,124,121, 32,174,190, 53,134, 5, 10,158,139,188, 42, 20,138, 92,131,193, 16,
- 98, 52, 26,161,209,104,160,209,104,202, 10, 2,145,136,152,248,206, 84,127,145, 88, 2,202,106,193,241,237, 95, 84,201,105, 15,
-225, 48,176,165, 23, 4, 34,137, 54,161, 97,195, 85, 66,161, 16, 36, 73,226,240,218,143,223,219,191,252, 93, 47, 0,184,113,100,
-173,102, 84,236,154,213, 36, 73,194,108, 54, 75,171,147,238, 71,143, 30,133,153,205,102,147, 77,160,217,133, 31, 30, 60,120, 80,
-215,108, 54, 27, 29,183,187, 3,185,194, 11, 80, 53, 0, 20,129,229,172,103,169,169,169,117, 40,138, 50, 8,133, 66, 88, 44, 22,
-183, 84, 17, 73,146,226,155, 55,111,134,177, 44,235,242,248, 22, 17,117,128,224,150,128,196,219,237, 60,115,110,116, 68,109, 98,
-235,137, 69,144,230,193,227, 89,177,108, 61,131,207, 4, 81,193,255, 82,161,213,253,200,145, 35,156, 99, 15,145,166, 40,155,200,
-250, 75,244, 48, 12,139, 76,181, 9, 73, 73,119,177,114,229, 74, 92,186,250,145,247,130, 5, 11,164,115,230,204, 49,143, 28, 57,
-114, 57,203,178,173, 72,146,188,129,191,134, 42,202, 90,133, 88,182,238,181,107,215, 26,218,215, 41,138,130,151,151, 23,188,188,
-188,208,180,113, 88, 57,145,197, 48, 12,172,149, 12, 29,218,125,180, 8,142,229, 40,138, 1,195,178,165,226,167, 80, 99, 14, 59,
-116,250,122, 35,135,195, 95,176,255,233,220,174,121,197, 98,112,210,188,210,124,236, 90, 63,119,250,130,205,155,165,133, 76,192,
-180, 81,175,189, 25, 57,124,212, 24,188,254,234, 43,221,204, 22,203, 65, 1,201,177, 84,233,245, 64,130,131,179,143, 22,143, 39,
-132,228, 34, 61, 37,146,202,225, 25, 92, 31,119,117,140, 88, 32, 16,252,114,191,200, 32, 38, 5, 66,144, 66, 49, 18, 10, 77,212,
-115,148,221,132,228,228,228,144,186,117,235, 66,163,209,128,166,105,118,216,176, 97, 25, 66,161, 40, 76, 40, 18, 17,209,163,166,
-178,217,217,153, 20, 73, 10,192,113, 12, 94, 25, 62,137,144,202,228, 98,171,197, 66,163,100,232,208,149, 53,203, 49,132,131, 87,
- 84, 84,148,175,125, 38,224,254,229,239,122, 57,236, 83,190,244,210, 75,190,142,179, 14,221,180, 22, 17, 35, 71,142,148,135,135,
-135, 19, 0,240,235,246,217,118,235, 25, 49,112,224, 64, 89,120,120,137, 31,254,143,107,223,117,155,211, 95,193, 1,197, 15,128,
-226,212,114,150,172,129, 3, 7, 74, 27, 54,108, 88,173,103,209,230, 0, 95, 97,236, 46, 15, 33, 13,100, 95,119,139, 43,166, 13,
-168, 80, 79, 8,151,191, 66, 66,226,233,103,238,240,241,137,159,121,177,197,131,135, 91,112,210, 34,207, 20,186,217, 4, 98,119,
-219,111,169,224, 18, 2,128,205, 68, 71, 56,232, 44, 80,180,181,156,200, 98, 24, 6, 34,194,140,149, 43, 87,226,253,247,223, 7,
- 0,241,244,233,211, 15, 44, 88,176, 96, 40,203,178,173, 56,142,235, 66, 16, 68,101,189,198,179, 33, 33, 33, 57, 28,199,137, 72,
-146,236,178,118,237, 90,223,254,253,251,195,203,203, 11, 28,203,149, 19, 89, 12,195,194,106,181, 84,248,153, 91, 31,165,124,193,
- 15,123,166,249,244, 28,188,180, 23,195,178,167,236, 34,139,101, 24,128, 45, 57, 41, 63, 55, 3, 39,143, 31,196,134,245, 27, 10,
- 65,112,183,193,129,181,137, 65, 84, 32, 6, 91, 93,252, 53,177, 75,231,118,205,177, 96,243,102,233,173,107, 89, 7,166,126, 48,
- 43,114,248,168, 49,216,243,221,118,144,116,209,117, 71,145,197, 80, 44,138, 11,243, 6,254,196,251,104, 61, 45,248,158, 60,117,
-138, 24, 51,102, 12,171,213,106, 33,150, 72, 88,138,162, 4,255,254,247,191,153,247,223,127,159,204,206,206,134, 70,171, 19, 2,
-240,197,115, 96,214,210,104, 52,219, 39, 77,154,212,237,252,249,243, 98,146, 36,161,209,104,208,163, 71,143, 60, 53, 27, 42,155,
-248,206, 84,255,204,204, 12, 90, 41, 23,154,197, 98, 17,114,115,115,217,110,253, 71, 27, 71,141,127,191,206,251,179,227, 54,102,
- 93, 94,191,206,157,107, 56,206, 4,116,222,183,105,211, 38, 75,104,104,168, 73, 42,149, 74,198,141, 27,231,214,248,161,197, 98,
-225, 22, 47, 94,108,118,158, 93,104,177, 88,184,149, 43, 87, 90,194,194,194,204,114,185,156,163,168,170,253, 62, 73,146,160,223,
- 90,176,131,166,105,186,140, 21,203, 46,178, 40,150,208,125,245,213, 87,214,176,176, 48,139, 66,161,224,164, 82,169,216,157,116,
- 78,157, 58,149,243,241,241,177,122,120,120,136, 99, 99, 99, 31,107,214, 33,197, 64,184, 96,109,105,120, 7,169,151,151, 23,180,
- 90,109,105, 90, 67, 66, 66,120,177,197,131,135, 11,148,211, 34,207,166, 21,206,189, 56, 90, 44,160,203,201,205, 11,244, 15,170,
- 15,154,166,109, 11, 5,154,162, 48,237,237, 81, 88,190,254, 43, 0,176,139,173,168,233,211,167, 31, 0, 80,101, 99,182,107,215,
-174,249,211,167, 79, 87,230,228,228,156,216,186,117,171,239,232,209,163, 49, 99,198, 12, 44, 93,186, 20, 34,137, 12,190, 1,117,
- 75,175, 99,191,110,158,186, 0, 28, 56, 93, 5,118, 58,107, 73, 35, 5,161, 95, 64, 61, 80, 12, 5,150,162, 64, 81, 20, 8, 65,
- 73,214, 78, 30, 63,136,209,111, 76,133, 72,170,244, 89,179,114,137, 49,242,229,144,161,115, 38, 76, 48,187, 97, 4, 36,111, 93,
-203, 58, 48,245,253,216, 40,187,200,218,183,125,253,237, 47,103, 14,222, 41,149, 8, 75,175, 67,177, 44, 72, 82,192,251,104, 61,
- 37,145, 37,149, 74,247, 30, 59,118,236, 94,219,182,109, 9,189, 94, 15,138,162,144,151,151,135, 3, 7, 14, 36,112, 28, 7, 31,
- 31, 31, 28, 59,118,140, 29, 61,122,244, 94,179,217,252,218,179, 46,182,178,179,179,239,200,229,242, 93,179,102,205, 26, 53,115,
-230, 76, 17,203,178, 72, 74, 74, 2, 8,130, 19,137, 37, 32, 73, 18, 34,145, 16,197,197, 26, 86,225,169,202,178,114, 2,133, 72,
- 44, 1, 41, 16, 87, 54, 77,248,161, 45, 24, 41, 72,161, 88,107,159, 9, 40, 22,139,113,117,207, 50, 77,247,113,243,149, 0, 32,
-150,202, 11,251,244,233,147,214,188,121,115,253,111,191,253, 86, 15,229,103, 29, 58, 63,159,244,144,113,177, 2,133, 92,166,143,
-138,138,122,104,231, 76, 61,181, 70, 51,102,242,108,130, 16, 72,244,209,209,209,105,145,145,145,122,129, 64,128,196,131, 75, 52,
- 67,198,197,202,136, 74,130,172,158,184,199,189,117, 99,207,133,166, 95,124,241, 5,213,191,127,255, 71,118,127,177,212,212,212,
- 58, 3, 6, 12,144,174, 88,177,130, 26, 48, 96, 64,250,139,255,207,222,117,199, 53,113,254,225,231, 46,155,189, 71, 16, 68, 69,
- 81, 20,112,139, 11,197, 58,107, 29,173,226,194,189, 71,157,173,179, 14,220, 74,221,168,117,214, 90,220, 84,171,162,214, 81, 23,
- 42, 46, 16, 7, 67, 69, 1, 25, 97, 67,128,144,157,187,223, 31, 36, 52, 32, 35, 65, 91,107,127,121, 62,159,124,146,220,189,247,
-220,123,251,185,239,251, 29, 94, 94,197, 36, 73, 34, 50, 50,210,185, 58, 75,149, 6, 70, 70, 70,138, 9, 19, 38,188,123,254,252,
-121,109,163, 14,171,133,139,139, 11, 40,138, 66,183,110,221, 32,145, 72, 12,150, 45, 3, 12,248,111,162, 98, 30,173,170, 51,195,
- 43,148,138,111,167,204, 94,185, 19, 32, 76,181,238, 2,127, 25,150,104, 16,223,127,255,157, 9, 0, 35,141,216,154, 59,119,110,
-141,101, 78,180, 68, 86,155,128,128, 0, 44, 94,188, 24,155, 55,111, 86,253,248,227,143,140,248, 87,137,242,177,211, 87, 20, 84,
- 88, 15,104,208,197,148,130,250,182, 50,190,124,161,104,133,239, 87, 27, 86,166,101,150,220, 25, 59,109,105,217,221, 75, 5,160,
-144,224,171, 0, 96,207, 79, 63,137, 88, 92,115,147, 33,195, 71, 1, 64,207,157,219,130,206,172,193,129,154,197, 22, 77,120,124,
- 59,119,129,149, 70,100,237,218,186,246,185, 5,145, 25, 60,243,187, 24,133,246,122, 0,192,218, 12,103,124,191,218,208, 59, 43,
- 79,180,221,112,158,253,115,224,112, 56,171,175, 95,191,110,226,237,237, 77,228,230,230, 66,165, 42, 61, 34,114,185, 28, 66,161,
- 16, 69, 69, 69,144, 74,165,104,221,186, 53,185, 99,199, 14,147,153, 51,103,174,150,201,100,211, 63,247,237,126,251,246,237,174,
-115,231,206,225,214,173, 91,195, 22, 45, 90,196,114,116,116, 36, 44, 44, 50, 9,133, 92, 6,128,166,179,179,179, 41, 99, 83, 75,
-129,173,131,243,187,244,140, 44, 15,133, 92, 6, 74, 37,175,210,219, 92,157,222,225,251, 23, 47, 94,212,219,180,105,147, 76, 59,
- 18,112,248,130,157, 59, 90,183,110,109, 29, 28, 28, 44,235,215,175, 95,178,198,121, 93, 23,103,248, 43,111, 48,251,197,139,103,
-205, 42,114,250, 77,222,116, 80,195,169, 29,141,216,255,187,189, 7, 27, 53,106,100,237,233,233,153, 92, 29,111,131, 6, 13,196,
-124, 62, 95,214,164, 73,147, 98, 22,139, 85,106,201, 82, 40, 74, 26, 52,104, 64, 57, 56, 56,200,154, 54,109, 90,172,175,211,190,
-145,145, 17,173,177,138, 85, 6,125,162, 14, 89, 12, 40, 3, 2, 2,202, 50,195,127,223,168,145, 96,212,168, 81,252,121,243,230,
-225,224,193,131,184,123,247,238,123, 98,191,107,215,174,184,125,251,246, 74,252,135, 18,235, 26, 96,192,255, 25,170,207,163, 85,
- 17,135, 14,133,252, 9, 45,159,166,202,176,102,205, 26,174,218,146,213,115,206,156, 57, 16,139,197, 86,149, 52,235, 1,117,174,
-141,202, 68, 86, 80, 80,208, 49,154,166,157, 1,116, 86,169,168, 7,251, 15, 28,234, 86,213,250,134, 12, 25,242, 30, 39, 77,144,
- 12,146, 36,138, 57, 44,250,201, 79,251, 14, 30, 41,215,190,212,249,189, 49, 8, 60,221,185, 45, 72, 12,160,103, 69,177,133,191,
-202,140,148,113,106, 48,117,218,212, 50,145,181,115, 91,208, 85,207, 54,117,191, 89, 58,113,117,165,226,108,245,138, 41, 38, 36,
- 73,116,172,224,163,245, 30,231, 71,128,129,243, 47,116, 11, 8, 8,104,238,227,227, 67,106,139, 44,153, 76, 86,150,184, 83,227,
- 44,158,150,150,134,174, 93,187,146,205,155, 55,247,122,248,240, 97, 55,252, 85,206,233,115,221,118,213,219,183,111,119, 56, 58,
- 58, 94, 91,190,124,249,168,156,156,156,175,242,243, 11,108,194, 14,173, 70,159, 33,211,136,174,125, 71,136,100, 52,147,151, 42,
-200,108,114,243,226, 81,235, 75, 39,118, 65, 46,147, 77, 1, 16,135,191,210, 59, 84,228, 44,209,164,113,104,210,164,137, 72, 91,
-168,212,173, 91, 87,226,228,228, 36,245,244,244, 44,155, 94, 69, 52,223,123,219,174, 47,167,218,255, 75, 84,211,254,212,136,182,
-138,105, 35,140,141,141,161, 17, 95,250,244, 83, 59,218,178,210, 27,101,205, 81,135,101,156,234,244, 14,229,116, 90, 72, 72, 72,
-143,144,144,144, 54, 0,158,160,180,214,161, 2, 40, 29, 74,212,114,154, 15, 84,127, 12,215,187,129,243,255,149,243,115, 70, 87,
-252,229,155, 5,148,250,106,221,170, 82,104,213, 4,141,227, 59, 0,114,238,220,185,249, 98,177,216,106,212,168, 81,213, 46,147,
-145,145,113,240,240,225,195,229, 68,214,160, 65,131,198,133,134,134, 94,203,202,202,170,213, 86, 89,153, 27,173,185,117,126,161,
- 85,215,126, 27,230, 0,248,177, 10, 67, 30,229,217,134,255,205,206,109, 65,103, 42,136,173, 95, 1, 12,170, 74,149,246,250,114,
- 32,142, 30,218,169,241,237, 50,122,254, 56,237,210,176,168, 85,149, 70, 43, 90,154,114, 87,169,251, 49,207,224,163,245,207,128,
-205,102,251, 45, 90,180,136, 45, 18,137,222, 19, 89, 21,133, 86, 97, 97, 33,158, 62,125,138,177, 99,199,114,163,163,163,253,228,
-114,249,141,255,194, 62,200,200,200,136, 87, 39, 35,157,173, 73,225,192,229, 25,177, 71,140,159,227, 92, 22,117,120, 98, 23,164,
- 18, 49, 0, 48,117, 73,239,192,100, 50,217,209,209,209,174, 26,171,149, 92, 46,231,106,166, 63,126,252,216, 85,147, 91, 75, 34,
-145,232, 28,117,248,119,113, 62,123,246,204, 89, 19, 29,169,137, 46,100, 50,153,236,200,200, 72,103, 13,167, 84, 42,213, 41,234,
-144,195,225,176,163,163,163,157, 85, 42,213, 71,139, 58,212, 22,198, 40,173,179, 88,174,214,162,218,183,140, 32, 8,130, 54, 12,
- 27, 26, 96,192,103,143,138,145,146,213, 23,149,174, 9, 26,199,119, 61, 22, 97,186,184,184,244, 26, 62,124,120, 57,145,229,239,
-239,175, 58,125,250,244, 77, 62,159,159, 73,146,100,188,190,253, 40,243,209,194,123,111,144, 32, 73,242,105,231,182, 77, 65,146,
-228,211,165, 19, 39, 74,215,224, 64, 57,177,117,246,204,201,222,169,249, 49,149, 75, 51, 0, 54,246,117, 16, 48,238, 91, 4,140,
-251,214, 10, 64, 39,160,234,104,197,234,250, 97,192,223, 3,130, 32, 56, 78, 78, 78,207, 37, 18, 9, 8,130,128, 84, 42, 45, 19,
- 88, 69, 69, 69, 16, 10,133,101,255,229,114, 57,178,179,179, 81,183,110, 93, 16, 4,241,159,246,163,147,203,229,202, 69, 43, 55,
- 29,102, 48,217, 74,138,146, 19,114,185,124,188, 62,215,249,162, 69,139, 72, 84,226,123, 53,115,230,204, 74,167,127, 42,206, 37,
- 75,150, 84, 26, 37, 56,115,230,204,106,163, 7,171,194,119,223,125,247,209,162, 14,117,191,125, 25, 96,128, 1,255, 49, 84, 26,
-186, 87, 43,161, 69,146,228,211, 74,162, 11, 9, 0, 52, 73,146, 79, 43,201,114,160,124,247,238,221, 74, 75, 75,203, 41, 34,145,
-232,143, 65,131, 6,205,245,247,247, 87, 1,165, 14,242,181,221,162,124,161,104,133, 95,255,141,243, 10,138,165,193, 21,231, 85,
-180, 60,105,196,214,174,237, 65,187,207,132, 30,247,207, 72, 79,221, 93,213,182, 85, 37,168,170,138, 86, 20, 22,138, 87,250,245,
-223, 56, 39,191, 80,108,240,209,250,135,160, 82,169,174, 24, 25, 25, 17,154, 98,202,218,214,171,194,194, 66,148,148,148, 64, 93,
-146, 6, 0, 80, 92, 92, 12, 11, 11, 11,168, 84, 42,250, 63,182, 43,164, 0,230,171,173, 85, 0, 48, 63,241,230, 14,237,115,251,
-153,246,188,106,172, 89, 2, 93, 10, 68, 87,182, 92,117,243,254, 6,206,204,106, 10, 68, 87,135, 76, 61,249, 50, 1,128,205, 98,
-100, 85, 85, 60,154,205, 98,100, 85,227,183,175,231,123, 3, 65, 3, 88,105,184,178, 13, 48,224,243,125,255,255, 84, 43,238, 97,
-224, 52,112, 26, 56,255, 17, 78,174,250,163,235, 60,195,254, 52,112, 26, 56, 13,156,255, 54,206,202, 48,249, 51, 17, 90,116, 37,
- 31, 0,181,180,104, 25, 96,128, 1,255, 58, 72,107, 57,207, 0, 3, 12, 48,192,128, 15,199,123,197,164,181,103, 84,165, 74,245,
-137, 38,168,141,178,189,102,224, 52,112, 26, 56, 13,156, 6, 78, 3,167,129,243,255,142,179, 38,110,237,229, 39, 3,216,247,153,
-136,173, 79, 18,208, 98, 48,171, 26, 56, 13,156, 6, 78, 3,167,129,211,192,105,224,172, 45, 12, 67,135, 6, 24, 96,128, 1, 6,
- 24, 96,128, 1,255,231,208, 47, 97,169, 1,149,160,238,192,165,160,176, 68,189, 59,131,144,114, 54,240,191,182,137,254,254,254,
- 12,125,218, 39, 38, 90,146, 81,224,111, 54, 55, 97,247, 47, 22, 41, 54, 83, 81, 43,130,107, 58, 17,109, 27,180, 26,109,204, 51,
-158, 46,147,201,234,155,154,153,101,229,229,102,239,201,123,247,108,151, 86, 27,243, 7, 15, 30,240,125,124,124,210, 1, 20,105,
-189, 41, 24, 96,128, 1, 31, 19,150, 77, 93, 64, 16,227, 1,250,175,176, 75,138,142,129, 48,238, 80,185,118, 22, 30,227, 64, 18,
-205,180,166,136, 65, 99, 63, 10, 98, 83,106,120,224, 88, 38, 36, 36,184, 54,108,216, 48, 25, 64, 65,197,181, 87, 50,207,112,157,
- 27,240, 57,163, 43,202, 39, 44, 45,187, 22, 62, 92,104, 53, 26, 84, 31, 74,114, 12,104,140, 4,129,104, 36,134, 14,174, 21,143,
-219, 55,117, 64, 49,219, 1,104, 5,208,173, 76,140,120, 45,197, 50,121, 22, 69,211,163,241,230,228, 19,189,249,234,251, 79, 67,
-213,229, 44, 86, 34, 49,244, 39,189,248, 40,250,135, 71,183, 79,115, 45,141, 9, 52,108, 61,104, 1,202,103,112,174, 45, 56, 0,
-124, 73,146,108,102,108,108,204, 47, 41, 41,201,166, 40, 42, 5,165,227,211,249,181,228, 36, 1, 76, 48, 53, 49,233,227,106,198,
-105,245, 46, 71,152, 86,164, 80,133,163, 52,161,107,254,199, 58,163, 74, 69,150,227,190, 57, 35,124,198, 6,205,234, 1, 75,191,
-141, 11, 74,128,234,132, 22,225,220,184,227,217, 97,195,135,248,205,152, 60,214,180,142,157, 41, 4, 57, 34,155,159, 14,134,108,
- 10, 9, 57,218,111,226,176,158,125, 0, 96,245,234,213, 95,187,184,184,212, 99, 48, 24,137,203,150, 45,251,117,197,138, 21, 52,
- 81,117,165,114,190,250, 28,214,220,240, 77, 0,120, 2,104, 0,224, 45,128, 23, 40,159,101,188, 54,248, 44, 56,235,212,169,227,
- 68, 81,212, 68, 7, 7,135,175, 50, 51, 51, 47,144, 36,121, 32, 45, 45, 45,253, 83,222,117,104,154,222, 75, 16,196,100,154,166,
-247,233,241, 61, 69,159,117,240,120,188, 76,137, 68, 98,175,254,157, 37,145, 72, 28,254,174,237,249, 39,215,245, 15,189,127, 79,
-186,114,231, 69, 31,237, 73,189, 58, 55,171,228,142, 66, 52,187,114, 39,166, 75,249,118,158,170, 42,238,129, 4, 77,211, 88,185,
-114, 37,177,106,213,170,113,110,110,110,141, 72,146,124,185,124,249,242,114,169,111, 42,206,211,186,206, 13, 98,203,128,207, 21,
-250, 21,149,174, 17, 77,253, 77, 32,161,253, 1, 98,108,215,182, 45, 59, 79, 25,221,159,160, 25, 60,140,152,180, 80,169, 55,151,
-235, 88, 46, 24,226, 53,222,205, 26,207, 29,210,191, 7,217,198,179, 30,248,118, 22, 0,201,194,222,139, 73, 54,193, 65,203,118,
- 3,240,169, 69, 47, 87,188,137, 56,102, 47, 40, 80,129, 32, 0,130, 0, 72, 2, 40,150, 80,232,245,245,152, 21, 0,126,210,243,
-174, 68, 90, 26, 19,152,123, 76, 2, 0,140,143,112, 80,234,217,217,217,141,155, 61,123,182,137,167,167,167, 37,143,199,227, 72,
- 36, 18,135,132,132, 4,187,101,203,150,121,138,197,226,243, 0, 30,233,201, 89,183,161,179,211,201,224,185, 19,218, 53,111,224,
- 10,150,172, 24,148, 84,228,242, 42,225,117,135,169,187, 79, 77,138,201,147, 12, 71, 45, 74, 38,228,228,228, 16, 0, 96,107,107,
- 75,151, 23, 89,237,199,110,157,215, 11,115,183, 92, 65,137, 68,118,164, 58, 14,235,122, 45, 70,125,243,205, 64,191,181, 63,204,
- 52, 77,203,149, 35, 58, 81, 12,107, 83, 54, 86,204,159,198,145, 74, 21, 29,118,255, 26, 50,121,231,134,133,251, 85, 42,213, 23,
- 0,218,168, 84,170,199, 0,126, 93,185,114,101, 85, 55,223, 85, 0,150,168, 79,232,163, 12, 6,227,106,183,110,221,234, 79,156,
- 56,145,104,221,186, 53, 34, 35, 35, 27, 28, 59,118,172,199,133, 11, 23, 18, 85, 42,213, 51, 0, 47,161, 46,123,162, 3, 88, 0,
- 26, 51, 24, 12,239,127, 51, 39,159,207, 55,146,201,100, 99,156,157,157, 39,119,236,216,209,187,127,255,254, 68,227,198,141, 17,
- 31, 31,223,250,210,165, 75, 43,194,195,195,159,165,166,166,238,227,112, 56,135, 5, 2,129,248, 31,127,142, 19,196,100, 0, 78,
-106,157,188, 82,135,239,116,148,230,146, 18,232,186, 14,137, 68, 98,175, 41, 97, 67, 16,132,253,223,185, 61,122,174, 43,150, 32,
- 8,107,117, 91, 84,247, 77,146, 36,148, 74,165, 72,165, 82,185,213,192,217, 88,253, 34,165,179,214, 5, 80, 93, 34,104, 35, 0,
-232,213,169, 89, 30, 8,196,148, 89,180,222,127,201,140, 41, 19, 96, 52,154, 93,185, 27, 99, 93,206, 10, 86,241, 45,118,229, 74,
- 98,197,138, 21, 8, 12, 12,236, 15,192,151,162,168,112, 15, 15,143, 29,229, 40, 41,170,108,222,138, 21, 43,182, 87,115,157, 27,
- 96,192,231, 2, 63,232, 83, 84,186,202,247, 31,183,193, 93,160,194, 88, 87, 27,123,255, 89, 19,135, 26,121,122, 52,132, 4,166,
- 72,202, 81,225, 98,216, 37, 0, 56,161,159,213,105,104, 27, 38, 83,114, 56, 40,112,126, 19,223,118,158,120,158,166,192,227, 52,
- 21, 74, 18, 21, 96,144, 10,168, 40, 26,160, 33,169,237, 86,167,230, 43,113,231,165, 12, 36, 1, 48, 72,128, 36, 9, 48,200, 90,
-146, 81,178, 87,171, 15, 69,121,230,100, 82, 0, 37,123,245,129, 7,164,153,187,187,251,168, 85,171, 86, 89,102,100,100,152, 68,
- 70, 70,130,203,229,194,202,202,138,193,231,243,157,182,108,217, 34,158, 53,107,214, 87,114,185, 60, 9, 64,142,142,156, 30,125,
-219,120,223,219, 23,180,218, 66,241,224, 18, 10,142,255, 6, 6, 73,131,109, 98,138,250, 70, 70,184,244, 77, 67,107,255,176,196,
-211, 15, 51, 69, 30, 0,210,106, 34,139,139,139, 99, 72,165,210,225,230,230,230,237, 89, 44,150, 3,207,170, 30,149,206,108,147,
-155, 77, 52,120,155,101, 95,210,101, 94, 15,135, 62,155,231,116,195,220, 45, 87,176,237,216,253, 95, 90, 33, 99,121,117,121,179,
-141,141, 77,167,204,154, 62,209, 52, 53, 71,142, 53,167,115,112,232,118, 33,198,248,154, 97,238,151, 22, 8, 24, 49,204,228,212,
-111,161, 83, 0,236,215, 90, 36,222,195,195,131,136,139,139,171,236,230,107, 5, 96,161, 76, 38, 35,217,108, 54,193,227,241, 70,
-173, 93,187, 86, 62, 98,196,136, 84, 77, 3, 95, 95, 95,248,250,250, 18, 69, 69, 69, 13,110,220,184,209, 32, 36, 36, 68, 25, 17,
- 17, 17, 11,224,108,213, 22, 11,163,119, 18,137,216,133,103,100, 84,242,211,238,221,155,187,116,233, 66,113,185,127,165,159,170,
- 13, 39, 0, 88, 88, 88,236,183,183,183, 39, 22, 47, 94,156,254,177, 56,235,213,171,119,165, 93,187,118,221,122,245,234,197,236,
-212,169, 19,156,156,156,202,230,217,218,218,194,215,215,151, 72, 73, 73,105, 30, 30, 30,190,251,202,149, 43, 59,158, 60,121,114,
- 35, 41, 41,169,215, 63,108,209,218,167, 22, 19, 2, 61,219,127,246, 32, 8,194,116,239,222,189,246,154,154,140, 10,133, 2, 42,
-149,170,236, 91,243,161, 40, 10, 42,149, 10,107,215,174, 85,137, 68, 34, 93,246,145, 72,235,173, 89,243,161, 42,251,230,112, 56,
-182,154,132,189, 53,220,217, 99,248,220,130,166, 38, 38, 38,174, 0,250,194,174,209,194,242, 13, 74,223,159, 69, 34, 81,178, 64,
-106, 25, 3,160, 75, 53,108,150,171, 86,173, 26, 19, 24, 24, 56, 80,203, 74,235, 61,100,200,144,138,101,175,188,213,223, 34,130,
- 32,110,146, 36,121, 30,192, 33,124, 68,171,187, 1,255, 45,208, 52,221, 22,128,157,214, 36, 25, 74, 71,133,160,126, 78, 18, 0,
-108, 42, 76,215,110,167,249,206, 86, 79,183, 83, 47, 71,107,241,102, 19, 4,241,168,150, 93,188,133, 42,252,180,152, 0, 16, 22,
- 22, 70,247,235,215,143,208,124, 87, 46,138,252, 47, 78, 24, 49,160,207, 87,221, 59,130,228, 89,225, 85, 22, 16,241,142, 6,147,
- 84,128, 4,141, 7,119,111,208, 96, 82,135, 43, 44, 85,181,245,164,222,224,239,188, 61, 61, 54, 30, 8,154,205,136,205, 98,226,
- 80,120, 9,228,146, 98,100,103,188, 67, 86,122, 50, 4,169,111,145,246,238,237, 51,128, 88,161, 51,231,123, 7, 6, 80, 81,234,
-119, 64, 10,168, 38,242,178,102, 78,185, 40,174, 65, 99, 79,207,124,142, 10,144,139,226,116, 88,125, 85,156, 94,141, 26, 53, 26,
-241,195, 15, 63, 88,191,120,241,194,168,164,164, 68,122,233,210,165,248,164,164, 36,115, 62,159,159, 55,109,218,180, 70, 78, 78,
- 78,230,131, 6, 13,226, 28, 63,126,252,107,148, 15,107,173,138,211,115, 64,251,150, 17, 7,119,108, 53,201, 61, 21, 12, 89,194,
- 83, 92, 20,136,112, 55,179,132,110, 96,193, 37,190,109,110, 7, 83, 46, 19,171, 59, 57,153,246, 61,147,176, 81, 65, 81, 1,213,
-113,222,187,119,143,111,108,108,188,101,228,200,145,252,153, 51,103,114, 85, 76, 75,102,104, 68,174,197,194,221, 17, 78, 37, 82,
- 57, 99, 68,183,122,152, 55,210, 27,243,182, 93,215,136,172,201,245,235, 23, 80, 81, 81, 85,115, 42,228,242,250,206,246,230,136,
- 78, 18,227,208,237, 66,252,249,131, 19,186,175, 77,199,160, 86, 76,120,212, 53,133, 82,174,104, 60,100,200,144,195,234,183,246,
- 71, 0,190, 30, 50,100, 72, 19, 6,131,113, 29,192,239, 53, 29, 35, 30,175,242,234, 41, 86, 86, 86,232,218,181, 43, 60, 60, 60,
-152, 93,186,116,241,174, 32, 96,202,113,202,229, 50, 62, 69,209, 48, 51, 51, 51,178,177,177,177, 50, 51, 51,203,173,236, 65,165,
- 15, 39, 0, 88, 91, 91, 15,238,218,181, 43,243,216,177, 99, 57,137,137,137, 15, 70,140, 24,241,214,220,220,188,156,245,215,196,
-196, 4,141, 26, 53,194,178,101,203,152,125,250,244,169,145,211,193,193,161,103, 72, 72, 8, 8,130, 40,123,104,191,103, 44,118,
-117,133,163,163, 35,250,246,237,203, 28, 60,120,112,207,164,164,164, 90, 93, 71,122,224, 90, 37, 22,173,149, 21,142, 83,149,195,
-111,149,181,215,225,184,103,105,172, 75,106, 62,124,192,181, 89,237,112, 39,143,199, 43,179, 66, 85,178,174,247, 56, 73,146,196,
-210,165, 75, 65, 16, 4, 88, 44, 22,216,108,118,165,223,126,126,126,250,246, 51,133, 32, 8,146,205,102, 47,100, 50,153, 19,165,
- 82,169, 51,143,199, 75, 87,169, 84,191, 72,165,210,181, 0, 20, 52, 77, 91, 86, 33,178, 42,229, 52, 49, 49,113,125,245,234,149,
-123, 85, 29,145, 74,165,240,246,246, 6,164,136,173,142, 51, 33, 33,193,213,205,205,173, 49, 0, 77,137,182,219, 52, 77,119,209,
-250,175,141,219, 52, 77,127,169,254,253,242,205,155, 55,174, 13, 27, 54,204,255,167,206, 79, 3,231,191,143,179, 6, 45, 98, 71,
- 16, 68,152,113, 48, 25,151, 0, 0, 32, 0, 73, 68, 65, 84,214,181,218, 79,243,127,209,162, 69, 75,214,175, 95,255,130, 32,136,
- 48,237,233,218,237,180,191,213,247,155, 48,154,166,251, 45, 94,188,216,115,195,134, 13,235, 52,109,255, 14,145,168,143, 69,203,
- 60, 91, 98,130,240,119,230, 96, 50, 84, 96,146, 4,152, 12, 0, 52,129,228,164, 4, 20, 21, 22,220, 65,226,233, 68,221, 44, 89,
-254,157, 90,180,240, 10, 58,186,109, 1,249,115,120, 9, 10, 68, 18,196, 61,185,137, 71, 55,127,207, 80, 41, 85,191,131,160, 31,
- 3,100, 36,222, 82,241, 64,104,237,106, 92, 16, 52,179, 84,104,169,197, 85, 57,177,245,201,208,188, 73,147, 38,195,150, 45, 91,
-102, 27, 21, 21,197, 19, 10,133, 69, 71,143, 30, 77,151, 74,165, 73, 0, 46, 39, 39, 39, 55,217,190,125, 59, 39, 40, 40,200,203,
-203,203,139,127,242,228, 73, 89, 37,229,140,222,227,156, 63, 54, 32, 98,226,172, 57,188,216,147,187,192,137,141,196,210,167, 57,
-170, 63, 5, 37, 63, 0,216,134,148,226, 78,217, 18,229,213,173, 93, 93,200,122,102,108, 52,180,228,248,197,229, 73,170,181,100,
- 25, 27, 27,111, 9, 9, 9,113,109,219,182, 45, 9, 0,225, 47,149,220,133,187, 35,156, 46,175,239, 68,116,106,102,131,172, 2,
- 41,102,239,138,198,165,136,172, 63, 52, 34,171,166, 78,154,153,153,101,167,102, 21, 58,216,152,242, 48,186,179, 41,186,175, 77,
-135,127, 27, 46,184,108, 2,241,137, 25,104,232, 86,143,136,190,115,182,141, 90,100,181, 21, 8, 4, 0,208, 6, 64, 98, 74, 74,
- 10,223,199,199, 71,168, 69,151, 15, 96, 35,135,195, 89, 74, 16, 4,221,182,109,219,104, 47, 47,175, 98, 43, 43, 43,136,197, 98,
- 72,165, 82,176,217,108,136,197, 98, 36, 39, 39,227,193,131, 7,176,178,178,210,235, 64, 21, 23, 23,195,204,204, 12, 20, 69,125,
- 48,167, 74,165, 34,246,236,217, 99,242,226,197, 11,147,208,208, 80,135,185,115,231,230, 54,109,218,244,241,176, 97,195, 94,219,
-219,219, 75,159, 62,125,138,123,247,238, 33, 63, 63, 31,237,219,183,215,137, 83, 38,147,129,201,100, 66, 44, 22,131,203,229,130,
-201,100, 66,169, 84,130,162,168, 50,241, 85, 92, 92,140,188,188, 60,176,217,108,200,100,178, 79,241, 6,250,158,133,170,186,225,
-183,218, 88,180,180,133,154,142, 34,171, 38, 75, 84,149,195,157, 5, 5, 5, 70,150,150,150, 11, 1, 8,106, 90, 23, 65, 16, 96,
- 48, 24, 96,179,217, 32, 8, 2, 93,186,116,193,132, 9, 19,208,170, 85, 43, 36, 36, 36,224,248,241,227,120,244,232, 17, 88, 44,
- 86, 89,123,157,199, 39,252,252, 24, 60, 30,239,222,128, 1, 3, 60,127,248,225, 7, 94,189,122,245, 16, 27, 27, 91,119,195,134,
- 13, 11,175, 93,187, 54, 80, 36, 18,181,209,220,237,170,183,210,171,135, 4, 75,135, 11,251, 74,165, 82,196,198,198,234,179,204,
-123,104,216,176, 97, 50, 73,146,175, 41,138, 10, 7,224, 77,211,116, 23,130, 32, 46,161,212, 47, 81, 27, 34,154,166,191, 36, 8,
-162, 16,192, 51,146, 36, 95, 82, 20,149,108,176,219, 24,160,195,125,165, 95,197,255, 4, 65,132,173, 95,191,190, 95,101,226,170,
-146,107,179,220,244, 13, 27, 54,172,211,250,255, 33, 22,213,174, 40,239, 12,239,167,182,114,253, 37,180,194,194,194,170, 87, 32,
- 20, 6,133,157, 62,118,191,187, 28,174,158,173,125,181,172, 67, 52, 34, 31,220, 3, 64,255,162, 83, 87,248,253,140, 72, 6,243,
-151, 61,235,102,146,123,111,150, 32, 37, 61, 11,247, 46,254,130,108, 65,210, 33,128,158,139,196,208,194, 15, 62, 18,245, 6,121,
-217,219,216, 90, 74,228, 52, 40, 26,192,123, 98,235,147,160, 85,227,198,141, 7, 71, 68, 68,216, 74, 36, 18,222,157, 59,119, 74,
- 66, 66, 66, 50,228,114,249, 77, 0,119,213,109,162,178,179,179,135,168,133, 9,131,201,100,114,228,114,121,117,190, 11,173,230,
- 79, 28,115,103,227,158,131,188,215,207,163,177, 61,244, 34, 10, 74, 74, 84, 55,179,196, 95, 3,208, 40,250,235, 81, 57,226, 52,
- 26,180, 11,139, 36,192, 55, 97, 57,198,229, 73,120, 64,229, 67,178, 82,169,116,196,200,145, 35,249, 26,145, 5, 0, 57, 69, 10,
-102,137, 84,193,232,212,204, 6,173,187, 13, 65,228,141, 83, 56,121, 59, 13,110,118,198,183,235,155, 20,232,180, 71,179,179, 4,
-123,182, 6,239,221,186,113,229,124,206,188,190, 22,240,111,195, 2,143, 77,192,220,152,133,181, 59,246, 43,162, 30,220,126,202,
-231,243,195, 0,124, 45, 16, 8,192,231,243,139, 1,188,100, 48, 24,137, 42,149,170, 50,167,238,229, 0, 28, 14, 31, 62, 76, 42,
- 20,138,226,132,132, 4, 56, 58, 58,194,193,193, 1, 22, 22, 22,136,139,139,195,159,127,254,137,248,248,120, 80, 20,133, 22, 45,
- 90,232,117,176,114,115,115,241,244,233, 83,244,237,251,213,220,236,236, 44,115, 43,107, 27,209,157,240,219,155,106,195, 73, 81,
- 20, 1, 0,158,158,158,240,244,244,228,165,165,165, 57,135,133,133,217,175, 89,179,230,157,171,171,235, 81,177, 88, 92,206,114,
-160,171,208,210,136, 11,141, 8,228,241,120, 96,179,217, 40, 44, 44, 68,102,102, 38,138,138, 74,131, 54, 45, 45, 45, 63,137,208,
-170,194, 66,245,209,218,255,205,226,240,189,225, 78, 75, 75,203,145, 0, 22,234,184, 45, 80, 42,149, 96,179,217,240,241,241, 65,
-112,112, 48, 30, 61,122,132,223,127,255, 29,117,235,214,197,216,177, 99, 65,146, 36, 94,188,120,161,111, 23,169,136,136,136,133,
- 95,127,253,181,231,225,195,135,121,201,201,201,136,143,143,135,165,165, 37,130,131,131,185,147, 39, 79,110,120,227,198,141,229,
- 40, 13,126,169, 30, 90,209,133, 34, 35,254, 80,111,111,239,247,154, 56, 58, 58, 90, 92,190,124,217,190, 76,128, 85,140, 72,124,
- 31, 5,203,151, 47,223,234,225,225,177, 77, 61, 92,232, 11,192,132,166,105,191,208,208, 80, 2, 0,252,253,253,105,130, 32, 52,
- 15,164,103,167, 78,157,234, 22, 23, 23, 71, 7, 6, 6, 26,124,180, 12,168, 74,139, 76,214, 92,147, 85, 9, 40,125,132,154,182,
-197, 75,131,197,139, 23,123,174, 95,191,254,225, 7,138, 44,237, 55, 38, 90, 35,182,202, 30,166, 85, 14, 25,150,217,190, 72,190,
-163,189,141,245,162,177,157, 64, 81,128, 82, 5, 40, 85, 52, 68, 37, 98,196, 62,127, 84, 2, 30, 17,170, 83,119,184,156,160, 53,
- 63,204,105, 16,157, 74, 34, 61, 95,142, 91,103,247,210,217,130,164,193, 72, 60, 53,254,227,136,172,161,222,142, 14,246,183,142,
-237, 93, 77, 62,122, 43,131,138, 42,213, 89, 20, 69,151,253,254, 4,112,180,179,179, 11,184,127,255,190, 29,151,203,229,189,122,
-245,138, 58,117,234, 84,190, 92, 46,191,166, 37,178, 0,160, 83,155, 54,109,148,166,166,166, 16,137, 68,114,185, 92, 46,169, 70,
-100, 57,251,181,106,126,123,227,158,131, 60,137, 76, 6,161, 88, 10,134,141,125, 69,145, 5, 0, 29,187,185,215,169, 67,240,204,
- 64, 3, 72, 42,148,167, 87, 37,178, 0,128,203,229,246,152, 57,115,102,185,186,120,182,102, 44,165, 49,151,165,186, 27,147, 67,
- 69,222, 56,133,240, 23, 57, 20,143,205, 80,217,209,111, 27,232,186, 3, 10, 82, 99,246,252,126, 46,236,234,119,203,130,138, 75,
- 68, 69,112,115, 50, 66,113,145, 16,107,215,111, 84, 68, 68,132,223, 92, 56,119,106,135, 83,167, 78,109, 64,169, 51, 56, 0,188,
- 60,117,234,212,152,101,203,150,253,138,191,210, 60, 84, 68,122, 64, 64, 64,106,179,102,205,132, 30, 30, 30,194,220,220, 92,196,
-196,196, 32, 63, 63, 31,219,183,111, 71,108,108, 44, 52, 22, 65,157,124, 85,222, 23, 72,200,207,207, 51,165,105, 26,249,121,185,
- 38, 63,252,240,131, 69,109, 56, 85, 42, 85,185,107,171, 78,157, 58,152, 54,109, 26,187,164,164,196,242,221,187,119,230,218,243,
-116,229,148,201,100,208, 88,134,104,154,134, 76, 38,131, 80, 40,132, 76, 38,195,235,215,175,203, 68,150,122,253,159,204,162,165,
-249,205,227,241, 50, 53,231,178,102, 8,142,199,227,101, 85,213,254, 67,160,181, 46, 90,253, 91, 95,113, 88,227,246,232,120,220,
-193,102,179, 49, 97,194, 4, 60,124,248, 16, 9, 9, 9, 96, 48, 24, 16,137, 68, 40, 41, 41, 65,207,158, 61,193,225,112,244,181,
-104,209,108, 54,123,228,146, 37, 75,120,137,137,137,200,201,201,209, 56,211, 67,165, 82, 97,238,220,185, 70, 92, 46,119,164,190,
-166,123,129, 64,208,251,245,235,215,141, 43,126, 50, 50, 50,132,218, 62,133,181, 69,104,104, 40,225,239,239, 79,251,251,251,211,
- 26,193,101,128, 1,149,161, 10, 45,178,175, 42,139,214,199,176,138,105, 44, 91, 80, 7,136,212, 2, 26,145,213, 85, 75,120, 17,
- 26, 11,151,110, 67,135,110, 67, 91, 58,216, 88,223, 56,188,107,149,105,216,115, 2,169, 41, 73,200, 22, 36,163, 77, 7, 63,196,
- 62,143, 6,165, 80,157,198,235,208,154, 61, 57,235,249,187,123,120, 52,157,222,181,131, 23,130,194,138,241, 42,242, 50, 10,178,
- 5, 59,145,116,234,244, 71, 57, 66,174,254,205, 29,236,173,111,252,186,107,149,229,165, 24, 18, 41, 41, 73, 56,251,235, 86, 90,
- 33,151, 22,160,124, 36,151,222,111,205, 70,148,140, 83, 92,144, 9, 89,145, 10, 60,178,132,167,231, 32, 69, 6,128,240,173, 91,
-183,118,111,223,190, 61, 39, 32, 32, 32, 35, 63, 63,255, 44,128,251, 90,109,154,185,187,187,247, 13, 14, 14,118, 72, 73, 73,193,
-181,107,215, 50, 80, 26,250, 95, 21, 82,111, 71, 63,223,253,231,175,251,231, 27, 53,104,130,237, 75,190, 83,134, 62,138, 25, 0,
-224,146, 86, 27,143, 30,222,238, 97,107,190,159, 65, 82, 81,127,224,105,114, 38,222, 10,165,127, 86, 69,152,147,147, 67,148,148,
-148,184, 90, 90, 90,106,159,144,224,155,136,164, 11,134,186,167,247, 92,120,199, 73, 34, 87,129,203, 34,233,217, 3, 93,211, 31,
-158, 13,181,201,145,228, 16,154,104,196,154, 48,105, 88,143,129,187, 66,206,140, 14, 11,187, 48, 93, 46,149,120, 53,105,210,152,
-126, 28,113,227,233,194,185, 83,251,212,242,136,155, 62,124,248,144,100, 48, 24,229, 4,186,182,133, 72, 95, 75,145, 62,208,149,
-179,162,208,210, 64,169, 84, 18,181,229,148, 74,165,101, 66,171,226,195,189, 50,193,248,119,108,191, 62, 22, 42,237, 33, 67,141,
- 63,157, 68, 34,177, 87,251,108, 57,124, 76,139,214,135, 68, 34, 86, 55,124,169, 79,255, 72,146, 4, 69, 81, 96,179,217,104,209,
-162, 5,194,194,194, 96,109,109, 13,115,115,115,152,155,155,195,200,200, 8, 54, 54, 54,101, 66,139, 36,117,142,210,161,165, 82,
-105,221,186,117,235,226,245,235,215,224,241,120,101, 31, 46,151, 11, 79, 79, 79,136, 68,162, 58,248,148,182,123, 3, 12,248,123,
-239, 43, 97,218, 98,137, 32,136,176, 69,139, 22, 45,169, 45,223,162, 69,139,150, 84,102,225,250, 64,193, 85,206,186,197,212, 86,
-144,149, 42, 73,181,200, 58,180,115,165,249,153, 39, 64,106,106, 34,174,158,220, 81,164,144,203,242, 41, 74,225,250, 54, 62, 26,
- 32,241,139, 78, 93, 32,233,118, 3,251,118, 35,174,190,144,161,176, 32, 27, 47, 31, 95, 78,130,152,179,248,163,137, 44, 7,219,
- 27,135,119,173,180, 60,255,156, 64, 74, 74, 18, 46, 29,219, 94,168,144,203,123, 32, 49,244,241,135, 80,143,100,179, 7,178, 93,
-222,245,155,232,155, 14, 21,161,194,200,216,184, 47,179, 50, 48, 80,112,167,250,200, 48,109,100,103,103,159,221,186,117, 43,241,
-227,143, 63,118,149, 72, 36,191, 1,208, 54, 81,122,185,185,185, 13,223,183,111,159,117, 74, 74, 10,235,206,157, 59,162, 27, 55,
-110,208, 0,206,215, 96,113, 89,208,115,252, 52, 70,171,122,117,102, 70, 37,165, 13, 0,240,135,214,108,207,126,173,155,221, 61,
-184,126,185,153,226,110, 40,138, 5, 41, 88,124, 55,181, 16,128,206,251, 91,161, 80, 64, 40, 20, 66, 81,156,171,108,195, 23, 9,
- 3,135,216, 75, 51,243, 37, 76, 22, 85,162,244, 48,207,146,222,200,125,203, 48, 54, 54,214,107, 95,238, 90, 63, 63, 4, 64,200,
-144, 33, 67, 14, 63,139,184,208,134,207,231, 95,240,240,240, 32, 0,160,138, 8,195,170,176, 10,192,220,142, 29, 59, 18, 62, 62,
- 62, 15,182,109,219,118,165, 58,177, 82, 27,139, 86, 77,208,149,147,162, 40,178,138,253, 75,212,150, 83,219,162, 85,147,208,250,
-148, 22,173,202, 68,139,182, 72,212, 22, 66,255,134,168,195,234,196,148, 62,253,211,248,201,177,217,108, 68, 71, 71,195,197,197,
- 5,114,185, 28,102,102,102, 48, 51, 51,131,169,169, 41,138,138,138,192, 98,177,160,231, 54, 83, 60, 30,239, 93, 76, 76, 76, 99,
- 59, 59, 59,168, 84,170,114, 98,235,213,171, 87, 48, 49, 49, 73,211,215,162,197,231,243, 47,171,163, 14,203,193,209,209,209,226,
- 99,236, 87,109, 75,150,191,191,191, 97,136,208,128,106,173, 89, 85, 88,181,178, 43, 88,162,100, 90,255,179, 81,154,195,173,159,
-250, 55, 42,249, 45,171,100, 90,238,250,245,235,111,104,249,119,101,127,224, 38,104, 82, 60,148,139,112, 97,214,100,201,178,183,
-182,186,113, 96,123,160,249,201, 72, 32, 45, 37, 17,183, 78, 7, 11,149, 42,249, 23,160,104, 65,196,181,211,161, 32, 80,130,183,
-161,183,116,187, 69,160, 85,171,166,174,248,253,133, 2,217,169,175, 64,211,212, 33,100,133,148,124,240,209,113, 27,212,194,222,
-218,246,198,161,224, 64,139, 51,209, 4, 82, 83, 18,113,245,100,112,161, 82, 81,210, 29,137,167, 35,107, 75, 59, 1,176, 98,152,
-240,118, 15,246,107, 53,212,213,205, 25, 20,173, 0,197,166, 49,104,129, 45,243,101, 84,201,239,225, 60,225, 73,170,152,154,158,
-118, 95, 55, 7,186,226,226,226,223, 1, 60, 70,249,244, 10,205, 27, 53,106, 52,116,247,238,221,118,169,169,169,188,168,168, 40,
-241,222,189,123,179, 40,138, 58, 3, 64,151,161,212,239,162,146,210, 14,160,124,190,156,230,243,199, 7, 68, 4,140,155,200, 75,
-188, 22, 2,171,196, 88,124,127, 55, 93,245, 50, 95, 54, 66,109, 93,171, 20,182,182,182,116, 78, 78, 78,114, 65, 65, 65, 99, 19,
- 19, 19,228,230,230, 34, 47, 47, 15, 66,161, 16,210,194, 60,165,141,170, 64, 68, 40,243,192, 98,177,144,149,162,128, 74,165,202,
-208,213,154, 5,192,106,213,170, 85,147, 40,138,210,100, 68, 44, 23, 93,168,213, 78,115, 62, 52, 30, 50,100,200, 97,173,168, 67,
-109,103,120, 77,122, 7, 66,157,222,161,253, 31,127,252, 17,215,167, 79,159,212,202,196, 10,151,203,213,219, 81,186,170, 40,198,
-218,112, 86,101,209,170, 56, 93, 31, 78,205,240,165,198, 9,190,226,116, 13, 24, 12, 6, 40,138,130, 14, 65, 21,127,171,104,209,
-142, 14,172,141,200,169,112,108,170, 77, 28, 90,203, 72,196,143,106,209,210, 28, 11, 54,155,141,115,231,206, 97,220,184,113, 80,
-169, 84, 48, 54, 54,134,169,169, 41, 76, 76, 76,112,250,244,105,104,210, 63,232,163, 95, 21, 10,197,145,245,235,215, 47,217,179,
-103,143, 17, 77,211,224,112, 56,101, 66, 43, 48, 48, 80, 44,151,203,143,232, 36,180, 52, 25,223, 41, 58,198,196, 68, 89,109,212,
- 97,101,203, 84,225,175,101,185,106,213,170, 49, 20, 69, 13, 68,133, 20, 14, 21,218,149, 75,253, 96, 72,239, 96,128, 14,247,147,
- 71,255,226,238,105, 4, 22,161,101,201, 42, 19, 92,100,117,226,197,206,202,242,198,254,237,129,230, 71, 31, 17, 72,124,251, 22,
- 55,127,219, 81, 42,178,222,156,124,130,228,208, 76, 36,134,118,198,219,208,222, 58,191, 61, 17, 68, 43, 39,123, 75,228,137, 40,
- 20,230,188, 3,104, 68,125, 12,145,101,103,101,119,227,231,224, 64,139, 83, 79, 72, 36, 38, 38,226,234,201, 29, 66,165, 82,242,
-197,135,136,172,145,108,246,192, 70,238,206, 9, 75, 39, 13, 28,234,211,208, 17, 54,239,226,112,126,236, 80,172, 62,254, 13,204,
-236, 24,104,215,215, 12, 19,214, 58, 14,229,123,114, 95,243, 59, 99,160, 30,212,218, 34,171, 85,253,250,245,135,222,191,127,223,
-214,219,219,155, 23, 31, 31, 47,217,187,119,111,150, 88, 44,190, 2, 32, 90, 15, 78,109,145,213,106,209,228,177, 17, 27,247, 31,
-230,145,108, 14,130,142,156,199,172,219,169,170, 11,201,133, 67, 80,126, 88,177, 82, 72,165,210,107,193,193,193, 82,146, 36,145,
-151,151,135,156,156, 28,100,101,101,149,125, 23, 20, 20,128,193, 96,224,250,245,235,178,194,194,194,251,186,118,240,222,189,123,
-245,211,210,210, 60, 4, 2, 65, 27,245, 39, 30,165,209,133,166, 90,211,218, 8, 4,130,174, 0, 30,105,166,167,166,166,214,123,
-240,224, 1,191, 38,126, 51, 51, 51,176,217,236,114, 22, 45, 46,151, 11, 7, 7, 7, 40,149, 74,156, 56,113, 2, 0,242,170,227,
- 96,179, 57, 2,146, 36, 64,209,148,148,199,227, 81,124, 62,191, 82,129,165, 15,167, 26,169, 95,126,249,165, 36, 50, 50,178, 82,
-139, 86,109, 56,105,154, 46,233,213,171, 23,210,211,211,193,227,241,202, 30,214, 26, 65, 69,146, 36,184, 92, 46, 50, 50, 50, 48,
-101,202, 20,208, 52, 93,242, 79,223,121,180,125,154,212, 98,136, 0, 64,168,133,208,123,126, 90,186,250, 64,105,134, 6,105,154,
-134, 70,112, 85,152, 95,182, 46, 93,178,183, 87,240,233,154, 92, 80, 80,176,177,180, 59,244,222, 10,223,251,244,120, 40,148, 9,
-173,216,216, 88, 28, 62,124, 24, 5, 5, 5,224,112, 56,200,207,207,199,193,131, 7, 17, 19, 19, 3, 14,135, 3,205,190,208, 85,
-191,249,248,248,108, 12, 15, 15,143, 25, 49, 98,132, 56, 58, 58, 26, 98,177, 24,209,209,209,232,221,187,183,228,238,221,187, 9,
- 98,177,120, 21,116, 25, 58,212,100,124, 87,151,215,145, 74,165,136,138,138,170,244, 83,213, 50, 21,145,144,144,224,170, 82,169,
- 26,211, 52,237, 75,211,180, 57,212, 41, 28,212,255,181, 63, 95,170,231,153,211, 52,237,171, 82,169, 26, 37, 36, 36,184, 26,228,
-132, 1,159, 41,110,105,137, 45, 90, 75,100,221,170,222,162, 69,145,193, 7,118,172, 52, 63,242,144, 68, 74,114, 2, 30, 95,220,
- 45, 84, 81,138, 47,244, 44,135,211, 3, 90,185, 54,120, 70, 38, 94, 20, 81, 26,206, 92,152,147, 2,208,140,218, 8,173,114,156,
-160,200,224,131, 59, 2, 45,142, 61, 38,144,158,242, 6,119,207,238, 18, 42,149,210,238,120, 27, 26, 85, 27,206,145,108,246, 50,
- 22,131, 88,218,171, 83, 75,118,231,150,238, 48,201, 74, 66, 70,106, 58, 78,196,102,231, 37,228, 75, 39,222, 37,228, 72,126, 35,
- 61,208,119,146,181,181,149, 35, 11,253,166,218, 88,223, 63, 95,248, 59,193, 18,201,105, 57,189, 94,112,183,172, 44, 69,249,126,
-190, 15, 71, 51, 51,179, 17,143, 31, 63, 54,231,241,120, 70,143, 31, 63,166,246,238,221,155, 43, 22,139, 47, 2,136,208,105,219,
-223,135,115, 91,119,183, 91,235,118,237,231, 21,139, 74, 32,146,201,193,117,224,171,206, 68, 60, 31,140,170, 19, 96,150,227,228,
-114,185,199,142, 29, 59,214,183, 75,151, 46,174, 94, 94, 94,100, 94, 94, 30,138,139,139,203,156,171,237,236,236, 16, 27, 27, 75,
- 37, 38, 38,166,115,185,220,227,186,246,179, 99,199,142,137, 36, 73,198,171,135,209,226, 81, 33,186, 80,171,105, 99,129, 64,208,
-150,207,231,223, 2, 96,172, 21,117,168,205,169, 73,239,176, 4, 0, 73, 16,196,163,232,232,232,226, 62,125,250,192,200,200, 8,
- 34,145, 8,117,235,214,133, 82,169,196,197,139, 23, 17, 25, 25, 41,162, 40,234, 86, 37,226,181, 92, 63, 37, 18,113, 93, 0,164,
-184,164,164,197,152, 49, 99,186,206,155, 55,175, 92, 72,186,189,189, 61,172,173,173,245,226, 4,128,188,188,188,166,127,252,241,
-199,156,232,232,232,239,250,246,237,107,177,100,201, 18,110,253,250,245,161, 82,169,200,218,114,230,231,231, 91, 68, 69, 69,109,
-234,220,185,243,140, 62,125,250, 48,215,173, 91, 7, 11, 11, 11,168, 84, 42, 24, 25, 25,161,176,176, 16,171, 86,173,194,157, 59,
-119,148, 52, 77,239, 18, 10,133,223,235,121, 46,225, 67,175,205,170, 44, 64, 85,165,100,168,162,253,223,222,207, 10, 62, 93, 80,
-167,112, 88, 88, 69, 6,123,232,122,206,107,132, 22,131,193, 64, 82, 82, 18,246,238,221,251, 94, 30, 45, 77,250,135, 42,184, 43,
-219,118,250,230,205,155, 42,130, 32, 58, 60,126,252,120,225,232,209,163, 39,138, 68, 34,103, 19, 19,147,116,133, 66,241,139, 88,
- 44, 94,139, 82,127, 84,182, 62,247, 16,145, 72,148, 92, 89,212, 97,197, 54,128,101,181,156, 21,210, 59,148, 75,225, 80, 97,153,
-114,169, 31, 42, 73,239,240,183, 31,119, 3,231,191,146,243,115, 23, 91, 85, 39, 44,125, 15,173, 38,179, 88, 98,133,119,120, 2,
-241, 33, 34,235,125,107,137,164, 36, 97,249,177,119, 45,101, 82, 9, 68,194,204,151, 72, 58,145,245, 65,155,165,238,231,237, 4,
- 2, 73,137,111,240, 48,108, 87,105, 63,223,134,214,186,159, 4,176,248,167, 75,161,108,194,194, 26, 79,231,140, 67,122,129, 8,
-151,222,230,159,164, 75,164,211,143, 0,249,184, 3,144, 74,105,248,193, 31, 50,118,251, 14,178, 24,106, 91,135,133, 45,243,127,
- 1,111,145, 13,187, 93,247, 46,250,212, 64,204,224,241,120,225,219,183,111,239,225,235,235,203, 29, 50,100, 72,101, 14,242,250,
- 34,245,209,171, 55, 63, 93,216,179,121,190,141,119,123,236, 92,182, 64,117, 44,226,121,197, 40,196,106,225,225,225,161,186,119,
-239,222,188, 41, 83,166,108,233,209,163,135,211,128, 1, 3, 56,117,235,214, 5,151,203,197,155, 55,111, 16, 30, 30, 46,123,251,
-246,109,122, 73, 73,201,188,230,205,155,235,147,227, 44,127,249,242,229, 27,213,235, 32,212,195,133,109,160,142, 46,212, 52, 82,
- 39, 45,109, 3,192, 56, 48, 48,112, 52, 0, 84, 17,246,189, 28,192, 30, 0, 76,154,166, 51, 66, 66, 66, 58,156, 61,123,182,195,
-220,185,115,217,125,251,246,197,253,251,247,113,245,234, 85,185, 92, 46,143, 80, 11, 87, 93, 75,229, 80, 0,162,148, 74,229,243,
-160,160,160, 14, 12, 6, 99,185,102, 70, 76, 76, 12, 14, 29, 58, 84, 27, 78, 37,128, 77,153,153,153, 63,133,132,132, 44,191,118,
-237,218,248, 49, 99,198,152, 43, 20, 10,196,198,198,226,231,159,127,174, 21,167, 80, 40,156, 99,107,107,187,244,226,197,139,191,
- 92,185,114,229,235, 81,163, 70,145,179,102,205, 66,112,112, 48,126,251,237, 55, 74,165, 82,157,101,177, 88, 99,114,114,114, 68,
-159,226,174,163, 30,134, 75,215,179,214, 97,141,188, 31, 50, 52,168, 35, 4, 31, 74,160,217, 14, 63, 63,191, 50, 43,163,198, 10,
-167,221,134, 32, 8,189,135, 14, 1, 88,210, 52, 77, 1,216,133,210,250,162,218, 89,225, 25,248, 43,115,188,174,140,205, 4, 82,
-203, 24, 72, 17, 91,125, 81,105, 75,128, 70,179, 26,216, 10,150, 47, 95,190,117,197,138, 21, 91, 43,166,112,208,110, 84, 49,245,
-195,202,149, 43, 97, 72,239, 96,192,127, 21,149, 11,173,168,125, 10, 69,131,193, 75,182,175, 91,176, 66,169,144, 9,105,200,253,
-241,230,116,244,135,174,140,166,232, 69,215,143, 6, 6,131, 70, 62,173, 82, 46,252,224,222,255, 77,253, 36, 44,172, 81,180,106,
- 26,126,123,145, 78,103,136, 20,223, 28,145,203,203, 89,131, 74,125,178,168, 97, 55, 36,249, 39,172,156, 88,103,230,124, 97, 67,
- 92,200, 27,173,247,122,178,178,178,206,109,221,186,149,220,188,121,115,215,146,146,146,138, 14,242,181,197,130,254, 51, 23, 49,
-218, 53,114,157,249,240,117,242, 64,232, 48, 92, 88, 17, 29, 59,118, 20,196,197,197, 5, 92,185,114,101,196,237,219,183,123,136,
- 68, 34, 87,130, 32, 96,108,108,156, 44,149, 74,175,113,185,220, 99,122,138, 44, 0,192,138, 21, 43,232,149, 43, 87, 18,113,113,
-113, 52,131,193,248, 19, 64, 34,131,193, 72,210,118,130,215,158,174, 89, 38, 48, 48, 80,151, 7,226,237,226,226,226,200, 85,171,
- 86,117, 89,181,106, 85, 11,181, 85,232, 54,254,242,249,210, 23, 10, 0,183,217,108, 78, 58, 65, 16,206,108, 14, 87,116,239,222,
-189,107, 31,200, 89, 34,151,203, 23,166,164,164,108,217,178,101,203, 90, 19, 19,147,182, 49, 49, 49,127,126, 8,167, 90, 68, 13,
-182,182,182,118, 58,124,248,240,169,131, 7, 15,182,103, 50,153,247, 9,130, 24, 34, 20, 10, 63,105, 81,105,117,129,232,149,122,
-212, 58,212,137,247, 99, 39, 41,253, 59,132,155, 74,165, 42, 94,186,116,105, 86, 69,225, 85,209,122,165,249,175, 78,229,162,203,
- 62,213, 39,138,178, 6,225, 66, 20, 3, 64,105,237,194,210,178, 58,186, 22,149, 6, 32,174,233, 58, 39, 73,242, 44,128,151, 36,
- 73,190,174, 24,232,162, 61,111,229,202,149, 53, 93,231, 6, 24,240, 89, 67,135, 59, 91, 32, 9, 4,214,214,147,246, 31, 52, 87,
-126,156,126, 6,176,217, 43, 73, 96, 62, 0,130, 6,182, 28,145,203,127,168,110, 65,199,142, 88, 75, 19,152,171,222,153,235, 50,
-238, 98, 77, 45,182,189, 14,116,168, 63,168, 39,103, 19, 84, 95, 80,246, 61, 78,127,127,127, 70, 21, 15,243,114, 69,165,171, 66,
-104,104, 89, 22,255,170,250,169,125,190,153, 61,120,240,192,201,199,199, 71,128,242, 78,255,149, 77,167,245,220,118, 6, 0,213,
- 71,222,159,159, 5,167,155,155, 27,231,205,155, 55,178,127,215,181,105,224,252, 87,114, 90, 54,117, 1,129, 73,208,206, 29, 84,
-173, 69, 75, 75,160,209,244,207, 40,136, 77,169,162,159,154,235,220, 50, 33, 33,193,181, 97,195,134,201, 0, 10, 42,244,163,178,
-121,180,225, 24,253,223,115, 86,134,201, 40, 95,138,206,128, 74, 14,132,129,211,192,105,224, 52,112, 26, 56, 13,156, 6, 78, 3,
-103,109,133,214,103, 13, 18, 6, 24, 96,128, 1, 6, 24, 96,128, 1, 6,252, 45, 32,170, 81,165,250,152, 4,107,163,108,175, 25,
- 56, 13,156, 6, 78, 3,167,129,211,192,105,224,252,191,227,172,137, 91,123,249,207,117,232,240, 31,235,183,193,172,106,224, 52,
-112, 26, 56, 13,156, 6, 78, 3,167,129,243, 67, 4,203,103, 13, 38, 12, 48,192, 0, 3, 12, 48,192,128,207, 6, 61,220,193,103,
-170, 64,254,241, 70,167, 32,170, 26,209,199, 13,117, 0,224, 99,241,253,159,130, 15,224, 43,173,255, 23,160,142,140, 55, 8,173,
-207, 23,141, 0, 44, 1,160, 93,139,236, 33,128,245, 21,218, 29, 5,160, 93,144, 80,132,210, 58,129,175,245, 89, 25, 73,146,235,
-187,116,233, 50,253,206,157, 59,155,149, 74,229,170, 90,244,215,149,207,231,111, 36, 8,162, 53, 0, 22, 65, 16,111, 50, 51, 51,
-215, 43,149,202, 15,137, 90,105,224,232,232,184, 1, 64, 75,146, 36, 89, 4, 65, 36,100,102,102,174, 81, 42,149, 55, 63,128,211,
-204,193,193,161, 19, 77,211,142, 0, 24, 44, 22, 43, 55, 45, 45,237, 1,106,153, 91,201, 63, 48,150, 93, 40, 82,178, 0,192,220,
-132,169, 8, 13,108, 42,215,117,154,225, 20, 55,192,128,255,111,208,165,145,201,229,208,219, 13,107,105, 37,190, 87, 1, 68,175,
-250,216,113, 57, 17,223, 87,181, 60, 81, 73, 84,115, 69,206,222,110, 88,171,162, 75, 57,122,185, 97,211,229, 55,168, 54,210, 94,
- 23, 78, 13,246, 1,228,100, 29,170, 20, 16,186, 69, 95,255,219,241, 21,202, 15, 21,150, 13, 29, 86, 43,180,134,185,131,175, 98,
-130, 25, 26, 11, 77, 24,175, 25,128, 22,234,135,252,107,148,230, 42, 42,250,192,206,125, 46,156,255, 54, 44,167,105, 58,160,220,
-201, 90, 73, 30,162, 47,190,248, 98,192,149, 43, 87,140, 53,245,238, 40,138,130,145,145,145, 18,192, 88, 61,214,101, 63,108,216,
-176, 69, 7, 14, 28,192,208,161, 67,151,134,133,133,109, 5, 80,172,235,194, 86, 86, 86,254,150,150,150,193,251,247,239,183,107,
-223,190, 3,193,225,112,240,230, 77,130,243,148, 41, 83,188,226,226,226,206,102,101,101, 77,212,119,227,173,173,173, 71, 90, 90,
- 90,110,217,187,119,175,109,231,206,157, 65, 16, 4, 34, 35, 35,157,231,204,153,211,226,221,187,119,199, 51, 51, 51,103,232,203,
-105, 99, 99,227,110, 97, 97,209,109,231,206,157, 70,157, 58,117, 2,143,199, 67,116,116,180,233,212,169, 83, 29,211,210,210, 98,
- 51, 51, 51,111,233, 43,178,158, 69,158,255, 90, 41,151, 6, 1, 0,147,205, 93,208,126, 75,196,249,103, 55,206,247,175,105,154,
-127, 96,236,239, 6,177,101,128, 1, 6,104, 99,164, 19, 28,105, 26,243,175,252,188,140, 4,128, 94,227, 87,207, 26,233,132,205,
- 71,210,171,174, 97,171, 39,223,247, 99,234, 32,248,112, 26, 50, 63,164,159,251, 0,114, 14,147, 57,171,157,143,143,237,183,119,
-239, 38,200,129, 95,254, 79, 14, 81,165,195,156, 85, 10,173,193, 77,177, 74, 89,106, 49, 33,250, 52,196,241,171,137,140,240, 47,
-190,248,162,225,132, 9, 19,136, 86,173, 90, 33, 50, 50,210,253,248,241,227, 95, 93,184,112, 33, 65,165, 82, 69, 2,120, 1,221,
-179, 90,179, 0,120, 50, 24,140,214,255,114,206,127, 51, 76,212,226, 42, 19,127, 37, 58,125, 47,225,233,245,235,215,207, 49,153,
- 76,141, 69,171,157, 72, 36,114,168, 96, 5,211, 5,245, 20, 10, 5,226,227,227, 65,146, 36, 11, 64,125,188, 95, 82,163, 42, 56,
- 27, 27, 27,239,142,120, 24,105, 67, 48,141,144, 47, 1, 32,145,131, 99,234,128, 3,135, 66,172,231,205,158, 49,248,230,205,155,
-225, 69, 69, 69,191,234,209,159,250, 38, 38, 38, 91,159, 62,125,106, 99,108,108, 12,138,162, 80, 84, 84, 4, 71, 71, 71,236,223,
-191,223,114,222,188,121, 1,133,133,133, 55, 37, 18,201,111,250,136,115, 11, 11,139,110,207,159, 63, 55,210, 20,148,150,201,100,
-112,118,118,198,209,163, 71,185,179,102,205,106, 90, 80, 80,144, 42,147,201,222,234, 74, 88, 40, 82,178,148,114,105,208,225, 93,
-129, 46, 0, 48,102, 70, 96, 16,167,200,252,162, 46,211, 10, 69,202, 11, 0, 12, 66,203,128,127, 26,173,109,109,109, 67,115,114,
-114,110, 1,152,136,143, 99,105,112,231,241,120,205, 41,138,114, 36, 73, 18, 12, 6, 35, 67, 36, 18, 61, 5,240,170,182,132, 54,
-110,126,253,193, 53, 30, 7,154,106, 65, 2, 32, 72, 50, 90, 37, 47, 57,148,251,234,230,249, 15,226,228, 24,141, 7,232, 22, 36,
- 64, 17, 36,249,148, 82,150,236,207,137,191,121,233,223,114,112,238, 11,209,216,205, 81,247,194,152, 31,131,111,120, 3,240, 73,
- 10,228,209, 36,221,135, 21,103, 2,125,103,207,158,237, 56, 99,250,116, 98,220,216,177,141,110,221,185, 67,116,213,167, 90,193,
-231,137, 42, 29,223, 43, 21, 90,254, 77, 97, 69, 3, 11,143, 7, 47, 33,153, 12, 6, 49, 98,246,250,128,131,187, 54,145, 61,251,
- 15, 41, 27, 62,241,245,245,133,175,175, 47, 17, 20, 20,212,232,207, 63,255,108,116,244,232, 81,101, 68, 68,196, 83, 0, 39,170,
- 90, 89,111, 55,136, 41,128,199,102, 49, 69, 35,150,253,186,215,199,199, 7, 92, 46, 23, 31,194, 9, 0, 61, 27,146,111, 89,214,
- 13,158,142,152,185, 60,185,125,251,142,244,199,224,252,140,240, 16, 40, 43,106,109,229,226,226,210, 73,169, 84,242, 0,128,201,
-100, 74, 82, 82, 82,102,162,180, 54, 32, 0,156,165, 40,106,128, 30,220, 36,128, 21, 3, 6, 12, 88,250,237,183,223,162,110,221,
-186,152, 53,107, 22, 20, 10, 69,228,165, 75,151,150, 3,216,128, 26, 46, 30,123,123,251,229,187,119,239,182,102,114, 76,208,106,
- 97, 34, 4, 5, 74, 0,128, 41, 23, 56, 55,141,198,172, 89,179,204, 31, 63,126,188, 70, 31,161,101,111,111,191,106,255,254,253,
-214,198,198,198,160,105,186,172, 22, 99,113,113, 49,138,139,139, 49, 99,198, 12,243,216,216,216,141,250, 8, 45, 7, 7,135, 78,
- 59,119,238, 52,226,241,120, 40, 46, 46,102,203,229,114,162,168,168, 8, 37, 37, 37,180, 76, 38,147,207,156, 57,147,251,226,197,
- 11, 63,129, 64,240, 22, 6,252, 91,192, 0,240, 13,139,197, 26,212,176, 97,195, 54,175, 95,191,126,162, 84, 42, 79, 3, 56,253,
- 17, 94,166,186, 59, 57, 57,173, 77, 79, 79,223, 9, 32,228,255,101,135, 58, 56, 56,156,190,119,239,158,203,238,221,187,199,110,
-222,188,249, 34,128,223, 62,128,142,205,102,179, 7,119,237,218,213,101,204,152, 49, 28, 7, 7, 7, 72,165, 82, 36, 38, 38,154,
-159, 60,121,210, 53, 58, 58, 58, 85, 93, 17, 67,231, 23, 10, 27,247,142,166, 96,154, 31,239,208,177, 83,231,161,131,191, 49,115,
-176,177,128, 88,166,194,235,100, 65,221, 63, 46,158,235, 26,199, 54,186, 39,151, 11,135,231,190,186, 87,172, 47,103,183,110,221,
- 59,247,232,222,221,204,194,210, 2, 66,145, 28,111,146,210, 92,111, 92, 61,239,203,100, 26,221,166, 8,197,168,172,231, 87, 75,
- 62,229,177,153, 5, 48, 69, 60,155,230, 45, 58,182,122,220,107,194,154, 54, 52, 77,131,164,177,163,162, 53,107, 22,192,220, 81,
- 90,246, 75, 47, 62,208, 52, 77, 16,216,164,109,205,234,237,134,181, 52,141,239, 65,130,232, 93,195, 48,165, 6,189, 0,174,165,
-181,181,207,212,201,147,137,162,194, 66, 68, 71, 71,151, 84, 20, 89, 91,235,128,125,155, 68,189,179, 41,181, 23,219,255, 82,107,
- 86,165, 67,135, 58,231,209, 50, 54, 54,174,116,186,133,133, 5,186,117,235,134,245,235,215, 51, 1,180,174, 48,187,124,145, 85,
-128, 27,182,103, 49, 44, 76,184,100,221,186,117,205,204,205,205, 63,152, 19, 0, 64, 83,245, 59,214,165,191,124,244,235,146,177,
-215,142,110,241, 20, 21, 21,176, 42, 54, 49, 53, 53, 69,227,198,141,177,116,233, 82,221, 56, 63, 28,255, 40,167,163,163, 99, 19,
- 95, 95,223,214,215,111,221,178, 76, 79, 79,231,166,167,167,115,175, 92,191,110,217,161, 67,135,214,142,142,142, 77,202,118, 21,
- 77,235,211,207,213,187,118,237, 90,126,246,236, 89,210,215,215, 23, 86, 86, 86,232,214,173, 27, 46, 94,188,200,220,188,121,243,
- 58, 0, 75,107,234, 39, 73,146,157,125,125,125, 9,208, 52, 50,132, 74, 60, 88,223, 4,209,155, 60, 80, 36,161,145, 39, 44,132,
- 88, 44,129,177,177, 49, 15,165,195,189,186,110,123,199, 14, 29, 58, 16, 0,202,196, 85, 81, 81,233,167,184, 88, 4,153, 76, 14,
- 46,151,107, 6,128,167, 43, 39, 77,211,142,157, 58,117, 2, 0,200,229,242,178, 55,188,130,130, 2, 66, 40, 20, 66, 38,147,129,
-197, 98,177, 81,179, 95, 99, 25,167,185, 9, 83,193,100,115, 23,140,153, 17,152, 50,102, 70, 96, 10,147,205, 93, 32, 51, 43, 84,
-233, 50,205,220,132,169,248,196,231,167, 29, 73,146, 63,187,185,185,197,146, 36,121, 24,128,227, 7,114,182, 5,176,206,200,200,
-232,154,135,135, 71,138,177,177,241,117,181, 80,239, 80, 75, 78,142,177,177,241,245,117,235,214,157,122,242,228,201,208, 63,255,
-252,179,254,179,103,207, 6, 7, 5, 5, 29, 55, 53, 53, 13, 71,121,191, 68,189,175,205,250,245,235, 31,124,240,224, 65,219,142,
- 29, 59, 30, 0,192,253, 72,215, 59, 3, 64, 75,232, 84,145,227,147, 28,119,167, 86,173, 90,185,240,120, 60,244,232,209, 3, 0,
-252, 62,132,147,205,102, 15, 94,186,116,169,219,178,101,203, 56, 2,129, 0,215,175, 95,199,195,135, 15,161, 84, 42, 49,109,218,
- 52,238,152, 49, 99, 26,152,153,153, 13,214,171,159, 76,243,227,179,231,204,237, 51,127,214, 36,179,167,239,228, 56,116,237, 29,
-126,143, 16, 32,171,132,131,254,131,199, 88,244, 30, 56,172, 55,135,107,113, 92, 95,206, 69, 11, 23,246,153, 60, 62,192, 44, 70,
- 64,225,220,253, 12,220,143, 23, 66,201,178, 68,223,193, 19,173, 90,116,234,243, 21, 19,172, 95, 62,245, 49,218, 15,180,159, 61,
-123,182,221,130, 77, 71,238, 58,181,253,102, 71,118, 62,124,181,133,143, 59, 96,105,109, 98,242, 77,124,215,174,147,140, 74,235,
-197, 86,203, 89,142,175,245,192,224,172,124,116,209,246,207,234, 98,141, 70,234, 97, 69,198,149,159,151,145, 52,129, 89, 35,157,
-202,221, 7, 42,237,231, 77, 96,232,236,185,115, 89, 22, 86, 86,216,181,107, 23,164, 34, 81, 57,159,217,238, 46,232,115,205,152,
-153,218,192,195, 57,182,155, 43, 17,254, 31,124, 95,153, 92,165, 69, 43, 44, 44,140,238,215,175, 31, 1, 0,161,177,200, 31,220,
- 20, 27,135,125,187,110, 41, 65, 18,116, 61,207,142, 49,117,220,154,137,108,108,108, 80, 82, 82, 2,169, 84, 10, 54,155, 13,137,
- 68,130,119,239,222,225,254,253,251,176,178,178,210,171, 39,133,133,133, 48, 53, 53,133,169,169,233, 71,225, 92, 60,182, 7,247,
- 77, 74, 54,247,242,253,155, 93,183, 79,255,173,189, 91, 75,191,103,221,135,205,122,110,110,231, 36,121,246,236, 25,238,221,187,
-135,252,252,124,248,248,248,252, 87, 14,230, 67,181, 79,214, 67, 0, 86, 13, 27, 54,116,190,124,237,182, 85,177,132, 50, 79,202,
- 84,176, 40,138,130,177, 49, 95,121, 34,244,156,112,232,224,254, 68, 70, 70, 70, 22,128,135,106,113, 91, 83, 77, 69, 30,128, 38,
-254,254,254,139,166, 79,159,142,132,132, 4, 76,154, 52, 73,252,240,225,195,220,142, 29, 59,218,236,223,191,223,104,222,188,121,
-184,117,235,214,138,176,176,176, 51, 0, 18, 1, 84, 90,171,141,166,105, 54,155,205,134, 82, 45, 27,228, 42,170, 76,223, 23, 22,
- 22,130, 22,231,131,205,102, 51, 0,216, 65, 71, 63, 58,138,162,216, 44, 22,171, 76,100,189,203, 44,196,187,172, 18, 20, 22,203,
- 32, 22, 43, 33, 19,211, 96, 24,219, 48,129, 36, 7, 0, 73, 80,170, 87, 0, 0, 0, 32, 0, 73, 68, 65, 84,186, 90, 71,120, 60,
- 30,148, 74, 37,138,138, 74,187,161,177,148,201,100, 50, 8,133, 66, 48, 24, 12, 83, 0,230, 0,242,116, 33, 84, 59,185,255,174,
- 30, 6,196,163, 35, 3,108, 95, 95, 88, 92,110,154,185, 9, 83, 17, 58,175, 41,195,198,185,197,157,150, 67,127,241, 40,155,246,
-105,253,179,184,118,118,118, 55, 78,157, 58,213,180, 81,163, 70, 72, 76, 76,244, 24, 50,100,136,143, 64, 32,104, 9,253,107, 50,
- 26,147, 36,185,113,204,152, 49,211, 71,140, 24, 65,184,187,187,131,201,100, 66,169, 84, 58, 39, 36, 36,116, 59,121,242,228,194,
-131, 7, 15,238, 87,169, 84,223, 65,119,191, 63,146,195,225,156,216,187,119,111, 23, 31, 31, 31, 28, 62,124, 24, 15, 31, 62,164,
-218,182,109, 75,142, 30, 61, 26,174,174,174, 62,163, 71,143,254, 93, 42,149,246,173,165,101,203,181, 67,135, 14, 46, 12, 6, 3,
- 29, 59,118,100,223,187,119,175, 21,128,123, 31,184, 79, 77,157,157,157,111,249,249,249,181,188,118,237, 90, 84, 70, 70,134,159,
- 30,219, 11, 0, 3,157,156,156,130, 44, 44, 44,172,244,184,199,150,164,165,165,125, 15, 32, 84,199, 69,218,183,110,221, 26,201,
-201,201,104,210,164, 9,216,108,118, 7,185, 92, 62, 5, 64, 31, 0, 63, 0,136,213,163,191,238,221,187,119,119,241,243,243, 35,
- 66, 67, 67,203,252, 67, 73,146,132, 82,169, 4,155,205, 70,251,246,237,201,200,200,200, 58,143, 30, 61,114,135, 14,195,136, 54,
-110,126,253, 59,118,238,218,185,139, 79,115,114,115,232,107,168, 40, 21, 24,132, 18, 76,130, 2,165,224,130,203,102,192,221,179,
- 13, 35,254,197, 83, 31,153, 84,222, 63,247,213,181,243,186,112,246,233,213,211,183,105, 19,119,114,251,239,111, 80,144, 22,171,
- 74,139,187,157, 67, 50, 72, 52,109,253,133,173,123,179,150,140,150, 62,126,172,244,196, 23,221, 36,146, 46, 61,242, 19,110, 95,
-251, 20, 23,228, 74,128,225, 92,199,246,155,126, 61,253,216,130,244,116,209,201,208,243,207, 75, 20,184, 15, 0,183, 0,162, 47,
-208,220,187, 93,187,174,251, 55,108,176,225,243,249,172, 81, 35, 70, 40,247, 69, 69, 69,161,138,161,223,149, 0,195,214,209,177,
-199,212,169, 83, 25,130,244,116,250,228,233, 11,207, 52,124, 40,125, 75,241,110,238,236,209, 15,162,120,189,134, 41,251, 3, 28,
- 7, 71,199,166, 83,166, 76, 65, 70,122, 58, 14,135,132, 20, 75,128, 8,141, 21,235, 28, 3, 59,155,185, 57,142, 91, 48,113, 0,
-225,194,183,197,212, 21,251, 58,116,147,103,185, 65,240,215,241,215,214, 34,159,177,200,154, 92,169,208,170,136,223, 98,177,220,
-140,141,250, 39, 79, 30, 35,179,139,228,162,132,132, 4,216,218,218,130,207,231,195,194,194, 2, 49, 49, 49,184,126,253, 58, 94,
-190,124, 9,138,162,208,162, 69, 11,189,122,147,147,147,131,167, 79,159,194,202,202,234,163,113,186,185,216,225, 91, 23, 59,118,
-102,110, 33,251,218,195,151, 62,251, 22, 15,110, 70,122, 12, 62,168, 93, 36, 86, 38,147,225, 63,130,178,232, 66, 23, 23,151, 78,
-135, 14, 29, 98, 75,149, 48,115,159, 18,241,163, 72,162, 50, 1, 0, 19, 30, 67, 20, 25,212,248,187,213,171, 87,139,198,143, 31,
-239,145,146,146,178, 94, 7, 91,255,218,238,221,187,207,167,105,154, 53,123,246,108, 0,192,152, 49, 99, 10,239,223,191,239, 14,
- 32,235,250,245,235, 78, 19, 38, 76,120,117,227,198, 13,227,185,115,231, 50,148, 74,101, 12,147,201,164,195,194,194, 86, 1, 8,
-124,239,137, 72,146,143,163,162,162,234, 57,185, 54,134,171, 13, 9,223,165, 47, 75,111,112,198, 20, 82,147,222, 32,238,217, 67,
- 56, 58, 58, 90,240,249,252,216,212,212, 84,121, 90, 90,218, 66,145, 72,180,187,134, 62, 70, 71, 70, 70,242, 93, 93, 93, 81, 92,
- 92,140,212,236, 18,204, 58,109,140, 66,113,169, 17,131, 5, 49, 90,186, 52, 54, 51, 34,101, 15,179,178,178,228, 50,153,108,153,
- 80, 40, 60, 84, 29, 39,139,197,202,125,246,236,153,105,221,186,117, 33,145, 72,232,188,188, 60, 66, 36, 18,161,168,168,136,184,
-112,225,194,215, 2,129,160,109,253,250,245, 9,103,103,231, 85, 2,129, 64,156,150,150, 54, 73,151,161, 73,181, 96, 82, 49,153,
-204,205,147, 39, 79, 30,122,230,204,153,199,161,129, 77, 7,106, 13,151, 88,120,122,122, 94,110,222,188,153, 83,200, 38,239, 29,
- 0,126,252, 23,156, 91,227,150, 44, 89,210,212,218,218, 26, 83,167, 78,197,202,149, 43,177,124,249,242, 70, 83,167, 78,157, 12,
- 96,171, 30, 60, 70,142,142,142,143,182,111,223,238,209,169, 83, 39, 92,188,120, 17,199,142, 29,195,219,183,111,149,245,235,215,
-103,250,248,248, 96,197,138, 21,232,221,187,247,164,153, 51,103,118, 77, 79, 79,111,165,163,248, 24,191, 98,197,138,129,157, 59,
-119,198,216,177, 99,165, 55,111,222, 28, 10,224,202,213,171, 87,191,184,117,235, 86,232,145, 35, 71,140,214,173, 91,215, 99,222,
-188,121, 83, 1, 4,215, 98,251,191,238,210,165,180,134,114,231,206,157, 17, 20, 20,212,251, 3,133, 22,199,198,198,230,194,225,
-195,135, 91, 54,110,220, 24,163, 70,141,106, 53,116,232,208, 11,249,249,249, 61, 1,232,116, 67,170, 83,167,206,198,179,103,207,
- 54,172,106,100,161, 50, 72,165, 82,235,111,190,249,102, 67, 82, 82,146, 94, 66,235,232,209,163,248,254,251,239,209,162, 69,139,
-230,237,219,183,223, 51,101,202, 20,248,251,251,119,143,137,137,113, 64,105,212,114,141,224,241,120,205,135, 15, 31,206,121,240,
-224, 1, 0,192,211,211, 19, 45, 91,182, 68,114,114, 50, 30, 63,126, 12,169, 84, 10, 7, 7, 7, 12, 26, 52,136,151,148,148,212,
- 60, 39, 39,167, 70,161, 69,114,141,199, 13,236,215,215,236,220,125, 1, 84,148, 18,109, 26,154,195,199,195, 30,241,169,133,136,
-140, 77,133, 74,198,134,185,181, 13, 58,116,237,101,157,145,246,118, 92, 46, 80,179,191, 22,215,120,220,160,129, 95,153,158,139,
- 72, 71, 65,122, 28,253,250,225,153,235, 10,137,104, 18, 0, 60,254,243,248, 30, 71, 27,163,158,238,173,219, 48,252,122, 14,176,
- 58,125, 44, 99, 92,254, 63, 83,219,239, 61,220,114,193, 94, 87, 86,206,152, 5, 1,190, 52,203,202,249,161,153, 66,177, 83, 51,
-175, 55,208,107,225,146, 37,237, 39, 78,158,204,163, 40, 10, 71,126,253,181,240,105, 84, 84,252,100,128,154, 82, 5,223, 78,192,
-117,232,192,129, 92, 51,115,115,204,153, 53, 11,102, 10,197,141,178, 93, 2,116,159, 51,127,126,167, 25, 51,102, 24,237, 89, 53,
-253,113,239, 9,107, 90, 83, 52, 77,104,134, 41,143, 86,111,138,107, 59, 97,224, 64,152,153,155, 99,246,236,217, 32,228,242,203,
-101, 2,138,137, 27,227,191,246,245, 9,232,223, 25, 4, 8, 28, 11,187,131,215,201,217,207,110, 8,240,230,115, 85, 85, 21, 80,
-165,143, 86,181, 67,135, 69,114,100,118,255,106,176,192,221,221,189,168, 81,163, 70, 69,185,185,185,120,254,252, 57,242,243,243,
- 17, 28, 28,140,184,184, 56, 80, 20, 85,107, 1, 67, 81, 20, 62, 54, 39, 0, 56,216,152, 99, 84,223,118, 76,169, 68,196,203,206,
-206, 46, 55,124,244, 31, 18, 90,101, 80, 42,149,188,250,245,235,131, 4, 8, 97,137,194, 52,227,104, 23, 34,227,104, 23, 66, 88,
-162, 48,149,201,100,164,169,169, 41,164, 82, 41, 79, 7, 42,214,151, 95,126, 57,255,204,153, 51,172,181,107,215,194,203,203, 11,
-114,185, 28,247,239,223, 79, 5,144,165,110,147,126,251,246,237,116,141, 16, 94,191,126, 61, 78,159, 62, 77,244,232,209, 99, 97,
-101,231,147, 64, 32,216, 56,101,202,148,188,146,162, 60,236, 29, 38, 70,232,168,108,252, 60,240, 45, 70,216,156, 66, 94,230, 59,
-236,219,183, 15, 87,175, 94, 35,174, 92,185,202,190,121,243,166,201, 87, 95,125,181,163, 78,157, 58, 97,213,117, 50, 61, 61,125,
-237,140, 25, 51, 10,138,138,138, 80, 84, 84, 4,177, 88,130, 60, 17,240,108, 75, 83, 60,219,210, 20, 18,202, 8,187,118,238, 38,
-159, 61,123,102,251,246,237, 91,167,254,253,251,111,225,243,249, 7,171,227, 76, 75, 75,123,240,237,183,223, 74, 10, 11, 11, 33,
-147,201,228, 42,149, 74, 38, 22,139, 21,199,143, 31,159,107, 99, 99,211,225,226,197,139,172,171, 87,175, 49,111,222,188,197,190,
-126,253,186, 69,183,110,221, 78, 56, 56, 56,252,162,139,165,140,193, 96,108, 11, 9, 9, 25,183,107,215, 46, 7, 31, 31,159,102,
- 21,134,162,248, 61,123,246,172,247,235,175,191,214, 9, 10, 10, 90,136,210, 0,148, 79, 10, 91, 91,219,153, 3, 7, 14,196,174,
- 93,187,112,254,252,249,121, 59,118,236,192,151, 95,126, 9, 39, 39,167,111,161,251,176, 23, 0,252,184,117,235, 86, 15, 15, 15,
- 15,140, 25, 51, 70, 54,105,210,164,239, 14, 29, 58, 84, 63, 60, 60,156,253,203, 47,191,212,155, 58,117,234,236,128,128, 0, 73,
-131, 6, 13, 16, 28, 28,220,144, 36,201,109, 58, 93,223, 14, 14,115, 71,140, 24,129, 77,155, 54,225,230,205,155,131, 81,250, 64,
-149, 1,184,116,247,238,221,254,235,214,173,195,224,193,131,225,236,236, 60,187, 54,150,167,166, 77,155, 46,235,211,167, 15,194,
-195,195,209,170, 85, 43,116,232,208, 97, 30, 0,219, 90,238, 78,210,212,212,244,196,161, 67,135,124,235,213,171,135, 53,107,214,
-192,205,205, 13, 7, 15, 30,244, 53, 49, 49, 57, 1, 29,221, 55, 44, 44, 44, 76,141,141,141,177,112,225, 66,122,240,224,193,121,
- 53,125,230,205,155, 71,115,185, 92, 88, 89, 89,233, 26,248, 98,196,227,241, 58,122,121,121,225,254,253,251,184,122,245, 42,150,
- 46, 93,138,185,115,231, 34, 59, 59, 27,195,135, 15, 55, 6,224,175,199,118,219,219,217,217,161,176,176,180, 46,188,151,151, 23,
-158, 60,121,130,236,236,108, 56, 59, 59, 35, 35, 35, 3, 54, 54, 54,104,220,184, 49, 40,138,178,215,141,146,246,178,181,182, 64,
- 86,190, 20, 76, 40,209,218,221, 22, 55,158,231,226, 93,182, 12,246, 54,150,200,200,202, 70, 29, 27, 30, 92, 92,234,130,166, 41,
- 47,157, 20, 48,131,108,205,229, 25, 33,175, 72,142,180,216,155,185,114,149,116, 74, 65,226,221,148,130,196,187, 41,114,169,100,
-202,227, 59, 87,115,235, 57, 24,193,197,197, 5, 4, 77,181,251, 20,215,227,144,186,112, 49, 49, 98,142,185,250,243, 50, 34,108,
-255, 98, 66,154,251,174,109, 31,135, 82,203,178, 29, 80,127,200,240,225, 29,191,251,238, 59, 94,102,102, 38, 21, 48,108, 88,222,
-218,192,192,107,127,212,240, 98, 80, 12, 52,234,217,179, 39, 72, 0,127, 92,185, 34,202, 0, 82, 1,192, 1,112, 25,240,205, 55,
- 93,150, 44, 90,100,148,147,155, 75,221, 79, 40, 62, 23,151, 69, 15,178, 86,161,190, 46,254, 89, 42,192, 91,195,123,249,242,101,
- 90, 12, 60, 6, 0, 63, 23,124,219,171,147,167,207,232,129, 93, 32,200,202,199,236,181, 63, 99,207,201, 91,151, 45, 20,244, 23,
-255,161, 71,241,228, 90, 9, 45,245,208,207,123,211, 74, 74,222, 31, 61,248, 80, 1,243,119,112, 86,134,255,162,208,210, 64,161,
- 40, 29, 37,145, 41, 40,200, 20,148,230,173, 22, 98,177, 88,103,138,203,151, 47, 31,158, 53,107, 22,182,108,217,130, 87,175, 94,
-129,205,102,195,203,203,139, 15,192, 84,115,207,111,221,186,181, 61, 73,146,136,143,143,199,230,205,155, 49,126,252,120,250,222,
-189,123, 7, 81,121,190,148, 39,121,121,121, 59,167, 76, 26, 95,144,159,249, 14, 10,113, 62,178,210,222, 64, 42, 42,192,154,245,
- 27, 81,162, 96, 34, 67, 40, 71,134, 80, 14,146,107,141, 61,251, 15, 49,154, 54,109,218,135,193, 96,244,171,166,159,247, 51, 51,
- 51,247, 79,155, 54,173, 32, 35, 35,163,108,251,100, 10, 26, 50, 69,249,243,213,216,216, 24,219,182,109,179,112,119,119, 31,200,
-100, 50,187, 85,195, 41, 72, 73, 73,137,155, 54,109,154, 44, 51, 51, 19, 66,161, 16,231,206,157,235, 95,175, 94, 61,171, 13, 63,
-110, 33, 68,114, 38, 50, 10,228,200, 40,144,131, 99,106,143, 19,161,103, 24,141, 27, 55, 14, 96, 50,153, 29,106, 18, 89, 71,142,
- 28, 25, 61,108,216, 48,179, 31,127,252, 49,239,236,217,179,187, 0,104, 31,144,248,109,219,182,157, 60,113,226, 68,209,252,249,
-243,173,131,130,130,230,125, 98,177,213,109,216,176, 97, 77, 40,138,194,169, 83,167,158, 1,216,122,230,204,153, 71, 82,169, 20,
-195,135, 15,175,175, 30, 70,210, 5,109, 3, 2, 2,166,251,250,250, 98,206,156, 57,242,107,215,174,181, 6,176, 5,165, 67,185,
- 52,128,100, 0, 59,110,221,186,213, 98,230,204,153,210,118,237,218, 97,236,216,177,227, 1,248,214,192,219,113,196,136, 17, 30,
- 20, 69,225,248,241,227, 79, 1, 92,172, 48,255,122,104,104,232,125,153, 76,134,145, 35, 71, 54, 0,160,207,141,156,205,229,114,
- 79,173, 94,189,218, 50, 45, 45, 13,163, 71,143,150,198,199,199, 35, 48, 48,208,200,194,194,226,162,214, 53,160, 51,184, 92,238,
-190,159,126,250,105,160,183,183, 55,166, 77,155, 38,219,189,123,247,172,233,211,167,203, 90,183,110,141, 93,187,118, 13,228,112,
- 56,122,149,232, 72, 79, 79, 47,136,141,141,181,169,233,147,154,154,170,107,120,190,177,169,169,105,132,167,167,103,161,151,151,
- 87, 27,165, 82,137,152,152,152, 55,135, 15, 31,166,188,188,188,176,115,231, 78, 4, 5, 5,161, 95,191,126, 96, 48, 24, 58, 11,
- 45, 6,131, 1,185, 92, 14, 99, 99, 99, 48,153, 76,188,121,243, 70,147, 90, 6,108, 54, 27, 0, 96, 98, 98, 2, 35, 35, 35,144,
- 36,169, 83, 52, 26, 65,128, 46, 44, 81,128,197, 34,193, 36, 41,196, 37, 11, 33, 87, 80,224,177, 25, 96, 49, 9,128,166, 96,105,
-194, 2,143,195, 0, 73, 16,148,142,156, 16,138,228,224,176, 73,176,216, 28,130, 84,170,140,202, 30,142, 76,149,145,145, 17,135,
-176, 53,231,130,199,254, 23,149, 5, 38, 74, 29,203,199, 1, 44,147,186,117,135,110,218,188,153, 83, 88, 92,140,193,131, 7,231,
- 37, 61,122, 20, 34, 6, 30,117,173, 33, 72,137,100, 50,221,253,186,118, 69,100, 84, 20,138,242,243, 95, 3,165,206,241, 28, 39,
-167, 97,219,182,109,227,136, 37, 18, 12, 30, 52,168,224,213,157, 59, 71, 82,138, 17,118, 60,185, 84,136,213,120,220,217,108, 71,
- 13,175, 48, 63, 63, 31, 40, 77, 33,225, 96,103,186, 97, 70, 64,111, 20,149, 72,176, 96, 99, 8, 21, 21, 39,248, 54, 60, 21, 95,
-157, 73,135,240, 63,246, 24,158, 92,225, 3, 64,135,132,165, 26,235, 82, 77, 98, 69, 42,149,126,116, 1,244,161,156,149,137,196,
- 15,229,252, 55,130,201,100, 74, 94,190,124,201, 49,183,113,162,108,204, 88,249,245,198,223,177, 0, 0,107, 83,166, 80,174, 82,
- 80,233,233,233,224,114,185, 18, 29,135, 27, 38,237,219,183,111, 13,128,102, 76, 38, 51,236,208,161, 67, 68, 72, 72,136,213,136,
- 17, 35, 18, 98, 99, 99,211, 60, 61, 61, 93, 15, 29, 58,100, 14, 0, 59,118,236,160, 79,156, 56,209, 27,165, 41, 51,170,204,227,
-146,153,153, 25,152,155,155,123,111,198,140, 25,193, 28, 14,199,202,196,196,196, 38, 60, 60,156,144,200,105,180, 93,146, 92, 22,
-137,104,110, 68,226,246, 98,115, 76,158, 60,153, 17, 27, 27,187, 62, 45, 45, 45,172, 26,206,133, 5, 5, 5,225,175, 94,189,218,
- 98,225,220,210,206,196,117,137,133,207,226,120, 0,128,171, 45, 11,164,250,190, 88, 80, 80,128,236,236,108, 76,159, 62,221, 42,
- 33, 33, 97, 97, 90, 90,218,141,106,172, 90,183,114,114,114, 82, 95,188,120,225,199, 98,177, 56, 38, 38, 38,109, 35, 34, 34, 8,
-137,140, 66,243,133,201,200, 43, 46,237,167,181, 41, 19,143, 87, 59,224,219,111,191,101,190,126,253,122,163, 64, 32,232, 92,233,
-205,140, 36,131,180, 69,214,130, 5, 11,162, 1, 52, 0, 80,110,104, 84,165, 82, 17, 35, 71,142,124, 14,192,107,254,252,249,214,
- 52, 77,207, 91,184,112, 97, 30,128,189,255,244,185,100,110,110,190, 97,202,148, 41, 56,113,226, 4,242,243,243,183, 1, 64, 97,
- 97,225,214,163, 71,143, 30,159, 52,105, 18,126,253,245,215, 13,217,217,217,127,160,230, 80,237, 47,135, 15, 31,142, 75,151, 46,
-225,207, 63,255, 92, 6, 32,166,138,118,175,194,195,195, 23,158, 61,123,118,251,136, 17, 35,240,243,207, 63,247, 1, 80,157,131,
-108,207,222,189,123,227,226,197,139,200,205,205,221, 85, 89,131,130,130,130,221,231,206,157,107,223,187,119,111,172, 95,191,190,
- 39,128,235, 58,108,186,135,133,133,197,161,237,219,183,183,245,246,246, 70, 64, 64,128, 68, 46,151,247,153, 63,127,254,249, 99,
-199,142,153, 29, 62,124,184,205,228,201,147, 31,168,115,190,221,215,201,148, 69,146,235, 54,111,222, 60,193,207,207, 15,243,230,
-205, 83, 94,190,124,121, 0,128, 43,127,252,241, 71,194,130, 5, 11, 46,108,222,188,153,177,105,211,166, 9,179,103,207,206,166,
- 40,234, 83,137,235,213, 59,118,236,104,223,171, 87, 47,188,121,243, 6,247,239,223,135, 92, 46,255, 53, 34, 34,226,118,163, 70,
-141, 86,203,100,178,243, 38, 38, 38, 99,204,204,204, 60, 91,182,108,249,197,227,199,143,141,161,155,159, 94,102, 98, 98,162,165,
-133,133, 5,148, 74, 37,158, 61,123,134,186,117,235, 66, 46,151,227,237,219,183,240,246,246, 6,155,205, 70,102,102, 38,180,172,
-229, 53,136, 34,242, 89, 66, 82,122, 3,107, 51, 19, 64,197,195,147,248, 84,216,217, 90, 65, 69,144,200,200, 16,160,101, 19,103,
- 16, 4,129,130,220, 12, 16, 4,241, 92, 23, 78, 21, 77, 69,190, 75,207,170, 99, 99,198,133,119,251, 94, 54, 17,127,100,135,152,
- 55,232, 52,153,201, 32, 24, 28,174,233,222, 9, 99,199,218, 82, 20,141,130,220, 76, 48, 73,242,225,167, 56, 64,167,222, 33,165,
-171, 27,239, 73,175, 9,107, 90, 18, 52,104,177, 28,135,127,206, 68,190, 49,208,114,199, 15, 63, 88,218,216,218, 34, 32, 32,128,
-202, 77, 75,187, 86,162, 99, 98,229, 6,141, 26, 57,152,154,153,225,238,221,187, 96,148,250,216,226, 32,224, 17,180, 96,129,141,
-189,163, 35,198, 79,152, 64,101,190,123,119, 93, 12,164,235,211,215, 6,110,110, 44, 13, 47,169,230, 21, 48, 48,107,254, 0, 95,
-174,137, 17, 23,235,246,156, 65, 74,142,232,120,132, 0,123,254,163,246,142,125,213, 90,180,170,114, 62, 43,117,170, 54,174, 86,
-172,240,120,188, 50,107,138, 30,111,122, 31,157,179, 38,252, 29,156,159, 16,139, 1,156, 5,176, 56, 37, 37, 37,110,194,132, 9,
-114,165, 92, 90,116,111, 77,131, 69, 81,235,235, 77,139, 8,228, 79,251,125,150,197,162, 18, 97, 94,209,142, 29, 59, 20, 41, 41,
- 41,113,218,203,212,192,253, 14,192,197, 95,126,249,101,247,169, 83,167,224,229,229,133,152,152, 24,123,145, 72,212,234,249,243,
-231,214, 30, 30, 30, 8, 9, 9,193,137, 19, 39,182, 0,184, 90,157,200,210, 64,169, 84, 94,203,200,200,104,156,156,156,220,208,
-210,210, 82, 97,105,105,137,138,145,136,133, 98, 10,185, 5, 66, 88, 91,219,192,220,220,188,190, 14,226,252, 98, 70, 70,134, 59,
-101,213,164,139,123,206, 54, 97,228, 58, 23, 68,174,115,193,197,133, 78,224, 91,114,144,159,159,143,236,236,108,100,103,103,131,
- 32, 8, 40, 20,138,166, 58,112,190, 21, 8, 4, 7,222,189,123,119,214,193,193, 1,102,102,102,160, 1,100, 20, 40, 16,189,201,
- 3,209,155, 60,144, 81,160, 64, 97, 81, 17,234,213,171, 7, 51, 51,179,170,134, 40,200, 58,117,234,244, 29, 54,108,152, 25, 0,
-168, 5, 84,119,154,166,167, 85,242,153,170, 84, 42, 59,105,218,126,255,253,247,214, 0,122,255,195,231, 19, 3,192,140, 73,147,
- 38,181,225,241,120,216,185,115,231, 91, 0, 71, 52,247,250,221,187,119,199, 3,192,172, 89,179, 60, 1,204, 67, 21,153,160,203,
- 76, 67,108,118,235,166, 77,155, 34, 34, 34, 2, 0,206,212,176,238,208,123,247,238,161, 81,163, 70,224,241,120,109,107,104, 91,
-223,197,197, 5,241,241,241, 0,240,164,138, 54, 79,226,227,227, 75,135,123, 8,162,190, 14,219, 62,176, 87,175, 94,207,110,220,
-184,209,182, 99,199,142,152, 48, 97,130,236,193,131, 7,125, 1,220,126,242,228, 73,183,145, 35, 71,138,220,221,221,113,235,214,
- 45,143,145, 35, 71,222, 35, 73,114,141, 14,156,227, 87,173, 90,181,248,235,175,191,198,170, 85,171,232,147, 39, 79, 6, 0,184,
-162,158,119,249,248,241,227,163,215,174, 93, 75, 15, 26, 52, 8, 43, 87,174, 92, 12, 96, 90,117,100, 34,145, 72,168, 82,169, 32,
- 18,137,116, 50,201,235,218,222,214,214,246,203, 94,189,122, 97,233,210,165,168, 83,167, 14,206,159, 63, 79, 3, 8, 3, 16, 46,
-147,201,186, 0,216, 44, 18,137,126,143,136,136, 64,207,158, 61,217, 40, 95, 98,164,186,245, 63, 59,122,244,168,212,194,194, 2,
-174,174,174,104,208,160, 1, 50, 50, 50,144,148,148, 4,111,111,111,180,110,221, 26, 74,165, 18, 7, 14, 28,144, 20, 21, 21,233,
-148,147, 79, 41, 19, 29,190,122,225,180,208,198,140, 11,103,123, 11,212,171, 99,141,226,130, 28,100,103,164,163,117,211,186,232,
-218,186, 30,114,132, 50, 92, 14, 59,157, 95, 84, 84,114, 88, 39, 19,190,180,228,208,181, 63,206, 11,173,204,216,104,220,196, 19,
- 35, 39,204,106,217,178,149,207,213,118,237, 58, 93,254,113,195,186,230,221, 59, 52, 37, 82,115, 36,184, 20,118, 38, 95, 88, 88,
-120,232, 83,220,232, 87, 2, 12,137,133,251,237, 93,103, 35, 15, 52,235, 51,233, 64, 92, 42,182, 1,128,130,193,240,232,251,229,
-151, 72, 77, 77,197,233, 83,167, 4, 37,192, 83, 93,249,140,140,140, 72, 0, 16, 10,133,224,170,253,238,148, 64,147,175,190,250,
- 10,217, 57, 57, 56,122,228, 72,246, 37, 32, 74,159,126,246, 7, 56,198, 70,165, 6, 65,161, 80, 8, 2, 40, 4, 0,130,137,190,
-237,188, 26, 33, 59,175, 16, 55, 30,198, 21,215, 19, 99,122,117, 60,159,177, 35,124,237,124,180, 0,228,204,155, 55, 15, 92, 46,
- 23,124, 62,191, 76, 28,105,196, 10,135,195, 1,159,207,135, 82,169,196,241,227,199, 1, 32,167,218, 55, 60, 64, 58, 96,218,122,
- 74,170,160, 75, 88, 44,214, 71,225, 84,191, 57, 74, 7, 47,248,153,250,227, 94,229, 65, 49,181,225,252, 12,208, 78,157, 19,171,
- 29,128,252,164,164,164,212,161,131, 7, 8,147, 19, 94,100,136, 10,210, 5,133,185, 41,130,148,183,207, 51,150, 44,156, 39, 76,
- 77, 77, 77, 65,105, 46,173,118,233,233,233,154,101,116,193,188,161, 67,135,254, 52,105,210, 36, 58, 58, 58, 26, 0, 16, 25, 25,
-137,177, 99,199,210,163, 71,143,222, 6, 96, 81, 45,250, 45, 18,139,197,229,172, 33,114, 21, 85, 54,228, 87, 88, 88,136,244,244,
-116,200,100, 50,157, 21,241,171,203,155, 94,230, 37, 61, 86,120,186,154,192,211,213, 4, 30, 46,198, 32,148,197,101, 34, 43, 59,
- 59, 91,243,230, 44,209,163,159,133, 82,169,180, 92, 63,181,135, 38, 11, 11, 11,145,145,145, 1,149, 74, 85,213,131,140, 74, 75,
- 75,187,124,226,196,137, 34, 0,248,241,199, 31,243, 8,130,248,147, 32,136,159, 42,249,236, 97, 50,153,119, 53,109, 55,109,218,
-148,135,247,135,196,254, 78,124,237,237,237,157,191,120,241,226,157,179,103,207,198,158, 61,123, 32, 16, 8, 22,225,175, 92, 60,
- 84, 78, 78,206,130, 93,187,118, 97,220,184,113, 88,190,124,249,166, 86,173, 90, 21, 2, 24, 89, 21,161,157,157,157, 51,147,201,
- 68, 84, 84, 84, 33,128, 55, 53,172, 63, 35, 42, 42, 42,147, 32, 8,240,249,124,183,234, 26, 90, 91, 91, 55, 52, 51, 51, 67, 90,
- 90, 26,160,126, 99,174, 4, 73,233,233,233, 52,135,195,129,147,147, 83,163,154, 54,222,202,202,106,193,129, 3, 7,152, 47, 94,
-188, 64,247,238,221, 83,111,221,186,213, 19,128, 38, 36, 61, 42, 50, 50,210,183, 91,183,110, 47,175, 94,189,138,141, 27, 55, 18,
- 45, 90,180,152, 86, 19,167,171,171,235,212,241,227,199, 35, 56, 56, 24,123,247,238,157, 6,224, 84,133, 38,199,118,237,218, 53,
-107,239,222,189,152, 48, 97, 2,234,215,175, 63,178, 58,190,228,228,228,133,126,126,126,145,175, 94,189,210,169,226,129,142,237,
-187,249,248,248, 52, 20,139,197, 56,116,232,208,155,134, 13, 27, 62, 58,117,234,212, 60,188,255,192,254,253,244,233,211, 24, 53,
-106, 20, 90,180,104,113, 8,192, 8, 93, 46,203,216,216,216,148,235,215,175, 83,108, 54, 27,174,174,174,232,215,175, 31, 2, 2,
- 2,208,188,121,115,200,229,114,156, 62,125,154,122,254,252,121,170, 76, 38,211, 41,151, 82,238,171,155,231, 19, 19,255,199,222,
-121,135, 55, 85,253,127,252,125,179,119,210,180,105,210, 69, 75,129,210, 77,161, 64,217,163, 80,138, 64,153,162,136, 40, 34, 10,
-200, 16, 21, 21, 84,134, 32, 75,217, 32,171,130,130, 8, 10,136,128,148,165,226, 23,100,211, 2,165,133,178,186,103,210,189,146,
-102,159,223, 31,180,252, 74,237, 72, 90,220,247,245, 60,247, 73,114,110,238, 59,231,174,115,223,249,156,117,239,194,245, 43,231,
- 76, 44, 38, 3,158,174,142, 24, 29,209, 9,175,141,237,133,206,254,238, 72,215,232,112,230,204, 79,166,212,212,228, 75,182,244,
- 56,172,209, 76,186, 29,127, 49,241,250,121, 51,155, 69,193,223,175, 61,230,127,248,190,124,217,162,185, 14,237,219,122, 34, 62,
-165, 20, 63,157, 62, 97,202,201,202,252,245,175,234,113,120, 22,224,136,121,148,136,201, 96,192,194,224, 85, 50,171, 59,210, 4,
- 7, 6,250,170, 92, 92, 16, 19, 19, 3,134, 29, 61, 66,207, 2, 28,177,248, 81, 45,120, 69, 69, 5,106,244,218,249,249,249,121,
-122,121,225,120, 76, 12,152, 86,235,157,126,118, 14, 48,122,247, 81, 53,244, 99, 93, 10,168,154,222, 10,146,118,173,148,126,114,
-153, 8, 87,226, 31, 64,111, 34, 87,191, 41,198, 95, 58, 30,217, 31,200, 20, 52,179,234,112,213,182,109,219,194,118,236,216, 49,
-232,157,119,222, 17, 79,156, 56, 17,124, 62, 31, 90,173, 22, 30, 30, 30,176, 88, 44, 56,121,242, 36, 98, 99, 99, 43,172, 86,235,
- 79,248,253,176, 1, 17,168,213, 75,227, 84, 50, 4,143,252,150, 54,236,200,115,207, 61, 21, 77, 0, 16, 63,176, 74, 11, 91, 27,
-246,108, 60,112,126,204,222, 83,215,169,183,198,247, 99,116,246,107, 5, 0, 80,169, 84,144, 74,165,118,107, 62, 5,254,112,205,
-218,213,186,121,121,121,119,243,242,242, 52,175,191,254,186,127, 77,195,119, 30,143, 87, 85, 29,201, 42,174,111, 27, 27,242,105,
- 4, 48,125,199,142, 29, 71, 75, 75, 75, 79,189,247,222,123, 88,182,108, 25,126,252,241,199, 62, 0, 46, 52,115,223, 45,197,197,
-197, 37, 87,175, 94, 85,249, 4,132,162,141,146,141,190, 11,238,131, 16, 2, 39, 33, 65,121, 73, 17,110,220,184,142,242,242,242,
- 43,246,228,211,104, 52,150,104, 52, 26,133, 82,169, 68, 81, 81, 17, 10, 10, 10, 30,155,172,226,226, 98, 20, 21, 21, 17,138,250,
-221,152, 45,141,105, 86,106, 52, 26,109, 82, 82, 18, 87,213,202, 7,109,149, 28,116,251,240, 46, 64, 8, 60, 29, 25, 40, 47, 43,
-193,165, 75,151, 80, 90, 90,250,191,134, 52,173, 86,235,156, 9, 19, 38, 48, 1,188,252,222,123,239, 57, 2,232,248,254,251,239,
-255,132, 58, 61, 11, 89, 44,214,186, 61,123,246, 4,215, 84, 49,206,157, 59,119, 45,128, 29,127,214,181,228,228,228, 52, 39, 38,
- 38, 70, 98, 52, 26,177,113,227, 70,172, 93,187,118, 39,126, 63, 80,101,204,231,159,127,190,153,193, 96,204,152, 57,115, 38,166,
- 78,157, 42,236,210,165,203, 59,185,185,185,223,212,167,153,157,157, 61,191,115,231,206, 11, 53, 26,205,114,155,204,242,253,251,
- 83, 58,119,238, 60, 95,163,209,124,214,216, 57, 18,137, 68, 34,139,197,130,212,212,212, 98,160,193,246, 29, 85,169,169,169,217,
- 22,139,197, 67, 40, 20, 58, 54,117,125, 22, 23, 23, 47,239,210,165,203,199,106,181,250, 52,128,165,245, 24,242,155,185,185,185,
- 65,179,103,207,158,181,114,229,202, 49,121,121,121,223, 54,165,153,158,158,190, 60, 60, 60,124,193,189,123,247,118,161,225, 42,
-224,207, 23, 47, 94,108,220,179,103,207, 27,169,169,169, 43,154,208, 60, 86, 80, 80,112,204,142,243,219,208,247, 31,107, 50,153,
-204,247, 87,174, 92,201,216,182,109, 27, 8, 33,171, 45, 22, 75, 67,249,140, 63,124,248,240,238, 94,189,122, 77, 60,112,224, 0,
- 63, 40, 40,104,170, 94,175,223,215,212,245,169,213,106, 15, 29, 56,112, 96, 76,124,124,188,199,196,137, 19,249,190,190,190, 48,
- 26,141,200,205,205,197,182,109,219,170, 18, 18, 18,178, 74, 74, 74, 14,217, 83,134,152, 13,101,227, 47,158, 57,178, 47,237,126,
- 66,143,254,207,140,148, 27,140, 30,224, 21, 50, 81, 82,152,135,147,199, 14, 21,167,166, 38, 95,210,106, 75,198,219,163,105,212,
-151,190,112,233,215,163,223,102,165, 38,117,239, 27, 62, 84, 94,101,240, 2,143,195, 64,161, 58, 27, 39, 99,142, 20,165,166,166,
-252, 86,101,210,191,242, 87,149,243, 76,111, 44,101,230,197,190, 62,109,120, 39, 8,228, 30, 55,216,192,198, 94,128, 64,161, 82,
-113,170,239, 29,136, 31,181,121,180, 73, 83, 13,112,125,170,107,169,180, 90, 45,216,128, 97, 18,192,118,118,118, 22, 0,192,189,
-123,247, 32,124, 84,171, 97, 87, 62, 43, 0,145,176,150, 46, 3,208, 22,178,224,222, 78, 42,162, 0, 32, 43,175, 16, 6, 83,163,
-207,141,127, 58,209,181, 12, 87,116,115, 4, 56, 0, 34,196, 98,241,178,133, 11, 23,174,190,114,229,202,234,168,168,168,213, 60,
- 30,111, 89,245,193,230, 52,114, 34,254, 52,205,174,110,112, 12,111, 75,157,139,108, 71, 89,167,245,145, 91, 94,233, 38, 50, 12,
- 24, 48, 96,115, 11,243,217,146,155,229,143,212, 60, 98, 50,153, 8, 30, 85,219, 29, 65,195, 85,130, 31,212, 90,159,151,145,145,
- 65,170,223,219,147, 79,197,184,113,227,172,229,229,229,228,249,231,159, 39,104,122, 10,159, 70, 53,121, 60, 94,120,223,190,125,
- 77,234,252, 34,114, 55, 37,155, 92,142,187, 77, 78,157,185, 72,190, 61, 20, 67, 54,109,222, 78, 66, 66, 66, 12, 0,188,236,209,
-100,177, 88, 3,194,195,195, 11,213,106, 53, 73, 74, 74, 34,231,206,157, 35, 7, 15, 30, 36,219,183,111, 39, 91,183,110, 37,173,
- 90,181, 82, 3, 80,217,163, 41, 16, 8, 70, 14, 25, 50,196, 84, 82,166, 37,169,217,133,228, 86, 82, 42,185,112,245, 22, 57,121,
-230, 2,249,102,223, 1, 18, 24, 24, 88,101,131, 38,147,201,100,110,250,246,219,111,203, 8, 33,100,228,200,145, 89,120,114, 32,
-213, 54,115,230,204,209, 16, 66,200,103,159,125, 86,136,250, 27,194,255,209,215,210, 51,238,238,238,119, 57, 28, 78, 12,128,151,
-155,216,238, 5, 22,139,245,163,139,139,203, 53, 0,163,255,130,251, 40, 74,169, 84, 94, 6,208,212, 12, 7, 53,223, 27,245, 47,
-185,223,255, 8,205, 1, 44, 22,235, 28,208,248, 36,194,181,202,235, 79,152, 76,230,113, 0, 3,237,204,103,123,133, 66,241,188,
- 92, 46,127, 75, 46,151,191,165, 84, 42,159,231,114,185,237, 91,178,239, 78,237, 35,134,123,134,142, 56,220,170,227,176,116,207,
- 78, 81,233,222,157, 71, 30,118,106, 31, 49,188,165,154, 94,157, 71, 30,241,236, 20,149,225,217,105,120, 90,155,174, 35, 15, 43,
-252, 34,134,252,149,231,232,101,119,184, 13,106, 3, 51, 57,183,128,144,115, 11, 72, 68, 27, 88,123, 56, 32, 48, 12,144, 12,142,
-136, 88, 67, 44,150, 53, 99, 70,141, 90,227, 3, 56, 17,128, 89,119,169, 79, 51, 20,144, 62,222,118,228,200, 53,109, 1,197, 32,
- 64,216,175, 79,159,213,196, 98, 89, 51,225,133, 23,214,120, 2, 46,245,233, 53,164, 73, 0,166, 59,224, 86, 91, 87, 1,180, 27,
-235,141,160, 15,134,123, 19,114,110, 1, 89,252,156, 47,233,172,194,203, 77,104, 54, 20, 41,250, 71, 71,180,236, 69, 84, 93,184,
-174,168,126, 21, 61,133,139,240,169,107,118,119,133,111, 68, 59, 42,105,168, 31,171, 8,143,186, 36,139,254,133,133,228, 46,131,
-193, 64,170,170,170,136, 86,171, 37, 21, 21, 21,117, 13,212, 99, 67,150,147,147, 67,178,178,178, 72, 70, 70, 6, 73, 75, 75, 35,
-248,255,182, 55, 54,231, 83, 42,149,238,120,238,185,231, 44,108, 54,123,211,211,216,119, 71, 71,199, 21,221,186,117, 51,110,216,
-176,129, 28, 62,124,152,124,241,197, 23,100,230,204,153, 36, 56, 56, 88,239,224,224, 48,190, 57,154, 46, 46, 46,243,253,252,252,
- 10,119,238,220, 73,190,249,230, 27,178,126,253,122,242,209, 71, 31, 89, 60, 60, 60,242, 36, 18,201,224,230,104, 42,149,202,232,
-222,189,123, 27,163,163,163,201, 79, 63,253, 68,246,238,221, 75,230,204,153, 67,252,253,253,245, 34,145,232, 89, 27, 53,153, 44,
- 22,107,205,180,105,211,242,220,220,220, 98,234,172, 19, 6, 6, 6, 94,155, 48, 97, 66, 14,128,185,255,162,235,147,214,164, 53,
-105,205, 63,192,104,189,232, 6,119, 2, 48,133, 28,206, 11,253,250,244, 89,205, 1, 94,176,215, 20,241,153,204,177,189,186,117,
- 91,205, 1,198,215,124,151,207,100,142,237,215,167,207,106, 54,147,249, 82, 67,122,141,105, 18,128,201, 97,177,230,246,234,209,
- 99, 13, 11,248,176, 38,109, 64, 27,234,206,156,103, 90,145, 62, 94,212,131,151,148, 16,254,139,141,214, 83,135,245, 7, 92,132,
-255, 20,205,191,203, 77,237, 83,109,152,142,216, 17,209, 58,130, 71,179,168,251, 52, 51,159,130,167,188,239, 29, 20, 10,197, 9,
- 31, 31,159,252,214,173, 91,231,200,229,242,125, 0, 60, 90,168, 25,228,226,226,242,181, 74,165,186,239,234,234, 26,175, 80, 40,
-214,225,209,168,243,205,214,100,179,217,221, 84, 42,213,255,188,189,189, 75,188,188,188,212, 10,133,226,219,122, 34, 89,182,104,
-186,162,254, 66,133, 83,189,142,126,232,208,154,180, 38,173,249,132,129,137,108,139,149,131,218,192, 60,168, 13, 44,145,222, 88,
- 87,219,160, 68, 1,130,230,154,162, 87, 0, 94,221,239, 55,165,215,148, 38, 1,152, 61, 1,113,221,109,134,122, 32,208, 70,205,
-127,122, 68,171,166,156,183,111,120,135, 6, 48,255, 1,153,252,167,104,254, 93,120,128, 70, 26, 35,215, 98,197, 83,252, 77,221,
- 83,222,135, 91, 5, 5, 5, 67, 10, 10,158,106,223,132,196,188,188,188,151,159,166,160,201,100,186,162, 86,171,251, 63, 5,169,
-134,186, 94, 27, 97, 99,183,108, 26, 26,154,255, 14, 20, 96, 65, 50,230, 69,180,199, 70,150, 5,140,147, 41,200,174,211, 37, 79,
- 71, 53, 71,243, 17,150, 93,245,148,241, 84,115,243,249,255, 84,252, 78, 35, 11,183,169,255,206,105,203,197,163, 54, 90, 45, 54,
- 90, 52, 52, 52, 52, 52, 52, 52,127, 2, 63,223,167,255,136,253, 3,136,193,147,209,183,152, 90, 70,180,193,208,167, 61, 61, 41,
-154, 19, 62,253,153,214,164, 53,105, 77, 90,147,214,164, 53,105,205,255,156,102, 13, 13,205,157,122,183,206,231,102,245,226,251,
-175, 64,215,179,211,154,180, 38,173, 73,107,210,154,180, 38,173,249,111,167,217,227,104,209,208,208,208,208,208,208,208,208, 52,
- 78,131, 81, 55,218,104,209,208,208,208,208,208,208,208,180, 12, 87, 60,154,162, 42, 6,255, 63, 85, 85, 52,208,244, 20, 60, 79,
-176,114,229, 74,134,143,143,143,152,203,229, 6, 39, 39, 39, 51,166, 79,159,222,226,142, 4,171,215,109, 98,120,121,121,137, 1,
- 4, 23, 22,151, 51, 94,125,237, 61,138, 62, 95, 52, 52, 52, 52, 52, 52, 52,255, 32,134, 85, 27,171,154,215,199, 17, 46,187,140,
-214,210,165, 75,145,145,145, 33, 2, 48, 46, 40, 40,136,187,101,203, 22,178,127,255,254, 22, 25,163, 15,231,206, 65,122,122,186,
- 8,192, 56,165,194,129,251,229,142, 85,228,192,143,231,159,186,217, 82, 40, 20, 78,127,230,118, 52, 52, 52, 52, 52, 52, 52,255,
- 41,166,212,122,157,210, 44,163,197, 98,177,152, 92, 46,183, 45,131,193, 24,194,231,243,187, 2, 64,245,148, 44,205,134,197, 98,
- 49,185, 60, 94, 91, 38,147, 57,132,199,123,164,249,220,240,222, 45,213, 28, 40, 18,137, 50,133, 66, 97, 44, 0,129, 68, 34,185,
-110, 52, 26,111, 75, 36,146,139,246,232, 72, 36,146,139,213,219, 93, 7, 32, 16, 10,133,177, 34,145, 40,147,197, 98, 13,164,175,
- 39, 26, 26, 26, 26, 26, 26,154,106,162,235, 89,126,207,177, 99,199, 26, 52, 56, 92, 46,151, 17, 20, 20,212,219,203,203,235, 66,
- 64, 64,128,193,195,195,227,160, 80, 40, 20,181, 48, 99, 12, 31, 95,255,222,110,174,170, 11,157,218,186, 26,148, 74,229, 65, 54,
-155,221, 18, 77,166, 68, 34, 89, 31, 25, 25, 89,122,225,194, 5, 34,149, 74,213, 0, 28,156,157,157,115, 8, 33,196,197,197,197,
-106,143,152,139,139,139,149, 16, 66,156,157,157,115, 0, 56, 72,165, 82,245,133, 11, 23, 72,100,100,100,169, 68, 34, 89,143,166,
- 71,180,165,161,161,161,161,161,161,177,131,198,188,200,223,152,154, 40,150,107,179,119,142,203,229,134, 42, 20,138,132,183,223,
-126,219, 18, 29, 29, 77,188,188,188,174, 42,149,202, 30, 10,133,226,137, 6,245,147, 38, 77,178,167,218, 47, 84, 34,149, 37,236,
-154,253,140, 69,247,229, 72,226,238,170,188,234,224,224,208, 67, 42,149, 62,161, 57,225,213,169,182,104,186,156, 17,217,210, 0,
- 0, 32, 0, 73, 68, 65, 84,201,100,178,248,149, 43, 87, 86,149,148,148, 16, 66, 8,145,201,100,106, 0,114,149, 74,149,147,146,
-146, 66, 20, 10, 5,129,237, 81, 60,134, 66,161, 32, 41, 41, 41, 68,165, 82,229, 0,144,203,100, 50, 53, 33,132,148,148,148,144,
-149, 43, 87, 86,201,100,178,120, 0,110,244,109, 65, 67, 67, 67, 67, 67,243,159, 54, 90,117, 13,151,109, 85,135, 93,187,118,229,
-169, 84,170, 30, 18,137,100,148, 88, 44,222, 60, 98,196,136,160, 49, 99,198, 48,244,122,189, 37, 40, 40,200,205,219,219,123,150,
- 92, 46,127,153,207,231,135,112,185,220,151,164, 82,169,235,190,125,251,124, 26,211,236,208,177, 11,207,193, 65,222,131,203,229,
-141, 18,139, 37,155,167,141, 29, 16,244,242, 59,207, 50, 56,134, 52,203,128, 16, 79,183,224,182,174,179, 92,228,162,151, 89, 76,
- 70, 8, 69, 81, 47,241,249,124,215,111,190,220,238,211,196,142,181,117,115,115,187,190,111,223,190,224,113,227,198,241,146,146,
-146, 0, 0, 22,139,133, 11,192,196,100, 50,193,227,241, 96, 52, 26,139, 1,216,122, 2,137,209,104, 44,230,241,120, 96, 50,153,
- 0, 96,170,214, 67, 82, 82, 18,198,141, 27,199,219,183,111, 95,176,155,155,219,117, 0,109,233, 91,131,134,134,134,134,134,230,
- 63, 75,141,185,138, 65,157,170, 67, 86,141,123,140,138,138,122, 34,106,196,229,114,183,220,187,119,175,151,163,163, 99, 91, 54,
-155,109,121,225,133, 23,120, 19, 38, 76, 64,126,126,190,181,162,162,130, 25, 26, 26,170,186,118,237,218, 16,179,217,220,199,193,
-193, 65, 91, 82, 82,162,208,235,245, 15, 0,204,106, 36, 35, 91,238,223, 77,232,229, 36,119,108,203,101, 51, 45, 51, 39, 79,224,
-125, 56,247, 25, 80,250, 56,171, 69, 83,200,252,164,179,131,106,221,197,202, 33,247,140,150, 62,149, 50,190, 54,175, 84,223,164,
-166, 66,161,232,204,225,112, 98, 79,156, 56, 1,161, 80,136,210,210, 82,112,185, 92, 0, 64, 69, 69,133, 12, 0,139,162, 40,112,
-185, 92,148,149,149,201,237, 57,106,101,101,101,114, 46,151, 11,138,162, 0,128, 85,173, 7, 46,151,139,210,210, 82,248,248,248,
- 80, 39, 78,156, 80, 14, 25, 50,228,161,209,104,236, 82, 80, 80, 16, 71, 95,107, 52, 52, 52, 52, 52, 52,246, 83,159, 23,249, 7,
-209,228, 56, 90,253,171, 67,117,181, 39,206,221,237,236,236,236, 34, 22,139, 3,166, 76,153,194, 80, 40, 20,136,141,141,181, 86,
- 86, 86, 50,216,108, 54,216,108, 54,115,192,128, 1, 98,179,217, 44, 60,126,252, 56,245,240,225,195,124,147,201,244, 73, 97, 97,
-225,181, 70, 50,178,187,157, 3,207, 69,224,192, 13,248,241,189,190, 12,103,159, 66,224,212, 98, 43,169,208, 48, 88, 86, 2,133,
-200,202, 92,211,135, 18,231,201,188,133, 51,191,205,167,126,123, 88,146,111, 50,153, 62, 41, 47, 47,111, 76, 51, 27, 0,170,243,
- 4,169, 84, 10,139,165,246,252,150, 32, 12, 6, 3, 60, 30,175, 89, 71,142,199,227,129,193, 96, 0,181, 34, 97, 50,153, 12, 76,
- 38, 19, 12, 6, 3,108, 54,251,137,124,208,208,208,208,208,208,208, 52,139,250,188,200, 63,133,218,227,104,217, 54, 55,165, 74,
-165,162,164, 82,169,107,199,142, 29, 63,142,140,140, 76, 25, 61,122,180,118,195,134, 13,100,237,218,181,100,205,154, 53,100,231,
-206,157,150, 95,127,253,213,244,218,107,175, 85,181,111,223,254,193,230,205,155, 3, 0, 96,232,208,161, 13, 86, 71, 58,200, 29,
- 41, 49,151,229, 26, 24,208,225,227, 23,251, 7,167, 44, 24,229,171, 53,238, 10, 37,214,133,173,136,101,147, 55,177, 28, 24,104,
- 33,247, 86,153,150,191, 62,176,170,181, 87,235, 7, 91,119,126, 23, 0, 0, 17,145, 67, 27,173,226, 84, 40, 20, 93, 61, 60, 60,
-212,167, 79,159,182, 22, 23, 23,147,194,194,194,154, 54, 90, 37, 0,100, 94, 94, 94, 57,102,179,153,200,229,242, 34,123,142,154,
- 92, 46, 47, 50,155,205,196,203,203, 43,231,145,191,146,149, 16, 66, 72, 97, 97, 33, 41, 46, 46, 38,167, 79,159,182,122,120,120,
-168, 21, 10, 69, 87,250,254,160,161,161,161,161,161,249,207, 50,165,206,107,211,244,234,213,139,146, 74,165,140, 14, 29, 58,136,
-221,220,220,186,187,185,185, 93, 89,183,110, 29, 89,187,118,173,121,219,182,109,228,235,175,191, 54,191,242,202, 43,101, 34,145,
- 40,134,203,229,202, 1,192,219,219,187,209,144, 95,215,238, 61, 40, 1,159,199,240,243, 11, 20, 43,156,156,186, 59, 59, 57, 94,
- 49,174, 13, 38,100,177,187,153,236,232, 68,200,129,103,204,171,158, 15, 43, 99,179, 57, 49, 0,228, 0,224,225,230,106,107, 24,
-209, 77,169, 84,198, 47, 94,188,184,210,104, 52,146,234, 94,134,106, 0, 14, 94, 94, 94, 57,132, 16,226,225,225,145, 9, 64, 97,
-163,158,194,195,195, 35,147, 16, 82, 99,180, 28, 92, 92, 92,212,132, 16, 98, 52, 26,201,226,197,139, 43,149, 74, 37,221, 24,158,
-134,134,134,134,134,134,166,193,185, 14, 27,140, 20, 93,184,112,129,148,149,149, 89,179,179,179, 45, 21, 21, 21,210,208,208, 80,
- 57,147,201,132, 74,165, 98, 50,153, 76,107,101,101, 37, 83,161, 80,228,176,217,236,111, 12, 6, 67,241,168, 81,163,168,212,212,
-212, 70, 27,154, 95,187,124,137,232,170,244,214,172,172, 76,139,182,162, 76,250,114,136,163,156,101, 54,194, 26,218,139, 89, 38,
-104,111,181,234,138,153,254,174,188, 28, 14,135,253, 13,128,226,209, 81,195,168,172,156, 92, 91, 27,175,231,104, 52,154,208, 45,
- 91,182,236,232,219,183,111,177, 86,171,173,105, 91, 85,119, 8, 6, 7, 27,245,234,126,143, 73, 81, 20,180, 90, 45,250,246,237,
- 91,188,101,203,150, 29, 26,141, 38, 20, 64, 14,125,125,209,208,208,208,208,208,252,167,105,112, 28,173, 38,135, 58,208,106,181,
-114, 14,135, 19, 17, 22, 22,214,186,178,178,210,186,116,233,210,204, 13, 27, 54,236,121,240,224,129,201,193,193,161,173, 64, 32,
-120,107,220,184,113,138,195,135, 15,147, 62,125,250,212,141, 62,213, 59,187,183, 78, 87, 33,231,113,216, 17,111,117,147,180,206,
- 52,202,173, 1,111, 93,205,236,183,240,226,158, 31, 18, 89,166, 14,142,186,182,142, 92,234,173,113,227,158, 87,252,112, 44,134,
-244,232,209,221, 38,205,106, 44, 26,141,230,173,216,216,216,231,219,180,105,147,101, 50,153,178, 0, 20,234,116, 58,181,155,155,
-155,198,104, 52,102, 1, 48,214,179, 93,125,154, 70,163,209,152,229,230,230,166,209,233,116,106, 0,133, 38,147, 41,171, 77,155,
- 54, 89,177,177,177,207,107, 52,154,183, 0, 88, 26,201, 11, 61,171, 59,173, 73,107,210,154,180, 38,173, 73,107,254,119,248, 93,
- 52, 11,176, 97, 82,105, 30,143,215,215,211,211,179,119, 98, 98,162,229,210,165, 75,165, 12, 6, 99,235,208,161, 67, 15, 30, 58,
-116,168,155,163,163,163,178, 85,171, 86,170, 95,126,249, 37, 28,192,254,223,126,251,205,166,232,147,128,199,233,219,201, 67,214,
- 59,250, 38,177,124, 25,123,191,212,194,228,109, 29,240,236,179, 7,223,220,179,183,155,155, 66,162,236,228, 42, 85, 29, 63,126,
- 50, 28,192,254, 75,151, 46,219, 61,158,134,217,108,254, 69,163,209,180,170,249,156,159,159, 31,170, 80, 40, 2,240, 40,250, 84,
-106,163, 76,186,213,106, 29,106,181, 90,221, 10, 10, 10,238, 0, 64, 65, 65, 65, 23,250, 58,162,161,161,161,161,161,161,169,199,
-100, 69,215,247,185,209,136, 22,151,203,117,103, 50,153,129, 89, 89, 89,233,199,143, 31, 79,236,218,181,235,144,244,244,244,149,
-132,144, 52,161, 80, 56, 37, 51, 51,243,126,102,102,166, 65,167,211, 77,179, 35, 51,238, 96,112, 2, 99,115,116,233,159,254,114,
- 59,177, 67,143,193, 67,242,242,114, 86, 90, 8, 73,227, 10,165, 83,238,101,228,223,191,172,209, 27,170,170,236,210,108,146,130,
-130,130, 59, 5, 5, 5,165,118,110, 83, 90, 99,178,104,104,104,104,104,104,104,104,236,165,169,136,150,209, 98,177,172,210,235,
-245,242, 31,126,248, 33, 59, 50, 50, 82, 15, 0, 91,182,108,177, 78,158, 60,249,124,114,114,242,192, 59,119,238, 12,113,113,113,
- 57, 3,128, 74, 73, 73,177, 37,250,100,180, 90, 45,171, 12, 6,189,252,151, 95,227,178,251,246,238,160, 7,128,109,159,111,180,
-190, 48,101,246,249,228,164,196,129,247, 18,174, 15,113,113,113, 57, 99, 49,179,168,220,188, 52, 66,159, 38, 26, 26, 26, 26, 26,
- 26,154,191, 49,209,120,178,202, 48,218, 38,163,101, 48, 24,242, 13, 6, 3, 0, 20, 71, 70, 70, 62,177,110,231,206,157, 4, 64,
- 37,128, 3,133,133,133,246,100, 38, 95,167,211, 1, 64,113,223,222, 29,158, 88,241,109,244,134,199,154, 21,229,101,244,105,163,
-161,161,161,161,161,161,249, 39,153,173,223,193,160,143, 11, 13, 13, 13, 13, 13, 13, 13, 77,139,152,210,208,103, 10, 13,247, 28,
-248,217,142, 31,104, 78,239,131,159,105, 77, 90,147,214,164, 53,105, 77, 90,147,214,252,207,105, 54,165,253, 51,254,121, 52,216,
- 24,254,143,134,238,250, 74,107,210,154,180, 38,173, 73,107,210,154,180,230,191, 29, 87, 60, 57,188,131,107,205, 10, 22,125,108,
-104,104,254,217,144, 3, 96,162,216,207, 27,132,184,129,201,205, 69,238,173,100,234, 99, 88, 91,172,169, 14,244,130,192,164,130,
-153,159, 15,117,124, 74, 75, 53,105,104,104,254,125,184,244,156, 62,154, 98, 48,183, 82,196, 10,157, 58,137,199,209,165, 9, 53,
-185,233,255, 69,111,145,139, 6, 34, 88,180,209,162,161,249,167,147,239,239, 11, 22, 86,128, 1, 87, 16,227, 67, 56, 7,174, 0,
-110, 39,180, 88,147, 99, 93, 10, 11,195, 3,196,120, 15, 74,191,149,192,221,219,244,193,254,247, 49,107,230, 27,228, 78,194, 21,
-100,100,228,160,109, 59, 87,248,250,247,196,134,141,155, 41,250,200,208,216,246,175,140,138,142, 24, 62,193, 81, 32,148, 0, 0,
-172,102, 19,118,190,211,233, 39,179,217,188, 27,192, 97, 0,186,255,250, 33,250,211, 27,195,179,217,108, 53, 0, 43,159,207, 63,
-132, 90,161, 53, 26,154, 63, 0,215,234,235,204, 90,125,221,217,131,152,197, 98, 45, 20, 10,133,191,242,120, 60, 13,143,199,211,
-136, 68,162, 95, 89, 44,214, 66, 0,226,191, 77, 25,247,117,176, 16, 12,203, 16,131,201,234,126,242, 86,137, 82,171,183,248,130,
- 97, 30, 74,118,182, 23,183, 72,147, 69, 69, 86, 25,173,158,223, 92,213,170, 42, 13,230, 0, 16,180, 72,179, 22, 14, 28, 14,231,
- 36,108,159,115,148,230, 15, 38, 61, 37, 1,199,143,173,193,210, 37, 19,241, 85,244, 52,220,189,115,185, 69,122, 1, 64,151, 46,
- 44,214,187,254,192, 0, 60,106, 7, 76,243,111,134, 34, 83,126,254,241,155,252, 31,247,125,158,255,221,154,105,228,200,138, 40,
-108,220,184, 49, 98,226,196,137,223,120,122,122,230, 3,120,142, 54, 90,127, 50, 38,147, 73, 89, 80, 80, 64,237,222,189,123,132,
- 76, 38,123,200, 98,177, 62, 0,192,249,175, 28,112,177, 88,124, 81, 42,149,170,101, 50,153, 90, 42,149, 94,111, 42,253, 95,138,
-175,179,179,115,186,163,163,227,189,218,137,206, 33,163,123,250,244,122,121,145, 83,224,200,126, 45,212,231,176, 88,172, 15,100,
- 50,217,195,221,187,119,143,200,206,206,166, 76, 38,147,210,142,237,251,202,229,242, 59, 87,174, 92, 89, 80, 80, 80,208, 47,243,
-242, 78,231,188, 43,219,157,211,255,183,166,127,236,241, 77, 11, 28, 28,100,183, 1,244,253, 91, 28,201, 42,171, 10, 12,102,120,
- 98,174, 86,152, 91,102, 82,197,165,105, 37, 0,179, 63, 12, 45,248, 19, 83,106, 85, 1,100,192,205, 44,157,232, 98,145,179,234,
-183,100,189, 20, 12, 70, 56,170, 40,151, 22, 23, 56, 12,198, 27, 86,171,117, 16,135,195,121,139,126, 66,253, 61,224,241, 56, 0,
- 33, 16,139,248, 0, 8, 24, 45,180, 70, 92, 6,163,215,197, 17, 35,150,206, 13, 9,153,229, 15, 12,111,192,108, 81, 0,222,244,
-247,247, 63, 1,224,133,167,184, 59,159,250,249,249,101, 3,152,253,180,202,165,206,157, 59,247, 12, 15, 15, 95,212,169, 83,167,
-126, 79, 75,243,223, 68,222,197, 45, 63,228,158,223,164,204,185,176, 89, 89,146,114,238, 77, 87,149,220,154,146,146,130, 97,195,
-134,225,243,207, 63, 23, 6, 5, 5,237, 1,224,246, 31,184,149, 66,107,254,224,163, 78, 27, 45,155,141,214, 88,111,244, 26,223,
- 6,103,159,247, 70,249,184, 54,168,120,169, 13,206, 63,235,141, 1,205,201,141,147,147, 19,250,246,237,203,204,206,206, 22,204,
-153, 51,103, 17,159,207, 79, 5, 48,184, 57, 90, 2,129, 32, 86, 40, 20,102,178, 88,172, 39,242, 34, 20, 10, 99, 69, 34, 81, 38,
-139,197, 26, 88, 59, 93, 34,145, 92,148, 74,165,106,137, 68,114,189, 1, 35, 20, 43,149, 74,213, 98,177, 56,182,118, 58,139,197,
- 26, 40, 22,139,179, 36, 18, 73,221,244, 1, 18,137, 36,179,110,122, 67,176,217,108,143,204,204, 76,101, 86, 86,150,146,203,229,
-170,106,167,103,100,100, 40, 51, 51, 51,159, 72,183, 7, 22,139, 53, 64, 36, 18,101, 10,133,194,216,250,210,235,238, 83, 67,212,
- 58,118, 3,108, 73,183,183,224,137,140,140, 60,159,155,155,235,233,224,224,240,196,196,221,142, 50,135,193, 95,239,220,252,206,
-200,161,145,111, 56, 7,140,234,208, 76,253,193,124, 62, 63,117,206,156, 57,139,178,179,179, 5, 61,122,244, 96, 50, 24,118,253,
-159,136, 24, 57,114,228, 17,181, 90,237,222,177, 99, 71,166,217,108, 70,226,209,133, 16,198,191, 5,126,234, 54,180, 18,228,179,
- 30,254,180,210, 35,178,127,151, 35,248,139, 27,131,146, 3, 1, 28, 80,214,190, 86, 66,156,239,100, 87, 57, 15, 27,241, 28,235,
- 70,166,206,217,100,177, 56, 2,204,254,228, 43, 47, 94,179, 52, 89,166, 62, 86, 66, 84,191,164,177,157,195,159,159,197, 60,147,
-198,114, 54, 89, 44, 78, 96,160, 95,115, 52,107, 95,254, 76, 38,243,157, 53,107,214, 48, 0,204, 4,192,253, 47, 25,154, 48, 55,
-184, 15,104,199,188, 26,234,138, 94, 79, 81, 54,168,250,126,247,109,169,208,142,175, 78, 96,242,212,104,180,247,239,222, 34, 29,
-131,213,122,247,219,148,148, 83, 47,181,107, 23, 53, 55, 36,100, 82, 61,102,139, 2, 48,119,229,202,149, 47, 39, 38, 38, 58,183,
-105,211,102,234, 83,250,211,191,126,229,202,149,239, 39, 38, 38,186,121,123,123, 47,182, 83,179,193,114, 73, 46,151, 15,222,177,
- 99,199, 59,195,134, 13,123,163,115,231,206, 29,158,134,230,191,152,207,111,222,188,233,185,102,205,154,121,147, 39, 79, 46, 3,
-128,129, 3, 7,114, 0,244,104,113,121, 71, 8,151, 16, 18, 78, 8, 25, 70, 8, 25, 72, 8, 9,171,126,223,181,122, 25, 70, 8,
-137,168,243,218,181,122,219,154,245,221, 26,208, 24, 86,119,187, 90,219,212,253,252,196,251,122,140,214, 48, 60,106,171, 53,236,
-137, 29, 56,118,236, 24,169,253, 90,151,113,222,248,120, 86, 79,119,237,157, 31,247,146,138,204, 20, 82,156,116,131,220,136, 94,
- 78,102,117,117,214,190,216, 6,159,218,127,188, 8,185,112,225, 2, 73, 76, 76, 36, 21, 21, 21,228,254,253,251,164, 91,183,110,
- 58,161, 80,248, 11, 0,111,123,196, 36, 18,137,250,151, 95,126, 33,145,145,145,165, 98,177,120,117,205,205, 37,149, 74,213, 23,
- 46, 92, 32,145,145,145,165, 18,137,100, 61, 0, 38, 0, 60,251,236,179, 26, 66, 8,113,118,118,206,169, 79,111,228,200,145,197,
-132, 16, 34,147,201,106,170,154,152, 18,137,100,253,140, 25, 51, 42,174, 93,187, 70,228,114,121, 77, 58, 67, 42,149,174,158, 57,
-115,102, 69, 92, 92, 92,237,244, 70,113,116,116,204,180, 88, 44,228,199, 31,127, 36, 74,165, 50,167,214,205,156,105,177, 88,200,
-145, 35, 71, 26,204, 91, 99,129, 2,177, 88,188,234,165,151, 94, 42, 79, 75, 75, 35, 78, 78, 78,234, 90,233,171, 39, 78,156, 88,
-158,145,145, 65, 20, 10,133, 77,121,116,114,114, 82, 95,188,120,145,140, 25, 51,166,172,246, 49,117,114,114, 82, 95,186,116,169,
- 38,125,149, 45, 5,153,155,155,219, 84,165, 82,153,163, 84, 42,115, 28, 28, 28,150,185,186,186,230,229,231,231, 19, 66, 8,105,
-219,182,173,166,118, 36, 75, 25, 52,226,237,109, 7, 46, 93, 57,151, 80,152, 31, 50,232,141, 85,178,144,145, 50, 59,142,129,183,
- 80, 40,252,165, 95,191,126,186,204,204, 76, 82, 89, 89, 73,226,227,227,201,133, 11, 23,200,131, 7, 15, 8, 0, 91,102, 24,144,
-136,197,226,108,189, 94,111,213,235,245,214,252,252,124,139, 70,163,177, 36,173,118, 37,228, 75,246,227,165,228,200,112,146,119,
-110,133, 85, 42, 22,102, 1,144,252,101, 70,107,115,160, 7,217,238,247,237,237,133,158, 73,231, 86, 62, 99, 34,105,103,200,222,
- 73,206,166,179,111,187, 63, 36, 91,253,191, 39,219, 3, 90, 53, 75,115,107,192,222,248,143, 60,239,110, 90,252,166, 41, 61, 61,
-157,188, 59,241, 25,243,233, 89,238,201,100,155,255,129,230,104,214, 98,252,232,209,163, 43, 50, 50, 50, 72, 96, 96, 96, 37,147,
-201,156,252, 95, 50, 89, 17,190,220,236,248,111,222,181, 14, 15, 18, 22, 62, 37,179, 21,164, 84, 42, 11,118,237,218, 69, 36, 18,
-137,166,185,102,107,236,168,254, 68, 87,250, 11, 25, 21, 21,214,232, 61,242,252,243,207,147,240,240,112, 50,107,214,172,166,238,
- 37,202, 31, 24,177, 59, 36,228,136,117,236, 88,203,238,144,144, 35,254,192,136,106,131, 69, 1,152,247,217,103,159,197,153, 76,
-166,184,175,190,250, 42,110,196,136, 17,113, 0,222,109,225,177,216,240,233,167,159, 18,147,201, 68,190,250,234, 43, 50, 98,196,
- 8, 2, 96, 99, 75,202,165,154, 72, 86,104,104,232,219,135, 15, 31,190,114,247,238,221,252,168,168,168, 85, 33, 33, 33,178,230,
-106,254, 29, 17,139,197, 62, 29, 58,116,216, 19, 24, 24,152,209,177, 99, 71, 67, 64, 64, 64,149,175,175,111, 90, 80, 80,208, 46,
- 30,143,231,221, 76,217,238,189,122,245,178,156, 61,123,150,140, 30, 61,154,212, 50, 33,141,210,152, 23, 33,132,132,205,155, 55,
-239, 3, 0,100,222,188,121, 31, 16, 66,134, 85,251,137, 97,181,223,215,125,173, 49, 79, 53,159,235,211,168, 89,234,211,172,239,
- 55,234,252, 14, 26,136,100, 77,249,221,206, 29, 59,118,172,223,177, 99,199,206,214,221,185,231,218,160,231,172,158,238, 58, 93,
-126, 46, 73, 88,254, 22,249, 53,220,131, 92,232,239, 66,238,189, 51,154,228,126,179,158, 76,239, 36,215,142,109,131,112,123,141,
- 86, 92, 92, 28,137,139,139, 35,215,175, 95, 39,169,169,169,164,180,180,148,124,247,221,119, 22, 39, 39, 39, 29,143,199, 91, 9,
- 64, 96,139,152, 84, 42, 85, 19, 66,136, 94,175, 39,203,150, 45,171,170,142, 84,169,100, 50,153,154, 16, 66, 74, 74, 74,200,202,
-149, 43,171,100, 50, 89, 60, 0, 55,133, 66,145,153,146,146, 66, 84, 42, 85,189,102, 70, 46,151,171,239,222,189, 91, 99,156,220,
-229,114,121,194,209,163, 71,141,132, 16,146,149,149, 69, 28, 29, 29,213, 0, 84, 78, 78, 78, 55,142, 29, 59,102, 36,132,144,156,
-156,156,154,116,155,140,150, 78,167, 35,167, 79,159,126, 34, 15, 53,233, 39, 78,156,120,194,128,217,128, 74, 38,147,197,125,247,
-221,119, 6,139,197, 66, 18, 18, 18,106, 76,162,202,193,193,225,250,129, 3, 7, 12, 22,139,133, 36, 37, 37,217,108, 6, 91,183,
-110,173, 33,132, 16,179,217, 76,182,109,219,166,175, 57,166, 53,233, 6,131,129,108,217,178, 69, 47,149, 74,227, 0, 52, 26,125,
- 83, 40, 20, 57, 6,131,129,148,148,148,144,110,221,186, 85, 92,184,112,129,148,149,149, 17, 66, 8,105,221,186,181, 6, 0,252,
-250, 77,254,228,202,253,138,178, 87,223,223,188,223, 59,236,197,229,167,174,102,103,237, 56, 28, 27,167, 8, 26,249,140, 45, 65,
- 77, 30,143,183,210,213,213,181,234,183,223,126,179, 24,141, 70,146,145,145, 65,174, 95,191,254,248, 26,187,117,235,150, 77, 70,
-139,197, 98, 45,188,114,229,138,209, 98,177, 88, 11, 10, 10, 44, 26,141,198,162,209,104,204,117,141, 22,249,146, 77, 10, 78,188,
- 78, 98,162,103, 27, 56, 28,206,194,191, 38,154, 5, 38,217,238, 55,146,108,247,139,219,245,146,162,160,252,250, 62, 66,126,154,
- 77,146, 63,105, 67, 22, 62, 35, 41,183,110,247,139, 35,219,253,199,146,143,251,177,236,210,140, 14, 24, 78,182,251,197,125,250,
-156, 87,225,141,184,107,228,236,217,179,100,203,250,207,200,172, 8,247, 74,235,118,191, 56,178, 53, 96,140, 61,154,181,225,241,
-120,247,207,159, 63, 79,206,157, 59, 71, 22, 47, 94, 76,132, 66, 97,198,211,136,234,145,173,190, 94,228, 11,223,126,100,103,123,
- 87,242,191,126,127,187, 14, 62, 97,110,112, 31,228,203,205, 42,184,113,152,144,162, 7, 36,111,117, 32,121,198,143,221, 82,179,
- 21,164, 84, 42,243,211,210,210, 72, 94, 94, 30, 89,187,118, 45,145, 74,165,205, 50, 91, 99, 71,245, 39,186,146,159, 27, 53, 90,
- 35, 71,142, 36,235,214,173, 35, 38,147,137,116,239,222,221,150, 63, 45,191, 51, 91,126,192, 72, 0, 31,172, 90,181,234,177,201,
-218,188,121,115,220,173, 91,183,226, 60, 61, 61,143,183,224, 88,108, 92,181,106,213, 99,147,181,121,243,102,114,235,214, 45,226,
-229,229,149,217,146,114,105,208,160, 65,159,164,166,166,150,205,159, 63,127,127,223,190,125,151,223,184,113, 35, 43, 38, 38, 38,
- 46, 52, 52,244,153,230,106, 62,133,168, 14,171, 58,178,195, 37,132,176, 9, 33, 53,230,149, 5,128, 93, 19, 80,176,133,151, 94,
-122, 73,216,179,103,207,184, 9, 19, 38,104,119,237,218, 69,210,210,210, 72,124,124, 60, 89,181,106, 21, 89,180,104, 17,249,242,
-203, 47,201,152, 49, 99, 42,187,117,235,118,101,236,216,177,124, 59,178, 25,232,237,237, 93,122,228,200, 17,178,119,239, 94,194,
-225,112, 98,108,221,176, 49, 47,210,144,153,106,200, 96,213, 93,215,136, 17,107,212,176,217,240,123,191, 55, 85,117, 35, 33,181,
-222,255, 47, 42, 42,170,223,239, 30, 62, 4, 75,166,204,249,132,159,186,107, 45,212,223,125, 14,102,137, 26,236,242, 66,232,207,
-199,192,116,254, 40, 94,238,209, 67, 32,160,168,165,246, 94, 48, 92, 46, 23, 92, 46, 23, 28, 14, 7, 90,173, 22, 57, 57, 57,232,
-221,187, 55,227,250,245,235,252,169, 83,167,206, 22, 8, 4, 25, 0, 70, 53,121, 55, 83,143, 34,210, 23, 47, 94,196,235,175,191,
-206,219,179,103, 79, 71,103,103,231,155, 22,139,133, 11, 0, 73, 73, 73, 24, 55,110, 28,111,223,190,125,193,110,110,110,215,141,
- 70,163,144,199,227,129,201,100, 54,168,199,229,114, 97, 50,153,120,237,219,183,143,191,121,243,102, 80, 84, 84, 20, 59, 61, 61,
- 29, 41, 41, 41, 48,153, 76, 92, 95, 95,223, 91,215,175, 95,239, 56,108,216, 48,118,102,102, 38,210,211,211, 31,231,195,150,252,
- 26, 12, 6,240,120, 60,212,174,210,162, 40, 10,122,189, 30, 92, 46,215,102, 45, 22,139, 53,192,223,223,255,214,205,155, 55, 67,
- 71,142, 28,201,185,118,237, 26,178,178,178, 96,177, 88,184, 1, 1, 1,183,110,222,188,217,105,196,136, 17,156,248,248,120,168,
-213,106,216, 90,133, 86,243,189,155, 55,111, 98,194,132, 9,220,147, 39, 79,118,114,117,117,141, 55,155,205, 92, 0,184,117,235,
- 22,198,141, 27,199, 61,117,234, 84,104,171, 86,173,226,155,168, 74,100, 2,128,201,100,194,212,169, 83, 69, 82,169, 20,153,153,
-153,176, 90,173,176, 88, 44, 0,128,194,226,194, 91, 55,111, 37, 36,189, 60,254,185,126, 58,163, 94,127,233,106,236,157,182,173,
-189, 60, 40,138,180,110, 34,171,163, 68, 34, 81,198,234,213,171,223, 78, 75, 75,227,249,251,251, 51,146,147,147, 81, 94, 94, 14,
- 14,135,243,248, 26,179,117,191,185, 92,110,255,192,192, 64, 86, 85, 85, 21,172, 86, 43, 0, 16, 6,163,254, 22, 43,252,146,243,
- 8, 80,153,217, 2,129,160,255, 95,242,244, 46, 11,116,130, 21,131,210,243, 13, 60,158,131,135, 68,236,234, 11,100,156, 67, 27,
-103, 30,152, 12, 38,255, 90,138, 86, 4,144, 65,240, 44,112,178, 79,211, 58, 40, 69, 99,224,153, 28,131,197,110, 30,158, 40, 44,
- 44, 68,171,182,254,168,226, 58,115, 47, 62,168, 20,131,178, 83,243,255,233,211,190,125,123, 23, 31, 31, 31, 20, 20, 20, 32, 52,
- 52, 20,114,185, 92, 14, 96, 80,179, 31, 58, 95,121,241, 80,134, 94, 0, 99, 53, 44,212, 98,152, 88, 43,240, 32, 63,148,108, 15,
-101,255,157, 76,150, 84,204,189,188,239,219,239,220,157, 60, 3,128,152, 87,161,114,224, 97,231, 27,161,142,206, 50,222,145,102,
-154,173, 32,149, 74,117,230,202,149, 43, 10, 62,159,143,235,215,175, 35, 48, 48, 16,107,215,174,117,150,203,229,231,154, 23,217,
- 34, 32, 84,195, 38,171,111,223,190,152, 57,115, 38,246,236,217, 3, 71, 71, 71, 76,152, 48,161, 41,179, 69,146,128, 31, 63,141,
-143,255,106,207,195,135,199, 94,106,215, 46,106,130,175,239,178,105, 47,188, 48,249,205, 55,223,196,103,159,125,134, 35, 71,142,
-160, 87,175, 94,152, 50,101,138, 41, 35, 35, 99,119,115,171,170, 86,175, 94, 61,107,246,236,217,117, 53,141,233,233,233,159,182,
-168, 92, 42, 44,188, 21, 31, 31,159, 52,126,252,248,126, 85, 85, 85,250,171, 87,175,222,241,246,246,246, 0,208,186,185,154, 45,
- 48, 88, 20, 33,132, 15, 64, 88,189,136, 0, 8,247,237,219, 39, 27, 57,114,164,180, 58, 77, 80,189, 52, 89,189, 31, 24, 24,232,
-113,255,254,253,236,119,222,121, 39,116,207,158, 61, 2,161, 80,136,146,146, 18,124,241,197, 23,248,224,131, 15, 64, 81, 20, 8,
- 33,248,242,203, 47,133,147, 38, 77, 10,123,248,240, 97,182,151,151,151, 45, 77, 90,120, 98,177,248,192,178,101,203,164, 86,171,
- 21,115,231,206, 45, 48, 26,141, 51,171,215,205,119,112,112,184,140, 71,134,187, 49,234,245, 34,181,158,149,199,234, 28,155,168,
-186,105,117,215, 17, 66,162, 26,211,176,243, 92,212,247,123, 49,141,153,173,218, 79,160,254,245,186, 72, 32,196,197,219, 15,165,
- 63, 29,128,128, 69, 65,192,172, 94, 88, 20, 24,201,183,208,138,207,134,137,144,160,230, 26,173,154,133,205,102, 67,171,213,194,
- 98,177,224,131, 15, 62,224,157, 62,125,218,137,193, 96,124,223,148, 78,109,195,116,239,222, 61, 4, 4, 4, 80, 63,254,248,163,
-106,230,204,153,130,154,223, 41, 45, 45,133,143,143, 15,117,226,196, 9,229, 71, 31,125, 36,110,204,204, 80, 20, 5, 14,135,131,
-217,179,103, 11,174, 94,189,234,232,230,230,134,228,228,100, 20, 21, 21, 65, 44, 22, 99,246,236,217,130, 43, 87,174, 56,187,185,
-185, 33, 45, 45, 13,165,165,165, 16,139,197,118, 27, 45, 14,135,243,196, 54, 20, 69,193,104, 52,218,101, 12,100, 50,217,222,184,
-184, 56,103,153, 76,134,248,248,120,152,205,102,200,100, 50,204,154, 53, 75, 16, 23, 23,231,236,224,224,128,164,164, 36, 16, 66,
- 32,149, 74,237,202, 35, 0, 88,173, 86, 36, 37, 37,161,117,235,214, 56,119,238,156,114,218,180,105,252,154,244, 7, 15, 30,192,
-195,195, 3,231,206,157, 83,138, 68,162,189, 13,105, 89,173, 86,228,230,230, 34, 49, 49, 17,201,201,201,200,207,207, 71, 65, 65,
- 1,202,203,203, 97, 54,155, 1, 0,194,242,178,152,125,251,127,188, 41, 16, 8,132,129,190,237, 61,111, 37,220,214, 8, 4, 2,
-161,151,167,167, 47,240, 49,163, 17, 67,248,125,122,122,186,211,164, 73,147, 56,121,121,121, 40, 46, 46, 6,139,197,250,221,181,
-197,229,218,214, 20,200,108, 54, 7,240,249,124,202,104, 52, 62,142,128,113,185, 92,188,189, 87,139,192,133,120, 98,121, 97,189,
- 6,196, 98,130,193, 96, 8,248,211,163, 89, 0, 5,202,208, 30, 20, 21,122, 57,185,210,177, 79,212,120, 14, 82, 78, 2, 86, 19,
-192, 96,161,127,136, 7,235,200,173, 74, 21, 8, 66,160,135, 63, 33, 77,247,252, 34, 0, 5, 24,125, 0,170,203,233,251,102,167,
- 94,163,223,224,100,103,103,131,195,225,128,199,227, 33,116,192,179,172,125, 55, 77, 46,160,208, 17, 70,248,217,162,249, 68,216,
- 81, 32, 88,176,104,209, 34, 81,109,205,201,147, 39,139,100, 50,217,162,102,155,172, 74, 97, 15,152,201,236,196,108,109,235,101,
- 49,121, 1, 15, 53, 58, 63, 16,242, 14, 96,234,244, 20,204, 86,127, 30,143,151, 2,160,119,139, 76,150,132,123,233,219,111,191,
-115,119,108,245,200,100,193, 92, 5,176, 5,112,113,118,192,206,183,195, 29,157, 29, 4,246,154,173, 32,149, 74,245,203,229,203,
-151, 21,124, 62, 31,113,113,113,224,112, 56,224,243,249,232,208,161, 3,182,111,223,238,236,232,232,104,183,217, 34, 32,245,198,
-124, 71,141, 26, 69,250,246,237,139, 25, 51,102, 96,247,238,221, 48, 24, 12, 88,182,108, 25,210,211,211,109,146, 77, 2,126, 92,
- 25, 31,191,107, 69, 98,226,189,121, 65, 65,254,163, 68, 34,199, 25, 19, 38,200, 62,250,232,163, 99, 71,143, 30,253,106,216,176,
- 97, 5, 87,175, 94, 93, 7,224,128,157,135,151, 2,176,121,205,154, 53, 51,106,140,219, 71, 31,125,244,229,209,163, 71, 87, 12,
- 27, 54, 44,247,234,213,171,239, 0,216,220,146,114,201,106,181,198,124,255,253,247, 55, 5, 2,129,208,207,207,207, 51, 33, 33,
- 65, 35, 16, 8,132,158,158,158,190,253,250,245, 99, 52, 71,179, 57, 40,149,202,129,151, 47, 95, 14,196,163, 78, 99,188, 26,163,
-149,144,144,224, 80, 86, 86,230, 32, 22,139, 29, 92, 93, 93, 37, 53,102,107,244,232,209, 14, 44, 22,171,209,235,182,162,162,226,
-232,252,249,243,101,163, 71,143,174,249,140,243,231,207, 99,247,238,221, 16,137, 68, 79,124,119,196,136, 17,120,253,245,215,229,
- 6,131,225,123, 27,178, 59,113,234,212,169,126, 42,149, 10, 11, 22, 44,208,103,103,103, 15, 4,144, 14, 64, 22, 17, 17,241, 73,
- 66, 66, 66,183,176,176,176,253, 0, 58, 55,118,239,213,231, 69,106, 27, 29, 91,210,154,251,125, 91,205, 86,157,164, 6,199,208,
-122,194,104, 69, 69, 69,157, 69, 3, 61,169,140, 69,106,240, 96,129,128, 73, 65,200,172,101,182, 96, 5,171, 84, 3,170, 25,189,
- 84,234,123, 24,114,185, 92, 48,153, 76, 24, 12, 6,216, 58, 81,117,141, 41,144, 74,165, 16,139,197,208,233,116, 48,155,205,224,
-243,249, 53,102, 4, 82,169, 20,108, 54, 27,108, 54, 27,124, 62,255,119,209,164,186,209, 28, 14,135, 3,145, 72,132,220,220, 92,
-164,167,167,195,106,181, 66, 44, 22, 67, 36, 18,129,203,229, 34, 39, 39, 7, 57, 57, 57, 32,132, 64, 36, 18, 65, 36, 18,193,158,
- 6,215, 22,139,165,222,135,191,201,100,178, 43,162,101, 54,155,113,231,206, 29,100,100,100,128,207,231, 63,222, 87, 30,143,135,
- 7, 15, 30, 32, 47, 47, 15, 66,161, 16, 82,169, 20, 50,153,204,102,221,154,125,145, 72, 36, 16, 8, 4, 40, 46, 46,134, 86,171,
-125,124, 76,165, 82, 41, 68, 34, 17, 74, 75, 75,161,209,104, 26,221,119,139,197,130,156,156, 28,228,231,231, 35, 51, 51, 19, 5,
- 5, 5,143, 11,160,234,168, 81,203, 2, 59,101,101, 40, 44, 44,124, 28,137,108,104,177, 5,171,213,138,242,242,114, 92,190,124,
-153,178, 90,173, 40, 41, 41,177,230,231,229, 89,166,231,112,113,228,227,173,228,187,147, 55,170,246, 29,143,211, 29,250, 37, 81,
-183,249,208, 45, 29,191,219, 98, 51,254, 10,182, 4,201, 96, 98, 71, 22, 84,152,120,249, 70,142, 76, 21, 20, 1,164,156, 0, 24,
- 44,128, 47, 71,247,224, 54, 72, 47,182,136,238,170, 13,124, 80, 24,140,205,190,114,155, 52, 45,236, 65,249,229, 38, 94,154,209,
- 89, 26, 16,210, 25,106,181, 26, 60, 30, 15, 60, 30, 15, 93,122, 69, 32,165,208, 34,188,157,173, 19,130, 32,210, 38,205,255,167,
-173, 88, 44,238,209,187,119,111,170,182,230,208,161, 67, 65, 81, 84, 7, 0,254,118, 21,114, 27,219,114, 97, 20,118, 7,139,204,
-190,157,171,117, 59,146, 80,229, 59,124,212,179,142, 27,126,214, 4,220,201,211,123,131,152,230,128, 24, 59,183,192,108,245,147,
- 72, 36,199, 54,109,218,228,205,231,243, 79, 0,232,211, 28, 17,177,128,185,109,193,140,241,238,242, 26,147,101,210, 2, 44, 1,
-192, 22, 0, 44, 1, 92,148, 10, 44,125,125,144,163,144,207, 62,100,135, 97,221,183,121,243,102,231,186, 38,171,102, 9, 13, 13,
-197,194,133, 11,157, 29, 29, 29,247,218,162,183,122,213,103,164,164,180, 20, 32, 64, 89, 89, 5, 86,175,250,172,184,102,221,232,
-209,163, 73,159, 62,125, 48, 99,198, 12,172, 88,177, 2,199,143, 31, 71,247,238,221, 49,101,202, 20,132,133,133, 53, 37, 29, 41,
-147,201,246, 68, 68, 68, 92,206,145, 72, 94,207,237,220,153,251,139, 76, 86, 58,176,180, 84,230,149,144, 96,244, 3,110, 1,216,
-146,149,149,245,140, 29, 38,235, 5,169, 84, 26, 55,112,224, 64,163, 68, 34,201, 88,187,118,237,244,153, 51,103,226,179,207, 62,
-195,252,249,243,191, 0,240, 26,128, 15,179,178,178,220, 26, 51, 89,127, 84,185,244, 71,149,117, 22,139, 37,243,192,129, 3, 97,
- 70,163,209,163,186,122,144, 87, 82, 82, 34, 45, 42, 42,146, 24,141, 70,145,213,106, 21, 57, 56, 56,136, 1, 8, 95,126,249,101,
-214,237,219,183, 3,204,102,115,118, 99,154,121,121,121, 47,206,157, 59,183,160,160,160, 0, 0,208,161, 67, 7,148,148,148,224,
-221,119,223,197, 91,111, 61,234, 16,220,169, 83, 39, 16, 66,160, 86,171,177,122,245,106,117, 94, 94,222, 43, 54,100,183, 93,251,
-246,237,145,144,144,128, 59,119,238,252, 12,192,138, 71,237, 88, 75,111,220,184,113, 51, 63, 63, 31,123,247,238,229,184,187,187,
- 31, 69, 3, 67,188, 52,230, 69,154, 3, 69, 81, 49,205,217,174, 38,114, 85, 95, 68,172, 1, 26,143,104, 69, 69, 69, 81,181, 95,
-159,136, 24, 81,136,207,136, 61, 7,199,160,206, 79, 68,179,132, 76, 10, 2,169, 12, 41,153,233,224,128, 74,124, 90, 70,171,184,
-184, 24,211,167, 79,215,189,248,226,139,133, 86,171,245, 89, 91, 77,129, 76, 38,131, 76, 38,195,237,219,183,201,152, 49, 99,212,
-107,215,174,213,213, 54, 90,247,238,221, 35,145,145,145,154, 69,139, 22, 85, 52,102,180,106, 34, 90, 43, 87,174,212,245,239,223,
- 63, 63, 49, 49,145,212,152, 41,177, 88,140,213,171, 87,235,194,195,195,213,215,174, 93, 35, 53,105,246, 68,180, 24, 12,198, 99,
-163, 85,123, 27, 6,131, 1,171,213,106,151,209,170,172,172,124,113,216,176, 97,234,164,164, 36, 82,179,159, 50,153, 12,107,215,
-174,213, 13, 26, 52, 72,157,152,152, 72,106,210,164, 82,169,205,102,176,230,247, 37, 18, 9,164, 82, 41,110,223,190, 77, 34, 35,
- 35,213, 27, 55,110,172,170,157,126,231,206, 29, 50, 98,196, 8,117,121,121,249,139,141,153,151,154,234, 60,179,217,140,170,170,
- 42, 20, 20, 20, 32, 51, 51,243,113, 56, 93, 39,146, 62, 51,254,249,225, 29,117, 58,157,246,246,189,251, 25, 29,130, 3,149, 58,
-157, 78,155,158,145,113, 15,248,216,218,136,246,179, 65, 65, 65,133,211,167, 79,215, 21, 23, 23,183,216,104,113,185,220, 36, 22,
-139, 69,250,244,233, 67, 12, 6, 3,201,204,204, 52, 21, 20, 23,155,253,151, 47, 39,137,111,191, 77, 9, 98, 99,121, 98,177,152,
-170,214,100, 36, 39, 39, 91, 5, 2, 65,210,159,110,180, 24, 86, 23, 80,164,247,111,247, 43, 28, 6, 13, 31,199,165,242,174, 2,
-198, 10,128, 39, 7,120,114,176, 68, 78, 24,210,167, 19,115,215,229, 50, 23, 16,107, 79,112,120, 30, 77,106,178,137, 10,176,246,
-249,233, 94,149,188,247,216, 89,220,162,162, 34, 48,153,204,199,166, 72, 40, 18, 97,224,168,151, 25, 95, 94,213,187, 0,164, 23,
- 40,166,135, 29,247,250,251, 11, 22, 44,224, 20, 23, 23,131,193, 96,252,191,166, 80,136,105,211,166,241,164, 82,233,124,155, 11,
-191, 3, 1, 28,176,121,221, 1,242,214,221,188, 42,183,163,183,116,126,115, 86,238, 20, 4,117, 10,195,212,254, 74,193,202, 24,
- 77,208,205, 76, 93, 27,192,242, 54,204,134, 46,205, 48, 91,125, 36, 18, 73, 76,108,108,172,112,232,208,161, 88,189,122,181, 72,
- 32, 16,156,104, 78,193, 95, 89, 97,153,185,100,227,215,234,248,117,131, 1, 99,229, 35,131, 85,107,209, 84, 88,177,112,231,153,
- 82,147,137,140,183, 85, 83,167,211, 77,124,237,181,215, 10, 15, 29, 58,244, 59,147,197,231,243,145,154,154,138,101,203,150, 21,
- 21, 21, 21, 53,249, 80, 92,187,102,117, 92,194,205, 95,241,229, 23, 75, 0, 16,108, 90,251, 6, 46,253,246,173, 67,255,126,125,
- 73,235,214,173, 73, 88, 88, 24,166, 79,159,142,165, 75,151,226,238,221,187, 80, 40, 20,120,227,141, 55,208,175, 95, 63,172, 89,
-179,166,177, 66, 42,114,230,204,153,203,178,178,178,252,126,250,233, 39, 86,126,126,190,114,205,142, 29,165, 7, 75, 75,139, 86,
- 36, 36,220,253, 48, 56,184,253,188,144,144, 87, 26, 25,250,161, 94,147, 53, 99,198,140,125, 89, 89, 89,161, 63,255,252, 51, 59,
- 63, 63,223, 99,198,140, 25, 88,181,106, 21,230,207,159,191, 29,192, 84,216,214,225,197,230,114,137,201,100, 62,243,236,179,207,
-118,212,233,116,218,187,119,239,102, 4, 7, 7, 43,117, 58,157, 54, 35, 35,227,222,217,179,103,173,205,209,108, 14,133,133,133,
- 15,247,238,221,123,111,214,106, 89,229, 44, 0, 0, 32, 0, 73, 68, 65, 84,172, 89,161, 89, 89, 89, 1, 0,156,202,203,203, 69,
-229,229,229, 60,131,193, 32,144,203,229,242, 78,157, 58, 41,166, 76,153, 34,190,113,227, 70, 64, 86, 86, 86, 69,117, 20,169, 65,
-140, 70,227,221,226,226,226,168,193,131, 7,151, 20, 23, 23, 35, 36, 36, 4,195,135, 15,135,139,139, 11,220,220,220, 48,114,228,
- 72,248,250,250,162,176,176, 16,227,199,143, 47,202,207,207, 31, 12, 32,217,134,236, 62,204,203,203, 67,207,158, 61,177,100,201,
-146,168,231,158,123, 46,177, 79,159, 62,101,193,193,193, 90, 15, 15, 15,255, 13, 27, 54,192,221,221, 29, 7, 14, 28,112,229,241,
-120,123,235, 49, 89, 13,122, 17, 0,249,213,134,199, 80,231, 53,191,137,117,182,110, 91,239,123, 27,190, 87,215,108,213, 94,126,
- 87,117, 88,255, 9, 1, 22,238, 62,176,171,138,235,233, 3,153, 95, 71, 8,249,124, 8,184, 92, 8,228, 78,208, 91,173,216,145,
-154,167,173, 36,100,190,189, 23, 79,221, 7, 33, 69, 81,248,252,243,207,205, 61,122,244,168, 58,115,230,204, 38,157, 78,231,137,
- 71,163,202,218,108, 10, 54,110,220,168,157, 61,123,246, 77,141, 70,211,145,207,231, 27,106,210, 55,109,218,164,125,249,229,151,
- 19,178,178,178, 66,133, 66,161,182,161,246, 89,181,141, 22,143,199,211,107, 52,154,176,201,147, 39, 39,109,217,178,165, 82, 40,
- 20, 66, 36, 18,129,199,227, 25, 52, 26, 77,199,233,211,167,223, 92,181,106,149, 86, 32, 16, 64, 36, 18,217, 85, 45, 71, 8,249,
-157,161,170,157,110, 43,102,179,249,140, 70,163,233, 56,123,246,236, 27, 27, 54,108,168,172, 49, 64,181,243,184,102,205, 26,173,
- 88, 44,182, 43,162, 85,243, 61,145, 72,132,245,235,215,107,103,205,154,117, 83,163,209,116,228,241,120,134, 90,233,149, 51,103,
-206,188,161,209,104, 58,154,205,230, 51,141,252, 27,179,148,149,149,129,197, 98, 33, 33, 33, 65,207,225,112,192, 96, 48,240,224,
-193,131,199,133,143,163,163, 99, 96,199, 14,193,254, 95,239, 59,112, 86,192,225,241,122,132,117, 9, 72, 78, 75,207, 34,132, 74,
-107, 34,171,135,117, 58,157,231,153, 51,103, 54,245,232,209,163,234,243,207, 63, 55, 55, 20,217,178, 5,189, 94,127,246,250,245,
-235, 38, 62,159, 79,229,230,230,154,153, 76, 38, 44, 22, 11,209,135,133,233, 59,108,216, 64,110,207,155, 71, 73, 69, 34, 22,135,
-195,129, 80, 40,164, 78,158, 60,105,208,106,181,103,255,124,163, 5, 33, 40, 8,238,107,244, 18, 62,195, 76,225,222,225, 71, 38,
-139,239, 0,240,229, 0, 95, 14,119,119, 15, 92, 77,213, 74,192, 0, 23, 22, 27,198, 16, 35, 68, 4, 10,194, 4, 53, 36,108,174,
-128,202,203,203,123,108,136,106, 22,111,159, 0, 92, 79,175, 16,131, 34, 60, 48, 97,207, 16, 36, 81, 78, 78, 78,172,220,220,220,
-223,105, 6, 6, 6, 50, 77, 38,147,237, 67,187,228, 88, 92, 1,235,140,123,121, 85,174, 63,220,172,244,123,123,197,151, 2,129,
-165, 4,136,221,136,160,182,110,120,123,108, 39,238, 71, 71,243,131,174,165,105,219,130, 73,166,194, 90,225,108, 71, 62,123, 75,
- 36,146, 19,215,174, 93, 19, 74, 36, 18, 36, 39, 39, 35, 44, 44, 12,209,209,209, 66,161, 80,120, 28,128, 93,237,241,174,168,145,
- 94, 81,110,233,241,254,129,140,188,248, 92,243, 19, 38, 43,191,146,224,181, 79,143,150, 20,151, 85, 61,123, 57,179,225,251,167,
- 30,110,148,148,148, 68,206,159, 63,191, 48, 63, 63,255, 9,147,149,158,158, 94,243, 80,236, 15,160,201, 63,191,255,251,245, 84,
-232,242,165,179,113, 45, 54, 17, 67,162,222,194,245,248,135,248,112,238, 40, 56, 72, 5, 56,115,230, 12, 70,143, 30,141, 37, 75,
-150,224,193,131, 7,248,238,187,239,168,232,232,104,234,242,229,203,212,167,159,126, 74, 53,209,164, 97,194,138, 21, 43,112,237,
-218, 53, 12, 29, 58, 20,231,206,157, 67, 81, 81, 17,190, 61,113,226,254,222,251,247, 63,172,105,179,213,192,208, 15,245, 34,149,
- 74,231,172, 88,177, 2,177,177,177,143, 53, 11, 11, 11,177, 98,197,138, 44, 0,111,216, 99,178,236, 41,151, 66, 66, 66,252,247,
-237,219,119,150,207,231,243,194,194,194, 2, 82, 83, 83,179, 0,164, 53, 67,179,172, 37, 53, 85, 5, 5, 5, 23,163,163,163, 47,
- 15, 24, 48, 64, 56,113,226, 68,231, 35, 71,142, 56,105,181, 90, 55, 30,143,167, 52, 24, 12,220, 59,119,238, 48, 15, 30, 60,232,
-114,251,246,237,212,170,170,170,171,182, 28, 15,141, 70,115,245,238,221,187,131, 67, 66, 66,238,108,218,180, 41,203,213,213,213,
- 58,101,202, 20,188,246,218,107,112,118,118,182,172, 95,191, 62,163, 79,159, 62, 9, 15, 31, 62,140,208,106,181,183,108,204,235,
- 87,203,151, 47,191,176,111,223, 62, 12, 31, 62, 28,159,126,250, 41,190,253,246, 91,252,250,235,175,130,223,126,251,141, 27, 29,
- 29, 13, 14,135,131,238,221,187, 35, 50, 50,114, 96,117,117,167,173,207,165,107, 20, 69,197, 80, 20,245,115,157,215,107,141,173,
-179, 99,219,134,222, 55,250,189, 58,217,140,174,179,216,206,132,182,248,120, 90,176, 68,123,241,165,238, 36,111, 74,111,162, 30,
- 23, 64,206,247,115, 36,147,219, 81,149, 19,155, 57,188,131, 78,167,123,188, 28, 58,116,136,184,184,184, 84, 74, 36, 18,187,135,
-119,112,113,113, 81,151,149,149,145,174, 93,187, 22, 57, 59, 59, 63, 30,138,192,213,213, 85, 93, 89, 89, 73,186,119,239, 94,164,
- 84, 42, 31, 15,239,224,225,225,145, 73, 8, 33, 94, 94, 94, 57, 13,233,153,205,102,226,226,226, 82,211, 67,143,237,232,232,184,
-181, 91,183,110, 69,106,181,154,184,186,186, 62, 30, 58,193,217,217,121,117, 88, 88, 88,221,244,166,242,155,153,149,149, 69,178,
-178,178, 72,171, 86,173,114,106,167,167,167,167,147,244,244,116,226,225,225, 97,247,240, 14,206,206,206,171,234,201, 75,179,242,
-232,233,233,169,214,233,116,164,103,207,158, 79, 28, 83, 79, 79, 79,117, 85, 85, 85, 77,186, 77,195, 59, 8, 4,130,169,124, 62,
- 63,135,207,231,231,240,120,188,101,173, 91,183,214,236,223,191,159,172, 95,191,190,166, 75, 58,156, 3, 71,244,240,233,249,202,
-135,206,129, 35,231,180,100,120, 7,137, 68,242,139,139,139, 75,229,161, 67,135,158,184,190,116, 58,157,205,195, 59, 8, 4,130,
-172,138,138, 10,171, 90,173, 54, 93,184,112, 65, 27, 27, 27,171, 77, 72, 72,208,166,166,166,234, 10, 53, 26,163, 90,173,214,149,
-150,150,234,111,222,188,169, 23, 10,255,154,225, 29, 72,180,175, 15,217,234,127,244,225, 18,239,219,179,251, 10,171,110, 45,237,
- 72,200,247,163, 9, 57,254, 26, 33,103,222, 39, 87,183, 79, 33, 61,189,121,150, 11,239,182,186, 71,182,249,253, 96,203,144, 12,
- 36,186,131, 15,217,234,127,252,254, 98,239,219, 19,251,184, 85,237,216,178,158, 92,185,114,133, 36, 36, 36,144,228,228,100,114,
-252,240,126,210,179,173,240,145,230, 86,255,163,118, 14,243,208,139,199,227, 85,172, 93,187,150, 92,190,124,249,177,230,209,163,
- 71,137, 80, 40,212, 2,182,245, 90, 38, 0, 69,182, 6,142, 50,111,241,251,237,163, 65,226,242,194, 99,239, 19,114,107, 23, 33,
-209, 65,132,124,213,141,144,253,195, 8,249,241, 21,114,121,253, 88,210,203,155, 99, 34,219,252,206,145,237,129, 54, 55,182,103,
-179,217,101,135, 14, 29, 34, 57, 57, 57,228,220,185,115, 36, 54, 54,150, 36, 37, 37,145,140,140, 12, 18, 19, 19, 67,216,108,118,
- 21,154, 49,109, 89, 55, 21,188, 34,218,115,114,111,174,236, 69,200,145,241, 36,127,239, 4, 18, 21, 44, 41,234,222,170, 69,227,
-209,117,114,114,114, 42,136,137,137, 33,169,169,169,228,236,217,179, 68,169, 84, 22, 0,176,185,189,108,212,144, 62,132, 24,110,
-146,240,190,193, 36, 36, 36,152,244,235,213,158,100, 63,220, 72,194, 58,183, 38, 91,183,110, 37,106,181,154,180,110,221,154,216,
-155,177,136,136,136, 43,132,144,184,161, 67,135,198, 1, 56, 25, 17, 17, 17,151,146,146, 18, 23, 22, 22,118, 25,141, 15,253,208,
- 32, 3, 7, 14, 52, 18, 66,200,208,161, 67, 9,128,156,136,136, 8,146,146,146, 66,194,194,194, 12,205, 57,120,182,148, 75,161,
-161,161, 61, 6, 12, 24,240, 97,104,104,232, 28, 91,134,119,104, 66,243,105, 13, 66,205,196,163,193, 63, 3, 1,116,169, 94, 2,
-170,211,152, 45,208,124,133,205,102,239,112,116,116,252, 85, 46,151,159, 97, 50,153,209, 0, 94, 66,243,198, 55, 99, 84, 71, 24,
- 79, 59, 59, 59, 63, 8, 9, 9,209, 13, 30, 60,152, 12, 25, 50,132,204,152, 49,131, 88,173, 86,178,127,255,126,178,100,201, 18,
-210,206,201,201,188, 30, 40,216, 6, 76, 2,205,163, 1, 75, 39,181,165,206,190,216, 6,229,227,219,160,226,213,118,148, 45, 3,
-150, 70, 52,100,180,172, 86, 43,185,119,239, 30, 9, 15, 15,175, 20,137, 68,217,176,125,192,210, 39, 52, 21, 10, 69,172, 82,169,
-252,221, 32,154,181,210,159, 24,176, 84,169, 84, 94,116,117,117, 85, 59, 59, 59, 95,175, 79, 83,161, 80,196,186,186,186,170, 21,
- 10,197, 19,131,123, 50,153,204,161, 10,133, 34,187,110, 58,139,197, 26,160, 84, 42, 51,235,166, 55,176,239,112,113,113,201,204,
-201,201, 33,249,249,249,196,211,211, 51,167,174, 1,203,203,203,123,194,128,217,162,217, 84, 94, 26,201, 99,189,154, 54, 28,211,
-230,156,247, 26,124,221,221,221, 53,107,214,172, 33, 98,177,248,137, 46,207,126,125, 95, 93,112,229,126, 69,217,107,115,183,238,
-175,103,192, 82, 91, 7, 7, 29, 44, 18,137,178,195,195,195, 43,239,221,187, 71,172, 86, 43,177, 90,173, 13, 25,173,250, 52,159,
-233,210,165, 75, 97, 65, 65,129,165,188,188,220,156,153,153,169, 79, 73, 73,209, 45, 93,186,212,152,159,159, 95, 85, 81, 81, 97,
-136,143,143,215,187,186,186,230, 3,120,198,222,115,212, 76, 34,234, 86,159,145,237, 1,189,200,182,128,152,164, 69, 94,119, 94,
-233, 38,210,199,173, 25, 74,200,153,247,201,229,173,175,145, 30,222,220, 71,134,104,187,255, 9,242,165,111, 95,178,177, 45,215,
- 38,205, 29,237,250,144,237,254, 39,110, 47,244,186, 51,186,179,179, 97,223,174,237,228,193,131, 7,228,232,193,189,164,123,155,
-106,147,181, 45,224, 52,217, 26, 16,110,139,102,125,102,107,231,206,157,228,193,131, 7,228,135, 31,126,176,213,100, 69,212,103,
-180, 62,136, 16,151,188,214,141,175, 31,223,137,107, 24, 25,196, 49, 70,250,112,204, 61,189, 88,150,142,174, 12,107,128, 51, 72,
-164,159, 64, 79,182,249,157, 35,219, 2, 6,219,154, 79, 46,151,155,129, 90, 99,234,212, 93,120, 60, 94,126, 35, 70, 43,162, 73,
-179,229,203,203,253,101,201, 0, 50, 60, 68, 82,104,163,201,106,234, 90,234,164, 80, 40, 10,190,250,234, 43,162, 82,169,242,109,
- 52, 89,143, 53, 71, 68, 69,146,244,135,199,201, 15,251, 87,144,240,190, 1,100,207,206,217,228,202,185, 69,100,216,144,112, 18,
- 17, 17, 65, 10, 10, 10,200,128, 1, 3,136,189,249,148,201,100,123, 42, 42, 42,226, 78,157, 58, 21, 23, 17, 17, 17,183,103,207,
-158,184,243,231,207,199, 9,133,194, 61, 53,193,137,186,102, 43,224,247,229,127, 68,157,136, 86, 92,121,121, 57, 57,117,234, 20,
-137,136,136, 32,123,246,236, 33,231,207,159, 39, 66,161, 48,174,185,247,145,173,229,210,160, 65,131, 22,164,166,166,150, 45, 92,
-184,112,127, 61, 3,150,218,170,249,224, 41,229,243,169,148, 33,127,129,166, 68, 32, 16,196,221,188,121,147, 20, 23, 23,147, 96,
-149,138, 44,103, 50, 73, 22,135, 67,114, 56, 28,178, 21, 40,250, 23,216,164, 41, 13, 85, 29,254,209,212,107,180,170,170,170,200,
-187,239,190,107,224,243,249, 90, 14,135, 99,239, 20, 60,255,232,139, 80,161, 80, 92, 84,169, 84,106,149, 74,245,132,217,171,157,
-174, 80, 40,174,255,203,111, 64, 95, 14,135,147,206,102,179,159,156,130, 39,112, 68,143,118,189, 38,206, 87, 5,141, 24,210,194,
-124,114, 56, 28,206, 7,124, 62, 95,251,238,187,239, 26, 42, 42, 42,236, 49, 90, 0, 48, 72, 40, 20,102,239,222,189, 91,119,255,
-254,125, 83, 81, 81,145,249,202,149, 43,166,216,216, 88,195,199, 31,127, 92, 46, 20, 10,179,209,240,176, 4,127,202,241, 36, 27,
-219,114,107,204,214,173,249, 94, 73,195,131,133,198,232,119, 34, 73,143,214,117, 76, 86,195, 35,185,215,175, 89,109,182,110,124,
-228,153, 20,238, 43, 54,175,152,255, 54,233,222, 70,240,164,201,178, 67,179,174,217, 18, 10,133,229,139, 22, 45,178, 39,146,245,
-164, 33,220,225,231, 73,182,251,239,121,100,162,154, 88,182,250,125, 65, 62,247,243,252,187,220, 71,221, 84,240, 26,232,203, 75,
-180, 35,146,101, 75, 62, 59,201,229,242, 59,118, 68,178, 30,107,126,254,249, 38, 50, 97,220, 32,242,240,206, 33, 82, 81,120,156,
- 92,191,180,150,140, 25, 17, 74,186,119, 15, 35,219,183,111, 39,119,239,222, 37, 93,187,118, 37,205,200,103,228,180,105,211,226,
- 82, 82, 82,226,146,147,147,227,206,159, 63, 31, 55,106,212,168, 56, 0,145,181,107,130,106,204,150,113,204, 24,125, 39, 6,227,
-237, 38, 52, 95,152, 54,109, 26, 73, 73, 73, 33,201,201,201,228,252,249,243,100,212,168, 81, 4,246, 77,223,211,172,114, 41, 52,
- 52,180, 71,120,120,248,252,206,157, 59, 15,121, 90,154,255, 65,163, 37, 26, 61,122,180,213, 98,177,144, 33, 67,134, 88, 54, 0,
- 37,209, 20,165,142,166, 40,245,118, 32,255,223, 30,209,250,163, 39,252,140, 0,240,115,237, 4, 62,159,175,174,170,170,114, 22,
-139,197,135, 43, 42, 42,102,225, 81,183,200, 22,105,254, 17,249,164, 53,255, 21,154,174, 98,177,120, 83, 69, 69,197, 40, 62,159,
-159, 95, 85, 85,165,178, 67,211,129,199,227,189,205,231,243,195,181, 90,173, 47, 0,136, 68,162,123,122,189,254, 87,157, 78,183,
- 14, 64,201, 95,189,239,100, 99, 91, 46,184,220, 46, 32,152, 23,151, 81,217,102,197,169, 34,175,119, 6,200, 51,122,182, 19,165,
-130,109,253, 20,148,254, 42, 53, 41, 93,111,183,166,128, 10,131,133, 61,239,106,154,182,245,167, 63,149,123,205, 9, 23,103,244,
-108, 43,206, 0,193,167,224,105, 47,217,171, 89,215,108,137, 68,162,221,149,149,149,175, 3,248,213,222,125, 39, 7, 2, 56,168,
- 52,185,195,196, 12, 6,105,100, 10, 31, 66,180, 96, 48, 19,144, 7, 53,245,241, 29, 35,125, 31,213,175,185,101,203,102,242,243,
- 79,199,161,215, 22, 33, 87, 83,134, 9, 47,189,138, 78,157, 66,161, 80, 40,176,124,249,114,248,248,248, 96,201,146, 37, 84, 51,
-242, 25, 41, 22,139, 39,248,251,251,183,189,125,251,118,178, 86,171,253, 6,192,233,186,207, 31,127, 32, 92,200, 98,117,212,153,
-205,231,238, 0,177, 77,104,190, 32, 22,139,231,248,251,251, 7,221,190,125, 59, 81,171,213,174, 1,240, 45, 93,214,253, 51, 52,
- 25, 12,198, 58, 47, 47,175, 49,169,169,169,243, 0,236,195,127,136, 63,221,104,209,154,180,230, 63, 80,179,230, 62, 33,127,183,
-124,254,191,217,178,206, 2,133, 54, 32, 84, 22, 56,214,245, 77,152,172,166, 53, 5, 84, 24,204,172,183, 64,161, 21, 8,242, 64,
- 24,235,154, 48, 89,127,174,201, 4, 40,124,220, 72,249,245, 49, 8,213,240,249,162,175,249,122, 88,176, 96, 1, 57,121,242, 36,
-132, 66, 33,116, 58, 29, 6, 15, 30,140, 79, 62,249,132,162,203, 16, 90,243, 79,212,252, 87,194,162, 15, 1, 13, 77,147,144,191,
-107,198,168, 55,147, 13,228, 64,192, 53, 20, 48,223, 5, 3,109, 0,115, 58, 42,205,121,212,155,233,134, 22,106, 94, 65, 1, 53,
- 27, 76,248,130,107,126,136, 10, 67, 30,245, 70,243, 53,255,128,127,136, 4, 31,255,125,207,203, 63,145,186,166, 42, 54, 54,150,
- 62, 40, 52, 52,182, 51, 5, 79,246, 52,124,252,153, 54, 90, 52, 52,255,112,168,231,238, 24, 1,100, 85, 47,127, 91, 77, 26, 26,
- 26,154,255,160,225, 2,133,134, 27,180,217, 19, 18,108, 78, 67,187,159,105,205,102,105, 50, 1,200, 0, 56,224,209, 24, 36, 53,
- 93,122,155, 26,102, 99, 8, 0, 19,125, 60,105, 77, 90,147,214,164, 53,105,205,191, 88,179, 41,237,127, 98,149,100,125,189, 12,
-163,255,140, 31,142,160, 53,159, 42,131,255, 53,251, 78,208, 17, 4,235,171,151,142,244,121,167, 53,105, 77, 90,147,214,252,207,
-107,254, 43,161,171, 14,255, 89,240,255,177, 57, 39,196, 21, 64,205, 32,151, 9,168,162,252,193,199,108, 0, 64, 57,174, 19,130,
-251, 0,130,171,215,103, 82,148,221,189, 81,105,104,104,104,104,104,254, 42, 66, 1, 92, 7,224, 10, 96, 24,128, 24, 84,143,170,
-240,151, 26, 45,129, 83,123, 87,176, 24, 33,148,149,248, 3, 0, 97, 80, 73, 48, 91,227,117,133,247, 91,252,144, 21,187,249, 58,
- 18,112, 15, 80, 48, 60, 87,145,115,175,197,131,161, 5,251, 74,199,168, 20,146, 9,121,133,165,187, 19,239, 86, 28,177,103, 91,
-153,204, 75,198,119,148,143,213, 27, 77,193, 92, 14, 39,195, 88, 82, 22, 93, 92,156, 92,222,140,108, 56, 54,182,242,227,143, 9,
-117, 44,247, 58,197, 17, 26, 25, 78, 82, 14, 85,129, 10, 82,145, 43,182,122,151,164,146,131, 7,159, 35,246,158, 27,138,129,254,
- 34,137,164, 51,143, 47, 12, 19, 74,228,237,173, 4, 40, 82,103,167, 25, 76,230,243, 22,131, 54,142, 88,241, 63, 59,206,213,203,
- 0, 86, 0, 0, 6, 12,248, 25,193,144, 98, 93, 77,198,241,198,128, 91,120,249,204, 25,212, 12, 46,251, 1,128,149,118,100,215,
- 1,128, 23,128,210,224,224, 96,109, 66, 66, 66,254,211,186, 70, 91,114,222, 27,131,199,227, 11, 76, 38,163,209, 98,177,180,120,
- 98,106,158, 80,186,232,119,211, 43, 81, 12, 84, 85, 20, 47,166,203, 62, 26, 26, 26,154, 63,213,104, 13,195,163, 42,195,166, 27,
-195,123, 5,246,190,198,231, 11,188, 1,192, 74, 8,172, 4,168, 44, 43,137,203, 75,142, 29, 12, 0,138,214,161,167,216,124,105,
-103, 43,121,180,222, 98, 5,204,198,170,212,178,244, 43, 93,109,201,145,200,217,119,244,128,136,129, 99,162,162,134,249,117, 8,
-238,208, 14, 0,110, 37,220,122,120,236, 88,204,221, 51, 63, 83,135, 42,243,239,253,208,162, 0, 10,248,159,116,233,210,169,119,
-108,236,245, 37, 0,102,180,244, 8, 58, 57,137,103,157,254,254,221,190, 3,199,172, 22, 1,246, 61,112,249,142,242,177, 35,135,
- 63,211,233,189, 55,167, 49, 94,123,119,185,247,181, 11,255,251, 76,236, 26, 84, 66,172,166,211,149,234,113,191, 53, 54,113,114,
- 93,255,216,144,193,250,166,232, 36, 99,253, 87, 61,228,186,162,135,227,136,213, 50,142,162, 40, 48,185,194,131,206,109,123,239,
-119,232,255, 78, 49, 0,155,123,140, 73, 93, 3, 35,148,174, 30,135,198,189,250, 54, 95, 40, 83,177,192,228, 0,160,144,147,118,
- 7,103,190, 93, 33,127,107,241,206,208, 11,241,233,230, 95,190,223, 92, 69,113,216, 99,180,185,183,155,174, 79, 79, 79,119,128,
-151,215,163,247, 95,124,177, 0,222,109,110,225, 81, 91, 51, 96, 45, 74,191,206, 65, 48,240,200,104,165,165, 65,110,107, 94, 7,
- 15,125,126, 80, 70,250,253, 37, 57,217, 25, 71, 24, 44,150,181,184,180,242, 29, 39, 39,101, 69, 97,161, 38, 28,213, 13,185, 21,
- 10,133,168,160,160,192, 8,192,248,103,158,247,177,147, 62,249,226,224, 87, 11, 94,175,111,221,244,183, 62, 89,231,229,225, 32,
-122,115,198,228,122, 39,228,238,247,204,228,247,206,158,220,185,170, 73, 67, 44,146, 44,122,246,245,249, 31,247, 31, 16,249, 68,
-250,149, 75,231,177,247,243, 5,168, 44,167,205, 22, 13, 13, 13,205,159, 64, 76,181,185,138,169,187,162, 65,163,197,231, 11,188,
- 47,255,239,152,227, 15,231, 51, 1, 0, 17,161, 46,248,112,233,166,200, 61, 27, 99,239, 2, 64,143, 1, 81,190, 75, 62,120, 19,
- 23, 19, 53, 32,132,160,147,143, 19,134,140,124,206, 54,227,161, 10,232, 58,118,236,179, 47,190,251,238,156, 17, 15, 30, 60, 72,
-219,183,111,223,111, 0,208,167,111, 95,159,229,203,151, 63,191, 90,238,200,251,238,224,247,217, 85,234, 59,215,154,179,183,124,
-183,182,238,126,237,219, 76,248,238,203, 77,140,254,131,159, 29,159,134,202, 21, 85, 57,201,217,182,108,171, 80, 40,102,179,217,
-108, 25,240,104, 54,246, 26,140, 70,226, 2, 0,102,139, 85, 34,119,243, 43,103,114,248, 22, 30,143,115,187,188,162, 98,119, 89,
-246,157, 29,141,105,234, 77,166,160,183,222,152,196,184,145, 92, 8,239,160, 62,204,245, 43, 62,130,213, 98,146,191,253,193,210,
-177,177, 87,190, 67,165, 26,103,109,220, 53,118,221, 4,119,247,238,204, 79, 86,136, 7, 81, 20, 94,241,234,241,234,168, 37,187,
- 14,178,187,248, 72,161, 55, 89,113, 34,174,176,199,214,117,159,172,186,176,117,216,143, 0,182, 3,248, 5, 64,147,166,206,209,
-201,241,155,217,243,215,137, 43, 13,255, 31, 37,169, 54, 89,248, 98,247, 1,220,204,180,194,223,207,159,229, 50,251, 51,241,246,
-165, 83,118,105, 31,205,179, 85,159,221,109, 11,160, 23,144,228,136,169,139, 7,226,235,149,203,160, 84, 86, 66, 34,201, 0, 5,
- 21,128,246,213, 95,188,207, 45, 64, 38,128, 15, 52, 26,136,150, 76,195,224, 27,192,220,142,128, 6,192, 5,170,177, 89,227,137,
-121,197, 91,243, 86, 5, 59,183, 9, 14, 75,184,155,141,203, 49,155,145,159,151,238, 80, 92, 92,176,187,149, 79, 71, 34,146, 57,
-135,150,228,165, 64,234,128, 20,138, 88, 70,150,150, 22,231, 1,176, 41,138,228,226,226,178,200,221,179, 91,223,154,243,238,232,
-213,169,184,102, 29,131,201,250,166, 32,229,218,155,141,109,239,229, 63,124,242,138,205,125,194,147,110,158, 58,144,145, 28,119,
-222,108, 50,234,219,251,133,116,153,244,202,248,231,147,178, 21, 29,243, 75,244,184,121, 43,177,211,202,149,159,174, 76, 76,184,
-117, 75, 34,113,144,183,241,237,216,205, 63,100,232,248, 34,131, 99, 91, 91,140,150,217,108,129,147, 75, 91,176,249, 18,120,168,
-100, 40, 41,215,163, 82,111,134,194,165, 13,204,102, 51, 93,244,209,208,208,208,252, 57,228,226,201,198,239,209, 77, 26, 45, 0,
- 16, 11, 88,184,155,146, 7, 0,112, 16, 0,179,166, 78, 68, 97, 65,190,175,193,108,197,171, 19, 95,194,245,164, 92,220, 77,205,
- 7, 33, 4,190, 30, 54, 79,194, 13, 38,172, 93, 94,157,252,106,191, 83,167, 79, 95, 93, 48,127,193,215, 20,133, 75, 0,176, 61,
-250,139, 30, 11, 23, 45,124,253,165,137, 47, 13, 58,120,240, 96, 34,128,102, 25, 45, 22, 37,217,180,106,229, 50,110, 86, 65, 85,
-213,236,119,231, 89,231,188, 51,123, 61,128,103,109,114, 50,108,182, 44, 43, 43, 75,204, 96, 60, 57,151,230,167,203,230,157, 27,
- 52,102,245,253,180,140,146, 27,167,142, 30,237, 26, 24, 24,136,172,236,188, 94,159,109,216,214,241,196, 41,193,164,242, 50,221,
- 24,109,193,157,122, 39,109,230,177,217,137,139, 63,219,218,201,234,224,195,248,240,245,161, 8,106,231,134,108, 77, 9,250, 14,
- 30,193,138,187,118, 45, 18,176,217,104,213, 29, 60,112,172,193,170,233,184,124,247,149,129,163,122,186,117, 97, 48,152,168,208,
-153,144, 95,170,135,197, 10,244, 9,144,225,153, 61, 27, 88, 69,149,166,209, 75,191,207, 28,125,105, 99,148,186,170, 52,103, 38,
-128, 67, 77,196, 3, 29, 61,148, 82,220,205, 44,175,215,100, 85, 86, 61,122,128,115,152, 22, 80, 32, 78,141, 8,245, 2,240, 21,
-224, 15,252, 52,243, 69,168, 84,251, 84, 42,213, 88,165,202, 37,206,247,197, 73,148,187,119,128,164, 66,103,196,237,196, 91,229,
-129,157, 19, 72,121,145,230,237,170,202,226,131,119,128, 4,127, 96,127,181,198, 36, 52, 98,180,238,223,191, 83, 50,233,133,112,
-214,141,135,229, 72, 22,137, 16,212,115, 20, 74,243,179,216,207, 76, 90,220, 77, 87, 94,202,119, 82,121,225,206,197, 3,200,207,
-120,208,169,202,160,255,193,209,179, 71,248,143, 95,205, 53, 52, 21,221,114,113,113, 89, 52,117,234,212,143,243,115,147, 62, 25,
- 52,102,117, 72, 90, 70,201,141, 23, 23,255,218,117,250,104, 31,156,136, 47,195,178,201,225, 19, 0, 52,106,180,152, 44, 98,225,
-139, 93,188,199,188, 48,115,158,155, 51,127,158, 80,192,128,131,136,139,211, 87, 52,248,238,116, 38, 76,102,130,238, 33,237,125,
-103,189,183,110,151,171, 19, 23,185, 5, 6,100,231, 87, 65, 93, 80,133,138, 66,173,222,166, 11,130,162,160,201, 47, 68,204,143,
- 49,160,216,124, 80, 12, 10, 38,163, 17, 44, 6, 3, 20,131,162,139, 62, 26, 26, 26,154, 63,135, 6,123, 29,178, 0,224,216,177,
- 99, 36, 42, 42,234,119,165,178,197, 66,112, 55,245, 81, 19, 28, 38,147,137, 97,189,125,176,254,179,197,208, 25,204,184,153, 82,
-138, 31, 46,102,194, 80, 89, 2, 66, 8, 10,130,148,245,253,240, 19, 85, 74,171, 87, 8, 66,153, 60,246,184, 11, 87, 68,173, 29,
-229,114,249,253,196,175, 43, 23,190,163, 14, 96, 17, 99,220,210, 79,125, 82, 56,142,172,158, 7, 14,236, 15, 28, 30, 21,197, 21,
-139, 37,239, 19, 86, 71, 15,118, 37,153, 83, 90, 26, 95,218,144,102, 93, 4, 74,255, 17, 35,134, 61, 51,192,197, 69,101,125,113,
-249,149,164, 77, 51, 67, 61,219,251,180,239,117,215,164, 27,161,211,220, 63,218,192,102,143, 53,173, 86, 43, 24, 12, 6,212,106,
- 53, 44, 22, 11,244,122, 61, 76, 38, 19, 50, 51,211,212, 86, 66, 60, 44,176, 50, 92, 93, 61,192, 98,113,225,221,218, 11, 91,215,
-175, 16,238,249,238,104,216,220, 5,159, 28,209, 22,160, 59,254,127,112,203,199,154, 85, 69,197, 7,143,159, 60,237, 76,112,198,
-237,195,215,135, 50, 53,197, 21, 56,115,237, 1,174,223,206,180,247, 68,214, 29,194,161,117,118,250,131,178,213,171, 87, 51,151,
-156,120,144, 57, 96,200,179, 22,175,118, 33,173,245, 22, 2,128, 2,143,195, 2,135,197,128,151, 51, 31,135,231, 5,227,202,200,
-120, 85,100,168,243, 58, 66,200,161,198,142,167, 94,111,178,244,246, 23, 49, 59,182,149, 33,254, 97, 49,174,158,184,132,217,243,
-215, 33, 54, 69,143,242, 10, 45, 40,139, 30, 76,162, 71, 65,122, 50,204, 22, 11,105,234,188, 63, 34,180, 24, 0,120, 60,222, 7,
- 63,252,120,210, 77,111,229, 35,175, 68, 15,117,177, 30, 62,221,199,136,210,179,243,241,213,226,231, 63, 0,112,208, 31, 40,183,
- 65,147, 7, 32, 60, 45,229,158,201, 96,176, 88,171,140, 22, 70,144,167, 12, 59,126,186,134,224,240, 23,170,184, 76,166, 64, 34,
- 83, 0, 4, 8,234,251, 2,174, 30,249, 28, 98, 6,179,179, 64,202,235, 8,224,106, 99,215, 82,141,201, 90,180,104, 17,102, 76,
-125, 30, 86, 66,216, 22, 88, 25, 0,176,229,135, 7,240,242, 86, 54,118,142,254,127,186, 24, 11,131, 50, 26, 9,202, 43, 76,200,
- 47, 49, 64,194,103,225, 94, 70, 37, 30,164, 87,224,249,193,238, 24, 51,208, 21, 22, 43,193, 75,239, 95,199,179,145,174,120, 49,
-202, 3,160, 40, 20, 20, 27,160, 55, 88, 26,220,119, 6,131,209,134,201,100,134, 90, 44,150,235,143, 62, 51, 97, 1, 80, 86, 92,
- 0,189, 94, 15, 38,147, 9,185,163, 51, 0,234,137,239, 90,173,214, 20, 91,239,163,102, 66,107,210,154,180, 38,173,217,108, 26,
-242, 34,255, 16, 26, 28,202,129,209,216, 86, 15, 51,139,112, 55, 37, 15,157,253,221,209,174,181, 43,174,222, 43,198, 55,103, 50,
-177,243, 84, 58,206,220,204,135,149, 37, 65, 94, 25,112, 63, 77,141,251,233, 5, 77,142,159,205,228,177,199,189,245, 86,233,187,
- 29, 2,203,186,255,239,196, 44,184, 59,223, 15,156, 59,183,100, 22,147,199, 30, 39,111, 37,217, 55,239,221,183, 39, 72,132, 66,
-174, 65,111, 64,219, 54, 94,252, 55,103,206,154, 68,201,121, 54,207,137, 36,113, 15,144,243, 4,130, 29, 75, 63,126,159,183,238,
-135,251, 25,149, 6, 84, 30,186,164, 78,158, 51,111, 97, 17,139,205,223, 42,113, 15,176,185,237,143,201,100,130, 94,175,135,193,
- 96,128,209,104, 68,118,230,157, 17,191,252,240,222,224, 54,173, 28, 7,243,248,124, 16, 0,101, 58, 51, 82,114,181, 8, 31, 56,
-136,217, 57, 52, 52, 72,236, 26, 48,185, 62,173,210,210,244, 82, 43, 97, 74,142, 29,222,203,220,255,211, 13,124,125,236, 26,142,
-252,122, 3, 87,207,158, 48, 19,171,233,241,252, 95, 98, 87, 31, 95,177,107,135,116,177, 91,136,250,241,226, 30,220,232,240,204,
- 76, 38,131,132, 15,140,248,121,234,140, 55,255,167, 45, 47,212,236,216,180, 56, 59, 63, 39,237, 14,143, 67,153,133, 60, 38, 42,
-170,204,216,245, 75, 14,198,174,184,137,219, 25, 21, 32,132, 52, 57,129,183, 21,120,103,220,228,247, 44, 38,163, 17,126,158, 98,
-236,141, 94,137, 17,225, 29, 49,160,131, 28, 93,219,137, 32,100,233,145,152,116, 23,223,238,221,101,182, 90, 25,115,154,184, 17,
-159,169, 94,226, 0,160,162,162,226,189,185,239,207,201, 55,152,173, 48,154,172, 48, 86,191,254,242,237,167,249,150, 42,237,123,
-213,219,197,213,218,174,161,155,121,227,107,211,231,134,239,248,230,231,255, 99,239,187,195,163,170,214,238,215, 41,211, 75,122,
- 38, 9, 33, 9, 36, 64, 66,239, 16, 80, 64,122, 64,186, 32, 69, 64, 65,154, 10,138,162,130,162,130,212, 75,175, 42, 40,136,244,
-222, 59,132,170, 32, 29, 18, 32,129,144,222, 39,109,122, 59,237,247,199, 36, 16, 32,101, 2,222,251,221,223,247,101, 61,207, 60,
-147, 57,156,243,178,219,217,123,237,245,190,123,239,238,251, 46,102,145, 57,249, 14, 68,159,216,131,128,160, 48,136, 41, 82, 14,
- 2, 0, 65, 0, 4, 1, 65, 16,224, 27,210, 0, 86,158,199,222, 95,190, 13, 68, 5,241,106, 37, 36,107,252,248,241,120,240,224,
-193,115,245,158,240, 56, 9, 9,143,147,112,230,228, 85, 0,128, 87, 72,243, 66,175,144,230,133, 62,161,173,215,149,101,203,206,
- 49,188,133,229,144, 93,100,133, 66, 70, 34, 56, 80,129,129, 93, 2,176,250,155,166, 24,209, 59, 16,233, 57,102,140,159,115, 7,
-126,126, 34, 28,184,152,133, 85,219, 19, 80, 47, 68,137, 1, 93,106,224,253,190, 53,203, 86,107,105,186,151, 72, 36, 26, 62, 96,
-192,192,217, 82,153,114,193, 39,115,182,206,146, 75,233, 18, 53, 22, 20, 69,129, 97, 24,144, 36,129,161,159,174,158, 37, 85,168,
- 23, 12, 24, 48,112,182, 72, 36, 26, 78,211,116,175,234, 73,103, 53,170, 81,141,106,252,219, 20,173,146, 79,192,115,253,118,121,
- 79, 88,173,150,164,119,134,142, 68,128,198, 95,213,255,173,247,197, 55, 19,138,160,205, 74,193,227,248, 24,152,173, 12,196,158,
-161,128,204, 31,181,106,135,224,110,220, 65,199,170,197, 71,141, 60,107, 75, 42,207, 94,191,126, 1, 53, 31, 63, 36,200,197,139,
-130,175,198,199, 21,182,220, 54,243,119,140, 24,161,242, 89,188, 40,248,106,242, 19, 37,169,144, 9,237, 63, 24, 61,156, 32, 9,
- 1, 95,127, 61, 13,253,251, 68, 97,204, 7,163,136, 63,254,216, 20, 89,228, 98, 46,121,136,214,204,248,118,182, 36,167,136,181,
- 95,139, 55,218, 20, 74,185,252,207, 71, 70, 83,163,218,193,242,222,131,222,207, 60,186,251,183,229, 0, 70,187, 98,171,132, 96,
- 49, 12, 3,135,195, 1, 0,156, 83, 61,112,126,231, 27,236,200, 45,178, 33,167,200, 6,150,227, 49,104,232,104,249,245, 27,119,
- 70, 3, 40, 39, 94,139,231, 25,150,193,190,211,183,144,113,125, 15, 79,144,148,174, 84, 48, 60, 84, 1,117,195,253,253,131, 47,
-246, 25, 52,202, 87, 34,115,186, 97, 13, 38, 27,254,248,101, 81,133,233, 36, 9, 66,224, 57,182,136,101, 24, 83, 88,104, 88, 70,
-253,134,205,100,151,207,159,236,247,231,153,125, 70, 54,108,148, 71, 66,114, 22, 40,145, 20,148, 88, 6,155,195,181,133,135, 57,
-143,175,174, 5, 64,140,253,104,218,138,169, 95,126, 67,125,190,234, 18,236, 86, 51,108, 22, 19,244,186, 66,200,105, 6,177,127,
- 29, 98, 5,142,153,106,202,186,189,182,124, 75, 68, 38,128,204,210, 87, 10, 10, 10,162,255,186,116,241,240,223,127, 93, 26,227,
- 31,214,146,180, 51, 60, 30,199,252,205,103, 60,186,113,216,102,211, 71, 3, 0, 1,228, 3, 56, 89,145,112,169,118,243,112, 31,
-243,241,151, 99, 61,228, 74, 50, 38,189, 8, 41, 89,122,112,242, 64,248,215,172,243,204,191,202, 59,243,219, 38,194, 23, 61,154,
-189,139,203,247, 82,185,147,187,214,118, 7,112, 8,128,185, 34,146,117,243,230, 77,136,197,226,231,234,189, 78,221,218, 40,113,
- 29, 22, 21, 76,246,216,180,248,125, 0, 64,151, 55, 59,142, 7, 48,225,165,137, 74,182, 30,222,118, 22,109, 27,120, 33, 34, 84,
-133,140,124, 59, 4,130,198,238,179,121,120,148,110,194,233,107, 90, 4,120, 73,192,219, 73, 80, 82, 96,223,229, 12, 92,142,205,
-195,200, 94, 65,120,152, 88, 80, 14,177,166, 90,124,254,197,180, 31, 87,174, 92,117,238,157,143, 22, 15,238,208, 34, 12,122,131,
- 17, 25, 5, 12,140, 38, 3, 76, 70, 19,228, 10, 5,164, 18, 9, 40,154, 70,175, 15,230, 13, 62,246,251,183,231, 63,255, 98,218,
-143,203,150, 46,249,158,101,217,227,213,253, 97, 53,170, 81,141,106,252, 91, 21,173,241,165,175,149, 75,180, 82,238, 95,110, 13,
- 0,225,173,122,228,171,100,180, 23, 77, 18,200, 73, 79,192, 31, 75, 62, 5,207, 11,232, 61,110, 49,212,181,253, 33, 23, 83,176,
- 25,243,141, 5, 9, 23, 42,138,213, 1, 65, 48,221,215,174,203,168,253,209,164, 48,183,109,219,140, 34, 0,216,182,205, 40,154,
- 52, 49,200,237,167,117, 73,181,219,190,217, 18, 2,199,161, 79,255,119, 48,116,216, 80, 36,103,155,177,247, 98, 42, 76, 22,187,
- 75,171,229,228, 62,245,155,249,120,251, 70,125,246,126,148,146,166, 8,162, 94,136, 59,149,166,101, 88,138, 18,113,135,175,235,
- 50, 7, 13, 26,230, 19,125,108, 87, 23,206,167,126, 51, 75,222,195, 59,149,217,179,217,108,207,185, 14,189,124, 66,143,117,127,
-103, 73,122, 86,182,225,104,118,161,181,173,137, 97,145, 83,100, 67,110,145, 13, 69, 38, 7,252,213,158, 96, 25,123,147,242,236,
- 9,130,176,121,192, 59, 35, 71, 1, 32, 9,146,253,221,152,245, 48,222,249, 47,207, 72, 86, 84,255, 17,190, 23,111, 38,224,241,
-141,227,133, 2,207, 58,119,113, 39,248,244,138,203, 21, 2, 69,128, 23,211, 4, 67,145, 36,239,112, 24, 25,141,198, 55,250, 66,
-244,137,190, 86,246, 9, 40,177,244,233,189,150,231,221, 81,149,145,173, 53, 0,176,114,213,138,165,237,187,143, 16, 95,184,149,
- 4, 11, 3,180,107, 17,142, 3, 59,127,181, 9, 2,243,165, 41,235,246,154, 42, 52, 66,143,160,160,160, 79, 69, 18, 73, 23,185,
- 66, 29,228, 27, 16, 76, 58, 88, 14, 14,134,131,210, 59,144,148,170,188,186,243,164,248, 50,235,176, 71, 59, 76,218,149, 0,202,
-229,215,167,175,222,239,242,203,202,165,131, 3,188,149, 8,242, 17,227,240,133, 66,142,161,121, 82, 19, 18, 65, 0, 64,176,198,
- 13,247,111,157,199,221,187,247,208,164, 93, 20,188,213, 53,161, 18,115, 66,222,227, 63, 11,252,252, 3,155,231,100,103,136, 95,
- 36, 90,254,254,254, 63,140, 28, 57,114, 86, 64, 64, 0, 86,172, 88,241,244,122,233,122,111, 12,180, 45,237, 58,252,105,255,227,
- 10, 51,252, 65,159, 90,120,179,153, 6, 60, 15, 76, 89,126, 23, 49, 9,122,172,159,209, 2,131, 58, 7, 98,221,193, 36, 52,173,
-167,132,209,194,195, 97,231, 32,150,144,104, 16,170,130, 84, 76,225,220,173, 60, 24, 76,166, 10,109, 19,148, 20,221, 59,183, 67,
- 94,145, 25,190,238, 18,132, 6,249, 66,165, 8,133,193,194, 34, 37, 91, 7,157,137, 65, 94,161, 9,111,180,107,131, 83, 91, 36,
-213, 93, 96, 53,170, 81,141,106,252,103, 84, 45,160,212, 30, 90,207, 17,173, 35, 71,142, 8, 0, 80,150,127, 52, 35,167, 0,222,
- 42, 26,190, 53,106,227,189, 79,151, 98,243,242,207,193,113, 12, 4, 1, 96, 57,215,118, 38, 16, 4,209,233,143, 39,213,174, 95,
-171, 54,229,251,222, 8,133,101,235, 54,179,252,189, 17, 10, 75,227, 38,222,186,143, 39,213, 78, 50, 88,131,223, 96, 57, 14,127,
-198,230, 34, 38, 73,135,152,100, 61, 84,114,215,183,249,162, 36,226, 73,139, 22, 46, 16,211, 20, 65,196,166, 24,141,233,249,172,
-145, 18,137, 28, 10,185, 68,176, 11,180, 45, 57, 79,200,239, 58,224, 3,203,225, 45, 43,199, 2,248,164, 92, 85,172,120,165, 97,
-137,146, 85,242, 45, 8,130, 64, 0, 60, 79,112, 92,122,158, 21, 70, 7,131,156,194,103, 68,139, 96,203,247,156,170, 2,234,134,
-187,169, 85, 39, 40,138,146, 10, 2,192, 56,216,119, 17, 80,183,167, 49,235,113,124,105,146,117, 53, 54, 19, 9,183,207,228,112,
- 14,243, 72,115,110,220, 89, 87,243, 78, 16, 16, 40, 10, 60, 69, 18, 60, 65,128, 23,145,130, 29,130,192,191,152, 34,115, 21,136,
- 86, 9,217,146,136,168,153,167,118, 44,215,140,121,187, 1,118, 94,116,114, 62,171, 65,171, 55,101, 84,137,100,193,219,219,123,
-244, 87, 95,125,245, 67,191,119, 70, 64,103, 37,144, 83,232, 84, 3,237, 12, 15,177,210, 7,221, 63,222, 24,148,165,213, 7, 61,
-190,118,248,141,188,219,219,116,140, 85,183,162,220,116, 37,100, 94,179,152,139,252,161,230, 0, 0, 32, 0, 73, 68, 65, 84, 77,
-208, 91,156,249,153, 54, 58,130,250,110,237,105,176, 2, 13, 47,223, 64,248,186,137,241,254,187,189,112, 49,164, 22, 30, 60,124,
-136,153,179,143,194,207,195, 45,230,202,249, 67,117, 90, 68,118, 88,118,108,255,246,151, 72, 92,118,118,246,236, 45, 91,182,160,
- 89,179,102,179, 90,182,108,137,236,236,236, 18,130,252,180,222, 19, 30, 59, 5,219, 18,162,117,235,214, 93,180,104,209,180,220,
- 60, 55,169,227,134, 61,231, 50,177,241, 72, 50,228, 82, 10,181, 3,101,152,180,232, 54, 58, 55,247,193,228, 33,161, 80,201, 67,
- 80,100, 96, 96,103,120, 88,108, 44,242,245, 14,100,228, 91,145,150, 99,129,131,169, 56, 22, 94,128,128,152,248,116,216,108, 86,
-120,122,122, 66,165,176, 66,230, 17, 12,128, 66, 97,142,206,185,250,208,108,133, 66, 46,173,238,250,170, 81,141,106,252,127,131,
-138,184,200,255, 71,170,214,203,138, 86, 69, 25, 18, 4,224, 81, 74, 30,106,213,244, 69,205, 90,117, 16,255,224,110,169,206, 30,
- 96, 57,215,220, 81,135, 14,101,165, 47, 93,234,198,127,254,185,174,221,162, 69,193, 87, 38, 77, 12,114,111,220,196, 91,247,213,
- 87,169,237,150, 45,115,191,114,250,170,136, 19,138,247,235, 42,217,155, 75, 16,170,178,199, 38,217,166, 89,195, 80,106,246,182,
- 71,169,103,239, 25,114,197, 98, 49,227,239, 41, 35,212, 42, 9, 69,145, 34,137,141, 33,109,225,141, 90, 80,135, 73,162, 69, 69,
- 86, 74,136,214,139,174,195,124,109, 66,191, 83,123,167, 53,126,107,192, 98,175, 12,173, 5, 58, 59,245,212,117, 72,145, 4,238,
- 61, 72, 1, 40,113, 76, 89, 54,221,212, 94, 39,183,111,221, 28,188,108,209, 60, 56, 88, 14, 31,127,254, 29, 62, 24, 61,242, 36,
- 2,234,246, 12,174, 29,113,243,210,225,223, 21, 61, 39,254,140,148,184, 27,217,172, 77,191,163, 42, 36,235, 41,217, 2, 4, 78,
-224,201,130, 66,189,202,198, 66,134, 50,120,159,205,193,191, 82,203, 49, 90, 88, 28,254, 59, 27, 71,246,239,128,187, 90,249, 74,
- 54,220,221,221, 27,116,236,216, 9, 4, 45,129,157,177,193,206,242,176,151,138,209,114, 48, 60, 24, 65, 4, 69, 64, 83, 20,220,
- 63,208, 0, 86, 93,185,182, 70,141,234, 81,208,176, 73,203,221,223,126, 62,110,200,144,247,198,160,109,228,155,136,187,251, 23,
-252,130,234, 67,229,225, 35, 92, 73, 42,100,219,213, 15,166, 71,247,111, 77, 68,215, 12, 67,237, 6,237,241,232,254,245, 38, 98,
-177,248, 94,234,227,135,229,186, 36,179,179,179, 75,246,156,154,213,178,101, 75,164,166,166,162,160, 84,189,215,169, 91, 27, 0,
- 16,255,208,185,136,161,132,100,241,124,217,237,116,252,130,219,208, 91, 56,248,120, 74, 64, 17, 36, 32, 8,168, 21, 32,199,141,
- 71, 5, 24, 57,187, 16,145, 13,189, 16, 28,160, 0, 4, 1, 70, 43, 3,187,157,135,131, 7,236, 86, 22, 20, 89,238,146, 65,142,
-227, 56,142, 20, 24,234, 86, 76, 60, 36, 98, 17,220,139, 76,144,203,229, 16,139,243, 64,144, 36, 88,150,135,131, 97, 96, 49, 91,
-176,251,198, 85, 8,156,131,226, 56,142, 67,177, 27,180, 26,213,168, 70, 53,254, 27,241,255,113, 32,124,105,114, 85,190,162, 85,
- 17, 66,106,250,225,239,152, 36, 52,169, 31, 10,119, 55, 53, 30, 38,164,131, 34, 69, 32, 9,128, 97, 93, 39, 67,130,131,217,185,
-108,153, 59, 82,146,148,228, 79, 63, 39,213,254,120, 82,237,164,101,203,220,175, 8, 14,102, 39,128,145,130, 0, 56,201,150,147,
-112,113, 85,224, 5, 2,207, 4,249,121, 41,168, 27, 79, 76,249, 36, 73,217,188,221,101,188,183,187,148,244, 86, 75, 68, 98, 17,
-197,179, 2,233,168,169,169,109, 21,120,222,149,115,245,158,115, 29,114, 28, 7,130, 32,185, 98, 34,166, 76,203,183, 64,103,165,
-144, 83,100, 67,161,193,129,122,129, 74,156,137,222, 99,230, 24,203,182, 50,213, 54,145,216,189, 78,237,154,248,102,206, 50, 88,
-108, 28, 30,101, 24, 33,150, 74,253,253,252, 27,221, 25,249,209,116,233,148,245, 9, 24,219,197, 27,159, 95, 74,200, 48,231,200,
-166, 87,165,102, 57,142,131,197,106, 23,231,228, 21,122,234, 13, 38, 55,185, 76,106,241,245,114,207, 43,235, 94,171,253,213,198,
- 89,133,140, 70,223, 72,127, 88, 29,195, 97,177,177,248,235,236,190, 87, 49, 19,234, 87,163, 38,140,246, 82,228,170,152,108,149,
- 38, 93, 34,149, 47, 0, 34,180,178,108,223,191,119,243,221,251,247,110,254,120,253,202,133,237,139,126, 59,219,120,203,154,239,
-177,250, 96, 2, 40,138, 34, 4,134, 21,173, 60,152,132,154, 30,148, 96,100, 68,132,149, 35, 96, 42,208, 34,162, 77,175, 70,219,
-215,126, 59, 29,206, 45, 35,108,174,144,173,194,156, 27, 79,235,253,196,241,167,235, 22, 80,120,103, 83, 81,194,185,213, 78,138,
- 79,209,123,202,102,237, 14,187,198, 93, 34,112,172,131, 47,189,163,149,187,156,128,192, 3,215, 99,115,112, 43,158,132,183,155,
- 24, 42,185, 8, 12,203,195,108,103, 97,177,114, 36,207, 58,108,229,212,247,173,149, 43,150,127, 63,124,248,240, 73, 59,118,205,
- 58,212, 44,234,179,126,250,162,124,136, 36,114,136,105, 49, 72,138, 4,203,113,176, 91, 77, 40, 44, 42, 64,210,159,127, 28, 26,
- 58,100, 96,139,149, 43,150,127, 95,178, 74,177, 26,213,168, 70, 53,170,241,111, 83,179, 94,130, 75, 68, 75,165,144, 65,160,100,
-184,116, 51, 1, 17, 13,155, 98,211,161,107,168,219, 36, 18, 89, 6, 22, 2,200, 74, 87, 27,150, 96,218, 12,203, 45, 0,183,250,
-245, 83,212, 28, 56, 48,176,187, 32,136, 78,255,188, 78,159, 14, 0,161,141,157,102,120, 94,128, 32, 0, 2,239, 36, 92,174, 75,
- 58,116, 74, 82,150,190, 86,109,127, 37,238,167, 59,108, 74,169,152,244, 84, 74, 40, 95,119,137, 88, 76,211,224, 4,194,150,149,
-149, 96, 35,128,100, 87,204,189,232, 58, 84,168, 2,142,117, 29,176, 88,155,156,170,187, 81,175,192,220, 76,231,144, 64, 16,128,
-122,129, 74,196, 92, 61,202,229,100, 60,126,100,201,137,251,165,108,149, 12,148,131,229,113,231,137, 14, 69, 38, 6, 69, 70, 7,
-222,232,220, 87,252, 70,183,126,184, 20,147, 7,158,101,176,232,215,163, 6, 78, 96,134, 2, 15,152, 42,100,154,252,251, 86,108,
- 77,109,161, 73, 42,162,233,162,250,117, 67, 18, 37, 98, 17,171,215,235, 37,207,223, 69, 65, 41,151,160,192,200, 0, 0, 83,213,
-214,163, 51, 49, 56,116, 53, 27,135,247,109,135, 92, 46,135,240, 10, 45, 80, 44, 22,123,136,196, 50, 56, 76, 78,119, 97,201,199,
-241,194,135,164,165, 0, 73,123,184,104,246,129,221,110,249, 43, 41,238,106, 3,174,115, 93,106,116,183,218, 24, 53,126, 42, 2,
-235, 52, 65,223,190, 3,209,180,182,154,216,119, 37, 21, 12,195, 26,252,195, 26,169, 5,231, 42,219, 71, 0,154, 1,184,234,138,
-178,165, 46, 85,239, 13,222, 8,107,246,140,104, 1, 5, 41,183, 43, 92,197,202,217,243, 51,204,118,146, 20, 4,190,204, 41,131,
- 8,128, 96, 7,114,178, 4,100, 3,160, 73,128,166, 72,128, 32, 40,142,227,202,172, 39,150,101, 79,241, 60,159,179,117,235,214,
- 28,142,227,110,221, 60,186,244, 78,157,183, 38,206, 2, 91, 0,134,113,134, 51, 74,164, 10,240, 4,137,132,139, 27,103,113, 14,
-203,193,173, 91,183,150,108,239,112,175,186, 47,172, 70, 53,170, 81,141,127, 11, 74,159,113,248,118,105,242,229, 18,209,226,120,
- 1, 62,222, 94, 96, 4, 26, 73, 57, 58,152, 8, 13,172,102, 1, 28, 71,128, 19,132,138,182, 26,239,134, 50,150,231, 31, 58,148,
-149, 14, 96,195, 11,154,212, 83, 37,235,233,119,217, 46,153, 50,109, 18, 2,119,230,208,241,243, 67,250,117,232,226,249, 48, 43,
- 59, 93, 44, 34,105, 90, 76,137,196, 52, 73,136,105,210,238, 38,167,169, 61,235,118, 72, 4, 2,231, 43,179,105,181, 90,209,173,
-219,243, 7,147,199,197, 94,209, 20,228, 62,178, 11, 4,207,251, 74, 12,240,113,247, 69, 98,114, 42,206, 30,223,103,206,201,120,
- 28,199,217,172,253,241, 60,229,124,102, 83, 16,248, 2,157, 13, 86, 7,135, 66,163, 3, 69, 38, 7, 88,223,118, 56,240, 87, 38,
-100, 98, 10, 57,119,246, 88,180,217,233,159,218,114, 31, 39, 85, 82, 21, 95,227,185,189,180,132,244, 15,199,140, 22, 45, 95,178,
-200,214,162, 69, 75,161,160,160, 0, 70,163,241, 89,153, 16, 4,100,110, 26,168,229, 52, 30, 95, 63,134,199,103,151, 89, 0,124,
-235, 74,121,150,134,155,130, 70,191,182,254,176, 57,134, 35, 79,103,195,245,243, 7, 42,107, 50, 47,217, 84, 40, 20,242, 18,245,
-170,244,182, 14,246, 82,170, 22, 87, 92,223, 36, 45,149,151, 97,179, 59,128,211, 47, 94,212,235,116, 71,111, 93, 57, 51,201, 58,
-126, 20,114,138,108,176,228, 39,224,143, 3,191,156,117, 24, 30,117,238,177,124, 9, 57,181,127, 29,156,189, 85,160,190, 71, 83,
- 0, 15, 68, 13,159, 54,248,196,246, 37, 91, 42,203,123, 9,217,234,212,161,245, 44,146, 34, 14, 11,196, 51,178,148,153,153,233,
- 82,222,117, 57,143,139, 21,164, 42,249,192, 65, 16, 36, 37,240,207,157,129,248, 92, 58,121,158,191, 87, 66,154,104,130,232,175,
- 86, 40,144,167,213,161,100,147, 93,171,197, 0, 47,159, 26, 32, 9, 2, 76,169,123,171, 90,239,175,128,106,155,213, 54,171,109,
- 86,219,252,191,138,151,206, 56,172,130,162, 37, 32, 44, 64,137,186,129, 74, 88, 29, 26, 88,237, 28, 76, 86, 14,122,179, 3,122,
- 51,131,164,108, 51, 98, 14,189,126, 10,157, 42,150,115,235,115,193,185,223, 38, 56, 94,112, 89, 61,145, 56,236,115,150, 46,154,
-255,238,142, 22,205,237, 83,222, 14, 8,186,155,100,207, 36, 8,210, 66, 82, 52,227,165,166, 69, 15, 31,222,213, 94,185,120,172,
-163,140,229, 70,153, 43,176,195,178,172, 46, 48, 48,176,100, 64,123,122,189, 65, 29,121,255, 63,143,126, 29,218,169,223, 34,223,
-229,243,166,153, 73, 74,204, 19,180, 56,134, 99, 44,219, 45, 57,113, 63,163, 2, 93,143, 20,203, 30,252,125,251,126,164,135, 87,
- 16, 30,103,152, 96,178,178,112,176, 60, 60, 85, 98,164,223, 59,233, 72,122,120, 99,151, 49,243,238,166, 87, 40,182,109,241, 15,
- 98,106, 70, 69,245,124, 39, 50,178, 29,245,253,247,223, 33, 34, 34, 2, 22,139, 5, 36, 73, 34,168, 86, 29, 36,197,223,198,213,
-163,115, 56,115,126,242, 47, 0,126, 4, 80,229, 3,151,243,244,118, 28,191,145,139,163,251,119,130, 18,189,210, 10, 54, 82, 46,
-151,203,202, 34, 87,165, 73,215,211,155, 69, 18, 25,156,234, 19,255, 92, 67, 44, 27, 39, 18,226,239, 63,120,255,189, 97, 13,212,
-238, 30,232, 61,112,104,238,149, 75,103,251,236,255, 99,221,138,252,228,180,119,191, 91,176,202,173,123,171, 0,194, 75, 37, 65,
-145,137,199,182,148, 7, 97,112, 81,131,205,206,206,158,157,150,116, 99,228,159, 71,191,238,219,169,223, 34,223, 27,123,103, 62,
- 13,162, 39, 41,122,107,101,207, 23,164,221, 60, 91, 85,146, 85, 66,181, 4, 65,112,201,113, 46, 0, 16,137, 37,208,104, 2, 64,
- 16, 0,195,242,176, 51, 44,104, 81,245, 74,195,106, 84,163, 26,213,248, 15, 99,252, 11,223,174, 41, 90, 86,171, 53,233,205,110,
-125,193,243, 2, 56, 1,224,185, 98,229,137,127,166, 62,113,140, 53,233,117, 83,199,243,220,181, 53,235, 55,244,110,209,166, 19,
-213, 48, 88, 5,125,126, 54,174,254,121,142, 5, 47, 92,113,229,249,252,252, 71, 70,185, 95,221,119,222, 29, 60,112,247,232, 49,
- 19,139, 58,118,238,172,212,104,252,109,233, 25,233,230,141, 91,182, 50, 39,143, 29,236,200,131, 29,150,159,255,216, 88,145, 29,
-157, 78,183,178,172,235, 82,137,234, 13, 0,161, 20, 77,216, 45,218, 71, 85,138, 8,207,203, 72, 27, 52,127,206,172,228, 17,227,
-166, 74,194, 2,235, 32, 87, 71, 33, 41, 61, 27, 15, 47, 30,180,101,196, 95,223,175, 79,191, 53,214, 69, 83, 89,101, 92, 75, 7,
-176,252,234,213, 43,141,162,162,162,122,118,233,210, 69, 24, 63,126, 60, 4, 1, 56,187,126,146, 80,144,116,117, 79,177,138,245,
-228, 21,235, 37,229,226,149,219, 94, 67, 58,182,162,189,213, 99,177, 97,231, 49, 6, 2,159, 82, 69, 51,126, 53,131,107,209, 78,
-119,161,115, 75,135, 23, 63,118,230, 89,252,152, 88,229, 71,155, 17,227, 87, 78,126, 95,226, 26,143,227,239, 55,121, 28,127,127,
- 12,128,220,221, 91,127, 61, 12, 0, 54,139,101, 98,244,217, 67, 41,247, 99,111,140,234,247,222, 23,117, 26, 53,107, 77,239,217,
-180, 28, 14,171,105, 31, 0,151,219,171, 84, 66, 37,151,212,123,101,174,194,151,234, 61,249,234, 49,130,164,104, 87, 73, 83, 41,
- 37,146, 20,120,222,165,128, 58,129,231,144,241,228, 30,188,252,131,161, 86,187,131, 23, 28,128,221, 6,109, 90, 28, 56,174,250,
-172,195,106, 84,163, 26,213,248, 15,225,213, 99,180,210, 30, 56,247,211,250,119,195,144,157, 59,114,211,166,205,115, 55,111,217,
-241,134,213,110, 15, 20, 32, 78,227, 88,251, 5, 35,135,239, 93,181, 97,201,121,124,195,219,187, 94,227,141,191,174,249,118,227,
-134,159, 58,129,231,234, 19, 64,178, 64,224,188,140,225, 70, 87, 70,178, 42, 28, 52,243, 12,235,186,191,179,196,146,159,111,220,
- 92,213,103, 45,249,113,217, 36,229, 8, 90,183, 98,206, 98,146,164,122,112, 28, 47,226, 57,230, 49,231,176,254,203,162,141, 59,
- 4,151,163,220, 80, 80,193,191,197, 2,136,141,142,142,238, 16, 29, 29,221, 6,192, 74, 56,207, 80,188,241, 58,245, 98,203, 55,
-116,253,114,218,151,103,191, 0, 17,194,243, 2, 88,142, 79, 17, 91,204, 93,171,104, 38, 40, 44,172,142,194,193,112, 47, 5,192,
-151, 14,132,127, 74,180,220,107, 42, 0, 4,185, 72,180, 0,231,106,186, 95, 95,186,200,178, 11,179, 50,211,118,254,252,175, 79,
- 39, 0,168, 13,224, 50,128, 53,255,169,122,119, 88,245,121,255,238,247,134,117,216,102,167,223, 61,132,204, 88,113, 0, 65, 59,
-183,114, 16, 56, 59,120,214,158,197, 50,142,217,213,125, 95, 53,170, 81,141,106,252,199,212,172,245,101,253,166,255, 91, 82, 88,
- 88,248,196,128,194,138, 15,233,117, 5,249,249,143,140, 0, 94, 90,185,103,126, 77,187, 49,143,244,123,241, 72,191,247, 85,159,
- 55,229, 38,106,129,196,209,175,153, 12, 87, 2,217, 47, 21,127,254, 17,228,229, 61, 48, 33, 15,109, 95,183, 90,182,109,221,242,
-112,199,142,157, 34,129,164, 68,188, 64,137, 89,129, 16,177, 60, 33, 98, 24, 30, 54, 7,195, 56, 88,150, 1,199, 58,192,115,140,
-192, 59, 24, 56,119,135,255, 39,144, 2, 96,198,255, 84,189,255, 39,192, 50,142,217, 96, 28, 0, 76,213, 93, 93, 53,170, 81,141,
-106,252,119, 17,174,255, 30,162, 85,141,255,213,120,146,240, 56, 62,178,186, 24,170, 81,141,106, 84,163, 26,255,203, 73, 86,233,
-111, 0,206,216,243,110,229, 60, 80,149,213, 4,221, 94, 33, 65,103,170,109,190,182, 77, 17, 0, 9, 0, 21,128,202, 92, 91, 61,
- 81,245, 13, 43,255, 39,242,254, 53,128,219,213,245, 94,109,179,218,102,181,205,106,155,255,107,109, 86,102,187,122, 53,227,191,
-153,128, 85,219,172,182, 89,109,179,218,102,181,205,106,155,213, 54,255,239,217,252,255, 25,227,203,248, 0,168,118, 29, 86,163,
- 26,213,168, 70, 53,254, 15,194,219,187,158, 10,120, 26,215, 91, 41, 20, 62, 13,252, 0,192,156,247, 32,167,186,244,170, 81, 6,
- 74,159,115,248, 92,140, 22,249,138, 6, 69, 36, 45,249, 82,161,246,126,160,116,247,206,248, 63, 94,184, 68,120, 45,229,228,238,
- 29,107, 31,136, 8,149,247,175,202,131, 10,223,240,223,253,235,180, 77, 85,106,194, 39, 35,160,133,252,117, 18,161,212,132,250,
-170,130, 90,253,169, 14,108,212,235,223,144, 71,105,195,134, 13,219, 53,108,216,176, 29,128,127,228,148, 98,133, 38,124,120,205,
-186,145, 23, 53, 97,205,207, 41,253,234, 13,254,167, 19,172, 10,168,235,173, 10,106,185, 87, 85,163,105,161, 42,160,169, 94, 85,
-179,229, 5,181, 79,131,176,202,158, 11,234, 55,191,254,236,237, 49,219,131,250,205,175, 95,214,191,123, 70,173, 82,255,176,227,
-209, 60,239,190,255, 82, 85,247, 43,175,134,160, 55,134,123, 4,116,250,194,187,170,207, 5,134, 71,198,214,106,212, 33,183, 70,
-189,182, 49,174, 62, 83, 51,162,221,173,144,134,111,228,212, 12,111,119,163,186,228, 93,131,204, 55,180,157,204, 51,248,168,212,
- 51,248,152,212, 43,180,243,235,218, 11, 8, 8,144,215,175, 95, 63, 42, 50, 50,114, 66,215,174, 93, 63,107,222,188,249,248,144,
-144,144, 30,255,147, 19,125,133, 38,124,134, 77, 68,228,217, 68, 68,158, 66, 19, 94,233, 98, 25,165, 38, 98, 46, 65,114,153, 4,
-201,101, 42, 53, 17,115,255, 91,234, 74,234, 23, 30,162,208,132, 47, 83,251, 55,188, 38,215,212,235, 91,213,231, 61, 61, 61,123,
-248,250,250, 14, 40,249,120,122,122,246,168,126, 3, 94, 25,165, 85,172,215, 86,180, 40,145, 84,113,121,196,152,143, 27, 47,156,
- 53, 93,182, 98,195, 1,172,152, 55,237,190,205, 84,212,240,191, 49,231, 62,161,109,110, 80, 36, 85,179,244, 53,142,231,210,243,
- 18,175,181,250, 39,236, 71,212,146,143,253,246,171,145,159, 15,127,183, 91, 72,183, 62,159, 18,113,137,150,131,174, 83, 52, 52,
-219,181,119,127,208,197,243,231, 86,109,216,176,254, 71, 45, 27,177, 76, 36,165,215,232,211, 98,139,170,146, 6, 55,223,176, 80,
- 90,233,115,241,205,254, 31,251,223, 60,179,117, 19,103,231,187,155,243, 74,157,254,253,234,240,173, 83,167, 78,107,138,162,188,
- 39, 79,158, 44, 6,128,229,203,151,215,229, 56, 46, 63, 33, 33,225, 58, 94, 97,243, 83, 39,193,140, 24,185,114,241,236,205,189,
-122,245, 70,102,158, 9,139,150,173,125,235,196,145, 93, 67, 76, 57,143,246,252, 19,117,226,225, 81,219, 13, 98,245,189, 79,191,
-250, 81, 19,245, 86,107,202,104,101,113,226,226,237, 14, 91,215,254,120, 13,104,208,198,144,247,160,220, 61,197,120,179,110,166,
-159, 74,136,226,205, 58, 0, 24,254,210, 96,175, 98,186,249,202,185,168, 0, 41,125, 59, 31,168,244,208, 71,143, 90,111,156, 20,
- 73,165, 33, 36, 73,130, 36, 0,146, 36, 64, 17,132,243,156, 80,135, 37, 37,227,225,165,158,255, 13,239,137, 58,184, 77, 54, 40,
-218,155, 36,158,165,143, 32,139,191, 5, 65,159,253,232,178,247, 63,240,223,184, 55,174,235,209,232,141,186,166,141, 23, 18, 11,
-148,116,199,207,142, 18, 2,249, 83,234,165,101,119, 92, 34, 0, 50,153,231,225,195,135,125,163,162,162,220, 53,141,250, 95,112,
-229, 25, 9,101,108,120,228,200, 33,113, 84, 84,207, 42,180,207,240,238, 32,201, 45, 4, 32,226,121, 97, 57,197, 11,187,140,249,
-241, 9, 64,213, 78,159,146,107, 34,198,146, 16, 92,238,103,120, 16, 55, 44,185,113, 27, 94,181,112,105,169, 91, 87,145, 88,252,
- 89,104,120,147, 22, 25,201,143,111,152,140,134,101,172, 77,119,161,202,134, 24,246,203, 51,151,110,246,162, 69, 34, 34,170,107,
- 91,202, 6,156,123,157, 74,247,243,243, 27,176,122,245,234,176,118,237,218, 1, 0, 88,150,117,219,189,123,183,255,156, 57,115,
-148,241,241,241,251, 94,209,108,160,175,175,111,176, 68, 34, 9, 4, 0,187,221,158,161,213,106, 83, 1, 84, 58,241, 87,250,133,
-249, 64,192,143,151, 46, 94,164, 1,160, 67,135,142,115,131,223,252,196,147, 18,171, 44,101, 22,135,221,160, 44, 74, 56, 55,245,
-234,223, 87, 8, 0,136,108,219,110,186,194,167,193,154,255, 73,101, 75,166,137,104, 75, 2,159, 71,118,232, 54,104,232,176,145,
-100,163,122,193,232,209,189,203,215, 22,224,112,149,218, 12, 77,203,175, 93,187, 86,135, 36, 73,138,101, 89,107,100,100,100,234,
-235,164,171, 70,120,187,191, 8,144, 65, 14,214,254,171,246,201,141,185,192, 75, 7,199, 80,238, 65, 45,190, 5, 69,143,227,121,
- 62,205,144,122,163,253,255, 66, 69,235,229,114,174,170, 37,146,150,124, 54,252,131,143, 26, 79,253,226, 27,217,167, 43,162,113,
-116,237,244,188,255, 86,146, 5, 0, 20, 73,213, 60,121,234,164, 70, 33,161, 0, 0, 70, 43,139, 94, 81, 81,149,143, 8,181,218,
-156, 39, 9, 34,162,228, 40,113,142,117,200,104,145,196, 74, 56, 9, 18, 8, 0, 62, 53,106, 69,251,177,151, 21,195,223,237, 22,
-178,101,199,233,244,212,244,252, 42,119,106, 4, 37, 70,100,199, 30,232,214,189,167,251,181,191,255,250,113,253, 47, 63,207, 96,
- 29,204,207, 60,195, 47,179, 22, 60,206,172,180, 51,247,175,215, 82,162,242, 57, 49,104,194, 28,111, 43,233,133,239,231,173,244,
-185,120,124,219,133,140,180,102,124, 74, 74,154, 85, 32,136,251,133, 5, 89,159,153,178, 19,226, 92, 45, 50,149, 74, 21,166, 82,
-169,154, 53,109,218, 84, 54,109,218, 52,209, 91,111,189,245,140,178,143, 31, 47, 62,127,254,124,192,146, 37, 75,122,223,189,123,
-215,106, 52, 26,239, 24,141,198, 39,168, 66,160,189,191,191,239, 39,239, 12,236,139, 46,131, 62, 6,199, 19, 24,255,209, 84,156,
- 60,190,111, 34,128,127,132,104, 49, 10,183, 57,227, 38, 76,243,141,108,221,156,250,113, 91, 28,228, 18, 26, 61, 91, 69, 16, 31,
- 76,158,233,177, 97,213,143,191, 33, 15,157,202, 82,178,120,179,110,102, 99, 31,251,176,126,237, 66,113,104,187,125, 24,186,126,
- 5, 82,225, 62, 55,237,208, 55, 15, 1, 32, 44,106,178, 90,202,105, 87,215,240,160, 52, 82, 78,187, 58, 44,106,242,153, 39, 39,
- 86, 27, 42, 74,139, 72, 42, 13,217,190,109, 91, 61, 79,181, 24, 52, 73,128,162, 8,208, 20, 9,171,157,195,144,119,135,253, 99,
-205, 92,174,169,215,155,116, 30,150, 13, 30,248,221,146,251,232, 88, 85,234,132,160,196,222, 71, 14,237,167, 53,238, 82, 80, 20,
- 1,138, 4, 40,146, 64,114,142, 5, 99,199,126,224,254,186,132,189,215, 27,154,214, 95, 14,141,232, 25,217,216,171,233,206, 43,
-132,123,100,175,161,222,121, 86,197,251, 59, 14,158, 27, 38,116,152,250,183, 32,240,139,211, 47,175, 60, 85,145, 17,155,205,150,
-211, 51,170,151, 27, 65, 43, 21,103, 14,108,234, 72,147, 4, 24, 78, 0,203, 9,224,138,207, 70, 37,138,103, 48, 36, 73, 64,224,
- 5,140, 27, 55, 22, 61,163,122,153,121,150, 79,119,189,147, 35,183,156, 56,243,167,175,141,225,177,100,245,134, 31, 77, 58,237,
-143,137, 15,189,147,141,186,188,169,150,220, 71, 46,159,131, 65, 66,104,149,246, 36,102,194,182, 35, 87,209,184, 97, 3,112,188,
- 51,157, 17, 53,149,216,118,244, 42,234, 71,212,119,166,155, 23, 16, 30,164, 66,235, 86,173,129,151,142, 38,115,149,100,169,191,
-239,244,246,200,217,125,134,140,129,198,215, 23,164,192,244, 57,115,116, 91,159,223,127, 90,252, 37,107,213, 47,169,146, 49,129,
-123, 58, 46, 8, 60,255,218,170, 83,141, 26, 53,124, 91,183,126,182, 29, 35,203,178,168, 93,187, 54, 50, 50, 50, 34, 94,101,158,
- 22, 16, 16,240,246, 15, 63,252,160,233,221,187,183,200,223,223, 31, 0,144,157,157, 29,120,226,196,137, 22, 63,252,240, 67,110,
- 86, 86,214, 81, 84,176,163, 15,199,144, 98,146, 6, 37,147, 41,156,121, 4, 65, 78,251,100, 84, 83,191,128, 26,101, 30,228,174,
-213,102, 75,190,250,248, 28, 65,211,226,226,251, 65, 10, 2, 79, 84,160, 18,117, 19,137, 68,101,122, 40, 28,148, 91,164, 32,114,
-255,144,164, 72,103, 99,101, 25,109, 97,234,173, 6, 85, 80,226, 26,137, 36,226,159,223, 25, 58,166,253,224, 65,253, 17,224,235,
-142, 51,151,239, 98,226, 39,159, 51,172,131, 89,246, 74,157, 7, 69,209,185,185,185,201,158,158,158,254,175, 63,222, 18,161,167,
- 79, 30,215,156, 57, 27, 61,125,233,138, 85,147, 28,118,150,225, 5,225,233, 57,198,114,185, 84,212,189,207,187,110,154, 58,145,
-178, 85, 63,124, 40,250, 95,168,104,173,255, 71,136,150, 68,174,126,247,187,175, 38,203,230,108,189,138,163,107, 39,230,153,245,
-121,190, 79,103, 10,110, 30,183, 76,250,162, 22,175,146, 66,149,111,120, 59,130,162, 39, 16, 20,165, 36, 72, 66,194,115,124, 26,
-107,183,207,181,228, 63,202,122,221,220,243,188,128,189,127,229, 86,141, 0, 9,168,187,101,231,126,141,159,135, 20, 86, 7,135,
-161,195, 71, 98,243,230,205,106, 95,119, 9,172,118, 22,139,151, 46, 53, 24,147,143,106,146,211, 10, 51,186,245,253,252,212,147,
-164,220,152,212, 44,235,174,170,166,205,230,224,160, 55,179, 48,219, 72,212,107,212, 26,139,151,213,151,165,166, 36,126,190,233,
-247,223,166,220,191, 79,109,230, 41,114,182, 53,235, 65, 90,153, 47,157,127,227,158,110,158,222,219, 7, 78,152,231,241, 40,151,
-134, 0, 7, 18,220,100,120,247,253, 41,110, 97,254,114, 40,101,148, 71, 98, 74, 70,192,180, 47,191,188,252,132, 19,218,232,181,
- 79, 18, 43, 75, 79,173, 90,181, 6,245,233,211, 71,241,197, 23, 95,136,130,130,130,240,251,182,221, 33, 29,122, 14,233,155,153,
-149, 19, 36, 8, 2,252, 52,154,180,113, 31, 12, 57,124,236,216,177,148,180,180, 52,209,162, 69,139,218,238,223,191,191, 97,118,
-118,182,203, 51, 83, 78, 16, 96,181,113,224,138, 7, 72,173,206, 86,101,126, 26, 24, 24, 40,205,200,200,176,149, 82, 25,136,103,
- 66, 33,209,179,107,167,182,244,186,227, 73, 48, 90, 57, 40,101, 34, 36,229,152,209,170,121, 19,226, 87,142,109, 86,150,193,177,
-239,190, 61,211, 79, 37, 68,245,107, 23, 10,141,167, 2, 27,215,204,195,161, 43,137, 81, 57, 70, 2,171, 5,106, 66,128,148,238,
-174,228,179, 86,191,213,170,142,127,151,150, 33,184,222,170,142,255,197,155,113,241,242, 33, 75, 39,103, 24, 69,103, 10, 79, 76,
- 49,148,221,241,144,240, 82,139,177,225,100, 10, 20, 50, 26, 74, 25, 13,165,212,249, 77,146,196,235,205,106, 3, 26, 4, 81, 60,
- 55,150,162,232,177,195,222, 29, 82, 99,196,176, 33, 2, 40, 18,187,247, 30,238,191,117,235,150, 44,198, 97,255,141, 35,169, 13,
-229,181,159,231, 10,148, 4, 52,238, 18,124,249, 91, 12,220,228, 34,168, 21, 34,184, 41, 68,232,210,212, 23, 20,249,202, 73,244,
-156,216, 63,172,247,196,129,181, 58, 71, 4,171,234,221, 73,208,221, 31, 59,247,198,138,243, 69,157, 63, 91,179,188,161,183,177,
-200, 78,127, 63,109, 28,157,158,153,217,121,247,225, 11, 93, 56,251,152, 56,214, 97,250, 70,123,119,119,153,170,112,122,220,149,
- 22,129,145,131,101, 14, 35,115,239, 78, 92,122,157, 66,155, 20,177,201,122, 40,101, 52, 84, 37,101, 43,163,161,148,137,160,146,
-209,200, 76, 79, 66,129,137,186,156,225, 77,118,198,133, 43, 85,218, 38,223,234,224,112, 59,209,136, 90, 17,205, 17, 16, 80, 3,
-246,222,239,213,250, 59,122,239,193,107, 23, 14, 44, 48,103, 63,252,198, 85, 59,219,142, 92,197,244,169, 19,110, 18,192,173,226,
- 65,186,197,247, 11,215,182,252,113,250,199,207, 93,155, 54,123, 85,203, 87, 87,178,212, 51,187, 12,252,104,118,135,238, 3, 97,
- 40,200,193, 95,167,118,161,103,159,119,240,222,152, 79,225,225,225,179,120,217,220,175,238,176, 54,125,244, 75,125,174,127,253,
- 55,155, 52,110,176, 53,176, 70,141, 32,158,119,158,242, 33, 8,128,209,160,195, 87,159,141, 3, 47, 8,104,214,162, 77, 23, 89,
-135,238,130, 80,124, 26, 72, 94,126,158, 41,238,225,253,110,214,220,184,191, 93, 46, 75,171,149,209,106,181,184,125,251, 54,226,
-227,227, 17, 27, 27,139,252,252,124,184,187,187, 27, 77,166, 42,237,253,230,214,180,105,211, 17,209,209,209, 50, 79,207,103,135,
- 52,216,237,118,168,213,106,140, 24, 49, 66,212,163, 71,143,192,183,223,126,123,116, 76, 76,204, 54, 0,250, 50,211, 83,240, 56,
- 83,237, 23,241, 75,167,183, 58, 77, 2, 0,185, 91, 64,226,234,223, 15,199, 86, 56,161,117,175, 17,210,190,253, 27,117, 32, 8,
- 32, 32,172, 52,231,199,103, 87,160, 18, 41,175, 94,189, 26, 70, 81, 20,253,108, 12,226,241,211,198,157,245, 79, 95,186, 55,104,
-225,226, 37, 50, 55,165, 20, 90,157, 29, 31,190, 55,208,229, 49, 88,238, 23,209,187,125,251,142, 7,127,156,253, 29,173, 82, 42,
-113,234,239, 39,152,252,217,151,214,172,228,152, 37, 2, 47, 90,107,214,198,231,190,230, 80, 41,224, 31, 64,189,154, 42,168,251,
-245,148, 77, 28,213, 79,102,103, 56, 20,153, 24,216, 28, 28, 56, 94,128,206,196,224,126,170, 1, 62,110, 85, 63, 34, 76, 16,132,
-214, 0,124, 1,104, 9,130,184, 94,250,119,201,132,174,132, 27,191,240, 59,175,120,124,240, 6, 96,135,115,165,254,211,230, 83,
-252,187,188,235, 37,207,223, 7,208,160,216, 38, 7,224, 26, 65, 16,133,229,144,173,151, 84, 46,250,200,145, 35, 66,159, 62,125,
-158,246,248, 47,254,126, 17, 82,177,168,134,210,221, 23,130,240, 0, 4,241,236, 54,141,127, 96,254,146,101, 43,188, 62,249,104,
- 66,138,190,168, 32,164,248,242, 25, 87, 6, 11,154,160,150,117,122, 35,178,199,164,143, 62, 66, 68, 88, 77, 49,199,113, 66, 76,
-124, 34,179,105,195,198,247, 47, 94,145,172,208,167,199,204, 44, 37, 65, 86,105,217, 39,199,115,233, 47, 42, 88, 28,207,189, 56,
-187,125,249,144,106, 2,240, 80, 73,240,203,241, 36, 8, 2, 64, 64,128,187, 82,132, 29,231,211,145,120,115,159,190, 79, 51,189,
-105,196,194, 89, 93, 58,247,158, 18,125, 63,193,186, 43, 55,215,122, 18, 64,118, 69, 54,203,238,208,121,216, 28, 28, 24,150,197,
-158,195,135, 17,213,165, 45,218,183,111,139,142, 29,218,211, 55,110,222, 29,243,209,164,113, 65,120,182,186,227,169, 77,153, 95,
-221,214, 42,119,159, 93,131, 38, 45, 82,223, 75,103, 65, 83, 64,168,191, 28, 94,106, 49,236, 44,129,100,173,163,248,205,241,192,
-228,105,179,189,166,127, 62,233,152, 94, 43,105, 12, 60,112, 84,148,119,179,217, 44, 25, 57,114,164,136, 97, 24,199,136, 15, 63,
-237,145,157,173,237,255,211,202,127, 73, 53, 26, 63,152,173, 44,110,198, 62,110,240,227,143,179, 67, 15,159, 56,127, 96,214,151,
- 19, 15, 70, 69, 69,185,239,220,185,147,175,172, 60,159,155, 33,230,228,173,217,184,117,207,230,229, 75,230, 35, 46,165, 16, 27,
-214,173,133,192,177,191, 84, 82, 84,165,109, 10, 35, 71,142,148, 31, 56,112,160,102,122,122,186,222,108, 54,107,159,211, 35, 72,
-130,206, 41, 48,195, 71, 45,129,152, 38,225,231, 41,131,198, 93, 10, 17, 5,144, 4,193,149,101,115,195,174,163,115,121,179, 14,
-135,182,219,135,109, 92, 51, 15, 99, 62,249, 22, 49,121,146, 19,164,194,125,238,199,195, 6, 77,247,149,115, 81, 53, 60, 72, 77,
-151,150,181,160,148,137, 49, 99,202, 72,180,185,153,172,201, 40,226,191,213, 90,168,230,179, 79, 60, 61,172,251,204,243,226,136,
- 83,193, 82, 43, 68, 56,177,117,113,174, 73,167,213,149,184,228,236, 54,107,138,139,205,248, 76, 25, 51,219,233,205,155, 52,154,
- 55,105,252, 88,242,141,118,109, 4,146, 20, 33,207, 96, 39, 4, 1,248,108,242, 68,124, 60,113,156,127, 90,102,238,247,107,215,
-254, 50, 51,250,180, 48,199,164,125, 56,171, 34,155, 36,225, 84,129, 84, 50, 26, 42,185,147,184,168,100, 52,172,118, 14, 4, 1,
-202, 35,184,133,142,112, 42,185,153, 5, 41,229,206,192,159,179,233, 21,220,232,236,233, 68,117,253,194, 93,133, 87,146, 50, 99,
-231,222,188,155,115, 13, 64, 65, 80, 71,143,209, 14, 86,128,209,202, 34, 41,199, 12,214, 33, 16, 99,122,133,160,246, 96, 34, 98,
-254,198, 91,155,143,223,133, 91,169, 78,255, 57,155, 25, 87,247, 88,189, 27, 15, 28,186,124,213,186,235, 75,230,125, 75,229,233,
-236,224, 5, 1, 50, 9, 5,185,132, 46,254, 80,176,152,116, 88,251,243,175,217, 44,136, 65,184,112,129,173, 74,251, 4, 47,188,
- 55,176,119,199, 29, 4, 32, 33, 72,113,122,141,144, 90, 33, 93,251,190, 47,235,218,111, 36, 56,214, 62,253,230, 37,225,156, 57,
- 55,238,172, 43, 54, 27, 55,108, 0, 2,184,101,202,141,159, 8, 0, 74, 77,248, 47,245, 35,234,183,124,241, 90,221,186, 17, 45,
- 93,169,247,167, 74,169, 76,253,137,167,151,239,183, 17,141,154,107,114, 10,109,132,218,187, 38,146, 30,221,198,246,159,191,223,
-194, 91,237,179,207, 30,221, 53,111,197,134,253,239,118,141, 26,136,141, 63,253,107, 70,126,214, 83,162,117,166,148, 90,245,222,
-166,223,214, 7,137, 36, 82, 48, 44, 15,134, 19,156,223, 44,135,130,130, 66, 48, 44, 15,153, 66, 13,150, 39,192,112, 60, 24,150,
-135,205,206, 42, 39,142,124,251, 35, 43,240,119, 89,233, 12,172,223,233,164, 88, 42, 13, 17,224, 60,187, 86, 16, 4, 36,101, 91,
-200,128,128,128,109, 0, 32,149, 74, 33,149, 74,193,243, 60,110,198,105, 63,241,137, 8,159,132, 98,130,199, 57,236, 41, 69,201,
-127,246, 44, 47,239,254,254,254,125, 95, 36, 89, 86,171, 21, 70,163, 17,151,174, 92,119,255,109,243,158,168,164,148,244, 48, 94,
-112,183,169, 53, 97, 61, 13,185, 79,250,150, 87,158,134,156,184,143,220, 34,199,145, 95,124, 60,186,238,170, 77, 71,174, 61, 62,
- 57,183,194, 56,173,218, 93,191,182,127, 49,225,157, 86, 11, 87,110,120, 84,248,231, 47, 83, 43,171, 35,154,166, 69, 90,173,246,
-233,251,189,250,215,237,173,110,197,101, 12, 88,177,124,133,236,230, 19, 3,238, 37,101, 98,116,183, 96,231, 12,199,133,122, 87,
-250,133,249,132,214,169,179,109,237,202,133,244,163, 76, 43,214,236,187,134,232,131,191, 92,202,206,253, 59, 10, 57, 89,150, 87,
-233, 67,254, 1,162, 85,174,205,115,119,243, 96,180,178,176,217, 89, 48,188, 0,189,153, 65,110,145, 29,122,179, 3, 70, 11,139,
-209,221,131,203,124,174, 18, 62,226, 75, 16,196, 17, 65, 16,250, 8,130,208, 13,128,164,228,183,115,204, 38,142, 20, 19,178,231,
-126, 79,159, 62,253,155, 5, 11, 22,196,150,220, 91,114,189,228,222,138,174,151,122,222,123,198,140, 25,141, 23, 46, 92, 56,191,
- 93,187,118, 59,254,250,235,175, 68, 0,133,174,186, 15,233,210,153, 57,114,228, 72,101, 5, 29,230, 96, 28, 82, 55,185, 8,161,
-181,131,241,193, 55, 27,125,254, 88, 56, 54, 87, 38,161,169,227,199,143,123,229,219, 85, 32, 73,202,229, 41,138,202,183, 94,123,
-177, 88,114,116,233,210,165, 24,214,183,131, 60, 53,143, 49,222, 77,181,228,152,236, 96, 53,190,225,146,185,243, 23,170, 22, 46,
- 90,252,241,145, 67,124,145, 49,231,254,226,178, 93,124,173,110, 80, 68,169, 24, 44,130,128,192,115,233,133,201,215, 91, 1,192,
-235,196, 98, 25,173, 12,168,226,216, 26,130, 0,204, 86, 22, 20, 69,228, 22,197,237,186, 63, 98,206,220, 46, 91,118,156,206, 20,
- 72, 15,131,201,148,164,128,243,204,193, 42,195,106,231, 96, 99, 56,196,222,185,137,142,145, 13,209,190, 85,125,152,173, 28,204,
- 54, 22,181,235, 68, 0,128, 79,153, 21, 71,145,137, 2,199, 88, 5,129, 83,247,105,237, 11,141,135, 4, 1,158, 82, 72, 37, 52,
- 24, 22,176,216,121, 88,237, 28,146,115, 45, 48, 88,228,104,210,105, 72,168,119,192, 13, 91,118,178,252, 64, 65,234,141, 65, 21,
-146, 83,142,195,166,109,123,234,102,102,230,244, 63,118, 96,171, 84,171,103,112, 55,217,132,220, 34, 27, 64,249,226,135,249,107,
-164, 95, 79, 29, 63, 96,211,246,189, 41, 93, 59,180, 77,169,106,158,205,218,184, 45,187,118,239,249,165, 79,159, 1,242,216,191,
-143,225,209,237,179,243, 76,185, 85,138,207, 34,155, 53,107,198,142, 31, 63,222, 48,127,254,252,160, 67,135, 14,213,214,106,181,
-183, 1, 48, 30, 30, 30,245,195,235,134,220, 57,117,226,120,224,219, 3,134,136,210,243, 44,112, 87,136, 17,162, 81,224,202,165,
-147,140, 68, 34, 42, 51,222,164,216, 61, 56, 28, 93,191,194,161, 43,137, 81,177,249,178,243,227,198,142, 78, 57,117, 49, 46,127,
-245,230, 83,255, 10, 84, 49,183,101,188,118,245,141, 86,117,252,167, 79, 30,137, 5,171,182,224,194,205,184, 92, 19, 25, 48, 47,
-203,198,158, 46, 95, 74, 7,104,138,128, 90, 46,130, 73,175,213, 37,220, 58, 17,254, 15,201,212,163, 79, 29,216, 66, 22, 24, 24,
-164,229, 89,137,204, 2, 3, 56, 94,128,135, 66, 12,150, 23, 80, 84,144, 71,108,221,178, 25,215,175, 95, 33, 65,145, 31, 2,152,
- 85, 97,129, 18, 78, 87,161, 74, 38,114, 42, 66,114,231, 55,195,241,136,168, 91, 7,235, 87, 47,115,243,209,248,225,205,142,174,
-199, 70,171,189, 67,154,237,248,125, 53,206,255,117,235,173, 11, 43,214,180, 86,213,240, 93, 69, 16,220, 18, 8,176,218, 28, 28,
-116, 69,133,144,216,211,208, 38, 80, 11, 47, 5,135,100,125, 0, 98,178, 31,169, 42,235,240,243, 99,246,223, 38,132, 1, 51,247,
- 28,142, 94,208,179,251, 91,136, 73,214, 67, 46,161, 33,147, 80,144, 73, 40,136, 8, 14,203,126,254,133, 41,212, 25,250,228,199,
- 30,204,123,133,246,121,166,120,246,235, 36,119,156,209,119,203,170,153,127,140,251,106, 81,207,168,129,239, 19, 49,215,207,125,
- 99, 6,206,186, 54,209, 19, 92,186,198,243,174,143,113, 50,181,207,202, 41, 95,207,157,210,163,207, 16, 80, 20, 13,134, 97,255,
-137,233,136, 0, 0, 32, 0, 73, 68, 65, 84,176,119,231, 22,252,190,230,135,135,118, 99,254,251, 0,120,123, 46, 53,126,215,150,
-159,135,124,245,253, 50,162,113,179, 54,109,207,101,189,124,188, 39, 79, 17,235, 70,141,157, 48,212,207,207, 79,253, 76,209, 18,
- 16, 30,209, 16,189,251,189,131,147, 7,247,227,126,236, 93,240,130,147, 48,241,188,128,162,194,252,108,150,177,111, 42,215,227,
- 33,147,133,108,252,125,115, 61,146, 36,158, 30, 32, 63,245,163, 15,236, 19, 63,251,230,205,222, 61, 58,197, 74, 40,232,147, 83,
-179, 60,174,220,122,208,132, 23,169,130,198, 78, 91, 38,182,218, 56,232,204, 12,142,109, 40,159,235,200, 60,131,219,213,106,217,
-123,236,196,239,214, 75,165, 20,233,104, 20, 30,148,216, 41,178, 81, 90,112, 13, 31,195,143, 11,215,180,185,252,247,173,222,239,
-142, 24, 43, 27, 93,191, 37, 81,195, 91,174,254, 96,196,192,166, 28,235, 24,101, 46, 72, 43,119,127, 65,145,194,179, 40,184,118,
- 93,243, 51,197, 40,124, 31, 33, 32,244, 57,230, 65, 32,209,146, 19, 63, 8, 0, 2,106, 4, 91, 69, 82, 55, 67, 21, 20, 24, 1,
- 0, 86,253,186,189,213,157,248,204,113,203,151,175, 80,220,124, 98,192,237, 39, 58, 72,197, 36, 28, 12, 15,194, 69, 81,155, 23,
-168, 9,223,206,152,238, 86,104,226,112,254,174, 22,177, 55,206, 9,118,163,117,132,130,117, 27, 4,141,122, 20,128, 58, 0, 18,
- 8, 66, 88,103,202,241, 63, 8, 92,168,242, 65,167, 60,239,156, 47,187,249,134,133,114,180,180,183, 72,162,108, 71, 16, 66, 35,
- 66,128, 39, 32,100, 20, 20,143,169,174, 50, 53, 83, 78, 60, 22,205,255, 30, 43,127,219,143,204,124, 43,220,185, 52, 28,220, 48,
- 23, 95, 44,216, 6,139,173,252,168,134,202,248, 72, 89,196,232, 69,194, 85,242,119,201,125, 11, 22, 44,232,243, 66,221,244, 41,
-167,206, 94,186,175,228,249,133, 11, 23,206, 47,245,239,102, 87, 73,214, 83,162, 85,146,169, 74,200, 86,184,111, 64,200, 95, 7,
- 15,236,243, 44, 52, 58, 32, 19, 83, 8,174, 93, 23,179, 86, 31,244,237,213,202, 7,121, 14,119,108, 95,191,164,192,106, 54,236,
-116,169,179,208, 68,180,149,171,148,199,246,237,221,143,176, 96,141,120,235,165,130,164, 91,137,150,167, 82,175, 94,155, 34,169,
-237,102,166, 7, 13, 28,168, 56, 27,125,238, 51, 35, 80, 38,209,162, 8,170,230,175,155,247,106,212,114, 17, 8, 2, 48, 88, 88,
-140, 27,245,206,235, 15, 99, 2, 79,141,125,127, 52,136, 98,146,165,207,207,198, 55, 95,127,100, 85, 50,143,238,167, 38,167,102,
-116,235,251,197, 89,189,145,176, 14, 29,249,209,245,251,241, 11, 10,205,230, 87, 59,228,199,102,231, 96,115,240,120,242, 36, 1,
- 83, 71,119,135,136, 34, 65, 81,188, 51, 88,154, 45,191, 49, 26, 51,227, 11,224, 47, 30,188,101,233, 39,191,214,240,211,120,171,
-148,114, 65,165,144, 18,141,234,215, 19, 71, 70,182,151,212,142,104, 42,190,244,192,130, 84,173, 5,137,153, 58, 72,253,154,211,
-195,186,244,194,150, 21,211,222, 42, 72,189, 65,226,229, 32,197,231,112,250,252,213,190,191,253,188, 92,154, 83,228,192,195, 84,
- 35,178, 11,173,200, 42,180, 33,187,192, 10,149, 92,132,142,253,198, 75,143, 30, 92,215,183,107,135,182,171, 94, 37,223,137,137,
- 73, 71,147, 51,178,134, 52,109,209, 6, 91,254,248,189,131,135, 71,109,183,162,162, 36,189,171,181, 51,119,238, 92,201,194,133,
- 11,233,213,171, 87,235, 35, 35, 35,253,103,204,152,209, 51, 55, 55,247, 90,173, 90,181, 34, 78,238,219, 20,221,188, 99,255,214,
-224, 29,190, 29, 58,117, 22, 75,121, 26,167,142, 28,113,236,218,185, 53,223, 98, 49, 76,172,144,112, 40,220,231,230, 24, 9,248,
- 6, 6,198,170, 36, 92,119,154, 44,138, 47, 60, 49,101,115, 33,176, 47, 44,106,242,153,115, 55,226,226, 91,221, 76,214, 68,223,
-124,156, 91, 96,118,132, 63, 57,241, 69,133, 29, 47, 69, 16, 16, 81, 36,212,114, 26,100,113,175,170,170,209,244, 49, 8,194,183,
- 68, 57, 37, 64, 20,127, 3, 4,129,204,194,212,219, 46,196,108, 16, 2, 47, 0,113,233, 38, 24,173, 78,105,190,166,143, 2,218,
-156,116,252,180,106, 19,110,221,184,142, 30,189,250, 97,237,175, 91, 49,110,212, 16,107,101,179, 31,146, 44, 86,180, 74,169, 89,
- 42, 57, 13,128, 64,145,137,193,222,203,105,168, 19, 74,186, 60, 48, 0,128, 90,165,128,206, 96, 1, 41, 86, 35,225,230, 49,197,
-241,115,127,207,152, 57,103,249,151,133, 89,119, 83, 31,223,187,132, 8, 31, 29, 66, 3, 29,136,205,118,195,141,252,218,136,168,
- 27, 6, 82,124,221, 37,219,121,177, 77, 22, 29, 36,247,246,105,213,188, 97,187, 16,141, 7, 44,118,174, 88,213,162,240,251,198,
-205, 72, 78, 74, 31,155,127,255,224,173,127,130,209,154,114, 19,181, 82, 77,221,143,239,253,125, 54,113,224,136,143, 17, 16, 24,
-220,172, 40,245,182,139,131,151,107,164,138,115,145,104,137, 21, 30, 51,166,126,251,175, 41, 61,222, 30,140,171,151,206,226,118,
-108, 2,218,182,109,141, 94, 3,134,193,160, 47,168,191,123,243,138,238,172,217,112,146,150,178, 83,218,180,239, 66,240, 28,135,
- 71, 15, 99, 18,202,178,101,201,138,187,125, 37, 43,206,237, 57,247,148, 79,253,102, 42,119,175,219, 54, 7,135,140,140,116,252,
-249,215,249, 22,150,172,184, 42,109, 32, 44, 21, 83, 56,117, 43, 23,142,226, 51, 76, 59,118,234,110, 23,147,182, 14,243,150,111,
-140,204,202,204, 34,149,110, 62,188, 87, 96, 3,113,128,212, 97,187,243, 68, 39,118, 48, 60,194,106, 40, 43,180,233, 91,163,238,
-252,105,211,166, 54,160,196,114, 24, 76, 54,123, 86,102,134,255,250,237,231,140, 15, 30,222, 11,172,169,113,119,251,215,138,117,
- 98,189,149, 64,174,206,134, 2,131,158, 24, 49,225,171, 26,191,173, 89,240, 94, 69, 68,171,140,112,145,208,163,167, 46,213,247,
- 84,139, 9,163,149,229,243,245, 14,110,196,128,215, 91,116, 89, 76,178,198, 47, 95,182, 66,113,235,137, 1,119,158,232, 32, 19,
- 83,144,136, 73,216, 25, 30, 46,190, 78,164,191,198,127, 98,251, 86, 77,112,242,118, 30, 40,138,132,197, 80,104,166,145, 31,223,
-234,173, 30,138,150,109, 34,209,249,173, 78,120, 28, 31, 23,124,228,208,222,174, 87,254,188,144,205, 58,194, 63, 49,105,227,247,
- 87, 73, 88, 48,155, 41, 70,226,255, 65, 64, 96,173, 55, 6, 13,251,192, 61, 36, 56,144,208,248,120,131, 21,104,140, 31,245,142,
-203,111,190,147,152, 3, 11,231,204,128,205,102,135,175,135, 4,130, 0,108, 92, 53, 11,118,187, 29, 53,188,165,208,153,202, 63,
- 77,174, 50, 62, 82,158, 10, 85,165,216,147, 82,100,172,162,235, 4, 65, 28,153, 62,125,250, 55, 0,132,233,211,167,127, 83,242,
-123,193,130, 5, 22, 0,153,149,184, 14,215, 63, 71,180, 74, 50, 87,254,219, 45,142,240,241, 14,184,114,234,228, 9,247, 3,119,
-120, 92,221,127, 3,111,183, 13,128,152, 38,161,112,175,129, 59, 73, 58, 28,221,247,115,209,193, 29,235, 50,108, 54,219,226,202,
-125,205,117, 91,169, 20,202,147,127,108,217,201,251,120,123,147, 63,157,210, 62,201, 55,176, 79, 93, 90,241,127, 31,226,111,156,
- 92, 31, 32,128, 56, 33,147,201,234,218,237,118,207,202, 42,118,227,169,148,226, 32, 94,226,159,232, 91, 65, 80, 20,183,101,235,
- 22,248,184, 73, 96, 99,120, 76,255,242, 83,203,232, 30,170,162, 17,239, 14,235,210,185,247,148,104,145,178,222,217,246, 45,234,
- 9,205,155, 55, 47,162, 40,202,165, 80, 10,141, 70, 51,139, 36,201,225, 18,137, 68,109,183,219, 13,118,222,170, 48, 89,237,176,
- 58, 0,179,217, 10,145,216, 73, 22, 69, 20, 1,139,213, 14,179,197, 94,241,139,145, 29,115, 25, 64,184,190,148,166,116,246, 65,
-152,100,219,238,131,159, 14,126,119,232,204,192,102, 3, 84, 73, 89, 58,136, 9, 7, 90, 55, 8,192,185, 19,251,133,244,228,248,
-169,149,145, 44, 0,200,213, 22, 4,249,250,250,225, 86,162, 17, 25,249, 22,100, 23,147,172,172, 66, 27, 12, 22, 3,154,134,212,
- 64,145, 78, 23,244,202,229, 11,236, 63,121,242,228,144,222,253,135, 98,202,151,179,223,220,240,243,146,187, 74,137,104,140, 41,
-231,209,121, 87,136, 86, 76, 76, 76,193,215, 95,127, 93,231,215, 95,127, 37,223,123,239, 61, 75,147, 38, 77,100, 35, 71,142,124,
-115,243,230,205, 50,133, 66,102,185,115,233,208,204, 15, 39, 79,239,191,126,229,220,102,133,133,133, 4,203, 48,199, 29,133,133,
-211,141,149,144,185,180, 67,223, 60,252,225,137,227,253,238, 29,124, 15,121, 41,200, 70, 82,193, 62, 12, 13,102,237,196,131, 89,
-142, 39, 39, 86, 27,228, 67,150, 78,206, 44,226,191,181,146,154,121,149,145, 44, 0, 32, 41, 2,118,150,131, 90, 46, 2, 73,146,
- 37, 36, 62,224,247,157,199, 21,190,238, 18,136, 40, 18, 52, 69, 64,111,102,144,167,119,224,227, 15, 92,221, 33, 68,224, 89, 78,
-128,197,206,194, 92, 60, 59, 52,232,243, 48,227,203,207,209,171,239, 64,124, 56,241,115, 20, 90,128, 27,137, 6, 56, 24,166,210,
-151,130, 36, 72,152,109, 44,198,244, 8, 65,129,209, 1,147,133,133,157,229,161,144,208, 16,209, 36,148, 50, 26,110, 10, 17, 32,
- 8,226,146,206, 68, 36, 18, 89, 25,134,217, 82,193,140, 30,181,131,252, 96, 97, 72,180, 25,186, 4,221,218,133, 35,246,242, 94,
-250,194,213,123,161,159,125,249, 45, 62, 29,215, 23,123, 30,214,129,151, 38, 4, 42,165, 28,140, 64, 2, 16, 92, 12,216,155,197,
-147,142,129,195,127,249,117, 99,220,143,223, 79,151, 21,153, 8, 72,197, 20,162,207,158,193,149,191,111,172,204,187,127,112, 11,
-254, 65,136, 4,210,207,205,205, 13, 50, 9, 5,187,195,102,119, 61,116, 65,128, 0,180, 80,106,194,127, 41,158,241,183,224,120,
-148,113,173,114,162, 69,203,220,166,127,242,229,143,243,123,188, 61, 24,167,142,236,193,238, 61, 59,185,118, 81, 99,169,173,191,
-255,140, 55,187,245,195,155, 61,134,226,248,254,205,159,155,120,162,225,248, 41, 51,231,116,236,210, 27,167,142,238, 65, 78,118,
-250, 82, 87,211, 75,137,136, 41, 93,186,247,133,213,206,161, 67,215, 62, 56,113,120,255,100, 20, 47,178,112,125, 16,123,161,127,
- 6,201,126, 62,117,138, 40,183,200, 46,210,234,237, 72,215,154,145,148, 99,198,193, 29, 27, 4,215,251, 11,123,235,142, 77,107,
-138,198, 47,138, 78, 11,170, 25, 96, 19,217, 44,242,248,132, 39,245, 63,252, 96,180, 40,180,110,125, 50, 87,103,131, 86,103, 67,
-158,206, 6,163,149, 69,221,154,245, 72,134, 37,218, 85,181,158,125,220, 37,162,181,135, 19,225,166, 20,161,125,253, 87, 95,104,
-203,243,252, 51,146,181,220, 73,178,238, 38,234, 32, 21, 83,144,138, 73, 72,197, 20, 88, 78,112,105,226, 34,215,132,247,254,248,
-147,143,106,216, 89, 32, 95,103, 7, 77, 17,208,248,120, 42, 91, 55, 27,142,141, 75, 38, 3, 0,198,125,253, 19, 62, 28, 51, 18,
- 13, 26, 53, 65, 81, 97,161,255,240,193,189,151, 3,216,239,106, 90,143,157, 58, 31,124,234,226,173,175, 63,158,246,131,234,221,
-190,157,169,219, 79,116,200, 42,176, 33, 33,222, 80, 37,229, 13, 0, 88,142,135, 0, 1,155,118, 30,129, 92, 66, 67,171,115, 64,
- 16, 4,204, 93,189, 11,106,185, 8, 89,133, 78,119,127, 69,168,144,143, 84,160, 72, 85, 65,109,236, 3,103, 44,151,175,171,138,
-214,130, 5, 11, 98, 23, 44, 88, 80,166, 66, 86,138,100,189,218,161,210, 98,177,178,190,155,183,207,213, 83, 39,142,169,247,223,
-225,112,238, 78, 62, 6,119,168, 9, 99, 65, 42, 22,127,249,110, 1, 1,193, 78, 82, 84,145,205, 98,222,103,177,152,230, 1,112,
- 84,216,104,252,195, 91, 40,101,170, 51,107,215,255,193,250,104, 52,216,114,169, 32,189,208,196, 50,207,220, 86, 12,113,227,228,
-250, 80,150,103,162,172, 57,143,175, 87, 54, 19,231, 5,136, 23,252,124, 16,128, 0,158,231, 33,240, 60, 68, 50,149,210, 39, 44,
- 50,167,184,163,147,209, 36, 97, 45,221, 3, 8, 60,155,158,151, 88,177, 12, 74, 0,112, 87,136,176,243, 66, 6, 0,228, 80,134,
-155, 15, 70,188,235,116, 23, 90,237, 50,125,163, 58,117,132,214,173, 91, 23,201,229, 46,109,127, 69,249,249,249, 93,155, 57,115,
-102,253, 15, 63,252, 80, 42,145, 72,192,178,172,215,186,245,235,249,245,243,198, 97,208,228,181, 16, 75,164,176, 88, 29, 16,137,
-104, 20,234,140, 40,210,155, 97, 48, 51, 85,111, 65, 79,158,216,181,192,162, 3,251, 37, 3,123,170,154,182,145,144, 98,180,140,
- 8,192,185,147, 7,132,171, 39, 54,142,179,228,198,255,225, 98, 67,132,209,202, 32, 51,223,138,140,124, 43,178, 11,173,200, 46,
-176, 33,187,208, 10,130, 32, 96,181,179,175, 53,112,153,114,227,118,111,249,227,183,126, 54, 7,134,117,236, 49, 16,159,255,176,
- 54,100,203, 47, 11,207, 36, 10,228, 27, 46, 6,218,114,177,177,177,201, 31,124,240, 65,179,237,219,183, 83,141, 27, 55,182, 60,
-120,240, 64, 81, 76, 34, 29, 42,149, 66,190, 97,205,130,147,109,218,180,217,153, 17,255,240,108,177, 63,189,210,142, 61,164,211,
-251, 82,185,227,214,248, 96,101,251,158, 97,254, 10, 4, 43, 13, 61,235,171,238, 44,206,239,242,233,124,109,244,202,220, 44, 27,
-123, 90,107,161,154,103, 24, 69, 46,197,224, 49, 54,107,202,160,193,195, 64, 17, 36, 28, 86,115, 74, 73,227,210,184, 75, 48,107,
-235, 67,168,100, 34,168,229, 52, 84,114, 17,222,108,232,133, 42,244,103, 2,195,241, 48,219, 56, 88,108, 44,172,118, 22, 62, 65,
-158,248,117,203,110,164,230, 90,112,240,122, 30,226, 82, 12,168, 87, 83, 9, 65,168,188,155,228, 57,198,212,247,157,247,212, 20,
- 73,128, 34, 9,178, 97,253,112, 20, 24, 29, 16,211, 36,196, 50, 57,148, 82, 26,110,114, 17,196, 98, 17,114,115,115, 97,179,217,
- 16, 28, 28, 44,171,152, 10, 10, 80,171,228,168, 23, 90, 3, 14,134,197,177,139,247, 49,111,234, 32,116,239,216, 10,132, 72,133,
-135,182, 22, 80,123,169,193,147, 36, 28, 44, 15,187,131, 3, 64, 90,203,179, 23, 20, 20,212, 69,169, 84, 42,205,102,179, 33, 53,
- 53,245,124,118,220,254, 84,142,234, 63,254,196,169,232, 45,125,122,117,199,173,187,177,216,179,255,208,165, 60,111,221,180,146,
-103, 26, 53,106, 20,233,227,227,163,202,207,207,215,199,196,196, 92,123,213,121,129, 64,146,159,181,123,243, 45, 24,139,114,145,
-147,150,228,242, 44,186, 65,136, 26,223, 45, 88,219, 50, 34, 60,162, 37, 39, 56,137, 87,195, 96, 53,190,248, 97, 85,203, 58,245,
-194, 91,150, 44, 8,105, 16, 92,241,182,108,180, 66,221, 99,212,135,159, 47,232, 55,248,125, 68,159, 58,132,101,243,190,220,162,
-116,247,109,224,229,233,222,188,113,100, 15, 92, 58,115, 8, 50,181, 63, 60,189,253,223,124,111,204, 39,221, 6,191, 55, 1, 87,
- 46,157,193,202,133,223,108,230,108,134,109,174,164, 85,169, 9,245,109,214,162,205, 8,181,151, 31,138,116, 6,168, 61, 53,104,
-208,180,245,136,251,119,108, 95,155,114, 19,181,175, 76, 58, 4, 1, 54,135,128, 66,163, 3,105, 90, 11,146,179,157, 68,139,231,
-171, 16, 19,196,241,132, 74, 70,211, 94,204,227,224,123,103,162,133,144, 32, 63, 98,209,156, 47, 41, 7,100,208, 22, 57, 73,150,
- 86,111,135, 86,103,135,209,202,192, 75, 73,131,231,248, 42,207,186, 11,141, 14,168, 21, 34,184, 43,196, 46,171,140,101,225,231,
-223,119, 70,220,137,207, 28,176,108,217, 10,197,237,196, 82, 36, 75,228, 84,179,164, 98, 10, 28,207, 3, 46,188,241, 34, 90, 52,
-165,127,239,110, 72,203,179, 56, 87, 45,147, 4,234, 53,105, 3, 31, 57,143,174, 67,167, 3, 0,250,246,118,134,182, 37,102,153,
-112,248,170, 22,120, 62,176,187,226,190,216, 98,161,214,111, 61,250,217,238, 93, 59,220,173, 28,141,117,199,147, 97,182,177,144,
-137, 41, 72,197, 20,228, 98,234,185,120,236,202,137,150, 51,230, 46, 53,143,129,217,106,133,222,194, 64, 0,112,237,177, 17, 22,
- 59, 11,157,137, 65,100,125,207,215, 19, 66, 8,226,168, 32, 8,111,191, 72,136, 94, 36, 75,165, 20,169,178,108, 92, 47,109,163,
-228,254,242,136, 92,233,152, 45, 0, 85, 90,193, 69,191,200, 28, 75,255, 22, 43, 61, 27,184,171,221,175,158, 56,126, 68,181,255,
- 14,143,243,119,157, 36,139,177,228, 97,233,215,195,211,245, 69,121,157, 1, 60,113,245, 63, 83,248, 52,104, 42,147, 72,163,255,
-181, 98,157, 67,227, 23,200,239,187, 90,148,171, 51,115,207,177, 9,206,102, 35, 5, 94, 16, 91,115, 30,187,228, 67, 32, 73,194,
-241,195,228,129,224, 5, 1,179, 86,236,198,252,105, 67,161,146,191,167, 32, 8, 66, 97,178,178,152, 58,251, 55, 44,253,110,172,
- 90, 33,165, 65, 16,206,152,168, 81,195, 6,186,214, 0,173, 44, 18,254,222,110, 52, 36, 30,121, 80,218, 93,216,246,205, 94, 55,
-218,182,109, 91,228,233,233, 9,185, 92,254, 76,169, 40, 7,126,126,126,223,253,240,195, 15, 17, 19, 39, 78,124,186,217, 39, 77,
-211,248,248,163,143, 72,142, 19,112,252,248, 70,248,214,106,129, 67,167,175, 34,170, 75,107, 24,205, 86, 20, 20, 25,192,131,122,
-229,134,104, 40,202,139,206, 78,190,215,230,141,206,125,113,254,228, 1,225,234,241, 13,227,170,178, 71,143,167,151,103,218,205,
-123, 9, 13, 8,194,203,169,104, 21,147, 44, 59,195, 35,196, 79,129,180,228, 4,120,184,187,167,185,106, 79,238, 27,209,159, 32,
-133,137, 4,132,141,166,156, 71,187, 1, 8,166,172, 7,195,119,111, 91,127, 55, 54,230,246,188, 62, 35,166,208, 61, 6,127, 68,
-253,178,224,147,111, 0,184,186,241,158, 35, 46, 46,238,254,216,177, 99,219, 95,185,114,133, 3, 96, 38, 8,130,161, 40, 74, 97,
-183,219,197,157, 59,119,214, 61,124,248,240, 60,202, 14, 90,124, 14,111,126,176,219,135,144, 26,122, 73,120,199,240, 16,181,161,
-123,231, 14,237,208,174, 81, 16,210, 58,180, 3,128, 41, 41, 70, 85,132,181,206,111, 59, 25, 86,126,236,151,223, 15,207, 31, 55,
-180,219,212, 45,244,172,101, 89, 71,102, 85, 24,136,154,246,224, 66,207,178,104, 60, 77,145, 80,203, 69, 80,201,105,168,229, 34,
-168,101, 34, 48,172, 80,149,153,163,192,176,188, 83,209,178,179, 48, 90, 88, 68,223,206, 65,182,206,142, 34,131, 3, 22, 7, 7,
- 1,130,115, 54,234, 66,111,174,125,252,167, 71,201, 72,234, 17,220, 66,183,126,245, 18,183,189,151,211,159,174,232,115, 87, 72,
-160, 86, 56, 87, 99, 95,188,120, 17,222,222,149,207,246,121,158,199,158, 19,215,176,108, 83, 52, 78,108,252, 10, 50, 49,133,166,
-253,103,227,253, 1,109,193, 11, 60, 18,226, 98,115,234, 53,108,230, 71,146,114,144, 4, 1, 27,195, 3, 16,202, 45, 79,187,221,
-238,157,154,154,170,175, 91,183,174,127,141, 26, 53, 6, 83, 20, 37,192,112,219,118, 96, 71,129,249,236,145,109, 10,147,197,198,
- 41, 88,221,198,186, 89,150,183, 81,183, 46, 8,130, 16,220,220,220,196,209,209,209,198, 38, 77,154,248,190,226,171, 68,202, 53,
-225, 43, 63,156,244,217,224, 58, 97, 97,216,189,109, 35, 4,129,216,235,234,195, 91, 15, 95,193,156, 25,207,175, 48,252,226,135,
- 85, 45,151,206,158,242,220,181, 73, 51,150, 85,184,234, 80, 46, 85, 77, 27, 52,124, 60,110, 92,251, 11,139,103,127,177,195,102,
- 44,120,159, 97,153, 33, 5, 89,137, 59, 66, 27,182,133,224, 48,224,212,174, 37, 24, 58,114,156,180, 71,159,193,184,114,233, 12,
-230,127, 51,105,171,185, 40,247, 3,184, 24,228,204, 11,162,137,157,123, 14, 16, 89,108, 14,172, 90,244, 61, 38, 76,155,135,200,
- 46,125, 69, 49,183,175, 78, 4,240,163,203,225, 16, 14, 14,157,155,248, 56,201, 51,195,227, 80, 34, 69,151,213, 2,105,138, 32,
-155,135,121,192, 98,103,161,175,100, 82, 73,139, 69,217, 69, 58,125,173, 53,243, 63,163, 76, 86, 22, 90,157, 29,185, 58, 27,242,
-138,158, 17,172, 60,157, 13, 90,157, 29, 34,154, 64,252,147, 20,144, 34,186,202,241,121,133, 70, 6,109,194, 61,157,239,232, 43,
-122, 71, 24,218,173,237,137, 11,119, 6, 45, 91,182, 92,118, 39,201,128,187,137,250, 98, 37,139,130, 84, 68, 66, 82,252, 55,199,
- 59, 99, 35, 43,130,155,111, 88,232,232, 81,239,117,117, 83,201,145,249, 40, 23, 52,229,220, 34,198, 93, 19, 4,119,169, 21,159,
- 76, 26, 15, 31,111, 15,164,230,217,176,114,127, 60,238,222,127, 12,222, 82,181,108,175, 90,183, 35,234,195,143,191,240, 32, 69,
- 18,108, 62,153,228, 76, 39,197,225,225,213,195,214,204,132,123, 38,163, 62, 95,128,192,185, 24,131, 76, 8, 44,231,108,110,243,
-103, 77,199,142, 77, 63,225,228,205,220,167, 45,240,242,222,165,248,108,198, 92,228,233,237, 40,171, 93, 86,196, 71, 0,104, 75,
- 41, 81, 47,253, 46, 69,142,202,250, 77, 20,255,182,151, 99,195,254, 2,185,178,191,112,221,254,130,189,178,246,254, 91, 95,169,
-235,240, 37, 82,228,225,219, 88, 33, 83,254,117,252,248, 97,229,129,187,194, 83,146,229, 48,231, 9,243,166,244, 77,215, 23,105,
-123, 84,137,100,249,214,107, 44, 85, 72, 47,204,156,187,210,230, 23, 88,139, 61,118, 91,159,111,176,114,236,203, 49, 8, 74, 78,
-233,238,107,165, 37,210,101, 34,139,253,251,188,188, 7,166,202,148, 39, 94, 16,112,228,239,108, 8,130,115,138,180,235, 98, 6,
-138,103,230,224,120,167, 91,229,244,237, 92,208,197,113, 40,174,202,223, 63,175,251, 73,255,118, 19,157,105,196,252, 89, 79,221,
-133,145,205,156, 74,150,155,155, 27, 60, 60, 60,160, 82,169, 80,153,235,144, 32,136, 81, 31,126,248,225, 75,179,255,220,220, 92,
-116,235,218, 25,171,127,250, 21,205,186,142,198,233, 63, 79,194,193,240,104,218, 48, 12,181,106,120, 34, 45,199,240, 74, 47,186,
-210, 47,226,227, 54,157, 7,124,243,102,151,190,136, 62,177, 79,184,122,226,247,241, 85,221, 8,241,237,110,237, 15,207,153, 51,
- 43,116,230,188, 53, 82,181,140,198, 3,163, 29, 36, 65, 32,196, 79, 1,111, 37,137,243, 7, 54, 91,135,246,109,239,242,230,120,
- 65, 65,129, 91,150,174, 94,175, 92,186,112,118,231, 27, 55,137,104, 99,102,124, 1, 0,152,115,226, 22, 61, 4,238,215,252,235,
-212,177,102,157, 6,194,175, 70, 88,247,196,156,135, 46,147, 13, 0,230, 39, 79,158, 36,206,156, 57, 51, 98,225,194,133, 2, 69,
- 81, 60, 0,233,138, 21, 43,204,143, 30, 61,186, 13,231,210, 92, 84, 54,216,116,237,222,104,170, 74,194, 69,122, 41,200, 70, 97,
-254, 10,180,107,228,244,138, 14,125,251, 77, 4, 5, 7,227, 73,182,185,121,129,153, 23, 25,237, 84,216,218,117,119,175,215,246,
-161,198,177, 22,251,125, 0, 7,171, 90, 63, 4,158, 5,200,151,168, 89,106,185, 8,188,179,173, 84,137,104,217, 28, 28, 44, 54,
- 14, 22, 59, 11,147,157,131,217,206,129, 23,156,239, 4, 65, 16,112,176, 60, 92,154, 54,191,208,246,221,188,124, 16, 86,155,128,
-155,194,153, 54,183,226,237, 30, 8, 0,222,222,222,208,104, 52, 46,169,162,118,135,243, 21,183, 51,252, 83,183,190,221,193, 66,
- 16, 4,196,199,199,125,149,156,152,216,191,110,189,186, 29, 27, 54,109,230,165,144,146, 0, 80, 46,209, 50,155,205,156, 90,173,
-214,120,121,121,145, 25, 25, 25, 79,201,115,221,230,157,217,253,251,246, 98,208,160,129,198, 7,215,238, 60, 93,226,110,177, 88,
-136, 55,222,120,195, 45, 40, 40,136,180,217,108,250,170, 86,147,210, 55,124,128,167,183,215,188, 81, 31, 76, 8,239,220, 45, 10,
-231,206,158,194,193,125,219,255, 48,107,227, 79,185,106, 36, 34,162,254, 75,171, 14,235,212, 11,127,105,213, 97,173,208,122, 21,
- 18,173,134, 77, 91,183, 21, 8, 26, 39,143,236, 18,172,164, 99, 18, 0,158,179, 26,118,237,252,249,187, 31,135, 79,156, 81,167,
-119,191,225, 24, 53,242,125,208, 52,133,243,167, 15, 99,233,236,207,143, 26,117,185,163, 93, 9, 19,112, 74,111, 13,196,129,242,
-160, 79,131,235, 52,198,205,171,151,144, 16, 31, 19,123,231,250,149, 70,117,155, 68,194,183, 70,200,167, 41, 62,212, 66, 60,120,
-224,168,204,140,221,106, 77,121,127,244, 72,148, 94,117,216,174, 69,132, 55,241,226, 11, 0,192,108,200,117,108, 88, 50,245, 81,
-201,170, 67,222, 97, 79, 41,207,174,174, 80,187,231,252,159,127, 79,235,255,118, 20,153,167,183, 59, 21, 44,157,189,248, 99, 67,
- 94,201,223,122, 27,234,213, 80, 33, 46,246, 38,111,213,229,237,173,226,123,105,125,127, 72,207,251, 37,109,151,231, 5, 16,128,
-181,202,110, 41,145,219,248, 69,139,151,201,238, 36, 26,113, 55, 73,239,116, 21,138, 40, 39,193, 18,145, 79, 73,151,115, 53,123,
- 37,234, 16, 65,205, 31, 51,122, 24,242,244, 14,240, 60, 64, 83,100,241, 71,140, 84, 3,129, 52,131, 25,121,133, 90, 36, 38,167,
-160, 40, 59, 1, 36, 73,194,167, 70,184,203, 59, 73,115,130, 36,192,108, 23,154, 12,126,187, 35,189,239,175, 44, 40,164, 52,108,
-134, 28, 28,223,185, 68,107, 51,234,231, 89,204,198,125,174,236,231,248, 44, 4,129,208,234,141, 86, 63,169,136,194,238, 77,107,
- 48,228,253, 73,207,245,190, 95,125, 59, 7, 32, 9, 20, 20, 26, 64, 16,132,182,106,253, 18,113,189,162,223,175,168,140,189,182,
-141, 50,200,214,203, 19,133,242,103,163,194,241, 83, 39, 14, 43, 47, 39, 75,113, 45, 46,171,152,100,105,249,185,147,223, 78, 55,
-232, 10,122, 2,136,175,218,188,144,236, 57,116,204,180,216,176,240,134,182,115, 49,198,164, 34, 19, 83,110,156, 67,187,193, 51,
- 99,111, 28, 93,221, 91,199, 60,249, 72, 25,208,144,227, 89,118,145, 69, 27, 63,187, 28,215,161,100,246,202,221, 79,221,134, 95,
- 47,220,236,252,155,227,192, 9, 60, 4, 30,248,228,187,159,193,242, 28,120,142, 3,207, 9, 96, 56, 65, 81, 89,114, 53, 53,106,
-237, 43,124,184,171,254,136, 31, 95,118, 23,122,120,120,192,219,219, 27,222,222,222,112,115,115,171,148,104,137, 68, 34, 21, 77,
- 63, 95,212, 41, 41, 41, 72, 78, 78,134,155,155, 27, 4,158,129,157, 1, 26, 71,246,192,189,132, 24,156,185,124, 27, 2,207, 65,
-169,170,250, 41, 47, 74,191,136,143, 90,191,213,127, 77,151,126, 99,113,122,223, 58,225,250,197,195, 19, 44,185,241,191,185,172,
-208,115, 28,193, 48, 12,222,238,241, 86,202,173,216,199, 39,190,157, 54, 49,170,125,159, 9,210,118, 17,129,176,218, 57,164, 39,
- 39,224,252,129,223,173,225,161, 1, 39,187,118,104,155,194, 48, 12, 56,142,171,116, 32,183,218, 29,121,148, 72,174, 28, 54,108,
-132,232,250,181,107,123,149,190,245,118,115, 4,121,135, 16,248,166,132, 32, 12,106,218,180, 1, 28, 12, 15,179, 89, 95, 88,213,
- 60, 27, 12,134,196,141, 27, 55,134,142, 30, 61, 90,209,176, 97, 67, 81, 66, 66, 2,150, 46, 93,154,111, 48, 24, 18, 93,181,113,
-234, 98,220, 10,154, 40,124, 84,162,104,165,190,217, 14,195,250,188,137, 29, 71, 47,227,252,165, 43, 72, 49,170,110, 27, 89,250,
- 64, 90, 74,166,173,145,151,126,111,191,118,181,168,221,155, 10,247,198,190, 53,253, 93, 65,144,158,202,187, 48,203,228,250,203,
- 13, 24, 44, 12,220, 20,206,253,158, 74,148, 45,138, 32, 92,102, 68, 4,144,120,233,202,205,198,173,234, 53,196,173, 68, 29,114,
-139,108,176,216, 88,240,188, 0, 30, 2,188,213, 18,200,196, 36, 82,147, 19,193, 11,142,164, 42, 14, 21,218, 78, 29, 59,209, 0,
- 1,130, 16,104, 17, 77, 67,128,115,127, 69,185, 92,110,212,104, 52, 46, 41, 90, 14,150,197,160,168,182,136,108,221, 20,253, 39,
- 56,247,204, 60,251,199,116,120,170, 68,216,177,229, 55,164, 93, 92,177, 37,180,221,196, 83, 49,247, 98,223,137,189,245,215,136,
- 94, 45,229,205,253,233, 76,113,121, 50,169,201,100,218, 11, 64, 34, 22,139,163, 58,118,236,232,181,119,239,222, 34, 31, 31, 31,
- 94, 34, 22,107,251,245,237,195,139,196,226,130,146,123,255,252,243, 79,209,132, 9, 19,212,133,133,133,169, 57, 57, 57, 87, 0,
- 48, 21, 79, 4, 35,186,129,196,118, 16,132, 76, 37, 87,164,212,174, 29, 86,163,117,100, 91,247, 1,131,134, 64, 42,145,226,244,
-169, 19, 88,181,124,225, 46, 99,214,131, 49, 85, 41,201,127,106,213, 97,122,106, 82,162,217, 98,107,210,184,213, 91,196,165, 83,
- 7,166, 56,224,179,156,146, 58,150,116, 27, 52,169, 78, 98,166, 17,171, 22,124, 5, 79,119, 37,146, 18, 30, 90, 30, 61,184,247,
- 51, 99,213,127,229, 50,201, 2,160,200,231,222,105, 55, 50,202,211,230,224,112, 49,250,168,149,103,249,168, 43, 23,142, 37,212,
- 12,111, 45,107,220,186,171,103,222,193,223, 6,153,129, 29,149,217,201,120,248,178,130, 43,216,139,146,206, 70,159,113,247, 11,
-105, 68, 17, 32,224,176, 89,161,125,114,157, 53,231, 60,212,235, 51, 98, 92, 90,133,155,159,134,239,102,252,240,175,143, 90,183,
-106,165, 20, 32,123, 78,193, 42, 33, 88,121,122, 59,124,212, 18, 88,244, 90, 60,186,126,194,106,214, 82, 21,238,119,198,218, 77,
-138,188,220, 28,201,179,112,134,248,200,138,238,207,203,205,145,176,118,147,162,242,161,142,130,155, 82,130,123, 73, 25, 79, 3,
-223,165, 34,103,108,150, 68, 68, 61,141,211, 42,233, 11, 42,193, 91, 98,153, 7, 50,242,173, 32, 32,128,231, 88,176,140, 29, 6,
-189, 30, 25,153,217,200,201,206,129,193, 80, 4,133,202, 19,141,155,183,129, 90, 41,195,157,243,187, 32, 8,130, 75,251, 26, 50,
-132, 40,162,117,100, 7,105, 76,178, 51, 22, 75, 38, 18,112,120,251,194,124,163, 62,183,131, 49,235,209,163,170,246,197, 44,199,
-157,185,123,255, 81,163,154, 1,181,137,219, 9, 58,108,249,117, 53,236,197,202, 38,195,112,136, 73, 53, 33,171,192,140,212, 39,
- 15, 4,158,227,206,224,255, 8,232,242, 5, 64,208, 77, 27, 55, 64,143,247, 6,224,167,159,126,198,147,196,100,126,222,148,222,
-169, 70, 67, 81,175, 42,144,172,110, 40,222,107,195,156, 19,183,200,226,217, 58,253,208,173, 2,210, 98, 23, 42, 12,240,145,249,
-134,160,195,152,165, 39, 45,134, 2, 9,103, 51,211,135,183,140,217, 94,150, 77, 39,131,134,125,222, 23, 67,161,146,211, 32, 8,
- 2, 37,238,194,181,115,198, 67, 33,117,250,150, 45, 54, 22,239, 77, 93,134, 45,203, 62,135, 0, 96,248,144,203,230,242,210, 9,
-231,217,133,159, 4,224, 90,205,148,228,220,140,110,125,191, 56,107,117, 72,109,125, 6,142,190,209,170, 85,171, 34,185, 92, 14,
-185, 92, 14, 55, 55, 55,120,122,122,194,195,195,163,210,188, 51, 12, 99,180,219,237,222, 18,137, 4, 60,207, 35, 41, 41, 9, 73,
- 73, 73,208,233,116,208,106,181, 48, 25,245,236,181,179,187,233,198,237,122,163, 70, 88, 19,132,212,107, 6, 17, 69,128,166, 73,
-156, 63,244,107,121,233, 44,155,100,117,234,183,182,107,255, 15,113,122,223,122,225,250,197,195, 19, 45,185,241,191,186, 90, 71,
-197,238,158, 59,131, 6, 13,106, 50, 97,194, 4,241, 15,211, 38,156, 60,122,234,124,252,238, 35,235,251, 22, 22, 22, 5, 9,130,
- 0, 15,119,247,180,161,125,219, 31,238,252, 70,235,148,179,103,207,242,219,183,255, 63,246,238, 59,174,234,234,255, 3,248,235,
- 14,184,131, 11, 92,246, 30, 38, 67, 92,160,104,166,162, 56, 83, 75, 83, 83, 83,115,102,206,242,167, 13,115,164,137,166, 86,106,
-238,180, 52,247,200,189,194,109,185, 35,149,139,226, 6, 4, 1,145, 61, 46,151,187,231,249,253,193,200,148,233,248,182,222,207,
-199,227, 62,224,194,189, 47, 62,235, 94,222,247,124,206,231,156,159,116, 28, 14,231, 70,117,153,165,111, 82,185, 91,126, 57,253,
-235,156,246, 29, 58, 98,253,230,159, 58,220,186,125,167,195,253,251,137,240,245, 15,192, 43,245,131,161,230, 56,226,215,115, 23,
-160,148,231,110,169,205,114, 62,209,170,197, 41, 42, 42,250,109,208,160, 65,221, 46, 94,188,200, 29, 52,104,144, 58, 63, 63,255,
-210, 99,173, 88,172,166,204,152, 31,222,206, 3,176,197,191,195,200,221,143, 12,242,201, 0,190,241,243,247,195,217, 11, 49,136,
-185,120,249,251,124, 27,191,185,163,134,190, 55,182, 94,111,222,232,222,109,234,241,220, 28,109,176, 99,221, 18,222,225,152,212,
-165,169, 5,230,245,223,156,155, 51,175, 54,251,168,226, 31, 71,137, 1, 17,141,156, 96, 52, 51, 88, 88,233, 27,174,157,200,170,
-170, 55,222,167, 50,249,122,225,168,241,227,198,221,111, 26,214,252,163,161,239,141,183,110, 30,224,139, 43, 73,114,128,195,129,
-147,135, 4, 89, 89, 89, 56,191,119,157,169,232,209,221,239,121, 60,203,151,117,216,158, 40, 74,187, 22,244,216,221,177,249,249,
-249, 56,123,246, 44,202, 11, 44, 87, 87,215,170, 10,173, 63,101, 22,228,100, 94,154,183,120,109,196,152,225,111,163, 87,199, 38,
- 56,119,245, 62,244,101,227, 53,149, 95, 74,158, 18,243,131, 96,242,160, 0,253, 7,253, 26, 40, 52, 70, 65,234, 23, 15,138,207,
-163,116, 14, 86, 75, 21,203,169, 47, 44, 44, 60,124,239,222,189,118,205,154, 53,171,119,244,232,209,194, 91,151, 79, 76,122,124,
- 33, 62,253,244, 83,219, 53,107,214,216, 48,198, 46,233,245,250,228, 90,173, 59, 23, 59,100,177,177,206, 6,163, 5, 23, 46, 95,
-111,212, 37,162, 57, 44, 12,184,122,245, 42,214,111, 88,175,189, 17,127,237, 91, 85,142,199,151,213, 20, 47,149,110, 79,243,243,
- 93,117, 88,145,153,245, 40,245,219, 83, 71,246,110,123,181,195, 91, 24, 50,241,203, 47,207, 30,249,105, 78,139,246,189,184,141,
- 94,237, 6, 89,204,175, 56,125,244,248, 66,131,178,112, 14,106,238, 59, 82,233,114, 10,197, 54,255,215,184, 69, 7,164,167,165,
-226, 65,226,205, 45,218,194,164,204,180,251,188, 45,153, 25,105,227,235, 55,137,192,197, 19, 59, 39, 85, 83,104, 85,123,204,251,
-186,138,215, 29,141, 62, 60, 56, 35,227, 7, 15,149, 70, 43,100,140,105,133, 2,126,182, 45,183,100,151,162,214,203,121,199,144,
-151, 89,175,223, 59, 67,199, 31, 89,185,114,153,149,187,131, 13,178,139,180, 80,104, 12, 40, 81, 27,192,229,112, 16,228, 37,129,
-186,164, 16,231,246, 46, 54,234,149, 69,131,128,251,134,170, 50, 37,110, 33,243,139,146,126,157,248,233,132, 51, 16, 72,125,189,
- 94,233, 60,163,218,214,186,146, 71,215,222,250,116,194,207, 33,140,177, 46, 18,183,144, 18, 85,238,189, 89, 85,173, 59,135, 83,
-250,250, 30,210,201, 23, 6, 83,233,248, 99, 38, 11, 96,182, 88,202, 90,249, 0, 86,113, 62,159, 83,195,186,115, 44,187,142, 92,
- 66,102,142, 28, 26,189, 17, 58,189, 9, 6,163, 25, 92, 30, 15, 14,142, 14, 8,126, 37, 28, 82, 7,123,228,100,103, 34,230,151,
-195, 72,136, 63,119,137,195, 48, 87,147,151,248, 75,109,246,145,181,216, 33,196,211,203,131,155,165,208, 67, 44,224,225,218,185,
-163, 6,163, 94,247,109, 45,139,172,167, 50,229, 5,133, 75, 63,154,242,217,187,155, 54,110,246, 8,173,111,143,140,124, 13, 50,
-242,180, 40,209, 26,203, 10, 49, 11,116,202,124,196,255,186, 57,219,172, 45, 89,138,255,136, 42, 11, 45,147, 65, 91,178,239,248,
- 21,231,233,115, 22,243,146,238, 39, 27,231, 79,238,153,161, 81, 42,222,172,115, 75,214, 99, 54,125, 88,127,231,203, 88,137,167,
- 78, 23, 50, 11, 44,140,225,231,203,217, 21,167, 11, 45,101, 61, 47,227,238, 87, 63,141,224,227,115, 23,118,124,115,210,169,248,
-123, 37,219, 53,154, 28,233,221,164,111,139, 0,128,199,227, 85,220,202,251,102,105,181, 90,125, 13,167, 80,182,254,248,227,143,
-211,198,143, 31, 47,124,248,240, 33,238,223,191, 15,185, 92, 14,145, 72,132,227,199,143, 27, 97, 49,125, 27,127,241,192,131,123,
-178,147,179, 67, 90,118,243, 9,109,243, 38,108,108, 36,224,179,218,119,198,180,113,107, 48,184,101,135,222,223,117,233, 59, 6,
-167, 15,252,200,174,158, 59, 60, 65,147,151,176,174,174,219, 82, 46,151,223, 2,144,248,237,183,223, 54, 95,191,126,125,253, 41,
- 83,166, 36,111,253,110,206, 74, 0, 40, 40, 40, 0, 0,196,197,197,177, 9, 19, 38,232,180, 90,109, 74, 81, 81,145, 12, 53, 92,
- 0, 1, 0,154, 60,155,175,214,175,254,166,233,195, 71, 89,111, 7, 52,109, 5,215,250,173,224, 17,244, 26,138, 74, 12,184,146,
-148,137,228, 59,191,224,206,133,189, 71,213,182,166, 57,168,227,248,198,205,154, 53,243,229,114,185,175, 40,149, 74,143,198,141,
- 27, 55,147, 72, 36,113,205,154, 53, 11,231,243,249, 25,177,177,177,169,117,201, 74, 59,183, 89,231,223, 97,228,138,180, 18,187,
- 78,201,217,234,240,180, 18,187, 56,181, 80,250, 73,222,175, 43,116,155,120,222, 75,153, 33,255,214,158,205,138,125, 59,214, 45,
-225, 13, 29,251,169,249,102,177,227,100,190, 88,112,170,110,205,213,220,172, 15, 70,244,249, 99,120,135,178,150,172,178,239,107,
-213, 76, 95, 92, 28, 95, 12, 96, 90,252,109,171,239,110, 78, 30, 55, 47,236,213,136, 97,145,111, 12,226,154,172,109,113,226,192,
- 15, 44, 37,254,215, 61,124,102,158,169,169, 69,170, 17, 16, 0, 0, 32, 0, 73, 68, 65, 84,197,108, 0, 53,158, 14,210,235,107,
- 83,100, 61,189,140, 15, 37, 29,247,252,180, 97,228,190, 3,251,191,238,219,187,143,243,234, 47, 6, 98,241,218,131,144,136,133,
- 96, 22, 11, 6,118,242, 29, 48,123,116,195,183,124,221, 69,222,251,206,100,156,159,184,236,230, 52,181,218,144, 80,139,150, 24,
-150,159,159,127,193,214,214, 54,175, 93,187,118,173,133, 66, 33, 39, 63, 63,159,239,230,230,102,146, 74,165,250,140,140, 12,181,
- 78,167,219, 7,160, 78,195,142, 27,140, 22, 60,200,209,226,208,254,125,184,126,249, 23,220,185,115,175,228,206,237, 59,171, 56,
-124,182, 76,149,147, 88, 8,212,249, 3, 62, 44,149, 94,117,200,234,124,213,161, 89, 87,178, 99,235,247,243, 59,171,181,186,145,
-205,218,246, 68,189, 70, 17, 92,131,209,140, 27, 87,207,224,204,222,101,139, 13,202,194,233,207,179,143,189,124,234, 7, 51,158,
- 0,191,157, 61, 2,102,177,124, 15, 0,204, 98,249, 62,238,226,209,241,175,189, 57, 26, 78,110,245,154,201,211,227, 56,120,134,
-209,195,173,249, 92,213,177,125,155, 14, 60,120,240, 0,119,239,222, 69, 82, 82, 18, 10, 11, 11,177, 99,199,131, 58,237, 31,117,
- 81,234,169,132,219,220,238,253, 7, 14,249,121,192,224,225,162,250,193,161,220, 16, 31, 71, 56,219,242,113, 47, 41, 21, 9,177,
-241,150,123, 87,142,106, 13,138,220,190,154,162,212, 42, 11, 63, 27,151, 70,238,128,121,122,249,220,133,109,218, 68,132,124,182,
-224,235,214,206,174,110,149,190,143, 23,228,229, 10,166, 78, 60, 28, 18,243,251,111,181,154,235,208, 98, 54, 23,140, 29, 57,200,
-194, 43,157, 40, 20, 21,237,212,101, 91,175,244,195, 84,233,207,153,197, 84, 99, 11,254,123,111,183,135,201, 98,129, 74, 99,128,
- 66,165, 67,113,137, 22, 89,185, 5,184, 30, 31,143,115, 63, 31,198,253,123,215, 83,140,122,253, 73, 46,151,179, 87,147,147,112,
-174,110,103,154,248,245,157,157,156,144, 82,168,132, 72,192, 71,106, 66,172, 78,165, 40,222,254,172,199,145,166, 32, 49, 43,151,
-199,233, 54,104,208,224,227,157,187,247,150,190,218,182,171,141,139,189, 3,172,249, 12,137, 15, 50, 33,187,116, 92,149,124,253,
-188,194,168, 87,246,120, 17,179,190,252,205,213,124,213,161, 65,167,122,235,221, 62, 29,246,243,120,124,129,197, 98,210, 25,244,
-186,254,207, 83,100,189, 44,140,153, 51, 70,190,251,246,159, 62, 27,152, 44, 76,252,238, 59, 39, 52,143,127, 86, 48,154,153,205,
-187,239, 92, 82,151,190,129, 84,221,177,207,211,211,169,103,249,220,133,105,105, 5, 87, 11, 11,117,103, 0,100,104,181,218,103,
- 94,198,156,156,156,121, 11, 22, 44,232,165, 86,171, 27,118,236,216, 81,104,111,111,143,130,130, 2,156, 60,121,210, 24, 29, 29,
-125, 59, 55, 55,119, 54,144,107,210, 32,124, 75,188,246,192,136,123,177, 39,103, 55,108,217,221, 39,180,237,155,181,127, 51, 19,
-138,199,116,238,253, 62,231,244,193, 31,217,149,179, 7, 63,208,228, 37,174,125,142,205,106,208,106,181,151,181, 90,237,205,153,
- 51,103,190,234,238,238,238, 62,123,246,108,145, 66,161,176, 90,189,122,181, 54, 63, 63, 63, 91,161, 80,196,160,154,254, 52, 79,
-139, 51, 22, 63, 66,191, 99,251,126,236,196,246,253,248,186,131,139,119, 55,169,171, 79,160, 60,239, 81, 74,113, 94,230, 73, 0,
-167,203, 6,138,172,147,230,205,155, 7,112, 56,156, 65, 0,154, 74, 36,146, 32, 91, 91, 91, 33, 99,172, 33,135,195,185,101,177,
- 88,226, 27, 55,110, 28,125,251,246,237, 58, 13, 38,155,118,110,179,206, 55, 36,226,167, 66,181,197, 90,207,181,254, 41,237,220,
-102, 29, 0,228,158,250, 76, 13,224,208,237,142,211,250, 29,142, 73, 93,121,171, 72, 58, 41,239,236,215,135,235,186,204,197, 25,
-215,131, 94,212,241,175,205,186,157, 1, 96,100,124, 44,150,220,136,139,137,226, 48, 88,153, 97,154,175,201, 77,138,125, 17,249,
- 86, 86, 86, 90,111,111,239, 74,175, 46, 20, 10,133, 90,157,174,186, 6,148,115, 38,101, 22,214, 3, 29, 54,239,223,189,121,228,
-193,195,135,190,142,236,210,215, 89,228,227,131, 87,220, 56,216, 60,189,197,164, 95,226,242,174,244,254,236,252,154,228, 76,109,
- 60,234,216, 31, 70,169, 84, 38, 0, 40, 82, 42,149,125, 24, 99, 15, 57, 28,142,111, 81, 81,209, 53,163,209,120,163,206, 5,129,
- 5, 67,218,180,105,181,131,195,225,240,153,201,178, 40,198,138,247,147, 54,235, 78, 6,158,115, 90,146,208, 87,236,241,241,236,
- 21, 45, 2,131, 26,180, 40,159,235,176, 73, 61, 59,140,155,182,164, 69,189,250,193, 45,254,152,255,176,198,110, 2,204,168, 46,
- 26,181,127,195,162,243,113,191,159,249,220,197,179, 94,189,236,140,228, 59, 15,147,174,205, 51,107, 21,251,159,119, 63, 63, 72,
-186,181,108,253,183,211,166,100, 61, 74, 89,175,206, 75,188, 9, 0,234,188,196,155,119,100,248, 34, 63, 59, 99, 74, 65,110,242,
-183,207,186, 45, 84, 42, 85,230,246,237,219, 29, 34, 34, 34,184,238,238,238,200,203,203,195,153, 51,103, 44, 22,139,229, 81,157,
-179, 10, 83,206,168, 10, 57, 78, 91,214,126,183,200, 90, 98,247,166,201,100,242, 98, 12,224,243,249, 89,122,181,226,120, 9, 87,
-242, 25,138, 82,181,213,255,207,176,112, 0,112,203,231, 46,180, 88, 44,156, 69, 43, 55,167, 90,137,236, 42, 29, 12,209,168, 45,
-177,177, 88, 44,181,158,235, 80,158, 46, 11,124, 81,175,111, 14, 99,115,155,181,108,253,185,209,104,208,150,189, 62,180, 0,180,
-140,161,128,203,229,156,227, 89,140, 39, 20,207,241, 97,138,195,129, 61,227,240, 97, 39,230,131, 3, 14,148,197,133,172, 46,125,
-178, 42, 45,136,115, 19,110,169,115, 59,248, 31,211,239, 30,241,235,169,163,239,152,205,230, 87,202,218, 12, 30,232, 52,170, 61,
-202, 44,199, 45, 64,172, 9,255,126, 71,202,139, 45,206, 75,254, 67,181, 58,141,242,119,202, 12,169, 47,238,227,227,237, 62,226,
- 65,106,238,149,228,135,234, 45,248,243,180, 58,207,179,156, 60,119,119,247, 47, 56, 28,206, 48,129, 64, 96,171,215,235, 85,140,
-177,173, 57, 57, 57,243,240,212,228,191,225, 86, 98, 55,205, 8,129,200,102,150, 65,171,250, 77,157,155, 48,164,166,117,183,113,
-109,208, 77, 36,145, 76,211,106, 84, 91,213, 57, 9,155, 95,240,246,148, 10,133,194,112, 91, 91, 91,171,252,252,252,203, 0,138,
-255, 78,251,189, 89,179,102,126, 92, 46,247, 21,139,197,226, 14, 64,138,210,171, 66,242,249,124,254,163,178, 22, 45, 86,215,204,
-118,239,237,113,233,242,122,147,143, 79,158,191,183,188,236,180, 98, 5,239, 1, 75, 69,195,222,236,244,233,150,253,135, 42,187,
-234,240, 31,119,204,255,239, 50, 59,240,109, 61,243, 71,114, 5,210,249, 93, 66,180,234,252,204, 71, 19, 46,220,200,187, 12,160,
-228,121,150,211,218,218,122,168,193, 96, 16, 91, 91, 91,107, 12, 6,195,246,191,203,186,139,221, 66,222,231,130,213,122,102, 10,
- 11, 56,177, 79, 92,180,242,111, 57,150,120,161,161,161,237,173,173,173,253,204,102,179,141, 94,175, 87,107, 52,154, 7,169,169,
-169,191,161,234,137,207, 95,234,114, 74,220,130,151, 89, 91, 11, 39, 3,128,193,160, 91,161,202, 77,252,184,186, 39, 86,243,248,
-127,244, 62,114,121,165,101, 34,159,103,229,138,178,129,185, 45, 38, 83, 94, 78,202,213,224,191,112, 57,201, 51,238, 92,202,164,
- 76,202,164,204, 39,113,105,123, 82,230, 95,153, 41,242,108,228, 43,242,108, 84,235, 65,151,171,120, 60,109, 79, 82,110,108, 37,
- 55, 0,181, 24,176,148, 16, 66, 94, 2, 11,109, 2,242, 87,210,102,221,121,248, 50, 31, 79,254,115,170,236, 19,205,169,166, 42,
-173, 75,147,224,179, 84,182,167, 41,147, 50, 41,147, 50, 41,147, 50, 41,243, 63,151, 89, 83,246, 63,241,148,228,216, 39,238, 31,
- 1,240, 63,233,240, 79,205,170,148, 73,153,148, 73,153,148, 73,153,148,249, 95, 83, 81,120,113,105, 91, 16, 66, 8, 33,132,188,
- 28,212, 71,139, 16, 66, 8, 33,228,249, 84,118,234,144, 10, 45, 66, 8, 33,132,144, 23,160,202,206,240,116,234,144, 16, 66, 8,
- 33,228,249,148,183,104,121,226,137,225, 29,168,208, 34,132, 16, 66, 8,121, 49,178, 80, 89,235, 86,116,116, 52,171,236,123, 66,
- 8, 33,132,144,255,133,127,120, 45,242,120, 75,214,216,178,251, 0, 30,107,209,162, 2,139, 16, 66, 8, 33,127,151, 98,235, 31,
-166,188, 37,171,252,150,245, 84,161,213,171, 87, 47, 14, 21, 91,132, 16, 66, 8,249,171,252, 27,107, 17,238,147, 43, 72,187,153,
- 16, 66, 8, 33,127,101,177,245,111, 90, 31, 26,222,129, 16, 66, 8, 33,228,249,120, 2,232,249,216,253,255,217, 20, 60,132, 16,
- 66, 8, 33,255,118, 99,171,186, 79, 45, 90,132, 16, 66, 8, 33, 47,190,216, 34,132, 16, 66, 8, 33,255,100, 52,179, 57,101, 82,
- 38,101, 82, 38,101, 82, 38,101,254,219,149,143,163, 5, 84, 53,142, 22, 33,132, 16, 66, 8,121, 38, 61, 81, 58,126,214,216,178,
-175, 61,169,208, 34,132, 16, 66, 8,121,177,158,154,126,135, 10, 45, 66, 8, 33,132,144, 23, 91, 96,173,163, 66,139, 16, 66, 8,
- 33,228, 37,163, 66,139, 16, 66, 8, 33,228, 37,225,160,234, 43, 7, 78,215, 33,231, 89,174, 62, 56, 77,153,148, 73,153,148, 73,
-153,148, 73,153,255,185,204,154,178, 79,227,159,167,124,100,248, 35,248,163, 35,252,186,255,197, 31,166, 75, 95, 41,147, 50, 41,
-147, 50, 41,147, 50, 41,243,223,110,236, 19, 95, 43,208,169, 67, 66, 8, 33,132,144, 23, 91,108,209, 20, 60,132, 16, 66, 8, 33,
- 47, 72,149,167, 9,169, 69,139, 16, 66, 8, 33,228,249, 84, 57,169, 52, 21, 90,132, 16, 66, 8, 33, 47,167,224,162, 66,139, 16,
- 66, 8, 33,228, 5, 22, 89, 99, 43,253,109,116,116, 52,163,109, 68, 8, 33,132,144,191,202,191,182, 22, 41, 95, 49, 42,182, 8,
- 33,132, 16, 66,181, 72,157,121,226,143,171, 13,199,150,221, 7, 64, 87, 29, 18, 66, 8, 33,132, 60,175,158,248,243,149,135, 99,
-203,239, 83,161, 69, 8, 33,132, 16,242,252,198, 86,251, 91, 58,109, 72, 8, 33,132,144,191,210,191,177, 22,225,208,110, 37,132,
- 16, 66, 8,121, 46,149,181,102,173,163,205, 66, 8, 33,132, 16,242,114, 11, 46, 66, 8, 33,132, 16,242, 50,138,172,151, 61, 96,
- 41,205,108, 78,153,148, 73,153,148, 73,153,148, 73,153,255,149, 34,235,241, 33, 30, 0,208, 85,135,132, 16, 66, 8, 33,207,139,
- 38,149, 38,132, 16, 66, 8,121, 73,104, 82,105, 66, 8, 33,132,144,255,113,193, 69,133, 22, 33,132, 16, 66,200, 11, 44,178,254,
- 84,108, 81, 31, 45, 66, 8, 33,132,144,231, 83,101, 31, 45, 14,170,190,114,224,116, 29,254,192,179, 92,125,112,154, 50, 41,147,
- 50, 41,147, 50, 41,147, 50,255,115,153, 53,101,159,198, 63,223, 88,252,143, 6, 44,165, 75, 95, 41,147, 50, 41,147, 50, 41,147,
- 50, 41,243,191,134,134,119, 32,132, 16, 66, 8,121,209,133,213,147,168,208, 34,132, 16, 66, 8,121, 62, 52,142, 22, 33,132, 16,
- 66,200, 75,226,137,210, 86,173,242,175,225, 84,104, 17, 66, 8, 33,132,188, 24, 61, 81,218,170, 85,254,149, 10, 45, 66, 8, 33,
-132,144, 23,168,210,113,180, 56, 0, 16, 29, 29,205,202,238,119,236,213,171,215, 57,218, 86,132, 16, 66, 8,249, 95,250,183,214,
- 34, 21, 45, 90,189,122,245,226, 0, 56, 75,187,154, 16, 66, 8, 33,127,133,127, 99, 45,194,125,162,146,236, 72,187,153, 16, 66,
- 8, 33,127,133,127, 99, 45,194,127,162,138, 36,132, 16, 66, 8,249, 75,252,131,107, 17, 79,148,118,132, 63, 82,246, 21, 40, 27,
-242,129,198,209, 34,132, 16, 66, 8,121, 62,229, 87, 27, 62, 53,245, 14,181, 98, 17, 66, 8, 33,132, 60,159,202, 70,134, 95, 71,
-155,133, 16, 66, 8, 33,228, 37,162, 22, 45, 66, 8, 33,132,144,231,247,120,171,214,255,172, 53,139,102, 54,167, 76,202,164, 76,
-202,164, 76,202,164,204,255, 82,145,245,167,251, 52, 50, 60, 33,132, 16, 66,200, 75, 66, 87, 29, 18, 66, 8, 33,132, 60,159,242,
- 43, 14, 31,191, 79,133, 22, 33,132, 16, 66,200, 11, 44,182,158, 66,167, 14, 9, 33,132, 16, 66,158,207,216,170,126, 65,133, 22,
- 33,132, 16, 66,200, 75, 42,184, 56,168,250,202,129,211,117, 8,126,150,171, 15, 78, 83, 38,101, 82, 38,101, 82, 38,101, 82,230,
-127, 46,179,166,236,211,248,231,249,203, 6, 44,165, 75, 95, 41,147, 50, 41,147, 50, 41,147, 50, 41,243, 63,139, 78, 29, 18, 66,
- 8, 33,132,252, 13, 10, 45, 87, 62,159,255,185, 88, 44, 94, 35, 22,139,215,242,249,252,111, 1, 56,214,245, 15, 74, 36,146, 73,
- 30, 30, 30,119, 61, 60, 60, 50,252,252,252,142,218,217,217,124, 20, 32, 68, 36, 0,171, 23,180, 62, 33, 0, 62, 18,139,197,119,
- 68, 34, 81, 42,128,109, 0, 62, 2,224,242, 60,193,243,188,208,255,230,228, 62, 7,231,121,161,255, 19,191,234,233,238,238,126,
- 1, 64,183, 23,181, 83, 6,219,160,235, 0, 9,210, 7, 72,144, 62,216,230,217, 63, 53,216,217,217, 13,243,244,244,140,113,118,
-118,126,228,233,233,121, 73, 36, 18, 13,168, 99,132,155,187,187,251, 98, 95, 95,223, 4, 47, 47,175,229, 40,157,157,252,111,171,
-189, 16,237, 91, 11,145,215, 70,128,146, 8, 1,214,180, 17,224,245,215, 1,155,103,140,107, 7, 96,175,189,189,253, 53, 62,159,
- 31, 13,160, 95,217,241,213,143,207,231, 71,219,219,219, 95, 3,176,183,236,113,207,114,156, 46, 6,240, 8,192, 87,101,247,255,
-207,215,215,183, 36, 44, 44, 44, 53, 44, 44,108, 83, 80, 80,208,240,218,134,217,216,216,188,238,235,235,187,207,207,207, 47,181,
- 77,155, 54,133,222,222,222,247,124,124,124, 54, 11,133,194,142,244, 22, 71, 8, 33,127,127,111, 1,248, 26,192,170,248,248,120,
- 25, 99, 76,198, 24,147,197,199,199,203, 0,172, 1,240, 13,170,110, 66,252,211,207,157,157,157,231,206,159, 63, 95,155,149,149,
-197,242,242,242, 88, 66, 66, 2, 91, 54,107,154,165,187, 19,159, 5,184, 58,170, 61, 61, 61,239,251,251,248,236,108, 98,203,157,
- 6, 32,176, 54,153,143,113, 20,139,197,151,103,205,154,165,188,112,225,130, 82,175,215, 43, 45, 22,139, 50, 51, 51, 83,121,250,
-244,105,101, 68, 68,132, 18,192,199, 0,120,117,200,172,240,165, 23,206,177, 13, 95,176, 47,189,112,238,241,159, 55,108,216,240,
-182,197, 98, 97,253,251,247,215, 1,240,174, 75,230,147,188, 1, 81, 19,123, 56, 12,176, 69,142,105,243, 60,198, 86, 79, 97, 3,
- 36, 72,127,150, 76, 55, 55,183, 67,147, 38, 77, 82, 60,122,244,136,233,116, 58,150,158,158,206,198,141, 27, 87,236,230,230,182,
-189,150,235,238, 28, 26, 26,154, 19, 19, 19, 99,145,203,229,236,236,217,179,150,166, 77,155,230,212,178,216,234,250,196,178,172,
-243,242,242, 58, 90,151,155,155,155,219,250,186,238,163,215,132, 72, 55,200,206, 48,118,245, 36, 59,220,191, 13, 91,214,210,135,
-245,115, 18,200,219, 9,240,127, 29, 42, 31,202,164,170,204,119, 58,116,232,160,186,113,227,134,185,160,160,128,221,190,125,219,
- 50,102,204, 24, 45,128, 91, 99,198,140,209,222,190,125,219, 82, 80, 80,192,110,220,184, 97,238,208,161,131, 10,192,232, 58, 44,
- 39, 23,192,198, 57,115,230, 48,198, 24,155, 63,127, 62, 11, 11, 11, 99,157, 59,119,102, 74,165,146, 49,198, 82, 25, 99,155, 76,
- 38,211,200,218,100, 74,165,210, 97,147, 38, 77, 82,170,213,106, 86,206, 98,177, 48,185, 92,206, 86,173, 90,165,242,240,240, 56,
- 90,197,135, 12, 58,229, 65,153,148, 73,153,127,183,204,127, 50, 79,148,246,211, 42,191,213,186, 97,226,221,105,211,166,149, 23,
- 85,199,218,181,107,119,101,228,200,145,178,145, 35, 71,202,218,181,107,119, 22,192,137,216,216, 88,217,212,169, 83,101, 0,222,
-173, 97, 71, 56,182,109,219, 86,158,157,157,205,130,131,131, 89,189,122,245, 88,118,118, 54, 99,140,177,171,239,180, 96,191, 52,
- 2,123,120,254, 24, 59,121, 96, 47, 27,227,201,103,237, 61,165, 70, 79, 15,143, 2, 23, 23,151, 5,248,243,156,140,149,237,220,
-183, 27, 53,106, 84,114,235,214, 45,101, 98, 98,162,114,238,220,185,202,206,157, 59, 43, 67, 67, 67,149,253,250,245, 83,174, 92,
-185, 82,105, 48, 24,148,235,215,175, 87,218,219,219,223,170,164,216,122,230, 66,139,207,231,175,136,143,143,103,247,239,223,103,
-101,173, 20, 85,101, 74, 29, 28, 28,122, 56, 58, 58,126,236,224,224,208, 3,128, 20, 0,130, 1,219,102, 82,248,253, 95,179,128,
-134,209,239,118, 13, 92,213,245,213, 22, 3,236,184,114,227,119, 83, 24,235,239,247, 76,133,150, 84, 42, 29,246,209, 71, 31,149,
-232,116, 58,166, 86,171,153, 82,169,100,106,181,154,149,148,148,176,119,223,125, 87, 33, 18,137,222,174, 41,211,197,197,101,222,
-249,243,231, 77,217,217,217,236,252,249,243,236,232,209,163,108,245,234,213, 22, 55, 55,183,165,117,125, 1,122,120,120,156, 58,
-121,242,164, 44, 46, 46, 78,118,249,242,101,153,209,104,148, 25, 12, 6,153,193, 96,144, 69, 71, 71,203,246,239,223, 47,219,181,
-107,151, 76,175,215,203,244,122,189, 76,167,211,201,234,215,175,127,188,174,251,168,149, 16, 15,245, 23, 14, 51,182,244, 67, 86,
-188,112, 2,147,127,242, 38,203, 29, 23,201,214,188,234,195, 34,197,248, 25, 79,207,237, 89,105,166,149,149,213,185,212,212, 84,
-203,140, 25, 51,244,141, 27, 55, 46, 30, 53,106,148, 86,167,211, 49,198, 24,211,233,116,108,212,168, 81,218,198,141, 27, 23,207,
-152, 49, 67,255,224,193, 3, 11,159,207, 63, 93,135,229,252,166,188,200, 58,119,238, 28,123,156, 82,169,100,157, 59,119, 78, 13,
- 11, 11,219,244,202, 43,175, 12,169, 41,211,214,214,182,207,244,233,211,149,172, 18, 70,163,145,149,148,148,176, 7, 15, 30, 88,
-234,213,171,151, 9,192,153,222,204, 41,147, 50, 41,147, 10,173,151,102,108, 13,247, 43,223,136, 83,167, 78,149, 49,198,100, 51,
-103,206,148,149,181,108, 89, 3,176, 45,187,241, 1, 12,158, 62,125,186,140, 49, 38,155, 54,109, 90,249, 99,170,218, 17,111,237,
-217,179,199,176,124,249,114,230,238,238,206, 60, 60, 60,216,138, 21, 43,152,197, 98, 97,217,209,219,217, 47,141,192,238,124, 62,
-130, 49,198, 88,194,130,137,236,151, 70, 96,201,223,127,201,134, 14, 29,170,182,177,177,121,183,154,157,235,212,162, 69,139, 18,
-141, 70,163,220,188,121,179,210,198,198,230, 42,128,198, 40, 61, 21,201, 41, 91,214,225,141, 27, 55, 86,220,188,121, 83,249,211,
- 79, 63, 41, 1,204,173,229, 1, 19, 8,160,147, 68, 34,233, 55,221,219, 42,145,109,248,130, 77,119,199, 13, 0, 77, 1,184,150,
- 61,198,107,218,180,105,140, 49,198,124,125,125,207, 87,145, 41, 13, 13, 13,157,150,152,152, 24,101, 52, 26,163,226,226,226,162,
- 26, 52,104, 48,163,119,125,207, 54, 7,223,125, 61,188,248,203, 9,225,108,201, 39,161,223,190,209,170,235,206, 65, 29,223,125,
-239, 21,151, 11,163,220, 68,234,129, 82, 94,201, 19,167, 14,107,117, 96,123,123,123, 95, 78, 79, 79,175, 40,174, 74, 74, 74,216,
-163, 71,143, 88, 74, 74, 10,187,112,225, 2,243,244,244,252,165,166, 76, 15, 15,143,219,233,233,233,236,251,101,203, 88,255,166,
- 13, 89,164,131, 29,235,224,104,199, 90,218,138, 84,141,128,150,117, 45,180,174, 93,187, 38, 3, 32, 3, 32, 43, 40, 40,144, 21,
- 20, 20,200,138,138,138, 42,126, 6, 64, 86, 92, 92, 44, 43, 46, 46,150,233,245,122, 89, 64, 64, 64,157, 11,173, 8, 17, 34, 94,
- 19,161,176,141, 16,154,183,188, 93, 50, 39,212,119, 49,255,254,110, 27, 86,244, 97,103,182, 60,220,155,181, 19,224,255,106,153,
-249,150, 64, 32, 56, 11, 96, 74, 89, 81, 62,162, 71,143, 30,106,198, 24,235,209,163,135, 26,192,136,178,159,127, 84, 86,100,245,
-168,229,114,114,131,130,130, 84,229, 45, 89, 0,126, 11, 10, 10, 82,133,133,133,177,176,176, 48,230,235,235, 91, 82,150, 93,171,
- 55,180,192,192,192, 4,141, 70, 83, 81, 0,202,229,114,150,153,153,201,146,147,147,217,173, 91,183,216,213,171, 87, 89,106,106,
- 42,219,189,123,183,217,193,193,225, 8,189,153, 83, 38,101, 82, 38, 21, 90, 47,181,208,122,242,246,103,209,209,209,236,137, 31,
- 45,140,141,141,149, 77,159, 62, 93, 86, 67,101, 54,118,230,204,153,229,173, 94, 95, 87,243,207,127,125, 66, 66, 2, 27, 49, 98,
- 4, 11, 9, 9, 97, 33, 33, 33,108,228,200,145,172,184,184,152, 41,147,110,178, 95, 26,129, 93, 29,216,146, 49,198, 88,201,157,
- 56,246, 75, 35, 48,217,208,182,236,250,245,235,204,199,199,231,100, 53,127,255,231, 75,151, 46,229,109,223,190, 61, 27,165,253,
-177,172, 0,180, 6,176, 66, 44, 22,111, 68,233,233,194,122, 0, 28,131,131,131, 11,213,106,181,178,127,255,254, 74, 0,126,213,
-100,118, 8, 9, 9,185,191,126,253,122,150,155,155,203, 10, 11, 11,217,162,136, 6,140,109,248,130,205,111, 89,207,242,253,247,
-223,235,166, 76,153,162,114,114,114,138, 6,224,213,191,127,127, 19, 99,140, 69, 70, 70,230, 84, 22,230,224,224,208, 35, 49, 49,
- 49, 74,171,213, 70,201,229,242,168,194,194,194,168,195, 7, 15, 70,117,111,218, 96, 68,241,151, 19,194, 15,190,251,122,248, 27,
-222,142,253,150,118,123,117,252,163, 25,163,251,207,108,219,248,142,246,155,201,103,222,169,239,190,248, 89,246,182,171,171,107,
-150, 78,167, 99, 0,158,186,221,191,127,159, 57, 59, 59,167,215,148,225,228,228, 52,243,163,193,131,204,111,215,243,102,247,151,
-207, 98,198, 83, 63, 49,227,209,205, 44,105,225, 39,172,183,135,139,162,181, 53,119,122,109,151,199,195,195,227,212,229,203,151,
-255, 84,104, 21, 21, 21, 85, 90,104, 41, 20, 10,153, 94,175,151, 5, 5, 5, 29,127,222,163,190,181, 0, 1, 29,196,188,171,113,
- 35,218,179,188, 9,157, 89, 15,169, 85,234,115,196, 13, 6,112, 22,192,208, 58, 62,143, 11,224,155,242,130,106,225,194,133,140,
- 49,198,130,130,130, 84,120,190,139, 81,164, 13, 27, 54, 76, 25, 61,122,180,169, 81,163, 70,185, 17, 17, 17,242, 43, 87,174,176,
-115,231,206,177,163, 71,143,178,189,123,247,178,155, 55,111,178, 71,143, 30,177,132,132, 4,214,179,103, 79, 57,128, 14,244, 94,
- 72, 8,249, 59,171,164, 22,249,199,227,150,175, 88,175, 94,189, 56,143,173,160, 20,128,168,101,203,150,121,223,124,243,205, 18,
-148,142, 5,193, 9,229,225,157,206, 98,254,245,206, 98,254,245, 80, 30,222, 41,107, 49, 90,183, 96,193,130,121, 97, 97, 97, 89,
- 0,196, 0, 60, 42,251, 67,140,177,246,206,206,206, 72, 79, 79,135, 84, 42,133, 84, 42, 69,122,122, 58, 24, 99, 48, 49,192,200,
- 0,157,193, 0,141, 70, 3,173,133, 65, 99, 1, 20, 74, 37, 60, 60, 60, 96, 48, 24, 2,170, 88,254,102, 3, 7, 14, 12, 8, 13,
- 13,205,155, 58,117,106, 38, 74,251,202,108,124,255,253,247, 79,253,246,219,111,161, 74,165,178,240,214,173, 91,218,166, 77,155,
-246, 0,224,145,152,152, 56,108,213,170, 85, 24, 49, 98, 4,170,249,167,211,180,103,207,158, 71,111,222,188, 25, 48,116,232, 80,
-156, 61,123, 22,139, 22, 45, 66,126,126, 62, 3, 0,157, 78,199,204,102,179,161,109,219,182,134,229,203,151,183,138,140,140,188,
- 92,191,126,125, 30, 0,164,164,164, 36, 85, 22,200,225,112, 26,248,251,251, 67,167,211, 33, 47, 47, 15, 55,111,222,132,157, 84,
-138,248,204,124,247,142, 75,191, 47,248,252,224, 41,171,193,173, 66,157, 62,126, 61, 66,247,213,201,179,193,141,189,220,221,245,
- 6,163, 71, 66, 86, 78,230,179,236, 84,107,107,235,244,252,252,124,232,245,122,104, 52, 26, 40, 20, 10, 20, 20, 20, 32, 63, 63,
- 31,153,153,153,176,182,182,190, 95, 83,134,125, 97,225,249,148, 75,231, 56,187,127, 88,136, 0, 83, 33,248,251, 86,128,127,104,
- 13, 2,245,121, 88, 59,107,156,157,222,217,117,142,189,157, 93,145,131,131,195, 58, 0, 65, 53,229,133,135,135,163,160,160, 0,
- 5, 5, 5,112,118,118,134,163,163, 35, 28, 29, 29, 33,151,203, 81, 92, 92, 12,133, 66,129,224,224, 96, 52,107,214, 12, 91,183,
-110,125, 33, 7,247,239,122, 36,155, 96,158,112,234, 94, 38,172, 37, 18,212,119,180,245,127,213, 22, 78,213, 60,165,179,149,149,
-213, 30, 39, 39,167,147, 0, 62, 4, 32, 1,240,161,147,147,211, 73, 43, 43,171,190, 0,230, 3,216, 94,199,197,248,106,206,156,
- 57,211, 18, 19, 19,109,174, 95,191,142,169, 83,167, 98,238,220,185, 72, 74, 74,250, 14,128,165,236, 49, 31, 56, 59, 59, 71,115,
-185,220, 31, 1,188, 9,160,135,167,167,103,151, 26,114,251, 78,153, 50, 69,219,162, 69,139,132, 59,119,238,244,189,116,233, 82,
-203, 79, 62,249,164, 56, 45, 45, 13, 9, 9, 9,240,244,244,132,175,175, 47,148, 74, 37,138,138,138,208,183,111, 95,169,189,189,
-253,187,244, 54, 78, 8,249, 59, 23, 89, 79,212, 34,255,180, 22,173, 74,239, 87,250,137,218,198,198,102,142, 76, 38,107, 19, 22,
- 22,198, 7,176, 27, 0, 66,121, 24,208,183,109,243,141, 7,215, 45, 12,219,191,124, 86, 88,247,176,224,141,161, 60,148, 95,197,
- 22,221,178,101, 75, 71,153, 76,214, 86, 40, 20,254, 95, 21, 11,193, 0,192,209,209, 17, 82,169, 20, 14, 14, 14,112,116,116,132,
-197, 98,129, 82,173,133,202, 12,148,104,245, 40, 46, 46, 70, 73,217,125,165,206, 0,149, 74, 85,241,220, 74,116, 28, 61,122,116,
-222,170, 85,171,114,179,178,178, 22, 2,104, 58, 98,196,136, 62, 43, 87,174,196,175,191,254,170,125, 51, 36,208,121, 65,251,230,
-243, 26,103, 37, 69,133, 88, 97, 12,128,243,231,207,159, 71,219,182,109,193,225,112, 6, 85, 22, 40, 22,139,215,236,220,185, 83,
-124,235,214, 45, 4, 6, 6,222, 26, 52,104,208, 59, 11, 23, 46, 12,144, 40, 11, 47, 2,128,169, 32,251,214,196,137, 19,191, 88,
-176, 96, 65, 94, 94, 94,158, 65,173, 86,187,245,238,221, 27,233,233,233,120,244,232,209,111, 85, 20,153, 9,113,113,113,172,184,
-184, 24,201,201,201,136,139,139, 19,127,241,197, 23,173,204, 92,110,159, 12,216,189, 55, 34,162,101,171,161,173,155, 99,123,204,
-117,235, 11,247, 82, 28, 90,214,243,118,188,246, 48,235, 21, 35, 7,247,159,101,111,151,148,148,172,152, 55,111,158, 82,169, 84,
- 34, 35, 35, 3, 55,110,220,192,157, 59,119,144,154,154,138, 69,139, 22, 41, 11, 11, 11, 87,214,148,225, 37,226,127,186,248,147,
-247, 57,252,219,191, 1,215,207, 1,234, 18, 64,163,132,238,174, 12,155,238,102, 99,245,190, 3,130,180,244,116,135, 93,187,118,
-141,246,243,243,147, 1, 8,174, 46,143,177,210, 93,200,229,114,159, 44, 66,193,229,114, 75, 0,100, 75, 36,146,135,118,118,118,
- 15,185, 92,110, 54, 99, 76,245, 66, 62, 73,152, 96, 0,143, 7, 8,196,224, 90, 85, 59,181,231, 59,131, 6, 13,218,249,240,225,
-195,238,201,201,201,109, 86,174, 92, 57, 79, 36, 18,197,175, 92,185,114, 94,114,114,114,155,135, 15, 31,118, 31, 52,104,208, 78,
- 0,195,235,242,247,131,130,130, 38, 70, 69, 69, 97,209,162, 69,104,214,172, 25,130,131,131,213,115,230,204, 89, 1, 96, 22,128,
-255, 11, 10, 10,186, 56,113,226,196, 81,185,185,185, 30, 25, 25, 25,205,190,251,238,187,113, 43, 86,172,120, 53, 51, 51, 83, 84,
- 67,116,187,110,221,186,225,216,177, 99, 0,144, 5, 32,185,160,160,192,148,153,153,137,134, 13, 27,162, 85,171, 86, 80, 42,149,
- 80, 42,149,144,203,229,240,247,247,135,197, 98,105, 67,111,229,132, 16,242, 63, 45,184, 42, 47,180, 68, 34,145, 99,120,120, 56,
-234,215,175,239,136,178,171,181,156, 5,252, 25, 31,143, 30,108, 99, 43, 59, 14, 78,220, 47, 24,212,190,137,141,179,128, 63,163,
-236, 41,124,127,127,127, 97,120,120, 56, 36, 18,137,119, 21,127,252,108,118,118, 54,194,195,195,225,224,224, 0,169, 84,138,240,
-240,112, 24, 12, 6, 20,151,148, 64,101, 6,212, 70, 11,138,139,139, 81,152,151, 3,181, 25, 48,217, 57, 35, 53, 53, 21, 60, 30,
- 47,165,138, 76,207,192,192,192,188,248,248,248, 60, 0,231, 1,140,159, 59,119, 46,166, 79,159,142,217,179,103,239,180,201,122,
-208,109,231,177, 67,206, 59,230,124,224, 26, 44,224, 12, 6, 96,120,248,240, 33, 28, 28, 28, 32,145, 72, 42, 45, 12, 34, 35, 35,
- 91, 72, 36, 18,108,222,188,153,101,100,100, 68,160,244, 18,254, 20, 14,167,180,216, 19,115, 81, 12, 96,133, 76, 38,123,237,139,
- 47,190,184,215,181,107, 87,171,214,173, 91, 99,254,252,249, 0, 16, 93, 89,166, 92, 46,255,125,248,240,225,250, 51,103,206,224,
-238,221,187,146,131, 7, 15, 14,152, 63,127,126,147,180,180, 52,225,207, 71,143,191,177,237,161, 98,192,194,147, 23, 68, 11, 78,
-156,253,221,197, 94,210,248, 21, 23, 39,196,165, 61,178, 54,243,112,165,166, 61,250,154, 21,111,116, 71, 17, 63,174,189,144,155,
-213, 81,196,151,189,106,197,123,191,164,164,100,215,225,195,135, 79,124,242,201, 39,202,220,220, 92,216,217,217,161,160,160, 0,
- 95,125,245,149, 50, 46, 46,110,159, 94,175,255,185,166, 92,179,133,181,240,173,231, 7,220,143,175,248,153,193,194,112, 69,111,
-141, 94,227, 39, 35,164, 97, 67,232,245,122, 52,109,218,148, 51,119,238, 92,137, 84, 42,253,172,198,162,135,251,212,225,102,226,
-112, 56,217,140,177, 71, 74,165, 50, 67, 44, 22,167, 89, 91, 91,167, 21, 22, 22,102, 48,198,114, 94, 68,157,197,184,248,180,109,
-211, 32, 64, 40, 70, 90,129, 50,243,170, 18,133,149, 61,208,206,206,238,253,213,171, 87,139, 54,108,216, 96,156, 56,113,162,110,
-220,184,113, 86, 26,141,198,109,220,184,113, 86, 19, 39, 78,212,109,216,176,193,184,122,245,106,145,173,173,109,191,103, 89, 16,
-163,209,136,248,248,248,133, 73, 73, 73, 18,148, 14, 55, 50,121,206,156, 57, 35, 18, 19, 19, 69,171, 86,173,194,222,189,123,177,
-119,239, 94,244,233,211, 7,147, 38, 77, 66, 84, 84, 84,117,113, 54, 97, 97, 97,225,206,206,206, 56,119,238, 92, 38,128, 52, 0,
- 45,108,109,109,237,250,244,233,131,238,221,187, 67,171,213,194, 96, 48, 84, 20, 90, 60, 30, 15, 14, 14, 14,206,244, 30, 72, 8,
- 33, 47,189,200,250, 83,177,197, 7,128,242,166,186, 94,189,122,113,170,251,199,104, 46,202,133, 92,165, 70,106,177, 26,233, 69,
-150, 63,253,206, 98,177, 84,251,215, 51, 51, 51,127,142,137,137,121, 63, 60, 60,156,159,153, 89,122, 70, 44, 60, 60, 28,106,181,
- 26,153,215, 47, 67,101, 1, 36,129,161, 80,169, 84, 40,186,115, 13,182, 97,109,224,220,115, 40,150,174, 90,165, 43, 40, 40,248,
-161,178, 76,129, 64, 96,229,227,227,147,151,146,146, 98, 2, 80, 40,149, 74,187,249,249,249,225,236,217,179, 0,176,157, 1,139,
- 17,119, 6, 56,183, 31,172,180, 73,197,214,223,223, 31,185,185,185, 80, 42,149,103, 43,203,140,137,137, 73, 52, 26,141, 77,123,
-247,238,205,217,178,101,203,110,133, 66, 49, 27,192, 13,157, 5,188,235, 15,115,160, 50, 67, 4,224,117, 71, 71,199,143,162,162,
-162,186, 76,156, 56, 17,135, 15, 31,198,201,147, 39, 13, 40,237, 11, 22, 83, 73,108,113,114,114,242,218, 41, 83,166,180,230,114,
-185,227, 79,157, 58,101, 10, 14, 14, 86, 24, 12, 6,115,131,144, 16,238,236,185, 95, 90,127, 56,126,172, 67,129, 26,183,187, 55,
-240,108,203,225, 0,183, 31,229,166, 37, 41, 81, 80,221, 54,141, 20,240,162,251, 70,132, 69,190, 63,232, 45, 91, 73, 96, 99,168,
-110, 94,246, 88,187,231,232, 82,113, 92, 98,175,115,185,185,125, 14, 31, 62, 60,224,236,217,179, 31,234,245,250,250, 66,161,240,
-190, 92, 46, 95,174, 84, 42,107, 44,178,120, 60, 94, 79,157,167,143,163,188,176, 16,162,178,150, 40,133,209,130,124,157, 9,119,
- 29,130,241,174,143,111,197,105,208,236,236,108,120,120,120,112,204,102,243, 91,213,101,158, 60,121, 18,189,122,245, 42, 47, 60,
-193,225,112,192,225,112,242, 67, 66, 66,114,132, 66, 97,129,181,181,181, 98,241,226,197, 90,173, 86, 11, 62,159, 47, 50,155,205,
-188,231, 57,218, 91,217,192, 77,200, 56,107,198,245,238,212,181, 89,227,134,236,252,213,235,156, 34,181,118, 83, 53,173,128,223,
- 5, 5, 5,241, 11, 11, 11,127, 6,112,215,104, 52,238,216,189,123,183,104,216,176, 97,218, 61,123,246, 12, 1, 16,176,100,201,
-146, 1, 74,165,178, 78, 83, 42, 36, 37, 37,125,183, 96,193,130,105, 51,103,206,196,214,173, 91, 39, 38, 37, 37, 77, 47,107,233,
-234, 19, 21, 21,133,197,139, 23, 99,235,214,173,150,187,119,239, 30,181, 88, 44, 73,159,124,242, 73,152,187,187,123,126, 86, 86,
- 86, 82, 53,177, 45,123,244,232,161,187,120,241,162,160,164,164,228, 2,128,143, 38, 76,152, 48,250,181,215, 94, 83, 12, 26, 52,
-200,182,176,176, 80,110, 99, 99, 35, 88,191,126,189, 35,159,207,135, 74,165, 2,135,195, 65, 73, 73,137,158,222, 7, 9, 33,127,
- 87, 85,213, 34,255, 16, 85,254,111,224, 87,182,130,106,181, 58, 39, 61, 61,189,225,163, 71,143, 76, 0, 76, 0, 80,160, 55,125,
-189, 96,253,254, 13,253, 90, 7, 73,178,140, 70, 28,188,122, 75, 93,160, 55,149,119,126, 55, 61,122,244,168, 36, 45, 45,205, 78,
-163,209, 40,171,248, 91,191,173, 89,179, 70,115,230,204, 25,187,228,228,100,152,205,102,180,104,209, 2, 9, 9, 9, 40,186, 27,
- 15, 73,195, 22,144,116,232,133, 91,178,171,136, 59,121, 26, 15,148,122,211,189, 89, 11,138,149, 42, 85,148,193, 96, 56, 88, 89,
-160,149,149, 85, 33, 0,198, 24, 51, 3,128, 66,161,184,161, 84, 42,219,187,187,187,227,246,237,219, 18,149, 25,147, 6,204, 88,
-186,146, 49,102,182, 46,189,154,235,227, 65,131, 6, 33, 54, 54, 22, 0, 98, 43,203, 84, 40, 20, 19,199,140, 25,115,102,243,230,
-205,252,228,228,228,238, 27, 54,108,232,126,239,222, 61,198, 41, 76, 55, 95, 84, 91, 33, 96,196,164, 87,191,247, 15, 57,217,171,
- 87, 47,120,122,122, 98,253,250,245, 88,190,124,185,241,131, 15, 62, 72, 92,190,124,249,171,185,185,185, 59,170, 88,255, 98,185,
- 92,126,220,217,217,249,195, 38, 77,154,148,168, 84, 42, 20, 20, 20, 32, 51, 51, 19, 78,206,206, 92, 19,184,109, 93, 29, 28,118,
-252,156, 93, 34,225, 31,255, 29,151, 51,178,170,109,205,106,109,197, 27,222, 47,178,121,228,255,205,156, 97,139,139, 7,193, 25,
- 19, 5,182, 97, 30, 38,143, 28, 96,167,213,237,232,160,186,158, 58, 76,166, 80,108, 83, 40, 20,123,235,120,176,244,104,219,182,
-237,206, 5, 11, 22,136, 63, 95,180, 0, 75, 26,122,195, 84, 80,128, 60,157, 25,249, 58, 19, 20, 69,119,113,251,246, 45, 56, 59,
-187,224,193,131, 7,208,106,181,184,115,231, 14,227,241,120, 63,215,212,162, 83,238,177,211,133,114,161, 80, 88, 96,101,101,149,
-195,231,243, 11,147,147,147, 85, 90,173, 22, 92, 46, 87, 98, 54,155,197,181, 88, 86, 31, 23, 23,151, 79, 80, 58,152,232,225,146,
-252,252, 21,225, 86,112, 0, 31, 29,253, 93,156,223,152, 53,110,152,139,159,151,155, 60, 57,241,190,241,135, 19,151,242,181,186,
-170, 47,214, 0, 16, 93, 88, 88, 88,209, 34,185,103,207,158,201,123,246,236, 25, 13, 96, 35, 74,231,221, 58, 45,151,203,191,127,
-134, 23,223,172,125,251,246, 77,155, 57,115, 38,196, 98,113,197,224,169, 98,177, 88, 4, 0, 63,253,244, 19,110,223,190,253, 26,
-202,250,107, 89, 44,150,157, 89, 89, 89, 53,101, 6,132,134,134, 38,239,223,191, 95, 0,192,107,194,132, 9,109, 86,174, 92,137,
-145, 35, 71,230,221,186,117,171, 53,128, 20, 0, 1,227,199,143,191,178,117,235, 86, 71,139,197,130,162,162, 34,232,245,250, 20,
-122, 43, 39,132, 80,177,245, 82,132, 3,136, 67,233,248, 89, 61, 1, 28, 65,105,183,142, 42,249,150, 85,103, 39, 0,244, 46,255,
-255, 88, 69,103,120,160,244,138,172,227, 0,126, 4,224, 94, 85,168,179,179,243,103, 35, 70,140, 48,102,100,100,176,236,236,108,
-182,119,239, 94,246,241,251, 35,204,175, 7,122, 89, 2,189,220, 85,174,174,174, 9,158, 46, 78,155,154,219,224, 99, 0, 62,181,
- 88,177, 17,247,238,221, 27, 59, 98,196,136,247,203,254,238,251, 59,119,238, 84,158, 58,117, 74,201,227,241,162, 81, 58,180, 67,
-121, 65, 57,252,173,183,222, 82,234,116, 58,101, 72, 72, 72, 33, 74, 59,238, 87,101, 64,199,142, 29,139,142, 29, 59,198,204,102,
-243, 83, 99, 20,229,229,229,177,147, 39, 79,178,136,136, 8, 57,128, 97, 93,186,116, 57,123,233,210,165,179,237,218,181,219, 87,
-211, 2,187,184,184,204,184,126,253,122,108,106,106,170,236,200,145, 35,178, 29, 59,118,200,198,143, 31,127, 35, 44, 44, 76,147,
-152,152,104, 49,153, 76,236,250,181,107, 44,164, 65, 3, 21, 0,255,170,114, 58,139,249, 87, 20,235,231, 49,237,252,145, 76,219,
-215,151, 1, 96, 37, 75, 63, 99, 57, 19,187,178,132, 15,223, 96,157, 68,188,152,103, 57, 82,125,108,111,173, 0, 0, 32, 0, 73,
- 68, 65, 84,156,156,156, 78,196,198,198,178,146,146, 18,118,243,230, 77, 54,188, 87,119, 22, 51,186, 43, 59,222, 61,136,109,237,
-240, 10, 91,218, 45,140,117,239,208,158,173, 89,179,134,237,223,191,159,205,152, 49,195,226,226,226, 82,130,106,250,104,121,120,
-120,156,218,189,123,183, 12,128,140,199,227,201, 20, 10,133,172,164,164,228,231,135, 15, 31,174, 14, 9, 9,153,214,164, 73,147,
- 33, 13, 27, 54,236,220,233, 21,255,105, 93,236,132, 9, 93,237, 69,247, 27,216,218, 44,197,211,227, 94, 85,144, 2,254,129, 1,
- 1, 37,231,206,157,179,232,116, 58,118,225,194, 5, 75,163, 6,193,218, 37, 3,123,236,123,176,254,155,125,218, 99, 91, 78,168,
- 15,173,187,180,231,189, 94,241, 29,109,184, 91,218, 72, 42,134,227,120, 86,131, 1, 28,196, 31, 87, 29,142, 0,112, 8,213, 95,
-133,200, 5,176,113,254,252,249,143, 95,105, 8, 0,220,176,176, 48, 25, 99, 76, 22, 22, 22, 38,171,235,130,216,216,216,124,114,
-248,240,225, 57,126,126,126,139, 6, 13, 26,180, 94, 46,151, 31, 25, 50,100, 72, 60, 74, 47, 6,225,160,116,118,132,183,124,124,
-124,242,226,226,226,216,217,179,103, 89,255,254,253, 75,172,173,173,135,210,219, 56, 33,132,188, 20, 99,171,248, 90,173, 5,241,
-241,241,229, 99,104, 77,168, 46,124,250,244,233,178,216,216, 88, 25, 74, 71,137,175, 22,159,207, 63,240,193, 7, 31, 48,119,119,
-119,165,155,155,219, 1, 43, 30,111,180,175, 24,225,120,182, 75,221,219,111,219,182,173,207,119,223,125,215, 19,192,107, 0,172,
-188,189,189, 51,179,179,179,149,151, 46, 93, 82, 70, 68, 68, 40, 93, 92, 92,114, 67, 67, 67,149, 75,150, 44, 81, 26,141, 70,229,
- 39,159,124,162,196,211,227,125, 85, 70, 4,224, 67,129, 64,112,160, 81,163, 70,241,179,122,119, 54, 46,154, 52,154,141, 8,114,
- 85, 2,248, 14,192, 7, 0, 28, 0, 88, 13, 24, 48,224,151, 59,119,238,156, 8, 13, 13, 93, 91,139, 92,175, 38, 77,154,252,186,
-115,231,206,216,253,251,247,203, 62,251,236,179, 88,103,103,231,140,196,196, 68,139, 86,171,101, 69, 69, 69, 76, 46,151,179, 35,
- 71,142,152,157,156,156, 86, 85,185,226, 66, 94, 22, 59,185,189,210, 33, 28, 30,206, 28,202, 34, 4,220, 71,207,114,164, 72, 36,
-146,194,130,130, 2,150,157,157,205,146,147,147,217,190,125,251, 88,143,182,173,216,174,241,253,216,246,247,251,176,197, 61, 90,
-177,215,236, 68, 42, 15, 59,219, 88, 59, 59,187,220,218, 92,117,232,225,225,113, 74,167,211, 85, 12,223,224,227,227, 35, 11, 9,
- 9,217, 31, 26, 26,186,244,240,225,195,147,151, 45, 91,214,167,211, 43,254,211,190,234,222, 86,163, 62,189,135,149,236,254,142,
- 77,111, 17,172, 45, 43,230, 43,229,237,236,180,237,220,217,179,150,242,226,215,100, 50,177,131, 7, 14,176,129,111,188, 30, 95,
-124,252,167, 31, 47, 68, 77,220,249, 73,139,224,131, 17, 34, 12,174,174, 96,171,248, 40, 98, 11,231, 72,123,238,234, 55,253,156,
-178,218, 75,185,223,181,182,251,211,244, 82, 3,131,131,131,147, 25, 99, 89, 13, 27, 54, 76, 6,176,189, 97,195,134,143,223,127,
-175,138,216,138,193, 73,231,204,153,195,202, 94, 31, 92, 0,179, 23, 44, 88, 32, 99,140,201,130,130,130, 46, 2, 64, 51, 9, 92,
- 58, 72,185, 63,246, 14,112, 47,232, 32,229,254,216, 76, 82,249,148, 81,254,214,104,208,222,213,230, 66,159, 32,207,146,142,222,
-210,243,219, 55,109, 88,244,230,155,111,174, 7,176, 10,192, 60,103,103,231, 11,131, 7, 15,190,189,117,235,214,219, 75,150, 44,
- 49, 36, 38, 38,178, 81,163, 70,169,132, 66,225, 60,122, 31, 36,132,144,151,166,124,100,120,207,186, 20, 90,111, 77,155, 54, 77,
-198, 24, 43, 31, 75,107, 88, 37,143,233, 61,115,230, 76, 25, 99,172,124,116,248, 39, 7, 48,171,108, 64,179, 57,171, 87,175,102,
- 66,161,240,199,103, 92,153,199, 51, 61,250,246,237,219, 90,161, 80,188,234,238,238,254,106, 89,203,149,175,139,139, 75,242,142,
- 29, 59,148, 26,141, 70,201, 24, 83,154, 76, 38,101,108,108,172,178, 99,199,142,202,199, 62,245,215,180,156,127,242,185, 7, 46,
- 94,157,245, 62,251,220, 3, 23,159,248,213,208,141, 27, 55, 30, 75, 73, 73,249,217,222,222,126,106, 45, 51,125, 93, 93, 93,103,
- 59, 57, 57,157,112,113,113,249,220,201,201, 41,203, 96, 48,176,162,162, 34,150,144,144,192,206,158, 61,203, 98, 98, 98,152,147,
-147, 83, 70, 85,203,217, 69,204,255,189,104,209,135,204,178,113, 1,211,175,156,193, 0, 48,249,178,233, 44,127,205, 92,118,117,
- 76,119,214, 81,196,251,237, 25,182, 39, 28, 28, 28,214, 29, 56,112,192,146,148,148,196,162,163,163,217,145, 35, 71,216,164, 73,
-147, 88, 3, 47, 79, 93,107, 1, 55,167,189,144,127,226, 89, 6, 44,213,233,116, 50,133, 66, 33, 83, 42,149,178, 70,141, 26,201,
- 90,181,106,181,191,117,235,214, 75,247,236,217, 51,249,171,175,190,234,211,197, 78,152,160, 62,189,135,177,207,222, 96,236,195,
-118,236,254,232,142,172,179,152,127,189,202, 76,119,247,140,242,209,218, 85, 42, 21, 59,127,254, 60,251,245,215, 95,153,135,139,
-139, 34, 82,204, 27, 27, 33, 68,135, 8,123, 56,212,118, 57, 59, 73,185,155,126, 95,243,181, 89,115,108, 43,251,105,196, 27,166,
-142, 14,220,213,143, 61,110, 23, 99, 44,171,127,255,254, 15, 24, 99, 89,251,246,237,123,200, 24,203,234,215,175,223, 3,198, 88,
- 22,128,157,149,101, 62, 49, 56,233,198,178, 34,235,195, 57,115,230,200, 24, 99,178, 57,115,230,200,128,210, 65, 84, 59, 72,185,
-155, 47,175, 93,108,209, 29,217,204,246,140,234,105,238, 32,229,110,174,116, 57, 29,248, 63,199,109, 92,198,244, 39,182,179, 3,
-147,134,152,219,121,216,159, 11, 14, 14, 94, 60,121,242,228,253, 49, 49, 49, 55,204,102,243,237,228,228,228,219,171, 86,173,186,
-221,166, 77,155,139,206,206,206,241, 2,129,224,131,154,246,209, 11, 66,153,148, 73,153,148, 73,158,108, 96,170,230,119, 63, 47,
- 92,184, 80,194, 24,251,100,192,128, 1,248,230,155,111, 6, 54,105,210,100,176,183,183,183, 43, 0,100,102,102,170,111,222,188,
-169, 24, 48, 96, 0,102,207,158,141, 69,139, 22, 45, 69,105, 95,150,255,165,236,131, 7, 15,250, 76,156, 56, 49,247,171,175,190,
-178,140, 26, 53,170, 33,128,155,249,249,249, 13,134, 12, 25,242, 33,159,207, 31,224,239,239, 31,154,149,149,149,167,209,104,182,
- 3, 88,139, 26,206,153, 86, 69,200,133,185,101, 61, 79,156,224,194,252,216,143,223,152, 61,123,246,160,126,253,250, 25,150, 45,
- 91,102, 82, 40, 20,135,107, 25,247, 48, 47, 47,239,203,242, 59, 78, 78, 78, 30,215,175, 95,255,192,205,205,141,155,156,156, 12,
-157, 78,135,164,164, 36, 11, 74, 79, 77, 85, 74,105, 98, 43,190,223,119, 42,228,147,161,189,236,213,119,175,193,154,199,131,209,
- 74,128,236,223, 79, 96,227,249,187, 10,149, 1, 43,159,101, 61,229,114,249,183,147, 38, 77, 26, 50,117,234, 84,145,191,191, 63,
-231,183,223,126,195,238,221,187,117,185,185,185, 61, 0,156,251, 99,232,167,186,177, 88, 44, 16, 8, 4, 0,128,233,211,167,131,
-203,229, 90,229,230,230, 10, 56, 28,142,144,195,225,216,112, 56, 28,158, 49,229, 54, 44,138, 34,228, 20,201,241, 48, 71, 94,109,
-158,217, 98,217,125,249,242,229,143,155, 55,111,206,189,122,245, 42,242,242,242,144,148,148,196,204,140,237, 60,175, 49,151,118,
- 74,212,213,126,249,108,156,156,251, 54,115, 20,114, 5,155,102, 35, 82,207,229,253, 96, 65,127,148,142,165, 5, 0, 27, 57, 28,
-142, 53,128,130, 70,141, 26,117,186,115,231,142,184, 81,163, 70,154,187,119,239, 30,227,112, 56,222, 0, 54, 87,150, 41, 22,139,
-243, 1,228,239,219,183, 15, 0,198,160,116,227,181,136,138,138,202, 58,127,254, 60,230,204,153,147, 3, 96, 53, 0,216, 58, 58,
-247, 14,149, 90,115, 4, 91,230,160,141, 14,220,149, 22, 86,105,171,171,173,155,123,231, 38, 18, 46,172, 54,124,129, 87, 61, 66,
-184, 2,147,161,233,220,185,115,207, 43,149, 74,221,174, 93,187,244,239,189,247, 30, 47, 49, 49,241, 10,128, 11, 0,246,161,172,
-143, 37, 33,132,144,151,234,201, 22,172, 26,251,104, 61, 89,181,126, 3,224,251,123,247,238, 85, 76, 42,125,239,222, 61, 25,128,
- 31, 80, 58, 26,252, 91,117,168,120,103,149,181,104,173,125,198,149,121, 50, 83, 20, 30, 30, 46,190,115,231,142, 53, 42,159,196,
-145,243, 12,153, 79,169,108,174,195,224,224,224,229, 70,163,113,255, 15, 63,252,176,135,199,227, 13,121,142,106,223, 63, 40, 40,
-168,104,199,142, 29,150,232,232,104, 54,107,214, 44,179,167,167,103, 17,158,238,163,245,167,204, 72, 1,111,239,148,134,222,138,
-216, 97,237,216,253,201,189,217,133,161, 29,217, 88,111, 91, 69,164,136,183,251, 57, 63,149, 4, 73,165,210,141, 98,177, 88, 97,
-111,111,127, 10, 64,219,231,217, 71,206,206,206, 91, 61, 60, 60, 78, 61,126,115,119,119,223,239,234,234,250,157,139,139,203, 44,
- 7, 7,135,113, 1, 34,193,178,201, 13,188,180,241,125, 27,177,211, 17,174,108,168,139,224,201, 83,135, 79, 46,167,103, 64, 64,
- 64,193,182,109,219, 44, 63,255,252, 51,155, 49, 99,134,165, 94,189,122, 10, 84,211,175,173,218, 22, 45, 7,222,238,189,253, 90,
- 91,114,122,122,179,111, 26,218, 89, 58, 57,242,170,186, 66,113,104, 89, 1, 60,162,166,204,192,192,192, 31, 24, 99,155,230,207,
-159,191, 9,127,204, 5,250,250,220,185,115,163, 24, 99, 81,115,231,206,141, 2,208, 29, 0, 34,165,220,109,219,251,180, 52,103,
-190,233,197,190,110,104,107,142,148,114,183, 85,218,146,233,196, 63,120,104,116, 79, 75,214,232, 8, 54, 59, 72, 98,110,237, 36,
-252, 69, 32, 16, 76, 70,105,139,115, 43, 0, 2,250,212, 76,153,148, 73,153,212,162,245,183, 43,188,106,197,195,201,201,105, 99,
-253,250,245,247,248,251,251,239,177,181,181, 93,138,210, 78,243,117,221, 17, 1, 11, 22, 44, 80, 72,165,210,102, 47,112,231,186,
- 1,240,198,211, 19,231,190,176, 3,230, 75, 79, 76, 76,156, 58,240,250,151,158,152,248,216,143, 91, 53,108,216,240,107,148,142,
-230,253,188, 7,161,191,147,147,211, 42, 39, 39,167,140,178,190, 89,254,181,201,108,201,227, 13,233, 36,226,253,214, 86,192,205,
-238, 36,226, 95,122,149,199,123,247, 31,250, 2,172,238, 98,139,170, 50,125, 92, 92, 92,150, 57, 57, 57,101,186,184,184,172,170,
- 99,145,245,167,204,102, 98,120,118,118,224, 29,108,107,199, 81,117,150,242,246,181,180,169,250,162,142, 58,172,123,248,156, 57,
-115, 70, 50,198, 70,122,121,121, 13,120,172,240, 15,157, 61,123,118, 47,198, 88,175,242, 17,224, 91,217,192,173,163, 3,111, 71,
-132, 61, 71,222,209,129,183,163,149, 13,220,170, 90,206, 78, 14,188,221, 17,246, 28,121,164, 61,119,135,159, 16,245,232,205,156,
- 50, 41,147, 50,169,208,250,119, 20, 90,116,192, 80, 38,101, 82, 38,101, 82, 38,101, 82, 38, 21, 90,149, 23, 86,143,223, 42,206,
-176,241,105,219, 16, 66, 8, 33,132, 60,151, 42, 7, 44,229, 84, 83,149,214,165, 99,251,179, 84,182,167, 41,147, 50, 41,147, 50,
- 41,147, 50, 41,243, 63,151, 89, 83,246,255,250,194,186,127, 52,106, 86,165, 76,202,164, 76,202,164, 76,202,164,204,255, 44, 46,
-109, 2, 66, 8, 33,132,144,231, 18, 94,246,245,201,129, 75, 43,239,163,197,111, 53, 63,199,100, 50,185, 1, 0,159,207,207, 53,
- 94,153,229, 89, 93,186, 21,208,197, 84, 58,253, 14,248,192, 24, 19,112,170,146,204, 83, 38,147,201,177, 44,179,200,120,101, 86,
-247,106, 51, 91,205, 63,241,248,227, 77, 87,102,189,254,228, 99, 24,192,179,106, 53, 63,243,137,101,245,170,237, 86,225,224, 79,
- 99, 98,189,180,229,252,167,100,254,151, 89,189, 54, 63,199,104, 44, 61,142,172,172,248,185,134,203,213, 31, 71,214,175,205,207,
-124,252,241,198,203,179,220,171,203,180, 17, 11, 11, 2,189, 93,151, 86,151,153,156,153,255,137, 74,173,117,174, 46,179,174,175,
- 77, 95, 79,207, 46,230,178,215, 38, 15, 24,147,145,149,117,234,111,118, 44,181, 4, 48, 11,128,253, 99, 63,139, 7,240, 17, 29,
-149,132,144,127, 88,161, 21,135,210,121, 14,215,149, 21, 91,235,170, 44,180, 76, 38,147,155,236, 64, 20, 84, 58,160,203,240,249,
-110, 1,125,215, 62, 53, 81,178, 73, 91, 36,144,223,218, 21,202, 51, 42, 28, 93,249, 6,251,204,204, 76, 14, 0,112, 56,156, 31,
- 1,248, 85,146,233, 40, 59, 16, 5,181, 30,136, 28, 60,215,209, 15,176,207,179,182,254, 84, 44,145,116,210,104, 52, 77, 0, 64,
- 44, 22,223,210,168, 84,103, 92, 13,134, 37, 79, 62,190,170, 53,123,124, 89, 59, 15,155,239,214,176,239,218, 73,102,139, 69,240,
-232,234, 15,145,218,252, 68,190,149, 73,183,250,115,224, 88, 84, 37, 69, 85, 21,121,127,252,221,119,102, 56, 91, 1,157, 5, 34,
- 81, 51, 7, 71,199,246, 22,198, 26, 89, 44, 22,142,217,100,186,173, 40, 46,190, 96, 49,153,174,155,244, 42,103,217,225,175, 45,
-213, 45,231,147,235,242, 14,192, 63, 0, 12,144,216,218,118,226, 89, 89,181, 5, 0,179,209,248,155, 74,169, 60,243, 54,176,183,
- 54,235, 94,219,237,243,172,143,255,175, 49, 26, 77,110, 41, 39,162,160, 51, 2,225,253,191,118, 11, 27,178,101, 7, 0,232,115,
-175,187, 43, 19, 15,191, 6, 0,146,192, 94,151,133, 30,225, 57, 0,192, 79,203,114, 75,136,158, 9,157, 17,104,212,107,174, 91,
- 77,153,239,205,222,237, 60,117,108, 63, 33, 0,156,220,247, 93,131, 95,247,127,255, 6, 0,116,238, 55,225, 88,183,254, 19, 19,
- 0, 96,209,186,253,206, 59,191, 30, 88,109,102,237, 94,155,197,214,197,137,209, 65,122, 69,150,131,175,132,239,145,152,152,200,
- 5, 0, 47, 47,175, 90,189, 54,125, 0,105, 22,240, 33,151,199,107, 31, 24, 20, 20, 14,128, 37,223,191, 31,103, 54,153, 46,122,
- 2,171, 95,240,177, 52,137,177, 63, 15,206,202,225,112,232,128, 36,132,252,211, 28, 41, 43,174,142, 60,245, 97,182,170,103,168,
-116,192,185, 36,160, 67,235, 48,140, 29,242,166,237,227,191,219,187,118,174, 95,226,213, 67, 13, 55,108, 89,194, 13, 11, 11, 67,
- 74, 74, 74,173,150, 66,173, 7,206, 38, 2,144,223,177, 43,146, 72,238, 47, 91,188,216,254,245,215, 95,231,123,121,121,129,195,
-225, 32, 59, 59,187,245,233,211,167, 91,126,252,241,199,227, 33,191, 83,164,214,163,228,108, 98,205,185,229,203,218,164, 65, 61,
-204,154, 56, 80, 10, 0,159, 15, 95,221,242,234,189, 28,167,251,247,239,119,153, 54,109, 90, 1,239,204,153,239, 93,128, 77, 57,
-192,195,218, 44,231,214,159, 47,139,164, 89, 63, 5, 12,157, 56,113, 95, 80, 80,144,173,191,191, 63,199,206,206, 14, 60, 30, 15,
- 69, 69, 69,126, 55,111,222,124,227,202,149, 43,170,211,231,126, 20,196, 94,233,157,156, 43,122, 77, 91,171,117,215,100,138, 78,
-218,217,221, 26,246,246,219, 62, 3, 7, 14, 20, 5, 6, 6, 2, 0,238,223,191, 31,188,119,239,222,193,251,246,237,155, 13, 77,
-166, 73,173,135,182,166,117,175,200, 4, 32, 2,218, 58,184,185, 13,229, 89, 89, 53, 49,153, 76,222,101,173, 13,143,204, 70,227,
- 45,121,110,238,246, 39, 31, 79,158,166, 51, 2,119,178,128,174,237,195, 49,172, 95, 87, 9, 0, 76, 27,180,160,117,218,131, 36,
-107,189, 94,143, 6, 33,141, 34,230,125,189,244, 4,184, 92,108,219,127,186,226,241,181,201,140,191,147,130,168,121,203,144,121,
- 99,111,107,115,113, 82,167, 18, 69, 49, 15, 0,236,165,210,126,123,119,253,116,198, 43,116,192,239, 73,249,134, 90,101, 86,247,
-218, 60,190,107,149,103,198,205, 51,141,215,156,220,104,229,231,231,135, 27, 55,110,212,237,181, 89,124,207,206,226,233,121,123,
-201,103,159,121, 68, 70, 70,194,214,214, 22,124, 62, 31, 38,147,169,235,197,139, 23,187, 70, 69, 69, 77, 64,241, 61, 85,109, 95,
-155,181,176,132,195,225,116,122,111,236, 36,207, 55,251, 12, 64,191, 30, 17,116, 32, 18, 66,254,105,202, 91,175, 30,191,242,112,
- 93,181,133, 22,159,207,207,125,125,196, 87,110,237, 95,107,138,171,215, 19,138, 83,211,179,148,229,191, 43,188,181,183, 65,159,
- 8,239,198,231,207,159,131, 78,167,195,111,191,253,134,235,215,175,227,193,131, 7, 24, 55,110,156,174,236,212, 97,101,153, 69,
-145,131,231, 58,162, 56,209, 54, 88,112,239,149,211,119,239,242,180, 90, 45,206,159, 63,143,162,162, 34, 8, 4, 2,248,248,248,
-160, 91,183,110,252,187,119,239, 58,117,121,189,135, 52,178,199,187, 41,144, 6, 43,249,124,126, 81, 85,243,136,240,249,252,220,
- 46,195,231,187, 53, 14,174,135,251,169,153,197,179,190,222,160,180, 88, 24, 63,249, 65,154,225,220,185,115, 8, 15, 15,199,169,
- 83,167,156, 11, 11, 11,191, 88,189,122,245, 44,171,133,107, 86, 24,245, 5, 83, 80,117, 94, 81,228,224,185,142,206,185,123,252,
-127, 61,126,208,250,214,173, 91,214, 63,252,240, 3, 10, 10, 10, 32, 16, 8,224,224,224, 0, 15, 15, 15, 52,104,208,128,243,249,
-231,159,219,246,234,117, 11,255, 55,102,128,191, 33, 96,244,189,170,150,179, 98,221,149,105, 54, 46,138,147,129,251,143, 28,225,
-182,107,215,238, 79, 31,219,235,215,175,143,238,221,187,139,134, 14, 29, 26, 56,112,240, 16, 75,100,207,247,238,195,214, 95, 93,
- 99,166,234,161,216, 89, 29,227,213,117,240,224,195,115,231,206,117,240,240,240,128, 68, 34, 1, 0, 20, 23, 23,251,164,166,166,
-182,158, 61,123,118,255,203,241,187,248,145,189, 30,102, 66,226,171,169,110,123,254, 87, 89, 89,241,115,203, 91,145,236, 36,226,
-162,135, 25, 57, 42, 0,208,235,245,208,235,245,208,233,116,248, 96,194, 56,222,152,254,173,130,252,219, 79,186,246,224, 81, 78,
- 97,163,211,191, 59,149, 63,215, 88, 67, 38, 95,253, 64, 46, 79,255,101, 76,212,103,159,121,184,187,255,113, 70,112,219,214,173,
-188,194,194,194,174, 81, 81, 81,141,153, 77, 71,121,163, 94,115, 29,170,203,172,238,181, 41, 79, 56,242,202,188,137,221,155,173,
-253, 58, 26,102,179, 25, 49, 49, 49, 56,127,254, 60,150, 46, 93,202,142, 29, 59, 86,108, 47,145,140, 65,181,175,205,123,118,237,
- 60,179, 3, 22, 46,220,199, 17, 10,133, 56,116,232, 16,238,222,189, 11, 46,151,139,176,176, 48, 12, 27, 54, 12, 93,187,118,245,
- 24, 59,118, 28,139,236, 49, 40, 25,210,144,146,231, 60,150,184, 0, 38,205,136, 90,232, 57,124,244,135, 88, 52,239,115, 42,180,
- 8, 33,255,228,214,172, 42,135,120, 64,116,116, 52, 43,187,117, 0, 0, 6,112,235,247, 93,187,115, 79,172,229, 72,253,190,107,
-119, 50,128,203, 0,174, 61, 80,175,121,243,230, 70,185, 92,206,174, 92,185,194, 62,248,224, 3,213,138, 21, 43,206, 28, 57,114,
-100,175,201, 96, 88,239,229,233,249, 45,171,162,131, 61, 3,184,254,128,212,198,198, 38, 47, 61, 61,157, 29, 61,122,148,205,153,
- 51,135,109,223,190,157, 29, 59,118,140,157, 62,125,154, 29, 59,118,140,237,220,185,147,197,199,199,179,132,132, 4, 38,145, 72,
-242,252, 1,105, 53,153, 60, 6,240, 26,244,253, 97,202,190,171,198,185, 33,125,215,126,204, 0,158, 35,208,176,121,243,230,230,
-189,123,247,178,109,219,182,177, 45, 91,182,176,248,248,120,150,159,159,207,248, 66, 73, 94,249,243,170, 90, 78, 6,112,189,189,
-189,243,228,114, 57,243,245,245,101, 2,129,128,185,187,187,179, 6, 13, 26,176,214,173, 91,179, 55,222,120,131, 13, 25, 50,132,
-125,241,197, 23, 76, 46,151, 51,145, 72,148, 83,254,188,170, 50,195, 1,177, 68, 34, 73,151,201,100,172, 42, 26,141,134,229,231,
-231,179, 19, 39, 78, 48,137, 68,146, 30, 14,136,171,203, 20, 3, 45, 66, 67, 67,243,242,243,243,153,193, 96, 96,233,233,233,236,
-230,205,155,236,238,221,187, 44, 61, 61,157,105, 52,154,138,236,132,132, 4, 22, 16, 16,144, 39, 6, 90, 48,186, 8,162,202, 99,
-233,201,155,159,187,251, 27, 30, 30, 30,154,125,251,246,177, 71,143, 30,177,205,155, 55, 51, 46,176,224,201,199, 85,151, 41, 0,
-186,181,107,215,206, 28, 19, 19,195,174, 93,187,198,166, 79,159,206,186,119,239,206,122,244,232,193,162,162,162, 88, 70, 70, 6,
-203,200,200, 96,111,188,241,134, 89, 0,116,171,233,248,172,236,181, 41, 5,252,122,245,234,165, 49, 24, 12, 44, 57, 57,153, 53,
-105,210, 36,131, 7, 12,149, 0,141, 59, 0,194,154,142, 79,111,192,209,211,211, 51, 43, 38, 38,134,237,223,191,159,249,251,251,
-231,241,128,247,236,129,250,246, 64,125, 30,240, 94,253,250,245,243, 98, 98, 98, 88, 65, 65, 1,243,243,243,203,242, 6, 28,159,
-227, 88,226, 2,216, 56, 35,106, 33,187,151,161, 98, 51,162, 22, 50, 0,233,140, 49,134, 74,250,120, 18, 66,254,253,158,172, 69,
-254, 45, 42,222, 36,123,245,234,197, 1,112,182,186, 7,107,120,188,175, 22, 45, 90,196,215,106,181,216,176, 97, 67,201, 59,253,
-251,239,233,208,190,125,242, 43,254,254,114, 14,151, 91,227,108,195,121, 66,225,228, 69,139, 22, 57,232,245,122,196,198,198,162,
-101,203,150,240,240,240,128,173,173, 45,108,109,109,225,230,230,134,144,144, 16,228,230,230,194,206,206, 14, 83,167, 78,149,230,
- 9,133,147,107,202,181, 88, 24, 31, 0,204, 22,139,192, 26, 24, 27,240,234,171,177,179,103,207,230, 58, 59, 59,195,201,201, 9,
-182,182,182,184,123,247, 46,244,122, 61,108,196, 54,181, 26,164,149,203,229,114,109,109,109,241,235,175,191, 98,210,164, 73,104,
-219,182, 45, 28, 28, 28, 96,103,103,135, 38, 77,154,160, 91,183,110, 24, 51,102, 12,146,147,147,193,169, 69,167,146,219,124,254,
-135, 99,198,140,113, 11, 15, 15,175,244,247, 90,173, 22,114,185, 28,121,121,121,240,241,241,193,128, 1, 3,220,110,243,249, 31,
- 86,149,231, 12,120,248, 4, 7, 31,190,114,229,138,139, 68, 34,193,182,109,219,112,240,224, 65, 28, 63,126, 28, 71,143, 30, 69,
-116,116, 52, 14, 29, 58,132,188,188, 60, 0, 64,112,112, 48,118,239,222,237, 98,235,230, 22,237, 12,120,208, 75,186,118,210,114,
-114, 78, 54,201,206,118, 25, 58,100,200, 5,165, 82,137,161, 67,135,226,171,111,190,249,220, 10,248,184, 54,207, 15, 1,164, 78,
-158,158,155, 22, 46, 92,200,205,206,206,198,219,111,191,157,191,228,155,111,222,143, 59,113, 34, 80,118,252,120,224, 87,115,231,
-190,223,161, 67,135,252,140,140, 12,108,221,186,149,235,238,231,183, 41, 4,144,214,117, 57, 75,128, 73,203,151, 47, 23,105,181,
- 90,188,254,250,235,201,150, 91,183, 66, 76,192, 79, 74,224,238, 89,192, 80,211,243,179,128, 15,167, 78,157,234, 33, 20, 10,241,
-233,167,159,230,171,211,210,154,154,128, 45,197, 64,106, 49,144,106, 2,182,148,164,164, 52, 29, 62,124,120,190, 80, 40,196,178,
-101,203, 60,178,254,152,116,187,182, 90, 2, 56, 12,224, 28,128,204,247,198, 78,122, 47,188, 85, 27,108, 93,191, 26, 95,207,157,
-182, 9,192, 59, 28, 14,103, 59,128, 41,116,228, 17,242,223, 84,155, 90,228,111,170,202, 41,119,248,143, 87,146, 0, 58, 86,151,
-226,232,236,220,178,105,211,166, 56,127,254, 60, 66, 67, 67,175, 56, 56, 56,152,172,133, 66, 88, 89, 89,129, 89,106,172,179, 32,
-150, 72,186,116,237,218,149,255,251,239,191, 35, 32, 32, 0, 98,177, 24, 86, 86, 86,127,186, 89, 91, 91,195,211,211, 19, 10,133,
- 2, 93,186,116,177, 90,185,114,101, 23,232,116,243,106,252,135,152,120,211, 54,239,247,133, 67,126,220,188,169,126,100,100, 36,
-138,139, 21,176, 88, 44,176,177,177,129, 94,175, 7,159,207, 47, 61, 5,100,100,138,218,108, 49,179,217,108,230,241,120, 8, 8,
- 8,192, 87, 95,125, 5,173, 86, 11,107,107,107, 0,128, 66,161,128, 92, 46,199,205,155, 55,145,154,154,138,178, 79,225,213,178,
-147, 74,223, 28, 56,112, 96,165, 19,254,234,116, 58, 20, 23, 23,163,184,184, 24,114,185, 28, 90,173, 22,109,218,180, 17, 28,137,
-142,126, 19, 5, 5, 75, 42,125,142, 72,212,127,235,214,173,110, 2,129, 0, 26,141, 6, 37, 37, 37,120,248,240, 33,210,210,210,
-180,185,185,185, 38, 59, 59, 59,174,191,191, 63, 87, 40, 20, 10,251,246,237,203, 81, 40, 20,224,112, 56,232,213,171,151,243,142,
-109,219, 6, 66,175, 95, 74, 47,233,218, 57, 9,232, 90,232,245,111,189,214,170,213,175, 87,174, 94, 13,159, 60,121, 50,226,227,
-227, 23,218,236,218,117, 78, 13, 92,175,238,185,201,192,135,223, 62, 86,192,176,180,180, 80, 3,144,247,216, 67, 82,253, 83, 82,
-142, 15, 31, 62,252, 70,124,124,188,203,178,101,203, 60,222,121,251,237, 15, 1, 44,168,203, 50,218, 73,165,175,122,122,122,226,
-216,177, 99, 72,127,240, 96,154, 9,208,212,233, 19, 23,143,215, 46, 50, 50, 18,135, 14, 29, 66, 70, 90,218, 52,211,159,151,177,
-244,131, 18,144,199, 79, 78,158,182,105,211,166,141,163, 70,141, 2,143,207,111, 7, 83,157, 78, 28, 62,213,241,125,212,184,201,
-216,180,110,229, 38, 0,163, 1, 88, 0, 92,161, 35,142,144,255,118,171, 86, 77,181,200, 63,168,216, 90, 87,231, 22, 45, 55, 55,
- 55,111, 91, 91, 91,100,102,102,162, 81,195,134,185, 66,161, 16, 2, 43, 43,136, 4,130, 90, 45,129, 90,173, 14,245,242,242, 66,
-113,113, 49, 92, 92, 92, 96,109,109, 93,113, 19, 8, 4, 21,223,219,217,217,129,203,229,194,207,207, 15,106,181, 58,180,198,220,
-156,155,110,187, 86, 78,248, 32,230,220,177,250,111,191,221, 15,142,142, 78,240,245,245,129,155,155, 27,196, 98, 49,124,125,125,
- 17, 24, 24,200,150, 44, 89, 2, 27,183,176, 90,189,145, 63, 94, 60,241,249,124,152,205,102,228,228,228,224,222,189,123,136,143,
-143, 71, 76, 76, 12,174, 93,187,134,146,146, 18,212,162,206,130, 90,163,105,198,231,243, 43, 45,178,228,114, 57,228,114,121, 69,
-161,149,151,151,135,212,212, 84, 40, 85,170,230,213, 20,189,253,154, 54,109,202, 3, 0,177, 88,140,230,205,155, 99,237,218,181,
-166,159, 15, 30, 28,212, 56, 38,198,201,247,196, 9,135, 31,127,248, 97,208,128, 1, 3,204,191,255,254, 59, 20, 10, 5,238,220,
-185, 3, 87, 87, 87,190, 64, 36, 26, 72, 47,231,186,145, 1, 42,151,146,146, 30,109,219,182, 77, 41, 46, 46,198,226,197,139,185,
- 86,118,118,235,230, 86,113,138,175, 2,143, 23, 17, 25, 25,137,195,135, 15, 35, 51, 45,109,122, 90, 37, 5, 76, 26,144,151,158,
-156, 60,125,211,166, 77,232,214,173, 27, 56,124,126,157, 59, 42,181,110,221,186,169,197, 98,193,141, 27, 55,224, 0, 92,174,235,
-243, 3,131,130,194,203, 91,126, 37,192,133,170, 30, 39, 1, 46,196,197,197, 65, 44, 22,163, 81,227,198, 45,234,248,103,150,112,
- 56,156,172, 81,227, 38, 99,255,241, 75, 0,128, 77,235, 86,230, 60, 86,100, 17, 66,168, 69,235,159,218,162, 85, 94, 88, 61,126,
-195,159, 10,173, 90, 22, 31, 0, 0, 43, 43, 43, 8,132, 66, 8, 4,130,210, 2, 73, 40,172,117, 6,135,195,129, 72, 36,170, 40,
-172, 30, 47,176, 30,255,222,198,198,166, 86, 5, 12, 0, 20, 37, 29,111, 63,250,253, 81, 2,161, 80, 8,189, 94, 7,198, 24,132,
- 66, 17, 28, 28, 28, 16, 16, 16, 0,133, 66,129,182, 17, 29,116, 15,229,214,209,206,141,250,198, 63,203,214, 51,153, 76, 80,169,
- 84, 40, 42, 42, 66, 97, 97, 33, 20, 10, 5, 52, 26, 77,173, 47, 69,183, 88, 44,188,135, 15, 31,226,167,159,126, 66, 65, 65, 1,
-128,210,142,214,229,197, 85,249,215,148,148, 20,108,219,182, 13, 15, 30, 60,168,211,254,105,223,190, 61,162,163,163,121, 29,187,
-116, 89,127,202,223, 63,243,148,191,127,102,199, 46, 93,214, 31, 62,124,152,231,237,237,141,212,212, 84,196,198,198,162,168,168,
- 8,140, 49,186,126,254, 25,220, 7,138,212,133,133,163, 62,255,252,115,102,107,107,139,197,223,126,219,108, 1,240,110,109, 11,
- 24,105, 53, 5,140,244,249, 10, 24, 48,198, 96,177, 88, 96, 54,155,159,105,221, 56, 28, 14,199,202,202,170,174, 67, 43,212,229,
-193, 21, 29,223,167,126,241, 21,142, 30,218, 91,254,243, 68, 42,178, 8, 33,255, 2, 85,118,132,231, 63, 86, 65, 86,124,173, 74,
- 78, 78,206, 35,149, 74, 85,223,223,223, 31, 25, 25, 25,110,126,126,126,105, 2, 43, 43, 88, 11, 4,224,112,107,174, 9,108,108,
-108,110,100,102,102, 70,120,123,123,195,100, 50, 85, 20, 85, 79,158, 58, 44,111,165,185,118,237, 26,108,108,108,110, 64, 91,237,
-200, 9, 48,235,139,234,181,104,209,162,162,101,200,193,193, 1, 14, 14, 82, 8,133, 34,204,156, 57,211,178,108,201,146,213,126,
-157,231, 22,143,252,248,115,246,249,130,245, 47,116,203,214,246, 31,147,141,141,205, 13, 95, 95,223, 54, 82,169, 20,251,247,239,
- 71,106,106, 42,138,138,138,160, 86,171,161,211,233,160, 86,171,161,215,235, 33, 18,137,208,184,113, 99,216,219,219,227,244,233,
-211, 55,160,211, 85, 94, 92, 22, 20,236,191,113,227, 70,155, 86,173, 90, 85,180,168,116,234,212,137,211,169, 83, 39,151,138, 86,
- 52,181, 26,249,249,249,184,114,229, 10, 78,159, 62, 13, 14,135,131,196,196, 68,179, 78,163,217, 73,175,137,103,163, 5,126,227,
-109,218,180,113,252,248,241,239, 71, 68, 68,192, 12,188, 1, 96,219, 95, 88,192, 0, 0, 98, 98, 98,110,154,205,230,136, 6, 13,
- 26, 64, 14,188, 6,224, 80,157,138,200,164,164, 56,147,201,212,165, 89,179,102,216,191,103, 79,123, 0,169,149, 61, 78, 5,180,
- 15, 15, 15,135, 70,163,193,157,219,183,101,117, 40,178,214,207,136, 90,248,222,240,209, 31, 98,235,250,213,216,180,110,229,195,
-141,107, 87,248,162, 22,253,199, 8, 33,255,169,214,172, 26,107,145,191,169,177, 85, 21, 95,252,186,164, 20, 23, 21,201,226,226,
-226,234,183,104,209, 2,235,215,175,111,213,182, 77,155, 71,214, 2,129, 73, 96,109, 13,110, 45,254,145,104, 84,170, 95,126,249,
-229,151,215,250,246,237,203,255,253,247,223,225,225,225, 81, 81,104,149,127,229,243,249, 96,140,193,198,198, 6, 7, 14, 28, 48,
-104, 84,170, 95,106,108, 45, 50, 91,204,220,178, 66,143, 49, 6,185, 92, 14,107,107,107, 44, 93,186, 12,171,150, 44, 25, 98, 6,
-246, 6, 75, 92, 63, 3, 32,250,203,254, 65,171,213,191, 30, 61,122,180,229,236,217,179,173,124,124,124, 32,151,203, 81, 84, 84,
-132,130,130, 2, 40, 20, 10, 40, 20, 10, 20, 21, 21, 65, 46,151, 67, 36, 18, 33, 62, 62,222,168, 85,171,127,173, 42, 79,168,213,
-238, 27, 49, 98,196,212,184,184, 56, 79, 62,159, 15,163,209, 8,139,197, 2,139,197, 2,131,193,128,164,164, 36,220,186,117, 11,
-119,239,222, 69, 97, 97, 33,172,172,172,192,227,241,112,237,218,181, 34,137,209,184, 71, 79,175,233,103,102, 5,236,191,120,241,
-226,251,195,134, 13,131,151,143, 79, 7,100,100,212,170,128, 57, 88, 77, 1, 83,252,108, 5,204, 31, 5, 80, 73,201,213,148,148,
-148,136,142, 29, 59,194,211,199,103, 97,227,140,140, 83,183,235,208, 79,203,108, 50, 93,184,120,241, 98,151,225,195,135, 99,253,
-250,245, 11, 93, 83, 82,142,231, 61,113,154,211, 21,112,125, 37, 48,112,225,123,239,189,135,147, 39, 79,194,108, 50, 93,168, 38,
-242,241, 17,223,235,189, 55,118,146,239, 19, 29,223,215,114, 56,156,137, 0, 22,211, 17, 69, 8,249, 55,183,104,213,233,212,161,
-216,108,158, 49,101,202, 20, 35,151,203, 69,191,126,253,236, 14, 29, 62, 60,224,218,245,235, 1,185,185,185, 14,102,179,185,198,
- 44, 87,157,110,197,148, 41, 83,228,122,189, 30, 33, 33, 33, 40, 44, 44,132,217,108, 6,159,207, 7,159,207, 7,135,195, 1,151,
-203,133,173,173, 45,226,226,226,176,113,227, 70,133,171, 78,183,162,198,127, 18,102,243,141,109,219,182,129,199,227, 49,145, 72,
- 4, 14,135, 3, 62,159,143,101,203,150,229,174, 2,246, 3, 0,143,203,213, 3, 0,151,203,169,109,239,221, 26,207, 91, 10, 4,
- 2, 88, 74, 47, 2,168,241,177,142, 58,221,242, 69,139, 22,149,220,185,115, 7, 42,149,170,162,245, 77,169, 84, 86,116,174,151,
-203,229,224,112, 56, 80,169, 84, 56,124,248,112,137,163, 78,183,188,170,188, 2, 32, 59, 35, 49,177,119,171, 86,173, 10, 82, 82,
- 82, 80, 92, 92,140, 27, 55,110,224,244,233,211,216,189,123, 55, 78,158, 60,137,164,164, 36,152, 76, 38,120,123,123,131, 49,134,
-131, 7, 15, 22,155, 74, 74,222, 40, 0,178,233, 53, 81,181,122, 30, 30, 93,220,221,220,210, 93, 93, 92, 50,234,121,120,116,121,
-242,247, 82, 32, 33, 33, 33, 1, 38,147, 9, 1, 1, 1, 78,213,245,211, 98, 38,211,197,139, 23, 47, 98,248,240,225,240,173, 95,
-255, 27,127,192,245,201,199,248, 3,174,254,129,129,223,148, 23, 48,204,100,186, 88,215,101,182, 3, 86,126,246,217,103, 26,107,
-107,107,236,218,181, 43,192, 24, 20,116,151, 15,188,107, 11, 52,236, 8, 88,215,244,124, 79, 96,245, 23, 95,124,145,205,225,112,
-176,125,251,118, 23,105, 96,224, 77, 62, 48, 66, 10,212,147, 2,245,248,192, 8,105, 96,224,205, 93,187,118,185,152, 76, 38,124,
-252,241,199,217,158,192,234,106, 34, 39, 49,198,222, 98,140, 69, 50,198,124, 55,174, 93,129,163,135,246,150, 23, 89,163, 81,218,
-233,125, 24,128,155,116,196, 17, 66,254,205, 42,109,134,226,183,154,159, 3, 48,183, 14,173,195,112,245,250,189, 98, 23, 71,251,
- 19,229,191, 43,188,181,183, 65,231, 80,251,176, 53,107,214,192,202,202, 10, 15, 31, 62,196,237,219,183, 97,111,111,143, 33, 67,
-134,232, 52, 37, 37,189, 31,155,235,176, 43,128,211,101,153,165,243,169, 21, 39,218, 6,242,227,235, 31, 63, 26,205,147, 74,165,
- 80, 42,149,224,114,185, 16,137, 68,176,177,177,129, 88, 44, 70,108,108, 44,122,190,213,199,156,103, 19,249,199,128,165,127,204,
-167, 86,145, 89, 62,214,208,107,128, 77, 28,240,169,155,151,215,148, 89,179,102,137,187,119,239, 14,107,107,107,248,212, 11,206,
- 14,232,177,120, 37,151,203, 49,101, 20, 40,102, 6,214,243,146,222, 78, 76, 5,192,201, 53, 94,153,229,245,216, 92,135, 79, 45,
-167,159,254, 92,192,129, 45, 75,236,155, 55, 47,237,143, 46,151,203,145,147,147,131,220,220, 92,200,229,114,168, 84, 42, 0, 64,
-116,116, 52,142,158,191,171,208,248, 12, 72,174,106, 57,255, 88,247,123,118, 94,134,203,175,236,216,182,133,231,234,234,138,156,
-156, 28,228,229,229, 65, 46,151, 67,163,209,192,108, 54,163,176,176, 16, 27, 54,109, 49, 23,216, 70, 62,168, 24, 16,178,186, 76,
-213, 67,177,147,242,146,119,120, 99,127,246,254,251,239,219,217,219,219,195, 98,177,160,168,168, 8,233,233,233, 72, 73, 73,193,
-249,243,231, 85,185,114, 61, 84, 46,175,103, 84, 12, 88, 90, 73,230, 11,244,143,203,124,124,220, 42, 47, 79,207,204,180,180, 52,
- 55,179,217, 12,111,111,111,147,188,176,240, 27, 1,112,210, 14,200,250,127,246,174, 59, 44,138,107,125,191, 51, 59,219,119, 89,
-250,210, 81, 68, 64,186, 34,150, 24, 75, 20,236,216, 75, 52, 26, 77,108, 49, 49,177,196, 36, 26, 19, 91,212, 24, 99,162,166, 89,
-163,198,146,216,176, 4, 59,138, 98,185, 54,176,208, 65, 4, 1, 41, 75,221, 93,182,183,249,253, 33,112,209, 0,187,152,228,222,
- 27,127,251, 62,207, 62, 44,187,179,239,156,115,230,204,153,247,124,231, 59,223, 7,128,174, 0, 62,219,248,221,119,111,143, 24,
- 49, 2, 93,186,116, 41, 44, 45, 43,243,105,170, 47,209, 0,163, 3, 96,171,244,244, 76,189,117,235,150,107, 65, 65, 1,222,124,
-243,205,138,199, 15, 31, 46,170,247,215,146, 2,189,218,180,111,191,246,192,129, 3, 78,237,218,181, 67, 88, 88, 88, 41,183,160,
- 32, 36, 19,144, 54,211, 63,155,189, 55,107,178, 78,250,204, 30, 21,218,229,221,119,223,133,193, 96, 64, 98, 98, 34,110,222,188,
-137,199,143, 31,227,218,181,107, 53, 34,129,224,245, 70,185, 14,155,236,159,131,253, 21,190,251,246,237, 37, 88, 44, 22,118,237,
-218,133,228,228,100, 0, 64, 68, 68, 4,222,122,235, 45, 24, 12, 6, 76,154, 52,153, 62,153,201,203,109,169,127, 2, 8, 5,176,
- 30, 79, 69, 94, 23,154,166,185, 4, 65, 20, 3,240, 66,235,124,178,172,253,211,202,105,229,252,255,195,249, 82,194,108,174,195,
- 85,155, 97,251,108,154,143, 25,197,135,183,174,160,122,246,234, 29,184, 98,249, 50,178,107,215,174,240,242,242, 66, 68, 68, 4,
- 10, 10, 10, 56,118,118,118,230,242,169,213,246, 30, 52,241, 81,120,120,184,221,162, 69,139,108, 7, 12, 24,192,244,242,242, 2,
- 77,211, 72, 78, 78, 70,108,108,172,110,199,142, 29, 50,165,203,176,154,164,132, 95,107, 45,201,167,118, 19, 80, 2, 88,233, 89,
- 92,188,237,189,217,179,151,117,234,220,121,218,242,229,203, 73, 33,159,199, 92,179,100, 58, 23, 0, 86,253,112,208,118,196,216,
- 55,176,209,237,243,221,133, 0, 0, 32, 0, 73, 68, 65, 84, 15,232, 51,177,233, 60,114,141,203, 89, 80, 52,227,241,144, 81, 81,
-126, 31,206,121,219, 56,126,252,120,129, 72, 36,130,151,151, 23,236,237,237,145,155,155,139,162,162, 34,250,247,223,127,175,253,
-215,221, 44,230,177,115,183, 31,115,109,221, 44,201, 75, 40,239, 61,112, 92,222,144, 33, 67,236,167, 76,153, 98, 19, 25, 25,201,
-228,112, 56,224,112, 56, 40, 43, 43, 67, 78, 78,142,238,247,223,127,175, 85,138, 7, 87, 39, 37, 28,144, 91,152,235, 80,213,123,
-194,138,156, 43,231,151,207, 79,125,240, 96,178, 9,232,168,211,233, 60,140, 70, 35, 65,146,100,137,201,100,122,160,147,203,119,
-106, 34,150,111,176,230, 58,180, 12, 70,163,145,101, 52, 26, 81, 83, 83,131,243,231,207, 83, 15, 31, 62,252,236,222,189,123,159,
- 21, 23, 23, 67,175,215, 99,204,152, 49,136,136,136, 64, 66, 66, 2,202,203,202,126,111,137, 43, 19,144,114,138,138,222,154, 49,
- 99,198,233,189,123,247,146,247,238,221,115,218,181,107,215,207, 77, 9,152,201,147, 39,155,202, 10, 10,222,210, 0,210, 22,250,
-103, 75,247,102,197,153, 3,223,223, 27, 57,122,108,240,242,165,159, 49,123,244,232, 1, 39, 39, 39,244,234,213, 11, 58,157,206,
- 46, 40, 40,200,220,189, 41,239, 61,232,245,220,142, 29, 59, 10, 54,108,216,224,250,246,219,111, 99,206,156, 57, 0, 0,149, 74,
-133,115,231,206, 97,254,252,249,165, 5, 84, 55,133,185,254, 89,103,169,170, 23, 96,151, 1,244, 6,144, 11,171,227,187, 21, 86,
- 88,241,114,162, 62,169,180, 27,158, 38,150, 62,137,167,147,115,243,185, 14,175,220, 76, 65,227, 52, 31, 79,225,150,102,240,158,
-242,112,214,194,181, 97, 12,189,204,158, 73,168, 69,217, 89, 89,132,185,156,135, 13,249,212,108,253,107, 29, 31,253,214,117,205,
-170, 85,115, 55,110,220, 24, 85, 31,194,129,207,231, 63, 80, 41, 20, 23,156, 53,154, 77, 74, 91,255, 11,173,205,205, 87, 4,148,
- 1,152,109,159,148,244, 93,204,136, 49,235,184, 14,190,204, 79, 87,239, 80, 51, 72, 82,155, 83, 92,142,141,126,128,192,130, 13,
-146, 74, 45,144, 90,227,102, 40,115, 28,155,249,249, 71, 31,125,184,106,229,202,174, 66,161,176,143,206, 96,240, 55,153, 76,128,
-201,148,173, 84, 40, 46,211, 58,221, 45, 77,196,210,111,184,182,110,180,197,121, 9,237,130,228, 14,121,135,187,238,222,185,243,
-131, 67,135, 14,253,161,238,142, 26,205,119, 74,187,160,120, 75,234,222,248, 24, 53,112, 29, 18,201,245,150, 76,151,214, 92,135,
- 22,206, 62, 76,166,153,246,246,246,123,162,162,162,184,209,209,209, 24, 58,116, 40,122,244,232, 1,147,201, 4,154,166, 33,151,
-203,113,240,224, 65,172, 91,183, 46,219, 7, 88,105,142, 79, 3, 92,224,156, 58, 53,184, 99,199,142,187, 90, 18, 48,117, 34,203,
-172, 79, 98,203,247, 38, 39,219, 96, 59, 60,127,194,123,107,252,180,178, 18, 59, 71,190,193, 53, 53,229, 1,105,249,189,217, 65,
-110, 76, 62,216,109,204,168, 81,239, 49, 40,170, 87,221, 14, 72, 58, 61, 45, 45,169, 62,169, 52, 34,222, 58,223,202,190, 84, 31,
-187,206,234,248,110,133, 21, 86,188,236, 66,107, 40,158,250,107, 53,164,228,105, 54,215, 97,189,213,135,162, 40, 73,238,177, 89,
-111,180,196,206, 4,162,234, 44, 89, 48,155,235,176,238,125, 62, 32,135, 70,243,197, 51,193, 72, 27,237, 46,100, 62,119,124,107,
-194, 34, 86, 3,153, 48,104, 98, 32, 73, 3, 78,204,126,202,215,117,213, 39,141,235,212,236, 67,246,153,243,178,170,212,192, 21,
-212,214, 94, 65,109,109,147, 78,187, 76,138, 85,101,174,156,207,215,189, 0,144,253,217,186, 63,207,105, 86, 60,252,137,246,252,
-255,134, 39, 21, 21,199, 0, 8, 61,227,226, 92,206,196,197,141,255,112,193,130, 49,110,238,238,237,157,156,156,236,109,108,108,
-200, 27, 55,110, 60, 50,168,213,223,117, 2,118,215, 89, 83,205, 66, 3, 92,232, 80, 80, 16, 50,110,212,168,247, 8,138,234,217,
- 88,192,208, 6,195, 53, 95,224,199,150, 44, 89, 47,122,111,122,113,220,162,234, 44, 89, 96, 0, 51, 44,233, 27, 69, 79,203,177,
- 26, 6,195,106,220,191,223, 68,159,111,117, 95, 90, 69, 16,132, 28, 86,199,119, 43,172,176,226,229, 69,125,190,195,147,255,233,
- 19, 71, 91, 57,173,156, 47, 17, 39, 3, 79,119,209, 89,219,211,202,105,229,180,114, 90, 57,173,176, 8,148,181, 9,172,176,194,
- 98, 24,241,239,101, 48, 43,172,176,194, 10, 43,172,168, 71,189,111, 86, 99,108, 3,158,186,238, 52,167, 74, 91,179,155,224, 69,
-148,109,188,149,211,202,105,229,180,114, 90, 57,255, 43,156,124,252,113,217,219,218,158, 86,206,255, 20,167, 57,238,127,226,110,
-198,122,159,172, 6,223,172,255, 20,172,102, 85, 43,167,149,211,202,105,229,180,114, 90, 57,173,156, 47, 59,220,234, 68, 86,227,
- 23,128, 86, 6, 44,181,194, 10, 43,172,120, 89,177,124, 57, 72,154, 6, 65,211,203, 73,154, 62,196,160,233,177, 12,154,198,159,
- 74, 5, 50,118,108,211,193,108,223,127,195,222,198,218,226, 86, 88,241, 82,161, 4,205, 36,149,182,250,104,253,119,225,237,234,
-234,186, 21, 0, 81, 90, 90, 58, 19, 64,129,181, 73,254,247,224,224,224, 16,101, 48, 24, 32,147,201, 46,188,140,245, 11,110,143,
- 81, 52,137,160,134, 15,104, 20,164,231, 96, 79, 83,199, 6,249,225, 77, 16,255,142,197, 69,152,144,158,246, 16, 71, 91,113, 58,
-114,112,180,215,143, 0,112, 58,190,240, 61,252, 61,113,181, 2,156,157,157,207, 82, 20, 69, 25,141,198,217, 18,137, 36,174,121,
- 33, 52,150, 1, 0, 76, 58, 97,113, 77,169,120,209,188,119, 8,166, 82,179,179, 70,163, 82, 72, 25, 76, 70, 30,135,233,122,117,
-214,219,228,233,234,218, 87,210,154,250,253,225,195,135,155,205,226, 29,226,135,193,164, 49,120, 88, 68,232,163,220,245,155,186,
-110,236,227,235,196,124, 84,120, 87,248,213, 22,233, 86,182, 93,155, 97,111,142, 39,226, 40, 62, 49,121,231,206,202,218,151,245,
-222, 89, 3,144,122, 38,179, 3, 97, 50,249,130, 32,248, 4, 0,218,100, 50, 17, 36,249,136,107, 48,100, 45, 4,106, 95,128,211,
- 65, 7,132, 49, 57, 28, 47,163,193,224, 66, 0, 52,131,162,202,244, 26, 77, 33, 11,184,191, 24,168,121,217, 57, 89, 28,142,167,
-209, 96,112, 1,128,255,197,114, 90,241, 44,154, 21, 90, 66,161,240, 14, 73,146,158,141,147,225,214,231, 19,172,255,172,241,119,
- 4, 65,192,104, 52, 22, 85, 87, 87, 71,182,226,252, 34, 0,227, 1,212,111, 81,223, 15,224, 32, 94,220,225, 88,196, 98,177, 22,
- 10, 4,130,126, 42,149, 42, 4, 0,120, 60, 94,170, 66,161,184,168,211,233,214,191, 32, 47, 5, 96,156, 80, 40,236, 75,146,100,
- 95,154,166, 9,154,166, 19,106,107,107, 47, 2, 56, 4,224, 69, 34, 37,240,196, 98,241,106, 7, 7,135,137,139, 23, 47,174,116,
-116,116,236, 48,127,254,252,219, 85, 85, 85,191, 86, 84, 84, 44, 65, 43,114,212,253,205,104,239,234,234,186,159,201,100, 50, 10,
- 11, 11,251, 2,128,151,151, 87,130, 86,171, 53, 74, 36,146, 55, 0, 60,108, 37,159, 0, 64,119,161, 80, 24, 41, 20, 10,123, 27,
-141,198,160,186,252,140,233,181,181,181,137, 58,157,238, 14,128, 27, 0, 20,255, 67,247,136, 13, 69, 81,123,235,250,186, 63, 0,
-249,203, 54, 8,208, 36,130,210, 82, 51, 58, 52, 8,175,144,192,230, 15, 38,224,221,196,177, 22, 11,173,126,125,220,134, 13, 31,
-222,159, 4, 0,173,254,244,176,139,151, 75,142,255,197,213, 9, 24, 61,122,244,245,189,123,247,218,107, 52, 26,204,156, 57,115,
-127,124,124,252,143, 50,153,108,113,139, 3,135,208,126,254,215, 27,206,241, 9,130, 4, 0,177,201,100, 20, 63,121,242,208, 63,
- 45,229,250,160,212,212,127,173, 81,101, 92,188, 97, 34,152,179,116,232,149, 97, 73, 33,130,124, 17, 51,108,204,168,161, 43, 87,
- 46,199,196,215, 39,182, 77, 77, 85,243, 60, 68,185,236, 42,149,192,207,209, 89, 60,124,229,170,195,196,213, 43,199,134,239,221,
-181,226,226,219,111, 59,246,123, 9,197, 22,177,140,205,246,214, 27,141,131, 72,160,132,178,177,201, 5,139,165, 4, 0,210,104,
-100,104,101,178,246, 74,138,154,244, 5,112,235,115,131,225,174,165,156,171, 40,170,187,173,159, 95,239,215,143, 29,131,208,203,
-139,162, 56, 28, 18, 0, 12, 26,141, 87,109, 97,161,219,129,225,195,187, 45,207,202,186,180, 28,184,105,229,252,175,112, 90,209,
- 26,161, 69,146,164,231,147, 39, 79,196, 2,129,224,233, 96, 76,211, 48, 26,141, 48, 26,141, 13,201,139,105,154,110,248,107, 48,
- 24, 16, 24, 24,104,209,140, 22, 64, 63, 0, 83, 95,123,237,181,177,235,215,175,103,134,133,133,213,167, 12,233,245,233,167,159,
-254,144,156,156,124, 4,192,110, 60, 13,222,104,233,140,119,160, 64, 32,216,247,245,215, 95,139,250,247,239, 79,185,187,187,131,
- 32, 8,148,150,150,118,143,143,143,143,156, 63,127,254,108,133, 66, 49, 9,192,217, 86,180, 79,168,141,141,205,225, 81,163, 70,
-121,246,233,211,135, 27, 28, 28, 12,163,209,136,187,119,239,190,125,231,206,157, 9, 71,142, 28, 89, 38,151,203,199,194,242,124,
-109,132, 80, 40,156, 34, 18,137, 86, 47, 93,186,212, 97,210,164, 73,236,148,148,148,106, 95, 95, 95,226,234,213,171,206, 7, 15,
- 30,156,189,118,237,218,113, 50,153,108, 73,109,109,237, 47,176, 32,135,162,141,141,205, 29,146, 36, 61, 45, 17,194, 0, 90, 35,
-134, 59,249,248,248, 28,188,114,229,138, 79,126,126,190,113,228,200,145,123, 0,224,226,197,139, 97,122,189,158, 24, 48, 96,192,
-233,162,162,162,241, 0, 44, 29, 36,195, 29, 28, 28,142, 79,156, 56,209,161,125,251,246,124, 31, 31, 31, 66, 32, 16,128,193, 96,
- 64, 42,149,186,167,164,164, 68,223,188,121, 83, 21, 31, 31, 95,165,209,104,134, 3,184,223,138,235,212, 67, 44, 22, 79,102, 50,
-153,161, 6,131,193, 3, 0, 40,138,122,162,215,235, 83, 36, 18,201, 94, 0,215, 95,244, 6,113,113,113,249,126,245,234,213, 78,
- 18,137,132, 94,187,118,237,247,114,185,124,202,203, 58, 24,236,255,245, 16,238,220,190, 9, 60, 77,155, 67, 52,209,255, 8, 0,
-172,121,243, 22, 32,178, 75, 55,188, 49,113,156, 89,206, 33, 81,158, 95, 51,217, 44, 71,181, 90,125, 93,170,212, 28, 18,240,185,
-227, 39, 78,136,201, 6,128,211,103, 46,141,239,218,213, 62,193,150,207, 25,199,229,114,123,232,181,186,202, 83, 23,138, 62,106,
-141,168,242,240,240, 56,107,111,111,207,175,170,170, 42, 45, 47, 47,223, 60,108,216,176, 85,187,119,239,182,127,244,232, 17, 10,
- 11, 11, 49,119,238, 92, 97, 81, 81,209,123,247,239,223,255,151, 86,171,109,214,178, 37,151, 87,109,250,116,209,136,165,182,182,
- 78, 12, 1, 95, 4, 27, 91, 7,248,182,239,136,238, 61,134, 97,240,208,105,200,201, 78,238,190,123,215,202,228, 39, 79,226,191,
- 20, 58,180, 91, 85, 83,227,211,236,184, 20, 28,128, 62,195, 71, 61, 21, 89, 75,151, 46, 71, 86, 70,134, 60, 63,143,124,255,228,
- 49,138, 63, 56, 42,144, 99,208,150,230, 95,189,114,204,167,103,175,145, 0, 16,185,119,215,138,139,239,191, 97, 31,245,253,254,
-234,151, 69,196, 19, 43,153,204, 80, 24, 12, 1,142,110,110, 7,212, 38, 19,173,151, 74,189, 76, 74,165, 27, 0, 24,152, 76,173,
- 64, 40,124,224,238,231,151,152,149,148,212,251, 11,138,234,245,121,203, 9,202,235, 57,167, 12,220,176, 65, 28, 49,123, 54,171,
- 54, 47, 79,151,187,101,139,178, 44, 49,209, 72,113, 56,180,215,160, 65,132,115,223,190,220,217,233,233,172,107,107,215,246,102,
-174, 88,225,187, 68,167,219,103,229,252,143,114,254,127, 71,189, 19,124,227,221,135,219, 90, 20, 90, 4, 65, 64, 32, 16,224,192,
-129, 3, 96, 50,153,160, 40, 10, 76, 38,179,217,247,222,222,222,150, 20,100,180,171,171,235, 15, 63,254,248,163,203,192,129, 3,
-193,229,114, 27,190, 96, 48, 24,232,223,191, 63,162,163,163,153,197,197,197, 19, 14, 28, 56, 48, 97,205,154, 53,101, 53, 53, 53,
-115, 80,151, 24,186, 5,244,237,208,161, 67,236,185,115,231,120,106,181, 26,137,137,137,168,174,174, 6,155,205,134,167,167, 39,
- 6, 12, 24, 64,101,100,100, 56,244,239,223, 63, 54, 43, 43, 43, 6, 64,130, 5,101,141, 20,139,197,151, 15, 29, 58,196,237,216,
-177, 35,145,147,147,131,136,136, 8, 0,128, 84, 42,197,200,145, 35,185,147, 38, 77,106, 63, 97,194,132, 27, 18,137,164, 15,128,
- 59,102,248, 58,187,186,186,254, 50,106,212, 40,247, 53,107,214,136,108,108,108,144,159,159, 95,226,234,234,234, 95,223,222, 19,
- 38, 76, 96, 15, 27, 54,204,109,221,186,117,155, 14, 31, 62,252,145, 68, 34,153, 2, 32,169, 69,213, 90, 39,136,249,124, 62,202,
-202,202,176,127,255,126,188,247,222,123, 96, 48, 24,144, 72, 36, 56,120,240, 32,222,127,255,253,122, 65, 99,145, 24,230,243,249,
-209,126,126,126, 63, 95,188,120,209,211,206,206, 14,238,238,238,228,231,159,127, 30,234,235,235,203,107,219,182, 45,163,164,164,
- 4,177,177,177,190,147, 39, 79, 62, 94, 80, 80,240,182, 70,163, 49,187,164,230,226,226,178,243,228,201,147,222,169,169,169,216,
-178,101, 11,170,170,170,192,102,179, 97,103,103, 7, 87, 87, 87,248,251,251, 19,139, 22, 45,226, 15, 27, 54,140, 63,103,206,156,
-157, 90,173,182,147, 5,215,168,163, 88, 44,222,218,183,111, 95,223, 21, 43, 86,216,185,186,186,162,126, 98, 32,149, 74, 61,243,
-243,243,187, 47, 93,186,116,236,157, 59,119, 30, 73, 36,146, 89, 0,238,181,242,198,233, 20, 28, 28, 28, 51,114,228, 72, 70, 73,
- 73, 9,246,238,221, 27, 35,151,203, 59,181, 66, 92,254,163,112,231,246, 77,204,124,119,110,173,187,151, 23,235,220,217,159, 71,
- 31, 62, 26,112,219,142,247, 52, 33,117,141, 10,186,177,163,178,186, 12, 24, 56,141, 53,100,232,200,218,109, 63,109, 18, 90, 34,
-180,152,108,150,227,254,125,223, 22, 92,185,122, 39,244,124,252,205, 65,163,135, 15,167, 89, 44, 59, 95, 0,248,104,254, 60,102,
-236,137, 19,187,250, 71,119, 43,238,213, 51,178,224,141, 73, 11,188, 91, 81,220,128,128,128,128, 75,201,201,201, 46, 28, 14, 7,
- 85, 85, 85,142,219,182,109,251,182,103,207,158,100,110,110, 46, 50, 50, 50,144,151,151, 7,169, 84,138,254,253,251, 11,147,146,
-146, 54, 3,104, 86,104,233,200,126,171,221,219,234,191,115,228, 9,124,116, 70,153,152,214,151, 4,159, 63,121, 62,252,183,189,
-170, 8, 23,183, 64,255,169,111, 45,195,202, 85, 71,152,191,238,255,106,233,133,248,223, 0,210,167,249,140, 0, 52,122,124,186,
-100, 49,100,114, 13, 38, 77,156,129,201, 19,103, 56,210,208,186,209, 70,181, 64,171,170,182,179, 97,165,199,253,184,227,219, 81,
- 0, 60, 27,137,173, 11, 47,139,216, 90,201, 98,249,192,100,242,245, 31, 57,242, 88,238,153, 51,237,104,157,206,137,193,102, 23,
-217, 56, 56,148, 25, 52, 26, 90,175,211,177, 84, 42,149, 71,110,106,170, 91,207, 69,139, 46, 92, 93,187,182,207, 23, 12, 70,151,
-207,141,198,219,205,114, 82, 84,183,152, 31,126,112, 14,157, 62,157,115,111,197, 10, 69, 69, 98,162,202,111,200,144,234,136,119,
-222,209, 0,128, 60, 47,143,149,181,108, 25,223,185,119,111,222, 43, 11, 23,218, 27,181, 90,215,149, 43, 87,118, 93,250, 52,121,
-121,171, 56,189,199,143, 55, 46,221,181,171, 75,226,130, 5,175, 17,122, 61, 99,208, 43,175,220, 93,187,119,239,147, 63,195,249,
- 87,150,179,248,242,101, 77,149,175, 47, 34, 70,142,172,244, 22,139, 53,127,101,221,255, 76, 57,173,104, 64,189,175,214,204,198,
- 51, 84,196,197,197,245, 1,112, 9,192,138,152,152,152,229, 0, 96,107,107, 91, 86, 83, 83, 35,142,141,141, 53, 43,178,152, 76,
- 38,220,220,220,224,239,239, 47,145, 72, 36, 46, 45, 20,160,208,100, 50,121,210, 52,221, 96,125,105, 14, 26,141, 6,217,217,217,
- 8, 15, 15, 47,194,211, 68,180,205, 26,117,248,124,126,110, 70, 70,134, 83, 90, 90, 26,238,220,185, 3, 95, 95, 95,216,219,219,
-131,201,100, 66,175,215, 67, 38,147,161, 67,135, 14,224,112, 56,232,220,185,115,133, 66,161,240, 53,179, 4,196, 17, 8, 4,217,
-151, 47, 95,246,138,136,136,192,173, 91,183,224,229,229, 5, 87, 87, 87, 0, 64, 94, 94, 30,174, 94,189,138, 33, 67,134, 32, 57,
- 57, 25, 99,198,140, 41, 84, 40, 20,254, 0, 52,205, 17, 58, 56, 56,148, 92,188,120,177, 40, 44, 44, 76,173, 80, 40,200,178,178,
- 50,102, 98, 98,162, 65, 46,151, 11,165, 82, 41,179,166,166,134, 41,147,201, 40,133, 66,193, 36, 73,146,165, 82,169,152, 23, 46,
- 92, 96,232,116,186, 22, 3,100,214, 95,167, 19, 39, 78, 32, 44, 44, 12,177,177,177,248,240,195, 15,113,237,218, 53,120,121,121,
-225,208,161, 67, 88,184,112, 33, 50, 51, 51,225,228,228,132,224,224, 96,115,215, 8,237,219,183,207,121,240,224, 65,123, 22,139,
- 85,159,215,177, 62, 95, 30,202,203,203,241,240,225, 67, 60,121,242, 4,126,126,126,152, 56,113,226,195, 39, 79,158,248,153,235,
-121, 30, 30, 30,229,169,169,169, 78,225,225,225, 40, 43, 43,131,157,157, 29,108,109,109, 97,103,103,215,240,222,215,215, 23, 11,
- 22, 44,128,171,171,171, 68,173, 86,187,152, 19, 65, 97, 97, 97,103, 47, 92,184,224, 36, 18,137, 80, 90, 90, 10,153, 76, 6,138,
-162,192,231,243,225,228,228,212, 32,228,179,179,179, 49,116,232,208,138,220,220,220,129,173, 16, 73,164,139,139, 75,198,253,251,
-247,253,105,154, 70, 65, 65, 1, 50, 51, 51,241,238,187,239,102,171,213,234, 64,188, 68, 57,251, 26,249, 93,177,166,188, 53,147,
- 53,106, 68, 15,109,122,106, 28,193, 49,101,162, 83,168, 72, 10, 0,119, 83,100,182, 26,178, 3,130, 66, 98,232,163,199,175,179,
-127,217,189,141, 9, 19, 92, 64, 32, 51, 61, 27, 95, 52,199, 61,160,175,219,244,121,243,222, 14,125,173,103, 31, 82,174, 80,136,
- 55,111,222,208, 57, 55, 55, 93, 12, 0,190,190, 65,146,217,179,231, 39,217, 8, 4,146, 75, 87, 47,155, 54,110,220,153,114, 46,
-161,100,135, 5, 69,246,245,247,247,255,215,137, 19, 39,156,196, 98, 49,108,109,109,161, 80, 40,160,211,233,144,150,150,166, 62,
-112,224,128, 94, 36, 18,217,148,150,150,162,166,166, 6, 4, 65,224,196,137, 19, 5, 0,218, 60, 79, 84,239,163, 5, 0,239, 14,
- 14, 98, 6,247,243,183,103,113, 12, 60, 30, 51,203, 13,132,145, 67,208, 66,151,211,103,239,134,159, 62,127,235,141, 81,163, 63,
-116,238,213,103, 20,150,126, 54, 86, 95, 92, 92, 16,161, 67,175,140,166,124,180, 2,253,208,111,228,152, 81,227, 86,174, 92,142,
-229, 75, 87, 32,238,196, 49,169, 80, 64,106, 68,118, 76,219,222,221, 95, 85, 47,120,111, 68, 97,109,109,177,215,202,117, 7, 38,
- 14, 29,177,192,179,103,175,145,184,122,229, 24,246,238, 90,113,135,224,209,255,232,101,196,101, 0,139,164,168,105,238, 62, 62,
-251, 36,197,197, 30,124,161,144, 57, 55, 62, 94,108, 52, 26,111,143, 91,184, 80,126,244,194,133, 6, 43,233,231, 36,233,206, 96,
- 48,220,253,135, 14,189,159, 19, 23, 55,141, 99, 48,196,126, 2,148, 63,207,185, 28,176,183,243,245,157,245, 65,118, 54,235,222,
-242,229,181,134,226,226,234,200,249,243, 43,154, 58,127,209,249,243, 2,182,187,187,200,126,248,112,135, 77,109,218,208,122,137,
-100,107, 83, 62, 70, 77,113,198, 11,133,118,191,157, 62, 29, 69, 51,153,125, 62,254,228, 19, 94, 76, 76, 12,100, 50, 25,142, 28,
- 57,130,173, 91,182,104,220,220,220, 30,184,167,164, 36,135,202,100,159, 89,202, 25, 57,127,126,133,209,104, 36,198, 45, 92,216,
- 63, 53, 47,175, 95,169, 68,210, 22, 0,220, 28, 28, 10, 35,125,125,239,236,140,139,203,252,222,199,199,100,105, 57,183,159, 57,
-227,114, 56, 63,127,186,131,131, 3,175, 76, 34,161, 56,108,118,101,247,224,224, 67, 63, 45, 89,114,201,112,255, 62,139,235,233,
- 41,178,141,137,105,117,221, 35,231,207,175,168,146,203,169, 15, 86,173,122,245,113, 89, 89,219, 90,141,198,175, 70, 46,119, 53,
-234,245,164,136,207,175,108,215,161,131, 68,149,152, 88,210, 78,169,156,187, 3,144,252, 93,253,167, 41, 45,242, 15,194,243,113,
-180,254,144,235,240, 82, 76, 76,204, 31,118,215,208, 52,109,145, 53,139,201,100, 62,179, 76,213, 2, 88, 4, 65, 32, 41, 41, 9,
-142,142,142,112,117,117, 5,135,243,108,242,193,242,242,114, 92,187,118, 13,233,233,233,232,216,177, 99,253, 50, 70,243,138,136,
-195,153,183,110,221, 58, 59,173, 86,139, 59,119,238, 32, 50, 50, 18, 28, 14, 7, 44, 22,235, 25, 17, 40,145, 72, 16, 18, 18,130,
-143, 63,254,216,118,205,154, 53,243, 52, 26, 77,179, 51, 82,138,162,230,204,152, 49, 67, 92,111,193, 42, 44, 44, 68,231,206,157,
- 27,190,119,118,118,198,221,187,119, 17, 25, 25, 9, 79, 79, 79,140, 29, 59, 86,188,119,239,222, 57, 6,131, 97,125,115,156,108,
- 54,155, 12, 11, 11,235, 2, 0, 2,129, 0, 36, 73,102,137, 68, 34,103, 23, 23, 23,129, 72, 36,250, 67, 29,119,237,218, 85, 67,
-146,164,222,172, 26, 32, 73,148,150,150, 34, 52, 52, 20, 82,233,211, 12, 46, 10,133, 2,126,126,126,144,201,100, 13,162,213,221,
-221, 29, 42, 85,203,174, 95,225,225,225,203, 3, 3, 3, 7, 8, 4, 2, 14,147,201,196,189,123,247, 16, 17, 17,129, 3, 7, 14,
-192,219,219, 27,124, 62, 31,217,217,217, 8, 11, 11,195,229,203,151,225,236,236,140,144,144, 16,142, 88, 44,190, 82, 85, 85,149,
-240,248,241,227,229, 45,148,147, 20, 10,133,184,124,249, 50,118,238,220,137,188,188, 60, 20, 23, 23,195,198,198, 6,157, 58,117,
- 66,112,112, 48,122,244,232,129,236,236,108, 16,230, 59,147,171,191,191,127,220,173, 91,183,156,104,154,198,222,189,123, 81, 91,
- 91, 11,173, 86, 11,146, 36,193,229,114, 97,111,111,143,126,253,250,193,217,217, 25,254,254,254, 56,120,240,160,211,224,193,131,
- 79, 73, 36,146, 78, 0, 74,205,181,171,189,189,253,220,101,203,150,121,137,197, 98,228,231,231, 67, 42,149,194,197,197, 5,175,
-189,246,154, 71,124,124,252, 92,189, 94,191,225,101, 17, 90,141, 28,223,137,115,103,127, 30,237,223,174, 58,172, 99, 7,190, 87,
-108,156,139,215,129, 56, 73, 8, 0,132, 6,185,164,142,142,225, 23,222, 75,141, 43, 60,119,246,216,157,244, 44,196,194,130,165,
-109,169, 82,115,232,124,252,205, 65, 17, 29, 59,155,214,125,181,112,232,123,239, 78,231,136, 93,166,161,172,224, 24,226, 47, 38,
-121, 47,252,112,134,243,250,111,182,159, 62, 31,127,147,148, 42, 53,159, 89,102,202,242,254,126,247, 79, 61,156,228, 21,135,145,
-147,193, 6,207, 38, 20,190,190, 1,144,201,100,224,114,185,220,137, 19, 39, 26, 23, 47, 94,172, 20,137, 68,124,130, 32,144,144,
-144, 32, 1, 48,208, 28,175, 90,108, 79, 27,117,122, 3,205,102,152,104,194, 70, 69, 24,171,216, 41,105,143, 48, 32,186,111, 89,
-207,110,161,107, 22,175,252,230, 83,255,128, 8,231,183,167,175, 96,174, 90,254,198, 22, 16,232,213, 20, 79, 70, 14, 46, 18,135,
-142,242, 0, 12, 93,249,197,114,228,230,102,219,207,156, 90,179,130,226,240,220, 3,219,188,106,179,101,103,194, 32, 63, 63,159,
-182, 11,230,140, 61,249,237, 15,223, 14,109,108,217,218,189,107,217,113, 0, 81,150,180,237,255, 34, 72,138,234, 64, 18, 68,161,
- 76,169,100,208, 58,157,211,220,248,120,213,185, 27, 55, 46,220,159, 57,211, 38,156,197, 10, 8,103,177,192,208,233, 42,151, 0,
- 21, 95,152, 76,197,203, 40, 74,244,232,248,113,119,138,205, 78, 86,155, 76, 97, 48,153,154,138,159, 20, 62, 57, 46, 14,181, 5,
- 5,250,170, 43, 87,212, 81, 63,252, 80,225, 53,112,224, 6,173, 78,231, 84, 63, 84,144, 4, 1,162,222,117,194,100, 34,168,143,
- 63, 38,105,138,130,222,222,126, 42,170,171, 3,204,113,126, 88, 82, 50,250,141,233,211,135, 30, 63,115, 6, 62, 62, 62, 13,207,
- 51, 59, 59, 59, 44, 92,184, 16,243,231,207,231,220,189,123,183,235,225,195,135,187,174,255,250,107, 23, 0,163, 45, 41,231,185,
- 27, 55,236,223, 89,185,114, 73,199,200, 72,239, 61,251,247,115,218,183,111, 15, 0,120,248,240,161,255, 87,107,215,182, 9, 13,
- 11, 43, 91, 51,111,222,238,212,197,139, 67, 0, 92,105,137,179, 52, 49, 81,123, 56, 63,127,250,197,132, 4,187,208,208, 80, 0,
- 64,102,102,166,120,211,166, 77, 51, 66,198,142,157,180,114,246,236,207, 98,212,234, 26, 81,121, 57, 39,230,251,239,169,223,198,
-141, 51,203, 89, 95, 78, 0,120,237,237,183,231,245,234,219, 55,120,244,244,233, 14,222,222,222,132, 80, 40,132, 78,167, 67,113,
-113,177,125,106,106,106,251, 56,185, 92,118,244,198,141,189, 48, 26,251,255,141, 93,168, 73, 45,242, 15,179,100,253,241,190,168,
-251,251, 90, 92, 92, 28, 93,167, 38, 27, 30,224, 70,163,209, 34,145, 69, 81, 20, 8,130,176, 84,108,129,166,105, 84, 84, 84, 32,
- 37, 37, 5, 15, 31, 62,132, 66,161,192,163, 71,143,176,109,219, 54,124,245,213, 87,184,125,251, 54,244,122, 61,116, 58,243, 57,
-104, 5, 2, 65,116,116,116, 52,117,227,198, 13,248,250,250,130,199,227,129,205,102,131,197, 98, 53,188,184, 92, 46,220,220,220,
- 32,147,201, 16, 21, 21,197, 20, 8, 4,209,102,172, 68, 67,198,143, 31,207,174,255,191,182,182, 22, 12, 6,163, 65,180,212,214,
-214,162,170,170, 10, 53, 53, 53, 40, 41, 41,193, 43,175,188,194,182,181,181, 29, 98,233,213, 80, 42,149,181, 18,137,196,174, 87,
-175, 94,246,233,233,233,127,200,246,123,233,210, 37,181, 90,173,102,146, 36,105,145,163,253,190,125,251, 16, 27, 27,139, 11, 23,
- 46,160,168,168, 8, 91,182,108,193,158, 61,123,112,226,196, 9,100,103,103,227,187,239,190,195,230,205,155,177,123,247,238, 22,
-175, 81, 96, 96,224,224,189,123,247,118,235,222,189, 59,159,193, 96, 32, 51, 51, 19, 11, 22, 44, 64, 77, 77, 13,156,157,157, 1,
- 0,101,101,101,216,176, 97, 3, 52, 26, 13,132, 66, 33, 60, 60, 60,184, 43, 87,174,236,233,236,236, 60,160,165, 50, 26,141, 70,
- 35,131,193, 64,155, 54,109,176,116,233, 82,108,222,188, 25,103,207,158,197,161, 67,135, 48,123,246,108, 4, 7, 7, 35, 57, 57,
- 25,183,111,223, 6, 77,211, 45, 62,100,184, 92,238,216, 61,123,246,136,217,108, 54, 76, 38, 19,228,114, 57, 10, 10, 10,112,243,
-230, 77,245,177, 99,199,106, 79,158, 60,169,188,114,229,138,250,250,245,235, 52,128, 6,193, 25, 19, 19,227,200,102,179, 95,183,
-160, 73,157, 93, 93, 93, 63,157, 49, 99, 6,183,113,159, 45, 45, 45,197,232,209,163,249, 60, 30,111, 49, 0,231,151,208,228, 77,
- 31, 62, 26,112,155, 99,202, 68,108,220, 19,175,199, 69,198, 87, 23,126,244,141,195,194,143,190,113,120, 92,100,124, 53, 54,238,
-137, 23,199,148,137,195, 71, 3,110, 91, 32, 4,200,126,125,220, 70,184, 56,218,109, 29, 61,124, 56,189,121,243,134,206,239,189,
- 59,157,211, 38, 96, 33,184,182, 19,225,225,251, 14,162,122,123, 19,225,193, 36,119,243,230, 13,157, 71, 15, 31, 78,187, 56,218,
-109,237,215,199,109, 4,204,132,157, 17, 59,114, 61,248, 28, 5,218,251, 7,227,181, 62, 29,193, 36,114,112,228,208, 78,148,148,
-148,160,184,184, 24,101,101,101,130, 97,195,134,161,180,180, 84,157,144,144, 32, 81,169, 84,125, 0,100,153,171,124, 81, 81,154,
- 73, 93,107,212,153,140, 76,131, 92,202, 82,206,158,123, 56,250,118, 42,235,173,210, 26,143, 97,108,142, 61,123,112,255,174,251,
-119,238, 88,138,118,237, 66,209,165,235,128, 87,236,133,255, 10,110, 86,188,230, 34,238,247, 35, 71,143, 79, 28, 63,209,144,247,
- 40,255, 81,128, 11, 87, 75,211,180,126,238,162,237,253,153, 2,175,240,246, 65,189,157,211,115,140,110, 75, 63,126,253,215,147,
-199,191, 45,186,122,229, 24,122,246, 26, 9, 15,119,255, 62, 83,167,130,253, 79,237, 64, 4, 77,251, 50,133,194, 92,189, 84,218,
-134,226,112, 10,140, 70,163,211,173, 89,179,236,116, 44,150,155, 81,167, 43, 54,234,116,197, 58, 54, 91,244, 99, 80,144, 39, 77,
-211,142,118,158,158, 79,104, 54,219,219,160,211,229, 16, 36,217,174,201,217, 57,135,227, 41,108,211,134, 42, 61,119, 78,235, 59,
-108, 88, 53, 0,104,117, 58,167,188,252,124,219, 50,137,196,182,180,172,204,246,113, 97,161,109,238,163, 71,182,217, 57, 57,182,
- 25, 57, 57,162, 7, 41, 41,194,187, 15, 30, 8, 9, 6,195,197, 18,206,188,226,226,240,143, 63,254, 24, 60, 30, 15, 6,131,161,
-169, 49, 27, 10,133, 2, 83,167, 78,133, 18,232,110, 9,167,209,104, 36,222, 89,185,114,201, 39, 75,150,180,143,141,141,229,116,
-235,214, 13, 14, 14, 14,112,112,112, 64,183,110,221,112,248,200, 17,246,236, 57,115, 60, 63,221,177, 99, 42,201,225,120,153,227,
-172,240,243,131,131,131, 3,175, 94,100, 1, 64,135, 14, 29,176,101,203, 22,206,153,179,103,109,191,248,249,231,111, 86, 92,191,
- 30,166,121,252, 88,225, 24, 16, 64,179, 57, 28, 79, 75,219, 19, 0,228,106,117,232,134, 77,155, 28,157,156,156,136,178,178, 50,
-228,228,228,224,241,227,199, 48, 24, 12,232,210,165, 11,113,232,200, 17, 91, 45,131,209,245,111,238, 66,127,208, 34,255, 32,204,
- 68, 51,113,180,168,186, 7,208,101, 0, 68, 92, 92, 28, 93,191,156, 88,247,112,108, 16, 83,150, 8,173, 23, 65, 77, 77, 13,106,
-106,106,176, 99,199,142, 6, 97, 84, 15,173, 86,107,137,104, 9,115,119,119,135, 84, 42, 69, 64, 64,192, 51,150, 44, 22,139, 5,
-138,162,192, 98,177,192,225,112,160,209,104,224,237,237, 13,165, 82, 25,214, 18,167, 74,165,234,228,224,224,208,240,128,213,104,
- 52, 13, 34,171,190,188, 90,173, 22,213,213,213,168,173,173,133, 92, 46,135, 66,161,136,176,164,190, 38,147, 9, 41, 41, 41, 15,
- 59,116,232,208,137,193, 96, 64, 40, 20, 10, 20, 10, 69,131,111, 81, 85, 85, 21,126,249,229, 23,197,155,111,190,233,116,226,196,
- 9,179, 9,139, 9,130,192,251,239,191, 15, 14,135, 3,165, 82,137,205,155, 55,227,131, 15, 62, 0,139,197,130, 92, 46,199,150,
- 45, 91,176, 96,193, 2, 80, 20, 5,173, 86,139, 77,155, 54, 53,203,149,150,150,150,119,227,198,141,136,206,157, 59,219, 31, 61,
-122,180,188,127,255,254,206, 3, 7, 14, 4,143,199,131, 74,165,130, 94,175, 71,247,238,221, 17, 24, 24, 8,137, 68,130,211,167,
- 79, 87,248,251,251, 59,221,188,121,211, 84, 90, 90,250,216,140,184,166, 27, 89, 12, 97, 52, 26, 81, 86, 86,134,154,154, 26,148,
-151,151,163,184,184, 24, 69, 69, 69,160, 40, 10,102,116, 22, 28, 29, 29,199,132,134,134, 50, 0,128,199,227,161, 83,167, 78, 88,
-178,100,137, 65,165, 82,141, 7,112,186,238,176,193,219,183,111, 63,122,245,234, 85,202,221,221, 29, 25, 25, 25,112,118,118,166,
-184, 92,238,235, 90,173,182, 69,107,148,171,171,235,174,223,127,255,221,161, 94, 92,215,183,179, 82,249,244,114,140, 30, 61,218,
- 97,207,158, 61,187, 12, 6,195, 16,188,100,176,227,129,213, 41, 84, 36, 61, 16, 39, 9, 89,248,209, 55, 84, 96,232,211,201,235,
-204, 89,160,214,127,253, 97,200,164, 17,162,147,118, 60, 25,203, 28,207,224,104,175, 31,135, 15,239, 79, 78,156, 16,147,205, 98,
-217,249,110,221,182, 66, 44,118,153,214, 72,134,137,224,232, 36,130,111, 27, 54,113,248,100,186,120,209,226, 47, 52,251,246,124,
-155,251,235,111,113,131,216,204,243, 3, 78,199, 23,206,110,142, 59,235, 97,205, 9,165,134, 27, 36,171,188, 79, 56,184,188,138,
- 78, 29, 59, 64,236, 92,141,237,187, 14,192,167, 93, 23,104, 52, 26,136, 68, 34,190,209,104,212, 49, 24,140,125,150,136, 44, 0,
-184,112,161,198, 20, 18, 82,163,101,200, 77,134,247, 62, 88, 63,170,255,224,225,193,253,250, 69,155,206,157, 63,167,123, 53, 66,
- 87, 50,120, 96,167,178, 51,231,127,204, 46, 41,126,228, 31, 18,214, 19,105,169, 9,131,104, 26, 41, 4,209,180,232, 76,205,193,
- 25,181, 41, 45,225,192,129,153, 38,149, 41,153,183,106,245,131,193, 67,135, 78, 9,237,221,171,183,233,124,252, 69, 45, 27, 21,
-233,162,158, 61,158,188, 55,125,240,209,159,247,109, 26,112,230,244, 46, 63,169,236,113,220,238,221,205,187, 32,252,207, 43,117,
-130,112,182, 17, 8,202, 43,229,242,142, 99, 86,172,144,141, 91,184,240,108, 56, 69, 5, 27,117,186, 71, 43, 0, 21, 77,211,132,
-201, 96, 88,252, 96,255,126,198,114,130, 88,180, 2, 48,173,102, 48,152, 69, 38,147,210,131, 36,249,203, 0,106,197,115, 59,185,
-141, 6,131, 11,197,225,144,229, 9, 9,134,176,105,211, 52,245,247, 35,159,207,199,241,227,199,193,102,179, 27, 94, 44, 22,171,
-225,189,139,139, 11,136,186,109,164,127,152,248, 53,193, 9, 0, 37, 37, 37, 40, 45, 45,133,173,173, 45,156,157,157, 81, 90, 90,
-138,235,215,175, 35, 43, 43, 11, 76, 38, 19,131, 6, 13, 2,217,140,111,243,243,156,227, 22, 46,236, 31, 20, 22,230, 61,107,214,
- 44,242,249,231,163, 78,167, 67, 85, 85, 21, 70,140, 24, 65,158, 62,125,218,245, 76, 65,193,112, 0,251, 90,226,140, 24, 58,180,
-178,236,240,225, 38,207,221,185,115,103,226,218,181,107,156, 65, 3, 7,206,255,112,245,234, 31,191,223,179,167,208,104, 48,184,
-182,166,238, 36, 73,146, 4, 65,192,203,203, 11, 85, 85, 85,168,173,125,186,130, 45, 20, 10, 97,111,111, 15,189, 94, 15, 19, 77,
- 51,255,206,254,211,156, 22,249,135, 96, 91, 35,193,245,140,101,139,170, 91, 23,173, 31, 40, 94,107,252, 96, 49,153, 76, 22,137,
- 44, 38,147,105,214,231,202, 18, 43,215,243,176, 68,104,213,151,149,203,229, 62, 99,201,170, 23, 88,245,229, 36, 73, 18, 12, 6,
-195,236, 67,188, 78, 12, 49,228,114, 57,142, 28, 57,130, 62,125,250, 52, 44, 75, 73,165, 82,212,212,212, 64, 42,149, 66,173, 86,
- 35, 47, 47, 15, 23, 46, 92,128,159,159, 31, 96, 97,240,215,220,220,220, 59, 62, 62, 62,145,245, 15,241,190,125,251,122,238,222,
-189,187,120,200,144, 33,238, 52, 77,227,179,207, 62,171,232,222,189,187, 83,227,135,188, 57, 48, 24, 12, 92,191,126, 29,126,126,
-126,160,105, 26, 44, 22, 11,153,153,153, 16,139,197, 48,153, 76,160, 40, 10,229,229,229,176,177,105, 57, 70, 98, 74, 74,202, 91,
-111,191,253,118,177,173,173,109,120,101,101,101, 9,135,195,233,149,152,152,232,165,211,233, 32, 18,137, 32, 18,137,112,234,212,
- 41,216,217,217, 97,222,188,121, 5, 42,149,234,186, 64, 32,112, 81,169, 84,247, 75, 75, 75, 63,107,205,245, 54, 24, 12, 80, 40,
- 20,168,174,174, 70, 85, 85, 21,100, 50, 25,212,106,181,217, 50, 54,133, 94,189,122, 33, 46, 46,142,241,229,151, 95,254,156,155,
-155, 11, 0,240,245,245,197,188,121,243, 24, 30, 30, 30,200,203,203,195,157, 59,119,160,211,233, 64,211,116,139, 55, 47, 69, 81,
-125,223,124,243,205,158,222,222,222,132, 78,167,131,201,100,130, 70,163, 65,253,251,130,130, 2, 4, 5, 5,145,109,218,180,121,
- 37, 55, 55,183, 47, 44,219, 88, 97, 5,128,178,130, 99,240, 96,138, 1, 82, 4, 90,117, 12,149, 21, 47, 22,197, 69, 34,145,172,
-254,248,243,107,211,190, 95,167,115, 41, 42, 1, 58,132,142,132,127,112, 20,222,154,108,192,151, 95, 31,129,119,155, 14,120,252,
-248, 49,250,246,237,203, 42, 46, 46,126,187,182,182,118,161,165,220,231,207,223, 48,158, 59,117,122,236,184,215,167, 68, 70, 71,
- 15, 49,156, 61,123, 10, 41,247,207,166,190,253,250, 24, 9,109,170, 37, 28,236,120,201,153, 25,183,253,195, 59,189, 6,173,193,
-216, 11, 88,190, 14, 88, 78, 55,127,191, 67,123,242,164, 27,121,242,216,174,201, 19, 39, 77,237, 24, 21, 53, 64,127,246,252,239,
-184,243,175,243,247,190, 89, 55,227,242,151,155, 14,246,237, 63,104, 76,136,179,203,245, 83,161, 1,154,233, 94,142,182, 15,183,
-239,174,250, 39, 95,102,138,197,229, 26, 0,144,118,109,218,120, 30,189,112, 33,191, 19,147,201, 16, 1, 70,154,166, 59, 0,112,
- 34, 41,234,211, 19,211,167, 71, 4,213, 61, 72, 13,128, 41, 8, 32,165,128, 86, 0,176,209, 76,200, 28,138,203, 53,161,110, 92,
- 36, 9, 2, 52, 77, 63, 35,178,158, 23, 90, 36, 73,154, 53, 0, 52,230,108,252, 44,170,159, 80,111,221,186, 21, 28, 14, 7,108,
- 54, 27, 76, 38,211,172,251, 69, 99,206,212,188,188,126,191,236,219,199,105, 74,100, 85, 86, 86,162,178,178, 18,181,181,181,152,
- 48, 97, 2,107,197,237,219,157, 81,231,250,209, 28,167,183,155,155, 70,192,227,149,165,165,165,185, 7, 7, 7, 63, 83, 94,153,
- 76, 6, 30,143,135,125,251,247,179, 98,134, 14,125, 55,234,212,169,111, 96, 38,254, 85, 83,117, 39, 8, 2, 98,177, 24,246,246,
-246, 32, 8, 2, 6,131, 1,165,165,165, 72, 77, 77,197,237,175,151, 40,128, 0, 0, 32, 0, 73, 68, 65, 84,219,183,193, 32, 8,
-195,223,217,121,154,210, 34,255, 64,171,214, 31,150, 15,235, 45, 90, 68,115,214, 23, 75,133, 22,131,193,120, 97,171, 86,115,176,
-100,233,144,207,231, 63, 40, 46, 46,126,213,195,195, 3, 6,131,161, 65,104, 53,182,196,213, 91,201,120, 60, 30,238,222,189, 11,
- 62,159,255, 64,173, 86,183,200, 73,211,244, 43, 93,187,118, 69,108,108, 44, 18, 18, 18,240,232,209, 35, 40,149, 74,104, 52, 26,
-168, 84, 42,164,166,166,194,100, 50, 33, 52, 52, 20, 2,129, 0,124, 62,255, 65,189,229,171, 57, 40, 20,138, 18, 38,147,217,129,
-199,227, 53,124,230,230,230,134,202,202, 74,147, 94,175,199, 47,191,252, 34,115,117,117, 21,240,120, 60,139,133, 43, 65, 16,144,
- 72, 36,240,244,244,108,240,209,146,203,229, 16,139,197,245,194, 2, 26,141, 6, 54, 54, 54,160,105,218,220, 53, 82,231,228,228,
-124,216,232,255, 46,227,198,141,251,245,192,129, 3,237,226,227,227,113,243,230, 77, 56, 59, 59, 99,205,154, 53,143,242,243,243,
- 39, 2,184, 45,145,252,181,126,145,150,244,161,202,202,202, 35, 15, 30, 60,120,165,107,215,174, 13,163, 68,223,190,125,137,190,
-125,251, 58, 53, 54,245,151,151,151,227,214,173, 91,136,143,143, 7, 65, 16,200,206,206, 54,170, 84,170, 95, 91,160,102,121,120,
-120,236, 94,178,100,137,208, 96, 48, 52,244,109, 30,143, 7, 46,151, 11, 22,139, 5, 6,131,129,252,252,124,140, 24, 49,194,246,
-135, 31,126,216,165,209,104,218, 3,208,225, 37, 65,141, 10,186,187, 41, 50,219,208, 32,151,212,109, 91,191,124,117,230,172,167,
- 99,196,182,173, 95, 26, 66,131,196,169,119, 83,202,108, 35,197,230,235,123, 58,190,240, 61,173,254,244,176,211,103, 46,141,255,
-104,254, 60,166,175,111,144, 36,254, 98,146,119,148,225, 11,194,209, 73,132,202, 10, 25,242, 11,202,144,251, 88, 75,251,250, 6,
- 73,238,220,122,192,249,122,195, 70,127,133, 82,125,240,226,229,146,223,205,208,171,175, 92,127, 52,242,155,239, 56,151,167,188,
-221,133,205,227,185,163,170,226, 1,188,189,157, 49, 34, 38, 28, 59,247, 92,135,173,173, 3, 92, 92, 92, 64,146,164,192,210,186,
- 87, 84, 84, 16, 71,126,187, 50,237,205,169, 51,186, 15, 28, 48,212,112,230,236, 73, 42,225,220,137,235,187,182,125,122,148,102,
- 40,248, 4, 45,231,181,245,113,189,255, 48,231,238,196,126,209, 19,192, 99,217,248, 1,129, 77,118,216,134, 13, 6, 52, 10, 98,
- 15, 44,231,190, 57,117,102,143,129, 3,135, 27,206,158, 61,134,179,167,246,220, 88,182,172,237,169, 71, 79,246,179,254,117,187,
-136, 59,114,236,236,234,184,211,233,218, 49,195,124,178,220, 5,157, 84,192,163,127,108,255, 33, 9, 66, 86, 81, 94, 46, 98, 50,
-153,170, 93,111,188,145, 13, 0,122,138,170,148, 51, 24,206, 4, 65,100, 2,200, 92, 13, 56,129,205,150,142, 51, 24,140, 11,189,
-189, 89, 84, 73, 9,163,218,104, 52, 50, 0,246, 71,127,204,191, 8, 6, 69,149, 25, 52, 26, 47,207,129, 3, 25,202,199,143,153,
- 66, 23, 23, 3, 0,232,245,122,179, 66, 11,205,108, 90,121,158,211,210,250, 41,149, 74,152,154, 17,130,207,115,150, 74, 36,109,
-235, 38,225, 13,208,235,245, 13, 34,171,178,178, 18, 53, 53, 53, 16, 8, 4, 40,215,104, 92, 44,225, 28,208,173,219, 47, 43,150,
- 47, 95,120,248,200, 17, 86, 99,145, 85,255, 98, 50,153,248,106,221, 58,214, 7, 31,125, 52,251, 93,138,154,139, 38,150, 65,155,
-107,207,250, 73, 59,131,193, 0, 69, 81,120,252,248, 49, 10, 10, 10,240,248,241, 99, 60,126,252, 24, 60, 30, 15,244,223,188, 9,
-232, 31,236,159,133, 70, 75,133, 51,159,183,114,181, 24,222,161, 53,206,240,150, 10, 3,163,209,248,151, 10, 45,133, 66, 17,127,
-225,194,133,110, 35, 71,142,164,110,220,184, 1, 87, 87,215, 6,161, 85,255,183,126, 57,138,207,231,227,232,209,163, 58,133, 66,
- 17,111,230,102,186,112,234,212,169,200,165, 75,151, 50,223,122,235, 45,164,165,165, 97,214,172, 89,168,169,169,129, 76, 38, 67,
-101,101, 37,148, 74, 37,186,117,235, 6, 46,151,139,251,247,239,235,149, 74,229, 5,115, 75,103, 18,137,164,214,217,217,217,237,
-249,239,198,142, 29,235,242,211, 79, 63, 41, 51, 50, 50,244,175,190,250,170,200, 82,193, 81,143,223,126,251,173,193, 82,151,149,
-149,133,159,126,250, 9, 52, 77,131,166,105, 36, 37, 37, 97,253,250,245, 13,177,207, 90,137,219, 21, 21, 21, 6,189, 94, 15, 63,
- 63, 63,120,120,120, 64,173, 86, 99,227,198,141, 6, 0,183,255, 91,189, 89,173, 86, 31,158, 50,101,202, 39,201,201,201,110, 20,
- 69, 61, 53,105,215,213, 79,167,211, 33, 39, 39, 7,169,169,169,200,200,200, 64, 85, 85, 85,195, 68,224,238,221,187,213,122,189,
-254, 96,115,188,206,206,206,159,237,220,185,211,149,207,231, 63,211,159,235,173,161,245, 86,210,242,242,114,216,217,217, 33, 42,
- 42, 74,124,225,194,133,207, 52, 26,205,210,151, 68,103, 17, 99, 71,101,117,249,224,189,145, 24, 29,195, 47,140,141,123,114,109,
-253,215, 31,214, 57,195,139, 83, 71,199,120, 20,222,203,180,195,216, 81,199,186, 0, 40, 66,203,126, 90,166,139,151, 75,142,119,
-237,106,159, 16,123,226,196,174,197, 31,207, 79, 90,248,225, 12,103,165,234, 33,215,183, 13,155, 0,128,220,199, 90,250,126,154,
- 73,189,254,155,249, 73, 95,174,251,129, 44,171,172,153,117,235, 86,243,225, 13, 26,139, 23,146, 4,215, 55,176, 79,177,127, 64,
- 79,159, 27,215,247, 65,200, 87,161, 67, 96, 23, 12, 28,240, 10, 18, 46,221, 69,105,185, 26, 37, 37, 37,208,104, 52, 45,134, 75,
-200,184,127,116, 50, 77,208,222, 4, 77, 20, 16, 36,205,157, 60,101,122,175,161, 67,135,211,113,113, 39, 12,199,142,238,187,122,
-112,239,119,135, 73, 22,147, 82,105,109,181, 4,161,150,130, 76, 73,171, 85, 60,157,208, 48, 57,172,230,205,175,117,129, 93,131,
- 67, 2, 93, 39, 79,153,101, 59,100,240, 8,250,212,169, 99,166,131, 7,126, 73, 56,184, 35,108,159,137,148,177, 74, 10,149, 28,
-169, 76, 47,165, 9,182, 93,173,204,164, 44,203,109,175,118, 31, 58, 86, 7, 28,254,199,118, 32,218,100,122, 76,107,181, 62, 96,
- 50, 11,105,131,193, 21,122,125,213, 10,181,250,201, 23,108,118,219,101, 20,213, 25, 4, 97,210, 17,132, 2, 90,109, 46, 0, 56,
- 20, 20,184,105, 69,162, 82,134, 90,221, 30, 70, 99,147, 1,144,117, 26, 77, 81,109, 97,161,155, 67,159, 62,156,156,229,203,249,
- 46,221,186,169,137, 58, 31,226,150,132, 22,131,193, 0, 72,210,100, 9,167,165,245, 83,169, 84, 48, 1,250, 23,225, 52, 24, 12,
-207,136,172,122,161, 85,127,191, 88,194,185,109,217,178, 27,222, 3, 7, 86, 93,186,116,201,229,181,215, 94, 35,228,114, 57,228,
-114,249, 51, 98,203,221,221,157, 8, 14, 13,229,255,150,144,224,107,105,123, 90, 36,162, 73,242,111, 23, 90,255,112, 52,155, 72,
-154, 50,179,132,102,177,208,178,208,162,165,215,235,245, 16,139,197,168,168,168,104,246,193, 79,146, 36,120, 60, 94,253, 26,113,
-139, 59,239, 52, 26,205,198,133, 11, 23,206, 25, 60,120,176, 83,135, 14, 29, 80, 94, 94, 14, 23, 23, 23,112,185,220, 6,223,177,
-122,190,164,164, 36,236,220,185, 83,166,209,104, 54,154,225,220,176,110,221,186,247, 70,143, 30,237,224,234,234, 10,123,123,123,
-220,191,127, 31,246,246,246,144,201,100,200,204,204,132,141,141, 77,131,223,206,137, 19, 39,228, 26,141,102,131, 25,241, 70, 39,
- 38, 38,234,108,108,108,238,151,151,151, 51,170,170,170,168,234,234,106, 74, 38,147, 49,165, 82, 41,243,204,153, 51, 78,182,182,
-182,202,139, 23, 47,150,123,123,123, 51, 30, 61,122,196,208,235,245,102,213, 43, 65, 16,152, 59,119, 46, 88, 44, 22, 52, 26, 13,
- 54,110,220,136,133, 11, 23, 54,248,100,173, 91,183, 14, 75,150, 44,105, 16,206,219,183,111,111,221,192, 73,211,208,233,116,208,
-235,245, 22,111, 80,248, 83, 51, 98,203, 4,123,105,118,118,118, 76,215,174, 93,207, 29, 58,116,200,177, 46, 38, 25,202,202,202,
- 80, 86, 86,134,242,242,114,212,214,214,194, 96, 48,192,195,195, 3,101,101,101, 56,118,236,152, 84, 46,151, 15, 68, 11, 59, 14,
- 25, 12,198,148, 94,189,122, 81,207,151,161,126,150, 87, 47,222, 57, 28, 14,138,139,139,209,183,111, 95,246,165, 75,151,166, 0,
-248, 71, 11,173,198,225, 29, 6, 12,156,198, 10, 10,233,161,189,151, 26, 87, 24,232, 83, 86, 56,105,132,232, 36, 0,220, 77, 41,
-179,189,151,105,135,160,144, 24,122,192, 64,251,200,178,210,109, 97, 0,116, 45,165,235, 1, 0, 91, 62,103, 92,255,232,110,197,
- 54, 2, 1,185,254,155,237,167, 55,111,222,208,249,240,201,127,135,119, 88,255,205,211,240, 14,253,163,187,153, 50,210, 51,198,
- 1,216, 97,169,120,137,137, 25,150,188,115,247, 78,100,164, 94,116,255,100,110, 56,187,170, 76, 15,158,208, 11,145,157, 92,176,
-109,247, 3,220,187,119,175, 84,171,213,246,109,177,127, 19,180,119,106, 90, 74, 64, 88, 72,176,235,228, 41, 51, 69, 49, 49, 35,
- 16, 23,119, 28,123,127,217,145, 56,102,194,232,159,159, 84,203, 24, 98, 38,159,197,167, 77,108, 6,203,150, 98,113,120, 18,173,
-246,105, 4, 2, 38,147, 43, 2,198,181,248,224,121,103,230, 36,219,126,209, 35,112,242,212,113,236,253,101,219,229,207, 67,198,
-238,240,137, 8, 34,186,117,254,122,182, 79, 59,159, 54,138,218, 50, 25, 73,176,117,106,181,201,230,235, 95,242,191,205, 93, 50,
- 37, 23,192, 55,248,135,238, 58,100, 27,141,247, 52, 58,221, 36,175,200,200,219,197,183,111,135,173,209,235, 29, 62, 5,170, 62,
-215,106,243, 15, 1,133, 53, 0, 57,171,110, 76,255, 6,224,170, 40,202,205,150, 36,239,202,141,198,193, 96, 48, 82,209,244, 68,
-252,254,222, 33, 67,186,126,240,240, 33,203,185,103, 79, 94,113, 66, 2,191, 46, 19, 73,139, 66,139,162, 40,208,205, 47,117, 61,
-195, 73,236,217, 67, 2, 0,139,197,106,118,140, 99,177, 88, 80, 42,149,208, 55,111,193,126,134,211,237,236,217,194,135, 15, 31,
-250, 59, 56, 56, 60, 35,178,170,170,170, 26,222,171,213,106, 40,149, 74,240,120,188, 84, 85,211, 43, 34,207,112,150, 37, 38,170,
-215,206,157,187,116,226,132, 9,223,197, 95,184,192,117,116,116,132, 84, 42,125, 70,104,105,181, 90,244,139,138, 98,173, 75, 78,
-158, 12,153,108,153, 37,237,233,210,183,175, 89,127, 96, 6,131, 1,211,223,188,116,248, 18, 96,102, 83,194,139, 52,183,132, 99,
-233,174,195,102, 30,144,207,239,238, 91, 18, 25, 25,169,206,202,202,130,183,183,119,131, 88,105,124, 78,145, 72, 4, 59, 59, 59,
- 36, 37, 37, 97,245,234,213, 42, 0, 75,204,112,202,149, 74,229,235,253,251,247, 87, 81, 20,133,192,192,192,134,248, 89, 38,147,
- 9,108, 54, 27, 2,129, 0,201,201,201, 24, 54,108,152, 82,169, 84,190,142, 63,198,208,122,158, 83,170, 84, 42,223, 24, 48, 96,
-128, 50, 45, 45, 13,189,122,245,194,189,123,247, 80, 91, 91,139,218,218, 90,228,229,229, 33, 56, 56, 24, 74,165, 18, 63,253,244,
-147, 74,169, 84,190, 1, 64,218, 18,167, 92, 46, 31,182,112,225, 66,198,175,191,254,234,227,225,225, 17,210,165, 75,151, 14, 81,
- 81, 81,237, 71,141, 26,213,102,200,144, 33,110,254,254,254,234,129, 3, 7, 58, 15, 30, 60,216, 89,169, 84, 50,175, 93,187, 86,
-162,215,235, 7,155, 41,103,131, 56,201,202,202,106, 88, 42,164, 40, 10, 21, 21, 21, 13,145,251,235, 7,165,102,132,112,180, 57,
-177, 93, 47,176,234, 5,151, 5,126,110, 77,113,154,253, 17,155,205,174,183,120,210, 22,112,222, 77, 79, 79,239,223,167, 79,159,
-187,211,166, 77,147,151,150,150,194,198,198, 6,190,190,190, 8, 8, 8,128,147,147, 19,116, 58, 29,142, 30, 61,170, 56,118,236,
-216, 3,169, 84,218, 23,127,140,161, 21,253, 92, 59,230, 53, 53,200,214, 91,179,234,133, 22,151,203,133,135,135, 71,125,219,230,
-181,166, 61, 95, 16,127, 47,103,157,128,137,234, 55,176,221,144,161, 35,109,143, 30,191,206,254,238,199, 99, 15, 34,163,177,221,
-177,173,236,132, 99, 91,217,137,200,104,108,255,238,199, 99, 15,142, 30,191,206, 30, 50,116,164,109, 84,191,129,237,210, 82, 51,
- 58, 52,206,123,216, 84, 57,185, 92,110,143, 94, 61, 35,171, 47, 93,189,108,250,114,221, 15,100,191,190, 99,146,119,252,124,244,
-232,142,159,143, 30,237,215,119, 76,242,151,235,126, 32, 47, 93,189,108,234,213, 51,178,154,203,229,246,176,164,238,239,204,156,
-100, 59,116,200, 8,196,197, 29, 53, 28,254,237,167,117, 7,142,100,247,153, 62, 39,177, 44, 43,235, 30, 45, 41, 58, 11, 38,249,
- 24,233,233,233,210, 58,145,149,101, 9,231,172, 25,147, 26,139,172, 43,142,174,189,182,167,167,195,120,254,252,239,250, 11, 23,
-146, 85, 87,238, 74,164,119,210, 42,170,138,203,171, 30,201,100,149, 90,147,201, 8,163,209,200, 88,177,162,193, 97,183,201,107,
-244,234,171,175,225, 98,252,126,252,178,123,171,212,100,130,122,220,225,195,198,113,227,150,211,109,218,182,109,179,239,183,253,
- 68,204,240,145,182, 52, 96, 26, 54,122,132,221,175, 7,126, 37,218,249,181,107,235,235,219, 16,210,230, 31,215,151, 62, 1,106,
- 9, 32,189,228,214,173, 46,194, 94,189,238, 27,152,204,128,149, 44, 86,251, 77, 0,123, 28, 96,156, 5,232,151, 1,228, 50,192,
- 67, 69, 81, 29,121, 6,195, 61,185, 82,233, 9, 0, 95,208,244,163,166, 56,151, 3,213,178,199,143, 47, 39,253,240,131,198,229,
-245,215, 29,216, 46, 46, 34, 24,141, 68,253,248,222,220,139,162,168,231, 45, 48,205,114,122, 56, 57, 61, 57,113,226, 4, 2, 2,
- 2,224,225,225,129,198, 62,178,245, 1,185, 29, 29, 29,113,228,200, 17,208,207, 6,167,110,150, 51,194,199, 39,233,171,181,107,
-181, 38,147, 9,213,213,213,127,176,102, 85, 87, 87,195,100, 50,225,212,201,147, 90,217,211, 76, 32, 22,213,189, 47,131, 81, 59,
-177,119,239, 47,135, 14, 29,170,123,248,240, 97,195,206,235,122,203,150, 68, 34,129, 80, 40,132, 90,163,241, 2,192,183,132, 83,
-114,230,140, 0,102,198,245, 38, 44, 90,127, 71, 95,250,167,139,172,198, 9,165,103, 90,100,209, 50, 24, 12,240,242,242,122, 38,
-165, 11, 73,146,207,188, 90,185,227,112, 79, 90, 90,218,217,129, 3, 7, 46,237,222,189,251, 59, 75,151, 46,101,116,232,208, 1,
- 82,169, 20,246,246,246, 16,139,197,200,204,204,196,137, 19, 39,140, 21, 21, 21, 91, 0,172, 68, 19, 1,236,154, 64, 66,118,118,
-118, 76,120,120,248,129, 69,139, 22,217, 14, 24, 48,128,233,229,229, 5,154,166,145,156,156,140,216,216, 88,221,142, 29, 59,100,
-117, 34,203, 82,231,229,115,197,197,197, 99, 6, 15, 30,188,111,202,148, 41, 54, 70,163,145,153,151,151, 7,141, 70, 3,189, 94,
-143,130,130, 2, 93, 92, 92, 92,173, 82,169,156, 4,224,156, 5,124, 73, 53, 53, 53,193,231,207,159,159,114,237,218,181,213,211,
-166, 77,115,140,138,138, 98, 25, 12, 6, 92,189,122,181, 60, 34, 34, 66, 44,145, 72,116, 71,142, 28,169, 84,171,213, 75,140, 70,
-163, 69, 41,120, 8,130,128, 76, 38,131,147,147, 19, 52, 26, 13, 76, 38, 19,180, 90, 45,132, 66, 97, 67,218, 36,154,166,209, 26,
-231,250,231,250, 0, 67,167,211, 97,194,132, 9, 48,153, 76,216,184,113, 35, 12, 6, 67,171,201,108,109,109,239,220,189,123, 55,
-166, 83,167, 78, 13,226,165,190, 15,113, 56, 28, 56, 57, 57,193,209,209, 17,113,113,113, 96, 50,153,119,204,249,187,213,225, 94,
- 69, 69, 69,196,249,243,231,123, 60,120,240,224, 77, 0,157,116, 58,157,135,209,104, 36, 72,146, 44,161,105,250,190, 76, 38,251,
- 25, 22,166,224,145, 72, 36,171,167, 78,157, 26,177,127,255,126, 33, 69,253,251,214,160, 40, 10, 28, 14, 7,245,193, 49,105,154,
-134, 86,171,197,103,159,125, 38, 83, 40, 20,171, 95,150, 81, 34,178, 75, 55,108,251,105,147,240,194,197,179,229,233,217,136,181,
-183, 79,127,190,255, 21,149,149,110, 11, 43, 46, 44, 20, 70,118,233,102, 17,167, 94,171,171,124, 99,210, 2,239,186, 20, 60,159,
-229,229,229,111,221,183,231,219, 92, 0,248,122,195, 70,255,178,202,154, 89, 25,233, 25,227,182,110,253,173,135, 94,171,171,180,
-132,243,223,226,101,159, 20, 52,212, 0,110, 38, 63, 40,243, 25,246,250,153, 37,126,237, 68,195, 37,149,170, 39,181,181,202,247,
- 1,228, 90, 90,247,158,175,246,193,197,115,191, 98,239, 47,251,100,180,137,161,118,114,114,162, 1, 32, 61,221,137, 78, 79,175,
-161,255,237, 87,108,167, 96,210,247, 86, 46,120, 63,106,129, 84, 86,181, 97,227, 79, 45, 47,165,132,119,236,142,240,142,221, 49,
-231,253, 79,109,131, 67, 2,189, 1,224,240, 97, 24, 67,252,210,126, 95,250,249,242,225, 43, 87, 46,135, 76,174, 65,125,186,158,
-204,148,180,147,185,185,208,254,147,251,209, 82,131,225,234, 74,154, 30,165, 76, 76, 12,235,241,209, 71,183,174,172, 95,239, 35,
-101, 48, 94, 93, 1,152, 72,130, 48,130,166,121, 36, 73,150, 8,244,250,100, 57,155,237, 70,152, 76,157,109,140,198,163,122,163,
-145,110,129,243, 38, 22, 44,240, 87, 86, 85, 57,247,252,228, 19, 39,234,163,143,200,150,156,225, 27,223,191,150,112,222,190,127,
-255,228,172,233,211,159, 44, 91,186,116,224,150,173, 91,121, 97, 97, 97, 40, 45, 45, 69, 96, 96, 32, 60, 60, 60,112,254,252,121,
- 28, 57,120, 80, 81, 35,151, 47, 1,176,217, 18,206, 61,167, 78,101,118, 8, 9,169,216,186,117,171,251,208,161, 67, 9,133, 66,
- 1,169, 84, 10,169, 84, 10,141, 70,131,186,128,208,116, 86,118,118,186, 94,175,223, 98,105,221,141,229,229,220,149,221,186, 21,
-177, 76,166,175,198,140, 30,189,112,229, 23, 95,112,218,181,107, 71,104, 52,154, 6,171,150, 78,167,131, 80, 40,212,105,181, 90,
- 71, 52,225,247,214, 20, 39,103,199, 14, 67,121,121, 57,156,157,157, 27,194, 53, 53,142, 75, 40,151,203, 65,211,244, 75,155, 0,
-253,239, 68,179, 10,201,222,222,254, 14, 69, 81,158,141,173, 91, 77,229,206,107,252,153, 94,175, 47,170,168,168,136,124, 78,241,
- 54,231, 15,229, 11, 96, 77,191,126,253,198,124,248,225,135,196,165, 75,151,112,236,216, 49, 58, 55, 55,247,112,157, 21, 43,183,
-133,217, 83,115,156, 54, 28, 14,103,158, 64, 32,136,174, 15,225,192,231,243, 31, 40, 20,138,248,186,229, 66,249, 11,112,138, 56,
- 28,206, 92,129, 64,208,191, 46,253, 10,108,108,108,238, 42, 20,138,243, 26,141,102, 19,154, 79, 84,221, 18, 39,207,214,214,118,
-181,147,147,211, 27, 31,125,244,145, 99, 98, 98, 98,201,197,139, 23, 89, 53, 53, 53,251,181, 90,109, 75, 73,165,255,192,233,224,
-224,112,135,193, 96,120,254, 77,215, 8,225,225,225,113,195,134, 13, 27, 58,105,210, 36,232,245,122,108,222,188, 25,231,207,159,
- 63,153,147,147, 19, 99,102,134,251, 60,167,147,167,167,231,165,119,222,121,167,205,132, 9, 19,248,246,246,246,160, 40, 10, 10,
-133, 2, 57, 57, 57, 72, 78, 78,166,143, 31, 63, 94,155,148,148, 84,164, 84, 42, 95, 3, 80,209,138,246,252, 51, 51,241,103, 56,
- 41,138,234,227,229,229,245,219,178,101,203,108,250,247,239,207,115,116,116, 4,131,193,128, 94,175, 71, 73, 73, 9, 82, 82, 82,
-112,246,236, 89,197,225,195,135, 21,149,149,149, 19, 0, 92,254,111,148,243,175,228, 12,242,199,231,207, 37,138,110, 54,218,187,
-153, 99,205,150,179, 95, 31,183, 17,227,198, 12, 30, 4, 0,135,142,156, 62, 99, 65, 82,233,102,203,105,174,172,150,112, 6,250,
-145,203, 82,211, 82,158, 9,104, 25, 18, 28,154, 21, 20, 54,122,149, 37, 68,141, 34,195, 63, 83,247, 70,203,177,141,109,186,207,
- 44,179, 6,249, 34,102,196,184, 81, 67, 63, 93,178, 24,107, 86,127,137,227,135,142,158, 76,207,125, 38, 77,208, 63,174, 47, 53,
-126,182,172, 96, 48,250,145, 36,233, 69,176,217,183,244, 10, 69,182, 13,192,148, 3,140, 21,128, 98, 37,139,213, 30, 70, 99, 8,
-104,154,146, 19, 68,220,122,163,209, 30, 64,177, 57,206, 85, 20,213,157,239,230,214,123,163,201,180,248, 94, 74,138,176,241,132,
-173,222,242,220,120, 82,233,238,238, 46, 41, 41, 41,113,177,132, 51,230,251,239,117, 74,129,128,179,248,171,175,250,212,170,213,
-125, 86,174, 92, 73,221,190,125, 27, 63,253,240,131, 65, 93, 84,180,175, 28,152,219,204,106, 72,179,156,109,230,206,229,126,252,
-211, 79,111,249,250,249,137,223,124,243, 77, 38,147,201,132, 66,161, 64, 97, 97, 33,206,157, 61,171, 77, 75, 79, 79,147,201,100,
-195, 91, 83,247,152,239,191,215,217,249,250,130,239,236, 76, 95, 72, 72,176,157, 53,111,222, 59,109,125,124,108, 7, 14, 26,196,
- 20,137, 68,168,174,174, 70, 94, 94, 30,142, 30, 61, 42,169,173,173,117, 7, 96,180,132,115,223,181,107,225,167, 46, 95, 30,187,
-106,213, 42,118,104,104, 40,108,109,109, 33,151,203,145,146,146,130,203,151, 47,107,182,108,217, 34,149, 74,165,239, 24,141,198,
- 19,127, 99, 95,122, 41,151, 14,255,110, 15,127, 75, 46, 68, 36,128,207,235,222,127, 1,243, 57, 3,255,201,131,207,243,240,118,
-112,112,216,166, 86,171,105,149, 74, 53, 11, 64,193,255, 96, 57,169,200,200,200,159, 36, 18, 73, 15,154,166, 97,107,107,123, 61,
- 53, 53,245, 93, 52,179,243,198, 12, 39, 3, 64, 15,161, 80,216,205,198,198,166,143, 70,163, 9,170, 91,126, 75, 87, 40, 20,151,
-117, 58,221,205, 58,235,147,241,191, 92,119, 6,128,254,238,238,238,211, 77, 38,147, 31, 65, 16,118, 70,163, 17,122,189,190,198,
-100, 50,229, 72,165,210, 29, 0,206,255, 15,148,243, 47,225, 12,110,143, 81, 52,137,160,230, 4,193, 51, 66,235, 57, 1, 65,152,
-144,158,246, 16, 71, 91, 81, 78,114,112,180,215,143,192,211,157,137, 48,239, 92,251,111,161,101,129,120,105,181,200,108,207,152,
- 74, 19,244, 51,156, 4, 77, 20, 4,134,143,218,251,103,132,150,165, 8, 14, 64, 31,208,232, 97,162,113, 51, 35, 7, 23, 95,182,
-177,110, 25,224, 66,146,100, 87,130, 36,219,211,128,130, 32, 8, 3,104,218, 1, 52,253, 16, 12, 70,234, 82,157,238, 33,154, 78,
- 96,222, 44,231, 26,192,225, 7,123,251,235, 36, 69,185, 2, 32,235,172, 47, 38, 19, 65, 24,105,130, 48, 52, 94,222,122,110, 98,
-217, 34,167, 14, 8, 99,114, 56, 94, 70,131,193,165, 20, 16,158, 50, 26, 59,171,105,186,214, 19,248,252, 46,144,217,218,186,215,
-115, 50, 56, 28,239, 83, 52, 61,162, 92, 32, 8,151,168, 84,206, 0,104,161, 64,144, 46, 83, 40,126, 81,171,213, 63,182,182,238,
- 58, 32,140,197,225,120, 26, 13, 6, 23, 0, 32, 41, 74,114, 64,163,241, 42, 18,137,222, 84,107, 52,109,132, 66,161, 94,171,213,
-202,212,106,245, 36,131,193,112,161, 53,117,207, 49, 24,130,175,145,100, 47,157, 64,224,168, 35, 8,129,214, 96,208,105,117,186,
- 66,181, 90,253, 0,192,183, 0, 30,254,205,125,201,138, 23,188, 1,173,156, 86, 78, 43,167,149,211,202,249,255,156,115, 45, 32,
- 90, 3, 56, 88,219,243,111,229,228, 3,240,174,155, 44,254, 19,235,254, 82, 90,183, 40,107, 91, 88, 97,133, 21, 86, 88,241,119,
- 99, 81,243,110, 22, 86,252,117, 80,162, 9,159, 44, 43,254,187, 32, 90, 80,165,173, 49, 9,190,136,178,141,183,114, 90, 57,173,
-156, 86, 78, 43,167,149,211,202,249,255,142,211, 28,247, 63,113, 73,114,102, 19,159,109,251, 79,156,216,106,254,181,114, 90, 57,
-173,156, 86, 78, 43,167,149,211,202,249,255, 22,164,181, 9,154,133, 75,221,235,175, 62,214,138,151,187, 47,252, 39,224, 81,247,
-106,205,241,110,214,203,104,133, 21, 86, 88,241,255, 67,104, 89,250,208,250, 51, 15,183, 63,251, 96,252,146, 32, 80, 76, 16, 40,
- 6,240,229, 95,120,172, 57,184, 59, 57, 57,125, 16, 28, 28,188,207,197,197,101, 14, 0,113, 43,127,239,207,231,243, 55, 9, 4,
-130, 75, 2,129,224, 18,159,207,223, 4,192,255, 47,186,110, 4,128, 89, 28, 14, 39,193,205,205,237, 9,155,205, 78, 0,240, 14,
- 94,124,231,106, 7, 60,141,147,246, 5,128,240,214,252, 80, 28, 50,226,160,115,200,136,251,206, 33, 35, 82, 28, 67,135,249, 59,
-135,140, 72,113, 14, 25,113, 95, 28, 50,226,224,223,208, 95,255,202,235,251, 87,149,167,128, 32, 80, 96, 97,121,190, 37,128, 66,
-130, 64,209,255, 72,249,173,176,194, 10, 43,172,104, 86, 5,184,187,143,113,115,115,139,119,115,115, 59,239,238,238, 62,198,130,
-159, 68, 55,241,144, 48, 18, 4,140,102, 6,253,150,142, 51,103,174,108,252,219,245, 22, 86,173, 49,167, 11, 65,192, 72,215,129,
- 32, 96, 18,139,197,223,185,185,185,125,249,252, 75, 44, 22,127, 71, 16, 48, 53, 58,214,216, 72,224,181,214,172,234, 50,121,242,
-228, 67,213,213,213,113, 90,173, 54, 46, 59, 59, 59,238,181,215, 94, 59,240,156, 37,162, 89, 78, 46,151, 59,177,107,183, 30, 73,
-151,175,222,204,206,202,201, 47, 78,203,124,148,255,251,153, 11,183, 67,195,194,111,113,185,220,137,173,184, 70, 4,128, 89, 20,
- 69, 37, 8,133,194, 34,138,162, 18, 0,204,102, 48, 24, 39,214,174, 93,155,159,154,154, 90,118,237,218,181,154,203,151, 47, 63,
-153, 54,109, 90, 14, 65, 16,191, 55, 33,216,163, 45,176,192, 44,125,252,248,241,153,146,146,146,179, 60, 30,111,181, 5,199, 55,
-112, 58,135,140,184, 47,145,234,104,137, 84, 71, 59,135,140,160, 27,189,191,223,202, 54, 55,119,141,254,208, 23, 56, 28,142,183,
- 25, 65,255,119,154,232,255, 80, 30, 0,174,117,223, 69, 2,248,190,238, 85,191,157,221,149,203,225,252, 85,253,243,175,104, 79,
- 43,167,149,211,202,105,229,124, 89, 17, 81,247,215, 13, 79,253,181, 26,158,221,173,221,117,248, 94,118,118,182, 16, 0, 2, 2,
- 2,222, 5,112,164, 53, 66,130, 32,240,177,201, 68,147, 0, 64,146,196, 39,125,251,246,139,224,241,120,207, 68, 65, 86,169, 84,
-236,132,132,139, 81, 38, 19, 77,212, 29,247, 49, 77, 99, 19,128, 50, 75,207,161,213,106, 72, 38,147, 13,146, 36, 22,132,134,134,
-181,173,168,168, 72, 36, 73,114,223,147, 39, 79,170, 91,109,198, 33, 8,108,223,190, 61,192,205,205,237, 15,209,154, 75, 74, 74,
-216, 35, 70, 12,111, 21,223, 84,128,163,225,112,186,177, 8,194,205,104, 48,216, 1, 0, 69, 81,213,183,217,236,200, 53,171, 86,
-241, 9,130, 48, 85, 86, 86, 66,165, 82, 97,254,252,249,188,180,180,180,145, 21, 21, 21, 63,154,161, 13, 8,239, 24, 49,255,236,
-217, 51, 65,178,170,106,245,246, 13, 91,147, 84, 20, 75,233, 19, 28,200,250,105,219, 47,246, 51,223,154,244,126, 70, 70,234, 93,
- 52,157,142,164, 49, 72, 0, 71,231,205,155, 23, 18, 19, 19,195,150,203,229, 92,149, 74,213,118,223,190,125,159, 69, 70, 70, 10,
- 59,117,234,196,254,237,183,223, 8,169, 84, 10,154,166,249,129,129,129,244,248,241,227,213, 7, 14, 28,152, 3,224,187, 22,132,
-239,199, 79,219,146,220,216,161, 67,135,101, 0,144,157,157,205,106,212,198,204,160,160, 32, 1, 0,100,102,102,174,160,105,211,
- 60, 0,160,105,172, 3,176,184, 9,211, 90,118, 72,207,113, 0, 1,191,212,171,135,184, 33,189,198,169, 65, 35,135, 0,178,235,
- 38, 4, 43,129, 70,113,161,158, 69,122,113,113,241, 11,229, 38, 28, 58, 52,134, 32, 8,226,112, 82, 82,210, 17,137, 68,226, 99,
- 50, 25,103,180, 84,206,230,174,149,179,179,243, 89,163,209,168,169,170,170,106, 8,148,233, 28, 62,170,135,163,141, 32,170,188,
- 90,158, 88,153,118,252,178,133,125,147,112,116,116,156, 90, 81, 81,241, 37,128,233,233,233,233, 17, 0, 16, 20, 20,196, 2,112,
- 71, 36, 18,189,170,211,106, 9,235,248,103,133, 21, 86, 88,241, 31, 17, 90,201, 0,134,226,223, 41,120,182,189,136,208, 98, 3,
- 64, 98, 98, 34, 0,112, 94,160, 32, 68, 99, 1, 51,119,238, 92,184,185,185, 61, 47, 94,112,233, 82,194,159,169,236, 51,231,248,
-226,139, 47,132, 53, 53, 53,209, 63,255,252,115,111,154,166,215, 23, 23, 23,223, 48,243,251, 50,154,198, 58,146, 36, 62, 33, 8,
- 2, 28, 14, 55,235,157,119,222, 73,174,251,174,237,239,191,255,206, 31, 54,108,152, 18, 64, 62, 0,112, 56, 92, 15, 6,131, 12,
-160,105,186,254,129,219,172, 32, 28, 11,248, 26,216,236,126,179,190,255,222,208,121,216, 48, 74,224,236, 76, 0, 64,126, 70,134,
-227,186,175,191,126,181, 58, 55,151,173,114,116,172,172, 84, 40, 84, 89, 89, 89,224,112, 56, 4,131,193,232,108,174,194, 2,129,
-224,131, 85,107,190, 18,200,170,106, 84,106,153, 92,203, 48,232, 53, 54, 60,190,177,172, 84, 82, 41,228, 9,148,159,124,190,156,
-253,222,140, 41, 31, 40, 20,138,119,205, 80,205, 89,176, 96, 65, 80,215,174, 93, 61, 14, 30, 60, 72, 72,165, 82, 80, 20, 37,236,
-212,169, 19, 34, 35, 35,141, 23, 47, 94, 36,124,124,124, 16, 26, 26,138,171, 87,175,226,250,245,235, 68, 68, 68, 4, 63, 54, 54,
-118,178, 94,175,255,206,156,184,102, 48,200,249,129,129,129,157, 4, 2,129, 54, 32, 32, 0, 51,102,204, 0, 77,211,136,142,142,
- 14, 21, 10,133, 71, 20, 10, 5, 59, 51, 51,163,183, 57,145, 45, 73, 61, 62,190,222,178, 5, 32, 12, 52,114,202, 83,143, 55, 94,
-126, 12,202,204,204,236, 94, 93, 93,141,167,215,133,110, 72, 96,222,187,119,239,214,244,165, 50,154,198,186, 97,195, 98, 62, 1,
- 8, 34, 58, 58,186,102,206,156, 57,100, 70, 70,198, 27,163, 70,141, 12,205,206,206, 65, 43, 39, 3, 1, 3, 6, 12,184,122,234,
-212, 41,199,128,128,128,242,170,170,170,134, 47, 92, 29,237, 6, 94,142,221,248,193,234, 77,251, 2,247,208, 68, 77,121,250,177,
- 7,102,250, 38, 49,117,234, 91,101, 66,161,112,244,225,195,135, 51, 75, 74, 74, 40, 22,171, 65,187, 50,196, 98,177,115, 64, 64,
-192,108, 7, 7, 7, 9,131, 36,197, 52,104,218, 92,255,180,194, 10, 43,172,176,226,133,113,178, 78, 92,157,124,254, 11, 10, 0,
-226,226,226, 26, 34,211,198,196,196, 52, 59, 3,166,105,186,236,222,189,123, 94, 74,165, 18, 52, 77, 91, 50, 96, 55,222,162, 89,
- 70, 16,228, 79, 36, 73,188, 75, 16, 4, 66, 67,195, 30,109,220,184,177,169,156, 94,218,208,208,176, 71, 12, 6,217,142,166,105,
- 16, 4,185,153,166, 77,101,205,112, 54,249, 32, 98,179, 57, 31, 3,128,171,171, 91,238,233,211,167,181, 99,199,142,197,215, 95,
-127,205, 90,180,104,209, 66,138,162,230, 20, 20, 20,148,182, 80, 78, 0, 88,236,236, 44,230,111,223,190, 61,224,157,119,222, 73,
- 46, 41, 41, 89, 12, 0,110,110,110, 95, 2, 8, 6,144,223,232, 51,108,217,114,224,201,140, 25, 51,178, 36, 18,201,226,230, 56,
- 71, 3,237,189, 2, 3,251,173, 76, 76,164, 73,141,134,168,184,114, 69, 86, 94, 86,166,127, 88, 94,206,223,125,231, 78,204,103,
- 95,126,201,244,242,246,198,165, 19, 39,156, 42,148,202,114,169, 70,163, 46, 43, 43,163, 13, 6,195,117, 11,234, 30, 34,118, 22,
-243,183,126,187,249,182, 13,147, 97, 18,123,122, 16, 76, 7, 7,138,228,139,216, 12,138,212,180,107,235,207, 6, 16, 98,238, 26,
-177, 88,172,201, 3, 6, 12,224, 31, 56,112,128, 8, 13, 13,133,157,157, 29,174, 92,185,130,187,119,239,162,186,186,154,212,235,
-245,232,210,165, 11,190,250,234, 43,120,123,123,163,166,166, 6, 5, 5, 5, 78,108, 54,219, 89,175,215, 55,215,158,207,244,167,
-143, 63,254, 24,110,110,110, 48, 24, 12,168,170,170,130,193, 96,128, 80, 40, 4, 0, 20, 21, 21,225,196,137,227,150,244, 37,179,
-160,105, 26,175,188,242,138,156, 32,136,244,231, 45, 90,173,225,244,240,240,248,173,188,188, 98,112,191,126,253, 80, 93, 93,173,
- 95,190,124, 57,194,195,195, 17, 16, 16, 96,182,156,238,238,238,179, 12, 6,195, 82, 0,208,233,116,187,185, 92,238,219,123,247,
-238,117,108,156, 34,164,222,146, 85, 38,169,172,190,126, 59, 53,115,193,172,177,175, 37,222, 72, 41,212, 49, 71, 20, 72,239, 31,
-151, 54, 81,206,197, 44, 22,251,231, 54,109,218,124, 59,119,238, 92, 55, 7, 7, 7,104, 52,154,207, 74, 75, 75, 49,123,246,108,
- 0,192,144, 33, 67,194,153, 76,230,233,105,211,166,193,199,199,231, 73, 85, 85, 85, 65, 82, 82,210, 12,165, 82,153,242,162,237,
-105, 33,172,156, 86, 78, 43,167,149,243,133, 97,169, 22,249, 31, 69, 9,158, 13,231,176,237, 25,161, 21, 19, 19, 67,196,197,197,
-209, 22, 84,172,210,211,211,211,139,199,227, 1, 64,101,107, 75, 97, 50,153,230, 56, 58, 58, 74, 22, 47, 94,220, 51, 32, 32, 64,
- 59,103,206,156,148,252,252,252, 37,141,143,105,219,182,237,234, 31,126,248, 1, 89, 89, 89,249, 95,126,249,229,213,202,202,202,
-214,230, 49, 91, 68,211,216, 88,103, 29,171, 56,113,226, 68,120, 98, 98,226,187, 27, 54,108,112,126,239,189,247, 88, 31,124,240,
-193, 36, 0, 95,155, 35, 97, 48, 24,202,166,150, 11,155,130,155,155,155,150,193, 96, 52, 27, 36, 46, 6,224,113,217,236,190, 43,
- 19, 19,105,109,126,190,114,231, 55,223,216,108,189,117,107,153,158,166, 93,196, 98, 49,122,189,250,106, 45,151,193,168,144,148,
-150,154,196,237,219, 51,242, 78,159,118, 82,177,217,197, 7, 14, 28,144, 86, 86, 86, 30, 51,107,194, 35, 8,153,137,166,181, 66,
- 79,111,253,216,145,253, 67,111,223,188,155, 97, 35,118, 34, 35, 58,133,134,103,100,229, 39,193,100,210, 17, 4, 97, 54, 88,160,
-173,173,109, 64,101,101, 37,100, 50, 25,156,157,157,177,113,227, 70,184,186,186, 66,169, 84, 34, 53, 53,149,246,244,244, 36, 18,
- 19, 19,225,233,233,137,242,242,114,104,181, 90,200,229,114,137, 70,163,105, 46, 55, 99, 25, 73, 50,118,145, 36,241, 22, 65, 16,
-104,215,206,247,241,143, 63,254,168, 53,153, 76, 8, 10, 10,194,168, 81,163, 16, 27, 27,139,212,212,212,122,203,147,182, 77,155,
-182,143, 73,146,104, 83,167,149, 94,216, 2, 83,159,218,167,184,184,120,244, 11,222, 52,164,187,187,251, 36, 63, 63,191,119, 39,
- 78,156,168,103,179,217, 80, 40, 20,245,109,161, 31, 60,120, 72,205,176, 97, 49,182, 39, 79,158,108,182,156, 58,157,110,233,147,
- 39, 79,220, 84, 42, 21, 6, 13, 26,244,193,250,245,235, 5,108, 54, 27, 0, 96, 52, 26,159,177,100,173,218,176,231,236,188,165,
- 63, 38,156,253,237, 43,247, 85,139,222,126,109,210,156,213, 9, 0,206, 52, 85, 48,173, 86,155, 43,149, 74,167, 47, 88,176, 96,
-223,150, 45, 91,236,151, 44, 89, 2,147,201, 4,154,166, 97, 48, 24, 26, 18,137,155, 76, 38, 28, 61,122, 20, 15, 31, 62, 92,253,
-156,200,178,194, 10, 43,172,248,159, 67, 43,180,200,255, 34,220,240,116,217, 16,207,139,173,255,120,100,120, 6,131,177,245,220,
-185,115,157,122,247,238, 77, 69, 69, 69,133,158, 57,115, 38,244,201,147, 39, 41,117,214,131,208,168,168,168, 80,177, 88,140, 77,
-155, 54, 41, 25, 12,198,214, 23, 60, 77,195, 67,175,180,180, 52, 25,192,250,216,216,216,117,179,102,205,130,171,171,107,112, 73,
- 73,201,127,180,206, 34, 14, 39, 98,218,198,141, 6,166, 94, 79,126,191,126,189,232,155,132,132,117, 7, 15, 29,162, 94,121,229,
- 21,130,166,105, 60,184,127,159,247,213,119,223,241, 39,140, 28,153,159,153,155,107, 56,126,246,172,190,236,201,147,170, 39,229,
-229, 75, 1, 84,153,227,215,235,245,255,202,206,206,118,239,213,231, 21,143,203,183, 82,238,142, 29, 57,164, 31,147, 34,137,156,
-252,162, 59,110,174, 78,182,151, 18,226, 85,122,189,254, 95,230,120, 20, 10, 69,158,193, 96,112,160,105,218,249,210,165, 75,112,
-118,118, 70,117,117, 53,244,122, 61,180, 90,173, 86,169, 84,114, 43, 43, 43,161, 86,171,161,209,104, 32, 18,137,240,224,193,131,
- 50,131,193,112,177, 57, 78,163,209, 56,141,195,225,124,193,100, 50,217, 44, 22,171,248,206,157, 59,144,201,100,109,237,236,236,
-190, 54, 24, 12, 40, 46, 46, 70, 98, 98,226, 71, 34,145, 40, 31, 0,184, 92, 46,216,108,142,163, 70,163, 49, 0,120,242,162,109,
- 78,211,244, 11, 95, 47, 87, 87, 87,111, 30,143,183,242,147, 79, 62, 14,234,216,177, 19,202,203,203, 97, 50,153, 32, 16, 8,160,
- 84, 42, 33, 18,137,208,163, 71,143,188,149, 43, 87,150,208, 52,102,182, 32, 6, 25,117,215, 7,179,102,205, 18,136, 68, 34, 20,
- 22, 22, 34, 48, 48,176, 65,104,149,148, 87, 62,184,118, 59, 37, 99,193, 59,227,250,236, 63,145,144,126,246,210,157,244,145,131,
- 94,237, 72, 16,116,219,150,202, 40,145, 72,202, 41,138,154, 51,107,214,172, 47, 2, 2, 2,218,209, 52, 13,127,127,127, 12, 24,
- 48, 0,167, 79,159, 70, 86, 86, 22, 20, 10,133,241,198,141, 27,191,150,148,148,252,110, 29,194,173,176,194, 10, 43,254, 86,252,
-193, 55,235, 25,139,214,127, 18, 18,137,164, 60, 35, 35,227, 76, 82, 82, 82,204,248,241,227,113,233,210,165,241,103,103, 1, 0,
- 0, 32, 0, 73, 68, 65, 84,169, 0, 22, 0, 0,135,195,153, 58,126,252,120, 36, 37, 37, 33, 35, 35,227,140, 68, 34, 41,255, 43,
-206,201,102,179,213, 90,237, 83,227, 20,151,203,229,182,242,231,109,235,150, 12, 1,160,109, 11,159, 53,111, 26,161, 40,183,176,
- 65,131,168,234,187,119,101,219,111,222,252, 98,223,190,125, 84,207,158, 61, 9,189, 78, 7,163,201, 4, 95, 95, 95, 34, 42, 58,
- 90,176,107,223, 62, 7,163, 66,145,184,234,147, 79,174,108,155, 54,173, 54,187,206, 15,204, 28, 52, 26,205,119,239,206,158, 30,
-157,112,233,138, 71,112, 96,123,135, 51,231, 18,146, 29, 29,109,249, 1,126,126,130,202,234, 42,227,146, 69, 31, 81, 26,141,230,
-123,115, 60, 42,149,234,104,124,124,252, 72, 47, 47, 47,231,148,148, 20,104,181, 90, 24,141, 70, 68, 69, 69,129,166,105, 14, 0,
- 19, 69, 81,200,200,200,128, 78,167,147,100,103,103, 23,231,228,228,112, 0,172, 53, 83,190,199, 26,141, 6,233,233, 79, 87,237,
- 60, 61, 61,251, 15, 29, 58, 20, 6,131, 1,131, 6, 13,194,241,227,199,251,167,167,167,127,211, 88,243,253,217,107, 94,103, 33,
- 11,114,119,119,143,173,251,200, 34, 39,120, 15, 15,143, 80, 95, 95,223, 45,107,215,174,101,121,122,122,130,166,105,216,219,219,
- 65,169, 84,162,162,162, 18,193,193,193,240,242,242,194,218,181,107, 1,224,215,150, 44,110, 38,147, 9, 37, 37, 37,200,203,203,
- 67,110,110, 46,188,188,188, 64, 16, 4,228,114, 57, 12,134,167, 57,185,249,114,217,201, 31,118,253,222,247,208,150,165, 33,221,
-194,252,189,111, 38,167, 73, 38,143,238,207,247,247,241, 14, 40, 79, 89, 78, 2,203,155, 77,186, 92, 92, 92,156, 83, 92, 92, 60,
- 94, 34,145,176,106,106,106, 34,251,247,239,191, 41, 58, 58, 26,201,201,201,184,114,229,202, 4, 14,135, 35,209,233,116, 6, 87,
- 87,215,153, 4, 65,136,116, 58,221,254,202,202,202, 18,235,120,104,133, 21, 86, 88,241,151,163,222, 71, 11,141,254,182,206,162,
-245,127,236,157,119,120, 20, 85, 27,197,207,108,223,108,122,217,144, 66, 2,132,146, 16, 2, 4,164, 72, 15, 8,210,130,116, 80,
- 41,130, 74, 19, 69,164, 8, 22, 64, 44,128, 74, 83,145,170,210,123,211,128, 64,162,180, 72, 64, 58, 36, 36,129, 4, 82,119,211,
-203, 38,219,167,220,239,143, 20, 19, 72,217, 77, 98,129,111,126,207, 51,207,236,206,206,156,185, 83,246,206,153,247,182,192,192,
- 64,219,164,164,164, 73, 77,155, 54,149, 2,128,141,141, 77,155,230,205,155,207, 79, 76, 76, 44,178, 54, 53, 58,157,238,192,238,
-221,187, 95, 92,179,102,141,100,200,144, 33, 45,142, 28, 57,210, 5, 0,134, 12, 25,210,194,222,222, 30,187,119,239, 54,235,116,
-186, 6,235, 19,137,166,233,222,157, 59,119, 70, 94, 94, 30,146,146,146,172, 42, 66,249,229,151, 95, 20, 40,169,151, 85,227,178,
-154, 96, 76, 38,103, 39,111,111, 65,250,217,179,230, 60,141,198,179,119,159, 62, 20,109, 54, 67, 32, 16, 32, 55, 55, 23, 41, 41,
- 41,112,116,114,162, 98,239,223,183,219,182,112,225, 47, 77,131,131,165,172,201,228,106, 69, 50,181, 57, 89,153, 83,222,158,253,
-214,209, 61,123,246, 42, 11, 52,154, 4, 27, 27,133, 81, 38,147,120,204,121,251,109, 54, 47, 47,111, 50,128, 98, 11,116, 86,238,
-217,179,103,208,160, 65,131,110,251,250,250,186,103,103,103,123, 20, 20, 20,176,121,121,121, 66,148,212,181,162, 0,224,236,217,
-179,208,104, 52, 12,203,178, 23, 80,210, 23,150,201,210,132, 54,105,210,196,177, 83,167, 78, 33, 74,165, 18,133,133,133,112,117,
-117, 69,135, 14, 29, 66,132, 66,225, 15,201,201,201,133, 13,121,215,135,135,135,219, 19, 66,158, 39,132, 96,208,160, 65, 22,109,
-195,178,236,212,161, 67,135, 74, 40,138,130, 94,175,131, 92,110, 3, 91, 91, 59,216,219, 59,192,223, 63, 0, 42,149, 10, 3, 7,
- 14, 52, 37, 36, 36,124,175, 86,171, 15,212,162, 5,149, 74,133,236,236,108,164,164,164, 32, 39, 39, 7, 0,144,147,147, 83, 94,
- 57,191, 33, 40, 44, 44, 28,222,189,123,247,121, 51,103,206, 4,195, 48, 24, 62,124, 56, 82, 83, 83, 87, 63,122,244,104,191,151,
-151,215,132,169, 83,167, 42, 93, 93, 93, 49,111,222, 60, 27, 0,159,240,249, 33, 15, 15, 15, 79,131,243,120, 29,173, 39, 35, 90,
- 53,149,137,122,120,120,244,162, 40,234, 35,189, 94, 47, 45, 43,146,161, 40, 74,170, 84, 42,143,235,245,250, 21,106,181,218,170,
- 74,113, 5, 5, 5,154,135, 15, 31, 30,143,138,138, 26, 59,106,212, 40,132,135,135, 79, 6,128, 81,163, 70, 33, 42, 42, 10, 15,
- 31, 62, 60, 94, 80, 80,208, 32, 3,144,122,123,123, 15,238,211,167,207,168,206,157, 59, 35, 44, 44, 12, 44,203, 94,178,102,251,
-138, 45, 12, 81, 69,171,195,178,101, 22,137, 9,133,160, 40,170, 60,154,145,147,157,141,248,184, 56,228,229,231,195,104, 48, 64,
-171,211,177,254,205,154,233, 11, 77, 38, 49, 5, 88, 91,246,149,124,253,234,229, 20,157, 86,235,238,234,236,162, 87, 40,100, 40,
-208, 20, 74,174, 93,189, 92, 12, 32,193, 66, 13, 19, 33,164,207,175,191,254,186, 68, 40, 20,142,179,179,179,195,172, 89,179,132,
- 33, 33, 33,144, 72, 36, 48, 26,141, 40, 40, 40,192,238,221,187,179, 89,150,245, 43,221,198, 78,161, 80,236, 16, 10,133,105, 69,
- 69, 69, 31,213,186, 3,147,105, 72,104,104,168,200,100, 50,225,179,207, 62,195,210,165, 75, 49,104,208, 32,209,213,171, 87,135,
- 0,216,211, 80,119, 60,199,113, 24, 48, 96, 64,197,202,240,247, 44,217, 78, 44, 22,183,109,217,178, 37,178,179,179,145,157,157,
- 13,165, 82, 9, 47, 47, 47,120,120,120, 96,245,234,213,100,253,250,245,167,204,102,243,247, 57, 57, 57,153,150,164, 33, 49, 49,
-177, 60, 50,104, 48, 24,160,213,106,145,154,154, 90, 94,116,168,183,117, 24, 52,123,202,176, 96,173, 94,175,187,114,231,126,202,
- 71,239, 76,232,166,213,235,117,247, 31,165,196, 3,223,112, 22,220,223,211, 38, 79,158, 60,109,236,216,177, 40, 46, 46, 70, 84,
- 84, 20,122,244,232,129, 47,191,252,210,243,194,133, 11,239,117,238,220, 25, 98,177, 24,231,206,157, 3,195, 48,169,124, 94,200,
-195,195,243, 95,230, 41,173,159, 85, 35, 53, 70,180,124,124,124,156, 88,150, 93, 48,116,232,208, 1, 35, 70,140,192,192,129, 3,
- 43,253,190,103,207, 30,251,195,135, 15,175,248,230,155,111, 6,153,205,230,149,214, 20,245,113, 28,119,116,207,158, 61, 67,186,
-117,235,166,232,219,183,111,115, 0,144,201,100,166, 61,123,246,232, 56,142, 59, 90,135, 99, 41,235,136, 49, 19, 0,188,188,188,
-218,139, 68,162, 81,131, 7, 15,110, 63,101,202, 20, 68, 71, 71, 99,247,238,221, 15,252,253,253, 35, 51, 51,173,170, 95,157, 84,
- 75,171,195, 21,181, 69,183,132, 82,105,110, 65, 70,134,147,157,175,175,216,217,222, 94, 29, 22, 22,230,211,191,127,127, 42, 53,
- 53, 21,249,249,249, 48, 24, 12,184,122,245, 42, 39, 2,146, 69,206,206, 84,114, 84, 20, 37,148, 74,115, 81,185, 37, 95,173,248,
-120, 58,183,250,120,209,140,166, 6,163, 33,168,176,176,144, 17,137,197,226,198, 30, 78,169,113, 9, 86,149,196, 25, 21, 10, 69,
- 39, 0, 34,142,227,116, 46, 46, 46,138, 51,103,206, 64, 42,149,130,162, 40,180,107,215, 14,114,185, 92, 66, 8, 73, 1, 0,123,
-123,123,233,230,205,155, 29, 39, 76,152,112,177, 54,225,142, 29, 59,138,101, 50,217, 75,254,254,254,136,138,138,194,221,187,119,
-147,163,162,162,154,116,236,216, 17,190,190,190, 47,121,122,122, 30,188,113,227, 6,221, 16, 55,118, 73,139, 85,235, 43,195,179,
- 44,203, 81, 20, 5,129, 64, 0,142,227,144,157,157, 13, 63, 63, 63,108,216,176, 1,235,214,173,251, 76,173, 86,255,108,133, 22,
-171,209,104, 96,107,107,139,187,119,239, 26,135, 14, 29, 42, 19, 8, 4,120,240,224, 65,185,209,114,119,115,105,211,163,115,219,
-214,159,173,221,121,218, 86, 38,147, 13, 12,233, 20, 24,115, 63, 57,141, 16,170,214, 98,227,192,192, 64,137,159,159,223,228,177,
- 99,199, 34, 49, 49, 17, 43, 86,172,200, 81,171,213,103, 79,159, 62, 61,122,230,204,153,194, 30, 61,122, 32, 55, 55, 23, 63,253,
-244, 19,115,237,218,181, 31, 51, 50, 50,118,242,217, 56, 15, 15, 15,207,127,196,104,249,248,248,140,149, 72, 36,243,198,143, 31,
- 47, 12, 8, 8, 64,102,102, 38, 28, 28, 28,104,138,162,196, 0,224,228,228, 68,219,216,216, 96,198,140, 25, 8, 14, 14,238,181,
-112,225,194, 30, 34,145,104,131, 74,165,218, 97,201,142,179,178,178,116, 2,129,224,208,172, 89,179, 86,222,188,121,195, 15, 0,
-254,252,243,207,135, 42,149,106, 81, 86, 86,150,206,202,227, 40,235, 20,147,146,201,228, 87, 90,181,106,245,168, 83,167, 78, 14,
- 35, 70,140,128, 82,169,196,245,235,215,177,106,213,170,251, 38,147,105,201,249,243,231,153,127,250, 36, 51, 70, 99,198,181, 99,
-199,236, 67, 94,125,213, 97,206,208,161, 95,191, 53,107,214,154,143, 63,254, 88, 20, 16, 16, 64,233,116, 58, 92,185,114,133, 28,
- 62,124,152,254,233,211, 79,215,193,214, 86, 28,117,248,176,212,100, 50, 37, 91, 25,185,235,211,179,119,175,128,175,215,124, 3,
-131,190, 24, 87, 46,157, 64,126,126, 54, 54,111, 57, 18,224,237, 77,250,164,167,167,159,183, 84,139,162, 40,255,240,240,112,119,
- 66, 8,164, 82, 41,150, 47, 95, 14, 47, 47, 47, 56, 56, 56,160,168,168, 8,239,189,247,158,227,187,239,190,235, 8, 0,209,209,
-209,229,221, 51,212,134, 74,165,234, 62, 99,198, 12,123,134, 97,112,234,212, 41, 19, 69, 81, 31, 69, 68, 68,252,208,174, 93, 59,
-105,175, 94,189,236,119,238,220,217, 3,192,185,134, 50, 90,117,220,238,193,153, 51,103, 58,143, 27, 55,142,136,197, 98,170,160,
-160, 0, 78, 78, 78,216,176, 97,131, 86,173, 86,159,176, 82,107,249,162, 69,139,150,148,126,222,254,209, 71, 31,189,177,114,229,
- 74,101, 70, 70, 70,121, 84, 51, 43, 39,239,247,238, 67,223,102,115, 11, 10, 77, 63,174, 93, 56,198, 70, 46,147,126,180,242,199,
-115,180, 16,151,107,189,175, 24, 70,170, 80, 40,164,132, 16, 28, 58,116, 8,201,201,201, 83,115,115,115, 51, 88,150, 61,178, 96,
-193,130,249, 1, 1, 1,205,226,226,226,146,139,138,138,190,204,202,202,122,196,103,119, 60, 60, 60, 60,127, 27,101,149,224,203,
- 90, 31,158, 64, 73,113, 98,245, 70,139,101,217, 25,167, 79,159, 22,114, 28,135, 45, 91,182,224,218,181,107, 68,161, 80,124,164,
- 80, 40,190,179,177,177, 97,245,122,253,244, 55,223,124,115,194,210,165, 75, 5,189,122,245, 66, 84, 84,148,192,207,207,111, 50,
-128,138, 70,171, 63,106,232,107,163,176,176,240,106,102,102,134, 95,133, 14, 42,253,100, 50,249,213, 90, 14,230,113,205,199, 59,
-197,236,186,124,249,114,173,167,167,167,233,238,221,187,216,180,105, 19,119,237,218,181,179, 82,169,116,179, 90,173, 54, 90,168,
-217, 16,148,107, 74, 25,230,250,174,249,243, 3,159, 27, 62,156,123, 99,222,188, 98,137,141,205, 59, 95,127,243,205,194,130,162,
- 34, 47, 80, 20,113,117,116, 76,222,178,124,249,138, 65, 47,189, 84, 28,125,254,188,252,102,120,184, 88, 73,211,183,172, 73,103,
-122,122,250,249,115,231, 46, 98,251,214, 53, 48,155,141, 80,167,151,248,180,156,220, 66,212, 98,178,158,208,100, 24,166,112,244,
-232,209, 18, 0, 54, 19, 39, 78,148,102,101,101,161, 69,139, 22, 0, 0,141, 70,131, 19, 39, 78,160,117,235,214, 0,128, 59,119,
-238,148,127,174, 45,157,182,182,182, 47,245,232,209, 3,201,201,201,136,142,142,254, 77,173, 86,231, 2,248, 45, 53, 53,117, 72,
-231,206,157,113,244,232,209, 97, 53, 24, 45,171,174,145,133, 70,235, 9, 77, 27, 27,155, 69, 71,142, 28,153,122,233,210,165,113,
-243,231,207, 23,191,240,194, 11, 0,128,162,162, 34, 29, 0,214, 26, 77,189, 94,191, 25, 64,121,203,217,164,164,164, 93,243,230,
-205,187, 48,119,238, 92,101, 89,250,178, 99,126,142,202, 6,162,130, 66,166,126,220,189,115, 80,192,231,235,119,159, 78, 73,205,
-220, 93,120,239,120,161, 37,199, 78, 8, 1, 77,211,224, 56, 14, 46, 46, 46,218,220,220, 92,100,101,101, 61,202,202,202,154,149,
-144,144, 96,213,177, 55,228, 61,207,107,242,154,188, 38,175,249,127,138,229, 61,195, 19, 66, 24,142,227,112,238,220, 57, 28, 57,
-114,132, 53,155,205,211,212,106,117,197,222,170,191,185,126,253,122,248,232,209,163,119,196,197,197, 9, 99, 98, 98, 64, 8, 97,
-173, 73,141,193, 96,160, 41,234,201,101,245, 61,202,237,219,183, 35, 35, 35,195,156,154,154, 26,193, 48,204,209,122,182, 94,172,
-119,171,195,237,128,241, 21,147, 41, 98,105,207,158, 3,150,132,135,203,222,248,224, 3,227,107, 83,166, 44, 96, 77, 38, 90, 40,
-145,112, 82, 91, 91, 1, 43,147,137,163,207,159,151,175,159, 57,211, 69,111, 52,158,218,109, 69, 5,243,178,136, 86, 72, 72, 47,
-188,246,198, 92,232, 43, 68,180,162,174,198,195,104,134, 85, 17, 45,163,209, 24,164, 86,171, 33,151,203, 83, 0,120, 76,154, 52,
- 9, 28,199, 65,175,215,163,168,168, 8, 42,149,170,112,202,148, 41,108,169,121, 18,141, 26, 53,202,193, 18,221,230,205,155,123,
-137,197, 98,156, 58,117, 10, 98,177,248, 4, 0,136,197,226, 19,225,225,225, 67, 94,126,249,101,120,123,123, 55, 79, 76, 76,164,
- 80, 75,253, 52,247,160,225, 7, 8,208, 10, 20, 90,150,132,224,208, 82, 25, 52,252, 54, 5,220, 47,237, 53,254, 94,199,142, 29,
- 1, 11,235,101, 85,164,180,113,199, 58,154,166, 15, 46, 92,184,112, 86,215,174, 93, 95, 92,186,116, 41,133,210,174, 26,234, 73,
-124,122,122,122,239,197,139, 23,159, 38,132, 84, 50,253, 89, 57,121,191,119, 11,157, 77, 10, 10, 10,111,102,223,251,249,142, 85,
- 17, 83,134,169, 87,119, 22, 60, 60, 60, 60, 60, 13, 22,213,122,130,106,141, 22, 69, 81, 91,250,244,233, 51, 13,128,144,162,168,
- 77, 42,149,234,137,204, 95,173, 86,199,123,121,121,125,213,172, 89,179,233, 0, 8, 69, 81, 91,172, 76, 84, 38, 33, 88, 37, 16,
- 80, 11, 75,204, 93,157, 58,168, 44, 27,150,100, 33, 0, 74, 32, 16,238,184,113,227,198, 7, 41, 41, 41,217, 22, 70, 32,106,164,
- 33, 90, 29, 2,192, 94,224,209,248,228,228,211,243,218,182,237, 63,104,230, 76,180, 31, 52,200,193,171, 73, 19, 86,111, 54,115,
-119, 34, 35,169, 75,135, 14, 73,110,134,135,139,245, 70,227,169,163, 64,138,181,233, 76, 79, 79, 63,255,251,217,243,103,198,140,
- 26,242, 98,243,102, 94, 37,166,225,145, 10, 57,121,133,103,172, 49, 89,143,153,222,225, 27, 54,108,248, 89, 34,145,136, 42, 14,
-101, 99, 54,155,243,140, 70, 99, 16, 0,228,231,231,123,109,217,178,101,159, 64, 32, 72,174, 77, 47, 38, 38,230,248,146, 37, 75,
- 70, 37, 37, 37,157, 73, 77, 77, 77, 2,128,148,148,148, 36,154,166,119,168,213,234, 81,201,201,201,135, 97, 65, 35, 0, 2,180,
-138,142, 60,216, 14, 0,130,122,142, 69,116,228, 65, 57,128,118, 65, 61,199, 2, 0,234, 58,150, 97, 69, 74,187, 65,248, 40, 42,
- 42,106,207,139, 47,190,248, 38,234,209,167,215,227,102,203,108, 54, 55,121,124, 97, 89,100,203, 26, 33,147,201, 68,235,245,122,
-134,101, 89,145,217,108, 38, 38,147,137,230,243, 57,158, 90,224,199,190,228,121,106, 33,132,116, 6,160, 44,203, 54, 75,231,202,
-199, 62,155, 80, 58, 92, 96, 89, 86, 89,250, 61,155,162,168,171, 21, 52,202,151, 91,176, 45, 0,228, 0,184, 77, 81, 84,117, 65,
-144, 45,213,125,175,214,104,169, 84,170,195,176, 96,208,104, 75,215,171,129,197,165,227,196, 1,117, 31,135,173, 92,131,101,217,
-204,148,148,148,122, 95, 80,129, 64,240,104,216,176, 97, 86,173, 95,219, 58,251,129,228,183,141,198,157, 97,223,126,219,225,212,
-166, 77,222, 44,195,184, 82, 0, 17, 74,165,185, 38,147, 41, 73, 73,211,183,172,141,100, 85,138,198, 60, 76, 31,152,248, 48, 29,
- 45, 91,182, 36, 15, 30, 60,104,136, 76,245,150, 86,171,245,169,237, 22,208,233,116,189, 44, 52,131,123,211,211,211,247, 86, 97,
-216,247,169,213,234,125, 86, 60, 41,238,151,154, 42, 1, 71,113, 99,130,122,142, 61, 4,128, 43, 27, 84,186, 33,201,200,200,136,
- 67,105, 63,111,255, 53,146,147,147,141, 20, 69,237, 90,181,106,213,196,155, 55,111,238, 87,169, 84, 70, 62, 43,230,225,225,121,
-150, 77, 22, 69, 81, 97,165,223, 67, 75,131, 66, 97,143,127, 46, 91,167,108,189,138,235,148,105, 60,190,188,166,109, 1, 96,209,
-162, 69, 31,172, 88,177, 66, 1,192,210,193,152,235, 60,168,244,223, 69,230,127, 68,163,162, 41,216,250,119, 28,232,183,128, 9,
- 12,115, 25, 76,133, 58,249,116,195, 6, 34, 30, 60,120,240, 76,191,181,150, 13, 42, 93,129,182,255,175,153, 79, 82, 82,210, 6,
- 95, 95,223,205, 42,149,138, 1, 15,143, 5,207, 43,254, 20,240, 60,165, 40,171, 50, 70,213,152,178,208,154,126,175,244,226, 94,
-197,122, 85,125,167, 40, 42,108,197,138, 21,161, 86,164,183, 60,162, 37,224,175, 29, 15,207,211,205,191,209,146,150,135,135,135,
-231,153,120,243,120, 44,138, 85,102,190, 30,255,190,104,209,162, 15, 80,115,137,147, 39, 74,162, 88,158,165,223,203,235,107, 81,
- 40,105, 57, 80, 21,214,180, 38,232, 95,135,227,139,224, 53,121, 77, 94,147,215,228, 53,121, 77, 94,243,255, 78,179, 54,237,136,
- 42, 12,209,208,234,138,250,106, 42, 70,124,252,115,109,219,214,182, 46, 69, 81,213,117,243, 83, 86, 84,248,248,252,111,167, 63,
-175,201,107,242,154,188, 38,175,201,107,242,154,188,102,125, 32,132,116, 38,132, 12, 69, 73,241, 55, 33,132, 12, 37,132, 12, 90,
-180,104,209,226,178,101,139, 22, 45, 90, 76, 8,121,161,108,189,210,117,202,183, 41, 91,246,248,252,241,101, 53,173, 91, 67, 18,
-167, 61,246,185,252,251,127,165,142, 22, 15, 15, 15, 15, 15, 15, 15, 79,149,148,181, 24,172, 16,109,202, 6,112,103,197,138, 21,
-249, 21,234, 78,101, 3,184, 5, 32,184,116,189,236, 82,147, 86,177,110,149,169,244,187,169,138,117, 76,150,172, 91, 13, 91,170,
-249,204, 27,173,234, 8,246, 16,124,234,219,216,189, 83,233, 5, 0, 41, 29, 4,152, 43,237,175,136,148,117, 92,196,113, 32,132,
- 64,149, 85,112,253, 78, 22, 62,174,235,254,252,189,224,226, 46,151,175,227, 8,233, 89,186,232,124, 97,174,113,110,180, 6, 5,
-150,106,180,110,132, 64,185, 0, 11, 56,130,246, 0, 32,160,112,219,192,225,171,216, 76,235,251,147,170,234, 62, 15, 82, 98,154,
-212, 70, 49,222,209,201,185,101,126,126,206,125,179,193,120, 48, 38, 27,155, 81,135, 10,182,205,157,241, 60, 71,240, 1, 0,129,
- 88,128,213,247,243, 44,110,201,193,195,195,195, 83,223,232, 72,189,250,197,163, 40,138,173, 66,147,170,167, 38,223, 80,193, 2,
-179, 85,197,226, 63,171, 88,118,245,191,148,110,171,140, 86, 27, 37,102,130,194, 50, 0, 4, 4,159,196,100, 99,163, 85,219,123,
-162,191, 92, 40,220, 6, 64,104, 48,179,243, 8,135, 11, 85,158, 76, 1,122,203, 37,194,213, 0, 56, 3,203,190, 30,163,182,188,
-190, 88,144, 55, 6,137, 56,193, 46,142, 16, 49,203,145, 29, 32, 8,179,147,224,143,203,233, 48, 88,147, 86,223,198,238,157,142,
-253,169,126,241,236,198, 57,232,218,190, 5, 8,203, 0, 28, 13, 69,175, 5,248,109,237, 36,116, 13,244, 5,225,104,128, 99, 96,
- 55,248,107, 12,110,235, 72,238,100,213,109, 28,108,127, 47,184, 52,113,115,191,187,117,235, 54, 15,175,230,109, 40,142, 49, 35,
-238,207, 51, 19,222, 93,184,164, 95, 16, 10,219, 90, 98,182,218,123,226, 13,223,166, 1, 11,230, 46, 91, 35,244,244,242,177,229,
-104, 35,147,241,232, 94,199,111,190, 92,114, 88, 34, 72, 94,125, 91,141,109,150,222,203,109,148,152, 46,146, 73,199,218,200,109,
- 91,234,116, 69, 15, 88, 51,125, 80, 32, 22, 13,250,234,235,117, 29, 66, 6, 12,177, 99,139, 50, 4, 52,135, 54, 7,246,239,107,
-242,237,134,239,135,220, 85,179, 47, 1,224,172, 57,102,142, 96, 97,252,206,105, 67,196, 34, 33, 21, 56,117,171, 16, 96,234,100,
-180, 2,221,241, 10, 69, 80,107,247, 18,132,194,197,123, 89,216, 91,151,125,180,118,199, 15, 20,129, 63, 40, 28,162, 8,246,197,
-100, 35,139,207,242,120,120,158, 45, 4, 2,193, 89,142,227,250, 54,176, 49,120,158, 16,114,153, 63,187,255,223, 88, 23,209,162,
-240, 89,116, 66,170, 51, 88, 51,130,252,155,127, 10, 88,103,180,228, 66,225,142,171,247, 51, 61,192,152,177,245,243, 89,251, 77,
- 52,192,208,102,176, 12, 13,150,161,193, 48,102,176, 52, 13, 66, 27,177,228,199,179,128,169, 8,157,218,182,218, 1,176,158,150,
-238, 67, 76, 4,187,174, 71,158,113,161, 76,133,216,187,113,197,219,169,217,197,111, 71,220, 86,229,180,113,215, 47,142,201,194,
- 79,214, 24,130,179,155,230, 96,247,209, 19,105,235,127,208,198,114,132,192,197,193, 38, 96, 66,104,180,207,206,227,103, 83,215,
-237, 48,196, 2,128,163,173, 52, 96,242,237,251,190,245,185, 8,238,114,249,186,205,223,127,235,225,233,106, 67, 49,151, 86,130,
- 97, 89,248, 52, 25, 42, 92, 60,123,130,231,103,107,183,173,133,198,248, 90, 77,219, 7,184,163, 77,211,102,129,243,118,156,184,
-228,171,213,100,153,206,236,249, 32, 1, 70,208, 30,222,129,226, 79, 87,172, 17,126,248,254,156,247, 76,108,218,149,184, 44,196,
-212,150,215, 4,186,227,248,138,149, 95,183,239, 55, 56,212,142, 43,206, 22, 26,180,197,254, 91,127,220,182,172,117,251, 46,138,
- 94,109, 27, 75,178, 14,206,160,244, 69,121, 48, 11,228,178,126, 65,253, 29,244, 19, 95,166,183,110,223, 61, 59, 38, 11,223, 88,
-115,204, 44,249,235,222,227,184,186,247,186, 78, 17,244,186,121,249,236,116, 86,117, 21,132,165, 1,214, 92, 62, 7, 75,131,112,
- 37,243,174, 51,126, 4, 80, 55,163, 37, 32,120, 49, 34,242,170,103,102,134,186,243,218,175,191, 88, 76,174, 94,253, 21, 44,118,
-221,203,195,121,107, 13, 38, 0,127, 63, 87,225,105,154,133, 49,181,128,245, 47, 91,216,207, 95,214,221,211,142,122, 33,165,144,
-186,112, 49, 65,127,158,207,154,120,120,254,149,136, 9, 67, 8, 17, 53,176,230, 16, 66,200,201,122,202, 44, 0,240, 70,233,231,
-109, 0,190,106,128,164, 53, 6,224, 81,250, 57, 3, 64, 26,127, 7,212,139,199, 43,191,215,185, 31, 45, 57, 8, 7, 28, 26, 1,
- 0, 54,214,166,130, 0,114, 80, 66,128,214, 98,248,224, 1,112,115,247, 0,104, 29, 96,214, 1,180, 30,160,181, 0,173, 71,142,
- 58, 25, 48,107,129,196, 95,193, 16, 34,179,250,112,141,133, 64,252, 65,188,208,209, 23, 74, 71, 57,230, 12,111,227,182,229, 84,
-252,182,109,103,226,250,199,100, 97,188, 69,105, 37, 4, 93,219,181,196,250,109,218,216, 95,110,100, 15, 4,128, 33,193,174,167,
-186,182,105,226,179,110,135, 33,246,228,157,252, 65, 0, 48, 40,200,225,215, 46, 1,158,190, 92, 61,186,167,225, 8,233,229,213,
-180, 37,197,222,220, 12, 78,147, 6,141, 70,143,180, 71, 59,225,236,253,156,128,229,208,167,182,237,109,132, 88,244,206,135,171,
-196, 58, 77,166,137, 51,103,179, 74, 97,190, 80, 36,229, 40,164,159, 55, 22,115, 5,236,220,105,147,152,121, 31,127,190, 8,192,
-132,154,116,218,184, 99,246,234,213,235,218,245,232,212,218, 61,227,240, 28,170, 56, 63, 19,140, 80, 33, 27,222,173, 7,156, 90,
-181,225, 50,207,173,166,164,205,251,195,201,181, 57,210, 47,237, 65,210,229, 35, 84,207,142,163,100, 63,237,149, 76, 4,204, 85,
- 26,173,150,110,232, 57,176,119,151,253,205,125,189, 60, 9,225,192,113, 4,132, 99, 81,108,160,177,248, 64, 34, 88,150,197,232,
-129, 61, 95,176,149, 82,132,227, 56, 16,194, 33, 53, 35, 87,247,251,149,216, 23, 18,243,113,197,146, 72, 85,240,243,125,123,222,
-190,126,185, 53, 29,255, 11, 58, 77, 88, 17, 75, 1,145, 21,238,185,158, 55, 78,255,212, 26,248,177,238, 94,142, 2,155,116,106,
- 37,124,123, 79, 19,110,222,123, 74, 89,152,157, 62,249,240,206,239,199,108,220,188,121,119,108, 22,102, 88, 99,178,222,237, 45,
-141, 92,251,187,198,181, 91,115,219,236,212, 10,113, 74, 63,103,193,192, 77, 39, 99,222,137, 90,222,181,245,135, 39, 72,193,133,
- 4,195, 29, 62,223,226,225,249,103, 33,132, 52,184,217, 74, 78, 78, 86,213,199,108,121,123,123,247, 78, 79, 79,255,178,172,182,
- 10, 69, 81, 95, 54,109,218,116,201, 95, 47,170,149,222,245, 10, 89,150,157,144,158,158,126,161, 38,205,161, 67,135,122,157, 56,
-113,162, 89, 5,205,102, 0,154, 85,181,174,147,147, 19,219,189,123,247,164, 19, 39, 78,168,248, 59,164, 78,134,203,106,163, 21,
-155,114,112, 78, 71,163,186, 24, 0, 98, 45, 88,191, 82,145,159,129,102, 87,110, 95, 54,105,101, 80, 83, 23, 20,105, 77, 56,115,
- 45, 9, 44, 75,131,101,152,210,200, 22, 3,150,161, 49, 48,216, 13,221, 13, 51,240, 77, 88, 28, 24,150, 91, 81,147,230,227,152,
- 9,247, 74,135,254,227, 14,112, 28,145,202,196,130, 66,127, 31, 87,247,121,163,131, 5,115,134, 7, 65,111,102,198,237, 57,151,
-240,251,189, 44,108,181, 72,147,123,178,123, 34, 82,213, 50,150,169,245,216,107,136, 70,117,237, 31,210,203,129, 24, 11, 65,231,
- 36,162, 72, 71, 35, 49,151, 70,134,161, 0, 50, 74,109,145, 38, 71,208,190,177,183,167,226,143,253,239, 63,114, 21,106, 68,238,
- 66, 70, 34, 21, 48, 96, 57, 34, 36, 5, 49, 70,151,214, 3,196,101,245,182,106, 74,167,141,194,126, 82,239, 23,135, 58,166,236,
-153, 70,217,248, 15,132,123, 71, 31, 60,186,176, 29, 89,215,194,144,171, 74,162, 28, 12, 5,104,228,218, 2,131, 39,140,199, 87,
-227, 59,163, 72, 83, 4,161, 58,193, 81, 42,150, 57, 1,230, 42, 53, 9,139, 9,171, 87,125,238, 41, 18, 10, 74,206,103,217,196,
-210,208, 27,141, 0,203, 64, 46,226, 64,145,178,223,104,176,180, 89,209,126,212,251,179, 0,246, 74,109,199,126, 47, 11,123,219,
- 40,209, 11, 28,221,154,208,122, 80, 64,100, 76,246, 95,230, 39,208, 29,175, 60, 55,112, 74, 47, 66,225, 98, 93,174, 81, 91, 87,
-132,118,106,102,103,107,171,137, 69,218,161,183,145, 0, 57,105,212,227, 13,188, 50,117,182, 98,203,150, 45,195, 0, 50, 19,149,
-235,168,149,107,182,110, 36,156, 78,179, 88, 2, 0,122,154,108,183,151, 82, 83, 87,239,139,114,133,240,175, 17, 30,202, 34, 89,
- 9,185, 92,190,249,236, 71,113,207,207, 11, 11,105,119, 51, 36,149,162,100, 41,231, 31, 24, 11,173,185,151,172,132,215,228, 53,
-255,118, 77, 7, 7, 7,191,166, 77,155, 46,161,105,186,183, 68, 34,105,100, 54,155,193,113, 92,134, 84, 42,189,152,148,148,180,
- 92,163,209, 60,252,175, 29,251,237,219,183,173, 49, 91,181,106,138,197, 98,196,197,197, 61,176,194,108, 69, 60,182,253,174,200,
-200, 72, 28, 56,112, 0, 0, 16, 31, 31,143, 86,173, 90,217, 86,181,225,163, 71,143,108, 67, 66, 66,118, 1,240,169, 73,243,206,
-157, 59,126,191,252,242, 11, 14, 29, 58, 4, 0,136,139,139,131,191,191,127,149,137,137,140,140, 20,190,250,234,171,126, 0, 84,
-255,192, 53,122, 22, 76, 86,197,249, 95, 70, 43, 44, 44,140,132,134,134, 82,143,127,174,130, 68, 95,103,105, 71, 24, 88, 0, 72,
-180, 54, 5,247, 50,177,106,253,206,211,131,126, 59,180,161,183, 92, 34,192,210,173,243, 82,179,243,138,158, 23, 81, 37,197, 47,
- 12,129,192,217, 78, 26,181, 98,114,176,111,126,177, 1, 63,255,153,126, 33, 38,203,186, 16,105,140, 26,225, 0,231, 84,242,141,
-133, 65,159,229, 63,249,171,240,125,251, 22, 13,106, 63,119,120,123, 28,191,148, 52, 23, 96,106,237,245,157,112, 28, 8,199,148,
- 87,126, 47,125,117, 0,184,202, 3,248,114, 32, 37,203, 56,235, 34, 90,125, 0, 81,190, 59, 6,219, 43,164,223, 77,159,254,166,
- 3,157,125, 31,121, 38, 9, 82,243, 13,200,208,139, 81, 44,114, 71,122,236, 29, 86, 64, 33,188,214,144, 11, 5, 13, 97, 12, 78,
-206, 82, 59, 65,219, 1,179,188, 53,167, 62,200,151, 82,140,208, 97,228,103, 78, 57,191,173, 73, 98,180,217, 90,138, 66,173,221,
-207, 59, 58, 58,181, 50,228, 38, 9, 11,243,115,224,228, 17,132, 65,227, 66,241,201,208, 54, 40,210,104,145,157, 23, 69, 90,122,
- 58, 80,201, 23,119,227,195,193,129,200,205, 84,195, 72, 3,148,214,152,103, 48, 25,138,171, 61,143, 2,108,126,119,254,194, 87,
-154,120, 42,109,203, 26, 21, 16,142, 69,112, 96,115, 12,232,221, 21,225,145,127,224,234,157,120,112,165,141, 10, 8,199, 33, 45,
- 43, 63,211, 96,102,183, 91,117, 66, 89, 6,132, 54, 84,105,196, 80,135, 34,195,182,238, 80,176,192,199,157,253,236, 95, 95, 20,
-218,196,222, 86, 70,193, 64,179, 48,152,104, 20,253,241, 29, 92,155,182,131, 66, 46,167, 58, 66, 47,186,129,170,207,173,129,198,
-146,135,234, 2, 79, 20,103,224,213, 1, 65,239,236, 88,241,150, 45, 37, 47,185, 53,105,182,114, 36,235,143,101,157, 79,191,250,
-233,177,179, 7, 14,190,236,245,213,130, 73, 33, 3,223,219,126, 22,192, 41, 62,223,226,121, 26, 25, 51,102,140, 60, 51, 51,243,
-156,143,143, 79,155, 1, 3, 6, 40,122,245,234, 5,173, 86,139, 51,103,206, 64,171,213, 54,241,241,241,105,114,230,204,153, 81,
- 41, 41, 41, 49,141, 27, 55, 14, 57,116,232,144,197,117,104, 75, 13,144,176, 60, 11, 6, 24,138,162, 80,186,140, 42, 93, 86,231,
-113,110,165, 82, 41,146,147,147, 27, 60,178,149,158,158,254,160, 46,145,173,226,226, 98,137,183,183, 55,148, 74, 37, 88,150,133,
- 86,171,197,177, 99,199, 80, 88, 88, 8,142,227, 96, 99, 99,131,207, 86,111, 69,236,141,115,184,114,229, 10, 10, 11, 11, 37,181,
-105,166,165,165, 81,193,193,193, 48, 26,141, 96, 24, 6, 6,131, 1, 17, 17, 17,229,223, 69, 34, 17, 22,126,186, 22,241,215,206,
-225,230,205,155, 72, 75, 75,251, 71, 70, 27,177,194,139,252, 23,169,182,207,172,127,188,213, 33,203, 50,139,183,236,216, 23,181,
-120,198,120,204,126,185,191,207,242, 13, 71,250,223,203,193, 14, 0, 8,116,195,228,137,125, 91,250, 58, 41,196,248,100,207, 53,
-128,144,197,245,221, 95,116, 30,226,219, 52,226,230, 30,189,146,124,238,131,241, 29,209,220,211,161, 85,190, 52, 79,154,152,104,
-193,152,130, 28, 3,103, 59, 89,192,144, 96,215, 83,224, 56, 56,217,203, 90,131,101,224,100, 39, 11, 24, 20,228,240, 43, 0, 56,
- 40,196,173,171,138,124, 85, 71, 39, 31,241, 52,133, 76, 52,205,214,222,201,247,181, 97, 3,108,134, 12, 27,101, 99, 39,102,144,
-123,229, 12, 52,226,198,160, 93,154,192, 72,231, 33,237, 97, 2,251,219,229,123,233, 57, 69,198,121,181, 38,147,224, 66,250,195,
- 56,165, 95,251, 1,206, 57, 97, 31,102,249, 77,217,211, 76, 0, 78, 80,180,123,100,166,173,123, 23,155, 63, 19, 31, 22,115,164,
-202,136, 78, 37, 52,133,133, 73, 52, 11, 79, 61, 43,178, 79, 56,251, 19, 22, 13,110,135,252,188, 44, 24,204, 12, 10,245,140,217,
-195, 73, 46, 51, 62,188, 11,163,153,129,137,230, 32,118,242,198,153,168, 59, 57, 28, 77,255, 90,157,102, 98, 46,110, 38, 30,187,
-105, 87,113, 89,115, 55, 4,191,239, 96,115, 19,180, 30,201,105, 42,236, 56, 17,213, 49, 49, 23, 55,235,115,157, 9,199,148, 20,
- 63, 87,136,100, 81, 4,189,234, 82, 9,190,181, 59,186, 72,228,146,111,191,156,251,106,155,110,254, 46, 50, 46, 45, 10, 20,103,
-134, 45, 43,130, 94,202,194,209,167, 57, 56, 83, 17,209, 25, 12, 5,209, 64, 77, 23, 95, 8, 0,196,172,197, 87,147,130,108, 41,
-231,230, 96, 19, 79, 65,212, 97, 26,232,210,104,127, 66, 46,119,199,124,246,163,216,238,243,127,233,243,105,120,223,123,170, 19,
- 75,239,121,143,249, 46, 24,216,222,148,127, 92,243, 60,141, 4, 4, 4,120,164,167,167, 71,207,159, 63,223,101,228,200,145, 56,
-122,244, 40, 52, 26, 13,182,111,223,142,117,235,214, 97,217,178,101,160,105, 26, 91,182,108, 81, 28, 62,124,184,203,247,223,127,
-159,230,235,235, 27,148,146,146,146, 81,139,193,162, 0,200, 0,136, 75,159, 93, 20, 0,238,228,201,147, 24, 50,100, 8, 78,158,
- 60,201,149, 46, 99, 81,242,242, 83,167,177, 63,165, 82, 41,164, 82, 41, 10, 11, 11, 27,196,108,137,197, 98,216,217,217, 65, 42,
-149,162,168,168,200,106,179,197, 48,140, 48, 45, 45, 13,133,133,133, 24, 48,108, 24,214,174, 88,129,190,125,251, 98,192,128, 1,
- 32,132, 32, 34, 34, 2,253,123,180,197,248,151, 66,112,239,222, 61, 48, 12, 99, 81,122, 51, 50, 50,144,153,153,137, 65,195,134,
- 97,235,247,223,163,107,215,174, 8, 8, 8, 0,195, 48, 56,119,238, 28,198, 12,236, 1,249,136,254,136,143,143,231,111,106,203,
-163, 89, 13, 82, 71,171,222, 68,103,227, 50,119,252,124,216,203, 3,187,132, 14,235,217, 6, 91,247,255,246, 57,148,154,125, 0,
-224,106,148,125, 54,169,111,115,196,164,228,227,183,155,170,176,123, 57,104,144,214, 26, 28, 11, 55, 87, 7, 5, 32,148, 66,111,
-230, 24,135,196,218, 43, 48,115,132, 64,209,251,125, 76, 28, 22,227,211,181,141,143, 79, 89,171, 67,187, 33,107, 48,249,206, 3,
-223,206, 1, 30,190, 96,105,128,165,225, 48,126, 15,240,169,109,173,233,232,209, 76, 26,254,238,156, 57,221, 7,143, 24,103, 35,
- 85, 56,130,213,164,130,206,184,131,220,251, 23,160, 85,180, 66, 70,114, 34, 14,156,190, 82,120, 63, 45, 87, 35, 16,224, 76,102,
-161,113, 65, 98, 62,138,107,211, 53,208, 88,177,228,195,121, 67, 15,236,219,111, 47,107,222,147, 74,248,110, 72,161, 84,196,200,
-148,205,158, 19,232,228,110,228,139,237,251, 29,180, 38,172,172, 77, 71,167,213, 28,137, 56,115,106,124, 75,191,158,246,143,174,
-158,128,222, 96,132,145, 6,130,186,132,128,101,137,148, 18, 80,156,131, 80, 72,101,229,230,131,162,217,204,139,183, 30,169, 35,
-111, 37, 10,141,246, 88, 89, 99,239, 34,143,187,123, 74,248,206,176,144, 14, 0,173,199, 75,189,219, 97,237,238,223,222, 6,216,
- 41,245,187,200, 37, 17, 45, 2,244,108,163,196, 38, 66,208,243,218,177,117,173, 59,141,120, 23,214, 68,180,130,220, 48, 56,208,
-207,235,167,181,159,189,239,226,218,184,149,144,226,104, 16,143,246,128, 38,141, 80,105, 81,112,244,238, 10,214,171, 7,182,124,
-243,117, 49,199,145,125,168,161,107, 11,150, 3,184,148,243, 96, 99,143, 34, 49, 49, 17,110, 77,174, 1,148, 0,164,233, 35,152,
-153,146,205,140,102,114, 98,253,246, 95,250, 46,232,183, 34,104, 88,107,145,111,212,173,132,172,113, 83,189, 20,207,251, 10,253,
- 99,212,182,130, 28,173,150,227,243, 47,158,167, 9,131,193,112,100,213,170, 85, 46,161,161,161,101, 17, 25, 68, 69, 69, 97,219,
-182,109,176,181,173,156, 79, 14, 25, 50, 4,132, 16,151,165, 75,151, 30, 1,208,173, 58,205,238,221,187, 15,187,121,243,166,170,
- 67,135, 14,137,165,102, 75, 2, 64,112,247,238, 93, 65,106,106, 42,229,236,236, 76,188,188,188,104,149, 74,197, 1, 96,167, 78,
-157, 42, 60,120,240, 96, 75,173, 86,123,190,174, 70, 75, 42,149, 54, 72,157, 45,177, 88, 12,138,162, 32,149, 74, 33,145, 72, 64,
- 8,177,202,108,177, 44, 43, 58,121,242, 36,174, 93,187,134,101, 29, 58, 96,174,183, 55, 92, 92, 92,112,238,220, 57, 16, 66, 96,
-107,107,139,188,188, 60,236,219,183, 15,253,250,245, 3,195, 48, 18, 75,116, 15, 29, 58,132,235,215,175,227,211, 78,157, 48,215,
-209, 17,118,118,118,136,136, 40, 41, 13,148,201,100, 72, 78, 78, 70, 68, 68, 4, 66, 66, 66,248,155,186,158, 88,124,243,244, 1,
- 68,121, 20, 60,204, 38, 61, 8, 67, 0, 10, 94,129,129,144,220,187, 87,185,114,142, 37, 8, 4,248,240,155, 29, 97, 67,215,188,
- 59,140,154, 54,188,163,215,242,159,206,206, 4,128,215, 71,251,123, 43,100, 34,172, 63, 30, 67, 4, 2,124,216, 16, 7, 24, 24,
- 8, 9,149,139,153, 3,186, 6, 64, 85, 96, 66,130,170,224,247,123,128, 69,163, 56,255,182,102, 34,118,254,124, 46,117,221, 78,
- 67, 44, 33, 4, 78,118,178,128,201,183, 19,124,127, 58,121, 61,101,245, 1, 67, 44,225, 8,156, 20,226,214, 83,238,245,168,181,
-213, 97, 39, 31,241,180,247,230,205,235, 49,124,202,124, 57, 19,123, 16,166,132,211,224,204,122,104,204, 18, 20, 8, 61,144,150,
-146,130, 47,182,132,165,106,180,166,241,209,217,214, 25,204,251,185, 40, 22, 81,154,145, 95,124,242, 65,248,138,207,150,218,233,
- 19,207, 21, 11, 41, 70, 47,108,218, 71,244,217,178, 53, 84,145,209, 52, 46, 49, 31, 69,181,233, 24,237,177,114,213,234,111,134,
-190, 57, 97, 84,172,127,171, 62,174,172,234,161,171, 65,163,201,218,115,234,186, 71,233,155, 34, 5, 0, 9,105,185,200, 46,212,
- 50, 44, 67,159,183, 23, 99, 63,250, 14, 83, 0, 0, 32, 0, 73, 68, 65, 84,121,140, 37,209,193, 82,252,220,161, 12,237, 25,244,
-170,210, 94, 2,125,113, 1,220,237,197, 24,216,181,197,171,244,159,241,239, 63,204,178,198,174, 61,110,180,104, 16, 90,143,203,
- 43,251,181, 38, 44,221, 26, 44, 13,243,237, 93,214, 71,198, 40,204,157,221,219,206,193,217,244, 72, 0,173, 45, 96,227, 6,202,
-161, 9,224,216,140, 18, 7,142,131, 42, 49,154,121,251,213, 9,185, 15,147,210,126,112,179,169,185, 88,155,230, 8,184,164,115,
- 40,206, 76,192, 93,149, 25, 65, 89, 37,165,237, 14,153, 55,192,242, 61,230,240, 60,163, 36, 39, 39, 79, 90,188,120,113,100,215,
-174, 93, 27,185,185,185,161, 93,187,118,248,249,231,159, 49,127,254,252,242,117, 58,116,232, 0, 66, 8,242,242,242,176,106,213,
-170, 12,149, 74, 53,169,198, 23,244,232,232,216,157, 59,119,246,110,211,166,141, 89, 34,145, 20, 0,144, 21, 20, 20,200,243,242,
-242, 40,131,193, 0,142,227, 56, 71, 71, 71, 86,165, 82,209,227,199,143, 55, 94,186,116,169,133, 86,171, 77,174, 79, 68,203,199,
-199,231,110,110,110,110, 33, 69, 81,245,238,250,161,204,100,185,185,185, 41,139,139,139, 57, 0,249,117,233,250,129, 97, 24,116,
-234,212, 9,167, 47,220,192,201,223, 46, 65,163,138,195,204, 55, 39,161, 93,187,118, 56,125,250,116,157,175, 89,112,112, 48, 78,
- 69, 68, 34,242,218, 45, 36,199,223,198,219, 51,223, 68, 80, 80, 16, 78,157,226,107, 47, 88,193, 9, 84,174,155,117,226,113,163,
- 21, 18, 22, 22, 86,150,245, 63, 97, 95, 91,187, 33, 88,236, 36,221,181,116,112,139, 64,241,128,165,160,196, 54, 56,216,234, 84,
-143, 15,191,248, 46, 86,232,158, 60,225,110, 86,237,173,195, 42,253,105,178, 16, 77,174,196,238,189,117,175,245,171, 47,117,245,
-193,214,159, 21, 31, 3,192,184, 94,126,248,243,126, 54,174,196,103,237,141,201, 70,116,125,143,186,173, 59, 20,108, 14,246,174,
-122,103,120, 72,147,198, 30,216,118, 52, 18, 20,133, 35, 22, 61,112, 9, 33, 93,219, 52,193,186,157,143,183, 48,244,240, 93,125,
-192, 16,123, 38,186,104, 48, 0, 12,104,173,248,181,115, 11,103, 95, 82,177,226, 86, 21,216, 72, 69,211, 7,143,154, 40,103,226,
-127, 6,146, 34, 64, 49, 70,232,205, 28,212, 57, 69,208, 57,250,224, 92,212, 45,125,161,193,244,110, 76,118,221,162,120,247,114,
-144, 40,185,122, 43,165, 88,171,247, 84, 40, 91, 24,132, 2,142, 43, 54, 18,252, 25,147,164,137,201, 64,156, 37, 26,137,137, 48,
- 61,239,205,244,218,180,227,192, 18,177, 68, 58, 78, 72,129,114,119,178, 85,110, 90,243, 41,236,237,237,192,153,138, 1,109, 54,
- 70,190,245, 69,246, 93, 21,237, 7, 0,173, 92, 97,215,203, 79,188, 67, 36,160,210,206, 38,152, 63,170,109, 31, 20,141, 25, 19,
- 6,118, 16,115, 38, 45,222, 89,181, 31,155,223, 31,142,137, 47, 4,138, 79,252, 17, 63, 3,192,242,186, 94,107,194, 50, 32,180,
- 30,221, 62,184, 16, 75, 1,145, 4,232,121,237,192,103,173,129, 27, 22,107,116, 4,196,172,136, 10,108,239,107, 43,225,210,254,
- 0,151,246, 7, 17,250,244, 0,229,219,155,162, 60, 58,145,111,191, 92,166,221,186,117,219, 25, 78,128, 79, 44,232, 42, 3, 44,
- 7,228,196, 71,194,100, 50,129,102, 1,131,193, 0,173, 86, 11,219,132, 83,229,117,180, 36, 98,106,208,156,215,134, 5,147, 98,
-149,238,151, 88, 38,101,219,155,173,187,145, 98,149,238,114, 10, 27,159,163, 53,242,209, 44,158,167,145, 68,149, 74, 53,104,200,
-144, 33,191,157, 62,125,218,165,109,219,182, 0,128,107,215,174,149,188,116,118,234, 4,127,127,127,100,102,102,226,229,151, 95,
-206, 81,171,213,131, 80, 75,157,223,162,162,162,135,135, 14, 29,106,164,213,106, 59,124,244,209, 71, 89, 77,154, 52,209, 24, 12,
- 6,170,160,160,128, 99, 24, 6,206,206,206,210, 14, 29, 58,160,123,247,238,197, 81, 81, 81, 77, 83, 83, 83,139, 0, 36,213, 37,
-241,195,135, 15,199,133, 11, 37,141,246, 26,162, 95, 45,137, 68,130,182,109,219,122, 39, 38, 38,166,151, 62, 91,172,206,227, 43,
- 62, 94,110,221,186,133,243, 55,210, 32, 50,233, 33,205, 86,225,242,209, 67, 24, 54,125, 22, 24,166,238, 99,203,223,186,117, 11,
-199, 34, 46,195, 86, 38, 66, 92, 92, 52, 14, 29, 58,132,153, 51,103,214, 75,179,142,212,232, 69,254,227,168, 81, 77, 61, 45, 17,
- 0,132,134,134,158, 47,139, 86, 84,164,121,115, 72,101,197, 88, 58,160,163,247,194,113, 61, 91, 8,105,141, 10, 28,203, 65, 40,
- 6,220,221, 28,176,107,215, 94,191,189,251,247, 71,125,191,225,251,111, 56,134,249,240,110, 22,116, 86, 36,106,233,154,253,145,
-227,118,205, 11, 17,205, 28,220,218, 5, 0, 36, 34, 1,214,255, 28,205, 0, 88, 90,159,163,125,222, 27,242, 98, 26,211,220, 93,
- 29, 63, 94,252,198, 80,151,144, 78,254, 56,127,229, 46,190, 57, 20,117, 65,154,133,157, 22,223,220, 28,141,199,253, 83, 85,173,
- 14,193,213, 94,239,146,101,137,135,196,214, 25,230,164,179,128,217, 0,131,209,140,212, 92, 22,169,121, 6,136, 20, 18, 92,139,
- 79,211,187,102, 32,172, 30,135, 77,217, 42,228, 94, 75, 62, 95,221,216,160, 47,102, 52,249, 57,140, 68,122, 89,172,176,145,169,
-173,169,170,112, 57, 29,134,222,205,196,207, 1,156, 80, 42, 39,186, 15,222,123,205, 54, 61,230, 52, 90, 10, 84,160, 8,129, 77,
-224, 80,216,219, 8, 37, 61,155,138, 83, 0,192,214, 86, 33, 93,245,201,124,199,119,223,255,164,214, 58, 96,129,128,196,191,185,
-199,187,109,155, 56,227,194,245, 88, 92,184,147, 28,125,225, 90, 92, 80,223,118, 94,240,111,236, 52, 71,154, 95,176,242, 30,172,
-143,144,150, 92, 24, 6,160, 13,229,173, 14, 3,221,241, 74,231,113, 31, 85,215,218,176, 74,154, 1, 92, 60, 75, 64, 9,133, 0,
- 37, 40,105, 1,153,250, 7, 68, 78,205,201,222, 3,199,116,219,182,237,252,244, 94,142,229,141, 51,104, 22,172, 70,163,129,173,
-173, 45, 78,197, 51,198,137, 3, 37, 50,129, 64,128,212,248, 27,127, 85,134,119, 17,180,145,244,253,172,245, 31,203, 58,159,182,
-151, 82, 50,175,161,159, 4, 50,119,118,166,213,245, 33,193,195,243, 95,160,176,176,240,246,189,123,247, 6,182,111,223,126,251,
- 59,239,188, 99, 63, 97,194, 4,175, 55,223,124, 83, 0, 0,153,153,153,220,186,117,235, 84,223,126,251,109, 97, 78, 78,206, 20,
-154,166, 45,233,202,132,168,213,234, 75, 63,252,240, 67,246,197,139, 23,131,186,116,233, 34,123,238,185,231, 56,103,103,103,145,
- 76, 38, 99, 77, 38,147, 33, 62, 62,158, 77, 76, 76,244, 44, 40, 40,120, 0, 32, 1,117, 24,177,162, 52,122,181, 92, 40, 20, 46,
- 33,132,180,109,136, 58, 90, 10,133,194, 11,192, 3,138,162, 90, 90, 91,108,248,196, 3, 91, 36, 66,126,126, 62,116, 25,209,144,
-167,221, 71,123, 91, 1,218, 56,219,193,193,193,161, 94,166,168,176,176, 16,208,166, 35, 50,242, 22,192, 48,112,116,116,132,163,
-163,227, 63,110,180,170,243, 34, 79, 9,211,170, 88, 86,115, 29,173, 54, 74,204,180, 49, 97,221,244,161, 45, 36,205,124, 27,195,
-152,118, 13,183, 82,139,241,225,243, 93, 98,132, 50,123,195,244, 73,195, 59,141, 26,211, 20, 33,221, 59, 83,205, 60, 29,231,172,
- 92,179,241,173, 54,200,153, 31,147,133,245,150,164, 40, 38, 27, 15, 57,100,109, 59,123, 59,109, 70, 99,133, 30, 28, 71,112,246,
-142, 26,119,146,242,183,197,102,227,161, 53, 71,215,198, 19,253, 69, 16,236, 39,132,200, 29,109,109,139,218,248, 55,118,235,223,
- 45, 88, 48,168, 79, 39, 72,132, 64,228,159,183, 48,119,205,145,203, 28, 71,134,222,176,176,216,176,164,133, 97,101, 3, 85,210,
-194,144,174,212,194,144, 16, 66, 74, 90, 29,214, 28,124, 16, 10,169, 12, 93,242, 85, 15,177,107, 43,232, 19,206, 34, 41,159, 67,
-114, 86, 17, 52, 34, 15, 24,211,211, 1,194,165,156,175,185, 98,117,141,184,185,185,185,251,181,241,111,241,221,142, 67, 48,235,
- 10,241,240,220,118, 20,231,171,241,217,166,159, 91,120,123,187,246, 73, 79, 79, 63,111, 69,102,227,255, 91,216, 94,119, 16, 64,
- 40,150,225,196,247, 7,144,227,106, 3, 55,133, 4,156, 62, 27,211,223,157,224, 56,120,192, 4, 71, 0, 72,142,187,137, 38, 10,
-189, 69,186,102, 87,140, 26,215, 55,192, 9,180, 30, 59, 78,221, 52, 8,128, 65, 59,207, 68, 39,244,109,237, 36, 31,215,179,137,
-243,114, 85,193,104,228,214,173, 83,209,178,136, 86,121,132,175, 14,173, 13, 15, 1,108,107, 14, 9,251, 47,101,217,142, 25,240,
-156, 66, 34,162, 40, 82,156, 14, 98,227,134,141, 59, 14, 22, 75,105,235, 70, 98,231,128,229, 93, 87, 60, 92, 82,114,159, 96,251,
-224, 21,215,222, 8,255,248,121,101, 70, 70, 6,204,165,101,135, 15,243,184,223, 39, 13,104,195,166, 21,114,166, 51, 43, 71,142,
-161,108,148,210, 5, 95,237, 60, 71, 0,190, 55,105,158,167, 26,189, 94,127, 93,175,215,183, 91,176, 96,193, 43, 31,124,240, 65,
-111, 91, 91, 91, 63, 0,208,106,181, 15,105,154,190, 80,250,255,180,166,117, 32, 1,240, 32, 33, 33,225, 97, 66, 66, 66,163,221,
-187,119, 59, 1,144,151,254,102, 0, 80, 0, 32, 19,245,104,113, 88,102,170, 40,138, 90,210, 80,231,161,204, 84, 81, 20,213,178,
- 46,219, 11, 4, 2,150,162, 40, 80, 20, 5,153, 76,134,139, 23, 47, 98,236,208, 1,184,119,162, 0,109,157,236,208,101,202,116,
-236, 15, 15,135, 80, 40, 4, 69, 81, 16, 10,133, 86, 61, 71, 68, 34, 17, 34, 35, 35, 49,241,229, 49,144,137, 0, 71, 71, 71, 44,
- 88,176, 0,199,143, 31,135, 72,196,143,210,103, 5, 91, 42, 24, 46, 11,251,209,162,176, 60,124,251, 23, 18,176, 52,126,217,254,
- 53,194,238, 22,155,226,178,241, 97, 64, 54,214, 29, 66, 17,151,189,102,231,140,240,200,187, 95, 77, 29, 31,170,232,215,119, 0,
-250,133,244, 21, 5,117,238,243, 49, 80,201,104,245, 71, 13,125,109,176, 28, 62,221,114, 42,118,250,254,115,241, 20,204, 69, 24,
-255, 98,103,194,114,248,180,150,131,121, 66,211,209,198,110,127,100, 84,148, 51,204,197, 72,186,249,187,188,169, 95, 11,128, 53,
-227,193,131,251,248,118,199, 81,238,220,159,113,187, 76, 12,222, 73,204,135,214, 82,205,146, 39, 37, 3, 71, 91,105,192,160, 32,
-135, 95, 57, 16, 56, 41, 36,173, 9,199,194, 73, 33,110, 61,160,181,226, 87, 66, 8,177,183, 17,183, 38, 44, 93,171,166,222,196,
-108,222,241,227,182,213,175,191,254,186,109, 78, 90, 6, 84,154,187, 40,150,122,131, 86,248, 32,225,230, 5,189,206,200, 88,242,
- 16,175,246,124,230,228,228,100, 93,191,146,135,253,155, 86,128, 54, 25,145,149, 86,226, 85, 85, 57, 26, 56,184,121, 71,165,167,
-167, 91,172,105,102,184,194, 81, 19,166, 73,108,236, 97, 51,113, 84,168, 52, 33,215,136,142, 94,246, 37,153, 70,113, 54,238, 69,
- 68, 34,164,180,142,105, 98,170, 0, 77,130,189, 44, 74,167,189, 92,242,206,224,231,188,241, 48, 69,141,139,209,233, 59, 30,230,
- 65,197,198,170,119, 36,168, 10,102, 12,127,222, 23,107,143,199,188, 13,208,123,173, 57,246, 64,119,188, 66, 8,122,150, 84,134,
-215,131, 0, 61, 3,221,241,138,133, 45, 13,159,208, 20, 73,240,234,234, 95,147, 63, 58,120, 53,103,248,194, 87,123, 57,116,239,
- 62, 68, 10,198,132, 34,189,145,190, 87, 0,141, 53,154, 26, 61,183, 25,192,230,178, 31,174,167,113,187,122, 45,141,186,176,247,
- 77, 31,101,153, 87,191,144, 96,140, 2, 16, 53,181,171,205,199,146,190,159, 5, 68, 45,239,122,250,142,154,219,125, 33,161,188,
- 15,173, 90,255, 71,117,132,215,228, 53,255, 9, 77, 22,192, 46,154,166,119, 21, 20, 20, 52,164,166, 10, 79,246,235, 84,175, 99,
-175, 88, 76, 72, 8, 17,149, 70,179,106,171, 12, 95,163,102,197, 98, 66, 66,200,201,210,104, 86,109, 81,173, 74,154, 28,199,169,
- 58,117,234,228, 50,108,216, 48,176, 44,139,251,247,239, 35, 57, 53, 21,253,103,188, 13, 39, 39, 39, 92,184,125, 27,113,113,113,
- 88,178,100, 9,104,154,198,177, 99,199,210,106,211, 20,137, 68,230, 22, 45, 90, 72, 70,140, 24, 1,134, 97,144,152,152,136,244,
-244,116,204,157, 59, 23,142,142,142,184,126,253,122,185,102, 78, 78, 14, 68, 34,145,185,138,232,214,223,113, 47, 61,237, 60, 97,
-178,106, 54, 90, 0, 11,150, 70, 97,248, 82,172,191, 8,179,153, 70,235,152,108, 60,138,249, 43, 34,181, 81,120,229,246, 47,183,
-239,198, 62,188,254, 71, 63, 41,178,238,192,218, 55,137,251,185, 80,219,203,139,138, 96, 46,114, 64,226,175,120,148, 89, 84,124,
- 63, 23,106,171,223, 24, 56,150,130, 89, 7,168,175,225,210,133,243, 56,119,249, 22,174,222,137,101, 47, 93,143,223, 47,224,240,
-233,189, 92,220,175,195, 91, 8,236,134,174,197,107,119, 30,248,118,246,111,228, 11,150, 1,225,104, 56,142,223,139, 41, 49,221,
-125, 59, 55,119,242, 45,137,100,209,112,126,227,119, 96,181,188, 70,189,107,169,244, 22,233,241,211,163,139, 10,114,159,127,161,
- 79, 55, 91,199,192,193,200,121, 16,143,251,183, 34,245,215,239, 38, 92,186,150, 74,111,169,207,213,245,246,246,238,253, 66,159,
- 0,140,159,190, 24,102, 93, 33, 18,207,253,136,226,188, 12, 92,140,178, 67,172, 70,211, 13,128,197, 17,173,168, 20, 38, 8, 41,
-249,232,209, 84,156, 98, 15,163,199,164,208, 97,144, 81, 6,112, 70, 13, 40, 93, 14, 18,210, 77,133,163, 55,165,178, 0,160,144,
- 81, 34, 91, 82,232, 96, 81,228,177,137,107, 43,133,144,198,206,240,104,112, 92,201,240, 77, 28,135,141, 59,127, 79,152,241,233,
-196,142,104,227,235, 28,124, 51, 61,139,130, 21, 33,127,138,160,215,213,253,159,180, 54,252,246, 49,192,153, 17, 57,199,165,117,
-175,245,121,189, 80,199,225,118,238,170,144, 14, 96, 6, 68,186,205,115,214,159,250,184, 83,120, 76,207,121,111, 12,119, 0,105,
-144, 22,186,241, 49, 25,108,239,174, 43,147, 79,115,164,114,121,110, 73,100, 43,144,168, 52,228,230,133, 4, 35,223, 43, 60, 15,
- 15, 15, 0,160,184,184,120,250,148, 41, 83, 54,139,197, 98, 37, 0,138,227, 56,112, 28, 39,250,234,171,175,196, 44,203, 10, 4,
- 2, 1, 43, 20, 10,153,147, 39, 79,210, 44,203,102, 27, 12,134,233,181,105, 50, 12,147, 48,107,214,172, 22,181,181, 80,220,183,
-111, 95,153,201, 74,224,175,132, 69, 38,171,226,188, 60,202, 37,170, 33, 72,251, 73,143,137, 75,151, 2,160, 64,176, 44, 38, 27,
-143, 30, 95,229, 78, 30, 84,109,132,230,185, 65,157,251, 44, 45,219,198,218,148, 25, 88,118, 76,231,118,254,251, 0,192, 72,216,
-137,117, 57, 58,141, 81, 63,174, 67,231,110,251, 57, 66, 68, 12, 33,219, 4, 28, 14, 27, 24,220,179,164,165, 93,117,168,178, 10,
-174, 15,110,235, 72,128,146, 34,195,242,226,194,210,110, 28, 8, 33,164,188,184,240,107, 57,114, 10,141,181,246, 3,245,199, 35,
-211, 0, 19,115,117,218,153, 63,110, 78,103, 89,226, 33, 20, 82, 25,122, 19,179,185,190, 38, 11, 0,210,211,211,207, 71,132,167,
-159,185, 29,220,232, 69, 55, 69,105,148, 75, 7,228,232,112, 38, 61,187,248,124, 93, 52,243,181,244,240, 15,214, 29,255, 89, 42,
- 22,138, 64, 72, 73,135,162,132,192, 96,102,243,162, 82,152, 32, 0,104,231, 2,175, 5,199,152,125, 66, 33,149, 92,155,222,149,
- 56,245,218,241, 43, 35,230, 71, 39,229,111, 75, 42,192, 93, 0, 72, 42,192,221, 3,145,143, 62, 78,200, 40,154,127, 55, 57,255,
-107, 88, 89,175,130, 80,184,216,121,252,210, 39,150,213,247,124,198,170,113, 11,192, 72, 32,109,192,248,121,223,206,163, 40, 52,
-212,240, 19,241,122, 51,105,242,248,194,178,200, 22,159, 87,241,240,252, 55, 40,139,106, 9, 4,130,229, 13,168,121,146,162,168,
- 33, 0, 30, 88,177,217,149,226,226,226,118, 13,124,120,185, 12,195,228, 90,178,226,191, 80, 33,254,105,101,203,191,181,227,254,
-188,230, 63,175,217,178,101, 75, 98,133, 97,225,207, 39,175,201,107,242,154,255, 87,154,132, 16, 97,125,166,106, 52,169,250, 76,
-252, 53,122,234,153, 86,221,119,190,166,219, 51,200,131, 7, 15, 40,254, 44,240,240,240,240, 84, 13, 69, 81,236,223,160,201,247,
-142,199, 83,102,176, 42, 69,183, 4,252, 57,225,225,225,225,225,225,225,225,105, 16,147, 85,113, 94, 98,194, 81,125,248,207,154,
-214, 4,117, 9, 33, 70,240,154,188, 38,175,201,107,242,154,188, 38,175,249,127,167, 89,155, 54,223,154,241,111, 54, 96,188, 38,
-175,201,107,242,154,188, 38,175,201,107,254,255,105, 62,205, 84, 91, 71,139, 47, 58,228,225,225,225,225,225,225,225,249,155,224,
- 43,195,243,240,240,240,240,240,240,240,212,143, 90, 7,149,230,225,225,225,225,225,225,225,225,169, 27, 53, 15, 42,205,195,195,
-195,195,195,195,195,195, 83,103,172, 31, 84,154,135,135,135,135,135,135,135,135,199, 34,182,240,167,128,135,135,135,135,135,135,
-135,231,159,161,114,171,195,176,176, 48, 82,113,206,195,195,195,195,195,195,195,243, 79,242,172,122, 17,190,232,144,135,135,135,
-135,135,135,135,167,126, 76,227,141, 22, 15, 15, 15, 15, 15, 15, 15,207,223, 67,181,117,180,202, 58, 44, 13, 41, 13,213,133,240,
-231,138,135,135,135,135,135,135,231, 95,224,217,246, 34,124,253, 44, 30, 30, 30, 30, 30, 30, 30,222,139,240,240,240,240,240,240,
-240,240,240,252,151,224,199, 58,228,225,225,225,225,225,225,225,249,135, 13,215,223,110,180,248,145,205,121, 77, 94,147,215,228,
- 53,121, 77, 94,147,215,252,127, 50, 89,149,204, 22,223,234,144,135,135,135,135,135,135,135,167,126,212,218,234,144,135,135,135,
-135,135,135,135,135,167,110, 76, 3, 16, 90,250, 57, 20, 21,162, 90,124, 68,139,135,135,135,135,135,135,135,167,126,108, 1,224,
- 89,106,176, 78, 0, 80,243, 70,139,135,135,135,135,135,135,135,167, 97,168, 88, 47,107,104, 5,243,197, 27, 45, 30, 30, 30, 30,
- 30, 30, 30,158,122, 82,109, 29, 45, 10,213,183, 28,136,176, 98, 7,117,105,125, 16,193,107,242,154,188, 38,175,201,107,242,154,
-188,230,255,157,102,109,218, 17,120,250,152,102,141,249,106, 72,248,166,175,188, 38,175,201,107,242,154,188, 38,175,201,107,254,
-223,210,224,173, 14, 59, 2, 54,252,105,125, 38,105, 84, 58,241,240,240,240,240,240,240,212,204,223,211,234, 48, 16,120, 99, 66,
- 91,229, 38,250,110,182,195, 93, 64, 87,211,186, 74,165,114,179, 66,161,152,160,211,233,180, 20, 69,113,101,203, 9, 33, 0, 80,
-113,172,163,196,236,236,236, 94,181,237, 91, 42,149,174,107,212,168,209, 27,197,197,197, 58,138,162, 8, 69, 81,160, 40, 10, 0,
-158,152,179, 44,155,150,155,155,219,233,169,190,132,132, 8,221, 26, 53,250, 83, 44, 20,122, 91,187, 41,203,113,143,178, 50, 51,
-187, 89,177,201, 10,138,194,194,146,221,226, 75, 0,139,159,181,127, 4, 1,132,150,172,215, 22,176,143, 7,198,179, 2,193,219,
- 98, 96,131,145,227, 54, 1, 0, 5,176,117,221,183,241, 10, 90, 80, 4,193, 20, 5, 71, 66, 80, 72, 40,220,146,117, 69,194,191,
-116, 42, 70,137,197,226,225, 14, 14, 14,118,185,185,185,231, 1,236, 3,240,178,171,171,107, 31,141, 70, 83, 76,211,244,113, 0,
- 71,234, 34,220, 43, 24,239, 75, 37,226,169, 6, 51,189,234,143, 91,248,177, 79, 71,184, 50, 28, 86,202, 37,162, 94, 70, 19,243,
-101,228,109,108,179, 82,146, 42,157,202,242, 12,171,199, 72, 59,104,225,117, 7,128, 99,206,206,254, 50,165,195,111, 98,169,240,
- 81, 65,102,241,132, 49, 89, 89,169, 99,235,113,221,255,139,184,185,185,189, 38, 16, 8, 62, 39,132,128,101,217, 15,243,242,242,
-182, 55,144,244,135, 0,156, 74, 63, 23, 0,248,188,158,122,201, 0,124, 75, 63,167, 0,104,194, 63,215,235,204,198,163, 71,143,
-206,232,219,183, 47,214,174, 93,139,141, 27, 55, 38,101,103,103,175, 4,176, 3,128,233, 95,208,225,169,142, 54,192,144,175, 6,
-118,101,233,159, 62,229, 42, 44,238, 95,205,159,249,135, 73,147, 38,153, 9, 33, 36, 46, 46,142,152, 76, 38, 66,211, 52, 97, 24,
-134, 48, 12, 67,104,154, 46,159,188,189,189,211, 31,219,252, 9, 77,129, 64,176,126,244,232,209, 69,132, 16,114,237,218, 53,162,
-215,235,137,209,104, 36, 38,147,137, 24, 12, 6,162,215,235, 43, 77,141, 26, 53,202,172, 73,211,193,193,225,154,179,179,115,166,
-179,179,115,166,139,139, 75,166,139,139, 75,166,171,171,107,249,228,230,230, 86, 62, 41,149,202, 76,165, 82,153,233,226,226,114,
-173,182,116,150, 50, 16,192,121, 11,166,129, 85,108,219,191,162,209,242,244,244,204, 36,117,160,113,227,198,169, 22,164,179,140,
- 70, 20, 5,182,108, 91,138, 2, 39,147,201,124, 43,254,142, 39, 35, 93,181,134,148,189,188,188, 70,123,122,122, 70,120,122,122,
-134,123,121,121,141,182,224, 22,171,164,105,111,111,127,205,205,205, 45,211,195,195, 35,171,108,242,244,244,172, 52,121,121,121,
-149, 79,141, 26, 53,202,116,118,118,174,246, 26, 17, 64, 88,221,116, 14, 16,201,128,126, 34,161, 48,172, 81,163, 70,154, 59,119,
-238,176,132, 16, 34, 16, 8,210,203,214,177,230,216, 31, 55, 89,186, 72,124,152,115, 86,118,165,248,209,202,194,156,179,178, 43,
-186, 72,124,104,188,130, 22,117,213,180,144,170, 52, 39, 79,158, 60,249, 86,102,102,102,122, 65, 65,129,122,211,166, 77,241,114,
-185, 60,114,211,166, 77,241, 5, 5, 5,234,204,204,204,244,201,147, 39,223, 2, 48,203, 10, 77, 0, 64,183, 96, 60,255,250, 40,
- 79,221,173, 99, 19,117,253, 58,139,110,246,104,139,208, 1,221, 36,233,223, 45, 10,212, 93,216,218, 83,215,247, 57,193, 93, 43,
- 53, 41,145, 72,212,221,215,215,119,170, 82,169,156, 84, 58, 77, 44,155, 60, 60, 60, 38,122,120,120, 76,116,118,118, 30, 91,147,
-230, 65, 64,104,201,228, 35,151,119, 31,235,231,171, 75, 94,190,140,220,121,247,109, 50,181,185,143,102,140,187,123,211,127,225,
- 26,253,173,154,238,238,238, 42,154,166,137,217,108, 38,174,174,174,170, 6, 76,231,215,132,144,175, 9, 33, 95, 3,248,186, 1,
- 52,203,243, 51, 43, 12,118, 77,154,114,145, 64, 48, 79, 33,149,134,203, 68,162, 44,153, 72,148,165,144, 74,195, 69, 2,193,124,
- 0,242,255,210, 53,250, 27, 52,237,148, 74,229,195,117,235,214, 17,157, 78, 71,116, 58, 29, 89,183,110, 29, 81, 42,149, 15, 1,
-216, 89,161, 89, 87,157,103, 41,130,245,248,212,112, 17,173, 64,160, 83,191,224,150,135,231,188, 54, 30,220,161,117, 84, 45,111,
- 76, 63,116,235,212,105,234,142, 29, 59, 0, 0, 19,134, 15,199,139, 93,186,192,222,206, 22, 82,105, 73,114, 40, 66, 65, 34,150,
- 96,196,220,247, 44,217,253,151, 35, 70,140,120,245,208,161, 67,118, 0,176,113,227, 70,140, 26, 53, 10, 46, 46, 46, 80, 40, 20,
-144, 72, 36, 16,139,197,149,230,181, 33, 20, 10, 27,167,167,167,187,203,229,242,242, 40, 27,199,113,149, 38, 66, 72, 89,244, 13,
- 12,195,160, 85,171, 86,150,158,174, 69,133,133,133,189,181, 90,109,185, 70, 85,147,159,159, 31, 0,156,182, 68,240,243,207, 62,
- 5,199,104, 33, 18, 1, 12, 3, 24,205, 2,112,164, 74,115,131, 89,179,102,149,167,187, 46, 12, 29, 26, 74, 81, 20,117,232,250,
-245,235,135,179,178,178,154,113, 28,251,102, 29, 35, 93,111,221,191,127,223, 14, 0,252,253,253,103, 1, 56,108, 77, 58, 68, 34,
- 81,227,219,183,111,187,203,100,178,106, 35,151, 21, 34,152, 48,155,205,232,216,177, 35, 99,205, 62, 26, 1,190,121, 2,193,155,
- 29,158,123,110,218,210, 17, 35,228,127,254,249,167, 92, 32, 16,128, 97, 24,124,245,213, 87, 12, 33,196,169, 13,224, 16, 3,104,
-106,144,249, 0,192,107,165, 15,131,109, 0,190,170,228, 22, 8,130,245,180, 44, 52,177,120, 68,151,174, 77,223, 71, 76,244,157,
- 46,205,237,142,193, 94,100, 76, 0,254,217,168,150,131,131,195,240,181,107,215, 42,183,109,219,166,137,139,139, 51,111,218,180,
- 73, 57,125,250,116,123,179,217,140, 25, 51,102,100, 7, 4, 4, 72,214,174, 93,171, 60,114,228, 72, 63,173, 86,251,189, 85,215,
-139,194,167, 47, 15,127, 17, 6, 90, 0,154,102,148,158, 74,251, 93,115, 38,135,136, 9, 49, 97,231,241,235,160, 25,238, 71, 43,
- 35, 89,221,198,140, 25,211,124,239,222,189,162,216,216, 88, 81,235,214,173,193,113, 28, 88,150, 5, 77,211, 0, 0,142,227,208,
-178,101,203,122,159,151,169,128,191, 91, 35,151,240,110, 67, 6,219,120,202,101,112,201,207,198,235, 18,145,253,118,133,113, 55,
-128,238,207, 84,100,151, 16,136, 68, 34,164,166,166,194,221,221,221,134,227, 56, 53,128,101,249,249,249, 91,240,236,210, 69, 42,
- 18, 29,222,249,227,122,143,174,221,187, 11, 27,121,186, 35,254,126, 10, 68, 20,219,255,246,213,235, 33, 83,103,206,155, 99, 98,
-152,209, 0,254,124,214, 14,220,163,251,172,145,148, 64,184,145, 34, 28, 62,249,238,231,162, 21, 95,174, 83,204,120,115,178,112,
-238,220,185,240,241,241,105, 54,114,228,200, 47, 1,204,172, 85,167,235,172,145, 16, 10, 54,130, 16, 44,253,246,231,162, 47,190,
- 92,167,152, 89, 7,157,167,156,106,255, 35,245, 54, 90,129, 64,243, 32, 31,247, 51, 43, 22,206, 20,147, 95,127, 18,232,114,179,
-170, 93, 87,169, 84,110, 30, 52,104,208,132,237,219,255,138, 70,119,107,219, 22, 35,251,245,132,187,171, 35, 20,182,210,146,199,
- 17, 71,225, 86,220, 35,139, 12,129,143,143,207,140,195,135, 15,219, 85, 52, 19, 18,137,164,124,170,104,178,202,166,178, 7,112,
- 77,200,229,114, 68, 68, 68, 64, 36, 18, 65, 40, 20, 66, 36, 18,149, 79, 21,191, 11,133, 66, 52,106,100, 85,213,165,149,142,142,
-142,237,139,138,138, 28, 10, 10, 10,224,235,235,171, 1,112,187,194,239,237,179,179,179, 29,172, 17,228, 24, 45,230,190, 30, 8,
-177,233, 50, 76,226, 46,208,139,122,224,210,213,123, 8, 59,125, 30,233,170, 12,244,124,190, 3, 38,189, 50, 6,225,225,225, 96,
- 89,171, 75, 58, 50, 9,193,151,195,134,133,190, 15, 80, 84,255,254,253, 11,102,207,158, 45,136,141,141,125,117,228,200, 17,109,
-239,223,127, 80, 26, 85,164, 22, 18,130,245, 0, 50, 45,212,149, 2,192,133, 11, 23, 0, 64, 86,151,123, 79, 38,147, 33, 42, 42,
- 10,101,197,196, 2,129, 0, 2,129, 0, 66,161, 16,191, 60,112,131,214, 36,128, 46,243, 46,222, 14,245,133,159,159, 31, 4,130,
-218,171, 36,134, 0,242, 75,192, 72, 74, 44,158,235,233,229,213,172, 79,243,230,138,136,136, 8, 33, 0, 52,105,210,132,168,213,
-234,130,227,199,143, 23,137,128,141, 77, 8,217, 81,147,201,242,241,241,233,145,158,158,254,121,217, 57,167, 40,234,203,166, 77,
-155, 46, 41,191,110, 28,135,101, 63,106,197,115,230,188, 43,233, 26,242, 17, 0,160,235,176,189,208, 36,174, 8,164,242, 62,112,
-252,167,115, 9,141, 70,179,191,101,203,150,194,220,220,220, 75, 0,146,105,154, 94,180,107,215, 46,247,215, 95,127, 61,107,247,
-238,221, 43, 1,120,173, 90,181, 42, 68,171,213, 30,176, 70,183,103,123, 12,121,174,125,219,231,125,125,124,112,254,210,159,144,
- 72,197, 78,179, 94, 11,133,157,157, 8, 95,111, 59,193, 37,167,229,205,142,188,141, 29, 86,152,172, 46, 99,198,140,105,182,119,
-239, 94, 41, 0,220,190,125, 27, 25, 25, 25, 80, 42,149,176,177,177,129, 88, 44,134, 80, 40,132, 88, 44,110, 16,147,229,232,227,
-122,229,216,177,227, 54, 46, 46, 78,248,238,189, 57,152,148,149, 9, 39,123, 59,208,197,218,102,207,216,131,194,191, 87,175, 94,
-114,150,101,161,213,106,113,238,220, 57, 71, 27, 27, 27,199,198,141, 27, 47,133, 21,173,167,228,114,121,166,193, 96,112, 47,253,
-156,101, 48, 24, 26, 1,208,200,100,178,178,124,186,184,116,110,105,113, 98, 50,158, 44, 38, 76,161, 40,170,226,178,186,210,185,
- 75,231,246, 17, 71, 14,237,177, 43, 44,202,128,147,115, 22, 4, 40,196,150, 45, 27, 96, 99,227,128,165, 75, 63, 16, 61,234,223,
-207,123,224,144,209, 17,209,247,226,251, 63,115,102,139, 80, 91,250, 15,155,224, 98,163,176, 47,125,150,208,216,190,117, 14, 4,
- 2, 1,150, 44, 89,130,160,160,160,105,209,209,209, 31, 1,200,171, 89, 6, 91,218,245, 30,231, 34,149,151, 92, 98,142,165,177,
-105,223,252, 18,157,197,211,241,242, 48,191,105, 11,198, 60, 60, 21,212, 28, 69,165, 47,230,122,177, 0, 41, 84, 87,148, 27,134,
-176,176,176, 62,161,161,161,231,171,251,254, 20,224,137,191,250,207,170,100,190, 68, 97, 97, 97, 36, 52, 52,148,170,112,112,149,
-190,215, 68, 48,224,230,236,168,136,216,184,108,142,157,232,242, 9,161, 62,229, 1, 84,134, 74, 15,242, 74, 77, 52, 21, 10,197,
-132,237,219,183, 87, 10, 41,249, 54,114,135, 68, 34,134, 88, 66,193,169, 87, 73,239,245, 5, 23,195, 64, 81,213,154,172, 74,154,
- 90,173,214,112,243,230, 77,187,109,219,182,193,221,221, 29,205,154, 53,131, 66,161,128, 92, 46,175,100,174, 42, 26,174, 42,140,
- 86, 37,205,178,223, 69, 34, 17, 4, 2, 1,194,195,195,193, 48, 12,198,140, 25,243,132,201, 18,137, 68,213, 25,183,234,154,167,
-158, 6,112,155, 16,210,187,244, 1,124, 27, 64,159, 10,191, 15, 84, 42,149,139, 0,172,180, 84, 83, 40, 36, 16, 26, 46,129,107,
-188, 14,162,212, 57, 48,137,131,113, 54,242, 58,182,111, 94, 11, 0,104,214,186, 51,198,142, 12, 45,143,198, 89,152,206,114,188,
-189,189,247,101,103,231, 12,238,215,175, 31,242,243,243,233,101,203,150,161,125,251,246,240,247,247,183,232, 26, 85,243,230,156,
-121,251,246,109, 31,189, 94, 15, 66,136, 37,230,236, 9, 77,138,162,176,107,215, 46, 24, 12,134, 39, 86,118,238,243, 5,230,143,
-106,130, 41,111,239,192,151,113, 7,240,253,247,223,215,120,236, 10,160,189,193,177,229,122,169,144,105,191,242,131,183,100,147,
- 38, 77, 18, 78,153, 50, 5, 41, 41, 41,120,253,245,215, 13,225,225,225,166, 12,181,250,184,148,227,190, 51, 87, 54,198,213,106,
-202,100,178,157,167, 79,159,198,129, 3, 37,190, 36, 62, 62, 30,173, 90,181,178,173,100,146,243, 14,162, 40,249, 59, 92,249, 37,
- 22, 93,135,237,197,149, 95, 94, 1, 91,112, 66,220,169, 21, 10,173, 57,159,117,160, 42,205, 3,185,185,185,229, 38,106,247,238,
-221, 54,187,119,239, 30, 1,224,103, 0, 7, 0, 32, 47, 47,111,141,149,154, 0,133, 41,227, 70,141,128, 72, 98,143,216, 7,105,
-232,211,173, 35, 26,185,187,227,246,189, 4, 36,167,231,101, 82, 20, 94, 27,216, 93,186, 82,175, 55,125,116,241, 22,126,168, 69,
-147,106,220,184,177,255,193,131, 7, 37, 21, 34,208,229,255,113,161, 80, 88,254,189,204,120,215,229,254, 44, 51, 89,246,141,237,
-174,124,186,161,135,237,149, 59,187,209,170,201, 16, 56, 15, 9,197, 15,103,206,224,126,116,140,193,164, 99, 94,248, 23,174,209,
-223,165,233, 63,106,212,168, 75,123,246,236,113, 74, 77, 77,197,133, 11, 23,208,172, 89, 51,232,116, 58, 75, 94,120, 43,105, 26,
- 12, 6,247,178,109, 40,138,114, 47, 11,188,155, 76,166,178,139, 81,246, 71,116,170,176,158, 83, 13,154,190, 21,214, 43, 51, 87,
- 77, 26,224,216,165,114,137,228,224,177, 35,251,236, 98, 98, 47,160, 67,240,243,176,115,108, 3,142,205, 64,110, 94, 49,242, 31,
-168,240,217,103, 95, 98,233,178, 15,241,243,209, 67,118, 1,129,193,135, 77, 12,211, 18,128,225,153,185,238, 20,153, 22,241,203,
-238,141, 20,225,160,207,140,149,137,181, 15, 21, 19, 94, 25, 45, 28, 63,126, 60,126,254,249,103, 68, 71, 71,111,172,193,100, 69,
- 84,136,204, 79,187,123,225,192, 70, 16, 2,125, 86,172, 76,162,127,168,152,252,234, 88,225,164,151, 95,196,229,223,215,227,197,
- 14, 15,239,122,185, 99,100,126,169,197, 22, 9,145, 43,147,227, 15,114, 5,151, 43,152,173,115, 0,168, 10, 6,235, 28,254,170,
-131,249, 52, 48,180,212, 88, 77,123,252,197, 68, 84, 23,131, 5, 0,173, 0, 59, 74, 42,185,178,125,233, 91, 94,138,148,104,145,
-241,110, 20, 84, 70,142,108, 74, 98,184,142,128,205, 13, 64,255,248, 54, 58,157, 78,155,144,144, 96,243,218,200,145,232,222,182,
- 45, 60, 93, 93,209,178,113, 99,216,200,164,144, 74,196,149, 94, 89, 45, 46, 67,160, 40, 18, 16, 16,128, 97,195,134, 65, 44, 22,
- 67,161, 80,192,206,206, 14, 82,169,180,202,104,150,165,111,185,132, 16, 8,133, 66,220,189,123, 23,201,201,201,112,114,114,194,
- 31,127,252,129, 23, 94,120,225,137,168, 86, 69,115,102, 77,136,190,138, 7,127,153, 17, 59,109,141, 22,203, 82, 40, 38,193,144,
- 39,205,134,142,234, 8,163,145,129,209,104,196, 15,145,102,252,153,160,133,217,108,130,209,104,172,105,159,213, 33,240,242,242,
-154,208,178,101,203, 89,175,188,242, 10, 45,149, 74,161,213,106,161,211,233, 16, 29, 29, 77, 15, 30, 60,164, 96,216,176, 80,199,
- 19, 39, 78,144,210,162,195, 76, 43,180,115,189,189,189,125, 74,139,103,115,235,114, 87, 83, 20, 85,110, 98, 30,231,181, 53, 49,
- 16, 9, 75,174,201,198,141, 27,193,178, 44, 8, 33,213, 94, 36, 3, 69,253,182,236,139,213,142,171,214,253, 8, 71,151, 70, 56,
-127,254, 60,123,234,212,169, 34, 10,136,191, 31, 29,189,230, 37,224,228, 65,192,108, 77,250,242,243,243,109,154, 53,107,134,198,
-141, 27,131,227, 56,208, 52, 93, 30,125,201,205,205,133, 94,175,135,139,109, 1, 90,184, 54, 6, 83,116, 14,234,187,159,192,211,
- 46, 22, 59, 78,155,232,231,252,113,235, 63,144,113,252, 84, 58,213,243,173, 25,222,238, 30, 62, 16, 16, 26,170,172, 92,140, 24,
-250, 34,132, 18, 59, 60, 74,205, 65,112,155,230,158,175,190,212,195, 83, 72, 49, 88,184,114,239, 44,128,251,161, 54,185,226,226,
- 98, 54, 54, 54, 22,183,111,151,248, 93, 7, 7, 7,216,218,218, 86,250,143, 11, 4,130,122, 69,180,202, 76,214, 23, 27, 95,176,
- 21,136,181,208,176, 17,216,182,235, 58,130, 3, 66,177,233,202, 85, 3,155,153,215,255,107,131, 33,126,223, 83, 28,204,240,240,
-240,152,206,113,220, 82, 66, 72, 65,207,158, 61, 27,237,221,187,215, 57, 61, 61, 29,215,175, 95,199,146, 37, 75,178, 89,150,101,
- 8, 33, 20, 33,228,147, 6,216, 29, 87,193, 96, 53, 36, 98,133, 28,111,187, 57, 80,195, 69, 2,135,102,140,166,248, 81,142,137,
- 28,215, 49,220,183, 0,232, 26, 51, 55,129,224,141, 67,251, 55,122,185, 41, 57,132, 40,251, 65,157,105,198, 23,239, 77, 70,110,
-110, 17,126,216,186, 2,128, 20,102, 70,136,222, 33,163,225,238,238,141,105,111, 78,243,216,184,121,211, 91, 12,199,125,141,103,
-132,140, 75,223, 31, 5, 16,161, 84, 42,163,223,154, 54, 77,217,172,217, 68,200,229,114,236,219,183, 15,123,191,251,142, 93, 7,
-140,149, 1,103,103, 0, 71,107,212,185,242,151,206,156, 25, 51,148,129,129, 51, 32,147,201,240,251,169,159, 96,200,216, 85, 52,
-180, 59,204, 58, 3,134, 54, 29, 70, 92,146,126,161,242,196, 98, 60, 0, 0,177, 28,106, 0,143, 23,131, 61,109, 6,171,140, 19,
-248,171, 94,214,180, 74, 17,173, 58,231,157, 98,233,157,173,239,190,220,164, 17,140,148, 41,242, 23,164, 27, 57,118,213,125,179,
-240, 70, 33,153,127,175, 10,147, 85,122, 99,115,190,190,190,232,215,169, 19, 70,246,234, 5,145, 72, 4,185, 84, 2,123,185, 13,
- 8, 91, 18,201, 42, 43, 58,172,225,153,136,170,162, 79,174,174,174,144, 72, 36,229, 6,203,138,104, 86,149,154, 28,199, 65, 36,
- 18,225,246,237,219,232,217,179, 39,124,124,124,112,224,192, 1, 12, 28, 56,240,137,162, 68,107, 77, 86,153,209,122,172, 24,111,
- 32,128,178, 72,150, 85, 70,203, 96,162,144, 99, 10, 6, 69,181, 5,195, 0, 44, 1,140, 6, 3, 8, 1, 8, 1,104,179, 9, 6,
-131,161,124,159,150, 20,201,122,120,120,248,218,216,216, 44,127,255,253,133,129,193,193, 29,144,157,157, 13,142,227, 96,107,107,
- 11,157, 78, 7, 7, 7, 7,116,239,222,253,209,242,229,203,213,132, 96,154,149, 38,171,222,148,157,243, 51,103,206, 84, 42, 54,
- 44,155,180,234, 52, 76,121,103, 55,164,162,146,162,165,178, 58, 60, 53,229,187,125,123,247,192,165, 27,241,204, 27, 11,215, 27,
-197,185,215, 87,122,112,220,246,180,122, 28, 23, 33, 4, 57, 57, 57,200,204,204,196,240, 17, 35,176,119,207, 30, 36, 37, 37,161,
- 77,155, 54,232,219,183, 47,220,221,221,145,148,148,132, 63, 47, 26, 97,204,207, 67,158,233, 58, 20,246, 93,113,236,124,130,113,
-201, 70,115,194,191,152, 97, 12, 7, 48,217,193,193,193, 79,167,211,169, 25,134, 57, 8,224, 32,128,177, 34,145,104,172, 66,161,
-240,212,104, 52, 15, 81,210,154,232,120,109, 98, 54,114,185,171, 76,238, 0,142, 49, 66, 36, 18,193,199,167, 25, 8,107, 66,190,
- 70,143,215,198, 15,195,141,219,247,112,234,236,101,134,166,185,111, 44, 57,165,223, 22,203, 0, 0, 32, 0, 73, 68, 65, 84,173,
- 66,161,144,248,251,251, 35, 43, 43, 11, 98,177, 24, 54, 54, 54,176,179,179,195,226,197,139,241,221,119,223,149,155,172,186, 26,
-173,169,128,191,131,175,221,229,207, 55,148,152,172, 12,149, 26,153,105, 98, 40, 93, 27,225,155,239,214,105,243,147, 50,186,254,
- 8,196, 63,237, 15, 89,142,227, 62, 73, 79, 79,119, 23,137, 68, 30, 12,195, 32, 53, 53, 21,215,174, 93,195,236,217,179, 51,115,
-115,115, 67, 80,199, 99,148,203,229, 89,101,145,172,210,162,195,234,138, 19, 11, 42, 68,178, 10,106,144,172,174,152,176,121,179,
-198,246,225, 91,215,206,245,237,220,181,187, 64, 33,114,200, 47,126,144,209, 51,242,194,249,238,179,215,254,240, 86,114,126,241,
-139, 0, 18,171, 19,149,137,197,131,159,239,209, 67, 4,146, 9,145,180, 39,190, 92, 53, 30,217, 57, 26,228,231, 21, 65, 34,177,
-133,137, 22,130,229, 40,116,239,217, 11, 63,237,216,143,160, 55, 95, 23, 74,197,226, 1,140,201,244,204, 24,173, 82, 86,124,251,
-237,183,190, 1, 1, 1,216,190,125, 59,206,238,220,137, 73,133,133, 56, 47, 16, 8,105,177,216,237, 36, 77,111, 65, 45, 70,171,
-162, 78, 80, 80, 16,126,252,241, 71,236,218,181, 43,101,194, 11, 89,135,231, 78,128,187,217,140, 65,215,227,224,210,116, 24,112,
- 61, 14, 46,207, 5,160, 37, 35,194, 3,138,170,220, 29, 84, 88, 88, 88,159,138,243,167, 12, 53,170, 41, 98, 23, 1, 8, 9, 11,
- 11, 35, 21,231,181,102,156,202, 86, 51, 86,188,232,215,164,109, 11, 95,138, 62,176, 30,169, 90,198,244, 81,156, 89,122,191,152,
-204,189, 7,172,171,225, 13,130, 8,133, 66,216,219,216, 64,233,228, 84, 18,230, 23, 8, 0, 14,224,104,128, 98, 75, 12, 0,225,
- 40, 16,214,170, 12, 3, 82,169,180,202,138,239,214,214,205,170,168, 89, 84, 84,132, 71,143, 30, 97,218,180,105, 80, 40, 20, 37,
-206, 61, 35, 3, 77,154, 52,129, 72, 36, 66,122,122, 58,126,255,253,119,248,249,249, 65, 38,147, 89,229,182, 42, 68,151,218,163,
-164,149, 97,123,181, 90,237,224,233,233, 9,171, 35, 90, 28,129,206, 72,193,100, 98,113,255,254,125,168, 84, 42, 60,122,248, 0,
-157,181, 26, 16, 8, 65, 8,177, 42,162,229,237,237,221,182,121,243,230,155, 86,174, 92, 41,105,220,184, 49, 8, 33,112,118,118,
-130, 78,167, 67, 78, 78, 46,218,180,105, 3, 31, 31, 31,172, 92,185, 18, 0,246,254,211, 38,235,177,123,170,220,104, 85, 52, 92,
-239,188,228,139,188, 60, 59, 8,133,130,114,227, 92, 75, 29, 45, 9, 0,132,188, 56, 74, 20,126,234,164, 45, 3, 44,207, 16, 10,
-151,139,106,191,142, 52,203,113,138,234,126, 79, 77, 77,133, 88, 44,198,161,131, 7,145,151,153,137,224,224, 96,116,233,210, 5,
- 15, 30, 60,192,141, 27, 55,224,234,234, 10,101,227,110, 56,255,208,140, 24,149, 30,142,142,142, 72, 72, 19,252,155, 93, 6,188,
-217,191,127,255, 37,107,214,172,113,247,240,240, 16,103,103,103, 7,108,216,176, 33,120,195,134, 13,115,222,122,235,173, 70,111,
-189,245,150,179, 82,169, 20,101,100,100,248,191,247,222,123,207, 69, 68, 68,248, 1, 88, 93,147,160,173,173,189,139, 80, 98, 11,
-138, 18,193,201,209, 25, 34,169, 45, 56, 70, 4,150, 3, 28, 28,149,184,116,227, 16,254,184, 83, 52, 61, 43, 23, 7, 45,138,143,
-149, 94,119, 87, 87,215, 39, 34,213,179,103,207,198,214,173, 91,203,139, 17,235,106,178,190,216,240,130, 29, 85,106,178, 50, 82,
- 69,160,140,126,248,229,104, 84, 65,126, 82, 70,207,103,193,100,149,229,113,132, 16, 60,124,248, 16, 58,157, 14, 23, 47, 94,196,
- 39,159,124,146,253,184,201,114,119,119,127,211,193,193, 97, 89,113,113,241,151, 25, 25, 25,235,107,125,241, 43, 49, 81,101,159,
-203,230, 85, 22, 39, 90,152,212, 38, 85, 69,178,124, 60,229,167,111, 92,220,221,196,145,220,162,144, 60, 13,184,175,137,182,191,
-226,222,123, 72,231,161,130,142,223,127,218,180,203,244,197,167, 83, 53,134,128,234, 34, 91, 28,203,118,180,181,179, 7,144,133,
-235,215,206,149,155,172,220,188, 66, 24,205, 66, 24, 77, 20, 12,102, 1,250,245, 31,132,239, 54,237, 66,122, 86, 30, 88,150,109,
-247,140,153, 44,151,182,109,219,206, 24, 59,118, 44,150, 47, 95,142,136, 53,107, 76, 51, 41, 74, 35, 2,200, 9,150, 5, 71, 8,
- 37,176,172, 18,123, 37,157,175,191,254,250, 40,128,151, 87,206, 70,183,252, 98,188,230, 53,140,184, 52, 29, 86,178,226,152,247,
- 9, 0,184,100, 71, 84,126,100,134,134,134, 82,101, 37,107,214,150,176,253,215, 17,133,134,134,158, 15, 11, 11, 67,197,121, 77,
- 27,216, 55, 10, 24,178, 96,222,172, 85,157, 7,246,162,212,243, 6, 32, 79, 99, 96, 62,136, 49, 75,211,244, 53,155,172,138, 44,
-216,176, 1, 55,226, 75,254,199,141,221,221,177,240,213, 87, 65, 24,224,143,232, 24,236,143,136,192,248,254,253, 97, 43,151, 91,
- 28,217,224, 56,174,202, 40, 86,197,104,150,181, 81,167,130,130, 2, 28, 60,120, 16, 93,186,116,129, 66,161,128, 72, 36, 66,251,
-246,237,113,239,127,236, 93,103, 88, 20, 87,219,190,103,182,194,178,244,222, 85, 20, 12,138,189, 37, 98,236, 45,182,168, 81,177,
-188,246, 26, 11,106, 84,108,177,196, 26, 53,246,138, 49,118,236, 26, 43,118, 44,216, 5, 65, 17,164,151,101,233, 44,176,125,118,
-118,230,251, 65,121, 81, 41, 11,166,188,201,231,115, 93,123,205,206,206,238,189,103,230,204,156,115,159,167, 70, 69,193,195,195,
- 3, 4, 65,224,252,249,243, 24, 56,112, 32,226,227,227,241,229,151, 95,138,147,147,147,107, 76,180,222,188,121, 99,198,178,236,
-215,165,218,143,218,138, 70,163,193,219,183,111,209,175, 95, 63, 88, 90, 90,194,217,249, 56,110, 6, 31,133,200,231, 63, 32, 8,
-212,136,104,233,245,250,113,125,250,244,225, 19, 4, 1,149, 74, 9, 35, 35, 99,152,152,136, 97,106,106, 6, 47,175,134, 72, 79,
- 79, 71,207,158, 61,181,113,113,113,187,164, 82,233,201,154,182,213,219,219,219, 36, 41, 41,233, 63,117,234,212, 17, 0,128,177,
-177,113, 35, 15, 15,143, 31,226,227,227,139,106,170,213, 42, 37, 88, 4, 65,128,195,225,148, 17, 45, 46, 73,194,209,193,174,108,
-191,196, 63,141,168, 2,171, 80,146,171, 17, 2,128,155,155, 27,118,236,253,157,236,211,167, 15,102,205,154, 5,157, 78,135, 93,
-187,138,131,236,134, 15, 31, 14,138,162,112,230, 76,113,144, 36,151,203,173, 82,109,242,252,249,115,188,120,241, 2, 58,157, 14,
- 5, 5, 5,184,122,245, 42, 66,238,221, 67,208,249, 91, 72, 74,136, 69,211,134,238, 24, 63,126, 28,120, 60, 30, 14, 29, 58, 4,
- 95, 95,223,191,117, 64,224,241,120, 35, 3, 3, 3, 29, 15, 30, 60, 40, 59,127,254,188,162, 93,187,118,194, 45, 91,182,216,237,
-216,177,195, 86,171,213,194,223,223, 63,235,241,227,199,154,111,191,253,214,100,223,190,125,142,245,235,215,239, 78,211,116, 69,
- 68,203, 4,192, 48, 0,163,242,139,180, 92, 89,145, 10, 12,173, 69, 66, 82, 34, 10,228, 90, 48,122, 10, 41,105,233,144,171,245,
-200,205, 43, 66,211, 22, 61,182,223,189,123,119, 49, 69, 81,139, 0, 92,170,174,157,175, 95,191,198,227,199,143,145,148,148,132,
-132,132,132,247,153,226,196,137, 56,114,228, 72,141, 53, 90, 21,147, 44, 14, 8,141, 7, 46,157,127, 34,203,138,149,254,107, 72,
- 86,201, 24,180,204,209,209,113,153,163,163,163,209,245,235,215,205,235,212,169, 3,154,166,181, 31,106,178, 58,117,234,180, 36,
- 48, 48,208,209,195,195, 99, 58,128,173,255, 11,109, 39, 73, 76,252,121,247, 20, 27, 83, 65, 74, 58,222,109, 42,201, 37,200, 1,
-148,133,192,221, 99,224,182, 95,154, 56,253,219, 5,150, 1, 7, 87, 78,100,192, 84, 26, 33, 27, 23,159,138,221,187,119, 96,182,
-255, 24,252,246,235,207, 96, 24, 46, 52, 58, 14,220,234,182,131,134, 98, 64,144, 92, 52,107,209, 10,119,238,222, 7,143, 4, 78,
- 29,220,253, 47,227, 89,200,139,140,140,220,117,254,252,249, 25,179,102,205, 2,195, 48,130,229,187,119,171,178,179,179,215,162,
-102,249,175, 62,196, 25,184,123,247,238,152,128, 29,217,231,102,143, 4, 39,233, 34,145,247, 34, 26, 86,223, 45, 96,113,122, 61,
-129,150, 13,145, 39,170,120,138,191,247,193,246,223, 65,180, 74,153,100,249,109, 69,210,194,179,222, 79,230, 86,150,227, 72, 83,
-103,155,249,179,166,114,227, 51,212, 56, 83,103,132,252,246,225,109, 38, 25,180,112,123, 28,212, 91,106,242,199, 39,110,223, 46,
-123,191,225,248,241, 10,143, 73,191,251,206,224,149, 89,101, 90,172,154,106,178, 0, 64, 36, 18, 89,116,239,222, 29, 93,187,118,
-197,224,193,131,203,124,178,154, 55,111,142,160,160, 32, 12, 26, 52, 8, 97, 97, 97,112,116,116,196, 23, 95,124,129, 47,190,248,
- 2, 87,174, 92,169,233, 32, 7,189, 94, 15, 31, 31,159,210,168,195,166,105,105,105,102,181,237, 72,141, 70,131,220,220, 92, 88,
- 89, 89, 65, 32, 16,160,109,219, 54,152, 49,179, 45,108, 28, 15,192,199,187, 33, 20, 10, 69, 89,248,187, 1,147,173, 79,131, 6,
- 13,144,157,157,141,236,236,108,216,218,218,194,201,201, 9, 14, 14, 14,216,180,105, 19,187,117,235,214,107, 20, 69,237,202,201,
-201,169,177, 38,203,193,193,161, 3, 65, 16, 75, 84, 42,149,160,220, 10, 87, 96,107,107,123, 65,165, 82,173,149, 74,165, 6, 59,
-130, 18, 4, 1,138,162, 64, 16, 4, 46, 39, 56, 65,161, 37, 80,152,246, 2,179,250,187,191, 71,188,120, 60, 94,181,230, 82,150,
-101, 21,126,126,126,118,174,174, 46, 72,141,123,141,211,167, 89,252,242,203, 47,165, 81,145,136, 41, 89, 24,148,238,119,238,220,
- 25,117,235,214, 5, 91,131, 92, 25, 12,195,224,213,171, 87, 56,126, 33, 4,142,238,222, 72,121,247, 22, 47,175, 92, 68, 29, 91,
- 43, 52,110,209, 10, 58,157,238,147, 82,111,252, 17,162,211,233,246,123,122,122,178, 90,173, 54, 4,192,142,136,136,136, 49, 82,
-169,212,255,247,223,127,119, 26, 50,100, 72,250,197,139, 23,183, 0, 56, 24, 17, 17, 49,101,213,170, 85, 93,105,154,174, 48, 90,
-144,195,225,252, 54,103,206,156, 78, 67,134, 12, 33,248,164, 78,123, 61,248, 16,151,166,117,196,188, 69,251,245,119, 31,132,144,
- 52,173, 35, 6,251,205, 97,174,220,142, 32, 39,207,220,160,111,222,174, 15, 34, 35, 35, 29,250,246,237,187, 74,167,211, 85, 73,
-180, 74, 53, 85,149,105, 40, 57, 28, 14,198,140, 25,131,160, 32,195, 61,168,198, 3, 30,102,238,226,199,107,118,118, 19, 19, 92,
-121, 57,146, 85, 31,151,206, 63,145,101,190, 75,255, 87,145, 44, 0,200,205,205,221, 11, 96, 47,195, 48,153, 38, 38, 38, 40, 42,
- 42,170,232,254, 51,138,136,136, 48, 18, 8, 4,232,209,163,135,213,205,155, 55, 99, 72,146,220,154,158,158, 94, 41,227,168,200,
- 76, 88,145, 57, 17,159, 16,117,104,105,139,190,109, 59,180, 48,141, 54, 95,105,106,196, 85,135,213,137, 49, 50, 35, 0, 20,104,
-236, 19, 66,147,135, 21, 18, 89,194,230,173, 58,183,132, 25,215,164,175,140, 46,170,144,104,145, 28,206,203,130,124, 89,239,194,
- 34, 45, 30, 60,140,132,223,176, 6,208, 80, 4, 24,134,132, 92,161, 1, 56, 60,144, 0,134,143, 24, 13,150,224, 34, 47, 51, 29,
- 28, 14, 39, 2, 52,141,127,153, 44,156, 50,101, 74,239, 69,139, 22,213,155, 63,127, 62,230,207,159,239, 30, 24, 24,184,119,205,
-154, 53,243,179,179,179,155,160,154,228,227, 85,224,212,185, 24,180,116,238,133,251,123, 10,250,124,165,122,215,178, 97,177,230,
-171,101, 67,228,241,120,136,229,114,144,203,178,239,187, 25,245,237,219,183, 99,249,237, 63, 76, 62,116,130, 47,219, 55,200, 71,
-171, 65, 61,231, 94, 45,154,251,204, 92,188,104,177,105, 84,232, 93, 4,252,180,131,245,108,213,189,104,239,253,151, 90,185, 73,
-221,222,242,156,216,135,134,242, 11, 0,232,213,101, 16,154, 54,106,243,209, 65,223,206,197,201,218, 31,220,121,142,204,108,137,
-193,147,109, 9, 57,168,208, 39,203,144,144,254, 15, 69,165, 82,201, 34, 35, 35,237,210,210,210,222,115,124,175, 91,183, 46, 8,
-130,192,147, 39, 79,240,248,241, 99,248,249,249,129,203,229,130,199,227, 33, 36, 36,164, 70,218,152,114,218,165,210,168,195,158,
- 46, 46, 46,149, 69, 27, 86,139,165, 82,169, 80, 80, 80,128,224,224, 96, 52,104,208, 0,107,214,172,129,147,163, 61, 22, 47,158,
- 11,134, 97, 80, 88, 88, 8,189, 94,111,168, 70,139, 41,213, 22, 49, 12,131,236,236,108,212,171, 87, 15, 59,119,238,196,150, 45,
- 91, 86, 73,165,210,223,107,218, 70, 87, 87, 87, 11,189, 94, 63,175, 79,159, 62,221,191,253,246, 91,244,236,249,126, 62,214, 99,
-199,142,153,158, 57,115,102,237,182,109,219,122, 81, 20,181, 46, 43, 43, 43,219, 16,220, 3, 7,138,211, 47,137,218, 45, 67,192,
-144, 58, 24, 53,237, 16, 54,109, 58, 11,161, 80,248,222,196,187,114,229,202, 42, 73, 12,195,178,158,252,156,208,244,185, 11, 54,
-218,173, 93,123, 19, 55,111,102,129, 36, 73, 56, 58, 58,130, 36, 73, 36, 38, 38,130, 36, 73,184,187,187,131, 36, 73, 72, 36,146,
- 82,159,192,124, 84, 16,245, 88,241, 42,156,132, 90,173, 70,106, 74, 18,210,226, 98, 32, 46,204,128,173,153, 8,249,175, 95,161,
-233,248,137,101,249,159,254,102, 57,162,213,106,143,148,219,223,120,241,226, 69, 45, 65, 16,131, 81,236,167, 81,170,209, 88, 69,
-211,244,170,202, 64,218,181,107,215,124,209,162, 69,188,210,116, 27, 78,110,171,105,138,162, 24, 0,104,216,244,235,247,216,126,
-108,108, 44, 54,109,218, 4,133, 66, 1, 62,159,207, 55,228, 58, 48, 12, 83, 22, 97, 88, 17, 9,171, 9,201, 2, 0,107,119,151,
-237, 79, 94,132,232,195,227,246,168, 34,162,175, 26, 75, 83, 72,144,218,127, 47,201,250, 80,179,229,226,226,178,140, 97, 24,150,
-101,217,165,229, 14, 9,221,220,220,238, 95,191,126,221,154,166,105,108,219,182,205, 34, 35, 35,195,226,235,175,191, 14, 0, 80,
- 41,209,170,200, 76, 88,145, 57, 17,229,162, 14,133, 66,161,149, 86, 91,169,242,228,163,168, 67,189, 30, 94,102,166, 22,200, 71,
- 26, 52, 54,186,230, 50,107, 58,239,134,116, 98,152, 83,114,139, 70, 38,122, 93, 61,178, 80, 11,103,145, 5, 24,150,173, 52, 52,
- 90,163,211, 93, 13,123,241,178,135,155,107, 3,206,239,151,238, 97,192,192, 33,208,104, 72,168,117, 4, 8, 14, 15, 4,135,143,
- 38, 77, 91,224,139,198, 77,193, 2,120,254, 52,148,214,234,116, 55,254, 77,125,239,216,126,134, 31, 65, 96, 43, 88,134,173, 32,
-143, 86,189,129, 3, 7,174, 5, 48,179, 58, 28,187,118, 51,252, 72,178, 24,167,124, 30,173, 57, 51,166,224,245, 83,158,249,189,
- 23,235,249, 61,219,225,114,246, 77, 2, 34,163,255, 70, 29,242,200, 79, 74,205,241, 79, 33, 92,213, 19, 45, 87, 87, 87, 11, 51,
-161,209,129,239,199,143, 51, 77, 14,127,132,140, 55, 79,240,240, 94, 76,254,137, 51,103,243, 20,185, 89,227,107, 64,178,202,204,
-124,214, 14,117, 80,215,251, 99,162,101, 36,182, 5, 0,212,245,110, 3,142, 73,205,210, 8, 85,164,205,170, 13,201, 42, 63, 96,
- 87,148, 67,107,242,228,201, 8, 12, 12, 68,251,246,237,225,233,233, 89, 54,216,215, 84,107, 86,129,118,169,198,209,134,229,165,
-168,168, 8,238,238,238,216,183,111, 31, 34, 34, 34, 96,106,106, 10, 63, 63, 63, 20, 21, 21,149, 17, 44, 67,157,225, 89,150,141,
-189,126,253,122,235,161, 67,135,178, 60, 30,143,144,201,100,176,176,176,192,206,157, 59, 21, 82,169,244,114, 45, 72,214, 16, 62,
-159, 63,119,216,176, 97,156,134, 13, 27, 34, 51, 51, 19,102,102,102, 58,130, 32,120, 0, 96, 97, 97,161, 51, 54, 54,198,148, 41,
- 83,208,172, 89,179, 14,243,231,207,111,207,229,114,119,166,167,167, 31,170,234, 94, 34, 8,162,108, 66, 29,191,245, 45,180,218,
-226, 9,122,215,174, 93, 40,241,117,251,175,137, 32, 46, 14, 48, 32,146, 69, 44, 22,195,211,211,179,194,190,239,208,161, 3,158,
- 63,127, 94,108,154,228,114, 97,103,103,135,135, 15, 31, 26, 20, 73, 85,154, 8, 50, 50, 50, 18,222,117,109, 16,113,243, 58,108,
- 68, 60, 52,115,114,128, 75,135,142,136,137,137,249, 59,181, 89, 4,138,253, 48,186,149,220,131,251, 1, 76, 46,183,191, 19,192,
-246,154, 0,210, 52,205,146, 36, 73,164,166,166, 82, 34,145,136,176,178,178,226, 10,133, 66,104, 52,154, 50,194, 21, 27, 27,139,
- 75,151, 46, 33, 45, 45, 13, 86, 86, 86,164,185,185, 57, 40,138,202, 55, 4,223,203,203, 11, 14, 14, 14,239, 57,190,143, 31, 63,
-190, 86, 36,107, 12,224, 19,184,122, 93, 29, 33,201, 49,247,182,233,133,132,183,137,106, 82, 11,163,255, 15, 36, 11, 0,100, 50,
-217, 94, 0,123, 75,247,109,108,108,198,114, 56,156,197, 26,141,198, 60, 36, 36,196,194,214,214,150, 56,116,232,144,110,233,210,
-165, 50, 14,135,147, 79, 16,196,230,191,159, 28,226, 77, 78, 65,156, 59,207,210,137, 9, 87,179,161,254,169, 1, 95,228,243, 26,
-216, 18,141,125, 48, 48, 43,234,193, 88, 58,238,171, 76,105, 6,201,130,121, 83,197, 24,188, 63, 96,209,202,121, 49,111, 95,186,
- 25,153, 25, 97,242,148, 69,184,124,237, 14, 8,146,135,251,161, 79,160,165,244,200,201, 43,192,176,225, 35,225,226,104,131, 55,
-143,131,179,105,134,217,249,239, 34,217,204,142, 30, 3,198, 90, 10,141, 69, 37,215, 68,143, 35,191,206, 5, 73,110,197,143, 63,
-254, 8, 31, 31,159,105,145,145,145, 43, 80, 77, 30, 45,130, 96,118, 52,233, 56,220,146, 47, 44,198, 97, 25, 61,246,157, 10, 40,
-201,163, 53, 27, 59,247,158,105,210,184,110,194,242,170,242,104,253,139, 72, 86,249,109,213, 68,203,221,221, 93,104,194,195, 36,
- 30,135, 59,255,251, 17,223,218,102,197,189, 70, 90,212,203, 98,243, 2,165,162, 50,222, 69, 25,146, 10,189, 27,222,207,223,193,
- 86,101,186, 82,171, 13, 90,209,191,135, 89, 58,225,126,168,205,170, 33,201,250, 8,179, 60,217, 42,159, 55,203,213,213, 21,107,
-215,174, 53, 36,143,214,135,231, 94, 42, 61, 81,236, 0, 95,222, 25,190,167,129, 36,171, 66, 76, 91, 91, 91,228,230, 22,103, 72,
-232,212,169, 19, 58,117,250,111, 60, 3, 69, 81,101, 90, 44, 83, 83,211,138, 52, 90, 31, 97, 26, 27, 27, 7,156, 61,123,118, 92,
-104,104,232,208, 31,126,248,129,215,181,107,215, 82, 50,167,132, 97,181,221,222,195,212,235,245, 83,130,131,131, 57, 12,195, 96,
-223,190,125,120,254,252, 57, 43, 18,137,150,136, 68,162, 29,198,198,198,122,149, 74, 53,121,226,196,137, 35,151, 47, 95, 78,118,
-232,208, 1,143, 30, 61, 34,235,213,171, 55, 26,120, 47,137,101,133,231,254,228,201, 19,144, 36, 9, 58, 47, 5,211, 2, 78,192,
-196,152,139,183,111,223, 34, 47, 47,239,163, 36,166,134, 92,207,242,154,146,210, 87,135, 14, 29,202,204,144,109,219,182, 5,135,
-195, 65, 88, 88, 88,101,102,216,242,152,172,181,181,117,217,253,193,231,243,113,231,206, 29,252,244,211, 79,112,179,178, 64,126,
- 84, 4, 28, 58,117, 65,247,113, 19,225,231,231, 7, 14,135, 3, 43, 43,171, 50,205,175, 1,247,210,167, 72,121,204,113,222,222,
-222,163,223,188,121,227,210,164, 73, 19,199,200,200,200,206, 62, 62, 62,238, 17, 17, 17,165,251, 66, 24,230,155, 83,134,249,236,
-217,179,211, 59,118,236,152, 50,102,204, 24, 62,195, 48,250,228,228,100, 29, 0,194,193,193,129,243,236,217, 51,230,247,223,127,
-135, 74,165,130,139,139, 11,233,236,236, 76,220,184,113,131,137,138,138,122,194,178,236, 34, 67,206, 93,175,215,191,151,198,161,
-244,253,177, 99,199,106,252,188,215,249,194,107, 77,215,175, 27,186,230,164,135, 65, 42,137,131,190,192,150,186,116,254,162,166,
-134, 36,235,207,238,163,191, 18,115,229,187,119,239,156, 53, 26, 13, 4, 2, 1,118,237,218, 69,173, 93,187,246, 77, 78, 78,142,
- 47, 42,142, 40,127, 15,179,150, 81,135,121, 85, 96,126, 20,117, 88,144,139,203,231, 47, 60,107, 45, 30,184, 31,211,210,179,203,
- 28, 27, 89,130,176, 58,107,223,200, 87,212,166,137,132,188,178,140, 44,210, 43, 47, 87,113,238, 90,149, 86, 59,100,224,160,225,
-183,130,130,142,139,151, 46, 91,134,135, 79, 34,144, 43,147,131, 97, 57, 96, 8, 2,139, 23, 47,133,131,141, 21, 10,211,223, 41,
- 53, 20, 53, 16,239,231,208,250,199,247, 59, 65,144,211,111,252,126,104, 43, 73,128, 81,100, 70, 11, 57, 69,113,162, 81,126, 3,
-185, 67,134, 12,193,217,179,103, 17, 25, 25,185,167, 10,146, 85,134,201,178,228,244,136,144, 19, 91, 9,128, 81,101, 71, 11,185,
-242, 4,209,232, 17, 3,185,126,126,126, 56,119, 41, 20, 65, 23, 19,118, 7, 93,196, 69,252,187,165,230,153,225, 77,185,136,244,
-109,228,225,220,161, 69, 99, 35,174, 94,133,180,168, 56,228, 41,212,184,241, 58, 89, 70,178,100,173,115,235, 20, 15,144,124,164,
-164,188,171, 96,101,101, 84, 50,161,171,107,132, 73,146,228,123,218,172, 79,209,100,149,111,167,189,189,253,123,229, 92,202, 79,
-220,165, 62, 64,181, 72,237, 16,144,146,146, 98,150,146,146, 2,150,101,241,228,201, 19,179,182,109,219, 6,124,138, 54,107,238,
-220,185,101, 90,171, 15,183, 21,125, 86,157,148, 56,165,111,209,233,116,167,230,207,159, 63,173,109,219,182, 61,150, 45, 91, 70,
-160, 6, 5,120, 63,208,230,208, 12,195,224,238,221,187, 56,123,246,172,158,162,168, 73, 82,169, 52,162,220, 87,182,189,120,241,
-226,198,160, 65,131, 14, 69, 71, 71,115,222,188,121, 3,150,173, 62,238, 84,165, 82,193,211,211, 19, 52, 77, 99,253, 52, 87, 20,
- 21, 53, 1, 77,211,208,235,245, 48, 49, 49, 41,211,226,149, 39,207,213,221, 71,122,189,254, 35,162,245,228,201, 19,112, 56, 28,
-248,250,250,226,229,203,151,101, 26,173,234, 52, 80, 20, 69,165,216,219,219,219,175, 92,185,178,172, 93,217,217,217,184,126,253,
- 58,218,125,249, 21, 26, 77,154,140,244,244,116,108,222,188, 25, 78, 78, 78, 88,179,102, 13,242,242,242, 64,211,244, 95,173, 78,
-239,253,230,205, 27,151, 17, 35, 70,100, 69, 68, 68,184, 92,186,116,201,162,111,223,190, 38,195,135, 15,207,138,136,136,112, 33,
- 8,226, 43,212,208, 9,154, 97,152,133,139, 23, 47,190,182,102,205,154,128,153, 51,103,182, 29, 51,102, 12,143,199,227, 49, 18,
-137,132, 62,126,252, 56,225,233,233, 73,242,249,124, 34, 56, 56,152,121,250,244,233, 99,154,166,215, 3,184, 95, 19,141,115,121,
-146,197,225,112, 12, 37, 89,239,137,191,157,112,180, 41,153,237,187, 99,215, 90,178, 97, 93, 23,234,240,241,235,169,247, 31,189,
-139,231,104,104,255, 3, 85,164, 6,248, 55, 11,135,195, 57,233,237,237, 61,118,250,244,233,198, 61,123,246, 20, 46, 95,190,188,
-160,168,168,168, 50,146, 85,193,130,249, 47,137, 58,252,117,225, 15,151,252,231, 52, 25,235, 49,193,161, 14,110, 42,178,144,207,
-229,144,102, 22, 36, 90,184,115, 80,148, 19,107,123,241,214,193, 68, 0,213,229,101,123,246,226, 85,100,183,198, 77,154,159, 89,
-191,102,189,221,146, 5,243,121,103, 46, 93, 5, 75, 83,120, 18, 18, 2, 49, 95,207, 70,189,184,153,169,161,180,223,226, 95, 88,
-130, 71,250,112,123, 16,128, 11, 86, 86, 86,225,227,198,140,241,244,246, 30, 14,145, 72,132,211,167, 79,227,200,182,109,250, 45,
-192, 80, 33,240,114, 74, 53,249,244,178, 30,151,225,132, 77, 28, 55,206,171, 69,139, 9, 16,137, 68, 56,117,234, 20, 14,109,217,
- 98, 48,206, 63, 92, 74, 51,195, 95,198,127, 51,196, 87,227,163, 69, 18, 69,143,223, 37,203,159,188, 75,150,131, 97, 89,134,101,
- 53, 36,137, 84, 5, 69,173,121,151, 32,169, 21, 41, 40, 53, 29,174, 90, 61,253,143,179,121,148, 35, 63,181, 13,233,174,128,100,
-165,149,175,145, 86,126,146,174,236,189, 78,167, 75, 51, 16,126,157,155,155,219, 71,159,213, 94,245,203,214,136,100, 25,154, 71,
- 11, 0,114,115,115,165, 0,150, 60,122,244,232, 88,143, 30, 61, 38, 2,144,212,178,143,246,117,236,216,113, 18, 0, 14, 65, 16,
-123,210,211,211, 35, 62,122,224,165,210, 24, 39, 39,167, 13,117,235,214,157, 92,188, 48, 37,246, 85, 51,145, 39, 52,105,210,132,
-170,168, 47, 42,219,103, 24,166,218, 62,146,201,100,104,211,166,205, 71, 53, 45, 89,150, 69,114,114,114,169,198,169,236,218, 87,
- 69,224,228,114,249,228, 25, 51,102,236,229,241,120,110, 0,136, 82,146,171,215,235, 57,219,183,111, 55,210,235,245, 28, 0, 4,
- 73,146, 52,143,199, 83,159, 61,123,150,166,105, 58, 69,163,209, 76,254,139, 7,136, 83, 68,113, 41, 6,197,155, 55,111, 26,150,
-104,178,210, 34, 35, 35,195,130,130,130,108, 1,156,168, 37,238,125,165, 82,121,127,237,218,181, 29,118,237,218,181,112,242,228,
-201,109,252,252,252,184,157, 58,117,194,229,203,151,245,119,239,222,125,162, 82,169,214,213,132, 96,149,244,101,129,171,171,107,
- 25,225,170,230, 89,174,210,145,215,218, 93,184, 99,228, 84, 39,163,125,235,174,203,115,210,181,161, 58,185,118,209, 65, 32, 18,
-255,143, 37, 51, 51,243, 7, 0, 75, 55,111,222,156,222,172, 89, 51, 33,159,207,215, 26, 74,178,254, 66,161, 25,153,252,155, 95,
-186,127,119,161,227,226, 25,117,187,119,246, 21,185,214,177,115,142,138,203, 68,236,163,203,138,240,139,171,147, 88, 77,254, 0,
- 0,134,120,174, 63,213, 80, 84,131,185,243,231, 78, 19,240,120, 61,244,122,125,211,174, 55,206,179, 28, 14, 39, 66,171,211,221,
- 40, 49, 23,170,255,197, 93,190,106,195,134, 13,158,222,222,222, 56,125,250, 52,110, 28, 61,138, 97, 57, 57,184,195,225,112, 72,
- 62,223,250, 34, 69,109,132, 97, 4,105,213,166, 77,155,188,124,124,124,112,242,228, 73, 4, 31, 58,132,161,181,195,169,108,174,
-107, 13,192,182,100, 55, 7, 64, 52,128,150, 0,140, 1,104, 80, 92,218,201,166,252, 20, 86,114,172,244,248, 61,130, 32,254, 76,
- 71,216,234, 51,195,127, 40,145,177, 73, 45,255,232, 86,168, 84,170, 60, 79, 79,207, 26,197, 92,235,116,186, 42,109,184, 52, 77,
-167,121,120,120, 24,172,181, 48,132, 20,229,229,229,181,250, 19, 59,227,147,124,177,222,155, 68, 24, 38,201,209,209,145, 41,157,
-244, 43, 34, 97, 21,125,198, 2,137, 53,249,159,140,140,140,104, 0,115,106,219,206,244,244,244, 51, 48,160,104,180,161,223, 3,
-128,252,252,252, 63,188,152, 47,193,178,146,229,203,151,215,136, 96,131,101,171, 34,159, 17,114,185,188,173, 33,255, 77, 81, 20,
-254, 70, 57, 89,242, 34, 35, 35, 35, 39, 18, 4,209, 19,197, 38,129, 61,248, 99,178,121,223, 47, 44, 44,188,255,243,207, 63,119,
-216,183,111,159, 63,203,178, 40, 44, 44,220, 82, 83,130, 85,182,122,206,202,186,252, 71,157,120, 94,166,246,246,241, 61,105, 93,
- 84, 50,202, 63, 80,174, 61,132,207, 82,166,140, 98, 89,246,183, 81,163, 70,181, 3,112,240, 83,193, 42,137, 58,252, 84, 73,100,
-242, 11,154,221,153,251,211,184, 59, 22,166,125,160,231, 54,132,150,188, 8,109,238,101, 0, 7, 96,152,155, 67,217,249,210, 12,
-179,137,214,106, 55,149,155, 92,254, 63,244,179,149,143,143,143,255,216,177, 99,177,116,233, 82, 4,111,220, 72, 77, 37,136, 2,
- 30,192, 94, 43, 94,104,146, 4,176,192, 80,156,209,163, 71, 99,233,210,165,184,178,126,125,109,113,170, 18, 91,130, 32, 46, 1,
- 64, 64, 64,192,162,181,107,215, 90, 46, 92,184,176,233,186,117,235,214,148,236,191, 46, 61, 94, 50,215,245, 93,184,112, 97,227,
-114,199,139, 0, 60,251,147,175,103,133,153,225,255,108,233,246, 25,243, 51,230,103,204,207,152,159, 49, 63, 99,126,198,252,140,
-249, 41,194,178,108,159,226, 77,229,219,202,222,151,219,254, 45,194,197,103,249, 44,159,229,179,124,150,207,242, 89, 62,203, 63,
- 80,202,107,177,106,115,252, 15,148, 82, 31,173,242,178, 15, 40, 14,235,174,140,149,214, 36,234,161, 54,204,246,230,103,204,207,
-152,159, 49, 63, 99,126,198,252,140,249, 25,243,255, 29,102,117,216, 31,253,158,101,217, 62, 4, 65, 92, 98, 89,182,111,101,219,
- 82, 98,245,225,251,114,219, 63,204,237,160, 2, 41,245,205,250,200, 71,235,207,150,207,106,213,207,152,159, 49, 63, 99,126,198,
-252,140,249, 25,243, 51,230, 39, 73,169, 9, 16, 0, 27, 16, 16,176,240,127,208,116,232, 88, 66,178,202,191, 0, 84, 97, 58,100,
-217, 83, 28,137, 4,102, 2,129,136, 15, 0, 90,173,146,114,118, 70, 33, 65, 12,249, 59, 11,222,126,150,127,166,148,134,123,103,
-254,193,223,253, 44,159,229,179,124,150,207,242,255, 67,178, 75, 53, 85, 0,178, 1, 16, 37,251,218,146,109,118, 9, 33,251,240,
-253,123,199,255, 68,145,162, 18, 77, 22,183, 50,146,149,147, 35,178,225,114,243,189,244,122,245, 23, 0,192,229,146,111,115,114,
- 44, 99, 88,246, 84, 78,109,200,150,141,157,221, 11, 30,135,227,108,200,119,117,122,189, 36, 39, 51,243,253,212,241, 4,241,111,
- 32,120,134,146,136, 79, 33, 27,127, 58, 81,177,177,177,177,183,183,183,239,111,102,102,246,165, 76, 38,123,154,157,157,125,174,
-138,186,135,107, 9, 2,243,139,239, 43,252, 12, 96, 97, 21,208, 53,249,238,135,226, 41, 18,137,166, 17, 4,225, 83,242,128, 69,
- 42,149,202, 93, 0,222,253, 63, 28,144,140, 1,124,203,229,114, 71,219,216,216,180,201,200,200, 88, 14,160,182,217,188,185, 0,
-230, 90, 88, 88, 12,179,176,176,240,200,203,203,139, 47, 44, 44, 60, 9, 96, 19,128,106, 67,165,151,207,116,252,178, 83,207, 78,
- 75,238, 6,223, 93,181,124,155,244,209, 71,199,231, 58, 90,247,232,222,126,233,221,139,161, 43, 23,237, 76,207,171, 97,219,200,
-146, 23, 80, 28, 29,201,226,227,100,175,159, 42, 60, 0,253, 0,116, 2,112, 23,192, 69, 67,206,187, 18,105, 7, 96, 81, 73,155,
- 55, 1,184,243, 63,126, 31,153,216,219,219,175, 7,208,143,203,229,190,145, 72, 36,147, 0,164,253,205,109,226, 2,104, 13,192,
- 7,197,105, 56,158,193,176, 20, 14,213,138,181,181,117, 95, 46,151, 59,173, 36,181,203,174,220,220,220, 75,255,171, 29, 35, 16,
- 8,182, 56, 56, 56, 76, 80,169, 84, 74,130, 32,216,242,249, 30,105,154, 78,203,201,201,105,245,111, 27,212, 8,130,120,246, 63,
-222,196, 73, 21,124, 86,121, 30, 45,137, 4,102, 92,110,190, 87, 86, 70,196,176,116,233,171,161, 0,224,228,216,244,164,157, 67,
-147, 19, 18,137,128,114,104, 56, 80,204, 19,113,119,113, 56,188,230,106,173,198,134,199,229,229, 80,180, 46,140,212,178,211, 50,
-162,207, 85,152,108,145,199,225, 56, 39,197,220,177,163,169, 60,240,140,156,192, 51,118,171,180,181, 78, 78, 78,181, 58, 75, 75,
- 75, 15, 83, 74,104,228,207,227,113,186, 51, 44,237,195, 50, 0, 73,240, 34,105,189,238, 22, 95,163,249, 37, 63, 63,190,168,182,
- 87,176,161, 53, 28, 88,192, 15, 4,186,131,197, 13, 2, 8,138,206, 69, 70, 13, 32, 12, 37, 17,159, 66, 54,202,255,118, 51,128,
- 31,254,232, 59,201,217,217,217,178,111,223,190, 91,126,250,233, 39, 99,177, 88, 76,164,164,164,244, 92,176, 96,193,215,207,159,
- 63,159, 35,145, 72,210, 63, 36,125, 4,129,249, 12,195,146, 0, 64,146,196, 2, 91, 91, 59, 17,135,195,249, 40,183,145, 94,175,
- 23,101,103,103, 77,103, 24,150, 40,249,238,124,150,197, 86, 67, 8,163,145,145,209,112,159, 38,205,231,172,223,176, 73,108,111,
-103,103, 66,235, 25, 42, 49, 57, 73,180, 36,224,135,182,113,177,239,182,170,213,234,227,181,121,174, 57, 28,206, 48,161, 80,216,
- 23,128,119,201,103, 81, 26,141,230,146, 94,175, 63, 97,232,132,110,111,111,127,143,195,225,212,169,201, 31,235,245,250,148,204,
-204, 76,223, 90,118,209, 16, 55, 55,183, 3, 29, 59,118, 20,181,105,211, 6, 2,129, 0, 75,151, 46,157, 43,149, 74,171, 35, 90,
- 92, 0,115, 69, 34,209, 48, 19, 19, 19, 15,185, 92, 30,167, 82,169,206, 8, 4,130,110, 91,183,110,117,109,223,190,189,105,102,
-102, 38,193,225,112,236,175, 92,185,242,159, 45, 91,182,244,164,105,186,107,117,147, 92, 65, 28,187, 68,216,207,187, 67, 65,220,
-157, 37, 0,122,127,120,156, 86, 27,141,102, 57,174,125, 85,236,203,212, 18,242, 97, 48,201,226,241,120, 91, 29, 28, 28,198,170,
-139,115, 5,176, 31, 78, 56, 0,160,213,106,243,101, 50, 89,195,218, 60,242, 0,198, 91, 88, 88,140,157, 55,111,158,101,239,222,
-189,113,244,232,209,239, 3, 3, 3,243, 11, 11, 11,127, 67,113, 34,204,232, 26, 98,206,207,200,200,248,134,199,227, 17,174,174,
-174, 28,149, 74, 85, 19,162,229,133,226, 34,204,207, 0,236, 66,113,234,130,206, 64,241,243, 14,224,231, 82,226, 70,146,228,174,
-134, 13, 27,246,143,138,138,218, 13, 96, 85,109,159,117, 7, 7,135,189, 59,119,238, 28, 58, 96,192, 0, 78,118,118,182,115,179,
-102,205,142,101,100,100,116,248, 3,134,145,113, 66,161,112,118,211,166, 77, 27, 69, 71, 71,199, 20, 22, 22,110, 42,185,158, 85,
- 61, 83, 46, 0,186, 89, 88, 88,116, 93,188,120,177,184,111,223,190,216,183,111,223, 55,129,129,129,242,162,162,162, 91, 40,246,
-233,249, 36, 18,200,229,114,167,165,165,165,217,176, 44, 11, 71, 71,199,105, 0,254, 39,137, 22, 73,146, 91, 7, 13, 26, 52,246,
-216,177, 99,162,164,164, 36,145,179,179,115, 89,242,108,130, 32,106, 61,127,126,150, 79,150,125,229, 8, 87,245,121,180, 4, 2,
- 17, 95,175, 87,127,145, 46,125, 53,244,235,142,219,205, 1,224, 94,200,140,161,118, 14,141, 35, 5, 2, 81,140,208,204,232,236,
-160,126,221,154,127,215,183, 35,225,226,104,135, 52,105,150,253,175, 65,193,189, 46, 5,223, 57,139,226, 4, 98, 21, 10, 77,229,
-193,152,186,137,232, 7,219, 96,211, 41, 29, 59,174,164,225, 81,120, 34,148, 5, 57,168,227, 96,140, 13,254, 61,224, 96, 41,170,
-221,210,203,206,179, 51,205, 21,158, 24, 49,124,148,121,255,111,189,121,238, 14, 14, 96, 89, 33, 98,226,228, 95, 93,189,126,167,
-245,153, 83,199,167,153,240, 60,135, 41,178,222, 25, 60,184,181,112,132,177,130,194,183, 92, 14,241,159,246,173, 26,117, 29,254,
- 77, 7,178,145,119, 3,188,121, 29,213,227,194,237, 39, 27,200,208,215,183,104, 61,123,216,132,143,243, 47,165, 85, 38,244,251,
-136,112,116,237,218,173,131, 80, 40,124, 47,121,146, 70,163,225,223,186,117,179, 93,109,200, 70,233,127,104,181, 26,146,199, 19,
-128, 36,137, 57, 62, 62, 77,188,115,114,114,238, 16, 4,113, 32, 61,189,102,218,130, 25,128, 32,159,203,109, 73, 10,133,142,122,
-173,214, 26, 0, 8,129, 32, 63,145, 36,155, 44, 94,180, 72,204,225,112,152,220,220, 92, 40,149, 74, 98,226,196,137, 70,113,113,
-113,131, 36, 18,201,182,106, 86, 36, 8, 12, 12,244,114,116,116,252,168,122,172, 84, 42, 21, 12, 24,208,191, 54, 93,239,213,180,
- 89,139,217,193,193,215,188, 11,243,242,213,129,155,247,190,208, 25,137, 52,245,188, 27,242,118,237, 59,100, 62,105,236,200, 25,
-111,223,190, 14, 67,205,234,213,185, 25, 27, 27,159,221,184,113,163, 79,231,206,157,121,118,118,118,200,204,204, 68, 84, 84,148,
-207,237,219,183,191, 61,116,232,208, 92,149, 74, 53, 8, 48,168, 32,170,231,173,195, 7,236, 76,172,172,161,215,233,224,212,180,
- 69, 89,126,179,216,219,215, 65, 83, 20, 24,157, 14,222,125,191, 45,209, 38,179,240,246,246,174,109,214, 93,167,198,141, 27, 31,
- 89,179,102, 13, 95,163,209,224,201,147, 39,184,115,231, 14, 35,149, 74,171, 75,136,203, 37, 8,226,250,178,101,203, 92,124,125,
-125, 77,115,114,114,160,215,235,109,206,159, 63, 63,173,121,243,230,102,174,174,174,130,195,135, 15, 67, 46,151,131,166,105, 43,
- 15, 15, 15,171,225,195,135,107, 15, 31, 62, 60, 23,192,250,202, 52, 89,133,113,236, 18, 41,225,209,171, 97,203,209,200, 32,174,
-245,154,221, 11, 87,205,234, 19,101,154,173, 94, 30, 30,166,133, 18,209, 2,177, 89, 19,171, 66,201,205, 5,189, 60, 60, 2,175,
-197, 27,180, 24, 34, 75, 38,155, 17, 65, 65, 65,162,168,168, 40,145,183,183, 55, 24,134, 41,203,192, 95,154,112,214,211,211,179,
- 54,215,113,221,148, 41, 83, 22, 12, 29, 58, 20, 77,155, 54, 45, 75,138,250,227,143, 63, 98,193,130, 5,150,247,238,221,155,123,
-252,248,241,185,231,206,157, 91, 15, 32,160,134,218,152, 82,169,105, 31,175, 72, 72, 72, 24,114,246,236,217,145,243,231,207,247,
- 4, 48, 29,192,210,220,220,220,142, 37,218, 24, 65, 9,209, 26, 55,119,238,220,169, 1, 1, 1,248,230,155,111,150, 62,121,242,
-100,117, 45,181,124, 28,154,166,191, 25, 48, 96, 0, 71,167,211,193,196,196, 4, 58,157,174,254,167, 42, 37, 0,236,156, 60,121,
-242,212, 41, 83,166,192,210,210, 18, 58,157,206, 43, 40, 40, 40,112,233,210,165, 95, 2, 24, 95, 73, 91, 71, 79,157, 58,117,129,
-137, 32,113, 0, 0, 32, 0, 73, 68, 65, 84,240,168, 81,163,208,170, 85, 43,112,185,197,151,113,227,198,141, 88,185,114,165,248,
-250,245,235,223, 30, 62,124,248,219, 11, 23, 46,156,193,251,101,187,106, 36, 12,195,128,203,229, 34, 53, 53, 21,118,118,118, 66,
-134, 97,130, 9,130,216,151,151,151,119,238,127,104, 50,255,121,200,144, 33, 35,142, 29, 59, 38, 6,128, 13, 27, 54, 96,246,236,
-217,176,183,183,135, 88, 44,254, 76,117,254,119, 52, 90,147,170,213,104, 85, 39, 74,165,178,197,194,153,255, 1, 73, 22,175, 26,
- 27,212,115,195,218, 69,147,136, 11,151,130, 91, 84,169,131, 55,114, 66,244,131,109, 16,186,250, 67,163,163,241, 56, 60, 1, 55,
- 54,244, 44,158, 45,123, 47,134,134,234, 90, 58,217, 88, 9,140,141,127,214,234,245, 15,225,224,240, 4,201,201,217,213,145, 44,
- 91, 7,251, 75,123,246,172, 55,246,169,223, 16, 20,173,131, 36, 75, 2,130, 16,194,197,217, 20,227, 70,247,230,117,236,232,100,
-179, 98,197,222,203, 25, 12, 6, 42,115,222, 85,155, 48,212,203, 6, 7, 91,248,120, 14, 29,222,199, 87,216,196,167, 49,248, 66,
-227,178, 99, 45, 91,181, 66,203, 86,173,200, 0,121, 81,247,167,207, 94,116, 63,125,253,177, 70,169, 75, 62, 25,147,131, 49,213,
- 12, 50,101,132, 99,214,172, 89,176,183,183,127,239, 11,153,153,153,184,125,251, 86,133,191,169,193, 64, 86,246, 31,171, 87,175,
- 54,205,207,207,239,189,127,255,254, 46, 12,195,172,206,200,200,120, 96, 8,200, 40,160, 78,129, 80,216,117,236,166, 77, 76,243,
-254,253, 57, 22, 14, 14, 36,163,215, 19,233,241,241,214,155,183,109,235,148, 23, 27,107,172,176,178,202,203, 87,169,148, 49, 49,
- 49, 48, 50, 50, 34,184, 92,110,235, 10,160, 50, 89, 22, 63,147, 36,177,128, 32, 8, 8,133, 70, 49, 83,166, 76,121, 89,114,172,
-206,197,139, 23, 69,253,250,245, 83, 2, 72, 2, 0,161,208,200,153,195, 33,189,138, 51,177,227,103, 67, 8,166,137,137,201,204,
- 85,107,214,155, 20,230,201, 84,148, 66,161,179, 53, 19, 19,132,216,148, 83, 88, 80, 84, 36,145,102,107, 22, 47, 95,201,153, 60,
-110,212, 76,133, 66, 49,205, 80,146,213,172, 89,179,167,103,207,158,181,179,182,182,134, 76, 38, 67,110,110, 46,158, 62,125, 10,
-134, 97, 48,104,208, 32,225, 87,109,219,180, 88,180,120,201,163, 84,137,228, 75, 67,200,150,137,149, 13, 54,248, 54, 47,158,172,
-147,114,203,250,103,223,144,190,101,223, 89,153, 86, 80,170,157,251,148, 18, 82, 95,118,237,218,149, 15, 0,227,199,143, 47, 44,
- 42, 42, 90, 11,224, 24,170,207,232, 63,119,201,146, 37,206,245,234,213,115, 63,118,236, 24,228,114, 57, 0,216,213,171, 87, 15,
- 94, 94, 94,250,187,119,239,194,203,203, 11,166,166,166,184,119,239, 30, 30, 61,122,132, 86,173, 90,153,242,249,252,161, 20, 69,
- 85, 72,180, 58,245,236,180, 68,216,207,187, 67,195,150,163, 33, 54,115, 68,224,241, 19,136,126,113,168,131,134,138, 90,194,215,
-135,140, 82,177,194, 49,217, 41,226,128, 58,173, 58, 90, 55,104,220, 31,238, 45, 95,218,168,245,247, 19,150,116,175,183,142,107,
-164, 62,180,124,147, 52,183, 50,146, 5, 96,195,160, 65,131,134, 4, 5, 5, 89, 0, 64, 68, 68, 4, 50, 51, 51, 97,107,107, 11,
- 35, 35, 35,240,120,188,178,250,164,181,148, 49,187,118,237, 42, 35,109, 52, 77,151, 85, 1, 16,137, 68,248,250,235,175,209,188,
-121,115,156, 59,119,110, 76, 37, 68,203,183,109,219,182, 71,221,221,221, 93,203,127,168, 80, 40,224,231,231, 7, 0,232,216,177,
- 99, 87, 99, 99, 99,182,148, 16, 74,165, 82,249,179,103,207,186, 3,120, 82, 9,179, 84, 73, 36, 18,204,155, 55, 15,137,137,137,
-223,239,217,179, 39, 25,128,145, 64, 32, 40, 91, 31, 3,240,106,220,184,241,214,217,179,103, 35, 46, 46, 14,111,222,188,121,138,
-218,155, 82,245, 38, 38, 38,177, 58,157,174, 21, 77,211, 80,169, 84, 24, 56,112,160,209,153, 51,103, 50, 57, 28,206,219,156,156,
-156,145, 40,246, 73, 49, 84,140, 0,108,154, 50,101,202,212,249,243,231,227,214,173, 91,184,112,225, 2, 70,141, 26, 5,127,127,
-127,136,197,226,177,254,254,254,143, 80, 92,208,252, 67,233,186,107,215, 46,232,245,250,143,158, 13, 35, 35, 35,248,250,250,162,
- 81,163, 70,184,112,225, 66,215, 79, 32, 90,238,190,190,190, 2,134, 97,160, 80, 40,112,247,238, 93,177,177,177,177,216,197,197,
-101, 34,128,255, 25,162,229,238,238, 62, 37, 40, 40, 72, 92,222,250, 35, 20, 10, 81,238, 62,248, 44,127,191, 70,171,202, 21, 86,
-153,104,181, 74,138,203, 37,223, 58, 57, 54, 61,121, 47,100, 70,153,233, 16, 32,223,106,181, 74, 10, 0,244, 12,139, 66, 37, 13,
- 99, 33,137,164,140, 34,188,142,207,169, 8,234,189, 16, 77,158,177, 27,132,109,146,192,178, 44,180,148, 30,154,130, 12,172,189,
-172, 68, 84,154, 26, 90, 69, 62,180, 84,177, 27,150,141,141, 13, 55, 56,248,234,236,155, 55,111, 79,253,237,183,223, 56,105,230,
-230,111,138,128, 22, 21, 97, 90, 90,122,152, 50, 2,193,201,221,123,150, 26,179,156,120,196,164, 40,208,192,165, 13,108, 44, 92,
-145,145,163,192,195, 55, 87,240,246,221, 37,212,115,116,135,255,204, 94, 70,171,214, 28, 59,193,167,235,186,201,100,137,133,149,
-181,179,116, 21,181,247, 90, 12,232,188,120,232,115,227,160, 47, 74,255,232, 11, 98, 91, 55,180,236,236, 12, 91,215,250,194, 49,
-254, 43, 71, 3,239, 17,173,242,152,153, 4, 65,238, 38, 73, 98, 42, 65, 16,104,218,180, 89,218,166, 77,155, 42, 74, 5, 78, 53,
-109,218, 44,141,195, 33, 93,138, 7,118,114, 23,203, 50,153,213,180,243, 61, 82, 35, 16, 8,231, 23,171,253, 29, 83, 47, 95,190,
- 76, 13, 25, 50, 4, 27, 55,110, 20, 44, 88,176, 96, 49,135,195, 25, 95,129,121,239, 61,204,129,128,155, 69,253,250, 61, 86, 63,
-124,200,242,116, 58, 34,239,233,211, 66,153, 84, 74,103, 20, 21, 9, 78,189,125,251,205,132, 31,126, 16,184,186,186,226,193,165,
- 75,214,217, 10, 5, 43,211,104, 84, 50,153,140,165,105,250,105, 37,152, 11,109,109,237, 68,129,129,129, 94, 83,166, 76,121, 41,
-149, 74, 23, 2,128,163,163,227, 90, 0,141, 0, 36,149,251, 12,123,246,156,144, 76,156, 56, 49, 38, 43, 43,107, 97, 85,237, 44,
- 39,141,237,108,237, 68,199,247, 30,126,101,101,106, 76,218,186, 56,145, 60, 11, 11, 46, 45, 48,230, 51,128,170,158,107,125, 19,
- 0,141, 43,249,237,135,152,132,177,177,241,217,223,127,255,221,142,199,227, 65,175,215,195,214,214, 22,137,137,137,144,201,100,
- 40, 42, 42, 66,194,219, 40,212,117,117,197,138,128, 5,142,211, 23, 4,156, 85, 42,149,173, 62,152,204, 62, 46,128,172,163, 62,
-210,236, 85, 84,197,224, 67,179,151,129,253, 94, 94, 18, 83, 82, 82, 32, 22,139,225,227,227, 35,126,248,240,225,253, 42, 72, 86,
-249, 34,192, 67,219,183,111,111,122,236,216, 49,180,106,213, 10,230,230,230,184,123,247, 46, 34, 34, 34, 64, 81, 20, 41,151,203,
- 33, 22,139,177,110,221, 58,184,185,185,161,168,168, 8, 73, 73, 73,214, 60, 30,207,230,131,140,246,101,152,119,131,239,174, 42,
-136,187,179, 36,131,184,214, 43,240,248, 9, 76, 28, 62, 12, 14,108,252,125,243,250,196,170, 30,253,218,255,200,114, 92,251,154,
-152, 54,181,244,244,233, 7,190, 64,140,233,243, 87, 34, 38,242,162,165,178,232,213,247,132, 62,213,117,249,166, 83,179, 42, 56,
-119, 2, 0,233,234,234, 58,225,212,169, 83,166,101,170, 23, 14,167,172,230, 97,249, 34,240, 85, 20,124,175,246,122, 18, 4,129,
-196,196, 68,216,217,217, 65, 44, 22,151, 21, 16,143,138,138,194,227,199,143, 81, 90,141,162, 18,204,145, 55,111,222,116, 53, 49,
- 49,121,239, 11, 44,203, 34, 39, 39, 7, 52, 77, 67, 36, 18, 65,175,215,131,162, 40,232,116, 58,168,213,106,113,163, 70,141,166,
-233,116,186, 39, 21, 97, 50, 12, 51,103,232,208,161,237,159, 60,121,226,177,109,219, 54,104,181,218, 13, 25, 25, 25, 24, 60,120,
- 48, 24,134, 65,215,174, 93,219,177, 44, 27,189,120,241, 98, 0,192,236,217,179,117, 10,133, 98, 74,109,206,189, 68, 26,181,108,
-217,210,227,214,173, 91,232,208,161, 3, 52, 26, 13, 54,110,220,104,182,103,207, 30,179,195,135, 15,219,206,159, 63,255, 64,118,
-118,118,207,106, 48, 9, 0, 27, 28, 28, 28,166,118,234,212,201,184,164,134, 41, 14, 29, 58,132, 21, 43, 86, 4, 1, 88,124,245,
-234,213,101, 23, 46, 92, 24, 61, 97,194, 4,172, 88,177,194, 95, 38,147,237,175, 12, 51, 33, 33, 1,182,182,182, 48, 51, 51, 43,
- 30, 44, 41, 10, 97, 97, 97,184,113,227, 6,190,248,226, 11, 67,206,169,178,118,186, 15, 26, 52,232,192,241,227,199, 77, 83, 83,
- 83,113,239,222, 61,212,173, 91, 23, 74,165,210,144,218,176, 55,255,132, 9,187, 82, 76,149, 74,165, 78, 73, 73, 17,175, 95,191,
- 30,142,142,142,112,119,119,135,145,145, 17, 8,130,128, 78,167,171,170,188, 90,181,237,236,216, 17,220, 28,137,229, 0,115, 11,
-203,239, 89,150,229, 22, 20,228,239,165, 32, 59, 29, 31, 15,237, 95,120,238,255,100,105, 1,224, 37,222,175,121, 40, 45, 35, 90,
-151, 46, 93, 98,251,246,237, 75,148,110,157,157, 81,152,147, 99, 25, 99,231,208,228,132,157, 67,227,146,186, 95,228, 91, 14,199,
- 50,198,222, 94, 89, 8, 0, 20,205, 34,244,173, 12,175, 98, 51, 16, 17,155, 1, 19,161, 97,202, 23, 13, 69, 23,123,172,178, 44,
-212,242,255, 46, 90, 41,101, 62, 52, 84,177,187,135, 86,163, 68, 65,246, 27, 98,200,192,238, 70, 83,167, 78,134,163,163,179,109,
-101,120,148,208,200,127,250,236,111, 44,172, 44,120,184,244,240, 26,218,125, 49, 16, 70, 66, 30,114, 11,212, 0, 1,188,139,191,
- 1, 48,166,136,140, 73, 65,219,198, 34,244,236,225, 45, 62,119, 58,250, 7, 0, 75, 13,105, 47,157,246, 20,124,207,222,224,233,
-117,208,229, 68,131,145, 37, 3, 38, 14, 80, 17, 98,228, 74,147,241,246,254, 25,131,214,140, 12,195,124,111, 99, 99, 35, 91,188,
-120,113,167, 6, 13, 26, 80,211,166, 77, 11, 79, 78, 78,158,243,193,106,229,151, 93,187,118, 33, 54, 54, 86,178,122,245,234,187,
- 57, 57, 57, 75,106,216,209, 1, 44,139, 45, 37,166,184,156,243,231,207,183, 12, 9, 9,241,223,178,101,139,253,140, 25, 51, 4,
- 51,102,204, 24, 7,224,167,170,204,133,133, 66, 97,183,213,247,238,177,116, 90,154,230,200,246,237,130,157,161,161,139, 41,134,
-113,178,177,179, 35,190,106,219, 86, 33, 34,201,156,220,204, 76,218,214,195,131,147,120,227,134, 53,107,108,156,126,245,234,213,
- 66,185, 92, 94,105,233, 28, 14,135,163,172,200, 92, 88,145, 56, 58, 58,106, 43,242,225,170, 98, 66, 44,100, 88,150,178,168, 87,
-143,237,209,245,203, 6,177,209,241,241, 70, 22, 22, 28,207, 6,117, 27,190,126,155,248,148,213,235,213, 4, 65, 20, 26,100, 43,
-225,112,134,109,217,178,165,137,153,153, 25, 24,134,129,185,185, 57,178,179,179,161,213,106, 81, 88, 88, 8,109, 81, 1,180, 5,
- 5,136, 72, 78, 68,251, 78,157, 48,164, 87, 15,239,195,231,127, 31,166,215,235,131,170,180,231, 53,109, 81,166,201, 90, 89,199,
-250,191,182,160, 84, 89, 25,233, 90,223,194, 19,124,177, 24,221,231, 4,124,202,131,254,242,242,229,203, 87, 6, 13, 26,244,205,
- 15, 63,252, 64, 74,165,210,107,137,137,137,237, 1,188,169,234, 71, 98,177,184,126, 78, 78, 14,228,114, 57,204,205,205,177,101,
-203, 22,216,219,219, 67,169, 84,226,217,179,103,172,139,139, 11,113,247,238, 93,184,184,184, 32, 55, 55, 23, 20, 69, 65,165, 82,
-101,104,181,218, 74,205,229, 37,230,193,222,179,123,225,106,244,139, 67, 29,156,137,132,103, 67,231,118,140,141,142,120,155,114,
-253,198,195,159,104,181, 81,170, 44,237,230,130,122,173, 95,218,124, 63,111, 5,118,108, 88,134,232, 39,247,242,236,221, 10,119,
- 26, 19,154,131, 85,181, 87,161, 80,168,223,190,125,107, 26, 30, 30, 14,130, 32, 96,110,110, 14,145, 72, 84, 33,217,170,133,144,
-229, 53, 80, 10,133, 2,124, 62, 31,214,214,214,216,191,127,127,217,196, 91,183,110,221,170, 48,246,118,239,222,125,152,155,155,
-155,105,249, 15, 91,183,110,141,201,147, 39, 99,247,238,221, 8, 13, 13,125,175,158,102, 70, 70,134, 84,167,211, 85,117,222,178,
-204,204,204, 94, 3, 7, 14,124,113,255,254,125,179,253,251,247,131,166,233, 10, 95,129,129,129,120,252,248,241, 82, 0,111,107,
-121, 31,125, 49,120,240,224,123, 71,143, 30,181,200,206,206, 70,233,189,161, 80, 40,160,215,235,209,176, 97, 67,130,166,233,234,
-252,222, 72, 14,135,115,126,251,246,237,253, 38, 78,156, 8, 46,151, 11,173, 86,139,237,219,183, 99,193,130, 5,153, 37,139, 82,
- 10,192,226,131, 7, 15,142,238,223,191, 63,154, 53,107,230,125,231, 78,229,158, 29,114,185, 28,114,185, 28, 60, 30, 15, 14, 14,
- 14, 88,181,106, 21,180,218,226, 97,197,203,203,171,236, 49, 6,176,215,203,203,171, 95, 76, 76,204, 70, 20,251,174,125, 36, 14,
- 14, 14, 3, 89,150,157,164,215,235,139, 58,116,232, 96,125,252,248,113, 83,137, 68,130, 23, 47, 94, 96,233,210,165,249, 12,195,
-232, 25,134, 33, 84, 42, 85,130,157,157,221, 11,161, 80,104,172, 84, 42,243,114,115,115,215, 0,184,246,119,205,228, 4, 65, 16,
- 60, 30, 15,227,199,143, 7,151,203,133,177,177, 49,212,106, 53,116, 58, 93, 25,153, 71, 13,205,210, 13, 26,136,173,185,224, 79,
-180, 52,109,228, 63,100, 86, 95, 91, 71, 39,103, 88,152, 9, 17, 21,245,166,253,237, 91, 55,182, 11,184,209,123, 24,173,110, 79,
-116, 82,193,159, 94,236,254, 67, 46,242, 15, 37, 90, 31,213, 60,228, 86,220,153, 67,244, 44,123, 42, 71, 34, 17, 80, 2,129, 40,
-166, 84,203,101,111,175, 44, 36,136, 33,122,219,198, 3, 64, 83,186,146,129,130, 45,121, 25, 72,180,116,122,196, 70, 71,226,254,
-245,223, 97,163,148, 32, 39,161, 57,192,111, 2,173,170, 0,106, 45, 85, 66, 74,244, 8,127,113, 11,133, 5,121,240,105,213, 23,
- 32,201,199,149,225,153, 91, 19,125,191,106,217,148, 19,155, 18,137,214, 94,223,193,195,165, 3,146,165,133,144,201, 53,200, 47,
- 84,163,185, 79, 0,178,243, 85, 40, 84,170,241, 38,246, 48,156,157, 60, 72,130, 27,223,213, 80,162,165,121,115, 22,154,183, 23,
-192,119,111, 15, 65,195,254,224,184,251, 34,229,213, 29,132, 95,221,140,180,215, 15,192, 50,122, 56,122,181, 49,244, 33,217,126,
-237,218,181, 54,237,219,183,231,118,235,214,173,217,149, 43, 87,154, 73,165,210,240, 18,130,209,172, 91,183,110,205,108,109,109,
-177,117,235, 86, 21, 65, 16,219,107,217,217,101, 26,176,172,172,172,167, 0, 86,159, 61,123,118,251,228,201,147, 97,103,103,215,
- 36, 61, 61,189,210, 31,102,243,120,205,198,172, 89,195,242, 56, 28, 54,104,199, 14,254,138,107,215, 54,253,118,240, 32,191, 75,
-231,206, 4,203,178, 8, 11, 11, 19,173,223,177, 67, 52, 98,192,128,164,228,172, 44, 58, 36, 52,148,146,166,165, 21,101, 41, 20,
- 43,164, 82,105,198,223,113,103,235,116,186, 71, 9,137, 9,206,173,218, 54,183,125, 25,149,240,186,103,151,175,190, 34, 73,146,
-140,142, 79, 14,181,181, 53, 19,221,184,126,131,210,233,116,143, 12,193, 18, 10,133,125,187,116,233,194,205,207,207,135,147,147,
- 19,178,179,179, 33,145, 72,138, 53, 14, 5,249,160, 10, 10,160, 43,148, 65,175,144, 35,225,217, 83, 52,247,168, 39, 60, 37, 20,
-246, 85, 42,149, 85, 18,173,210, 85,102, 69,133,174, 75, 63, 19,152,154, 66, 32, 22,131,168,185,217,112,128,133,133,197, 2,153,
- 76,118, 5,192, 42,138,162,166, 47, 88,176,160,245,182,109,219,108, 86,175, 94,109, 54,105,210,164, 83,114,185,188, 57,138,139,
-170, 86, 54,129,197,209, 52,109, 13,192,254,214,173, 91,176,179,179, 67, 65, 65, 65,169,166, 69,171, 84, 42,141,114,115,115,161,
-209,104,160,213,106, 97,102,102,134,231,207,159,231,209, 52,125,177,186,198,153,213, 39, 86,105,168,168, 37,214,222, 38,233, 20,
-109,217, 49, 43,143,201, 95,190, 73,186, 18,192,166, 94, 30, 30,129, 20,115, 47,225, 93,228, 69,203,196,103,119,243,210,223, 41,
- 60,246, 95, 73,168,202, 71,139, 5,192, 16, 4,193,122,121,121, 33, 59, 59, 27, 28, 14, 7, 34,145, 8, 98,177, 24, 11, 23, 46,
-196,246,237,219,107, 67,180,140, 76, 76, 76,214,144, 36, 57,140, 36, 73, 91,189, 94,143,128,128, 0,244,235,215, 15, 2,129, 0,
- 20, 69,149,105, 52, 75,181, 84,213,104, 58,194, 30, 63,126,108,246,248,241,123,195, 86,103, 27, 27,155,219, 26,141, 6,241,241,
-241, 56,127,254,124, 39, 0, 33, 53,236,235,248,176,176,176, 94,190,190,190,135, 90,182,108, 89,159,101, 89, 52,105,210, 4,126,
-126,126, 56,124,248, 48,194,195,195, 81, 80, 80,192,220,184,113,227, 55, 0, 27,107, 58,135,151, 92,223,134,131, 7, 15,126,112,
-236,216, 49,203,220,220, 92,168, 84, 42, 40, 20, 10,156, 58,117, 10,237,219,183,135,141,141, 13,142, 30, 61, 74,179, 44, 91, 85,
-223,147, 36, 73,238,223,179,103, 79,191, 9, 19, 38, 96,231,206,157, 8, 10, 10, 66,255,254,253, 49,108,216, 48,100,103,103,219,
-111,216,176, 97,116,137,153,112,153,159,159, 31,228,114, 57,158, 61,123, 22,101,224, 51, 15,153, 76, 6,153, 76, 6, 99, 99,227,
-242,207, 24, 1,224,240,230,205,155,135,251,251,251,195,195,195, 99, 89, 66, 66,194,102, 84, 16, 37,202, 48,204, 20,137, 68, 98,
-201,229,114,173,105,154, 70,106,106, 42,158, 63,127,142,239,191,255, 62, 47, 47, 47,111, 50,128,100, 0,139,199,143, 31,191,106,
-206,156, 57,101,247,210,156, 57,115, 46, 93,185,114,165,215, 95,173,205,241,242,178,104, 44,224, 8,103,229, 23,113,172,243,243,
-243,203,198, 14,173, 86, 11,141, 70,243,158, 38,139,207,231, 89,183,110,238,118, 89,165, 44, 90,244,230,157,172,210, 2,233,222,
-245,205,155,138, 76,204,253,219,119,232, 50,178, 71,175,111, 57,180, 78,135,224,224,139,248,245,215, 93,232,236,235, 5,143, 6,
- 77, 48, 99,230, 44,115,141,150, 14,184,113,227,218, 2,139,199,247,175, 21, 21,202, 22, 86,133,249,255, 92, 46,151,144,171,203,
- 21,154, 14, 43, 98,144, 37, 41, 28,242, 75,118,109, 44, 45, 45,119,232,245,250,206,102,102,102, 96,100, 49,120,243,252, 9,242,
-242,121,208,168,244, 96,216, 98,178,101, 16,113,209,104,113, 47,248, 2,182,108,222,132,220,220, 92,248,126,221, 9,114,174, 43,
-220, 92,221,160, 86, 41, 75, 30, 26,128,210,234, 96,107,239,142,151, 47,195,117,133, 10, 69,165, 3, 18,223,136,242,118,179,247,
-130,134,250, 18, 70, 2, 1, 10,138,180,200, 47, 33, 89, 71, 79, 15,133, 70,169, 2,173,165, 64,107,117,176,117, 27,140, 47,236,
-187,128,209, 95,108, 92,163,203,199,232, 65, 37,222, 3,149,120, 15,198, 95,206,196,239,107,135,127, 48,145, 26, 86,119, 55, 59,
- 59, 59,235,245,235,215, 23,195,194,194, 6, 14, 29, 58, 20,119,238,220,153, 4, 96,106,137,249,102,210,208,161, 67, 17, 22, 22,
-134,215,175, 95, 95,204,206,206,206,250, 35,122, 94, 32, 16,168, 52,154,226, 57, 86, 36, 18, 25, 85,243, 93,231,214,131, 6,145,
- 5, 47, 95, 22,110,126,248,112, 89,224,254,253,252,110, 93,187, 18, 58,154, 6,163,215,163,129,167, 39,209,163, 71, 15,147,195,
- 39, 79, 90,115,116,186,199,243,166, 79,191,181,123,212,168,162,167, 10,133,161,142,230,117, 74, 76,134, 0, 80,167,138,207, 12,
- 22,141, 70,179,109,202,196,177,221, 66,238, 61,112,117,115,117, 54, 11,190, 17, 18, 46, 52, 22,144, 30,117,235,115,242, 11,242,
-184, 43,151, 45, 50,214,104, 52,134,146, 86,111, 27, 27, 27,100,100,100, 32, 54, 54, 22, 26,141, 6, 58,157, 14,140, 82, 1,109,
-190, 12,218,130, 60, 16,106, 21,132,122, 61,212, 57,153,168,227, 81, 15,248,111, 68, 98,181,166,168,138,136, 86,233,214,200,204,
- 12,124, 19, 49, 72, 30,207,224,226,232, 0, 90,182,105,211,230,228,153, 51,103,248,227,198,141,107,123,243,230,205, 29, 0,146,
- 37, 18, 73,215,165, 75,151, 62,221,177, 99,135,112,242,228,201, 13, 55,110,220, 56, 26,192,222,202, 64,212,106,245,201,203,151,
- 47,143,112,119,119,183,143,136,136,128, 90,173, 6,195, 48,232,221,187, 55, 80,236, 91, 3, 0,136,142,142, 86,169,213,234,172,
-200,200,200,194,228,228,100, 10, 6, 68, 9, 46,223, 38,125, 84,152,113,111,144,189,131,243, 99, 35,227, 58,117, 89,249,203,129,
-179,191,115,222,176,249,180, 68,125, 45, 62,190,104, 73,247,122,235, 20, 69,175,190,183,112,145,239,188,118, 41,193, 16, 71,248,
-178,232, 66,107,107,107,112,185, 92,240,120, 60,240,249,124, 16, 4,129,153, 51,103, 98,223,190,125,213,153, 14,223, 35, 89,166,
-166,166,175, 87,172, 88,225, 50,121,242,100,190,145,145, 17,242,243,243,113,244,232, 81,140, 31, 63, 30,191,254,250,107,133,254,
- 47, 6,152,148, 62,212,150,250,143, 26, 53, 10, 90,173, 22,126,126,126, 8, 12, 12,244,215,235,245, 33,181,120,164, 31,135,135,
-135,123,134,135,135,155, 1,232, 63,108,216,176,131,131, 7, 15, 70, 72, 72, 8, 46, 94,188,216, 9,197, 65, 31, 42, 0,107, 1,
-216,149,108,171,122, 62, 77,236,237,237,119, 49, 12,211,223,214,214, 54,220,203,203,203,231,216,177, 99, 22, 89, 89, 89,165,193,
- 15, 72, 76, 76,196,129, 3, 7,164,251,247,239, 47,212,235,245,214, 36, 73, 94,150,201,100, 11,171, 32,108,251, 55,111,222, 60,
-182,196, 28,136, 51,103,206,176,155, 54,109, 34,150, 46, 93,138,252,252,124,116,238,220, 25,123,246,236,153, 37,151,203,155,109,
-218,180,105,226,144, 33, 67,176,114,229, 74, 40, 20,138,205,213, 45, 86,170, 32, 95, 4,128,175, 54,111,222,236,238,239,239,143,
- 51,103,206,160,101,203,150,198, 9, 9, 9,187, 1, 76,168,168,255, 88,150, 69, 66, 66, 2,148, 74, 37, 30, 60,120,128,101,203,
-150,229,151, 35, 89,179,166, 78,157,186,106,214,172, 89, 88,179,102, 13, 27, 17, 17,145, 53,120,240, 96,251,125,251,246,113, 26,
- 52,104, 48, 75,169, 84,254,101, 68,171, 97, 3,171,117,173, 91,118, 88,224,232,220, 0, 71,143, 29, 71, 94, 94, 94,217, 53, 41,
-189, 46, 44,203,162,168,168, 8, 25, 25, 25, 48, 55, 51,197,134,141,171,190,153, 54,105,172, 43,138,211, 96,124,172,178,244,176,
-220, 56,120,216,184,185,126, 35,198, 34, 34,252, 5, 14, 31,220,139,200,136,176, 50, 60, 90, 71, 33, 38,234, 57, 98,162,158,195,
-222,193, 29, 61,186,117, 34,134, 15, 31,222,123,212,136, 97,182, 0,254,180,212, 17,255, 96,109, 22,240,113, 30,173,125,239, 17,
-173,106,212,117, 54,150,150,150,175, 79,156, 56, 97,237,235,235,203,161,105, 26,215,130,131,241,253,212,255, 96,244,168, 0, 80,
-176, 4,173,229,131,225, 27, 25,212, 18,149, 74, 9, 22, 44, 20, 10, 5, 66, 67, 67,193, 50, 52, 14,239,219, 4,150,101,202,136,
- 22,192, 66, 75, 81,112,118,107,136, 93,129,171,105,240,120, 79,161,171, 56,117, 77, 97, 46, 71,175,163, 89, 72,178, 82,144, 34,
-141,132,185,169, 27,184, 60, 55,228,202,148,224,146, 14,208,169,163,161, 47,249,173, 82,145, 6, 21,245,105,253,167,175, 64,123,
-202,214, 96,208, 85,169, 84, 71,142, 28, 57,242,205, 47,191,252, 34,232,211,167,143,215,233,211,167,191, 2,128, 62,125,250,120,
-153,153,153,225,200,145, 35, 90,149, 74,117,228, 15,212,248,116,105,211,166, 13,242,243,243,145,152,152, 24, 94,229,185,105,181,
-214, 98, 59, 59, 78,214,157, 59,186,236,252,124,215, 46, 93,186, 16, 58,154, 6, 73, 16,200, 43, 40, 64,114, 82, 18, 44, 44, 44,
-136,215,209,209,226,237, 51,102,156,243,242,241,225,150, 70, 36, 26, 34, 23, 47, 94, 20,161,216, 47,171,202,207,106, 40,138,172,
-204,140,177,211,167, 79, 63,119,228,200, 81,243,204,172,204, 24,161, 64, 64,139,197, 70, 78,163, 70, 78,227,202,100,178, 17, 0,
-228,134,130,229,231,231, 35, 33, 33, 1,198,198,198,224,243,120, 96, 84, 74,232, 21,114,168,243,178,193,161,180, 16,232,245,176,
- 18, 9,225,106,111, 15, 55, 91, 27,131, 48, 99,111, 95, 47,115,124, 47,111, 46,220,208,198, 27, 2, 19, 49, 4,166, 98, 76,187,
-116,183,100, 53,202, 7,150,254,100, 8,172,141,179,179,243,239,199,142, 29,227,103,103,103, 35, 44, 44, 44, 28, 64, 1, 0, 83,
- 0, 76, 84, 84,212,205,200,200,200,190, 37, 81,119,213, 69,139,109, 58,123,246,108,119, 95, 95, 95,186,110,221,186, 38, 89, 89,
- 89,174,249,249,249,140, 84, 42,125, 79, 37,116,253,250,117, 97, 81, 81,145,130, 97,152,115, 37, 36,171,218,252, 69,179,191,115,
- 54, 10,125,137,153, 29,123,214,105, 98,102,211, 20,121,244,203, 38,143,195,165, 51,103,127,231,188,109,243,105,137,218,152,208,
- 28, 36,244,169,174, 92, 35,181,161, 78,204, 44, 80,236, 43, 21, 26, 26,138,228,228,100, 36, 36, 36,188, 71,168, 38, 77,154,132,
-195,135, 15, 27,164,209, 50, 49, 49, 89,179,124,249,114, 23,127,127,127,126, 57, 82,132,233,211,167,163,160,160, 0,129,129,129,
-152, 62,125,122,141, 39,254, 15,164, 94,151, 46, 93,250, 56, 58, 58, 34, 55, 55, 23, 14, 14, 14,240,245,245,237, 23, 18, 18, 82,
- 23, 64, 98, 45,239,251,105, 61,123,246, 92,181, 98,197, 10,232,116, 58,140, 31, 63, 30,239,222,189, 59,249,238,221,187, 45,110,
-110,110, 51,231,207,159,111,111,111,111,143,161, 67,135,154,208, 52, 61,168, 50, 16, 43, 43,171,181,123,247,238, 29,209,167, 79,
- 31,146,162,168,175,111,223,190,141,164,164, 36,104,181, 90,208, 52,141,184,184, 56, 76,159, 62, 93, 90, 18,221, 24,103, 64,187,
-198, 45, 94,188,120,236,204,153, 51,177,126,253,122, 44, 95,190,252, 55,115,115,115,159,230,205,155,183, 88,190,124, 57,230,205,
-155, 7,119,119,119, 88, 91, 91,127,177,116,233, 82,239, 57,115,230, 96,219,182,109, 88,182,108,217,111, 0, 14,212,230, 66, 48,
- 12, 67,172, 91,183,174,217,230,205,155, 29, 75, 73, 22, 73,146, 56,113,226, 4, 94,190,124,217, 47, 62, 62,190,162,223,236,113,
-112,112,152,228,232,232, 40,184,113,227,134,216,221,221, 29, 52, 77,235, 74, 72,214,118, 55, 55,183,239,227,226,226,208,167, 79,
- 31,196,199,199, 31, 1, 48,218,220,220, 92, 49,103,206, 28,145,177,177,177,185, 82,169,252,171, 38,111,112, 72, 98,204,154,149,
-243,240,236,101, 52,206,158,229,227,217,179,103,176,183,183,135, 80, 40, 4,203,178,208,104, 52,200,206,206,134,142,210,160, 73,
-227,122, 56,180,127, 29,178,178,178, 1,146,168,212,229,134, 32,137,145, 99,255, 51, 16,247, 31, 4, 99,247,238,189,144,203, 21,
-149, 44,190,141,208,192,203, 27,206, 78,118, 72, 77, 75, 5, 65,194,230,207, 60,215,127,184,233,176,108, 8,130, 33,233, 29,202,
-139,133,133,197,150,160,160, 32,235,206,157, 59,115, 20, 10, 5, 24,134, 65, 7, 95, 95,204,244,247,199,197, 99,199,224,217,214,
- 15,132, 86, 12, 90,100, 88,212,131, 90,165, 68,163, 22, 95, 97,200,208, 97, 72, 73, 78, 70,207,190,131,161, 86, 43,203, 86, 24,
-165, 26, 45,173,150,130,141,157, 43,174, 95,191,206,193,248,241,111,176,189, 98,165,132,158, 18,188,138,137, 83,183,151,169, 94,
- 34,244,217, 97, 80, 26, 10, 77,154, 44, 5,197, 88,195,206,101, 18,116,186,243, 40,204,190, 93,108,198,176,238,140,180,148, 20,
-144, 28,254,235,218, 94, 65, 70,145,253, 73,131,110, 65, 65, 65, 65, 66, 66,194,233,208,208,208,145,131, 6, 13,194,245,235,215,
- 39, 2,192,160, 65,131, 16, 26, 26,138,132,132,132,211, 5, 5, 5, 5,127, 68,111, 59, 58, 58,246,239,212,169,147, 95,235,214,
-173,113,233,210, 37,176, 44,123,223,160, 7,155,199, 99, 73,146, 4,195, 48, 32, 0,228,202,100,120,247,238, 29,114,115,114,160,
-211,233,160,144,203, 25,111, 47, 47, 57,203, 48,166, 53,105, 79,249, 8, 67, 84, 16,117, 88,250, 89, 45, 78, 53,249,233,227,135,
- 41, 69,114,185,173,165,133,101,145, 64, 32,208,231,203,100, 5,111, 94, 71,104, 13,156, 28, 74, 37, 42, 50, 50,210, 39, 61, 61,
- 29, 41, 41, 41,160, 21, 69,224,104,180, 32, 53, 74,116,253,234, 75, 24,131,133, 17, 24,240, 24, 29,120, 28, 30,138,138,163,243,
-170, 53,119,232,203, 45, 18, 74, 73, 22, 65, 16,197,230, 66, 19, 19, 8,196,166,239,105,184, 12,185,159,132, 66,225,177, 83,167,
- 78, 57, 58, 59, 59, 99,229,202,149,112,113,113,249,194,201,201, 73,105,110,110,110,108,111,111,143, 70,141, 26,225,171,175,190,
-194,213,171, 87, 97,192, 53,160, 89,150,237,113,255,254,253,185, 15, 31, 62, 28, 98, 98, 98, 66,204,152, 49,131,219,187,119,111,
- 8,133, 66, 40,149, 74,228,231,231,227,248,241,227, 57, 12,195,148, 6,165, 88,139, 68,162, 3, 4, 65, 36, 42, 20, 10,255, 15,
- 1, 15,253,210,196, 41, 43,143, 25,207,202, 69, 3, 59,246,172,211,164, 75,207,110,168,231,217, 5, 93,122,166, 0,192, 58, 43,
-110,146,223,207,139, 45,206, 89,152, 18, 7,174, 95,187,177,204,183, 99,151,197, 11,228,119, 86,173,223, 39,171,214,159,142, 32,
- 8, 48, 12,243, 94,238,160, 15,143,143, 30, 61, 26, 39, 78,156,168,246, 58,146, 36, 57,108,242,228,201,252, 15, 52,207,144, 72,
- 36,232,219,183, 47, 6, 13, 26,244, 30,209,178,177,177,129,131,131, 3,146,146,146, 0, 32,215,192,251,106,230,184,113,227, 8,
-149, 74,133, 9, 19, 38, 32, 48, 48, 16,126,126,126, 68, 72, 72,200, 76, 0,254, 53,189,217, 73,146,220, 48,127,254,252,185,211,
-167, 79, 71, 94, 94, 30,174, 92,185,130,222,189,123,227,196,137, 19,182, 87,174, 92, 89,211,185,115,103,112, 56, 28, 92,186,116,
- 9, 52, 77, 87,153,235,139,207,231,247,239,211,167, 15,153,154,154, 10, 62,159,143, 86,173, 90, 33, 45, 45, 13, 74,165, 18, 18,
-137, 4,179,102,205,202,200,205,205,237,100,232,115,196,231,243,253,103,206,156,137,160,160, 32, 4, 4, 4, 28, 4, 48,161,160,
-160, 96,200,195,135, 15,131, 6, 12, 24, 0,137, 68,130,115,231,206, 97,217,178,101,196,232,209,163,177,115,231, 78,204,154, 53,
-235,183, 18,173, 83,101, 55,126, 81, 86, 86,150,121,253,250,245,145,153,153, 9,185, 92,142,115,231,206,217, 93,189,122,181,174,
-179,179,179, 89, 66, 66,130,254,167,159,126, 18,248,251,251, 99,203,150, 45, 8, 11, 11,195,225,195,135,209,165, 75, 23, 58, 62,
- 62,190, 66, 45, 89, 73,202,134,115, 44,203,222, 48, 49, 49, 65, 81, 81, 81,233,115,247, 67, 64, 64,192,244,181,107,139,149,236,
-233,233,233, 24, 51,102,204,168, 91,183,110, 49,157, 59,119, 22,241,249,124,168,213,106,197, 95, 57,107, 51,122, 6, 0,131,186,
-174, 98, 4, 95,220,143, 23,225,241,120, 17, 30, 9,129,176,216, 9, 94,165, 82,162, 69,147, 6,104,219,170, 13,210,165, 18, 28,
- 57,188, 31, 86, 54,206, 85,142, 35, 44,203,130,207,213,195,219,203, 1,199, 14,239,197,165, 43,183,112,248,200,241, 50,159, 55,
- 46,151,135,230, 45,218,162, 85, 43, 95,196, 39,196, 97,255,254,221,176,181,115,253,108, 28,172,165,148,153, 14,203,111, 63, 96,
-254, 93,124,125,125, 57,114,185, 28,106,181, 26, 25, 25, 25, 72, 74, 74,130,133,165, 5,226,211, 19,209, 73, 68, 33,131, 41, 68,
- 84,248,107, 61,193,225,133, 85,247,135,125, 58, 54, 7, 58, 54,199,247,227,252,170, 88,178,178, 48, 49,179, 41, 54,221,208,116,
- 44,182,109,163, 43, 35, 90,180, 94,119, 51,248,198,237, 54,227, 70,247,231, 93,191, 29, 8,157,150,129, 74,103, 14,133, 90, 11,
- 5,197, 3,105,222, 27,200, 9, 1,135, 43, 68,187,102, 13,112,238,236, 85,138,165,117,183, 12,190, 64,246, 62,160, 51, 35,203,
- 17,173,172, 15,236, 14, 86, 6,155, 14,203, 38, 94,189,254,196,209,163, 71,191,253,242,203, 47, 69,157, 59,119,174, 95, 50,113,
- 82, 71,143, 30, 85,150, 36,195,172,169,188,151, 13,222,193,193,161, 5,159,207,247,235,221,187,119,139,177, 99,199,226,205,155,
- 55, 56,114,228, 72, 76,131, 6, 13,238, 72,165,149, 71,100,115, 4,130, 92,121, 86,150,133,184,110, 93,174,165,169,105,250,213,
- 43, 87,220,187,117,239, 78,164,164,164, 32, 55, 55, 23,106,181, 26, 97,225,225, 44,143,195, 73, 35,204,204,200,232,151, 47, 73,
-142, 64,144, 91,153,182,177, 2, 73,170, 38,234,112,109,109,181, 91,174,142,150,245,151, 5, 76,169,167,214,168,125, 10, 11, 11,
-105, 46,143,199,115,113,176, 72,142,142, 51,124, 76,212,104, 52,151,110,222,188,249,109,183,110,221,132, 49,175,194, 64, 23, 20,
- 64, 91,144, 15, 62,163,135, 85,139,102,224, 80, 26, 64,171,131,179, 55, 11,181, 76,132,144, 39,209, 58,141, 70, 83,109, 82,195,
- 82,162, 69,126, 64, 12, 4, 98, 49,132,166,102, 16,138,197, 31, 18,134,234, 86,114,162, 30, 61,122,116,109,215,174, 29, 88,150,
-197,190,125,251, 64, 81,148,128,162, 40,104,181, 90, 80, 20,133,194,194, 66, 28, 62,124, 24,187,118,237,122, 8,224, 55, 3, 78,
-159, 54, 54, 54, 30, 64, 16,132, 29,151,203, 85,218,218,218,154,156, 56,113,162, 44,221, 68,243,230,205, 97,106,106,202, 71, 73,
- 82, 72, 59, 59, 59,222,175,191,254,106,209,175, 95,191,123, 21,154, 59,154,124, 49,175, 30,109,217,209,200,184, 78, 93, 51,155,
-166,168,231,217, 5, 0,208,189,239, 56,212,107,224,134,194,156, 87,117,213,170,164,129,124,110,190,229,235,109,146, 55,198,125,
-124,198, 42,178,238,190, 67,197,225,253, 21, 78, 20, 36, 73, 86,106,142, 53,132,100, 21,115, 22,210,182,212,207, 7, 0,114,115,
-115, 33,149, 74, 17, 21, 21,133,134, 13, 27, 34, 47, 47, 15,206,206,206,208,106,181,104,221,186, 53, 84, 42, 21, 54,111,222,140,
- 7, 15, 30, 60, 4, 48,203,128,255, 48,246,244,244, 28,211,162, 69, 11, 92,185,114, 5,207,158, 61,147, 4, 7, 7, 59,251,250,
-250,162,110,221,186, 99, 19, 19, 19, 23,149,152,250, 12, 21, 19, 95, 95,223, 25,211,167, 79, 71,100,100, 36,166, 76,153,146,155,
-154,154,122,238,228,201,147, 19,150, 45, 91, 70,246,236,217, 19, 82,169, 20, 27, 54,108,208, 63,120,240, 96, 35,128,149,213, 92,
-199,183,169,169,169, 46,106,181, 26,121,121,121,160,105, 26, 74,165, 18, 87,175, 94,197,225,195,135, 51, 75, 72, 86,172,161,141,
-107,214,172, 89, 35,146, 36, 17, 20, 20, 4, 0, 75, 80,156,177,255,220,192,129, 3, 37, 63,253,244,147,243,194,133, 11, 49,113,
-226, 68, 80, 20,133,245,235,215, 99,225,194,133,151, 75, 72, 86, 85,131,232, 47, 14, 14, 14,147,166, 76,153,242,197,156, 57,115,
- 16, 26, 26,106,247,252,249,243, 86, 97, 97, 97,112,117,117, 69,110,110, 46,215,218,218, 26, 91,182,108,193,236,217,179,207, 0,
-200,121,244,232,209,176,132,132,132,181, 0, 54, 84, 67,218,247, 56, 59, 59, 79, 98, 89,150, 85, 42,149, 73, 1, 1, 1, 27, 86,
-175, 94,141,217,179,103,227,245,235,215, 40, 40, 40,128,169,169, 41, 49,127,254,252, 49, 75,150, 44,193,248,241,227, 89,133, 66,
-177,235,175,158,168, 89, 86, 15,101,126, 36,244, 26, 75, 52,111,210, 16,205,125,234, 32,248,246, 11, 0, 64,215,193,190, 80, 42,
-138,112,240,224, 62,196,198,190, 3,151,199,131,133,149,131, 33,154, 64,104, 11,223, 66, 70, 73,209,173,115, 43,244,238,217, 9,
-191, 29, 58, 1, 90, 71, 97,194,184, 17,200,151,201,112,232,208,126,196, 39,196,129,203,227,193,218,230,207, 79,132, 90, 21, 23,
-249,199, 19, 45, 3,204, 79, 96, 24, 6, 18,137, 4,207,159, 63, 71, 98, 98, 34, 68, 34, 17, 84,180,158,217,125,243, 1, 67, 16,
-252, 52,134,101, 31,178,116, 89,150,226,143, 49,244,122, 73,185,140,181,230,150,150,150, 2,141, 70, 5,154,214,149,155, 85, 8,
-128, 0,248, 92,192,209,169, 30, 82, 83, 82, 89,181, 90,125,183,202, 21,148, 70,189,229,194,185, 83,211,191,106,239,107,211,187,
-235, 10,156, 59,191, 20,249,133,133, 80, 83, 60, 40,212, 20,148,106,192,194,202, 11,173,155, 52, 69,122,122, 46, 94, 61, 11,145,
-115, 53, 74, 67, 28, 69,223,109, 95, 60,206,115,220,247,243, 96,236,222, 30,154,168,115, 96,228,153,101, 26, 45, 35,177, 37,172,
-220,188, 33, 83,104,112,234,214, 11,160, 6,165, 94,178,178,178,148, 28, 14,231,232,244,233,211,215,191,120,241,220, 5, 0, 94,
-188,120,145, 38,149, 74, 23,100,101,101,213, 84, 39, 93,154, 13,158, 48, 50, 50,126,209,160, 65,131,244, 86,173, 90,153, 15, 28,
- 56, 16, 54, 54, 54, 8, 11, 11,195,218,181,107,223, 82, 20, 53, 47, 36, 36,164, 74, 83,143, 86,171,149,188, 56,127,222,172,211,
-127,254, 99, 49,175, 95,191, 13,211,167, 79,223,178,114,229, 74,158,167,167, 39,161,163, 40, 68, 68, 68,176,199,142, 30,213,237,
- 90,184,112,179,192,196,132,251,244,194, 5, 58, 60,122,154, 0, 0, 32, 0, 73, 68, 65, 84, 30,173,209, 72,254,238,155,216,217,
-217,185,163,239,215, 29,188, 55,254,178, 13,106,149, 28, 79, 66, 47, 35, 63, 63, 27,123,247,157,245,118,118,102, 59, 74, 36,146,
- 16, 67, 9,240,129, 3, 7,230,182,109,209,162,133,135,171, 43, 34,146, 19, 33, 96,244,224,211, 52, 56,148, 6, 36,173,134,171,
- 15, 11,130, 52,133, 52,163, 16,171,131, 78, 71, 26, 66,140,191,248,166, 63, 86,166, 21,128, 32, 8,108,250,210, 7, 2, 83, 49,
-248, 38, 98, 76,251,253,118, 25, 49,184,180,114, 33, 4, 98, 49,234,183, 53, 40, 33,188,242,206,157, 59,207, 35, 34, 34, 90,251,
-248,248, 96,238,220,185, 72, 74, 74, 2,195, 48,200,204,204, 84, 75,165, 82, 73,118,118,118, 18,138,243,255, 4, 86, 51,137,149,
-103, 29,206, 33, 33, 33,101,230,134, 91,183,110,193,201,201, 9,230,230,230, 40, 44, 44,196,228,201,147, 45,126,252,241, 71, 0,
-192,243,231,207, 81,158,160,124, 40, 17, 47,162, 54,202,138,216,124, 86,254,114, 96, 30,253,178, 73,151,158,169,232,222,119, 44,
-110, 92,250, 13,183,131,111,194,138,155,148, 8,147,162,171, 57,137, 57,133,105, 10,207, 61,222, 45, 39,112,164,138,224, 61, 51,
-250,199,112, 28, 29,153, 83, 11,119, 23,202,170,106,171,167,167, 39,236,237,237,203,124,180,184, 92, 46,198,143, 31, 15,150,101,
- 13, 37, 89, 37,115, 13,147,173, 86,171,237,141,140,140,144,145,145,129,184,184, 56,196,199,199,151,165, 14, 96, 24, 70,247,195,
- 15, 63,240,102,204,152,129,221,187,119,227,238,221,187, 15, 1,172, 0, 96,232, 98,109,196,208,161, 67, 77,181, 90, 45,142, 31,
- 63, 78, 3,232,123,234,212,169,231,173, 91,183,230,246,234,213,203,116,231,206,157, 35, 74,250,200, 96,162,101,102,102,198,167,
- 40, 10, 59,119,238, 68,106,106,106, 71, 0, 81, 79,159, 62,221, 51,116,232,208, 93, 62, 62, 62, 13, 34, 35, 35,223,201,229,242,
-105, 0, 94, 85, 7,150,153,153, 57,174, 85,171, 86,167, 24,134,113,239,214,173,155,201, 47,191,252, 98, 22, 29, 29, 13, 23, 23,
- 23, 48, 12, 19,129, 26,150,176,122,247,238, 93,148, 84, 42,245,238,212,169, 19,174, 94,189,186, 78,175,215,175, 1,176,126,234,
-212,169,206,201,201,201,104,209,162, 5,172,172,172, 16, 29, 29, 93, 36,149, 74,119,161,184, 36, 81,117, 42,220, 4, 0, 11,246,
-236,217,211,116,207,158, 61,126, 86, 86, 86,237,194,194,194,112,255,254,125,108,220,184, 17, 63,254,248, 35, 58,116,232,128,185,
-115,231,230, 0,240, 3, 64, 39, 36, 36, 24,148, 55,175, 84,179, 5, 0, 45, 91,182, 76, 95,187,118, 45, 38, 76,152,192,254,250,
-235,175, 91,143, 30, 61,234, 63, 98,196,136,178, 57,112,204,152, 49,236,145, 35, 71,198,160,184, 12,211, 95, 41, 58,138,210,194,
-204,170, 30,228,178, 20,100,167,134, 66,100,234,128,158, 93,154, 65,169,210,226,226,133, 51,120, 21, 17, 14,146, 36, 97,239,224,
- 10, 11, 75, 27,196,196,188, 3,170,142, 54,214, 81, 20, 5, 83,203, 58,144, 23,164, 66,155,245, 2,198, 98, 59,140,253,207, 64,
- 40, 85, 20,206,158, 59,131,200,200, 87,224,112, 56,112,112,116,133,185, 69, 49, 38,193, 86, 29,193,252, 89, 0, 84,144, 79,171,
- 90,162,197,225,112,238, 92,187,118,237,187,182,109,219,114, 99, 99, 99, 17, 27, 91,188,184,201,207,207,167, 9,232, 79,103, 69,
- 92, 24, 94,197,207,187,161, 36, 58,163,124,237, 66,177,169,169, 36,250,109,148,125,126, 94, 38,194, 95, 62, 64,108, 76, 4, 18,
-227,163, 64, 81,106,112, 72, 18, 36,135, 68,157,122,141,241,224, 97,168, 86, 77,211,161,149, 97, 22,183, 35,190,200,196,206,115,
-216,170,149,139, 46,205,158,183,220,120,200,119,187,241, 42,250, 13,228,180, 3, 88, 22,112,176, 54, 65,115,143,249,144,164,103,
- 35,232,183,157, 74,134,162, 70,126,144, 67,235, 35, 76, 0,176,207, 65,163, 93,251,126, 27, 31,120,248,216,242,121, 51, 38,219,
- 15, 24, 52, 18,130,188, 55,208,165,191, 64,189,214,189, 65, 8, 45,112,229,250,109,132, 60,127,147,201,232,217,229,246,185,248,
- 53,166, 26,204,242, 34,147,201, 30,101,100, 72, 93,202,101,129,119, 17, 10,141,170,139,142,251, 16,243,189,140,243, 28, 14,217,
-114,213,170, 85, 58,123,123,123, 42, 50, 50, 18,187,119,239,102, 94,188,120,113,157, 36,201,237, 82,169, 84, 93, 29,166,173, 78,
- 23,126, 44, 32,160, 81,155, 65,131,216,225, 51,102, 40, 33, 20,206,220,176,105, 83, 64,118,126,190, 19,203, 48,176,181,178, 74,
-219,176,112,225,218,239,134, 14,205,127,253,224,129,113,232,249,243,198, 2,154,126, 97, 64, 59,255, 8,169, 20, 83, 34,145,132,
-220,189,123, 31, 7, 3,127, 1, 69,105, 32,149, 36, 3, 0,114,114, 11, 80, 13,201,250, 16,147, 85, 42,149,131,150,252,248,227,
-227, 37,179,253, 29,190,238,218, 13, 41,225, 97,160,242,178, 65,232,104,240, 8, 46, 20, 89, 34,100,101,202,177,224,200,201, 44,
-185, 82, 57,168,130, 73,162,194,118,150,106,172,132,102,166,224,155,136, 33, 16,155,190,167,197, 50, 50, 51,131,192, 68, 12,174,
- 64, 80,145, 3,247, 71,152,114,185,124,240,119,223,125,247,234,233,211,167,150, 19, 38, 76,192, 87, 95,125,245, 82,165, 82,117,
- 6, 80, 84,219,235,201, 48,140,228,235,175,191, 38, 9,130, 16,143, 28, 57, 82,152,157,157, 93,150, 89, 93, 46,151,227,234,213,
-171,104,216,176, 56,170,255,245,235,215,104,220,184,113,165,152, 19, 23, 68, 74, 0,172,156,253,157,243,134,199,225,210,153, 0,
-214,213,107,224,138,219,193, 55,113,255,118,104, 64, 59, 31,102,219, 55, 35, 91,255, 36,234, 60,116,158,119,203, 9, 28,177,153,
- 35, 14,157, 61,195,137,122,177,127,181, 82, 25, 81, 31,187,207,253, 80, 89, 59, 9,130, 0,203,178, 31,165,114,224,112, 56, 56,
-122,244,104, 77,207,253,100, 96, 96,224,212, 41, 83,166,240,165, 82, 41,222,190,125, 11,133, 66, 1, 35, 35, 35, 4, 7, 7,211,
- 0,118, 30, 61,122, 52,248,232,209,163,189, 80, 28, 77,116,171, 38,247,167,137,137,201,244,158, 61,123,226,237,219,183,120,246,
-236,217, 25, 0,175, 94,190,124,121, 38, 54, 54,118, 88,135, 14, 29,240,219,111,191, 77, 87,169, 84,129, 53,193,100, 24,166,124,
-206,164,210,138, 15,225,114,185,188, 93,104,104,104, 77,251, 93,154,155,155,219,190,132, 88,167,218,219,219,155,133,135,135,195,
-205,205, 13, 20, 69,181,173,233,189, 84, 80, 80,240,203,246,237,219,127, 29, 55,110, 28,126,250,233,167,145, 39, 79,158, 28,249,
-205, 55,223,160, 79,159, 62, 56,112,224, 0, 94,189,122,181, 14,134,149, 21,171,232,220, 95, 1,120,101,111,111,255,189,171,171,
- 43, 54,110,220,136,136,136,136,181, 43, 87,174, 92,248,234,213, 43, 52,108,216, 80, 24, 21, 21, 69,215,102, 12, 1, 0, 51, 51,
- 51, 51,157, 78,135,243,231,207, 63, 1, 48,123,228,200,145,118, 91,182,108,241, 19,139,197,200,203,203, 83, 69, 70, 70,142, 0,
-112,225,175, 30,235, 88,130, 88, 60, 97,226,204, 61, 19, 39,140, 48,106,213,178, 57,148,133,105, 80,201, 51,161, 44,202,192,246,
-192,235, 32, 8, 18,182,182,142,176,115,112, 65,114,114, 10, 30, 94,190,162, 85, 40, 85, 91, 4, 58,102, 93,213,152, 51,138, 49,
- 91, 20, 99, 42, 21, 89, 80,201,179,202, 48,237,236,156, 74, 48,147,241, 32,244,138, 90,165, 80,252,162,101,137,159,255,228,115,
-255, 39, 75,205,106, 29,150,151,252,252,252, 89,147, 39, 79,238,188, 96,193, 2,107,154,166, 57, 86, 86, 86, 72, 78, 78,166, 79,
-159, 62,157, 39,151,203,103,213,166, 53, 92, 30,239,149,167, 87,195,206, 3, 6, 12,160,251,247,239,199, 31, 53,174, 23,215,214,
-206, 14, 5,178, 92,196,188, 13, 67,244,155, 23,240,108,216, 12,203, 86,110, 6, 44, 44,170, 45, 36, 89, 82, 86,167,239,138, 37,
- 63,156,104,223,177,135, 89,195,198,205,248,205,235,155,131,210,209, 72, 75, 75,195,133,243,225, 84,228,243,251,133, 12,173, 29,
-166,204, 49,172, 4, 79, 8, 64, 35, 23,123,125,236,168,163,107, 54,108,159,187,115,239,193,121, 11,102, 78, 48,233,224,219, 29,
- 17, 55,127,195,153, 75, 39, 20,106,141,118, 3,159,131, 77,145,185, 80,198,212,240, 26,168,213,106,234,195,249, 84,173, 86, 83,
-159,218,211, 7, 14, 28, 64,102,102,166, 54, 41, 41,233, 26, 77,211, 39,171, 40,246,252,145,108, 7,180, 3, 53,154,155, 75,124,
-125,123, 45, 9, 14, 54, 26, 51,127,190,118,228,168, 81, 63, 64,163,161, 32, 16,176, 92, 19, 19, 18, 66, 33,239,245,131, 7,198,
- 91,167, 78,181, 34,180,218, 27, 7,171, 72, 27, 80,129,252,225, 81,135,165, 26,173, 78,157, 58, 96,204,132,217, 80,149,211,104,
- 61,122, 22, 3, 13, 5,131, 53, 90, 37,146,146,148,154,218,110,230,226, 37,103,135,245,236,234,237,227, 94,231,255,216,187,238,
-176, 40,174,245,253,206,204,246, 93,138, 72, 71, 20, 43, 74, 81, 80,108,216, 16, 75,236,137, 53,118, 81, 19,141,221, 88, 34,234,
- 53,150, 68, 33,154,216, 53,106,212, 88,110,236, 45, 98, 23, 13, 26, 27, 42, 74, 81, 68, 69, 4, 4, 68,122,221, 58, 51,231,247,
- 7, 69, 68, 88, 22, 52,191,155,155,187,239,243,204,179, 59, 59,103,190, 61,115,206,204, 57,239,188,231, 59,223,145, 88, 55,168,
- 15, 19, 59, 59,100,164,165,225,207,187, 79,116, 43, 14, 29,143, 44, 38, 89, 6,197,149,225,121,190,200,201, 29, 64,247, 89, 11,
- 64, 49, 12, 80, 28,198,161,100,230, 80,131, 54, 29, 64, 9, 4,224, 8, 15,181, 90,109,136,211,223,171,231,207,159, 15, 25, 61,
-122,116,112, 80, 80, 16,221,171, 87,175,150, 39, 78,156,224, 63,228,222, 81, 42,149,237, 1, 64, 42,149,198,213,170, 85,171,206,
-132, 9, 19,160,211,233, 80, 88, 88,136,156,156, 28,188,122,245, 42,123,194,132, 9, 90, 0,144,201,100,226,161, 67,135,154, 85,
-101,115,221,209, 36,213,215, 67,235,108,172, 45,120, 57, 34, 55, 61,188, 65,109,193,203,184,246,205,249,141,235,142, 38,169,204,
- 28, 10,190, 79,127, 25, 18,147, 82,112, 97,219,222,227,199,152,113,131,134,112,142, 38, 79,253,165, 54,228,104, 85,118, 41,138,
-122, 47, 56,169,129, 36,235, 29,228,229,229, 45, 92,178,100, 73,191,172,172, 44,199,222,189,123,139, 92, 93, 93,113,251,246,109,
- 4, 5, 5,177,183,110,221, 74, 44, 40, 40, 88, 4, 64, 5,224, 98, 77,202,180,105,211,166, 13, 4, 2, 65,201, 80,218,230,226,
-159, 55,159, 56,113, 98,248, 23, 95,124,129,250,245,235,187, 61,126,252, 88,130,106, 60, 71,132,144,210, 81,134,143, 9,138,162,
- 98, 55,108,216, 80,199,206,206,142, 58,119,238, 28,203, 48, 76, 77,148,155,221, 59,119,238,108,167,211,233,190,156, 52,105, 18,
-124,124,124,192,178, 44,246,239,223,143,157, 59,119, 26, 74,178,244, 34, 38, 38,230,126, 98, 98, 98,151,121,243,230,225,199, 31,
-127, 92, 56,111,222, 60, 36, 38, 38, 34, 38, 38,230,193,135,216,205,205,205, 85, 38, 36, 36,200,189,189,189, 91, 71, 70, 70, 70,
-250,250,250,186,127,241,197, 23, 8, 12, 12, 36,127,252,241,199, 80, 0,231,254, 19,189,247,147,103,153,251,132,156,224,194,138,
-239,215,126,219,184, 81,131,175, 38,142,255,156,105,234,236,142,130,156, 87,176,180,178,133, 99,221,134, 72,123,147,142,243,231,
-207,113,233,233,217,187, 57,154, 90,254,236, 89,102,242,135,216,172,227,216, 16,111,222,188,193,217,179,103,185,236,172,220, 29,
-208,209, 43, 30,199,103,167,194, 8, 67,148,172, 73,208, 19, 37, 94, 31,172, 44, 44, 44, 14,152,153,153,165,154,153,153,165, 90,
- 88, 88, 28, 0, 12,154,125,208,163, 76,235,192,188,179, 13, 29, 42,133, 84,218, 30, 2,193,156, 90, 22, 22,231,204,205,205, 51,
-186,118,237,170,217,182,109,155,234,241,227, 40, 62, 41, 41,145,152,155,155,231,148,166,175,200,102, 57, 88, 88, 52, 50, 85,216,
-187,127,107,238,216,242, 79, 19,123,183, 60, 19,123,183, 60,115, 71,207, 27, 10,123,183,101, 22, 22,141, 76, 13,202,103, 37,104,
-104, 3,107,103, 43,108,105,102, 77, 41,157,173,176,165,161, 13,172, 13,190,118,253,195,126, 28, 69,129, 67,209, 52,108,212,192,
-102,137, 13,158, 97,152, 61,142,142,142,246,168, 94,192,186,247,108,142, 1,234,143,145, 72,190, 60,226,239,239, 23,247,199, 31,
-163,115, 95,188, 24,153, 19, 27,251,249,131, 67,135,134,111, 30, 62,124,204, 72,137,100,210, 80,160,145,161, 54,237,237,237, 3,
-238,223,191, 31,100,232, 86,134,120, 25, 92,158,141, 26,214,185,208,171, 71, 59, 50,125,242, 96, 50,125,242, 96,210,171, 71, 59,
-210,168, 97,157, 11, 31, 80, 71, 20,195, 48, 35,228,114,249, 1,133, 92, 30,161,144,203, 35,228,114,249, 1,134, 97, 70, 64,191,
- 15,213, 59, 54, 45, 45, 45,239,217,218,218,166, 86,103,179,178,178, 10,171, 70, 62, 71, 54,104,208, 32,145,166,233,117,213,124,
-166,245,217,116,150,201,100,177, 10,133,226, 85,217, 77, 38,147,149, 13, 12,101, 41,151,203, 79, 43, 20,138,245,134,216, 92,189,
-216,253,219, 27, 23,167,133,175, 94,236,254,109,249, 99, 51, 6, 90, 76,184, 29,188, 60, 99,198, 64,139, 9,134,228,211,198,198,
-230, 15, 27, 27,155, 20, 27, 27,155, 20, 91, 91, 91,189,155,149,149,213, 61, 3,108, 74, 77, 77, 77,215,155,154,154,166, 42, 20,
- 10,206,196,196, 36, 85,161, 80,172, 67,153,208, 22, 53, 45, 79,154,166, 3,221,220,220, 84, 12,195,236, 42,119,232,199,198,141,
- 27,171, 4, 2,193,154,106,218, 52,235,220,185, 51,247,240,225, 67,226,227,227, 67, 0, 88,124,196,122,183,179,176,176, 56,103,
-102,102,150, 96,106,106,186, 9,128,162,134, 54, 41, 0, 35,234,212,169,243,160, 91,183,110,133,117,234,212,185, 9,224,179,143,
-152,207,126, 3, 7, 14,228, 19, 18, 18, 8, 33,132, 36, 36, 36,144,129, 3, 7,242, 40, 10, 20,249, 33,109,242,226, 41, 83,166,
-144, 91,183,110,145, 91,183,110,145,155, 55,111,146,126,253,250,241, 0,198,126, 96, 59,143,143,117,237,174, 13,173, 26,185, 52,
-177, 56, 60,106, 72, 39,254,226,169,117,100,233,162,175, 72, 79, 31,119,210,172,177,197,113,103,103, 75,231,143, 97,243,219, 69,
-147, 73,143, 46,110,188,107, 35,139, 67,174, 13,173, 26,253, 63, 95,251, 63, 81,213,194, 95,237,112,246, 86, 90,124,151, 44, 85,
- 12, 7, 7, 7,100,100,180,147, 10, 4,157, 36, 18,137, 47,205, 48, 87, 51,211,210,102, 23,191,110,113,255, 95, 82,173,222, 14,
-189, 17,196,122,150, 36,168,137,205,119, 28,217,107,104,179, 58, 54, 12,178, 89,217,162,210,188, 90,157,108,201,178,247, 54, 65,
-111, 25,188, 99,179, 78,157, 58, 95,242, 60,223,192,208, 12,209, 52, 29,151,148,148,244, 75, 77,202,179, 73,147, 38,164,120,120,
-155,250,152,245,254, 87,220, 75,255, 75, 54,247,174,109,225,208,172,133,203,252,136,251,143,127, 44, 30, 86, 44,197,178, 25, 22,
-166,157,186,117, 93,242,231,149, 63,190, 91,182, 41, 43,239, 63,124,237, 52, 12,244,105,251, 8, 54, 75,130,132, 86,203,166, 80,
- 40,220,214,182,109,219, 47,111,223,190,189,139,227,184, 73,255,163,247,103, 63,134, 97,230, 53,109,218,180,101, 76, 76,204, 3,
-142,227,126, 68, 5,129, 34,107,144,207, 69, 13, 26, 52,152, 42, 18,137, 36,249,249,249, 89,201,201,201, 75, 0, 28,254,187,149,
-167,107,147,218,173, 9, 41, 13,186,189, 50,250,121,102,232, 71,179, 73,120,142, 39,204,247, 49, 47, 50,194,254, 3,245,254, 79,
- 35, 89, 59,254, 63,254,184,135,209,166,209,166,209,166,209,166,209,230, 71,183, 41, 51,150,167,209,230, 63,208,230, 63, 18, 2,
- 99, 17, 24, 97,132, 17, 70,252,215, 65,105, 44, 2, 35,140,248,219,161,172,170, 85,170,102, 81,122, 88,105,117, 36,193,154, 48,
-219,203, 70,155, 70,155, 70,155, 70,155, 70,155, 70,155, 70,155,255,115, 54,255,169, 36,107,135,158,253,191, 12, 70, 89,213,104,
-211,104,211,104,211,104,211,104,211,104,211,104,243,127,129,104, 85,184,111, 28, 58, 52,226, 47,199,198, 65,168, 3, 0, 51, 79,
- 32,233,175, 72,111,132, 17, 70, 24, 97,132, 17,255, 97,236, 64, 37, 67,135,127, 7,162,229, 0,160, 61,138, 22,190,125, 2,224,
- 58,128,172, 15,176,103, 5,224,115,138,162,134, 1, 0, 33,228, 8,138,102,141,164, 27,114,178, 84, 42, 77, 85,169, 84, 54,197,
-223,223,168, 84,170,178,107, 25, 80,120,127, 54, 27, 41,179, 85,136, 6, 13, 26,164,170,213,106, 27, 3,254, 62,135, 16, 18, 78,
-211,116,132,137,137,201,149,152,152,152,160,234, 92,184,175,175,175, 31,195, 48, 43, 1,128,227,184,197, 87,175, 94,221,243, 23,
-214, 91,187,186, 14,118,191,106,117, 90, 54, 53, 45,115, 9,222, 15,228, 7, 0,216,210, 31, 1, 20,139,249,197,223,215, 76, 11,
-210, 31, 71,167,186,233,245,160,181, 80, 40,156,110,107,107,219,231,213,171, 87,247, 0,124, 3, 84, 29,213,184,110,221,186, 99,
- 5, 2,193,104,142,227, 26, 49, 12, 19,203,178,236,191, 19, 19, 19,247, 25,219, 16, 35,140, 48,194, 8, 35, 12, 32, 91,239,161,
- 90, 68,171,153, 37,236, 8, 48, 2, 20,122,130,224, 18, 5, 28,124,146,129,215,134,158,223,183, 25,116, 58,182,232, 63, 69, 52,
-184,115,207,233, 29,125,250,244,113,156, 49, 99, 6, 58,116,232,128,219,183,111,123,239,222,189,123,194,225,195,135,195,121,158,
-191, 10,224, 54, 96, 80, 40, 5, 5,138,226,180,140,234,211,167, 79,143,149, 43, 87, 50,238,238,238, 80, 42,149,248,227,143, 63,
- 58,173, 89,179,102,253,141, 27, 55, 46, 3,248,173,152, 16, 84,186, 0,158, 74,165,178, 41, 89,140,147,162, 40,155,161, 67,135,
-134,150, 37, 87,197,235,171, 81,132,144, 91, 20, 69,221,228, 56,238,246,209,163, 71, 19,155, 1,237, 38, 55, 16, 29,157, 29,167,
-117, 44,111, 83,173, 86,219,156, 92,189, 10, 2,137, 4,234,188, 92,120,143,127, 75,122, 47,125, 59, 31, 20,207,130, 1,201,242,
-253,126,125, 56,128,136,228,228,228,112, 31, 31,159,184,234,214, 48,195, 48, 43,207,159, 63,111, 79, 8, 65,175, 94,189, 86, 2,
-248,171,136,150,164,125,107,207,171,167,143, 29,144,230,103,166,162,247,103,195,255,253, 52,241,141, 31,128, 99,239,144,166, 62,
-176,165, 40,204,159,178,234, 55, 6, 0,182, 46, 26,245,205,186, 79,176,241,235,139,120, 13,192,183,152,252, 0,192,106, 0, 87,
-183,244,129, 45,128, 5, 83, 86,253, 70, 1,192,207,139, 70,205,223,210, 7, 27,166,157,171,118,216,138,169,126,126,126, 27, 87,
-174, 92,201,216,219,219, 35, 41, 41,169,183,155,155, 91,211,220,220, 92, 55,232,113, 34,174, 95,191,254,161,206,221, 6, 52, 28,
- 60,108,132,220,218,202, 2,201, 41,233,102,135, 14,236,154,204,220,250,163,207,203,151, 47,135, 27,219, 16, 35,140, 48,194, 8,
- 35, 42, 65,205, 35,195,183,178,135,172, 64,139,129, 2,134, 26,219,177,181, 91,247,145,125, 59,211,110,174, 77,240, 40,234,241,
- 39,167,174,220, 89, 67,223,140, 10,102, 57,178, 79, 33,194,201,176, 20,253, 51, 97,116, 44, 4, 23, 79,254, 86,212, 19, 78, 24,
-197,132,134,134, 54,241,242,242, 42, 93, 26,166,123,247,238,232,222,189, 59,181,117,235, 86,207,139, 23, 47,122,238,220,185, 83,
- 27, 28, 28,252, 43,244,199, 71,153,222,184,113,227, 53, 27, 55,110,148,248,248,248, 64, 34,145,148, 30, 48, 49, 49,193,128, 1,
- 3, 48, 96,192, 0, 38, 57, 57,185,215,233,211,167,123,173, 94,189, 90, 19, 31, 31, 63, 15,111,163, 52,235,197,146, 37, 75, 90,
- 87,240,243,121,138,162,158,179, 44,251,192,211,211, 51,177, 41,208,100,114,223, 14,151,166,118,116, 86,204, 94,184,187, 66, 59,
- 2,177, 24,123,253,138,250,234,178, 68, 43,238,202, 57,152,152,153,102,200, 77, 77,195, 1, 68, 0, 8, 39,132, 68,196,198,198,
- 62,118, 1, 60,219, 91,208,191,238,202,226, 61,170, 65,182,144,152,152, 8,115,115,115,153,143,143, 79, 10, 69, 81,203,254,248,
-227,143,143,237,144,215,110,217,252,169,162,172,151,225,120, 29,125, 11,115,134,117,146,207,222,244,251,119, 42,141,238,152,190,
-147, 40,138,166, 87,223,228,253, 81,180, 24,239,146,140,140, 12, 31, 0,176,180,180, 20, 3,184,186,238, 14,250,126,221,145,250,
-144,216,110, 34,134, 97,182,236,222,189,251,139,177, 99,199, 22, 45, 29,241,231,159, 48, 49, 49,193,138, 21, 43,234,207,157, 59,
- 55,128,101,217, 89,149, 41, 89,157,187, 13,104,184,225,199,239,220,242, 50,115,212,219,183, 28,190,235,208,188, 25, 61,101,250,
- 92,211, 13, 90,181, 29,199,113, 99,141,202,150, 17, 70, 24, 97,132, 17,213, 81,179,170, 36, 90, 77,173,176,167, 85,115,231,207,
- 71,246,235, 36,105,209,220, 29, 34,201,219,208, 45, 94,173, 91,195,171,117,107,218, 63, 63,175,103,232,221,251, 61,143, 94,188,
-173, 46,212,197, 31,142, 73,135,159,161,185, 42, 89,148,118,229,103,182,221, 10,178,223, 72, 1, 64, 81,203, 70,181,232,228,235,
- 43, 29, 59,118,132,163,163,163, 40, 56, 56,120, 98, 21, 68,107,209,147, 39, 79, 36, 12,163, 63, 30,170,131,131, 3,134, 14, 29,
-138,102,205,154,137,187,118,237,186,168, 50,162, 37,149, 74,223, 80, 20,101, 3, 0,181,107,215,230,150, 45, 91,246,128, 20, 1,
- 0, 8, 33,228, 22, 77,211,183,121,158,191,243,251,239,191,191,114, 3,108,122,123, 53,187, 62,117,204, 80, 57, 57,186,190, 82,
-146,160,202,205,173,240,119,185,137, 34, 77,166, 80,132, 75,228,210, 8, 20,173,229, 21,225,232,232,248,216, 13,112,108,219,172,
-193,197,173, 95,143, 50,221, 53,233,187, 42,203,178, 85,171, 86, 77, 61, 60, 60,164, 28,199,161,160,160, 0, 63,255,252,179,185,
- 76, 38, 51,239,211,167,207,210,178, 55,128, 43,208, 98,136, 3, 51,105,121, 50, 55,173, 6, 55, 82,173,206,222,173, 95, 14, 29,
-208,199,172,117,251,206,120,122,117, 63, 50, 51,243,144,147,157, 15,158,231,223,139,235, 51,237, 28, 82,183,244,199,154,173, 11,
- 71, 45,160,104,154,242, 28,244, 13, 62,181,203,153,185,109,219,182, 40, 0, 66,177, 88, 92,246, 62,116,144,213,105,190,166,201,
- 39,157,241,243,226, 49, 32, 60, 79, 0,172,169,134,154,101, 99,106,106,122,234,226,197,139,237,218,180,105,131,219,183,111,227,
-197,139, 23,152, 58,117,170,102,218,180,105,162,113,227,198, 81,115,230,204,153,177,122,245,234,163, 0,110,188,247, 32, 8, 4,
-163, 63, 27, 60, 92,156,159,157,171,210,168,181,154,218, 86,181,120,117,129,170, 48, 61, 43, 87, 53,124,212,151,154,168,176, 59,
-163, 1,188, 71,180, 62,176, 60,141, 48,194, 8, 35,140, 48, 0,132,144, 54, 0,172, 1,164, 81, 20,117,183,236,126,113,146,146,
-213, 90,202,239,167,163,104, 84,202,178,140,185,116, 20,185,251, 88, 3,224, 0,132, 82, 20,149,245,129, 89,212, 63,203, 48, 40,
- 40,136,148,253, 44, 67,180, 8, 33,132,232, 50,158, 19,117,204, 57, 82,120,247,151,247, 54,101,212, 49,146, 18,122,152,220,249,
-237, 91,210,212, 74,255, 42,236,125,155, 65, 55,202, 3,100, 74, 27,144, 89, 93,107,169, 66, 67, 67,131,121,158, 15,242,239, 12,
- 66, 30,253, 70,200,163,223,200,215,222, 32, 71,143, 30, 61, 31, 16, 16, 16,180,111,223,190, 32, 0, 85,249, 41,165,230,221,189,
- 73,238,216,128, 84,134, 39, 79,158,144,109,219,182,145,133, 11, 23,146, 93,187,118, 17, 84, 17, 65,189, 87,175, 94,127, 68, 70,
- 70,146,113,227,198, 61,128,158,192,128,174,128, 98,116,125,187,104,245,161,245, 90,205,216, 22, 36,171,139,180,194,235,183,183,
-183,127, 39, 63,129,206,118,100,115, 91,103,178,167,167,215,107, 66,200,121, 66, 72, 32, 33,100, 56, 33,164, 25, 0,180, 2,204,
- 62,179,183,124,166, 58,188, 65,169,153,212,190,202,117,239, 90,181,106,213,116,222,188,121,153, 26,141,134,196,197,197,145,237,
-219,183,147, 75,151, 46,145,147, 39, 79,146, 78,157, 58, 37,151,201,175,237,132,102, 78,169,154,157,203,213, 53,185,139,132, 12,
-179,249,238,165,163,228,217,245, 35, 36,244, 96, 0,249,247,191, 70,146, 25,159,181,211,154,201, 36, 42, 0,221, 42, 59,111, 90,
- 71, 52,105, 86,223, 58, 38, 62, 62,158,104,181, 90, 50,126,252,120,210,171, 87, 47,242,201, 39,159,144, 30, 61,122,144,238,221,
-187,147,110,221,186,145, 43, 87,174,144,228,228,100,210,163,179, 87, 65,127, 87,180,174, 70,214,154, 59, 57, 57,189,142,139,139,
- 35, 90,173,150, 4, 7, 7,147,253,251,247,147,224,224, 96,226,239,239, 79, 0,236,153, 50,101,138, 50, 43, 43,139,244,234,213,
-235, 21, 42,136, 26,239,228,228,244, 56, 50, 38, 49,113,221,170, 95,174,236,221,124,224,202,241,163,151,174,156,186, 16,122,230,
-228,133,187,135,239, 60,140, 61,233,228,228,244,184,130,250,255,160,242, 52,194, 8, 35,140, 48,162,106, 46, 82, 76,180,250, 21,
-139, 29,253, 8, 33, 61,202,237,247, 43, 38, 78,239,237,251,251,251, 47, 44,187, 95,146,198,223,223,127, 33, 0,226,237,237,125,
-128, 16,210,228, 35,100,127, 82, 5, 91,213,138, 86, 9,216, 87,161, 16, 57,247,129,144,211, 65,151,254, 4,124,118, 60,160,176,
-131,146, 50, 65, 70, 74, 60,162,175, 31,211,191,144, 68, 49,206, 62,129, 16, 64,240,227,199,143, 17, 29, 29,141,196,196, 68,200,
-229,242,247,210,253,249,231,159,144,201,100,176,183,183, 55,140,233,106,222,237,231,194,189,156, 96,226,237,131,244,145, 95, 33,
- 56, 56, 24,111,222,188,129, 72, 36,130, 88, 44, 6,203,178, 85,218,163,233,162, 21,127, 75, 84,172,138,210,248, 0, 2, 73,109,
-147,211, 91,151,206,106, 64,223, 10, 18, 42, 19,158, 33, 89,197, 25,166,228,153, 40, 32, 87,200, 83,100, 50,121,233,112, 33,128,
- 8,138,162,158,182, 2,132, 10, 19,233,233, 95,191,159, 99,199,132, 5, 75,149,207,194, 43,180,209,163, 71,143,201, 0,150, 18,
- 66,178, 61, 60, 60,108, 87,174, 92,105,145,148,148,132, 71,143, 30,225,240,225,195,105,108,209,133, 82,132,144,229, 0,208, 30,
-144,214,178,174,117, 97,243,183,179, 76,113,245,144,184, 38,119,145,185,235,128, 51, 67,198, 77,153,182,113,214, 0, 20,228, 41,
-241,219,165, 48,156,191,255,252, 83, 0,127, 66,143,223,219,150, 27,120, 6,164,117, 31, 60,120,240,131,107,215,174, 89,237,220,
-185, 19, 44,203, 86,184,237,220,185, 19,151,175,223,159, 9,224,158,129,217,114,104,208,160,193,229, 59,119,238, 88,203,229,114,
- 92,186,116, 9,217,217,217,165, 74,150,159,159, 31,149,157,157, 61,226,231,159,127, 30,242,242,229,203, 31,175, 95,191,158,129,
-162,181, 32,223,185, 17, 24,134,121,206,178, 90, 23,123,215, 38,130, 97, 3, 58,119,206,207, 8,135,137,165, 7,110, 61,124,126,
- 58, 59, 43, 67,201, 48,204,243,178,233, 63, 70,121, 26, 97,132, 17, 70, 24, 81, 61, 80, 20, 21, 68, 8,233, 79, 81, 84, 80,249,
-223,202,127, 47, 73, 23, 16, 16, 80,186, 95,114, 78, 96, 96,224,170, 50,251,133, 31, 41,123,122,157,225,187, 22, 51,200,174, 21,
- 37, 82, 63, 58, 14,117,244, 41,136,156, 58, 66,220,236, 83, 48, 78,157,144, 16,126, 21, 15,207,173,195,171,168, 63, 65,120, 14,
-246, 77,219, 26,154, 17,149,139,139, 11, 84,170, 34,215, 44,181, 90, 13,145,194, 66, 53,103,210, 40, 41, 0,240, 2,169,186, 12,
-131, 53,200,160,105, 71, 95,180, 77, 37, 8,181, 45, 18, 42,218,166, 22,157,247,253,248,241, 16,137, 68, 16,137, 68,160,138, 93,
-127, 12, 33, 90, 84,113, 98,190,104,248,170,162, 76, 80,133, 18,225,111, 7,151, 78,111, 43,121, 25, 33, 86, 71,222, 66,178,154,
- 39,167, 83,185, 51,134,228, 87,174,144, 39,201,228,242, 8,153,137,162,148,104, 81, 20,245, 28, 0,136, 80,184,111,255,242,233,
- 30,138,212, 88,133,234,110, 48, 82, 84,188,182, 18, 51,203,207,157, 59,103, 35, 16, 8,236, 56,142, 67, 66, 66, 2,162,162,162,
-176, 97,195,134,212,188,188,188,174, 97, 97, 97, 49,101,185, 35, 39, 19, 31,222,183, 98, 86, 67, 65,120,136, 84,253, 60,178,218,
-119,143, 85,243,129,189, 62,237,234,121,102,242,152,197, 24,216,247, 19,140,235,234, 70,226,146, 51, 85, 0, 46, 21, 75,175, 85,
- 33, 41, 44, 44,172,103,151, 46, 93,254,221,178,101, 75, 87, 66, 8, 90,180,104,129, 17, 35, 70, 96,223,190,125,120,248,240, 33,
-114,115,115,181, 23, 47, 94, 92, 15, 96,183,129,217,146, 91, 88, 88,156,191,114,229,138,181, 92, 46,199,197,139, 23,161, 84, 42,
- 97,111,111,143,105,211,166,137, 3, 3, 3,247,230,230,230, 14, 11, 8, 8,144,198,197,197,109,190,112,225, 66,125, 20,173, 59,
-247,222, 77,160,209,104,118,252,182,111,207,198,105,211,103,212,185,114,251, 81,176, 58, 63,207,220,201, 41, 49,215,218,194,196,
-116,253, 15,203,235,105, 52,154,201, 21,151,231, 31, 53, 42, 79, 35,140, 48,194, 8, 35,222,131, 94, 46, 82,150, 60,149, 39, 91,
-213, 33,105, 0,148,254,254,254,139, 40,138, 10,242,247,247, 95, 20, 16, 16,160, 4,144,252, 87,144,172, 82,162,213,191,127,255,
-144,160,160, 32,244,239,223, 63,164, 82, 19, 60, 7,109,220, 53,104,227,174, 65,230, 61, 19,191, 7,140, 44,119,241,124,141,115,
- 55, 96,197,165, 43,106,181, 90,176,103,207,158, 82,191, 45, 0,224, 56,238,163,215, 98,117,136, 86, 49,209,123, 47, 19, 13, 36,
- 38, 33, 59,190, 30,214,222,146, 43, 20,106,254, 60,141, 36, 53,207,254,248, 76, 91,120, 55,155,172,174,204,230,201,217,147,145,
-120,253, 50,228, 38, 38,137, 95, 92,139, 40, 85,177,138, 73,214, 11, 0,168, 47, 49, 13,222, 54,107, 96, 39, 59, 17, 68,154, 51,
- 71,144,172,230,213,219, 94,234,118, 87,114,179,129, 16,130, 23, 47, 94,160,176,176, 16, 55,111,222,196,177, 99,199,210, 42, 32,
- 89,104, 32, 49,249, 99,215, 55,163,219,153,229,189, 22,105,238, 94, 70,178,154, 55,104,168,203,170,197,192,142, 34,154,186, 72,
-209,140,172,123,251,166,152,253,229, 32,172,219,245, 59,171,177,233,220,127,227,169,179,159,231,171,181,139, 12, 36, 89,165, 98,
- 99, 88, 88,152, 91, 88, 88,152, 4,128,239,136, 17, 35,206, 14, 25, 50, 4, 33, 33, 33, 56,125,250,180, 51,128,148,226,116, 43,
- 80,180, 80,246,106, 0,177,149, 9,143, 34,145,232,224,229,203,151,221, 29, 28, 28,112,249,242,101, 40,149, 74, 76,153, 50, 69,
- 51,125,250,116,145,159,159, 31,149,147,147, 83,170,100,221,188,121, 51,163, 50,146, 5, 0, 73, 73, 73,231,142, 29,222,223,161,
- 75,151, 46,131, 26, 58, 55, 51,139,205,203,125, 35,151, 75,101,215, 67,174,138,238,222,185,177, 57, 41, 41, 41,180,226,242, 12,
- 54,184, 60,141, 48,194, 8, 35,140,168, 28, 6,113,145,114,202, 84,117, 80,230, 60, 97, 64, 64, 64, 84, 64, 64,192, 59,138,215,
- 7,162,252,172,195, 51, 37,125, 90,141,226,104,113, 57, 9,239, 95, 0,207, 87,231, 98,223,251,205,194,194,130,149,201,100,239,
- 16, 45,222, 64,155,153, 39, 14, 32,118,234,168, 82, 37,171, 68,217, 66,111,191, 15, 34, 90, 60,207,223, 4,240, 78, 38,228, 54,
- 77, 71,174, 31,224,218,209,173, 97, 29, 90,119,120, 3, 94, 21,178,170,165, 79,180,170,232, 60,242,233,227, 10,156,172, 75,109,
-178, 58, 72, 21,178,120,153,137,162, 60,201,122, 9, 0, 10, 91,231, 33, 63,246,105,214,213,179, 89, 99,154, 61,180, 22, 73,133,
-186,124,255,199, 90,109,108, 1, 57, 94, 73, 25, 46,253,228,147, 79,150, 90, 90, 90, 74, 55,110,220,104,238,228,228, 4,150,101,
- 53,229, 73,150,220,166,233,200, 13, 3,155,119,108,106,103, 65,235,142,110, 66,162,146, 43,220, 16,171,219,107, 8,201,178, 50,
- 55,185,176,109,213, 84,153, 92, 34,132, 74,165, 66,224,214,163,184,120, 35,178,127,122,228,201, 11, 0, 46,124,192, 13,249, 69,
-255,254,253,215,173, 88,177, 2, 58,157, 14, 19, 39, 78,196,243,231,207, 47, 62,121,242,100, 67,189,122,245,230,125,243,205, 55,
- 14,118,118,118,248,252,243,207, 69, 58,157,206,175, 18, 27, 63,252,246,219,111,253, 61, 61, 61, 17, 18, 18,130,236,236,108,216,
-219,219, 99,250,244,233,226,128,128,128,189,185,185,185,195, 86,173, 90, 37,125,241,226,133, 94, 37,235,157,251,154,227,190,223,
-190,110,234,188, 54,237, 59,209,207,158,197,176, 9,109,125,232,171,151, 79, 95,179,180,180,220,155,144,144,240,182, 60, 7,181,
-168,118,121, 26, 97,132, 17, 70, 24,241,113, 64, 81,212,153, 98,191,171,119, 84,174,242, 36,172, 68,177, 42,187, 95, 62,125,241,
-241,143,241,178,188,163, 2,226,245,110,120,135,254,253,251, 27, 60,173,158, 47, 72, 51,136, 60,149, 71,223,102,208,213, 49,129,
- 96,145, 15, 13,145,194, 66, 53, 96,197,165, 43,149,165, 85, 40, 20, 6, 43, 90,188, 90, 85, 85,165, 84,139,104, 21,251,104,157,
- 39,132,188, 67,180,204,109,155,250, 44,248,102,214,250, 78, 67,122,211,169, 95,122, 35, 59, 95,173,254,230, 17,203,191, 42,212,
- 79,178,138,122,113, 93,156, 92, 97, 18, 33, 85,200,203,146,172, 4, 0,144,218, 52,110, 59,127,246,180,173,221, 70, 14,160,210,
-166,116, 66, 86,182, 82, 61, 47,138,165,146,148,100,216, 99,224,106, 69,230,174, 92,185,178, 29,192,118, 31, 31,159, 84,133, 66,
-129,252,252,252,247,234,160, 36,191, 29,135,244,166, 83,191,104,135,204, 2,173,250,155, 40, 22,201, 74,254, 96, 85, 36,203,186,
-150,233,133,109, 43,167,202,147, 95,189,132, 72, 36,130,137,137, 9, 46,253, 25,129,244,168, 83, 31, 66,176, 64,211,244, 50,127,
-127,255,165,211,166, 77, 67, 70, 70, 6, 78,159, 62,141,190,125,251,226,192,129, 3, 78,103,207,158, 93,231,235,235, 11,134, 97,
- 16, 20, 20, 4,157, 78,247,180, 18, 51,131, 38, 77,154, 52,111,200,144, 33, 8, 13, 13, 69, 74, 74,202, 59, 74, 86,118,118,246,
-136,173, 91,183, 14,137,139,139,171, 82,201, 42,135,182, 13, 26,183, 18, 45, 92,242, 19,212,133,111, 4,105, 73,183, 67,130, 47,
-209,183, 50, 51, 51,229, 0,114,106, 90,158, 70, 24, 97,132, 17, 70, 24,172,106, 85,198, 69,210,138, 73, 84, 90, 69,251,101, 8,
- 86, 69,251, 84, 57, 21, 76, 83,238,248,195,191,242,154, 12, 82,180, 4,182,205,193,166, 70,150, 33, 90,111,222, 57, 46, 53,173,
-109,208,208,161,142,133, 96,219,238,210, 56, 90,210,140,140, 12,169,149,149,149,170, 44, 65,144,203,229,112,112,112, 64, 86, 86,
- 22,118,236,216, 1, 84,237, 20,205,154, 13, 25,131,182, 35, 39,226,174,163, 24, 68,167, 45, 85,182,182,141, 31,255, 14,217, 18,
-137, 68, 37,190, 97, 85,117,186,119,138,149,166, 91, 0, 72, 43,231,134,223, 73, 21,138,241, 82,171,186, 86,179,167,126, 33,140,
-123,163,198,149, 78, 11,179,143,254,176,192, 36,145,152, 76, 75, 64,206,141, 42,236,197,126,246,243,254,242, 74,214,171,150,206,
- 13, 23, 75,229,210, 47,197,181,235,219,249,207,153, 42,140, 75, 85, 83, 87,218,126,147,123,108,245, 55,242, 23, 48,157,247, 10,
-217, 87, 13,168,158,165,125,251,246, 93, 74, 8, 33, 60,207, 47, 1,128,178,249,157, 51,253, 75, 97,236,107, 21,130, 59, 45,206,
- 58,246,195, 2,211, 68,232,207,175, 85,139,129, 29,109, 45,204, 46,108, 91, 53, 77,158,146, 20, 15,137, 68, 2, 83, 83, 83, 36,
-166,230, 64, 40, 96,148, 31,120,191, 73, 58,119,238,188, 96,234,212,169,136,136,136,192,148, 41, 83, 82, 18, 18, 18,142, 31, 58,
-116,104,202,183,223,126, 43,232,213,171, 23, 82, 82, 82,176,102,205, 26,221,159,127,254,185, 10,192,154, 10,239, 71,129,224,139,
-239,190,251,142, 36, 39, 39, 83, 47, 94,188,128,189,189, 61,102,204,152, 33, 94,181,106, 85,169, 79, 86,117,148,172, 18, 36, 37,
- 37,133, 92,188,124, 11,159,158, 91, 15, 86,167, 14,201,206, 72,184, 22, 29,155, 21, 82, 91, 44,158, 91,167, 85,139, 26,149,167,
- 17, 70, 24, 97,132, 17, 31, 69,197,186,171,111,255,111,128,138,134, 14, 13, 34, 90, 79, 55, 45,158,224, 60, 97,218,124,200,156,
- 58, 66,253,248, 4,248,252,212, 82, 69, 75,106, 98,129,218,245, 92,145, 93,160,198,145,224,251, 0,240,180, 58,185,202,203,203,
-131,151,151, 23,182,248, 53,237,166,202,203,144,202, 0,168, 37,102,170,147,226,206, 87,206,158, 61, 91,200,243,252, 65, 0,103,
-171, 48,179,204,221,221,125,243, 79, 63,253, 36,118, 29, 57, 1,249,183,175,151, 87, 80, 32,147,201, 32,145, 72, 16, 30, 30,142,
- 43, 87,174,104, 0, 44,171,162, 66,239,176, 44,251,240,208,161, 67,175,154, 52,172,211,219,171,165,199,204, 69, 11,253, 77, 31,
- 93,191,136, 37,171, 54,243, 77, 90,247,202, 9, 60,112, 50, 47,199,164, 94,119,101,202,147, 7, 6, 92,234,195,114, 36, 43,217,
-165, 65,221,110, 45,155,187,207, 95,178,100,177, 89,212,245, 75,248,118,245, 54,226,236,217, 35,103,245,177, 83,185,233,242,250,
-159,168,222, 68,135, 26, 82,134, 33, 33, 33,219, 1,108, 47,217, 47,159, 95,255, 21, 27,248, 12, 99, 47,114, 0, 0, 32, 0, 73,
- 68, 65, 84,166,109,122,103, 5, 30, 56, 86,144,107, 90,175,135,190,252, 90,187, 14,234,224,104,109,113, 97,211,247, 95,201, 95,
- 39, 37, 64, 34,145,192,196,196, 4, 9, 41,217, 88,186,254,112,129,150,231,123,127, 40,209, 50, 53, 53,149,104,181, 90,108,217,
-178, 5, 9, 9, 9,222, 0, 18,238,221,187,183,109,248,240,225, 27, 91,180,104,225, 18, 21, 21,245, 52, 63, 63,127, 26,128,232,
-202,140,212,170, 85,203,219,218,218,154,186,117,235, 22,190,250,234, 43,205,140, 25, 51, 68,227,198,141,163,178,178,178,106,170,
-100, 1, 0,234,212,169,227,211,179,123,123,116,236, 57, 37, 68,163,202,190, 22, 23,189, 55,132, 38, 55,164, 53, 45, 79, 35,140,
- 48,194, 8, 35,254,103, 80,179,192,224, 62,128,160,169, 37, 38,187,215, 17,189,222,247,195, 12,146, 23,123,147, 40, 67,183,147,
-220, 19, 95,146, 51,107,198,145,179,155,102,147, 41,253,220,137,139, 13,245,186,169, 37, 38,251,188, 79,220,222, 89,221,187,111,
- 51,232,122, 54, 6,233,217, 24,164, 95, 83,232, 0, 44,106,213,170,213,201,233,109,223,198,209,154,222, 22, 4,192, 87, 0, 76,
- 42,201, 86, 69, 43,134,219, 3,216,225,229,229,197, 94,189,122,149, 60, 25,214,131,132,185, 88,145,105,211,166,145,111,191,253,
-150,140, 26, 53,138, 88, 91, 91,179,197, 5, 97, 95,149,205, 79, 63,253,212, 17, 0,234,214,173, 91,171,181,107,147,215,225,193,
-167,201,181,125, 27,201,174,233,131, 73,187, 22,174,233,118, 46, 93, 30,202,236,155,181,172,162,248, 74,109,218,217,217, 45, 36,
-132,244, 38,132,216, 3,128,179,179,165, 73, 43,151, 38,201, 15, 47,159, 38,215,247,111, 38,187,166, 15, 38,237, 61,220, 50, 28,
- 93,125,163,165, 54, 46,109, 13,177, 89, 17, 42,204,111,115,151,116,219, 38, 29, 30,232,201,111,169,205,134,109, 63, 63,245, 42,
- 57,149,220,185,115,135,156, 61,123,150, 92,191,126,157,236, 59,116,138,212,107, 51, 44,223,170,197,192,142,213,184,117, 42,203,
-167,121,191,126,253,200,211,167, 79, 73,159, 62,125, 8, 0,243, 26,218, 60, 25, 23, 23, 71, 34, 35, 35,201,162, 69,139, 8,128,
- 61, 83,167, 78, 85,230,228,228,144, 30, 61,122, 36, 20, 19, 44, 65, 77,242,217,168, 65,157,192, 65, 3, 58, 47,155,254,213, 16,
-159, 15, 45,207,143, 8,163, 77,163, 77,163, 77,163,205,255, 5,155,255,205,176, 47, 86,181, 74, 62, 91, 25,164,104,133, 0, 44,
- 50,176,189,185,141,246,223,171,214,108,154,187,101,251,158,249, 11,102,126,161,232,220,169, 39, 34, 46,255,138, 99, 65,135, 10,
- 84,106,205, 26, 17,131,159, 34, 51, 80, 24, 83, 69, 46,138,227,104,189,131,176,176, 48,121,237,198,111, 99, 48, 61, 43,138,205,
-186,173,154, 23,152, 2, 96,210,253,251,247,127,242,245,245, 93,249,101,199,182,131,167,119,232, 6,157, 78,135,125,251,246, 33,
- 62, 62,254, 56,128,197,134, 42,110, 17, 17, 17,233,110,141,157,102, 9, 25,193,252,105,163, 6, 89,167, 61,127,132, 87,143,195,
- 0, 0,106,181, 82,247,250,233, 53,207,234,100, 78, 38,147,221,177,182,182,126, 98,109,109,157,213,180, 97,221, 73, 18, 8,151,
- 76, 25,241,153, 77, 70, 92, 52, 18,163,138, 70, 70,213,170, 66,237,171,167, 87, 93,106, 82,187, 78, 78, 78, 18,133, 16,147, 43,
-204,175, 70,165, 75,125, 22,221,210, 16, 59,133,106,205,170,229,235,246,125,242,253,252,241, 18, 51, 51, 51,220,143,124,134, 37,
-107, 15, 20, 40, 53,186,222,233, 17, 39, 63,202,240, 24, 33, 4, 58,157,206,224,137, 14,149, 96,129,167,167,103,179,149, 43, 87,
- 58,251,249,249,225, 67,149,172,178,136,141, 75,242,175, 83,183,145,219,179, 39,247,125,107,203, 68,255,254,144,242, 52,194, 8,
- 35,140, 48,226,127, 6,253,138,197,156, 73,101, 62,195,170, 36, 90, 37,136,124,131, 66, 0, 43, 26, 50,249,219, 22,174, 92,183,
-148,166,214,143,231, 9,249,149,165,177,252, 69, 6,210, 62, 48,115,133, 66, 1,216, 79, 6,142, 18, 0,128, 80, 80,179, 14,178,
- 24, 79, 1, 12,249,229, 70,104,155, 95,110,132,254,171,248,183,239, 1, 84,107, 44,215, 84,128,200, 78,110,141,234,116,110,229,
- 46,101, 56, 37, 94, 61,126,142,204, 2, 21, 46, 69,197,103,211,132,254,181,186,153,122,241,226,197, 31, 0, 96,107, 46,127,220,
-217,173,113,189, 46, 94,238,114, 33,165,193,171, 71,247,145,163,212,224, 98, 84,124, 14, 40,170,198, 14,213, 31, 43,191,169, 17,
-167,238,254, 14,170, 7, 69, 81,151, 23, 77, 31, 41, 89,186,246,224, 71, 37, 89, 0, 10,147,146,146, 50, 10, 11, 11, 45,147,147,
-147, 53,168,121,144,184,103,185,185,185, 45,102,207,158,189, 98,222,188,121,243,127,248,225, 7, 81, 77,124,178, 42, 67, 86, 82,
-252,137, 46,238, 31,175,254,141, 48,194, 8, 35,140,248,159,192,164,114,159, 48,152,104,149, 18,134, 55, 72, 3, 48,173, 81, 35,
- 50, 39, 54, 22,154,143,149,179,138,148,174, 15,196, 93, 0, 3,106,124, 54, 77,229,221,126, 26,159,127,231,105,124, 62,120, 66,
-120, 66,212, 52,141,196, 2,173,118,213,211, 23, 73, 53,159,117, 71, 81,220,221,103, 9,202,123,207, 19, 85,132,231, 9, 79,136,
-134,162,240, 90,167,227, 87, 69,189,136, 63,245,119,200,111,122,196,201, 27, 65, 44,213,249,198,157,200, 57, 5, 5,218,205,233,
-143, 79,222,252,136,245,162,139,136,136, 24,237,237,237, 61,129,227,184,109, 0,116, 31, 96, 75,195,178,236,130,192,192,192,227,
- 17, 17, 17,135,111,222,188,153,242, 49, 72,214, 95, 90,255, 70, 24, 97,132, 17, 70,252, 83, 81,179, 69,165, 43,195,199, 36, 89,
-127, 71, 68, 62,123,233,245, 87,216,141,122,246,178,249,127, 67,126, 83, 31,159,184,151, 10,140,248,139,138,247, 34,199,113, 23,
- 63, 38,169, 62,127,254,124, 3, 84,176,172,206,223,173,254,141, 48,194, 8, 35,140,248,199, 98, 82,101,228, 75, 96, 44, 27, 35,
-254, 1, 32, 31,139,100, 25, 97,132, 17, 70, 24, 97, 68, 13, 80,169,162, 69,161,242,153, 3,151,171,241, 7, 53,153,125,112,217,
-104,211,104,211,104,211,104,211,104,211,104,211,104,243,127,206,230, 63, 17,246, 40,114,136, 63, 83,252,169,151,124,125, 76, 24,
-167,190, 26,109, 26,109, 26,109, 26,109, 26,109, 26,109, 26,109,254,211, 81,161, 35, 60, 80,228, 60,108,132, 17, 70, 24, 97,132,
- 17,255, 77,144, 20,111, 53, 61,110,132, 17,127, 53,217, 42, 37, 92, 53,241,209,106, 82,252,249,236, 47,204,236,116,123,123,251,
- 73, 30, 30, 30,174, 34,145,136,206,203,203, 91,126,245,234,213,101,229, 19,117,118, 19,220, 99,104, 56,190,253,133, 2, 40, 6,
-160,105,112, 4,175,174,135, 43, 91, 27,235,253,111, 13, 39,153,153,245,239, 20,205,136, 57, 86, 11, 78,167, 69,145,187, 85, 17,
-120,158,141,231,180,234, 94,149,157,108,231, 57,168, 30,203,241, 63, 0,100, 11, 64, 79, 5,248,173, 20, 4, 83, 8,216,159, 41,
- 48, 95,129, 33,171,193, 81,223, 8,132,204,194,148,176,163,137,255,132, 2, 59,114,228, 8,243, 33,231, 15, 27, 54,172,194, 5,
- 68, 29, 28, 28,130,228,114,121,227,202,206, 43, 40, 40, 72, 73, 73, 73,241,253,135,223,143, 93, 0,108, 2,224, 94,238,247,104,
- 0,179, 0, 4,127,232, 31,248, 0, 2, 91, 96,178, 8,248, 6, 0,180,192,234, 84, 96,123,200,223,200,199,208,218,218,250,154,
- 64, 32,112, 46, 40, 40, 40,200,203,203,107,100,106,106, 26,171, 80, 40, 20, 44,203, 62, 77, 75, 75,235,162,239, 92, 82, 52, 41,
-165, 74, 52, 7, 76, 99,128,225, 28, 77,207, 16, 2, 91,212, 60,191,173,184, 5, 55,100,129,219,169,120,187, 60,215,124, 0, 91,
-171,121,220, 8, 35,254, 10,124,208,172,195,166, 69,237, 3,124, 0,116,105,211,166,141,109, 65, 65, 1,162,163,163, 83, 1, 92,
- 3, 16, 82,188,197,124,140,156,210, 52,253,227,186,117,235,230,206,152, 49,163,116, 49,232,240,240,112,120,122,190, 31, 35,148,
-161,225,120,245,244,101,155,187, 17, 49,104,211, 99,104, 49,209,162,129,130, 20,248,246,108, 91,211, 44,152, 90, 88, 88, 44,167,
- 40,106, 24, 77,211, 85, 54, 26, 60,207,115,132,144, 35, 89, 89, 89, 75, 1,228, 85,231,143, 20,114,137,142,229,184, 10,255, 67,
-192, 48, 92, 65,161,186,210,176, 23,181,107,215,190, 73,211,116,195,178, 11,102, 3,239, 46,160, 93,217, 49,150,101, 95,165,167,
-167, 27, 66, 66,165,180, 64, 52,139,162, 68, 61, 65,243, 77, 1, 10, 20,232, 24,158,211, 92,226, 89,237, 6, 0,170, 15, 33, 89,
-246,117, 27, 93,255,122,113,160, 99,228,227,104, 44,154, 62, 10, 63,108,218,131,133,179, 38, 96,195,142, 3,152, 53,105, 36,220,
-220,220,245,182,186, 60, 68,171, 22,207, 28,214, 35, 96,203,225, 78, 11,167, 13,147, 4,108, 57,210,121,209,244,225,226, 85,155,
- 15,119, 94, 52,253,115, 73,192,230,195,157, 22,206, 28, 38, 91,181,245, 40, 15, 96, 76, 77, 50, 57,210,217,161,128, 98,217, 10,
-223,140,137, 64,160, 62,240, 52, 89,241,159,120,162,253,252,252, 60,148, 74,229,253, 81, 61, 91, 5,182,108, 90, 39,169,162, 52,
- 25,175,147,234,196, 62, 9,243, 23,138,100, 94,159,249,239, 9,215, 43, 15, 72, 36, 13,163,163,163,157,121,158, 7,199,113, 96,
- 89,182,244, 83,163,209,160, 75,151, 46, 31,107,226,204, 0, 0,203,139, 30, 86, 4, 0, 56,252, 1,182, 76, 4, 2,193,215, 98,
-177,216,135,101, 89, 87, 0, 16, 10,133,143,213,106,117, 8,203,178,235, 0,228, 87,211,222,250,164,164, 36, 55, 19, 19, 19,104,
-181,218,210, 5,232, 25,134,113,169, 87,175,222, 22,149, 74,229,252,161, 23,111, 11, 76,238,208,169,211,134,113,115,231, 50,202,
-107,215,176, 97,247,238,245,200,205, 5,128, 45, 85,157, 43, 22,139, 47,208, 52,237, 84,157,255,227,121, 62, 94,163,209,244,170,
-206, 57, 2,129,192, 57, 57, 57,217,198,193,193, 1,121,121,121, 80, 40, 20,138,146,253, 15, 65, 8, 64,245, 6,186,176, 12, 51,
-219,210,202,170,243,253,139, 23, 21,205,155, 55,167, 25,134, 89, 8,195,131, 84, 75, 0,172, 33,132,200,138,251,139, 13,237,219,
-183,247,166, 40,138, 5, 64,120,158,167,239,220,185, 51,146,231,121, 65,113,155,183, 6,192,110, 0,106, 35, 15, 48,226,255, 65,
-205,218, 81, 93,162,117, 22,128, 79,155, 54,109,100, 35, 70,140,128,143,143, 15,156,157,157, 33,149, 74,139, 26,241,140, 12,219,
- 7, 15, 30,124,126,237,218,181,207, 79,159, 62,141, 71,143, 30, 41, 1,252, 9,160,194,135,186,123,255, 78, 51,164, 38,146,141,
- 0,144,246, 42, 35,229,213,139, 55, 27, 83, 82, 82,214, 0, 40, 27, 34,188,209,152, 49, 99,230,204,156, 57, 19, 65, 65, 65, 56,
-112,224, 0,212,106, 53,242,242,244,240,151,194, 55,200,186, 18, 8, 40,226,128,132, 16, 64,110, 3, 40,108,107, 92, 82, 22, 22,
- 22,203,103,205,154, 53,219,205,205,173, 52,138,185, 78,167, 3,203,178,208,233,116,200,202,202,194,156, 57,115,138, 58, 90, 66,
-192,243, 60,206,157, 59, 55, 99,210,164, 73,200,202,202,250,186, 34,155,237,189,234,222,163, 41,218,177, 68,171, 33, 28,247,234,
-246,131, 87,173, 89,142, 99, 84, 42,109,133, 43,149, 75,165, 34,189, 36, 79, 40, 20, 58, 62,250,253,119, 27, 90, 44, 6,225, 56,
-128,231, 65,120,190,184, 56,139, 55, 82,244, 27,225,120, 16, 29, 7,158,229,193, 42,213,104, 59,117,170, 33, 69,209, 65, 40,150,
- 29, 24,253,229, 92,187,118,237,219, 11,235,215,117, 0,203,241,120, 30,247,202,238,254,189,219, 29,143,236,221, 50, 69,163,204,
- 27, 9,160, 70,113,182,196,114,179,139,155,127,254,197,241,238,131, 72, 4, 95,189,134,203, 87, 66, 0, 0, 23,174,222, 44, 33,
-220, 85, 86, 21,216,252, 22,179, 38, 14,148, 4,110, 62, 40,156, 53,113, 16,243,195,230, 67,194,153, 19, 62, 99, 2, 55, 30, 16,
-205,156,240, 25, 19,184,233,128,104,230,196,129, 76,192,134, 93, 30, 0, 44, 0,100, 85,102,172,178, 58,162, 88, 86,242,239,216,
- 84, 6, 0,210,182,109,131,238,205, 27, 56, 44, 93, 10, 0, 24,221,200,214,224,161, 9, 43, 43,171,123, 66,161,208,177,170,116,
- 58,157,174, 74, 18,236,231,231,231,169, 84, 42,239,177, 44, 75, 4, 2,129,255,168, 65,159,156,236,221,217, 51,163,108,154,240,
-240,135,150,171, 86,253, 62,240,240,253, 60,242,185,151,233,253,160, 31,253, 90,247,159,183,231,161,158, 14,153, 86,171,213,120,
-250,244, 41,202, 46,242, 94, 6, 92, 13, 31, 41, 26,192, 6, 75, 75,203,118, 25, 25, 25,163, 1, 44,202,205,205,245, 96, 24, 6,
-181,107,215, 94,164,209,104,158,155,155,155,239,204,201,201,185, 89,172, 26, 25,186,100, 64, 23, 51, 51,179,125, 39, 78,156,176,
-104,213,170, 21,157,158,158,142, 6, 13, 26, 32, 51, 51,179,237,181,107,215,188, 38, 78,156, 56, 49, 47, 47,111,108,241,203,160,
-161,104, 38,151,203,201,184,113,227, 40,142,123,123,185,187,118,237, 66,175,230,108, 99,235, 90,242, 66,149,134,228, 4, 63, 53,
-255, 74, 36, 18,253, 25, 31, 31,159, 83,221,194, 16, 1,223,140,155, 59,151, 49,121,249, 18, 38, 15, 31, 98,116,110,174,224,135,
- 34,117,171, 74,162, 69,211,180,211,190, 3,191, 58,139,197, 98,176, 44, 91, 74, 6, 75,218, 40,157, 78, 7,173, 86, 11,157, 78,
- 7,142,227,160,211,234, 16,240,253,234, 26,183,133,114,185, 92,110,111,111,159, 42,151,203,229, 31, 72, 46,235,101,210,244,151,
- 45,189,188, 38, 45, 29, 56, 80, 26, 26, 26, 42,165,105, 26, 44,203, 98,205,154, 53, 44, 33,164,150, 27, 96,246, 8,200,173,174,
-109,137, 68, 34,216,187,119,239, 72,177, 88, 12, 0,208,104, 52,104,222,188, 57,101,236,243,141,248, 15,146,173,247, 84, 46,125,
- 68,171, 79,110,110, 46, 56,142,131,169,169, 41, 24,230,221,126,223,210,210, 18, 61,123,246, 68,151, 46, 93, 48, 98,196, 8, 60,
-122,244, 72, 54, 98,196,136,158,149, 25, 27, 53,183, 63,234, 58,219, 22,119, 38,188,253,141, 51, 15, 2,119,125,119,212,250,245,
-235,215,115,203, 36,155, 56,121,242,100, 42, 35, 35, 3,195,134, 13,187,166, 86,171, 63,133,158,135,143,227,241,202,119,196,104,
-240,132,146,173,187,243, 11,165, 81, 41, 9, 77,211,202,146,161,195,154,148, 18, 69, 81,195, 28, 28, 28,112,240,224, 65,104, 52,
-239,135, 11, 51, 51, 51, 67, 84, 84,212, 91, 85,141, 97,208,190,125,123,134,162,168, 97, 0,190,174,216, 38,237,120,227,238, 75,
-155,146,253,254, 61,221, 69,237,189,232,212,228,212, 2, 2,128, 90,188,120,113, 41,113, 3,128,229,203,151, 27,146, 79,208, 66,
- 33,210, 66, 66,222, 54,196, 2, 26,180,136, 2, 37, 4,104, 65,209, 40, 42, 8, 64, 56,128,103, 1, 94, 7, 72,237,235, 26, 82,
- 12,109,235,212,115, 14, 90,181,118,107, 45,181,142,224,224,169, 96,196,197,189, 0, 67,211,104,212,216, 25,159,116,237, 44,244,
-106,227, 93,119,245,178,185,167,147, 19,158,245, 1, 16, 90,237,130,230,137,180,113, 61, 43,236,220,117, 31,214, 22, 38, 24, 54,
-176, 47,100, 82, 9,126,216,244, 43,190, 95, 56, 29,206,141,156,176,125,253,202, 74, 79, 55, 55, 55, 95,225,234,220,216,105,235,
-222, 51,112,117,113, 97,182,238, 59, 3, 87,183,226, 79,119, 87,102,235,190, 51,112,115,119, 99,182,238, 59, 3, 15,247,102,245,
-239,165,220, 89,145,153,153, 57,189,242,242, 44, 87, 71,159, 20,213,145, 48,159, 47,109,180, 95, 78,153, 2, 0,165, 68,171, 58,
- 16, 10,133,142,201,201,201, 54, 85,165,171, 74, 53, 40, 86,178,238,177, 44,139, 55,111,222, 80,217,217,217,164, 86,173, 90, 3,
-207,111, 95,116,162, 87, 39,207, 76, 0,120,248,240, 97,237,128,128, 85, 3, 15,221,203,133,242,246,102,234,223,191,135,240,163,
- 63,245,185,119, 42,208,207, 11,197, 75, 66,148,135, 90,173,142,107,217,178, 37, 41,254, 94, 71, 34,145,136,202,221,111, 14, 77,
-154, 52,121, 79,181, 54, 96, 72,113,195,173, 91,183,166,187,185,185,193,197,197,229,102,187,118,237,204, 20, 10, 5,206,159, 63,
- 15, 87, 87, 87,119, 51, 51,179, 59, 71,142, 28, 17, 46, 88,176,192,115,247,238,221, 0, 48,195,128,226,236,225,235,235,123, 48,
- 40, 40, 72, 42, 18,137,160, 84, 42, 17, 21, 21, 5,115,115,115,136,197, 98,124,246,217,103, 76,199,142, 29, 45,187,118,237,122,
- 44, 38, 38,102, 36,170, 49, 3, 74,165, 82,145, 69,139, 22, 65, 46,151, 67, 46,151, 67,161, 80, 64,161, 80,192, 68, 10,106,219,
-172,122,178,153, 59,178,101, 95, 47,221, 22,184,111,235,178,171,117,235,242,223, 38, 38, 38,102, 87,247, 94, 80, 94,187, 6,147,
-135, 15,129, 50,207,174,161, 48, 87,212,134,191,191,127, 85,138, 20, 68, 34, 17, 58,116,232, 80,165,189,218,181,107, 31, 23, 8,
- 4,239,188,153,178, 44, 43,245,247,247,231, 98, 98, 98, 20, 52, 77, 43,120,158,135,191,191, 63,199,178,172,212,198,198,230, 38,
-207,243,169,233,233,233,131,245,217,237, 10, 72,111, 2,131, 40,161,240,107,123, 7,135, 6, 62,141, 26,201, 47, 95,190,204, 0,
-128,147,147, 19, 73, 73, 73,201, 62,117,234, 84,158, 0,248,217,137,144,189,213, 32, 89,106, 0,243,105,154,222, 32,145, 72, 4,
-245,235,215,143, 95,178,100,201,173, 98,133, 20,132, 16,186,126,253,250,109,101, 50,153,147, 90,173,102, 81, 52,116,104, 84,179,
-254, 1, 32,132,120, 21,241,246, 82,104, 0,136, 75, 4,252,162,222, 14, 86,229,126, 7,128,244,226, 23, 69,219, 74,246, 51, 0,
- 60, 2,208, 12,128, 77,241,177,187, 20, 69,101,214, 32,155,149, 43, 90, 65, 65, 65,165,175,176,253,251,247, 47,237, 88, 76, 77,
- 77,113,247,238, 93, 80, 20, 5, 83, 83, 83,152,153,153,193,220,220, 28,185,185,185,120,244,232, 17,162,163,163,241,242,229, 75,
- 80, 20,133, 70,141, 26,161,228,102, 47,131,210, 6,238,183,159,130, 32, 53,145,128,162,128, 86,221, 60,224,209,165, 57,218,132,
-198,206,186,119,153,218,145,146,146,242, 20,128,160,121,243,230, 19,219,183,111,143,181,107,215, 66,173, 86,175,173,132,100,149,
-218,188,254,136,109, 13, 0,246,246,246,243,246,159,127, 46, 31,211,187,113, 97, 74, 74,202,143, 53, 40,156,119, 26,226,244,244,
-116,131,215,226,227,121, 30, 89, 89, 89,122,109,150, 87, 8,214,109,216, 92, 43, 47, 39, 21,223,253,176, 31, 58,157, 14,115,231,
-206, 5,207,243,165, 91,118,118,182, 65,249, 36, 28,247,190,118, 64, 23,141,158, 82, 2,160,222,240, 34, 94,145,112,112, 51, 40,
- 2, 80, 28,128,247,175,171,124, 39, 36,101, 68,178, 67,203,126,216, 88, 43, 44,250, 21, 78, 5,135, 65,155,155,132,148,135, 39,
-138, 36,199, 14, 35,113, 88,205,160,157, 71, 99,204, 94,188,218,226, 95,179,199, 30,210, 40,243, 92,240,238, 48,226,229,170, 31,
- 26, 14,223,173, 88,129, 29, 27,215, 98,245,218,141,200,205,201,134, 80,104, 85,220,208,115,224, 56, 78,255,181, 19,210,219,127,
-214,120,234,135,159,143,163,173,155, 61,142,157, 15, 69,167,150, 78, 56,113,241, 30,186,120, 53,192,169,203, 97,232,214,174, 49,
-206,134, 68, 98,246,228,145,212,200, 11,187,123, 87,167,142,214,175,223, 92, 43, 47, 55, 21, 65, 43,247,226,205,150, 45,136,159,
- 62, 29,109,139,211,132, 82, 20, 68,142,142,128,168,234, 58, 42,143,199,143, 31, 67,173, 86, 87,244,102, 14, 87, 87,215, 42,235,
- 93,169, 84,222,103, 89,150,164,166,166, 82,169,169,169, 80, 40, 20, 84, 84, 84, 36,231,238,222,124, 16,137, 62,250, 11, 0, 4,
- 4,172, 26,116,248,126, 46, 10,111,110,132,242,214, 38,136, 26,132,211, 59,150, 79,214, 78, 90,186,253,126,153,103,244,157,124,
-190,126,253,186,207,235,215,175, 1, 0, 13, 27, 54,140,142,137,137,105, 86, 50,212, 92, 60,132, 40, 98, 89,214,185,100, 56,145,
-101, 89,168,213,106,244,232,209,131,209,119,237, 22, 22, 22,237, 93, 93, 93, 17, 22, 22,134,141, 27, 55,214,246,245,245,197,179,
-103,207, 64, 81, 20, 86,173, 90, 69,185,185,185, 9,211,211,211,209,171, 87, 47, 28, 63,126,188, 67,110,110,110, 85,229,105,170,
- 80, 40,118,159, 62,125, 90, 74,211, 52,242,242,242,192,243, 60, 58,118,236, 8,154,166, 17, 25, 25,137,197,139, 23,227,248,241,
-227, 56,121,242,164,204,203,203,107,119, 97, 97,161, 43,222, 29,214,175,172,142,136, 74,165, 34, 18,137, 4, 18,137, 4, 82,169,
- 20, 82,169, 20, 98,177, 24,249, 42, 96,210,186,120, 53, 35,181,226,221, 91,118,106, 60,126,230, 42,250,199, 37, 19,174, 0, 56,
-101,232, 61, 15, 20,249,100,109,248,245,215,141,163,115,114,104, 0,216, 73, 81,188,150,144,213,134, 60,239, 0,144,175,202,129,
- 83, 35, 71, 28, 59,116, 18, 67,134, 15,172,144,100, 9,133, 34,136,132, 66,152,213, 86, 84,105, 83, 36, 18,217, 70, 71, 71, 91,
- 10,133, 66, 16, 66,192,113, 28,180, 90,109,234,191,254,245, 47,235,126,253,250,153,158, 59,119,142,238,215,175, 31,111, 97, 97,
- 81, 16, 26, 26,250,134,101, 89,203,206,157, 59, 87,106, 83, 14,120,168,204,155,108, 16, 51,172, 71,224,162,105,146,177, 99,199,
- 50,227,199,143, 71, 66, 66, 2, 38, 78,156,168,186,116,233,146,230,117, 74,202, 41, 49,207,111,214, 2,225,134,182,201,229,176,
-213,195,195,163,213,137, 19, 39, 38,248,251,251,223,155, 55,111,222,119,101, 15,174, 89,179,102,197,217,179,103,157, 6, 13, 26,
-180,239,225,195,135, 91,171,211, 46,125,104,223, 97,180,249, 97,168,140,139,148,136,163, 20, 69, 5,149,105,179,251,151,236,251,
-251,251, 47, 10, 8, 8,136,162, 40, 42,168,236,239, 37,233,138, 95, 22,131, 42,218, 47, 62,183,246,194,133, 11,155, 7, 6, 6,
-174,242,246,246, 62,120,243,230,205, 23, 0,170, 75,180,244,251,104,149, 92, 80,217,139, 44,215,169, 33, 55, 55, 23,185,185,185,
- 72, 76, 76,196,182,109,219,138, 31,104, 33, 4, 2, 1, 4, 2, 65,169, 63, 67,101, 8, 14,250,115, 19,128, 77,173, 90,181, 18,
- 70,220, 58,114,238,155, 29, 51,187,183,238,209,138,185, 31, 28, 49, 20, 69,235, 17,246, 25, 55,110,156, 21, 0,236,221,187, 55,
- 29,192,185,255, 16,107, 62,242,244,233,211,217,246,246,246,165, 62, 42,101,135, 15, 89,150,133, 84, 42, 69,137, 47,139, 74,165,
-194,182,109,219, 88, 66,200, 17, 61, 54, 17, 19,117, 5, 79,163,174, 22,157,199,243,224,185,183,231, 47, 91,182, 12,132,144,210,
-206,126, 74,177,114, 82, 37,201,171,168,204, 73,185,207,114,191, 19,142,171, 98,120, 66, 52,115,232,216,233,246, 60, 37,192,239,
- 87, 30, 64, 40, 20,130, 47,163,102, 10,153,162,183,229,168,103,201,112,176,117,199,167, 35, 39,219,157,216,183,121, 38,171, 85,
-253, 80,221,178,118,241,240,198,172,217,179,241,203,142, 29, 88,188,116, 69, 41, 3, 96, 57, 14,108,149,249,164,233, 30, 29,155,
-131,205, 79, 6,195, 48,232,214,182, 49, 24,134, 65, 79,239,166, 96, 24, 6,189, 58,186, 64, 32, 16,160,119, 39, 55, 52,105,210,
- 4, 2,129,128,174,162,222, 17, 19, 21,140,167, 81,127,148, 33,189, 4, 4,128, 54, 37,229,189,244,186,148, 20,144,122,150,213,
-189,183, 48,113,226,196,236,196,196, 68,109,249, 99,117,235,214, 21, 93,187,118,173, 86, 37,195,118,165,144,201,100, 94, 2,129,
-224,126,102,102, 38, 47,151,203,105,158,231,120,119,247,230,204,249,237,139, 78,148,164, 89,184,112,209,137,207,189,204, 6,237,
- 63, 18, 68, 68,245, 59, 81,148, 80,194,126,185,116,187, 72, 40,146,121, 1, 74, 67, 94, 30,104,181, 90,141, 39, 79,158,160,170,
-252, 16, 66,244, 14,211,100,101,101,141,115,117,117,189,182,105,211,166,218, 20, 69,225,250,245,235, 96, 24,166,116,139,141,141,
- 5, 77,211,248,230,155,111,180,185,185,185, 95, 84,149, 55,129, 64, 48,251,216,177, 99,230, 98,177, 24,121,121,121,165,207, 13,
-195, 48,136,142,142,198,143, 63,254,136,113,227,198, 33, 33, 33, 1, 14, 14, 14,152, 59,119,174, 73, 96, 96,224,108,173, 86,187,
-194,128, 42, 10,215,104, 52,173,229,114, 57,164, 82, 41, 74, 8, 23, 0, 92,140, 18, 70, 42,149,202, 22,150,150,133,118,214, 33,
- 65,191,119,240,253,212,211,210,218,222, 59, 37, 37,165, 90, 75,103, 61, 7,118,196,113,220,191,250,156, 56, 97,115,227,196, 9,
-254,246,233,211,175, 36,121,121,219, 13,190,135,116, 52,226, 99, 95,193,203,203, 11,247,239,223,135,151,151, 87, 89,210, 4,177,
- 88, 12,145, 72, 4,145, 72, 4, 43, 11,131, 92, 40, 8, 77,211,184,113,227, 6, 56,142,131, 70,163,129, 70,163,129,155,155, 91,
-230,213,171, 87, 77, 0, 32, 54, 54,150,140, 25, 51, 38,251,206,157, 59,104,217, 82,255,122,234, 42,138, 10, 94,182,234, 39,243,
- 31,214,239,134,121,109, 91,132,132,132,112,231,207,159,207,163,128,152,167, 81, 81,107, 63, 5,206, 30, 1,180,213, 41, 51, 91,
- 91,219,107, 12,195,212, 47,251, 91, 70, 70,134,197,224,193,131,145,149,149,213,119,240,224,193,157,138,219,132,164,163, 71,143,
-142, 1, 0,177, 88, 12,154,166, 57, 24,241, 95,133,170,184, 72, 89,162, 84,158,112, 5, 4, 4,244, 47,255, 91, 89, 82, 85,209,
-247,178,231, 6, 6, 6,174, 42, 99, 91, 89,131,236, 87,237,163, 21, 20, 20, 68, 42, 96,144, 6,163, 42,162, 85,130,176,176, 48,
-157,131,131,195, 47, 79, 31,188,236,222,216,163, 17,100, 10,201, 39, 0, 54, 73, 36,146, 57, 99,199,142,197,237,219,183, 17, 25,
- 25,185, 11, 31, 56, 11,167,121,243,230, 23, 36, 18,137, 83, 37,195, 36,241,145,145,145,189, 42,233, 24,150,158, 62,125, 26,250,
-156,225,175, 92,185, 82,182, 83, 42,235, 12, 95,241,141,193, 19,232,180, 58, 20, 20, 42,223,118,226,197, 68,171,160,160, 0,195,
-135, 15,127, 71,209,122,243,230, 77,149,215, 71, 81, 20,126, 60,117, 10,151,142, 28, 65, 95, 79, 79, 28, 15, 13, 69,224,216, 81,
-112,113,170, 3,194, 81, 32, 20,144,112, 96, 51, 50,114,243,241, 91,240, 13,100,230, 21, 98,116,231,206,112, 54,179,210,111, 87,
- 40,234,217,182,189,183,232,242,205, 71, 16, 10, 5,160,193,131,232, 10,225,224,218, 21, 12, 77,195,220,182, 1, 68, 66, 33,132,
- 66, 1, 98, 19,211,225,218,188,141, 56, 72, 44,237, 89, 19,162, 85,215,169, 1, 56,142,195,184,113,227,112,240,224, 65, 88,218,
- 57,193,188,110,115,124,191,118, 7,250,246,232, 92,229,245,151,188,193, 11, 4, 2, 48, 12,243,222,103,201,119, 67,212, 73,194,
- 19,104,203,215, 17, 79, 0, 66,224,184,114, 37, 28, 87,174, 68,104,241,127,186, 21, 20, 64,169, 84, 2,237,220,171, 69,178, 52,
- 26, 13, 18, 19, 19,181,175, 95,191,182,173,224,120,170, 70,163,169,146,216,236,217,179, 39,220,207,207,175,117,237,218,181,239,
-133, 63,124,168,243,240,244, 20,158,219,182,232,100,201,176, 33, 0,120,122,122,102, 46, 90,180,232,228,152, 97,253, 7,110,245,
- 31,193, 77, 93,177, 79, 32,145,201, 90,247,159,183, 39,252,192,176, 97, 85,143,205,168,213,113, 30, 30, 30,196,144,235, 42, 44,
- 44,124,173,231,240, 0, 0,203, 91,181,106,101,230,235,235,139,107,215,174, 97,200,144, 33,106,173, 86,251, 20, 0,250,245,235,
-215,244,183,223,126, 19, 63,122,244, 8,214,214,214,194,248,248,248,221,168,194, 65, 94, 44, 22,119,109,211,166, 13,173, 86,171,
-223, 35, 89,129,129,129, 24, 57,114, 36,154, 54,109, 10,158,231,145,159,159, 15, 95, 95, 95,225,198,141, 27,187, 26, 72,180,102,
-185,184,184,252,136,162, 89,135,101,219,194,199,197, 67, 80,200,200,200,120,253,224, 78,112, 84,231, 30,131, 91,215,111,210,220,
- 62, 50,252,190, 94,131, 54, 54, 54, 11,105,154,254,156,231,121, 38, 55, 55, 55,241,129, 70,211,196,205,201,201,182,227,192,129,
-200, 17, 10,153, 13,193,193,116,106, 94,158, 9, 0,131,134, 32, 85,186, 2, 56, 53, 42,114,245, 27, 50,124, 32,238,223,191,143,
-161, 35, 6, 65, 36, 18, 65, 32, 16, 22, 61,155,162, 34, 69,171,150,149,153, 65,247,166, 78,167, 43,109,195, 75,252,188,180, 90,
- 45, 74, 92,179,228,114,121,233, 49,181, 90, 13,138,162,244,221, 27,180,111,151,142,184, 25, 22,195,126,241,205, 6,181, 48,227,
-126,160, 29,207,239,121, 5,164,126, 64,115,238,124,120,197, 18, 27,153,153, 57, 56,157, 14,238, 3,135,150, 62, 39,119,118,110,
-149,129,231,101,217,241,113,152,113,228,244,199, 94, 51,215,136,255, 0,170,226, 34,101,137,210,135,130,162,168, 32,127,127,255,
- 69, 0,136,191,191,255,162,146,253,128,128, 0, 37,128,164, 26,146,173,247, 84, 46,193,199, 32, 89, 37,195, 11,250,224,235,235,
- 59,195,212,212,116, 99,201,126,226,237, 36, 36,222, 78,130,107, 51,247,142,173, 60, 91,231,140, 28, 57, 18,150,150,150,152, 55,
-111, 30, 1,176,171,186,255, 31, 27, 19,101, 2,128,216,219,219,207, 43,110,144, 61, 67, 67, 67,173,239,222,189,139, 54,109,218,
-188,149,238,181, 90,116,234,212, 73,159,169,188, 98,167,246,175, 63,158, 74,198, 67,171,213,162,176, 80, 9,141, 70, 11, 86,199,
-131,101, 89,120,185,155, 98,223, 14,255,162,223,216, 18,245,172, 72, 53,115,180, 51,133,169,137, 80, 71,211,148,242, 94,248,235,
- 10, 91, 76,141, 70,131,240,248,120, 60,124,249, 18, 0,240,105,128,126,199,215,125,193,215,224,230,230, 86, 85,110, 27, 59, 58,
-216, 33,249, 82,120, 81,227,173, 76,196,221, 63, 15,195,212,212, 4, 0,224,238, 51, 26, 34, 81, 17,209, 42, 80,106, 97,213,172,
- 46, 40, 66, 42, 13, 11, 32,183,176,187, 32, 16, 73,157, 8,199,131, 16, 30,132,231, 64, 8, 15, 70, 40,146,207,152, 50, 1, 60,
-207,161,109,219,182,160, 24, 6,156, 78,141, 97, 3,122, 34, 43, 39, 15,150,181, 12,235, 36, 68, 34, 17,124,124,124,100,149, 29,
-127,246,236,153,178, 44, 49,211, 95, 71, 58, 20, 20, 40,161, 86,171,161,213,176,208,234, 88,112, 13, 69,248,238, 95,163,192,106,
- 89, 20,142,240,134, 86,199,130,159, 61, 8, 90,141, 14, 9,114,154,246,112,181,210,209,160,148, 15, 30,167,153, 85, 69,180, 74,
-200, 65,101,168,200, 39,176, 18,178,245,208,207,207,207,203,195,211,243,254,231, 61, 60,127,138,136,140, 74,142,136,140,122, 47,
-157, 83, 83,207,184,169,129, 7,231, 10, 69, 50,175,254,243,244,207, 58, 44,139,178,195,136, 31,136, 69,121,121,121, 30, 38, 38,
- 38,136,137,137, 1,195, 48,160, 40,234, 25, 0, 15, 0,176,183,183,127, 46, 16, 8, 26, 49, 12,131, 45, 91,182, 80, 2,129,160,
-133,183,183,247, 34,149, 74,117, 88,207, 11,157,171,169,169,233, 59,106,150, 72, 36,130,191,191, 63,198,140, 25, 83, 74,178, 68,
- 34, 17,246,236,217,131,214,173, 91, 67,163,209,184, 26,152,223,187, 0, 58, 27,160,248, 81,197,228,188, 74, 50,202,178,172, 95,
-198,231,159, 55, 65, 72, 8, 58, 54,106,228,230,229,229, 5,173,246,173,160,211,168, 81,163,186,121,121,121,175,149, 74,229,191,
- 81, 20,134,224,129, 94, 82,164,226, 17, 31, 91,228,126,122,255,254,125,180,109,219,182, 84,193, 42,171,102,137, 68, 34,200,196,
- 38,213, 34, 90, 60, 95,212, 46,229,229,229,209, 33, 33, 33, 86, 46, 46, 46, 20, 0,184,184,184, 80, 15, 30, 60,168, 45,151,203,
-211, 27, 55,110, 92,213, 11,176, 8, 0,186,126, 50, 88,112,233,252, 89, 5, 11,172,120,205, 48, 43, 4, 85,182,145, 68,199,241,
-124,165, 78,247, 50, 51,115,236,241, 27, 14, 0,248,182, 71,239,210,151,173,243,203, 23, 65, 40, 20,162,251,188, 69,239, 61, 75,
- 60,207, 51, 48,226, 31, 69,178, 42, 82,180, 62,172,111,126,171,104, 5, 4, 4, 68, 5, 4, 4,188,167,142, 85, 19, 85, 43, 90,
-101,165,187,234,162,228, 97,173, 12,107,215,174, 69,139, 22, 45,244,118, 68, 27, 55,110,196,254,253,251,215, 2,136,173,182,228,
-216,189,149, 59,214,157,136,106,212,212,157, 2,128, 21,179, 7,208, 5, 5, 5,184,113,227, 6,204,205,205,241,236,153,193, 97,
-191, 76,205,205,205,151,211, 52, 61,140, 41, 63, 3,160, 98,130,201,241, 60,127, 36, 39, 39,167,210,240, 14,132, 0, 90, 29,139,
-130, 66, 21, 52, 26, 13,102,127,179,185,202, 76, 4, 0,148, 86,147, 39,240,233,226, 45,171, 76,209,105,219,162, 43,166,141, 53,
-121,175,243,102,104,128,166,129,150,109,139, 20,151, 7,161, 81,224,121,128,227, 1, 43, 27, 11,236, 58,240,147, 94,146,207,114,
-124,241,219, 49,135,124, 53, 7,215,246,253,241,234,113, 72,169,130, 36, 22, 21, 13, 25,139,132, 66,240,132, 42,138,250, 80, 89,
-171, 43,150, 57,101,165,196, 58,239, 8,138,192,164,254, 45,112,244,114, 56,134,246,240,192,213, 59,143,224,219,206, 13, 81, 79,
- 95,194,221,185, 62,182,236, 62, 2, 66,144,247,243,186,239, 95,191,237,208,216,120, 67, 20,173,219,183,111, 43,203,171, 88,101,
- 63, 73,213,253, 33, 8,121,171,104, 41, 85,106,204, 91,104, 80,232,157,162, 58,234,220, 94,102, 72, 98,125,138,149, 33, 68,172,
-188,178,133, 42,194,179, 52, 4,208, 26, 88,240,159,108, 56, 57,142,195,153, 51,103, 74,235,163,162,122, 44, 91,119, 6,144, 28,
-196,199,199, 35, 42, 42, 10,237,219,183, 71, 78, 78, 14,132, 52,141,185, 17, 17,112, 27, 59, 22, 26,145, 8, 60,207, 67, 44, 22,
- 99,242,228,201, 6,151,103, 53, 91,231, 98,199,107,174, 42,227, 63,121,123,123, 55,137, 41, 40, 64, 84,116, 52,122, 44, 91, 6,
- 0, 56,123,246,236, 59,247,196,156, 57,115,196,143, 30, 61,154,120,239,222,189,137,201,201,201,107, 1,204,173,180,157, 37,234,
- 82, 31,173,207, 71, 13, 65, 19,151,134,216,255,235,129,210,227,115,230,207,130, 80, 40,130, 80, 36, 68, 45,243, 90, 6, 93,141,
- 78,167, 43, 37,173,133,133,133,244,217,179,103, 29,123,246,236, 41,154, 53,107, 22, 5, 0,251,247,239,167, 55,109,218,164,184,
-116,233,146,168, 78,157, 58, 41, 85, 40, 4,185, 73, 25,106, 9, 0,212,171, 87, 15,155,183,255, 78,247,235,215, 15,179,102,205,
-130, 78,167,195,214,173, 69,207,213,200,145, 35,161,213,106,113,236,216,177,146,231, 88,175, 26,197,106,181,239,221, 55, 20, 69,
- 65, 40, 20, 66, 36, 22, 1, 60, 15,138,162, 20,107,214,172, 89, 17, 21, 21,213,198,197,197, 5,106,181,122, 44,138, 38,127, 24,
-227,104,253,151,145, 45,125, 92,164, 34, 95,171, 98, 85,170, 50,164,149,245,219,170,140,168,149,245,217, 66,205, 38, 80, 24,230,
-163, 85, 17, 24,134,169, 82,173, 42,153,170,171, 15,115,230,204,129,169,169,105,101, 29, 16,137,136,136,120,148,146,146,178, 3,
-192,230, 26, 85, 78,112, 88,212,242,175, 7,229,161,120,108,181, 86,173, 90,233,221,186,117,203, 7,160, 61,124,248,221, 23,100,
-181, 90, 93,105, 7,110,110,110,190,124,231,206,157, 51, 7, 14, 28, 72,151, 15, 49, 80,118,120,175,100,211,233,116, 56,124,248,
-240,204, 5, 11, 22, 32, 39, 39,231,107,125,157,120, 97,129, 18,202, 98, 71,232,231,145, 71, 13,109,212, 43, 61,100, 82,203, 30,
-142, 13, 61, 42,237, 76,104, 81,145, 15,145,109,189,183, 29,152,169,169, 20,156, 30,155, 20, 69,199,190, 76, 72,174, 83,215,174,
- 54,158, 39,166,193,182,126, 11,100, 37,189, 45, 7,129,128,129,176,120,232,176,150,153, 2,105,111,222,128,166, 25,189,196,248,
-251,223,194,112, 39,242, 37,142, 93,126, 0,173,170, 0,235,246,158,135, 86,157, 15,173,170, 0, 90, 85,209,231,170, 5, 95,130,
-162,240, 90,167, 46,104, 90,157,122, 23, 8, 4,104,215,174, 93,165, 68, 39, 41, 41,201, 64, 69,139,148, 42, 90, 74, 85, 53,235,
-200,176, 55, 39,189,138, 85,201,241,154, 18,131,146,144, 15, 50,153,172,245,158, 61,149,135,113,168, 8,118,118,118,231, 76, 76,
- 76, 26, 24,154,190, 26,193, 75, 87,213,170, 85,107,185,139,139,139,235,186,117,235,132, 12,195,160,123,247,238, 77,237,236,236,
-226, 1,192,221,221,221,161,164,141,153, 58,117, 42,185,125,251,118,100,209, 59, 70,229, 16,139,197,209,230,230,230,173,125,125,
-125,145,147,147,131,196,196, 68, 40, 20, 10,184,253,244, 19, 34,166, 78,133,231,182,109,160,187,117, 3, 69, 81, 16,139,197,136,
-136,136,128, 76, 38,139, 86,169, 42, 13,249,214, 14,192,106, 0, 29,241,118,184,144, 0,184,129,162,176, 11,119, 42,104,239,104,
- 0,224,120,190,170,202, 26, 53,111,222, 60,100, 11,133, 64,191,126, 16,197,198, 66,171,213,162,125,251,246,165, 42,123,251,246,
-237, 33, 16, 8,224,225,225, 1, 7, 7, 7,108,217,178,101,148, 62,162,165,202,215, 34, 62,246, 21,188,189,189, 75,149,171,126,
-253,250,149, 42, 90, 66,161,176, 84,217,162,184,170,137, 43, 69, 81,164,236, 75, 50,199,113,148, 64, 32, 16,124,253,245,215,212,
-144, 33, 67,136, 70,163,225,197, 98, 49,125,236,216, 49,234,234,213,171,130,130,130,130,170,212,134,130, 17, 35, 70,216,212,173,
-235,136,196,231, 81, 56,122,148, 96,237,218,181,184,118,173, 40,202, 70, 76, 76,209,196,213,146,125, 95, 95, 95, 52,104,208, 0,
-164,138, 27,185,181, 22,192, 0, 0, 32, 0, 73, 68, 65, 84,191,249,160, 97,248,182,103,159,162,246,164,129, 53,132, 34, 33,196,
- 34, 17,230, 69,191, 42,173,107,179, 61, 7,197,129,129,129, 67, 93, 92, 92,138,134,246, 1,129, 49,142,214,127, 23,170, 16,122,
-210,202,145, 36, 77,153,253, 52, 0, 84,241,126, 90, 25, 66,149, 70, 81,212, 93, 66, 72,155,114,105, 75,142,107,202,125,150, 28,
-127, 88,131,236,151,172,117,248, 30,249,210,247, 70,252,244,214,173, 91,206, 94, 94, 94, 72, 72, 72,120,111, 38, 92, 73,199,165,
- 80, 40, 32,147,201,112,243,230, 77, 0,120, 90,153,177,171, 87,175,110, 66, 81,212,101, 20, 15, 27,120,251,126,222,245,102,219,
-222,109,240, 91,192,129,156,148,148, 20, 15,188,141,161, 67, 57, 56, 56,140, 17,138, 5,195, 27, 53,175,231, 3,158, 95, 29,124,
-250,198, 50,125, 87,216,168,169,123, 62, 0,101,201,172,195, 26,206, 62, 4, 77,211,195, 6, 14, 28, 72, 63,122,244, 8,195,135,
- 15,199,254,253,251, 43, 77, 59,102,204, 24, 28, 60,120, 16, 3, 7, 14,164, 23, 46, 92, 88,105,120,135,119,213, 18,205, 71,187,
- 41, 99,158, 61,196,190,131, 59, 43,245, 65,178,177, 41,242,199,122,243, 38,189,244,183, 54, 94,250, 71, 70,120, 86,115, 41,236,
- 94,168,119,135, 46,221, 69,137,169,217,224, 89, 53, 84,121,111,207, 47,204, 78, 5, 97, 85, 16,201,107,195,206,202, 28,247,111,
- 93,212,104, 53,170, 75,250,108,206, 28,232,142,169, 3, 92, 1,194, 99,208,220, 93, 8,218, 60,163,244, 13,186,211,144, 89, 8,
- 62,188,193, 96, 31,191,242, 16, 10,133,136,136,136, 80, 86,166,102, 49, 12, 99, 72, 76,174, 98,213, 81,135,194, 66, 37, 10,149,
-170,143,217,118, 88,219,218,218,254,108, 97, 97, 33,173,132, 72, 89, 91, 91, 91,255,108,105,105, 41, 53,116,232,176, 50,146, 85,
- 28, 87,235,158,159,159, 95,181,200,150, 68, 34,105,240,244,233,211,210, 96,165,250, 62, 53, 26, 13,124,125,125, 13, 13, 94,122,
- 26,192, 11,123,123,251, 27,110,110,110,230,207,159, 63,199,129, 3, 7, 68, 66,161,176, 94, 73,251,145,151,151, 7,134, 97,240,
-230,205, 27, 29,128, 9,168, 98,232, 76,173, 86,135,132,132,132,180, 28, 48, 96, 0, 19, 29, 29, 13,134, 97,138,242,229,237, 13,
-207,109,219, 16,249,245,215,240,121,249, 18, 42,173, 22, 82,169, 20, 23, 46, 92,208, 22, 22, 22,134, 84,102, 79, 38,147,237,136,
-139,139,115,151, 74,165,208,106,181,224,121, 30, 52, 77, 83, 2,129,160, 83,173, 90,181, 54, 2,104, 83,174,178,108, 60,219,248,
- 54,227, 88,150, 75, 73,120,158, 86, 85, 1,100,100,100,224,244,233,211,104,223,190, 61,124,124,124,144,148,148,132,216,216, 88,
-244,237,219,183, 52,205,195,135, 15, 17, 22, 22,134,198,141, 27, 87,173,232,209, 58, 52,110,214, 0, 34,145,168, 72,205, 17,138,
-138, 95,124,132,165, 74,150, 72, 40,130, 80, 32,132, 84, 38, 53, 88,209,162, 40, 10, 52, 77,131,162, 40,200,100,178,146,151,108,
-222,209,209, 49, 37, 51, 51,211, 30, 0, 35,147,201,192,113,156,222,151, 22,158, 16,103, 81,250,205,228,185, 11,126,180, 9, 8,
-184,140,203,151,223,128,166,105,216,219,219,131,166,105,196,197,197,129,166,105, 56, 57, 57,129,166,105, 36, 37, 37,149,144,196,
- 44, 84, 78,134, 75,159, 27,138,162, 74, 73,150, 72, 44, 42, 85,182, 0, 32, 59, 59, 91, 53,112,224,192,127,171,213,234,241,168,
-217,170, 39, 70,252,141, 65, 81,212,221,255,196,185,213, 64,191, 98, 98,245,158, 83,188,190,155,177,111,135, 14, 29,182,141, 28,
- 57,178,251,250,245,235, 97, 98, 98,130,148,148,148,210, 14, 81, 44, 22,163,110,221,186,200,204,204,196,246,237,219,241,234,213,
-171, 43, 0, 38, 27,154,163,148,148,148,219,207, 30, 60,205,240, 29,218,193,210,189, 67,179, 90,137, 79, 95,181, 79, 73, 73,185,
- 89, 76,178,118,141,156,211,119,188,239,224,182, 16,137,133, 72,124,246, 26,193,167,111,252,191, 84, 38,195, 48, 12, 69, 81, 24,
- 62,124,184, 65,233, 71,140, 24,129,144,144, 16,232, 27,102,228, 75, 20,173, 66, 21, 10,148, 31,239,197,106,218,140, 49,152, 54,
- 99, 76, 41,153, 48,100,232, 5, 0, 28, 28, 14,233, 33, 90,218,245, 65,135,182, 79,106,213,214,219,169,181,123, 3,220,185,247,
- 0,191,109,123, 43, 50,236,222,180, 2, 63,236,190,130,186,182, 22,208,170, 11,112,238,232, 47,175,181,234,194,245, 53, 20,229,
-138,200, 45, 69,129, 16,190, 90,215, 94, 66,158,132, 66, 33,154, 55,111, 94,169,162,149,153,153,169,172, 74,205, 42,173, 35,141,
- 14,249, 5, 74, 40, 11, 63, 26,209,242,236,212,169,211,165, 35, 71,142, 88,218,216,216, 32, 57, 57,185, 60,209,242,236,216,177,
-227,165, 35, 71,142, 88,218,218,218, 34, 49, 49,209,224,176, 34, 21,144, 44,164,165,165, 81, 89, 89, 89,188,133,133, 69,181,200,
- 22, 77,211, 80,171,213,120,252,248,177,161,127,107,240,108, 46,115,115,243, 61, 7, 15, 30, 52, 79, 79, 79, 7,195, 48,120,252,
-248,241, 59,179, 14, 75,182, 93,187,118,137, 6, 13, 26,180, 51, 59, 59, 91,239,180, 54,150,101,215,142, 25, 51,102, 98, 82, 82,
-146,133,141,141, 13, 82, 82, 82, 32, 22,139, 65, 8, 1,229,235,139,206, 47, 94, 64,203,113,144,201,100,136,137,137,193,142, 29,
- 59, 10,138, 67,197, 84, 40,144, 81, 20,229, 44, 18,137, 48,122,244,232,119, 14,236,221,187, 23,159,182,102, 90, 91,155, 11,242,
- 89, 72,213,169,178, 62,231, 24,134,161, 60,219,117,107,218,174, 75,191,230, 79, 34,239, 60, 79, 75,125, 85, 85,163,164,211,104,
- 52,112,113,113,193,221,187,119,113,249,242,101,116,235,214, 13, 62, 62, 62, 8, 15, 15,199,197,139, 23, 17, 22, 22, 6,138,162,
- 96,105,105, 89,226,126,161,215, 7, 67, 83,200,226, 77,114,198,123,234, 85,249,125,145, 72, 4,181,210,176,201,125,209,209,209,
-184,123,247,110,105,104, 25,134, 97,216,177, 99,199,130, 16, 66,226,226,226, 96,106,106, 74,252,252,252, 56,129, 64,192, 38, 37,
- 25,230, 31,108, 98, 98, 2,103,103,231,119, 94,124, 74,182,206,157, 59,227,222,189,123,160,105, 26, 2,129, 0, 54, 54, 54,184,
-113,227, 70,149, 55,126, 9,169, 42, 33, 89, 2,145,240, 29,210,199,243,124, 94,120,120,248, 36, 0,225,197, 74, 22, 96,140,163,
-101,196,255, 31,206,224,253,133,165,171, 84,180, 94, 0,232,113,224,192,129, 81, 39, 79,158, 92,187,113,227, 70,235,254,253,251,
- 35, 43, 43, 11, 78, 78, 78,176,183,183, 71, 80, 80, 16,206,158, 61,155,206,113,220, 92, 0, 21, 73, 63, 61,160, 39,102, 77,210,
-243,148, 35,234,252,252,169, 94, 62,174,184,114,248,122,128,157,157,221,100,134, 97,102,251, 45,250,108,124,215,129,109, 16, 19,
- 22,135,219, 23, 35,144,154,144, 94,165,205,242,206,240,181,106,213,154, 40,151,203,197,168, 96, 42,113, 5,179, 14, 75,109,114,
- 28,199,105, 52, 26, 28, 58,116,200, 32,178,117,224,192, 1,168, 84, 42,112,239,143,175,150,218, 36, 60,161, 4, 66, 9, 28,234,
-186, 64,171, 45, 0,207,215,120, 66,101,169,205,146, 55,208,231, 98, 49,108,210,211,113,231,206, 29,195, 40,119,191,126, 85,213,
-145, 74,163,202, 27,189, 97,229,188,160,233,254,171,107,117,235,208, 18,223,254,180, 23, 90,237,110,208, 12, 13,153, 68, 4,175,
-182, 29,193, 64,141,159, 3,231,103, 23,230,102,141,198,251, 75,241,188, 99,147,232, 27, 97, 33, 0,199,243,184,124, 45,212,224,
-107, 47, 51,204, 1,129, 64,128,103,207,158, 41, 43,154,109,200, 48, 69,195,156, 37,111,234,250,108, 18,158,167,132, 34, 41,234,
- 58,185, 65,163,206,255, 40,117,100, 99, 99, 51,255,196,137, 19,150, 37,161, 18,194,195,195, 65, 81,212,227,183,138, 99,209,113,
-165, 82,137,200,200, 72,132,135,135, 3, 69, 51,220, 12,126,142, 74,148,172,180,180, 52, 42, 37, 37, 5,114,185,156, 14, 15, 15,
- 87,123,120,120,220,171,226,249, 46,181,169, 82,169, 94, 86,230, 63,169, 82,169,234, 72,165, 82, 97,185, 14,207,161, 73,147, 38,
- 49, 21, 12, 33,190,151,207,156,156,156, 59, 11, 22, 44,240,234,221,187, 55,230,207,159,159,105, 97, 97, 97,250,243,207, 63, 11,
- 24,134,161,166, 79,159,206,189,121,243, 38,255,151, 95,126, 49, 63,121,242, 36,178,179,179,111, 26,112,237,121, 42,149,106, 82,
-135, 14, 29,246,158, 63,127, 94,238,236,236,140,220,220, 92, 16, 66,176,103,207, 30, 76,159, 62, 29, 82,169, 20, 49, 49, 49,248,
-244,211, 79, 11, 11, 11, 11, 39,225,125,223,201, 18,155, 20, 69, 81,132,231,121, 44, 89,178,164, 52, 56,105, 73,176, 82, 83, 25,
-133, 29,115, 26, 42,102,253,146,163, 24,245,237, 47, 99, 1,128, 99, 89,238, 73,228,157,231,123, 54,127,123, 85, 36, 18, 93,171,
-162,142, 22,207,154, 53,235,231,126,253,250,201, 76, 76, 76,144,153,153,137, 27, 55,110,224,214,173, 91,184,125,251, 54, 52, 26,
- 13, 44, 45, 45, 97, 97, 97,129,148,148, 20, 68, 71, 71, 43, 1, 44,214,103, 83, 44, 23,162, 81,211,146,153,191, 69, 10,150,176,
-204,108,195,178,234,150, 72, 40, 52,232, 57,234,210,165, 11,218,181,107, 87, 66, 86,184,248,248,248, 20,181, 90, 77,149, 33,253,
- 73, 37,132,188, 94,189,122,236,254,253,251, 73, 85, 54,121,158,127,143, 76,119,238,220,185,244,165,176, 93,187,118, 96, 24, 6,
- 15, 30, 60,168,204, 53,229, 29,155,183,119,108,193,249,239, 22, 67, 44, 18, 97,238,227,196, 82,210,181,183, 91, 43, 8,197, 34,
-184, 14, 24, 82,246,220,173, 40, 26, 46, 68, 57,146,165,175, 63,250,224,231,221,104,243,127, 30, 41,168,193, 18, 60, 37,248, 77,
-165, 82,157,251,242,203, 47, 3, 61, 61, 61,191, 92,183,110, 29, 37, 18,137,176,108,217, 50,146,156,156,252,107,241, 27, 67, 86,
- 77,114, 69, 8,249,245,143,227, 55,167,140,243, 31, 72,205, 89,239,215,233, 94,112,100,116,139, 14,206,104,209,193, 25,247,174,
- 60,194,230, 69, 7,246,115, 58,110,201,235,215,175, 19,170, 48,165,238,209,177, 89,121,103,120,203,144,171,193,150,213,157,117,
-200,243,252,145, 3, 7, 14,204, 28, 60,120, 48, 29, 26, 26,250,158, 79, 86,201,178, 59, 60,207,227,210,165, 75,208,106,181,248,
-245,215, 95,121,158,231, 43,143,163, 5,114,106,195,250,192,113,191,238, 59, 37, 22,139, 40,220,186,118, 12, 57, 89,250,103,117,
-137, 68, 66,236,218,115, 92, 43, 18, 9,159, 84,116, 92,171,213, 38, 6, 7, 7,219,246,226, 56, 33, 77,211, 21, 17,168, 10,113,
-228,200, 17, 29,207,243,241, 85, 36,187,153,250, 42, 97,192,247,243, 39, 28,232,247,249,151,182, 29, 58,116, 18, 90,217,216,130,
-162, 40,188, 73,125,131,152,200, 80,221,185, 99, 59, 83, 11, 10, 13, 91,130,103,194,143,127,148,250,100, 1, 64,255,233, 27, 75,
-253,179, 0, 96,128,223, 2,248,182,119, 7,101,136,244,244,150,100,241, 44,203, 66,161, 80,128,101,217, 10, 67, 60,152,155,155,
-203, 84, 42,149,178, 56, 16,163,222, 55,102, 2,124,244, 58,226, 56,206, 53, 43, 43, 11, 5, 5, 5,184,117,235, 22, 89,185,114,
-101, 90, 90, 90, 90,169,211,166, 78,167,115,205,204,204, 68,126,126, 62,110,222,188, 73, 2, 3, 3,211, 50, 50, 50, 22, 85,231,
- 25,146,201,100,173, 5, 2,193,189,172,172, 44, 94, 46,151,211, 58,157, 78,231,225,225, 33,145,201,100, 6, 47,168,158,146,146,
-210,187,178, 99,141, 26, 53,122,250,244,233,211, 38, 28,199,149, 93, 3, 81,164, 82,169,156, 59,116,232, 96, 72,251, 49,107,247,
-238,221, 56,126,252,120,219,220,220,220, 49,241,241,241,123, 1,180, 21, 8, 4,120,240,224,193, 99,149, 74, 53,114,240,224,193,
-123,178,178,178,238,160,104, 9, 30, 67,112, 62, 38, 38,102,180,171,171,235,238,229,203,151,155,248,248,248, 8, 28, 28, 28,208,
-166, 77, 27,196,196,196,224,204,153, 51,186,173, 91,183, 22, 20, 22, 22, 78, 0,112, 73,127,181,131, 98, 89, 22, 98,177,184,116,
-147, 72, 36, 16,137, 68,200, 83, 18,124,241, 83,172,146,133, 76,185,118,217,164, 51, 4,160, 94, 39,198,166,191,121,157,120,135,
-162,168,107, 41, 41, 41, 57,149,148,153, 88,165, 82,181, 36,132, 48, 20, 69,173,215,106,181,126, 51,102,204,176, 95,181,106, 21,
-154, 53,107,134,244,244,116, 40, 20, 10, 56, 59, 59, 35, 45, 45, 13,161,161,161, 92, 97, 97,225, 54, 0, 43, 80,236, 63, 82, 25,
-178,211,115,225,104, 87,239, 29,229,147, 16, 2,194, 1, 58, 53, 7, 78, 75,160,161,116, 16, 10,117, 16,137, 68,134, 12,169, 16,
-158,231,145,101,111, 15, 62, 50, 18,183,111,223, 6, 33,164, 82, 85,205,197,197,197, 32,133,148,227,184,247,136,214,157, 59,119,
-192, 48, 12, 58,117,234,132,176,176,176, 82, 69,203, 32,191, 68,194, 67, 44, 17,191, 51, 92, 72, 81, 20, 68, 98, 49,132, 98, 81,
- 69,179,113,140, 42,150, 17,127, 27, 24, 58,142,157, 13, 96,242,195,135, 15,247,118,237,218, 53,136, 16, 34, 68,209,120,228,245,
- 15,249,243,215,175, 95,223,191,121,230,254, 66, 91, 71,139,192, 62, 99, 58,161, 89, 75, 39,112, 44,135, 27,103, 31,224,215, 85,
- 39, 15, 38, 37, 38,249,193,128,181,207,120,158,191,218,177,117, 51, 26,101, 98,117, 59, 56, 56,240, 53,153,117,152,147,147,179,
-116,238,220,185,152, 63,127,126, 77,102, 29, 86,136,136,232,180,201, 20,136,227,128, 62,157,123,129,162,137, 70,163,214,211,240,
-161, 52,114,169, 72, 36,124,114, 55, 60,197,163,162,116,105,105,105,189,198,143, 31,127, 73, 32, 16, 52,168, 78,153,243, 60, 31,
-159,154,154,218,189,234,148,236, 13,181, 50,215,249,244,193,237, 95,159, 63,190,187, 23,207,115,141, 41, 0,140, 64,244, 92,167,
-213, 94, 80, 43,115,215,193,192, 69,165,215, 76,246,198,172, 13, 23,177,101,254, 0,204, 8, 60,140,157, 75,190,192,194,159, 14,
- 96,245,252, 89, 88,185,241,223,248,118,214,104, 12, 29, 53,158, 39, 20,253,167,161,215,193, 48,204,249,237,219,183,143,251,226,
-139, 47, 74, 39, 45, 16, 66,222,105,132,117, 58,157,146,231,121,108,219,182,141, 7,112, 94,159,189,119,235,136, 34,250,252,165,
- 12,173,163,220,220,220, 9,222,222,222,123, 0, 72, 8, 33,207,178,178,178,190, 2,222, 46, 13,149,159,159, 63,161, 67,135, 14,
-123, 8, 33, 18,138,162,222, 59,110, 8,138, 67, 61,180,182,176,176,184, 87,172,100, 73,106,226, 16,175,175,168,245, 12, 43, 26,
- 50,132,248,127,236, 93,119, 92, 20, 87,219, 61, 51,219,151, 93,202,210, 89,138, 2,138,130,162, 66,108,216, 91, 36, 42,214,136,
-198, 40,150,152,152,188,182,168, 73, 4,163,177,151, 36,182,168, 49,106,236, 70, 99,195,168,136, 53, 88, 18,141,177,128,136,160,
-210,123, 91,150,178,192,246,157,153,239, 15, 74, 16, 41,139, 38,239,151, 55,217,243,251, 45,187,195,204,156,189,247,238,157,185,
-103,158,251,220,231,161, 1,204,173, 19,241,125, 93,247,238,221,235, 38,149, 78, 40, 41, 41,233,250, 10,229,186,170, 82,169, 58,
- 46, 91,182,108,129, 64, 32, 24,168, 84, 42,219, 1,128, 72, 36,122,174,209,104,174,171, 84,170, 45,104, 62, 54,149,150,166,233,
-231, 6,131,193,215,206,206,174,106, 69,109,181,216, 2,128,115, 15,168, 7, 0,213,173,202, 40,126,212,232,130, 69, 70, 70,182,
-150, 72, 36, 67, 9,130, 24,207, 48,140,119,121,121,185,102,217,178,101,119, 78,158, 60, 89,230,238,238, 62,108,196,136, 17,132,
-181,181, 53,238,223,191,207,200,229,242,211, 0,150,192,136,149,214, 52, 77,103,124,253,245,215,104,233,245,222,212,126,157, 78,
-151, 31, 25, 25,105,251, 86, 97, 33,155,166,105,140, 28, 57,242, 5, 1, 87, 31,207,158, 61,131, 70,163,105, 54,152, 99,105,105,
- 41,186,119,239,254,194, 3,106,205, 43, 35, 35, 3,214,214,214, 47,124, 79,115,207, 88,154,178, 18, 12, 90,176, 24,168, 94, 81,
- 90,131, 42, 75, 22, 3, 70,107,210, 85, 38,252,125,241, 87, 39,223, 52,202,180,232,228,228, 52, 81, 32,226,207,110,213,206,169,
-115,110, 74, 97,124,121,153,242, 72, 94, 94,222,238, 70,110,228, 70,113,182, 48, 96,169,201,252,251, 23,113,254, 17, 71,139, 2,
-195, 80, 96,104, 6, 12, 67,131,166,169,170,132,215, 12, 13,134,162, 8,130,192,175, 90, 85,147,145,193,235,151, 83, 98,107,107,
-187,138, 97,152,183, 88, 44, 22, 89,247, 70, 93,247,115,181, 37,235,146, 76, 38,251,162, 1,203,235,255, 92,123,158, 60,121,178,
- 65,241,111,236,170,195,224,224, 96,170,133,215,230,117,145, 72,228,212,208,190,202,202,202,204,188,188,188,161,127,147,246,172,
-187, 98,176, 37,156, 45, 94,117,216, 28,103,171, 86,173,248, 58,157,206, 31,128, 23, 65, 16, 86, 0,138,117, 58,221,229,162,162,
-162, 2, 0, 93, 1, 44,171, 62,103, 53,128, 7,255,207,215,187,208,214,214,118, 63, 73,146, 46,198,156,108, 48, 24,180,197,197,
-197, 83,235, 61, 16,252, 49, 5, 15,176, 4, 92,238, 61,144,164,115, 67,215, 99, 99,159,193, 48, 57,149, 42, 85,119,226,143,123,
-126, 45,167,141,141,205, 3, 54,155,237, 98, 68,217,178,229,114,121, 87,211, 61,249,127,154,243,127, 25,245,157,224, 27,141, 20,
-255, 87, 8, 45, 19,167,137,211,196,105,226, 52,113,154, 56, 77,156, 38,206,127,186,208,106,112,219,180, 4,214, 4, 19, 76, 48,
-193, 4, 19, 76, 48,225,245,112,161,158,216,186, 80,243,129,104, 66,149,182,196, 36,248, 42,202,246,154,137,211,196,105,226, 52,
-113,154, 56, 77,156, 38,206,127, 29,167, 9,127, 34, 76,102, 85, 19,167,137,211,196,105,226, 52,113,154, 56, 77,156,255,116, 52,
- 58,117, 72,154,218,198, 4, 19, 76, 48,193, 4, 19, 76, 48,225,175,129,209, 66, 75,228,224,237, 99,219,170,243, 65,137, 75,167,
- 88,137, 75,167, 88,219, 86,157, 15,138, 28,188,125,254,165,237, 38, 4,240, 46,155,205,190,234,232,232,168, 64, 35,169,119,254,
- 1,176, 0, 48, 30, 85,241,125,198, 2, 48,251, 51,201,251, 3,236,137,192,236, 16, 32, 51, 4,200,156, 8,204,238,255, 15,244,
- 27, 92, 49,207, 41,224,214,197,119, 47,174,152,231, 20,208,224,254, 69, 78, 54,119,175, 4,127,179,110,182,212,250, 79,250, 74,
-115,123,123,251, 61, 14, 14, 14,233,246,246,246, 25,246,246,246,251, 1, 88,154,110,119, 38,152, 96,130, 9,127, 25,106,124,180,
-106, 94,181, 62, 90,108, 0,136,136,136,232, 15,224, 6,128, 1, 65, 65, 65, 55,235,159, 45,113,243,157,217,198,163,205,167,107,
- 86, 44, 33, 28,237,109,205, 12, 20,173, 75, 75,207,234,176,124,205,134, 83,185, 60,246,230,146,204,184,189,175, 80, 40,130,197,
- 98, 77,228,243,249, 65, 0,106, 4, 91,130, 70,163,137,160, 40,234, 56,140, 91,166, 13, 7, 7,135, 91, 44, 22,171,117, 75,190,
-152,162,168,204,130,130,130, 62,175,216,152,193,110,110,110,251,251,247,239,111,214,189,123,119,240,120, 60, 44, 91,182,108, 81,
- 94, 94,222, 22, 99, 9, 36, 18, 79,115, 29, 95,240, 49,155,199,123,147,209,107,125, 25, 48, 0,201,143,163, 13,154,159,185, 26,
-205,230,146,146,148,114, 35,169,150, 0,152, 86,221, 86,123, 1,124,253, 58,189,100,170, 31,244,122,170,170, 79,112,217,160,206,
-166, 90,222,248,252,243,207,217, 65, 65, 65,216,187,119,111,159, 61,123,246,124, 80, 94, 94,254, 51,128,115, 0,146, 95,183, 87,
- 58, 0,179,122,245,233,243,205,212, 69,139, 88,170, 91,183,240,205,254,253, 91, 81, 21,111,233,219,150,246, 37, 46, 23,227,109,
-109, 57, 65, 12, 3,127, 2, 32, 8, 32, 70, 38,167, 35,117, 58,234, 56,140,136,197,214, 4,222,197,139,203,241,143,182,148,160,
- 44,153, 89,202, 31,233,211,183, 44,249,250, 82, 0,195,234,239, 55,168, 5, 83, 25,150,107,144,138,137,206, 2,176,233, 53,155,
-213,204,206,206, 46,246,236,217,179, 46,221,187,119,103, 3,192,131, 7, 15, 66,130,130,130, 6,201,100, 50, 95, 0,138,255,167,
-155,144,128, 77,146,179,121, 28,206,155, 20, 69,117, 2, 0, 22,139,245, 88,171,215, 95, 53,208,244,183, 48, 50, 38,155, 9, 38,
-152,240,207, 69,115, 90,228,111,142, 70, 35,195,215, 84,142,169,251, 94, 23, 34,251,246, 29,122, 14,126,251, 89, 89,185, 82,157,
-158,158, 83,178,112,246,218,171, 31,204,223,248,211,166,239, 35, 34,111,254,158,112,215,167,251,208,120,145,125,251, 14,141, 80,
- 55, 54,135,235, 38, 20, 10, 31,238,220,185, 83,247,252,249,115,166,180,180,148,121,246,236, 25,115,250,244,105,230,163,143, 62,
- 82, 11,133,194,135, 0,220,140,225,116,112,112, 40,120, 22,117,133,201,142,141,102, 50, 30,252,206,232,245,122, 70,167,211, 49,
- 58,157,142,137,191, 20,193,196,158, 11,103, 98, 78, 31,103,180, 90, 45,163,213,106, 25,141, 70,195,120,120,120,228, 26, 89,206,
-250,144,118,236,216, 81, 27, 17, 17,193,156, 58,117,138, 89,180,104, 17,211,165, 75, 23, 10,192, 28, 99,235, 46,178,247, 26,104,
-238,220, 89, 54, 51,244, 91,221,133, 59,151,153, 39,169, 49,204,147,212, 68,230,228,181, 4,102,218, 39,219,116,230,206, 93,100,
- 34,123,175,129,205,213, 93, 34,145,244, 36, 8,130,169, 1, 0,166,117,235,214, 21,117, 95,110,110,110, 47,188, 92, 93, 93, 43,
-220,221,221,147,109,108,108,252, 27,226,156,212, 9, 12, 19,127,148, 97,226,143, 50,159,247, 3,243,228,201,147,187, 12,195,220,
-168,121,169, 84,170, 27,103,206,156,185, 49,122,244,232, 27, 0, 70, 53,209, 78, 70,181,103, 8,144, 89,126,246, 44,195,108,217,
-194, 48,253,251, 51, 9, 0, 19, 2,100,182,144,211,195,209,145, 19,179,241,235, 15,180,103,207, 30, 96, 46, 94,188,192, 68, 70,
- 70, 48, 63,157,217,207,108,221, 50, 91,231,224,192,137, 3,208,182, 5,156,108, 0,107, 1,108, 70,149,229,242,185, 76, 38, 99,
-242,243,243, 25, 0,207,171,255,183,217,206,206,110, 19, 26,182,190, 13,169,107,201, 90,240,150,227,197, 9,195,250, 48,229,101,
-185,204,132, 97,125,152, 5,111, 57,190, 96,217,122,203,211,211,124,238,200, 78,178, 39, 15,142, 80,115, 71,118,146,189,229,233,
-105,254,138,237, 73,160, 42, 79,232,206,168,168, 40, 3, 83, 7,122,189,158, 57,116,232, 16, 37,145, 72, 14,180,128,179,157,157,
-157, 93,134,181,181,245,243,186,255,180,235, 60,182,151,119,223,144,229, 54, 29, 70,247,111, 65, 57,187, 11,184,220,236,171, 39,
-190,163,228,153,143, 25,173,170,128, 41, 75,138,102,178, 19,238, 50,135,118,111,214,243,216,236,108, 0,221, 95,167, 47,181, 16,
- 38, 78, 19,167,137,243,111,200,217,148, 22,249, 95, 6,187,126, 5,235,131,207,231,133, 46,255,124, 49, 81, 42, 47, 85,169, 21,
-229, 90,189, 90,173, 38,185,140,250,113,124,106, 33,201,102,149, 46,152, 63,207, 60, 52,236,243,208, 74, 96,178,145,223,233,214,
-165, 75,151,123,225,225,225,246,214,214,214, 40, 43, 43,131, 92, 46,199,189,123,247,192, 48, 12,198,141, 27,199,239,209,173,155,
-255,210,101,203,126,203,206,201, 9, 64,227, 3,239, 31,226,197,218, 22, 95,247,169,202, 69,251, 69,186,188,106,212, 33, 8,236,
- 9, 14,170, 61,102, 85,118, 85,182, 12,129, 64, 80,155,144,248, 21, 16, 48,120,240, 96, 46, 0,188,247,222,123,138,242,242,242,
-245,213, 22, 14,163, 50,173,138,236,189, 6,218, 58, 73, 35,190,219,245,181,176, 83, 27, 47,232,244, 6,100,228,231,130,205,177,
-130,139, 11, 23,211, 39,191,201,233,215,203,218,118,237,234, 61, 23,242,105,140, 85, 22, 37, 94,110,140,203,202,202,234,208,241,
-227,199,113,226,196, 9, 0,192,243,231,207,225,229,229, 37,106,174, 12,113,113,113,158,163, 70,141,250, 81, 46,151,183,109,238,
-216,250,129,241,249,124, 62,250,244,233,131, 14, 29, 58,224,236,217,179, 3,170, 45, 91,175, 5,213,173, 91, 16, 63,122, 4,220,
-124,165,135, 23,143, 55,222,104,117, 55,242,194, 17,219, 11,145, 9,216,180,105, 63,146,147,171, 12,109,158,158,158,120,119, 82,
- 48,231,241,227, 59, 29,199,143,127,247,206, 47,191, 36,247,169, 22, 74,205, 97,229,247,223,127,191,196,221,221, 29,227,199,143,
- 15,238,216,177,163,163,133,133, 5,118,239,222, 13, 39, 39, 39, 79,173, 86,155,116,246,236, 89,105,126,126, 62,230,205,155,135,
-130,130,130, 69,141, 17, 13, 8, 28,176,148, 63,210,167,111,251, 55,166, 66,108,225,132,239,143, 29,199,179,135,135,250,106,116,
- 9, 75,185,212,205, 41, 42,134, 63, 77,150, 41, 14,109,221,181,191, 77,219,142,163,208,234,141,104, 91, 53,245, 75,234,210, 55,
- 61, 54,176, 5,234, 67, 43, 54,229,201, 95, 34, 29,127,146,229,171,120,106, 29,119, 21,114, 96, 5, 93, 35,176,106,173,181, 12,
- 70,245,235,215,175,246,135, 75, 79, 79,135, 70,163,129,143,143, 15,169,213,106, 7, 26,217,174,237,134, 14, 29,250,107,100,100,
-164, 77,187,118,237,100,197,197,197,181, 59, 28,109,172, 2,111,134,111,157,183,246,155, 31,188, 15, 51, 68,169, 44,225,167,199,
-205,112,117,239,221,243,141,107, 23,195,143,136,137,138, 44,240,172,138, 0, 90,142,148, 31,247,129, 48,179,198,196,143, 22,178,
- 7, 14, 30,228,252,230,176,183,175, 61, 75, 76, 30, 12,224,190,233,185,222, 4, 19,254,213, 86, 45,230,159, 86,167, 90,161, 21,
- 20, 20, 68, 52, 84, 65,154,161, 59, 59,216,219, 8,183,110, 60,120,159,165,211,106, 69, 86,150, 90,142,165, 5, 77,152, 91,178,
-116, 90,125, 69, 43,207, 86, 60,154,161, 59, 55,194, 95,127,137, 39, 33, 20, 10,195,207,157, 59,103,207,225,112, 64,211, 52,236,
-236,236,144,150,150,134,210,210, 82,148,151,151, 35, 57, 33, 1,238,110,174, 88, 17,186,216,105,222,226,208,112,165, 82,217, 21,
- 47, 78, 35,190,180,108,148,210,191,152, 55,186, 38, 5,203, 75,143,252,213,255,107, 96,159,177, 75, 81,211, 50, 51, 51, 33, 22,
-139,225,235,235, 43,190,125,251,246, 47, 77,136,172, 23, 56, 37, 18, 79,115,154,207, 59,177,243,187,101, 66,157, 62, 14,241, 41,
-197,104,239,222, 23, 14, 54,110,200, 45,214,226,238,189,115,136,139, 61,138, 54,206,110,152,243,209, 32,193,134,175, 79, 29,231,
- 26,220,221, 74, 75,211, 20, 13,113, 42, 20, 10,177,135,135, 7,220,220,170,242,158, 81, 20,133,248,248,120, 80, 20, 85,187, 93,
-247,253,224,233, 40, 24, 20, 25,152, 26, 18, 2,185, 92, 46,110,136,147,195,130, 97,225, 7,239,178,133, 28,128, 39,178,214, 86,
- 84, 84,212,166,225,208,233,116,136,137,137, 65, 64, 64, 64,255,147, 39, 79, 54,167,138,140,106, 79, 29,240,213, 55, 7, 14,108,
-155, 92, 86, 70, 2,192, 94,130,160,117, 12,243,149,177,125,201,222,158,115,250,210,197,195,182, 44,242, 41,172, 45,191,196,189,
-123, 25,208,233,170,202, 43,151, 23, 98,238,108, 5,184, 28,115,156, 61,251,131,141,143, 79,159,211,249,249, 58, 95,188, 56,141,
-216, 80, 57, 5, 23, 47, 94,196,220,185,115, 17, 31, 31, 47,173,201,209, 38, 20, 10,177,113,227, 70,150,143,143,143, 84, 36, 18,
-225,210,165, 75, 40, 40, 40, 32,154, 42,231,141,203, 55,214,148, 37, 95, 95,154, 79, 92,122,235,251, 99,199,241,254,164,137,112,
-100, 82,126,177,108, 67,172, 25, 58,178,247, 23, 12,203, 53, 72,100,222, 89,226,229, 59, 18, 92,158, 24,115, 62, 91,133,231,113,
-231, 37,202,242,216,217, 4,149,229,186, 98,211,201,249, 47,149,243, 84, 48,245,222,209,219,111, 92,117,187,223,234, 81,204, 7,
-191,231, 69,239,137,253, 67,104,121,178, 9,146,178, 4,170,210,154, 36, 37, 37, 33, 57, 57, 25,108, 54, 27, 42,149, 10, 6,131,
-161,193,114, 74,165,210, 89, 6,131,225,139,234,223,249,160, 64, 32,152,113,228,200, 17,155,186, 66,219,174,243,216, 94, 54,230,
-162,193, 5,133,242,146, 59,247,159, 60, 91, 56,107,252,128, 91,119,227,178,116,156,209,153,101,177,103,203, 26,105, 79,129,144,
-199, 59,125,233,204, 15, 98,125,106, 20, 68, 62, 3,192, 17,123,129,210,231, 64, 89, 82,137,242,228, 60,104,190,219, 1,191,217,
- 11,112,254,167, 83,226,142,157,186,158,212,232,245, 94, 0,180,175,112,109,182, 4, 38, 78, 19,167,137,243,239,201,217,168, 22,
- 97, 24,230, 13, 0, 14,213,155,242,106, 93, 96, 11,160, 8, 85, 25, 5, 28,170,239, 29,188, 58,167,213,223,174,123,108,253,237,
-186,159,229,213,159,237,171,223,239, 19, 4, 81,220, 76,209,157, 80,149,154,240, 66,245, 59, 80, 61,149,216,172,227, 49, 65,144,
- 10,138,162,249, 92, 59,123,245,123, 19, 6,119,186,114,237, 65,140,153,173, 5, 59,112,128,127,255,123,143, 83,127, 35, 72, 66,
- 79, 16,164, 81,126, 31, 44, 22,107,226,214,173, 91, 59, 89, 88, 88,128,166,105, 88, 90, 90, 66, 38,147, 65,171,213,162,172,172,
- 12,154,114, 5,116,229, 10, 60,202, 74, 71,239,254, 3,240,246, 91, 67,125,126,248,233,220, 68,138,162,126,108,138, 87,218,217,
-191,214,146,181,170,181,205, 31,166,137,172,210, 90,209,245,165,191, 23,184, 98, 49,222, 92, 24,250, 58,125, 32,250,194,133, 11,
- 23,199,141, 27, 55,236,147, 79, 62, 33,243,242,242, 46,165,165,165,245, 6, 16,223,172,168,224, 11, 62,254,207,199, 65, 18,137,
-152,193,201,171,231,208,207,127, 18,204,120, 44,200, 21, 58, 16, 4,144,240, 36, 28, 4, 97,141,216,231,121,232,235,103,129,161,
-129, 62,226,159, 78, 37,124,130, 63,252,131, 94,250,105, 74, 74, 74, 80, 88, 88, 8,189, 94, 15,189, 94,143,241,193,193, 56,124,
-232, 16, 42, 43, 43,161, 82,169,160,213,106, 65, 81, 20, 72,146,196,213,136,147,200, 74, 77, 64,175,128, 0,160,145,212, 75,135,
- 98,192, 1,112,247,217,179,103, 72, 72, 72, 64,118,118, 54, 4, 2, 1, 28, 29, 29,177,106,213, 42,104, 52, 85,249,196,130,131,
-131,251, 3,120,252,186, 23, 84, 50,176, 39,141,162,150, 14, 59,115,198,254,246,153, 51,244,221,243,231,179,249,229,229,187,141,
- 57,151,203,197,248,175,191,250,168,189, 72, 36, 66,118,230, 86,120,123,115,177,104,129, 13,214,127, 89, 4, 0,152, 55,215, 5,
-221,186,218, 66, 81,122, 10,182,246, 75,176,109,219,252, 54,211,166,109, 14, 81, 42,169,131,205, 80, 47, 61,119,238,220,219, 94,
- 94, 94,206,209,209,209, 4,143,199,131, 80, 40,132, 80, 40,132, 64, 32, 64, 97, 97, 33,210,210,210,152,175,191,254, 58, 7,192,
-210,166,136, 86,108,203,251, 13,192,176, 5,111,225,226,179,135,135,250, 58,179, 82, 31,189, 61,167, 79,122,236,221,232,242, 43,
- 87,111,175, 54,168, 5, 89,165,217,215, 22,123,116,139,182,157,253,233, 74,236,248,122, 57,158,253,126,171,216,193, 77,241,173,
-144,208, 52, 88,206,254,253, 87,176,157, 28,172, 13,179,166,189,109,117,222,225,206,172, 72, 54, 33,203, 47,122,184, 17,105,209,
- 42,126, 91,255, 41,237, 60, 73,109, 84, 84,148,176, 95,191,126, 80,171,213,181,150,201, 35, 71,142,208, 6,131,225,122,131,125,
- 83,167,251, 34, 39, 39,199, 73,165, 82,225,173,183,222,154,183,113,227, 70, 81, 77, 62, 57,138,162, 94,176,100,173,217,114,248,
-242,199, 95,124,123,253,242,143, 95, 74,215,132,206, 24, 48,121,206,218,235,104, 36,143, 36,155, 36,103,159, 63,179,223, 81, 32,
-209, 67,104, 61, 20,234, 2, 21,158,237,121, 31, 74,133, 26,221,214,172, 4,192,131, 86, 79, 98,247,200,241,224,216, 72,177,124,
-230, 12,233,231,187,191,255,136,166,233,173,166,231,122, 19, 76, 48,161, 30, 28, 8,130,136, 0,128,208,208,208, 37,235,215,175,
-127, 66, 16, 68, 4,195, 48, 65,213, 6,148, 8,134, 97,130,106,142,169, 22,103, 47,109,215, 28, 91,127,187,254,231,176,176,176,
-142, 27, 54,108, 88, 23, 16, 16,240,227,157, 59,119, 82, 1, 52, 39,180, 70, 84, 11,171,151, 82,239,144, 53, 10,178,238,251, 11,
- 22, 45,154,190,149,148,154,174, 28, 58,164,135, 75,196,205,199,247,167, 79, 31, 49,120,226,200,126,129,105,153,242,132, 54,173,
- 28,109,159, 60,121,108, 65,211,244, 45, 99, 90,137,207,231, 7, 13, 26, 52,136, 93, 82, 82, 2, 51, 51, 51,200,100, 50,228,228,
-228, 64,167,211, 65, 93, 86, 10, 77, 89, 41,212,165, 37,208,149,149, 32,249,193, 61,116,110,227,201,175,118,150,111, 18, 53, 86,
-151,250,150,170,186,150, 45,158,185, 57,248,230,230, 32, 90, 62,109, 56,218,202,202,234,110,205,160,170,211,233,102, 47, 94,188,
-184,136,166,105,172, 93,187,214, 66, 44, 22,159, 4,192,111,142,196,220,142, 21, 20,224,231, 75, 62, 77,139, 69,159, 46, 83,209,
-206, 99, 56,210, 10, 84, 40, 42,215,161,176, 84,135,110,253,182,163,117,151,149,112,245, 91,143,132,140, 98, 72,157,189, 72,176,
-249, 77, 38,127,206,202,202,122, 97,251,199, 99,199,160, 84, 42,209,166, 77, 27, 76,154, 52, 9,139, 23, 47,198,164, 73,147, 32,
-149, 74, 49,121,194, 40, 44, 95,190, 28,249,249,249,205, 21, 85,211,174, 93, 59, 77,171, 86,173, 52,173, 90,181,210,232,116, 58,
- 84, 84, 84,160,180,180,180,126,123,207,111,105, 67,218,219,219,135, 57, 58, 58,198,218,219,219, 63,225,243,249,145, 49, 4,241,
- 84,221,170,149, 67,239, 49, 99,136, 14, 19, 38,176, 50,132, 66,226, 38, 32, 54,134,203,214,154, 51, 98,224,160, 97,188,210,146,
-253,181, 70,170, 25,211,237,240,235,205,142,184,253, 75, 87,204,157,221, 6, 4, 41, 0, 65,242,160,172,140, 66,143,238, 1, 92,
- 43, 43,162,185,190,244, 46,128,152,222,189,123, 75,231,204,153, 67,240,249,124,204,155, 55, 79, 55,115,230,204,196, 73,147, 38,
- 37,254,252,243,207, 84,171, 86,173,224,234,234, 74,184,186,186, 58, 1,136,169, 62,167, 73, 88,180, 33,214,104,116, 9,191, 88,
-121,137, 82, 41,216,246,170,208,243,199,175,216,148, 39, 95,179, 51,117, 83,218, 51,165,231,179,223,111,201, 19,227,206,211,105,
-247,111, 20,229, 38,150,123,174,217,153,186,105,201,183,185, 13, 94,212, 55,111,130, 14,143,184,169, 83, 86, 42,217, 99, 70, 14,
- 84,206,122,111, 98, 59,107,113,199, 35,112, 30,218,165,181,155,203,228,229,235,182,233,102,126,244,177,110,239,190,253, 76,121,
-121, 57, 20, 10, 5,182,109,219,102, 56,127,254,124, 14, 69, 81, 31, 55,246, 12, 4, 0,122,189, 30,179,102,205, 18, 89, 88, 88,
- 32, 43, 43,171,214, 34, 10, 0,121, 50,249,227,219,247,227,158, 46,252, 48,184,127,165, 70,163,185,124,227, 65, 66, 7,175, 86,
- 46, 4,193, 52,186, 16,133,199,225,188,217,181, 71, 15, 22,195,148,130, 96,187, 33,249,208,215, 80,228, 23, 67, 81, 88, 12, 22,
- 71, 4, 3,248,208,211, 60, 88,117,238,142,231,247,163,225,108,231,192,230,115, 56,129,166,241,196, 4, 19,254,157,104, 74,139,
-212, 21, 75, 27, 54,108, 88,215,212,254, 58,239,218,122,219,181, 66,170,190, 8,171,251, 25, 0, 54,108,216,176,142, 97,152,160,
- 59,119,238, 28, 3,160, 50,178, 10, 31,212,121, 55, 62,142, 22, 75,173, 93,255,201,226,165,144, 88, 10, 45,187,251,123, 57,158,
-189,116,243,193,173, 59, 15, 18, 90,187,218,218, 49,122,173,228,171,205, 59, 92, 8,165,106,131,145,133,240,177,181,181,133, 78,
-167, 67, 82, 82, 18,178,179,179,161,211,233, 96,168,172,132,166,180, 20,234,146, 18, 80,149,229,224, 82, 20, 84,178, 66,216,152,
- 9,128, 63, 86, 36, 54, 99,121, 35, 26, 20, 90, 53,239, 2, 11, 11,240,205, 45, 64,114, 56,205,102,138,175,131, 55,186,119,239,
-126, 34, 46, 46,174,199,144, 33, 67, 86,163,106,137,124, 70, 78, 78,206,224,101,203,150,105, 28, 28, 28, 48,107,214,172,246, 0,
-166, 54, 43, 50,121, 90,159, 86,142,237,209,206,115, 42, 90,187, 14, 66,105,165, 30, 50,133, 30,133,165, 58,236,222, 30,128,211,
-123,187,227,215,211,125, 17,119,249, 77,148,234, 29, 33,150,142, 6, 67,105, 59, 54,197,121,245,234, 85,172, 90,181, 10,171, 87,
-175,198,218,181,107,177,122,245,106,228,228,228,192,215,215, 23,153,153,153,184,120,241, 34,242,242,242, 96,107,107,139,123,247,
-238, 97,203,150, 45,248,245,215, 95,155,173,116,141,112, 53,226,152, 22,205,165, 27, 12,134,105,121, 99,198,116, 42,176,182,238,
-224,239,239, 63,108,222,188,121,158,189,123,247,174,221,239,233,233,233, 38, 20, 10,243, 81,181,130,210,175, 41, 46, 26,240,183,
-179,243,133, 86,243,180,250, 55,230,128, 32, 4, 24,244,102, 2,122,247,125, 0,157,158, 11,146,224,131, 36, 5, 48, 24,228,144,
- 72,164, 96, 24,194,183,153, 34, 46,147,201,100, 94,215,174, 93, 35,211,210,210, 32, 16, 8, 0, 32,125,197,138, 21, 59, 54,109,
-218, 20,111, 99, 99, 67, 69, 68, 68,224,167,159,126, 66, 80, 80, 16,107,230,204,153, 94,174,174,174,187,154,171,247,138,109,121,
-191, 29,221,124,241, 29,142, 94,226, 39, 16,182,118, 71,165,120,244,127,250,219,138, 0,224, 82, 74, 74,185,189,155, 98, 67,101,
-121,108,166,149, 75,197,151,151, 82,154, 91,113,186,130,126,152,248,244,238,209, 51,151,202, 10, 11, 74, 56,254,157, 58,170,214,
-175,250,148,219,218,189,237, 87,203, 23,127,232,152,163, 16, 44, 42, 9, 57, 0, 0, 32, 0, 73, 68, 65, 84,148,190, 57,239,226,
-211,240, 75,247, 42,166, 76,127,223,240,222, 7,115,212, 23, 47, 93, 61, 67,211,116, 39, 52,178,226,144,166,105,228,229,229,225,
-201,147, 39, 72, 73, 73,129, 76, 38, 67, 81, 81, 17,202,203,203,107,167, 27,205,202, 21, 23,118, 28, 56,255, 72, 36, 20,154,245,
-232,228,229,246,123,116,124,161, 72, 40, 52,243,114,119,107, 7,172,104,240, 62, 66, 81, 84, 39,129,153, 16, 0,129,210,184, 91,
-168, 40,169, 64, 69,105, 5,202,139, 43,160,209,177,160,214,144, 80,105, 73,180,234, 63, 20, 21,149,106, 84,200,203, 64, 83, 84,
- 23,211,112, 99,130, 9, 38, 52, 49,214, 71,132,134,134, 46, 49,242, 88,163,167, 55,235, 11,175,208,208,208, 37, 4, 65, 68,132,
-133,133,117, 68,227, 11,170,234, 98, 79, 3, 47, 0, 70,132,119,144,203, 19, 43,204, 9,159,113, 11, 62,251,226,226,177,125,219,
-237, 53, 26,101,166,141, 68, 76,137,205,120,182,239,205, 90,139,242,138,146,177,149,198,135, 35, 64, 73, 73, 9, 82, 83, 83, 33,
- 20, 10,193,229,112, 64,169, 84,160, 84,149, 80,149,200, 65,234, 52,224, 82, 20,172,205,132,104, 37,117, 68,107, 7, 71,163, 56,
-147,162,174,212, 58,190,215,157, 46,252,186,187, 15,120, 34, 49,120,230, 98,252, 39,226, 6, 0,128,203,229, 2,203, 86, 27,101,
- 52,113,118,118, 62,119,244,232, 81,174, 76, 38, 67, 76, 76,204, 35, 0,101, 0,204, 1,208, 9, 9, 9,215,226,226,226,130,188,
-188,188, 0,160, 77,115,100,138, 34,146,210, 27, 24,100,229,167, 35, 45, 59, 26,214,150, 30,224,152,181, 67, 97,169, 14,124,161,
- 7,244,154, 63,102, 31,213,138, 12,168,116, 44,163,234,174,213,106, 97, 48, 24, 96, 48, 24,160,213,106,241,193, 7, 31,224,246,
-157, 59,248,241,167,159,145,154,252, 28,237,221, 29, 17, 18, 50, 5,221,187,119,199,157, 59,119,154,228,154,234, 7,189,179, 24,
-236,205,195, 72,240,196, 54,154,158,139, 47,255,222,156,216, 34, 8,130, 65, 35, 83,145,245,176, 41, 32, 32,160,237,243,202, 74,
- 60,121,250, 20, 67, 86,172, 0, 0, 68, 70, 70,190, 80,151,133, 11, 23,242,226,227,227,223,123,240,224,193,123,185,185,185,155,
- 1, 52,236,108,206, 0, 23, 46,252,134, 15, 63,140,135, 76, 38, 3, 0, 28, 63,246,135, 46, 77, 75,213,225,173, 17, 85, 51, 90,
- 86, 86, 86,216,188,217,215,168,246,164, 40, 10,123,246,236,169,157, 46, 4, 0, 54,155,221,123,225,194,133,227, 26, 58,190,109,
-219,182,220,230, 56, 23,140,119, 22,252,250,136,153,109,217,182,117, 71, 11,219,206,144,235,163,125,163,115,242,230, 46, 24,239,
-188,117,203,169, 28,181,144,208, 28, 36,168, 44, 87,182, 64,125,200,152, 50,166, 92,218,174,149,183,154,118, 40, 95,166,248,124,
-206,251,239,218, 88, 88,217, 87,238,221,177, 94, 66,178, 72,230,220, 3, 93,105, 71, 79, 27,171,209, 61,191,169,248,112,193,178,
-104,173, 33,107, 14,178,206, 61, 71, 19, 33, 46, 40,138, 66,110,110, 46,100, 50, 25, 50, 51, 51, 81, 84, 84, 53,253, 90, 84, 84,
- 4,154,166, 95,231,134, 8, 85,102, 38, 50,206,236, 69,235, 41, 83,208,109,245, 42, 80, 52, 27, 42, 37,133,205,189, 6,163,164,
- 76, 5, 13, 77, 64,250, 70, 47,188, 31,249, 11, 72,134, 2,118,127,107, 26, 73, 76, 48,225, 95, 10, 99,194, 59,212, 8,162,245,
-235,215, 7,253,217,223, 95, 87,108,173, 95,191,254,201,250,245,235, 91,242, 93,245,167, 12,107,183,107,124,180,110,212,113, 64,
-123,105,208, 44, 47, 74, 72,137,143,103,231, 86,170, 42,205, 28,236,237, 52,102, 2, 62, 93,166, 40,103, 69, 63,126,164,171,204,
- 79,126,214,130,122, 36,196,197,197,249,230,230,230, 34, 51, 35, 3, 6, 85, 37, 72,141, 22,140, 90,137, 33,125,122, 65, 0, 64,
- 64, 18,224,210, 58,176, 89, 60,148, 87, 40, 0, 32,161,217,193, 81,175,127,201,178, 69, 16, 4,120,230,230,224,137, 68,224,137,
-205, 95,176,112, 25, 99,177,225,243,249, 71, 79,158, 60,233,228,236,236,140, 85,171, 86,193,197,197,197, 91, 42,149, 42, 45, 45,
- 45,133, 14, 14, 14,232,208,161, 3,122,245,234,133,139, 23, 47, 2, 70,196,148,210, 27, 4,177,207,210,209,187,168,248, 14,126,
-185,241, 29,180, 42, 13,252,251,127, 7, 29,187, 53,236, 58,174, 4,157,116, 4,202,252,179, 85,214, 3,199,145,200,206, 76, 7,
-193,226, 61, 49,214,242, 84,243,249,209,163, 71, 56,118,246, 38,156, 90,249, 32, 51,241, 41,158, 94,191,134,219,118, 54,104,229,
-211,161,118, 26,168,209, 50, 82, 96,175,249,182, 42, 76,212,210,217,239,242,139,139,139,249,214,214,214,154,154,182,115,114,114,
-122, 29,177,245,238, 39,159,124,130, 82, 14, 7, 24, 49, 2,220,148, 20,232,116, 58,244,236,217, 19,221,186,117, 3, 0,244,236,
-217, 19,108, 54, 27,157, 59,119,134, 84, 42,197,183,223,126,251,110, 99, 66,139, 36, 16, 99, 48,200,189, 61, 61, 61,107,133,214,
-161,195, 50, 68, 63,120, 19, 4,120,216,182, 35,169,246, 88, 55, 55, 55,228,231,165,128, 32,152,184,102,202,184,218,209,209,113,
-153,147,147,147,231,166, 77,155, 88, 2,129, 0, 31,125,244,145, 71, 69, 69, 69,235,106, 83, 50,194,194,194, 0, 0,203,151, 47,
-199,138, 21, 43,160,209,104,148,141,145, 29,218,220, 73, 90, 88, 76,191,199, 84,152,141, 29,104,219,186,211,160,192, 33,240,240,
- 26,132, 65,129,153, 0,176,206,154,157, 62,225,171,207,173,206, 88,153, 19,251,175, 92,186,186,188, 79,255, 65,159, 47,174,184,
-190,230,203, 61,165,205,250, 60,150,101, 28, 44,127,198,155,184,101,251,174,195, 91,190, 8,155, 47,200,148,105, 75,114, 74,152,
- 10, 49,159, 45,110,227, 64,136,231,126,182, 58, 53, 55, 55,101, 17,178, 46, 53,187,210,146,166,105,164,164,164,212,250,244,169,
-213,106, 84, 86, 86, 34, 43, 43,171,182,207,168, 68, 22,111,205,153, 62,178, 75,165, 74,165,252,253,113, 98,230,210,121,147, 3,
- 42, 85, 42,101, 98, 90,230,115, 96, 91,131,106,140, 36,201,199,202,114,229, 16,101,169, 26,178,152,103,112, 25,220, 10,122, 3,
- 1,173,129,130, 76, 94, 14,141, 1,160, 72, 14, 58, 78, 8, 1, 69,176, 81,148,155, 3,146,197,122,132, 23,157,246, 77, 48,193,
-132,127, 15,154,212, 34, 53, 22,173,128,128,128, 31,235, 90,157,106, 62, 3,208,160,105, 87, 30, 89, 93, 49, 85, 51,157,216,216,
-247,212,227, 53, 22, 47,249,104, 53, 27,222,161,230, 59, 93, 45, 21,210,175,151, 79,118,161, 13,134,246,133, 69, 5, 6, 54,155,
-207,113,181, 84,229, 21,103, 26,255,237, 26,141, 38,226,218,181,107, 99,222,124,243, 77,126,226,227, 71,208,150,149, 65, 91, 86,
- 10, 14,109,128,181,176, 43, 72,157, 6,132, 86, 11,103,111, 26,234,114, 33,110,222,142,211,107, 52,154, 8, 99,133, 22,201, 98,
-189,232,151, 37, 22,131,111,110, 1,190, 88, 92,127,106,177, 57, 81, 96, 54,116,232,208,193, 61,123,246, 4,195, 48,216,179,103,
- 15,116, 58, 29, 79,167,211, 65,171,213, 66,167,211, 65,161, 80,224,240,225,195,216,185,115,231,109, 0, 7,154, 29,204, 12,218,
-107,151,175, 70,117,159, 49, 57,136, 19, 25,177, 25, 6, 45, 5, 21,225,130,202, 74, 61, 42,180,102,160,108,166, 0, 5, 23,192,
- 98, 11, 16,208,217, 3,103, 79,133,235, 96,208,252,108,164, 10,127,193, 42,148,149,153,142,236,228,231, 16, 43,242, 97,103, 97,
- 6,101,202,115,248,135, 76,125, 37,235,132,171,171, 43,104,154,198,192,129, 3,107,157,171, 95, 85,108,201,229,114,156, 63,127,
- 30, 61,123,246, 68,255,254,253,145,147,147,131,148,148, 20, 12, 31, 62,188,246,152, 71,143, 30, 33, 58, 58, 26,109,218, 52,109,
- 36, 44, 42,214, 71,102,103,197, 4,143, 30, 61,154,123,247,238, 93, 48, 12, 3, 47, 47, 11, 88,152,139, 64,144,124,248,248,216,
- 3,168,122, 6, 24, 48, 96, 0, 20,138, 20, 67, 73, 9, 19,217, 76,117,143, 2,248, 73,171,213, 38,245,235,215, 79,154,156,156,
-140, 5, 11, 22,176,143, 31, 63, 94, 99, 74, 70,104,232,139,139, 41, 84,170,198,167,238,219,119,242,254,212,195, 32,233, 47, 16,
-182,118,183,176,237, 12, 15,175, 65, 0,128, 55,131,102,192,163,173, 27, 20, 69,177,238,106, 85,250, 88, 46,187, 68, 18,187, 45,
- 39, 94, 56,194,119,186,186,240, 70, 34,170,166, 78,155,253,217, 85,137,199, 11, 50, 57, 83, 78,252,116,238,226,172,225, 65,163,
- 56,122,202, 96,240,109,197,177, 58,121,230, 66, 97, 78, 70,230, 55,200,188, 20,247,135,253,175, 73, 43, 30,165, 80, 40, 32, 18,
-137, 16, 23, 23,167, 25, 49, 98, 4,159, 36, 73, 36, 37, 37,213, 10, 45,123, 91,235, 14,189,187,249,122,175,217,114,248,178,136,
-207,231, 7, 14,232,234, 19,159,152,145,205, 48, 68,122,163,214, 86,189,254,234,227,152, 71, 3,237,164,109, 89, 41, 55,238,194,
-166,239,112,104, 52, 36, 84, 90, 26, 26, 3, 96, 96,113,225,228,215, 3, 86,109,124,192, 0,184,127,247,182, 94,163,215, 95, 54,
-141, 53, 38,152,240,175,182,106, 49, 77,137,164,234,207,197, 0,210,215,175, 95, 95, 84,199,218, 36, 3,240, 8, 64,151,234,227,
-100,245,206,147, 17, 4,113,159, 97,152,110,117,120,100,117, 4, 87,221,207,218,122,199, 60,106,129,200,170,251,254,162,208,106,
-108, 73, 37, 0,216,218,218,218,251,251,119,109,243,253,190, 19, 96, 24, 6,207,162, 55,162,164,240, 41,150,173,251,173,141,179,
-179,115,255,156,156,156,155,198,148,128,162,168,227,251,247,239, 95,212,227, 13,127,127,119, 23, 23, 60, 74, 79, 3,151,161,192,
-165, 40,144, 58, 13,216,148, 22, 46,190, 20, 72, 66,140,220,220, 50,108, 56,122, 34,174, 58, 74,124,147,240, 30, 62, 10,171,178,
-203, 64, 16, 4, 54, 5,248,130,103, 46, 6, 87, 36,198,127,206, 69,213,138,171,136, 85, 97,224,137,197,104,211,195,168,128,240,
-202,235,215,175, 63,120,252,248,113, 55, 95, 95, 95, 44, 90,180, 8,233,233,233,160,105, 26, 5, 5, 5,234,188,188,188, 28,153,
- 76,150, 14,224, 12,128,239, 97, 68,228,113,174, 70,189, 53,226,244,161, 57, 1,125,250,219,142, 30,187, 19, 63,157, 90,136,210,
- 50, 5,148, 6, 33, 42,213, 6, 84,106, 88,176,182,233,132, 30,157, 59, 35, 55,167, 16, 79,238, 94,174, 96,107,148, 27, 91,210,
- 65, 9,130, 64,116,116, 52, 60,165,230,120,254,203, 77,216,154,113,208, 69,234, 8,105,239, 62,181,241,165,154, 2,135, 5,195,
-187,239,190, 91, 27, 25,126,232,208,161,105, 83,166, 76,113, 90,184,112, 33,246,237,219,135,219,183,111,191,228,160,221,191,127,
-127,220,186,117,107, 37,128,229,205, 25,245,180, 90, 45,188,189,189,113,255,254,125, 92,187,118, 13,131, 6, 13, 66,255,254,253,
- 17, 27, 27,139, 43, 87,174, 32, 58, 58, 26, 4, 65,192,198,198, 6,250, 42,241,172,111,140, 76,167,195,201, 47,191,218,191,100,
-203,150,157, 29, 39, 79,158,140,211,167,127,196,140,233,237, 65,144,124, 16, 4, 31,163, 70,182,199,170,213,247,209,163,199, 0,
-216,218,114,176,101,243,217, 84,149,138, 58,108, 68, 51,174,185,114,229,138, 84,173, 86,163,180,180,148, 17,139,197,132, 92, 94,
-181,162,181, 33,139,150, 82,169, 20, 52, 70,244,248, 97,194,198,210,114,166,132,169,136, 30, 91,108,136,238, 52, 40, 48, 11,111,
- 6, 77,199,213,136, 3,136,186,124, 13,214,236,244, 52,136,202, 47, 22,165, 21, 41,242, 42,189,118,249,188, 49,147,149, 93,121,
-121,215,220, 81,207, 89, 78, 78,244,201,176,239, 20,165, 77, 9, 45, 0, 68,113,252,145,115,103, 24,140,234, 21,208,163,173,175,
-155, 19,175,164,168,144, 57,117,246, 98,156, 46,237,244,249, 58, 2,139,105, 70,168,175, 10, 13, 13,253,162,250,243,193,165, 75,
-151,206,220,176, 97,131, 93,126,126,126,173,143, 86, 97, 81,113, 84,175, 17,115, 41,121,105,153,118,255,150,207,198, 11, 5,124,
-222,210, 13,251,111,232, 89,184,219, 24,175,129,166,191,157,176, 96,217,252,196,103,209,206,173,133, 60,156,253,108, 57, 30, 93,
-185, 14, 61,201,197,135,215,126,135, 70, 71,161,180, 72,142,159,223,155, 13,177,131, 4, 59,111,156, 46,160,105,250, 59,211, 80,
- 99,130, 9,255, 94, 52,166, 69, 8,130,104, 40,198, 94, 65, 3,255,187,223,212,121,141,240,252, 25,104, 52, 42,188, 81, 75,240,
-138,138,138, 10,111,221,250, 29, 55, 34,214,224,102,196, 26, 60,137,126,132,220, 28, 45,114, 10,212,176,176,176,248,173,137, 83,
-235, 71,142,101,148, 74,229,184,165,203,190,200, 23, 8,205,208,111,240, 96, 56,218,217,195,140,203, 1,203, 64,131, 69,112, 80,
- 33,179,194,243, 88, 37, 22,239, 63, 82, 88,161, 84,142,107, 96,144, 24,210,152,200, 32, 8, 2,124, 11,115,240,196,230,224,155,
- 91,188, 48,141, 40,176,176,128,192,220, 2,108, 30,175, 33,103,248,151, 56, 43, 42, 42,222, 30, 63,126,124, 73, 89, 89, 25,102,
-206,156,137,155, 55,111, 70, 95,190,124,217, 34, 54, 54, 86, 40,147,201,218, 2, 24, 10, 96,119, 19, 34,235, 5,206,146,146,148,
-114,198,160,153,184,254,139,143, 85,106,131, 13,130,167, 30,135,136,204,130,129,162,193, 0,144, 90,243,208,123,200,106, 20,106,
-123,225,248,174,181, 74, 90,167,158, 92, 47,134,214, 11,156, 12,195, 48, 14, 14, 14, 47,181,193,181,107,215, 16, 60,254,109, 4,
-142, 29, 3, 59,119, 79,216, 15, 25,142,192,153, 31, 98,215,174, 93, 32, 73, 18,182,182,182,245, 7,222, 90,206, 67, 49,224, 28,
-123, 12,226,216, 99, 16, 7,163,193, 6, 16,114,228,200,145, 47,187,116,233,114,253,246,237,219, 27, 1, 76,172,251, 93,117,176,
-162,158, 53,171,161,223,232,243,249,243,231,171, 18, 19, 19, 33, 18,137, 96, 48, 24,112,251,246,109,236,220,185, 19,155, 54,109,
- 66,116,116, 52,108,108,108,208,166, 77, 27,104, 52, 26,220,191,127, 95, 5,224,243, 38, 56,105,153,204,240,246,182,109, 27,228,
- 65, 65,125,177,127,255, 14, 56, 58,246, 2,135,237, 8, 54,199, 14, 34,177, 55,246,126,255, 37,134, 13,243,199,185,179, 39,138,
-139,228,134,183, 1, 24,140,232, 75,234,223,127,255, 29,187,118,237,194,248,241,227,115,130,131,131,169,178,178,178, 90,139, 22,
-195, 48, 96, 24, 6, 43,170,125,204, 52, 26, 13,191, 49,206,247, 23,199,229,124,182,246,201,170,130,252,156,158, 55,175,255,246,
-110,212,229,107, 72, 77,140, 66,212,229,107,248, 37,234, 78,104, 65,126, 78, 79,255,238,237,184,227,102,206,249,244, 80,248,105,
-150,216,194, 9,135,194, 79,179, 38,205,253,120,109,215,192, 65,159, 55,215,231,171,127, 71,166,162,176, 32,108,221,198,237, 21,
- 6,157,154,252,250,155,111,115, 85,178,188,207,235,244, 75,166,185,254,169, 82,169,118,171,213,106,169, 90,173,150,106, 52,154,
-207,211,211,211,251, 45, 90,180, 72, 70, 81, 84,173,181, 84, 22,127,238,183,167,191, 30, 92,103,111, 43, 17,246,234,214,177,253,
-230,221,167,110,100,102, 21,252, 80, 39,134, 86, 67,229, 84, 87,168,212,111,143, 25, 55,165,178,180, 68,131,128,143, 67, 65, 11,
-196,208, 80,128,158, 97,193, 64,176,241,120,205,102, 8,173,205,113, 52,237,161,178, 76,175,123, 27, 47,198,208,106,170,238,175,
- 3, 19,167,137,211,196,249,247,228,252, 95,134, 19, 94,204,117,232,244,130, 69,171,185, 37,149,206,206,206,253, 70,143, 26,130,
- 1, 65, 75,193, 48, 12,158, 62,252, 10, 37,178,103,112,118,228, 35, 37, 83, 17, 0,224,102, 11, 10,147,153,158,149,213,115,254,
-231, 75,195,131,135, 14,246,241,117,119,231,183,110,221, 10, 34,123,123, 20, 21,201,240,235,221,120,253,218, 99, 39,227,170, 69,
-150, 81, 19,147, 52, 77, 87, 57,185, 3, 24, 60,127, 49, 8, 22, 11,168, 14,227, 80, 51, 48,186,119,235, 5,130,205, 6,197,208,
-208,104, 52,198,172,150,203, 78, 78, 78,126,123,242,228,201, 63, 71, 68, 68,144,129,129,129,126,103,206,156,121,157,156,121,168,
- 44, 76,188, 14, 32,104,109,216,172,227, 61, 7,141,177,240,234,216,149,219,181, 53, 11, 58, 61,129,220,156, 12, 68,132,223,211,
-197,255,126, 89,193, 24,212, 19,149, 69,137,215,155,226,210,233,116,153,109,219,182,117,216,181,107, 87,173, 51, 60, 69, 81, 40,
- 42, 42,194,111,191,253,134, 78,221,122,192,103,250,123,144,201,100,216,182,109, 27,220,220,220, 48,114,228, 72, 20, 23, 23,195,
- 96, 48, 24, 59,225, 75, 1,184, 92,253, 66, 61,145, 69, 84,167, 0,106,114,218,208,211,211,147,167, 86,171,253, 24,134, 97, 17,
- 4,177, 85,171,213, 78, 11, 11, 11,115, 90,183,110, 29,218,183,111,143,162,162, 34,136, 68, 34,120,121,121, 65, 38,147,225,222,
-189,123,148, 82,169,220,133,170, 68,214,178,102,202,151,116,239, 94, 90,207,121,243,254, 19,254,229,134, 89, 94,106,205, 0,158,
-181,117, 31, 48,140, 1, 50, 89, 58,202, 21,183,117,171, 87, 29, 72, 46, 40,212,143, 3,144,104,100,157,151,207,153, 51, 7, 0,
- 4, 0,150,166,164,164,196,248,248,248,120, 53,102,209, 50, 6, 91, 78,229,168, 1, 28,123, 59, 80,186, 64, 81, 20,235,101,205,
- 78, 79,235,233, 75,111,219,114, 42, 71,109, 33,173, 92, 83,148,126,243,121, 94,229,229, 93,135,194, 79,179,166,142,125,155,114,
- 17, 39,134, 10,236,153, 83, 70, 80, 51, 93,186,116,113, 37,136, 98,143, 66,249,179, 7, 51,102,206,154, 96,201, 85, 69,118,113,
-145,183, 33,221,252, 5,209,209,209,105,104,225,202,208,106, 60,207,201,201,233, 23, 22, 22,118,153, 97,152, 23,124, 19, 10,139,
-138,163, 2,130,230, 48,165,165,101, 49,178,132,115,198,196, 82,187,119,239, 97,244, 96,223, 78,254,167,191, 92,183,193, 97,192,
-252, 69,236,231,215,111, 0,148, 30, 25, 55,111,128,226,107,233,205,119,174, 22,148,233,116, 99, 97,138, 10,111,130, 9,255,122,
-107, 86, 83, 90,228,111,142, 17,104,196, 25,222,232,202,120,122, 56, 95,110,239,213,122,168,155,139, 29, 0, 32, 37, 45, 23, 41,
-105, 57, 87, 82, 82,115, 2,155, 81,188,141, 45,175,172, 77, 42, 77, 84,135,112, 96,140, 75, 42,253, 2,167,141,141,205, 3, 54,
-155,237,210,146,214,160, 40, 42,183,168,168,200,223,200,114, 78,114,119,119,223,144,145,145, 17, 78,211,244,130, 22,170,253, 6,
- 57,107,146, 74,147,108,222, 16,198,160,237, 4, 0, 4,155,103, 76, 82,233,186,156,157,196, 98,241,110, 14,135,227, 86,243, 59,
-214,248, 96, 81, 20,197,210,233,116, 2,138,162, 88, 0, 8,146, 36, 13, 28, 14, 71, 77, 16,132,193, 96, 48,100,106, 52,154, 89,
-248, 35,224,104, 83,117,111,118,160,175, 22, 90,104,192,162,117, 13, 0, 18, 19, 19,219, 73, 36,146,137, 4, 65,140,103, 24,198,
-187,188,188, 92,179,108,217,178,232,147, 39, 79, 42,220,221,221,223, 26, 49, 98, 4, 17, 27, 27,139,184,184, 56, 70, 46,151,159,
-170,182, 98,165,180,176, 47,145,124, 62,235, 29,107,107,114, 4,195,160, 11, 24, 16, 4,137,199,101,101,116,164, 82, 73,253, 80,
- 45, 24, 91,218, 63,107,240,110,235,214,173, 15,164,165,165,113, 26,179,164, 54, 86,247,250,248,234,243,142, 75, 3,250,246,125,
-251,183, 95,126, 57,243,217,218, 39,171,234,238,155, 59, 70, 50, 99,210,236,249, 95, 29,251,246,155,207,182,255, 84,178,223,152,
-114,250,249,249,121, 18, 4, 49, 17,128, 47,195, 48,109, 25,134, 16, 16, 4, 83, 66, 16,196, 19, 0,177, 90,173, 54, 34, 62, 62,
- 62,251, 53,234,254, 42, 79,184,141,113,214, 38,149, 6, 69,117,166, 0,198,200,164,210,255,237,114,154, 56, 77,156, 38,206,255,
- 63,206,255,101,124,208,192,255,140,139, 12, 95,131,148,212,156,192,148,212, 28,180,109,219,150, 73, 74, 74,106,145, 72,107,108,
-144,166, 40,234, 71,165, 82,249,227,235,144,200,229,242,174,127,113,227, 29, 75, 75, 75, 59,246,103, 18, 86, 11,169, 85,213,175,
- 87,197,227,138,138,138, 30,198, 30,172,211,233,254,138,182, 33,170,173, 89, 43, 27, 59, 96,232,208,161, 25, 58,157,238, 26,128,
- 44,130, 32,172, 0, 20,235,116,186,203, 6,131,161, 32, 41, 41,169,235,230,205,155,107, 34,223,175, 6,240,224, 21,203, 65,107,
- 52,212,209,220, 92,234,232, 95, 80,199,163, 90,173,118,161,141,141, 77, 27,181, 90,205, 83,171,213,220,186,139, 15,132, 66,161,
-172, 41,135,248,186,176, 50, 39, 14,114,217, 37, 54, 86,230, 68,125, 33, 5,107,103,156, 86, 85,198,181,183,118,198,105, 99, 11,
- 22, 19, 19,147,210,165, 75,151, 35, 36, 73,186, 51, 12,227, 0, 48,150, 12, 3, 25,195, 48, 69,108, 54, 59, 39, 62, 62, 62,231,
-111,116, 19, 82, 27,104,122,163, 65,171,253,195,239,208,180,186,208, 4, 19, 76,248,231,160, 81, 31, 45,118, 75,153,146,146,146,
- 8, 83,123,154, 80, 87,108, 53,181, 51, 35, 35, 67, 3,224, 78,245,171, 62, 30, 0, 24,249,119,175, 96, 94, 94,158,127, 99,251,
-140, 21, 89, 64,149,207, 22, 16,215, 96,116,246, 21,219, 75,202,177, 61,252,211,150,150,237,209,163, 71,153, 48,114,138,221, 4,
- 19, 76, 48,193,132,191, 12,175,111,209, 50,193, 4, 19, 76, 48,193, 4, 19, 76, 48,161, 65,236,169, 35,184, 94,176,110, 17,104,
-124,229, 64, 75,230, 94, 95,101,245,193, 53, 19,167,137,211,196,105,226, 52,113,154, 56, 77,156,255, 58,206,127, 42, 94, 18, 89,
-255, 13,152,150,190,154, 56, 77,156, 38, 78, 19,167,137,211,196,105,226,252, 55,136,172,250, 47, 0,166,169, 67, 19, 76, 48,225,
- 95,140,147, 39, 79, 26,149, 84,244,157,207,246, 6,137,197,146,101, 21,138,178, 13, 63,110,156,113,166,230,255,193,193,193,148,
-169, 21, 77, 48,193, 4,188,138, 51,188,135,135, 75, 7,146,162,123, 51, 12,201, 98, 72, 70, 79, 40, 84,199, 83, 74, 74, 94, 8,
- 59,224,234,234,106,197, 33, 49,146, 96, 24, 17, 65,208, 20,205, 34,111,167,166,102,199,183,160, 96, 60,137, 68, 50,135,203,229,
- 14,209,106,181, 46, 36, 73,102,107, 52,154,107, 74,165,114, 7, 94, 14, 92,248,255,134,118,237,218, 77,186,113,227,134, 85,159,
- 62,125, 52, 66,161,208,160, 82,169,216,151, 46, 93,226, 15, 27, 54,172, 52, 57, 57,249,149, 86, 36, 74,165,210, 65,123,247,238,
-245, 8, 12, 12, 68,219,182,109, 43, 39, 78,156,200, 13, 8, 8,224,206,156, 57, 51, 53, 55, 55, 55,170,133,116, 29, 8,130, 56,
- 76, 16, 4,139,166,233, 16,252, 17,186,225,207, 6, 73,146,228, 44,130, 32,198, 50, 12,227, 73, 16, 68, 10,195, 48,103,104,154,
-110, 42,112,107, 83,120, 27,192,112,146, 36,253, 1,128,166,233,104, 0,145,128,241, 43,239,254,155,156,102,102,102,126, 0,160,
- 84, 42, 99,254, 44, 78,130, 32,252, 0,128, 97,152, 87,229,156, 46, 20, 10,223, 7, 0,149, 74,245, 61,140, 72, 7, 85, 31,204,
- 46,111,198,127,229, 83, 0, 64,244,114,111, 0, 64, 75,182,137, 15,159, 18, 45,249,174,134,248, 90,194,209, 0,134, 79,158, 60,
-121,221, 15, 63,252,176, 28,192,217,191,162,227, 59, 58,186,238,216,244,205, 30,233,199,115,222,219,128,170,140, 16, 77, 95,144,
-192,155, 60, 22,107,148,150,162,126,137, 7, 78, 2, 96, 91, 91, 91, 79,226,241,120,253,180, 90,173, 19,155,205,206,211,106,181,
-183,202,202,202,142,161,137, 12, 8, 70,183,107, 2, 36, 58, 37, 28, 9,250,143, 60,111, 12, 9, 13,215, 12,249,132, 15, 74,254,
- 6,183, 81, 18,192,252,234,186,238, 67,227,225, 60,154,186,249,124, 44,149, 74,199, 42, 20, 10, 37,139,197, 98, 80,181,234,185,
-234, 79,213,126,130,166,233,194,226,226,226,144,230,184, 68,110,104,207, 19, 17,135, 41, 61, 84, 6, 13,243, 81,101, 22,158,138,
- 93,209,139, 1, 66, 24,192,157,100,145,118, 52, 77,231, 1,136, 34, 13, 56, 95,145,139,164,191,233,224,222,170,186, 93, 91, 87,
-111,115, 0, 56, 0,136, 5,240, 49,128, 10,147,254,249,175,161,190, 51,252, 5, 0,121,181, 66,171, 78,184,251, 1, 65, 65, 65,
- 55, 61, 60, 92, 58,140, 31, 51,110,221,135,179, 62, 34, 88, 44, 18,113, 79,158,176,223, 13,153, 62, 84, 34,145, 56,139, 53, 26,
- 31, 16, 4,173, 20, 8,226, 20,138,178,156,147,199,126, 48,247,110,223,158,162, 40, 26,187,118,127, 55,236,212, 79,225, 75,140,
- 20, 91,237, 28, 29, 29, 15,135,134,134, 58,142, 26, 53,138,229,232,232,136,244,244,116,171, 31,127,252,177,253,246,237,219, 39,
-148,148,148,132, 0,120,254, 10,149,237,235,104, 77, 14, 53, 23, 18,131, 81, 78,161, 92,143,159,243, 85,184, 2,224,151, 87,109,
- 61,165, 82, 57, 87,169, 84,246,232,214,173, 27,179,111,223, 62, 98,218,180,105, 12, 65, 16,132, 74,165, 58, 8,224,149,132,150,
- 72, 36,250, 54, 48, 48,208,203,203,203, 43, 37, 57, 57,121,248,137, 19, 39, 34,167, 78,157,234, 41, 18,137, 18, 1,180,107, 33,
-221, 1,185, 92,222, 69,165, 82,193,197,197,101, 31,128, 55,254,130, 78, 68,176, 88,172, 51,206,206,206,204, 87, 95,125,117,182,
- 75,151, 46, 14,197,197,197,134, 79, 63,253,116,200,221,187,119,135, 81, 20, 53,170, 5, 98, 75, 66, 16,196,110, 7, 7, 7,219,
- 13, 27, 54, 36,117,237,218, 53,150,207,231,243, 18, 19, 19,205, 22, 46, 92,184,224,249,243,231, 19, 24,134,153, 5,180,104,128,
-144, 16, 4,177, 91, 42,149,218,174, 91,183, 46,221,223,223, 63,142,203,229,114, 19, 19, 19, 69,139, 23, 47,254,248,233,211,167,
-175,196, 73,146,228,174, 30, 61,122, 72,150, 47, 95,158,208,190,125,251, 59, 44, 22,139,151,157,157, 77,174, 88,177, 98,206,213,
-171, 87,131,105,154,254,240, 85,202,105,111,111, 47, 89,177, 98, 69, 66, 64, 64,192, 93, 46,151,203,125,246,236, 25, 25, 26, 26,
- 58, 39, 41, 41,201,232,114, 90, 91, 91, 15, 36, 8, 98, 79,126,126, 62, 27, 0,156,156,156,186, 91, 88, 88,108,175,155,211,178,
- 38, 20,133, 94,175, 47, 87,171,213,147,139,139,139, 27, 12,132, 59, 45,108,219, 72, 0,216,174,171,217,174,122,111,110, 27,216,
-117,222,152, 74,251, 57, 86,197,197,219, 84, 57, 99, 12, 0, 76,170, 78, 21,190,169, 18, 96,179,217,180,159,227,199, 76, 76,126,
-139, 66,198,140, 30, 52,104,208,138,168,168,168,239, 6, 12, 24,176,248,200,145, 35,246, 89, 89, 89, 95,254,242,203, 47,174,239,
-188,243,206,180,159,127,254,121,125, 81, 81,209,169, 63,171,243,243,184,124, 62, 65, 18, 16, 10,204, 44,140, 57,158, 67,146, 65,
-119, 70,143,126,255,251,103,207,252,183, 63,125,234, 81,233,228,212, 99,222,188,121, 14,227,198,141, 35, 93, 93, 93,145,148,148,
-100,115,228,200, 17,159,239,191,255,126,108,105,105,233,124, 0, 25,175, 35,178, 42, 75,209, 73,163,133, 63,195,192,170,246,130,
- 37, 80,202,215, 33,154, 73,192,227,191,129,216,250,226,192,129, 3,203,147,146,146,176,126,253,122, 0,216,209,194,243, 23,142,
- 30, 61,122, 68,120,120,184,240,228,201,147,194,110,221,186,193,209,209, 17,213, 15, 83,181,129,169, 61, 60, 60,140,107, 51, 26,
-155,182, 70,206,120, 35,174,248, 34,190, 29,151,191, 94,232, 2, 67,175,209, 94, 99,131,166,249,195,210,206, 12, 2, 49, 27,165,
-114,133,239,179,232,172,192,235, 39,146,190, 76,122, 40,219, 80,153,137, 47,208,120, 76,190,255, 23,216,216,216,236, 75, 77, 77,
- 29, 40, 18,137, 94,248,127, 74, 74,138,159,151,151, 87, 25,128, 69, 45, 21,110,118,118,118, 71,105,154,214,200,229,242,247, 0,
-192,220,220,252, 7,145, 72, 36,201,203,203, 91,242, 87, 61,200,212,160,190, 22,249, 31,183,104,213,250,107, 53,148,235,144, 32,
- 41,186,247,135,179, 62, 34, 38, 78,122, 39, 63, 41, 37,149,102,115,120,147, 46, 93,190,108,214,161, 67, 7, 82,179, 99, 7, 12,
- 50, 25,244, 11, 22,244,186,118,237,154, 62,120,210, 20, 21,135, 69, 28,240,244,112, 55, 59,126,236, 71,199,240,211,167,122, 3,
-104, 78,104,241, 28, 29, 29, 15,223,184,113,195,217,195,195, 3,165,165,165, 72, 79, 79, 71,101,101, 37, 38, 76,152,192,233,221,
-187,183,243,248,241,227, 15,151,149,149,245,105,129,101,203,161,173, 11, 59, 98,214,244,113,237,134, 13,237, 45,114,118,109, 3,
- 38, 95,141,172,228,167,221, 34,110,220,157,119,224,116,228,243,164, 50, 38, 8, 13,231, 70,106, 18, 69, 69, 69,159,141, 29, 59,
-246,244,192,129, 3,237,248,124, 62,164, 82, 41, 49,106,212,168,194,220,220,220,149,175,172, 90,170, 83,216,144, 36, 73,213,125,
-111, 32, 61,144, 49,112,145, 72, 36,144, 72, 36, 0,224,252,186, 79,158, 86, 86, 86, 59,204,205,205,199, 43, 20, 10, 21, 73,146,
- 12, 65, 16,140, 86,171, 21, 74, 36,146, 71, 9, 79,159, 75, 53, 26, 77,219,141, 91,191,255,102, 80,223, 46, 22, 87,175, 94,197,
-184,113,227,152, 43, 87,174,204, 50, 54, 79, 29, 65, 16,187,199,142, 29,171, 92,182,108,153, 58, 41, 37,221, 57,225,121, 10, 33,
- 18,240,104, 91, 91, 91,206,189,123,247,216, 91,182,108, 17,172, 88,177, 98, 55,195, 48,227, 91,208,158,187,223,121,231, 29,221,
- 39,159,124,146,247, 44, 41,213,254,113, 66, 18, 35, 22,112, 12,182,182, 54,172,187,119,239,210,175,194, 73,146,228,174,207, 62,
-251, 76, 49,107,214,172, 18,121,113,153, 99,137,162,130,225,115, 88,122, 71, 71, 71,246,217,179,103, 53, 71,143, 30, 37,223,127,
-255,253, 93, 52, 77, 7,183,160,125,119,141, 26, 53,170, 60, 52, 52,180, 52, 49, 37,205,241,113,252,115,152,241, 57,122, 7, 7,
-123,214,253,251,247,117, 27, 55,110, 36,215,172, 89, 99, 84, 57, 69, 34,209,161, 19, 39, 78,176,207,158,173,186,247,253,246,219,
-111,164,167,167,167, 89,221, 99, 84,106, 13, 72, 2, 40, 42, 42, 50, 11, 8, 8, 56, 4,224,165,224,190,254, 43,159, 98, 90, 24,
- 48,119,238,220,188,150,118, 22,127,167,121,205, 30, 67,125,231,205,108, 81,206, 24,195,102,179,233,247,223,127, 63,191,254,126,
-181, 90, 77, 0, 24,133, 47,141, 23, 91,195,135, 15,255,252,194,133, 11,109,142, 28, 57,178,249,232,209,163, 90, 0, 16, 8, 4,
-182, 63,254,248,227,250, 9, 19, 38, 96,194,132, 9,203, 78,157, 58,245,167, 9, 45,138,161,116, 0,192, 23,240,249, 79,159, 62,
- 37,188,189,189,155,140,184,175,163,233, 7,223, 63,123,214,245, 63,222,222,221,138,105,186, 45,119,216,176,138,133, 11, 23, 22,
- 41, 20, 10,164,167,167, 67,167,211, 97,218,180,105,172, 1, 3, 6, 72, 39, 76,152,176,173,188,188,252,109, 0, 58, 35,250,228,
- 70,103,103,231, 15,202,202,202, 42,106,172, 58,125, 66, 40,118, 63, 63, 3,191,115, 91, 61,143,203, 50,112, 71, 46,160,137, 43,
- 59,136, 74,111, 15,252, 10, 0, 92, 37,100, 45,124, 24,104, 16, 22, 46,240,160, 56, 88, 99,231, 34, 28, 36,203, 80,173,170,204,
-108, 82, 44,189, 45, 18,137,198, 84, 86, 86,158,170, 30,156,219, 5, 5, 5,225,238,221,187, 0,208,187, 90,104, 13, 34, 73,242,
- 93,154,166,247, 2,104, 42,149,219,188,209,163, 71,191, 25, 30, 30,110, 14, 0,167, 78,157,130, 94,175,135,167,167, 39,184, 92,
- 46,120, 60, 30, 56, 28, 78,109,118, 16, 35,225,100,103,103, 11, 91, 75, 14, 36,214,162, 97,139,119,142,102,187,117,176, 64, 33,
-245, 4,197, 76, 41, 12,140, 6, 92, 27, 17,218, 7, 90,193,127,232, 32,242,252,174,184, 37,231,191, 77,232,170, 36, 49, 18, 25,
-208,252, 93, 70,118,146, 36,249,177,177,177,144, 74,165, 47,252,159,197, 98, 1, 64,191, 87,160, 92,150,146,146, 18,240,240,225,
- 67, 12, 28, 56,112, 89,167, 78,157,222,186,121,243,166,163, 92, 46,199,192,129, 3,183,101,103,103,159,253,171,235, 84, 87,139,
-252, 83, 76, 93,100, 61, 37, 57,160,234, 41,152,100,177, 88, 36, 82, 83,210,245, 3, 7, 14,158,154,153,153, 41,238,209,163, 7,
-201,225,112, 80, 25, 21, 5,245,253,251, 16,139,197, 24, 59,118, 44,231,214,173, 91, 22, 22, 98,139,153,105,169,105,229, 44, 22,
- 9,134, 33,155,245,121,144, 72, 36,115,150, 44, 89,226,232,229,229, 5,131,193, 80, 27,209,220, 96, 48, 32, 43, 43, 11, 98,177,
- 24, 33, 33, 33,246,102,102,102,115,140,172, 71,235,118,158,246,209, 55, 34,119,191,177,240,195,225,162,118,102, 87, 33,202,154,
- 15,241,169,255,192, 39,247, 18, 66,199,244, 16, 93,249,118,153,127, 27,169,117,116, 29, 19,171,209,208,104, 52,191,198,197,197,
-205,188,121,243, 38, 13, 0,215,175, 95,103, 18, 18, 18,102,189,206, 83, 40, 77,211, 40, 45, 45, 5, 77,211,172,234,237,154,247,
-255,215,254, 96, 97, 97,177,235,173,183,222,122, 39, 35, 35, 67,120,241,226, 69,155,204,204, 76,219,180,180, 52,187,118,237,218,
-177,215,175, 95,127, 65,173,209,177,244, 20,163, 53, 80,250,242,188, 39, 79, 82, 74, 10, 10,162,247,239,223,175, 34, 8, 98,172,
-145,223,241,182,147,147,147, 77, 88, 88, 24, 8,142, 89,247,246, 62,157,188, 88, 28,161, 37,201,225, 89,170, 84,106, 42, 53, 53,
- 53, 43, 44, 44,204,189, 75,151, 46, 82, 84, 77,175, 25,197, 41,149, 74,109, 63,249,228, 19,176,249,230,126,157,187,248,183,225,
-241, 69,230, 44,142,208,188, 71,143, 30, 3, 82, 82, 82,114, 67, 67, 67,157,186,117,235,214, 34,206,110,221,186, 73,222,127,255,
-125,131, 64,104, 30,224,225,225,233,211,185,163,207,136,118,237,218,141, 97,179,217, 6,153, 76,150, 17, 18, 18,226, 52,114,228,
- 72,135,150,112,218,219,219, 75, 66, 67, 67, 13,174,173, 60, 3, 3,223, 28,218,147, 43, 52,183,100,243, 68, 86, 74,165,154,122,
-246,236, 89,198,210,165, 75,157,252,252,252,236,141,225, 84, 42,149, 28, 91, 91, 91,248,250,250,162,131,167, 39,202,202,202, 16,
- 30, 30,142, 3, 7, 14, 96,239,222,189, 56,118,236, 24,186,246, 25, 10,115,115,115,228,230,230, 66,161, 80,112,254,219, 29,138,
-250,206,155,217,174,253, 96,212, 71, 31,125,148,251,254,251,239,231, 11,133, 66,186,254,203,218,218,154,154, 60,121,114, 65,200,
-226,173,163,106,166, 22,155,177,100,197, 70, 70, 70, 38, 31, 57,114, 4, 29, 58,116, 64, 96, 96, 32, 15, 0,230,204,153,195,155,
- 48, 97, 2, 78,156, 56,129, 83,167, 78,197,123,121,121,221, 6, 48,218,152,114,134,132,132,244, 9, 14, 14,254, 37, 56, 56, 56,
-102,226,196,137,123,102,205,154,245,194,200,149,151,155,253, 64,171,213,162,139,127, 55,179,213,251,126,159,220, 28, 95, 2,112,
-100,207,211,167, 7, 54, 60,121,146,177,172, 67, 7,171, 86,105,105,214, 7, 55,110,180,173, 73,210,173,215,235,145,149,149, 5,
-137, 68,130,201,147, 39,219,242,249,252, 16, 35,138,185,101,244,232,209,211, 51, 51, 51,197,223,127,255,189, 83, 76, 76,140, 52,
- 47, 47,207,233,231,107,151,237, 62, 93, 52,199,220, 82,204,227,229,202, 24, 2, 0,210,114, 33,122,154,138, 62, 12, 3,171,186,
-211,137,175, 4, 39, 8,133, 46,216,222,166,143,213,243, 79, 78,248, 77, 12,141,240,183,149, 56,241,195,154, 56,163,243, 87, 95,
-125,117,242,252,249,243,147,250,244,233,115, 26,128,176,129, 99, 4, 93,187,118, 13, 63,113,226,196,244,190,125,251,254, 10,192,
-183,209,167, 72, 23,151,177, 63,253,244,147, 77,205,182,173,173, 45, 4, 2,193, 75, 34,139,203,229,130, 36,201, 22, 87,111,237,
-143,147,216,214, 62, 26,196,149, 68,226,196, 87,177,248,106,216, 51,122, 93,175, 52,205,142,144,167,184,114, 34, 22,133,136,197,
-240,255,180,193,164,165, 93,134,152, 81, 88,243,119, 26,192,101, 50,217,187,253,250,245, 59, 57,124,248,112,205,195,135, 15, 33,
-147,201,224,236, 92,251,172,157,255, 10,148,214,102,102,102,112,117,117,133,151,151,215,164, 91,183,110, 57,234,245,122,164,165,
-165,161,176,176, 48,250,191, 81,167,186, 90,228,127, 12,245, 29,225, 47,188, 36,180,170,115, 11,221, 0, 0,134, 32, 42, 99,227,
-226, 56, 44, 30,111,202, 15, 71,143,242,185, 92, 46, 50, 50, 50, 16, 31, 31, 15,229,207, 63, 67,117,231, 14, 10, 10, 10, 80, 81,
- 81, 1, 7, 7, 7,236,222,183, 79,164,165,152, 25,207,158, 63,103, 49, 36, 83,215,223,160,193, 37,158,124, 62,127,200,184,113,
-227, 26, 21,100,185,185,185, 24, 62,124, 56,135,197, 98, 53,180,170,161, 62, 39, 33,181, 35,206,255,124,122,181,147, 19, 47, 30,
- 72, 90, 8,148, 71, 3,140, 6, 48,104,129,156,199,192,133,149,104, 85,241,148,184,188,122,170,163,179, 25,251,124, 3, 74,185,
-185,165,168,158,222,222,222,123,167, 76,153, 66, 2,192,160, 65,131, 8,111,111,239, 61, 0, 60,155, 56,231, 90, 51,131,228,221,
-146,146, 18, 76,152, 48,193,166, 77,155, 54,215, 38, 76,152, 96, 83,243,255, 87,229,172,177, 38,119,232,208, 65, 46, 16, 8,142,
- 1, 70,221, 96,107, 57,173,172,172,118, 12, 31, 62,124,252,209,163, 71,185, 0,112,227,198, 13,156, 63,127, 30, 79,158, 60, 65,
- 98, 98, 34,237,239,239,111,183,117,239,201, 93, 59,190, 59,180,101, 76,239, 46,210, 1,221,253,125,196, 21, 37, 21, 14, 14, 14,
-189, 25,134,241, 52,178,156,195, 87,174, 92, 25,159,144,156, 97, 73,178, 57,108, 46,135,205,183,176, 16, 57, 54,112,168,183, 0,
- 0, 32, 0, 73, 68, 65, 84, 72,204, 69, 46,214,102, 2,103, 62, 73,136,149, 74,101,254,177, 99,199,104, 0,195,141,229, 92,189,
-122,117,106, 66, 82,134, 21, 65,178,217, 28, 54,135, 43, 22,155, 89, 13, 11, 28,216, 13, 0,184, 96,184, 10,133,162,224,192,129,
- 3,186,150,112, 46, 95,190, 60,174,184,180, 66,194,230,112, 56,108, 54,171,182, 45, 69, 66,161,157, 25,159,207,211,104, 52, 57,
-223,124,243,141,170, 37,156, 43, 87,174,140,127,150,156,105, 77, 18, 4,139, 32, 72,182,133,185,200,198,198,210,204,206, 78, 44,
-180, 53, 99,179,120, 10,133, 34,231,240,225,195, 70,113,234,116, 58,110, 65, 65, 1, 18, 18, 18,224,218,173, 27,174, 94,189, 10,
- 55, 55, 55, 76,152, 48, 1,239,188,243, 14,132, 66, 33, 6, 5,116, 66, 88, 88, 24,146,147,147,161,211,233,248, 13,113,214,248,
- 73,213,135, 84, 42,125,216, 92,231,169,119,238, 11,229,244,115, 4,179, 93,251,193,168,186, 2,171, 49,126,107,107,107,170, 33,
-107, 87,125,206,225,195,135,127,254,243,207, 63,183, 57,124,248,240,168,144,144,144, 95, 15, 31, 62,140,158, 61,123, 34, 33, 33,
- 1,238,238,238, 56,120,240, 32,222,121,231,157, 95,183,109,219, 54,234,225,195,135, 93, 60, 60, 60,150, 52,199, 57,113,226,196,
-217,126,126,126, 81,249,249,249, 1,197,197,197,190,225,225,225, 51,198,142, 29,155, 58,105,210,164,193,181,130, 81,175, 63,122,
-225,220,105,140, 24, 53, 14,237, 59,250,238,154,182,228, 72,167,102,174, 77,230, 9,176,231, 64, 94,158,236,168, 90,173,156,192,
-225,152,153,253,254,187,245,169,239,190,179,173,155, 89, 32, 39, 39, 7, 35, 71,142,228,112,185,220,190,205,148,243,171, 49, 99,
-198, 76, 8, 15, 15,151,212, 88,117,238,220,185,131,199,143, 31, 35, 61, 61, 29,165,165,165, 24, 60,171, 2, 31,173,175,226,254,
-104, 61,131,161,115, 24,209, 43,222, 67,106, 33,116,131,163,141, 5,251,246,140,111,218,207,249, 96, 87, 7,182,216,154,131, 31,
- 22, 39,162, 40, 77,115,170, 17, 78, 34, 32, 32,224, 72,112,112, 48,161,213,106,161,213,106,181, 0, 26,140,234,235,236,236, 44,
-232,220,185, 51,102,205,154, 69, 90, 88, 88,108,107,172,156,149,149,149,154,200,200, 72,132,132,132, 96,254,252,249,104,219,182,
- 45, 36, 18, 9, 56, 28, 14, 14, 29, 57,110,251,206,140, 15,219,189,209,167, 95,151, 14,111,244,236, 92,174, 97,117,227, 8, 37,
-239, 55, 98, 13,105,176,238, 21,246, 15, 17,151,246, 27,182,143,202,166,239, 29, 84, 86,124,250,238,215, 79,159,221, 44,120,178,
- 36,120, 79, 28,243, 91,175,162, 35, 31,103,162, 64,159,128,190, 19, 90,193,195, 79,178, 64,228, 10,239, 87,109, 79, 35,209, 34,
-206, 78,157, 58,245,185,119,239, 30,191, 95,191,126,200,200,200, 0,135, 83,251, 60, 69,189, 78, 57, 87,174, 92,201, 87,171,213,
-120,244,232, 17,166, 78,157,154,163,211,233, 22,188, 78, 57, 91, 98,209,170,209, 34,255, 99,216, 83,239,149,215,152, 69,107, 37,
- 0,232,105,156,159, 50,117,134, 50, 34, 34,194,140,199,227, 33, 35, 35, 3,121,121,121, 56,116,224, 0, 53,200,222,190, 60,208,
-217, 89,113,232,192, 1, 70,171,213,130, 97, 24,120,123,123, 99,252,248,241,194,183, 39, 76, 42, 36, 20,170,227, 70, 76,243, 56,
-213,204,175,207,152, 49,227,165,253,159,126,250, 41, 44, 44, 44, 64, 16,132,163, 17,149, 11,158,183,114,140,139,196,195,170,128,
-201, 63, 84, 12,150, 0, 96,155, 3,108, 11, 64, 96, 9,240,205, 1,158, 25, 52, 15,163,138, 73, 38, 48,125, 92,223,247,156, 1,
-180,100,170, 7, 82,169,116, 89, 84, 84,148,221,195,135, 15, 25,133, 66,129,188,188, 60,102,221,186,117,118, 82,169,116,217,171,
-254, 34,185,185,185,171, 71,140, 24, 81, 48,117,234, 84,203, 75,151, 46,185, 78,157, 58,213,114,196,136, 17, 5,185,185,185,171,
- 95,231,151,230,114,185,172, 39, 79,158, 88,175, 89,179,230, 29, 0, 15, 58,118,236, 40,119,118,118,126,128, 42,167,201, 38, 97,
-110,110, 94, 43,178,106,172,107,108, 54, 27, 28, 14, 7, 82,169, 84, 91, 92, 92, 76,245,125,195, 83,232,109, 73,234,165,124,174,
-208, 90, 40,112, 49,183,176,236, 33,151,203, 99, 9,130, 72, 49,114,138,207,175,123,247,238, 28,138,225,208, 31, 77, 25, 36,157,
- 51,125,160,253,206, 53,239,187,125,179,250, 3,231,175, 86,204,244, 94,253,217,228,129, 36, 77,171,221,221,221, 29,107, 28,218,
-141, 48,159,251,119,237,218,149, 77,131,131,132,231,233, 5, 25,217, 57,229,111, 14, 8,168,181, 92,118,240,243, 15,180,179,179,
-235,231,237,237,221,149, 32, 8,163,150, 36, 11,133, 66,191,246,237,219,179, 73, 22,135,176,145,152,187,154,139,133, 14,181, 83,
- 40, 86, 86,189,172,237,236,130, 73,134, 41,115,114,114,178, 23, 10,133,126, 45,168, 59,155, 6, 23, 14,246,214,150,118,182, 86,
-226,192,129,189,219, 6,244, 10,104,215,169, 71,207,128,142,111,116,125,155, 48, 24, 20,158,158,158,246, 53, 78,242,205, 88, 90,
- 5, 71,143, 30,197,154, 53,107,208,185, 85, 43, 56, 59, 59,195,222,222, 30,119,238,220,193,189,123,247, 32,145, 72, 80, 88, 88,
-136,141, 27, 55,226,204,153, 51,208,233,116,230, 45,237, 79,198,136,173,166, 96, 48, 24,200,250, 2,171, 49,126,161, 80, 72,215,
- 56,201, 55,134,200,200,200, 35, 53,150,172,143, 63,254,184,207,214,173, 91,127,125,250,244, 41,196, 98, 49,238,221,187,135, 25,
- 51,102,252,186,109,219,182, 62, 31,126,248, 33, 14, 28, 56,128,212,212,212,125, 77,241, 77,156, 56,113,197,204,153, 51,191,185,
-121,243, 38,233,224,224, 0,137, 68,130, 49, 99,198, 96,223,190,125,108,131,193,176, 63, 56, 56, 56, 38, 56, 56, 56,134,202,186,
-242,249,201,189,235,238,196,197,198, 96,246,188, 79,120, 90,131, 62,212,136,234, 51, 42,177,184,220,208,175, 95,241, 9,189, 94,
- 57,145,203, 53,179,140,137,177, 62,191,127,127,173,216, 10, 11, 11,131,165,165, 37, 80,229,192,140, 38,172, 58, 31,156, 57,115,
-166,246,126,104, 99, 99, 3, 30,143, 7, 46,151, 11, 14,135, 3, 22,139,133,107,187, 68,248, 46,172, 74, 95,124, 23, 70,224,202,
- 14,162,242,117,126, 59, 51,103,248, 74, 28,120, 49,255, 57,216,177,139,239, 96, 27,220,249, 49, 31,235, 70, 60,204,190,119, 66,
-182, 80, 93,136, 77,141,156,246,198,167,159,126,218,161,176,176, 16,247,239,223,199,253,251,247, 27,179, 0,169,207,157, 59,247,
-101, 69, 69, 5, 60, 60, 60, 48,122,244,232,126, 0,186, 53,114,221,160,107,215,174, 24, 57,114, 36, 6, 14, 28,136,206,157, 59,
- 67,171, 51,112,130,167,124,208,254, 73,170,204,121,221,198,117,102, 81,215,195,201, 95,127,189,201, 58,114,250,138,101,192,192,
-161,223,112,205,157,238, 66,104,227,100, 76, 61,149,148, 28,126, 78,195,176,231,231,121,228,246, 27, 83,197,135,206,111,247, 52,
- 55, 55, 39,162,239,199,232, 15,125,123, 34,211, 87, 52,186,240,238,143,114, 40,137,124, 12,158,238, 65,210,192,248,191,203,200,
- 46, 16, 8,182,222,188,121,211, 81,167,211, 33, 46, 46, 14,243,231,207, 87,191, 38,101,173, 1,196,213,213, 21, 55,110,220,192,
-228,201,147,213, 5, 5, 5,191,253,183,234, 84, 87,139,252, 83,192,174,163, 32,107,145,149,149, 85, 42,145, 72,156,219,183,111,
- 79,106,181,218,170, 41,137, 83,167,168,189,251,247, 95, 80,171,213,243, 0,112,119,236,220,185,203,217,197,101,224,148,144, 16,
- 66,175,215, 99,196,136, 17,188,136,136, 8,155,148,194,194,114, 35, 6,156, 23,190,111,218,180,105,216,186,117, 43, 0, 96,238,
-220,185,181,166,117,194, 8,135, 37,177, 37,134, 7, 6,117,181,200, 18,109,183,208,245,210, 87,180, 78, 54,191, 43,170, 16,118,
- 5,201, 99, 67,192, 2,173,211, 27, 18, 11,199, 62, 72, 78,244,233, 32, 44,150,187, 15,233,216, 31,123,175, 30, 30,174,164,212,
- 39,140,190,225,152,153,117, 23,139,197,120,240,224, 65,113,215,174, 93, 75, 25,134,177, 92,189,122,181,173,153,153, 89,247,215,
-104,251,180,231,207,159,247,235,221,187,247, 28,146, 36,135,208, 52,125,173,160,160, 96, 7,128, 52, 35,207,255, 8,192,114, 0,
-181, 79,150, 90,173, 22, 36, 73,130, 97, 24, 76,156, 56, 17, 97, 97, 97, 29, 30, 63,126,140,168,168, 40,235, 33, 67,134,220, 5,
- 80, 10,224, 61, 0, 13, 90,205, 20, 10,133,234,222,189,123,194,168,168, 40,208, 52, 13,107,107,107, 88, 88, 88,128,207,231, 99,
-204,152, 49,226,208,208,208,193,151, 47, 95, 46, 84,180,118, 99, 9,242,114, 42,249, 98,177, 57, 28,157,251,126, 56,233,221,167,
- 12,195,156,105,193,205,129, 39,100, 27,212, 4,165, 33,191,250, 98, 27,105,198,229, 18, 2, 46, 27,124, 90,137,207,191, 92, 75,
-112, 25,138,141, 22,206,207,115,185, 92,174, 57, 31, 90, 22,143,165, 55, 35,192,252, 25, 23, 7,139,197,226, 9,184,141,251, 99,
-112, 72,146, 36, 73,146, 11,192,232,164,125,124, 62,159,107,206,103, 26,229, 20,178, 8, 22, 65, 16, 60, 52,178, 18,205,207, 17,
- 76,141, 21,137, 55, 47, 69, 83, 87, 20,247,237,219, 23, 23,162, 30,224,212,249,107, 40,202,136,197,210,197, 31,163, 91,183,110,
-136,136,136,104,178, 76, 53, 62, 90,141, 89,151,165, 82,233,195,220,220,220, 55, 26, 59,183,169, 41,195, 70,172, 84, 47,243,127,
- 97, 9,255,149, 79,209,140,143,214,232,190,125,251,206, 62,122,244,168,246,173,183,222,226, 77,156, 56, 17,190,190,190,125,166,
- 79,159, 14, 0, 24, 50,100, 8,182,110,221,218,103,250,244,233, 56,126,252, 56,194,195,195, 53, 3, 6, 12, 88,124,227,198,141,
- 28, 84,173,232,124, 9, 52, 77,143,220,189,123,119,125, 75, 33, 12, 6, 3,244,122,189,147,193, 96,112,170,190, 23,225,155,111,
-182, 21, 93,185, 28,129,197, 75, 86,194,222,206,209,207,200, 62, 68, 76,251,228,147,162,131, 27, 55, 98,227,241,227,248,196,221,
-221,236,112,124, 60,174,168,213, 56, 17, 21, 85, 84,253, 61,205,250,102, 86, 86, 86,170, 34, 35, 35, 45, 78,156, 56, 1, 43, 43,
- 43,180,109,219, 22,214,214,214,224,112, 56, 32, 89, 66,176,184, 18,180,239,216, 29,192, 61, 0,128,187, 20,149,222, 30,248,149,
- 32, 80,202,144, 45,247, 41,226,187,161,181,173,139,224,230,236, 3,190, 86, 22,246, 92, 92,218,145,137,203,219,179,206,168,139,
-176, 25, 6, 60, 67,227, 62, 95, 93, 61, 60, 60, 80, 88, 88,136,200,200,200, 74,160, 81, 65, 6,154,166,191,220,185,115,231,167,
- 75,150, 44,225,123,123,123, 3,128, 31,128,251, 13, 29, 43, 18,137,224,236,236, 92, 43, 44, 39, 78,253,208,115,214,194, 15,133,
- 99,135, 14, 4,155,109,139,210, 74, 61,228,229,122, 72,108,197, 88,188, 48, 88,112,173,171,115,183,221,219,126, 56,167, 82,161,
- 27,240,242,253,128, 32,112,255,247,216, 95, 59, 9,188, 1,130, 4,178,200,235, 32, 64,160,130,208,131, 96,177, 24,138,162,144,
-153,153, 9,134, 97, 48,121,236,140,172, 15,214,133,219,247,153,172,128,107,123, 41, 8, 6,253,255, 46, 66,192,198,198,198, 79,
- 46,151, 35, 45, 45, 13, 83,167, 78,205, 41, 42, 42,186, 90, 89, 89, 57, 35, 55, 55, 23, 0,138, 95,129,178, 86,204,251,249,249,
-161,123,247,238,152, 48, 97,130, 64,169, 84, 6,123,122,122, 58,203,100,178, 94,127,101,125,234,107,145,127,148,208,106,240, 66,
-211,235,219,107,118,237, 66,229,181,107,224, 93,185,130, 19, 82,105,133, 90,173, 94, 4, 32,171,250,194,255,248,192,193,131,183,
- 71,253,246,155,133,246,233, 83,120, 62,126, 12,142,149,149, 95, 75, 11,176,127,255,126, 40, 20, 10,148,149,149, 1, 0,182,111,
-223, 14,133, 66, 1,131,145, 9,103,217, 92,244,113,180,119, 71, 62, 18, 65,179, 73,113,122,123,101, 79,177,218, 60,215, 57,211,
-161,178,140,116,198,211,140, 30, 34,149, 92,219,147, 96,105,161, 46, 82,194,185,119, 91,176,193,238,211,146, 50,214,204,251,179,
-217,236,226,231,207,159,143,108,215,174,221,121, 0,182,175,226, 15, 80, 15, 73, 5, 5, 5,243, 94,229, 68, 22,139,181, 60, 53,
- 53,213,126,223,190,125,115, 86,175, 94,205,212, 21, 90, 53,159,217,108, 54, 24,134,129,165,165, 37, 56, 28,142,195,157, 59,119,
- 28,122,244,232,241, 45, 77,211,126,141,212,147,241,245,245, 69,106,106, 42,216,108, 54, 44, 45, 45, 65, 27,116, 88,185,240, 67,
- 80, 44, 62,251,179,207, 62,243, 27, 55,110, 92,220,190,125,251,244, 22, 1,189,123,201,229,242, 39,179, 39, 79,137, 59,123,246,
-172,182, 58,196, 67,243,143,248, 12, 19,147,152,152,200,114,145, 58,176, 24,131,146, 22,113, 1, 65,236, 55, 12, 79,236, 8, 1,
-155,197,112, 9, 18,124,129,208, 50, 45, 59, 91, 78,211,116,130, 49,156, 52, 77, 71,167,166,166, 10, 29,236,109,216, 74,149,182,
- 66,200, 97,120,233,209, 15, 82, 90,251,119,245, 4, 0,117,244,189, 27,252,246, 62,194,244, 2,153,200,221,221,221, 40, 78,149,
- 74, 21,147,147,147,195,114,112,112, 96,103,100,101,159,179, 18,139,236, 44,172,172,122, 2,128,174,188,236, 30,169,209,200, 88,
- 28,182,131, 76, 46, 47, 86,169, 84,169,198,214, 61, 57, 57,153,237,228,100,207,186,116,229,231,243, 14,102,124,123,115, 30,219,
-130, 79, 16,132, 25,139, 80,112, 13,116,145,192,204,204, 62, 45, 59,187,152, 97,152, 70, 45,132, 27, 74,167,140,173,250,189, 86,
- 30,175,195,141,216,216, 88, 92,252, 53, 1, 34, 70, 11, 66, 93,134, 43, 7,190,199,228,207,150,188,182,223, 95,115, 98,235,149,
-172, 89,187,125, 30,214,227, 71, 94, 51,142,240,147, 39, 79, 94,121,228,200,145, 90, 7,148,132,132, 4, 12, 26, 52,168,102,154,
- 3,129,129,129,232,209,163, 7, 18, 18, 18,224,229,229,133,168,168, 40, 62,139,197,226, 79,153, 50,101,221, 15, 63,252, 16,217,
-172,221,127,207, 30,204,152, 49,163, 33,199,234,100, 0,106, 66,226, 93, 17,182,225,144,109,177,188, 8,133,178,252, 24, 99,219,
-129, 32, 8, 76,251,228,147,162,221, 90, 45,142,254,254, 59, 66, 68, 34,179,131, 73, 73, 24,209,163, 7, 58, 13, 26, 84,100,204,
-189,174,198,170,163, 86,171,193,225,112, 96, 97, 97, 1, 27, 27, 27,112,185, 92,176, 56, 82,176,121, 93, 64,114,185,240,239,219,
- 5, 27, 23,137,148, 83,135, 97, 27, 65,160,148,207, 67, 52,215,172, 81, 95, 29, 66,228,134, 49, 12, 3,133, 50, 11,215,107, 4,
-137,101, 43, 88,114,204, 57, 87,102,126,235,109,101, 97,207,197,197,109, 25,184,242,109,246,105,117, 62,150, 86,183, 5,221,196,
-131, 68, 39, 43, 43, 43,100,101,101, 33, 51, 51, 51, 30, 77, 59,248, 43, 19, 18, 18, 82,248,124,126, 7, 59, 59, 59, 0,240,104,
-236,193,156,166,233, 90, 63,172,195, 71, 79,218,250,245,243, 20,188,217,167, 3, 14,157, 95,139,255, 4,111, 3,135, 69,128,162,
-116,216,188, 53, 8,148,166, 2,193,163, 62, 32,250, 15,241,234,114,237,188,118,166, 94, 85,242,253, 75, 15, 2,108,172,249,250,
-157, 59, 86,124, 49,217, 9, 52, 97,101,107,107, 47,226,114,185,176,177,112,210, 46,153,181, 32,143, 97,152,218,235,134,195,226,
-234,201,114,107,149, 60,191, 66,104,197, 81, 1, 12,217,250,213,162,217,252,249,200,206,206,158,215,175, 95,191,117,229,229,229,
- 37,149,149,149,147, 1,192,195,195,163, 21, 73,146,124, 0, 77,205,142,180, 66,195, 97, 33,184,143, 31, 63,134,185,185, 57,114,
-114,114,234, 26, 95, 64,211,244,223,102, 17,192,223, 20,254, 0,162, 1, 56, 1, 24,129, 58,225, 29,200,106, 83, 93,255,136,136,
- 8, 38, 34, 34,162,127,237,224,197, 48,180,161,184, 24,140,166,170,109, 57, 28, 14, 3,160,238,138, 38, 51, 43, 43, 43,130,227,
-226, 2,130, 95,229,250,193,252,137, 75, 95,245,122,227, 66,203,208, 20, 88, 32,116, 96,234, 60,180, 84, 10, 8,172,181, 29,140,
-121,188,101,200,231, 89,213, 29,233, 0, 3, 3, 10, 52,171,133,197, 97, 42, 43, 43, 97, 48, 24, 36,109,218,180,185, 96, 48, 24,
- 36,213,131, 27,243,255,245,139, 82, 20,149,194, 98,177, 48,103,206, 28,212, 88,127,180, 90, 45,242,243,243,161,209,104,160,213,
-106,145,154,154,138,178,178, 50,104,181, 90, 60,121,242, 4, 30, 30, 30, 96,177, 88, 78, 77,220,204, 25,134, 97,224,234,234,138,
-214,173, 91,131, 69, 48,216,251,213, 10,124, 62,255, 67,188,227, 65, 99,255,142,205, 24, 48, 96,128,143,187,187,123, 0,155,205,
-166, 28, 29, 29,185,225,225,225,231, 40,138, 26, 3,227,239, 60,145, 97, 97, 97,173, 59,118,236,104,111,101, 97,174,231,243, 88,
-224,233, 43, 25,190, 70,206,176,149, 69,112,117,109,101,128,208,204, 43, 36, 36,132,106,204, 10,209, 16,231,162, 69,139,156,188,
-189,189, 45, 37, 86,230,149, 60, 14,171,144, 11,166,168, 44,246,254, 93, 0,224,217,217,171, 33, 48,235, 48,117,234, 84, 67, 75,
- 56,151, 45, 91,230, 97,103,103,103, 69,130, 41,167,116,186, 63,230,219, 53, 90, 57,193,225,168,192,229,117,157, 59,119, 46,209,
- 18,206, 79, 63,253,212,189, 67,135, 14, 86, 86, 22,162, 10, 54,135,149,199,165,233, 60, 1,232,124,142, 86, 87, 34,176,179, 85,
-194, 76,236, 31, 18, 18,210, 40,103,141, 53, 43, 52, 52, 52,171,158,240, 70,113,113, 49,212,249,113,224,230, 60, 69, 23, 49, 7,
-221,236, 36,224,243,249,181, 75,223, 27,235,174,141,249,104, 53, 36,182,140, 61,183,235,170, 38,166, 0,119,251, 60,172, 31, 55,
- 43, 55, 55, 23, 78, 78, 78, 77, 94, 79, 63,252,240,195,146,129, 3, 7, 22, 6, 6, 6,106, 47, 92,184, 0,130, 32, 16, 21, 21,
-133,156,156, 28, 4, 6, 6,130, 97,152,154, 85,109,136,137,137,193,144, 33, 67,254,143,189,235,142,111,170,122,223,207,189,217,
- 77,154,116,143,116,208, 66,161,165,180,133, 2, 66,217, 67, 80, 16, 80,148,249, 69,144,189, 5, 1, 21, 17, 80,145, 13,162, 40,
-178, 5, 4, 28,200, 20, 40, 2, 50, 75, 89, 5,202, 42,165,180,172,210,221,210, 38, 77,154, 52,251,222,251,251,163, 73, 12,165,
- 35, 41,160,226, 47,207,231,115, 63,201, 29,121,114,238,185,247,156,243,156,247,156,243,190,250, 78,157, 58,229,154,253,107,213,
-138, 81,163, 70,193,104, 52, 66,165, 82, 65, 38,147, 33, 62, 62, 30,177,177,177,140, 80, 40,236,199, 10,126,125,209,192, 49,179,
-219,197, 52,107,142, 53,171, 86,232,121,108,206, 82, 71,202, 43, 65, 16, 24,254,225,135,197,138, 22, 45,100,219,213,234,242, 17,
- 18,137,176, 97,118,182,231,149,163, 71,189, 13, 6,131, 93, 28, 22,171, 78, 80, 80,144, 85,100,113,185, 92,176,121, 62, 96,137,
-154,130,231,213, 3, 66,255,126, 56,117,149,175,115, 19, 97,159,216, 21, 71, 68,238,213,187,118, 16, 6, 99, 81,187,193,210,189,
-237,255, 39, 61, 33,172,135,205,230,246,128,100,216,196,222,145,223, 68, 52,244, 9,117,193,133, 93, 5,248,115, 77,206,239,218,
- 2,204, 3,112,183,182,114,110, 48, 24,180, 20, 69,129, 36, 73,176,217,108,219, 57,129,231,126,255,253,119, 92,185,114, 5,176,
-113,219, 83, 86, 86, 70,177, 88, 44, 8, 4, 2, 0,112,173,161,190, 3,135,195, 1,135,195,193,233,139,103,188,254,215,191, 15,
-113,254,250, 49,180,143, 29,130, 18,149, 1,133, 10, 3, 74,203,129,232, 86,115, 17,211,125, 31,110, 60, 40, 67,243,102, 49, 44,
- 22, 79, 52,188, 42, 62,237, 67,100,171,179, 48,160, 36,149,110,164,207,113, 57,124, 97,255,237,212, 51,187,111,220,218,177,246,
-224,221,118,173, 58,169,205,198, 4,168, 84, 42,134, 32, 8,102,250,216,217,247,183,143,146, 83,171,134,222,160,217, 58,193,189,
-191,177,170, 15,241,241,241, 57,239,229,229,117,210, 44,142, 66,196, 98,241, 57,169, 84,154,134,138,133, 30,251,243,243,243, 35,
-213,106,117,123, 84, 44,206,122, 84, 82, 82,242,170,217,242,244,168, 6, 75,216,102,165, 82, 57,141,162,168,183,204,219, 27, 20,
- 69, 53,207,200,200,136,106,222,188,121,106, 88, 88,216,181,176,176,176,195, 97, 97, 97, 7,194,194,194, 14,116,237,218,245, 91,
-139,187,135, 23, 60,108,248,148, 22,121,201,132, 22,204, 34,107,163,249, 19, 86,161, 5,224,116,229, 9,104, 38, 62,255,150,105,
-242,100,184, 31, 56, 0, 78, 70, 6, 70, 14, 31, 46, 17, 10,133,171, 80,225,163,169,189,171,171,235,154,121,243,230,137,189,151,
- 44, 65,192,153, 51,200,140,143,135,145,195,185, 92,151,212,105, 52, 26,176,217,108,171, 37, 70, 36, 18,129,162, 40, 84,101,242,
-125,170, 0,154,112, 33,183, 48, 13, 60,132,130, 6,163, 58,162,236,148, 52,228,254, 92,223,120,101,131,240,187,106,110,248,124,
-159, 54,190,171, 66, 58, 36,169, 9,182,138,231, 46, 64, 86, 86, 54, 40,208, 14,141, 55,107,181, 90,133, 90,173, 70,243,230,205,
-189,174, 92,185,210, 48, 54, 54,214,211,124,252,210, 51, 62,152,182, 1, 1, 1,187, 2, 3, 3, 31, 6, 4, 4,236, 2,208,214,
-129,223,110, 78, 76, 76, 4,139,197,194,188,121,243, 80, 86, 86, 6,131,193,128,146,146, 18,100,101,101, 65,175,215, 35, 39, 39,
- 7,119,238,220,129, 94,175, 71,102,102, 38,116,186,218, 59, 36, 52, 77, 67, 34,145, 64,171, 81, 97,221,162, 57,248,108,214, 12,
- 40,238, 37, 35, 39,175, 16,238,110, 34, 76,157, 58,149,229,225,225, 65,211, 52, 29, 74, 81, 84,119,154,166,215,219,243,156,108,
-222,183,179,193,193,193, 49,203,151, 47,143,154,179,104, 61, 87,194, 86, 49,124,177,128,230,137,249, 12,175, 73, 27,140,154,187,
-138,251,221,202,175,211, 47, 92,184,144, 11,251,156,119,146, 0,206,182,104,209, 34, 34, 55, 55, 55, 54, 50, 50,178,177,119, 72,
-125, 62, 95, 26, 88,202,149,214, 83, 50, 58,109, 18, 17, 88,175,227,250,245,235, 83,206,157, 59,151,231, 8,167, 72, 36,106,178,
-109,219,182, 24, 63, 63,191, 24,142,139,139,160, 92,161,216,105, 42, 87,239, 98,185,123, 8, 72,137,251, 27,251,246,237, 75,222,
-179,103, 79,129, 35,156,225,225,225,145,139, 22, 45,138,110,218,180,105,180,127,131,134,124,151,192,224, 18, 65, 80, 72,137, 75,
-211, 88, 62,130, 66,123,174, 89,179,230,218,133, 11, 23,236,226,100,177, 88, 38,146, 36,193,225,112, 32, 20, 10,113,228,200, 17,
- 76, 30, 51, 4,193,129, 94,104, 28, 25,137,110,147,166, 97,207,158, 61,214, 57, 60, 44, 22,171,218, 22,125,235,146,169, 7, 91,
- 72,137,100,108,104,146,140, 13, 77,146, 91, 72,137,228,106,197,150,249,124, 85,215,216, 85, 27, 85, 51,220,104,135,216,250,227,
-244,233,211,203, 70,140, 24,193,235,213,171, 23,146,146,146, 48,106,212,168,179,123,247,238, 5, 0, 36, 37, 37, 97,250,244,233,
-103, 79,156, 56,129, 9, 19, 38,224,213, 87, 95,229, 37, 38, 38,174,129, 29,190,127, 76, 38, 19,182,108,217, 2,147,201, 4, 87,
- 87, 87,120,122,122,162, 79,159, 62, 72, 73, 73,153,240,227,143, 63,166,177, 56,156,119,123,191,213, 31,135, 14,236,197,157, 91,
- 41, 19,182, 46, 30,230,176, 83, 96,146, 36,209,107,248,240,226,226,232,104,217, 86,165,178,124,180,135,135, 48,178,160,192,243,
-212,174, 93,222,118, 8, 53,130,162, 40,171,184,178,136, 14,203,198,230,249,128, 45,138, 1, 91,220, 10, 55,238,114,141,220, 56,
- 92,229,181,194,237,154,252,103,113,120,228,168,126,115, 26,160,223,156, 6,232, 59,179,254, 72, 97, 61,108, 18,213,195,196, 94,
- 31,132,118, 13,107,229, 6,101,145, 1,241,223,100, 62,210,150, 96, 9,128, 59,246,148,115,154,166, 83,115,115,115,193,227,241,
- 80,175, 94,189, 8, 0,150,121,129,155,199,142, 29, 59,101,254,252,249, 51, 0,204, 55, 31,115,237,218,181,107,180, 74,165, 66,
- 70, 70, 6, 0, 92,169,193, 26,108, 93,101, 40, 83,102,242,235, 7, 52, 69,108,147,241,240,240,104,134, 92,153, 30,121, 50, 61,
- 54,173,123, 27,201,137, 11,113,229,207,247,240,168,160, 0, 46,254,239,128, 50,233, 98,236,232,212, 7, 92,191,126,157, 72, 76,
- 76, 36,104,154,134,209,104,100,202,148, 74,230,234,217,179,208, 36, 36, 16, 18,137,132,232,208,186,147,106,235,194, 67,151,246,
-173, 62,123,197, 80,238,112, 71,253, 89,240,217,253,251,247,219,238,218,181,171, 43,128,207,154, 54,109,122, 33, 43, 43,171,221,
-153, 51,103, 26, 7, 5, 5,173,170, 43,169,197, 45, 68,102,102,230, 19,155,217, 45,132,222, 44, 26,122,153,197, 92, 95, 0,211,
-241, 12,171,236, 29,192,233,151,120, 50,252, 33, 84, 90,109, 88, 89,104,217, 58, 10, 67,152,135,135,216,104, 52,228, 28, 59,118,
-204, 64,146, 36,132, 66, 33, 70,140, 26, 69,174, 91,187,182,227,144,182,109, 79,142,123,237,181,195, 39, 79,156,104, 17, 23, 23,
- 7,134, 97, 64,146, 36,126,251,237, 55,141, 86,171, 41, 9, 14, 14,118,183,167,210,176, 45, 64, 74,165,210, 42,180, 20, 10, 5,
-252,252,252,236, 30, 58, 84, 43,113,252,196,145,100, 57, 67, 77,202,234,117,119,165, 97,105,193,219,113,165, 52,197, 86, 80, 70,
- 40, 52, 12,202,180, 96, 39,145,158,113, 35,194,223, 49, 60,232, 30,119, 39, 33,237,124,137,150,210, 58,180, 90,162,168,168,104,
-206,192,129, 3, 75,164, 82, 41, 33,145, 72, 16, 24, 24, 72,246,237,219,183, 56, 59, 59,123,126, 93,159,136,151,151,215,255,186,
-118,237,122, 48, 55, 55,119, 64, 66, 66, 66,232,153, 51,103, 6,116,237,218,245,160,151,151,215,255,236,164,216, 57,123,246,108,
- 53,143,199, 67,155, 54,109, 80, 86, 86, 6,243, 42,159, 26, 55,123,134, 72,185, 92, 46, 54, 44,255, 2,159,205,154, 1, 89, 90,
- 18,110,156, 61,134,211, 5, 4,230, 46,250, 26, 92, 46,183, 78,190,190, 26,249, 8,155, 54, 13, 16,223,158, 62,106,112,222,167,
-179,102,137,175, 93,187,198,153,242,193,116, 38, 51, 95, 6, 94,175, 21, 44,116,158, 67, 94, 87,251,160,247, 27,221, 48,239,179,
-143,154,154,157,118,214,136, 38, 62,194,166, 49, 1,226,212,143,198, 13,185,255,193, 7, 31,184, 44, 93,186, 84,219,182,109, 91,
- 77, 97, 97,161,139,200,195, 51,146,237,230, 30,147,153, 95,224,218,182,109,219, 7,147, 38, 77, 42,117,148,115,238,220,185,194,
-163, 71,143,178, 7, 14, 28,104,146,203,229,174, 28, 23,151,230, 4, 95,208,250,177, 92,238, 54, 96,224,192,187, 3, 6, 12, 40,
- 55, 59, 44,181,155,243,243,207, 63, 23,222,185,115,135,221,182,109, 91, 99, 65, 65,129, 88,228,229, 29,203,114,247,108,245, 48,
-191, 80,210, 58, 46,238,222,148, 41, 83,212, 53,165,211, 86,164,136,197,226,220,246,237,219,227,155,111,190,193,119,223,125,135,
-158, 61,123, 34,229, 86, 10,122, 79,153,129,168,137,211,113,224,252, 69,228,230,230, 98,193,130, 5,136,141,141, 5,151,203,189,
- 83,101,121,156,144, 70, 92, 43, 0,113,173, 0, 4, 49, 33,141,176,236, 87,107,217,154,175,128,237,245, 85, 93,119,229,243,170,
- 45, 93, 45,164, 68,114, 77,243,176,106, 19, 91, 3, 6, 12,152,108,113,225, 48,122,244,232,179,171, 86,173,234, 48,122,116, 69,
- 71,187, 77,155, 54, 88,184,112, 97,135,185,115,231,158, 93,180,104, 17,186,117,235,134,176,176,176, 90, 23,190, 80, 20, 5,147,
-201,132, 33, 67,134,192,100, 50,225,241,227,199, 72, 79, 79,199,198,141, 27,193, 48,140, 0, 0,164, 1, 65,175,240,120, 60, 92,
-191,122,185,252,179,209,113, 63, 59, 96,201, 34,108, 59, 49, 42,149, 10, 3, 38, 78, 44,206,105,212, 72,182,190,184,184,124,140,
-135,135,176,254,163, 71,158, 98,189, 62, 16, 53,204, 75, 36, 8, 2, 52, 77, 91,133,149, 69,112, 85,222,204, 13,165, 93, 48,148,
-211,127,156,249, 41, 15, 0,208,105, 88, 0,250,206,172, 63, 82, 26, 46,252,190,227,208, 10,163,247,158,133,247,153,178, 60,106,
- 41,140, 72,117,192, 98,157,148,148,148, 4,119,119,119, 12, 28, 56,144, 79,146,228, 18, 75,127, 21, 21,190,179, 86, 90,184,248,
-124,254,138,247,222,123,143, 44, 45, 45,197,141, 27, 55, 0,224, 68,117,245, 18,195, 48,214,123, 87,201, 8, 80, 52, 15,231,174,
- 30,193,159,103,118,227, 97,238, 99, 60, 42,210, 2,108, 55,104,213, 57, 48,104,114,161, 47,189, 10,165, 78,104, 87,130,185, 92,
-238,227,166, 77,155, 50,173, 90,181, 98, 24,134,193,189,123,247, 76,153,143, 30,153, 46,127,251, 45,115,115,252,120, 66,156,158,
-206,117,113,113, 33, 26, 52,104, 0,129, 64, 64, 11, 4,130,146,191,177,241,126, 33,238, 22, 94,128, 91,136,231,105,213, 98,240,
-114, 34, 31, 79,174, 54,180, 58, 48,173,202, 97, 41, 24,137,203,224,221,107,214,185, 13, 28, 50, 76, 29, 27, 27,235, 17, 24, 24,
- 8,130, 32,240,246, 59,239, 16, 93, 19, 18,196,156,128, 0,120,181,108,105, 29,142, 56,126,236, 24,142, 28, 57,162, 62,244,251,
-190,192, 81, 99,198,188, 9, 96, 91, 13,137, 97,243,249,124,235,255,230,231,231,131,207,231, 91,231, 68, 40,149, 74,248,248,248,
- 32, 63, 63, 31,118,142,204,109,255,116,214,197, 89, 69,113,115, 26,196,137, 57,196, 97,117, 1, 40,134, 1,135,160, 0, 13, 3,
- 35, 5,232,140, 12, 94,169,207,242,252, 83, 99,242,136, 79,218,251, 0,192,118, 71,114, 79,167,211,157,186,118,237,218,120,154,
-166,119, 3, 32, 19, 18, 18,232,212,212,212,201,176,127,226,250,211,102,123,161,112,230,201,147, 39, 61,103,206,156, 41,143,143,
-143, 87,244,233,211,199,109,227,198,141,158,175,190,250,234,204,146,146,146, 29,246, 24, 2,179,178,178,182,101,103,103, 79,110,
-213,170, 21,100, 50, 25, 12, 6, 3,146,147,147, 17, 30, 30,142, 43, 87,174, 32, 34, 34, 2,151, 47, 95, 70,227,198,141, 65, 81,
- 20,180, 90, 45,104,154,166,106,171,204,101,197,143,129,146, 44,228, 37, 29, 70,250,205,100,156,204, 35,176,122,199, 65,212, 11,
-109, 80, 39, 63, 53, 17,190,194,104,169,143,215,159, 75,191,252,220, 55,243,212,111,216,187,101, 53,125,250,240,225, 40,158, 24,
-227, 59, 15,153,214, 95,111, 68, 8, 0, 94,187,184, 86,232,229,113,135, 18,134,162,224,100,106,205, 14, 22, 35,124,133,209,126,
-222, 94, 71,191, 90, 50, 95,124,239,200, 86,236,220,240, 13,179,231,167, 95, 99,181, 64, 92,116,116,116, 47,146, 36,221, 1,104,
-205,243,188,236, 10,109, 83, 21,231,241,131, 7, 91,104,129,184,253,251,247,247, 18, 10,133,254, 0,140,229,229,229,247,159,133,
-243, 68,124,124, 11, 75, 58, 9,130,240, 5, 96, 96, 24,230, 30, 28, 12,193, 51,104,208,160,133,211,167, 79,159, 69, 81,148,143,
- 77,239,156,181, 98,197, 10, 54, 77,211, 44,134, 97, 12, 36, 73, 26,142, 30, 61, 74,153, 76,166, 60,173, 86, 59,241, 89,106,145,
-254,253,251,227,226,197,139, 95,162, 98, 17,134,189,214,234, 39,230,105,153, 67,246,212,153, 63, 33, 33, 97,193,187,239,190,251,
-233,142, 29, 59,210, 87,173, 90,245,214,132, 9, 19,240,219,111,191,161, 81,163, 70,184,126,253, 58,230,204,153, 3, 0, 29,230,
-206,157,123, 96,243,230,205, 97,153,153,153, 43,236,176,104,192,100, 50,225,215, 95,127,197,219,111,191, 13, 31, 31, 31, 4, 4,
- 4,128, 32,136, 83, 99,198,140, 89, 11, 0, 44,130,197, 5, 0,157, 86,167,139,140,108,101,183, 5,151,203,229, 90,235,186,130,
-130, 2,235, 74,193,215,223,125,183,120,211,210,165,248, 89,163,193, 24, 15, 15, 97, 78, 80,144,244,192,189,123,227,110, 85, 84,
-206, 76, 77, 86,157,218, 68,150,189, 83, 26, 52,249,152,253,251,226,135,254, 0,122,118, 26, 22,128, 78,195, 2,208,170,175, 47,
- 65,178, 8,220,252,179, 4, 41,199,101,123,140, 74,156,130, 99,225,114, 82,151, 44, 89,114,160,115,231,206,111, 53,105,210, 4,
- 99,199,142,157,180,101,203, 22,174,209,104,252, 0,127,185,121,112, 35, 73,114,254,134, 13, 27,198,121,122,122, 34, 49, 49, 17,
-103,206,156, 57, 5, 32,171,186,122, 9,128,213,103, 86,189,224, 8,237,157, 76,149,176, 40,247, 28,206, 38,254,142, 70,177,211,
-224,226,255, 38, 60, 35, 23,193,144,246, 29,244, 37,127,194, 51,184, 15,114, 50,239,129,197,230,167,212, 54, 9,133, 97,152, 91,
- 57, 57, 57, 97, 97, 97, 97,196,195,135, 15, 77, 0, 24,138,162, 24, 67,199,142,198,168,165, 75, 57, 41,147, 38, 17,237,238,220,
- 97, 49, 4, 65, 39, 39, 39, 3,192,237,127,162, 21,183,184, 91, 72, 73, 73,169,206,221,130, 67,104,218,180,105,135, 51,103,206,
-240,181, 90, 45, 78,159, 62,141,214,173,173,107,187,254, 81,239,247,182, 90,228, 37,195,184, 42,142,109,124,194,162,245,196,139,
- 77, 19,156,198, 17, 17, 20,151,196,143,111,191,249,102,249,181,107,215,172,189, 62,237,165, 75, 80, 31, 57, 2,138,162,192, 48,
- 12,206, 36, 36,224,189, 97,195, 84, 28, 22,177,169,126,253, 80,134, 96,158,240,221,210,189,138,222,195,192,129, 3, 7, 90, 43,
-159,236,236,108,136, 68, 34,240,120, 60,208, 52, 13,147,201, 4, 22,139, 5, 55, 55, 55,152, 76,166,170, 76, 48,149, 57,141,148,
- 76, 61, 96,115,239,161,249, 1, 42, 3, 51,222,189, 62, 66,184, 46,214,194,233, 47, 33,240, 86, 44, 7,222,236, 34,230,196,138,
-215,242,104, 93,201, 0, 60,189,162,171,182, 37,255, 17,205,154, 53, 91,251,222,123,239,145, 0,208,189,123,119,178, 89,179,102,
-223,163,230, 80, 57, 53,114, 10, 4, 2, 62, 0, 28, 60,120, 80,150,158,158,222,243,224,193,131, 50,219,227,118,114,110, 92,190,
-124, 57,132, 66, 33, 76, 38, 19,244,122,189,117,126,150,237,167,193, 96,128,183,183, 55, 14, 29, 58, 4,138,162, 14,213,150,206,
-224,144, 80, 16, 62, 13,177,237,224, 73,156, 41,230,214, 69,100, 89, 57, 27,250,139, 26,251,123,123, 29,251,106,241, 2, 31,249,
-221,100,228,228,228, 48, 71,143, 28,186,160, 5,114, 21,101,248,172, 84,141,198, 26, 61, 4,173,195,144,117,108,195, 39,204,220,
- 78, 48,162,234, 85,131, 86,206, 40,127, 81,227, 64, 31,175,163, 95,127,181, 88, 92,122, 55, 25,249, 5, 5,248,227,208,193,107,
- 90,192, 50,220, 56,146,166,233, 24,154,166, 99, 0,140,172, 65,188, 56,196, 89, 94, 94,222,180,188,188,188,233,243,228,100, 24,
-166, 41,195, 48,118,115,218,206,137, 90,185,114,101, 90,126,126,254,123, 69, 69, 69, 61, 44,155, 92, 46,239,174, 82,169,186,148,
-151,151,119,212,172, 12,117, 43, 47, 47,247, 85,169, 84, 82,173, 86,251, 10,128,100, 7,222,121, 43,108,189, 78,231,231,231,207,
-203,207,207, 39,106, 75, 39,107, 98, 26,241,203,215, 31,253,190, 97,195, 6,233, 51,242, 63,145,206,226,226,226,221, 59,118,236,
-104,222,160, 65,131,176,145, 35, 71, 98,253,250,245, 88,181,106,149, 14, 0, 54,111,222,172,179,177,100, 5,103,102,102,182,170,
-102,216,176,187,141,181,100,251,235,175,191,206,156, 57,115, 6,111,191,253,182,213,145,232, 15, 63,252, 0,147,201,164,236,214,
-173, 27, 13, 0, 26,109,185,146,161, 25,232, 13,213,142,191, 63,149,159, 60, 30,239, 13, 91,127,129, 22,103,204, 60, 30, 15, 12,
-195,160,113,135, 14,197,165,177,177,178, 45, 10, 69,249,188,166, 77, 37,227, 34, 35, 71, 54, 1,134, 85,197, 73, 16,196, 19, 86,
-157,202,155, 3,150, 44,219,116, 22,105,242, 48,246,247,197, 15,143, 88, 44, 91, 2, 87, 54,180,101, 38,236, 91,250,240,177,246,
- 49,126,168, 78,252,212,116,239, 50,153,108,202,210,165, 75,117, 30, 30, 30,232,223,191, 63, 22, 45, 90, 52,166, 67,135, 14, 10,
- 95, 95,223,139,141, 26, 53,186, 57,120,240,224,252,228,228,228, 41, 93,187,118, 69, 70, 70, 6,190,254,250,235, 82,185, 92, 62,
-180, 38, 78,130, 32,172,150,188,190,189,187,203,214,125,255, 13,221,173,243,100, 8, 93, 36, 48,114,130, 33, 83, 25, 33, 87, 51,
-208,243,227,192,227,242,209,163,109, 52, 46, 30,221, 90, 78,233,213,219,106,123,231, 85, 42,213,158, 17, 35, 70, 40,185, 92, 46,
-244,122, 61,195,225,112,192,175,152,119, 76,115,122,246, 52,180, 75, 77, 53, 81, 12, 67, 19, 4,129, 15, 63,252, 80, 45,151,203,
-119,212,165, 28, 57, 0, 91,206,231,229,110,161,123,165,246,231,121,184,133,120, 17,247,254, 50, 99, 99, 21,219, 95, 22, 45,203,
-146, 74,203, 39, 65,208, 20, 69,209,168,223,160,190, 56,243, 97,214,234, 65,131, 6,142,238,213,171,183,176,119,239,222,130,232,
-180,138,222,232,193,131, 7,177,119,239,222,242, 63,255,252, 83,201,231,176, 54, 7,215, 11,246,163, 40, 26, 4, 65,215,168,134,
-197, 98,241, 7,179,103,207,118, 81, 40, 20, 88,181,106, 21,221,188,121,115, 82, 36, 18,193, 96, 48, 96,243,230,205,198,232,232,
-104, 14, 73,146, 80, 40, 20, 32, 73,242,142,157, 55,120, 67,145,149,219, 99,109,215,126,123, 91,189, 63,202, 43,170,107, 59,143,
- 46,193,129, 48,182,100,144,151,253, 16,233, 39,254,148,223, 58,250,109, 9,180,133,253, 80,123,120,160,170, 26,130, 47,254,252,
-243, 79,223, 41, 83,166, 48, 90,173,150,200,202,202, 98, 22, 47, 94,236, 59,118,236,216, 47,242,242,242,254, 87,199,135, 66,148,
-150,150,130, 32, 8,218, 92,114, 30,194, 56, 0, 0, 32, 0, 73, 68, 65, 84,145, 88,122,253,142,140,203,165,108,219,182,109,255,
- 59,239,188,211,183, 91,183,110, 72, 75, 75,179, 14, 17,218, 10, 45,203,234,195, 37, 75,150,148, 2,248,180, 54, 82, 14,135,131,
- 85,219,118,163, 84, 94, 12, 63,191, 0, 8, 92, 92, 80,215, 21,150, 60,146,156,183,108,193,231,190,197,183, 47, 18, 41, 23, 78,
-210,187,110, 20, 22,153, 40,166,106,143,255,101,121,140, 89,253,215,220,155, 33, 89,243,150, 45,158,239,102, 25,214,220,113, 53,
- 95, 73, 80,204,148,103, 42, 34, 47, 11,231,223,140,128,128, 0,228,231,231, 19, 1, 1, 1,140,121,142, 22, 83,131,208,122,242,
- 5,175, 24, 46, 35,106, 26, 54,172, 43,255,131, 7, 15, 22,183,108,217,242,163,140,140,140, 93, 81, 81, 81, 19, 0,212,211,233,
-116,165,115,231,206,253,106,243,230,205,163,237,177,100, 1,192,111,191,253,246,237,168, 81,163,142,188,249,230,155,159,208, 52,
-221,204,166, 97,127,224,235,235,107, 29,194,125, 92, 88, 48,107,252,232, 33,179, 84, 42,185,221,126,238, 92, 93, 93,199,205,157,
- 59, 87,160, 86,171,177,102,205, 26, 58, 58, 58,154,180,116,138,126,250,233, 39, 83, 68, 68, 4,123,224,228,201,197, 43, 11, 10,
-176, 48, 49, 81, 61, 43, 38,166,249,150,244,244, 87, 64,211,219,171,179,234, 84,101,201,178, 76,187,168, 35,242,204, 98,235, 7,
- 0, 61,219, 13,242,199,254,229, 15, 33,207,212,127, 5, 19,238,193,142,176, 64, 85, 32,103,207,158, 61, 61, 10, 11, 11,247,127,
-254,249,231,110,175,188,242, 10, 98, 98, 98, 56,174,174,174,113, 22,119, 49, 10,133, 2,199,143, 31,199,250,245,235,245,183,110,
-221,122,167,166,225, 42,138,162,138, 34, 34, 34, 44,249,192, 16, 4, 81,162,212, 17,110, 59,155,196,185,142, 28,191,139, 56,123,
-249, 60,242, 12, 52,116, 70, 26,245, 27,180, 64,151,158, 43,113,224,240, 77, 42, 47, 51, 53,213,168,145,111,178, 35,189,247,238,
-222,189,187,111,193,130, 5,131, 62,249,228, 19,151,226,226, 98, 74,167,211,209,187,119,239,102,141, 28, 57,146, 98,216,108,154,
-203,102,227,131, 15, 62,208,148,150,150,254, 14,252,173, 1,166, 95,136,187,133, 23,224, 22,226,185, 89,179,108, 63,255, 43,168,
-178,132,210, 44,242,220,250, 13,235,222,248,237,215, 29,254, 44, 22,233,127,239,254,253,203,111,245, 27,144,123,236,216, 49, 79,
-174,155, 91,107, 0,180,126,194,132, 11, 6,157, 70, 22,191,127,127, 72,253,250,161,177,230,160,210, 12,205, 34,207,213,244,135,
- 42,149, 74,157,152,152, 88,254,233,167,159, 18,217,217,217,191,248,249,249, 13, 62,124,248,176,107,191,126,253, 52,105,105,105,
-123,252,253,253,251,118,237,218, 85,252,209, 71, 31,233, 84, 42,149, 35,129, 71, 83,153,199,242, 38,151, 62, 95,241,238,165,229,
-235, 94, 3,155,213, 30, 58, 14, 64, 27,207,193, 80,118, 12,192, 47,112,192,223,145, 45, 68, 34, 81,172, 80, 40,196,181,107,215,
-228,113,113,113,122,173, 86,203, 93,180,104,145,151, 72, 36,138,173,107,198, 51, 12,195,200,229,114,208, 52,205, 6, 64,152, 63,
- 65, 59,190, 22,255,127,111,189,245,214,254,157, 59,119,190,222,187,119,111,132,133,133,193,104, 52, 34, 34, 34, 2,122,189, 30,
-225,225,225,208,233,116,248,242,203, 47,161, 80, 40,102,160,134,152,103, 4, 65,192,100, 50, 89, 39,219, 6, 6,133, 84,248,233,
-121, 6, 55, 22, 34, 14, 25,118, 39,126, 11,138, 74,138,233,157,215, 11, 11,203, 13, 84,143,187,143,203,111, 85,190,174,156,130,
-186,235,200,169,185, 0,160,163,107,142, 56, 47,226, 33, 44,253,208, 15, 40, 44, 42,198,111, 87,243, 75,213, 6,186,103,122, 21,
-156, 14,165,243, 37,225,108,241,101, 26, 6, 76,181,255,218,103,129,189,130,170, 58, 92, 43, 0,113, 69,184,133,193,134, 45, 85,
-250,200,122, 70,254,253, 25, 25, 25,251, 1, 32, 53, 53, 53,123,200,144, 33,179, 30, 62,124,184, 0,192, 31,153,153,153, 27, 28,
- 33,218,178,101, 75, 6,128, 81, 53, 93,179, 99,197,168,125, 0,246, 57,194, 91, 86, 86,166, 77, 78, 78,214,126,244,209, 71, 68,
-118,118,246, 97,127,127,255,215,143, 28, 57, 34,236,215,175,159, 46, 37, 37,229, 68, 64, 64, 64,167,238,221,187,187,254,145,148,
-148, 91,126,239, 94,124,252,195,135, 65, 70,154,142,175,169,124, 62,103,145,245,132,216,218,183,240,225,178,253,203, 30,118,167,
-117,216,163,151,227, 2,128,156,103,224, 60,115,238,220,185,168, 97,195,134,237,236,211,167, 79,187,168,168, 40,212,171, 87, 15,
-233,233,233,120,252,248, 49,110,220,184,129,131, 7, 15, 30,212,106,181,181, 6,212,150,201,100, 79,135, 39, 18,120, 6,108, 93,
- 51,239,224,229,179,173, 35, 58,246, 30,225, 18, 19, 64, 67,111, 96,144,253,232, 30,190,252,108, 83,121,254,163,140, 84,131,201,
-240, 14,236, 92,168,163,209,104, 54,126,247,221,119,156,248,248,248,222,171, 87,175, 22,135,132,132,176,184, 92, 46, 9,128,185,
-114,229, 10, 51,117,234, 84,117,113,113,241, 33,165, 82,185,241,111,110,163,207,220,191,127,191, 5,139,197,122,174,238, 22,158,
-193, 45,132, 19,207, 19, 13, 26, 4, 69, 53, 12, 9,152, 16, 86, 47,104,114,131,144,224,225, 85, 77,114, 15,243,240, 16, 55, 8,
- 13, 28, 23, 86, 47,104,114,195,144,128, 9, 13, 26, 4, 69,217, 97, 90, 12,147, 72, 36,135,165, 82,105,115, 0,112,115,115,235,
-235,238,238,126,203,205,205,173,175,185, 23,216,215,213,213,245,118,116,116,244,216,191,209, 92, 89, 35,103, 68, 68,196, 16,149,
- 74, 53, 41, 34, 34, 98,136,101,255,222,189,123,214,253,186,112, 6, 7, 7,119,187,114,229,202,255, 86,172, 88,209,191, 81,163,
- 70,125, 23, 47, 94,220,255,247,223,127,255, 95, 80, 80,208, 43,117,224,228, 3,248,153,195,225, 20,242,120,188, 34, 14,135, 83,
-104,217,216,108,118, 33,139,197, 42, 4,176,161, 26,107, 89,119,155, 94,206, 89, 63, 63,191, 76, 63, 63,191, 76,127,127,255, 76,
-127,127,255, 76,169, 84,250,212,230,237,237,125,214,222,252,140,244,119,237, 16, 87, 79,124,174,169,212,245,108, 19, 63, 81,228,
-243,120, 70,145,254,174, 29, 90,215,115, 59,215, 84, 42, 78,252,255,198,217,220, 31, 12,179, 62,146, 97,214, 71, 50,205,253,193,
-212,182,255, 60,205,254, 82,169,148,145, 74,165,243, 94,212, 80, 66, 53,252,127,123,121,127,142,156, 97, 98,177,120, 71,189,122,
-245, 44,117,221,155, 18,137,228,148,171,171,235,155,230,186,238, 77,145, 72,148, 16, 29, 29, 61,162, 54, 78, 79, 79,207, 43,190,
-190,190, 5,230, 45,223,207,207, 47,223,207,207, 47,223,215,215, 55,207,215,215, 55,207,199,199, 39,215,178,185,187,187, 95,172,
-227,189,251, 2,104, 3,224, 21, 0,146,231,152,159, 13, 0,140, 55,215, 65, 75, 1,140, 5,208,236, 57, 60, 35,130,227,226, 57,
-145,239, 30,124,142,227,234, 83,198,113,245, 41,227,187, 5,157,171, 33, 4,143, 61,156,141, 61, 61, 61, 23, 73, 36,146,223,197,
- 98,113,162, 88, 44,222,239,237,237,189, 24, 64,227,127,232, 93,114, 5,176, 25, 21,254,153,254, 64,197, 80,248,126, 84, 44, 42,
- 8,249, 23,190,243,255,159, 49,238,159,250,227,238, 78, 78, 39,167,147,211,201,233,228,116,114,190,132,156,164, 51, 63,157, 66,
-203, 65,161, 85,121, 3, 80,131,103,120, 39,156,112,194, 9, 39,156,248,127, 12,218,153, 5, 78, 56,136, 42,135,150,137, 26, 84,
-169, 35,190,166,234,162,108,143, 59, 57,157,156, 78, 78, 39,167,147,211,201,233,228,252,127,199,233,196,115,132,211,172,234,228,
-116,114, 58, 57,157,156, 78, 78, 39,167,147,243,191, 14,231,208,161, 19, 78, 56,225,132, 19, 78, 56,225,196, 11,194, 70, 27,193,
-245,196, 16,162, 83,104, 57, 14, 18,192, 36, 0, 3, 0, 52, 68, 69, 52,251,221, 0,214,162,110, 99,250, 18, 0,179, 0,180, 71,
-197,234,156, 7, 0, 18, 81,177, 58, 71,229,204,238,170,225,237,237, 61,155,195,225,184, 3, 21,161, 77, 44,159,182,223, 41,138,
- 42, 85, 42,149,139, 95, 80, 18, 88,176,211,131,178, 37,173,182,105,179,253, 52, 26,141, 47, 50,157, 78,252, 59, 17,225,233,233,
-249,179, 76, 38, 27, 10,155, 32,203, 78, 56,241, 95,128,143,143,207, 4,131,193, 48,151,203,229, 46,122,252,248,241,186,255, 71,
-183,254,148,200,122, 66,104,197,199,199, 39, 0, 64,159, 62,125, 58, 3,128,187,187,251,121,146, 36, 27, 56,242, 15, 52, 77, 63,
- 40, 45, 45,173,214,129,154,187,187,251,121, 22,139,245, 20,167,209,104, 20,179,217,236,178,170,126, 99, 50,153,114,148, 74,229,
- 43,255,146, 76, 36, 0,196,123,120,120,104, 23, 44, 88,176,182, 75,151, 46,193,121,121,121,166,153, 51,103,118,186,126,253,122,
-111, 0,111, 56, 40,182,218, 18, 4,177,181,121,243,230,251,134, 15, 31,190, 51, 46, 46,142, 87, 82, 82, 34,222,189,123,119,224,
-182,109,219,146,105,154, 30,138, 26, 2,173,254,127, 6,135,195,113,207,201,201, 17, 3, 21,161, 73,204,194, 10, 70,163, 17, 70,
-163, 17,106,181, 26,177,177,177,207,253,127,253,253,253, 91, 16, 4,177,218,213,213,245, 21,149, 74,117, 25,192,228,252,252,252,
-235,142,164,213,100, 50,129, 97, 24,107, 58,163,162,162,156, 15,212, 49,140,225,241,120, 61,195,195,195, 91,235,116, 58,249,131,
- 7, 15, 46, 81, 20,245, 57,158, 95,140, 54, 55, 0,159,243,249,252,184,134, 13, 27, 6,103,100,100,100, 27, 12,134, 36, 84, 4,
- 67, 86, 60, 15,145,213,185,115,231,179,107,214,172,241,154, 56,113,226,217,196,196,196, 14, 78,177,229,196, 63,133,224,224, 96,
-119,181, 90,189, 9, 64, 11, 14,135,227, 47, 16, 8,224,226,226, 82,192,231,243,175,185,184,184,140, 62,119,238, 92,169,163,156,
- 20, 69,125,158,153,153,233,223,166, 77,155,229,190,190,190, 95, 22, 23, 23,107, 13, 6,195, 9,185, 92, 62, 3,128,178,166,223,
- 86,214, 34, 47,153,200,178,253,132, 69,116,177,205, 55,198, 0,232,242,132, 2, 99,179,131, 30, 61,122,228, 43, 16, 8, 64,211,
-180,181, 49,171,188, 89,142,235,245,122,196,196,196, 24,106,105,112,130,179,179,179,125,121, 60,158,245,152, 94,175, 71, 96, 96,
- 32,157,147,147,227,107, 14,123, 96,133, 78,167, 67, 80, 80,208,191, 41,230,209, 36, 79, 79, 79, 69, 86, 86,118,172, 86,103,152,
- 63,118,202,167,179,135, 14,120,205,227,252,249,243,244, 27,111,188,161, 75, 72, 72,152,132,138,192,169,118, 85,230, 4, 65,108,
-155, 57,115,230,151, 2,161,196,235,228,249, 84,221,182,221,135,114,155, 71,212, 39,102,204,152,193,154, 58,117,234,153, 22, 45,
- 90,252, 76,211,116, 75, 56, 96,217,242,240,240, 56,194,231,243, 67,205,249,151, 37,151,203, 95,255, 23,190,144,108, 60,237, 60,
-182,170, 99,181,162,164,164, 4, 26,141,230,169, 45, 42, 42,202,222, 88,153, 14,165,155,195,225,236, 95,178,100, 73, 96, 65,126,
- 62,190, 89,185,178, 13, 42, 44,153,109,236,249,113, 81, 81,209, 83,233,140,140,140,132, 19, 14, 97,214,151, 95,126,185,228,221,
-119,223, 5, 69, 81,208,104, 52, 1,119,239,222,141,158, 59,119,238, 59,247,238,221,107, 13,224,254,179,118,198,195,195,195,211,
-166, 77,155,230,217,186,117,107,152,163, 84, 4, 36, 38, 38,182,217,188,121,243,123, 89, 89, 89,145, 0, 30, 63,203, 31,120,122,
-122,254,252,195, 15, 63,120, 9,133, 66, 28, 56,112,192,171, 91,183,110,137, 87,175, 94,237,248, 12, 98,139,244,242,242,154, 10,
-224, 85,154,166,121, 0,146,228,114,249, 66, 56,238,213, 93,234,234,234,186,135, 36,201,250,192, 95,222,232, 73,146,244, 38, 8,
-162,216,114,140, 32, 8, 95,154,166, 47,200,100,178,118,206,215,241,229,134,151,151,215,152,194,194,194, 53,124, 62,159,235,225,
-225, 1,161, 80, 8, 54,155, 13, 54,155, 93,143,207,231,215,227,243,249,189,186,118,237, 58,249,212,169, 83, 53,122,216,111,219,
-220,111, 36, 72, 98, 62,139, 32, 89, 0, 64,114, 68, 18, 55, 55, 55,204,159, 63, 95,212,183,111, 95, 17, 0,156, 61,123,118,248,
-136, 17, 35,186,229,228,228,196, 84, 39,182,170,210, 34, 47, 17, 54,214,212,224,193,172, 30, 19,158, 40,185, 36, 9, 30,143,135,
-139, 23, 47,194, 30,103,229,150, 16, 9, 53,214, 6,102, 15,227,215,175,255,101, 0,176, 52, 52, 60, 30, 15,231,206, 61,233, 84,
-190,109,219,182,214,194,254,119, 97, 64, 84,133,147,199, 93,239, 87,164,107,224,234, 10,239,218,187,222,143, 68,167,175, 31, 97,
-192,212,121,131,203,181,134, 86, 0,212,165,114,185,252,242,222,189,121,205, 35, 34,184, 63,255,252,115,235,192,192,192, 1, 14,
- 8,173, 89, 45, 91,182,220,195,114,113,243, 30, 62, 98,228,240,209,108,210,240,222,248,143, 22,101,231, 23,171,199,141, 27,183,
-247,192,129, 3,195,151, 45, 91,118,251,227,143, 63,158, 5, 96,142,189,233, 23, 8, 4,161,119,238,220, 9,167, 40, 10, 81, 81,
- 81,255,198, 48, 6,205, 81,225,124,239, 93, 0,191,154,143, 13, 65,133,231,254, 22, 0,174, 57, 66,102,177, 96, 85,181, 61,111,
- 4, 6, 6, 70, 14, 27, 54,204, 91, 86, 92,140,111, 86,174,180, 28,126, 5,181, 12, 35, 90,202,143, 94,175, 71,255,254,253,135,
- 81, 20,197,182,136, 64,157, 78,167, 87, 40, 20, 90,252, 53,177,244, 49,128,215,236, 72, 78, 3,145, 72,244, 21,128, 22, 26,141,
- 38, 16, 0, 68, 34, 81, 46, 77,211,251,212,106,245, 28,252, 21,192,215,225, 14, 46,128,104, 84, 31, 10,138, 89,178,100, 73,198,
-167,159,126,122,255, 31,224, 12,245,243,243, 91, 60,112,224, 64, 28, 58,116, 8,127,252,241,135,209,197,197,133, 61, 98,196, 8,
- 98,242,228,201, 30,211,166, 77,235, 5,224,187,103,124,204,189,190,252,242, 75,207, 38, 77,154, 96,247,238,221,184,113,227,134,
- 38, 60, 60,220,165, 75,151, 46, 96,179,217,158,179,103,207,126, 3,192,214,103,249, 3,153, 76,182,240,163,143, 62,218,246,235,
-175,191,138, 31, 60,120,128,213,171, 87,123, 15, 30, 60, 56, 33, 43, 43,171,179, 3, 98,139, 15, 96, 42,128,174, 44, 22,171,227,
-136, 17, 35, 76, 83,166, 76,225,144, 36,105, 92,185,114,165,207,230,205,155, 7,115, 56,156, 22, 37, 37, 37,246,116,210, 72, 0,
-243, 71,143, 30, 61,234,212,169, 83, 30,151, 46, 93,226,121,121,121,129,162, 40,171,165,152,166,105, 95,203, 59,107, 50,153, 16,
- 25, 25, 25,100,243,123,151,151, 85,104,144, 36,105,160,105,154, 3, 64, 0, 64, 87,219,254,127, 73,100,121,122,122, 78,148,201,
-100,107,253,253,253,225,231,231,247, 84, 91,171,211,233, 32, 16, 8,184,254,254,254, 63,244,237,219,151,179,127,255,254,106,135,
- 0, 9, 22,241,249,129, 29, 11, 2, 61, 61,196, 0,128,111,215, 31, 45, 7,128,223,127,255, 29,121,121,121,240,240,240, 64, 76,
- 76, 12,107,193,130, 5,210, 25, 51,102,124, 35,151,203, 71, 87,199, 85, 89,139,188,100, 22,173,141, 85,237,215, 56, 71,139, 97,
- 24,107,156, 60, 59, 95,218,202,135,142, 87,226, 35,244,122, 61, 42, 91,180, 44,133,151,195,225, 84, 54, 63,130, 32, 8,166, 38,
-206, 42, 48, 66, 36, 18,197,170,213,234,239, 29,232,221, 90, 57,119,189, 31,137,109,252,153, 67, 44,145, 72,123,125, 84,241,185,
- 13,192,249,135,163, 87,175,233,220, 57,112,234,103,171,230,105, 74,242,138,103, 15,123, 51, 52,220,223,203, 69, 84, 90,164,240,
-108,220,184, 71, 37,139, 76,109,233,236, 52,124,248,240,237,127, 94,204, 36, 4, 2, 46,151,205, 98,113, 58, 52,141,240, 10,118,
- 99,185,137, 1,183,236,251, 25,231, 71,142, 28,217,244,227,143, 63,238,232, 0, 39,204, 13, 46,126,250,233, 39, 16, 4, 65, 58,
-114,239,207, 17,199,107, 18, 89, 12,195,128, 32,136, 95,108, 26,149, 95,204,199,174,218,136, 45,118, 77,249,105,177,166, 90, 68,
-213,136, 17, 35,134,153, 76, 38,182, 77, 37, 81, 89,192, 84, 37, 98,236,186,119,169, 84,250, 39,128,215, 8,130,128, 94,171,213,
-127,245,245,215,182,167,175, 84, 18, 89,199,171, 43, 75, 70,163, 17, 20, 69,177,175, 94,189,202,177,121,215, 57, 0, 68, 0,188,
- 25,134, 1, 73,146, 55,237,200,207, 72,161, 80,120,254,224,193,131,146, 87, 94,121,133,224,241,120, 48,153, 76, 72, 73, 73, 9,
- 94,182,108,217,248,227,199,143,191,161, 86,171,163,240,116,240,116,123,158, 81,116, 98, 98,162, 58, 44, 44,172, 74,225,168, 84,
- 42,217, 17, 17, 17,157,171, 17, 69, 47,154, 51,167,176,176,240,237,215, 94,123,109, 66, 65, 65, 65,154,201,100,250, 4, 64,140,
-183,183,247,213,126,253,250,193,197,197,165,171, 70,163,249,238, 89,222,121, 95, 95,223,190,237,218,181,195,234,213,171,177,108,
-217,178,238, 0, 78, 0,232,166, 84, 42,143,191,245,214, 91,112,119,119,127,187,180,180,116,235, 51,148,163,136, 78,157, 58,253,
- 48,127,254,124,241,161, 67,135, 16, 30, 30,142,178,178, 50,124,248,225,135,190, 95,124,241,197,233,210,210,210, 46, 54,229,162,
- 58,206, 40, 62,159,191,245,215, 95,127,117, 13, 11, 11, 11,227,114,185,100, 88, 88, 24,100, 50, 25,180, 90, 45,127,209,162, 69,
- 77, 93, 92, 92,174,127,247,221,119, 91, 1,244,171, 37,157, 36,128,133, 27, 54,108,152, 48,110,220, 56,247, 97,195,134, 81,122,
-189, 30, 59,119,238, 4,139,197, 2,135,195,129, 80, 40,180, 6,175,230,114,185,104,220,248, 41, 39,233, 7,106,184, 95, 5, 42,
-230,161,186,195,177, 97,215,227, 53,240, 89,135, 62, 56, 28, 14, 4, 2, 1, 4, 2, 1,248,124, 62,238,220,185,243,153, 64, 32,
- 88, 73, 16,132,201, 30, 78,226, 47,117, 17, 11,224, 82,109,251,120,122,106,200,223, 89,127, 90, 16, 68, 16,196,183, 0,186, 86,
- 52,187,100,130,183,183,247, 7,133,133,133,143,236,229,148, 74,165, 94, 37, 37, 37,223, 73,165, 82,248,249,249, 89,219,239,192,
-192, 64, 24,141, 70, 20, 22, 22,130, 97, 24,148,150,150, 66, 40, 20, 34, 32, 32,224,187,113,227,198,237,222,184,113, 99, 73,149,
-156, 52,150,189, 53,120,238,231, 44, 22,139, 4, 0, 22,219,213,117,218,167, 64,104,104, 40, 58,116,232, 0,173, 86, 11,133, 66,
-129,232,232,104, 54, 65, 16,195, 9,130,144, 48, 12,179, 14,192,201,255,160,161,176,218,201,240, 95, 86, 30, 23,181, 68,139,231,
-114,185,118, 9, 45,243,245,181, 89, 80, 72,163,209, 8, 46,151,251,132, 69,130, 32, 8, 80, 20,245,196,113,139,208,170,139, 80,
-159, 60,121, 50,253,195, 15, 63, 76,144,203,229,235, 81,199,161,132,225,195,135, 63, 53,223, 99,198,140, 25, 57, 69, 69, 69, 76,
-255, 30,177,162,180,195,121,249, 13, 61, 92, 93,124,196,226,250, 2, 15, 79,247,146,146,146, 11,230,202,196, 94, 52,106,217,178,
-165,203,182,189,137, 57, 99,167, 47, 89,240, 74,152,151,164, 89,144,183,135,191,155, 11,207,149, 36,212, 2,147, 49,199,211,211,
- 51,220,209,116, 91,234, 5,161, 80, 8,146, 36,255, 77, 22, 45,182, 69,100,201,100, 50, 28, 58,116, 8,189,123,247,190,106, 17,
- 33, 74,165, 18,249,249,249,144, 74,165, 87,205,150,143, 90,135, 17,105,154,134,193, 96,128,193, 96,176, 10, 24,155,119,200, 42,
- 96, 44,215,178, 88,172,155,117, 76,251, 2, 15, 15,143, 78, 93,187,118,229,237,216,185,147,199, 48,140, 26, 21, 49,212, 84, 12,
- 83, 77,128,236, 74, 48,153, 76, 86, 43, 27,135,195, 65, 86, 86,150,181,225,178,196,150, 20, 8, 4,246,153, 50,248,252,143,126,
-251,237, 55, 73,235,214,173,137,146,146, 18,208, 52,109,173, 36,215,174, 93, 43, 24, 48, 96, 64, 96,114,114,242,108,157, 78,247,
-101, 29,238,149,168, 78, 16, 1,128, 68, 34, 49,193, 62,143,217,181,114,154, 76, 38,162,125,251,246, 31, 23, 23, 23, 55,213,104,
- 52,139,236,201, 70, 0, 7,114,114,114,108, 27,246,235,105,105,105,154, 65,131, 6,185,212,175, 95, 63, 46, 53, 53,245,153, 94,
-210,136,136,136,182, 28, 14, 7, 73, 73, 73, 58, 0,150,158,117,194,141, 27, 55,116,253,250,245,227, 7, 7, 7,183, 45, 45,181,
-123,202, 74, 68,100,100,228, 49, 95, 95, 95, 23, 75, 29,234,227,227,195,217,184,113,163, 56, 55, 55, 23, 6,131, 1,179,102,205,
- 66,159, 62,125,224,237,237,141, 25, 51,102,248, 45, 95,190,252,103,149, 74,213,178, 38,163, 53,143,199,219,126,247,238,221,112,
-169, 84,234,114,241,226, 69, 52,107,214, 12,197,197,197, 40, 40, 40,128, 74,165, 66, 65, 65, 1, 70,143, 30,237,251,205, 55,223,
- 4,216, 97,201,178,138,172,141, 27, 55,150,238,217,179,135,181,105,211, 38, 49,135,195,177, 10, 45, 54,155,109, 21, 90,150,216,
-138,117, 24,105, 40, 53,139, 54,119,133, 66,241, 44,243,220,248, 0,120,182, 34,139,207,231,131,207,231, 67, 32, 16, 60, 83, 92,
-214,151, 4,129, 4, 65,164,114,185, 92,190, 80, 40,228,146, 36, 9, 62,159,223,195,211,211,243, 86, 76, 76, 76,204,177, 99,199,
- 50,237, 33,209,106,181,219,249,124, 62,199,215,215, 23, 0, 16, 30, 30,142,102,205,154, 65,173, 86,211, 10,133, 2,238,238,238,
-228,163, 71,143,160,209,104,144,159,159,143,144,144, 16, 14, 73,146,219, 81, 49, 15,249, 41,156,191, 90,176, 30,192,122,203,190,
-183,183,119,161,173,165, 83, 32, 16, 32, 48, 48, 16,185,185,185, 16,139,197,172, 47,190,248,162,223,206,157, 59,223, 57,127,254,
-252,112, 0, 63,217, 80,125,249, 18,207,209,178,136, 44,219,207,191,132, 86,159, 62,125,230,197,199,199,119,174,170, 23,206,225,
-112,158,219, 92, 23,139,160,146, 72, 36,149,173, 86,160,105,186, 58,139,150,195,255, 35, 16, 8, 92, 38, 78,156, 88,182,110,221,
- 58,135,197,214,192,213,105, 86, 43,214, 83,221,200,168,168,243,179,103,207,238,123,234,212,169,220, 87,194,234,179, 69,121,143,
- 84, 2,137,187, 59,130,234,245, 30,241,118,191, 27,168, 88,125,104, 47,238,150,149,149,185, 52, 12, 18,234, 73, 82, 75,212,227,
-179,197, 82, 17,151,239,239,225, 17,200,213,235,138, 36, 30, 30, 60,157, 78, 87,138, 26,130, 64, 3,128,159,159,223, 81, 23, 23,
-151, 16,203,190,135,135,135, 27,195, 48, 16, 10,133,144, 74,165,174, 44, 22, 43,221,166,112, 61, 42, 44, 44,236, 81, 91,194,220,
-221,221,143,242,249,252, 16,146, 36, 65, 16, 4, 88, 44, 22, 72,146, 4, 73,146,214,239, 44, 22, 11, 4, 65,160,188,188,252, 81,
-102,102,102, 15, 59,238,215, 4,160, 5, 65, 16, 87, 15, 29, 58,132,184,184, 56, 28, 62,124, 24, 61,123,246,132, 66,161, 64, 74,
- 74, 10, 58,117,234, 4, 84, 12, 41,218, 5,219,201,239,150, 78,193,157, 59,119,172,194,197,118, 19,139,197,207, 98, 98, 63, 59,
-112,224, 64,252,240,195, 15,140,185, 51, 33, 34, 8,162,153,155,155,219,157,219,183,111,219, 53, 15,134, 97, 24, 24, 12,127, 93,
-106,105,188,204,243, 33, 28, 10, 14,204, 98,177,122,180,108,217,146, 80, 40, 20, 22, 1, 9, 54,155, 13, 22,139, 5, 22,139,133,
- 53,107,214,184,180,110,221,122, 46,159,207,255,152,203,229, 42,141, 70,227, 14,173, 86,187, 8, 64,233,191,169, 70,234,216,177,
-227,244,236,236,236, 62, 33, 33, 33, 7,159,129,134, 49, 26,141,122, 0, 46, 44, 22,139,243, 28,234, 40,150,249,221,210,218,136,
-125,147,121,159,143,138, 97, 98,187,224,237,237,253,243, 31,127,252, 17, 20, 18, 18, 2,163,209, 8,147,201, 4,149, 74,133,132,
-132, 4,232,116, 58,152, 76, 38,132,135,135,227,243,207, 63,215,126,240,193, 7,130, 13, 27, 54, 20,169, 84,170,161,181,208,126,
-176,123,247,110,145, 84, 42,117,209,104, 52,184,127,255, 62, 90,182,108,137,178,178, 50,168,213,106,148,151,151,195, 96, 48, 64,
-169, 84,186, 83, 20,165,175,133,235, 51, 91,145, 53,126,252,248,155, 60, 30,175,229,148, 41, 83,144,147,147, 99, 45,243, 99,199,
-142,133,159,159,159,181, 44,153,235,100,135, 42,102, 54,155, 13, 62,159, 15, 46,151, 91, 90,175, 94, 61, 16, 4, 33,120,244,232,
- 81, 93,134,226, 36, 0,148, 28, 14,135,103, 43,176,248,124, 62,146,146,146,102,243,120,188,234,172, 89,213,149, 75,198,145,253,
-127, 26, 4, 65,124,203,229,114,249,158,158,158, 92,155, 14, 39,215,213,213, 21,190,190,190,171, 1,244,178,243,190,155,123,122,
-122, 90,235,247,216,216, 88,100,103,103,239, 83, 40, 20,239, 21, 21, 21,129, 36,201,237, 36, 73,190, 99,233,164,202,229,114, 4,
- 7, 7, 55,175,142,175, 93, 11,255, 9, 32,152, 39, 44, 90,149, 58,104,144, 72, 36,120,248,240, 33,212,106, 53,147,145,145, 65,
- 76,156, 56,145,208,235,245, 63, 38, 39, 39, 95, 64,197,106,251,106,181,200, 75, 2,199,231,104, 89, 44, 90,246, 54, 0, 4, 65,
-212,218,155, 48, 26,141,174,209,209,209, 85, 77,248, 34,170, 18, 90,230,225,164, 58,189,232, 28, 14, 71, 92, 87,177, 85, 25, 7,
-247,252,234,183,236,243, 89,159,123, 6,212,111,248,241,199,159,177,223,124,243,205,139,219,182,109,163, 60,155,244,234,118,242,
-232, 79,126,223,125, 56,243,240, 31,127,252, 1, 84, 76,140,182, 23,103,227,227,227,253,103, 76,157,140,207, 63,250,224,136, 36,
-220,155,231, 74,120,138, 4, 58,245, 99, 87, 48, 26,126,163,200, 62,123, 15, 30,204, 7,144, 92, 19,137, 80, 40, 12, 73, 77, 77,
- 13,183, 93, 72,160,215,235, 33, 20, 10,113,242,228, 73, 31, 23, 23, 23, 31, 0,208,104, 52,136,137,137,177,215, 98, 18,146,158,
-158, 30, 46, 22,139, 81, 94, 94, 14,157, 78, 7,163,209, 8,154,166, 65, 16, 4, 56, 28, 14,120, 60, 30, 68, 34,145,163, 43,251,
-174, 1,120,183,119,239,222,191, 28, 62,124, 24,209,209,209,144,203,229, 72, 75, 75,179,136, 44,135,230,104, 89,172, 68,182,243,
-177,216,108, 54,126, 14, 11,195,216,188, 60,171,128,249,214,205, 13,159,211,117,139,166, 17, 19, 19,195,156, 61,123, 22, 71,142,
- 28,193, 91,111,189, 69,236,223,191,223, 64, 81, 20, 55, 47, 47,239,102, 94, 94,158, 93, 28, 52, 77, 91,211,106,169,183,109, 5,
-150,163, 66,203,100, 50,137,121, 60, 30,180, 90, 45, 44,150, 7,219,173, 65,131, 6,144,201,100,108,165, 82,201,206,203,203, 19,
- 46, 92,184,112,202,233,211,167,165,101,101,101, 67,254,201, 90,104,221,186,117, 33, 99,199,142,205, 98,179,217, 76,207,158, 61,
-135, 61,122,244,232,109,169, 84,122,226,212,169, 83, 95, 3,136,112,148,207,219,219,251, 10,155,205, 14, 82, 42,149,220, 93,187,
-118, 25,203,202,202,184, 62, 62, 62,133,150,186,195,146,215, 70,163,209,174,149,203,222,222,222, 87,138,139,139,185,223,127,255,
-189,177,164,164,132,235,231,231, 87,104,225, 41, 45, 45,229,238,218,181,203,168, 84, 42,185,110,110,110, 87, 20, 10, 69,173,124,
-197,197,197, 67,135, 15, 31,158,120,226,196, 9,111, 22,139,133, 71,143, 30,161,164,164, 4,238,238,238,216,190,125, 59, 66, 66,
- 66,176,123,247,110,153, 76, 38, 27,243,213, 87, 95,205, 53,139,172,218,230,104,117,138,139,139, 11, 41, 45, 45,133,187,187, 59,
-212,106, 53,174, 92,185,130,168,168, 40,228,229,229,129, 36, 73,184,187,187, 99,237,218,181,229, 4, 65,200,106, 34,114,113,113,
-121,123,220,184,113,238, 0, 48,110,220, 56,247,113,227,198, 85,217,192,181,109,219, 22,171, 87,175,174, 44,180, 28,233, 24, 88,
-173, 78, 54,226, 72,219,166, 77, 27,156, 62,125,122,166,131,226, 72,111, 17,109,149,173, 89,124, 62,223,225,197, 52, 52, 77,115,
- 81, 49,165,129,176,103,255, 95,128,206, 46, 46, 46,220,202, 7,203,203,203,185, 82,169,180,163, 3,194,215,203,197,165,194,224,
- 20, 18, 18, 2,133, 66, 65,233,245,250,193, 63,253,244,147, 17, 0, 90,180,104, 49,152,162, 40,173,201,100, 98,241,120, 60,168,
-213,106,248,250,250,122,213, 96, 27,253,228,192,142,133,254,149,231,104, 73,165, 82,180,104,209, 2, 58,157, 14,249,249,249, 72,
- 72, 72, 48, 82, 20,245,203,186,117,235,104, 31, 31,159, 81,253,251,247,103, 37, 39, 39,191, 15, 96,122,117, 90,228, 37,179,102,
-109,172, 86,104,153, 21,228,105, 0, 93, 42,223,100,101,241, 83,147,208,170,109,232,144,199,227,149,102,101,101,137,108, 27, 21,
-147,201,132,128,128, 0,154, 97, 24,162, 42,161,245, 44,166, 96, 14,135, 35,254,244,211, 79, 75,215,173, 91, 55,244,225,195,135,
-243,236,249,205,174,247, 35,177,173,146,200, 90,191,108,254,234,239,151, 45,244,188,119,228, 71,108, 90,181,130,162, 40, 36, 55,
-109,218,180,163, 74,165, 98,187,137,140, 40, 46,197, 97,179,200,178, 87, 20,146, 0,182, 92,186,116, 41,185, 87,175, 94,231,182,
-252,182,215, 51,239,254,253, 11,124,101,113,190,164, 81, 56,155, 27, 24,242, 78,153, 86,203, 29, 60,120,176, 15,128,254,181, 85,
- 98,165,165,165, 40, 40, 40,168, 44,192,112,231,206,157,167,174,181, 43,113, 36, 9,138,162,176,103,207, 30, 8,133, 66,136, 68,
-162, 39, 54,139,200,170,227, 66,133,116, 0,232,217,179, 39,100, 50, 25, 92, 93, 93,237, 78, 87,101,241,194, 48, 12,244,122, 61,
-244,122, 61, 12, 6, 3, 5,128,195,102,179, 49, 58, 39,199,106,229,113, 68,192, 84, 70,211,166, 77,153,243,231,207,227,220,185,
-115, 80,171,213,248,254,251,239, 33,149, 74, 95, 5,240,153,163, 92, 54,147,244, 41,165, 82,201, 81, 42,149, 86,235, 32,135,195,
-177, 90, 15,236,180,228,113,217,108,182,181, 55,106,217,108,173, 90, 44, 22, 11,126,126,126,240,247,247,199,250,245,235,185,245,
-235,215,239,243, 79,214, 64,203,151, 47,111,244,237,183,223,110,222,182,109,219,225,161, 67,135,238, 76, 73, 73, 25,233,230,230,
-118,243,228,201,147, 11,249,124, 62, 93,199,242, 29,148,151,151,231,107,123,136,166,105,161,201,100,178, 10,219,242,242,114,187,
- 59, 24, 28, 14, 39, 40, 53, 53, 85, 8, 0, 11, 23, 46,228, 0, 16, 90, 38,131, 91, 56,203,203,203, 57, 81, 81, 81, 65,246,190,
-235,137,137,137, 29,187,119,239,126,254,216,177, 99, 30, 33, 33, 33,200,205,205, 69,110,110, 46, 26, 53,106,132,197,139, 23,171,
-149, 74,101,123, 0,233, 42,149,106,191,157,156, 1, 30, 30, 30,156,172,172, 44,152, 76, 38, 52,111,222, 28,107,215,174,197,224,
-193,131, 17, 19, 19, 3,165, 82,137,212,212, 84,108,221,186,213,131,203,229,214, 88,119,104, 52,154,253, 27, 55,110, 12,174,108,
-209, 26, 54,108,152,168,176,176,208,250, 78,206,159, 63,255,137, 33, 68, 71,234,100,243,208, 86,181, 91, 93, 96, 50,153, 36, 2,
-129, 64,201,231,243,121,150,249, 89, 9, 9, 9, 14, 91,179, 42,117, 0, 29,217,255,199, 96, 17,173, 85,180,173,240,247,247,183,
-155,135,207,231, 19,150,186,209,100, 50, 65,161, 80, 80, 82,169,212, 58,188,127,245,234, 85, 42, 52, 52,148, 98,177, 88, 44, 30,
-143, 7,130, 32, 32, 20, 10,171,173,240, 25,138,153,255,230,224,207,158, 88,117, 56,237, 83,192, 96, 48,224,234,213,171, 48, 24,
- 12, 72, 72, 72, 48,126,245,213, 87,121,165,165,165,211, 0,176,143, 30, 61, 58,124,230,204,153, 44, 95, 95,223,238, 69, 69, 69,
-168, 77,139,188, 68, 98,235, 41, 43,151,165, 21, 58,221,167, 79, 31,194,188,180,146,176, 8, 39, 71,132,150,185,240,213,218,242,
- 18, 4,129,252,252,124,235,190,175,175,175,195,255,101, 47,188,188,188,212,109,219,182, 21, 23, 23, 23,239, 95,190,124,121,157,
- 44, 89,235,151,205, 95,189,100,193, 23,158,178,219, 23,145,147,151, 15, 89,145, 49,249,236,205,135,251, 0,236, 3, 0,108,104,
-114,154,152,144,182,198, 94,206, 72,111,151, 88, 14,151,189,239,181, 94,125,130, 7,141,155, 78, 78,154, 52,169,195,240,225,195,
- 21, 67,135, 14,157,234,234,234, 26, 97, 48, 24,228,123, 15, 29,202, 28, 52,104, 80,125,138,162,134,163, 22,159, 35, 26,141,230,
- 81,151, 46, 93,108,243, 83,114,252,248,113,191,204,204, 76, 76,158, 60,249,113,110,110,110,169,237,181,246,164,209, 96, 48, 60,
-138,141,141,173,118,184,208, 50,164, 8, 0,101,101,101,143, 28,200,210, 33, 48, 79,124, 47, 41, 41,193,157, 59,119,192,102,179,
-209,166, 77, 27,156, 61,123, 22, 29, 58,116,184,234,136, 85, 75,171,213, 34, 36, 36, 4, 90,173, 22,106,181,186, 28, 0,127,123,
-253,250, 0,128,247, 75, 74,112,229,171,175,112,113,201, 18,216,190,207,246,162, 89,179,102,204,197,139, 23,113,243,230, 77,232,
-116, 58,140, 25, 51, 6, 0, 8,243,187,235,136,203,140, 48, 22,139,213,179, 87,175, 94, 1, 0,160, 86,171,137, 75,151, 46, 65,
- 32, 16, 88,203,194,193,131, 7,145,155,155, 11,130, 32,224,225,225, 17, 36,151,203,235, 3,120, 88,131,217,159,120,248,240, 33,
-150, 46, 93, 10,154,166, 49,115,230, 76,132,135,135, 91, 5,214,163, 71,143,176,112,225, 66, 80, 20,133, 47,190,248, 2,141, 26,
- 53,130,209,104, 20,160,142, 46, 52,158, 7,102,204,152,113,111,223,190,125,135,179,179,179,223, 88,182,108, 89,103,130, 32,232,
-143, 63,254,120,169, 68, 34,161,158,133, 87,174, 40,195,157,187,143,172, 66,168,242,230,227,237,233, 48, 95,198,253,108,235,239,
- 41,202,150,143,130,151,167,135,163, 73, 44, 55, 26,141,234,119,222,121,199,125,207,158, 61, 68,163, 70,141,240,224,193, 3,139,
-101,168, 28,142,187,116,200,149,201,100,225, 44, 22,139,123,247,238, 93,132,134,134, 34, 46, 46, 14,139, 22, 45, 66,113,113, 49,
- 76, 38, 19,124,125,125,105,163,209,120,213, 96, 48,156,169,133,107,254,248,241,227,185, 0, 38,152, 45, 91, 77,167, 77,155, 70,
-175, 88,177, 2, 87,175, 94,181, 90,176,108, 39,195, 59, 58,116,104,107,117,178,221, 18, 18, 18,102,242,120, 60, 6, 64, 18, 28,
-119,244,172,175,108,209,170,139, 53,235, 69,225, 69,174,100,148, 74,165, 9, 98,177,184,143, 92, 46,127,194,170,213,190,125,123,
-131,159,159, 95,162,189, 60,174,174,174,114, 22,139,229, 5, 0,185,185,185, 16,137, 68,220,251,247,239, 47, 65,133,243,108,212,
-175, 95,127,137, 76, 38,227,214, 55,215,167,254,254,254,208,235,245,213, 78, 99,185,112,173,240, 71, 0, 63, 90,246, 61, 61, 61,
-243, 21, 10,133,203,138, 21, 43, 84, 75,150, 44,209, 80, 20,165, 3,112,178,180,180,212,234, 71,171,160,160, 64,193,225,112, 60,
-221,221,221, 3, 45, 66,171, 42, 45,242,146,161,122,139,150, 89, 73, 50,149, 5, 17, 65, 16, 79, 77, 80,175, 69,104,213, 42,178,
- 40,138,122,194,202, 96,153,240, 94,213,127,153, 27,245, 58, 13, 29,154, 69,150, 96,239,222,189,219,151, 47, 95,158,100,239,239,
-108,231,104,109,248,122,193, 50,139,200,186,113,238, 24,246,167, 41,138,103, 46, 89,249,109, 93,159, 64, 19,111, 97, 51, 63, 63,
-175,211, 95, 45,158, 47,185,119,100, 43,118,110,248,134,185,113,249,114,235,203,151, 47,191, 55,121,242,228,122,230, 23, 75, 6,
-224, 58,128, 65,176, 99,149, 78,110,110,110,143, 74,141,112, 58,151,203,245, 19, 10,133,200,205,205, 85,101,100,100, 56, 60, 36,
- 83, 92, 92,220,227, 5,188,128,108,139,200, 42, 46, 46, 70,106,106, 42,186,118,237, 10, 0, 56,123,246, 44,218,183,111,143,228,
-228,100,180,108,217,242, 42,128, 86,168,197, 81,171,209,104, 44,109,210,164,137,213,186,165, 80, 40,104, 0, 24,151,159,143,141,
- 82, 41,216,108, 54, 46, 46, 89,130, 57, 70, 35, 22, 57, 40,224, 99, 99, 99,153, 75,151, 46, 33, 51, 51, 19, 38,147, 9,125,251,
-246, 69, 29, 11,125, 76,100,100,228,241,147, 39, 79,250,184,186,186, 66,173, 86, 67,165, 82, 97,196,136, 17, 24, 60,120, 48,116,
- 58, 29,118,237,218,133, 3, 7, 14, 64, 44, 22, 67,173, 86, 67,173, 86,123,244,238,221,251,124,122,122,122, 39, 0,119,171, 17,
- 90, 76,143, 30, 61,144,152,152, 8, 22,139,133,214,173, 91,163,164,228,175,197, 64,126,126,126, 85,157, 99,253,147, 66,139,205,
-102, 51, 9, 9, 9,203, 58,119,238,140,236,236,236, 55, 90,182,108,249,253,200,145, 35,115,159,149,215,195, 77,140,216,168, 48,
-232,116, 58,232,116, 58, 4, 4, 4,160,172,172, 12,247,238,221,131, 78,167,131,159,175,187,195,124, 45, 98, 26, 89,249,124,125,
-125,161, 86,171,241,240,225, 67,232,245,122,120,123, 59, 36,180,130,123,244,232,113,234,151, 95,126,241,218,186,117,171,190, 75,
-151, 46,188,239,191,255,158,144, 72, 36,176,105, 88, 28, 69,194,217,179,103, 67,186,119,239,222,248,246,237,219, 72, 72, 72,128,
- 94,175, 71,139, 22, 45,144,145,145,129,182,109,219, 66,165, 82, 37, 93,190,124,249,128, 61,134, 97, 0,115,199,143, 31, 15,139,
-216, 74, 76, 76, 68,126,126, 62,196, 98,241, 83, 66,203, 50,247,209,188,106, 60,192,158,196, 90, 4,145,141,229,105,142,187,187,
-187, 1,192,183,117,180, 62, 1, 0,178,179,179,249, 77,155, 54,213, 9, 4, 2,158, 89,180,173,124, 22,190,231,137,231,176,146,
-177, 90,248,251,251, 79,243,246,246,238,222,160, 65, 3, 20, 22, 22,114,121, 60, 30,218,183,111,111,104,213,170,149,193,223,223,
-255,125,123,121,248,124,254,109, 46,151,219,169,162, 51, 65, 33, 43, 43, 11, 66,200, 69,216, 0, 0, 32, 0, 73, 68, 65, 84, 12,
-195,204,140,137,137,249,160,172,172, 12, 37, 37, 37, 60,137, 68, 98,237, 84, 55,110,220, 24, 58,157,238,182, 3,150,183,249,161,
-161,161,115,185, 92,238,162,226,226,226,170,220, 66,240,220,221,221, 37, 92, 46, 23, 6,131,225, 9,177, 89, 89,139,188,236, 34,
-235, 9,161,101,163, 34,159, 16, 58,142, 88,180,236,177, 26, 88, 38,216,219,238, 91, 68, 93,229,255,170,171, 15, 45, 55, 55, 55,
-157, 69,100, 45, 90,180, 40,169, 46, 28,187,127,249, 73,234, 70,151, 7,231, 37,253,129,244,155,201,216,151, 90, 90, 60,115,201,
-202,169,111,246, 31, 82, 88, 89,152,217,131,112, 31, 97,140,159,175,215,233,175,151, 47,145,200,110, 95, 68,126, 65, 1,254, 72,
-186,156,108, 0, 82, 1,204,124,158,166,101,160, 98,232,144,197, 98,253,155, 94, 88,235,100,248,252,252,124,139,200,106, 1, 0,
- 29, 58,116,184,106, 22, 89,176,215,162, 85, 90, 90, 90, 57,100, 77,119, 0,222,150,251,103,179,217,104, 63,119,174,195, 34, 11,
- 0,147,156,156, 12,153, 76,102,233, 41,214, 85,100,193,223,223,255,163,147, 39, 79,250,108,217,178, 69,185,109,219,182, 18,154,
-166, 57,177,177,177, 65,175,188,242, 10,177,125,251,118, 0,192,160, 65,131, 48,115,230, 76,220,186,117, 11, 34,145, 8, 29, 58,
-116,160,230,205,155,231, 59,109,218,180,247, 11, 11, 11,167, 86,217, 58,210, 52, 87, 32, 16,156, 0,240,234,237,219,183, 1,224,
- 60, 42, 66, 56, 89,172, 8,213,158,179,167,241, 45, 43, 43,227,136,197,226, 42, 93, 67,112, 43,122, 67,142, 90, 32,172,156,231,
-206,157, 91,250,245,215, 95,239,251,240,195, 15,239, 62, 35,103,149, 22,173, 62,125,250, 64,163, 51, 32,167, 80, 1,138, 50, 65,
- 99, 40,114,152,207,214,162,213,167, 79, 31,148,107,245,200,202,151,193,100,162, 80,166,177,187, 45, 23,190,246,218,107, 71,119,
-236,216,225,127,225,194, 5, 80, 20, 69,103,100,100, 60,124,231,157,119, 36, 31,127,252,177,215, 51, 44, 50, 90, 53,100,200,144,
- 1,231,206,157,147, 53,110,220,216, 51, 41, 41, 9, 69, 69, 69, 48,153, 76,120,245,213, 87,193,227,241,178,150, 44, 89,194, 5,
-176,202,222,103, 99, 22, 91,134,203,151, 47,143,189,120,241,162,167,167,167, 39,143,142,140, 68,254,177, 99,216,179,103,207, 83,
- 63,216,176, 97, 3, 96,167, 23,126,139,197,233,210,165, 75,207, 69, 96, 61,209, 82,243,120,117, 30,126,124, 89,113,233,210,165,
-220, 73,147, 38, 69, 73, 36,146,111, 59,118,236,216,213,203,203,139,244,240,240, 72, 8, 12, 12,252, 32, 54, 54,214,238,209, 5,
- 14,135, 51, 82, 36, 18,221, 51,153, 76, 44,149, 74, 5,181, 90, 93, 81, 73,155, 76, 60,146, 36, 81,191,126,125,107, 91,210,186,
-117,107,248,251,251, 83,105,105,105, 35,237,229,127,252,248,241, 19,171, 16,171,192,248,246,237,219,179,117, 58, 29, 50, 51, 51,
-207,218,158,168, 74,139,188, 36, 24, 87,163,248,178,220,148,237,205, 5, 6, 6,102, 27,141, 70, 38, 21, 96,174, 95,191,206,140,
- 27, 55,174,198, 77,171,213, 50,190,190,190,249, 85, 52,126,176,229,212,233,116, 79,252, 78,167,211, 49,126,126,126,148, 70,163,
-121,138, 83,163,209, 48, 65, 65, 65,185, 53,113, 86,129, 17,215,174, 93, 91, 55,103,206,156, 56, 7, 50,200,202,201,172,143,100,
-182,110,221,250, 63,134, 97, 58,119,140, 10,185, 57, 48,214,143,105, 31,238,155,119, 96,247, 47,131, 25,134,233, 92,121,179, 56,
- 56,173,137, 51,210, 79,212,164, 91,116, 61,249,141, 35,191, 50, 39, 87, 76, 97,190,238, 27,206,180, 12, 18,151, 70,122,187, 56,
- 26, 35,166,214,104,233,209,209,209,233, 52, 77, 51,122,189,158,137,142,142,206,120, 30,156,117, 64, 77,156,205, 81, 49,151,109,
- 72, 21,199,154, 63, 67, 58,111, 48, 12,195,200,100, 50, 70,165, 82, 49, 58,157,142,161, 40,138,177, 5,128, 27,118,112, 50, 6,
-131,129,145,203,229, 12,236,159,115, 87, 37,167, 84, 42,125,120,255,254,125,166, 97,195,134,217,102,115,252, 52,181, 90,205, 84,
-134, 90,173,102,186,118,237,202,100,100,100, 48,161,161,161,218,140,140, 12, 70, 42,149,222,169, 37,157, 13,130,131,131, 79,120,
-123,123, 39, 0, 8,119,224, 92,141,249,185,107,215,174, 48,134, 97,198, 48, 12, 51,174,154,109, 12,195, 48,145,255, 52,167, 57,
-127, 11, 25,134, 97,202,203,203, 25,153, 76,198,228,229,229, 49,229,229,229,140, 74,165, 98,174, 93,187,198, 92,184,112,129,185,
-121,243, 38,227,233,233, 89,104, 15,167,133, 79,175,215, 51, 74,165,146, 41, 42, 42, 98, 52, 26, 13,163, 86,171,153,148,148, 20,
-230,202,149, 43,204,237,219,183,171,226,123,138,211,203,203,107, 67, 65, 65,129,234,252,249,243,229,235,215,175, 47,247,247,247,
-191, 13, 32, 4, 64,132,135,135, 71,193,148, 41, 83, 24, 87, 87,215, 71,117, 44, 71, 81, 28, 14,231,218,178,101,203, 46,197,199,
-199, 23, 30, 56,112, 64,191,121,243,230,156,201,147, 39,159, 97,179,217,215, 0, 68,213,177, 28,249,186,187,187,159, 79, 74, 74,
- 50,201,229,114,166,180,180,148, 81, 42,149,140, 90,173,102, 52, 26, 13,163,215,235, 25,163,209,200,156, 57,115,134,241,243,243,
-179, 29,150,252,164,134,142,245,116,134, 97, 62, 98, 24,134,253,188,235, 58, 27,238,142,207,139,243,121,212,117, 36, 73, 26,204,
-117, 71,155,138,221,154,247,255,169,116,118,235,214,237,139,193,131, 7, 51, 61,123,246,100, 90,180,104,241,212,214,178,101, 75,
-102,226,196,137, 76,124,124, 60,243,213, 87, 95,125,241, 28,210,201, 70,197,162,151,197,221,186,117, 51, 38, 38, 38, 50,131, 6,
- 13, 98, 0,244,168, 73,139,252, 23, 4,151,197,189, 3, 97,251, 9, 0, 6,131, 33, 59, 61, 61, 93,218,216,100, 98, 1,192,154,
- 53,107,158,178, 76,217, 34, 49, 49,209, 68, 16,196,189,154,254,221, 96, 48,100,159, 60,121,210,111,245,234,213, 28, 27, 19, 48,
- 76, 38, 19,157,151,151, 71,126,255,253,247, 79, 92,127,250,244,105,147,201,100,202,114,240, 38,183, 54,111,222,124,235,243,200,
-173, 51,183, 50, 63, 56,250,199,239,222,109,226, 58,150, 74, 60, 61,171,236,133,237,122, 63, 18,196,132,154,173, 90, 4,155, 92,
-180,108,241,124,119,203, 16,228,111, 87, 11, 74,181, 58,170,107, 90,177,230,198,243,126,194, 42,149, 42,211,178, 18, 80,173, 86,
-103,253, 11, 95,194,107,168,240,113,101,170,116,172, 21,158,113,210, 41, 77,211,112,115,115,179, 90, 67,235, 96, 17,101, 44, 22,
- 86,203,163,123,150,244, 48, 12,115, 46, 37, 37, 37,116,196,136, 17,226,109,219,182,221,167, 40,138, 51,122,244,104,131,191,191,
- 63,247,236,217,179, 70, 0, 68,231,206,157,217, 5, 5, 5, 76,110,110,174,236,173,183,222, 42, 27, 59,118,172,215,245,235,215,
-121, 52, 77,215,230,180,240, 65,118,118,118,183, 58,156,171, 17, 3, 7, 14,188,143,103, 15, 99,243,194, 57, 45,144,149, 42,113,
- 63, 51,215,236,193,156, 6,245,168,208, 58,175,202,104, 52, 65,166, 44,113,216,162,117,239, 97,174, 57,196, 24, 5,138,202, 51,
-243, 85, 76,136,103,228,229,181,183, 38,108,118,135,121,243,230,245, 34, 73,146,188,120,241,162,110,249,242,229,217,143, 31, 63,
-238, 11, 32, 11, 0,228,114,121,151,173, 91,183,254,108,135, 43,135,234,144,106, 52, 26,219,126,242,201, 39, 83, 1,116, 0, 80,
-207,204,125,214,108,201,170,171, 7,243,162,210,210,210,215,123,245,234,117,140,197, 98,213,183, 41, 71,222, 0,138, 45,229,130,
- 97, 24,223,194,194,194, 55,236, 33, 36, 8, 98,229,139,170, 72, 94, 36,247, 51,214, 67, 47,197, 74,198, 19, 39, 78,124,217,183,
-111, 95,118, 72, 72,200,236,144,144, 16, 82, 46,151, 67,165, 82,129, 36, 73,248,251,251, 35, 58, 58, 26,254,254,254,244,237,219,
-183, 23,207,154, 53,171, 86,159,124, 77,154, 52, 9, 51, 26,141, 13, 73,146, 12, 3, 16,198, 48, 76, 24, 65, 16, 97, 0, 60, 1,
- 64, 34,145, 72, 66, 67, 67,217,109,218,180, 65, 92, 92, 28, 78,159, 62,141,221,187,119,255, 8,224,168,173, 53,171,178, 22,249,
- 55, 32,181, 57,152,168,107, 32,110,181, 68,103,130,198,105,134, 68,151,232,100,171,159,189,202, 34,171,250,160,210, 85,152,254,
-122,188,250,234,171,214, 2,103, 71,163,146, 89, 91,225,123,252,248,113,143,145, 35, 71, 62,193, 73, 81,148,174,164,164,100, 82,
-187,118,237,214,178, 88, 44,126,165, 23,246, 81, 81, 81,209,223, 26,171,175,178, 31,173, 30,189,222, 46,126, 86, 78, 87, 46,217,
- 48,253,208, 15, 40, 44, 42,198,111, 87, 11,228,101,122,170, 75, 70,113,121,202,139, 72,255,163, 71,143,122,190, 4,138,191, 42,
-209,250,172,193,179, 31,219,225,144,180,182, 24,117,132,217,157,200,115, 41,228, 5, 5, 5, 43,230,206,157,251,250,226,197,139,
-125, 14, 31, 62, 44,177,116, 80,250,245,235, 87,148,146,146,210, 17, 0, 95,171,213, 30, 95,188,120,177,207,252,249,243,189, 0,
-120, 1, 64,239,222,189, 11, 11, 11, 11, 87,195,137, 26, 97, 52, 26,115,162,155, 52,182,118,252,108, 93, 58,216,126, 55,153, 76,
- 57,142,240, 85,197, 99,187, 79, 81, 84,141,124, 44, 22,235,195,184,184, 56,214,135, 31,126, 88,120,248,240, 97, 75, 32, 93, 91,
-133,150, 94,139, 83, 82,123,160, 3,176,220,188, 61, 79,168,101, 50, 89, 91, 7,127, 67, 57,223,198, 42, 59,148,142,236,255, 35,
-216,191,127,255,103,131, 6, 13,218,234,233,233,249, 83, 88, 88, 88, 99, 63, 63, 63,137,139,139, 11,116, 58, 93,153, 94,175,191,
-147,158,158, 62,244,179,207, 62,123, 96,151,133, 99,235, 86, 22, 0, 46, 77,211, 2,146, 36, 69, 0, 36, 4, 65,120, 88,132, 22,
- 65, 16, 48, 24, 12,200,204,204,196,156, 57,115,168, 19, 39, 78,124, 5,224, 11, 7, 58,174,173, 0,248,216,212,227, 62, 0,244,
-168,112, 96,251,152, 32,136,203, 47, 58,191, 8, 26,167,163,174,129, 72,109,142,170,218,137,154,131, 74, 87, 87,224, 30, 63,126,
-220,246,121, 23,226,234, 56, 31, 63,126, 28,242,111, 41, 33,195,117,203,127,197,134,229, 79,196, 57,180,136,176,170,246,107,131,
- 66, 99,154,188,234,232,173, 21, 58, 19, 67, 27, 76,244,168,140,199,229,169,206,122,232,185,227,181,231, 85,150,158, 99,154, 82,
-210,210,210,218, 77,158, 60,249, 51,161, 80,216, 26, 0,202,203,203, 47,230,229,229, 45,128,121, 85, 97,109,231,157,168, 30,197,
-197,197,175,252, 27,249,244,122,253, 7,237,218,181,251,142,162,168,175, 77, 38,211,217,255, 7,143, 66,235,124, 27, 95, 94,236,
-220,185,243, 1,128,182, 0, 48, 96,192, 0, 22, 0,236,222,189,219, 97,241, 60, 98,196, 8,138, 97, 24,131,249,125, 80,163, 98,
-117,161,220, 82,167,170,213,106,121, 94, 94,222,109,138,162,110, 3,248, 25,142,175,184,245, 33, 8, 34,158, 97,152, 62,102,225,
- 22,207, 48, 76, 31,219, 99, 47,218,170, 85,203, 37,181, 79,134,119,162, 2,187, 83, 65, 84, 30, 10,172,109,191, 54,164, 23,170,
- 19, 0,180,116,230,238,255, 75,220,207,203,203, 27,254, 12,231,157,120,249,144,165,215,235,251,254, 63,186, 95,133,243,145,255,
- 71,218,191, 58, 8, 44, 11,110,223,190,253,194,166, 8,252,211,136,186,246,100, 7,188,242,190, 13,198, 85, 37,188,156, 66,203,
- 9, 39,156,112,194,137,103, 65,169, 51, 11,156,248, 47,195, 50, 55,203,178, 95,205, 28,173,202,243,179,172,251, 4,170, 95, 57,
-224, 72, 84,242,186,172,146, 56,238,228,116,114, 58, 57,157,156, 78,206,127,156,211, 29, 64, 40,128,101,181, 92, 87,121,117, 97,
- 33,128, 98, 0, 70,103,126, 58, 57,159, 65, 63,216, 5,134, 97,122,215, 52,116, 72, 16,196,161, 23, 37,180,172,147,225,155, 99,
- 94,244, 53,204,179,236,219, 43,180, 94, 52,186, 59, 57,157,156, 78, 78, 39,167,147,211,201,233,228,116,114, 62,163,208,234, 58,
-107,214,172, 79, 81,225, 26,131,153, 53,107,214,167, 12,195,244,174, 56,197,244,126,145,255,125,171, 37, 58,167, 54, 7, 99,217,
-110,181, 68,231,106, 46, 29,103,179, 89,225, 28, 58,116,194, 9, 39,156,112,194, 9, 39,254,237, 56,191,100,201,146,242, 37, 75,
-150, 88, 38,190, 63, 6, 64,152, 45, 92,143, 95,228, 31,155,135, 9,237, 89, 40, 85,115, 8,158,127, 0, 1, 36,155, 59,140,195,
-229,119, 5, 67, 71, 3, 0, 72,214, 45, 74,175, 61,101, 50, 25,126, 2,144, 87, 87,226, 72,160, 73, 35,119,151, 3, 58,138,226,
-102,151,233, 7,164, 85,132, 57,112, 24, 3,128,246,124, 30,239, 79,190,187,187, 75, 85,231,117,165,165, 26,157, 94,255,250,110,
-224,156,179, 12, 56,225,132, 19, 78, 56,241,146, 64,228,225,225,113,130, 36,201, 16,203, 1, 91,191,131,149,125, 16, 82, 20,149,
- 47,147,201, 94, 71,197, 80,241,223,201,105,251,123, 61,234,216,150, 63,111, 56, 58,116,200, 6,158,240,194,250,183, 68,204,102,
-113,248, 99,197,110,238,139,254, 55,242, 3,175,240,136,198, 68,112,112, 32,192, 0, 89,217, 57,126,247,238,102,116,219,185,109,
-213, 12,165, 66, 54,199,168,211,253,224, 40,119, 19, 64, 84,207,149,127,246,135, 89,239,186,179, 97,194,144,133,191, 28, 33, 84,
-134,224,219, 21,203, 77, 29, 18, 89,238, 94, 94, 71,151, 28, 63,238,226,209,172,217, 19,231, 24,134,169,136,175,119,227,134,203,
-236,215, 95, 63, 58, 64, 38,235,225, 20, 91,255, 73,248, 75, 36,146,105, 28, 14,167,139,193, 96, 8,225,241,120,217, 20, 69, 37,
-200,229,242,111, 1,228, 58,179,231,191,141,198,254,162,142,141,195, 66,126,201, 43, 40,188,170,212,234, 71,167,231,169,100,206,
- 92,113, 24, 53,197,215,252,199, 98,111, 2,128,171,171,235, 21,146, 36,131,108, 69,128, 37,102,175,101,191,242, 39, 77,211, 15,
-100, 50, 89,187, 26,104,195, 60, 61, 61,215, 2,104, 85,155,195,100,179,111,182,203, 50,153,108, 18,170, 95,173, 39,246,240,240,
-248,146, 32,136,129, 36, 73,178,106,187, 39,154,166, 41,134, 97,118,201,229,242, 47, 0,148, 85,119,157,135,135,199,241,180,180,
-180, 86,190,190,190,181, 90,105, 76, 38, 19,178,178,178,124, 90,183,110,125, 70, 38,147, 69,190, 72,206,191, 91,139,212, 21, 53,
-172, 58,172,246, 69, 7,240, 68,124,161, 23,234,145,149, 43,112, 61,208,182, 83,143,174, 19,167,126, 40,186,150,114, 7,127,158,
-190, 0,165, 90, 7, 22, 73,194, 93, 44, 68, 68, 68, 67, 98,229,198, 61,222, 63,174, 95,249,245,197,196, 99,189,181,106,197, 91,
- 14,201,116, 33,123,206,204,119, 90,139,188, 60, 41,128,166,240, 81,175, 88,209,236,248,171,115, 80,110,250,212, 97,145,117,226,
-132,176,168,176, 16,243, 3, 2,192, 54,153, 32, 32, 73, 8, 8, 2, 2,146,132, 72, 32, 64,207,205,155,177,224,240, 97,225,103,
-111,188,225, 20, 91,255, 49,184,186,186,142, 12, 8, 8, 88,190,105,211, 38,175, 6, 13, 26, 64, 36, 18, 65, 38,147,121,167,167,
-167, 55,159, 62,125,250,240,252,252,252,185, 74,165,114,131, 51,167,254,187,160,105, 12,219,178,104, 82, 96,254,163,187,129,227,
- 23,255, 26, 65,120, 81, 93,238,148,104, 10,156, 57, 99, 55,154, 3,184,138,170,227,151,214,116,174, 90, 8, 4,130, 66,173, 86,
-235, 91,211, 53, 60, 30,175, 72,175,215,251,213,198, 69,146,100, 80,110,110,174,175, 80, 40, 4, 69, 81,230,104, 0,180,181, 35,
-109, 27,253,196,236,168, 22,145,145,145,134,154, 56,197, 98,241,154,162,162,162,238,150, 56,129, 54,130,170, 74,228,230,230,118,
-143,138,138, 90, 83, 86, 86,246,122, 53,226,229,203,169, 83,167, 78,139,137,137,177, 88,129,204, 81, 16, 42, 62,139,139,139, 49,
-121,242,100,235,127,208, 52,141, 99,199,142, 77, 29, 57,114, 36,228,114,249,244, 26,238, 61,196,215,215,151, 48, 7, 20,175, 22,
-243,230,205,195,188,121,243,176,106,213, 42,130,195,225,184,215,146,159,207,133,243,239,210, 34,117,177, 96,213,226, 25,254, 16,
-158,156,155,117,232, 41,161,245,119,128,197,225,143,106,213,174,123,151,201,211,102,138,126,253,253, 36,210,111,223, 64,218,217,
- 29, 79, 92,243,202,235, 35, 81, 80, 92,134,145, 19, 63,114, 37, 88,236, 46,137,199,247,143, 50,234, 52, 91,236,180,102,249,133,
-240,121, 83,218,180,142,230,228,186,164,195,223,195, 5, 29, 90, 54,226, 4, 31,189, 57, 69, 13,211,119,183, 43, 86,201, 56, 36,
-178, 54,189,251, 46, 58, 26,141,240,101,177,192, 34, 8,176, 0,144, 4, 1,173, 78,135,203,195,134,161,245,246,237,248,226,224,
- 65,225,151,111,190,233,144,216, 18,137, 68,215, 8,130,240, 80,169, 84,189, 81, 17, 88,250,101, 64,148,171,171,235, 33,134, 97,
-228,106,181,186,249,191, 40, 93, 82, 84,140,209, 87,238, 29,115, 81,177,162,202,161,200,194,124, 62,127,236,128, 1, 3, 86,174,
- 94,189, 90, 88, 88, 88,136,188,188, 60, 80, 20, 5,129, 64,128,240,240,112,226,248,241,227, 94, 51,103,206, 92,113,232,208, 33,
-126, 89, 89,217,119,142,116,108, 56, 28,206, 70, 79, 79,207, 55,252,252,252, 68, 69, 69, 69,229,165,165,165,199,116, 58,221, 88,
-212, 61,108, 10,201,225,112,134,134,134,134,190, 29, 16, 16,224,151,155,155, 91,156,147,147,115, 64,167,211,253,136, 58, 6,106,
-182,201,211,102, 48,123,171, 7,144, 31, 26, 26,122, 43, 51, 51,179,232, 57,114,230,133,134,134,166,214,129, 83, 4, 96, 39,128,
-128, 90,174,203, 3, 48, 8, 14, 90,179,173, 25,203,208,127, 44,252,118,211,232,249, 35, 58, 16, 91,166,119, 15,159,176,234,248,
- 5,146,203,116,186,157,175,205,118,106, 40,251, 68,150, 57,164, 85,101, 65, 85,211,185, 26,161,211,233,124, 12, 6, 3, 56,213,
- 4,139, 87,171,213, 16,139,197, 62,246, 38,210,197,197, 5, 59,118,236, 0,135,195, 1,135,195,129, 92, 46, 71, 80, 80,144,117,
-159,203,229, 90,191,215,171, 87,175, 86, 62,138,162, 90,179, 88, 44,168, 84, 42, 80, 20,101,221, 74, 75, 75,193, 48, 12,248,124,
- 62, 40,170, 34,156,147,205,249,214,213,241, 17, 4, 49, 48, 32, 32, 0,191,254,250, 43,244,122,253, 83,231, 37, 18, 9, 82, 82,
-254, 10, 50,194, 98,177, 16, 23, 23, 71, 18, 4, 49, 16,192,244, 26,120, 25, 0, 24, 55,110, 28, 88, 44, 22, 88, 44, 22, 72,146,
-180,126,183,108, 20, 69, 97,222,188,121,168, 20,154,236,111,227,252,183,161, 22,207,240,249,168,102,142, 22,249,130,211,101,187,
-196, 51, 64, 40,146, 44,157,244,193, 71,174,135,206,220, 68, 86,118,214, 83, 34, 11, 0,174,252,249, 35,242,243,114,113, 53, 45,
- 7, 67, 71,189,239, 42,145,184, 47,173, 84,161, 86,187,108,212, 77,204,253,106,214,160, 14, 2,149, 49, 15,101, 30, 0, 43,140,
- 7,142, 80,141,153,125,154,241, 37, 98,238,114,123,210,201,231,241,254, 92,114,252,184, 85,100,181,215,233,192,167, 40,152, 40,
-202, 42,178,244, 38, 19, 52,122, 61,164, 42, 21,238,141, 28, 9,198,104,196,220,125,251,132,124, 30,239, 79,123,210, 9, 0, 92,
- 46, 87,122,224,192,129,122, 77,155, 54, 61, 13,251,157,153, 30,127,193,207,168, 38,180,140,141,141, 77,216,190,125,123, 61, 46,
-151, 43,125, 30,156, 2,129,160,191, 72, 36,122, 44, 16, 8,250,215, 49,157, 36,128,133,163, 71,143, 78,110,216,176,225, 73,179,
-176,178,138,154,134, 13, 27, 30, 31, 61,122,244, 53, 0,243,170,121,215,171,226, 12, 12, 8, 8, 88,180,122,245,106, 97, 70, 70,
- 6,114,115,115, 97, 52, 26, 49,100,200, 16, 80, 20, 5,141, 70, 3,189, 94,143,101,203,150,137,188,188,188,230,160, 34, 80,176,
- 61,247,206,117,115,115,203,216,182,109,219,128,135, 15, 31,186,158, 60,121,146, 72, 73, 73, 17,173, 88,177,162,175,151,151, 87,
- 58, 0,126, 29,242,147,148, 74,165, 91,246,239,223, 63, 41, 37, 37, 37,104,239,222,189,156,139, 23, 47, 74,215,175, 95, 63, 70,
- 42,149,110, 7,192,170,227, 51,106, 46, 20, 10,187,125,252,241,199,244,249,243,231,115,207,159, 63,159,187,114,229, 74,116,236,
-216,177,253,252,249,243, 91,212,145,179,165, 88, 44,126,245,227,143, 63,166, 19, 19, 19,243,146,146,146,114, 86,172, 88, 65,190,
-250,234,171, 29, 22, 45, 90,212,204, 65,206,157,231,207,159,239,156,157,157,221, 32, 39, 39,167,126, 78, 78, 78,104, 78, 78, 78,
-104,110,110,110, 72,126,126,126,189,130,130,130,224,162,162,162,224,132,132,132, 14, 0,126,177,135,179,177,159,104,210,244, 33,
-221,203,231,140,234,197,124,250,222,107,204,204, 33,157,153, 55, 58, 53,253,157,197,102, 19, 73,169, 89, 8,114, 3,126,156,220,
- 42, 36,216, 91,148, 18,237,233, 26,241, 47, 43,155,255, 54, 78,182, 69, 72,201,100, 50, 28, 58,116, 8,102,235, 85,115, 91,145,
-165, 84, 42,145,159,159,111, 57,199,182, 39,157, 18,137,228,196,166, 77,155, 24,173, 86, 11,133, 66,129,162,162, 34,100,103,103,
-227,222,189,123, 40, 41, 41,193,157, 59,119, 32, 20, 10, 79,216,147, 78,130, 32, 64, 81,148, 85, 72, 29, 59,118, 12,163, 71,143,
-134, 76, 38,179, 30, 99,179,217,214,239,150,223,212,198,105,177, 60, 81, 20,133,164,164, 36,140, 31, 63, 30, 43, 87,174,196, 47,
-191,252,130,248,248,120,200,100, 50,171,216, 50,153, 76,181,114, 22, 23, 23,131,166,237,235, 51, 49, 12, 3,133, 66, 97,247,115,
-183, 21, 64,108, 54,251, 41, 81,100,217, 28,121,151,158,145,243, 95, 11, 59, 60,195, 87,223,195,182,124, 49,155,234,186,188,168,
- 68,146,108,238,208,129, 35,166,122,229, 20, 41,145, 91,168, 0,139,252,171,221,107,209,125, 4,216, 44, 18,151,142, 86, 24,174,
- 72, 22, 11, 10,181, 14,165, 42, 3, 6,140,152,230,249,195,202,207,135,154, 12,218, 26,125,188,196, 0,225,209,174,174,239, 68,
- 69,213, 35,111,243,211,208,226,141,179,160,104,128, 73,124, 19,205,229,190,172,200, 63,121,239,168,203, 12,139, 82,128,140, 26,
-173, 25,238,238, 46, 30,205,154, 97,126, 64, 0, 58, 25,141,224, 50, 12, 94, 43, 44,196,141,105,211,160,219,179, 7, 36, 0,110,
-255,254,232,250,237,183, 56, 19, 16, 0,127,141, 6,165, 51,102,192,231,200, 17,112, 37, 18, 23, 60,182,111,241, 3, 65, 16,232,
-210,165, 11,142, 31, 63,238,213,179,103,207,163, 55,111,222,236,103, 50,153,206,212, 37,111,221,220,220,174,176,217,236,160,218,
-174, 51,153, 76, 57, 10,133,194,225, 48, 35,108, 54,187, 83, 92, 92,220,190,189,123,247,122, 24, 12,134,231,210, 11,225,241,120,
- 61,251,246,237,187,105,221,186,117,146, 49, 99,198,108,138,143,143, 47,215,235,245, 71, 28,121,165, 0, 44,220,176, 97,195,132,
-113,227,198,185,143, 25, 51,134,185,119,239,158,173,245,202,167, 99,199,142, 13, 55,109,218,228,223,170, 85,171,169,227,199,143,
-231, 2,152, 91,155,149,199,213,213,117,226,166, 77,155,188,139,139,139,161, 82,169,172,149,108, 78, 78, 14, 92, 92, 92, 64,146,
- 36, 72,146, 4,135,195,193,210,165, 75,189, 38, 78,156, 56, 77, 38,147, 77,179,195, 74,182,113,237,218,181, 62,175,191,254, 58,
-249,240,225, 67,144, 36, 9,129, 64,128,119,223,125,151,212,104, 52, 30,243,231,207,223,170, 86,171, 7, 59,146,135, 28, 14,103,
-232,198,141, 27, 35,218,183,111,207, 78, 75, 75, 67,219,182,109,113,233,210, 37,244,239,223,159, 83, 86, 86, 86,127,230,204,153,
-163,117, 58,157,163,126, 92,164, 66,161, 48,230,212,169, 83,217,193,193,193,214,138,165,126,253,250, 84,239,222,189,101,105,105,
-105,141,207,159, 63, 95,210,174, 93, 59, 71, 2,150, 7, 10,133,194,200, 63,254,248, 35,127,254,252,249,221, 54,108,216,208, 23,
- 0, 90,183,110,125, 96,193,130, 5, 39,101, 50, 89,244,153, 51,103,100,157, 58,117,202,177,147, 47, 64, 42,149, 82,147, 39, 79,
-118,173,233,162,205,155, 55,151,162, 34,224,114, 3, 0, 53,198,107,107, 28,234, 63,103,249,180,129, 46,160, 12, 96,140, 26,192,
- 80, 14, 24, 84,160,245,229, 32,184, 46,128, 81, 3, 31,190, 12, 59, 39, 54,150,124,242,235,253,219,212, 29,162,119, 90,113,217,
- 17, 56, 81,101, 85, 3,160, 5, 65, 16, 87, 15, 29, 58,132,184,184, 56, 28, 58,116, 8,189,123,247,190,106, 43, 6, 82, 82, 82,
-208,169, 83, 39,152, 45, 90,118,205,213, 82, 40, 20,179,230,205,155,151, 56,116,232, 80,225, 19,149, 1, 73,194,221,221, 29,189,
-122,245,210,170,213,234, 89,246, 38,148,162, 40,176,217,108,228,228,228, 96,243,230,205, 88,188,120, 49,194,195,195, 97, 52, 26,
-159, 18, 91,230,122,207,174,202,207,100, 50,225,242,229,203,248,105,251,118,204,157, 51, 7, 98,177, 24, 0, 96, 48, 24, 32,147,
-203, 33, 16, 8,172, 98,172, 22,225,180,235,238,221,255,107,239,218,195,154,186,178,253,111,159,115,242,132, 64, 32, 16, 16, 4,
-100,116,172,180, 87,171,131,232,197,199,248,168,212, 50, 90, 71,107,125,116, 20,116, 70,138,218,250,205,168,157,142, 95,191, 78,
- 91, 95, 51, 78,123,117,208,218,218,150,145,106,107,181, 29,139,218, 58, 85,219,218, 14, 62,166,222,170, 80, 91,161,248,192, 7,
-162, 16, 72, 8,132, 16, 66,158,231,220, 63,200,137, 1, 9, 36,112,162,216,203,250,190,243,145,199,225,151,181, 95,103,255,246,
- 90,107,175,125,121,121, 92, 92, 92, 43,151, 33,255,215,245,204, 2,203,178,112, 56, 28,104,110,110, 70, 78, 78,142,131,227,184,
-189,157,205, 63, 60, 41, 90,190,124, 57, 44,150,219, 6,245,161,174,152,228,196,196, 68, 12, 27, 54,204,253,158,162, 40,206, 87,
-204,127,140, 30, 2,179,199,221, 73,171, 55, 2, 0,226,226,226,144,148,148,132,152,152, 24,175,152,129,230, 34, 93, 17, 63, 50,
-195,123, 39, 90,119,227,164,108,145, 88, 54,113,192,192, 65,228, 70,149, 30, 12,195, 32, 88, 25,137,209, 51, 86,128,166, 41, 40,
-194, 34, 65,156,230,219,140,152,162,193,208, 12,244, 70, 51, 18,251, 15,164,164, 50,249, 68, 83, 39, 68, 43, 84, 41,218,246,252,
-220,209,178, 90,199, 77,200, 19,100,112,242,211,105,172, 4, 84,132, 17,207,165, 63, 32,207,254,244,135,109, 48,216, 31,241, 69,
- 95,218,225, 64, 20, 77,195,198,113,248,126,249,114, 36,231,230,162,136, 39,134,185,185, 40,202,206,134, 74, 36,130,148,162,192,
-217,237,119,248,244,125, 33, 90, 0, 80, 81, 81,129,252,252,124,213,236,217,179,247,159, 63,127,126,190,159,100,131,199,138,252,
-246,219,111,163,250,247,239,239,245,158,171, 87,175, 34, 37, 37,197,111,247,148, 68, 34, 73,127,228,145, 71,246,228,231,231, 43,
- 75, 74, 74, 16, 21, 21,213,109,162, 37,149, 74,199,165,165,165,237,121,239,189,247, 66,181, 90, 45,114,115,115, 67,167, 77,155,
-182,187,176,176,112,134,197, 98,241,133,108,182, 34, 89,185,185,185,245,121,121,121,255, 64,107, 23, 97, 85, 94, 94,222,187, 35,
- 70,140,120, 38, 59, 59, 59, 12,192, 18, 87,236, 64,135,100, 75, 42,149, 78, 24, 48, 96, 64,171, 85,173, 84,218, 98,108, 10, 14,
- 14,134, 82,169,132, 88, 44,134,197, 98, 65,114,114, 50,145, 72, 36, 99,125, 41,115, 72, 72, 72,218, 19, 79, 60, 65,157, 60,121,
- 18, 26,141, 6, 97, 97, 97, 80, 40, 20,112, 58,157,200,202,202,162,115,114,114, 38,152, 76,254,121,184,226,227,227,167, 79,154,
- 52,137, 41, 46, 46,198,181,107,215, 96,177, 88,112,241,226, 69,132,134,134, 34, 51, 51, 83,252,218,107,175, 77,187,117,235,150,
-191, 68,107, 72,118,118,118,181, 39,201,226, 37, 56, 56,152, 12, 26, 52, 72, 31, 17, 17, 49, 28,128, 63, 68,107,200,178,101,203,
-106, 54,108,216, 48,238,232,209,163,238,164,151, 71,143, 30,253, 19, 0,108,217,178,229,132, 90,173, 30, 14,192, 87,162, 5,142,
-227,216,167,158,122,170, 92, 34,145, 64, 36, 18, 65, 34,145,180,186,196, 98, 49, 40,138, 10,225,135,115,103,120, 63, 94,211,188,
-154,245,167,141, 27,131,101,180,232, 15, 51, 30, 70, 66,152, 24,144,171, 32, 30,183, 10, 36,172,197,104,201,233,175, 2, 95,172,
-194,166, 39,244, 84,246, 7,205, 7,108,206,112,245,149,186, 58,227, 61,158, 3, 70, 0,248, 59, 90, 14,215,125, 17,192,183, 61,
-100,110,250, 14, 64,242,212,169, 83,221,100,235,240,225,195, 72, 79, 79, 71,125,125, 61,138,139,139, 61, 73,150, 63, 7, 44,127,
-103,183,219,207,125,248,225,135,163,103,207,158, 77, 60,198, 23, 74, 74, 74,112,225,194,133, 34, 95,241, 40,138, 2,203,178, 16,
-137, 68,216,184,113, 35,108, 54, 27, 62,248,224, 3,124,252,241,199,160, 40, 10,132, 16, 16, 66, 16, 26, 26,138,215, 95,127,221,
-175,231,158,211,233,196,206,157, 59,177,234, 79,127,114,147, 44,151, 39, 3,125,162,163, 17, 17, 25,137, 43, 87,174,116, 74,180,
-234,234,234, 94, 57,120,240, 32, 58, 10,134, 63,120,240,160,251,117,155, 96,248,206,231, 57,154,134,197, 98,193,163,143,222, 62,
- 42,118,217,178,101,238,215,122,189, 30, 52, 77,243,117, 65,124,197, 52,115,192, 12,217,237,207,166, 60,247, 92, 43, 11,157, 55,
-204,187,193, 69,132,178,110,181, 67,182,146, 93,214,217, 24, 0, 83,209, 18,163, 85, 5,220,197, 24, 45,142, 99, 31,140,235, 27,
-139,115,101,231,193,208, 52, 36,202, 72, 40, 85,209, 96, 29, 86, 24,106,174,161, 96,223,155, 0,128,119,118,238, 5, 69, 81, 96,
- 24, 26, 22,171, 19, 15, 36,196,130,101,217, 7, 59,194,126, 8, 24, 61, 33, 58,242,191,227,251,133,145,226,240,107, 24, 20, 21,
-209,198, 17, 34,197, 3,149, 10, 50, 74, 33, 31, 89,103,104, 24,253, 35,240, 77,167,100,128,162, 64, 17,130, 32,177, 24,150,252,
-252,150,168,205,220,150, 57,171, 40, 59, 27,212,129, 3, 8,145, 74, 65, 19, 2,198,101,130,238,138, 52, 52, 52,128, 16,130, 93,
-187,118,133,103,102,102,238, 46, 46, 46,206,110,110,110,206,247, 7,163,190,190,126,234,152, 49, 99,190,222,185,115,167,186, 79,
-159, 62,119,124,175,209,104,176,112,225, 66,109,125,125,189, 95, 73,221,100, 50,217,147,211,167, 79,223,190, 99,199,142,208,203,
-151, 47,163,177,177, 17,106,181,186,187, 93, 97,120,106,106,234,254,252,252,124,165, 70,163,129,193, 96,128,197, 98,193,174, 93,
-187,194,166, 76,153,146, 95, 90, 90,154, 14,160,176, 19,140,151, 60, 73,214,226,197,139,127, 0, 16, 5, 96, 91, 91, 14,234,250,
-238, 97, 15,178,101, 0,240, 90, 7, 43,209,126,193,193,193,168,169,169,193,194,133, 11,113,233,210,109, 3,104,108,108,172,123,
-165,119,229,202, 21,168,213,106, 16, 66,162,124, 41,180, 90,173, 86, 88,173, 86, 44, 90,180, 8, 21, 21, 21,173, 48,111,222,188,
- 9, 66, 72,144,191, 21, 25, 29, 29, 29,109, 54,155,241,203, 95,254, 18,205,205, 45,231,250,206,153, 51, 7, 34,145, 8, 53, 53,
- 53, 16,137, 68,145, 93,104,159,200,169, 83,167,122, 77,173, 18, 26, 26,106, 11, 15, 15,127,200, 79,204,136,105,211,166,221,202,
-205,205,189, 99, 99,203,233,211,167,127,173, 82,169,142,170, 84,170, 65,126, 98,178,158,164, 74, 44, 22,183, 34, 90, 34,145, 8,
- 20, 69,249, 28,163,118,169,198,244, 6, 67,170,134,109,120,118,242,194,132, 40, 37,184,198,106,136, 31,121, 5,231,180,114,108,
-204, 57, 4, 0,248,227,188, 20, 12, 77, 91, 15,235,142,201, 88, 62,138,150,100,220,180, 60, 15,224,165,123,252,204,255, 31, 0,
-252, 46,184,183, 0, 12,235, 65,243,145,155,108, 29, 62,124, 24,131, 7, 15, 70, 93, 93, 29, 74, 75, 75,187, 74,178,248,231,221,
-170, 53,107,214,124, 49,115,230,204, 96,126,209, 42,151,203,177,114,229, 74,115, 99, 99,227, 42,191, 58, 17,203,130, 97, 24,247,
- 34, 89, 38,147, 33, 57, 57,217, 77,178, 8, 33,104,106,106, 2,195, 48,252,142, 68,226,163,142,136,233,211, 7, 33, 33, 33, 24,
-248,192, 3,184,236,122,142,240,175,165, 82, 41, 8, 33,112, 56, 58, 53,228, 25, 93, 65,237, 43,132,158,146,121, 82,212,161,233,
- 56, 54, 22, 44,203,242, 36,147, 19, 2, 51, 50, 50, 18,141,141,141,190, 98,246, 72,241, 98,209,226,137,214, 84,180,196,106,221,
-145,222, 97, 60,128, 2, 4,112, 75, 37, 1, 71, 88,142, 3, 67, 83, 46,223, 45, 13,154,166,160,215, 86, 97,243, 43, 75, 92, 36,
-235, 99,124,118,162, 20,113, 3, 6,223,246,227, 18, 2,112, 29,119,110,181, 82,156,187,116,102,170,188,154, 84, 33, 44, 54, 8,
- 50, 89, 27,254, 24, 46, 6, 73,164,240,236,132,184,160, 51, 7,155,115,127, 52,216, 58,157, 40,100, 20,213, 18,252, 78, 72,187,
-193, 61,148,235, 59,154, 16,112, 28, 7,142,245, 47,238,152, 39,242,114,185, 28, 54,155, 13, 52, 77, 99,235,214,173, 97,105,105,
-105,219,252, 37, 90, 0, 74,170,171,171,167,100,101,101, 29,222,187,119,111,100,100,100,100,171,213, 67, 86, 86,150,174,186,186,
-122, 10,252, 12,186, 23,137, 68,219,222,122,235,173,208,235,215,175,163,169,169, 9,114,185,220,253,240,233,106,255, 28, 57,114,
-228,231, 71,142, 28, 9, 55, 24, 12,176,217,108,144,203,229,224, 56, 14, 52, 77,227,163,143, 62,138,120,252,241,199, 15,221,184,
-113,227,145,142,116,149,203,229, 51, 92,196, 9,217,217,217, 97,217,217,217,227, 1,175,153,122,221,146,157,157, 29,182, 98,197,
-138,105,102,179,249,181, 14,202, 92,161,215,235,251,200,229,114,236,219,183, 15, 10,133, 2, 65, 65, 65,136,141,141,133, 94,175,
- 71, 80, 80, 16, 56,142,131,221,110,231, 31, 22,181,190, 20, 92,171,213, 54, 58, 28, 14,229,225,195,135, 81, 91,123,251, 95, 18,
- 18, 18, 80, 95, 95, 15,150,101,155,252,173,204,202,202,202,106, 66, 72,252,185,115,231,112,253,250,117,164,167,167,227,192,129,
- 3, 72, 73,105,241, 14, 91,173,214,174, 36,241,115,210, 52,205,117,208,111, 9,128,112, 33, 49, 93,147,151, 95,152, 44,203,178,
- 60,201,242,252,235, 73,190, 58,249,205, 86,195,249,161,104, 69,222,134,165,147, 22, 78, 30, 28, 9,179,246, 26,100, 33,145, 32,
- 97,137,216,152,115, 8,197, 87, 91,218,107,227,238,179,216,179,118, 10, 32, 87, 33, 73,169, 67,159, 16,230,137, 11, 53,247,156,
-104, 41, 61,215, 9, 61,117, 98, 74, 79, 79,135, 94,175,135, 66,161, 16, 34, 62,231,148,217,108,190,248,201, 39,159, 12,159, 58,
-117, 42, 36, 18, 9, 46, 94,188,136,194,194,194, 82, 0,167,252, 37, 90, 34,145, 8,107,214,172,193,146, 37, 75, 16, 29, 29,141,
- 85,171, 86,129, 97, 24,247, 69, 8,113, 91,184,252,145,168,232,142, 55, 62,242, 1,241,157, 25,195,149, 74,229, 26,138,162,102,
-211, 62, 84,156,211,233,116,178, 44,187,215, 96, 48,116,152,222,129, 15, 92,247,165, 45, 60,235,160,147, 57,173,219,152,119,131,
-139,116, 69,218,238, 54,244, 98,209,226,119, 29,222,113, 20, 16, 95,202, 2,151,201,174, 32, 80,138, 18,138,190,112,243, 86, 37,
- 34,194, 21, 46,146,229,186, 40, 10, 67, 7,183, 44,102, 63, 59, 81,138,184,254,131,193,208, 52, 24,154,134, 66, 46, 69,181,166,
- 10, 12, 67, 93,240,134, 59,132,198,204,153,131,226, 19,195, 35, 68,208,169,173,136,137,246, 98, 24, 24, 30,130,184, 24, 9, 30,
-139,144,245, 27, 66, 99,102,199,214, 55,206, 77,180,108, 14, 7,196, 79, 62,233,118, 23, 22,101,103, 35, 57, 55, 23,206,233,211,
- 97,178,217, 90,153,138,187, 74,180,228,114, 57,140, 70, 35,230,207,159,175,183,219,237,207,116,177,138, 11,107,107,107,103,101,
-100,100,212,242, 4,198,102,179, 33, 35, 35,163,182,182,182,118,150, 15, 86,162, 59,196,110,183, 63,147,146,146,162,215,233,116,
-110, 61,187,242,192,225, 69,165, 82,125,150,151,151,167,178, 88, 44,112, 56, 28,110, 76,185, 92, 14,154,166,161, 86,171,177,103,
-207, 30,181, 74,165,234,240,204, 42,179,217,252, 73,110,110,110, 61, 0,228,230,230,214, 19, 66,142, 17, 66,222, 38,132,188,213,
-230,122,155, 16,114,204,243, 94,179,217,188,191, 35,108,171,213,122,172,180,180,148, 11, 10, 10, 2, 77,211,176,217,108,144,201,
-100,110,147,120, 67, 67, 3,204,230, 22, 55,119, 97, 97, 33,236,118,251, 73, 95,202,110, 52, 26,191,218,185,115, 39,155,144,144,
-128,193,131, 7, 35, 57, 57, 25,169,169,169,232,215,175, 31,214,173, 91,231, 52,153, 76,126,143,189,202,202,202,207,254,249,207,
-127,218,227,227,227, 49,124,248,112, 72,165, 82, 12, 29, 58, 20,177,177,177,248,235, 95,255,106, 53, 24, 12,135,187,208, 76, 55,
-206,159, 63, 79,119, 64,114, 67,225,195,238,221, 54, 82,113,230,204, 25, 58, 53, 53,245,211,182, 95,140, 28, 57,242, 83,133, 66,
-161,228, 77,236,254,172,200, 61,201,149, 84, 42,117, 95,252,231, 12,195,248,178,250,161, 30,138, 86,228,253,109,201,196,133,147,
- 7,135,227,211,175,190,133,216, 86, 15, 88, 59,240, 8, 58,237, 32,226, 96, 68, 43, 69,113, 61, 96, 14, 88, 14,224, 7,180,228,
- 97, 90,133,158, 37,238,192,247,218,218, 90,148,150,150,162,176,176, 16,169,169,169, 56,121,242, 36,112, 59, 64,222,111, 49, 24,
- 12,171,214,174, 93,107,226,119,242,189,248,226,139,102,163,209,184,202,223,103, 48,199,113, 16,137, 68, 72, 74, 74,194,138,112,
- 76,117,201, 0, 0, 13, 69, 73, 68, 65, 84, 21, 43,112,232,208, 33, 92,188,120, 17,118,187,221, 77,132,248,152, 76,127, 44, 90,
- 98,177, 24,209,209,209,176,219,237,110,107, 22, 0, 92,190,116, 9, 12,195,128,101, 89, 88,173,214, 78, 45, 90, 74,165,114,205,
-246,237,219,127,175,211,233, 98,180, 90,109,148,231, 85, 93, 93, 29, 85, 85, 85, 21,117,235,214,173,168,138,138,138,168,242,242,
-242,168,107,215,174,197,188,250,234,171,191, 87, 42,149,107,124,209,147,166,105, 12, 29, 58, 20,203,150, 45,115, 95,111,188,241,
-134,251, 42, 40, 40,240, 59,120,157,166,105, 36,173,222,136, 41, 90,206,125, 29, 82, 19,247, 85,252,199,197, 29, 97, 6,156,139,
-116,137,191,184,118, 27,122, 30, 44,221,142,240,187, 14,249,103,153, 59,108,163,109, 48,124,192,196, 97,109,254,250,106,217,165,
-137, 73, 67, 70, 80, 26, 93, 99,171,237,159,201, 19,102,129, 16,130,190,253, 7,131,102, 24,208, 52, 5,134,166, 17, 22, 42, 67,
-233,185,115,172,197,108,254,186, 61,204,241, 0, 35,145, 75,222,152,247,216, 80, 89,165,164, 6,234,152, 96,136, 69, 45,220,145,
-187, 58,171,205, 12,193, 0, 67, 66,240,219, 91, 17,242,175,171,155,223, 8, 55,217, 62, 61,230,101, 5,200,178, 44, 20, 82, 41,
-154, 45, 22,152, 29, 14, 76,216,188,217,237, 46,164, 8,193,119, 0, 30,222,188, 25,223,228,231, 35, 84, 34, 1,164, 82,159,119,
-133,180, 71,180,116, 58, 29, 22, 44, 88, 80, 91, 85, 85,149,217,149, 24, 45, 94, 44, 22,203,113,141, 70,147, 57,107,214,172, 93,
-251,246,237, 83,205,154, 53, 75,175,209,104, 50,125,140,123,186, 67,154,155,155,243, 43, 42, 42,154, 22, 44, 88,240,254,238,221,
-187, 35, 34, 35, 35,221, 43,145, 46,117, 86, 66,116,147, 38, 77,146,250,114, 95, 39,183,172,117, 5,183, 47,113, 89,182, 30, 94,
-188,120,241, 55,104,137,191,242,148,213,239,188,243,206, 28, 15, 23,227,219, 0, 54,119, 4,220,208,208,240,214,138, 21, 43,126,
-119,252,248,241, 72,153, 76, 6, 66, 8,196, 98, 49, 6, 14, 28,232,222, 69, 35, 18,137,192,113, 28,158,123,238, 57, 93, 77, 77,
-205, 22, 31,219,102,241,218,181,107,199, 53, 55, 55,135, 47, 88,176,128,150,201,100,168,174,174, 70, 78, 78,142,115,199,142, 29,
-245, 38,147,105, 97, 23,136,240,206,151, 95,126,121, 66, 99, 99, 99,255,172,172, 44,177,193, 96,128,217,108,198,243,207, 63,111,
-125,247,221,119,111,154,205,102,191, 19,254,142, 26, 53,170,172,188,188,124,108, 83, 83, 83, 93, 80, 80, 80, 91,107, 31, 9, 14,
- 14, 30, 1,224,125,127, 48,147,147,147,175,220,184,113, 35,117,253,250,245,199,236,118,187,232,244,233,211,238, 96,248,173, 91,
-183, 22,200,100,178, 73,240,243,240, 85, 66, 8, 43,149, 74, 91, 89,176,218,190,102, 24,166,211,103,218,131,125,130,214,255,237,
-233,113, 11, 31,125, 72,137, 79,190, 58,139,181,251,175, 94,120, 96,161, 58,233,231,225, 90,176,218, 82,252,113, 94, 10, 54,238,
- 62, 11,160,197,117,200,214, 20,131,171,187, 2, 46, 36, 30,215,244,186,202, 30, 48, 7, 20,160, 37,101, 70, 79,147, 86, 36,171,
-184,184, 24, 19, 39, 78, 4, 0,156, 60,121, 18, 99,198,140,193,201,147, 39, 49,118,236, 88,191,115,105,185,228,223, 13, 13, 13,
-229, 5, 5, 5,255, 21, 31, 31,143, 83,167, 78, 93, 3,240,111,127,149,228,137, 22,195, 48,248,205,111,126,131,180,180, 52, 36,
- 36, 36,180,218,109,200,191,246,135,108, 56, 28, 14, 12, 25, 50, 4, 22,171, 21, 98,177,216,237,154,100, 24, 6,234,168, 40,148,
-149,149,249,100,209,162, 40,106,246,140, 25, 51,168,146,146, 18,204,157, 59, 23,187,118,237,242,122,111, 70, 70, 6, 62,252,240,
- 67,204,152, 49,131,122,225,133, 23, 58, 76,239,192, 7,161,251, 82, 38,126,158,238,236,185, 47, 20,102,160,185, 72,119,196, 35,
-181, 67,187, 78,147,118, 62,203,109, 69,180, 60,146,132, 5,134,104, 57,108,187, 14,124,240,230,138,212,109, 99,213, 49, 81, 74,
-232, 13,102, 55,217, 42, 42,248, 24, 0, 48,115,241, 95,192,208, 45, 46,197, 80,133, 12,114, 49,141,252,247,182,232,108,182,230,
-118,123,151, 81, 68, 45,121, 97,244, 64,165, 36,216,142,134, 62, 28, 6,171,111,159,148, 67,250,127,124, 39,225,250, 69, 56, 34,
-139,235, 48,239,231,138,208, 45, 37,245, 75, 96,103,223,184, 99, 66,172,175, 55,215,159, 59, 39, 79,223,190, 29,167, 51, 51,209,
-215,233,196,177,216, 88,168, 68, 34, 40,165, 82, 80,132,192,252,175,127,225,155,125,251, 16, 45,149, 2, 33, 33,112,172, 91, 7,
- 75,105, 41,236, 70,163,185, 11, 43, 51,204,153, 51, 71,167,211,233,102, 89,173,214,227,221,173,103,179,217,124,164,162,162, 98,
-201,168, 81,163,182,217,237,246,103,204,102,115,183,118, 70, 89,173,214, 35, 26,141,230,201, 57,115,230,124,188,127,255,254,200,
-176,176,176, 46, 99,213,214,214,166, 8,212,157, 88, 0,127,118, 5,183, 47,201,206,206, 14, 59,115,230,204,239,242,242,242,182,
-121,172, 38,162, 22, 45, 90,244,116, 27,146,213,233,174, 67, 0, 55,106,106,106,214,173, 92,185,242, 47,155, 54,109, 82,240,129,
-239,223,127,255, 61, 28, 14, 7, 68, 34, 17,156, 78, 39, 22, 45, 90,212, 88, 91, 91,187, 17,222, 51, 58,223,209,181, 26, 26, 26,
- 6,174, 95,191, 62,111,243,230,205,105, 52, 77, 7, 59,157, 78, 83, 83, 83,211,177,230,230,230,133,232, 90, 30, 45, 86,171,213,
- 46,120,233,165,151, 22,228,228,228,204,160, 40, 42,202,225,112,232,140, 70,227, 65,179,217,252, 46,186,224, 74, 58,117,234,148,
-118,222,188,121, 87,181, 90,237,131,113,113,113, 6,133, 66, 97,181, 90,173,180, 92, 46, 15, 13, 14, 14, 78, 6,112,138, 16,242,
-163, 63,152, 69, 69, 69,154,172,172,172,235, 22,139, 37,233,237,183,223, 62, 17, 26, 26,250, 21, 33,132,136,197,226,112,185, 92,
- 62, 17,192, 49, 66,200,101,127, 48, 41,138, 98, 61,173, 87,109,227,179, 36, 18,137, 79, 49, 90,253,213, 65,191, 77, 27,200,224,
-147,175,207, 98,237, 39, 55,118, 58, 57,110,223,190,162,186,127,173, 26, 3,216,246,206,195,208, 89,239,183,184, 11, 1,176, 53,
-197,176,237,205, 0, 9,138,196,137, 91, 34, 24,204,182,207,208, 43,237,137, 59,189,131, 78,167, 67, 73, 73, 9, 79,178,146, 1,
- 96,236,216,177, 69, 60,217, 42, 44, 44,196,240,225,195,139, 0,136,252,237,175, 13, 13, 13, 43,231,207,159,127,196,181, 56, 94,
-217,133,133,159,155,104,241,132, 42, 33, 33,193,253,222,243,242,136,209,242, 73,156, 78, 39,196, 98, 49, 24,134, 65, 76,108,172,
-251,183, 56,142, 67, 89, 89, 25,244,122,189, 79, 68,139,166,105,154, 16,130,185,115,125,219,144,252,212, 83, 79,225,216,177, 99,
-160,125,100,133, 52, 77, 35, 49, 49,177,211,123,120, 94,234, 43,102, 92, 92, 92,151, 49, 3,205, 69,186, 74,176,218,123,221, 30,
-169,242, 54, 32,238,150, 84, 54, 54, 26,254,252,222,246,173,155, 22, 45,125, 78, 81,124,165, 26,134, 70, 11,104,154,242,124,120,
-130, 97,104,132, 6,203, 16,223, 71,137,221,255,248,187,209,216, 80,255, 18,188,156,123,152, 16, 34, 94, 60,105,196,207,165,226,
- 24, 19,146, 30,158, 3, 90,118,155, 4,112, 26, 47,222,193, 49, 95,224, 87, 55, 76,178, 3, 55, 76,139,191,171,179,222, 73,180,
-172,214,201, 47, 62,246,216,231,107, 15, 29, 10, 26,185,115, 39,174, 44, 90,132, 88,179, 25, 82,151, 43,145, 34, 4, 10,177, 24,
- 10,177,184,133,100,229,228,192,236,112, 96,115,102,102,147,197,106,125,204,159, 65, 94, 91, 91,139,233,211,167,107, 43, 43, 43,
-167,160, 11,174, 61,111, 98, 50,153,242, 1,228, 11,133,103,177, 88,142,223,188,121,243, 87,211,167, 79, 63,116,228,200, 17,117,
- 15, 73, 50,199,147, 45,219,153, 51,103,158, 62,113,226,196, 21,180, 62, 88,180,254,196,137, 19, 87,178,178,178, 72, 94, 94,222,
-187, 0, 94,134,143, 9, 60, 77, 38,211,214, 47,191,252, 18,227,198,141,123,121,195,134, 13, 17, 41, 41, 41,136,138,138,130,209,
-104, 68, 97, 97, 33,150, 47, 95,174,111,104,104,216, 80, 95, 95,191,201, 79,157,109, 22,139, 37,195,115, 43,181, 16,245, 96,177,
- 88,118, 84, 85, 85,237, 16, 10,240,217,103,159,253,190,172,172,172, 86,173, 86,255,183, 88, 44,126, 24, 45,113, 64, 26, 0,239,
-250, 75,136,120, 89,186,116,233,185,178,178, 50, 93,223,190,125, 83, 93,152, 97,104, 57,198,104,123, 23, 48, 43,207,158, 61, 27,
- 55, 98,196, 8, 74, 36, 18,113, 52, 77, 67, 36, 18,113, 12,195,112,174,184, 26, 14, 0, 14, 30, 60, 40, 5,208,225,177, 57, 87,
-106,204,235, 51,254,254,159, 23,126,212, 52,239, 43,173,110, 90, 1,128,219, 91, 28,244,197, 80, 53, 61,121,242,160,155,176,228,
-142, 5, 9,109, 73, 84,201, 53, 86,129, 4, 71,227, 38,219, 23,171, 63,189,160,113,128,188,214,203,169,218, 95, 87,195,149,222,
-161,170,170,202,147,100,241, 86,171,228,177, 99,199, 22,185, 72, 22,255, 93, 87,226,203,142,178, 44,219,173, 57,140,227, 56,172,
- 93,187, 22,239,188,243, 14, 58,203,104,238,218,221, 71, 58,195,227, 45, 90, 78,167, 19, 54,155, 13,197,197,197,238,156, 93,188,
-187,144, 79,237,224,112, 56, 58,220,173,238,116, 58,157, 86,171, 21, 31,125,244,145, 79,100,107,207,158, 61,104,110,110,134,179,
- 19, 6,231,153,138, 97,216,176, 97,208,235,245,238,205, 62,201,201,183, 83,229,217,108, 54,191,136, 43,143,153,148,148, 4,157,
- 78, 7, 62, 94, 56, 62,243,182,177,199, 97, 50,253, 84,251,189, 87,139,214, 93,159, 49,165, 65,161, 71, 82, 70,167,141,201,124,
-122,121,112,163,197,137,235,215,203,161,173,169, 2, 69, 40,196,244,141, 67,191,126,137,144, 75, 40,236,202,221,100, 42,250,230,
-171,255, 52, 26,235,210,189, 97, 77, 85,138,191,201,121,114, 76,234,128, 1, 33, 4, 14, 59,224,180, 3, 14, 59,192,186,254,242,
-159,177,173,251, 92, 73, 73, 61,247,194,119,250,255,253,204, 96,107,247,204,170, 89,192,152, 48,149,234,243,213, 7, 15, 6,177,
- 54, 27,106, 87,174, 68,144,195, 1,153,107, 85,210, 82, 16, 41, 28,235,214,181,144,172,140,140, 38, 67,125,189, 95, 71,240, 68,
- 70, 70,158, 37,132, 68,106,181,218,251, 42, 51,188, 90,173,254,140,227, 56,157, 78,167, 75,233, 65,122, 69, 1,168, 7, 96,107,
-103, 33,161,134,255,241, 63,188, 36,170,213,234, 23, 40,138, 26,197,113, 92, 4, 69, 81,117, 44,203,158,170,169,169,121, 21, 64,
- 89,239,124,122,207,132,207, 12,255,179, 78,238,171, 1,240, 7,180, 4, 5, 95,247, 21,124,168, 82,169,180, 72,236,251,127, 61,
- 88, 58, 97,118,178, 18,253,251,132, 64, 36,150,161,178,193,129,163, 63, 54, 96,123,129,166,194,108,119, 62,126, 73,219,116,190,
-183, 41, 58, 20,193,143,224, 17, 82, 84, 42,213,183,159,127,254,121, 74,255,254,253, 41,207,128,119, 62, 87, 30,239,222, 98,152,
- 22, 46,119,252,248,113,199,220,185,115, 79, 85, 87, 87,143,243,134, 25, 18, 18,242,197, 15, 63,252,240,168,193, 96,184,131, 80,
-121,102,138,231,223,155, 76, 38, 44, 93,186,244, 75,111, 71,240, 40,149,202,156, 77,155, 54,253,126,230,204,153, 20,159,142,194,
-243,226,143, 11,226, 47,155,205,134,247,223,127,159,221,178,101,203,235, 6,131,193,171,235, 48, 38, 38,166,162,178,178, 50,142,
- 79,181,224, 75, 82,209,196,196,196,170,242,242,242,216,187,137,121, 31, 19,174, 86,214,173,123, 98,154, 16,201,229,207,134, 40,
-194, 95,153, 57,127, 89, 68,226,128, 7, 72,116, 76, 95, 16, 80,168,214,220, 66,249,213, 75,220,254, 15,222,172, 53, 53,232,215,
-152,205,166, 55, 59,194,121, 8, 24,240,179, 80,241, 94,137, 19,131,192, 19,160, 54,231, 83,221,177,226, 0, 96, 19, 81, 23,174,
- 27,237,115,126,236,192,237,195,147,173, 63,239,223, 31, 36, 25, 52,232,142, 68,113, 44,203,194, 82, 90,138,205,153,153,126,147,
-172, 94,233,149, 94, 17, 68,250,163,243, 28, 89,118,180,228,231,242,215, 98, 66,146,162,130,231,112,192,108, 10,236, 16,138, 16,
-137,131,195, 69,112,248, 34,136,105,218, 86, 84, 5,115,111,245,251, 36, 61,246, 80,105, 0,193, 42,149,234, 43,154,166,251,241,
- 22, 25, 79,107,125, 59, 7, 74, 95,175,174,174,158, 4,160,163, 29,194, 3, 66, 66, 66,222,116, 58,157, 35,125, 57, 84,154,166,
-233,211, 70,163,241, 89,116,112,168,116, 32,118, 29, 70, 68, 68,148,149,151,151, 15,224,119, 81,123,206,149,237,237, 44,191,124,
-249, 50,198,143, 31, 95,174,209,104, 18,239, 38,102, 79, 21, 47,187, 14,123,142, 69,203, 67, 98,197, 82,197, 2,137, 92,246, 8,
-107,119, 36,129, 0,140, 72,116,193,218,108,254,218, 98,110,124, 15, 94,220,133,119, 83,102, 1, 99,164, 18,201, 23,226,208, 80,
-121,123,164,205,110, 52,154, 45, 86,235,228, 94,146,213, 43,189,210, 43,189,210, 43,247,145, 12, 82,169, 84,159,139, 68, 34,169,
- 39,153,108,251,154, 23,135,195,209,172,213,106,211, 1, 92,188,203,152,255, 63,197,207, 32,181, 52, 95, 49, 93,215,248,158,142,
- 25,192,178,115, 2, 98,142,119, 97,174,190, 79,244, 28,223, 83, 49,249,242,250,129,155,230, 79, 63, 18,170, 62, 61,244,228,132,
-214, 51, 80,152, 66,141,163,118,244,228, 2,208,238,171,239, 19, 61,199,247, 52,204,182,253,199, 71, 92,191, 48,125,236, 83,254,
-234,201, 9,173,103,160, 48,187, 59,142, 58,208,147,235,110, 95,242,210,246,171,113, 31, 74,201, 47,192,149,252, 2, 92,241,240,
-118,243, 54,102,123,251, 63,191, 2, 9, 3,181, 19,128, 79,187,239,194, 39, 61, 21,211,179, 30,132, 60, 42, 32, 0,199, 14, 20,
- 8,141,217,166, 62,133,146,213,174, 29, 38,199,224, 67,194, 81,127,202, 46, 68,187,183, 41,171, 32,184, 93, 32, 89,126, 97, 10,
-213,239, 3,141, 41,212, 88,106,139, 41, 68,191,111,175,221, 3,216, 70, 66,233, 41,200, 88, 10, 68,159,111,167,255,116, 27,183,
- 45,166, 16, 99,169, 45,166, 16,253,254,110, 96, 10, 49,150,218,195, 20,162,223,123,107,251,251,213,208,196,187, 11, 93, 41, 30,
-136, 15,100, 43, 23, 0,168,174, 84, 90, 0, 45,101, 19,132,198, 20, 90,231, 64,144, 77, 63, 44, 48,247, 28, 83,224, 54, 90,237,
-194, 20,114,117, 51, 65,168, 54, 10, 68,127,247,196, 20, 10,191, 45,142, 16,237,212, 30,102,119,245,245,162,167,224,101,239,110,
-191,191, 91,152, 2,183,145, 32, 99,169, 13,230, 4,129, 23, 3, 19, 60,222,175, 22, 18, 83,168,177,212,142,158,221,110,167,246,
- 48,187,171,175, 23, 61, 5, 47,187, 16,115, 72,160,112,239,165, 69,139,163,188,246,137,220, 54,215, 93, 33, 26,247,204, 37,231,
- 39,246, 79, 10,211, 79,247, 76, 90, 0,218,254,158,234, 41, 36,102, 91, 29,133,116,247, 4, 82, 79, 33, 49,253,208,245, 39,135,
-121,191,181,123, 79,172, 79,111,120,221,113, 75,121,179,142, 6, 66, 79, 33, 49,125,196,254, 73, 96,118,163,237,127,114,194,244,
- 20, 69,248,138, 23,120,101, 2,129, 45, 48, 1, 43,183,192,122, 78, 8,132,133, 48, 0, 34,184,158,174,149,242, 43, 1, 40,251,
-253, 82,167,189, 99,169,119, 44,245,184,177,212,166, 79, 78, 16,208, 82, 36,168,229,185, 45,166, 16,191,225,137, 33, 84, 31, 13,
-116,217,133, 28, 75,129,104,251,251, 77,254, 15,176, 49,196,128, 26,186,125, 59, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130,
+137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 2, 90, 0, 0, 2,
+128, 8, 6, 0, 0, 0, 68,254,214,163, 0, 0, 10, 79,105, 67, 67, 80, 80,104,111,116,111,115,104,111,112, 32, 73, 67, 67, 32,
+112,114,111,102,105,108,101, 0, 0,120,218,157, 83,103, 84, 83,233, 22, 61,247,222,244, 66, 75,136,128,148, 75,111, 82, 21, 8,
+ 32, 82, 66,139,128, 20,145, 38, 42, 33, 9, 16, 74,136, 33,161,217, 21, 81,193, 17, 69, 69, 4, 27,200,160,136, 3,142,142,128,
+140, 21, 81, 44, 12,138, 10,216, 7,228, 33,162,142,131,163,136,138,202,251,225,123,163,107,214,188,247,230,205,254,181,215, 62,
+231,172,243,157,179,207, 7,192, 8, 12,150, 72, 51, 81, 53,128, 12,169, 66, 30, 17,224,131,199,196,198,225,228, 46, 64,129, 10,
+ 36,112, 0, 16, 8,179,100, 33,115,253, 35, 1, 0,248,126, 60, 60, 43, 34,192, 7,190, 0, 1,120,211, 11, 8, 0,192, 77,155,
+192, 48, 28,135,255, 15,234, 66,153, 92, 1,128,132, 1,192,116,145, 56, 75, 8,128, 20, 0, 64,122,142, 66,166, 0, 64, 70, 1,
+128,157,152, 38, 83, 0,160, 4, 0, 96,203, 99, 98,227, 0, 80, 45, 0, 96, 39,127,230,211, 0,128,157,248,153,123, 1, 0, 91,
+148, 33, 21, 1,160,145, 0, 32, 19,101,136, 68, 0,104, 59, 0,172,207, 86,138, 69, 0, 88, 48, 0, 20,102, 75,196, 57, 0,216,
+ 45, 0, 48, 73, 87,102, 72, 0,176,183, 0,192,206, 16, 11,178, 0, 8, 12, 0, 48, 81,136,133, 41, 0, 4,123, 0, 96,200, 35,
+ 35,120, 0,132,153, 0, 20, 70,242, 87, 60,241, 43,174, 16,231, 42, 0, 0,120,153,178, 60,185, 36, 57, 69,129, 91, 8, 45,113,
+ 7, 87, 87, 46, 30, 40,206, 73, 23, 43, 20, 54, 97, 2, 97,154, 64, 46,194,121,153, 25, 50,129, 52, 15,224,243,204, 0, 0,160,
+145, 21, 17,224,131,243,253,120,206, 14,174,206,206, 54,142,182, 14, 95, 45,234,191, 6,255, 34, 98, 98,227,254,229,207,171,112,
+ 64, 0, 0,225,116,126,209,254, 44, 47,179, 26,128, 59, 6,128,109,254,162, 37,238, 4,104, 94, 11,160,117,247,139,102,178, 15,
+ 64,181, 0,160,233,218, 87,243,112,248,126, 60, 60, 69,161,144,185,217,217,229,228,228,216, 74,196, 66, 91, 97,202, 87,125,254,
+103,194, 95,192, 87,253,108,249,126, 60,252,247,245,224,190,226, 36,129, 50, 93,129, 71, 4,248,224,194,204,244, 76,165, 28,207,
+146, 9,132, 98,220,230,143, 71,252,183, 11,255,252, 29,211, 34,196, 73, 98,185, 88, 42, 20,227, 81, 18,113,142, 68,154,140,243,
+ 50,165, 34,137, 66,146, 41,197, 37,210,255,100,226,223, 44,251, 3, 62,223, 53, 0,176,106, 62, 1,123,145, 45,168, 93, 99, 3,
+246, 75, 39, 16, 88,116,192,226,247, 0, 0,242,187,111,193,212, 40, 8, 3,128,104,131,225,207,119,255,239, 63,253, 71,160, 37,
+ 0,128,102, 73,146,113, 0, 0, 94, 68, 36, 46, 84,202,179, 63,199, 8, 0, 0, 68,160,129, 42,176, 65, 27,244,193, 24, 44,192,
+ 6, 28,193, 5,220,193, 11,252, 96, 54,132, 66, 36,196,194, 66, 16, 66, 10,100,128, 28,114, 96, 41,172,130, 66, 40,134,205,176,
+ 29, 42, 96, 47,212, 64, 29, 52,192, 81,104,134,147,112, 14, 46,194, 85,184, 14, 61,112, 15,250, 97, 8,158,193, 40,188,129, 9,
+ 4, 65,200, 8, 19, 97, 33,218,136, 1, 98,138, 88, 35,142, 8, 23,153,133,248, 33,193, 72, 4, 18,139, 36, 32,201,136, 20, 81,
+ 34, 75,145, 53, 72, 49, 82,138, 84, 32, 85, 72, 29,242, 61,114, 2, 57,135, 92, 70,186,145, 59,200, 0, 50,130,252,134,188, 71,
+ 49,148,129,178, 81, 61,212, 12,181, 67,185,168, 55, 26,132, 70,162, 11,208,100,116, 49,154,143, 22,160,155,208,114,180, 26, 61,
+140, 54,161,231,208,171,104, 15,218,143, 62, 67,199, 48,192,232, 24, 7, 51,196,108, 48, 46,198,195, 66,177, 56, 44, 9,147, 99,
+203,177, 34,172, 12,171,198, 26,176, 86,172, 3,187,137,245, 99,207,177,119, 4, 18,129, 69,192, 9, 54, 4,119, 66, 32, 97, 30,
+ 65, 72, 88, 76, 88, 78,216, 72,168, 32, 28, 36, 52, 17,218, 9, 55, 9, 3,132, 81,194, 39, 34,147,168, 75,180, 38,186, 17,249,
+196, 24, 98, 50, 49,135, 88, 72, 44, 35,214, 18,143, 19, 47, 16,123,136, 67,196, 55, 36, 18,137, 67, 50, 39,185,144, 2, 73,177,
+164, 84,210, 18,210, 70,210,110, 82, 35,233, 44,169,155, 52, 72, 26, 35,147,201,218,100,107,178, 7, 57,148, 44, 32, 43,200,133,
+228,157,228,195,228, 51,228, 27,228, 33,242, 91, 10,157, 98, 64,113,164,248, 83,226, 40, 82,202,106, 74, 25,229, 16,229, 52,229,
+ 6,101,152, 50, 65, 85,163,154, 82,221,168,161, 84, 17, 53,143, 90, 66,173,161,182, 82,175, 81,135,168, 19, 52,117,154, 57,205,
+131, 22, 73, 75,165,173,162,149,211, 26,104, 23,104,247,105,175,232,116,186, 17,221,149, 30, 78,151,208, 87,210,203,233, 71,232,
+151,232, 3,244,119, 12, 13,134, 21,131,199,136,103, 40, 25,155, 24, 7, 24,103, 25,119, 24,175,152, 76,166, 25,211,139, 25,199,
+ 84, 48, 55, 49,235,152,231,153, 15,153,111, 85, 88, 42,182, 42,124, 21,145,202, 10,149, 74,149, 38,149, 27, 42, 47, 84,169,170,
+166,170,222,170, 11, 85,243, 85,203, 84,143,169, 94, 83,125,174, 70, 85, 51, 83,227,169, 9,212,150,171, 85,170,157, 80,235, 83,
+ 27, 83,103,169, 59,168,135,170,103,168,111, 84, 63,164,126, 89,253,137, 6, 89,195, 76,195, 79, 67,164, 81,160,177, 95,227,188,
+198, 32, 11, 99, 25,179,120, 44, 33,107, 13,171,134,117,129, 53,196, 38,177,205,217,124,118, 42,187,152,253, 29,187,139, 61,170,
+169,161, 57, 67, 51, 74, 51, 87,179, 82,243,148,102, 63, 7,227,152,113,248,156,116, 78, 9,231, 40,167,151,243,126,138,222, 20,
+239, 41,226, 41, 27,166, 52, 76,185, 49,101, 92,107,170,150,151,150, 88,171, 72,171, 81,171, 71,235,189, 54,174,237,167,157,166,
+189, 69,187, 89,251,129, 14, 65,199, 74, 39, 92, 39, 71,103,143,206, 5,157,231, 83,217, 83,221,167, 10,167, 22, 77, 61, 58,245,
+174, 46,170,107,165, 27,161,187, 68,119,191,110,167,238,152,158,190, 94,128,158, 76,111,167,222,121,189,231,250, 28,125, 47,253,
+ 84,253,109,250,167,245, 71, 12, 88, 6,179, 12, 36, 6,219, 12,206, 24, 60,197, 53,113,111, 60, 29, 47,199,219,241, 81, 67, 93,
+195, 64, 67,165, 97,149, 97,151,225,132,145,185,209, 60,163,213, 70,141, 70, 15,140,105,198, 92,227, 36,227,109,198,109,198,163,
+ 38, 6, 38, 33, 38, 75, 77,234, 77,238,154, 82, 77,185,166, 41,166, 59, 76, 59, 76,199,205,204,205,162,205,214,153, 53,155, 61,
+ 49,215, 50,231,155,231,155,215,155,223,183, 96, 90,120, 90, 44,182,168,182,184,101, 73,178,228, 90,166, 89,238,182,188,110,133,
+ 90, 57, 89,165, 88, 85, 90, 93,179, 70,173,157,173, 37,214,187,173,187,167, 17,167,185, 78,147, 78,171,158,214,103,195,176,241,
+182,201,182,169,183, 25,176,229,216, 6,219,174,182,109,182,125, 97,103, 98, 23,103,183,197,174,195,238,147,189,147,125,186,125,
+141,253, 61, 7, 13,135,217, 14,171, 29, 90, 29,126,115,180,114, 20, 58, 86, 58,222,154,206,156,238, 63,125,197,244,150,233, 47,
+103, 88,207, 16,207,216, 51,227,182, 19,203, 41,196,105,157, 83,155,211, 71,103, 23,103,185,115,131,243,136,139,137, 75,130,203,
+ 46,151, 62, 46,155, 27,198,221,200,189,228, 74,116,245,113, 93,225,122,210,245,157,155,179,155,194,237,168,219,175,238, 54,238,
+105,238,135,220,159,204, 52,159, 41,158, 89, 51,115,208,195,200, 67,224, 81,229,209, 63, 11,159,149, 48,107,223,172,126, 79, 67,
+ 79,129,103,181,231, 35, 47, 99, 47,145, 87,173,215,176,183,165,119,170,247, 97,239, 23, 62,246, 62,114,159,227, 62,227, 60, 55,
+222, 50,222, 89, 95,204, 55,192,183,200,183,203, 79,195,111,158, 95,133,223, 67,127, 35,255,100,255,122,255,209, 0,167,128, 37,
+ 1,103, 3,137,129, 65,129, 91, 2,251,248,122,124, 33,191,142, 63, 58,219,101,246,178,217,237, 65,140,160,185, 65, 21, 65,143,
+130,173,130,229,193,173, 33,104,200,236,144,173, 33,247,231,152,206,145,206,105, 14,133, 80,126,232,214,208, 7, 97,230, 97,139,
+195,126, 12, 39,133,135,133, 87,134, 63,142,112,136, 88, 26,209, 49,151, 53,119,209,220, 67,115,223, 68,250, 68,150, 68,222,155,
+103, 49, 79, 57,175, 45, 74, 53, 42, 62,170, 46,106, 60,218, 55,186, 52,186, 63,198, 46,102, 89,204,213, 88,157, 88, 73,108, 75,
+ 28, 57, 46, 42,174, 54,110,108,190,223,252,237,243,135,226,157,226, 11,227,123, 23,152, 47,200, 93,112,121,161,206,194,244,133,
+167, 22,169, 46, 18, 44, 58,150, 64, 76,136, 78, 56,148,240, 65, 16, 42,168, 22,140, 37,242, 19,119, 37,142, 10,121,194, 29,194,
+103, 34, 47,209, 54,209,136,216, 67, 92, 42, 30, 78,242, 72, 42, 77,122,146,236,145,188, 53,121, 36,197, 51,165, 44,229,185,132,
+ 39,169,144,188, 76, 13, 76,221,155, 58,158, 22,154,118, 32,109, 50, 61, 58,189, 49,131,146,145,144,113, 66,170, 33, 77,147,182,
+103,234,103,230,102,118,203,172,101,133,178,254,197,110,139,183, 47, 30,149, 7,201,107,179,144,172, 5, 89, 45, 10,182, 66,166,
+232, 84, 90, 40,215, 42, 7,178,103,101, 87,102,191,205,137,202, 57,150,171,158, 43,205,237,204,179,202,219,144, 55,156,239,159,
+255,237, 18,194, 18,225,146,182,165,134, 75, 87, 45, 29, 88,230,189,172,106, 57,178, 60,113,121,219, 10,227, 21, 5, 43,134, 86,
+ 6,172, 60,184,138,182, 42,109,213, 79,171,237, 87,151,174,126,189, 38,122, 77,107,129, 94,193,202,130,193,181, 1,107,235, 11,
+ 85, 10,229,133,125,235,220,215,237, 93, 79, 88, 47, 89,223,181, 97,250,134,157, 27, 62, 21,137,138,174, 20,219, 23,151, 21,127,
+216, 40,220,120,229, 27,135,111,202,191,153,220,148,180,169,171,196,185,100,207,102,210,102,233,230,222, 45,158, 91, 14,150,170,
+151,230,151, 14,110, 13,217,218,180, 13,223, 86,180,237,245,246, 69,219, 47,151,205, 40,219,187,131,182, 67,185,163,191, 60,184,
+188,101,167,201,206,205, 59, 63, 84,164, 84,244, 84,250, 84, 54,238,210,221,181, 97,215,248,110,209,238, 27,123,188,246, 52,236,
+213,219, 91,188,247,253, 62,201,190,219, 85, 1, 85, 77,213,102,213,101,251, 73,251,179,247, 63,174,137,170,233,248,150,251,109,
+ 93,173, 78,109,113,237,199, 3,210, 3,253, 7, 35, 14,182,215,185,212,213, 29,210, 61, 84, 82,143,214, 43,235, 71, 14,199, 31,
+190,254,157,239,119, 45, 13, 54, 13, 85,141,156,198,226, 35,112, 68,121,228,233,247, 9,223,247, 30, 13, 58,218,118,140,123,172,
+225, 7,211, 31,118, 29,103, 29, 47,106, 66,154,242,154, 70,155, 83,154,251, 91, 98, 91,186, 79,204, 62,209,214,234,222,122,252,
+ 71,219, 31, 15,156, 52, 60, 89,121, 74,243, 84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, 46,249,220, 96,
+219,162,182,123,231, 99,206,223,106, 15,111,239,186, 16,116,225,210, 69,255,139,231, 59,188, 59,206, 92,242,184,116,242,178,219,
+229, 19, 87,184, 87,154,175, 58, 95,109,234,116,234, 60,254,147,211, 79,199,187,156,187,154,174,185, 92,107,185,238,122,189,181,
+123,102,247,233, 27,158, 55,206,221,244,189,121,241, 22,255,214,213,158, 57, 61,221,189,243,122,111,247,197,247,245,223, 22,221,
+126,114, 39,253,206,203,187,217,119, 39,238,173,188, 79,188, 95,244, 64,237, 65,217, 67,221,135,213, 63, 91,254,220,216,239,220,
+127,106,192,119,160,243,209,220, 71,247, 6,133,131,207,254,145,245,143, 15, 67, 5,143,153,143,203,134, 13,134,235,158, 56, 62,
+ 57, 57,226, 63,114,253,233,252,167, 67,207,100,207, 38,158, 23,254,162,254,203,174, 23, 22, 47,126,248,213,235,215,206,209,152,
+209,161,151,242,151,147,191,109,124,165,253,234,192,235, 25,175,219,198,194,198, 30,190,201,120, 51, 49, 94,244, 86,251,237,193,
+119,220,119, 29,239,163,223, 15, 79,228,124, 32,127, 40,255,104,249,177,245, 83,208,167,251,147, 25,147,147,255, 4, 3,152,243,
+252, 99, 51, 45,219, 0, 0, 0, 6, 98, 75, 71, 68, 0,255, 0,255, 0,255,160,189,167,147, 0, 0, 0, 9,112, 72, 89,115, 0,
+ 0, 13,213, 0, 0, 13,213, 1, 61,214, 88,241, 0, 0, 0, 7,116, 73, 77, 69, 7,220, 3, 15, 13, 43, 47, 99,146, 79, 17, 0,
+ 0, 32, 0, 73, 68, 65, 84,120,218,236, 93,119,120, 20,197, 3,125,187,183,215,239,114,233, 61, 16,146, 64, 32,148,132, 80, 20,
+144, 94, 5,162,168, 8, 2, 34, 69, 44,136, 40,160, 40,168,136, 72, 87,233, 42, 32, 42, 77, 65,176, 1, 1, 41,145, 18, 72, 2,
+132, 38, 61, 65, 18, 72, 35,237, 82,175,183,221,223, 31,201,157,151,203,181, 64,162, 63,116,223,247,237,119,119,123,187,111,103,
+103,103,102,223,188,105, 0, 11, 22, 44, 88,176, 96,193,130, 5, 11, 22, 44, 88,176, 96,193,130, 5, 11, 22,255,106, 36, 38, 38,
+ 50, 13, 56,124,160,187,156,181, 91,159,255,119,206, 38,188,119,166, 17, 57,251,212,114,126,244,144,132,179,207,255, 43,167,249,
+126, 27,192, 59,176, 33,233,168,177,226,211, 42,156, 76, 99,135,179,169, 56, 27, 43, 31,217, 9, 39,211, 4,207,253,163,135, 36,
+156,125,254,223, 56,109,211,143,155,188, 13,226,116, 51, 77, 53, 52,156, 76, 99,135,179,169, 56, 31, 52, 31, 57, 9, 39,243,160,
+105,201,193,179,255, 8,255, 33, 80, 77, 40,178,220, 70, 66, 66, 2, 97,197, 79,252,191,114, 90,199,131,153,191, 49,195,218,136,
+ 56,222,216,156, 54,241,217, 88,248, 40, 33, 33,129, 72, 76, 76, 60, 1,160, 79, 99,222,123, 99, 60,119,155,123,109, 20,222,251,
+ 16, 89, 13,226,108,172,116,223,212,156,141,149,151,108, 57, 27, 35,221,219,123,238, 77,248,140, 26, 43,156,141,146,151,154, 34,
+205,219, 73, 63, 15,204,107,203,217, 24,121,201,150,179, 49,210,253,223,193,217, 24,121,201, 30,103, 99,164,123, 71,207,254,191,
+102, 80,145,255,176, 32,176,205,224,125,255,159, 5, 81, 83,137,205, 6, 56, 48,255, 56,103, 35, 63,163,143,106, 57, 27,179,118,
+211,183,177,158, 81, 83,164,119,107,206,198,226,183,229,105,140,231,100,143,243, 65,195,235, 32,156,141,126,239, 15,154,238,255,
+ 46,206, 70,126, 70,141,146,151,108, 56,251, 54,114,101,160,175,213,239,143, 26,147,179,177,242,146,157,112, 62,240,115,178,199,
+249,160,225,117, 16,206, 70,191,247,198,120,135, 52, 21,239,191, 26, 77,213,124,214,216,156, 13,228,254, 87,113, 54,176,121,102,
+ 96, 19, 60,251,127, 52,156,141,201,105, 27,198,198,108,238,105,202,112, 54, 38,103, 3,194,250,175,227,124,216,158,251,255, 99,
+124, 58,226,123,144,102, 41, 71,238,104, 83,132,179, 49, 57,221,228,254, 87,112, 62,192,179,255,215,129,250,127, 9,136, 57,226,
+ 27,185,102,130, 70,118, 96,154, 82,184, 54,102, 56,251, 54,133, 67,216, 4,104,244,112,214,214,148,231, 55,193,189, 63, 44,113,
+202,230, 37, 54, 47,253,223,229, 37,155, 52,217,183, 17,157,162, 70,117,158,109, 57, 27,227, 26,214, 28,141,149, 70,155,250,222,
+ 27, 51, 47, 53,197,179,103,241, 0, 46, 4,203,201,114,178,156, 44, 39,203,201,114,178,156,255, 89,206,127, 37, 72, 54, 10, 88,
+176, 96,193,130, 5, 11, 22, 44, 88,176, 96,193,130, 5, 11, 22, 44, 88, 60, 84,112,216,190, 27, 18, 18,146, 40, 22,139, 91, 58,
+250, 95,169, 84,222,187,119,239, 94, 63, 54, 10,255, 57,176,207,136,197, 67, 4, 18,127, 57,232, 52, 0,166,118, 99,193,130, 5,
+139,127, 53, 28,118,134, 23, 8, 4,145, 55,110,220,136,166,105, 26, 38,147, 9, 70,163,209,242,169,211,233,208,187,119,239, 6,
+119,164, 15, 12, 12, 76,230,112, 56, 45, 26,114,142,201,100,202, 41, 42, 42,234,233,228,144, 84, 0,145, 4,241,151,102, 52,127,
+119,244, 9,160,192, 96, 48,116,114,198, 73, 16, 68,164, 45,159, 3, 46,243,119,167,156,158,158,158,231, 40,138, 10,179,199,229,
+232, 59, 77,211, 89, 37, 37, 37, 61,254,206,103,244, 95, 70, 96, 96, 96, 50, 69, 81, 13, 78,159,133,133,133, 14,211,103,112,112,
+240, 69,146, 36, 67, 26, 64,201,161,105, 58,227,222,189,123, 61,157, 8,145, 84, 0,145, 78,107, 80, 54,233,137, 32,136, 60,147,
+201,212,197, 85, 62,114,198,101, 39,141,186,226,180,136, 44,138,162,150, 5, 4, 4, 76, 85,169, 84, 26, 0, 12,135,195, 97,172,
+194, 6, 0, 48, 26,141, 37, 21, 21, 21, 29,216,148,200,130, 5,139,255,132,208,162,105,154,212,106,181,200,204,204, 4,195,216,
+ 45,239, 77,247,113,189,232,243,191, 31, 9,240, 8, 8,132, 81,175,135,196,207,223,194, 93,116,253, 42,140, 6, 61,140, 58, 29,
+154,119,237,102, 14, 3,218,182,109,203,113,193, 25,182,124,249,242, 0, 15, 15, 15,104, 52, 26,104, 52, 26,104,181, 90,104, 52,
+ 26,232,116, 58,232,116, 58,232,245,122,232,245,122, 24,141, 70,104,181, 90, 36, 37, 37,153, 12, 6,131, 83,206,197,139, 23, 7,
+200,100, 50, 11,159,121, 51,115,154,121, 13, 6, 3, 52, 26, 13,142, 30, 61,234,148,147,162,168,176,130,130,130, 0, 30,143, 7,
+134, 97, 64,211, 52, 24,134,169,179,217, 34, 42, 42, 74,239, 44,144, 77,244,140,254,203,136, 94,188, 99,127,128,167, 72, 0, 35,
+ 77, 35, 33, 46,202,242, 71,214,215,187,193, 24, 77,160,141, 70,180,122,125,188,101,127, 76, 76,140,211,244,201, 48, 76,248,226,
+ 29,251,189,220,229,148,203,229,234, 54,109,218, 20,160,198,109,118, 36,180,194,212,106,117, 64, 45,127, 61, 65, 68,146,100,157,
+237,208,161, 67, 72, 72, 72,112,117,239, 97, 51,103,206, 12, 48, 24, 12,208,233,116,208,106,181, 48, 24, 12, 48, 26,141,150,205,
+100, 50, 89, 54,157, 78,135, 51,103,206,184,235,100, 45, 31, 52,104,208,228,253,251,247, 75,126,253,245, 87, 73,139, 22, 45,192,
+227,241,192,225,112,192,225,112, 64,146, 36, 40,138,194,163,143, 62, 74,176, 73,144, 5, 11, 22,255, 25,161,165,213,106,179,227,
+227,227,153,218,239,161, 2,129,128,103, 83,203, 13,105,213,170, 85,134,237,121,174,154,171, 60, 2, 2, 49,183,153, 15, 0,224,
+195,187,114,203, 11,226,147, 30, 29, 45,199,124,156, 95, 9, 0, 16,137, 68, 32,172,171,209, 14, 32,145, 72, 48,104,208, 32,240,
+249,124,116,233,210, 5, 92, 46,215,238,198,227,241,192,229,114, 93, 70, 10, 65, 16,144, 74,165, 88,176, 96,129, 89, 36, 65, 34,
+ 20, 96,122,143, 46, 16,130,193, 87, 87,111, 65, 71, 51,160, 40,202,178,185,195,201,227,241,112,229,202, 21, 80, 20, 5, 14,135,
+ 99,249, 52,127,223,187,119, 47,158,125,246, 89, 80, 20, 5,145, 72, 4,184,152, 57,216,250, 25,233,116,186, 96, 62,159,175, 7,
+ 96, 22,103, 60,130, 32,130,238,231, 25,253,151,225, 41, 18, 96,194,250, 95, 0, 0,185,171, 94,183, 60,187, 51,175,125,104, 57,
+ 38,252,229,209, 32, 8, 2, 92, 46, 23, 36, 73, 54, 26,103, 89, 89,153,122,204,152, 49,167, 60, 60, 60, 14, 85, 85, 85,193,133,
+128, 67,110,110, 46, 40,138,114,152,222, 73,146,196,202,149, 43,241,231,159,127,186,117,239, 26,141, 6,155, 54,109,130,201,100,
+170,195,107,254,110,187,207, 77,145,181,104,240,224,193,227,247,239,223,239, 77, 16, 4, 62,255,252,115,240,120, 60, 12, 27, 54,
+ 12,190,190,190, 56,124,248, 48,120, 60, 30,222,121,231, 29, 54,241,177, 96,193,194, 89,153,199, 5,208, 17,128,127,173,137, 80,
+ 13,192,203,234,144,146,218, 79,127,243,111,130, 32,210,237,240,116,173, 61,166,132, 32,136,116,171,223, 58, 0,124, 59,251,229,
+ 0, 68,181,155, 22, 53,238,127,123,171,235,152,207,131,163,235, 82, 64,205,250, 67, 0,142, 3,232,155,144,144,112, 2, 0, 10,
+ 11, 11,135, 22, 22, 22, 2, 0, 34, 35, 35,111,100,100,100,180, 49,107,158,218,230, 41,158,209,104,140, 54, 55, 85,153,221,162,
+129, 3, 7, 58,173,225, 27,245,250,122, 2,196,158,150,178,215, 92,225, 72,192,232,245,122,140, 30, 61, 26, 0, 28,190,116,172,
+ 55, 55,180, 27,116, 58, 29, 40,138, 66,235,102,254,152, 55, 36, 30,143, 48, 6, 40, 21, 4,140,149, 74,140,144, 26,112,163,109,
+ 39,108,204, 41,193,221, 42, 5, 40,138,114,139,147,166,105,135, 34,139,195,225, 96,253,250,245, 24, 51,102, 12, 56, 28,142, 91,
+124,214,207, 40, 34, 34, 98,127, 70, 70,134, 47, 65, 16,218,218,103, 36, 48, 26,141, 50,163,209,232,107, 50,153,124, 27,242,140,
+254,203, 48,210,180,221,116,232, 40,205,186,243,156,220,225, 44, 43, 43, 83, 39, 36, 36,156, 22, 8, 4, 91, 3, 3, 3, 11,242,
+242,242, 92, 10, 45, 91,241, 99, 91,169, 88,177, 98, 5,214,174, 93,139,126,253,250,185, 21, 78,173, 86, 11,130, 32,176,113,227,
+198,122,255, 45, 92,184,176,222,245, 92,112, 18, 0,200,144,144,144,215, 14, 30, 60, 40, 51, 31,235,231,231, 7, 46,151,139, 14,
+ 29, 58,192,195,195, 3,167, 78,157,130,201,100,114, 59, 95,178, 96,193,226,223, 11,123, 90,196, 10,189,231,206,157,219,101,217,
+178,101, 75,186,119,239,190, 51, 53, 53,117, 7, 65, 16,137, 86,101, 98, 66,109,249,154,104,254,205, 48, 76, 87,107,209, 83, 43,
+214,252, 9,130, 72, 52, 31,111,253,219,252,201, 48,204, 64, 0,124,243,239,185,115,231,182, 95,182,108,217,146, 57,115,230,188,
+183,116,233, 82,222,220,185,115, 99,151, 45, 91,182,196,124, 29,123,225,176,231,104, 57, 93,123,202,220, 68,117,243,230, 77, 71,
+ 77, 84,214, 47, 0,167,165,165,196,207,223,226,100,125, 28,238,107,217,191, 32,175,194,242, 2, 91,215,185, 37, 36, 18, 9,134,
+124,252,169, 91, 78,145, 78,167, 67,113,113,177,197,101,112,181,185,203, 41, 22, 9,145, 52,179, 3,114,229,124,124,148, 86,134,
+253,151,254, 4,151,203,197,227,109, 59, 96, 40,207, 3, 31,132,243, 49,243,214, 29, 24, 24,247,250,244, 50, 12, 99, 87, 96,153,
+191,155,155, 80,220, 21, 90, 54,207, 40, 87,163,209,200, 51, 51, 51,213,116,205,139, 93,196, 48,140, 55, 65, 16,213,181, 46, 87,
+176,187,207,232,191,140,132,184, 40,139,235,116,198, 99,128,101,255,179,202, 43,150,103,242,214,250, 79, 0, 0,253, 58, 61,234,
+ 50, 63,184,195, 41,151,203,213, 61, 7,244, 61, 97, 82,235,182,140, 31, 63, 62,251,216,177, 99, 34,119,194,106, 79,104,153, 93,
+ 91,179,200,162, 40, 10, 58,157,206,173,123,215,233,116, 14,243, 7,143,199,187, 31, 71, 11, 74,165, 82,183,103,207, 30,172, 91,
+183, 14,190,190,190, 24, 60,120, 48,130,131,131,177,123,247,110, 48, 12,131,215, 95,127, 29, 34,145,200,236, 94,179, 9,144, 5,
+139,255, 54,156,105, 17,193,178,101,203,150,216, 10, 25,235,223,214, 2,202, 70, 76, 89,139,181,246, 46,222,255,137,182,226,201,
+124, 93,130, 32, 18,151, 46, 93,154,224, 34, 28, 37,142,132,150,211, 41,241,181, 90,109,118, 92, 92,156, 91,106, 66,165, 82, 21,
+186, 18, 27,246,106,245,214, 46,129, 84, 42,133, 68, 38, 5,233,102,185,107, 48, 24, 44, 66,229,200,145, 35, 16,137, 68, 24, 54,
+108,216, 3, 57, 90,122,189, 30,124, 30, 23,164, 95, 32, 38,172, 58, 6,121,181,218,242,130, 57,158,149,141, 11, 69,197,152,217,
+125, 0, 36,162, 98, 40,116, 58,183,156, 55,154,166,235,137, 44,138,162, 48,122,244,104,139,155, 96,221,111, 5, 78,154, 14,125,
+125,125,207, 81, 20, 21,102,245,140,132,145,145,145,192, 95,253,122, 8,154,166, 21, 94, 94, 94, 63, 3, 8, 97, 24, 38, 12,128,
+135, 59,207,136,133,253,244,105,187,159,182,113,170,238,135, 83, 46,151,171, 19, 18, 18, 78,155,212,186, 45,249,249,249,167, 1,
+ 8, 31,121,228,145, 6, 11, 45,179,192,226,114,185, 88,185,114, 37,214,174, 93,107,249,223, 93,161,101, 52, 26,235, 8,168, 91,
+183,110,213,185,150,173,176,115,209,108,202,160,102,116, 33, 29, 25, 25,105, 57, 39, 40, 40, 8, 94, 94, 94,160,105, 26, 52, 77,
+ 67, 40, 20, 66, 36, 18,129,199,227,177,137,142, 5, 11, 22,206,180,136,122,206,156, 57,239, 17, 4,145, 88,235, 44, 93,117, 34,
+168,236,105,143,174, 54, 98,173,196,193,113, 9,246,196,150,245,119, 51,230,206,157,219,222, 54, 28,246,154, 43, 45,165,170,205,
+180,251,117, 96,221, 68,213, 88, 47, 49,103, 47, 50,169,151, 12, 34,137, 4, 28, 14, 9,130, 32, 24, 87, 92,122,189,222, 82,240,
+ 79,157, 58,213,105,191, 21,119,251, 83,233,245,122,144, 20, 7,247,130, 34, 96, 34, 79, 90,206, 53,111, 36,197,197,221,160, 54,
+224,220,188, 8,174,155, 47, 92, 91, 71,235,245,215, 95,199,166, 77,155, 64,146,164, 37, 78, 40,138, 66,171, 86,173,144,157,157,
+237,148,139,162,168,176,187,119,239, 6, 88,199,163, 89,196, 50, 12, 3,147,201,132,168,168, 40, 77,102,102,230,155,108,214,125,
+ 48,145,229,104,191,201, 68,187,237,194,216, 59, 78, 46,151,171, 71,141, 26,117,162,178,178,114, 75,187,118,237,110,161,238, 20,
+ 8, 46,249, 40,138,170, 35,176,204, 34,107,205,154, 53,117, 68,145,193, 96,112,171, 34, 96, 48, 24,234, 9,158,207, 62,251,172,
+206, 39, 0,244,232,209,195, 45,103, 24, 0, 67,146, 36,195,227,241, 48,104,208, 32,196,198,198,226,215, 95,127, 5, 77,211,152,
+ 54,109, 26, 68, 34, 17, 86,175, 94, 13,163,209,136,229,203,151,179,142, 22, 11, 22, 44,156,105, 17,237,210,165, 75,175, 46, 93,
+186,212,226, 44,217, 58, 90, 14,222,187,195,107, 69,149,191, 89,164, 1,208,218, 19, 68,246, 92, 50, 91, 1,102,189,111,217,178,
+101, 75,108,195, 97,219, 92, 89, 71,104,253, 93, 40,188,118, 5,159, 62, 22, 15,160,110,115,225,250, 71,219, 64, 34,149, 64,226,
+ 33,197,168,189, 39, 1,160,182,208,159,227,150,163,101, 22, 90,114,185,220,169,200,106,136,163, 69,242, 41,252, 24, 86, 14,134,
+207, 5,165, 51,212, 17, 90, 28,138,139, 92,223, 8,144, 92, 30, 40,147,209, 45, 78,134, 97,234, 53, 21, 78,156, 56, 17, 4, 65,
+ 88, 70,136,197,197,197, 89,115, 17,174, 94,142,179,125,106,250,224,217, 54,199, 46, 47,213,176, 57,246,126,210,231,185,175,113,
+227,167,215, 0, 0, 61,149, 74,203,179, 88, 28,247,215,216,129, 85, 87, 78, 88,220,199,143,241,246,125,113,202,229,114,245, 35,
+ 49,237, 79,243,124, 60,183,228,228,228,156, 6, 64, 62,247,220,115, 94,113,113,113,110,229, 73,243,224, 10, 91,145,101,237,100,
+153, 63, 93,140,176,181, 18,142, 38,183, 4,148,185, 25,209,141, 52,207,152,211,182, 76, 38,131, 84, 42,181,140,184, 21, 10,133,
+ 16,139,197,150,254,157,110, 10, 55, 22, 44, 88,252,119,225,109, 22, 58,181, 98,169,142,211, 84,219,183, 42,193,250,183, 61,199,
+171,214,129, 74,118, 81,190,238,175, 21,104,118, 97,118,214,108,206, 73,116, 36,210, 40,179,130,180,254, 12, 10, 10,250, 77, 42,
+149, 70,184,123,247, 13, 25,197,102, 50,232,235, 57, 91, 4, 65, 64,234, 33,133, 72, 42,129,200, 67,234,208,245,114, 38,180,204,
+ 78,145,249,165,179,117,235, 86, 72,165, 82, 76,154, 52,169,193,125,180, 44, 66,139, 71,226,176,224, 40, 56,124,170,142,200,162,
+ 40, 10, 28, 46, 23,133,210, 96,144, 92, 46, 40,163,123, 46, 89,101,101, 37, 40,138,194,188,121,243, 44, 53,120,107,145,213,144,
+123,118, 6,146, 32,204,238,150,160,101,203,150,111, 19, 4, 17, 14,160,133, 82,169, 20,220,187,119,175, 63,155, 95,157, 40, 3,
+147,161,158, 11,229,200,125,189, 95, 78,179,147,197,243,241,220,210,166, 77, 27,139,147, 37, 22,139,205,163, 77, 93, 63, 99,146,
+180, 43,178,108, 71, 8, 82, 20, 85,147,150, 93,140,142,180,118,180,150, 46, 93,106,225,181,118,178,204,104, 72, 62, 50,135,245,
+196,137, 19,184,112,225, 2,166, 78,157, 10,145, 72,132,181,107,215,194,104, 52, 98,225,194,133, 16,137, 68,224,243,249,108,226,
+ 99,193,130,117,179,234,104, 17, 27,148,216,244,131, 34,108, 68, 77,137, 61,129,101,221, 76,104,254, 78, 16,132,193, 14,175,206,
+166, 73,209,118,191,249, 83,190,116,233,210, 99,102, 39,203,106,127,157,112,184,116,180, 4, 2, 65, 68,102,102,166,101, 34, 76,
+103,159, 58,157, 14,253,250,245,115,219, 25, 51,143, 58,164, 40, 78, 29, 97, 33,246,144, 66, 44,243,128, 72, 42,181, 21, 28,132,
+171, 66,220, 92, 35,182, 22, 90,243,231,207, 7, 69, 81,216,180,105, 19, 0,224,237,183,223,118,187,143,150,153, 19, 38, 2,121,
+204,109,196,175,122, 22,186,239, 12, 40, 74,249, 3, 20, 69, 33,160,219, 80,208,143, 60, 11,149, 72, 10,202,100,116,123,212, 97,
+ 89, 89, 25,178,179,179,193,225,112, 48,107,214,172, 58,115, 29,217,142,100, 59,114,228,136,203,123,183,231,100,205,207, 41,179,
+240,136, 68, 34,242,143, 63,254,136,160,105, 58, 82,173, 86,183,236,209,163, 7,205,102,101, 23,162,136, 54,186, 37,170,220, 77,
+159,182,156,230, 62, 89,149,149,149, 91,114,114,114,206, 0, 32,199,143, 31,239, 37, 22,139,241,205, 55,223,168, 0,240,119,239,
+222, 45,114, 37,138,204,233,198,149,200,226,114,185, 53,105,217,157,123,103,234, 78, 89,226,170, 99,188, 59,105,222, 28, 86,130,
+ 32, 96, 50,153, 32, 18,137,234, 56, 89, 66,161, 16, 2,129,128, 77,120, 44, 88,176,112, 85,150,164,187, 93,142, 51, 76, 87, 43,
+ 81,149,126, 63,188, 13,185,158, 43, 80,142,132,134, 86,171,197,245,235,215,221,229,113,123, 98,204,102, 93, 30,197,199,249,149,
+ 32, 8, 2, 95,245,104, 7,137, 76, 10,177, 68,130,145,191,158,176, 20,220, 87,150,188, 13,129, 68,138,144, 94,131,221, 42,200,
+205, 77,135,214, 66,171,162,162, 2, 92, 46, 23,139, 22, 45, 2, 73,146, 88,190,124, 57, 66, 67, 67,113,239,222, 61,236,222,189,
+219, 45, 71,139, 99,226, 32,248,133, 24,136, 39,122, 66,246, 66,111,120, 15,154,143,124, 29,133, 84,141, 24,189, 53,215,192, 63,
+188, 6, 58,218,228,246, 8, 44,163,209,136, 19, 39, 78,216,118,120,183,244,169, 50, 26,141, 48, 24, 12,208,235,245, 88,190,124,
+185, 59, 35, 60,235, 61, 55,115, 28,214, 78,130,202,201,200,200,240,103, 24,198, 7,128, 39,128, 82, 54,187, 58, 71,112,183,215,
+225,223,229, 85, 0,192,222,165, 47, 90,246,207,187,242, 87,250, 92,249, 93,205, 2, 0,109, 90, 12,110, 16,167, 92, 46, 87, 63,
+222,175, 71,178,134,230,110,238,208,161, 67, 29, 39, 75, 40, 20, 18,181,191,221,178,203, 72,146, 4,135,195,169,215, 92,232, 72,
+108,185,211, 71,203,104, 52, 90, 38, 18,117,214,159,241,126, 28,173, 23, 95,124, 17,193,193,193, 22, 39,235,227,143, 63,134, 72,
+ 36,194,220,185,115, 97, 48, 24,176,102,205, 26, 54,241,177, 96,193,226,111, 23,101,127, 7,236,150,164, 26,141,230, 78,108,108,
+ 44, 28,252, 23, 42, 20, 10,185, 54, 55, 21,210,170, 85,171, 12, 59, 77,136, 3, 1, 36,217, 43,212, 9,130,128,135,204, 3, 66,
+169, 4, 98, 27, 23, 75,232, 33,131, 64, 42, 5,201,179, 91,152,215,227, 52,247, 45,177, 22, 90,230,173,178,178, 18, 92, 46, 23,
+235,214,173,131, 76, 38,131, 86,171,117,201,105,126,233,112, 56, 28,168,114,171,113, 99, 73, 18,248,194, 84,180, 28, 60, 6,193,
+ 92, 17,120,167,126,134,218,100,112, 53, 97,105, 61,206,232,232,104,124,248,225,135,245,166,117,112,132,208,208, 80,151,247,110,
+235,100,173,108,215, 28, 60, 62, 15,111, 93,203,133, 86,171, 37,198,140, 25, 67, 3, 80, 3, 40, 81,171,213, 57,238,196,103, 35,
+224,161,231,116, 54, 42,214, 12,154, 49,217, 19, 48,118, 57,205, 78,150,134,230,110,206,206,206, 54, 59, 89,158, 98,177, 24, 27,
+ 54,108, 80, 1, 32, 23, 46, 92, 40, 14, 15, 15,231,184,147,150, 56, 28, 14, 86,173, 90,101,183, 79,150, 61,209,213,144,124,100,
+125,110,159, 62,125,236, 78, 88,234, 64,188,213,227, 52,135,213,215,215,215,226,100,153, 76, 38,203,104, 67,243,236,243, 78, 42,
+ 21,108,250,100, 57, 89,206,255, 14,231,191, 18,118, 75,224,123,247,238, 61,238,232,132,168,168,168,204,204,204,204, 86,230,165,
+ 56,106, 11, 78,158, 70,163,137,238,209,163,135, 75,107,135,166,105, 8, 4, 2, 48, 12,131,254, 31, 46, 3, 65, 2, 36,234,190,
+196, 2, 30, 27, 0, 14,135, 2, 93,179,212,135,203, 81,135,106,181,186,206,203,193,222,166, 80, 40,160,213,106,221,158,205, 91,
+163,209,212,153,130,129, 96,104,220,253,125, 87,189,209,135,230,205,221,126, 59, 66,161,176, 78,211,143, 11,199,138,112,199,209,
+178,110,122,228,241,121,160,120, 92,179,163, 85,125,235,214,173, 81,108, 50,119, 31,230, 1, 11, 0,208,186,199, 48,208,180, 9,
+140,201, 84,103,153,164,152,136,199, 65, 51, 38,232, 13, 42,104,181, 90, 87,211,158, 16,165,165,165,234, 81,163, 70,157, 0,240,
+237,136, 17, 35, 50, 80, 51,187, 48, 35,149, 74, 5, 92, 46,151, 6, 80, 6,128, 41, 47, 47,247,204,207,207,167, 53, 26, 77,115,
+ 87,225,220,191,127, 63,174, 95,191,142, 94,189,122,213, 89, 14,202,236,138, 90,207,238,238, 78,250, 52, 55,151,219,155, 17,222,
+145,144,115, 23, 28, 14, 7,158,158,158,224,241,120, 88,180,104, 17,120, 60, 30,196, 98, 49, 0, 96,205,154, 53,150,201, 87, 89,
+176, 96,193,226, 63, 35,180, 92,149,155, 78,154, 21,157, 54, 33, 26,141,198,188,240,240,240, 6, 93,204,100, 50, 21,185, 16,110,
+121,187,119,239,230, 89,187, 16,174, 62, 25,134, 41,114,241,178,205,219,187,119, 47,207,158,187,225,104,129,105, 87,156, 38,147,
+ 41,175, 69,139, 22, 14, 29, 19,123, 48, 24, 12,249,174, 68,235,178, 18,117, 29,145,240,214,181, 92,135,107, 39,178,112,153,214,
+156,164,207,247,239, 55,125,222,106,221,186,117,190,151,151,215,129,192,192, 64,121, 74, 74,138,111,215,174, 93,125,173,143,233,
+218,181,107,176,205,105, 58, 56, 94,231, 16, 4, 65,228,141, 24, 49,194,110,154, 55,139, 38, 59,233, 51,207, 85,154, 63,123,246,
+ 44,207,250,124, 71,252, 86,249, 40,207, 13,225,122, 55, 62, 62,158,180,230,113,148,246, 13, 6, 67, 9,155, 10, 89,176, 96,241,
+159, 23, 90,106,181, 58, 55, 54, 54,214,232,224,191, 28,103,231,202,229,242, 46,141,125, 3, 6,131,161,199,195,192, 89, 90, 90,
+218,168,247,110, 52, 26,243,106, 39, 40,117,122, 12,155,196,255,185,103, 4, 0,197,197,197,143, 0,128, 82,169,132,171,101,117,
+ 26, 32, 8, 27, 61,125, 26,141,198, 30, 77, 17,167,101,101,101,221,217,148,197,130, 5, 11, 86,104, 53, 0,236, 98,196,255, 31,
+104, 10,209,202,130, 5, 11, 22, 44, 88,176,104, 92,144,108, 20,176, 96,193,130, 5, 11, 22, 44, 88, 52, 13, 8,212,140, 28,176,
+135,134,140, 38, 24,120, 31,215, 78, 98, 57, 89, 78,150,147,229,100, 57, 89, 78,150,243, 63,199,233,138,155, 29,205,216,196, 2,
+140,229,100, 57, 89, 78,150,147,229,100, 57, 89,206,255, 30,231,191, 18,108,211, 33, 11, 22, 44, 88,176, 96,193,130, 69, 19,129,
+ 98,163,224, 31, 3, 7, 13,152, 81,223, 21, 24,134,241, 6,224,104,193, 56, 29, 65, 16,229,247,193, 73, 0,224,213,110,230,137,
+142, 12, 0,244, 0,244, 4, 65, 48,174, 57, 62, 34, 11, 10,188,219, 51, 38,110, 87,134, 32,184, 52,141, 75,205,155, 55,187, 72,
+ 16, 67,117, 0, 32, 9,140,105, 43,149,136, 6,106,245,186, 8, 1,151,127,189, 66,169, 56,162, 45,206,188,195, 38, 15, 22, 44,
+254, 17, 60, 1, 96, 1,106,186,149, 44, 5,176,139,141, 18, 22, 44,154, 72,104, 73,165,210,115, 36, 73,134,185,154,159,199,140,
+218,181,204,242,202,203,203,187, 52,224,218,163,164, 82,105, 63, 46,151,251, 24, 0, 24, 12,134, 20,133, 66,113, 12,192,110, 0,
+198,251,188, 39, 25,128,209, 0,198,213,254,254,190,182,176,168,186, 79,190, 88, 79, 79,207,159,184, 92, 46, 83, 90, 90,218, 13,
+ 0,124,125,125, 79, 27, 12, 6,162,170,170,106, 36,128,203, 13,228, 35,185, 92,238,202,110,221,186,245, 62,121,242,228,183, 0,
+214, 53,210,179, 20,144, 36,105, 87,160,208, 52,221,226, 62, 68, 22, 15,128,231,186,117,235,124,183,111,223, 30,159,151,151,215,
+ 1, 0,194,194,194,174,140, 31, 63,254,226,244,233,211,229, 12,195, 84, 18, 4,161,119,198, 83, 80,224,221,190,184, 48,107,106,
+ 81,241,245,209, 0, 16, 20,220, 97, 23,135, 67,242, 24,230,124,154,216,111,156, 95,171,150, 45, 94,221,249,205, 58, 94,139,136,
+102, 56,154,122,161,227,244, 55,223,107,159, 15,172, 96,197,214,223, 7, 15, 15,143,115, 36, 73,134, 57,203,227,246,242,188,201,
+100,202, 43, 43, 43,235,226,136,147,162,168, 48,103,229,133,189,125, 52, 77,103,149,150,150,218,157,106, 66, 38,147,165, 81, 20,
+ 21,225, 46,151,249,211,104, 52,230, 57, 26,165, 43,147,201,206,113, 56,156, 48,103,247,105,239, 63,154,166,179, 74, 74, 74, 28,
+133,179,222,189, 55, 70, 56,239,135,211, 89, 56,205,229, 17,128, 53,190,190,190,143,202,229,242,231, 1,188, 87, 85, 85, 21,199,
+225,112,224,227,227,243,158, 78,167,251,211,211,211,243,235,202,202,202, 84, 0,111, 2, 96,215, 75,101,193,162,177, 32,147,201,
+138, 20, 10, 5, 99, 6, 77,211,140,193, 96, 96,180, 90, 45,163, 86,171, 25,165, 82,201, 40, 20, 10,166,170,170,138,169,172,172,
+100,228,114, 57,227,239,239,111, 59,121,163,163, 54,220, 14, 50,153, 44,115,217,178,101,218,236,236,108, 70,175,215, 51,122,189,
+158,185,115,231, 14,243,233,167,159,106,101, 50, 89, 38,128, 14, 14,206, 29,232,160,176, 24, 4, 96, 71,124,124,188,110,255,254,
+253,140, 70,163, 97,148, 74, 37,179,107,215, 46,166, 93,187,118, 58, 0, 59,106,143, 33,221,228, 4,128,158, 65, 65, 65,121,183,
+111,223, 54, 29, 57,114, 68,239,233,233,153,228,233,233,153,116,231,206, 29,211,237,219,183,105, 63, 63,191, 60, 0, 61, 27, 16,
+ 78, 0,120,246,173,183,222, 42,186,115,231, 14,211,167, 79,159, 75, 86,251, 9,184, 94,231,110,160, 61, 39,139, 97,152, 32,134,
+ 97,130, 81, 51,201,101,189,141, 97,152,224,218, 99,188,221,228,148,100,101,101, 53, 11, 12, 12, 92, 70, 16,132,206,150,143, 32,
+ 8, 93, 96, 96,224,178,172,172,172,102, 12,195, 72,156,113,230,229,172,127,233,192,254, 1, 21,202,242,155,140,178,252, 38,243,
+237,230,190, 85,175, 76,127,126, 71,112, 84,167, 77, 94, 97,237,215, 93,191,121,107, 35,195, 48, 27,143,165,103,110,156,255,229,
+111, 27,159,158,190,122,131,111,120,252, 43, 13,136,207, 7, 1,203, 9,192,203,203,171, 80,169, 84, 50, 12,195, 48, 38,147,137,
+209,235,245,140, 86,171,101, 84, 42, 21,163, 80, 40,152,234,234,106, 75, 62,175,172,172,180,124, 15, 8, 8,112,152,223,189,189,
+189,139,212,106,117,157,178, 67,167,211, 89,202, 15,149, 74,197,168, 84, 42, 70,169, 84, 90, 54,133, 66,193,132,132,132,228, 58,
+ 9,231, 61,115, 56,105,154,102,140, 70, 35,163,215,235, 45,188, 26,141,166,206,166,213,106, 25,173, 86,203,132,135,135,187, 29,
+ 78,119, 56, 53, 26, 13, 19, 22, 22, 86,224,136,211,199,199,167, 72,163,209,212,225,180,190,127, 91, 94,243,239,160,160,160,194,
+134,112,186, 19, 78,103,241, 89,139,117, 25, 25, 25,140, 90,173,102, 66, 67, 67,229, 35, 71,142, 52,152, 76, 38,102,255,254,253,
+ 76,124,124, 60,221,183,111, 95,125,105,105, 41, 51,105,210, 36,198, 73,165,144,205, 71, 44, 39,139,251,113,180, 8,130,128, 68,
+ 34,193, 15, 63,252,224,112, 57, 14,235,239,205,155, 55,119,247,154, 93, 34, 34, 34, 78,156, 58,117, 74, 20, 28,252,215,132,216,
+ 58,157, 14,222,222,222,152, 54,109, 26,255,137, 39,158,104, 53,120,240,224,211,119,239,222,237, 3,224,156, 11,190,103,252,253,
+253, 63,159, 55,111, 94,224,115,207, 61, 7, 95,223, 58,147,110, 99,212,168, 81, 24, 57,114, 36, 47, 35, 35, 99,204,214,173, 91,
+199,172, 95,191,190, 80,161, 80, 76, 7,240,179, 51, 82,145, 72, 52, 34, 36, 36,100,195,169, 83,167, 2, 2, 2, 2, 16, 25, 25,
+ 73,190,243,206, 59,173,162,163,163, 69, 97, 97, 97,228,189,123,247,240,235,175,191,134,142, 29, 59,246,199,162,162,162, 87,245,
+122,253, 30, 55,238,157,239,235,235,251,222,171,175,190,234, 87, 85, 85,101, 60,127,254,124,166,121, 63,159,207, 95,216,189,123,
+247,174,199,143, 31,255, 14,192,215,247,227,100, 49, 12, 83,133,191,154,248,204, 48,152,255,119,199,217, 98, 24,134,127,233,210,
+ 37,159,238,221,187,255,172,213,106, 59, 77,157, 58, 53,103,201,146, 37, 34,153, 76, 38, 3, 64, 84, 85, 85,149, 47, 88,176, 64,
+183,122,245,234,119,219,182,109, 59, 32, 45, 45,237, 25,134, 97, 12,181,130,172, 62, 31, 65, 88,194,147,155, 95,130, 19,169, 52,
+255,195,185,111,135,125,178, 56,226,110,250,181, 92,154, 18,201,176, 47,249, 42,138,228, 10,252,150,118, 13, 65,190, 30, 4, 79,
+192,109,239, 25,218,174, 79,101,254,181,100, 56,153, 33,157, 69,227,128, 32, 8,136,197, 98,236,219,183,175,222,210, 85,246,150,
+181,162, 40, 10, 94, 94, 94, 46, 87, 55, 16, 10,133, 56,114,228,136,221,181, 23,237, 45,233,227,233,233, 9,103,149, 13,130, 32,
+ 32, 20, 10,145,146,146, 2,146, 36,237, 46, 13,100,187, 79, 34,145,128,116,178,214,149,153, 51, 57, 57,217, 37,151,249, 83, 42,
+149, 2, 53, 77,255,142, 51,165, 64,128, 83,167, 78, 57,188,103,219,239,210,218,245, 94, 93,113,166,164,164,212, 89,250,203,118,
+ 73, 48,235,223, 18,137, 4,132, 11, 82,111,111,239,110, 97, 97, 97, 56,123,246, 44,118,239,222,237,211,190,125,123,220,186,117,
+ 11, 4, 65, 96,201,146, 37, 68,187,118,237,184,133,133,133,232,213,171, 23,126,249,229,151, 30, 85, 85, 85,108,134, 97,241,143,
+128, 97, 24, 46,128,142, 0,252, 81,211,237,166, 26,128, 23,106, 86,210,224, 3,144, 3, 16,213,110, 90, 0, 10, 0,126,181,167,
+151,214,150, 45,214, 2,161,196,122,241,105,134, 97,186,214,114,155, 87,168,240,183, 58,214,124, 13,219,223,182,159,118,185, 41,
+ 0, 72, 76, 76, 52,191,204,250, 38, 36, 36,156,176,190, 57,119, 68,150,121,157, 50, 59,121,218,118,136,166, 64, 34,145,252,116,
+250,244,105,145,191,255, 95,247,160,213,106, 81, 93, 93, 13,133, 66,129,234,234,106,120,120,120, 96,247,238,221,162, 1, 3, 6,
+252, 84, 93, 93, 29, 93, 27,105,142, 56, 87,221,187,119, 47,208,104, 52,130,207,183,223, 69,137, 36, 73,196,196,196,224,189,247,
+222,195,144, 33, 67,130,250,245,235,183,202, 70,104,213, 27, 74, 42, 22,139, 55,156, 63,127, 62, 64, 44, 22, 35, 51, 51, 19,121,
+121,121,120,235,173,183,154,209, 52,141,220,220, 92,220,186,117, 11,249,249,249,216,186,117,107,192, 83, 79, 61,181,193,142,208,
+178, 55, 60,117,234,204,153, 51,219,120,123,123,147,159,126,250,105,133, 82,169,252,162,118,255,135,107,215,174,125,161,119,239,
+222, 1, 83,166, 76, 97, 82, 82, 82,182,215, 62, 56,135,241,105,221, 39,171,182,153, 15,181,137,239,134,205, 57, 49, 86,255,131,
+ 97,152, 32, 0, 90,130, 32, 42,236,112, 18, 0, 60, 7, 15, 30, 60, 75,171,213,118, 58,117,234,212,159,143, 61,246, 88, 56,128,
+123,230,196,231,233,233, 41, 89,181,106, 85, 96, 66, 66, 66, 70,255,254,253, 59, 13, 30, 60,120, 86, 73, 73,201, 18,134, 97, 74,
+172,250,108, 89, 56,105, 26,151,130,130, 59,236, 74, 78,155, 62,250,120,138,142,247,246,155,243,115,154, 55,107, 81,121, 41,179,
+204,116, 45,171, 4,213,106, 35,158,238, 95,179,128,121,183, 14,205,241,249, 15,167, 48,109,198,251,220,159,119,109, 27,249, 39,
+ 3,137,162,224,218,126, 39,241,249,160, 96, 57, 97,105, 98, 2,151,203,197,208,161, 67, 65, 16, 68,189,181, 60,185, 92, 46,210,
+210,210,208,191,127,127,112,185, 92,188,248,226,139,110,113, 82, 20,133,193,131, 7, 91,214, 81,180,230,179, 21, 13, 14, 52, 65,
+146, 77, 97, 11,138,162, 64,146,164,195,133,180,109, 57, 93,149, 75,230,112, 58,227,178,254,207, 85, 56,107,151, 60,114, 91,100,
+185,203,105, 14, 39, 69, 81,232,209,163, 7, 46, 94,188,232, 84,116, 57,208,151,117,238,189,188,188,124, 66,116,116,116,242,186,
+117,235,124, 0, 64, 46,151, 91, 22,188,231,112, 56,184,121,243, 38,116, 58, 29, 62,250,232, 35,125, 85, 85,213, 20, 54, 31,177,
+156, 77,201,233, 76,139, 0,232, 61,119,238,220, 46,203,150, 45, 91,210,189,123,247,157,169,169,169, 59, 8,130, 72,100, 24, 38,
+193,252, 57,119,238,220,246,203,150, 45, 91, 50,103,206,156,247,150, 46, 93,122,149, 32,136, 68, 0,176,253, 93, 91,150, 36,216,
+136, 56,127, 51, 79,109,158,171,115,172,189,223,182,159,246,184,235, 56, 90, 9, 9, 9, 68,237, 77, 18,214,133,154,187, 66,203,
+157,181,251, 40,138,122,125,201,146, 37,129,206, 68,150, 66,161, 64, 65, 65, 1,194,195,195,241,226,139, 47, 6,174, 91,183,238,
+117,163,209,248,153, 19, 90, 30,135,195,193,217,179,103, 81, 92, 92,140,216,216, 88, 68, 68, 68,212, 57,224,246,237,219, 56,112,
+224, 0, 42, 42, 42,208,185,115,103,160,166,115,183, 93,196,197,197,125, 20, 19, 19, 51,152, 36, 73,163, 72, 36,194,165, 75,151,
+208,169, 83, 39,252,240,195, 15,104,222,188, 57,196, 98, 49, 50, 50, 50, 16, 27, 27,139, 19, 39, 78,192,223,223, 31,241,241,241,
+198,170,170,170,147,101,101,101,199,238,222,189,251,145,163,112,134,134,134,206,127,229,149, 87,248, 5, 5, 5,244,150, 45, 91,
+ 78, 1, 56, 5,224,245,247,223,127,127,242,144, 33, 67, 2, 46, 92,184, 80,153,158,158,126,198,129,200,114,199,201, 50,218,190,
+148, 76, 38,147, 86,173, 86,235,180, 90,173,129, 36,201, 59, 4, 65,232, 76, 38, 83,180, 35, 19, 98,226,196,137, 81,165,165,165,
+211,102,204,152,145, 93, 43,178,110,162,166, 3, 60, 0,192,104, 52,106, 21, 10, 69, 85,247,238,221,195,199,142, 29,251,231,142,
+ 29, 59,166, 77,156, 56,113,247,150, 45, 91, 20, 0,212,182,132,205,155, 55,187,200,225,144, 60,101,181, 79,214,143,187,191,158,
+121, 96,239,235,205,114,115,243, 91,249,250,249, 43,121, 82,255,130,221,223,111, 62, 7, 64, 87, 80, 82,133,203,183, 11,193,229,
+114,112, 61,183, 18,189, 31, 31,197,253, 51,115,113, 79, 0,251,217,186, 92,211, 87, 22,205,139, 80, 31, 63,126,220,169,163,149,
+150,150, 6, 46,151, 11,145, 72,132,213,171, 87, 59, 37, 53, 11, 3,179, 91,228, 74,204,152, 23, 71,119,230, 62,209, 52,109, 89,
+232,221,118,251,226,139, 47, 48, 99,198,140, 58,215,168, 21, 27,132, 43, 78, 71,225, 11,111,209, 2,197, 69, 69,117,246,185,179,
+ 40,189,201,100, 2,151,203,197,166, 77,155,144,144,144,128,196,196, 68,167,159, 67,135, 14, 5, 73,146,140, 59,241,217,163, 71,
+ 15,232,245,122, 75,152,111,222,188,105,151,119,253,250,245,174,130,249, 4,128, 5,157, 58,117,146,245,235,215, 15,201,201,201,
+ 24, 57,114,164, 86,175,215,103, 2,192,240,225,195, 91,175, 91,183,142,127,254,252,121,248,250,250,114,115,114,114,190, 5,219,
+ 65,158, 69, 19,195,158, 22, 49,191,243,150, 45, 91,182,196, 86,196, 88,195,252, 63, 65, 16,137, 75,151, 46, 77,176, 22, 69,214,
+191,205,174,147,141,136,107,111,237, 72, 89,139, 40, 71, 2,202,230,125,107,125,124,137, 93,161, 85,123, 99,125,173, 93, 32,115,
+225,235, 74,100, 57,169, 57,214,129,167,167,231,176,167,159,126,218, 34,114, 52, 26,141, 69, 96,153, 69,150,249,119, 70, 70, 6,
+186,116,233,194,243,244,244, 28, 38,151,203, 63,115, 67,196, 33, 36, 36, 4,165,165,165,184,114,229, 10,194,195,195, 97, 48, 24,
+112,232,208, 33, 84, 86, 86,130,203,229,130,199,227, 65,175,119,218,119, 27, 49, 49, 49, 67,183,111,223,222,101,219,182,109,229,
+230, 26,221,247,223,127, 15,134, 97,224,239,239, 15,149, 74,133,162,162, 34, 28, 59,118, 12, 70,163, 17, 82,169, 20,145,145,145,
+252, 17, 35, 70,244, 92,176, 96, 1,215,137,208,234, 49,114,228, 72, 79,153, 76,134, 55,223,124,147,209,235,245, 75,107,247,205,
+159, 62,125,186,239,157, 59,119,116, 47,189,244,210, 89,189, 94,255,169,217, 76,180, 22, 56, 14, 30,172, 67, 39,203, 96, 48,152,
+227, 52, 91,161, 80,192,207,207, 47,220,218,217,114, 36, 6, 83, 82, 82,122, 0,224, 44, 92,184, 80, 8,160,200, 58, 12, 58,157,
+ 14, 10,133, 2, 74,165,210, 80, 89, 89, 89, 60,123,246,108,227,142, 29, 59, 56,181,231, 92,183, 39,180, 8, 98,168, 78, 38, 19,
+243, 25,134,243,254,198,141, 27,165, 67,134, 12, 33,165, 82, 41,170,171,171,101,191, 29, 60, 40, 29,208,175,103,228,146,101,159,
+ 28,150,133,197, 22,165, 92,202, 66,126, 97, 37,116, 6, 3, 34,131, 61,107,252, 48, 22, 77,142,218,129, 44, 22, 71,203, 90, 84,
+ 36, 39, 39,227,241,199, 31,183,228,117, 30,143, 87,199,249,114,197, 73, 81, 20, 30,127,252,241,122, 14,207,241,227,199,237,186,
+ 79,174, 96, 45,138,108,197,145, 61, 1, 70,146,164,203, 5,214,205,110,158, 61,177,101,237,234,219,136, 55, 87,205, 28,160, 40,
+ 10,211,167, 79, 7,151,203,197, 59,239,188, 3,138,162, 16, 31, 31, 15,138,162,208,189,123,119,112,185, 92,244,239,223,191,193,
+247,126,250,244,105,116,234,212,201, 18,166,248,248,120,116,237,218, 21, 20, 69,161, 87,175, 94,224,114,185, 24, 60,120,176, 59,
+156,239, 85, 87, 87,199, 73, 50, 7, 8,223, 0, 0, 32, 0, 73, 68, 65, 84,165, 82,100,100,100,128,195,225,128, 32,136, 91, 0,
+226, 0, 32, 56, 56,248, 79,149, 74, 21,165,209,104,240,202, 43,175, 16, 58,157, 46,246,157,119,222,121, 95,163,209,176, 66,139,
+ 69,147,193, 86,139, 88, 65, 61,103,206,156,247, 8,130, 72, 52, 59, 84,182,206,147,189,223,118,202, 38,179, 3,149, 94,155, 87,
+187,218,136,184, 18,130, 32,210, 25,134, 25,238,232, 92, 0, 58, 27, 97, 85,167,233,208,186,217,208,165,163,101, 46,124,221, 21,
+ 90,174,160,209,104, 58, 6, 4, 4, 56, 20, 89,214,159, 58,157, 14, 17, 17, 17,208,104, 52, 29, 27,250,210, 8, 14, 14,134, 94,
+175,199,215, 95,127, 13, 30,143, 7, 30,239, 47,125,161,211, 57, 55,139,174, 93,187,150,125,250,244,233, 78,157, 59,119,246,254,
+229,151, 95, 74,250,244,233,227, 63,100,200, 16,136, 68, 34,168,213,106, 24, 12, 6,116,235,214, 13, 49, 49, 49,200,203,203,195,
+111,191,253, 86, 26, 29, 29,237,119,230,204, 25,186,176,176,240,174, 19,234, 65, 3, 6, 12, 0, 65, 16, 56,120,240, 96, 41,128,
+116,129, 64,112, 96,241,226,197,222, 58,157,142, 30, 63,126,124, 78, 89, 89,217, 12, 0,122, 62,159,191,182, 79,159, 62,221,147,
+146,146,190,163,105,122,117, 67, 19,170,109,220, 42,149, 74, 8,133, 66,119,166,146,224,150,149,149,117, 0, 0,137, 68,226, 3,
+224, 79, 75, 10, 87,171,235,136, 97,157, 78,167,241,241,241,145, 0, 64,237, 57, 92, 7,156,254, 70, 35,126,188,123, 55,203,195,
+186,255,156,151,151, 23,198,141, 29, 75, 62,214,163, 7, 63,174, 99,199,193, 31,172,216,246, 67,136,175, 76, 23, 25,226, 11,131,
+201,128,164,195,135,104,134, 54, 28,102,139,157,191, 71,104,153,197,134,173,163,197,229,114,113,226,196,137,122,251,120, 60, 30,
+190,250,234, 43,183,132,129, 89, 84, 57,106, 58,179,105,234, 34, 92, 9, 24, 46,151, 11, 14,135,131, 77,155, 54,129,166,105,204,
+156, 57,179, 78,115,162, 53,191, 91,118,158,149, 8,140,153, 79, 3,208, 33,111,165,192,114,190,109,120,107,207,113,203, 37, 91,
+183,110,157, 91,142,214,240,225,195, 93, 10, 87,235, 22, 6,235,112, 93,188,120,209, 46,239,198,141, 27, 93,198,167,201,100,194,
+254,253,251, 45, 34,213,140, 15, 62,248,224, 21, 62,159, 31,120,242,228, 73, 20, 22, 22, 66,169, 84, 66,161, 80,160, 91,183,110,
+145, 36, 73, 94, 42, 44, 44,188,115,253,250,245,167,217,220,195,226,111,116,180,180, 75,151, 46,189,186,116,233, 82,187,142,149,
+173,179,228,204,121, 50, 11,172, 90, 65,228,111, 22,111,168,233, 86,147,238,234, 92, 0,124,219,166, 67,167, 70,144,141,138, 92,
+ 96,175,240,117,167,249,208, 77, 59,157, 34, 8, 2, 26,141,198,174,192,178, 22, 7,122,189, 30,101,101,101, 48,153, 76,247, 61,
+215,151,189,154,172, 43,161,117,229,202,149, 73,147, 39, 79, 46,240,244,244,140, 43, 41, 41, 41,166,105,186,127, 90, 90,154, 63,
+ 69, 81,144,201,100,144,201,100, 56,112,224, 0,196, 98, 49,166, 79,159, 94,108, 50,153,146, 61, 60, 60,124,213,106,245, 31,133,
+133,133, 31, 56, 84, 48, 92,238,224, 94,189,122,225,252,249,243, 40, 47, 47, 63, 2, 32,254,249,231,159,127,188, 89,179,102,196,
+226,197,139, 53,183,111,223, 94, 13,160, 88, 34,145,108,223,190,125,123,191,206,157, 59,123,140, 31, 63, 30, 39, 78,156,216, 8,
+ 64,227,238, 61, 43,149,202, 58, 2,171,170,170, 10,213,213,213,144, 72, 36, 70, 55,227,140,139,191, 70, 24,130, 97, 24,203,179,
+169,117,179,204,207,135,161, 40,202, 60,170,209,145,200,130, 68, 34, 89,184,109,219, 54,145,237, 32, 5,147,201,132,162,162, 34,
+200,100, 50,204,251,224, 3,222,199,111, 77,233,196,145, 6,166,145, 36, 1,157,158,169, 96,104,221, 33,101,209,115, 39,129,143,
+216,146,231,111,128, 89, 24, 60,249,228,147,245,154, 11,121, 60, 30,142, 28, 57,130,167,158,122,202, 82,113,233,220,185,179,203,
+202,149, 89, 24, 60,241,196, 19, 22,103,232,208,161, 67,118,155,253,204,142,148, 59,130,208,124,236, 27,111,188, 1,138,162,240,
+249,231,159, 99,214,172, 89, 32, 73, 18, 43, 87,174, 4, 73,146,248,240,195, 15,221, 22,153,214, 2,230,206, 39, 53,159, 97,179,
+170, 32, 95, 31, 8, 0,240,144,201,204, 55,212,160,178,135,162, 40,139,147,213,177, 99, 71,112,185, 92,116,239,222, 29, 20, 69,
+ 89,156,172, 97,195,134, 89,199, 35,227, 14, 39, 69, 81,200,204,204,180,132,185,123,247,238,117,156, 44,138,162, 48,124,248,112,
+119,130,185,196,203,203,107, 65, 76, 76, 76,219, 85,171, 86,113, 57, 28, 14, 6, 12, 24,208, 58, 40, 40,232,174,209,104,244, 93,
+184,112,161,216,206, 57, 34, 0,113,109,219,182,149,176,185,134, 69, 19, 58, 90, 11,236,252,229,109,221,231,170, 1, 21,201, 68,
+235,227,205, 28,182,226,168,214, 33, 75,118,197,101,239, 92, 87,160,204, 10,210,153,165,238,142,208,170,181,157,157, 94, 76, 44,
+ 22, 95, 46, 46, 46,238, 46, 18,137,234,136, 44,123,130,139,195,225,160,176,176, 16, 98,177,248,178, 86,171,109,180,135,232,170,
+233, 16,128,230,214,173, 91,111, 89,253, 30, 56,108,216,176, 45, 71,142, 28, 9, 78, 74, 74,194,153, 51,103,224,239,239,143,117,
+235,214,221, 43, 42, 42,154, 4,224, 72,105,105,169,203,235, 70, 69, 69,117,144, 74,165, 72, 73, 73, 1,128, 19, 0,166, 76,155,
+ 54,141, 48, 24, 12, 88,191,126,189, 18,192, 65, 47, 47,175,253,187,119,239,238, 20, 23, 23,199, 79, 74, 74,170, 58,115,230,204,
+239,110,138, 44, 19, 77,211,245, 4,150,117,156,122,120,120,184,227,104, 25, 60, 61, 61,175, 84, 85, 85,141, 82,171,213, 85, 2,
+129,192,163,170,170, 74,107, 45,176,204,252, 20, 69,113, 51, 51, 51, 11, 0, 68,122,122,122, 94,129,131,102, 78,138,162, 6, 12,
+ 24, 48,128,178,125, 6, 69, 69, 69, 40, 44, 44,132, 94,175, 71,231,206,157, 9, 14, 97,224,148,231, 94,182,153,214,129, 21, 89,
+127,147,163,197,152,243,186,121,148,160,189,145,134,135, 14, 29,178,252, 38, 73, 18,155, 55,111,118, 75, 20, 29, 57,114,196,105,
+135,117,155,166, 67,151,214,184,249,248, 47,191,252, 18, 12,195, 88,156, 44,146, 36, 49,103,206, 28, 8, 4, 2, 44, 94,188, 24,
+115,230,204, 1, 69, 81, 46,155, 14,173, 5, 76,139,119, 84,214,149,163,154, 76, 81,219, 31,138, 32, 8,107,177, 69,184, 43,222,
+156,185,121,238,180, 4, 88,115,154,207, 19, 10,133, 14, 59,194,219,112, 58,187,192, 62, 0, 89,193,193,193, 41,221,187,119,247,
+ 60,119,238, 28, 86,174, 92,201,211,106,181,205,147,146,146, 44,215,181, 23, 95, 74,165, 82,196,230, 28, 22, 77,225,102, 57,249,
+187,196,166,127, 21, 97,221,140,231,228,211,246,120, 88,237,179,230, 45, 33, 8,194, 96,231,122, 37,118,196,149,237, 53,172,143,
+ 41,113,232,104,185, 42, 44, 92, 9, 46,119, 28, 45,149, 74,245,251,193,131, 7,187,142, 29, 59,150,114,214,108,168, 84, 42, 17,
+ 24, 24,136,171, 87,175, 26, 85, 42,213,239,110, 56,101,141, 41,180,108,145, 84, 92, 92,204, 49, 24, 12,104,213,170, 21, 66, 67,
+ 67,161,209,104, 80, 81, 81,193, 1,112,196, 77, 14,158, 68, 34,225, 0, 64, 69, 69, 5, 80, 51,212,180,117,116,116, 52,206,159,
+ 63,143,178,178,178,159, 1, 12, 89,176, 96, 65,231,110,221,186,241,126,248,225, 7,213,212,169, 83,127, 54, 24, 12,110, 41, 13,
+154,166,117, 70,163, 49,130, 36, 73,125, 69, 69, 69,190,117,124, 6, 6, 6,250, 72, 36, 18,162,168,168,200,224,142,208,138,139,
+139, 59,155,147,147,131,133, 11, 23,150, 44, 89,178, 36,186,186,186,186,188,178,178,210,104, 45,182, 52, 26, 13,233,231,231, 39,
+ 88,191,126,189, 8, 0,226,226,226,206, 58, 18, 90, 74,165,178,153, 88,252, 87,197, 88,171,213,162,176,176, 16,133,133,133, 40,
+ 42, 42, 66,117,117, 53, 34, 35, 35,161, 82,169,194,217, 98,230, 31, 19, 90,117,154,207,172,243,183,245,139,188, 33,121,221, 90,
+192, 60,249,228,147,150,190, 93,102,135,204,188,253,248,227,143,182, 29,204,221, 18, 90, 95,126,249, 37,222,120,227, 13, 8,133,
+ 66,172, 90,181,170, 78,211,161,173, 56,160,105,154,112,231,222, 35,222, 85,163,112,173, 15,184, 92, 46,124,167, 22,213,105,162,
+179, 35, 56,220, 10,231,146, 37, 75, 26,165,233,208,154, 51, 60,188, 38,171,108,218,180, 9,163, 70,141,194,201,147, 39,239,187,
+233,176,125,251,246,223, 39, 38, 38,122, 94,187,118, 13, 85, 85, 85, 40, 41, 41,129, 86,171, 69, 94, 94,158,195, 86,129,218,178,
+ 92,200,230, 28, 22,127,115, 57,149,254,119,242, 54,230,245, 40, 23, 47,112,183,133,150, 59,142,150, 86,171, 93,245,230,155,111,
+ 78, 27, 56,112,160,143,135,135, 7, 10, 10, 10,234,137, 44,133, 66, 1,169, 84, 10,181, 90,141,189,123,247, 86,105,181,218, 85,
+174,196,129,193, 96, 64, 64, 64, 0, 74, 75, 75, 65, 59,232, 63, 77,146, 36, 68, 34, 17, 20, 10, 5,224,162,147,185,189, 23,134,
+ 94,175,135,193, 96,128,193, 96,128, 94,175,119, 89, 75,182, 53,243, 36, 18,137, 89,120, 0,128, 50, 36, 36,164,149, 80, 40, 68,
+118,118, 54, 80, 51,178,111,224,227,143, 63,206,149,203,229,204, 75, 47,189,116,138, 97,152, 87,224,124,118,124, 93,114,114,114,
+ 4, 0,136, 68,162, 12, 0,200,203,203, 51, 84, 84, 84,212,113, 10,197, 98, 49,243,212, 83, 79, 5, 51, 12,131,228,228,228, 8,
+ 30,143,199,192,241,168, 70,205,158, 61,123,174,121,122,122,238, 88,182,108,217,216,132,132,132,171, 29, 58,116,136, 80, 42,149,
+197,106,181, 90,173,209,104, 24, 14,135,195,243,246,246, 22, 30, 62,124,248,207,180,180,180,129, 50,153,108,199,158, 61,123,174,
+ 57,114,222, 36, 18, 73,158, 74,165,106, 97,126,166,214, 34,171,176,176, 16, 12,195, 32, 43, 43, 11, 98,177, 56,199, 85,179, 46,
+139,166,131,185, 82,101,235,188,216,238,115, 87,100, 89, 11,131,195,135, 15, 59,157, 67,203, 93, 78,107, 81, 52,107,214, 44,172,
+ 93,187,182,158,163,181,120,241, 98, 0,192, 7, 31,124,224,118, 31, 45,179,123, 85,184,214, 7, 65,111,148,213, 9, 59, 0, 16,
+230,240, 53, 44,207,131,162, 40, 44, 92,184,176, 94, 39,117,235,166, 61, 55,155,248,234,132,179,184,184, 24, 20, 69,193,199,199,
+ 7,227,198,141,195,224,193,131, 45, 77,144, 13,229,189,113,227, 70,202,187,239,190, 27,219,190,125,123, 44, 90,180,168,204,203,
+203,203,227,229,151, 95,166, 42, 42, 42, 8,103,142, 22, 43,180, 88,176,104, 4,161,101,206, 96,238,142, 58,116, 80, 88, 14, 68,
+221,185, 54, 42, 85, 42,213,184, 65,131, 6,253,178,107,215, 46, 81, 84, 84, 20,110,220,184,129,178,178, 50,232,116, 58,240,120,
+ 60, 4, 7, 7,163,162,162, 2,155, 55,111, 86,171, 84,170,113, 0, 42, 93,112,190,223,165, 75,151, 13,159,125,246,153, 48, 62,
+ 62, 30,101,101,101, 80, 40, 20, 22, 33, 68, 16, 4,100, 50, 25, 68, 34, 17,206,158, 61,139, 67,135, 14,169, 1,188,239,130,211,
+158,154,131, 94,175,183, 8, 46, 55,132,150, 53,167,196,236,234,168, 84, 42, 0, 48, 52,107,214, 44, 8, 0,178,178,178, 0,224,
+ 78,100,100,228,130,168,168, 40, 98,251,246,237, 12,195, 48,135, 28,136, 44, 11, 39, 65, 16,101, 12,195,148, 3, 8,210,233,116,
+ 60, 0,168,172,172,212,251,249,249, 5, 8, 4, 2, 90, 36, 18,209, 66,161,144, 46, 40, 40, 48, 26,141, 70, 30, 0,244,234,213,
+ 75, 7,160,208,102,141, 66,107, 78,154, 97,152,170,141, 27, 55, 46, 24, 63,126,124,247, 30, 61,122,180,127,237,181,215,174,188,
+244,210, 75,100,104,104,168,119,117,117,181,230,214,173, 91,229, 43, 86,172,168, 62,125,250,244, 64, 46,151,123,119,227,198,141,
+ 11, 0, 84, 17, 4, 65,219,227, 52, 26,141,191, 39, 37, 37, 77, 74, 72, 72,160,242,243,243, 81, 84, 84,100, 17, 89, 69, 69, 69,
+136,137,137, 65, 90, 90,154, 73,175,215, 39, 53, 32, 62, 27, 11, 44,103, 77, 37,132, 49,231,117, 71, 2,203, 92,153,114,151,211,
+ 90, 20,141, 26, 53,170,142,139,197,227,241,240,211, 79, 63,217, 45, 55,236,228,171, 58,247,110, 61,199,215,187,239,190, 91, 71,
+180,205,155, 55,207, 97,113,230, 42, 62,205, 60,149,155, 66,235,142, 58,116,144,207,157,133,211, 92,118,114,185, 92,204,155, 55,
+207,109, 71, 11,245,251,104,213,227, 52,223,123,159, 62,125,160, 82,169, 44, 66,214,145,163,229, 42, 62, 77, 38,211, 27,107,215,
+174,101,100, 50,217,163, 85, 85, 85,207,231,228,228,108, 85,169, 84,143, 84, 86, 86, 58,117,180,180, 90,173,128,205, 71, 44, 39,
+154,102,126,174,255,142,208,170,125, 73,162, 89,179,102,117,214,206, 34, 73,178,206,214,144,126, 6,181, 56,156,153,153,249,204,
+ 99,143, 61,246,221, 27,111,188,225, 17, 31, 31,207,109,209,162, 5,148, 74, 37,178,179,179,113,245,234, 85,227,158, 61,123,170,
+ 84, 42,213,243, 0,220, 25,117,182,237,218,181,107,135,134, 12, 25,242, 97,183,110,221, 94,157, 63,127, 62,167,117,235,214,168,
+172,172,132,183,183, 55, 2, 2, 2,112,243,230, 77,236,221,187,215, 84, 90, 90,186, 1,192,199,176,211,134,234,170,194,175,215,
+235, 49,102,204, 24,208, 52,141,213,171, 87,195,157, 5,149,173,160,215,235,245, 12, 0,162,182, 63,151,170,118,118,105,220,186,
+117, 11, 0,238, 70, 68, 68,120, 0, 64, 82, 82, 18,129,154,249,181,220,169,225, 51, 12,195, 88,156,173,152,152,152,108,219,194,
+209,236,100,153, 93, 48, 87,225, 38, 8, 66,195, 48, 76,177, 74,165, 26, 50,107,214,172, 15,191,252,242,203,177, 95,126,249,101,
+189,227,100, 50,217,142,149, 43, 87,126, 60,122,244,232, 98,130, 32, 28,246, 35, 83, 42,149, 31, 76,152, 48, 97,244,229,203,151,
+ 61,132, 66, 33,148, 74, 37,228,114, 57,244,122, 61, 34, 35, 35, 81, 92, 92,140,109,219,182, 85,171,213,234,143,216,236,248,207,
+192, 90, 24, 56,114,181,220, 16, 89, 14, 93,157,125,251,246,217,157,163,170,161,156,182, 98,195,221,185,173,156, 85,138,204,211,
+210,216,155, 50,162,129,229, 90, 61, 94,138,162,240,233,167,159, 90, 38,109,181,231,100, 53,196,209, 50,115,250,248,248,212,216,
+228, 98, 49,104,154,198,240,225,195, 31,132,151, 6, 48,221,106,198,247, 37,179,103,207, 94, 16, 19, 19,211, 26,128,192, 58, 14,
+ 26,232,226,179, 96,193,194,149,208, 50,153, 76,121,109,218,180,169, 83,192,185, 90,204,212, 96, 48,228,185,121,221, 67, 74,165,
+ 50,114,229,202,149,111, 74, 36,146,129, 42,149, 42,182,182,224,184,172, 84, 42,147,180, 90,237, 26, 52,108, 17,232, 18, 0,175,
+159, 62,125,122,245,144, 33, 67, 22,247,239,223,255,217,183,222,122,139, 96, 24, 6,235,215,175,103,110,223,190,253, 99,173,139,
+117,251,126, 34,201,199,199,231,218,230,205,155, 3,127,249,229, 23, 24, 12, 6,172, 89,179, 6, 30, 30, 30,215,202,202,202,220,
+165, 40, 62,122,244,232,150, 30, 61,122,188,144,150,150,182, 13,192, 31, 39, 78,156,216,218,179,103,207, 9,105,105,105,223, 3,
+184,122,236,216,177,173,221,186,117,155,144,158,158,190, 27,192,197, 6, 20,190, 22,103,203,104,180,223,210,232,192,201,114,198,
+ 89,197, 48,140,126,242,228,201,111,141, 30, 61,250,235,244,244,244, 71, 42, 42, 42, 98, 1,192,203,203,235,114,215,174, 93,207,
+238,218,181,235,102,173,147,229,170,179,126,137, 82,169,124, 42, 54, 54,246,231, 69,139, 22, 73,218,183,111, 79,181,106,213, 10,
+119,238,220,193,149, 43, 87,140,223,126,251,173, 66,173, 86, 63, 9,160,156,205,142,255,156,208, 98, 24, 6, 94, 94, 94,117, 42,
+ 81,230, 33,255, 13,109, 46,180,126, 49,155,151,234,177,229,117,196,233,108,218, 4, 51,164, 82,169,101,114, 83,119,186, 44,208,
+180,243,249,216, 24,134,177,112,154, 55, 55, 68,150,203, 17,130,181, 75,224,184,205,233,206,244, 14, 18,137, 4, 6,131,193,194,
+235,198,200,207,134,170,197,125, 0,246, 25, 12,134, 91, 0, 90,178,226,138, 5,139, 38, 20, 90,229,229,229, 93,154,248,218, 85,
+ 90,173,246, 99,173, 86,251,177,121,135, 70,163,121, 80,206,219, 0, 70, 31, 61,122,244,179,163, 71,143,154,219, 17, 22,194,245,
+122,137, 78,113,227,198,141, 4, 46,151,251,213,142, 29, 59,186, 49, 12, 3, 79, 79,207,211,119,238,220,121,185, 33, 28, 38,147,
+105,114, 90, 90,218, 52,212,246,101,210,235,245,147, 83, 82, 82,222, 68,205,122, 76, 48,153, 76,147,207,156, 57, 99,249,221,192,
+ 23, 37,195, 48,140,150, 97,152, 16, 7,135,104, 27,232,192,153,157, 45,221,174, 93,187, 20, 0, 46,225,175,121,178, 12,181,155,
+198,166,185,208, 25,142, 41,149,202, 86,243,230,205, 91,194,225,112, 6, 40,149,202, 80,137, 68,146,107, 52, 26,127, 87,169, 84,
+239,163,102,141, 42, 22,255, 16,116, 58, 93,126,155, 54,109, 40,123, 21, 40,103, 47,114,103, 21, 43,147,201,148, 23, 29, 29,237,
+178,114,102,135, 51,223,137,104,184, 27, 25, 25, 73,186,203,101,134, 94,175, 47,118, 22,206,200,200, 72, 52,148,211,213,189, 71,
+ 68, 68,216,189,119, 23,130,208,225,189, 27,141,198,251,226,116, 22,159,206,160, 86,171,203,253,253,253, 21, 26,141,134,171,213,
+106,185, 70,163,177,142,253, 40, 18,137, 74,212,106, 53,155,121, 88,176,120, 16,161,245,144,227, 28,106,150,151,104, 44,104, 47,
+ 95,190,252,130,197,158, 42, 46,190, 95, 30, 91, 37,169,112,241,187, 33,194,168,209, 29,161, 90, 33,165,106, 36,186, 82,133, 66,
+241,146,249,135,185, 15, 8,139,127, 30,114,185,252,209,198,230, 44, 43, 43,107,244,138, 90,105,105,105,247, 38,184,247, 46,255,
+ 85, 78,103, 40, 40, 40,120,212,133, 16, 99, 51, 14, 11, 22,110,130,100,163,128, 5, 11, 22, 44, 88,176, 96,193,162,105, 64,160,
+102,228,128, 61, 52,100, 52,193,192,251,184,118, 18,203,201,114,178,156, 44, 39,203,201,114,178,156,255, 57, 78, 87,220,236,104,
+198, 38, 22, 96, 44,231,255, 63, 39, 7, 0, 33, 18,137, 8,161, 80, 72,136,197, 98,130,141, 79,150,147,229,100, 57, 89, 78,150,
+147, 69,125,252,227,125,180,252,253,253,147, 41,138,138, 86, 42,149,202,234,234,234, 40, 15, 15,143,219, 18,137, 68, 98, 52, 26,
+ 51, 75, 74, 74,122, 63, 32,253,100,129, 64, 48, 51, 46, 46,174,221,205,155, 55, 51,170,170,170, 86, 0,248, 6,246, 71, 12,113,
+109,246, 19, 0,226,155, 55,111,190, 85, 40, 20,138, 51, 50, 50,230, 0,248,222,141,120, 36,224, 98, 68,146, 53,188, 37, 60, 46,
+106,250,147,245, 5,112, 28,192,190,114,165,222,240, 32, 55,125,191,156, 82,169,212,167,101,203,150,235, 35, 34, 35, 35, 25, 64,
+203, 48, 53,243, 15, 25, 13,122,222,213, 43, 87,146,239,220,185,179,161,127,255,254, 95,135,133,133, 5,114,185, 92,131,121,212,
+151, 74,165,226,109,219,182,173, 21,155,157, 88,176, 96,193,130, 5, 11, 55,133,150,164, 57,218,240, 37,196, 54,147, 1,106,163,
+150,153,170,204,197, 13,105, 51,244, 96,128, 23, 24, 32,130,228,144,254, 38, 19, 93, 72,107, 8, 35,215, 32,138, 38, 25, 74, 88,
+ 85, 85, 21,218,224, 0, 80, 84,116, 65, 65, 65, 64, 72, 72,136,121,241, 99,137,249,247, 3,128, 0,240,197, 43,175,188, 50,245,
+213, 87, 95,133,183,183, 55, 12, 6, 67,235,157, 59,119,110,154, 55,111, 94,119, 0, 47,218, 17, 67, 12,234, 78, 18,218, 58, 54,
+ 54,118,127,106,106,170,111, 69, 69, 5, 58,119,238,188,162,184,184,216,145,208, 50, 54, 52,128,222, 18, 94, 27, 0, 47, 6,121,
+ 9, 38,125, 51,171,191,119,139, 1,175,225,202,143, 11,166, 77,255,230,114, 57,128,205, 0,190, 41, 87,234,111,254, 93,156, 30,
+ 30, 30, 1,109,162,163,119,253,248,243,207,189, 79, 31, 59, 6, 31, 1, 31, 18, 17, 31, 96,128,192, 86,109,240,218,236,217,198,
+ 71, 30,121,164,223,119,223,125, 23,151,158,158,142,208,208, 80,136, 68, 34,136,197, 98,200,229,114,108,219,182,237,190,211, 17,
+ 77,211,247, 0, 28, 37,141,216,167, 40,192, 45, 54, 91,178, 96,193,130, 5,139,127,189,208, 98,104,172, 88,125, 96,114,231, 43,
+101,191,225,139,103, 10,151,138,194, 96,236, 49, 34,250,233,132,137,157,224,233, 47,134, 80, 74,161, 66, 94,213,225,230,133, 92,
+ 28,223,253, 39,188, 13,173,145,246,251,249,235, 42,149,170,237,253, 4, 68, 44, 22,139,131,131,131,139,196,214, 11,227,221, 31,
+132, 0, 86,188,250,234,171, 83,223,121,231, 29,252,254,251,239,216,179,103, 15,198,143, 31,143, 25, 51,102, 64, 42,149, 78,154,
+ 49, 99, 70, 26,128,175,157,112,180,142,141,141, 61,149,154,154,234,171, 86,171,113,229,202, 21,148,149,149,253,209, 88,145,238,
+ 45,225, 45, 91,255,114,220,187,221,158,158, 14,255,246,131, 64,144, 53,143,161,215,236,189,184,248,166,218, 59, 47,229,187,183,
+246,252,248,253, 91,203,247,220, 90, 94,174,212,207,249, 59, 56,163,162,162,214,237,250,233,167,222, 97, 97, 97,216,159,125, 27,
+ 45, 35,130,209,172, 77, 39, 84,102,223, 70,201,221, 44,232,244,122,244,237,219, 55,238,212,169, 83, 40, 40, 40,128,159,159, 31,
+ 52, 26, 13,210,211,211, 33, 20, 58, 94,141,163, 1,233,104,200,177, 93,183,150,223, 58, 95,178, 76,153,131, 15, 1,152,216,236,
+249,175, 65,235,102,205,154,253, 44, 18,137,100, 25, 25, 25, 31, 0,216,210,132,215, 26,215,173, 91,183, 53,151, 46, 93,186,160,
+213,106,223, 4,144,193, 70, 63, 11, 22, 44,254, 73, 56, 27,117, 24,236,239,239, 7,191, 72, 46,188,125, 36, 67,151,255,244,252,
+211,175, 45, 29, 0, 94, 84, 62,202,164,103,112,151,249, 29, 26,223,155,104, 51,132,135,183,191,233, 7,223,238,114,192, 71, 85,
+128,112, 8, 28, 17,250,248,248,252, 28, 16, 16,144,106,189, 25,141, 70,225,156, 57,115, 76, 25, 25, 25,146,130,130,130,128,140,
+140, 12,201,156, 57,115, 76, 70,163, 81,232, 31,232,115,193,163, 57, 47, 47,162,183,168, 68,210, 28,175,187,112,176, 62, 11, 10,
+ 10, 82,141, 29, 59, 86,221,161, 67,135,169, 12,195, 96,235,214,173,120,249,229,151,119,254,246,219,111, 17, 99,198,140,217,122,
+244,232, 81, 76,153, 50, 5, 94, 94, 94, 51,220, 21, 89, 23, 46, 92,192,132, 9, 19, 74,140, 70,227,140, 70,140,247,137,163, 86,
+156, 65,200, 35,207,130,195, 19, 89,214, 82, 35, 72, 18, 92,145, 12, 97,143, 61,143, 87, 22,127, 7, 0, 19,255, 46,206,200,168,
+168,150,231,146,147,241,237,194, 69,104, 29, 16,128,208,102,161,240,105,211, 1, 30,254,126,160, 40, 10, 12, 3,134,207,231,211,
+229,229,229,144,203,229,144,203,229,200,206,206,198,241,227,199,113,239,222, 61, 52, 70, 58,154,253,109,127, 50,225,181,182,239,
+137,155,225,160,179,116,196,226,225, 18, 89,177,177,177,167,110,220,184, 17,147,148,148, 20, 18, 26, 26,250, 73, 83, 94,172, 75,
+151, 46,203, 79,158, 60,233,115,240,224,193, 65, 65, 65, 65,201, 0, 90,223, 79,152,155, 55,111,126,189,117,235,214,121, 0,198,
+ 53,114, 16, 39,118,239,222,189,140,207,231, 31,186,207,176,177, 96,241, 48,161, 3,128, 88, 86,104,185,129,197, 59,199, 82, 62,
+109,181,184, 82,126, 0,187, 62,249, 3,159, 12,189, 73, 47,238,158, 77,127,254,194, 13, 28,222,245, 7,138,241, 7,134,189,214,
+ 18, 99, 63,232, 56, 80,108,194, 34,153, 76,118,193, 30, 15,143,199, 11,204,200,200,240,205,202,202,242,189,125,251,182,111,102,
+102,166,239,181,107,215,138, 42, 42, 42, 20,195,135, 15,167, 1, 96,248,240,225,244,221,156,187,170, 65, 79,247,161,195, 7,160,
+227,172,159,218,133,206, 73,236,228,231, 29, 44,152,235,232, 30, 56, 28,206,158, 47,191,252,242,173,220,220, 92,209,247,223,127,
+143,244,244,116, 68, 69, 69, 97,209,162,133,229, 35,122,180,237,245, 72,148,239, 42, 79, 17,247,179, 45, 91,182, 64, 44, 22,163,
+ 99,199,142,142, 92,183, 22, 29, 58,116, 72, 49,139,172,139, 23, 47,226,249,231,159,215,203,229,242,171, 0,150, 1,216, 67,145,
+ 68,178,191,167,164, 66, 34,160,238, 18, 4, 14,160,166,207, 87,120,195,163,158, 64,229,221, 75, 48,233,213,160, 4, 18,112,120,
+ 66,144, 20, 31,101,183,210,144,241,235, 66, 84,100,221,207,194,225, 15,192, 73,146, 26, 79, 46, 23,113,126,190,136,141,136,132,
+143, 80, 6, 85,218, 49,160, 66, 1, 30, 79, 0,128,129, 64, 32, 64,117,117, 53, 46, 92,184,128,235,215,175,227,220,185,115, 56,
+123,246, 44,138,138,138,112,191,233,104, 73,143,108,173,163,116,196,150, 81,255, 14,145,149,154,154,234,171,209,104,112,227,198,
+ 13,148,148,148, 92,108,202, 11,102,100,100,148,167,166,166, 34, 44, 44, 12,223,127,255,189,127, 68, 68,196,201, 6, 10,154,214,
+177,177,177,167,174, 95,191, 30,147,148,148, 20, 26, 16, 16,176,162, 49,195,247,200, 35,143, 44, 62,121,242,164,247,225,195,135,
+ 7,251,251,251,223,175, 16,100,193,226,255, 25, 2, 0, 47, 16, 4,113,182, 67,135, 14,151,219,183,111,255, 7, 65, 16,105, 0,
+ 70,225,223, 59,119,167, 83, 88,110, 58, 49, 49,241, 4, 0, 36, 36, 36,244,177, 61, 72, 17,112, 30,249,217, 69,216, 60,177,152,
+ 86,151,160, 98,209,123,159,237, 57,127,250,226, 83,111,206,120,211,123,245,198,229,216,158,118, 0, 99, 86, 24,209,107,116, 59,
+156,217,159,243,214,196,126,115,241,214,140,217, 64,253, 33,154, 12, 73,146, 72, 73, 73,129,201,100,130, 78,167,131, 78,167, 67,
+187,118,237,202,142, 29, 59, 38, 5,128,204, 63, 51, 24,174,175, 78, 48,240, 29, 25,111,202,128, 24, 40,228,122,124,247,110, 38,
+ 74,179,181, 63,214,114, 36,213,145, 7, 36,249,245,134, 13, 27,158,152, 50,101, 10,190,248,226, 11,236,220,185, 19, 79, 62,249,
+ 36,158,123,238, 57,148,148,148,120,135,226, 30, 6,180,243, 11,233, 59,125, 67,159, 49, 99,198, 64,161, 80, 32, 61, 61,253,186,
+ 77,184,146, 80,211, 25,254,245,227,199,143,251,168,213,106, 84, 87, 87,163,111,223,190,144,203,229, 60, 0,253,237,196,157, 39,
+128,230,106,181, 26, 45, 90,180,104, 93, 82, 82,210,195, 14,103, 61,120, 75,120, 22,113,171, 87,150, 67,175, 44, 7,135, 39,132,
+208, 59, 12, 87,191,155, 1,134,174,105, 49,243, 12,239,104,239,244, 38,227, 20, 11, 4, 72, 76, 77,193,241,196,125,104, 27, 25,
+137,158,177,177, 56,117,249, 10,120, 36,129,145,147, 38, 3, 52, 19,144,146,146, 66,148,148,148,224,242,229,203, 88,184,112, 33,
+114,114,114,112,224,192, 1,152, 76, 38,183,194,105,147,142, 84,139,222,251, 44,123,236,179,207,223, 60,120,228,183, 59,137,191,
+255, 52,104,123,218,209,248, 49, 43,140, 68,175,209,237,112,246, 64,206,204,108,162,252, 91,101, 46,110, 56,227,124, 64,176,156,
+ 77,199,217,190,125,251,246,167, 83, 83, 83,197,106,181, 26,187,119,239,198,252,249,243, 13,122,189,158, 2,176,199,206,185,233,
+ 0,190, 64,253,165,183,236,133, 83, 6, 96, 26,128,174,245,210,152, 66, 81,242,204, 51,207, 24, 22, 44, 88,192,125,252,241,199,
+177,111,223, 62,191,145, 35, 71, 94,204,200,200,136,199, 95,205,136, 73,174,132,225,125,116, 25,112, 43, 62,107,133, 96,112,104,
+104, 40,182,111,223,238, 63, 97,194,132,228,162,162,162,222,176,223,196,201,166, 37,150,243, 97,226,108, 1,224, 85,169, 84, 58,
+165,111,223,190,222, 79, 62,249, 36,124,125,125, 97, 52, 26,145,155,155,219, 45, 49, 49,177, 91,106,106,106,129, 78,167, 91, 11,
+ 96, 19,128, 10,123,164,206,180,200, 67, 45,180, 18, 19, 19, 25,212,140, 80,179, 11,149, 73,142,248,224,161,232,246,187,148,172,
+ 40,171,210, 47, 24,185,244,104, 69,142,254,169,175,190,250, 10,207, 61, 49, 1,251,126, 23,227,244,206,189, 24, 56,190, 16, 3,
+ 39, 71,226,207,147,142,187, 69, 24, 12, 53,131,223,140, 70, 35, 12, 6, 3,244,122, 61,244,122, 61,196, 98, 49,174,221,188, 2,
+163,119, 9,231,249, 53,173, 56,161,109, 36, 72,221, 89,136, 3,171,115,116,138, 98,195, 92, 93, 57,126,170,103,223, 0, 95,175,
+ 90,181,106,210,148, 41, 83,176, 96,193, 2,252,244,211, 79,204,138, 21, 43,136,121,243,230,161,188,188, 28,253,250,245,195, 43,
+147,159,199,181,184, 16,188, 59,127,177,108,212,168, 81,248,248,227,143,161, 84, 42, 87, 57, 8,158,151, 78,167,179, 44,118,155,
+151,231,122,233,198,156,156, 28, 48,206,151, 82,131,183,132, 39,244,146,240,150,112, 72,226, 57, 14, 1,127,131,137,193,241, 5,
+189,192,137, 25,137,249,107,119,194, 68, 51, 24,247,212, 32, 68, 42,170, 32, 18, 75,106, 20, 41,109,186, 47,206,232,161,111,130,
+228, 10, 97,210,107,176,101,203,102,236, 57, 84, 1,157,252, 14, 94,123, 60, 10,129, 78, 56,141, 70, 35,211,188,121, 27,180,108,
+175, 3, 35,224,225,216, 93, 45, 98,251, 36,224,198,181,219,200,175,212, 35, 46,182,125,139,201,147, 95,132, 64, 32,192,237,219,
+183,177,100,201, 18, 40,149, 74,119,215,133,179,151,142,164,171, 95, 91, 43,124,245,197,215,222,187,144,126, 49,119,235, 23,187,
+126,153,246,238,148,175, 79,239, 60, 24, 59,112,124, 33, 6, 76,138, 36, 55, 92, 42,127, 22,192, 2,182,130,248, 80, 98,195,153,
+ 51,103,196, 42,149, 10,213,213,213,120,249,229,151, 49,109,218, 52,174,189, 74, 75,113,113, 49, 82, 82, 82,158,156, 62,125,250,
+152,194,194,194,222,112,190,238,165,119,167, 78,157, 82,143, 29, 59,214,218,195,195,195,178,147,166,105,232,245,122, 75,153,162,
+213,106,161,213,106, 33,147,201,144,154,154, 42,244,241,241,217, 5,231, 77, 24,127, 71,151, 1, 84, 85, 85, 61, 59,106,212,168,
+228,109,219,182,249, 71, 70, 70,226,251,239,191,247,127,241,197, 23, 79,222,189,123,183, 23,216,254,100, 44, 30, 94,204,121,230,
+153,103, 22, 7, 6, 6,146, 29, 58,116, 64,112,112, 48,180, 90, 45, 42, 43, 43,193, 48, 12,252,252,252, 48,105,210, 36, 60,245,
+212, 83, 33,201,201,201,203,143, 29, 59,182,160,188,188,124, 51,128, 53, 0, 50,173, 68,150, 83, 45,242,208, 59, 90, 9, 9, 9,
+ 39,234,168, 24, 2,233,103,254, 56, 21, 43,140, 1, 8, 18,200, 37,143,129, 0,129, 10,131,158,103,168, 34,215, 30, 62,124,216,
+ 91,169, 84, 66,161, 80, 96,104,223, 17,152,187,225, 23,244,124,190, 10,205,218,132, 96,245,135, 7, 12,174,132, 22, 77,211, 48,
+ 26,141,168,174,174, 38, 79,156, 56,225, 23, 30,209,140,120,254,173, 33,152,254,125, 59,200, 2,120, 56,248,121, 14,202, 83, 67,
+148, 76,105,197, 29, 93,121,217, 86, 59,133,239,228,247,223,127,127,210, 27,111,188,129,229,203,151, 99,217,226,143, 79,135, 4,
+ 5, 62, 18, 31, 31, 79,124,244,209, 71,152, 61,123, 54,194,195,195,193, 17,120,160,101,223,231, 49,107,214, 44,172, 93,187, 22,
+ 95,173, 94,170,111,231, 35, 77,187, 86, 86,111,181, 27, 3,128, 69, 3, 6, 12,120,226,240,225,195, 62, 66,161, 16, 87,175, 94,
+197,248,241,207, 67,204, 5,184, 28, 18, 96,104, 48, 52, 13,130, 96,224, 47, 19,192, 91,196,129,191, 7, 23, 49,126,116,251,114,
+ 70,218,250,106,153, 34,195,158, 32,242,245,224, 95,221,241,193,136,176,216, 73, 95,240, 40,129, 20,218,202, 66,252,182,102, 26,
+ 22, 45,254, 26,167, 82, 79,163,162,162, 2,131, 7, 14,192,154, 81,126,127, 89,127, 78,196,155, 35,206, 27,187,222,195, 43, 83,
+167, 99,227,250,117, 32,185, 66,252,118,226, 28, 14, 31, 61,137,148,148, 20,188, 52,113, 44, 62,143, 46,116,200,105, 50, 25,224,
+ 31, 16,142,199,250, 68, 65,234, 33, 5, 73, 0, 45, 34,252,225,231,155,135,160, 32, 2,105,167,143, 34, 57, 57, 25, 30, 30, 30,
+136,136,136,192,218,181,107,145,157,157,141,151, 95,126, 25,124, 62,223, 33,175,163,116,164, 32, 12, 32, 76,252, 86, 30, 30, 30,
+ 59,116, 58,221, 42,189, 94,191,247,249, 81,147,119,188,188,228,231,118, 61,159,175,226, 52,107, 19, 2,130, 65, 31, 86,104, 61,
+180,144, 24, 12, 6,152,215,115,206,205,205,117,122,112, 92, 92, 28,182,108,217,210,110,226,196,137,201,133,133,133,143,193,254,
+162,242,178, 78,157, 58,165, 38, 39, 39,183,214,104, 52,200,202,202,114, 43, 32,181, 11, 35, 43,157, 28, 98,238, 50,224, 99,221,
+101,160,172,172,204,220,101,192, 30,202, 80,179,142,234, 93, 59,255,133, 3,120,179,182,134, 15, 59,194,242,234,248,241,227,123,
+110,223,190,157, 23, 21, 21,133,125,251,246,249,141, 26, 53, 42, 37, 35, 35,163, 43,128,108, 54,233,176,120, 8, 49,113,225,194,
+133,164,201,100, 66,105,105, 41,180, 90,109,189, 60,200, 48, 12,196, 98, 49,134, 14, 29,138, 33, 67,134, 8,206,159, 63, 63, 53,
+ 41, 41,233,213,172,172,172,249,181,121,201,174, 22,249, 87, 9,173,122, 47, 94, 10,139, 62, 29,147,234, 37,144,146,177,160, 9,
+ 47, 63,191, 0, 9,151,203, 37,188,196,129, 94,171, 86,206, 46,187,121,243,230,189, 93,187,118, 5,119,239,222, 29, 96,128, 78,
+205, 6, 67, 94,120, 26, 94, 92, 53, 74,229,165,142,230,145, 98,126, 61,176, 91, 82, 94, 94, 73,183,137,108,167, 86,169, 84,228,
+129, 3, 7,194,122,245,238,201,219,155,250, 29,241,236,178, 96,200, 2,120,248,109,237, 93, 92,252,222, 64, 79,155, 56,162,242,
+207, 75,107,170,237,213,112,121, 60,222,140, 55,222,120, 3, 59,119,238,196,156, 57,115,182, 60,213,173,229,160,103,134,245, 37,
+ 83, 82, 82, 48, 98,196, 8,228,231,231,227,151, 95,126,193,252,249,243, 49, 97,194, 4,124,241,197, 23,184,240,227, 39,184,190,
+164, 43,111,238,206,219,215,232,155,196,240, 27,165,213, 7,109,104,179,111,220,184,241, 88,255,254,253, 79,238,221,187,215, 47,
+ 38, 38, 6,219,182,109,199,204,215, 95,197,143, 11, 70, 33, 58, 80, 12,232, 21,160,117, 42, 16, 60, 17, 96, 80,131, 41,191, 11,
+189, 94, 45,125,119,199,237,235, 38, 59,156, 94, 18,222,146,239,223,127, 34,172,211,212,109, 60,243,190, 91,183,239, 96,237,241,
+114,156, 74, 61, 13,115, 19, 69, 72,128,183,109, 84, 57,124,104,246, 56, 9,146, 66,199,151,190,198,220,170, 4, 28,218,188, 4,
+ 67, 95, 94, 8,121,105, 49, 82, 83, 83, 17, 26, 26,138,207, 55,110,198,140,233, 83, 97,162, 25, 71,207,156,215,166, 77, 36, 56,
+156, 2,240, 5, 52, 8, 0,122,125, 57,252,252, 40, 52,107,230, 7,128,176,184, 87, 4, 65, 96,216,176, 97,122,134, 97,138, 52,
+ 26, 77,233,174, 93,187, 8,103,233,232,147,209,169,161,124, 49,249, 40, 1,210, 51, 32, 32,144, 16, 8, 5, 8,244,142,192, 7,
+111,190, 6,197, 11,234, 71,183,109,219,182,235,219,111,191, 45, 72, 77, 77,221, 78, 8,124,110,203, 11, 21,209, 94, 92, 53,192,
+144,205, 1,154, 45,194, 30, 78,140,126,228,145, 71, 46,254,246,219,111, 66, 62,159,143,189,123,247, 98,254,252,249,134,178,178,
+178,147,182,162, 39, 48, 48,176,253,214,173, 91, 35, 34, 35, 35,177,110,221,186,118, 35, 71,142,156, 6, 96,137, 29,206,105,199,
+142, 29,107,173,209,104,112,241,226, 69, 76,152, 48, 33,187,168,168,232,170,173,192,139,136,136,232,181, 98,197, 10,110,231,206,
+157, 81, 85, 85,133, 65,131, 6,169, 0,188,234, 36,172, 13,233, 50, 0,160,102,173, 63, 7, 93, 6,224,235,235,251, 77, 78, 78,
+ 78, 63,145, 72,228, 52,130,244,122, 61,242,242,242,224,229,229,133,196,196, 68,159,150, 45, 91,126, 0, 96, 50,155,116, 88, 60,
+140,208,233,116,216,185,115, 39, 58,117,234,132,182,109,219, 66,161, 80, 88, 68,151, 78,167,131,209,248,215, 44, 72, 36, 73,162,
+107,215,174,136,142,142, 38,102,206,156, 57,206, 90,104,253, 27, 97,126,233, 46,176,109, 23,213,100, 35, 23,192, 56, 90, 36,120,
+ 95, 40, 20,142, 14,111, 30,139, 54,109,218, 8,159,126,250,105,190, 78,167,147,158, 56,154,252,103,207,158, 61, 81, 86, 86, 22,
+ 60,103,206,156,178,176,102, 97,116,242,164,114, 95,130, 41, 7, 71,199, 79, 1,234, 47, 58,170,229, 84, 55,223,251,231,242, 96,
+ 0, 56,158, 22, 81,253,204,160,177,165, 28, 14,135, 58,125,227, 24,209,123, 6, 5,255, 22, 34,164,237, 46, 4, 63,187, 51, 34,
+ 3, 43, 33,147,201, 28,206, 79,213,177, 99,199,118, 36, 73, 98,231,206,157, 0,240,193,141,236,194, 75,146, 35, 39, 62,219,179,
+120, 11,247,221,247, 63,196,220,185,115,241,210, 75, 47, 65,175,215, 99,249,242,229, 72, 77, 77,197,175,191, 28,135, 49,105, 46,
+ 86, 60, 93, 70,190,252,157,230, 87,189,201,219,255,118,121,121,181, 13,117,198,173, 91,183,122, 13, 29, 58,244,228,238,221,187,
+253, 90,183,110,141, 21,107,191,196,248, 55,167,224,236,210, 65,128,200, 7,188,222,239,130,240, 10,175,145, 67,101, 89,192,225,
+119, 29,114,114, 72,226,185,216,137, 95, 88, 4, 81, 70, 70, 6,166,207,122, 7,191, 29, 60, 12,115, 19,197,204, 55,167, 99,235,
+218,143,161, 60,179, 1, 66,159,102,144, 4, 68,161,234,238, 37, 0,144,219, 28, 42, 43,123, 0, 0, 32, 0, 73, 68, 65, 84,187,
+119, 91, 78, 0, 80,203,239, 66,113,239, 38, 34,135,188,137, 15,198,141,199,208,151,129,181,139,222,193, 11, 19,198,224,243,141,
+155, 17, 25, 25,137,207,215,111,194,228,201,147,100, 85, 57,185,173, 97,211, 76,113, 46,253,194,141, 85,171, 23,138, 85, 42,165,
+ 39,143,207, 15, 2,195, 32, 56, 56, 24, 85, 85,213, 48, 24, 12, 80, 42, 85, 32, 73, 18, 36, 73,130,195,225, 96,196,136, 17,188,
+228,228,228,102,127,252,241,135,127,173, 5, 28,109,109, 1,155,161,201,198,216,103,158,121,102,112, 96, 96, 32,233,235,235,139,
+ 62,125,250,192,100, 50, 65,171,213,130,166,105,240,249, 38,139,165,124,242,228,201, 57,122, 83,184,113,203,132, 36, 13,135, 40,
+215, 82, 90, 97, 82,227,173,105,205,226,111, 70, 70,102,102,102,252,192,129, 3, 79,254,248,227,143,126,195,134, 13, 67,203,150,
+ 45,185, 79, 63,253,180,191, 74,165, 26, 96,125, 96, 81, 81,145,247,132, 9, 19,206,229,230,230, 70,212,238,234,234,128,179,171,
+135,135, 7,178,178,178,204, 34,171,139,109, 37,140,207,231, 31,186,116,233, 18,151,207,231, 35, 61, 61, 29, 19, 39, 78, 44,205,
+206,206,118,213, 44,119, 95, 93, 6,104,154,214,218,251,143, 36, 73,193,249,243,231,225,106, 46, 64,146, 36,193,227,213,201,198,
+ 21,108,178, 97,241,144,194,160,211,233,208,165, 75, 23,100,103,103,227,252,249,243, 22,193, 85, 90, 90,138,130,130,130, 58, 7,
+159, 61,123, 22, 23, 46, 92, 64,239,222,245,230, 36, 95,240,111,236,163,101,113, 34, 18, 19, 19,251,216,216,118,124,137, 68,114,
+246,185,231,158,107,246,244,211, 79,123,113, 56, 28,104, 52, 26, 24,141, 70,164,165,165,161,109,219,182,170,118,237,218, 85, 12,
+ 31, 62,156, 40, 45, 45,237,127,245,234,213,172,210,210,210,120,153, 76,150,245,216, 99,143,105, 52, 26, 77, 61,165,229, 21, 69,
+233,150, 95,236,198, 3,128,228,237, 5,200,217,239,163, 48,168, 77,226,200,145,149,100,159, 9, 33,168, 42,214, 99,245,179, 55,
+240,235,166,163, 88,241,217, 10, 83,239,222,189,243, 22, 47, 94, 92, 80, 80, 80,240,152, 45,151,167,167,231,181,228,228,228,182,
+ 71,143, 30,197,236,217,179,191, 51,153, 76,203,132, 92,206,193, 73, 47,189, 18,166,215,235,113,254,252,121,248,248,248, 32, 39,
+ 39, 23,188,128, 56,196,246,123, 1,111,143,235,138, 56,239,114,232, 54, 15,198,141, 2, 53,198,239,210, 46,186, 89,172,156,231,
+ 32,110, 90,135,134,134, 38,111,223,190,221, 63, 48, 48, 16,227,158, 25,134,180,247, 98,193, 27,186, 2,151, 74,196,248,236,251,
+115, 0,128,183,199,117,113,200,233, 45,225,145, 1, 50,190,225, 70,126, 53, 9, 0,119,238,220,193,132, 23,198,227,224,161, 26,
+145,117,241,226, 69,140, 27, 55, 14,237, 99,162, 33, 22,242,161,173, 44, 2,109, 50,224,110, 94, 33,242,203, 52,101, 70,154,190,
+202, 48,200,134, 85, 19,133, 45,231,221,187,119,177, 98,249, 98,220,186,126, 9,122, 69, 25,120, 18,111,164,157,191,130, 62,125,
+250,130,161,141, 40, 47,202, 69, 78,169, 10,155,183,108, 69, 84, 84, 20, 84, 42, 21, 70,141, 26, 85,230,164,153, 34,227,198,141,
+ 27,209,107,215,174,197,252,249,243,241,203, 47,191,192,100, 50, 65, 32, 16,128,162, 40,240,249,124, 68, 69, 69,225,250,245,154,
+241, 4, 52, 77,227,252,249,243, 72, 74, 74, 98,108, 45, 96,107, 62,147,201,132,146,146, 18,232,116, 58,168, 84, 42,168,213,106,
+ 48, 12, 3, 14,135, 3,134, 97, 44,181, 29, 14,135,131,172,172, 44, 92,190,124,153,217,183,111,223, 39, 12,195,204, 97,203,176,
+135, 26,173, 67, 66, 66,146,183,109,219,230, 31, 28, 28,140,126,253,250,229, 22, 22, 22, 54,183,115,220, 30,134, 97,158,204,202,
+202, 66, 84, 84,212, 94, 0, 35,238,231,152,240,240,240,146,244,244,116,191,107,215,174, 97,220,184,113, 37,181,125,190, 92,245,
+125,138,136,137,137, 73, 63,124,248,176, 15, 73,146,184,122,245, 42,198,141, 27,167, 47, 43, 43, 59, 5,199, 77,142,119, 80,211,
+191,228,174,157,255,194, 1,204, 3,224,227,224, 92, 73,116,116,116,207,115,231,206,241, 8,130,192,157, 59,119,204,121,178, 75,
+ 45, 47, 11, 22, 15, 27,158, 10, 9, 9,249,118,218,180,105,158,221,186,117, 67, 94, 94, 30,242,243,243, 81, 94, 94,142,248,248,
+120,180,111,223, 30,183,111,223,198,161, 67,135,112,225,194, 5, 8, 4, 2,132,133,133, 65,186, 99, 39,190, 34,112, 13, 64,123,
+ 39, 90,228,223, 35,180,108, 33, 16, 8, 62,152, 56,113,226,140,215, 94,123,205, 71, 32, 16,224,236,217,179,224,241,120,160,105,
+ 26, 3, 6, 12, 64,118,118, 54, 70,140, 24, 81, 86, 88, 88,248, 52,128,147,238, 92, 76, 22, 44, 40, 28,254,126,112, 96,239,241,
+ 53, 53,189,228,237, 5, 56,183,183, 24,179,118,117, 4,201, 33,240,205,244, 27, 48,101, 54,167, 91, 71,197, 48, 0,140,205,154,
+ 53, 43,220,186,117,171, 93,161, 5, 96,242,148, 41, 83,190,153, 60,121, 50, 78,156, 56,129, 93,187,118, 97,216,176, 97, 24, 62,
+124, 56,190,253,246, 91,120,201, 79,227,147, 95,175, 97,236,135, 7,112, 53,171,198, 24,106, 31,233,139, 29, 31, 15,131,230,243,
+120, 48,165, 25, 72,216, 73,221, 56,246,167,194,209, 84, 15,100, 11,111,209, 79,126,254, 94, 79,105, 24, 30, 94,237, 46,198,139,
+ 67,226,192, 31,181,189, 65,156,173,130,165,133,215,179, 10, 2, 41,129, 20,111,188,250, 34, 62, 90,242, 41, 76, 38, 19,170,171,
+171, 17, 22, 22,102, 91,163,173,135,218, 38,138, 52,235, 38, 10,107,206, 39,135, 63,142,157,187,127,134,187,205, 20,124, 62, 31,
+ 90,173, 22, 45, 91,182,220, 12,251,205, 20, 25,151, 46, 93,138, 94,188,120, 49, 54,108,216,128,125,251,246,193,104, 52, 66, 32,
+ 16, 64, 34,145, 64, 36, 18,193,207,207, 15,151, 47, 95,174,115, 82, 85, 85, 21,102,206,156,153,137,250,195,213, 51, 46, 93,186,
+ 20,237,204, 82, 54,247,219,179, 36, 74,130, 64,101,101,165, 35, 62, 22, 15,161,216,226,241,120,171,253,253,253, 59,230,231,231,
+207, 66,253,165,172,188,159,125,246,217,171, 63,252,240, 67,240,157, 59,119,220, 18, 90,143, 61,246,152, 93, 71, 11,192,196,160,
+160,160,143,171,171,171, 43, 85, 42,213, 40,184,223,193,188,117,171, 86,173, 78,238,221,187,215, 79, 44, 22,227,250,245,235, 24,
+ 63,126,124,137, 92, 46,239,141,198,237,164,222,186, 77,155, 54,167,206,158, 61,235,203,229,114,145,158,158,142, 9, 19, 38,148,
+178,157,225, 89,252, 11,224, 1, 96,118,100,100,228,219, 83,167, 78, 21,180,107,215, 14,121,121,121, 40, 41, 41, 65,121,121, 57,
+ 78,159, 62, 13, 0, 8, 13, 13, 69,104,104, 40,110,222,188,137,148,148,148, 42,133, 66, 49, 25,192, 47,255,230,136,113,216, 71,
+ 75, 44, 22, 63,247,194, 11, 47,248,152, 76, 38,244,238,221,187, 76,167,211,153,102,207,158,237, 31, 20, 20, 4, 15, 15, 15, 12,
+ 26, 52,168,188,170,170,170, 59,224,254,146, 41, 2,147,236,110,241,239,193,210,100, 20,136,123,143, 15, 65,239,241, 33,232, 58,
+ 34, 0, 36,135,192,229,195,114,240, 75, 91,170, 94,152, 50,165,178, 89,179,102, 6,146, 36,209,188,121,115,227,246,237,219, 29,
+117, 86,250,246,235,175,191,126,212, 96, 48,188,244,242,203, 47,163, 79,159, 62, 48, 26,141,216,190,125, 59,100,185, 7,176,240,
+249, 46,142, 3, 98, 50,128,224, 73, 16,232,105, 10,115, 36,178,218, 6, 74,191, 89,246,106,191,167, 6,117,240,197,222, 99, 23,
+ 49,172, 13, 23,208, 85,223, 15,231,174, 43, 91,223,152, 26, 59,233, 75, 94,105, 81, 30, 26,169,137,194,194,169, 85, 85,163,145,
+155, 41, 12, 58,157, 14, 18,137, 4, 92, 46, 23, 2,129, 0, 70,163, 17, 4, 65, 32, 62, 62, 30,205,155, 55, 71, 78, 78,142, 59,
+ 22,112, 99, 91,202, 44, 30, 94,100,232,245,250, 33,249,249,249,214,142,143,165,179,248,179,207, 62,219,101,251,246,237,193,133,
+133,133,248,227,143, 63,128,154,169, 30,236, 33,189,168,168,232, 73,177, 88,140,173, 91,183, 70, 76,152, 48,225,156, 85, 31, 45,
+115,231,244, 45,133,133,133, 91,238, 39,140,182, 93, 6,182,110,221,234, 63,106,212,168,221, 42,149,170, 67, 99, 69,132, 72, 36,
+ 90,115,230,204, 25, 95, 46,151,139,180,180, 52,140, 27, 55,174,196,201,244, 14, 44, 88, 60, 76,168, 6, 48, 47, 43, 43,235,243,
+183,223,126,251,131,118,237,218,189, 58,101,202, 20,170,109,219,182,200,207,207, 71,118,118, 54, 90,182,108,137,220,220, 92,124,
+247,221,119,186,146,146,146,213,168, 25,108, 82,249,159,141, 49, 47, 47,175,187, 59,119,238,100,130,130,130, 44,253,132,124,124,
+124,138,230,207,159,207,200,229,114,198,215,215,183,192, 13,154, 58,171,123,135,132,132,156,184,120,241, 98, 86, 79, 95, 40,199,
+125, 17,193,124, 85,221,147,249,170,186, 39,179, 38,191, 27, 19,209,195,219,248,218,180,215,242, 62,255,252,243, 91, 27, 54,108,
+200,252, 31,123,215, 29, 30, 69,181,183,223,153,237, 37,189,147, 4, 18, 32,244,208,139, 32, 29,129, 32,132,122, 85,138,128,162,
+126, 72, 64, 44, 8, 4,244,114, 17,145, 4, 68,165,233, 5, 47,150, 0,210,171, 20,169, 66,128, 80, 36, 32, 37,161, 5, 18, 72,
+207,166,111,175,115,190, 63,178,179,110,194, 38,187, 27,192, 58,239,243,204, 51, 59,237,221,211,230,156,247,252,206,239,156, 89,
+187,118,237,157,252,252,252, 59,225,225,225,103,234,224,164, 2,228,130,189,221,219, 69,145,231, 7, 63, 71,122,182,141, 32, 97,
+222,162,156,107,241,145, 68,187, 44,130, 88,138,210,201,229,219, 69,100,220,191, 15,144,113,255, 62, 64, 46,223, 46, 34,150,194,
+235, 68,179, 64, 76,212,203,155,145,103, 26,251,220,114, 20,206, 86, 33,178, 37,251, 23, 12, 35,134, 29,147,201,182,184,182,164,
+117,176,236,102,125, 57,125,229, 66, 73,179, 6, 30,247,206, 38, 12, 50,156,223,183,142, 60,211,181, 19,201,201,201, 33,121,121,
+121,228,240,225,195,196,207,207,207, 0,224, 56,170,214, 22,114,180,125,129,223, 22, 68,125,132,243,226,143, 95,147,151,134,245,
+ 37,189,163, 27,144,168, 16, 57, 35, 21,241,212, 0,246,219, 61,127,188,121,243,230, 6,165, 82, 73, 84, 42, 21,185,126,253, 58,
+105,209,162, 69, 9,126,155, 17, 53,208,129, 9,184,124,252,248,241,196, 17,146,147,147,201,181,107,215,200,212,169, 83, 73,231,
+206,157, 73,207,158, 61,201,184,113,227,200,255, 17, 16, 0, 55, 28,112,142, 10, 13, 13, 45, 95,178,100, 9, 57,121,242, 36,217,
+176, 97, 3, 89,178,100, 9,121,255,253,247,201,230,205,155,201,141, 27, 55,200,158, 61,123,156,241, 57, 10,231,147, 0,199,249,
+199,112, 30, 78, 75, 75,179,149, 41,139,197, 66,114,115,115,201,145, 35, 71, 72, 72, 72,200, 13, 84,173,147,229,136,211,171,117,
+235,214, 55,111,221,186, 69, 30, 62,124, 72,140, 70,163,141,227,230,205,155, 4,192,169, 39, 16,206, 22, 97, 97, 97, 69, 39, 79,
+158, 36,183,110,221, 34, 33, 33, 33,217, 79, 50,238,145,145,145, 69, 10,133,130,156, 56,113,130, 4, 6, 6, 22,161,110,139, 45,
+ 87,150, 56,206,191, 50,103, 36,128,141,157, 59,119,182,172, 90,181,138,188,249,230,155, 36, 34, 34,194,130,170, 69,190,195,240,
+ 15, 66,173, 22,173,242,242,242,136, 55,223,124,243,242,179,207, 62,219,181,160,160,128,237,141, 25,104,154, 38, 10,133,130, 49,
+ 26,141,185,238,254,153,209,104, 44,184,126,253,122,192,138, 35,151,139,102, 47,154, 25,148,140, 60,217,179, 47,133, 96,239,178,
+ 76,188,216,127, 74, 89,108,204, 40, 83,100,100,164,205,130,117,235,214, 45,232,245,122,109, 29,148,228,153, 38, 62,221,118,204,
+110,141,125,103,239, 98,209,181,226,239,229, 34,222,174, 93,151,203,246,207,237, 9, 24,183, 79, 64,251, 23, 54, 96,243,162,161,
+ 0, 0,166,232, 6,140,219, 39,130,146, 5,224,116,174, 0, 21, 90,227, 1, 71,164, 77, 2,101,175, 14,108,198,199,222, 19,151,
+176,104,239,195,239, 45,132,212,155,179, 76,109,212, 1,136,158,178,250,124, 2,112,126,172,222,104, 9, 24,208,191, 31,246,253,
+184,159,110,213,170, 21, 54,109,218, 36,156, 56,113, 98,180, 59, 67, 20, 53, 57, 45, 12, 9,160,128, 98, 2,108, 17, 11,120,243,
+181, 6,139,142,109, 52,172,195, 20, 66, 7,195, 20,181,249,130,236,201,203,203, 59,113,225,194,133, 11,111,191,253,118, 11,137,
+ 68, 66, 9, 4, 2, 88, 44, 22, 48, 12, 3,139,197,130,242,242,114,220,186,117, 11,141, 27, 55,182,153,128, 15,120,122, 84, 2,
+170,255,212,198, 55,127,254,124,155, 73,185, 99,199,142,200,201,201, 65, 86, 86, 22, 46, 95,190,108, 51, 41,187,200,199,225,175,
+ 15,241,249,243,231, 33, 22,255,246,149,165,171, 87,175,226,173,183,222, 74,179,250, 84, 85,214,242, 92,101,122,122,122,207,161,
+ 67,135,158, 94,181,106, 85,107,251, 33,231,147, 39, 79, 2,128,254, 73, 88,223,114,115,115,251,196,196,196,172,244,247,247,239,
+ 80, 80, 80,176,224, 73, 70, 60, 43, 43,235,189,118,237,218, 45, 81, 42,149,149,110, 14,109,114,224,240, 87, 67, 22,128,137,169,
+169,169,203, 82, 83, 83, 63, 64,213, 84,250,197, 0,210,185,164,169, 5, 97, 97, 97,119,231,206,157,171,187,120,241,162, 37, 46,
+ 46,174, 68, 46,151, 79,171,135,226,149, 6, 4, 4,108, 13, 10, 10, 74,241,247,247,191,228, 17, 44, 82,200, 27,210, 70,207, 64,
+113,129,143,143,207,245,160,160,160,115,246,223, 65,244,243,243,251, 25, 64,120, 93,156, 45,131,229,211, 95,232,232,159,219, 42,
+ 68,182, 18, 85,159, 20,162, 90, 4,203, 14,239,158,224, 73, 52, 31,251, 17,205, 34, 47,162, 93,217,150,104, 87,182, 37,154,197,
+254, 68,187,162, 13,185,147,208,157,116,139,244,206,111, 26, 44, 15,248,189, 56, 89, 88, 87,113,111, 17, 25, 25,169,184,116,233,
+ 18,201,202,202, 34, 7, 15, 30, 36, 50,153,236,122,125,123, 16,246, 43,195, 87, 75,108,169,244, 72,101,101, 37,209,233,116,228,
+196,137, 19, 36, 56, 56,216, 81, 15,186,174, 94, 73, 16,128,213,109,218,180, 49,173, 88,177,130,236,221,187,151,172, 89,179,134,
+140, 26, 53,138,204,153, 51,135,140, 29, 59,150, 4, 6, 6,234,173,230, 95,111, 23, 56,235,203,199,245, 28,255, 94,156, 17,214,
+ 94,173,189,229,118,126, 13, 75, 86, 93,156, 94,214,251,107,179,252,114,121,196,113,114,156,127, 77,206,127, 46, 2, 3, 3, 63,
+ 93,176, 96,129,250,167,159,126, 50,206,156, 57, 83,213,160, 65,131,211, 79, 40, 35,130, 0,116, 7,208,165,150, 74,182, 94,153,
+219,222,219,219,187, 69,144,236,231,185,207,249,145,203,115,155,144,138, 21, 29,136,230,171, 30,228,110, 66, 87,242,229,203,205,
+ 73,135, 80,207,135,205, 3,101,109,255, 96,206,250, 12, 81,184, 85,176, 93, 28,166,112,133,211, 93, 19,240,211, 48, 41,115, 21,
+ 26,199,201,113,114,156, 28, 39, 39,180,254,190,104,214,172, 89, 70,187,118,237,238,199,197,197,165,253, 69, 50,151,106, 25, 36,
+ 31,219, 34, 72,190,187, 85,144,244, 94,155, 96, 89, 78,139, 32,217,177, 22,129,178,247, 59, 53,128,244, 79,194,217, 66, 36, 18,
+ 29, 9, 13, 13, 85, 0,120,229, 41,164,231,132,144,144,144,135, 86,107, 89,139, 39,192, 25, 13, 96, 43,128, 45, 0, 90, 63,129,
+112,186,202,199, 85,104, 28, 39,199,201,113,114,156,156,208,250,123, 98,218,180,105,124,174,192,112,156, 28, 39,199,201,113,114,
+156, 28, 39,199,201, 9, 45,247, 65,213,145, 88,199,158,114,130, 31,227, 56, 57, 78,142,147,227,228, 56, 57, 78,142,243, 31,199,
+233,140,251, 24, 56,112,202,156,227,228, 56, 57, 78,142,147,227,172,149,147,178,110,180,117, 99,143,255,204,113,167,254,196,113,
+255,167,112,254, 45,193,255,131,254,151,205, 8, 6,117,125, 61,153,195, 31, 9,251, 23,132,112,249,196,225, 79, 10, 15, 62,159,
+255,174, 72, 36,234,107, 54,155, 91, 3,128, 64, 32, 72,215,235,245,167,204,102,243, 23, 0, 84, 92, 18,253, 97,117, 7,207,174,
+177,181, 88, 55,252, 9,235, 18,123, 81,192, 60,102,187,244, 52,226,254, 79,230,252,219, 11,173, 14,114,185,252, 63, 34,145,168,
+ 9, 69, 81, 22,181, 90,125, 77,175,215,175, 3,112,238, 49,255,243,155,224,224,224, 87, 74, 74, 74, 24,246, 35,197, 20, 69,129,
+166,105, 8, 4, 2,109, 69, 69,133, 87,125, 72, 3,219,142,122,159, 79, 81, 51, 45,196,178,174,232,250,190, 79,156,157,231, 80,
+247, 11, 35, 20, 10,199,248,249,249,249, 40, 20, 10, 66,211, 85,171, 71,240,120, 60,118,133,121,115, 69, 69,197,247,174,146,249,
+250,250, 94,244,243,243,243, 97,159,167, 40, 10, 37, 37, 37,229, 69, 69, 69,221, 0, 64, 34,145,156,149,203,229,254,124, 62, 31,
+ 60, 30, 15, 60, 30, 15, 26,141,166,164,164,164,164,231,239, 25,105, 95, 95,223, 20,154,166,155,184,243, 12,195, 48,247,203,202,
+202,158,229,138, 76,117,108,223,190,157, 23, 19,246, 90, 20,159,104,219,211, 52,241,102, 24,170,194, 76, 73,175, 30,206,253, 38,
+195,149,231, 95,124,241, 69,139, 11,183,245,241,242,242,218,176,123,247,110,223, 78,157, 58,209,197,197,197,104,220,184, 49, 74,
+ 75, 75,187, 37, 39, 39,119,126,237,181,215, 94, 83, 42,149,147, 0, 36,115, 57, 82, 55, 68, 34,209,138,224,224,224,215, 85, 42,
+149,134,162, 40, 66, 81, 20, 40,170,170,159, 85,115,111,177, 88,114, 74, 74, 74,186, 56,105,108, 5, 34,145,232,243,144,144,144,
+201, 26,141, 70, 99,229,115,200, 11, 0, 38,147, 41,167,184,184,184,139, 75,117,125, 96,224, 58,169, 84,250,178, 70,163, 81, 83,
+ 20,197,216, 95, 35,132,216, 55,230,247,138,139,139,123, 59, 19, 6, 34,145,104,101,112,112,240,171,214,184,219,194,249,184,113,
+ 15, 14, 14,158,172, 86,171, 93,226,172, 35,238,143,112, 62,141,112,254, 73, 57,255,254, 66,171, 99,199,142, 91, 46, 92,184,208,
+ 92, 32, 16, 0, 0,116, 58, 93,187,213,171, 87, 79,154, 59,119,110, 34,128,121,245,252,191,164,222,189,123,143, 75, 78, 78,166,
+247,238,221, 75,119,237,218, 21, 20, 69,193, 98,177,192, 98,177,160,109,219,182,210,250, 70,196, 91, 46,139,191,124,244,107, 73,
+135,129,111,204, 44, 2, 62,113,118,190, 46,129, 9,224, 67, 0, 77,220, 12,130,194,154, 46,151,127,175, 70,252, 41, 9, 3, 74,
+ 40, 20,254,171,119,239,222,222,199,142, 29,163,178,179,179, 41,169, 84,106, 91,172,212,100, 50,161, 77,155, 54,110, 89, 66,125,
+124,124,188,226,227,227,163,158,127,254,121,236,220,185, 19,147, 38, 77, 66,175, 94,189,238, 20, 21, 21, 1, 0,228,114,185,127,
+ 90, 90, 90,115, 63, 63, 63,104, 52, 26, 84, 84, 84, 96,208,160, 65, 40, 41, 41,121,236, 2,238, 21,142, 38, 22, 1, 22, 7,134,
+ 75, 7, 40, 30,104, 23,169, 31, 98, 77,109,247, 10, 4,130,240, 7, 15, 30, 4,137, 68, 34, 16, 66,192, 48,140,195, 61,251,219,
+104, 52,162, 77,155, 54,198,218,248,158,233, 24,190,152,162, 41,219,135,133,137,217, 82,122,225,106,222,135,143, 27, 39, 63, 63,
+191,203, 98,177, 56,216,169, 90,182,107,200,116, 58, 93, 97,105,105,105, 39, 39,143, 68, 2, 24,206,227,241,154,241,249,252,150,
+ 0, 34,205,102,115, 48, 0, 8,133,194, 66, 30,143,151,101, 50,153,110, 25, 12,134,187, 0,126, 68, 29, 31, 64,142, 9,123, 45,
+138, 50,107, 94, 80,234,153,161,178,166,137, 45, 52,247,226,111,203,196,154,131, 49, 97,175,237,112, 85,108, 57,193,192,254,253,
+251,111,217,191,127,191, 68, 40, 20, 66,171,213,226,198,141, 27,240,246,246,134, 72, 36,194,200,145, 35,121, 61,123,246,244,239,
+215,175,223,206,219,183,111,143,135,123, 62, 31, 45, 0,108, 67,213, 7,165,223, 68,245, 47, 20,212, 7, 97, 0, 70,160,234,155,
+143,141,141, 70, 99, 49,128, 84,107,152,238, 0,136, 8, 12, 12,252,129, 97, 24,125, 73, 73,201,107,112,240,161,234,238,157, 27,
+ 94,162,105, 58,156,181, 9, 48,196,146,115, 62, 53,231,137, 52, 80, 52, 77,175,140,141,141,125,117,199,142, 29,178,212,212, 84,
+ 89,235,214,173,109, 29, 34,182,204,219,163,113,227,198,206,172, 26,124,154,166, 87,188,240,194, 11,227, 55,110,220, 40,123,240,
+224,129, 44, 52, 52,212,198,105, 47,182, 88, 56,251,132,152, 93,217,255,102,240,224,193, 19, 55,108,216, 32,216,183,111,159, 52,
+ 32, 32, 0,254,254,254, 14,191, 25,219,179,103, 79,198,121,212,233,149, 35, 71,142,156,184,117,235, 86,217,133, 11, 23,100,109,
+219,182, 5,143,199,123,236,184,143, 26, 53,106,252,150, 45, 91,100,215,174, 93,147, 53,107,214, 12,172, 81,161, 38, 31, 77,211,
+104,216,176,161, 75,156, 35, 70,140, 24,191,109,219, 54,217,229,203,151,101, 45, 91,182,180,165, 39, 91, 39,213, 39,156,127,114,
+206,127,132, 69, 75,100, 52, 26,113,234,212, 41,208, 52, 13, 63, 63, 63,188,242,202, 43, 56,122,244,104,252,137, 19, 39,246,215,
+195,178,245,141, 85,100, 9, 0, 96,215,203,163,112, 95, 0,188, 85,100,128, 80, 40,196,189,123,247,192,227,241,220, 54, 45,138,
+197,226,201,132,144,127,107,114,127, 17,107,181, 38,232,242, 46,201,164, 82,169,173, 1,208,228, 89,207,231, 95,146, 73,165,210,
+123, 60, 30,239, 99,149, 74,149, 84, 27, 95,179,102,205, 54,221,184,113,163,149,179,143, 61,215,132, 70,163, 65,163, 70,141, 34,
+ 74, 75, 75,155,253, 30,141,184, 51, 78,179,217, 12,137, 68, 2,214, 26,101, 48, 24,160, 82,169,156,113, 82, 66,161,112, 12, 43,
+178, 0, 96,243,230,205, 8, 9, 9, 65, 80, 80,144,237,163,210, 44,167,171,224,241,120,136,137,137,193,194,133, 11,145,152,152,
+136,217,179,103, 87,171,104, 5, 2, 1,252,252,252,240,211, 79, 63,193,203,203, 11, 17, 17, 17, 96, 5,126,173, 2, 42,130,166,
+ 76, 38,134,214,230,193,177,229,163, 1,164, 82, 30,150, 70,245,242,121,115,216,187,145,252, 6,205,101, 88, 60,248,210, 60,245,
+ 67,253,154,186,132,137, 80, 40,196,245,235,215, 31,169, 16, 28,222,207, 35, 48,136, 43,253, 26,247,145, 42, 28,137, 56,138,166,
+252,206, 93,122,104,179,208, 14, 25,208,138,255, 76, 39,254, 87,214,166, 18, 52, 13, 48, 76, 85,211, 73, 81, 32,102, 19, 83,118,
+233, 90,222, 2, 23,210, 51, 52, 43, 43, 43,200, 89, 26,177, 48,155,205, 8, 13, 13,229, 57,185,109,104,116,116,244,174,184,184,
+ 56, 97,179,102,205, 40,161, 80, 8, 62,159, 15, 62,159,207, 10,244, 8, 66, 72, 4,195, 48,253, 10, 11, 11,201,234,213,171,151,
+157, 60,121,114, 52,128,131, 14, 43, 22,162,109,175,212, 51, 67, 79, 95, 65,183, 23, 6,206,197, 79,219,227,187,245,238,200,192,
+ 83,166,205, 0, 80, 47,161,197,138, 13,139,153,161,238,100, 86,248,237,220,185,131,162,105, 90,175, 84, 42,193, 48, 12,122,246,
+236, 9,154,166,113,253,250,117,124,240,193, 7,216,181,107, 23,246,236,217, 35,237,220,185,243,183, 26,141,166, 53,170,190,197,
+230, 84,100, 69, 71, 71, 95,185,112,225,130,196,104, 52,162,123,247,238,231,111,223,190,221, 25,245, 91,193,221, 23,192,103,243,
+230,205,155, 24, 23, 23,199,243,241,241,129, 72, 36,130, 82,169, 68, 70, 70,198,228,239,191,255,158,172, 93,187,246, 75, 0,158,
+ 89, 89, 89, 61, 46, 94,188,136,254,253,251,191, 13,224,221, 71, 21, 1, 47,252,236,197,204, 32,246,120, 68, 76, 59, 97,143, 46,
+116, 97,149, 21,167,230,221, 4,140,133,201,185,248,107,174, 43, 66,108,217,168, 81,163, 38,236,216,177,195, 3, 0,254,251,223,
+255, 98,204,152, 49,240,243,243,131, 76, 38,131, 80, 40,132, 64, 32,168,182,119,210,216,242, 0, 44, 27, 59,118,236, 11, 27, 55,
+110,244, 4,128,141, 27, 55, 98,212,168, 81,240,247,247,135,167,167, 39, 68, 34,145,237,123,175,110,118, 48,190,233,213,173,219,
+148, 13, 27, 54, 0, 0, 62,120,231, 29, 60,255,204, 51,240,144, 73, 33,147,138,192,166,133,136, 39,192,144,183,102, 58,213,151,
+ 0,150,143, 25, 51,230,165,173, 91,183,122, 2, 64,106,106, 42,138,138,138, 16, 28, 28, 12,169, 84, 10,145, 72,100,139, 51, 69,
+ 81,144, 74,165, 46,197,125,204,152, 49, 47,108,217,178,197, 19, 0,146,146,146, 16, 19, 19, 99,139,187, 88, 44,134, 80, 40,172,
+182,213, 20,157,142, 56, 71,143, 30,253,194,182,109,219, 60, 1,224,251,239,191,199,192,129, 3,225,235,235,107, 75, 79,150,203,
+157, 60,250,147,115,254, 51,132,214,149, 43, 87,254, 37,151,203, 19, 0, 4,138, 68, 34,159,241,227,199, 55,156, 50,101, 10,198,
+142, 29,139, 19, 39, 78, 76,117, 83,104, 81,193,193,193,175, 36, 39, 39,219, 90,104, 3,121, 68, 48,185,221,128, 91,241,239, 75,
+ 83,167,134, 36,102,168,112,254,226, 45, 72, 64, 83, 23,151, 47, 15,212,221,189, 11,139,193,128, 69,247,148, 85,231,205,132, 58,
+245,222, 91, 33, 29, 86,124,249,111, 0, 73,117, 52,182, 98,189, 94,143, 59,119,238,184, 21,136,236,236,108, 71, 31,127,174,119,
+ 35, 30, 17, 17, 81,215, 11,232,148,243,240,225,195,152, 53,107, 22,110,221,186, 5,246, 83, 37, 46,112, 82,126,126,126, 62,172,
+200, 98, 69,144, 84, 42,133, 64, 32,160,248,124, 62,197, 14,237, 89, 95, 46,151,132, 49, 77,211,216,180,105, 19,150, 46, 93,138,
+ 57,115,230, 96,221,186,117,104,223,190,253,111,133,144,207, 71,101,101, 37,124,125,125,225,235,235, 91, 77, 32,214,134,202, 7,
+ 12, 1, 28,139, 44,105, 35,132, 72,165,252,131, 99, 63,137,234,208,246, 57,127,168, 74,140,216, 52,247, 14,138, 51,245, 59,156,
+165, 39, 33, 4,237,219,183, 7, 69, 81, 54,161,193,110, 2,129, 0,124, 62, 31, 60, 62, 15, 58,170, 18, 77,122, 9,241,206,206,
+ 86,210, 6,205,101, 82, 71, 34,174,102, 54,127,254,197, 42, 25, 24, 82,229, 4, 66, 24,128, 1, 8, 8, 24,194,160, 48, 55, 3,
+255, 89,248,169,203,173,143, 64, 32,192,221,187,119,109,225,102, 45,195,172, 48,178,183, 26, 68, 70, 70, 58, 45, 75, 66,161,240,
+163, 61,123,246,136, 54,109,218,132,173, 91,183,130,162, 40,136,197, 98,200,229,114,248,248,248,192,223,223,223,182,133,135,135,
+ 83,223,126,251,173,176,125,251,246, 31, 85, 86, 86, 30,116,156,231,196, 91,214, 52,177,197, 11, 3,231, 2, 0, 94,152, 75, 80,
+118,231,147, 14,116,249, 2,239,250, 91, 94,170,196,198,226,197,139,241,241, 51,207, 64, 36, 18,145,138,138,114, 9,219,185,224,
+209, 60,164,165,221,192,138, 21, 43, 48, 97,194, 4,220,187,151, 65, 34, 34, 34,245,179,102,205,242, 72, 76, 76,124,199,104, 52,
+ 46,114, 38,178,218,181,107,119, 38, 37, 37, 69,162,209,104,192, 48, 12, 14, 30, 60, 40, 27, 56,112,224,233,204,204,204,222,238,
+138,173,200,200,200,125, 41, 41, 41, 61, 3, 3, 3, 81, 81, 81,129,202,202, 74,152, 76, 38,240,120, 60, 68, 68, 68, 96,217,178,
+101,212,200,145, 35,103, 76,158, 60, 89, 39,149, 74, 89,203, 70,164, 35,174,154,239,247,234, 53, 95,249, 16, 82, 85,126, 8, 67,
+170,237, 75,139,178,240,206,123,174,125,189,170, 97,195,134,111,238,220,185,211,195,222,178,100, 47, 2,236, 69, 22,187, 57, 17,
+ 6,116,163, 70,141,166,252,240,195, 15, 54,206,128,128,128,106,239, 15, 77,211, 56,125,250, 52, 18, 62,154, 7,223,192, 80,172,
+ 90,243, 95,151,134, 11, 99, 98, 98, 94, 78, 74,250,173,234,110,215,180, 41,134,245,124, 6, 65, 1, 94, 8,240,245,172, 74, 39,
+134,194,213, 91,153, 78,219, 35, 0,116,195,134, 13, 95,219,190,125,187,135,125,135,144,141, 43,219,121,102,173,248, 6,131, 1,
+ 93,186,116,113, 41,238,246,156,172,181,141, 21,109,108,122,178,255,195,190,175, 78,194, 57,133, 21,194, 86,193, 89,141, 67, 32,
+ 16, 96,251, 79, 27,106,181,102,215,151,211,221,124,175,201,153,149,149,133, 37, 75,150,128,237,180,217,187, 10,133,133,133, 97,
+213,170, 85, 78,235,165, 26,239, 64, 87, 0,129,118,167, 12, 0, 68,118,123, 5, 69, 81,191, 56,184,143, 61, 47,176,142, 88, 5,
+ 90,219, 14, 37, 0, 31, 7,124,181,241, 20, 91,219,188,192, 26,247, 87,251,159, 90,133,214,254,253,251,217,183,184, 95,108,108,
+236, 41,235,239,114,177, 88,156, 45,147,201, 66, 0, 40, 15, 30, 60,136,255,251,191,255,131,213,180, 58,194,219,219,251,134, 3,
+171,206, 21,189, 94, 63, 23, 64,161,245, 20,107,174,167, 75, 75, 75,153,163, 71,143,210, 27, 71, 15,134,129, 0, 29,255,157,128,
+152,216, 88, 28, 14, 19,129, 7,160,219,205, 98,200,100, 50,126,101,101,165,201,222,111,203,129,239,214,177, 26, 5,138, 39,225,
+243,209,253,204, 1,204, 58,115, 0,221,228, 34,148,236,216, 6,229,217,100,208, 52,133, 62,242, 0,204,158,112, 20,207,122,137,
+ 33,210,171, 65,211,180,163,146,109,227,188,115,231,206,139, 94, 94, 94, 9, 53, 18,216, 21,220, 71,213,119,156, 80, 75, 56, 93,
+106,196,217,237,242,101,135, 35,144,181,114, 90,135,224, 32,151,203,113,252,248,113,219, 61,207, 61,247, 28,116, 58, 29,252,252,
+252, 92,226, 84, 40, 20, 36, 47, 47,143,218,184,113, 35, 4, 2, 1,252,253,253, 33,147,201,168, 13, 27, 54,204, 19, 10,133,225,
+ 58,157,142, 49, 24, 12, 16,137, 68,171,216,252,225,243,249,234,202,202, 74,255,218, 56,121, 60, 30,226,226,226,240,254,251,239,
+ 99,221,186,117,152, 58,117,234, 35, 22, 47,157, 78,135,128,128, 0,155,216,114,240, 2,186, 52,244, 35, 11, 67, 91,159, 96,209,
+145, 41,171, 90, 5,135,181,148, 35,101, 75, 1, 14,172,204,202, 81, 23, 90,190, 48,148, 97,167, 51, 78, 66, 8, 50, 50, 50,106,
+ 21,195, 37,101,197,120,255,227, 55,209,241, 53, 57,106, 17,113,191,113, 50, 4, 55, 46, 31, 70,218,181, 99, 96, 44, 12, 44, 12,
+ 1, 33, 22, 48,102, 32,245,232,249,230,249,247,243,194, 8, 72,149,235, 45, 0,113,133,202,220,215, 95,212, 18,192,222, 83, 37,
+134, 21,206,226,206,231,243,161,211,233,176,103,207, 30,220,188,121, 19, 7, 15, 30,132, 86,171, 69, 64, 64, 0,124,124,124,240,
+204, 51,207, 96,242,228,201,136,140,140,116,154,239,132,144,164,236,236,236,142,189,122,245,162,202,203,203, 81, 94, 94, 14,173,
+ 86, 11,139,197, 2,179,217, 12, 62,159, 15,137, 68, 2,169, 84,138,224,224, 96,232,116, 58,162,215,235,147,106,227,100, 24,170,
+ 66,115, 47,254,246, 79,219,227,187,189, 48,151, 96,199, 82, 10, 81,141,196,154,227,151, 60,167,236, 61, 51,123, 16, 0,194, 16,
+155,105,129,152, 44, 76,241,251,243, 62,155, 81, 87, 56,217, 60, 73, 73, 73,193,140, 25, 51, 96,177, 88, 40, 1,159, 15, 66, 8,
+ 40,154,198,237,219,183,177,122,213,106,140, 27, 55, 14,205,162,162, 96, 48, 26,161, 82,169,208,191,127,127,193,170, 85,171,250,
+217, 9,173, 99,117,136, 44,127,173, 86, 11,165,178,202,248, 37, 18,137,176, 99,199,142,128,225,195,135, 39,231,229,229,213,245,
+ 61,210, 71, 56, 61, 61, 61, 35,120, 60, 30,174, 95,191,142,181,107,215,226,248,241,227, 40, 44, 44, 44, 11, 13, 13,245,238,215,
+175, 31,253,206, 59,239,160, 99,199,142,248,238,187,239, 36,206, 56, 9, 33,200,186,115, 26, 89,119,207,128, 97,170,132,101,213,
+230,248,119, 29, 61,160,106,225, 84,171,213,186, 43, 87,174,120,172, 95,191, 30, 65, 65, 65,104,220,184, 49,100, 50, 25, 36, 18,
+ 73,181, 70,214,190,225,117,246,110,106,181, 90, 93, 86, 86,150,199,150, 45, 91,224,239,239,143,200,200, 72,200,100, 50,136, 68,
+ 34,240,249,124, 80, 20,133,141, 27, 55, 98,243,194, 9,200,186,117, 13,163,134, 13,114, 26, 78,153, 76,246,114, 82, 82, 82, 53,
+ 19, 72,176,175, 47,248, 2, 26, 60, 1, 5,223,231, 70, 3, 0,202, 78,236,174,178, 85, 57,143, 59,165, 84, 42,117, 23, 46, 92,
+240,184,116,233, 18, 24,134, 65,100,100, 36, 52, 26, 13,188,188,188,108,241, 63,122,244, 40, 70,142, 28,137, 77,155, 54,161, 71,
+143, 30, 78,227,174, 82,169,116,215,174, 93,243,248,225,135, 31,224,231,231,135,134, 13, 27,218,226,206,110, 2,129, 0, 60, 30,
+ 15, 77,154, 52, 65, 69, 69, 5, 60, 60, 60,156,230, 81,106,106,170,199, 15, 63,252, 0, 95, 95, 95,132,135,135,219, 44,110,172,
+ 56, 90,250,213,194,106, 4, 18,170,193, 99,115,186,155,239, 53, 57, 71,141, 26,133,168,168, 40,120,121,121, 65, 46,151,219,184,
+235,226,172, 69,139,216,244, 54, 69, 81,251,237,222,137, 88,138,162,246,219,239,107,187,207,250,179,207,188,121,243,186, 36, 38,
+ 38, 46,233,209,163,199,150,148,148,148,205,181,241,213,198, 51,111,222,188,232,196,196,196, 37,246,247, 59,248,159,218, 45, 90,
+177,177,177,148, 53,146, 20,128,198,157, 59,119,254,229,196,137, 19,126,158,158,158,182,155, 31, 62,124,136,242,242,114,120,122,
+122,122,125,254,249,231, 94,253,250,245, 67,112,112,176,173, 7,112,231,206,157, 54, 45, 90,180,168, 4, 80,211,110,203,208, 52,
+141,103,159,125, 22, 55,172,163, 29, 49,177,177, 8, 15, 15,183, 57,121, 72, 36, 18,204,152, 49,131,154, 53,107, 22,159,181,102,
+ 16, 66,160,213,106,209,160, 65, 3,105, 93, 86, 8, 0,136,214, 22, 99,119,191, 62,160, 41, 64,115,249, 34,132, 34, 10, 52,143,
+ 66, 39, 82,130, 67,253,251,128, 2, 96,248,245, 28, 92,176,194, 92, 6, 48,232,105,152, 15,157, 53,226, 14,226, 69,213,151,147,
+181,104,164,164,164,192, 98,177,184,202, 73,104,154,134, 92, 46, 71, 72, 72, 8,164, 82, 41,100, 50, 25,181,101,203,150, 15, 27,
+ 55,110,220, 96,214,172, 89,116,101,101, 37,253,236,179,207, 98,204,152, 49,124,118,136, 51, 58, 58,218,105, 92, 78,157, 58,133,
+181,107,215, 98,234,212,169, 14, 45, 90, 20, 69, 33, 48, 48, 16, 94, 94, 94,245, 78, 95,113, 35, 68, 6,132, 75, 78, 77,255,174,
+173,143, 87,144, 16, 63,173,121,136,195,171,179,119,235,138,241, 57,204,184, 5,160,204, 85,139,150, 35, 1, 12, 30, 3,139, 95,
+ 9, 94, 93,221, 28, 97, 45,189,145,178,165, 0, 7,191,120,104, 81, 41, 76,179, 29,136, 56, 48, 0,140,102, 19, 52, 42,173,109,
+ 72,215, 98,177,224,218,201, 95,155,223,255,245, 78,244,254, 45,155, 4, 0,160, 59,185,187,218,160,231,152,175,182,181,232,235,
+ 43,184,112,170,204,116,161,174, 50,207,231,243,241,202, 43,175, 32, 49, 49, 17, 47,191,252, 50, 14, 30, 60,136, 5, 11, 22,224,
+245,215, 95,127,196,170,229,172,231,104, 50,153,190,158, 52,105,210,212, 29, 59,118,180,156, 59,119, 46,205, 90,180,100, 50, 25,
+ 40,138,130, 78,167,131, 94,175,135, 86,171,197,173, 91,183,152, 55,222,120,227,182,193, 96,248,186,214,225, 74, 74,122, 85, 38,
+214, 28,108, 26, 78, 71,169, 51, 63,245,236,245, 76,164,150,146,118,174, 24,221, 98, 32, 25,250, 74,164, 47, 8, 1, 97, 0,134,
+ 0,122,189, 26, 51,102,188,205,115,165,172,103,221, 57,141, 43,151, 47, 66, 42, 21, 67,165, 84,193,194, 88, 64, 24, 2,177, 80,
+128, 15, 63,152,143,113,227,198, 35,170,105, 83, 88, 44, 22, 8, 5, 66,124,255,253,247,232,210,165, 11, 12, 6, 67,107, 23, 44,
+ 89,254, 58,157, 14, 87,174, 92, 65,255,254,253,145,157,157,141,244,244,116, 52,111,222, 28, 27, 54,108, 8, 28, 63,126,124,114,
+ 81, 81,145,203, 31,127,191,118,237,218,188, 14, 29, 58,172, 84,169, 84,165, 42,149,106, 37,128,205, 0,202, 51, 50, 50, 90,103,
+100,100,172, 62,124,248,112,239,255,252,231, 63,188, 26, 62, 58,188, 90, 34, 15,147,201, 12,173, 86, 95,167,192, 98,143, 9, 97,
+ 92,122,103, 40,138, 34, 45, 91,182,196,240,225,195, 33, 16, 8, 32,147,201,224,225,225, 81,109,216,172,166,224,170, 43,139, 0,
+ 48, 20, 69, 33, 52, 52, 20, 67,135, 14,133, 80, 40,172,198,201,150,195,161, 67,135, 98,230,162,127,227,235,153, 3,176,118, 82,
+115, 12, 92, 92,232,204, 53, 67,245,243,207, 63, 75,223,159, 58, 21, 29,154, 53, 67,128,151, 23, 26, 5, 7, 66, 42, 22, 65,104,
+ 31, 38,202, 37, 35, 59, 1,192,240,120, 60,180,109,219, 22,133,133,133,200,204,204, 68,102,102, 38,104,154, 70,175, 94,189,108,
+ 86,152,187,119,239, 98,209,162, 69,208,235,245, 46,199,189, 89,179,102, 24, 48, 96, 0, 68, 34, 17,100, 50, 89,181, 33, 67, 54,
+ 77,149, 74, 37,162,162,162,176,119,239, 94,180,104,209,194, 41,103,171, 86,173,208,183,111,223,106,233, 41,149, 74,109,162, 8,
+ 0,178, 47,168,108,255, 17, 22, 22,230, 22,231,145,139, 15,177,254,232,207,208, 27, 24, 84,106, 76,213,189, 48, 2,188,112,230,
+135,185, 46,197,157,229,252,223,255,254,135,242,242,114, 91,221,201,118,202, 89, 35, 74,195,134, 13,241,223,255, 58,182,100,214,
+208, 34,142,234,129, 88, 23,219, 91,246, 62,182,112,137, 19, 19, 19,151,212,124,222, 25,159,253,245, 26,207, 27,106,136,179, 66,
+183,134, 14,197, 98,241,252,159,127,254,217,175,162,162, 2,119,239,222, 5, 77,211,182, 49,117, 62,159, 15,163,209,136,123,157,
+170, 47, 17, 0, 0, 32, 0, 73, 68, 65, 84,247,238,193,207,207, 15, 69, 69, 69, 16,139,197,224,241,120, 48, 24, 12, 0,208,169,
+182, 6,156, 16,130,153,138, 42, 23,161,159, 66,133,200, 2, 48, 76, 81,245, 98,176, 14,241, 59,119,238,132,135,135, 7, 60, 61,
+ 61,109,123,103,195, 72,215, 50, 51, 80, 40,160, 64,159, 59, 13,138, 6,104, 10,160,120, 0, 77, 19,208, 20, 5,250, 92, 50, 40,
+ 10,144,251,251,186,219,118, 59,115,140,175,211, 1,222,157, 70,188,230,239,147, 39, 79,194, 85,206,168,168, 40,120,120,120,216,
+182,195,135, 15, 87,179,104, 89, 44, 22,248,251,251,187,194, 73,172,254, 56, 8, 10, 10,130, 64, 32,160, 54,108,216, 48,175, 73,
+147, 38, 13,222,123,239, 61,154,199,227,225,242,229,203, 72, 75, 75, 67,100,100,164,203, 62, 91,229,229,229,249,243,230,205,179,
+204,155, 87, 53,135, 34, 58, 58, 26,229,229,229, 69,182, 97,192,202,202,146,193,131, 7, 87,243,219, 40, 46, 46, 46,169,197,179,
+ 66, 32, 15, 71, 44, 33,168,212,100,227,103, 54,204,222, 17,240, 22,120, 10,142,188,254,101, 43, 31,175, 32, 33, 14,173,122,128,
+ 35, 95,230,236,212, 21,224, 67,171, 79, 16,227,106,166, 59, 26, 54,206, 45,200,198, 27, 31,142,198,164, 53,209, 96, 69, 28,239,
+ 78,123,144,146,242, 82, 67, 89,105,146, 35, 17,199, 48, 12,204, 70, 51, 52, 58, 29, 84, 74,141,205, 58, 84,148, 87,232, 51,119,
+214,187,130,229, 51, 94, 5, 0,204, 90,177, 6,202,117,191, 85,100,187,103,141, 11, 26,253,217,214,120, 0, 35,235, 10,167, 74,
+165,130, 78,167, 67,211,166, 77,145,146,146, 2,165, 82,137, 33, 67,134,128,162, 40,219, 12, 81, 55, 96,200,205,205,237, 25, 27,
+ 27,251,203, 23, 95,124,209,180,117,235,214,148, 90,173,134, 70,163,129,253,254,218,181,107,100,243,230,205,247, 53, 26,205,179,
+ 86,211,185, 67, 28,206,253, 38, 35, 38,236,181, 29,199, 47,243, 98,131,162,110,123,229,150, 53, 53,151,228,138,213,149,218, 91,
+ 58, 11, 73, 3,177, 0, 22, 48, 32,102, 6, 22,235,176,151, 11, 53, 39, 76, 38, 51, 44, 22, 6, 15, 31, 62, 68,122, 90, 26,218,
+181,109, 9,157,222, 12, 33, 95,128,153, 55,110,160,213,120,192, 32, 20,128, 97, 24, 80, 20,141,169, 83,167, 26,173, 67, 6,181,
+ 66, 42,149,174, 62,115,230,140,191, 78,167, 67,106,106, 42, 38, 78,156,104, 40, 46, 46, 22, 1,192,203, 47,191,108,216,184,113,
+163, 40, 42, 42, 10, 27, 54,108, 8, 28, 51,102,204,118,181, 90,221,214,197, 52,221,148,159,159,191,169,230, 73,127,127,255, 85,
+ 15, 31, 62,236,103,239,243, 99, 54,155,109,193,113, 24,117, 6, 48,153, 76,208,106,245,168,168, 80,194, 96, 52, 89,235, 76, 6,
+ 22,139,217,186,103, 96,182,214,163, 34, 33,223,179, 83,219, 16, 21, 33, 4, 52, 69,149,167, 94, 47,104, 88,151,104,119, 52,196,
+229,162, 53,171, 38, 44,236, 44, 51,127,127,127, 8, 4, 2,108,218,180, 9, 87,207, 30,134,136, 71, 96, 49,155, 96, 54, 25, 97,
+ 49, 25, 32,224,241,112,252,114, 38, 6,181,242,116, 73, 16, 6, 4, 4, 96, 88,143, 30,136,237,209,163,106,122, 27,159, 15, 15,
+177, 24, 50,161,164,202,146, 5,128, 88,104, 87, 23, 17, 96,216,112, 6, 7, 7,227,210,165, 75,152, 57,115, 38,150, 46, 93, 10,
+169, 84,106,155,253,124,243,230, 77,108,219,182, 13,131, 6, 13,114, 59,238,172, 5, 47, 62, 62, 30,121,121,121, 88,177, 98, 5,
+ 58,119,238, 12,129, 64,128,242,242,114, 60,251,236,179, 40, 44, 44,116,137,211,126,120, 79, 36, 18, 85,179, 62,177, 2,208,221,
+ 60,178,231,124,117, 84, 3,236, 59,187, 25, 20, 40,156,255,225,221,106,162,240,191, 91, 79,187,205,185, 96,193,130,106,225,116,
+197,154,229,178, 31, 82,117,171,147,211,251, 40,138, 74,101,141,173,241,241,241,243, 41,138,218, 31, 31, 31, 63, 63, 33, 33,225,
+134, 43,124,142,174, 83, 20,117,192, 42,194,134,217,157, 75,117, 75,104,201,100,178,110, 30, 30, 30,184,123,247, 46,134, 12, 25,
+ 98, 40, 41, 41,185, 45, 16, 8,154, 23, 23, 23,139,139,138,138,160,209,104, 84, 31,127,252,113, 38, 0,105,247,238,221,163,142,
+ 31, 63,142,236,236,108,108,220,184, 17, 0,118,215,230,167,195, 48,140,173, 80,212,236,182,241,120, 60,156, 59,119, 14,231,206,
+ 85,119,253, 90,191,126,189,211, 6, 99,204,158, 31,113,249,242,101,216, 47, 15,192,254,182, 63, 39,145, 72,128,186,103,120, 84,
+131, 51,199,120,103, 14,240,174, 54,226,181, 85,128,174, 22,196,220,220,220, 90,159, 63,119,238, 92, 53,139,150, 51, 78, 30,143,
+ 7,139,197, 2,169, 84, 74, 9,133, 66, 74, 40, 20,134,179, 34,139,199,227,217, 94, 24,177, 88, 12,177, 88, 92,173,151, 90, 27,
+242,242,242,250,231,229,229,213,122, 93,161, 80,244, 84, 40, 20, 46,197, 85, 22,134,143,158, 29,219, 96, 30, 0,156,221,154,255,
+157,230, 33, 94, 7, 0,194,167,118,189,250,121,139,168,192, 72, 41,206,109, 47,192,145, 47,115,246,232, 10,176,208, 58,164,203,
+184,154,230, 7,142,238,197,155, 83,167, 65,204,147,217,249,100,209, 40,231,101, 99,250,198, 22, 96, 69, 92,234, 70, 3,246,111,
+253, 8, 41, 71,159, 55,213,101, 41, 51,154, 76,208,106, 12, 80,170,180,248, 40,225,187,170,147, 31,225, 2,128, 11, 61,223,156,
+137,184,152, 65, 3,220, 29,166,102,211, 59, 40, 40, 8,167, 78,157, 2, 69, 81,216,190,125, 59,188,189,189, 17, 19, 19, 3, 47,
+ 47, 47,196,199,199,227,197, 23, 95,116,183, 50,171, 40, 41, 41,233,249,206, 59,239,252,242,233,167,159, 54,106,216,176, 33, 12,
+ 6, 3,140, 70, 35, 12, 6, 3, 50, 50, 50,176,121,243,230,108,141, 70,211, 19, 64,133, 51,178,195,185,223,100,236, 74,158,149,
+ 55,112,236, 24,237,205,194,159, 80, 80, 80, 2,179, 57, 23,140,197, 12,163,217, 82,101,225, 51,155, 97, 54, 91, 32, 20,242,188,
+ 62,253,228,221,163, 12, 8,104,154, 50, 0,120,190, 54,177, 17,209, 48, 8, 94,158, 94,104,221,170, 9, 78, 28, 90, 15,131,209,
+ 12,163, 65, 13,227,244, 24,164,103, 29,135,229,254, 49, 88, 24, 11,206,164,164,233, 77, 22, 34,144, 74,229, 84,195, 6,158,188,
+ 59,247,117, 14,195,233,227,227, 19,173, 80, 40,112,231,206, 29, 76,158, 60,185,160,164,164, 36, 29,192,115, 0, 80, 82, 82,114,
+102,226,196,137,173,147,146,146, 66, 26, 55,110, 12, 15, 15, 15, 47,181, 90,237, 44,234, 30, 0,226, 0, 12, 70,117, 7,252, 82,
+ 0, 31,211, 52, 45, 78, 77, 77,125,100,166, 93,114,114, 50, 0, 92,112,220, 3,178, 90,180,116, 58, 40, 74,202,240,250,155, 31,
+254,214, 51, 2,169, 38, 46, 8, 8,166,189, 5, 9, 0, 20, 23,102,224,213,215,103,138,235, 84, 28, 12,227,176, 33,116,195, 71,
+167, 90, 71,141, 45,163, 30, 30, 30, 85,195,111,123, 55,227,192,103,111, 2, 22, 35,136, 73, 11, 24, 53,128, 81, 5,198,160, 1,
+ 37,148, 2, 38,173, 75, 66,203,195,195, 3, 30, 82, 41,130,124,124, 64, 8, 1,159,199,131, 64,192, 7, 99, 2, 40, 11,101, 43,
+ 35,140,197,165,178,110,235, 84, 74,165, 82,100,101,101, 33, 46, 46, 14, 70,163, 17,163, 70,141,130,193, 96,128, 78,167,131, 86,
+171, 69,147, 38, 77,160,209,104, 92,226, 99,103, 43,122,120,120, 64, 40, 20,226,221,119,223, 69,151, 46, 93,176,104,209, 34,204,
+153, 51, 7, 77,154, 52,193,180,105,211,176,121,243,102, 68, 71, 71, 59,227, 37,246,121,196,166, 39, 43,182,236,135,248, 0,184,
+157, 71, 53, 57, 41,138,174, 38,216,216,237,237, 73,207,185,205,153,152,152, 8,133, 66,241,136, 37,139,253, 29, 22, 22,134,175,
+190,250,170,190, 35, 67,172,245, 40,216,193,181, 97, 53, 45, 81,132,144,174, 86,223, 41,125, 66, 66,194,141,132,132,132, 88,138,
+162,246, 39, 36, 36,196,214,102,209,114,196,227,224,186,194,213, 48,243,107,140,141,246,179,191,200, 38,180,159,159, 31,175, 81,
+163, 70,180,151,151, 23,202,203,203, 17, 24, 24, 72, 20, 10,197, 88,153, 76,182,112,203,150, 45, 81, 42,149, 10, 55,111,222,196,
+170, 85,171, 46, 0, 88, 89,151,208, 58, 24,104, 53, 29, 91, 45, 89,246,199,195,135, 15, 71,227,198,141,171, 89,179,164, 82,105,
+157,133,135,189,102,107, 20,121, 60,180,104,209, 66,122,255,254,125,173, 80, 40, 68,120,120,184,180,160,160, 64, 43, 20, 10,221,
+158,233,226,204, 49,222,153, 3,188, 35,225,211,181,107,215,106, 22, 44,251,189,253,239,125,251,246, 57, 29, 58,100, 57, 91,183,
+110,109, 75, 47, 79, 79, 79,246, 89, 0,192,144, 33, 67,192, 48, 12, 2, 2, 2, 92,226,100, 69,173,213, 1, 30, 58,157,142, 81,
+ 42,149,116,106,106, 42, 68, 34, 17, 60, 61, 61,109,190, 58, 18,137,196,102,205,252,189, 32, 16,209, 83,198,124, 80,101, 96,244,
+111, 40,126,117,239,178, 76, 80,192,229,161,111, 71,246,111,218,213, 27,149, 69, 70,236,255, 60,235,129,174, 4, 9, 0,110,185,
+ 99,201,210,209,149, 94,235,206,188,131, 14, 47,139,208, 64,215, 11,159, 46,168, 42,202, 19,103,140,198,176,215,249, 96, 69, 28,
+125,167, 29,182,127, 55, 31,205,154, 53, 3, 33,132,170,189, 66, 96, 96, 48,153,160,213,106,161, 82, 85,173,155,153,113,189,250,
+ 8,163, 81, 95, 89,255,180,176, 86,176,165,165,165, 56,124,248, 48,126,250,233, 39,116,233,210,197,161,168,118, 67,112, 41, 74,
+ 75, 75,123,205,158, 61,251,252,226,197,139, 67,253,252,252, 96, 52, 26,241,240,225, 67,124,251,237,183,121, 26,141,166,151, 59,
+ 21, 12, 8, 96, 50,153,161,211,232, 81, 81,169,196,194, 79,190,175,181,232, 1, 64,105,209, 45, 12, 31,241,162,168, 46,177,209,
+ 48,204, 7,201,201,201, 24, 52,176, 23,134,141,156, 92,171,216,120,115, 70, 53,177, 33,172,163, 35,240, 94,175, 94,189, 62, 81,
+ 42,149,229, 26,141,230, 69, 0,203,237,251, 83, 37, 37, 37,189, 71,140, 24,241,133,159,159, 95,231,162,162,162,249, 46,196, 58,
+ 62, 43, 43,107,126, 68, 68, 68,181,147,122,189, 30, 17, 17, 17, 45,138,138,138, 38,244,233,211,231,223, 0,252,236, 46,123, 2,
+ 56, 2,224,171,218,202, 18, 59,116,168, 82,105,225,229,211, 0,185,153,167,156, 6, 68,200,211,129, 48, 76,157,117, 8,219, 1,
+174,109,115, 50, 51,238,145,160,178,247,178, 13,246,243,255,154,132,231,227, 18, 33, 19, 0, 75, 94,237,137, 38, 62, 0,164,126,
+ 16,246,153, 11,202,199,154, 70,113, 63,186, 68, 62,103,237, 90, 92,182,214,199,225,129,129,152, 61,118, 44,136, 9, 72, 73, 75,
+195,214,159,127,198,216,254,253, 33,147, 72, 92,238,176, 48, 12, 3,161, 80,136,140,140, 12,164,164,164,160, 85,171, 86,184,123,
+247,110,181,101, 40, 8, 33,174,198,223, 22,119,177, 88, 12,129, 64,128,130,130, 2,196,198,198, 66, 40,172, 26,198, 62,117,234,
+ 20,102,207,158,141, 41, 83,166,160, 95,191,126, 72, 79, 79,119,137,147, 16,242,200,108,197,154,195,185,238,230, 81, 77,206,154,
+237,126,125,242,157,229, 92,188,120,177,195, 9, 21,174,112, 58,210, 34, 14,242, 46,213, 94, 12,177,150, 39,123, 97, 84,243, 24,
+128, 47,123, 46, 62, 62,126,190,171,207,217, 31,179, 22, 49,119,134, 48,109, 66, 43, 54, 54,182, 90,204, 75, 75, 75,207,159, 63,
+127,190,141, 92, 46,199,173, 91,183, 68, 94, 94, 94,109,216, 10,157,166,105,108,223,190,221,115,232,208,161, 71,151, 47, 95, 30,
+206, 48, 12, 10, 11, 11,241,254,251,239,171,204,102,243, 56, 0,230,218, 26,112,103,150,169, 31,127,124,244,101,219,187,119,175,
+ 75, 67, 32,172,144,226,243,249,240,245,245,213,106,181, 90,200,100, 50,248,250,250,106, 53, 26, 13,228,114, 57, 59, 86, 76,227,
+183,153, 10,206,172, 79,206, 28,227,107, 58,192, 59, 69, 90, 90,154, 75,247, 89,135, 90, 93, 42,229, 89, 89, 89,181, 86, 36,167,
+ 78,157, 2, 99,173,104, 93,229,180,246,242, 8, 43,252,100, 50, 25,252,252,252, 32, 22,139, 33,149, 74,171,137, 44,177, 88,236,
+244,197,113,182, 32,169, 68, 34,185, 40,151,203,125,216,235, 2,129, 0, 74,165,178,188,180,180,180,219, 35, 22, 34, 13,115, 48,
+121, 99,222,148, 62, 19, 67,209,103, 98, 40, 0,188,122,105, 95,209, 43,189, 95,174,114,254,220,185,248, 30, 81,230, 89, 18, 97,
+ 66,154, 59, 34, 11, 0,136, 72, 47, 27,243, 65,135, 42,235,194,198,243,152,187,248, 29,180,107,213, 1, 62,207,230,162,105,215,
+ 80, 84, 22, 25,241,235, 22, 11, 86,254,231,125,180,110,221,218,169,192,100, 64, 96, 54,154,161,213,234,160, 82,106,241,164, 97,
+ 48, 24, 32, 22,139,177,121,243,102,244,236,217, 19,221,187,119,127, 68,100,213,211, 60,159, 83, 90, 90,218,111,229,202,149, 23,
+ 62,255,252,115, 95,149, 74,133,239,190,251,174, 66,165, 82,245, 3,144,227, 86,154, 50, 4, 38,163, 17, 26,157, 30,106, 85, 85,
+ 26,220,187,177,179,158, 61,217, 42,177,209,179, 91,115, 76,159,254, 38, 50,239,103, 64, 85,126,247,177,197, 6,128,205, 5, 5,
+ 5,155,235,184,126,207,108, 54,199,178,235,190,185,128,103, 34, 34, 34, 80, 80, 80, 80,237,228,131, 7, 15, 96,177, 88,244,168,
+ 90, 39,235, 53,123, 67, 50,106,153, 65,107,215,131,174,178,142,106,245, 80,169,170,172, 32, 58,117,241, 19, 41, 71,172,216,168,
+205, 39,171, 62,101,136,162, 40,155,211,247,140, 25, 51,112,237,234, 85, 60, 23, 90,137, 38, 33,158, 32,149,185, 16, 14,248, 15,
+126, 85, 72,177,252,139,131,110,115,111,179,115,129, 88,190,109,155,195,107,247, 70,142,116, 43,238,183,111,223,134, 84, 42,133,
+197, 98,121,164,189,113, 55,254,246, 2,230,139, 47,190,192,236,217,179,241,253,247,223,227,218,181,107,232,208,161, 3, 6, 14,
+ 28,136,162,162, 34, 92,189,122, 21,122,189,222,229,112,218,251,205,221,190,159,134, 99, 41,135,240, 32, 39, 19,121, 5,217,245,
+206,119,123,206,154, 66,107,215,177, 43,248,215,160, 78,245,226, 92,184,112, 33,138,138,138,170, 89,178,236,235,165,218, 44, 90,
+ 53,181, 72, 13, 20,215,240,133, 98,143, 13, 53, 68, 79,205,227,154,247, 3, 64, 17, 0,158,147,231,106, 30, 23, 39, 36, 36,156,
+100, 45, 97, 86, 94,158, 51,255,172, 90,135, 14, 1, 36,142, 28, 57,114,196,170, 85,171, 2, 37, 18,137,109, 6, 82,124,124, 60,
+102,207,158,141,166, 77,155, 34, 32, 32, 32,204,199,199, 7, 37, 37, 37, 88,186,116, 41,178,178,178,254, 15, 14, 22,218,171, 41,
+180,122,223, 87, 66, 36,250,173,195,202, 90,182, 0, 96,202,148, 41,143, 88,180,216, 12,170, 11, 38,147, 9,254,254,254,208,104,
+ 52,224,241,120, 24, 53,106, 20,239,250,245,235,150,152,152, 24,140, 30, 61,154,119,245,234, 85,203,176, 97,195,192,227,241, 48,
+ 96,192,128,202, 93,187,118,205, 2,240,153, 11, 98,235,137, 57,198,179,133,204,213,181,143, 92, 17,151,117,113, 82, 20, 5,141,
+ 70, 3,190,117, 86,150,171,156,236,208,161,253, 11, 72,211, 52,124,124,124,108,149, 7,107,209, 98,133,150, 51, 94,103, 11,146,
+202,100, 50,175, 91,183,110, 69,177, 19, 47,138,139,139, 49, 96,192,128, 59,165,165,165,143,112,105,243, 49,127,207,146,204, 16,
+ 0, 67, 88,177,213,117,100, 16, 69,243, 40, 92, 59, 82,130,171,135, 74, 47,155, 42,209, 27,192, 90, 0,255, 5,176, 20,192, 92,
+ 0,211,236,142, 31, 58,172, 32,117, 66,125,242,198, 60, 25,203,155,188,241, 28,190,220,181, 23,239,110,173,114,220,223,245,201,
+125, 76,125,105, 33,218, 69,183,115,109, 45, 32, 6, 48,154, 45, 80,105,117, 80,105, 53,120, 82, 96,223,135,117,235,214, 33, 61,
+ 61, 29, 58,157, 14,171, 87,175,182, 77, 42,176, 23, 89,143, 33,184, 50,164, 82, 41, 51,100,200, 16,156, 63,127, 30, 98,177,216,
+132,122,172,127,197, 16, 6, 70,179, 25, 58,173, 22, 42,231, 67,110, 78, 27, 48,163,201, 4,134,177,160,107,135,112, 92,191,118,
+ 13,114, 94, 49,254,132,176,169,234,244,244,116, 24, 12, 6, 44, 90,180,200,242,203, 47,191,156, 68,213, 2,168,172, 5,111, 66,
+223,190,125, 63,150,203,229, 62, 7, 14, 28,120, 27,192,247,117,197,221,100,182,138,246,199, 76,199,218, 70, 4, 28,249,100,213,
+103,201, 29,251,134,149, 97, 24,252,223, 27,111, 96, 96,104, 37, 70,119, 14,132, 58,255, 14,100,222,129,160,124, 34,177,252,139,
+131,184,113,223,229, 69,137, 9, 0, 12,233, 59, 18,237, 91, 61,186, 60, 88,175,231,170,250,100,103,142, 95, 68, 97,113,158,219,
+113, 87,171,213,181, 90,174,220,176,104,217,222, 57, 54,253, 58,118,236,136,230,205,155,227,228,201,147,232,212,169, 19,238,222,
+189,139,187,119,239, 34, 43, 43, 11,215,174, 93, 67, 89, 89,153,219,121,180,231,200, 86,148, 41, 75, 33, 18,138, 80, 90, 94,140,
+ 7,185,153, 8,246, 15,121,236,124,103,209,114,216, 66, 0, 64,104,160,183, 91, 66,203,158,115,217,178,101,143,136,247,122, 46,
+223,100,207,127,177,174, 99,119,159,255, 61, 81,155,208,202, 84, 40, 20,221,199,142, 29, 27, 15,160,171,245, 92, 5,128,109, 71,
+143, 30, 29, 25, 20, 20,212,191, 71,143, 30,124,145, 72,132,148,148, 20,236,218,181,235,123, 0, 91,235,250, 35,145, 72,164,141,
+140,140,148,178, 5,145,125, 17,189,188,188,120, 75,151, 46,165,214,175, 95, 95,171,149,203, 89, 6, 85, 84, 84, 64,173, 86,195,
+219,219, 27, 70,163, 17, 67,134, 12,177,164,167,167, 67, 40, 20, 98,196,136, 17,150,180,180, 52, 91, 70,255,239,127,255, 11,215,
+106,181,207,254,244,211, 79,131, 1,244,113, 35,173, 88,199,120, 15,184,232, 0, 95, 91, 47,207, 21,184, 58, 28, 87, 27,231,204,
+153, 51,235,197, 41, 20, 10,205,236,202,239, 52, 77,195,104, 52,162, 83,167, 78, 40, 42, 42,178,189, 52,114,185,220, 38,178, 92,
+ 17, 90,206, 22, 36,229,243,249, 48, 24, 12,232,211,167, 15, 40,138,194,154, 53,107,234, 10,107,145, 54, 15,111,236, 89,146,249,
+ 63, 86,108, 73, 60,248,208, 41,205, 56,241,101, 25, 12, 37,240, 26, 51,102,204,248,157, 59,119, 98,233,210,165,211,226,227,227,
+149, 47,188,240,194,180,237,219,183,219,142, 1,196, 59, 34,150, 18,239, 74,205,249,230,178,100,220,129,157,136, 3, 43,226, 42,
+110,120, 34, 89,119, 6, 87, 83,175, 3, 0,214,174, 93, 11,212, 53, 20,203, 48,148,135,135, 63, 66, 67, 91, 32, 48, 72, 7,198,
+ 69,231, 17, 87, 49,103,206,156,106, 98,202,209,202,203,246, 67,140,245, 17, 54,246,251,122,113, 0,182, 33, 47,181, 90,247,216,
+ 66,139, 21, 27, 62, 94, 66,132,133, 53, 64, 69,129,253,176, 62, 5,118,170, 82, 85,152, 73,189, 29,110, 89, 4, 5, 5,117, 47,
+ 42, 42,218, 91,227,116, 41,128,143,235,232, 88,218, 50, 58, 59, 59, 27, 49, 49, 49, 56,116,232, 16,111,247,238,221,207,237,219,
+183, 47,237,206,157, 59,217,157, 58,117,106, 56,117,234, 84,113,159, 62,125, 80, 92, 92,140,206,157, 59,127,148,155,155, 91,135,
+208,178,166,163, 78, 15,181,250,201, 91, 71, 29, 89,179, 30,167, 97,100,211,125,193,130,127, 99, 96,131,114,140,234,224,141,164,
+253,103, 49,161,163, 20, 48,136,221,230, 99,195,226, 23,218, 24,145,209,221, 31,185, 46,246,170, 90,203, 53, 50,186, 59,232,236,
+187,110,199,221, 62,204, 53,203, 76,125,202,144,125,122,190,254,250,235,152, 59,119, 46, 6, 15, 30,140,187,119,239, 34, 57, 57,
+ 25,119,239,222,197,204,153, 51, 17, 29, 29,141, 14, 29, 58,184,197,185,239,216, 14, 84,170, 42, 64, 83, 52, 74, 43, 74,160,211,
+107, 49,103,218,130,199,206,119, 91,227,127, 44,161,106,116,224,232,229,122,115,126,240,193, 7, 40, 40, 40,168,102,201,122, 28,
+191,172,191, 58,234, 90, 45, 45, 19,192,255, 57, 24,174,240, 92,180,104,209,160,128,128, 0, 80, 20,133, 47,190,248, 2,126,126,
+126, 61, 1,220, 48, 24, 12,197,106,181,122,182,157, 8, 25, 8,235, 90, 27,133,133,133, 14,231,237,171,213,106,227,160, 65,131,
+ 4, 13, 26, 52,168, 54,219, 80, 46,151,215,102,221,177,113,178,215,204,102, 51,230,204,153,131, 37, 75,150,160, 81,163, 70, 24,
+ 54,108, 24, 98, 99, 99, 65, 81, 20,134, 12, 25,130, 97,195,126, 27,202,245,241,241, 17, 30, 58,116,168, 47, 77,211,105,118, 13,
+ 72, 53, 78, 71, 96, 29,227, 77, 38,147,171, 14,240,213, 56,217,194, 54,115,230, 76, 44, 89,178, 4,243,231,215,237,234, 81, 75,
+ 35,254,212, 57, 75, 75, 75,171, 85,246, 50,153,108,205,232,209,163,249,217,217,217,213,196,149,253,230,160, 34,170,198,233,108,
+ 65, 82, 30,143,135,224,224, 96, 44, 94,188, 24,254,254,254, 8, 9, 9,113,180,144,159, 61,103,158,189,216,122,246,165, 16,236,
+ 93,150,137,231,187,141,197,237, 83, 43,245,110, 52, 16,213,194,105,177, 88,178,222,121,125,110,208,138,245, 75,121,172,216, 98,
+ 69,220,233,175, 85, 88,149,248, 45,250,244,238, 99, 51,179, 39, 39, 39,155, 29, 88,121,108,156, 22,194,164,126,154,248,239, 94,
+223,109,220, 39, 16,139,128,115,201, 59, 81, 89, 86,125, 56, 73,111,252,109, 42,181,168,211,115, 48, 92, 62,238, 82, 89, 98,197,
+244,194,133, 11,177,112,225,194, 58, 35,185,110,221, 58,167,156,174,138, 46,119,210,211,106,210,162,100,114, 95, 72,228,161,104,
+ 19,237, 11,134,152,221,173,163,108,156, 53,197, 70, 64,128, 63, 42, 10,170,203, 58,202,150, 70,117,106, 96,103,113,255,229,226,
+197,139, 35,252,253,253,145,147,147, 19, 40, 16, 8, 70, 84, 51, 87,105,181,136,140,140,108,161, 80, 40,158,117,198, 57,115,230,
+ 76,253,135, 31,126, 40, 30, 55,110, 28, 70,143, 30,141,113,227,198,137,133, 66, 97, 51, 66, 8,140, 70, 35,114,114,114,112,252,
+248,113, 40, 20,138,155,117,133,147, 33,132,146,202,124, 32,145, 55, 64,155,182, 62, 96, 24,115,125,235,124,135,117, 72, 77,107,
+150,155, 34,203, 97,249, 4,128, 95,142,239,197,130,119,219,226,251, 3, 23,176,234, 34,208,222,167, 8,109, 2, 21, 96, 20, 55,
+241,254,132, 46, 88,254,195,165,170,119,233,148,211, 60, 34,117,149, 65,157,214,248, 88,113,183,183, 92,217,255,143, 11, 62, 90,
+143,112,178,157, 68,165, 82,137,242,242,114, 36, 37, 37,225,213, 87, 95, 69, 81, 81, 17,178,178,178,112,231,206, 29,108,217,178,
+ 5, 50,153,172, 94,121, 52,235,141, 15,240,225,242,247, 64, 64,208, 50,170, 13,226,227, 22,162,107,251, 30,143,157,239, 53,225,
+130, 53,171, 86,206, 21, 43, 86,212,183, 44,253,227,132,150, 67, 4, 4, 4,140,235,219,183, 47,116, 58, 29, 2, 3, 3,145,149,
+149, 5,154,166,155, 2, 85, 67,120, 97, 97, 97,219, 20, 10, 69, 83, 87,249,120, 60, 30,204,102,179,205,247,135,221, 0, 96,248,
+240,225,248,241,199, 31,157,246, 40, 66, 66, 66,208,176, 97, 67,188,243,206, 59,143,204,114,176,159,233, 32,149, 74,113,224,192,
+129,130,210,210,210, 82, 66,136,194,157,120,179,142,241,103,206,156,113,217, 1,222, 30, 70,163, 49,251,206,157, 59, 13,214,173,
+ 91,199,171,163,241,179,161,150, 70,252,169,115, 58,234,153, 18, 66,106, 21, 89,174, 44, 35,224,108, 65, 82, 62,159,143,219,183,
+111, 99,193,130, 5,160, 40, 10, 59,119,186,228,195,147,167,205,195, 27,187, 23,103, 46,221,147,144, 57,218, 84, 1,201, 73,245,
+202, 59, 0, 86,239,216,177,163, 3, 69, 81,236, 80,225,127,119,236,216,225,105,127, 92,171,169,172,168, 40,230,197, 23, 95, 60,
+ 74, 81, 84, 83,221,201, 10, 79, 0, 34, 86,196,229, 94,211,169, 94,158,240,178,129,207,231, 91,126, 51, 88, 49, 89,133,133,133,
+207,215,198,119,253, 86,201,122,154,166,125,135, 63,223,171, 29, 40, 10, 70,195,163, 35,213, 30,101, 42,155,200, 26,253,217, 86,
+236,158, 53,214, 21,209,147,113,250,244,105,191,117,235,214,241, 93,201,247,211,167, 79,155, 9, 33,110, 15,251,177, 13,142,209,
+104,132, 86, 91, 63, 43, 10, 33, 36, 37,225,147, 15, 7,109,216,116, 80, 64, 81, 6,156, 59,181, 19, 21,229,142,221, 25, 68, 2,
+ 62,214, 39,237, 50, 11, 5, 60,135, 78, 39, 79, 80,108, 56,195,151,163, 70,141, 26,183,122,245,234, 54,142, 46,186, 48, 9, 38,
+ 75,167,211, 33, 55, 55, 23, 26,141,102,199,188,121,243,140, 7, 15, 30,124,109,204,152, 49,232,208,161, 3, 26, 52,104,128,252,
+252,124,100,100,100, 32, 41, 41,137,156, 61,123,118, 7,128,233, 78,210,113,111,226, 39, 31, 78, 78,250,225,160,136,166,140, 56,
+151,188, 19, 21, 53, 68,251,163,214,105, 1,190,249,126,151, 81, 40, 20,220,114,102, 45,178,183,102, 61,201,134,113,196,196, 56,
+140, 94,185, 10, 77,187,198, 32,113,233, 64,124,243,201,139,248,124,136, 16,198,237, 19,208,254,133, 13,216,188,104, 40, 0, 32,
+244, 27, 23,173, 37,124, 33, 30, 58,176, 88,149, 87, 72,172,226,198, 61,171, 41, 27,247,186, 44, 87,238, 90,180,104,154, 70,227,
+198,141,209,180,105, 83,244,236,217, 19,157, 58,117, 66,255,254,253,113,245,234, 85, 92,189,122, 21, 51,103,206,172, 75,100, 57,
+205,163,126,207, 14,194,133,222,183, 30, 59,111,106,230,251,147,128, 43,101, 41, 46, 46, 14, 0,254, 81,214, 45,183,133, 86,101,
+101,229, 85,134, 97,218,121,123,123,179, 22, 41,219,181, 7, 15, 30,128, 97, 24,141,187, 25, 99, 48, 24,216,197, 49,171,173,203,
+196, 58,199,215,245,226, 19, 66, 44,165,165,165,232,219,183, 47,122,247,238,109, 27, 62,177,223,236,132, 9,118,239,222, 13, 66,
+ 72, 55,119,227,109,231, 24,175,130,155, 14,240,108, 35,222,167, 79,159,163,124, 62,223,165,175,104, 58,107,196,159, 22,167,163,
+252, 97, 24,166, 86,145,229, 74, 69,228,108, 65, 82, 62,159, 15,185, 92,142, 61,123,246, 32, 32, 32,192,157,224,229,233, 10, 48,
+ 11,192,151,168,154,132,113, 23, 0, 59,141, 47,206,254,221,174,113, 92, 27,212, 10,133,130,237, 26,134,238, 94,156,185,116,239,
+210,204,129,140, 30, 59,117, 10,252, 0, 40, 47,194,137,211,114, 77, 92, 77, 87, 44,171,235,122, 95,127,209, 41, 0,129,163, 63,
+219,250,240, 84,137, 49, 98,244,103, 91, 31,236,158, 53,182, 81, 93,207, 20, 20, 20, 12, 30, 59,118,236, 33, 87,243,221,108, 54,
+103, 22, 20, 20, 60,239,110,153, 37,132,224,214,173, 91,204,235,175,191, 94,172, 80, 40, 94,172, 79, 5, 19,191, 96,213,231, 75,
+ 62,154,225, 63,100, 80,247,174,160, 1, 67,237,206,191,132, 2, 8, 95,192,203,158, 61,127,197, 27, 47,190,248,226,239, 42, 54,
+106, 86,115, 5, 5, 5, 61,255,245,175,127, 77,199,111,174, 19,213,132, 20,106,153, 93,109,197,202,134, 13, 27,182,229,241,120,
+ 98, 0, 11, 0, 60, 56,123,246,236,151,103,207,158, 29, 12,224, 25, 30,143,215,192, 98,177,228, 90, 59, 61, 91, 1,252,234,188,
+ 28, 21, 77, 5, 97,194,135, 12,124, 38, 6, 20, 69, 12, 6,189,147, 14, 18, 8, 8, 33, 66,161,224,214, 47, 87,243,219,215,213,
+145,178,251, 2,199, 19,159, 65, 60,125,250,116, 76,159, 62,221, 86,158,214,172,233,141, 29,215,207,224,133,246, 57,208,127,221,
+ 11,148, 87, 35,151, 59,124, 0,240,193,191, 95,127, 98, 97,179,143,187,189, 69,203,209,123,224,142,143, 22,143,199, 67,113,113,
+ 49,110,223,190,141,194,194, 66,104, 52, 26,164,167,167,195,104, 52,162,172,172, 12,109,219,182,173,119, 56,159, 84, 30,253,145,
+156,255,196,225, 67,183,133,150,209,104,252, 79,227,198,141, 5, 18,137,164,141,197, 98, 1, 33, 4, 22,139,133, 88, 69,141,219,
+179,240, 4, 2,129,174,121,243,230,148,163,217, 9,236,111,185, 92,174,173,195, 90,146, 16, 25, 25, 57,143,162, 40, 94,109,189,
+ 16,246, 55,195, 48, 22, 62,159,159, 80,207,180,122, 92,199,120,251, 70,252, 73,225,105,112,214,204, 31,117,171, 86,173,108, 95,
+180,175,185, 38,138,245, 99,171,106, 39,226,188,206, 5, 73,213,106,117,126, 76, 76,140,197,254,186,253,130,166,206, 52,172,117,
+123,210, 96, 69, 92, 99, 59, 17,103,121,226,255, 66,145, 7, 67,199,189, 22,113,170,196, 24, 1, 0,172,216, 2, 33, 15,234,120,
+ 74, 91, 80, 80,208,247,105, 87, 14,247,239,223, 55, 60,243,204, 51,155,148, 74,101, 28,128,122,123,243,207,255,207,154,249, 79,
+ 34, 60, 79, 75,108,212, 86,108, 1, 44,169,103, 80, 31,148,148,148, 12,168,113,238, 87, 86, 80,177,235,218,185, 29,255,155,197,
+207, 63,233, 60, 54,155,205, 57, 77,155, 54,117,203,114, 99, 50,153,114,156, 93,175,185, 70,152, 61,110,192, 27,243,207, 3, 85,
+147,191, 75, 92,226,212,233,116,165, 61,122,244, 16,184, 25,183, 34, 87,227,222,160, 65, 3,132,134,134,218,246, 44,106,158,119,
+ 22, 78,179,217,156, 19, 30, 30,142,128,128,128, 90, 87,124,175,233,147,229, 10,231,147,206,163,186, 56, 67, 67, 55, 60,113,206,
+250,134,147,131,107, 24,200,113,114,156, 28,231, 95,150,147,199,165, 39,199,201,113,114,156,191, 35,231,223, 18,156,151, 26, 7,
+ 14, 28,106,131,133, 75, 2, 14, 28, 56,112,120, 60, 80,117,168,210, 99,110,240,212, 71,217, 30,227, 56, 57, 78,142,147,227,228,
+ 56, 57, 78,142,243, 31,199,233,140,251, 24, 56, 60, 85, 1,198,113,114,156, 28, 39,199,201,113,114,156, 28,231, 63,143,243,111,
+ 9,110,232,144, 3, 7, 14, 28, 56,112,224,192,129, 19, 90, 28, 56,112,224,192,129, 3, 7, 14,156,208,226,192,129, 3, 7, 14,
+ 28, 56,112,224,192, 9, 45, 14, 28, 56,112,224,192,129, 3, 7, 78,104,113,224,192,129, 3, 7, 14, 28, 56,112,224,192,129, 3,
+ 7, 14, 28, 56,112,224, 80, 5, 10, 0,246,239,223,111,251, 32, 96,108,108, 44,197, 37, 11, 7, 14, 28, 56,112,224,192,225,247,
+196,223, 90,139,216, 71,142, 3, 7, 14, 28, 56,112,224,192,129,211, 34, 79, 6, 52, 39,182, 56,112,224,192,129, 3, 7, 14,156,
+216,226, 34,198,129, 3, 7, 14, 28, 56,112,224, 68,214, 95, 10,213, 44, 90,156,224,226,192,129, 3, 7, 14, 28, 56,252,145, 98,
+235, 47,170, 69,136,117,179, 63,230,192,129, 3, 7, 14, 28, 56,112,224,240,152, 2,171,174, 61, 7, 14, 28, 56,112,224,192,129,
+ 3,135, 39, 36,184,216,223,191,155,208,226,190,108,206,113,114,156, 28, 39,199,201,113,114,156, 28,231, 63, 22,124, 46, 9, 56,
+112,224,192,129, 3, 7, 14, 28, 30, 27,246, 86, 44,138, 19, 90, 28, 56,112,224,192,129, 3, 7, 14, 79, 78,100, 81,142,142,185,
+111, 29,114,224,192,129, 3, 7, 14, 28, 56, 60, 37,112, 22, 45, 14, 28, 56,112,224,192,129, 3,135,199, 3, 5,110,232,144, 3,
+ 7, 14, 28, 56,112,224,192,225,169,138, 45,135, 39,107,155, 57,112,204, 13,242,250,204, 62, 56,198,113,114,156, 28, 39,199,201,
+113,114,156, 28,231, 63,142,211, 25,247, 49,252,245,208, 23,192, 73, 0,253,172,251, 90,133,215,147, 6, 55,245,149,227,228, 56,
+ 57, 78,142,147,227,228, 56, 57,206,191, 59,106, 93,168,148,115,134,231,224, 12,124,212, 61,196,236,236, 58, 7, 14, 28, 56,112,
+224,240, 79, 19, 91,196,190,145,116,132,102, 0,230, 3,240,182, 59,119, 17, 64, 66,141,251,126, 0, 32,179, 59, 86, 3, 88, 4,
+224,174,211,208, 16, 34,180,242,139,173, 27, 3, 64, 7, 64, 15, 64, 73, 81,148,137,203,179, 63, 28, 61, 0,196, 90,127,239, 7,
+112,206,205,235,127, 43, 52,104,208, 64,234,235,235, 59,248,242,229,203,162,244,244,116,156, 62,125,154,172, 95,191,222, 88, 86,
+ 86,118, 36, 63, 63, 95,203, 21,151,191, 5, 98, 0,196, 91,127, 39, 2, 56,252,152,124,148, 76, 38,155, 41,151,203,135,138,197,
+226, 80,179,217, 76,105, 52,154, 60,181, 90,125,212,108, 54,127,102,173,247,220,197, 72, 63, 63,191,215, 90,182,108,217, 44, 43,
+ 43, 43, 55, 47, 47,239, 7, 0,219, 1,188, 24, 26, 26, 58, 33, 50, 50, 50,236,214,173, 91,119, 75, 75, 75,191, 1,176,247, 15,
+ 12, 39, 7, 14,255, 36, 80,117, 89, 35, 28, 97, 1, 33,100, 66, 53, 6,234, 81,142, 1, 3, 6,140, 56,114,228,136,140, 97, 24,
+176,155, 84, 42, 53, 3,120,197,137,200,242, 79, 73, 73,137,136,139,139, 27,157,151,151,215, 69,169, 84,118, 3, 0,153, 76,118,
+ 33, 40, 40,232,151,149, 43, 87,110, 33,132,228, 80, 20,165,116, 51,162,124,129, 64,240,170,175,175,239, 80,179,217,220,137, 16,
+ 2,129, 64,112,185,172,172,236,176,201,100,250, 6, 64,125,196,155,136,207,231, 79, 23,139,197, 49,102,179,185, 29, 0,240,249,
+252,107,122,189,254,176,217,108,254, 18,128,161, 30,156, 18,145, 72, 52,221,203,203,107,144,193, 96,104, 7, 0, 34,145,232, 90,
+101,101,229, 81,131,193,240,165, 85,112,254,209,224, 3,136, 37,132, 8, 0,128,199,227,141,236,214,173, 91, 4, 69, 81, 12, 69,
+ 81,132, 16, 66, 93,184,112,161,163,197, 98,161,173,229, 35, 22,192, 47, 0,204,127,197, 55, 36, 32, 32, 96, 9,195, 48,161,117,
+102,154, 68,210,229,242,229,203, 45,183,109,219,102,249,250,235,175,203,167, 76,153,226, 17, 23, 23,199, 95,179,102,205,151,249,
+249,249,111,215,188,223,223,223,255,115,154,166, 3, 92,249,127,134, 97,138, 75, 74, 74,222,251,163,226, 63,121,178,174,154,185,
+ 59, 41, 73, 18, 5, 32,167,158,229,251,233,113,234, 38, 19, 0, 72,146, 36, 69, 77,214, 77,206, 96,127, 63, 46,175, 29,226,191,
+ 58,166,236, 67, 8, 48,125,144, 39,253,184, 66, 43, 44, 44, 44,105,242,228,201,227,218,181,107,199, 39,132,192,100, 50, 65,175,
+215,183, 60,119,238, 92,191,157, 59,119,118, 81, 42,149, 47,186, 73,249,198,220,185,115, 23,127,252,241,199, 1, 2,129,128, 50,
+153, 76, 81,219,182,109,235, 52,117,234,212,119,214,173, 91,215,240,165,151, 94,242,100,207, 47, 88,176,160,107, 98, 98, 98, 19,
+ 0,159,253, 1,225,228,192,225,159,134,190,168,238,163,245, 17,128,133,117, 9, 45,185,181,241, 44,180, 90,178, 96,183,183,225,
+196,137, 19,251,248,124, 62,107,209,234,166, 86,171,131,107, 88,193, 28,137,172,200,137, 19, 39,246,216,177, 99,199,146,151, 94,
+122,169, 64, 38,147, 53, 31, 51,102,140,146,162, 40,222,182,109,219, 58, 54,109,218, 84, 58,124,248,240,137, 3, 6, 12,152, 69,
+ 8, 57, 77, 81,148,194,197, 72,182,241,243,243,219,181,108,217,178,136,152,152, 24, 97, 64, 64, 0, 8, 33,200,203,203, 11, 59,
+112,224,192,144,143, 62,250,104, 86,105,105,233, 40, 0,105,110, 36, 92, 87,169, 84,186,227,163,143, 62,106, 48,100,200, 16,126,
+ 72, 72, 8,116, 58, 29,210,211,211, 7, 30, 62,124,184,207,186,117,235,222,214,106,181, 47, 88, 5,134,171,232,230,237,237,189,
+243,187,185,115,131,187,191,250, 42,223,207,207, 15,132, 16, 40, 20,138,129,103, 54,108,232, 55,109,217,178,183, 43, 42, 42,254,
+229, 40,189,255, 72,136, 68, 34,122,227,198,141, 29, 68, 34, 17, 0,192, 96, 48, 32, 58, 58,154,250,187,188, 33, 20, 69,133,231,
+229,229,121, 11,133, 66,135,215, 45, 22, 11,250,244,233,211, 88, 40, 20,226,179,207, 62, 51, 21, 23, 23,119, 92,189,122,245,229,
+205,155, 55, 7,124,249,229,151, 47, 0,120, 68,104,209, 52, 29,144,147,147,227,144,211, 98,177,192,104, 52,194,108, 54,195, 96,
+ 48,160,117,235,214,127,104,252,147,146, 36,225, 0,222,155, 60, 89,247,174,245,212,103, 0,102, 1,184,143,122,126,179,235, 41,
+112,218,151,183,207,237,126, 63,118, 88,237, 16, 1, 0, 7,175,234, 0,192,239,113,211, 85, 46,151,183, 26, 63,126, 60, 95,161,
+ 80, 64, 32, 16,192,104, 52,162,160,160, 0,209,209,209,188, 77,155, 54,181,112,151, 47, 42, 42,106, 74, 98, 98, 98,224,193,131,
+ 7,141, 27, 55,110, 52, 12, 26, 52, 72, 48,101,202, 20,175, 62,125,250,180, 14, 15, 15,167,191,253,246, 91,253,209,163, 71, 77,
+ 19, 39, 78, 20, 37, 36, 36, 4, 30, 56,112, 96,120, 90, 90,218,103,191,119, 56, 57,112,248, 7,226, 36,126, 91,226,129,221,215,
+ 41,180, 96, 39,174, 70, 2,128, 64, 32,232, 24, 28, 28,156,100, 54,155, 67,172, 86,157,130,194,194,194,207, 76, 38,211, 21,235,
+189,123, 25,134, 25,225,204,146, 53,113,226,196, 30,135, 14, 29, 90,126,238,220,185,138,146,146,146,144,125,251,246,233,102,205,
+154,149, 5, 0,247,239,223,111, 50,124,248,240,176, 25, 51,102,228, 12, 30, 60,120,101,255,254,253,223, 34,132, 28,165, 40, 74,
+237, 76,100, 69, 71, 71,167, 36, 39, 39,123,250,248,248, 84,187, 16, 25, 25,137,183,222,122, 75, 56, 98,196,136,166,207, 61,247,
+220,217,140,140,140,222, 0,174,187, 34,136,154, 53,107,118,236,196,137, 19, 30,190,190,190, 40, 47, 47, 71, 65, 65, 1, 52, 26,
+ 13,188,188,188,240,210, 75, 47, 9,251,246,234,217,112,198,204,183,143,229,228,230, 14,116, 81,108,117,235,217,166,205,177,205,
+ 9, 9, 30,166,135, 15, 33,149, 74,161, 82,169, 0, 0,158,158,158,232,210,184, 49,255,210,134, 13, 97, 19,230,204, 57,246,203,
+237,219, 3,255, 32,177, 37,182,238,245, 0,246,243,120,188,145, 34,145,136, 30, 57,114, 36,142, 29, 59, 70,233,116, 58,190,213,
+186, 99, 30, 57,114, 36,164, 82, 41, 12, 6,135,200,170, 5, 0, 0, 32, 0, 73, 68, 65, 84, 3,131,170,161, 67,243, 95,249, 45,
+ 17,137, 68,200,200,200,168,118, 78,169, 84, 66,161, 80,160,164,164, 4,122,189, 30,229,229,229, 96, 24,134,146, 74,165, 10,134,
+ 97, 64,211,116, 77, 1, 80, 13, 66,161, 16,183,111,223,174,118,206,108, 54, 67,173, 86, 67,175,215,195,104, 52, 66,169, 84, 74,
+ 61, 61, 61,155, 5, 4, 4,228, 0,216, 91, 90, 90,250, 89, 97, 97,225,131,223, 57,250,197,172, 32, 74, 74,146,220, 3, 32,250,
+ 51,114,218, 89,178,194,172,199,191, 62,161,176,178,120,184,255,138,174,145,213, 58,150,249, 4,248, 24, 0, 56,125,250, 52, 10,
+ 11, 11, 81, 92, 92, 12,133, 66,129,240,240,112, 16, 66,220, 30,142,203,200,200,248,170,109,219,182,212,141, 27, 55, 14, 3, 88,
+179,109,219,182, 87, 74, 75, 75,227,103,207,158,237,247,233,167,159,150,206,153, 51, 39, 17,192,247,219,182,109,123,179, 85,171,
+ 86, 67,111,222,188,185,238,143, 8, 39, 7, 14, 79, 26,132,144,174, 0, 2,217,186,197, 90,239,250,219, 29, 95,165, 40,202, 96,
+119,159,193, 90, 55,212,220,179, 96,143, 21, 20, 69,253, 98,247,156,130,162,168, 95,234, 27,204, 26,251,170, 78, 55, 0,236,223,
+191,159,176,155,163, 39,131,130,130,102, 14, 24, 48, 96,121,106,106,106,235,252,252,124,223,252,252,124,223,212,212,212,214, 3,
+ 6, 12, 88, 30, 20, 20, 52,211, 46, 33,106, 62,122,204,238,154, 48, 37, 37, 37, 98,215,174, 93,137,199,142, 29,171,232,216,177,
+163,225,196,137, 19,230,193,131, 7, 23, 89, 27,104,243,224,193,131,139,126,254,249,103, 75,247,238,221,165,135, 14, 29,202, 62,
+123,246,236,231, 59,118,236, 8, 38,132,240, 28,113, 90, 33,240,241,241,217,115,234,212,169, 71, 68,150, 61, 26, 54,108,136,253,
+251,247,123,249,248,248,236, 5, 32,172, 45,156, 86, 72, 36, 18,201,206,159,127,254,217,195,211,211, 19, 69, 69, 69, 16, 8, 4,
+ 8, 10, 10, 66, 69, 69, 5, 10,242,243,241,224,206, 29,208, 6, 3,190,248,228, 99, 79,169, 84,186,195, 65,101,255, 8,167,183,
+183,247,206,205, 75,150,120,148, 28, 59,134, 95, 23, 47,134,209,104,180, 13,185, 26,141, 70,156,141,139,131,226,248,113,124,187,
+ 96,129,135,183,183,247, 78, 0, 18, 39,156, 79, 2,246,156,113, 0, 74,173, 91, 28,128,115,209,209,209,169,233,233,233,232,221,
+187, 55,182,111,223,222,126,246,236,217,113,179,103,207,142,219,190,125,123,251,222,189,123, 35, 61, 61, 29,209,209,209,169,168,
+238,159,245,180,195,249,212, 56, 45, 22, 75,181,141, 97,126,107, 99, 66, 67, 67,139,118,237,218,133,151, 94,122,137, 22,137, 68,
+249, 99,199,142, 21,159, 57,115,134, 88, 69,166,203,225,212,233,116,208,106,181, 80,171,213,184,127,255,190,116,217,178,101,189,
+ 22, 46, 92, 24,117,236,216,177,176,249,243,231, 79, 11, 12, 12,188, 28, 28, 28, 28,241, 59,199,221, 88,227,247, 23, 0,114,221,
+180, 16, 61,109, 78, 98,125, 30,147,117,147, 59,216, 85,176,238,242,214,149,158, 5,214,176,170, 1, 60,120,156,178, 52, 96,192,
+128,182, 81, 81, 81,193,219,110,248,162, 76,216, 18,140,208, 7,140,208, 7, 22,255,174,200, 16, 61,143, 70,141, 26, 5,123,120,
+120,244,112, 51,156, 27,111,220,184,241,140,181,167, 92, 2, 96,249,156, 57,115, 62,162, 40,234,244,156, 57,115, 62, 6,176,220,
+122,126,241,205,155, 55,187, 3,216,252, 7,133,243, 47,241,190,115,156,127, 46, 78, 39, 90, 36,144,162,168,253, 20, 69,237,159,
+ 55,111, 94,127, 0,254, 53,142,159,181,191, 15,128,200,209,158,221,236,206, 7, 18, 66,134,217, 61, 23, 88,207,224, 83, 14,182,
+223,132, 22, 0,196,198,198, 82,177,177,177,236,133,139, 20, 69,237, 3,112, 81, 32, 16,116,236,208,161,195,200,159,126,250,201,
+ 51, 48,240,183,255, 15, 12, 12,196,142, 29, 59, 60,219,180,105, 51, 82, 32, 16,116, 4,112,209,203,203,107, 95, 29, 86, 24,159,
+184,184,184,209,147, 38, 77,170,236,216,177, 35, 0,148,167,165,165,201,186,119,239,174, 54,155,205,148,217,108,166,186,119,239,
+174, 78, 75, 75,147,153, 76, 38,101,215,174, 93,229,207, 61,247, 92,214,123,239,189, 55,209,129,224,176,199,248,165, 75,151,134,
+251,250,250,214,165,132,161, 84, 42, 17, 28, 28,140,184,184,184, 16,129, 64,240, 90, 93,169,197,231,243,167, 47, 93,186, 52,200,
+199,199, 7,101,101,101, 8, 15, 15,135,193, 96,192,237,219,183,161, 83,171, 96, 82, 86,194, 84, 89, 14,197,189,187,240, 17,240,
+ 49,113, 68,108, 48,159,207,159,238,196, 90, 50,253,155, 57,115,130, 13, 89, 89,184,191,125, 59, 44,230, 71,141, 63,102,163, 17,
+215,254,247, 63,232,114,114,144,248,250,235,193, 34,145,104,250,239,108,201,250,148, 16, 34, 37,132, 72, 41,138, 90,217,163, 71,
+143, 77, 82,169, 52, 46, 33, 33, 33,230,200,145, 35, 67,146,147,147,251,153,205,102,129,217,108, 22,156, 62,125,186,183, 78,167,
+227,139,197, 98,240,249,124,130,191, 41, 4, 2, 1,132, 66, 33,164, 82, 41,122,245,234,117,111,253,250,245,166,240,240,112,193,
+206,157, 59,125, 67, 67, 67,229,107,214,172, 41, 87, 42,149, 75, 93,229, 51, 26,141,208,235,245,208,106,181,208,233,116, 56,113,
+226, 68,227, 25, 51,102,240,117, 58,157,101,248,240,225,165, 38,147, 73, 63,103,206, 28, 47, 63, 63,191, 89,191,103, 60, 39, 79,
+214, 49, 86,203,211, 77,171,104,201,196, 99,250, 60, 61, 13, 78, 0, 6,171, 79, 22,139, 0, 43,183,225, 9, 37,133, 25,128,202,
+ 42,180,244, 53,222,143,118,118, 22, 95,167, 40, 47, 47, 95,247,205, 55,223,132,211, 98, 31,156, 49, 12,197, 22,230, 35, 28,241,
+ 94,131,162,136,247, 17, 20, 30,133,113,227,198, 5, 17, 66,214, 60,129, 48,175, 6,208, 7,192,202,250, 60,252, 59,132, 51, 66,
+ 46,151,111,247,244,244, 60, 35,151,203,183,195, 58, 60,251, 56, 24, 20,133,129, 35, 90,209, 57,131,154,130,140,104, 69,231, 12,
+138,226,150, 26,248,187,160,134, 22,177,135,130, 16, 18, 75, 8,137, 77, 76, 76, 92, 98,215,190,179,199, 82, 23, 45, 99,177,132,
+144,216,106, 10,169, 74, 96, 61,182,209,205,193, 86,165, 41,236,149,164, 93,228,108,179, 11,131,131,131,147,146,146,146, 60,107,
+ 50,230,231,231,163,178,178, 18, 31,126,248,161,231,164, 73,147,222,206,201,201,153,236, 36, 16,162,130,130,130, 78, 19, 38, 76,
+144, 24,141,198, 50,134, 97,232,202,202, 74,190,183,183,183,133,189,193,219,219,219, 82, 81, 81, 33, 80,171,213, 60,139,197,162,
+159, 52,105,146,232,245,215, 95,239, 2,128, 87, 27,105, 96, 96,224,160,161, 67,135,214, 58,116, 96, 50,153,160, 86,171,161, 86,
+171, 97, 52, 26,209,171, 87, 47,241,250,245,235, 7, 23, 21, 21,253,183, 86,197, 33, 22, 15, 26, 52,104,144,160,180,180, 20,222,
+222,222,120,240,224, 1, 50, 51, 51,161, 87,169, 96, 84, 85,194,168, 82,194,172,172, 4,169,172, 64,201,221, 91,232,222,170,165,
+240, 7,177, 56, 70,173, 86,127, 94, 27,167,151,151,215,160,238,175,188,194,151,203,229,232, 55,161,106,158,193,161, 86,173, 64,
+ 44, 22, 48, 22, 11, 44,102, 51, 98,110,223,134,201,100, 2, 77,211,232, 90, 90,202,247,218,176, 97,144, 66,161, 88,254, 71, 20,
+118,177, 88,204,223,184,113,227,120,145, 72, 4, 66, 8,101, 48, 24,112,228,200,145,127,220, 75, 47, 18,137, 32,145, 72, 96, 52,
+ 26, 17, 25, 25,169,157, 48, 97, 66,202, 39,159,124,210,136,166,105,185, 80, 40,252,169,164,164,100, 73,126,126,254,125, 87,249,
+ 76, 38, 19, 12, 6, 3, 12, 6, 3,180, 90, 45,238,221,187, 23,210,184,113, 99, 42, 46, 46,206,162,209,104,154,172, 90,181, 42,
+227,200,145, 35,178,165, 75,151,142, 1,240,214,239, 29,223,201,147,117,173, 0,180, 74, 74,146, 8,173,150, 95,195,159,140,147,
+160,202,241, 29, 73,146,164,116, 0,138, 39, 40,178, 68, 0,188, 27,249,243,213, 2, 30, 84, 0, 60,173,162, 96, 12, 69, 81,221,
+ 91,183,110,237,155,158,158, 94, 70, 8, 57, 15, 96, 11,128,252,186,200, 24,134,161, 24,134,193,212,110,229,136,235,193,131,201,
+ 84,129,138,138, 10, 60,120,240, 0,105,105,105,184,112, 33,173,190,239,230,107, 30, 30, 30,131, 37, 18, 73,164,217,108,166, 85,
+ 42,213, 3,141, 70,115,140, 97,152,117,168,135,143,218,211, 10, 39, 11,185, 92,190,108,254,252,249, 61,189,189,189,113,229,202,
+149, 38, 91,183,110, 93,166, 86,171, 31,203,185, 94, 34,160,191,253,124,197,154,176,176, 32, 31, 92, 77,254, 49,108,201,218,109,
+223, 2, 76, 56, 39, 83,254,250,168,161, 69,236,197,208, 47,132,144, 97, 20, 69,237,175, 41,148,220, 50, 59, 61,230,243, 78, 44,
+ 90, 53, 63, 44, 93, 93,104,213,162, 32, 97, 54,155, 67,236, 45, 89,132, 16,228,231,231, 35, 55, 55, 23, 10,133, 2,190,190,190,
+ 48, 26,141, 33,174,212, 15, 74,165,178,155,191,191,191, 70, 32, 16,232,181, 90, 45,100, 50, 25, 35, 16, 8,136,245,127, 40,235,
+172, 69,139, 94,175,167,248,124,190,201,211,211,211, 67,175,215,183, 68, 29,190,100,132,144,110,254,254,254, 14,175,233,245,122,
+168, 84, 42,168,213,106,168, 84, 42,232,245,122, 4, 7, 7,195,108, 54,119,170,179, 75,107, 54,183, 11, 12, 12, 68, 94, 94, 30,
+164, 82, 41,114,114,114, 96, 80, 41, 97, 84, 42, 97, 86, 87,194, 82, 81, 1,166,178, 18,140,186, 18, 38,131, 6, 97,205, 91,129,
+157,145, 88,107, 55,220, 96,104,231,239,239, 15,181,250, 55,119, 51, 98, 21, 88,102,179, 25,102,171,115, 52, 59,156, 24, 16, 16,
+ 0,118, 70,226,239, 4, 61,128,217, 52, 77,175, 20,139,197,252,105,211,166, 33, 63, 63,191, 90,153,152, 54,109,154,205, 39,171,
+ 79,159, 62,167, 37, 18,137, 89,161, 80, 64,175,215, 11,254,174, 47, 61, 69, 81,160, 40,170, 42,143,204,102, 4, 4, 4,168,139,
+139,139, 47,148,151,151,143,175, 15,159,201,100, 98,103,116, 65,171,213,130, 16,130, 43, 87,174, 64, 34,145, 8, 44, 22,203, 13,
+179,217, 44, 19, 8, 4,160,173,206, 95,191, 23,172, 51, 2, 63, 3, 16,110,181, 16,189,134, 42,135,243, 92, 7, 21,137, 75, 73,
+231, 34,167,251,194, 77, 55,153,181, 52,229,162,126,195,145,142,208,175,165,143,232,243,132,238, 65, 62, 29,134,203,213, 50, 17,
+ 79,205, 60,232, 16,249,221,167,105, 91, 39, 77,124,205,115,209,162, 69, 17, 1, 1, 1,146,140,140, 12,221,199, 31,127,220,120,
+227,198,141, 20,170,134,233,106,197,195,135, 15,119,207,159, 63,223,111,232,208,161, 77,196, 98, 49, 85, 81, 81, 1,133, 66,129,
+194,194, 66,100,102,102,146,171, 87,175,222,211,235,245,219,221, 9,100,131, 6, 13,214,143, 31, 63,126, 82,231,206,157, 5,172,
+133, 84,173, 86,119, 60,117,234,212,136, 67,135, 14,245, 86,171,213,110,151,203,236,236,236,237, 31,124,240,129,252,249,231,159,
+111, 41, 22,139,233, 39, 17, 78,123,208, 52, 29,236,225,225,129, 99,199,142,193,199,199, 7, 52, 77, 7, 63,110,121,213, 25,153,
+176,208, 16,127,232,206,126,142,150,129, 17,208, 25,153, 48, 78,162,252,125, 44, 90,181,180,245, 93, 89,139,148, 19,177,164,141,
+143,143,159, 79, 81,212,254,248,248,248,249,142, 44, 90,214,159, 22,251,251,236,238,215, 63,105,177,229,214, 66,147, 12,195, 32,
+ 55, 55, 23,121,121,121,200,205,205, 69, 73, 73, 9,104,154, 6, 33,196,149,217,103,132,162, 40,230,232,209,163,190, 41, 41, 41,
+234,174, 93,187,150,179,254, 47,102,179,153, 50,153, 76,148,213, 47,134,122,240,224,129,240,204,153, 51, 62, 55,111,222, 12,182,
+246, 86, 25, 39,166,192, 71,206,177, 2,203,126,211,233,116,144, 72, 36,174,169, 14,107, 67,120, 37, 53,181, 74,100,169,148,214,
+ 33,195, 10, 88, 42, 43, 64,212, 74,136, 44, 38,136, 64, 64,233, 52, 46,167,159, 61, 88,145,101,180, 10, 45,131,193, 0,147,201,
+ 4,134, 97, 96, 54,255, 33,126,229, 95,181,111,223,190,211,238,221,187,167,228,230, 62,218, 22,142, 26, 53, 10,111,189,245, 22,
+102,204,152,113,115,216,176, 97, 87,127,252,241, 71, 76,159, 62, 29, 12,195,116, 0, 80, 1,224,208,223,237,165,215,235,245, 54,
+ 11,148, 78,167,131,209,104, 4,220,248,172, 66,205,178,201,230,173,217,108,102,185,169,221,187,119,225,244,233,211,116, 90,218,
+141,240,105,211,226, 88,135,251,223, 59,170, 57,168,154,185, 39,178, 86, 20, 6, 84,249, 63,213,182,164, 66, 83,212, 61,100, 71,
+234,226,124, 28,180, 95,219,254,165,119,223,125,119, 16,170,102, 56,223,127, 76,139,214,243, 34,154,250,122,102, 59, 63,201,172,
+246,254,106, 17,159, 82,221,254,122,190, 42,179,145,151, 58,184,161,204, 16,222,216, 39,116,201,146, 79, 26,220,188,121, 75,255,
+225,135, 31,166,143, 29, 59, 54,104,214,172, 89,173,119,238,220,217, 91,167,211,125, 3,160,188, 54,163,203,136, 17, 35,206, 7,
+ 5, 5, 53, 94,187,118,109, 81,118,118,182,175,201,100,146, 27,141, 70, 70,173, 86,103,106,181,218, 99, 70,163,241, 24,128, 84,
+119, 2,235,233,233,217,254,149, 87, 94, 17,148,151,151,131,207,231,195,104, 52,162,168,168, 8, 61,123,246,228,237,219,183,175,
+ 77,125, 18,160,172,172,236,243,111,190,249,230,228,230,205,155, 7,123,121,121,117, 22,139,197, 33, 0, 44, 74,165,178, 80,173,
+ 86,255, 90,159,112, 86,171,231, 44,150,194,212,212,212,166, 94, 94, 94,120,248,240, 33, 44, 22, 75,225,227,150, 1,137,144,206,
+190,150,188,175, 97,171,128,198, 56,147,114, 30, 18, 33,157,205, 45,245,245,183, 7,235, 67, 5,123, 1,229, 64, 32,165, 36, 36,
+ 36, 72, 19, 19, 19,145,144,144,112,195,145, 69,139, 21, 92, 9, 9, 9, 55,216,251,236,238, 79,126,140, 48,214,110,209,170, 77,
+ 65, 2, 85,179, 11, 21, 10,133,175,143,143,143, 77, 96,229,229,229, 33, 47, 47, 15, 34,145, 8, 15, 30, 60,128, 72, 36,202,119,
+165, 19, 34,149, 74, 47,117,236,216,177,197,253,251,247,133, 31,127,252,113,195,212,212, 84,175,158, 61,123,182,149, 74,165, 22,
+ 66, 8,116, 58, 29,157,158,158,238,177,124,249,242,176,110,221,186, 25,186,117,235,118,121,219,182,109, 90,212,177,254, 21, 69,
+ 81, 23,243,243,243,155, 68, 70, 70,178,162,173,154,184,178, 23, 92, 64,213,144, 39,159,207,191, 92, 87, 64,249,124,254,181,219,
+183,111, 15,148, 73,196, 48, 40, 43, 97, 84, 85,194,172, 84,194,162,172,128,165,162, 2, 80, 87, 66,100, 54, 67, 96, 49, 65, 42,
+145, 32, 55, 39, 7,124, 62,255, 90, 93,156, 34,145,232, 90, 97, 97,225, 64, 31, 31, 31, 91, 35,106, 50,155,171, 54,139, 5, 6,
+179,217,102,209, 18, 8, 4,200,206,206,134, 72, 36,186,246,123,151,100,154,166, 45,236, 18, 14,181,196, 3,193,193,193, 76,247,
+238,221, 49,125,250,116, 88, 44, 22,107, 54, 80,253, 0,156, 65,149,127,203, 95, 18,142,196, 45,235,180,174,213,106,161, 82,169,
+ 80, 86, 86,198,151, 74,165, 45,194,194,194,206, 27, 12,134,237,102,179,249,219,204,204,204,202,218, 56,173,194,204, 38,186, 24,
+134, 1, 33, 4, 22,139, 5, 38,147, 9, 66,161,144, 57,117, 42, 25,203,191, 88,134,164,111, 55,146, 17, 35, 70, 80,251,246,237,
+ 3,195, 48, 57,191,115,244, 13, 86,209, 82, 87,165, 81,115, 73,133,247, 81,247,146, 10,181,113,218,247,254,236,207, 81, 14,238,
+121, 4,239,190,251,238, 97, 84, 13, 25, 22, 91,197,220,227,112,126, 86,190,229, 19, 9,204, 22,181,254,212,102,213,166, 59,149,
+234, 69,155, 86, 92, 50,136,120,149, 93,250, 6,183,107,210,184, 5,207,199,199,151,254,239,186,149, 37, 63,108,220,145,241,240,
+225,195,202, 47,191,252,178, 71,139, 22, 45,188,127,253,245,215,176,218,132,150, 76, 38,107,246,218,107,175,189, 82, 86, 86, 38,
+ 76, 74, 74,218,150,159,159,127, 9, 85, 75,203,216,207,160, 30, 6,224,123,171, 16, 13,182,214,115,103, 0,124, 92, 87,127,141,
+162, 40,252,252,243,207,143,204, 14,100, 30, 79,157,251, 68, 69, 69,189,116,255,254,253,211,133,133,133,255,170,121, 81, 40, 20,
+ 46,106,222,188,121,204,141, 27, 55, 62, 2,112,208, 29, 98,141, 70, 51,103,199,142, 29,159,242,120,188, 80,139,197,146,247,255,
+236, 93,119, 88, 20,215, 23, 61, 51,219,151,222, 97, 5, 65, 65, 84, 20, 53, 63, 75, 52,177,160,177,196, 88, 18, 19,193, 30,141,
+ 49, 26,147, 88, 99,139, 93,212, 24, 53,177, 17,187,198, 32,177, 18, 75, 68, 77,212,216, 21, 27, 6, 27, 54,164, 73, 7, 5, 22,
+182,239,206,204,239, 15,118,201,178,236,194, 46, 26,141,102,206,247,237,183,187, 51,111,206,123,111,234,153,251,238,189, 79,161,
+ 80, 76,123,102,139,150,150, 30,181,100,253,238,205, 10, 53,229, 47, 22,112, 50,148, 90,250, 51, 86,135,188,190,214, 44, 61, 10,
+140,172, 81, 5, 0, 8,147,255,137,250,135,145,154, 97, 24, 67,217, 2, 35, 43,150,218,196, 10,102,110, 93,193, 51, 36, 75,103,
+ 44,221,227, 44, 89,180,190, 1,240, 38,128, 43,121,121,121,171, 63,254,248,227,239,119,236,216,225, 40,149, 74,145,151,151,135,
+252,252,124,112,185, 92, 56, 57, 57, 97,221,186,117,138,188,188,188,213,198,219,160,106, 6,121, 0, 80,122,120,120, 92,139,137,
+137,241,217,180,105, 19,119,248,240,225,233,189,123,247,110,188,110,221,186, 20, 62,159,207, 80, 20, 69,168, 84, 42, 98,204,152,
+ 49, 65, 43, 87,174, 76,227,112, 56,118, 3, 6, 12, 32,236,237,237,175,160,154,180, 1, 5, 5, 5,199, 15, 28, 56,240,225,228,
+201,147,133,106,181,218,172, 37,203,176,204,197,197, 5, 23, 46, 92, 80, 23, 21, 21, 29,171,193,138,113,252,247, 35,135, 59, 13,
+ 29, 56,144,175, 45,149, 66, 91, 42,133, 78, 42, 5, 85, 90, 12,162, 76, 10, 30,165,131,152, 79,195,199, 79, 4,157,194, 1,135,
+175, 38,106, 85, 42, 85,181,137, 13,165, 82,233,241,243,209,209,157,223, 12, 8,224, 94, 24, 63, 30, 26,173, 22,239,221,191, 95,
+ 33,174, 52, 26, 13, 14, 54,111, 14,138, 32,240,198,232,209,120,168,211,233,164, 82,233,241,127,227,197,112,227,198,141,252, 33,
+ 67,134, 36,208, 52,221, 18, 47,104,210,204, 23, 1,173, 86, 91,197, 26, 69, 81, 84,185,213,177,220,114, 32, 56,124,248,112,167,
+164,164, 36,254,173, 91,183,112,238,220,185, 55,118,236,216,241,141,191,191,127,243,140,140,140,220,154,196,155,185,164,191,208,
+251, 31,238,217,185, 23,159,127,254, 57,145,155,155,139, 93,187,118,161,166,228,169,255, 4,134, 15, 87,210,209,209,162,186, 48,
+241,123, 50,147, 82,225, 47, 88,153, 82,193, 18,167,114,120,185,149, 76, 20, 93,158,108, 84, 57,188,124, 56, 80, 20, 93,163,165,
+ 12,195,149,195,165,122,135,248,156,231,192, 41,131,142, 18,171,207,236, 44,235,125, 36,163, 52, 62, 71,177, 16,192, 31, 80, 82,
+204,195,235,204,141, 86,173, 92, 61, 0, 64,165,164,124,130,131,131,195,184, 92,174, 0, 0, 28, 28, 28, 90,185,187,187,175,123,
+242,228, 73, 7,115,199,180, 79,159, 62,237,188,188,188,254,119,244,232,209,196,156,156,156,219, 0, 46,155, 22, 10, 10, 10,154,
+125,247,238,221, 54, 60, 30,143,168,225, 28, 1, 0,132,133,133, 53, 18, 10,133,238, 71, 30, 56, 67,202,111, 0,134, 83, 2,112,
+ 69,160, 92, 90, 32,157,223, 4,126,126,151,220,139,138,138,222, 40, 41, 41, 73,180,241,208,119,249,240,195, 15,127,138,142,142,
+246, 11, 11, 11, 99,174, 95,191, 78,154,142, 34, 4, 5, 5,245,136,143,143,111,249,217,103,159,109,216,189,123,247, 23,168, 28,
+105, 91, 19,210,245,249, 6,159, 27,142, 39,227, 4, 64, 5,232,109,102,172, 66,249, 15,192,150,148, 11,207,144,158,225,153,154,
+104,209,128, 97, 97,249,155,250,156, 88,111,106,181,218,191,110,220,184,113,112,192,128, 1,101, 79,158, 60,129,187,187, 59,234,
+213,171, 7,130, 32,176,110,221, 58, 69,106,106,234,175,250, 92, 90,111,102,103,103,191,175, 23, 91,230, 80,186,102,205,154,221,
+219,183,111,119, 73, 72, 72,224,232,116, 58,167,198,141, 27,203, 47, 94,188,232,192,227,241, 24, 62,159, 79, 39, 36, 36,216, 5,
+ 5, 5, 41, 9,130, 16,254,249,231,159, 79, 46, 93,186,228, 63,117,234,212,173,168, 28, 38,110,138,157,139, 22, 45,202, 74, 73,
+ 73,129, 74,165,130, 84, 42, 69, 73, 73, 73,197,167,184,184, 24, 37, 37, 37,224,241,120,200,205,205,197,190,125,251,114,244, 89,
+226,171,179,108,172,253,113,221,250,130,156,140,116, 56,217,137,161,147, 22,131, 42,121, 2,148,150, 64,160,213,192,158, 71,161,
+110, 3, 49, 68,118, 78,200,147,150, 33,250,226,213, 92,125,150,120,203,230, 2,181,122,237,184,149, 43,243,116,124, 62, 2, 34,
+ 34,160,209, 15, 21, 26, 11, 45,138, 32,224,223,181, 43, 72,103,103,124,251,235,175,121,250, 44,241, 47, 20, 52, 77,115,212,106,
+117,117,253, 0, 77,211,153, 73, 73, 73,187, 1,156, 38, 8,130, 33, 8,130, 65,121,178,182,178, 87,249, 66,214,106,181,152, 59,
+119, 46,248,124, 62,230,206,157,139,121,243,230,225,251,239,191,199,250,245,235,241,203, 47,191,224,240,225,195,245,207,159, 63,
+207, 63,123,246, 44,179,100,201,146,194,160,160, 32,206,232,209,163, 93,196, 98,241,164,234, 56,167, 77,155, 6, 71, 71, 71, 76,
+155, 54, 13,203,150, 45,195,150, 45, 91,112,240,224, 65, 92,184,112, 1, 28, 14,135,206,204,124, 12,165, 82,201,172, 89,179, 38,
+235,224,193,131,138,213,171, 87,131,203,229, 18, 47,233, 38, 49, 73, 47,168,140, 45, 65,166, 41, 21,158, 0, 88,133,154,125,163,
+ 44,113, 66, 20, 29, 93, 87, 47,142,146,141, 4,209, 33, 0,147, 81,125,120,181,129,227, 11, 0, 62,207,129,115,150,120,200,156,
+ 36,151,205,247, 30,197,231, 40,102, 1,248,221,208, 39, 39, 39, 39,241,254,253, 7,184, 0,240,107,236, 62,222,253,251,247,157,
+ 15, 28, 56, 32,242,242,242,194, 47,191,252, 34, 18,139,197, 94, 22, 56,169,131, 7, 15,170, 4, 2,129,251,168, 81,163,122,182,
+105,211,102,162,254, 69,180, 43,128,166, 40,143, 94,236,254,232,209,163, 59, 30, 30, 30, 15,142, 29, 59, 38,179,230, 0,149,150,
+150,110,253,249,231,159,235, 61,165,220,112, 68,246, 33,162,233,229, 56,236,242, 19,210, 3,230,193,174, 78,107, 12, 30, 60,184,
+ 14, 69, 81,155,109, 60,238,131,251,245,235,247,115,116,116,180,223,168, 81,163,114,175, 95,191,158, 7, 32, 26, 64,140,241,231,
+238,221,187,133, 31,127,252,113,206,230,205,155, 37, 3, 6, 12, 88, 15,160, 63,251,232,103,193,162,242,187, 16,106,138, 58, 52,
+243,192,173,248,157,159,159,191,166,168,168,232,194,195,135, 15, 39,168,213,106, 9, 65, 16, 12,159,207,207,205,203,203, 91,109,
+148,176,212,156, 95, 73, 55,232,115,109, 16, 4,161,101, 24, 38,179, 75,151, 46,147,186,118,237, 26, 21, 23, 23,167,236,220,185,
+ 51, 98, 99, 99, 61,186,116,233, 34,167,105,154, 57,114,228,136,199,187,239,190, 43, 63,125,250,180,108,204,152, 49,141, 27, 54,
+108, 56,122,218,180,105, 5, 4, 65,208,230, 56, 13,207,178,226,226,226,126, 61,123,246,188,240,235,175,191, 58,185,184,184, 64,
+167,211, 65, 46,151, 67, 46,151,131, 97, 24, 56, 59, 59,163,160,160, 0, 11, 23, 46,148,150,148,148,124, 96, 70,184,153,114, 42,
+149, 74,101,255, 47, 38, 78, 62,190,122,193, 92, 71,255,250,245,241,228,158, 18, 58,165, 28, 60,134, 68,221, 70,206,224, 11,196,
+120,120,191, 20, 83,118,239, 47, 85, 40,149,225,102,222,150,171,112,150,148,148,244, 31, 62,111,222,137, 13, 83,167, 58,252,207,
+219, 27, 28, 14, 7, 42,149, 10, 20, 69,129,199,227, 33,116,248,112,240, 61, 61, 49,123,247,110,153, 84, 42,237,143,170, 83,241,
+152,114, 62, 15, 24,115,126,113,227,198,141,143, 67, 66, 66, 48,118,236, 88,244,235,215,175, 82,193, 3, 7, 14, 96,253,250,245,
+ 80,169, 84, 31, 3,184, 14, 96, 29,202,135, 58, 96, 34,178,254,233,118, 62,119, 78,138,162,138,238,223,191,239,180,124,249,114,
+ 66,163,209, 96,193,130, 5, 48, 8, 78,195,121,253,229,151, 95,214,113,116,116,196,252,249,243,213,133,133,133,239, 44, 91,182,
+236,100, 76, 76,140,199,214,173, 91, 7, 3,152,102,202, 73,211,116,254,205,155, 55, 29, 55,108,216, 64,234,116, 58,172, 88,177,
+162,202,240,228,200,145, 35,161,209,104,193,225,112,213, 74,165,170,169, 88, 44, 78,118,119,119, 23, 51,149,157,187, 94,228,254,
+244, 69,121, 10, 3, 99,199,119,181,177,127, 22, 44,167, 84,176,133,179, 64, 20, 29,221, 89, 57,124,248,105,189, 32, 74,210,151,
+137, 53,152,244,109,224, 52, 8,194,218,112, 30,215,127,106,132, 82,169, 68, 65, 65, 1, 10, 11, 11,225,226,226, 2, 14,135, 67,
+ 88,106,167, 74,165,186, 53,101,202,148, 27,155, 55,111,238, 22, 31, 31,223,247,236,217,179, 93, 78,156, 56,161, 76, 79, 79,215,
+105,181, 90, 70, 34,145,112, 59,116,232, 32,234,213,171,151,189, 80, 40, 36,103,205,154, 85,184,120,241, 98, 15, 84,246, 97, 51,
+237, 59,135, 32, 8,124,221,169, 20,211,186,112,160, 86,107, 80, 92, 92,140,172,172, 76,220,185,115, 7,241,241,247,192, 48, 12,
+105,195,113,119, 7, 48,107,215,174, 93,190, 2,129,128,216,189,123,119,157,221,187,119,215,104, 73,221,177, 99, 71,157, 61,123,
+246, 68,234, 71, 47, 50, 95,197,235,157,229,252,215,114,190,202, 48,205, 12,143, 26,133,150,254, 62,255, 38,244,147,146,106,181,
+218, 43,102, 82, 56,124, 3, 96,174,145, 21,172, 38,115,158,148, 97,152,115,221,186,117,251,178,107,215,174, 43,123,244,232,145,
+147,147,147, 19,184, 98,197, 10, 63,157, 78,167,185,115,231, 14,153,156,156,156,126,237,218,181, 6, 13, 27, 54, 28,125,247,238,
+221, 51, 4, 65,104,172,232,224,157,228,228,228,246, 93,186,116,217, 55,122,244,104,255,118,237,218, 9, 92, 92, 92,192,229,114,
+145,146,146,130,196,196, 68,245,158, 61,123, 50,139,139,139,109,153,130,231, 74, 90, 86, 86,247, 1, 95, 77,248,117,116,191,190,
+ 30,109, 27, 55, 18, 72, 36, 18, 64,161,192,189,140, 92, 92,186,151,168,217,114,238, 82,129, 74,165,234, 15,235,167,224,185,114,
+237,225,195,110,239, 76,157,250,107,228,208,161,222,200,201,225, 74, 36, 18, 8, 4, 2,164,166,166, 34,153,166,117, 75, 55,110,
+204,211,139,172, 23,157, 21, 94, 8, 96, 57, 77,211, 92, 0, 16,139,197, 24, 55,110, 28,140,167,220, 89,191,126, 61, 20, 10, 5,
+ 0,112, 9,130, 88, 14,224,167, 87,221,138,101,192,211,167, 79,103,191,247,222,123, 75,184, 92,174,197,172,183,174,174,174, 40,
+ 45, 45,133, 78,167,163,178,178,178,238,185,186,186,130,199,227,129, 97, 24,179,215,209,147, 39, 79,102,247,239,223,127, 17, 73,
+146,150, 44, 31,112,114,114, 74, 63,121,242,100,240,103,159,125, 70,110,219,182, 45,101,212,168, 81,194,147, 39, 79, 82, 12,195,
+236,123,209,251,160, 99,199,157,192,134,225,225, 0,194,129, 42, 14,239, 89,250,101, 54,165, 84,232,216,113, 39, 54,224,111, 78,
+227, 97, 60,131, 32,210, 91,161,154,136,162,163, 87,162,220,207,162, 90,238,142, 59, 59, 98,195,112, 60, 87, 78,107, 96,172,125,
+101, 50, 25, 40,138,170,206,154,247, 87,108,108,236,202,107,215,174,121,126,249,229,151,129, 67,135, 14,117,234,210,165,139,131,
+113, 1,133, 66, 65, 31, 58,116, 72,182,126,253,250,146,115,231,206,165,141, 28, 57,178, 93,117,237,204,200,200, 56,252,237,183,
+223, 58,247,234,213,171, 33,128, 10,255,172,130,130, 2,164,167,167,227,214,173, 91,233, 26,141,230, 55, 27,186,244, 4, 64,228,
+160, 65,131,150,111,223,190,189,206,168, 81,163,114,247,236,217,115, 11,229, 9,139, 77,225,210,175, 95,191,230,219,183,111,151,
+140, 26, 53, 42, 23,229,126,100,153, 96,193,130,133, 1,157, 81,213, 79,171,218,145,137,159,213,106, 53,163, 84, 42, 25,185, 92,
+206,148,149,149, 49, 48, 63, 11,252,193,236,236,108, 38, 51, 51,147,201,200,200, 96,210,210,210, 24, 0,191,152, 40, 94,115, 55,
+ 44,251, 29, 59,118, 52,240,245,245, 93, 96,103,103,247, 7,135,195,145,114, 56, 28,169, 80, 40,252,221,221,221,125,222,210,165,
+ 75,125, 25,134,225, 87,163,162, 45,129,203,227,241, 62,243,242,242, 58,232,230,230,150,233,234,234,154,233,229,229,117,144,199,
+227,125, 14,128, 87,131, 50,183, 4, 17,151,203,157, 98,111,111,127, 92, 40, 20,230, 11,133,194,124,123,123,251,227, 92, 46,119,
+ 10,170, 79,164, 90, 45,167, 64, 32,152,226,233,233,121,220,201,201, 41,223,201,201, 41,223,211,211,243,184, 64, 32,120, 22,206,
+103,121, 43, 49, 8, 45, 57,163, 7, 65, 16,218, 55,222,120, 99, 67,203,150, 45,215,181,108,217,114, 93,139, 22, 45, 54,233,173,
+146,140,222,218, 34,135,229,228,141,255,100, 59, 95, 26,103,104,104,104,204,246,237,219,233,217,179,103, 75, 27, 54,108,248,116,
+246,236,217,210,237,219,183,211,161,161,161, 49,181,229,244,246,246, 14, 8, 13, 13,125,186,121,243,102,221,253,251,247,153,205,
+155, 55,235, 66, 67, 67,159,154,100,134,127, 17,125, 39, 0, 4,233,173, 63,191, 1,216,139,114,231,119, 95, 0,196,112,229,112,
+ 70, 31,125,248, 7,128, 30, 22,142,189,181,156,126,202,225,195, 25,189, 79,213, 49, 0, 73, 70,255,195, 80,217,255,235, 69,112,
+154, 69,211,166, 77, 31, 50, 70, 80,171,213, 76, 65, 65, 1,115,255,254,125,230,220,185,115,140,159,159,223, 67, 43, 56,221, 1,
+140, 1,112,200,199,199,231,238, 91,111,189,149,209,190,125,251,140,128,128,128, 20, 30,143, 23,143,242, 12,239,161,250,207,114,
+ 0, 13,107,224,124,203,197,197,229, 91, 63, 63,191,223,130,131,131, 47,212,171, 87, 47,222,205,205, 45, 78, 36, 18,125,135,191,
+ 51, 99,219,122,206,119,249,240,195, 15,211,203,202,202,168, 86,173, 90,221, 53,183, 81, 72, 72,200,249,178,178, 50,106,224,192,
+129,153, 0,250,252, 23,174,119,150,243,165,112,254,167, 16,172, 23, 76, 7,141, 62,223,152, 41,247,141, 73,153,159,245,219,214,
+120, 32, 24,134,225, 48, 12, 99,207, 48,140, 51,195, 48,110, 12,195,184, 48, 12,227,192, 48,140,176, 6,243, 55,123, 98,255,115,
+156, 95,232, 5,148, 92,255,219, 20, 53,173,127,173,247,167,175,175,175,107,155, 54,109,190,218,191,127,255,148, 71,143, 30, 77,
+217,191,127,255,148, 54,109,218,124,229,235,235,235,250, 44,237,244,246,246, 14,104,210,164, 73, 84, 72, 72, 72,102,147, 38, 77,
+162, 76, 68,214,139,236,187, 64, 47, 98, 66,244,159, 64,253, 50, 2,229,185,176,214,234,133, 77,144,133, 55, 53, 91, 56, 13,124,
+191, 1,120, 87,255,249, 77,191,204,239, 37,112, 86, 65,253,250,245,143, 54,111,222,252, 97,139, 22, 45,146, 91,180,104,241,176,
+105,211,166, 15, 27, 55,110,252, 48, 40, 40,232, 97,221,186,117, 31,122,120,120, 28,173,197, 49,114, 3, 32, 65,213,105,192, 94,
+246, 57,223, 57, 52, 52,244,146, 72, 36, 50,155, 27,140,203,229, 70,182,104,209,226, 38,202, 35, 37,217,251, 39,203,201, 10,173,
+127, 17,216,147,240,213,227, 20,162,250,105, 70,106, 90,207,238,207, 87,155,211,236, 92, 93,122, 33, 19,168, 23, 56,130,231,192,
+105,204,103, 56,167,130,140, 68,211,203,224,100,207, 37,150,147,229,100,133,214,115, 7,151,221, 5, 44, 76,160,122,198,245, 44,
+ 94,109,216,146, 19,235, 89, 56,205,241, 61,122,201,156, 44, 88,176, 96,241,188,238,157,157, 1,156, 49,188, 21, 90, 82,165,182,
+ 68, 19,212, 70,217,158, 96, 57, 89, 78,150,147,229,100, 57, 89, 78,150,243, 63,199,105,192, 74, 11,203,239,153,252,223,244,138,
+ 10,175, 23,146,166,135, 53,171,178,156, 44, 39,203,201,114,178,156, 44, 39,203, 89, 91,140,126, 69, 69, 86,152,225, 15, 59,116,
+200,130, 5, 11, 22, 44, 88,176, 96,241,252, 80,115, 30,173,189,123,247,114, 12,191, 7, 13, 26, 52,146,162,168,175, 12,255, 57,
+ 28,206,143,187,118,237,250,169,186, 26, 34, 34, 34,168,234, 56,205,161,166,122,204,113, 54,109,232, 52,214,221,217,110, 66,113,
+137,124, 85, 74, 54,117, 78,169, 84, 54, 49,172, 19,137, 68, 73, 63,253,244,211,131,231,221,206,145, 35, 71, 54, 52,173,167,158,
+ 31,175,179,155,163,104,220,211,226,178, 21,183, 31,150,109, 98,207,177,151, 2, 15, 0,125, 28, 69,252,247,155,186,240,223,186,
+245, 68,121, 81,166,161, 14,161, 60, 26,182,232,117,236,176,143,143, 79, 99, 39, 39,167, 97, 0,154,202,229,114, 47, 59, 59,187,
+124, 0,119,164, 82,105, 76,110,110,238, 61,107,121,194,234, 33, 29,128,191,254,111,198,153, 52, 4, 88,179,174, 38,244, 8,130,
+146, 1,132, 4, 1,205,177,228,191,157,209,223,109, 0, 37,205, 84, 93,222,163, 1,212, 12, 3, 62, 1,168,142, 61,130,232, 53,
+ 58, 84, 78, 0,186,163, 60,133,195, 13,148,167,159,144,179,151, 44, 11, 22,175, 21, 76,135, 10, 43,254,115, 45,136,137, 78,124,
+ 46, 17,197,128,113, 1, 24,119,149, 74,197, 19, 8, 4, 80,171,213,176,179, 19,175, 29, 51,106,228, 2,144, 40,214,234, 48,238,
+167,159,126,170,245, 76,215,182,212, 3,224,148,233,246,174, 78,226, 69,167, 15, 77,119,237,212,123,233,119,234,212,194,105,165,
+165,165,164, 80, 40,132, 74,165,130,179,179,115,251,177,163, 71,183, 34,121,140,154,207,183,191,184,114,229,202,220,218,182,115,
+210,164, 73, 62, 26,141,242,109,154,166, 5,106,181, 90,104, 90,143,179,157,253,210,211,135,166,219,133,245,249,110, 1,192, 10,
+173,151, 0, 65,128,171,253,153, 85,131, 58,135,188,213, 52, 24,244,157,179, 80,170, 53,239,159,206, 44,123,127, 94,124,246,228,
+204, 50, 77, 75, 60,135,132,149,255, 34,112, 2, 3, 3,191,244,244,244, 28,184,113,227, 70,126, 96, 96, 32, 68, 34, 17, 20, 10,
+133,228,209,163, 71,146,177, 99,199,134,137,197,226,221, 41, 41, 41,107, 97,221, 68,112,254,167,127,158, 3, 0,104, 63,108,161,
+ 63,202, 39,139,150,155,174,235, 60, 98,161, 63,128,169,168, 60, 49,114, 14,202, 83, 40,152,187,235, 8,226,182,127,143,247, 63,
+158,194, 5, 48,182,162,241, 36,240,251, 47,171,209,115,208,132, 74,203, 9, 6,220, 67,219,191, 71,159,143,167, 88,156, 71,241,
+221, 96, 66, 75,211,140, 69, 75, 60, 73, 18,186, 63, 30, 50,230, 38, 24,206, 67,121, 14,176, 42,148, 40,159,208,217,108,249,222,
+141, 57,121, 26, 45,101, 54,225, 44,159,199,201, 63,124,143,170,178,237,240,255, 65,171,165,202,239,173,124, 46,168,131, 41,206,
+167,103,205,154,197,237,211,167, 15,182,108,217,210, 97,211,166, 77,163, 75, 75, 75,255,212,239,183,100,246,242,101,193,226,181,
+ 22, 92,230,133, 22,151,131, 13,191,253,250, 83,131,188,252, 66, 12,255,236,107,236,220,185, 19, 69, 69, 69,112,117,117,133,128,
+207,231,173, 90, 62,199,199,201,201,222,103,248,232,105, 27, 0, 52,174,109,107,108,172, 39,216,116,123, 66, 63,149, 14,151, 67,
+242, 4, 2, 1,185,123,247,110, 20, 23, 23,195,197,197, 5, 2, 1,143, 92,249,221, 55, 98, 39, 39, 7,241,167, 95,204,232,128,
+242,252, 63,181,130, 90, 93,214, 97,255,206,159,156, 10, 10, 10, 48,226,243,105, 48,173,135,207,231, 83,134, 7, 11,123,142,189,
+ 20,204,218, 56,238,227,144,102,142,128,230,246, 5,240, 56, 28,216, 57,187,162, 59,151, 3, 14,129, 38,195,255, 72,155, 9, 96,
+222,235,210,217,192,192,192, 47, 35, 34, 34, 6, 46, 90,180,136, 79,146,229, 41,231,100, 50, 25, 20, 10, 5,124,125,125,113,250,
+244,105,254,236,217,179, 7, 30, 56,112, 0, 41, 41, 41,107,108,229,191,125,251,118, 61,127,127,127, 37, 0,244,109,238,104,186,
+ 46,192,176, 14, 0, 28, 29, 29,107,228,115,119,177, 87,221,190,125,169,169, 97,187, 47,187,250, 82, 22,150, 43, 1,216, 85,199,
+ 69,211, 12,247, 88,212, 88,139,235, 63, 91,180, 67,119, 99,239,185,198,129,129,129, 10,227,229, 14, 14, 14,150, 54,241, 46, 43,
+ 43,243, 55, 93,104, 40,175,209, 82, 94,150,234,235, 49,110,189, 89, 1,166,165,192,221,177, 99, 7, 0,224,135, 41, 67, 56,155,
+ 47, 23,114,185,220,242, 91,237,242,229,203, 17, 25, 25, 41,248,227,143, 63,122,109,223,190,189,215,193,131, 7, 87, 89, 18,170,
+ 44, 88,176,120, 37, 69,150,241,183,101,161, 69, 18,132,163,147,163, 3,194, 7,143,193,209,163,191,163, 83,167, 78, 21,235,234,
+215,175,143,136,254, 31, 96,215,207, 43, 1,192,241, 89, 90,244,172,245, 20,149,200,230,245, 28, 24,181, 48, 35,183, 44, 62, 46,
+ 46, 14, 29, 59,118,172,180,253,224, 1,225,248,101,235,114, 84,147,101,222, 42, 16, 12,201,119,116,178,199,160,225,159,195, 92,
+ 61,163, 71,244,139,123, 55, 98,117,183,188, 39,178,149,236,121,246,226,209,192,199,189, 71,243,144,198, 40,218,183, 22,137,197,
+ 74, 28,205, 86,226,211,238,109, 17,234, 38, 70, 71, 29, 5, 31,123,222, 59,185, 50,237,107,109,100,132,121, 0, 0, 32, 0, 73,
+ 68, 65, 84, 33,180,124,124,124, 26,123,122,122, 86, 18, 89,165,165,165, 40, 43, 43,131, 84, 42, 69,105,105, 41, 72,146,196,180,
+105,211,248,103,206,156, 25,232,227,227,115,194,138, 97,196, 12,189, 37, 11,224,240,202,230,206,157,171,242,242,242, 82,217,217,
+217, 49, 92,190,176,180,243,136,133,142, 0, 64,114,249,165,171, 86,173, 82,251,250,250, 42,185, 92,174, 96,194,132, 9,164, 53,
+109, 86,169, 84,140, 49,167, 90,173,170, 88,190,116,233, 82,181,183,183,183,202,206,206,142,209,104,172, 55, 58,222, 76,125, 10,
+ 33,159, 3, 33,159, 3,145,128, 7,199,122,109, 32, 44,186, 5,157, 78,135,101,203,150,105,124,124,124,212,118,118,118,140, 64,
+ 32,224,143, 31, 63,190,198,118,142, 28, 57,146,113,113,113,209,216,217,217,241, 35, 35, 35,171, 68, 10,157,188,145, 5,177,128,
+ 7, 59, 33, 23,193,245,253, 32,100, 20, 86,183,149,195,169,236,141, 32, 20, 10,209,161, 67, 7, 52,109,218, 20, 7, 15, 30,236,
+204, 10, 45, 22, 44, 94, 11, 88,140, 48,228, 2, 64, 92, 92, 92, 24,202, 39, 68, 68,159, 62,125,136,242, 45, 24, 76,253,178, 63,
+ 62, 29, 49, 8, 20, 69, 87,204,243, 69,144, 4,190,248,164, 23,104,218,154, 17,137,154, 67, 60,107, 81, 79, 5, 39, 67,144, 28,
+ 0,104, 16, 32, 97, 70,127, 58, 20, 20, 77,255, 61, 80,194, 1,198,140,232, 89,190,236, 57,180,147, 3, 10, 95,143,253, 8,230,
+234,105,220,160, 14,169,211, 40, 65, 84,158,236,241,159,152,108,147,229, 52,131,166,117, 37, 65, 90,133, 2, 74,165, 22,209,247,
+158, 42,142,103,201,188, 72,151,180,130,213,225,237, 68,156,130,108, 4, 56, 10,130,115,101,218,215,162,239, 78, 78, 78,195, 54,
+110,220, 88, 69,100,229,229,229,145,101,101,101,208,104, 52,116,105,105, 41, 40,138,194,140, 25, 51,120,179,103,207, 30,150,155,
+155, 27,105,208, 60,230, 56,245,126, 87, 83,111,223,190, 29, 48,107,214, 44,205, 59,239,188,147, 81,191,126,125, 25,135,195,129,
+ 68, 34, 89,221,189,123,119,183, 69,139, 22,105,122,245,234,149,198,225,112, 16, 28, 28, 44,187,117,235, 86, 0, 0,177,181,125,
+ 55,230,252,233,228,143, 12, 0, 16, 4,129,238,221,187,167, 7, 7, 7,203, 56, 28, 14, 30, 28, 90,202, 88,187, 63,121, 92, 18,
+ 13,125,157,245, 55, 17, 2, 16, 59, 84,120,226,117,239,222, 61,179,113,227,198,101, 36, 73,226,230,205,155,126,168, 58,173, 85,
+ 21, 78,177, 88,172, 29, 60,120,112,198,189,123,247,204,149, 7,151, 67,162, 93, 99,189, 1,203,183, 37,144,121,222, 98, 59,121,
+ 28,232,102,127, 57,132,235, 34, 2,132,142, 30, 42,169, 84, 10, 39, 39,167,114, 11,153, 70,131,191,254,250, 11,111,189,245, 86,
+216,222,189,123,207,176,215, 59,203,201,114,254, 13,115, 90,228, 21,180,102, 25, 79,116, 95,201, 71,235,180,105,167, 40, 74,135,
+250,254,222, 88, 58,103, 36, 40,138, 6, 69, 81,208,233,191, 41,138,130, 86,163,121, 46, 45,123,150,122, 92,157,196,139,126,223,
+ 61,206,245,157,126,203,187, 46,153, 53,226, 56, 69, 1, 52,173,133, 86, 11, 80,180, 22, 52, 69, 65,171,125, 62,174, 57, 90,154,
+ 70,128,159, 15,150,204, 26, 1,211,122, 98,118,237,237,123,242,183,105,118,157,250,124,247,245,131,116,249, 50, 86,216,191, 88,
+136,248, 66, 46,195, 21, 65,173,214,161, 84, 77,171, 1,200,148, 90, 90,195,216,123,136, 0,128, 75, 18,175, 83,116,109,211,192,
+192,192, 74, 34,235,251,239,191,247, 88,183,110,157, 47, 0,244,239,223, 63,171,107,215,174,133,247,239,223,135, 68, 34, 33, 10,
+ 11, 11,123, 3,152,160,223,118, 42,128,117, 22,120,101,254,254,254, 74, 79, 79, 79,149, 65, 16,145, 36, 9, 46,151, 11,127,127,
+127,165,151,151,151, 42, 56, 56, 88,198,231,243, 65,146, 36, 12, 66,207,170,215, 60,130, 0,135,195,129,129,211,212,218, 99,224,
+180, 5, 60, 46, 89,245,246,102,196, 73,146,164,217,250, 44,158, 67, 34, 17, 3,192, 98,121, 14,105,116,123,228, 86,239, 33, 16,
+253, 23,120, 0, 78, 51, 12,131,235,215,175, 35, 37, 37, 5,124, 62, 31, 62, 62, 62,136,140,140,132, 74, 85,174,119, 35, 34, 34,
+194, 0,220,100,175, 96, 22, 44, 42,112,250, 21, 20, 88,166, 86,173,234,125,180,226,226,226,194,250,244,233,115,198, 32,128,202,
+197,142, 25,241,163,213, 65,171,213, 0, 12,243, 92,132,150,165,122, 40,138,174,182, 30,131,143, 22, 77, 51, 92,179, 34,139,166,
+161,211,106,159,203,222,163, 41, 45,104, 90, 11,115,245, 16, 4, 73,233,111,248,124,246, 58,121,241,240,241, 15, 32,181,254,245,
+113, 78,167,132,175,187, 80,128, 66, 5, 2, 27,133,112,254,146,107,113,225, 70, 18, 60, 28,156, 94,155,227, 34,151,203,189, 68,
+ 34, 17,100, 50, 89,133, 37,107,221,186,117,190,106,181,154, 4, 0, 46,151,231, 87, 64,251,138, 40, 26,112,118,202, 65, 81, 81,
+137, 59,195, 48,132, 94,240, 44, 7,240, 19,170,201,238,207,231,243, 43, 4,138,177, 0, 18, 10,133,181, 18, 48, 6, 24,196, 25,
+159,207, 55,187,220,116,120,173, 38,240,141,133, 22,152,114,171,150,137,216,226,112, 56, 48,248, 70,213, 4,129, 64, 80,209,119,
+115,224,114,140,234,227,216,238,138,169,209,104, 80, 86, 86,134,226,226, 98,136, 68,229, 6, 51,134, 97, 64, 16,196, 4, 0, 19,
+217,171,152, 5, 11,243, 90,228, 21, 22, 91,230,133, 22,202, 77,118, 4, 0,232,180, 26,179,226,103,239,161, 11,200,200,149,193,
+199,227, 10, 24, 27,179,158, 14, 28, 56,240,103,137, 68,210,206,240, 95, 40,118,112, 31, 61,110, 62,116, 58, 13, 28,197, 36, 62,
+ 27,214,179,146,200, 42,183,104,169, 45,206, 9, 82, 84, 34,155,215, 51, 98,205, 66,103, 39,247,120, 83,241,179, 36, 58, 33,188,
+ 72,170,242, 35,201,171, 40, 34, 36, 84,196,152,249, 35,141,110,238, 55,118,175,159, 59,217,106,123, 32, 65,242,194,199,174, 30,
+205,112, 29,154,216,145,165,103,167,143,104,187,223, 88,204,185,185,185,197,245, 8, 95,213, 45,239, 41,235,163,245, 50,224,232,
+236, 66,250,181,238,140,214, 19,162,112,242,155,233, 12, 80, 4,119,137, 47,217,229,203,197,112,104,221, 23,151, 62, 27, 70, 3,
+ 79, 95,139,190,218,217,217,229,203,229,114,137, 66,161,128, 84, 42,133, 84, 42,173, 44, 8,120, 60, 98,244,231, 95,121,240,248,
+ 2,104, 53,106, 28,141, 89, 92, 35,167, 33,133, 67,223,230,142,224,240, 4,165,119, 2, 3, 87,115,185, 92,144, 36,137, 67,107,
+167, 79,216,183, 98,156, 35, 0,220,136, 91, 43, 29, 52,237,199, 53, 36, 73, 66,165, 82, 9,109,105,247,227,199,143,253, 84, 42,
+149, 82, 47,208, 12,194, 15,169,169,169,117, 85, 42,149,194,120,185, 53, 16,219, 57, 2, 46,245, 1, 59,175, 42,214,179,180,180,
+180, 58, 90,173, 86,206,229,114,161, 86,171,173, 82, 69, 36, 73,242,111,222,188,233, 71,211,180,217,242, 77,131,234, 0, 62,205,
+ 1,129,179,213,125,102,172,120, 17,213,139,173, 23,150, 65,154, 5,139, 87,197,178,245, 10, 94, 19,132,133,223, 21, 66,171,115,
+ 92, 92, 28, 99,252,134,168,211,106,245, 34,235,111,209, 67, 81, 52,178, 11,148,184,127,255, 1, 86,173, 90,133, 11,151,166, 56,
+ 47, 90,180, 72, 56,123,246,108,213,192,129, 3, 87,208, 52,221,130, 36,201, 27,248,123,168,162,178, 85,136,166,235, 38, 36, 36,
+ 4, 26,254,107,181, 90, 56, 58, 58,194,209,209, 17,141,131,253,170,136, 44,138,162,160,169,102,232,208,224,163, 69, 48, 52,163,
+213, 82,160,104,186, 66,252, 20, 73, 85,126,191,157,184,222,192,168,120, 35,195,143, 14,109,154, 88, 22,131, 99, 35, 43,250,177,
+123,253,220,201,139,182,108, 17, 22, 81,158,227, 7,133,127, 26, 26, 49,104, 24, 6,127,244, 94,152, 74,173, 62,200, 33, 25, 90,
+ 91, 81, 31, 72, 48, 48,245,209, 98,241,130,144, 92, 44,211,242,132, 98, 56,248,212,195,131, 50,138,207,225,112,174, 60, 42,150,
+243, 73, 14, 23, 36,151,143, 59, 69, 74,237,107,212,221, 59,201,201,201,146,186,117,235, 66, 42,149, 66,167,211,209,253,251,247,
+207,226,114,121,126, 92, 30,143,232, 51,232, 43, 58, 55, 55, 91, 75,146, 28, 48, 12,133,247, 34,198, 18, 66,145,152,175, 81,171,
+117, 40, 31, 58, 52,103,205, 50, 78,225,224,216,189,123,119, 55, 67, 36,224,190, 21,227, 28,141,214, 57,181,106,213,202,205, 56,
+234,208, 74,107, 17, 49,112,224, 64,177,191,191, 63, 1, 0, 87, 99,102, 25,172,103, 68,223,190,125, 69,254,254,229,126,248,127,
+174, 29,103, 53,167,135, 29, 3,148,164, 2, 37,105, 85, 44, 89,125,251,246, 21, 6, 6, 6,218,116, 45,234, 29,224, 45,230,238,
+178,231,234,128,220,235, 86,113, 13,255, 31,180,190, 14,224,174,120,143,132,192,193, 93,213,110,250, 31,151, 89,177,197,130,133,
+ 85, 48,209, 34,175, 20,194,244, 2,177,179,254,187, 66,112,113, 1, 64,111,162, 35,140,116, 22,180, 58, 77, 21,145, 69, 81, 20,
+120,132, 10,171, 86,173,194,196,137, 19, 1,128, 63,121,242,228,253,139, 22, 45,250,144,166,233, 22, 12,195,116, 36, 8,162,186,
+183,198,211, 18,137, 36,143, 97, 24, 30, 73,146, 29,215,174, 93,235,214,171, 87, 47, 56, 58, 58,130,161,153, 42, 34,139,162,104,
+104, 52,106,139,211,220,186, 58,137, 23,253,190,119,188,235, 59, 31, 44,239, 74,209,244,113,131,200,162, 41, 10,160,203, 55,122,
+146,159,133, 99, 71, 15, 98,195,250, 13, 69, 32,152,187, 96, 64,235,197, 32, 44,136,193, 22,231,175, 38,117,236,208,166, 9, 22,
+109,217, 34,188,157,144,179,255,171, 73, 51, 67, 35, 6, 13,195,222, 93, 49, 32,117,197,215,141, 69, 22,165,165, 81, 82, 84,216,
+247, 20,235,163,245,178,224,118,236,248,113, 98,216,176, 97,116,105,105, 41,248, 2, 1,173,213,106, 57,111,191,253, 54, 53,113,
+226, 68, 50, 55, 55, 23,210,210, 50, 46, 0, 55,188, 6,102, 45,169, 84, 26, 51,118,236,216,176,179,103,207,242, 73,146,132, 84,
+ 42, 69,151, 46, 93, 10, 11,104, 95,209,232,207,191,242,200,206,206,210, 57,137,185, 42, 62,159,135,252,252,124, 58,172,215, 16,
+197,160,145, 19,235, 76,156,181,100, 99,206,197,245,235,172,169,195, 56, 18,208,116,221,230,205,155,213,190,190,190, 74,161, 80,
+ 40, 24, 49, 98,132, 85,227,135,106,181,154, 89,186,116,169,202, 52,186, 80,173, 86, 51,171, 86,173, 82,251,249,249,169,196, 98,
+ 49,163,213,214,236,247, 73,146,132,238,179, 69, 59,116, 58,157,174,146, 21,203, 32,178,180, 52, 81, 22, 21, 21,165,241,243,243,
+ 83,219,217,217, 49, 66,161,144,111, 77, 59,191,250,234, 43,198,213,213, 85, 99,111,111,207,159, 54,109,218, 51, 69, 29,106, 41,
+112, 23,173,173, 72,239, 32,116,116,116, 68,105,105,105, 69, 91, 37, 18, 9, 43,182, 88,176, 48,131, 42, 90,228,213,180,194, 89,
+151, 71,139, 6,202,242,242, 11,189, 60,188,235, 65,167,211,233, 63, 90,232,180, 90,140, 31, 51, 8, 43,214, 71, 1,128, 65,108,
+117,159, 60,121,242,126, 0, 53,222,204,118,239,222,189,112,242,228,201, 78,121,121,121,127,252,252,243,207,110, 67,134, 12,193,
+212,169, 83,177,124,249,114,240, 4, 34,184,121,214,173,168,199, 80,111, 97,193, 83, 48, 96,202, 44,216,233, 52,229, 55, 41,112,
+221, 61, 3,160,165,180,160,181, 90,104,181, 90, 16,156,242,174, 29, 59,122, 16, 67, 62,249, 10, 60,161,147,235,143,171,150, 41,
+ 66, 91, 75, 62,156, 61,106,148,202, 10, 35, 32,121, 59, 33,103,255, 87, 19,167,117, 55,136,172, 95, 99,214,223,253, 97,198, 7,
+ 59,133, 2,110, 69, 61, 90,154, 6, 73,114, 88, 31,173,151, 36,178,132, 66, 97,236,145, 35, 71, 30,182,108,217,146,144,201,100,
+208,106,181, 40, 44, 44,196,254,253,251,239, 48, 12, 3, 87, 87, 87, 28, 57,114,132, 30, 50,100, 72,172, 74,165, 10,127,213,197,
+ 86,110,110,238, 61,177, 88,188,123,230,204,153,131,102,204,152,193,163,105, 26,247,239,223, 7, 8,130,225,241, 5, 32, 73, 18,
+ 60, 30, 23, 37, 37, 82,218,206,193, 37, 71,195,112,236,120,124, 1, 72, 14,191,186, 48,225, 12,125, 50, 82,144, 92,126,169, 33,
+ 18,144,207,231,227,210,222,239,165,157, 71, 44,116, 2, 0,190, 80, 92,212,163, 71,143,244, 38, 77,154,200,174, 93,187, 22,128,
+170, 81,135,166,215,167,174,223,136,105, 28, 59,177, 72,214,189,123,247, 12, 3,103,218,241, 31,165,195,190,152, 69, 16, 28,129,
+172, 79,159, 62,233,161,161,161, 50, 14,135,131,164,131,203,164,253, 70, 76, 19, 17,213, 36, 89,253,227, 33,243,217,141,189,231,
+ 26, 47, 94,188, 88,219,171, 87,175,199, 6,127,177,180,180,180, 58,189,123,247, 22,174, 92,185, 82,219,187,119,239,204,102,205,
+154,149,145, 36,137,132,132, 4,191,234, 44, 85, 6,136,197, 98,237,167,159,126,154,113,235,214,173,218, 70, 29, 86,139,186,117,
+235,130,166,105,116,233,210, 5, 74,165,146,181,108,177, 96,241,122,194, 52,143,150,229,204,240, 90,157,246,171, 49, 19, 22,252,
+ 8, 16, 14, 70,119,129,191, 13, 75, 12,136, 41, 83,190,182, 7, 32, 54,136,173, 73,147, 38,213, 56,205,137,145,200,106, 61,100,
+200, 16,124,243,205, 55,248,225,135, 31,168,229,203,151,115,238, 61, 72,213,140,248, 98, 94,177, 73, 61, 96,192,148,209, 90,250,
+ 43,115,124, 69, 37,178,121, 29,123,127,183, 32, 43, 79,126,126,196,216,217, 21,119, 47, 10,128,148,144, 80, 0,176, 97,253,122,
+ 25, 79,232,100, 31, 49,104, 24, 0,116,255,113,213,178,253,139,176,165,102,177,197, 16, 33, 95, 77,154,230,106, 16, 89,107, 87,
+ 46,190,229, 76,228, 69,141,251,250,142,214,184, 30, 0,112,115,196,254,142,189,191,123, 55,255,169,108, 53,123,158,189, 56, 8,
+ 4,130,133, 39, 79,158,180,111,222,188, 57,241,228,201, 19, 80, 84,249, 17,209,104, 52, 40, 41, 41, 65,105,105, 41, 84, 42, 21,
+ 90,181,106, 69,174, 89,179,198,126,220,184,113, 11,213,106,245, 23,175,122,191, 83, 82, 82,214,254,246,219,111, 56,115,230,204,
+192, 25, 51,102,240,124,124,124, 8,103,231, 60, 66,171, 81, 3, 96,152,130,130, 2,218,206,193, 37,199,195,219, 47, 35, 59, 55,
+ 63, 68,171, 81,131,166, 52, 22,189,205,245,233, 29,166,220,190,125,187,222,247,223,127,175, 54,142, 4, 28, 52,237,199, 53,173,
+ 90,181,114,139,138,138, 82,247,233,211, 39,221,224,188,110,141, 51,252,177, 71,152,112,251,246,205,166,166,156,157, 71,127,191,
+213,192,105, 28,141,216,247,235,141, 91,131,131,131,221, 66, 67, 67,211,171,227, 13, 12, 12, 84, 72, 36, 18,117,227,198,141,203,
+120, 60, 94,185, 37, 75,171,149, 7, 6, 6,210,222,222,222,234, 38, 77,154,148,217,234,180, 47, 22,139, 25,131, 85,204, 28,108,
+137, 58,228,113,160, 27, 50,100, 72, 69,102,248, 41,193,193, 57,195,134, 13,147, 76,158, 60, 25, 91,183,110,197,133, 11, 23,170,
+136,253,176,176, 48,156, 61,123,118, 1, 94,163,196,186, 44, 88,252,199, 80,125, 30, 45, 83,108,219, 22,243, 39,140,124,154,204,
+ 97,209,162, 69, 66,189, 37,171,251,196,137, 19,161, 80, 40, 92,205, 20,235, 6,125,174, 13,115, 34,107,217,178,101, 59, 25,134,
+241, 3,208,129,162,232,203,155,183,108,235, 98,169,190,136,136,136, 42,156, 12, 65,114, 72,146, 40, 19,240,152,191,214,111,218,
+250, 75,165,242,229,206,239,141, 64,224,198,143,171,150, 41, 0,116, 55, 21, 91,248,123,154,145, 10, 78, 3, 62, 31,251,121,133,
+200,250,113,213,178,227,161,173,253, 63,156, 61,106,161, 89,113,182,112,222, 24,123,146, 36,222, 54,241,209,170,194,249, 28,192,
+114,254,141, 46, 67,134, 12,105,209,182,109, 91,210, 88,100,169,213,234,138,196,157, 6,103,241,172,172, 44,132,133,133,145, 45,
+ 90,180,104,118,229,202,149, 46,248,123, 58,167, 87,181,239, 84, 74, 74,202, 26, 31, 31,159, 19,115,231,206, 29, 86, 88, 88,216,
+187,168,168,216, 61,110,219, 66,244,140, 24, 75,132,245, 26, 44, 83, 51, 92, 81,102, 78, 94,227,211, 71,118,184, 29,221,189, 22,
+ 26,181,122, 12,128,187,248, 59,189,131, 41,167,220,144,198,161,113,227,198, 50, 99,161,226,239,239,175,172, 83,167,142, 42, 52,
+ 52,180, 98,185,133,104,190, 42,125,183,149, 83,239,255, 37,171,105,127, 26, 68,155,105,218, 8, 59, 59, 59, 24,196,151, 45,237,
+ 52,142,182, 52,123,163,172, 57,234,176,130, 83,159,222,161,146, 78,139,137,137,233, 22, 19, 19,211, 26,192, 95, 40,159,235, 80,
+ 11,148, 15, 37, 26, 57,205,207,215,127,216,235,157,229,252,175,114,190,202, 8,195,223,190, 89, 64,185,175,214, 25,139, 66,171,
+ 38, 24, 28,223, 1,144,147, 38, 77, 42, 82, 40, 20,174,195,134, 13,171,118,155,220,220,220,173,209,209,209,149, 68,214, 71, 31,
+125,244, 73,108,108,236,137,252,252,252, 90,245,202,213, 73,188,232,204,161,233,174, 97,125,190,155, 8, 96,185, 5, 67, 30, 29,
+218, 90,242,225,143,171,150,237, 55, 17, 91,219, 1,124,100, 73,149,246,120,239, 3,236,216,246,163,193,183, 75,124,235, 90,214,
+209,129,215, 35,205, 70, 43,186, 56, 8, 35,245,237,152,204,250,104,189, 24,240,249,252,206, 51,102,204,224,203,100,178, 42, 34,
+203, 84,104, 73,165, 82,220,184,113, 3, 35, 70,140, 16, 38, 38, 38,118,214,104, 52,167, 94,135,125,144,155,155,123, 79,159,140,
+116,130, 33,133,131, 80, 36,230, 15, 30, 57,209,175, 34,234,112,247, 90,168,148, 10, 0,224, 90,147,222,129,203,229,242, 19, 19,
+ 19, 3, 12, 86, 43,141, 70, 35, 52, 44,191,118,237, 90,128, 33,183,150, 82,169,180, 58,234,240,159,226,188,121,243,166,159, 33,
+ 58,210, 16, 93,200,229,114,249, 9, 9, 9,126, 6, 78,149, 74,101, 85,212,161, 64, 32,224, 39, 38, 38,250, 81, 20,245,220,162,
+ 14,141,133, 49,202,231, 89,172, 52,215,162,222,183,140, 32, 8,130, 97,135, 13, 89,176,120,229, 97, 26, 41, 89,253,164,210, 53,
+193,224,248,110,195, 38,220,186,117,235,246, 24, 52,104, 80, 37,145, 21, 30, 30, 78,237,219,183,239,180, 68, 34,201, 35, 73,242,
+158,173,237,168,240,209, 66,149, 55, 72,144, 36,121,163, 67,155, 38, 32, 73,242,198,236, 81,163, 84,139,176,165,146,216, 58,184,
+127,207,187,153, 69,119,204, 75, 51, 0,238, 94,190, 24,242,201, 87, 24,242,201, 87,174, 0,218, 3,150,163, 21,171,107, 7,139,
+127, 6, 4, 65, 8,234,212,169,115, 75,169, 84,130, 32, 8,168, 84,170, 10,129, 85, 90, 90,138,146,146,146,138,255, 26,141, 6,
+ 5, 5, 5,240,247,247, 7, 65, 16,175,181, 31,157, 70,163,209,205, 88,240,125, 52,135,203,215,209,180,134,208,104, 52, 35,109,
+185,206,103,204,152, 65,194,140,239,213,184,113,227,204, 46,127, 89,156, 51,103,206, 52, 27, 37, 56,110,220,184,106,163, 7, 45,
+225,235,175,191,126,110, 81,135,214,223,190, 88,176, 96,241,154,193,108,232, 94,173,132, 22, 73,146, 55,204, 68, 23, 18, 0, 24,
+146, 36,111,152,201,114,160,203,200,200, 88,224,226,226, 50, 70, 38,147,253,254,209, 71, 31, 77, 10, 15, 15,167,128,114, 7,249,
+218,246,168,168, 68, 54,175,115,223,165,147,139,203, 84, 81,166,235, 76, 45, 79, 6,177,181,118,245,178,117,251, 99,119,133,231,
+102,103,174,179,212, 55, 75,130,202, 82,180, 98,137, 84,177,160,115,223,165, 19,139,164, 10,214, 71,235, 5,129,162,168, 99, 98,
+177,152, 48, 76,166,108,108,189,146, 74,165,144,203,229,208, 79, 73, 3, 0, 40, 43, 43,131,179,179, 51, 40,138, 98, 94,179, 93,
+161, 2, 48, 85,111,173, 2,128,169,169,167,215, 24,159,219, 55,141,215, 85, 99,205,202,177,102,130,104,115,219, 85,183,238, 31,
+224,204,171,102,130,232,234,144,103, 35, 95, 30, 0,240,121,156,124, 75,147, 71,243,121,156,252,106,252,246,109,124,111, 32, 24,
+ 0, 11,216, 43,155, 5,139, 87,247,253,255,101, 85,220,141,229,100, 57, 89,206, 23,194, 41,212,127,172, 93,199,238, 79,150,147,
+229,100, 57,255,109,156,230, 48,250, 21, 17, 90,140,153, 15,128, 90, 90,180, 88,176, 96,241,175,131,170,150,235, 88,176, 96,193,
+130,197,179,163,202,100,210,198, 43, 44,169, 82, 91,162, 9,106,163,108, 79,176,156, 44, 39,203,201,114,178,156, 44, 39,203,249,
+159,227,172,137,219,120,251,209, 0, 54,189, 34, 98,235,165, 4,180,176,102, 85,150,147,229,100, 57, 89, 78,150,147,229,100, 57,
+107, 11,118,232,144, 5, 11, 22, 44, 88,176, 96,193,226, 63, 14,219, 18,150,178, 48, 3,255, 15,102,131,198, 76,253,238, 92,134,
+199, 7,231,191,110, 93, 12, 15, 15,231,216, 82, 62, 53,213,133,188, 14,201, 15, 78,246,252,190,101, 50,237, 15,244,245,121, 81,
+ 53,157,136, 30,129, 45, 63,182, 19,217,125,161, 86,171,235, 59, 56, 58,230, 63,125, 82,176,225,105,198,205,181, 70,101,156, 46,
+ 95,190, 44,105,219,182,109, 54,128, 82,163, 55, 5, 22, 44, 88, 60, 79,184, 52,169, 11,130, 24, 9, 48,127,135, 93,210,204, 29,
+148,220,221, 86,169,156,115,200, 39, 32,137,166, 70, 75, 20, 96,176, 25,197, 73,143,107,120,224,184, 36, 39, 39, 7, 52,104,208,
+ 32, 29, 64,177,105,237,102,214,177,215, 57,139, 87, 25, 97,168,156,176,180,226, 90,120,118,161, 21,252, 81,125,232,200,225, 96,
+ 48, 20, 4, 18,145, 26,219,191, 86, 60, 65, 31,250,130,230,190, 9,160, 37,192,180,180, 23,139,254,167, 80,107,242,105,134,249,
+ 24,143,246,252,101, 51, 95,253,240,177,176, 60,157,197, 2,164,198,174,183,137,143,102,102, 93, 61,187, 79,232, 98, 71,160, 65,
+171,143,166,161,114, 6,231,218, 66, 0,160, 35, 73,146, 77,237,236,236, 36,114,185,188,128,166,233,199, 40, 31,159, 46,170, 37,
+ 39, 9,224, 83, 7,123,251,158, 1,142,130,150, 25,133, 37, 89,165, 90,234, 28,202, 19,186, 22, 61,175, 51,170, 92,100,249,108,
+154, 56,184,237,136,101,227,187,193,165,243,210,105,114,160, 58,161, 69,248, 53,122,251,224,192, 65, 17,157,191, 28, 61,194,193,
+215,211, 1, 57,133, 50,247,245, 91, 99,190,143,137,217,209,103,212,192,238, 61, 1, 96,225,194,133,253,234,214,173, 91,143,195,
+225,164,206,153, 51,103,251,188,121,243, 24,194,242, 76,229, 18,253, 57,108,184,225,219, 3, 8, 5, 16, 8, 32, 5,192,109, 84,
+206, 50, 94, 27,188, 18,156,190,190,190,117,104,154, 30,229,237,237,221, 59, 47, 47,239, 48, 73,146, 91,178,178,178,178, 95,230,
+ 93,135, 97,152,141, 4, 65,140,102, 24,102,147, 13,223, 99,108,169, 67, 36, 18,229, 41,149, 74, 47,253,239,124,165, 82,233,253,
+ 79,245,231, 69,214,245,130,222,191, 63, 59,118,254,118, 79,227, 69, 61, 58, 52, 53,115, 71, 33,154, 30, 59,127,167, 83,229,114,
+161,148,133,123, 32,193, 48, 12, 22, 44, 88, 64, 68, 70, 70,126, 18, 20, 20, 20, 76,146,228,253,185,115,231, 86, 74,125, 99,186,
+206,232, 58,103,197, 22,139, 87, 21,182, 77, 42, 93, 35,154,132,219, 67,201,132, 3,196,136,176, 54,255,235, 48,230,227,190, 4,
+195, 17, 97,240,103,211,117, 54,115, 5,140, 16,130,163, 88,212,188,105,163, 73, 17,125,187,145,173, 67,235, 65,226,233, 12,144,
+ 60,108, 60,146,230, 30,181,108,206, 58, 0,109,107,209,202,121,143,226,119,122,229, 20, 83, 32, 8,128, 32, 0,146, 0,202,148,
+ 52,122,244, 27, 62, 15,192,122, 27,239, 74,164,139, 29,129, 73, 59,149, 0,192,121, 14, 7,165,158,167,167,231, 39, 19, 38, 76,
+176, 15, 13, 13,117, 17,137, 68, 2,165, 82,233,157,156,156,236, 57,103,206,156, 80,133, 66,113, 8,192, 85, 27, 57,253, 27,248,
+213,217, 19, 53,233,211, 55, 91, 4, 6,128,167, 46, 3,173,146,213,125,144,252,240,173,207,215,237,253,236,206, 83,229, 32,212,
+ 98,202,132,194,194, 66, 2, 0, 60, 60, 60,152,202, 34,171,221,136,149,147,123, 96,210,138, 99,144, 43,213,191, 84,199,225, 86,
+239,141, 97, 31,126,248, 65,231,197,179,198, 57,100, 61,209, 32, 49, 85, 1, 55, 7, 62,230, 77, 29, 43, 80,169,180,111,173,219,
+ 30, 51,250,199,239,166,111,166, 40,234, 29, 0,173, 41,138,186, 6, 96,251,130, 5, 11, 44,221,124, 35, 1,204,212,159,208, 59,
+ 56, 28,206,241, 46, 93,186,212, 31, 53,106, 20,209,170, 85, 43, 36, 36, 36, 4,238,220,185,179,219,225,195,135, 83, 41,138,186,
+ 9,224, 62,244,211,158, 88, 1, 30,128, 70, 28, 14,167,249,191,153, 83, 34,145,136,213,106,245,112, 63, 63,191,209,111,191,253,
+118,243,190,125,251, 18,141, 26, 53,194,189,123,247, 90, 29, 61,122,116,222,185,115,231,110,102,102,102,110, 18, 8, 4,209, 57,
+ 57, 57,138, 23,254, 28, 39,136,209, 0,234,232,117,242, 2, 43,190,179, 81,158, 75, 42,199,218, 58,148, 74,165,151, 97, 10, 27,
+130, 32,188,254,201,254,216, 88, 87, 18, 65, 16,110,250,178,168,238,155, 36, 73,232,116, 58, 25, 69, 81, 65, 53,112, 54,210,191,
+ 72, 89,173,117, 1, 84,151, 8, 90, 12, 0, 61,218, 55,125, 10, 2,119, 42, 44, 90, 85, 95, 50,239, 84, 8, 48, 6, 77,143, 93,
+184,227, 86,201, 10,102,250, 22,187, 96, 1, 49,111,222, 60,204,159, 63,191, 47,128,142, 52, 77,159, 11, 9, 9, 89, 83,137,146,
+166, 43,214,205,155, 55,111,117, 53,215, 57, 11, 22,175, 10, 58,195,150, 73,165, 45,190,255, 4,245,239, 4, 10, 35, 2,220,189,
+194,199,143, 26, 32, 14, 13,105, 0, 37, 28,144, 86, 72,225, 72,220, 81, 0,216,109,155,213,105, 64,107, 46, 87, 25,189,108,254,
+212,198, 29,223, 12,197,173, 44, 45,174,101, 81,144,167,106,193, 33,181,160,104, 6, 96,160,172,109,175, 51,139,116, 56,127, 95,
+ 13,146, 0, 56, 36, 64,146, 4, 56,100, 45,201,104,245,131,133,219,174,135, 22,230,209, 0,173,126,240,140, 7,164,105,195,134,
+ 13,135, 69, 70, 70,186,228,230,230,218, 39, 36, 36, 64, 40, 20,194,213,213,149, 35,145, 72,234,172, 88,177, 66, 49,126,252,248,
+222, 26,141, 38, 13, 64,161,149,156, 33,189, 90, 55,191,184,105,217, 66,103,237,229,163, 40,222,245, 43, 56, 36, 3,190,189, 3,
+234,139,197, 56,250, 97, 3,183,240,184,212,125, 87,242,100, 33, 0,178,106, 34,187,123,247, 46, 71,165, 82, 13,114,114,114,106,
+199,227,241,188, 69,174,245,232,108,110,235, 39, 5, 68, 96, 74,190,151,188,211,228,110,222, 61,127,152,216, 5,147, 86, 28,195,
+170,157,151,126,110,137,220,185,213,229,205,182,179,115, 24, 51,254,139, 81, 14,153,133, 26, 44,218, 87,136,109,103,165, 24,222,
+209, 17,147,222,115,198,144,193, 3,237,247,254, 26, 59, 6,192,102,163, 77,238,133,132,132, 16,119,239,222, 53,119,243,117, 5,
+ 48, 93,173, 86,147,124, 62,159, 16,137, 68,195, 22, 47, 94,172, 25, 60,120,112,166,161, 64,199,142, 29,209,177, 99, 71,162,180,
+180, 52,240,212,169, 83,129, 49, 49, 49,186,248,248,248, 36, 0, 7, 45, 91, 44,196, 25, 74,165,162,174, 72, 44,150,175, 95,183,
+238,135, 78,157, 58,209, 66,225,223,233,167,106,195, 9, 0,206,206,206,155,189,188,188,136,111,190,249, 38,251,121,113,214,171,
+ 87,239,216,155,111,190,217,165, 71,143, 30,220,246,237,219,163, 78,157, 58, 21,235, 60, 60, 60,208,177, 99, 71,226,241,227,199,
+ 45,206,157, 59,183,238,216,177, 99,107,254,250,235,175, 83,105,105,105, 61, 94,176, 69,107,147, 94, 76,228,216, 88,254,149, 7,
+ 65, 16, 14, 27, 55,110,244, 50,204,201,168,213,106, 65, 81, 84,197,183,225, 67,211, 52, 40,138,194,226,197,139, 41,153, 76,102,
+205, 62,146, 25,189, 53, 27, 62,180,185,111,129, 64,224, 97, 72,216, 91,195,157,253,142, 68, 88,220,196,222,222, 62, 0, 64, 47,
+120, 6, 79,175, 92,160,252,253, 89, 38,147,165,231,168, 92,238, 0,232, 84, 13,155, 75,100,100,228,240,249,243,231,127, 96,100,
+165,109, 30, 17, 17, 97, 58,237, 85,115,253,183,140, 32,136,211, 36, 73, 30, 2,176, 13,207,209,234,206,226,245, 2,195, 48,109,
+ 0,120, 26, 45, 82,163,124, 84, 8,250,231, 36, 1,192,221,100,185,113, 57,195,119,129,126,185,167,126, 59,198,136,183,128, 32,
+136,171,181,108,226, 25, 88,240,211,226, 2, 64, 92, 92, 28,211,167, 79, 31,194,240,109, 94, 20,133, 31,249,116,240,251, 61,123,
+119,125, 27,164,200, 21, 15,242,129,248, 12, 6, 92, 82, 11, 18, 12, 46, 95, 56,197,128, 75, 71,155,108,101,217,122, 82,175,255,
+215,205, 67, 67,150,110, 89, 54,129,147,148,207,197,182,115,114,104,148,101, 40,200,205, 64,126,118, 58,114, 50, 83,144,149,145,
+114, 19, 32,230, 89,205, 89,229,192, 0, 20,173,127, 7,164,129,106, 34, 47,107,230,212,200,238, 6, 54, 10, 13, 45, 18, 80,128,
+ 70,118,215,138,234, 45,113, 54, 11, 14, 14, 30, 60,107,214, 44,183,219,183,111,139,229,114,185,234,232,209,163,247,210,210,210,
+156, 36, 18,201,211,177, 99,199, 6,215,169, 83,199,233,163,143, 62, 18,236,218,181,171, 31, 42,135,181, 90,226, 12,125,191,221,
+255,226,183,174, 89,105,255,100,111, 20,212,201, 55,112, 36, 71,134, 11,121,114, 38,208, 89, 72,124,213,194, 19, 14, 66, 46, 22,
+182,175,227,208,107,127,242, 82, 45, 77, 15,169,142,243,226,197,139, 18, 59, 59,187, 21, 67,135, 14,149,140, 27, 55, 78, 72,113,
+ 93,184,177,241, 79,156,167,175,139,175, 35, 87,105, 56,131,187,212,195,228,161,205, 49,121,213, 73,131,200, 26, 93,191,126, 49,
+125,253,186,101, 78,173, 70, 83,223,207,203, 9,137,105, 10,108, 59, 43,197,159,179,234,160,235,226,108,124,212,146,139, 16,127,
+ 7,232, 52,218, 70, 17, 17, 17,209,250,183,246,171, 0,250, 69, 68, 68, 52,230,112, 56, 39, 1, 28,168,233, 24,137, 68,230,103,
+ 79,113,117,117, 69, 88, 88, 24, 66, 66, 66,184,157, 58,117,106,110, 34, 96, 42,113,106, 52,106, 9, 77, 51,112,116,116, 20,187,
+187,187,187, 58, 58, 58, 62, 49,247,160,178,133, 19, 0,220,220,220,250,135,133,133,113,119,238,220, 89,152,154,154,122,121,240,
+224,193, 41, 78, 78, 78,149,172,191,246,246,246, 8, 14, 14,198,156, 57,115,184, 61,123,246,172,145,211,219,219,187,123, 76, 76,
+ 12, 8,130,168,120,104, 87, 49, 22, 7, 4,192,199,199, 7,189,122,245,226,246,239,223,191,123, 90, 90, 90,173,174, 35, 27,112,
+194,140, 69,107,129,201,113,178, 56,252,102,174,188, 21,199, 61,223, 96, 93,210,243,225, 25,174,205,106,135, 59, 69, 34, 81,133,
+ 21,202, 76, 93, 85, 56, 73,146,196,236,217,179, 65, 16, 4,120, 60, 30,248,124,190,217,239,206,157, 59,219,218,206,199, 4, 65,
+144,124, 62,127, 58,151,203, 29,165, 82,169,252, 68, 34, 81, 54, 69, 81, 63,171, 84,170,197, 0,180, 12,195,184, 88, 16, 89,102,
+ 57,237,237,237, 3, 30, 60,120,208,208, 82, 67, 84, 42, 21,154, 55,111, 14,168,144, 84, 29,103,114,114,114, 64, 80, 80, 80, 35,
+ 0,134, 41,218,206, 50, 12,211,201,232,191, 49,206, 50, 12,243,158,254,247,253, 71,143, 30, 5, 52,104,208,160,232, 69,157,159,
+ 44,231,191,143,179, 6, 45,226, 73, 16, 68,156,209,181,218,199,240,127,198,140, 25, 51,151, 44, 89,114,155, 32,136, 56,227,229,
+198,229,140,191,245,247,155, 56,134, 97,250,124,243,205, 55,161,223,125,247,221,183,134,178,255,132, 72,180,197,162,229, 84,160,
+180,199,185, 12, 39,112, 57, 20,184, 36, 1, 46, 7, 0, 67, 32, 61, 45, 25,165,210,226,243, 72,221,151,106,157, 37, 43,188,253,
+ 27,111, 52, 91,182, 99,213, 52,242,167,115,114, 20,203,148,184,251,215,105, 92, 61,125, 32,151,210, 81, 7, 64, 48,215, 0, 50,
+ 1, 41,244, 61, 32,182,118,115, 92, 16, 12,183, 92,104,233,197, 85, 37,177,245,210,208,162,113,227,198, 3,231,204,153,227,113,
+253,250,117, 81, 73, 73, 73,233,142, 29, 59,178, 85, 42, 85, 26,128, 63,210,211,211, 27,175, 94,189, 90,176,108,217,178,102,205,
+154, 53,147,236,217,179, 71,109,102, 58,163, 42,156, 83, 71, 12,137, 31, 53,126,162, 40,105,207, 90, 8,146, 18, 48,251, 70, 33,
+245,103,142,124, 22,128, 85,120, 92,214,190, 64,169, 59,190, 50,172, 46, 89,207,145,143, 6, 46,130,206,119,159, 42,171,181,100,
+217,217,217,173,136,137,137, 9,104,211,166, 13, 9, 0,231,238,235,132,211,215,197,215,249, 99, 73,123,162,125, 83,119,228, 23,
+171, 48, 97,109, 34,142,198,231,255,110, 16, 89, 53, 53,210,209,209,177, 32, 51, 95,234,237,238, 32,194,199, 29, 28,208,117,113,
+ 54,194, 91, 11, 33,228, 19,184,151,154,139, 6, 65,245,136,196,243, 7, 91,235, 69, 86,155,156,156, 28, 0,104, 13, 32,245,241,
+227,199,146,182,109,219,150, 24,209, 21, 1, 88, 42, 16, 8,102, 19, 4,193,180,105,211, 38,177, 89,179,102,101,174,174,174, 80,
+ 40, 20, 80,169, 84,224,243,249, 80, 40, 20, 72, 79, 79,199,229,203,151,225,234,234,106,211,129, 42, 43, 43,131,163,163, 35,104,
+154,126,102, 78,138,162,136, 13, 27, 54,216,223,190,125,219, 62, 54, 54,214,123,210,164, 73, 79,154, 52,105,114,109,224,192,129,
+ 15,189,188,188, 84, 55,110,220,192,197,139, 23, 81, 84, 84,132,118,237,218, 89,197,169, 86,171,193,229,114,161, 80, 40, 32, 20,
+ 10,193,229,114,161,211,233, 64,211,116,133,248, 42, 43, 43,195,211,167, 79,193,231,243,161, 86,171, 95,198, 27,104, 21, 11, 85,
+117,195,111,181,177,104, 25, 11, 53, 43, 69, 86, 77,150, 40,139,195,157,197,197,197, 98, 23, 23,151,233, 0,114,106,170,139, 32,
+ 8,112, 56, 28,240,249,124, 16, 4,129, 78,157, 58,225,211, 79, 63, 69,203,150, 45,145,156,156,140, 93,187,118,225,234,213,171,
+224,241,120, 21,229,173, 30,159,232,220,153, 35, 18,137, 46,190,255,254,251,161,179,102,205, 18,213,171, 87, 15, 73, 73, 73,254,
+223,125,247,221,244, 19, 39, 78,124, 32,147,201, 90, 27,238,118,213, 91,233,245, 67,130,229,195,133,189, 84, 42, 21,146,146,146,
+108,217,166, 10, 26, 52,104,144, 78,146,228, 67,154,166,207, 1,104,206, 48, 76, 39,130, 32,142,162,220, 47,209, 24, 50,134, 97,
+222, 35, 8, 66, 10,224, 38, 73,146,247,105,154, 78,103,237, 54, 44,172,184,175,244, 49,253, 79, 16, 68,220,146, 37, 75,250,152,
+ 19, 87,102,174,205, 74,203,191,251,238,187,111,141,254, 63,139, 69, 53, 12,149,157,225, 59,235,173, 92,127, 11,173,184,184,184,
+234, 21, 8,141,143,226,246,237,188,212, 85,131,128,208, 86, 29,141,172, 67, 12, 18, 46, 95, 4,192,252,108, 85, 83, 36,125,196,
+ 36,135,251,243,134,111,199,145, 27, 79,203,241, 56, 59, 31, 23,143,252,140,130,156,180,109, 0, 51, 9,169,177,210,103, 62, 18,
+245, 62,106,230,229,238,225,162,212, 48,160, 25, 0, 85,196,214, 75, 65,203, 70,141, 26,245,143,143,143,247, 80, 42,149,162,243,
+231,207,203, 99, 98, 98,114, 53, 26,205,105, 0, 23,244,101,174, 23, 20, 20, 68,232,133, 9,135,203,229, 10, 52, 26, 77,117,190,
+ 11, 45,167,142, 26,126,126,233,134,173,162,135,183, 18,177, 58,246, 8,138,229,114,234,116,190,162, 31, 0,131,162, 63,121,189,
+ 80,145,197,128,169,203, 35, 9, 72,236,121, 62,119,159, 42, 69,128,249, 33, 89,149, 74, 53,120,232,208,161, 18,131,200, 2,128,
+194, 82, 45, 87,174,210,114,218, 55,117, 71,171, 46, 17, 72, 56,181, 23,123,206,102, 33,200,211,238,108,125,251, 98,171,246,104,
+ 65,126,206,134,149, 81, 27, 87, 46, 93, 48, 85, 48,185,151, 51,194, 91,243, 32,226, 19,112,178,227, 97,241,154,205,218,235,151,
+207,222,144, 72, 36,113, 0,250,229,228,228, 64, 34,145,148, 1,184,207,225,112, 82, 41,138, 50,231,212, 61, 23,128,119,116,116,
+ 52,169,213,106,203,146,147,147,225,227,227, 3,111,111,111, 56, 59, 59,227,238,221,187,248,243,207, 63,113,239,222, 61,208, 52,
+141, 55,222,120,195,166,131,245,228,201, 19,220,184,113, 3,189,122,245,158, 84, 80,144,239,228,234,230, 46, 59,127,238,236,247,
+181,225,164,105,154, 0,128,208,208, 80,132,134,134,138,178,178,178,252,226,226,226,188, 22, 45, 90,148, 17, 16, 16,176, 67,161,
+ 80, 84,178, 28, 88, 43,180, 12,226,194, 32, 2, 69, 34, 17,248,124, 62,164, 82, 41,242,242,242, 80, 90, 90, 30,180,233,226,226,
+242, 82,132,150, 5, 11,213,115, 43,255, 15,139,195, 42,195,157, 46, 46, 46, 67, 1, 76,183,178, 47,208,233,116,224,243,249,104,
+219,182, 45,162,162,162,112,245,234, 85, 28, 56,112, 0,254,254,254, 24, 49, 98, 4, 72,146,196,237,219,183,109,109, 34, 29, 31,
+ 31, 63,189, 95,191,126,161,209,209,209,162,244,244,116,220,187,119, 15, 46, 46, 46,136,138,138, 18,142, 30, 61,186,193,169, 83,
+167,230,162, 60,248,165,122, 24, 69, 23,202,196,146, 1,205,155, 55,175, 82,196,199,199,199,249,143, 63,254,240,170, 16, 96,166,
+ 17,137, 85, 81, 60,119,238,220,149, 33, 33, 33,171,244,195,133, 29, 1,216, 51, 12,211, 57, 54, 54,150, 0,128,240,240,112,134,
+ 32, 8,195, 3,233,230,222,189,123,187,220,189,123,151,153, 63,127, 62,235,163,197,194,146, 22, 25,109,184, 38, 45, 9, 40, 91,
+132,154,177, 60,104, 55, 9, 0, 0, 32, 0, 73, 68, 65, 84,197,203,128,111,190,249, 38,116,201,146, 37, 87,158, 81,100, 25,191,
+ 49, 49, 6,177, 85,241, 48,181, 56,100, 88, 97,251, 34, 37, 62, 94,238,110, 51, 70,180, 7, 77, 3, 58, 10,208, 81, 12,100,114,
+ 5,146,110, 93,149, 67, 68,196, 90,213, 28,161, 96,217,162, 89, 19, 3, 19, 51, 73,100, 23,105,112,230,224, 70,166, 32, 39,173,
+ 63, 82,247,142,124, 62, 34,107, 64,115, 31,111,175, 51, 59, 55, 46, 36,175,166,168, 65,209,229, 58,139,166,153,138,223, 47, 1,
+ 62,158,158,158, 67, 46, 93,186,228, 41, 20, 10, 69, 15, 30, 60,160,247,238,221, 91,164,209,104, 78, 24,137, 44, 0,104,223,186,
+117,107,157,131,131, 3,100, 50,153, 70,163,209, 40,171, 17, 89,126,157, 91,182, 56,187,116,195, 86,145, 82,173, 70,137, 66, 5,
+142,187,151,169,200, 2,128,183,187, 52,244,245, 37, 68,142, 96, 0,164, 73, 53,217,150, 68, 22, 0, 8,133,194,110,227,198,141,
+171, 52, 47,158,135, 35, 79,103, 39,228, 81, 23,238, 20,210, 9,167,246,226,220,237, 66, 90,196,231, 80,158, 76, 74,160,181, 59,
+160, 56,243,206,134, 3,191,197, 29,255,122,206,178, 50,185,172, 20, 65,117,196, 40, 43, 45,193,226, 37, 75,181,241,241,231, 78,
+ 79,159,244,249, 91,123,247,238,253, 14,229,206,224, 0,112,127,239,222,189,195,231,204,153,179, 29,127,167,121, 48, 69,246,144,
+ 33, 67, 50,155, 54,109, 90, 18, 18, 18, 82,242,228,201, 19,220,185,115, 7, 69, 69, 69, 88,189,122, 53,146,146,146, 96,176, 8,
+ 90,229,171, 82, 85, 32,161,168,232,169, 3,195, 48, 40,122,250,196,126,214,172, 89,206,181,225,164, 40,170,210,181,229,235,235,
+139,177, 99,199,242,229,114,185, 75, 70, 70,134,147,241, 58,107, 57,213,106, 53, 12,150, 33,134, 97,160, 86,171, 81, 82, 82, 2,
+181, 90,141,135, 15, 31, 86,136, 44,125,253, 47,205,162,101,248, 45, 18,137,242, 12,231,178, 97, 8, 78, 36, 18,229, 91, 42,255,
+ 44, 48,170,139,209,255,182, 85, 28,214,216, 31, 43,143, 59,248,124, 62, 62,253,244, 83, 92,185,114, 5,201,201,201,224,112, 56,
+144,201,100,144,203,229,232,222,189, 59, 4, 2,129,173, 22, 45,134,207,231, 15,157, 57,115,166, 40, 53, 53, 21,133,133,133, 6,
+103,122, 80, 20,133, 73,147, 38,137,133, 66,225, 80, 91, 77,247, 57, 57, 57,239, 62,124,248,176,145,233, 39, 55, 55,183,196,216,
+167,176,182,136,141,141, 37,194,195,195,153,240,240,112,198, 32,184, 88,176, 48, 7, 11, 90,100,147, 37,139,214,243,176,138, 25,
+ 44, 91,208, 7,136,212, 2, 6,145, 21,102, 36,188, 8,131,133,203,186,161,195,160, 1,255,243,118,119, 59, 21,189, 54,210, 33,
+238, 22,129,204,199,105, 40,200, 73, 71,235,183, 58, 35,233, 86, 34,104, 45,181, 15, 15, 99,107,246,228,172, 23,222, 48, 36,164,
+201, 23, 97,111, 53,195,178,184, 50, 60, 72,248, 3,197, 5, 57, 63, 34,109,239,190,231,114,132, 2,194, 91,120,123,185,157,218,
+190, 54,210,229,232, 29, 18,143, 31,167,225,224,246,149,140, 86,163, 42, 70,229, 72, 46,155,223,154,197,180, 90, 80, 86,156, 7,
+117, 41, 5, 17, 41, 23,217, 56, 72,145, 11,224,220,202,149, 43,187,182,107,215, 78, 48,100,200,144,220,162,162,162,131, 0, 46,
+ 25,149,105,218,176, 97,195, 94, 81, 81, 81,222,143, 31, 63,198,137, 19, 39,114, 81, 30,250,111, 9,153,103, 19,111,173,251,115,
+251,230,169,226,192,198, 88, 61,243,107, 93,236,213, 59,239, 3, 56,106, 84, 38,164, 91,243,134,113,139,166,124, 73,210,215,127,
+199,141,244, 60,164,148,168,254,180, 68, 88, 88, 88, 72,200,229,242, 0, 23, 23, 23,227, 19, 18, 18,123,153,106,218,128,134,217,
+221,167,159,175,163,212, 80, 16,242, 72,102,194, 7, 1,217, 87, 14,198,186, 23, 42, 11, 9, 67, 52, 98, 77,248,108, 96,183, 15,
+214,198,236,255, 56, 46,238,240, 23, 26,149,178, 89,227,198,141,152,107,241,167,110, 76,159,244,121,207, 90, 30,113,135, 43, 87,
+174,144, 28, 14,167,146, 64, 55,182, 16,217,106, 41,178, 5,214,114,154, 10, 45, 3,116, 58, 29, 81, 91, 78,149, 74, 85, 33,180,
+ 76, 31,238,230, 4,227, 63,209,127, 91, 44, 84,198, 67,134, 6,127, 58,165, 82,233,165,247,217,242,126,158, 22,173,103,137, 68,
+172,110,248,210,150,246,145, 36, 9,154,166,193,231,243,241,198, 27,111, 32, 46, 46, 14,110,110,110,112,114,114,130,147,147, 19,
+196, 98, 49,220,221,221, 43,132, 22, 73, 90, 29,165,195,168, 84, 42,127,127,127,127, 60,124,248, 16, 34,145,168,226, 35, 20, 10,
+ 17, 26, 26, 10,153, 76,230,139,151,105,187,103,193,226,159,189,175,196, 25,139, 37,130, 32,226,102,204,152, 49,179,182,124, 51,
+102,204,152,105,206,194,245,140,130,171,146,117,139,107,172, 32,205, 42, 73,189,200,218,246,227, 2,167,253,127, 1,153,153,169,
+ 56,190,103, 77,169, 86,163, 46,162,105,109, 64,202,189, 68,128,196,207, 86, 53,129,100,222,252,160, 87, 23,226,248,109, 53,164,
+197, 5,184,127,237,143, 52, 40, 4,223, 60, 55,145,229,237,113, 42,122,237, 2,151, 67,183, 8, 60,126,156,134,163, 59, 87, 75,
+181, 26, 77, 55,164,198, 94,123, 22,234,161,124,254, 7,252,186, 25,125, 70,117,204, 6, 69, 80, 24,154,116,247,189,252, 92,124,
+144,115,190,250,200, 48, 99, 20, 20, 20, 28, 92,185,114, 37,177,124,249,242, 48,165, 82,249, 43, 0, 99, 19,101,179,160,160,160,
+ 65,155, 54,109,114,123,252,248, 49,239,252,249,243,178, 83,167, 78, 49, 0, 14,213, 96,113,153,214,125,228, 88, 78,203,122,190,
+227,174,167,101,189, 15,224,119,163,213,161,125, 90, 53,189,176,117,201, 92, 71,237,133, 88,148,229, 60,198, 55, 23, 50,165, 0,
+172,222,223, 90,173, 22, 37, 37, 37,208,150, 61,209,181,150,200, 74,230, 71,120,169,242,138,148, 92, 30, 45,215,133, 56,229,171,
+ 78, 61, 73,225,216,217,217,217,180, 47,215, 46,153, 26, 3, 32, 38, 34, 34, 34,250,102,252,225,214, 18,137,228,112, 72, 72, 8,
+ 1, 0, 22, 34, 12, 45, 33, 18,192,164,183,223,126,155,104,219,182,237,229, 85,171, 86, 29,171, 78,172,212,198,162, 85, 19,172,
+229,164,105,154,180,176,127,137,218,114, 26, 91,180,106, 18, 90, 47,211,162,101, 78,180, 24,139, 68, 99, 33,244,111,136, 58,172,
+ 78, 76,217,210, 62,131,159, 28,159,207, 71, 98, 98, 34,234,214,173, 11,141, 70, 3, 71, 71, 71, 56, 58, 58,194,193,193, 1,165,
+165,165,224,241,120,176,177,207,180, 72, 36,202,184,115,231, 78, 35, 79, 79, 79, 80, 20, 85, 73,108, 61,120,240, 0,246,246,246,
+ 89,182, 90,180, 36, 18,201, 31,250,168,195, 74,240,241,241,113,126, 30,251,213,216,146, 21, 30, 30,206, 14, 17,178,168,214,154,
+101,193,170, 85, 96, 98,137, 82, 27,253, 47, 64,121, 14,183, 62,250,223, 48,243, 91,109,102,217,147, 37, 75,150,156, 50,242,239,
+ 42,120,198, 46, 24, 82, 60, 84,138,112,225,214,100,201,242,114,115, 61,181,101,245,124,167, 61, 9, 64,214,227, 84,156,217, 23,
+ 85,162,163, 52,239,128,102,114,226, 79,236,139, 5, 1, 57, 82, 98,207, 88,119,139, 64,203,150, 77, 2,112,224,182, 22, 5,153,
+ 15,192, 48,244, 54,228,199,200,159,249,232, 4,125,244,134,151,155,199,169,109, 81,243,157,247, 39, 18,200,124,156,138,227,123,
+162,164, 58,173,188, 43, 82,247, 37,212,150,246, 83,192,149, 99, 47, 90,215,191,115,203, 1, 1, 65,126,160, 25, 45,104, 62,131,
+143,166,121,112,239, 95,151, 31, 56, 39, 42,217, 67,151,209, 95,100, 93,178,206,129,174,172,172,236, 0,128,107,168,156, 94,161,
+ 69,112,112,240,128,117,235,214,121,102,102,102,138,174, 95,191,174,216,184,113, 99, 62, 77,211,251, 1, 88, 51,148,250,245,245,
+180,172, 45,168,156, 47,167,197,212,145, 67,226,135,124, 50, 74,148,122, 34, 6,174,169, 73,152,114, 33,155,186, 95,164, 30,172,
+183,174,153,133,135,135, 7, 83, 88, 88,152, 94, 92, 92,220,200,222,222, 30, 79,158, 60,193,211,167, 79, 81, 82, 82, 2,149,244,
+169,206,157, 42,150, 17,186,167,224,241,120,200,127,172, 5, 69, 81,185,214, 90,179, 0,184, 70, 70, 70,126, 70,211,180, 33, 35,
+ 98,165,232, 66,163,114,134,243,161, 81, 68, 68, 68,180, 81,212,161,177, 51,188, 33,189, 3,161, 79,239,208,238,247,223,127,191,
+219,179,103,207, 76,115, 98, 69, 40, 20,218,236, 40,109, 41,138,177, 54,156,150, 44, 90,166,203,109,225, 52, 12, 95, 26,156,224,
+ 77,151, 27,192,225,112, 64,211, 52,172, 8,170,248, 71, 69,139,113,116, 96,109, 68,142,201,177,169, 54,113,104, 45, 35, 17,159,
+171, 69,203,112, 44,248,124, 62,126,251,237, 55,124,242,201, 39,160, 40, 10,118,118,118,112,112,112,128,189,189, 61,246,237,219,
+ 7, 67,250, 7, 91,244,171, 86,171,253,101,201,146, 37, 51, 55,108,216, 32,102, 24, 6, 2,129,160, 66,104,205,159, 63, 95,161,
+209,104,126,177, 74,104, 25, 50,190,211,204, 29,123,123, 93,181, 81,135,230,182,177,224,175,229, 18, 25, 25, 57,156,166,233, 15,
+ 96,146,194,193,164, 92,165,212, 15,108,122, 7, 22, 86,220, 79,174,254,139,155,103, 16, 88,132,145, 37,171, 66,112,145,213,137,
+ 23, 79, 87,151, 83,155, 87,207,119,218,113,149, 64,106, 74, 10, 78,255,186,166, 92,100, 61,218,243, 23,210, 99,243,144, 26,219,
+ 1, 41,177,239, 90,253,246, 68, 16, 45,235,120,185,224,169,140,134,180, 48, 3, 96,112,253,121,136, 44, 79, 87,207, 83, 63, 69,
+205,119,222,251, 23,137,212,212, 84, 28,223,179,166, 68,167, 83,190,243, 44, 34,107, 40,159,255, 65,112, 67,191,228,217,159,125,
+ 48,160,109, 3, 31,184,103,220,197,161, 17, 3,176,112,215,135,112,244,228,224,205, 94,142,248,116,177,207, 0, 73,168,240,161,
+164, 3, 62,176,129,218, 88,100,181,172, 95,191,254,128, 75,151, 46,121, 52,111,222, 92,116,239,222, 61,229,198,141, 27,243, 21,
+ 10,197, 49, 0,137, 54,112, 26,139,172,150, 51, 70,143,136, 95,186, 57, 90, 68,242, 5, 88,246,203, 33,140, 63,155, 73, 29, 78,
+151, 70,160,242,176,162, 89,168, 84,170, 19, 81, 81, 81, 42,146, 36,241,244,233, 83, 20, 22, 22, 34, 63, 63,191,226,187,184,184,
+ 24, 28, 14, 7, 39, 79,158, 84, 75,165,210, 75,214, 54,240,226,197,139,245,179,178,178, 66,114,114,114, 90,235, 63,247, 80, 30,
+ 93,232, 96,180,172,117, 78, 78, 78, 24,128,171,134,229,153,153,153,245, 46, 95,190, 44,169,137,223,209,209, 17,124, 62,191,146,
+ 69, 75, 40, 20,194,219,219, 27, 58,157, 14,187,119,239, 6,128,167,213,113,240,249,130, 28,146, 36, 64, 51,180, 74, 36, 18,209,
+ 18,137,196,172,192,178,133, 83,143,204,247,222,123, 79,153,144,144, 96,214,162, 85, 27, 78,134, 97,228, 61,122,244, 64,118,118,
+ 54, 68, 34, 81,197,195,218, 32,168, 72,146,132, 80, 40, 68,110,110, 46,198,140, 25, 3,134, 97,228, 47,250,206, 99,236,211,164,
+ 23, 67, 4, 0, 66, 47,132,170,248,105, 89,235, 3,101, 24, 26,100, 24, 6, 6,193,101,178,190,162, 46,107,178,183,155,248,116,
+141, 46, 46, 46, 94, 90,222, 28,102,163,201,247, 38, 27, 30, 10, 21, 66, 43, 41, 41, 9,209,209,209, 40, 46, 46,134, 64, 32, 64,
+ 81, 81, 17,182,110,221,138, 59,119,238, 64, 32, 16,192,176, 47,172,213,111,109,219,182, 93,122,238,220,185, 59,131, 7, 15, 86,
+ 36, 38, 38, 66,161, 80, 32, 49, 49, 17,239,190,251,174,242,194,133, 11,201, 10,133, 34, 18,214, 12, 29, 26, 50,190,235,167,215,
+ 81,169, 84,184,126,253,186,217,143,165,109, 76,145,156,156, 28, 64, 81, 84, 35,134, 97, 58, 50, 12,227, 4,125, 10, 7,253,127,
+227,207,123,250,117, 78, 12,195,116,164, 40, 42, 56, 57, 57, 57,128,149, 19, 44, 94, 81,156, 49, 18, 91,140,145,200, 58, 83,189,
+ 69,139, 38,163,182,172, 89,224,244,203, 21, 18,143,211,147,113,237,200,186, 18,138,214,190, 99,227,116, 56,221, 96,148,107, 67,
+ 36,182,111, 70, 19,229,225,204,210,194,199, 0,195,169,141,208,170,196, 9,154,140,218,186,102,190,243,206,107, 4,178, 31, 63,
+194,133,131,107, 75,116, 58, 85, 87,164,196, 94,175, 13,231, 80, 62,127, 14,143, 67,204,238,209,254,127,252, 14,255,107, 8,251,
+252, 52,228,102,102, 99,119, 82,193,211,228, 34,213,168, 11,132, 6,233,143, 84, 91,122,125,230,230,230,234,195, 67,159,207,221,
+221, 46, 29,146, 30, 32,120, 50, 13,163, 97,150,228, 92,168,152,150,162,114, 59,171,194,199,209,209,113,240,181,107,215,156, 68,
+ 34,145,248,218,181,107,244,198,141, 27,159, 40, 20,138, 35, 0,226,173,234,123, 85,248,181,105, 24,116,230,219,181,155, 69,101,
+ 50, 57,100,106, 13,132,222, 18,106,127,252,173,254,176,156, 0,179, 18,167, 80, 40,220,185,115,231,206, 94,157, 58,117, 10,104,
+214,172, 25,249,244,233, 83,148,149,149, 85, 56, 87,123,122,122, 34, 41, 41,137, 78, 77, 77,205, 22, 10,133,187,172,109,231,219,
+111,191,157, 74,146,228, 61,253, 48,218, 61,152, 68, 23, 26, 21,109,148,147,147,211, 70, 34,145,156, 1, 96,103, 20,117,104,204,
+105, 72,239, 48, 19, 0, 73, 16,196,213,196,196,196,178,158, 61,123, 66, 44, 22, 67, 38,147,193,223,223, 31, 58,157, 14, 71,142,
+ 28, 65, 66, 66,130,140,166,233, 51,102,196,107,165,118, 42,149, 10,127, 0,164, 66, 46,127, 99,248,240,225, 97,147, 39, 79,174,
+ 20,146,238,229,229, 5, 55, 55, 55,155, 56, 1,224,233,211,167, 77,126,255,253,247,137,137,137,137, 95,247,234,213,203,121,230,
+204,153,194,250,245,235,131,162, 40,178,182,156, 69, 69, 69,206,215,175, 95,255,190, 67,135, 14, 95,246,236,217,147,251,237,183,
+223,194,217,217, 25, 20, 69, 65, 44, 22, 67, 42,149, 34, 50, 50, 18,231,207,159,215, 49, 12,179,182,164,164,100,138,141,231, 18,
+158,245,218,180,100, 1,178,148,146,193, 66,249,127,188,157, 38, 62, 93,208,167,112,152,110, 33,131, 61,172, 61,231, 13, 66,139,
+195,225, 32, 45, 45, 13, 27, 55,110,172,146, 71,203,144,254,193, 2,183,185,190, 51,167, 79,159,166, 8,130,120,235,218,181,107,
+211, 63,254,248,227, 81, 50,153,204,207,222,222, 62, 91,171,213,254,172, 80, 40, 22,163,220, 31,149,111,203, 61, 68, 38,147,165,
+155,139, 58, 52, 45, 3,184, 84,203,105,146,222,161, 82, 10, 7,147,109, 42,165,126, 48,147,222,225, 31, 63,238, 44,231,191,146,
+243, 85, 23, 91,150, 19,150, 86, 65,203,209, 60,158, 66,219,252, 92, 50,241, 44, 34,171,170,181, 68, 41, 79,158,187, 51,227,127,
+106,149, 18,178,146,188,251, 72,219,157,255, 76,221,210,183,243,108, 50,129,180,212, 71,184, 18,183,182,188,157, 41,177,181,110,
+ 39, 1,124,179,254,104, 44,159,112,118,195,141,137,159, 32,187, 88,134,163, 41, 69,123, 24,185,234,139, 95,128, 34,156, 7, 72,
+157,234,220,214, 89,185,235, 58,126,228, 60,192,195,151,135, 21, 83,127,134,104,134, 59,255,205,174,157,108,153, 3, 49, 87, 36,
+ 18,157, 91,189,122,117,183,142, 29, 59, 10, 35, 34, 34,204, 57,200,219,138,204,171, 15, 30,173, 63,188,225,135,169,238,205,219,
+225,199, 57,211,168,157,241,183, 76,163, 16,171, 69, 72, 72, 8,117,241,226,197,201, 99,198,140, 89,209,173, 91,183, 58,239,191,
+255,190,192,223,223, 31, 66,161, 16,143, 30, 61,194,185,115,231,212, 41, 41, 41,217,114,185,124,114,139, 22, 45,108,201,113, 86,
+ 52,119,238,220,165,250, 58, 8,253,112, 97,107,232,163, 11, 13,133,244, 73, 75, 91, 3,176,155, 63,127,254,199, 0, 96, 33,236,
+123, 46,128, 13, 0,184, 12,195,228,198,196,196,188,117,240,224,193,183, 38, 77,154,196,239,213,171, 23, 46, 93,186,132,227,199,
+143,107, 52, 26, 77,188, 94,184, 90, 59, 85, 14, 13,224,186, 78,167,187,181,108,217,178,183, 56, 28,206, 92,195,138, 59,119,238,
+ 96,219,182,109,181,225,212, 1,248, 62, 47, 47,111,125, 76, 76,204,220, 19, 39, 78,140, 28, 62,124,184,147, 86,171, 69, 82, 82,
+ 18,126,250,233,167, 90,113,150,148,148, 76,244,240,240,152,125,228,200,145,159,143, 29, 59,214,111,216,176, 97,228,248,241,227,
+ 17, 21, 21,133, 95,127,253,149,166, 40,234, 32,143,199, 27, 94, 88, 88, 40,123, 25,119, 29,253, 48, 92,182,141,115, 29,214,200,
+251, 44, 67,131, 86, 34,231, 89, 9, 12,253,232,220,185,115,133,149,209, 96,133, 51, 46, 67, 16,132,205, 67,135, 0, 92, 24,134,
+161, 1,172, 69,249,252,162,198, 89,225, 57,248, 59,115,188,181,140, 77,115, 84, 46,119,160, 66, 82,245,147, 74,187, 0, 12,154,
+214,192, 86, 60,119,238,220,149,243,230,205, 91,105,154,194,193,184,144,105,234,135, 5, 11, 22,128, 77,239,192,226,117,133,121,
+161,117,125,147, 86, 27,216,127,230,234,111,167,205,211,105,213, 37, 12, 52,225,120,180, 47,241, 89, 43, 99,104,102,198,201, 29,
+243,163,192,160,136,161,116,211,159,185,245,255, 80, 59, 9,103, 55,148, 70,142,197,175,183,179,153, 92,153,246,195, 95, 52,154,
+ 74,214,160,114,159, 44,122,224, 41,101,209,110,215, 58,188,253, 19,223,113, 39, 14, 63,253,216,230,122,242,243,243,127, 91,185,
+114, 37,249,195, 15, 63,132,201,229,114, 83, 7,249,218, 98, 90,223,113, 51, 56,111, 6, 7,140,187,242, 48,253, 3, 88, 49, 92,
+104,138,183,223,126, 59,231,238,221,187, 67,142, 29, 59, 54,248,236,217,179,221,100, 50, 89, 0, 65, 16,176,179,179, 75, 87,169,
+ 84, 39,132, 66,225, 78, 27, 69, 22, 0, 96,222,188,121,204,130, 5, 11,136,187,119,239, 50, 28, 14,231, 79, 0,169, 28, 14, 39,
+205,216, 9,222,120,185, 97,155,249,243,231, 91,243, 64, 60, 91, 86, 86,150, 16, 25, 25,217, 41, 50, 50,242, 13,189, 85,232, 44,
+254,246,249,178, 21, 90, 0,103,249,124, 65, 54, 65, 16,126,124,129, 80,118,241,226,197, 19,207,200, 41,215,104, 52,211, 31, 63,
+126,188, 98,197,138, 21,139,237,237,237,219,220,185,115,231,207,103,225,212,139,168,254,110,110,110,117,162,163,163,247,110,221,
+186,181, 29,151,203,189, 68, 16, 68, 68, 73, 73,201, 75,157, 84, 90, 63, 65,244, 2, 27,230, 58,180,138,247,121, 39, 41,253, 39,
+132, 27, 69, 81,101,179,103,207,206, 55, 21, 94,166,214, 43,195,127,125, 42, 23,107,246,169, 45, 81,148, 53, 8, 23,162, 12, 0,
+202,231, 46, 44,159, 86,199,218, 73,165, 1, 40,106,186,206, 73,146, 60, 8,224, 62, 73,146, 15, 77, 3, 93,140,215, 45, 88,176,
+160,166,235,156, 5,139, 87, 26, 86,220,217,230,147,192,252,218,122,210,190, 64,115,229,243,105,231, 16, 62,127, 1, 9, 76, 5,
+ 64, 48,192,138, 95, 52,154, 89,213,109,232,243, 54, 22, 51, 4, 38,233,119,230,183,185, 23,176,168, 22,125,247,133, 21,243, 15,
+218,200,217, 24,213, 79, 40, 91,133, 51, 60, 60,156, 99,225, 97, 94,105, 82,105, 75,136,141,173,200,226,111,169,157,198,231,155,
+227,229,203,151,235,180,109,219, 54, 7,149,157,254,205, 45,103,108,236, 59, 7, 0,245,156,247,231, 43,193, 25, 20, 20, 36,120,
+244,232,145,250,223,117,109,178,156,255, 74, 78,151, 38,117, 65,224, 51, 24,231, 14,170,214,162,101, 36,208, 24,230, 39, 20, 39,
+ 61,182,208, 78,195,117,238,146,156,156, 28,208,160, 65,131,116, 0,197, 38,237, 48,183,142, 97,143,209,127,158,211, 28, 70,163,
+242, 84,116, 44,204, 28, 8,150,147,229,100, 57, 89, 78,150,147,229,100, 57, 89,206,218, 10,173, 87, 26, 36, 88,176, 96,193,130,
+ 5, 11, 22, 44, 88,252, 35, 32,170, 81,165,182,152, 4,107,163,108, 79,176,156, 44, 39,203,201,114,178,156, 44, 39,203,249,159,
+227,172,137,219,120,251, 87,117,232,240,133,181,155, 53,171,178,156, 44, 39,203,201,114,178,156, 44, 39,203,249, 44,130,229,149,
+ 6, 23, 44, 88,176, 96,193,130, 5,139, 87, 6,221, 26, 66,194,165, 64,254,254,200,170, 32,170, 26,209, 51, 8,190, 0,240,188,
+248,254,163,144, 0,232,109,244,255, 48,244,145,241,172,208,122,117, 17, 12, 96, 38, 0,227,185,200,174, 0, 88, 98, 82,110, 7,
+ 0,227, 9, 9,101, 40,159, 39,240,161, 45,149,145, 36,185,164, 83,167, 78, 95,156, 63,127,254, 7,157, 78, 23, 89,139,246, 6,
+ 72, 36,146,165, 4, 65,180, 2,192, 35, 8,226, 81, 94, 94,222, 18,157, 78,247, 44, 81, 43,129, 62, 62, 62,223, 1,248, 31, 73,
+146, 60,130, 32,146,243,242,242, 22,233,116,186,211,207,192,233,232,237,237,221,158, 97, 24, 31, 0, 28, 30,143,247, 36, 43, 43,
+235, 50,106,153, 91, 41,124,126, 18, 95, 42,211,241, 0,192,201,158,171,141,157,223, 68, 99,237, 50,246, 20,103,193,226,191, 13,
+166, 60, 50,185, 18,222, 13,194, 98, 70,135, 41, 20, 64,244,168,143, 53,127,164, 98,138,165,237, 9, 51, 81,205,166,156,239, 6,
+ 97, 49,197,148,115,244, 8,194,247,127, 60, 66,181,145,246,214,112, 26,176, 9, 32, 71, 91, 49, 75, 1, 97, 93,244,245,191, 29,
+189, 81,121,168,176, 98,232,176, 90,161, 53,176, 33, 36, 20, 23,220,216, 36, 24,194,120, 29, 1,188,161,127,200, 63, 68,121,174,
+162,210,103,108,220,171,194,249,111,195, 92,134, 97,134, 84, 58, 89,205,228, 33,122,231,157,119,222, 63,118,236,152,157, 97,190,
+ 59,154,166, 33, 22,139,117, 0, 70,216, 80,151,215,192,129, 3,103,108,217,178, 5, 3, 6, 12,152, 29, 23, 23,183, 18, 64,153,
+181, 27,187,186,186,134,187,184,184, 68,109,222,188,217,179, 93,187,183, 8,129, 64,128, 71,143,146,253,198,140, 25,211,236,238,
+221,187, 7,243,243,243, 71,217,218,121, 55, 55,183,161, 46, 46, 46, 43, 54,110,220,232,209,161, 67, 7, 16, 4,129,132,132, 4,
+191,137, 19, 39,190,145,145,145,177, 43, 47, 47,239, 75, 91, 57,221,221,221, 27, 58, 59, 59,119,249,241,199, 31,197,237,219,183,
+135, 72, 36, 66, 98, 98,162,195,231,159,127,238,147,149,149,149,148,151,151,119,198, 86,145,117, 51,225, 80, 63,157, 70,181, 12,
+ 0,184,124,225,180,118, 43,226, 15,221, 60,117,168,111, 77,203,194,231, 39, 29, 96,197, 22, 11, 22, 44,140, 49,180, 14,124, 24,
+ 6, 83,143,253, 52,135, 4,128, 30, 35, 23,142, 31, 90, 7, 63,252,146,109,121, 14, 91, 27,249,166, 12,247, 69, 84,116, 22,242,
+158,165,157,155, 0,114, 34,151, 59,254,205,182,109, 61,190,186,112, 33, 89, 3,252,252, 31, 57, 68,102,135, 57, 45, 10,173,254,
+ 77, 16,169, 43,183,152, 16, 61, 27, 96,215,241, 84,206,185,119,222,121,167,193,167,159,126, 74,180,108,217, 18, 9, 9, 9, 13,
+119,237,218,213,251,240,225,195,201, 20, 69, 37, 0,184, 13,235,179, 90,243, 0,132,114, 56,156, 86,255,114,206,127, 51,236,245,
+226, 42, 15,127, 39, 58,173,146,240,244,228,201,147,191,113,185, 92,131, 69,235, 77,153, 76,230,109, 98, 5,179, 6,245,180, 90,
+ 45,238,221,187, 7,146, 36,121, 0,234,163,234,148, 26,150,224,103,103,103,183, 46,254, 74,130, 59,193, 21,163, 72, 9, 64,169,
+129,192,193, 27, 91,182,197,184, 77,158,240,101,255,211,167, 79,159, 43, 45, 45,221,110, 67,123,234,219,219,219,175,188,113,227,
+134,187,157,157, 29,104,154, 70,105,105, 41,124,124,124,176,121,243,102,151,201,147, 39, 15,145, 74,165,167,149, 74,229,175,182,
+136,115,103,103,231, 46,183,110,221, 18, 27, 38,148, 86,171,213,240,243,243,195,142, 29, 59,132,227,199,143,111, 82, 92, 92,156,
+169, 86,171, 83,172, 37,148,202,116, 60,157, 70,181, 44,122,237,252,186, 0, 48,252,203,249,203, 4,165, 78, 71,172, 89, 38,149,
+233, 14, 3, 96,133, 22,139, 23,141, 86, 30, 30, 30,177,133,133,133,103, 0,140,194,243,177, 52, 52, 20,137, 68, 45,104,154,246,
+ 33, 73, 18, 28, 14, 39, 87, 38,147,221, 0,240,160,182,132,238, 65,157,251, 66,104,247, 9, 24,250, 13, 18, 0, 65,146,137,148,
+ 70,190,237,201,131,211,135,158,137, 83, 32, 30, 9, 48,111,144, 0, 77,144,228, 13, 90, 39,223, 92,120,239,244,209,127,203,193,
+185, 84,130, 70, 65, 62,214, 79,140,249, 60,248, 6, 5, 66, 66,210, 32,119,164, 89, 63,172, 56, 14,232, 53, 97,194, 4,159, 47,
+191,248,130,248,100,196,136,224, 51,231,207, 19, 97,182,204, 86,240,106,194,162,227,187, 89,161, 21,222, 4,174, 12, 48,125, 87,
+212, 76,146,203,225, 16,131, 39, 44, 25,178,117,237,247,100,247,190, 17, 21,195, 39, 29, 59,118, 68,199,142, 29,137,101,203,150,
+ 5,255,249,231,159,193, 59,118,236,208,197,199,199,223, 0,176,219, 82,101,239, 6, 65, 65, 3, 34, 62,143, 43, 27, 60,103,251,
+198,182,109,219,254,159,189,243, 14,139,226,106,219,248, 61,219,251, 46, 11, 11, 75, 71, 84, 58, 54,136, 98, 87, 44,216, 80, 44,
+137, 93, 99,124,237, 45,209, 68, 99, 98, 52, 38,182,216, 98, 84,140, 26,107,236,250, 26,123, 47,177, 87, 80, 64,197, 74,103, 89,
+154,244,178,253,124,127, 0,126, 72, 40, 11,152,215,148,249, 93,215, 92, 11,103,103,238, 61,211,206,220,243,156, 6, 30,143,135,
+250,104, 2, 64,247,198,140, 24,182,101,195,136, 97,211,230,199,183,110,221,150,188, 11,205,191, 17,119,129, 55,147, 90,203,157,
+156,156,218, 25, 12, 6, 62, 0,176, 88,172,226,196,196,196,105, 40,153, 27, 16, 0,142,154, 76,166,126,181,208,102, 0, 88,208,
+175, 95,191,121, 83,167, 78,133,179,179, 51,166, 79,159, 14,189, 94, 31,118,250,244,233,249, 0,150,161,134,155,199,198,198,102,
+254,134, 13, 27, 44, 89, 92, 17,252,230,196, 34, 37,219, 0, 0, 16,243,128, 99,147, 8,166, 79,159, 46,189,127,255,254,162,218,
+ 24, 45, 27, 27,155,239,126,249,229, 23, 75,161, 80, 8, 66,200,155,185, 24,243,243,243,145,159,159,143, 41, 83,166, 72,159, 60,
+121,242, 67,109,140,150, 82,169,108,183,126,253,122, 1,159,207, 71,126,126, 62, 71,167,211, 81,121,121,121, 40, 44, 44, 36, 90,
+173, 86, 55,109,218, 52,222,163, 71,143, 58,167,164,164,196,128,230,175, 2, 19,192, 0, 54,155, 61,176,113,227,198, 31,188,120,
+241,226,129,193, 96, 56, 12,224,240, 59,120,153,234,106,111,111,191, 88,165, 82,173, 7,176,235,223,114, 64,149, 74,229,225,155,
+ 55,111, 58,109,216,176,225,227, 85,171, 86,157, 2,240,223,122,200,113, 56, 28,206,160, 78,157, 58, 57,141, 30, 61,154,171, 84,
+ 42,161,209,104, 16, 27, 27, 43, 61,112,224,128,203,195,135, 15,147, 74,103,196, 48,251,133,194,202,189,173, 24, 44,233,190, 54,
+109,219,181, 31, 60,104,128, 68,105, 37, 67,145,214,136, 23,241, 41,206,103, 78, 29,235, 20,205, 17,220,212,233,114,134,102, 62,
+191,153, 95, 91,205,192,192,174,237,187,117,237, 42,145, 89,200,144, 83,160,195,171,184,100,151,203,231,143,119, 96,177, 4, 87,
+ 77,148,126,100, 90,212,249,194,247,121,110,166, 3,172, 2,190, 85,179,230,109,253,238, 7,141, 93,244, 1, 33, 4, 12,130,181,
+ 21,163, 89,211, 1,214,218,146,105,191,106,165, 7, 66, 8, 69, 97,101,249,104, 86,143, 70, 88, 76, 8, 62, 7, 3, 84,143, 26,
+170, 41,203, 8, 2,120, 22,150,150, 1, 19,199,143,167,242,114,115,241,240,225,195,194,138, 38,235, 71, 7,112,174, 50,208,224,
+104, 98,221,205,246, 95, 52,154, 85,105,213,161,217,227,104, 9,133,194, 74,211,101, 50, 25, 2, 3, 3,177,116,233, 82, 22, 0,
+255, 10, 95,191, 61,201, 42,192, 59,177,113, 46,100, 34, 30,195,217,217, 89, 34,149, 74,235,173, 9, 0, 32, 38,215,182,206,164,
+215,189, 95,191,250,248,194,158,213,190, 5,121,217,236,138,171,136,197, 98,120,120,120, 96,222,188,121,230,105,214,159,255,169,
+166,173,173,173,103,135, 14, 29,252, 47, 93,185, 98,161, 82,169,120, 42,149,138,119,238,210, 37,139, 54,109,218,248,219,218,218,
+122,190, 57, 84,132,212, 38,159,223,135,134,134,206, 63,122,244, 40,163, 67,135, 14,144,203,229, 8, 12, 12,196,169, 83,167, 88,
+171, 86,173, 90, 2, 96, 94, 77,249,100, 48, 24,237, 59,116,232, 64,129, 16,168,115, 12,184,179,212, 19, 15, 87,122, 33,175,152,
+224,117, 78, 46,138,138,138, 33, 20, 10,249, 40,169,238, 53,119,223,219,182,105,211,134, 2,240,198, 92,229,229,149, 44,249,249,
+ 5,208,106,117,224,241,120, 18, 0,124,115, 53, 9, 33,182,237,218,181, 3, 0,232,116,186, 55,111,120,217,217,217, 84, 78, 78,
+ 14,180, 90, 45,216,108, 54, 7, 53,183,107,124,163, 41, 21,177,244, 44, 14,111,246,232, 41,223, 38,142,158,242,109, 34,139,195,
+155,173,149,228, 26,205, 73,147,138, 88,250,247,124,125, 90, 51, 24,140,109,141, 26, 53,122,194, 96, 48,118, 2,176,173,167,102,
+ 75, 0, 75, 4, 2,193, 5, 47, 47,175, 68,161, 80,120,169,212,168,183,169,163, 38, 87, 40, 20, 94, 90,178,100,201,193, 7, 15,
+ 30, 12,190,120,241,162,107,100,100,228,160,229,203,151,239, 19,139,197,215,240,118,187,196, 90,223,155,174,174,174, 91,239,220,
+185,211,178,109,219,182, 91, 0,240,222,209,253,206, 4,208, 2,102,205,200,241, 94,206,187,189,159,159,159, 19,159,207, 71,183,
+110,221, 0,160,115,125, 52, 57, 28,206,160,121,243,230, 53,250,230,155,111,184, 41, 41, 41,184,116,233, 18,238,222,189, 11,131,
+193,128, 73,147, 38,241, 70,143, 30,221, 80, 34,145, 12,170, 85, 62, 89,210,125, 51, 62,253,172,231, 23,211,199, 73, 34, 18,116,
+216,126, 33, 1, 71,110,165, 32,173,144,139,190,131, 70,203,122,132, 12,233,193,229,201,246,213, 86,243,203, 57,115,122,142,255,
+100,184,228,113,138, 9,199,110,171,113,251,105, 14, 12,108, 11,244, 30,244, 31,121,243,118, 61,251,176,192,222,241,190,207,209,
+ 47, 64,235, 25, 51,102, 88,207, 94,185,251,134,125,203, 1,107,211,179,208,161,188,241,113, 7, 44, 44, 69,162, 1, 79, 59,117,
+ 26, 39, 40,153, 47,182, 90,205,183,244,252, 67,214,165,101,161, 99,249,246, 89, 29, 45,225, 86, 90,173,200, 60,183,237, 27, 6,
+161, 48,125,132,253, 91,229, 64,165,249,252, 29, 24, 60,227,179,207,216, 50,185, 28,161,161,161,208, 20, 20,188,213,102,182,171,
+ 19,122, 94, 16,178,146, 26,122, 57, 62, 9,116,161,174,253, 3,223, 87,198, 87, 25,209, 58,113,226, 4, 9, 14, 14,166, 0,224,
+208, 19,100, 13,242,198, 15, 67,166, 46,153, 71, 49, 40,210,192,183,237, 99,135, 70, 62, 5, 86, 86, 86, 40, 44, 44,132, 70,163,
+ 1,135,195, 65,113,113, 49, 18, 18, 18,112,251,246,109,200,229,242, 90,229, 36, 55, 55, 23, 98,177, 24, 98,177,248,157,104,206,
+253,184, 27,239, 85, 98, 58,239,236,237,223, 59,253, 52,249,191,173, 27,181,232, 28,217,117,200,244, 40,169,181,125,113,100,100,
+ 36,110,222,188,137,172,172, 44, 4, 4, 4,252, 83, 78,230,221,210, 54, 89,119, 1,200, 27, 55,110,236,120,246,194, 85,121,126,
+177, 73, 26,151,170,103,155, 76, 38, 8,133,118,134,253,135,142,229, 12, 30,212,151, 82,171,213,105, 0,238,150,154,219,154,230,
+ 84,228, 3,240,252,240,195, 15,191,156, 60,121, 50, 94,190,124,137,113,227,198, 21,221,189,123, 55,179,109,219,182, 86,191,252,
+242,139, 96,230,204,153,184,114,229,202,130, 19, 39, 78,252, 6, 32, 22, 64,165,115,181, 17, 66, 56, 28, 14, 7,134, 82,219,160,
+ 51,154,222,248,251,220,220, 92,144,162, 44,112, 56, 28, 38, 0,107,152,217,142,206,100, 50,113,216,108,246, 27,147,149,144,154,
+139,132,180, 66,228,230,107, 81, 84,100,128,182,136,128, 41,180, 98, 1,113, 74, 0,113,230, 70, 71,248,124, 62, 12, 6, 3,242,
+242, 74,178, 81, 22, 41,211,106,181,200,201,201, 1,147,201, 20, 3,144, 2,120,109,142, 96,105, 35,247, 35,165,213,128,184,183,
+187,159,226,197,201,185,111,165, 73, 69, 44,253,161,153,222, 76, 43,199,230,215, 91, 12,222,225,245, 38,237,253,182,207,226, 89,
+ 91, 91, 95, 62,120,240,160,183,155,155, 27, 98, 99, 99,189, 62,250,232,163,128,148,148,148, 22,168,253,156,140, 66, 6,131,241,
+195,232,209,163, 39, 15, 27, 54,140,114,119,119, 7,139,197,130,193, 96,112,124,249,242,101,224,129, 3, 7,230,108,221,186,245,
+ 23,163,209, 56, 11,230,183,251, 99,112,185,220,253,155, 54,109,234, 24, 16, 16,128,157, 59,119,226,238,221,187,166,150, 45, 91,
+ 50, 70,141, 26, 5, 23, 23,151,128, 81,163, 70, 29,209,104, 52,189,235, 24,217,114,105,211,166,141, 19,147,201, 68,219,182,109,
+ 57, 55,111,222,244, 3,112,179,158,199, 84,236,232,232,120,165,115,231,206, 45, 46, 92,184, 16,174, 86,171, 59,215, 98,127, 1,
+ 32,196,222,222,126,185, 76, 38,147,215,162,140, 45, 76, 78, 78,254, 28,192, 33, 51, 55,105,237,239,239,143,248,248,120,120,122,
+122,130,195,225,180,209,233,116, 19, 0,244, 4,240, 53,128, 39,181,200,175,123,215,174, 93,157, 58,119,238, 76, 29, 58,116,232,
+ 77,251, 80, 6,131, 1,131,193, 0, 14,135,131,214,173, 91, 51,194,194,194, 28,238,221,187,231, 14, 51,170, 17,173, 26,117,238,
+219,182,125,167,246, 29, 3,154, 49, 86, 29,122, 1,163,201, 8, 38,101, 0,139, 50,193,164,231,129,199, 97,194,221,247, 3,230,
+211, 71, 17, 1, 90,141,174,111,230,243, 11,199,205,209,236, 25,212,189,131,183,167, 59,227,167, 35,175,144,157,252,196,152, 28,
+125, 53,131,193,100,192,219,191,139,194,221,167, 5,179, 69, 64,103,182, 42,246, 81, 96,113,113,199,110, 89, 47,175, 94,120, 31,
+ 55,228, 66,128,233,232,160, 24, 16,220,189, 51, 39, 69,165, 42, 56,112,232,120, 84,161, 30,183, 1,224, 10, 64,245, 6,154, 53,
+109,213,170,211, 47,203,150, 89,217,217,217,177, 71, 14, 27,102,216, 28, 30, 30,142, 42,170,126, 23, 2, 76,133,173,109,183,137,
+ 19, 39, 50, 83, 84, 42,114,224,240,201,200, 50, 61,148,188,165, 52,109,230,232, 21,140,130,167,181,170,166,236, 11,112,149,182,
+182,222, 19, 38, 76,128, 90,165,194,206, 93,187,242,139,129, 91,101, 81,172, 99, 76,172,247,105,100, 59,102,246,127,250, 81, 78,
+118, 10, 76, 92,176,185, 77,160, 46,173, 17, 82,254,255,252,151,247, 34,127, 99,147, 53,190, 82,163, 85,145,255, 62,193,124, 9,
+ 7,174, 7, 14,236,101,164,231,233, 10, 94,190,124, 9,133, 66, 1, 59, 59, 59,200,100, 50, 60,126,252, 24,151, 46, 93,194,179,
+103,207, 96, 50,153,208,188,121,243, 90,229, 38, 35, 35, 3, 17, 17, 17,144,203,229,239, 76,179,145,147, 53,166, 58, 89,115, 82,
+ 51,115, 57, 23,238, 62, 11,216, 60,119,144, 15,195,107,208,214,242,147,196,106,181, 90,252, 67,120,211,187,208,201,201,169,221,
+246,237,219, 57, 26, 3, 36,238, 19,110,173, 40, 40, 54,138, 0, 64,196,103, 22,132, 45,247,152,245,253,247,223, 23,124,242,201,
+ 39, 94,137,137,137, 75,205,136,245, 47,238,218,181,235, 23,132, 16,246,140, 25, 51, 0, 0,163, 71,143,206,189,125,251,182, 59,
+128,180, 75,151, 46,217,143, 29, 59,246,249,229,203,151,133,159,125,246, 25,211, 96, 48, 60,102,177, 88,228,196,137, 19,223, 1,
+248,246, 15, 79, 68, 6,227,126,120,120,120, 3,123, 23, 15,184, 88, 49,208, 97,222,179,146, 2, 78,104, 66, 82,220, 43, 68, 71,
+222,133,173,173,173,204,206,206,238, 73, 82, 82,146, 46, 57, 57,121, 78, 65, 65,193,134, 26,242,248, 48, 44, 44,204,206,197,197,
+ 5,249,249,249, 72, 74, 47,196,244,195, 66,228, 22,149, 4, 49,216, 40, 66, 11, 39, 15,137,128,161,189,155,150,150,166,211,106,
+181,223,228,228,228,108,175, 78,147,205,102,103, 70, 70, 70,138,157,157,157, 81, 92, 92, 76, 94,191,126, 77, 21, 20, 20, 32, 47,
+ 47,143, 58,121,242,100,255,148,148,148,150,174,174,174,148,163,163,227,119, 41, 41, 41, 69,201,201,201,227,204,169,154, 44, 53,
+ 76, 70, 22,139,181,106,252,248,241,131,127,251,237,183,251,135,190,245, 14, 41, 87, 93, 34,243,245,245, 61,219,172,153,143,253,
+174,149, 77,215, 2, 88,241, 23,184,182,198,124,245,213, 87,222,150,150,150,152, 56,113, 34, 22, 46, 92,136,249,243,231,187, 77,
+156, 56,113, 60,128, 31,107,161, 35,176,181,181,189,247,211, 79, 63,121,181,107,215, 14,167, 78,157,194,222,189,123, 17, 19, 19,
+ 99,112,117,117,101, 5, 4, 4, 96,193,130, 5,232,209,163,199,184,105,211,166,117, 82,169, 84,126,102,154,143, 79, 22, 44, 88,
+ 16,210,190,125,123,124,252,241,199,154,223,127,255,125, 48,128,115,231,207,159,239,114,229,202,149, 67,187,119,239, 22, 44, 89,
+178,164,219,204,153, 51, 39, 2, 88, 87,135,253,239,223,177, 99,201, 28,202,237,219,183,199,242,229,203,123,212,211,104,113,173,
+172,172, 78,238,220,185,179,133,135,135, 7, 70,142, 28,233, 55,120,240,224,147, 89, 89, 89,221, 1,152, 85, 32, 57, 56, 56,252,
+112,244,232,209,198, 85,213, 44, 84,134, 70,163,177, 28, 48, 96,192,178,184,184,184, 90, 25,173, 61,123,246,224,243,207, 63, 71,
+243,230,205,155,181,110,221,122,227,132, 9, 19,240,225,135, 31,118,125,252,248,177, 18, 37,189,150,107,132,207,231, 55, 27, 58,
+116, 40,247,206,157, 59, 0, 0, 95, 95, 95,180,104,209, 2,155,104,178,222, 0, 0, 32, 0, 73, 68, 65, 84,241,241,241,184,127,
+255, 62, 52, 26, 13,148, 74, 37, 6, 14, 28,200,143,139,139,107,150,145,145, 81,163,209, 98,240,132, 99, 66,130,123, 75,142,221,
+ 78,129,209,100,192, 7,141,165, 8,240,178,193,211,164, 92,132, 61, 73,130, 81,203,129,212,210, 10,109, 58, 5, 89,170,147, 99,
+198,100, 2, 53,183,215,226, 9,199, 12, 12,233, 35, 62,118, 75,133,108, 85, 52,121,113,247,183, 75,250,226,130,113, 0,112,255,
+226,190,141,182, 86,130,238,238,254, 31, 48, 59,119,239, 39, 63,188, 87, 61, 38,235,127, 51,183,223, 31,184,226,132, 77, 46,236,
+140,209,179,135,119, 32,108,185,227, 93,137, 94,191,190,236,187, 30, 64,208,156,175,190,106,253,159,241,227,249, 38,147, 9,187,
+127,253, 53, 55, 34, 60,252,233,120,192, 52,161, 10,189,245,128,203,224,144, 16,158, 68, 42,197,167,211,167, 67,162,215, 95,126,
+115, 72,128,174,159,126,241, 69,187, 41, 83,166, 8, 54,126, 55,249,126,143,177,139,252, 77,132, 80,101,213,148,123,170, 15,197,
+181, 28, 27, 18, 2,137, 84,138, 25, 51,102,128,210,233,206,190, 49, 80, 44, 92,254,164,127,135,128,225,125,219,131, 2,133,189,
+ 39,174,227, 69,124,122,228,229, 20,188,250,187,186,170, 10, 84,217, 70,171,218,170,195, 60, 29, 82,187,246, 25,148,226,238,238,
+158,231,230,230,150,151,153,153,137,168,168, 40,100,101,101, 97,221,186,117,136,142,142,134,201,100,170,179,129, 49,153, 76,120,
+215,154, 0,160,180,146, 98,100,239, 86, 44, 77,113, 1, 63, 61, 61,253,173,234,163,127,144,209,122,131,193, 96,224,187,186,186,
+130, 1, 80, 57,133,122,177,122, 79, 71, 74,189,167, 35,149, 83,168, 23,107,181, 90,134, 88, 44,134, 70,163,225,155, 33,197,238,
+213,171,215, 23,191,253,246, 27,123,241,226,197,104,210,164, 9,116, 58, 29,110,223,190,157, 4, 32,173,116, 29,213,213,171, 87,
+ 85,101, 70,120,233,210,165, 56,124,248, 48,213,173, 91,183, 57,149, 93, 79, 41, 41, 41, 63, 76,152, 48,225,117, 97,222,107,108,
+ 26, 82,132, 67, 35,211,177, 45, 36, 6,195,172, 14,226,117,106, 2, 54,111,222,140,243,231, 47, 80,231,206,157,231,252,254,251,
+239,162, 62,125,250,172,117,112,112, 56, 81, 93, 38, 85, 42,213,226, 41, 83,166,100,231,229,229, 33, 47, 47, 15, 69, 69,197,120,
+ 93, 0, 68,174,246, 70,228,106,111, 20,155, 4, 8, 93,191,129, 17, 25, 25,169,136,137,137,177,239,219,183,239,106, 59, 59,187,
+173,213,105, 38, 39, 39,223,153, 58,117,106,113,110,110, 46,180, 90,173,206,104, 52,106,139,138,138,244,251,246,237,251,204,202,
+202,170,205,169, 83,167,216,231,207, 95, 96,253,254,251, 21,206,165, 75,151,100,129,129,129,251,149, 74,229, 14,115, 34,101, 76,
+ 38,115,205,174, 93,187,198,132,134,134, 42, 3, 2, 2,124, 42, 84, 69,217,117,239,222,189,193,175,191,254,234,176,124,249,242,
+ 57, 40,233,128,242, 94, 81, 40, 20,211, 66, 66, 66, 16, 26, 26,138,227,199,143,207, 92,187,118, 45,122,245,234, 5,123,123,251,
+169, 48,191,218, 11, 0, 86,252,248,227,143, 94, 94, 94, 94, 24, 61,122,180,118,220,184,113,179,182,111,223,238,122,237,218, 53,
+206,142, 29, 59, 26, 76,156, 56,113,198,240,225,195,139, 27, 54,108,136,117,235,214, 53,102, 48, 24,107,204,186,191,149,202,207,
+134, 13, 27,134,149, 43, 87,226,247,223,127, 31,132,146, 7,170, 22,192,233, 27, 55,110,244, 93,178,100, 9, 6, 13, 26, 4, 71,
+ 71,199, 25,117,137, 60,121,123,123,127,211,179,103, 79, 92,187,118, 13,126,126,126,104,211,166,205, 76, 0,138, 58, 30, 78,134,
+ 88, 44,222,191,125,251,246, 14, 13, 26, 52,192,162, 69,139,208,168, 81, 35,108,221,186,181,131, 72, 36,218, 15, 51,155,111,200,
+100, 50,177, 80, 40,196,156, 57,115,200,160, 65,131, 94,215,180,204,156, 57,147,240,120, 60,200,229,114,115, 59,190, 8,248,124,
+126,219, 38, 77,154,224,246,237,219, 56,127,254, 60,230,205,155,135,207, 62,251, 12,233,233,233, 24, 58,116,168, 16,192,135,181,
+216,111, 27,107,107,107,228,230,150,204, 11,223,164, 73, 19, 60,120,240, 0,233,233,233,112,116,116,132, 90,173,134,149,149, 21,
+ 60, 60, 60, 96, 50,153,108,204,147, 36, 77, 20,150, 50,164,101,105,192,130, 1,254,238, 10, 92,142,202, 68, 66,186, 22, 54, 86,
+ 22, 80,167,165,195,193,138, 15, 39, 39,103, 16, 98,106, 98,150, 3,102, 50,252,121,124, 1, 94,231,233,144,252,228,247, 76,157,
+ 81, 51, 33, 59,246, 70, 98,118,236,141, 68,157,166,120,194,253,235,231, 51, 27, 40, 5,112,114,114, 2, 69, 76,173,222,199,253,
+248,145, 51,156, 68, 2,214,232,243,219,190,161, 78,252, 50,151,210,100, 38,180,236,169, 44,137, 44, 91, 3,174, 31, 13, 29,218,
+118,214,172, 89,252,212,212, 84,211,240, 33, 67, 94, 47,254,246,219, 11,103,106,120, 49,200, 7,220,186,119,239, 14, 6,128, 51,
+231,206, 21,168,129, 36, 0, 80, 2, 78,253, 6, 12,232,248,213,151, 95, 10, 50, 50, 51, 77,183, 95,230, 31,139, 78, 35, 3, 45,
+141,112, 53,167,125,150, 17,104, 90,166,123,246,236, 89, 82, 4,220, 7,128,206, 78,152, 26,212,206, 55, 96, 84, 72, 71,164,164,
+101, 97,198,226,109,216,120,224,202, 89,153,158,116,249, 7, 61,138,199,215,201,104,149, 86,253,252, 33,173,176,240,143,181, 7,
+245, 53, 48,127,134,102,101,252, 19,141, 86, 25,122,125, 73, 45,137, 86,111,130, 86,111, 42,123,171, 69, 81, 81,145,217, 18,103,
+207,158,221, 57,125,250,116,172, 94,189, 26,207,159, 63, 7,135,195, 65,147, 38, 77,236, 0,136,203,202,124,127,127,127, 27, 6,
+131,129,167, 79,159, 98,213,170, 85,248,228,147, 79,200,205,155, 55,183,162,242,241, 82, 30,188,126,253,122,253,132,113,159,100,
+103,165, 38, 64, 95,148,133,180,228, 87,208, 20,100, 99,209,210, 31, 80,168,103, 65,157,163,131, 58, 71, 7, 6,207, 18, 27,127,
+217,206,244,246,246,238,201,100, 50,131,171,201,231,237,212,212,212, 95, 38, 77,154,148,173, 86,171,223,236,159, 86, 79,160,213,
+191,125,189, 10,133, 66,172, 89,179, 70,230,238,238, 30,194, 98,177, 2,171,209, 76, 73, 76, 76,140,158, 52,105,146, 54, 53, 53,
+ 21, 57, 57, 57, 56,118,236, 88,223, 6, 13, 26,200,151,173, 88, 77, 21,232, 88, 80,103,235,160,206,214,129, 43,182,193,254, 67,
+191, 49, 61, 60, 60,134,179, 88,172, 54, 53,153,172,221,187,119,143, 26, 50,100,136,100,197,138, 21,175,143, 30, 61, 26, 10,160,
+252, 9,121,186,102,205,154, 3,251,247,239,207,251,226,139, 47, 44,151, 47, 95, 62,243, 61,155,173,192, 33, 67,134,120,154, 76,
+ 38, 28, 60,120, 48, 18,192,143,191,253,246,219, 61,141, 70,131,161, 67,135,186,150, 86, 35,153, 67,203,225,195,135, 79,238,208,
+161, 3, 62,253,244, 83,221,133, 11, 23,252, 1,172, 70, 73, 85, 46, 1, 16, 15, 96,237,149, 43, 87,154, 79,155, 54, 77,211,170,
+ 85, 43,124,252,241,199,159, 0,232, 80,131,110,219, 97,195,134,121,153, 76, 38,236,219,183, 47, 2,192,169, 10,223, 95, 58,116,
+232,208,109,173, 86,139, 17, 35, 70, 52, 4, 80,155,130,156,195,227,241, 14,126,255,253,247, 22,201,201,201, 24, 53,106,148,230,
+233,211,167,248,246,219,111, 5, 50,153,236, 84,185,123,192,108,120, 60,222,230,159,127,254, 57,164,105,211,166,152, 52,105,146,
+118,195,134, 13,211, 39, 79,158,172,245,247,247, 71,104,104,104, 8,151,203,173,213, 20, 29, 42,149, 42,251,201,147, 39, 86, 53,
+ 45, 73, 73, 73,230,118,207, 23,138,197,226, 91,190,190,190,185, 77,154, 52,249,192, 96, 48,224,241,227,199,175,118,238,220,105,
+106,210,164, 9,214,175, 95,143,229,203,151, 35, 56, 56, 24, 76, 38,211,108,163,197,100, 50,161,211,233, 32, 20, 10,193, 98,177,
+240,234,213,171,178,161,101,192,225,112, 0, 0, 34,145, 8, 2,129, 0, 12, 6,195,172,222,104, 20, 5,146, 91,168, 7,155,205,
+ 0,139, 97, 66,116,124, 14,116,122, 19,248, 28, 38,216, 44, 10, 32, 38, 88,136,216,224,115,153, 96, 80,148,201, 76, 77,228, 20,
+232,192,229, 48,192,230,112, 41,134,193, 40,120,243,112,100, 25, 5, 2, 1,151, 82, 72,121,224,115,254, 66,211, 2, 83, 37, 13,
+203,199, 0,108,145,179,243,224,149,171, 86,113,115,243,243, 49,104,208,160,215,113,247,238,237, 42, 2,238,117,170,161,147, 18,
+131,197,114,239,220,169, 19,194,194,195,145,151,149,245, 2, 40,105, 28,207,181,183, 31,178,102,205, 26,110, 81,113, 49, 6, 13,
+ 28,152,253,252,250,245,221,137,249, 56,177, 47,190,196,136,213,120,222, 57, 28,219, 50,221,156,172,172, 44,160,100, 8, 9,165,
+181,120,217,148,225, 61,144, 87, 88,140,217, 63,236, 50,133, 71,167, 76,189,150,132, 62,191,169,144,243, 15,123, 12,143,175,176,
+ 0, 48, 99,192,210,178,232, 82, 77,102, 69,163,209,188,115, 3, 84, 95,205,202, 76, 98,125, 53,255,138,176, 88,172,226,103,207,
+158,113,165, 86,246, 38, 43, 9, 59,171,193, 39,215,101, 0, 96, 41,102,229,232,140,122,147, 74,165, 2,143,199, 43, 54,179,186,
+ 97,220,230,205,155, 23, 1,240, 97,177, 88, 39,182,111,223, 78,237,218,181, 75, 62,108,216,176,151, 79,158, 60, 73,246,245,245,
+117,217,190,125,187, 20, 0,214,174, 93, 75,246,239,223,223, 3, 37, 67,102, 84, 57,142, 75,106,106,234,183,153,153,153, 55,167,
+ 76,153,178,142,203,229,202, 69, 34,145,213,181,107,215,168, 98, 29, 65,203,175,226,223,244, 68,148, 10, 24,184, 58, 87,138,241,
+227,199, 51,159, 60,121,178, 52, 57, 57,249, 68, 53,154,115,178,179,179,175, 61,127,254,124,181,204,177,133,181,200,229, 43, 89,
+192,220,167, 0, 0, 23, 5, 27,140,210,114, 49, 59, 59, 27,233,233,233,152, 60,121,178,252,229,203,151,115,146,147,147, 47, 87,
+ 19,213,186,146,145,145,145,244,232,209,163,206,108, 54,155, 43, 18,137, 90,222,186,117,139, 42,214,154,208,108, 78, 60, 94,231,
+151,228,211, 82,204,194,253,239,149,152, 58,117, 42,235,197,139, 23, 63,164,164,164,180,175,180, 48, 99, 48,150,151, 55, 89,179,
+103,207,126, 8,160, 33,128,183,170, 70,141, 70, 35, 53, 98,196,136, 40, 0, 77,190,248,226, 11, 75, 66,200,204, 57,115,230,188,
+ 6,176,233,127,125, 45, 73,165,210,101, 19, 38, 76,192,254,253,251,145,149,149,181, 6, 0,114,115,115,127,220,179,103,207,190,
+113,227,198,225,215, 95,127, 93,150,158,158,126, 6, 53,119,213,238, 53,116,232, 80,156, 62,125, 26, 23, 47, 94,252, 6,192,227,
+ 42,214,123,126,237,218,181, 57, 71,143, 30,253,105,216,176, 97,216,182,109, 91, 79, 0,213, 53,144,237,222,163, 71, 15,156, 58,
+117, 10,153,153,153,161,149,173,144,157,157,189,225,216,177, 99,173,123,244,232,129,165, 75,151,118, 7,112,201,140, 93,247,146,
+201,100,219,127,250,233,167,150, 77,155, 54,197,240,225,195,139,117, 58, 93,207, 47,190,248,226,248,222,189,123, 37, 59,119,238,
+252, 96,252,248,241,119, 74,199,124,187,109, 86, 40,139,193, 88,178,106,213,170,177,157, 59,119,198,204,153, 51, 13,103,207,158,
+237, 7,224,220,153, 51,103, 94,206,158, 61,251,228,170, 85,171,152, 43, 87,174, 28, 59, 99,198,140,116,147,201,244,190,204,245,
+247,107,215,174,109, 29, 20, 20,132, 87,175, 94,225,246,237,219,208,233,116,191,222,186,117,235,170,155,155,219,247, 90,173,246,
+184, 72, 36, 26, 45,145, 72,124, 91,180,104,209,229,254,253,251, 66,152,215, 78, 47, 53, 54, 54,214, 66, 38,147,193, 96, 48, 32,
+ 50, 50, 18,206,206,206,208,233,116,136,137,137, 65,211,166, 77,193,225,112,144,154,154,138,114,209,242, 26, 76, 17, 35,242,101,
+156,170,161,165, 68, 4, 24,249,120,240, 52, 9,214, 10, 57,140, 20, 3,106,117, 10, 90,120, 58,130,162, 40,100,103,170, 65, 81,
+ 84,148, 57,154, 70, 98, 10, 75, 80,165, 57, 88, 73,120,104,218, 58,200,234,214,153,244, 93,210,134,237,198,179,152, 20,147,203,
+ 19,111, 26,251,241,199, 10,147,137, 32, 59, 51, 21, 44, 6,227,238,251, 56, 65, 7, 19,144,216,169, 17,255, 65,208,216, 69, 45,
+ 40, 2, 82,164,195,206,109,169,200, 18, 2, 45,214,126,253,181,133,149, 66,129,225,195,135,155, 50,147,147, 47, 20,154, 57,176,
+114, 67, 55, 55,165, 88, 34,193,141, 27, 55,192, 44,105, 99,139,173,128,215,242,217,179,173,108,108,109,241,201,216,177,166,212,
+132,132, 75, 69,128,170, 54,121,109,216,168, 17,187, 76,151, 81,170,155,194,196,244, 47,250,117,224,137, 4, 60, 44,217,248, 27,
+ 18, 51, 10,246,221, 74,193,198,127,104,188, 99,115,181, 17,173,170, 26,159,149, 52,170, 22, 86,107, 86,248,124,254,155,104, 74,
+ 45,222,244,222,185,102, 77,252, 25,154,239,145,185, 0,142, 2,152,155,152,152, 24, 61,118,236, 88,157, 65,167,201,187,185,168,
+225,151,225, 75, 27, 76,186,245,173,221,164, 35,211,101, 95, 22,230,188,206, 91,187,118,173, 62, 49, 49, 49,186,252, 54, 53,104,
+ 39, 0, 56,181, 99,199,142, 13, 7, 15, 30, 68,147, 38, 77,240,248,241, 99,155,130,130, 2,191,168,168, 40, 75, 47, 47, 47,236,
+218,181, 11,251,247,239, 95, 13,224,124,117, 38,171, 12,131,193,112, 65,173, 86,123,196,199,199, 55,182,176,176,208, 91, 88, 88,
+160, 98, 79,196,220, 34, 19, 50,179,115, 96,105,105, 5,169, 84,234,106,134, 57, 63,165, 86,171,221, 77,114,207,142,238, 25,107,
+114,194,150, 56, 33,108,137, 19, 78,205,177,135,157, 5, 23, 89, 89, 89, 72, 79, 79, 71,122,122, 58, 40,138,130, 94,175,247, 54,
+ 67, 51, 38, 37, 37,101, 75, 66, 66,194, 81,165, 82, 9,137, 68, 2, 2, 64,157,173,199,195,149, 94,120,184,210, 11,234,108, 61,
+114,243,242,208,160, 65, 3, 72, 36,146,170,170, 40, 24, 14, 14, 14,189,135, 12, 25, 34, 1,128, 82, 3,213,149, 16, 50,169,146,
+101,162,193, 96,104, 87,182,238,231,159,127,110, 9,160,199,255,248,122, 98, 2,152, 50,110,220,184, 15,248,124, 62,214,175, 95,
+ 31, 3, 96,119, 89, 89,191, 97,195,134,167, 0, 48,125,250,116, 95, 0, 51, 81,197, 72,208,111, 66, 67, 28,142,191,183,183, 55,
+110,221,186, 5, 0,191,213,240,219,135,110,222,188, 9, 55, 55, 55,240,249,252,150, 53,172,235,234,228,228,132,167, 79,159, 2,
+192,131, 42,214,121,240,244,233,211,146,234, 30,138,114, 53, 99,223, 67,130,130,130, 34, 47, 95,190,220,178,109,219,182, 24, 59,
+118,172,246,206,157, 59,189, 1, 92,125,240,224, 65,224,136, 17, 35, 10,220,221,221,113,229,202, 21,175, 17, 35, 70,220,100, 48,
+ 24,139,204,208,252,228,187,239,190,155,219,191,127,127,124,247,221,119,228,192,129, 3,195, 1,156, 43,253,238,236,190,125,251,
+ 70, 45, 94,188,152, 12, 28, 56, 16, 11, 23, 46,156, 11, 96, 82,117, 98, 5, 5, 5, 57, 70,163, 17, 5, 5, 5,102,133,228,205,
+ 93, 95,161, 80,244, 10, 10, 10,194,188,121,243,224,224,224,128,227,199,143, 19, 0, 39, 0, 92,211,106,181, 29, 1,172, 42, 40,
+ 40, 56,114,235,214, 45,116,239,222,157,131,183,167, 24,169,238,247, 35,247,236,217,163,145,201,100,112,113,113, 65,195,134, 13,
+161, 86,171, 17, 23, 23,135,166, 77,155,194,223,223, 31, 6,131, 1, 91,182,108, 41,206,203,203, 51,107, 76, 62,131,182, 96,231,
+249,147,135,115,172, 36, 60, 56,218,200,208,192,193, 18,249,217, 25, 72, 87,171,224,239,237,140, 78,254, 13,144,145,163,197,217,
+ 19,135,179,242,242, 10,119,154, 21,194,215, 20,110,191,112,230,120,142, 92,194,129,135,167, 47, 70,140,157,222,162,133, 95,192,
+249, 86,173,218,157, 93,177,108, 73,179,174,109,188,169,164,140, 98,156, 62,241, 91, 86, 78,110,238,246,247, 81,208, 47, 4,152,
+197, 50,247,171,161, 71,195,182,248,244, 28,183, 37, 58, 9,107, 0, 64,207,100,122,245,238,213, 11, 73, 73, 73, 56,124,240, 96,
+ 74, 33, 16, 97,174,158, 64, 32, 96, 0, 64, 78, 78, 14,120,165,237,238, 12,128,103,159, 62,125,144,158,145,129, 61,187,119,167,
+159, 6,194,107,147,207,190, 0, 87, 40, 40, 9, 8,230,228,228,128, 2,114, 1,128, 98,161,119,171, 38,110, 72,127,157,139,203,
+119,163,243, 27, 20, 97,114,117, 58,127,227,134,240,117,107,163, 5, 32, 99,230,204,153,224,241,120,176,179,179,123, 99,142,202,
+204, 10,151,203,133,157,157, 29, 12, 6, 3,246,237,219, 7, 0, 25,213,190,225, 1,154,126,147,150,154, 52,122, 82,200,102,179,
+223,137,102,233,155,163,102,208,236,109,166, 51, 55, 43,239, 20, 83, 23,205,191, 1,173, 74,199,196,106, 5, 32, 43, 46, 46, 46,
+105,240,160,126, 57,241, 47, 31,169, 11,178, 85, 41,185,153,137, 41,137, 49, 81,234,175,230,204,204, 73, 74, 74, 74, 68,201, 88,
+ 90,173, 84, 42, 85,217, 54,230, 48,115,240,224,193, 63,143, 27, 55,142, 60,124,248, 16, 0, 16, 22, 22,134,143, 63,254,152,140,
+ 26, 53,106, 13,128, 47,235,144,239,130,162,162,162,183,162, 33, 58,163,233, 77,149, 95,110,110, 46, 84, 42, 21,180, 90,173,217,
+142,248,249,217,149,207, 94,199,221,215,251,186,136,224,235, 34,130,151,147, 16,148, 33,255,141,201, 74, 79, 79, 47,123,115, 46,
+174, 69, 62,115, 53, 26,205, 91,249, 44, 95, 53,153,155,155, 11,181, 90, 13,163,209, 88,213,131,204,148,156,156,124,118,255,254,
+253,121, 0,176, 98,197,138,215, 20, 69, 93,164, 40,234,231, 74,150,141, 44, 22,235, 70,217,186, 43, 87,174,124,141, 63, 86,137,
+253,153,244,111,218,180,105,214,220,185,115,215,207,152, 49, 3, 27, 55,110, 68, 74, 74,202,151,248,255,177,120, 76, 25, 25, 25,
+179, 67, 67, 67, 49,102,204, 24,204,159, 63,127,165,159,159, 95, 46,128, 17, 85, 9, 90, 91, 91, 59,178, 88, 44,132,135,135,231,
+ 2,120, 85,195,239,171,195,195,195, 83, 41,138,130,157,157, 93,163,234, 86,180,180,180,108, 44,145, 72,144,156,156, 12,148,190,
+ 49, 87, 66,156, 74,165, 34, 92, 46, 23,246,246,246,110, 53,237,188, 92, 46,159,189,101,203, 22,214,163, 71,143,208,181,107,215,
+164, 43, 87,174,116, 7, 80,214, 37, 61, 60, 44, 44,172, 67, 96, 96,224,179,243,231,207,227,135, 31,126,160,154, 55,111, 62,169,
+ 38, 77, 23, 23,151,137,159,124,242, 9,214,173, 91,135, 77,155, 54, 77, 2,112,176,194, 42,123, 67, 67, 67,167,111,218,180, 9,
+ 99,199,142,133,171,171,235,136,234,244,226,227,227,231,116,238,220, 57,236,249,243,231,102,205,120, 96,230,250,129, 1, 1, 1,
+141,139,138,138,176,125,251,246, 87,141, 27, 55,190,119,240,224,193,153,248,227, 3,251,200,225,195,135, 49,114,228, 72, 52,111,
+222,124, 59,128, 97,230,220,150, 79,158, 60, 73,188,116,233,146,137,195,225,192,197,197, 5,193,193,193, 24, 62,124, 56,154, 53,
+107, 6,157, 78,135,195,135, 15,155,162,162,162,146,180, 90,173, 89, 99, 41,101, 62,255,253,120,108,236,179, 27,225,119,174,234,
+ 89, 76, 6,156,237, 44, 49,160, 91, 11,252,231,195,118,240,247,114, 64,124, 90, 17, 46, 93, 58,175,143,141,125,117,203,156, 30,
+135,101,154,209,143, 35,110, 62, 10,191,110, 96,179, 40,120,121,186, 99,222, 87,179,229,139, 23,204,177,112,111,228,140,136,152,
+ 28,156, 63,119, 90,175, 74, 74,188,252,190,122, 28, 94, 1, 56, 98, 30, 37, 98, 50, 24, 48, 50,120, 5,204,210,142, 52, 77,124,
+124, 60,148,182,182, 56,121,242, 36, 24,181,232, 17,122, 5,224,136,197, 37,181,224,249,249,249, 40,211,107,236,233,233,233,236,
+226,130, 83, 39, 79,130,105, 50, 61,233, 84,203, 1, 70,159,150, 84, 67,191,209,165,128,226,201, 78,144, 52,118,178,241,148,203,
+ 68,184, 19,241, 2, 26, 61,185,187, 59, 11,239,117, 60,178, 63,145,241,168, 99,213,225,138,141, 27, 55,182,218,178,101, 75,247,
+153, 51,103,138, 71,143, 30, 13, 62,159,143,194,194, 66, 56, 58, 58,194,104, 52,226,204,153, 51,184,127,255,126,190,201,100, 58,
+143, 63, 14, 27,208, 13,229,122,105,156,125, 5, 65,137,223, 42,108,117,244,163,143,222,137, 38, 0,136, 95,152,164,153, 13,180,
+187,214, 30,188, 62,112,207,217,112,234,211, 97,157, 24,254,158, 78, 0, 0,165, 82, 9,169, 84, 90,107,205,119,192,159,174, 89,
+190, 90, 87,173, 86, 63, 85,171,213,105,227,198,141,243, 42,107,248,206,227,241,138, 75, 35, 89, 89,149,109, 99, 70, 62,117, 0,
+ 38,111,217,178,229, 88, 78, 78,206,217, 47,190,248, 2,139, 23, 47,198,241,227,199, 59, 0,184, 81,199,125, 55,102,101,101,101,
+223,189,123, 87,233,230,237,135,134, 54,108,116,252,230, 57, 8, 33,176, 18, 18,228,101,191,198,131, 7,225,200,203,203,187, 83,
+155,124,234,116,186,236,180,180, 52,133,141,141, 13, 94,191,126,141,140,140,140, 55, 38, 43, 43, 43, 11,175, 95,191, 38, 20,245,
+135, 49, 91,170,211, 44, 72, 75, 75, 43,140,142,142,230, 42,157,220,208,200,134,131,128,175,158, 2,132,192,217,146,129,188,220,
+108,220,186,117, 11, 57, 57, 57,191, 87,165,105, 50,153,102,141, 24, 49,130, 9, 96,212, 23, 95,124, 97, 9,160,249,236,217,179,
+207,163, 66,207, 66, 22,139,245,227,174, 93,187,154,148, 85, 49,206,153, 51,103, 53,128, 45,255,171,107,201,202,202,106,214,201,
+147, 39, 37, 58,157, 14,107,215,174,197,234,213,171,183,226,143, 3, 85,158, 92,191,126,125, 40,131,193,152, 50,117,234, 84, 76,
+152, 48, 65,248,193, 7, 31,204, 76, 73, 73,217, 93,153,102,114,114,242, 60,127,127,255,249,105,105,105, 75,204, 50,203,207,159,
+143,247,247,247,159,151,150,150,182,188,186,115, 36, 18,137, 68, 70,163, 17,177,177,177, 89, 64,149,237, 59,138, 99, 99, 99,147,
+141, 70,163,163, 80, 40,180,172,233,250,204,202,202, 90,242,193, 7, 31,124,155,154,154,122, 14,192,162, 74, 12,249,195,148,148,
+ 20,223, 25, 51,102, 76, 91,182,108,217, 64,181, 90,189,175, 38,205,248,248,248, 37,129,129,129,223, 60,123,246,108, 7,170,174,
+ 2, 94,191,112,225, 66,221,174, 93,187, 38,197,198,198, 46,173, 65,243, 68, 70, 70,198,137, 90,156,223,170,214,127,163,201,100,
+ 50,103, 47, 91,182,140,177,113,227, 70, 16, 66, 86, 26,141,198,170,242, 25,113,228,200,145,157,237,218,181, 27,125,240,224, 65,
+190,175,175,239, 4,141, 70,179,183,166,235,179,176,176,240,240,193,131, 7, 7, 70, 68, 68, 56,142, 30, 61,154,239,225,225, 1,
+157, 78,135,148,148, 20,108,220,184,177, 56, 42, 42, 42, 41, 59, 59,251,112,109,202, 16,131, 54,119,216,205, 75, 71,247,198, 61,
+143,106,211,185,103,136, 92,171,115, 4, 47,147,137,236, 76, 53,206,156, 56,156, 21, 27,251,234, 86, 97, 97,246,176,218,104,234,
+ 52, 57, 67,111, 93, 62,182, 47, 41, 54,186,117,199,192,222,242, 98,173, 11,120, 28, 6, 50, 83,147,113,230,228,209,215,177,177,
+ 49,215,138,245,154,143,223, 87, 57,207,116,197, 34,166,250,254,184,137,125, 91, 64, 32,119,124,192, 6,214,182, 3, 4, 10,165,
+146, 83,122,239, 64, 92,210,230,209, 44,205, 84,128,235, 86, 90, 75, 85, 88, 88, 8, 54,160, 29, 3,176,173,173,173, 5, 0,240,
+236,217, 51, 8, 75,106, 53,106,149,207,124, 64, 36, 44,167,203, 0, 10, 51, 89,112,104, 44, 21, 81, 0,144,164,206,132, 86, 95,
+237,115,227,239,206,230,114,134,107,115, 93, 4, 56, 0,186,137,197,226,197,243,231,207, 95,121,231,206,157,149,193,193,193, 43,
+121, 60,222,226,210,131,205,169,230, 68,252,207, 52, 91,218,195, 50,176, 17,117, 53,168, 49,101,154,216, 65,110,252, 56, 64,164,
+237,210,165, 75,104, 61,243, 89,159,155,229,207,212, 60,170,215,235, 9, 74,170,237,142,162,234, 42,193,185,229,190, 87, 39, 36,
+ 36,144,210,191,107,147, 79,197,144, 33, 67, 76,121,121,121,100,240,224,193, 4, 53, 79,225, 83,173, 38,143,199, 11,236,216,177,
+163, 62, 53,253, 53,121, 26,147, 76,110,135, 61, 38,103, 47,221, 36,251, 14,159, 36,235, 66, 55,145,102,205,154,105, 1,184,212,
+ 70,147,197, 98,117, 9, 12, 12,204, 76, 77, 77, 37,209,209,209,228,234,213,171,228,208,161, 67,100,211,166, 77,228,231,159,127,
+ 38, 78, 78, 78,169, 0,148,181,209, 20, 8, 4, 33,189,122,245,210,103,231, 22,146,216,228, 76, 18, 25, 29, 75,110,220,141, 36,
+103, 46,221, 32,187,247, 30, 36, 62, 62, 62,197,102,104, 50,153, 76,230,186,125,251,246,229, 18, 66, 72, 72, 72, 72, 18,222, 30,
+ 72,181,225,172, 89,179,210, 8, 33,100,249,242,229,153,168,188, 33,252,159,125, 45,245,116,112,112,120,202,225,112, 78, 2, 24,
+ 85,195,118, 67, 89, 44,214,113, 91, 91,219,123, 0, 6,188,135,251, 40,216,198,198,230, 54,128,154,102, 56, 40, 91,175,255, 63,
+228,126,255, 51, 52,187,176, 88,172,171, 64,245,147, 8,151, 43,175,191,103, 50,153,167, 0,116,173,101, 62,221, 21, 10,197, 96,
+185, 92,254,169, 92, 46,255,212,198,198,102, 48,151,203,117,175,207,190, 91,185,119,235,235,236,215,239,136, 83,243, 62,241,206,
+ 45,130,227, 93,253, 67,142, 88,185,119,235, 91, 95, 77, 23,255,144,163,206, 45,130, 19,156, 91,244,141,107,216, 50,228,136,194,
+179, 91,175,247,121,142, 70, 57,192,190,123, 67, 24,200,213,111, 8,185,250, 13,233,214, 16,166, 54, 22,240,105, 5, 72,122,116,
+235,182,138, 24,141,171, 6,246,239,191,202, 13,176, 34, 0,179,226, 82,153,166, 31, 32,125,179,109, 72,200,170, 70,128,162, 59,
+ 32,236,212,161,195, 74, 98, 52,174, 26, 49,116,232, 42,103,192,182, 50,189,170, 52, 9,192,116, 0,236,203,235, 42,128,198, 31,
+186,194,119,110, 95, 87, 66,174,126, 67, 22,126,228, 65,252,149, 24, 85,131,102, 85,145,162,191,117, 68,171,182,136, 74, 11,215,
+165,165,159,162,119,112, 17,190,115,205,214,118,240,232,214,152,138,238,237,201,122,141,146, 46,201,162,127, 96, 33,185, 67,171,
+213,146,226,226, 98, 82, 88, 88, 72,242,243,243, 43, 26,168, 55,134, 76,165, 82,145,164,164, 36,146,144,144, 64,226,226,226, 8,
+254,191,237,141,217,249,148, 74,165, 91, 62,250,232, 35, 35,155,205, 94,247, 46,246,221,210,210,114,105, 64, 64,128,238,167,159,
+126, 34, 71,142, 28, 33,191,252,242, 11,153, 58,117, 42,105,210,164,137,198,194,194, 98, 88, 93, 52,109,109,109,231,121,122,122,
+102,110,221,186,149,236,222,189,155,172, 89,179,134,124,253,245,215, 70, 71, 71, 71,181, 68, 34,233, 81, 23, 77, 27, 27,155,205,
+237,219,183,215,109,222,188,153,156, 63,127,158,236,217,179,135,204,154, 53,139,120,121,121,105, 68, 34,209, 32, 51, 53,153, 44,
+ 22,107,213,196,137, 19,213,246,246,246, 39, 43,124, 39,244,241,241,185, 55, 98,196, 8, 21,128, 57,255,160,235,147,214,164, 53,
+105,205, 63,193,104, 13,183,135, 3, 1,152, 66, 14,103,104,167, 14, 29, 86,114,128,161,181, 53, 69,124, 38,243,195,118, 1, 1,
+ 43, 57,192,176,178,117,249, 76,230,135,157, 58,116, 88,201,102, 50, 71, 86,165, 87,157, 38, 1,152, 28, 22,107, 78,187, 54,109,
+ 86,177,128,175,202,210,186, 52,164,158,204,234,233, 68, 58,184, 80, 47, 70,218, 64,248, 15, 54, 90,239, 28,214,159,112, 17,254,
+ 93, 52,255, 42, 55,181, 91,169, 97, 58, 90,139,136,214, 81,148,204,162,238, 86,199,124, 10,222,241,190, 55, 85, 40, 20,167,221,
+220,220,210, 27, 52,104,160,146,203,229,123, 1, 56,214, 83,211,215,214,214,246, 87,165, 82,249,220,206,206, 46, 66,161, 80,252,
+136,146, 81,231,235,172,201,102,179, 3,148, 74,229,239,174,174,174,217, 46, 46, 46,169, 10,133, 98, 95, 37,145, 44,115, 52,237,
+ 80,121,161,194, 41,253,142,126,232,208,154,180, 38,173,249,150,129, 9,106,132,101,221, 27,194,208,189, 33,140, 65,174,248,177,
+188, 65, 9, 6, 4,117, 53, 69, 31, 3,188,138,235,215,164, 87,147, 38, 1,152,109, 1,113,197,109,122, 59,194,199, 76,205,191,
+123, 68,171,172,156,175,221,240, 14, 85, 96,248, 19, 50,249,119,209,252,171,240, 2,213, 52, 70, 46,199,210,119,248,155, 69,239,
+120, 31, 34, 51, 50, 50,122,101,100,188,211,190, 9,143,212,106,245,168,119, 41,168,215,235,239,164,166,166,118,126, 7, 82, 85,
+117,189,214,193,204,110,217, 52, 52, 52,255, 30, 40,192,136, 87,248,178,155, 59,214,178,140, 96,156,137, 65,114,133, 46,121, 69,
+ 84, 93, 52, 75, 48,238,168,164,140,167,234,154,207,255, 39,255, 15, 26, 73,120, 76,253,123, 78, 91, 10, 74,218,104,213,219,104,
+209,208,208,208,208,208,208,252, 15,184,240,156,126, 17,251, 27,112, 18,111, 71,223, 78,150, 51,162, 85,134, 62,107,211,147,162,
+ 46,225,211, 11,180, 38,173, 73,107,210,154,180, 38,173, 73,107,254,235, 52,203,168,106,238,212,167, 21,254,175, 83, 47,190,127,
+ 11,116, 61, 59,173, 73,107,210,154,180, 38,173, 73,107,210,154,255,116,234, 60,142, 22, 13, 13, 13, 13, 13, 13, 13, 13, 77,245,
+ 84, 25,117,163,141, 22, 13, 13, 13, 13, 13, 13, 13, 77,253,176, 67,201, 20, 85, 39,241,255, 83, 85,109, 6,106,158,130,231, 45,
+150, 45, 91,198,112,115,115, 19,115,185,220, 38,175, 94,189, 98, 76,158, 60,185,222, 29, 9, 86,254,184,142,225,226,226, 34, 6,
+208, 36, 51, 43,143,241,201,127,190,160,232,243, 69, 67, 67, 67, 67, 67, 67,243, 55,162, 79,169,177, 42,251,124, 19,225,170,149,
+209, 90,180,104, 17, 18, 18, 18, 68, 0,134,248,250,250,114, 55,108,216, 64, 14, 28, 56, 80, 47, 99,244,213,156, 89,136,143,143,
+ 23, 1, 24, 98,163,176,224,110,219,178,130, 28, 60,126,253,157,155, 45,133, 66, 97,245,191,220,142,134,134,134,134,134,134,230,
+ 95,197,248,114,159,227,235,100,180, 88, 44, 22,147,203,229, 54, 98, 48, 24,189,248,124,126, 75, 0, 40,157,146,165,206,176, 88,
+ 44, 38,151,199,107,196,100, 50,123,241,120, 37,154, 31,245,109, 95, 95,205,174, 34,145, 40, 81, 40, 20,222, 7, 32,144, 72, 36,
+225, 58,157,238,177, 68, 34,185, 89, 27, 29,137, 68,114,179,116,187,112, 0, 2,161, 80,120, 95, 36, 18, 37,178, 88,172,174,244,
+245, 68, 67, 67, 67, 67, 67, 67, 83,202,230, 74,150, 63,114,226,196,137, 42, 13, 14,151,203,101,248,250,250,182,119,113,113,185,
+225,237,237,173,117,116,116, 60, 36, 20, 10, 69,245,204, 24,195,205,195,171,189,189,157,242, 70,139, 70,118, 90, 27, 27,155, 67,
+108, 54,187, 62,154, 76,137, 68,178, 38, 40, 40, 40,231,198,141, 27, 68, 42,149,166, 2,176,176,182,182, 86, 17, 66,136,173,173,
+173,169, 54, 98,182,182,182, 38, 66, 8,177,182,182, 86, 1,176,144, 74,165,169, 55,110,220, 32, 65, 65, 65, 57, 18,137,100, 13,
+106, 30,209,150,134,134,134,134,134,134,166, 22, 84,231, 69,254,194,148, 69,177,236,234,188,115, 92, 46,215, 79,161, 80, 68,125,
+246,217,103,198,205,155, 55, 19, 23, 23,151,187, 54, 54, 54,109, 20, 10,197, 91, 13,234,199,140, 25, 83,155,106, 63, 63,137, 84,
+ 22,181, 99, 70, 79, 99,209,182, 16,226, 96,103,115,215,194,194,162,141, 84, 42,125, 75,115,196, 39, 19,204,209,180,151,201,100,
+ 17,203,150, 45, 43,206,206,206, 38,132, 16, 34,147,201, 82, 1,200,149, 74,165, 42, 38, 38,134, 40, 20, 10, 2,243,163,120, 12,
+133, 66, 65, 98, 98, 98,136, 82,169, 84, 1,144,203,100,178, 84, 66, 8,201,206,206, 38,203,150, 45, 43,150,201,100, 17, 0,236,
+233,219,130,134,134,134,134,134,230, 95,109,180, 42, 26, 46,243,170, 14, 91,182,108,201, 83, 42,149,109, 36, 18, 73,127,177, 88,
+ 28,218,175, 95, 63,223,129, 3, 7, 50, 52, 26,141,209,215,215,215,222,213,213,117,154, 92, 46, 31,197,231,243,155,113,185,220,
+145, 82,169,212,110,239,222,189,110,213,105, 54,109,254, 1,207,194, 66,222,134,203,229,245, 23,139, 37,161, 19, 63,236,226, 59,
+106,230, 32, 6, 71, 27,103,236,210,204,217,190, 73, 35,187,105,182,114,209, 40, 22,147,209,140,162,168,145,124, 62,223,110,247,
+182, 77,110, 53,236, 88, 35,123,123,251,240,189,123,247, 54, 25, 50,100, 8, 47, 58, 58, 26, 0, 96, 52, 26,185, 0,244, 76, 38,
+ 19, 60, 30, 15, 58,157, 46, 11,128,185, 39,144,232,116,186, 44, 30,143, 7, 38,147, 9, 0,250, 82, 61, 68, 71, 71, 99,200,144,
+ 33,188,189,123,247, 54,177,183,183, 15, 7,208,136,190, 53,104,104,104,104,104,104,254,181,148,153,171,147,168, 80,117,200, 42,
+115,143,193,193,193,111, 69,141,184, 92,238,134,103,207,158,181,179,180,180,108,196,102,179,141, 67,135, 14,229,141, 24, 49, 2,
+233,233,233,166,252,252,124,166,159,159,159,242,222,189,123,189, 12, 6, 67, 7, 11, 11,139,194,236,236,108,133, 70,163,121, 1,
+ 96, 90, 53, 25,217,240,252,105, 84, 59, 43,185,101, 35, 46,155,105,156, 58,118, 4,239,171, 57, 61, 65,105,194, 76,198,180, 76,
+230,247,254, 22,202, 31,111, 22,244,122,166, 51,118, 40,144,241, 11,213, 57,154, 26, 53, 21, 10,133, 63,135,195,185,127,250,244,
+105, 8,133, 66,228,228,228,128,203,229, 2, 0,242,243,243,101, 0, 88, 20, 69,129,203,229, 34, 55, 55, 87, 94,155,163,150,155,
+155, 43,231,114,185,160, 40, 10, 0, 88,165,122,224,114,185,200,201,201,129,155,155, 27,117,250,244,105,155, 94,189,122,189,212,
+233,116, 31,100,100,100,132,209,215, 26, 13, 13, 13, 13, 13, 77,237,169,204,139,252,141,168,113, 28,173,206,165,161,186,242, 19,
+231,238,180,182,182,182, 21,139,197,222,227,199,143,103, 40, 20, 10,220,191,127,223, 84, 80, 80,192, 96,179,217, 96,179,217,204,
+ 46, 93,186,136, 13, 6,131,240,212,169, 83,212,203,151, 47,211,245,122,253,247,153,153,153,247,170,201,200,206,198, 22, 60, 91,
+129, 5,215,251,248, 23, 29, 25,214,110,153,192,217,133, 38,146,159,198, 96,153, 8, 20, 34, 19,115, 85, 7, 74,172,150,185, 10,
+167,238, 75,167,174,189,204, 78,215,235,245,223,231,229,229, 85,167,153, 12, 0,165,121,130, 84, 42,133,209, 88,126,126, 75, 16,
+ 6,131, 1, 30,143, 87,167, 35,199,227,241,192, 96, 48,128,114,145, 48,153, 76, 6, 38,147, 9, 6,131, 1, 54,155,253, 86, 62,
+104,104,104,104,104,104,104,234, 68,101, 94,228,239, 66,249,113,180,204,155,155, 82,169, 84, 82, 82,169,212,174,121,243,230,223,
+ 6, 5, 5,197, 12, 24, 48,160,240,167,159,126, 34,171, 87,175, 38,171, 86,173, 34, 91,183,110, 53, 94,190,124, 89,255,159,255,
+252,167,216,221,221,253, 69,104,104,168, 55, 0,244,238,221,187,202,234, 72, 11,185, 37, 37,230,178,236,124,188,155,126, 59,188,
+115,147,152,111,250,123, 20,234,118,248, 17,211,124, 39, 98, 92,231, 74,140, 7,187, 26,201,179, 21,250, 37,227,186, 22, 55,112,
+105,240,226,231,173,251,189, 1,160, 91, 80,239,106,171, 56, 21, 10, 69, 75, 71, 71,199,212,115,231,206,153,178,178,178, 72,102,
+102,102, 89, 27,173,108, 0, 50, 23, 23, 23,149,193, 96, 32,114,185,252,117,109,142,154, 92, 46,127,109, 48, 24,136,139,139,139,
+170,196, 95,201,178, 9, 33, 36, 51, 51,147,100,101,101,145,115,231,206,153, 28, 29, 29, 83, 21, 10, 69, 75,250,254,160,161,161,
+161,161,161,249,215, 50,190,194,103,205,180,107,215,142,146, 74,165,140,166, 77,155,138,237,237,237, 91,219,219,219,223,249,241,
+199, 31,201,234,213,171, 13, 27, 55,110, 36,191,254,250,171,225,227,143, 63,206, 21,137, 68, 39,185, 92,174, 28, 0, 92, 93, 93,
+171, 13,249,181,108,221,134, 18,240,121, 12, 79, 79, 31,177,194,202,170,181,181,149,229, 29,221,234, 38,132, 44,116, 48,144, 45,
+ 45, 8, 57,216,211,176, 98,112,171, 92, 54,155,115, 18,128, 28, 0, 28,237,237,204, 13, 35,218,219,216,216, 68, 44, 92,184,176,
+ 64,167,211,145,210, 94,134,169, 0, 44, 92, 92, 92, 84,132, 16,226,232,232,152, 8, 64, 97,166,158,194,209,209, 49,145, 16, 82,
+102,180, 44,108,109,109, 83, 9, 33, 68,167,211,145,133, 11, 23, 22,216,216,216,208,141,225,105,104,104,104,104,104,104,170,156,
+235,176,202, 72,209,141, 27, 55, 72,110,110,174, 41, 57, 57,217,152,159,159, 47,245,243,243,147, 51,153, 76, 40,149, 74, 38,147,
+201, 52, 21, 20, 20, 48, 21, 10,133,138,205,102,239,214,106,181, 89,253,251,247,167, 98, 99, 99,171,109,104,126,239,246, 45, 82,
+ 84,172, 49, 37, 37, 37, 26, 11,243,115,165,163,154, 89,202, 89, 6, 29, 76,126,237,152,185, 2,119,147,169, 40,139,233,101,199,
+ 83,113, 56,236,221, 0,178, 6, 4,247,161,146, 84, 41,230, 54, 94, 87,165,165,165,249,109,216,176, 97, 75,199,142, 29,179, 10,
+ 11, 11,203,218, 86, 85, 28,130,193,194, 76,189,138,235, 49, 41,138, 66, 97, 97, 33, 58,118,236,152,181, 97,195,134, 45,105,105,
+105,126, 0, 84,244,245, 69, 67, 67, 67, 67, 67,243,175,166,202,113,180,106, 28,234,160,176,176, 80,206,225,112,186,181,106,213,
+170, 65, 65, 65,129,105,209,162, 69,137, 63,253,244,211,174, 23, 47, 94,232, 45, 44, 44, 26, 9, 4,130, 79, 81, 76,136,102, 0,
+ 0, 32, 0, 73, 68, 65, 84,135, 12, 25,162, 56,114,228, 8,233,208,161, 67,197,232, 83,165,179,123, 23, 21,229,203,121, 28,118,
+183, 79, 3, 36, 13, 18,117,114,147,247,167,119, 19, 59,205,191,185,235,183, 71, 44,125, 83,203,162, 70,150, 92,234,211, 33, 67,
+ 6, 43,126, 59,113,146,180,105,211,218, 44,205, 82,140,105,105,105,159,222,191,127,127,112,195,134, 13,147,244,122,125, 18,128,
+204,162,162,162, 84,123,123,251, 52,157, 78,151, 4, 64, 87,201,118,149,105,234,116, 58, 93,146,189,189,125, 90, 81, 81, 81, 42,
+128, 76,189, 94,159,212,176, 97,195,164,251,247,239, 15, 78, 75, 75,251, 20,128,177,154,188,208,179,186,211,154,180, 38,173, 73,
+107,210,154,180,230,191,135, 63, 68,179, 0, 51, 38,149,230,241,120, 29,157,157,157,219, 63,122,244,200,120,235,214,173, 28, 6,
+131,241,115,239,222,189, 15, 29, 62,124, 56,192,210,210,210,198,201,201, 73,121,241,226,197, 64, 0, 7,174, 93,187,102, 86,244,
+ 73,192,227,116,108,225, 40,107,191,249, 33, 49,110,187,255, 60,199,200,228,253,220,101,208,160, 67,211,119,237, 9,176, 87, 72,
+108, 90,216, 73,149,167, 78,157, 9, 4,112,224,214,173,219,181, 30, 79,195, 96, 48, 92, 76, 75, 75,115, 42,251, 63, 61, 61,221,
+ 79,161, 80,120,163, 36,250,148, 99,166, 76,188,201,100,234,109, 50,153,236, 51, 50, 50,158, 0, 64, 70, 70,198, 7,244,117, 68,
+ 67, 67, 67, 67, 67, 67, 83,137,201,218, 92,217,255,213, 70,180,184, 92,174, 3,147,201,244, 73, 74, 74,138, 63,117,234,212,163,
+150, 45, 91,246,138,143,143, 95, 70, 8,137, 19, 10,133,227, 19, 19, 19,159, 39, 38, 38,106,139,138,138, 38,214, 34, 51, 14, 96,
+112,124,238,171,138,226,127,184,248,248, 81,211, 54, 61,122,169,213,170,101, 70, 66,226,184, 66,233,248,103, 9,233,207,111,167,
+105,180,197,197,181,210,172,145,140,140,140, 39, 25, 25, 25, 57,181,220, 38,167,204,100,209,208,208,208,208,208,208,208,212,150,
+154, 34, 90, 58,163,209,184, 66,163,209,200,127,251,237,183,228,160,160, 32, 13, 0,108,216,176,193, 52,118,236,216,235,175, 94,
+189,234,250,228,201,147, 94,182,182,182,151, 0, 80, 49, 49, 49,230, 68,159,116, 38,147,113,133, 86,171,145, 95,188, 28,150,220,
+177,125, 83, 13, 0,108, 92,191,214, 52,116,252,140,235,175,162, 31,117,125, 22, 21,222,203,214,214,246,146,209,192,162, 82,212,
+113,132, 62, 77, 52, 52, 52, 52, 52, 52, 52,127, 97, 54,227,237, 42,195,205,102, 25, 45,173, 86,155,174,213,106, 1, 32, 43, 40,
+ 40,232,173,239,182,110,221, 74, 0, 20, 0, 56,152,153,153, 89,155,204,164, 23, 21, 21, 1, 64, 86,199,246, 77,223,250, 98,223,
+230,159,222,104,230,231,229,210,167,141,134,134,134,134,134,134,230,239,100,182,254, 0,131, 62, 46, 52, 52, 52, 52, 52, 52, 52,
+ 52,245, 98,124, 85,255, 83,168,186,231,192,133, 90,252, 64, 93,122, 31, 92,160, 53,105, 77, 90,147,214,164, 53,105, 77, 90,243,
+ 95,167, 89,147,246, 5,252,253,168,178, 49,252,159, 13,221,245,149,214,164, 53,105, 77, 90,147,214,164, 53,105,205,127, 58,118,
+120,123,120, 7,187,178, 47, 88,244,177,161,161,249,123, 67, 14,130,137, 44, 79, 87, 16, 98, 15, 38, 55, 5, 41,145,175,168,111,
+ 97,170,183,102,170,143, 11, 4,122, 37, 12,252,116,164, 70,196,212, 87,147,134,134,230,159,135,109,219,201, 3, 40, 6,243,103,
+138,152, 80,148, 26,205,227, 20,197, 9,211, 82,226,255,141,222, 34, 5, 85, 68,176,104,163, 69, 67,243,119, 39,221,203, 3, 44,
+ 44, 5, 3,118, 32,186,151,176,246, 89, 10, 60,142,170,183, 38,199,180, 8, 70,134, 35,136,238, 25,108, 60,151, 1, 79, 31,211,
+ 7,251,159,199,180,169,147,200,147,168, 59, 72, 72, 80,161, 81, 99, 59,120,120,181,197, 79,107, 67, 41,250,200,208,152,247, 86,
+ 70,109,238,214,119,132,165, 64, 40, 1, 0,152, 12,122,108,157,217,226,188,193, 96,216, 9,224, 8,128,162,127,251, 33,250,159,
+ 55,134,103,179,217,169, 0, 76,124, 62,255, 48,202,133,214,104,104,254, 4,236, 74,175, 51, 83,233,117, 87, 27,196, 44, 22,107,
+190, 80, 40,188,204,227,241,210,120, 60, 94,154, 72, 36,186,204, 98,177,230, 3, 16,255,101,202,184, 95,155, 8,193, 48,246,210,
+234, 77, 14,103, 34,179,109, 10, 53, 70, 15, 48, 12,189,201, 86,119,113,189, 52, 89, 84, 80,177,206,228,188,251,110,161,178, 64,
+107,240, 6, 65,189, 52,203, 97,193,225,112,206,192,252, 57, 71,105,254,100,226, 99,162,112,234,196, 42, 44,250,110, 52,182,111,
+158,136,167, 79,110,215, 75,207, 27,248,224, 3, 22,235,115, 47,160, 11, 74,218, 1,211,252,147,161,200,248, 11,199,119,167, 31,
+223,187, 62,125,255,170,137,228,232,210, 96,172, 93,187,182,219,232,209,163,119, 59, 59, 59,167, 3,248,136, 54, 90,255, 99,244,
+122,189, 77, 70, 70, 6,181,115,231,206,126, 50,153,236, 37,139,197,154, 11,128,243,111, 57,224, 98,177,248,166, 84, 42, 77,149,
+201,100,169, 82,169, 52,188,166,244,127, 40, 30,214,214,214,241,150,150,150,207,202, 39, 90, 55, 27,208,214,173,221,168, 5, 86,
+ 62, 33,157,234,169,207, 97,177, 88,115,101, 50,217,203,157, 59,119,246, 75, 78, 78,166,244,122,189, 77, 45,182,239, 40,151,203,
+159,220,185,115,231,155,140,140,140, 78,137,183,183, 90,171,239,108,178,142,255,125, 85,231,251,167,214,125, 99, 97, 33,123, 12,
+160,227, 95,226, 72, 22,155,148, 96, 48, 3, 31,165, 20, 10, 83,114,245,202,176,184, 66, 9,192,236, 12,109, 61, 94, 98,114, 76,
+ 74,128,116,121,152, 84, 36,186,249,218, 90,121,237,149, 70, 10, 6, 35, 16,197,148,109,189, 11, 28, 6, 99,146,201,100,234,206,
+225,112, 62,165,159, 80,127, 13,120, 60, 14, 64, 8,196, 34, 62, 0, 2, 70, 61,173, 17,151,193,104,119,179, 95,191, 69,115,154,
+ 53,155,230, 5,244,173,194,108, 81, 0,166,123,121,121,157, 6, 48,244, 29,238,206, 15,158,158,158,201, 0,102,188,171,114,201,
+223,223,191,109, 96, 96,224,130, 22, 45, 90,116,122, 87,154,255, 36,212, 55, 55,252,150,114,125,157,141,234, 70,168, 77,118,204,
+213,233,118, 74,185, 41, 38, 38, 6,125,250,244,193,250,245,235,133,190,190,190,187, 0,216,255, 11,110, 37,191,178, 23,124, 84,
+104,163,101,182,209,250,208, 21,237,134, 53,196,149,193,174,200, 27,210, 16,249, 35, 27,226,250, 32, 87,116,169, 75,110,172,172,
+172,208,177, 99, 71,102,114,114,178, 96,214,172, 89, 11,248,124,126, 44,128, 30,117,209, 18, 8, 4,247,133, 66, 97, 34,139,197,
+122, 43, 47, 66,161,240,190, 72, 36, 74,100,177, 88, 93,203,167, 75, 36,146,155, 82,169, 52, 85, 34,145,132, 87, 97,132,238, 75,
+165,210, 84,177, 88,124,191,124, 58,139,197,234, 42, 22,139,147, 36, 18, 73,197,244, 46, 18,137, 36,177, 98,122, 85,176,217,108,
+199,196,196, 68,155,164,164, 36, 27, 46,151,171, 44,159,158,144,144, 96,147,152,152,248, 86,122,109, 96,177, 88, 93, 68, 34, 81,
+162, 80, 40,188, 95, 89,122,197,125,170,138,114,199,174,139, 57,233,181, 45,120,130,130,130,174,167,164,164, 56, 91, 88, 88,188,
+ 53,113,183,165,204,162,199,175, 91, 67,103,134,244, 14,154,100,237,221,191,105, 29,245,123,240,249,252,216, 89,179,102, 45, 72,
+ 78, 78, 22,180,105,211,134,201, 96,212,234,125,162, 91, 72, 72,200,209,212,212, 84,135,230,205,155, 51, 13, 6, 3, 30, 29,155,
+ 15, 97,196,167,224,199,110,132,147, 32,157,245,242,252, 50,199,160,206, 31, 28,197,123,110, 12, 74, 14,122,115, 64,153, 58,154,
+ 8,177,126,146, 92,108,221,167,223, 71,172, 7,137, 69,214,122,163,209, 18, 96,118, 38,219, 93,120,117,210,100,233, 59,152, 8,
+ 81, 94,140, 99, 91, 7, 14,158,198,188, 20,199,178,214, 27,141, 86, 96,160, 83, 93, 52,203, 95,254, 76, 38,115,230,170, 85,171,
+ 24, 0,166, 2,224,254,155, 12, 77, 43,123, 56,116,105,204,188,235,103,135,118,239, 80,214,183,244,126,247,168,175,208,150,237,
+167, 49,118,194,102,184,123,181,174,151,142,214,100,122,186, 47, 38,230,236,200,198,141,131,231, 52,107, 54,166, 18,179, 69, 1,
+152,179,108,217,178, 81,143, 30, 61,178,110,216,176,225,132,119,244,210,191,102,217,178,101,179, 31, 61,122,100,239,234,234,186,
+176,150,154, 85,150, 75,114,185,188,199,150, 45, 91,102,246,233,211,103,146,191,191,127,211,119,161,249, 15,102,253,195,135, 15,
+157, 87,173, 90,245,229,216,177, 99,115, 1,160,107,215,174, 28, 0,109,234, 93,222, 17,194, 37,132, 4, 18, 66,250, 16, 66,186,
+ 18, 66, 90,149,254,221,178,116,233, 67, 8,233, 86,225,179,101,233,182,101,223, 7, 84,161,209,167,226,118,229,182,169,248,255,
+ 91,127, 87, 98,180,250,160,164,173, 86,159,183,118,224,196,137, 19,164,252,103, 69,134,184,226,219,105,109, 29, 10,159, 28,223,
+ 67,242, 19, 99, 72, 86,244, 3,242, 96,243, 18, 50,173,165,117,225,240,134,248,161,246,199,139,144, 27, 55,110,144, 71,143, 30,
+145,252,252,124,242,252,249,115, 18, 16, 16, 80, 36, 20, 10, 47, 2,112,173,141,152, 68, 34, 73,189,120,241, 34, 9, 10, 10,202,
+ 17,139,197, 43,203,110, 46,169, 84,154,122,227,198, 13, 18, 20, 20,148, 35,145, 72,214, 0, 96, 2,192,160, 65,131,210, 8, 33,
+196,218,218, 90, 85,153, 94, 72, 72, 72, 22, 33,132,200,100,178,178,170, 38,166, 68, 34, 89, 51,101,202,148,252,123,247,238, 17,
+185, 92, 94,150,206,144, 74,165, 43,167, 78,157,154, 31, 22, 22, 86, 62,189, 90, 44, 45, 45, 19,141, 70, 35, 57,126,252, 56,177,
+177,177, 81,149,187,153, 19,141, 70, 35, 57,122,244,104,149,121,171, 46, 80, 32, 22,139, 87,140, 28, 57, 50, 47, 46, 46,142, 88,
+ 89, 89,165,150, 75, 95, 57,122,244,232,188,132,132, 4,162, 80, 40,204,202,163,149,149, 85,234,205,155, 55,201,192,129, 3,115,
+203, 31, 83, 43, 43,171,212, 91,183,110,149,165,175, 48,167, 32,179,183,183,159, 96, 99, 99,163,178,177,177, 81, 89, 88, 88, 44,
+182,179,179, 83,167,167,167, 19, 66, 8,105,212,168, 81, 90,249, 72,150,141,111,191,207, 54, 30,188,117,231,106, 84,102,122,179,
+238,147, 86,200,154,133,200,106,113, 12, 92,133, 66,225,197, 78,157, 58, 21, 37, 38, 38,146,130,130, 2, 18, 17, 17, 65,110,220,
+184, 65, 94,188,120, 65, 0,152, 51,195,128, 68, 44, 22, 39,107, 52, 26,147, 70,163, 49,165,167,167, 27,211,210,210,140,209, 43,
+237, 8,217,198,126,179,100, 31,237, 75,212, 87,151,154,164, 98, 97, 18, 0,201,123, 51, 90,161, 62,142,100,147,231,190,199,243,
+157,163,175, 46,235,169, 39,113,151,200,158, 49,214,250, 43,159, 57,188, 36, 63,123,253,151,108,242,118,170,147,230,207,222,123,
+ 34,190,118,126,186,110,225,116,125,124,124, 60,249,124,116, 79,195,185,105, 14,175,200, 70,175,131,117,209, 44,199,176, 1, 3,
+ 6,228, 39, 36, 36, 16, 31, 31,159, 2, 38,147, 57,246,223,100,178,186,121,112,147, 35,118,127,110,234,235, 43,204,124, 71,102,
+203,215,198,198, 38, 99,199,142, 29, 68, 34,145,164,213,213,108,125,216,191, 51, 41,202,185, 72,250, 7,183,170,246, 30, 25, 60,
+120, 48, 9, 12, 12, 36,211,166, 77,171,233, 94,162,188,128,126, 59,155, 53, 59,106,250,240, 67,227,206,102,205,142,122, 1,253,
+ 74, 13, 22, 5,224,203,229,203,151,135,233,245,250,176,237,219,183,135,245,235,215, 47, 12,192,231,245, 60, 22, 63,253,240,195,
+ 15, 68,175,215,147,237,219,183,147,126,253,250, 17, 0,107,235, 83, 46,149, 69,178,252,252,252, 62, 59,114,228,200,157,167, 79,
+159,166, 7, 7, 7,175,104,214,172,153,172,174,154,127, 69,196, 98,177, 91,211,166, 77,119,249,248,248, 36, 52,111,222, 92,235,
+237,237, 93,236,225,225, 17,231,235,235,187,131,199,227,185,214, 81,182,117,187,118,237,140, 87,174, 92, 33, 3, 6, 12, 32,229,
+ 76, 72,181, 84,231, 69, 8, 33,173,190,252,242,203,185, 0,200,151, 95,126, 57,151, 16,210,167,212, 79,244, 41,255,119,197,207,
+ 50,243, 84,246,127,101, 26,101, 75,101,154,149,253, 70,133,223, 65, 21,145,172,241,127,216,185, 19, 39, 78,116, 58,113,226,196,
+149,138, 59,247, 81, 67,180,157,214,214,161,168, 40, 61,133, 68, 45,249,148, 92, 14,116, 36, 55, 58,219,146,103, 51, 7,144,148,
+221,107,200,228, 22,242,194, 15, 27, 34,176,182, 70, 43, 44, 44,140,132,133,133,145,240,240,112, 18, 27, 27, 75,114,114,114,200,
+254,253,251,141, 86, 86, 86, 69, 60, 30,111, 25, 0,129, 57, 98, 82,169, 52,149, 16, 66, 52, 26, 13, 89,188,120,113,113,105,164,
+ 74, 41,147,201, 82, 9, 33, 36, 59, 59,155, 44, 91,182,172, 88, 38,147, 69, 0,176, 87, 40, 20,137, 49, 49, 49, 68,169, 84, 86,
+106,102,228,114,121,234,211,167, 79,203,140,147,131, 92, 46,143, 58,118,236,152,142, 16, 66,146,146,146,136,165,165,101, 42, 0,
+165,149,149,213,131, 19, 39, 78,232, 8, 33, 68,165, 82,149,165,155,101,180,138,138,138,200,185,115,231,222,202, 67, 89,250,233,
+211,167,223, 50, 96,102,160,148,201,100, 97,251,247,239,215, 26,141, 70, 18, 21, 21, 85,102, 18,149, 22, 22, 22,225, 7, 15, 30,
+212, 26,141, 70, 18, 29, 29,109,182, 25,108,208,160, 65, 26, 33,132, 24, 12, 6,178,113,227, 70, 77,217, 49, 45, 75,215,106,181,
+100,195,134, 13, 26,169, 84, 26, 6,160,218,232,155, 66,161, 80,105,181, 90,146,157,157, 77, 2, 2, 2,242,111,220,184, 65,114,
+115,115, 9, 33,132, 52,104,208, 32, 13, 0, 60, 59,141,253,254,206,243,252,220, 79,102,135, 30,112,109, 53,124,201,217,187,201,
+ 73, 91,142,220, 15, 83,248,134,244, 52, 39,168,201,227,241,150,217,217,217, 21, 95,187,118,205,168,211,233, 72, 66, 66, 2, 9,
+ 15, 15,127,115,141, 69, 70, 70,154,101,180, 88, 44,214,252, 59,119,238,232,140, 70,163, 41, 35, 35,195,152,150,150,102, 76, 75,
+ 75, 51, 84, 52, 90,100, 27,155,100,156, 30, 71, 78,110,158,161,229,112, 56,243,223, 79, 52, 11, 76,178,201, 51,132,108,242, 12,
+219, 49, 82,145,145, 23,190,151,144,243, 51,200,171,239, 27,146,249, 61, 37,121,166, 77,158, 97,100,147,215,135,228,219, 78,172,
+ 90,105,110,246,238, 75, 54,121,134,253,240,145, 75,230,131,176,123,228,202,149, 43,100,195,154,229,100, 90, 55,135, 2,211, 38,
+207, 48,242,179,247,192,218,104,150,135,199,227, 61,191,126,253, 58,185,122,245, 42, 89,184,112, 33, 17, 10,133, 9,239, 34,170,
+ 71,126,246,112, 33,191,120,116, 34, 91,221,237,200,239,157,254,114, 29,124, 90,217,195,161,187, 7, 55, 41,227,193, 17, 66, 94,
+191, 32,234,149, 62,164,167, 39,187,190,102,203,215,198,198, 38, 61, 46, 46,142,168,213,106,178,122,245,106, 34,149, 74,235,100,
+182, 62,236,223,153, 20,101, 95,168,214,104,133,132,132,144, 31,127,252,145,232,245,122,210,186,117,107,115, 94, 90,254, 96,182,
+ 60,129, 16, 0,115, 87,172, 88,241,198,100,133,134,134,134, 69, 70, 70,134, 57, 59, 59,159,170,199,177, 88,187, 98,197,138, 55,
+ 38, 43, 52, 52,148, 68, 70, 70, 18, 23, 23,151,196,250,148, 75,221,187,119,255, 62, 54, 54, 54,119,222,188,121, 7, 58,118,236,
+184,228,193,131, 7, 73, 39, 79,158, 12,243,243,243,235, 89, 87,205,119, 16,213, 97,149, 70,118,184,132, 16, 54, 33,164,204,188,
+178, 0,176,203, 2, 10,230, 48,114,228, 72, 97,219,182,109,195, 70,140, 24, 81,184, 99,199, 14, 18, 23, 23, 71, 34, 34, 34,200,
+138, 21, 43,200,130, 5, 11,200,182,109,219,200,192,129, 3, 11, 2, 2, 2,238,124,248,225,135,252, 90,100,211,199,213,213, 53,
+231,232,209,163,100,207,158, 61,132,195,225,156, 52,119,195,234,188, 72, 85,102,170, 42,131, 85,241,187,106,140, 88,181,134,205,
+140,223,251,163,169,170, 24, 9, 41,247,247,239,193,193,193,157,254,240,240, 33,248,110,252,172,239,249,177, 59, 86, 35,117,255,
+122, 48,179, 83,193,206,203,132,230,250, 73,232,175, 31,195,168, 54,109, 4, 2,138, 90, 84,219, 11,134,203,229,130,203,229,130,
+195,225,160,176,176, 16, 42,149, 10,237,219,183,103,132,135,135,243, 39, 76,152, 48, 67, 32, 16, 36, 0,232, 95,227,221, 76,149,
+ 68,164,111,222,188,137,113,227,198,241,118,237,218,213,220,218,218,250,161,209,104,228, 2, 64,116,116, 52,134, 12, 25,194,219,
+187,119,111, 19,123,123,251,112,157, 78, 39,228,241,120, 96, 50,153, 85,234,113,185, 92,232,245,122,158,187,187,123,196,195,135,
+ 15,125,131,131,131,217,241,241,241,136,137,137,129, 94,175,231,122,120,120, 68,134,135,135, 55,239,211,167, 15, 59, 49, 49, 17,
+241,241,241,111,242, 97, 78,126,181, 90, 45,120, 60, 30,202, 87,105, 81, 20, 5,141, 70, 3, 46,151,107,182, 22,139,197,234,226,
+229,229, 21,249,240,225, 67,191,144,144, 16,206,189,123,247,144,148,148, 4,163,209,200,245,246,246,142,124,248,240, 97,139,126,
+253,250,113, 34, 34, 34,144,154,154, 10,115,171,208,202,214,123,248,240, 33, 70,140, 24,193, 61,115,230, 76, 11, 59, 59,187, 8,
+131,193,192, 5,128,200,200, 72, 12, 25, 50,132,123,246,236, 89, 63, 39, 39,167,136, 26,170, 18,153, 0,160,215,235, 49, 97,194,
+ 4,145, 84, 42, 69, 98, 98, 34, 76, 38, 19,140, 70, 35, 0, 32, 51, 43, 51,242, 97,100, 84,244,168, 97, 31,117, 42,210,105, 52,
+183,238,222,127,210,168,129,139, 35, 69,145, 6, 53,100,181,191, 72, 36, 74, 88,185,114,229,103,113,113,113, 60, 47, 47, 47,198,
+171, 87,175,144,151,151, 7, 14,135,243,230, 26, 51,119,191,185, 92,110,103, 31, 31, 31, 86,113,113, 49, 76, 38, 19, 0, 16, 6,
+163,242, 22, 43,252,236,235,240, 86, 26,216, 2,129,160,243,123,121,122,231,250, 88,193,132,238,241,233, 90, 30,207,194, 81, 34,
+182,243, 0, 18,174,162,161, 53, 15, 76, 6,147,127, 47,166, 80, 4,144,238,112,206,176,170,157,166,169,123, 76,154,150,167,183,
+108, 34,182,119,116, 70,102,102, 38,156, 26,121,161,152,107,205,189,249,162, 64, 12,170,150,154,255, 79, 7,119,119,119, 91, 55,
+ 55, 55,100,100,100,192,207,207, 15,114,185, 92, 14,160,123,157, 31, 58,219, 93,120,200, 69, 59,128,177, 18, 70,106, 33,244,172,
+165,120,145,238, 71, 54,249,177,255, 74, 38, 75, 42,230,222,222,187,111,191,131,149,179, 55,112,242, 19, 40, 45,120,216, 58,201,
+207,210, 90,198, 59, 90, 71,179,229,171, 84, 42, 47,221,185,115, 71,193,231,243, 17, 30, 30, 14, 31, 31, 31,172, 94,189,218, 90,
+ 46,151, 95,173, 91,100,139,128, 80, 85,155,172,142, 29, 59, 98,234,212,169,216,181,107, 23, 44, 45, 45, 49, 98,196,136,154,204,
+ 22,137, 6,142,255, 16, 17,177,125,215,203,151, 39, 70, 54,110, 28, 60,194,195, 99,241,196,161, 67,199, 78,159, 62, 29,203,151,
+ 47,199,209,163, 71,209,174, 93, 59,140, 31, 63, 94,159,144,144,176,179,174, 85, 85, 43, 87,174,156, 54, 99,198,140,138,154,186,
+248,248,248, 31,234, 85, 46,101,102, 70, 70, 68, 68, 68, 15, 27, 54,172, 83,113,113,177,230,238,221,187, 79, 92, 93, 93, 29, 1,
+ 52,168,171,102, 61, 12, 22, 69, 8,225, 3, 16,150, 46, 34, 0,194,189,123,247,202, 66, 66, 66,164,165,105,130,210,165,198,234,
+125, 31, 31, 31,199,231,207,159, 39,207,156, 57,211,111,215,174, 93, 2,161, 80,136,236,236,108,252,242,203, 47,152, 59,119, 46,
+ 40,138, 2, 33, 4,219,182,109, 19,142, 25, 51,166,213,203,151, 47,147, 93, 92, 92,204,105,210,194, 19,139,197, 7, 23, 47, 94,
+ 44, 53,153, 76,152, 51,103, 78,134, 78,167,155, 90,250,221, 60, 11, 11,139,219, 40, 49,220,213, 81,169, 23, 41,247,172, 60, 81,
+225,216, 4, 87, 76,171,248, 29, 33, 36,184, 58,141, 90,158,139,202,126,239,100,117,102,171,252, 19,168,115,165, 46, 18,104,102,
+235,234,137,156,243, 7, 33, 96, 81, 16, 48, 75, 23, 22, 5,198,171, 72, 56,241,217,208, 19,226, 91, 87,163, 85,182,176,217,108,
+ 20, 22, 22,194,104, 52, 98,238,220,185,188,115,231,206, 89, 49, 24,140,255,214,164, 83,222, 48, 61,123,246, 12,222,222,222,212,
+241,227,199,149, 83,167, 78, 21,148,253, 78, 78, 78, 14,220,220,220,168,211,167, 79,219,124,253,245,215,226,234,204, 12, 69, 81,
+224,112, 56,152, 49, 99,134,224,238,221,187,150,246,246,246,120,245,234, 21, 94,191,126, 13,177, 88,140, 25, 51,102, 8,238,220,
+185, 99,109,111,111,143,184,184, 56,228,228,228, 64, 44, 22,215,218,104,113, 56,156,183,182,161, 40, 10, 58,157,174, 86,198, 64,
+ 38,147,237, 9, 11, 11,179,150,201,100,136,136,136,128,193, 96,128, 76, 38,195,180,105,211, 4, 97, 97, 97,214, 22, 22, 22,136,
+142,142, 6, 33, 4, 82,169,180, 86,121, 4, 0,147,201,132,232,232,104, 52,104,208, 0, 87,175, 94,181,153, 56,113, 34,191, 44,
+253,197,139, 23,112,116,116,196,213,171, 87,109, 68, 34,209,158,170,180, 76, 38, 19, 82, 82, 82,240,232,209, 35,188,122,245, 10,
+233,233,233,200,200,200, 64, 94, 94, 30, 12, 6, 3, 0, 64,152,151,123,114,239,129,227, 15, 5, 2,129,208,199,195,221, 57, 50,
+234,113,154, 64, 32, 16,186, 56, 59,123, 0,223, 50,170, 49,132,255,141,143,143,183, 26, 51,102, 12, 71,173, 86, 35, 43, 43, 11,
+ 44, 22,235, 15,215, 22,151,107, 94, 83, 32,131,193,224,205,231,243, 41,157, 78,247, 38, 2,198,229,114,241,217,158, 66,248,204,
+199, 91,203,208, 53,105, 32, 70, 61,180, 90,173,247,255, 60,154, 5, 80,160,180,238,160, 40,191,219,175, 10, 44, 59, 4, 15,227,
+ 32,230, 12, 96,210, 3, 12, 22, 58, 55,115,100, 29,141, 44, 80,130,160, 25, 52,240, 34,164,230,158, 95, 4,160, 0,157, 27, 64,
+125,112,238,185,193,170,221,128, 73,156,228,228,100,112, 56, 28,240,120, 60,248,117, 25,196,218,251, 80,111, 11, 10,205,161,131,
+167, 57,154,111,133, 29, 5,130,111, 22, 44, 88, 32, 42,175, 57,118,236, 88,145, 76, 38, 91, 80,103,147, 85, 32,108, 3, 3,153,
+241, 40,185,176,193,226,147,106,239,151,105, 69,158, 32,100, 38,160,111,241, 14,204, 86,103, 30,143, 23, 3,160,125,189, 76,150,
+132,123,107,223,190,253, 14,150, 78, 37, 38, 11,134, 98,128, 45,128,173,181, 5,182,126, 22,104,105,109, 33,168,173,217,242, 85,
+ 42,149, 23,111,223,190,173,224,243,249, 8, 11, 11, 3,135,195, 1,159,207, 71,211,166, 77,177,105,211, 38,107, 75, 75,203, 90,
+155, 45, 2, 82,105,204,183,127,255,254,164, 99,199,142,152, 50,101, 10,118,238,220, 9,173, 86,139,197,139, 23, 35, 62, 62,222,
+ 44,217,104,224,248,178,136,136, 29, 75, 31, 61,122,246,165,175,175, 87,127,145,200,114,202,136, 17,178,175,191,254,250,196,177,
+ 99,199,182,247,233,211, 39,227,238,221,187, 63, 2, 56, 88,203,195, 75, 1, 8, 93,181,106,213,148, 50,227,246,245,215, 95,111,
+ 59,118,236,216,210, 62,125,250,164,220,189,123,119, 38,128,208,250,148, 75, 38,147,233,228,127,255,251,223,135, 2,129, 64,232,
+233,233,233, 28, 21, 21,149, 38, 16, 8,132,206,206,206, 30,157, 58,117, 98,212, 69,179, 46,216,216,216,116,189,125,251,182, 15,
+ 74, 58,141,241,202,140, 86, 84, 84,148, 69,110,110,174,133, 88, 44,182,176,179,179,147,148,153,173, 1, 3, 6, 88,176, 88,172,
+106,175,219,252,252,252, 99,243,230,205,147, 13, 24, 48,160,236,127, 92,191,126, 29, 59,119,238,132, 72, 36,122,107,221,126,253,
+250, 97,220,184,113,114,173, 86,251, 95, 51,178, 59,122,194,132, 9,158, 74,165, 18,223,124,243,141, 38, 57, 57,185, 43,128,120,
+ 0,178,110,221,186,125, 31, 21, 21, 21,208,170, 85,171, 3, 0,252,171,187,247, 42,243, 34,229,141,142, 57,105,117, 93,223, 92,
+179, 85, 33,169,202, 49,180,222, 50, 90,193,193,193, 87, 80, 69, 79, 42,221,235, 84,240, 96,132,128, 73, 65,200, 44,103,182, 96,
+ 2, 43, 39, 13, 84, 29,122,169, 84,246, 48,228,114,185, 96, 50,153,208,106,181, 48,119,162,234, 50, 83, 32,149, 74, 33, 22,139,
+ 81, 84, 84, 4,131,193, 0, 62,159, 95,102, 70, 32,149, 74,193,102,179,193,102,179,193,231,243,255, 16, 77,170, 24,205,225,112,
+ 56, 16,137, 68, 72, 73, 73, 65,124,124, 60, 76, 38, 19,196, 98, 49, 68, 34, 17,184, 92, 46, 84, 42, 21, 84, 42, 21, 8, 33, 16,
+137, 68, 16,137, 68,168, 77,131,107,163,209, 88,233,195, 95,175,215,215, 42,162,101, 48, 24,240,228,201, 19, 36, 36, 36,128,207,
+231,191,217, 87, 30,143,135, 23, 47, 94, 64,173, 86, 67, 40, 20, 66, 42,149, 66, 38,147,153,173, 91,182, 47, 18,137, 4, 2,129,
+ 0, 89, 89, 89, 40, 44, 44,124,115, 76,165, 82, 41, 68, 34, 17,114,114,114,144,150,150, 86,237,190, 27,141, 70,168, 84, 42,164,
+167,167, 35, 49, 49, 17, 25, 25, 25,111, 10,160,210,168, 81,253, 2, 59,185,185,200,204,204,124, 19,137,172,106, 49, 7,147,201,
+132,188,188, 60,220,190,125,155, 50,153, 76,200,206,206, 54,165,171,213,198,201, 42, 46,142,126,251, 51,217,127,230, 65,241,222,
+ 83, 97, 69,135, 47, 62, 42, 10, 61, 28, 89,196, 15, 88,104,192,251, 96,131,175, 12,122,118, 80, 70,190,158,151,174,227,200,148,
+190,221,128,152,211, 0,131, 5,240,229,104,221,164, 33,226,179,140,162,167,169, 90, 62, 40,244, 64,168,135,220, 44, 77, 35,187,
+123,122,158,158, 23,167,179,150,122, 55,243, 71,106,106, 42,120, 60, 30,120, 60, 30, 62,104,215, 13, 49,153, 70,225,227,228, 34,
+ 33, 8,130,204,210,252,127, 26,137,197,226, 54,237,219,183,167,202,107,246,238,221, 27, 20, 69, 53, 5,224, 85,171, 66,110,109,
+ 35, 46,116,194,214, 96,145, 25,143, 83, 10,237,143, 70, 21,123,244,237, 63,200,242,167, 11,105,222, 79,212, 26, 87, 16,253, 44,
+ 16,157,127, 61,204, 86, 39,137, 68,114, 98,221,186,117,174,124, 62,255, 52,128, 14,117, 17, 17, 11,152, 27,191,153, 50,204, 65,
+ 94,102,178,244,133, 0, 75, 0,176, 5, 0, 75, 0, 91, 27, 5, 22,141,235,110, 41,228,179, 15,215,194,176,238, 13, 13, 13,181,
+174,104,178,202, 22, 63, 63, 63,204,159, 63,223,218,210,210,114,143, 57,122, 43, 87, 44, 39,217, 57, 57, 0, 1,114,115,243,177,
+114,197,242,172,178,239, 6, 12, 24, 64, 58,116,232,128, 41, 83,166, 96,233,210,165, 56,117,234, 20, 90,183,110,141,241,227,199,
+163, 85,171, 86, 53, 73, 7,201,100,178, 93,221,186,117,187,173,146, 72,198,165,248,251,115, 47,202,100, 57, 93,115,114,100, 46,
+ 81, 81, 58, 79, 32, 18,192,134,164,164,164,158,181, 48, 89, 67,165, 82,105, 88,215,174, 93,117, 18,137, 36, 97,245,234,213,147,
+167, 78,157,138,229,203,151, 99,222,188,121,191, 0,248, 15,128,175,146,146,146,236,171, 51, 89,127, 86,185,244,103,149,117, 70,
+163, 49,241,224,193,131,173,116, 58,157, 99,105,245, 32, 47, 59, 59, 91,250,250,245,107,137, 78,167, 19,153, 76, 38,145,133,133,
+133, 24,128,112,212,168, 81,172,199,143, 31,123, 27, 12,134,228,234, 52,213,106,245,240, 57,115,230,100,100,100,100, 0, 0,154,
+ 54,109,138,236,236,108,124,254,249,231,248,244,211,146, 14,193, 45, 90,180, 0, 33, 4,169,169,169, 88,185,114,101,170, 90,173,
+254,216,140,236, 54,118,119,119, 71, 84, 84, 20,158, 60,121,114, 1,128, 9, 37,237, 88,115, 30, 60,120,240, 48, 61, 61, 29,123,
+246,236,225, 56, 56, 56, 28, 67, 21, 67,188, 84,231, 69,234, 2, 69, 81, 39,235,178, 93, 89,228,170,178,136, 88, 21, 84, 31,209,
+ 10, 14, 14,166,202,127,190, 21, 49,162, 16,145,112,255, 42, 44,125,253,223,138,102, 9,153, 20, 4, 82, 25, 98, 18,227,193, 1,
+245,232, 93, 25,173,172,172, 44, 76,158, 60,185,104,248,240,225,153, 38,147,105,144,185,166, 64, 38,147, 65, 38,147,225,241,227,
+199,100,224,192,129,169,171, 87,175, 46, 42,111,180,158, 61,123, 70,130,130,130,210, 22, 44, 88,144, 95,157,209, 42,139,104, 45,
+ 91,182,172,168,115,231,206,233,143, 30, 61, 34,101,102, 74, 44, 22, 99,229,255,177,119,221,225, 81, 84,111,247,204,204,246,150,
+ 94, 73, 72, 8,161, 36, 64, 32,132, 22, 64, 80, 32, 64, 64, 58, 34,130,136,130, 34, 69, 68, 20, 17, 21,233, 2,210,155, 82, 20,
+ 69,105, 2,130,210, 17, 8, 85,105, 9, 45,148, 52, 72, 47,155, 77,207,246,221,153,185,223, 31, 73, 48, 64,202, 38,168, 63,245,
+219,243, 60,243,108,246,238,204,201,109,115,231,204,123,239,125,223, 21, 43, 12, 61,122,244, 80, 95,187,118,141, 84,164,213,197,
+162, 69,211,244, 35,161, 85,249, 26,154,166,193,243,124,157,132,150, 78,167, 27,253,226,139, 47,170,239,223,191, 79, 42,202,233,
+232,232,136, 85,171, 86, 25,122,247,238,173,190,115,231, 14,169, 72,115,112,112,176, 89, 12, 86,252,127,149, 74, 5, 7, 7, 7,
+220,189,123,151,244,233,211, 71,189,110,221, 58, 99,229,244,123,247,238,145, 65,131, 6,169, 75, 75, 75, 71,215, 36, 94, 42,166,
+243, 88,150,133,209,104, 68, 94, 94, 30,210,211,211, 31,153,211, 13, 10,135,200, 81, 47, 15, 12, 53, 24, 12,250,187,241, 9,105,
+173, 67, 90,122, 24, 12, 6,125,106, 90, 90, 60, 48,143,175,129,123,120,171, 86,173,242, 39, 79,158,108, 40, 44, 44,124,102,161,
+ 37, 22,139,239, 11, 4, 2,210,173, 91, 55, 98, 54,155, 73,122,122,186, 53,175,176,144, 13, 94,188,152,220,153, 62,157,146, 69,
+ 71, 75,148, 74, 37, 85,206, 73, 63,120,240,128,151,201,100,247,255,118,161, 69,243, 94,160,200,115, 23, 18,180, 78,189, 7,142,
+ 20, 83, 57, 87, 1,139, 22,144, 56, 3, 18,103, 8, 20,174,232,215,173, 45,179,237,114,137, 23, 8,223, 5, 34,137,111,173,156,
+ 66,226, 9,240,221, 78,198, 27,157,159,123,105,170,184,160,160, 0, 12,195, 60, 18, 69,114,133, 2,189,134,188, 70,127,123,213,
+228, 5,144,174,160, 24,223, 58,220,235, 51, 63,251,236, 51, 81, 97, 97, 33,104,154,254,131, 83, 46,199,196,137, 19, 37, 14, 14,
+ 14,179,109, 30,252,246,182, 16, 65, 40, 9, 7,200,123,113, 57,198, 6, 7,111, 27,130, 62, 88,186, 85,214,170,109, 71,188,253,
+130,135,108,233,145,220, 86, 55,211, 13,141, 1,110, 58, 88,115,251,122,136,173,110, 42,149,234, 72,116,116,180,188,127,255,254,
+ 88,177, 98,133, 66, 38,147, 29,171,207,192,175,211,114,239, 44, 88,247,131,250,214,234,190,128, 69, 87, 38,176, 42, 29,185, 90,
+ 30,115,182, 70, 21, 91,173,100,148,173,156, 6,131, 97,236,155,111,190,153,191,127,255,254,167, 68,150, 84, 42, 69,114,114, 50,
+ 62,255,252,243,130,130,130,130, 90, 31,138,171, 86,174,136,137,189,121, 6,223,126,189, 0, 0,193,250, 85,147,112,233,194,110,
+167, 23,158,239, 78, 26, 53,106, 68, 58,118,236,136,201,147, 39, 99,209,162, 69,136,139,139,131,155,155, 27, 38, 77,154,132,231,
+159,127, 30, 43, 87,174,172,105,144,234,243,206, 59,239,124,158,145,145, 17,116,242,228, 73,129, 70,163,241, 88,249,205, 55,197,
+251,138,139, 11,150,196,198,198,125, 18, 18,210,108, 86,155, 54,175,215,224,250,161, 74,145, 53,101,202,148, 93, 25, 25, 25, 97,
+167, 78,157, 18,106, 52, 26,223, 41, 83,166, 96,249,242,229,152, 61,123,246,102, 0,111,195,182, 13, 47, 54,143, 75, 12,195, 68,
+ 14, 31, 62, 60,212, 96, 48,232,227,226,226,210, 66, 66, 66, 60, 12, 6,131, 62, 45, 45, 45,254,220,185,115,124,125, 56,235,131,
+252,252,252,164,157, 59,119,198, 79,157, 58, 53, 44, 35, 35,163, 5, 0,215,210,210, 82, 69,105,105,169,196,108, 54,203,156,157,
+157,157,219,182,109,235, 54, 97,194, 4,229,141, 27, 55, 90,100,100,100,104,203,173, 72,213,194, 98,177,196, 21, 22, 22, 14,232,
+219,183,111, 81, 97, 97, 33,218,180,105,131,129, 3, 7,194,203,203, 11, 13, 26, 52,192,224,193,131,209,188,121,115,228,231,231,
+ 99,212,168, 81, 5, 26,141,166, 47,128, 7, 54,100, 55, 41, 39, 39, 7, 93,186,116,193,130, 5, 11, 6,140, 24, 49,226, 78,183,
+110,221, 74, 66, 66, 66,244,190,190,190,193,107,215,174,133,143,143, 15,246,238,221,235, 45,145, 72,118, 86, 33,178,170,213, 34,
+ 0, 52,229,130,199,252,196,167,166,150,223,108,189,182,202,191,109, 56,239, 73,177, 85,249,120,106,234,176,234, 6, 1,230,124,
+191,119,155, 81,236,215, 20,142, 65,161,144, 75,165,144,137,197,144, 57,187,194,196,243,248, 38, 57, 71,175, 35,100,118, 93, 59,
+207,147, 15, 66,138,162,176, 97,195, 6,182,115,231,206,198,168,168,168,245, 6,131,193, 15,101, 94,101,109, 22, 5,235,214,173,
+211, 79,155, 54,237,102,110,110,110,168, 84, 42, 53, 87,164,175, 95,191, 94,255,218,107,175,197,102,100,100,132,201,229,114,125,
+117,235,179, 42, 11, 45,137, 68, 98,202,205,205,237, 56,126,252,248,251, 95,125,245,149, 78, 46,151, 67,161, 80, 64, 34,145,152,
+115,115,115, 67, 39, 79,158,124,115,249,242,229,122,153, 76, 6,133, 66, 81,167,105, 57, 66,200, 83,130,170,114,186,173, 96, 89,
+ 54, 42, 55, 55, 55,116,218,180,105, 55,214,174, 93,171,171, 16, 64,149,243,184,114,229, 74,189, 82,169,172,147, 69,171,226, 60,
+133, 66,129, 53,107,214,232,167, 78,157,122, 51, 55, 55, 55, 84, 34,145,152, 43,165,235,222,121,231,157, 27,185,185,185,161, 44,
+203, 70,213,240, 54,198,149,148,148, 64, 32, 16, 32, 54, 54,214, 36, 18,137, 64,211, 52, 18, 19, 19, 31, 13, 62, 46, 46, 46, 45,
+ 67, 91,135, 4,255,176,107,239, 57,153, 72, 34,233,220,177,125,139, 7, 41,169, 25,132, 80, 41,181,100,245,103,131,193,224, 23,
+ 21, 21,181,190,115,231,206,198, 13, 27, 54,176,213, 89,182,108,129,201,100, 58,119,253,250,117,171, 84, 42,165,178,179,179, 89,
+134, 97,192,113, 28, 49,117,236,104,106,189,118, 45,185, 59,107, 22,229,160, 80, 8, 68, 34, 17,228,114, 57,117,252,248,113,179,
+ 94,175, 63,247,247, 11, 45,200, 65, 65,150,144,107, 82, 73,105,150, 66,252,207,101, 34, 75,234, 4, 72,157, 1,169, 51,124,124,
+124,113, 53, 89,175, 2, 13, 49, 56, 27,124,136, 17,162, 0, 5,121,172, 26, 42,161, 88, 70,229,228,228, 60, 18, 68, 21, 71, 64,
+211, 22,184,158,170, 85,130, 34, 18, 48,168,139, 11,146, 1,174,174,174,130,236,236,236,167, 56, 91,182,108,201, 88,173, 86,219,
+ 93,187,100,113,222, 0, 63, 37, 62,199,232,125,224,166, 46,104,250,146,111,101, 50,174, 8,136, 94,135, 86,129, 13, 48,253,165,
+182,226, 79, 15,106, 90, 93, 75,209, 7,130, 33,111,131,215,186,215, 33,159,207,169, 84,170, 99,215,174, 93,147,171, 84, 42, 60,
+120,240, 0, 29, 59,118,196,150, 45, 91,228,114,185,252, 40,128, 58,173,199,187,162, 70,170,182,148,235, 60,115,111, 90,206,173,
+108,246, 49,145,165,209, 17,188,249,197,193,162,194, 18,227,240,203,233,213,223, 63, 85,224, 70, 81, 81, 81,159,217,179,103,231,
+107, 52,154,199, 68, 86,106,106,106,197, 67,241, 5, 0,181,190,252,158, 61,115, 34,108,241,162,105,184, 22,125, 7,253, 6,188,
+135,235,183,146,240,201, 71, 67,224,228, 32, 67, 84, 84, 20,134, 14, 29,138, 5, 11, 22, 32, 49, 49, 17, 63,254,248, 35,181,101,
+203, 22,234,242,229,203,212, 23, 95,124, 65,213,178,164,225,213, 37, 75,150,224,218,181,107,232,223,191, 63,206,159, 63,143,130,
+130, 2,236, 62,118, 44, 97,103, 66,194, 39, 21,107,182,170,113,253, 80, 37, 28, 28, 28, 62, 88,178,100, 9,162,163,163, 31,113,
+230,231,231, 99,201,146, 37, 25, 0, 38,213, 69,100,213,101, 92,106,211,166, 77,240,174, 93,187,206, 73,165, 82, 73,199,142, 29,
+ 91, 36, 39, 39,103, 0, 72,169, 7,103,201,179,204, 84,229,229,229,253,190,101,203,150,203, 61,123,246,148,143, 29, 59,214,253,
+151, 95,126,113,213,235,245, 13, 36, 18,137,135,217,108, 22,223,187,119,143,217,183,111,159,215,221,187,119,147,141, 70,227, 85,
+ 91,234, 35, 55, 55,247,106, 92, 92, 92,223, 54,109,218,220, 91,191,126,125,134,183,183, 55, 63, 97,194, 4,188,249,230,155,112,
+119,119,231,214,172, 89,147,214,173, 91,183,216,164,164,164, 8,189, 94,127,219,198,188,126,183,120,241,226,223,118,237,218,133,
+129, 3, 7,226,139, 47,190,192,238,221,187,113,230,204, 25,217,133, 11, 23,196, 91,182,108,129, 72, 36, 66,120,120, 56,250,244,
+233,211,171,124,186,211,214,231,210, 53,138,162,142, 80, 20,117,234,137,207,107, 53,253, 86,135,107,171,251,187,198,243,158,200,
+230,150, 39, 14,219,241,106, 32,230, 77, 12, 81,233,127, 31, 19, 78,114, 38, 60, 71,212, 35, 91,144,139,207,187,144,241, 77, 40,
+221,216,122,186,119, 48, 24, 12,143,142,253,251,247, 19, 47, 47, 47,157, 74,165,170,179,123, 7, 47, 47, 47,117, 73, 73, 9,233,
+208,161, 67,129,187,187,251, 35, 87, 4,222,222,222,106,157, 78, 71,194,195,195, 11, 60, 60, 60, 30,185,119,240,245,245, 77, 39,
+132, 16,127,127,255,172,234, 38,158,227,147, 0, 0, 32, 0, 73, 68, 65, 84,248, 88,150, 37, 94, 94, 94, 21, 59,244,132, 46, 46,
+ 46, 27, 59,117,234, 84,160, 86,171,137,183,183,247, 35,215, 9,238,238,238, 43, 58,118,236,248,100,122,109,249, 77,207,200,200,
+ 32, 25, 25, 25,164, 97,195,134, 89,149,211, 83, 83, 83, 73,106,106, 42,241,245,245,173,179,123, 7,119,119,247,229, 85,228,165,
+ 94,121,244,243,243, 83, 27, 12, 6,210,165, 75,151,199,234,212,207,207, 79,109, 52, 26, 43,210,109,114,239, 32,147,201,222,150,
+ 74,165, 89, 82,169, 52, 75, 34,145,124,222,168, 81,163,220, 61,123,246,144, 53,107,214, 84,108, 73,135,123,203, 65,157,155,118,
+121,253, 19,247,150,131, 63,120, 22,247, 14, 42,149,234,180,151,151,151,110,255,254,253,143,245, 47,131,193, 96,179,123, 7,153,
+ 76,150,161,213,106,121,181, 90,109,253,237,183,223,244,209,209,209,250,216,216, 88,125,114,114,178, 33, 63, 55,215,162, 86,171,
+ 13,197,197,197,166,155, 55,111,154,228,242,255,141,123, 7,178,165,121, 83,178, 49,248, 96,210,130,128,187,211,186,203,141,183,
+ 23,133, 18,242,211, 80, 66,142,190, 73, 72,212, 76,114,117,243, 4,210, 37, 64,194,253, 54,163, 97, 60,217, 20,116,192, 22,151,
+ 12,100, 75,235,166,100, 99,240,209,132,249, 1,119,199,118,107, 96,252,230,171, 53,228,202,149, 43, 36, 54, 54,150, 60,120,240,
+128, 28,253,121, 15,233, 18, 40, 47,227,220, 24,124,176,142,110, 30,186, 74, 36, 18,237,170, 85,171,200,229,203,151, 31,113, 30,
+ 60,120,144,200,229,114, 61, 96,219,174,101, 2, 80,100, 99,203, 33,236, 87, 65, 23, 62,237,173, 44,205, 63, 60,147,144,219,219,
+ 8,217,210,138,144,239, 58, 17,178,231, 69, 66, 14,189, 78, 46,175,121,137,116, 13, 16, 89,201,166,160,243,100,115, 75,155, 23,
+219, 11,133,194,146,253,251,247,147,172,172, 44,114,254,252,121, 18, 29, 29, 77,238,223,191, 79,210,210,210,200,145, 35, 71,136,
+ 80, 40, 52,162, 30, 97,203, 58,121,194, 63,162,153, 40,251,230,210,174,132,252, 50,138,104,118,190, 74, 6,132,168, 10,194, 27,
+ 62,147, 63,186,182,174,174,174,121, 71,142, 28, 33,201,201,201,228,220,185,115,196,195,195, 35, 15,128,205,235,101, 7,244,235,
+ 70,136,249, 38,233,209, 61,132,180,105, 19, 66,158,239,218,140,100, 38,173, 35, 29,219, 53, 34, 27, 55,110, 36,106,181,154, 52,
+106,212,136,212, 53, 99, 17, 17, 17, 87, 8, 33, 49,253,251,247,143, 1,112, 60, 34, 34, 34,230,225,195,135, 49, 29, 59,118,188,
+140,154, 93, 63, 84,139, 94,189,122, 89, 8, 33,164,127,255,254, 4, 64, 86, 68, 68, 4,121,248,240, 33,233,216,177,163,185, 62,
+149,103,203,184, 20, 22, 22,214,185,103,207,158,159,132,133,133,125, 96,139,123,135, 90, 56,255, 44, 39,212, 12,202,156,127,182,
+ 4,208,190,252,104, 81,158,198, 60, 3,231,235, 66,161,240, 27, 23, 23,151, 51,206,206,206, 81, 12,195,108, 1, 48, 6,245,243,
+111, 70,151, 91, 24,127,117,119,119, 79,108,211,166,141,161,111,223,190,164, 95,191,126,100,202,148, 41,132,231,121,178,103,207,
+ 30,178, 96,193, 2,210,196,213,149, 93, 3,228,109, 2,222,128, 29,101, 14, 75,223, 8,164,206,141,110,140,210, 81,141,161, 29,
+215,132,178,197, 97,105, 68,117, 66,139,231,121, 18, 31, 31, 79,122,244,232,161, 83, 40, 20,153,176,221, 97,233, 99,156,110,110,
+110,209, 30, 30, 30, 79, 57,209,172,148,254,152,195, 82, 15, 15,143,223,189,189,189,213,238,238,238,215,171,226,116,115,115,139,
+246,246,246, 86,187,185,185, 61,230,220,147, 97,152,254,110,110,110,153, 79,166, 11, 4,130,158, 30, 30, 30,233, 79,166, 87, 83,
+118,120,121,121,165,103,101,101, 17,141, 70, 67,252,252,252,178,158, 20, 96, 57, 57, 57,143, 9, 48, 91, 56,107,203, 75, 13,121,
+172,146,211,134, 58,173, 79,187, 87,160,185,143,143, 79,238,202,149, 43,137, 82,169,124,108,203,115, 80,247,113,159, 93, 73,208,
+150,188,249,209,198, 61, 85, 56, 44,181,213, 57,104, 95,133, 66,145,217,163, 71, 15, 93,124,124, 60,225,121,158,240, 60, 95,157,
+208,170,138, 51,178,125,251,246,249,121,121,121, 92,105,105, 41,155,158,158,110,122,248,240,161, 97,209,162, 69, 22,141, 70, 99,
+212,106,181,230, 91,183,110,153,188,189,189, 53, 0, 34,235,218, 70,245, 68,196,147,211,103,100,115,139,174,100, 83,139, 35,247,
+231,250,223,123,189,147,194, 20,179,178, 63, 33, 81, 51,201,229,141,111,146,206, 1,226, 50, 65,180, 57,248, 24,249,182,121,119,
+178, 46, 80,108, 19,231, 55, 77,186,145,205,193,199,238,206,241,191, 55,180,157,187,121,215,182,205, 36, 49, 49,145, 28,220,183,
+147,132, 55, 46, 23, 89,155, 90,252, 74, 54,182,232, 97, 11,103, 85, 98,107,235,214,173, 36, 49, 49,145, 28, 56,112,192, 86,145,
+ 21, 81,149,208,250, 56, 66, 89,244,102, 39,169,105, 84, 91,177,121,112, 43,145,165, 79, 83, 17,219,197, 95,192,133,122,211,124,
+ 11,119,144, 62, 65, 50, 19,217, 20,116,158,108,106,209,215,214,124,138,197,226, 52, 84,242,169,243,228, 33,145, 72, 52, 53, 8,
+173,136, 90,197, 86,115, 73,246,233, 5, 61,201,192, 54,170,124, 27, 69, 86,109,125,169,173,155,155, 91,222,119,223,125, 71, 60,
+ 61, 61, 53, 54,138,172, 71,156,131, 6,244, 33,169, 73, 71,201,129, 61, 75, 72,143,238, 45,200,246,173,211,200,149,243,115,201,
+139,253,122,144,136,136, 8,146,151,151, 71,122,246,236, 73,234,154, 79, 71, 71,199,237, 90,173, 54,230,196,137, 19, 49, 17, 17,
+ 17, 49,219,183,111,143,185,120,241, 98,140, 92, 46,223, 94, 97,156,120, 82,108,181,120,122,252,143,120,194,162, 21, 83, 90, 90,
+ 74, 78,156, 56, 65, 34, 34, 34,200,246,237,219,201,197,139, 23,137, 92, 46,143,169,239,125,100,235,184,212,187,119,239,207,146,
+147,147, 75,230,204,153,179,167, 10,135,165,182,114, 38,254, 73,249,252, 83,198,144,255, 1,167, 74, 38,147,197,220,188,121,147,
+ 20, 22, 22,146, 16, 79, 79,178,152, 97, 72,134, 72, 68,178, 68, 34,178, 17, 40,248, 15,200,164, 9,213, 77, 29,254,213,168, 82,
+104, 25,141, 70, 50, 99,198, 12,179, 84, 42,213,139, 68,162,186,134,224,249, 87,119, 66, 55, 55,183,223, 61, 61, 61,213,158,158,
+158,143,137,189,202,233,110,110,110,215,255,227, 55, 96,115,145, 72,148, 42, 20, 10, 31, 15,193,211,114, 80,231, 38, 93,199,206,
+246,108, 53,168,223, 51,230, 83, 36, 18,137, 62,150, 74,165,250, 25, 51,102,152,181, 90,109, 93,132, 22, 0,244,150,203,229,153,
+223,127,255,189, 33, 33, 33,193, 90, 80, 80,192, 94,185,114,197, 26, 29, 29,109,158, 55,111, 94,169, 92, 46,207, 68,245,110, 9,
+254,150,250, 36,235, 2,197, 21, 98,235,246,108,255,251, 3, 67,228,150, 45,239,247, 33,157, 27, 61, 33,178,170,247,228, 94, 53,
+103,185,216,186,241,169,223,253, 30,205,149,236,146,217,211, 73,120, 99,217,227, 34,171, 14,156, 79,138, 45,185, 92, 94, 58,119,
+238,220,186, 88,178, 30, 23,132,223, 4,249,145,205,193,219,203, 68, 84, 45,199,198,160,175,201,134, 32,191,127,202,125,212,201,
+ 19,254,189,154, 75,238,212,193,146,101, 75, 62,219, 58, 59, 59,223,171,131, 37,235, 17,231,134, 13,235,201,171, 35,123,147,164,
+123,251,137, 54,255, 40,185,126,105, 21, 25, 54, 40,140,132,135,119, 36,155, 55,111, 38,113,113,113,164, 67,135, 14,164, 30,249,
+236, 51,113,226,196,152,135, 15, 31,198, 60,120,240, 32,230,226,197,139, 49, 67,134, 12,137, 1,208,167,242, 76, 80,133,216,178,
+ 12, 27,102,106, 75,211,211,107,225,124,101,226,196,137,228,225,195,135,228,193,131, 7,228,226,197,139,100,200,144, 33, 4,117,
+ 11,223, 83,175,113, 41, 44, 44,172,115,143, 30, 61,102,183,107,215,174,223,159,197,249,255, 80,104, 41,134, 14, 29,202,115, 28,
+ 71,250,245,235,199,173, 5,138,182, 80,148,122, 11, 69,169, 55, 3,154,255,186, 69,235,175, 14,248, 25, 1,224, 84,229, 4,169,
+ 84,170, 54, 26,141,238, 74,165,242,103,173, 86, 59, 21,101,219, 34,159,137,243,175,200,167,157,243, 63,193,233,173, 84, 42,215,
+107,181,218, 33, 82,169, 84, 99, 52, 26, 61,235,192,233, 36,145, 72,166, 75,165,210, 30,122,189,190, 57, 0, 40, 20,138,120,147,
+201,116,198, 96, 48,172, 6, 80,244,191, 46, 59, 89, 23, 40,134, 88,220, 30, 4,179, 98,210,116,141,151,156, 40,240,127,191,167,
+115, 90,151, 38,138,100, 8,249, 47, 64,153,174, 82,111,164,154,234,204, 41,163, 58,130, 19,206,186,154,162,111,244,197,201, 82,
+255, 15,122, 40,211,186, 4, 42,211, 64,240, 5, 36,250, 75,117,229,124, 82,108, 41, 20,138,239,117, 58,221, 91, 0,206,212,181,
+236,100,111, 11, 17,116, 86, 31, 88,153, 16,144, 26, 66,248, 16,162, 7,205,196, 34, 7,106,106,222, 61,139,253, 62,170,154,243,
+171,175,190, 36,167, 78, 30,133, 73, 95,128,236,220, 18,188, 58,102, 28,218,182, 13,131,155,155, 27, 22, 47, 94,140,166, 77,155,
+ 98,193,130, 5, 84, 61,242,217, 71,169, 84,190, 26, 28, 28, 28,120,247,238,221, 7,122,189,126, 7,128, 95,159,124,254, 4, 3,
+ 61,228, 2, 65,168,129,101,207,223, 3,162,107,225,124, 69,169, 84,126, 16, 28, 28,220,234,238,221,187,119,244,122,253, 74, 0,
+187,237, 99,221,191,131,147,166,233,213,254,254,254,195,146,147,147,103, 1,216,133,255, 71,248,219,133,150,157,211,206,249, 47,
+228,172,184, 79,200, 63, 45,159,127,136, 45,126, 42, 40, 52, 6,161, 50, 32,226,215,212, 34,178,106,231,148, 81, 29,193, 10,222,
+ 3,133,134, 32,200, 1,161, 87,215, 34,178,254, 94,145, 9, 80,152, 87,195,248, 53, 15,132,170,190,189,236,125,190, 10,124,246,
+217,103,228,248,241,227,144,203,229, 48, 24, 12,232,219,183, 47, 22, 46, 92, 72,217,199, 16, 59,231,223,200,249,159,132,192, 94,
+ 5,118,216, 81, 43,200, 63, 53, 99,212,187, 15,204,100,111,139,107,200, 99,102,128, 70, 99,128, 77,133,142,205,161,222, 77, 53,
+ 63, 35,231, 21,228, 81,211,192,160, 57,196,108, 18,180,230, 28,106, 82,253, 57,255,130, 55, 68,130,121,255,220,118,249, 55,226,
+ 73, 81, 21, 29, 29,109,175, 20, 59,236,176, 29, 19,240,248, 78,195, 71,223,237, 66,203, 14, 59,254,229,160, 70,220,179, 0,200,
+ 40, 63,254,177,156,118,216, 97,135, 29,255, 15, 5, 23, 40, 84,191,160,173, 46, 38,193,250, 44,180, 59,101,231,172, 23, 39, 3,
+192, 17,128, 19,202,124,144, 84,108,233,173,205,205, 70, 63, 0, 86,123,125,218, 57,237,156,118, 78, 59,167,157,243,127,204, 89,
+ 27,247,191,113, 74,178,170, 93,134, 91,254,142,127, 28, 97,231,252, 83,209,247, 63, 83,118,130, 80, 16,172, 41, 63, 66,237,237,
+110,231,180,115,218, 57,237,156,255,239, 57,255,147,176, 79, 29,254,187, 32,253,215,230,156, 16,111, 0, 21, 78, 46, 99, 97,164,
+130, 33,197, 52, 0, 64, 41,174, 19,130, 4, 0, 33,229,191,167, 83, 84,157,119,163,218, 97,135, 29,118,216, 97,199,255, 10, 97,
+ 0,174, 3,240, 6,240, 34,128, 35, 40,247,170,240, 63, 21, 90, 50,215,102,222, 16,208,109, 40,158, 4, 3, 0,161,169,251, 96,
+249, 91,134,252,132,103,126,200, 42, 27, 52,119, 33, 16,239,165, 96, 30,161,205,138,127,102,103,104, 33,205, 29,134,121,186,169,
+ 94,205,201, 47,254,254, 78,156,246,151,186, 92,235,232,232,239, 40,117,113,126,201,100,177,134,136, 69,162, 52, 75, 81,201,150,
+194,194, 7,165,245,200,134, 75, 77, 63,206,155, 71,168,195,217,215, 41,145,220, 66,187, 58,136, 40, 45,180, 68,155,173,228, 3,
+138,146,201,190,125, 35, 72, 93,219,134,162,241,130, 66,165,106, 39,145,202, 59,202, 85,206,205,120, 2, 20,168, 51, 83,204, 86,
+246, 34,103,214,199, 16, 30,103,235,208, 86,175, 1, 88, 2, 0,232,217,243, 20, 66,224,128,213, 21, 25,199,164,158,183,241, 90,
+ 84, 20, 42,156,203,126, 12, 96,105, 29,178,235, 4,192, 31, 64,113, 72, 72,136, 62, 54, 54, 86,243,103,245,209,103,105,247,154,
+ 32,145, 72,101, 86,171,197,194,113,220, 51, 7,166,150,200, 29,230, 62, 21, 94,137,162, 97,212, 22,206,183,143,125,118,216, 97,
+135, 29,127,171,208,122, 17,101, 83,134,181, 47,134,247,111,249,220, 53,169, 84, 22, 0, 0, 60, 33,224, 9,160, 43, 41,138,201,
+121, 16,221, 23, 0,220, 26,133,157, 16, 74, 29,218,241,164,236,119,142, 7, 88,139, 49,185, 36,245, 74, 7, 91,114,164,112,111,
+ 62,180,103, 68,175, 97, 3, 6,188, 24,212, 58,164,117, 19, 0,184, 29,123, 59,233,240,225, 35,113, 81,167,168,253, 58, 77,252,
+129,103, 50,160, 64,186,176,125,251,182,207, 69, 71, 95, 95, 0, 96,202,179,214,160,171,171,114,234,175, 63,205,232,222,107,216,
+ 10, 5, 80,183, 7,174,212,197,249,165,193, 3, 35,219,126,248,238, 68,250,205, 25,139, 3,174,253,118,118,153,210,187, 85, 17,
+225,173,191,234,212, 35, 47,212, 20, 56,249, 73,253, 88,157,192,218, 81,112,156, 94,243, 93,103,103, 67, 65,210, 72,194,115, 35,
+ 41,138, 2, 35,150,239,115, 15,124,110,143,211, 11,239, 23, 2,176,121,199,152,131,119,203, 8, 15,111,223,253, 35,199, 77,151,
+202, 29, 61, 5, 96, 68, 0, 40,100,165,220, 67,212,238, 37,206,239,205,223, 26,246,219,173, 84,246,244, 79, 95, 26, 41,145,112,
+152, 62,251,110,237,243,233,169,169, 78,240,247, 47,251,251,235,175, 63, 67, 64,227,219, 40, 91,107, 6,172, 66,241, 15, 89, 8,
+ 1,202,132, 86, 74, 10,156,109,205,107,223,254, 47,247, 78, 75, 77, 88,144,149,153,246, 11, 45, 16,240,133,197,186,247, 93, 93,
+ 61,180,249,249,185, 61, 80,190,144,219,205,205, 77,145,151,151,103, 1, 96,249, 59,219,253,165, 55, 22,126,189,239,187,207,222,
+170,234,183,201,239, 45, 92,237,239,235,164,120,119,202,248, 42, 3,114, 63, 31, 57,254,195,115,199,183, 46,175, 85, 16, 43, 84,
+115,135,191, 53,123,222, 11, 61,251, 60,150,126,229,210, 69,236,220,240, 25,116,165,118,177,101,135, 29,118,216,241, 55,224, 72,
+185,184, 58,242,228, 15,213, 10, 45,169, 84, 22,112,249,236, 97,151, 3, 23,211, 1, 0, 17, 97, 94,248,100,209,250, 62,219,215,
+ 69,199, 1, 64,231,158, 3,154, 47,248,248, 93,252,126, 39, 23,132, 16,180,109,234,138,126,131, 71,216, 38, 60, 60, 91,116,120,
+233,165,225,163,103,204,248, 96, 80, 98, 98, 98,202,174, 93,187, 46, 0, 64,183,238,221,155, 46, 94,188,248,229, 21,206, 46,146,
+ 31,247,253,148,105, 84,223,187, 86,159,210, 74, 27, 4,250, 4, 53,107,252,234,143,223,174,167, 95,232, 59,124, 84, 10,116, 75,
+140, 89, 15, 50,109,185,214,205,205,109,154, 80, 40,116, 4,202,162,177, 87,192, 98, 33, 94, 0,192,114,188,202,185, 65, 80, 41,
+ 35,146,114, 18,137,232,110,169, 86,251,125, 73,230,189,111,106,226, 52, 89,173,173,222,155,244, 6,125,227, 65, 62, 2, 90,117,
+ 99,214, 44,249, 20, 60,103,117,158,254,241,162,151,162,175,252, 8,157, 26,231,108, 44,154,240,201, 4, 31,159,112,102,225, 18,
+101,111,138,194,235,254,157,199, 13, 89,176,109,159,176,125, 83, 7,152,172, 60,142,197,228,119,222,184,122,225,242,223, 54,190,
+120, 8,192,102, 0,167, 1,212, 42,234, 92, 92, 93,118, 76,155,189, 90,169, 51,255, 97, 37, 41, 23, 89,248,250,251,189,184,153,
+206, 35, 56, 40, 88,224, 53,109,153,114,243,162, 9,219,244,101,113,182,170,146,187,129, 0,186, 2,247, 93,240,246,252, 94,248,
+ 97,233,231,240,240,208, 65,165, 74, 3, 5, 79, 0,205,202, 79, 76, 16,231, 33, 29,192,199,185,185, 80, 44,152,136,190, 55,128,
+143, 66,129, 92, 0,191, 81, 53, 69,141, 39,236,146,247,102, 45, 15,113,111, 28,210, 49, 54, 46, 19,151,143,124, 9, 77, 78,170,
+ 83, 97, 97,222,247, 13,155,134, 18,133,163,123, 88, 81,206, 67, 56, 56,225, 33, 69,184,193,197,197,133, 57, 0,108,178, 34,121,
+121,121,205,245,241,235,212,189,162,221, 93,252,219, 22, 86,252, 70, 51,130, 29,121, 15,175,189, 91,211,245,254,193, 3,199, 47,
+249,178, 91,143,251, 55, 79,236, 77,123, 16,115,145,181, 90, 76,205,130,218,180,127,227,245, 81, 47,223,207,116, 11,213, 20,153,
+112,243,246,157,182, 75,151,126,177,244, 78,236,237,219, 42,149,147,115,227,230,161,157,130,219,244, 31, 85, 96,118, 9,180, 69,
+104,177, 44, 7, 87,175, 64, 8,165, 42,248,122, 58,162,168,212, 4,157,137,133,155, 87, 99,176, 44,107, 31,250,236,176,195, 14,
+ 59,254, 30,100,227,241,197,239, 91,106, 21, 90, 0,160,148, 9, 16,247, 48, 7, 0,224, 36, 3,166,190, 61, 22,249,121,154,230,
+102,150,199,184,177, 99,112,253,126, 54,226,146, 53, 32,132,160,185,175,205, 65,184,193,128,111, 63,110,252,184,231, 79,252,250,
+235,213,207,102,127,246, 3, 69,225, 18, 0,108,222,242,117,231, 57,115,231,188, 53,102,236,152,222,251,246,237,187, 3,160, 94,
+ 66, 75, 64,169,214, 47, 95,250,185, 56, 35,207,104,156, 54, 99, 22,255,193,251,211,214, 0, 24,110,147,146, 17, 10, 29, 51, 50,
+ 50,148, 52,253,120, 44,205, 47, 62,159,117,190,247,176, 21, 9, 41,105, 69, 55, 78, 28, 60,216,161,101,203,150,200,200,204,233,
+186,108,237,166,208, 99, 39,100,111,148,150, 24,134,233,243,238, 85, 25,180, 89, 34, 20,222,153,191,108, 99, 91,222,169, 41,253,
+201, 91,253,209,170, 73, 3,100,230, 22,161,123,223, 65,130,152,107,215,250, 0, 54, 11,173, 39,157, 7,190,100,230,115, 67, 23,
+127,127,165,215,144, 46, 13,218,211, 52, 3,173,193, 10, 77,177, 9, 28, 15,116,107,225,136,200,237,107, 5, 5, 58,235,208, 69,
+ 63,165, 15,189,180,110,128,218, 88,156,245, 14,128,253,181,216, 3, 93,124, 61, 28, 16,151, 94, 90,165,200,210, 25,203, 30,224,
+ 34,134, 3, 5,226, 90, 3, 81, 87, 0,223, 1,193,192,201,119, 70,195,211,115,151,167,167,231, 75, 30,158, 94, 49,205, 71,191,
+ 65,249, 4,180, 80,105, 13, 22,220,189,115,187,180,101,187, 88, 82, 90,144, 59,221,168, 43,220,119, 15,136, 13, 6,246,148,115,
+188,129, 26,132, 86, 66,194,189,162, 55, 94,233, 33,184,145, 84,138, 7, 10, 5, 90,117, 25,130, 98, 77,134, 48,242,141,249,157,
+ 12,165,197, 82, 87, 79,127,220,251,125, 47, 52,105,137,109,141,102,211, 1, 23,191,206, 61, 14,125,247,145,185, 54,235,150,151,
+151,215,220,183,223,126,123,158, 38,251,254,194,222,195, 86,180, 73, 73, 43,186, 49,122,254,153, 14,147,135, 54,197,177, 91, 37,
+248,124,124,143, 87, 1,212, 40,180, 24, 1,225,164, 74,175,128, 97,175,188, 51,171,129,187,116,150, 92, 70,195, 73, 33,198,175,
+ 87,114,241,227,175,233,176,178, 4,225,109,154, 53,159,250,225,234,109,222,174, 98,100,231,153,145,169, 49, 66,157,103,132, 54,
+ 95,111,178,169, 67, 80, 20,114, 53,249, 56,114,232, 8, 40,161, 20, 20, 77,193,106,177, 64, 64,211,160,104,202, 62,244,217, 97,
+135, 29,118,252, 61,168,118,215,161, 0, 0, 14, 31, 62, 76, 6, 12, 24,240,212,168,204,113, 4,113,201,101, 75,112, 24,134,193,
+139,207, 53,197,154,101,243, 97, 48,179,184,249,176, 24, 7,126, 79,135, 89, 87, 4, 66, 8,242, 90,121, 84,245,143, 31,155, 82,
+ 90,177, 68, 22,198, 72,132, 35,127,187,162,104,228,226,236,236,156,112,231, 7,221,156,247,213, 45, 4,196, 18,179,232,139,166,
+ 15, 69, 46,130, 46,123,247,238,105, 57,112,192, 0,177, 82,169,154, 73, 4,161,190, 66, 29,249,160,184,248, 86,113,117,156, 79,
+ 66,230, 17, 60,104,208,139,145, 61,189,188, 60,249,209,139,175,220, 95,255, 78,152, 95,179,166,205,186,198, 89, 13,131, 12,185,
+ 9, 7,171,185,236, 17, 39,207,243,160,105, 26,106,181, 26, 28,199,193,100, 50,193,106,181, 34, 61, 61, 69,205, 19,226,203,129,
+167,189,189,125, 33, 16,136, 17,208,200, 31, 27,215, 44,145,111,255,241, 96,199,143, 62, 91,248,139, 62, 15,225,248,195,185,229,
+ 35, 78, 99, 65,225,190,163,199,127,117, 39,136,106,240,201, 91,253,153,220, 66, 45,162,174, 37,226,250,221,244,186, 54,228,147,
+ 46, 28, 26,101,166, 38,150,172, 88,177,130, 89,112, 44, 49,189,103,191,225,156,127,147, 54,141, 76, 28, 1, 64, 65, 34, 18, 64,
+ 36,160,225,239, 46,197,207,179, 66,112,101,240, 45,207, 62, 97,238,171, 9, 33,251,107,170, 79,147,201,202, 61, 23,172, 96, 66,
+ 3, 29,113, 43,169, 16, 87,143, 93,194,180,217,171, 17,253,208,132, 82,173, 30, 20,103, 2, 67, 76,200, 75,125, 0,150,227, 72,
+109,237, 94,134,176, 66, 0,144, 72, 36, 31, 31, 56,116,188,129,137,151, 34,167,200, 4,117,161, 9, 77,195,135, 41, 82, 51, 53,
+248,110,254,203, 31, 3,216, 23, 12,148,218,192, 41, 1,208, 35,229, 97,188,213,108,230,120,163,133,163, 91,249, 57,226,155,147,
+215, 16,210,227, 21,163,152, 97,100, 42, 71, 55,128, 0,173,186,191,130,171,191,108,128,146,102,218,201, 28, 36,161, 0,174,214,
+212,151, 42, 68,214,220,185,115, 49,229,237,151,193, 19, 34,228,192,211, 0,240,213,129, 68,248, 7,120,212,212, 70,127,132,139,
+225,104,202, 98, 33, 40,213, 90,161, 41, 50, 67, 37, 21, 32, 62, 77,135,196, 84, 45, 94,238,235,131, 97,189,188,193,241, 4, 99,
+102, 94,199,240, 62,222, 24, 61,192, 23,160, 40,228, 21,154, 97, 50,115,213,150,157,166,233,198, 12,195,132,113, 28,119,189,236,
+ 59, 3, 14, 64, 73, 97, 30, 76, 38, 19, 24,134,129,179,139, 59, 0,234,177,115,121,158,127,104,235,125, 84, 79,216, 57,237,156,
+118, 78, 59,103,189, 81,157, 22,249,151,160, 90, 87, 14,116, 77, 87, 37,165, 23, 32,238, 97, 14,218, 5,251,160, 73, 35,111, 92,
+141, 47,196,142,168,116,108, 61,145,138,168,155, 26,240, 2, 21,114, 74,128,132, 20, 53, 18, 82,243,106,245,159,205, 72,132, 35,
+223,123,175,120, 70,235,150, 37,225,103,143, 77,133,143,123, 66,203,143, 62, 42,154,202, 72,132, 35,157, 27,170,118,205,154, 49,
+253, 85,149, 92, 46, 54,155,204, 8,108,236, 47,125,247,157,169,111, 80,206, 18,155, 99, 34,169,124, 90, 56, 75,100,178,111, 22,
+205,155, 41, 89,125, 32, 33, 77,103,134,110,255, 37,245,131, 15,102,205, 41, 16, 8,165, 27, 85, 62, 45,108, 94,251, 99,181, 90,
+ 97, 50,153, 96, 54,155, 97,177, 88,144,153,126,111,208,233, 3, 31,246,109,220,208,165,175, 68, 42, 5, 1, 80, 98, 96,241, 48,
+ 91,143, 30,189,122, 51,237,194,194, 90, 41,189, 91,140,175,138,171,184, 56,181,152, 39,140,234,240,207, 59,153, 61, 39,111,224,
+135,195,215,240,203,153, 27,184,122,238, 24, 75,120,235,163,248, 95, 74,239,166,205,149,222,173, 83,149, 13,218,168, 31, 29, 62,
+ 33, 53,186,103,102, 24,154,244,232, 21,113,234,237, 41,239,158,213,151,230,231,126,179,126,126,166, 38, 43,229,158, 68, 68,177,
+114, 9, 3,173,145,197,182,211, 89,120,105,201, 77,220, 77,211,130, 16, 82,107, 0,111, 30,120,127,228,248, 15, 57,171,197,130,
+ 32, 63, 37,118,110, 89,138, 65, 61, 66,209,179,181, 51, 58, 52, 81, 64, 46, 48,225,206,253, 56,236,222,185,141,229,121,250,131,
+ 90,110,196,200,242, 35, 6, 0,180, 90,237,135, 31,205,252, 64, 99,102,121, 88,172, 60, 44,229,159,167,119,127,161,225,140,250,
+ 15,203,175,139,169,116, 93,117, 55,243,186, 55, 39,127,212,227,155, 29,167,122,239, 63,159, 77,171,243, 45,136, 58,190, 15,222,
+ 13, 3, 33, 98,104, 25, 40, 0, 20, 5, 80, 20, 8, 33,112,247,111, 1, 35,207,227,167, 77,159,250,160,134,245,106, 21, 34,107,
+194,132, 9,184,119,239,222, 99,237,158,148,152,140,164,196,100,156, 58,113, 25, 0,224,226,223,182,208,197,191,109,161, 91,227,
+ 14,155,171,226, 50,115, 86,222,192,114,200, 41, 50, 66, 46,165,225,231, 35,199,208,158,222, 88,255, 73, 27,140,238,239,131, 12,
+181, 30, 19, 22,222,132,167,167, 16, 63,159,207,198,186, 93, 73,104,230,175,192,144,158, 13,240,250, 64,223,170,173,181, 2, 65,
+ 63,161, 80, 56,106,200,144,161,243, 37, 82,197,146,119, 22,238,152, 39,147, 8, 42,172,177, 96, 24, 6, 86,171, 21, 52, 77, 97,
+228,180,245,243, 36,114,213,146, 33, 67,134,206, 23, 10,133,163, 4, 2, 65, 63,251, 75,167, 29,118,216, 97,199, 95,102,209,170,
+ 56,188, 31, 27,183,171,187,194,104, 52, 36, 15, 31, 57, 6,222, 30, 94,202,193, 47,188, 46,138, 73, 42,130, 38, 59, 21,137,241,
+177,208, 27,173, 16, 57, 55, 6,164, 94,104, 20,224,143, 91,113,191, 88,214, 45, 63,162,229, 89, 83,114,117,124,131, 6,121,251,
+ 38,222,167,232,229,203,252, 46,199,199, 21,182,219, 57,251, 59,140, 30,173,116, 91,190,204,239,114,202, 3, 5, 45,151,146, 46,
+111,140, 29, 69,209, 20,193, 71, 31,205,192,224, 1,145, 24,247,198,107,212,247,223,111, 11, 47,178,177,148, 60,132, 27, 62,254,
+116,190, 88, 93,196,154,175,198,107, 77,114,133, 76,246, 91,130, 86,215, 42,192, 79,214,127,216,235, 89, 71,246,126,179, 26,192,
+ 88, 91,184, 42, 4,150,213,106,133,197, 98, 1, 0,174,204,122, 80,246,153, 95,106, 70,110,145, 9,234, 34, 19, 88,142,199,176,
+145, 99,101,215,162,111,142, 5, 80,205,122, 45,158,183,178, 86,236, 63,121, 29,153,215,246,241, 20,205, 20, 87, 90, 12, 15,165,
+119,211,230, 94, 94,126,231, 7, 12,123,205, 93, 44, 45,155,134, 45,213,153,240,253,166,101, 53,230,147,166, 40,194,115,108, 17,
+107,181,234, 2, 27, 7,102, 6,183, 12,149, 94, 60,123, 98,208,111,167,246,107,217,192,215,156,146, 82,178,193, 8, 37, 96, 68,
+ 82,152, 44,182,109, 60, 84, 39, 94,254, 18, 0, 53,126,242,140, 53,211, 63,252,132,121,127,221, 5,152,141,122,152, 12, 58,148,
+ 20, 23, 66, 38,176,226,206,239, 7, 89,194, 89,167,235,178,111,124, 89, 61, 19,149, 5, 32,171,114, 74, 65, 65, 65,212,239, 23,
+206, 31,186,242,251,133,113, 94,129,237,104,179,149, 71, 98,236, 21, 62, 51, 33,250,144,201, 84, 18, 5, 0, 20,144, 15,224, 68,
+ 77,134, 75,149,131,147,227,184, 41, 31,142,119,146, 41,232,216,140, 34,164,102,151,128,147,249,192,203,183,201, 31,243,171,124,
+ 89,121, 59, 6,185,163, 79,232,203,184,120, 59,141, 59,177,231,203,222, 0, 14, 2,208,215, 36,178, 98, 98, 98, 32, 18,137, 30,
+107,247, 38, 77, 3, 80, 49,117, 88, 84, 48,213,105,219,242,215, 1, 0, 61,159,235, 62, 1,192,219, 79,189,168,228,148,192,213,
+204,162, 83, 11, 23, 4, 53, 86, 34, 51,223, 12, 66, 9,176,247,116, 30, 18, 50,116, 56,121, 85, 3,111, 23, 49,120, 51, 13, 70,
+ 2,236,191,152,137,139,119,242, 48,166, 95, 67,220,127, 88, 80,141,176,102,194,222,255, 96,198,130,181,107,215,157, 25, 62,121,
+249, 75,221,194, 2, 81, 82,170, 69,102,129, 21, 90, 93, 41,116, 90, 29,100,114, 57, 36, 98, 49, 24,129, 0,253,222,248,252,165,
+163,223,125,122,246,253, 15,102, 44, 88,181,114,197, 28,150,101,143,217,199, 67, 59,236,176,195,142,191,212,162, 53,161,114, 90,
+181, 66, 43,245,238,197, 14, 0,208,188,125,159,124,165, 84,224, 34,160, 41,168, 51,146,240,253,138,105,224,121,130,254,111, 45,
+135, 42,192, 11, 50, 17, 3,147, 54, 95, 91,144,116,174,166,181, 58,160, 40,107,239, 47, 55,103, 6, 76,158, 20,232,176,115,167,
+ 86, 8, 0, 59,119,106,133,147, 38, 54,116,248,106,115,114, 64,167,231,218,129,112, 28, 6, 12, 30,142,145,175,140, 68, 74,142,
+ 30, 63,157, 79,131,206, 96,182,105,183,156,204, 45, 56,212,205,213, 61,242,189,215, 35, 21, 2,134,162,154,249, 59, 50,233, 26,
+ 43,203, 48, 66,238,208,181,226,172, 97,195, 94,113,139, 58,186,167, 39,231, 22, 28,106,200,187,127,179, 54, 62,147,201,244,216,
+212,161,139, 91,227,163,189,135,175,200,200,206, 41, 61,146, 83,104,236,164,179,178, 80, 23,153,144, 91,100, 66,145,206, 2, 47,
+149, 51, 88,171,185,117,117,124,132,144, 31,134, 12, 31,243, 26, 0,154,162,217,239,180,217,247,227,203,126,249, 67,100, 69, 14,
+ 30,237,126, 62, 38, 9,137,209,199, 10, 9,207,150,121,113,167,248,140,154,235, 21,132,161,192,139, 4,148,149,161,105,222, 98,
+209, 90, 61, 60,220,163,206, 69, 29, 31,104,100, 31,128, 17, 73, 30,157,107,120,124, 58,170, 54,177,181, 1, 0,214,174, 91,179,
+178, 75,239,209,162,115,215,147, 97,176, 2,157,195,154,227,231, 31,191, 54, 17, 98,253, 80,151,125, 99, 67, 29, 58,161, 83,195,
+134, 13,167, 9,197,226,158, 50,185,170,161,187,183, 31,109, 97, 57, 88,172, 28, 20,174, 62,180, 68,233,210,155,167, 69, 23, 89,
+139, 57,202,162,211,172, 5, 80,173,190, 62,121,249,110,207, 77,107, 87,190,228,237,170, 64, 67, 55, 17, 14,157, 43,228,172, 2,
+158,246,240, 15,162, 0,192,207,195, 1,119,175,159,197,173, 91,183,209,186,115, 36, 92, 85,190, 80,138, 56,146,151,248, 91,129,
+167,151, 79, 91,117, 78,166,232, 73,161,229,229,229, 53,119,204,152, 49,243,188,189,189,177,102,205,154, 71,233,149,219, 61, 4,
+232, 84,121,234,240,171, 3,137, 53, 22,248,141, 1,141,240, 92,168, 7,120, 30,120,119,245, 45,196, 38,149, 96,203,199, 97, 24,
+214,195, 7,155,127, 73, 70,155,102, 10,104, 13, 60, 44,102, 14, 34, 49,141, 22,141,149,144,136, 24,156,185,158,135, 82,157,174,
+ 70,110,138,145,160,119,143,206,200, 43,210,195,221, 81,140,198, 13,221,161,148, 55, 70,169,129, 69,106, 78, 49,138,117, 86,228,
+ 21,234,208,181,115, 71,252,186, 93,108, 31, 2,237,176,195, 14, 59,254, 30,171, 22, 80,201,135,214, 99, 66,235,240,225,195, 4,
+ 0,170,154, 31,205, 84, 23,192, 85, 41,128,123,131, 0,188, 58,109, 37,126, 88,253, 62, 56,206, 10, 66, 0,150,179,205, 51, 1,
+ 33,194,147, 83, 38, 5, 4, 55, 10, 96,220, 95, 29, 45, 55,236,216,169,151,189, 58, 90,110, 8,105,237, 90, 60,101, 82, 64,114,
+169,209,175, 43,203,113,248,237, 78, 46, 98,147,139, 17,155, 82, 2,165,204,118, 55, 95,140, 88, 52,105,217,210, 37, 34, 1, 67,
+ 81,119, 82,181,218,140,124, 86,203, 8,133, 22,185, 76, 76,204, 68, 96, 74,201, 35,249,189,134,188, 97, 56,180,125,237,120, 0,
+239, 84,107, 21, 43,223,105, 88, 97,201,170,248, 36,132, 16, 10,224,121,138,227, 50,242,140,208, 90,172, 80, 23,254, 33,180, 40,
+182,250,153, 83,165,119,211,230, 14, 42,229,113,134, 97, 36,132, 0, 86, 11,251, 50,188,155,246,213,102, 39,198, 87, 22, 89,151,
+239,100, 33,233,198, 41, 53,103,209,143,209,231,198,157,182,181,236, 20, 5,194, 48,224, 25,154,226, 41, 10,188,144, 38,102, 16,
+194, 63,153, 35,125, 29,132, 86,133,216, 18, 11,153,217,191,238, 94,237, 49,238,197, 22,248,241,124,153,230, 51,150,106, 74,116,
+153,117, 18, 89,112,117,117, 29, 59,115,230,204,185,131,134,143, 70,177,145,130,186,176,204, 26,104,182,242, 16, 41,220,208,123,
+202,183, 13,179, 53, 37, 13, 19,175, 30,234,154,119, 99,103,177,213, 88,188,166,218,124, 37,101, 93, 53,232,117, 40, 49,148,149,
+103,198,216, 32,230,179, 47, 79,130, 37, 2,184,184,251,192,221, 65,132,215, 95,238,135,243,254,141,112,239,254,125,204,158,127,
+ 4,158, 78, 14,177,151,206, 30,108, 18, 22,222,109,213,209, 3,187,158, 18,113, 57, 57, 57,243,183,111,223,142,208,208,208,121,
+237,218,181, 67, 78, 78, 78,133, 64,126,212,238, 73,137,101, 6,219, 10,161,117,253,250, 45,132,133,181,169,182,204,173,155, 56,
+ 96,223,153, 44,124,123, 56, 5, 50, 9,131, 0, 31, 41, 38, 45,187,129, 30,109,221, 48,117, 68, 99, 40,101,254, 40, 42,181,194,
+108,229, 97, 48,177,200, 47,177, 32, 51,223,136,116,181, 1, 22,107,205,107,225, 9, 8, 98,227, 51, 96, 50, 25,225,236,236, 12,
+165,220, 8,169,147, 31, 0, 6,133,234,226,178,221,135,122, 35,228, 50,137,125,232,179,195, 14, 59,254, 53,168, 73,139,252,139,
+172, 90, 79, 91,180,106, 42, 16, 33, 64, 66,106, 30, 26,249,186,195,183, 81, 19,196,223,187, 85,105,176, 7, 88,206,182,233,168,
+131, 7,179, 51, 86,174,116,224,223,127,191,184,243,178,101,126,151, 38, 77,108,232, 24,210,218,181,120,230,204,180,206,171, 86,
+ 57, 94, 58,121, 89,200,145,114,127, 93, 21,190,185, 8,169,139,143, 77,186, 99,104,203,198,204,252,157, 9,105,167,111,151,230,
+138, 68, 34,171,151,179,148, 82, 41,197, 12, 67, 11,197, 38, 43,109,106,222, 42,140, 57, 68, 83, 97, 53,177, 84, 8,173, 39,167,
+ 14,243, 53, 73,131,126,253,105, 70,200, 11, 67,150,187,100,106, 12, 40, 54, 51,143,166, 14, 25,154,194,237,123,169, 0, 35,138,
+173,138,211, 65,229,114, 98,215,142, 31,252, 86, 45,251, 28, 22,150,195,148,247, 63,195, 27, 99,199,156,128,119,211,190,126, 1,
+ 65, 49, 23, 14,125, 39,239, 59,113, 35, 82,227,162,115, 88, 83,201,238,186,136,172, 71, 98, 11, 32, 28,225,233,130,194, 18,165,
+137,133, 20, 85,232, 62,147,133,175, 87,207,209, 26, 88, 28,186,146,131,195, 7,118,195, 81,165,168, 23,135,163,163, 99,139,238,
+221,159, 7, 37, 16,195,108, 53,193,204,242, 48, 87, 90,163,101,177,242,176, 18, 33,228,222,109, 80,112,247,231, 22, 48, 22, 87,
+203,245,218,107,125, 10, 90,182,110,183,247,211,247,223, 26, 49,226,213,113,232, 20,254, 28,226,110,253, 14,207,134,193, 80, 58,
+185,145, 75,201,133,108,231, 96, 63,193,216,193, 29,168, 40,223, 64, 4,180,232,130,132,187,215, 90,139, 68,162,219,105,137,247,
+171,157,146,204,201,201,169,240, 57, 53,175, 93,187,118, 72, 75, 75, 67, 65,165,118,111,210, 52, 0, 0, 16,127,191,108, 19, 67,
+133,200,226,249,170,251,233,132, 37, 55, 80, 98,224,224,230, 44, 6, 67,209, 0, 33,104,228, 45, 67,116, 66, 1,198,204, 47, 68,
+120, 75, 23,248,121,203, 1, 66,160, 53, 90, 97, 54,243,176,240,128,217,200,130,161,171,221, 50,200,113, 28,199,209,196,202, 92,
+143,141,135, 88, 36,132, 99,145, 14, 50,153, 12, 34, 81, 30, 40,154, 6,203,242,176, 88,173, 48,232, 13,216, 27,125, 25,132,179,
+ 48, 28,199,113, 40,159, 6,181,195, 14, 59,236,248, 39,226, 95,188, 16,190,178,184,170,222,162, 85, 19,252,125, 61,113, 37, 54,
+ 25,173,131, 27,195,209, 65,133,251, 73, 25, 96,104, 33,104, 10,176,178,182,139, 33, 98,177,254,184,106,149, 35, 82,147, 21,244,
+ 87, 27,147, 3,166, 76, 10, 72, 94,181,202,241, 18,177, 88,127, 4, 48,134, 16,160, 76,108,149, 9, 46,174, 14,186,128,240,214,
+134,158, 46,114, 38,250,129, 46,159,166, 25,147,171,163,148,119,117,148,208,174, 42,177, 80, 36,100,120,150,208, 22, 95,143, 0,
+ 35,225,121, 91,226,234, 61, 54,117,200,113, 28, 40,138,230,202,133,152, 34, 61,223,128, 98, 35, 3,117,145, 9,133,165, 22, 52,
+243, 81,224, 84,212, 62, 61,103, 53,236,172,210,218, 38, 20, 57, 54, 9,240,197, 39, 11, 87,193, 96,226,144,144,169,133, 72, 34,
+241,242,244,106,117,115,204,228, 89,146,119,183, 36, 97,124, 79, 87,188,127, 33, 41, 83,175,150,206,170, 75,203,114, 28, 7,131,
+209, 44, 82,231, 21, 58,151,148,234, 28,100, 82,137,193,221,197, 49,175,170,115,141,230,250, 61,103,229, 82, 1, 6,134,123,193,
+104, 25, 5,131,137,197,239,167,247,215,135,166,177,103, 3, 95,104,205,149,196, 85,185,216,170, 44,186,132, 74,119, 0, 84,227,
+218,138,125,247,118,204,203,119,111,199, 44,184,118,233,220,174,101,223,156, 14,217,190, 97, 14,214,255,146, 4,134, 97, 40, 98,
+101,133,107,127, 73,134,175, 19, 67,180, 86, 33,101,228, 40,232, 10, 52, 8,234,216,175,213,174, 47, 63,157,133, 50,151, 17, 38,
+ 91,196, 86,161, 58,250, 81,187, 31, 63,246,104,223, 2, 10,111,110, 43, 74, 58,179,190, 76,226, 51,130,125, 85,171,118,139,217,
+195, 81, 76, 56,214,194, 87,246,104,229, 40,163, 64,120,224,218, 29, 53,174,199,211,112,117, 16, 65, 41, 19,194,202,242,208,155,
+ 89, 24,140, 28,205,179, 22, 83, 53,237,125,125,237,154,213,115, 70,141, 26, 53,105,247,158,121, 7, 67, 35,223, 27, 84, 82,148,
+ 15,161, 88, 6,145, 64, 4,154,161,193,114, 28,204, 70, 29, 10,139, 10,144,252,219,247, 7, 71,142, 24, 26,182,118,205,234, 57,
+ 21,187, 20,237,176,195, 14, 59,236,248,203,172, 89, 79,193, 38,161,165,148, 75, 65, 24, 41, 46,196, 36, 33,168,101, 27,108, 59,
+120, 21, 77, 91,135, 35,187,148, 5, 1, 93,235,110,195, 10,204,248,216,112, 29,192,245, 65,131,228,190, 67,135,250,244, 38, 68,
+120,114,227,230,146, 12, 0,104, 28, 82, 70,195,243, 4,132, 0,132, 47, 19, 92,182,155,116, 4,169,201,217, 37,141, 2,188, 20,
+184,155, 97, 49, 41, 36, 34,218, 89, 33,102,220, 29,197, 34,145, 64, 0,142, 80,166,236,236, 36, 19, 5,164,216, 66,247,228,212,
+161, 92,233,125,180,215,144,229,154,148,180,226,232,102, 5,250,208, 98,139,179,110, 80,142, 0, 0, 32, 0, 73, 68, 65, 84, 24,
+132, 0,205,124, 20,136,189,124,132, 83,103, 38, 38, 24,212,113,155,170,182,146,129,177,176, 60,110, 62, 40, 70,145,206,138, 34,
+173, 5, 93,123, 12, 20,117,141, 24,132, 11,177,121,224, 89, 43,150,125,125,164,148, 35,214,145,192, 61,107, 29, 10, 77, 95,185,
+126,199, 87, 83,168,147, 8, 5,130,162,224,166,254, 15,197, 34, 33, 91, 82, 82, 34,126,252, 44, 6, 10,153, 24, 5, 90, 43, 0,
+ 88,235,218,123,138,117, 86, 28,188,156,131, 67,251,119, 65, 38,147,129,212,163, 7,138, 68, 34, 39,161, 72, 10,139,174,108,186,
+176,226,176, 60,113,208, 2, 9, 64, 11,156,108,164,189,103, 54, 27,126, 79,142,187,220,130,235,209,148, 25, 27, 17,128,215, 38,
+ 76,135, 79,147,214, 24, 56,112, 40,218, 4,168,168,253,151,210, 96,181,178,165, 94,129,173, 84,164,108,151,109, 2,128, 80, 0,
+151,109,177,108,169, 42,181,123,139,174,129,161,127, 8, 45,160, 32,245, 70,141,187, 88, 57,115,126,166,222, 76,211,132,240, 85,
+190, 50, 8, 1, 16, 51,160,206, 38,200, 1, 32,160, 1, 1, 67, 3, 20,197,112, 28, 87,101, 59,177, 44,251, 43,207,243,234, 29,
+ 59,118,168, 57,142,187, 30,115,100,229,205, 38, 47, 76,156, 7,182, 0, 86,107,217,114, 70,177, 68, 14,158,162,145,116,254,219,
+121,156,197,240,203,142, 29, 59, 42,220, 59,220,182,143,133,118,216, 97,135, 29,127, 9, 42,199, 56,124,177,178,248,178, 73,104,
+113, 60,129,155,171, 11,172, 68,128,100,117, 49,116,148, 7,140,122, 2,142,163,192, 17, 82,147,171,241, 8, 84,177, 61,255,224,
+193,236, 12, 0, 91,159,176, 73, 61,178,100, 61,250,172,122, 74,166, 74, 78,138,112,167, 14, 30, 59, 59, 98, 80,183,158,206,247,
+179,115, 50, 68, 66, 90, 32, 16, 49, 66,145,128,166, 68, 2,218,236, 32, 19, 48,251, 54,239, 22, 19, 10,103,107,227, 52, 26,141,
+136,136,120, 60, 48,121,220,157, 75, 30, 5,185, 9,102, 66,241,188,187,184, 20,110,142,238,120,152,146,134,211,199,246,235,213,
+153,137,113,156,201, 56, 24,143, 75,206, 63, 56, 9,225, 11,138, 77, 48, 90, 56, 20,106, 45, 40,210, 89,192,186,119,198,207,191,
+103, 65, 42, 98,160,190,185,207,160,201,201,152,102,202, 77, 76,174,165, 41, 62,194, 99,190,180, 72,198,155,227,198, 10, 87,175,
+ 88,102, 10, 11,107, 71, 10, 10, 10,160,213,106,255,168, 19,138,130,212,193, 3, 42,153, 0,137,215,142, 34,241,244, 42, 3,128,
+ 79,109,169,207,202,112,144, 11, 48,168,147, 23, 76,150, 81,200, 43, 54,225,218,217,159,107,235, 50, 79,113,202,229,114, 89,133,
+245,170,178, 91, 7,115, 37,171, 22, 87,222,222,180, 64, 34,171,130,179, 55,128,147, 79, 38,150, 20, 23, 31,185,126,233,212, 36,
+227,132,215,160, 46, 50,193,144,159,132,239,127,222,116,218, 82,154,208,163,207,234, 21,244,244,193, 77,112,250,122,129,234,182,
+128, 1,120, 32,114,212,140,151,142,239, 90,177,189,182,178, 87,136,173,231,187,117,152, 71, 51,212, 33, 66,253, 33,150,178,178,
+178,108, 42,123,177, 58,177,220,130, 84,167, 57,112, 80, 20,205, 16,254,177, 24,136,143,229,147,231,249,219, 21,162, 73, 64, 81,
+131, 85,114, 57,242, 52,197,168,112,178,107, 52,148,194,197,173, 1,104,138,130,181,210,185,117,109,247,122,192,206,105,231,180,
+115,218, 57,255,191,226,169, 24,135,117,176,104, 17, 4,122, 43,208,212, 71, 1,163,197, 3, 70, 51, 7,157,145, 67,137,222,130,
+ 18,189, 21,201, 57,122,196, 30,124,246, 28,150, 89,177,202, 92,159,147, 50,127,155,224,120, 98,179,245, 68,108, 49, 47, 92,185,
+108,241,203,187,195,218,154,223,125,209,187,225,173,100,115, 22, 69,209, 6,154, 17, 88, 93, 84, 2,225,253,251,183, 52,151,206,
+ 31,237, 46,101,185,215,244, 53,240,176, 44, 91,236,227,227, 83,241, 64,123,148,222,162,137,108,240,111, 71, 62,106,252,252,160,
+101,238,171, 63,159,161,167, 25, 17, 79, 9, 68,177,156,213,176,203,160,142,219,136, 26,236,122,180, 72,122,239,202,141,187,225,
+ 78, 46, 13,145,152,169,131,206,200,194,194,242,112, 86,138,144,113,251,132, 37,249,126,244, 30,109,214,173,109,245,168,182,157,
+241,247, 98,125, 35, 35,251, 14, 15, 15,239,204,204,153,243, 25,130,130,130, 96, 48, 24, 64,211, 52, 26, 54,106,130,228,248, 27,
+184,124,100, 33,167,207, 79,217, 4, 96, 1,128, 58, 7, 92,206, 43, 49,227, 88,116, 46,142, 28,248, 17,140,176, 94, 59,216,104,
+153, 76, 38,173, 74, 92, 85, 22, 93,143, 78, 22,138,165, 40,179, 62,241,143,117,196,170,113, 60, 41,254,238,189,215, 95,125,165,
+133,202,209, 9,253,135,142,204,189,116,225,244,128, 3,223,111, 94,147,159,146,254,242,103, 75,214, 57,244,110,239, 77,185, 40,
+197, 40,210,241,216,153,122, 47, 16, 54,218, 96,115,114,114,230,167, 39, 71,143,249,237,200, 71, 3,159, 31,180,204, 61,250,167,
+217,143, 22,209,211,140, 96, 71,109,215, 23,164,199,156,174,171,200,170,144, 90,132, 16,155, 38,206, 9, 0,161, 72, 12, 15, 15,
+111, 80, 20, 96,101,121,152,173, 44, 4, 66,251, 78, 67, 59,236,176,195,142,191, 25, 19,158,248,180,205,162,101, 52, 26,147,159,
+139, 24, 8,158, 39,224, 8,192,115,229,150, 39,254, 15,235, 19,103, 53, 38, 63,107,238,120,158,187,186, 97,203,214,254, 97, 29,
+159,103, 90,250, 41, 81,146,159,131,203,191,157, 97,193,147, 75,182, 92,159,159,159,160,149,121, 54, 29,254,242, 75, 67,247,142,
+ 29, 55,177,168,123,143, 30, 10, 15, 15, 47, 83, 70,102,134,254,219,237, 59,172, 39,142,254,210,157, 7,251, 74,126,126,162,182,
+ 38,158,226,226,226,181, 85,165, 75,196,202,174, 0, 26, 51, 2,202,108,208, 36,212,105, 69,120, 94,102,250,176,197, 11,231,165,
+140,126,107,186, 56,208,167, 9,114,139, 25, 36,103,228,224,254,249, 95, 76,153,241,215, 14,148,100, 92, 31,111, 35, 85,118, 21,
+105, 25, 0, 86, 95,190,124,169, 85,100,100,100,223,158, 61,123,146, 9, 19, 38,128, 16,224,244,150, 73,164, 32,249,242,190,114,
+ 43,214,131,122,182, 75,234,249, 75, 55, 92, 70,116,111, 47,112, 85,141,199,214, 31,143, 90, 65,248,212, 58,210,120,250,250, 53,
+ 18,148, 77, 23,150,185,116,120,242, 48, 91,255, 88, 63, 38, 82,122, 10,244,136,245,172,166,188, 79,105,141,196,248,187,173, 19,
+227,239,142, 3,144,187,119,199,215,135, 0,192,100, 48, 76,140, 58,125, 48,245,238,157,232,215, 6,189,250, 65,147, 86,161, 29,
+ 4,251,182,173,134,197,168,219, 15,192,230,254, 42, 17, 51, 41, 21,237, 94,219, 84,225, 83,237,158,114,249, 40, 69, 51, 2, 91,
+ 69, 83, 37, 75, 36, 77,120,222,166, 5,117,132,231,144,249,224, 54, 92,188,252,160, 82, 57,130, 39, 22,192,108,130, 38, 61, 14,
+ 28,103,143,117,104,135, 29,118,216,241, 55,161,254,107,180,210,239,149,249,211,250,171, 81,154,147, 59,102,219,182, 31, 22,253,
+176,125,119, 87,163,217,236, 67, 32, 74,231, 88,243, 57, 45,135, 57,182,114, 24,212,137,209,174,174,205, 66,190,253,122,195,167,
+223,110,253,234,121,240, 92, 48, 5,164, 16, 10,103,165, 86,110,108,109, 34,171,198,135,102, 94,233,230,222,195, 87, 24,242,243,
+181, 63,212,245, 90, 67,126, 92, 14,205, 88, 26,110, 94,179,112, 57, 77, 51,125, 56,142, 23,242,156, 53,145,179, 24,191, 48,104,
+226, 14,194,230, 85,110, 40,168,225,183, 59, 0,238, 68, 69, 69,117,139,138,138,234, 8, 96, 45,202, 98, 40, 70, 63, 75,187,152,
+242, 75,123,125, 56,227,195,211, 31,128,242,231,121, 2,150,227, 83, 69, 6,125,175, 58,210, 52, 12, 12,108, 34,183, 88,185,167,
+ 22,192, 87, 94, 8,255, 72,104, 57,250,202, 1, 52,180, 81,104, 1,101,187,233,190,126, 42,145,101,151,102,103,165,255,184,241,
+139,105,111, 3, 8, 0,112, 17,192,134,191,171,221, 45,198,146,188,191,250,190, 97, 45,166,249, 25,183, 14, 34,235,142,200,155,
+ 18,148,185,114, 32,156, 25, 60,107,206,102,173,150,249,246,177,207, 14, 59,236,176,227,111,179,102,109,169,234,187,224,159,146,
+195,194,194, 7,165, 40,172, 57, 72,175, 45,200,207, 79,208, 2,120,106,231,158,254, 25,121, 99, 19, 74,126, 66, 66,201, 79,245,
+189, 94,151,251, 80, 3, 60, 28,251,140,217,176,101, 33,251,133,242,227, 79, 65, 94,222, 61, 29,242,208,233, 89,155,101,231,142,
+237,247,119,239,254, 81, 72,104, 70,200, 19, 70,196, 18, 74,200,242,148,208,106,229, 97,178, 88,173, 22,150,181,130, 99, 45,224,
+ 57, 43,225, 45, 86,148,121,135,255, 51,144, 10,224,227,255, 85,187,255, 29, 96,173,150,249,176, 90, 0,232,236, 67,157, 29,118,
+216, 97,199, 63, 75,112,253,115,132,150, 29,255,105, 60, 72, 74,140, 15,183, 87,131, 29,118,216, 97,135, 29,255,113,145, 85,249,
+ 19, 64,217,218,243,136,106, 46,168,203,110,130,136,122,100,232,148,157,243,153, 57,133, 0,196, 0,148, 0,106,155,218,234,139,
+186, 59,172,252, 95,148,253, 35, 0, 55,236,237,110,231,180,115,218, 57,237,156,255, 89,206,218,184,237,187, 25,255, 98, 1,102,
+231,180,115,218, 57,237,156,118, 78, 59,167,157,243,255, 31,231,191, 25, 19,170, 56, 0,216,167, 14,237,176,195, 14, 59,236,248,
+127, 8, 87,215,102, 74,224,209,186,222, 90, 33,119,107,225, 9, 0,250,188,123,106,123,237,217, 81, 5, 42,199, 57,124,108,141,
+ 22, 93, 79, 66, 33, 45, 16,127, 40, 87,185,222, 83, 56,186,102,254, 63,175, 92,170,121, 35,197,212,222,221, 3,126, 14,106, 44,
+ 27, 92,151, 11,229,238,205,191,243,106,210, 41, 77,225,209,124, 42,188,195,100,207,146, 9,133, 71, 99,119,101,195,246,191,169,
+124, 90,245,251, 11,202, 40,105,217,178,101,231,150, 45, 91,118, 6,240,167, 68, 41,150,123, 52, 31,229,219, 52,252,188, 71, 96,
+219, 51, 10,207,102, 47,253,217, 25, 86,122, 55,117, 85, 54,108,247,147,178, 65,155, 66,165,119,155, 18,165,111,187,115, 42,183,
+ 22,129,181, 93,215,112,208,226,224,249,187, 98,119, 53, 28,180, 56,184,170,223,157, 35,215,169,230,238, 78,248,220,117,224, 23,
+ 74,251,184, 82, 63, 52,236, 58,202,201,251,249, 15, 92,235,122,157, 79,243,240, 59,141, 90,117,203,109,208,172, 83,172,173,215,
+248, 6,117,190,238,223,178,171,218,183,121,231,104,123,205,219, 6,169,123,227,206, 82,103,191, 35, 18,103,191,163, 18,151,198,
+ 61,158,149,207,219,219, 91, 22, 28, 28, 28, 25, 30, 30,254,118,175, 94,189,222,107,219,182,237, 4,127,127,255, 62,255,203, 23,
+125,185, 71,243,143, 77, 66, 42,207, 36,164,242,228, 30,205,107,221, 44,163,240, 8, 90, 68,209, 92, 22, 69,115, 89, 10,143,160,
+ 69,255,148,182,146,120, 54,247,151,123, 52, 95,165,242,106,121, 85,230,209,108, 96, 93,175,119,118,118,238,227,238,238, 62,164,
+226,112,118,118,238, 99,191, 3,234,141,202, 86,172,103,182,104, 49, 66,137,252,226,232,113, 83, 66,150,206,155, 37, 93,179,245,
+103,172,249,124,198, 93,147,174,168,229, 63,177,228,110,141, 59, 70, 51, 52,227, 91, 57,141,227,185,140,188,135, 87,219,255, 25,
+252, 65,141,100,227, 63,157, 57,230,253, 81, 47, 71,248, 71, 12,152, 70,197, 61, 52,252, 98,187, 68, 67,232,158,159, 14, 52, 60,
+127,246,204,186,173, 91,183, 44,208,176, 65,171,132, 18,193,134,146,244, 59, 69,117,201,131,131,123, 96, 99,129,194,237,252,115,
+131,167,120,197,156,218,177,141, 51,243,189,245,121,149,162,127,215, 31,238, 77,154, 52,233,192, 48,140,235,212,169, 83, 69, 0,
+176,122,245,234,166, 28,199,229, 39, 37, 37, 93, 67, 61,156,159,150, 9,204,160, 49,107,151,207,255,161, 95,191,254,200,202,211,
+ 97,217,170, 47, 95, 56,126,120,207, 8,157, 58, 97,223,159,209, 38, 78, 78, 1, 14, 16,169,110, 79,155,185,192, 35,242,133, 14,
+140,214,200,226,248,249, 27,221,118,124,185,224, 42,208,162, 99,105,222,189,106,125,138,241,250,226,217,158, 74, 18,201,235,139,
+ 1, 96,212, 83, 15,123,165, 53,194, 93,198, 69,122, 75, 4, 55,242,129, 90,131, 62, 58, 53,234,122, 66, 40,145,248,211, 52, 13,
+154, 2,104,154, 2, 67, 81,101,113, 66, 45,134,212,204,251, 23,250,254, 19,238, 19,149, 95,199, 28, 48, 2, 87,154,250, 35,127,
+ 20, 93,254, 73, 72, 73, 78,194, 69,215, 63,225,223, 56,134, 52,117,106,213,181,169,238,219,115, 15, 11, 20,130,238,239, 29,161,
+ 8,253, 85,218,133, 85, 55,109, 18, 0, 82,169,243,161, 67,135,220, 35, 35, 35, 29, 61, 90, 13, 62,103,203, 53, 98, 70,219,242,
+240,225,131,162,200,200,190,117,232,159,205,123,131,166,183, 83,128,144,231,201,106,134, 39,123,180,249,241, 73, 64,221,162, 79,
+201, 60,130,198,211, 32, 54,143, 51, 60,168,104, 67,110,220,214,250, 86,174, 64,226,208, 75, 40, 18,189,215,184,121,235,176,204,
+148,196,104,157,182,116, 21,107, 42, 62, 87,103, 34, 43,251,225,169, 11, 49,253, 4, 66, 33, 21,217,171, 19, 99, 2,206, 60, 75,
+163,123,122,122, 14, 89,191,126,125, 96,231,206,157, 1, 0, 44,203, 58,236,221,187,215,107,225,194,133,138,248,248,248,253,245,
+164,245,113,119,119,247, 19,139,197, 62, 0, 96, 54,155, 51, 53, 26, 77, 26,128, 90, 95,252, 21,158,129,110, 32, 88,112,225,252,
+121, 1, 0,116,235,214,125,145,223,115,239, 56, 51, 34,165,161,202,234, 48,151, 42,138,146,206, 76,191,124,229, 18, 5, 0,225,
+157, 58,207,146,187,181,216,240,191,180,108, 73, 61,130, 58,209,192,251,225,221, 34,134,141,124,101, 12,221,170,153, 31,250,244,
+238,249,145, 1, 56, 84,167, 62, 35, 16,200,174, 94,189,218,132,166,105,134,101, 89, 99,120,120,120,218,179,228,171, 65,243,206,
+191, 83,160, 27, 90, 88,243,215,154, 7,209,139,128,167, 2,199, 48,142, 13,195, 62, 5, 35,120,139,231,249,244,210,180,232, 46,
+255, 65,139,214,211,245, 92, 87, 38, 90, 32,126,111,212, 27,147, 67,166,127,240,137,116,218,154, 40, 28,249,114, 86,222, 63, 85,
+100, 1, 0, 67, 51,190, 39,126, 61,225, 33, 23, 51, 0, 0,173,145, 69,191,200,200,218,159, 8,141, 58,158,165, 41, 42,168, 34,
+148, 56,199, 90,164, 2,161,216, 72,149, 9, 36, 80, 0,220, 26, 52,138,242,100, 47,202, 71,189, 28,225,191,125,247,201,140,180,
+140,252, 58, 15,106, 20, 35, 66,120,247, 62,136,232,221,215,241,234,149,223, 23,108,217,180,241, 99,214, 98,221,200, 91,249, 85,
+198,130,196,172, 90, 7,115,175,102,237,196, 74,183,227,195,222, 94,232,106,164, 93, 48,231,243,181,110,231,143,237, 60,151,153,
+ 30,202,167,166,166, 27, 9, 69,221, 45, 44,200,126, 79,151,147, 20,103,107,149, 41,149,202, 64,165, 82, 25,218,166, 77, 27,233,
+140, 25, 51,132, 47,188,240,194, 31,146,125,194, 4,209,217,179,103,189, 87,172, 88,209,255,214,173, 91, 70,173, 86,123, 83,171,
+213, 62, 64, 29, 22,218,123,121,185,191, 51,124,232, 64,244, 28, 54, 5, 28, 79, 97,194,228,233, 56,113,108,255, 68, 0,127,138,
+208,178,202, 29, 22,190,245,246, 12,247,240, 14,109,153, 5, 59,227, 32, 19, 11,208,183,125, 16,245,198,212,217, 78, 91,215, 45,
+248, 6,121,120,190, 42, 75, 22,175, 47,158, 29,226,102,126,101, 80,231,198, 56,184,203,252, 10,122,205, 4, 45,119, 92,148,126,
+240,147,251, 0, 16, 24, 57, 85, 37,225, 52,235, 27, 56, 49, 30, 18, 78,179, 62, 48,114,234,169, 7,199,215,151,214,148, 23,161,
+ 68,226,191,107,231,206,102,206, 42, 17, 4, 52, 5,134,161, 32, 96,104, 24,205, 28, 70,188,252,202,159,214,205,101, 30,205,250,
+211,101,193,178,193, 3,223, 25,114, 19,142,214,165, 77, 40, 70,228,122,248,224, 1,129,135,163, 4, 12, 67,129,161, 1,134,166,
+144,162, 54, 96,252,248, 55, 28,159, 85,176,247,235,234,209,225,195,145, 65,125,195, 67, 92,218,252,120,137,114, 12,239, 55,210,
+ 53,207, 40,127,125,247, 47,103, 94, 33,221,166, 95, 33,132, 95,158,113,113,237,175, 53,145,152, 76, 38,117,223,200,126, 14,148,
+ 64, 33, 63,245,243,182,238, 2,154,130,149, 35, 96, 57, 2,174, 60, 54, 42, 85,254, 6, 67,211, 20, 8, 79,240,214, 91,227,209,
+ 55,178,159,158,103,249, 12,219, 7, 57,122,251,241, 83,191,185,155,172, 60, 86,172,223,186, 64, 87,172, 89,240,240,190,107,138,
+182, 56,111,186, 33, 55,193,230, 56, 24, 52, 72,251,244, 7,177,111,239, 60,124, 25, 33, 45, 91,128,227,203,242, 25,228,171,192,
+206, 35,151, 17, 28, 20, 92,150,111,158,160,121, 67, 37, 58,180,239, 0, 60, 21,154,204, 86,145,165,154,243,252,139, 99,230, 15,
+ 24, 49, 14, 30,238,238,160,137,117,192,169, 35, 59, 7,124,247,213,242, 15, 89, 99,201,138, 58,145, 17,238,209,115,129,240,252,
+ 51, 91,157, 26, 52,104,224,222,161,195, 31,238, 24, 89,150, 69, 64, 64, 0, 50, 51, 51,131,234,243,158,230,237,237,253,226,220,
+185,115, 61,250,247,239, 47,244,242,242, 2, 0,228,228,228,248, 28, 63,126, 60,108,238,220,185,185,217,217,217, 71, 80,131, 71,
+ 31,206, 74,139,104, 1, 24,169, 84, 94, 86, 70, 80,244,140,119, 94,107,227,233,221,160,202, 64,238, 26, 77,142,120,230,148, 51,
+148, 64, 32, 42, 63, 31, 52, 33, 60, 85,131,149, 40, 66, 40, 20, 86, 57, 67, 97, 97, 28,194,137,208,241, 77,154,161,203, 58, 43,
+107,213, 20,166, 93,111, 81, 7, 75, 92, 43,161, 88,180,113,248,200,113, 93, 94, 26, 54, 24,222,238,142, 56,117,241, 22, 38,190,
+243,190,149,181, 88, 87,213,107,240, 96, 24, 65,110,110,110,138,179,179,179,215,179, 63,111,169,198, 39, 79, 28,243, 56,117, 58,
+106,214,202, 53,235, 38, 89,204,172,149, 39,228, 81, 28, 99,153, 76, 34,236, 61,224,101, 7,143, 38,225,210,117,115,223, 20,254,
+ 7, 45, 90, 91,254, 20,161, 37,150,169, 94,254,108,230, 84,233,194, 29,151,113,228,203,137,121,250,146, 60,247, 71,111, 10, 14,
+ 78,215,117, 37, 69, 97,245,201,161,210,189,121,103,138, 17,188, 77, 49,140,130,162, 41, 49,207,241,233,172,217,188,200,144,159,
+144,253,172,165,231,121,130,159,126,207,173,155, 0, 34,104,186,253,199, 3, 30,158, 78, 18, 24, 45, 28, 70,142, 26,131, 31,126,
+248, 65,229,238, 40,134,209,204, 98,249,202,149,165,218,148, 35, 30, 41,233,133,153, 17, 3,223,255,245, 65,114,110,108, 90,182,
+113, 79, 93,243,102,178,112, 40,209,179,208,155,104, 52,107,213, 1,203, 87, 5, 75,211, 82, 31,190,191,237,187,111,222,189,123,
+151,249,129,103,232,249,198,236,123,233, 85,222,116, 94, 33,125, 29,156, 93,119, 13,125,251,115,167,132, 92, 1, 8, 44, 72,114,
+144,226,229,215,223,117, 8,244,146, 65, 33,101,156, 30,166,102,122,207,248,240,195,139, 15, 56,210,177, 68,243,224, 97,109,249,
+105,212,168,209,176, 1, 3, 6,200, 63,248,224, 3, 97,195,134, 13,241,221,206,189,254,221,250,142, 24,152,149,173,110, 72, 8,
+129,167,135, 71,250, 91,111,140, 56,116,244,232,209,212,244,244,116,225,178,101,203, 58, 29, 56,112,160,101, 78, 78,142,205,111,
+166, 28, 33, 48,154, 56,112,229, 15, 72, 77,177,169,206,250,212,199,199, 71,146,153,153,105,170,100,101,160,254, 48, 20, 82,125,
+123, 61,223, 73,176,249, 88, 50,180, 70, 14, 10,169, 16,201,106, 61,218,183,109, 77,125,205,177,161, 85, 17,142,127,249,197,217,
+158, 74, 18, 57,168,115, 99,120, 56,203,241,237,134,207,113,240,210,195, 72,181,150,194,122,194,188,237, 45, 17,244, 86,240,217,
+235, 95,104,223,196,171,103, 59,127, 92,107,223,196,235,124, 76, 92,188,108,196,202,169,153, 90,225,169,194,227,239,150, 86, 61,
+240,208,112, 81,137,176,245, 68, 42,228, 82, 1, 20, 82, 1, 20,146,178, 79,154,166,158,237,173,214,187, 69, 67,134,231,198, 51,
+140, 96,252, 43, 47,143,104, 48,250,149, 17, 4, 12,141,189, 63, 29, 26,188, 99,199,246,108,171,197,252, 13, 71, 51, 91,171,235,
+ 63,143, 85, 40, 13,120, 56,138,241,225, 55,177,112,144, 9,161,146, 11,225, 32, 23,162,103, 27,119, 48,116,189,179,232, 60,113,
+112, 96,255,137, 67, 27,245, 8,242, 83, 54,187,153, 84,124,119,252,162,232, 53,103,139,122,188,183, 97,117, 75, 87,109,145, 89,
+ 48,103,198, 91,130,140,172,172, 30,123, 15,157,235,201,153,199,197,177, 22,221, 39,154, 91,123,171,180, 10,103,196, 93, 10,243,
+ 9,127, 73,106,209, 90,111,223,140,203,104, 82,104,146,224, 78, 74, 9, 20, 82, 1,148, 21,117, 43, 21, 64, 33, 21, 66, 41, 21,
+ 32, 43, 35, 25, 5, 58,230, 98,166, 43,221, 3,231, 46,213,201, 77,190,209,194,225,198, 67, 45, 26, 5,181,133,183,119, 3,152,
+251,191,218,232, 74,212, 79,191, 92, 61,247,243, 18,125,206,253, 79,108,229,217,121,248, 50,102, 77,127, 59,134, 2,174,151, 63,
+164,195,230, 44,253,178,221,130, 89, 83, 30, 75,155, 49,127, 93,187,250, 91,178, 84,179,123, 14,157, 60,191, 91,239,161, 40, 45,
+ 80,227,247, 95,247,160,239,128,225,120,117,220, 52, 56, 57,185, 45, 95,181,104,230, 77,214, 84, 18,245,212,152,235, 21,252, 92,
+235,144, 22, 59,124, 26, 52,104,200,243,101, 81, 62, 8, 1,180,165,197,152,249,222, 91,224, 9, 65,104, 88,199,158,210,110,189,
+ 9, 41,143, 6,146,151,159,167,139,187,127, 55,194,152, 27,119,197,230,186, 52, 26,173, 26,141, 6, 55,110,220, 64,124,124, 60,
+238,220,185,131,252,252,124, 56, 58, 58,106,117,186, 58,249,126,115,104,211,166,205,232,168,168, 40,169,179,243, 31, 65, 26,204,
+102, 51, 84, 42, 21, 70,143, 30, 45,236,211,167,143,207,139, 47,190, 56, 54, 54, 54,118, 39,128,146, 42,243, 83,144,152,165,242,
+ 12,218,244,252, 11,207, 79, 2, 0,153,131,247,195,245,223, 29,186, 83,227, 11,173, 99, 3,255, 46, 93,186, 54, 1, 33,160, 64,
+214,234,243,227,115,106,176, 18, 41, 46, 95,190, 28,200, 48,140,224,143,103, 16,143,175,190,253, 49,248,228,133,219,195,150, 46,
+ 95, 33,117, 80, 72,160, 41, 54,227,205, 87,135,218,252, 12,150,121, 6,245,239,210,165,251, 47, 11,230,127, 38, 80, 42, 20,248,
+245,202, 3, 76,125,239, 67, 99,118, 74,236, 10,194, 11,191,212,107,226,115,159,241, 81, 73,240, 39,160,153,175, 18,170, 65,125,
+165, 19, 95, 27, 36, 53, 91, 57, 20,233,172, 48, 89, 56,112, 60, 65,177,206,138,187,105,165,112,115,168,123,136, 48, 66, 72, 7,
+ 0,238, 0, 52, 20, 69, 93,171,252,189,226,133,174, 66, 27, 63,241, 61,175,252,249,224, 10,192,140,178,157,250,143,186, 79,249,
+247,234,210, 43,174,191, 11,160, 69, 57, 39, 7,224, 42, 69, 81,133,213,136,173,167,172, 92,130,195,135, 15,147, 1, 3, 6, 60,
+ 26,241,159,252,254, 36, 36, 34, 97, 3,133,163, 59, 8,185, 7,138,250,227, 52, 15, 47,159,252, 21,171,214,184,188, 51,249,237,
+212,146,162, 2,255,242,228, 83,182, 60, 44, 4, 20,179,234,249,174,225,125, 38, 77,158,140,160, 64, 95, 17,199,113, 36, 54,254,
+161,117,219,214,111, 95, 63,127, 73,188,166, 36, 35,118,118, 37, 19,100,157,182,125,114, 60,151,241,164, 5,139,227,185, 39,223,
+110,159, 14, 82, 77, 1, 78, 74, 49, 54, 29, 75, 6, 33, 0, 5, 2, 71,133, 16,187,207,102,224, 97,204,254,146, 1,161, 37,186,
+209, 75,231,245,236,209,255,221,168,187, 73,198, 61,185,185,198, 19, 0,114,106,226,172,122, 64,231, 97,178,112,176,178, 44,246,
+ 29, 58,132,200,158,157,208,165, 75, 39,116,239,214, 69, 16, 29,115,107,220,228, 73,111, 53,196, 31,187, 59, 30,113, 74, 61,155,
+118, 80, 58,186,237, 25, 54,105,153,234,118, 6, 11, 1, 3, 52,246,146,193, 69, 37,130,153,165,144,162,177,148,223, 57, 78,152,
+ 58, 99,190,203,172,247, 39, 29, 45,209,136, 67,128,123,150,154,202,174,215,235,197, 99,198,140, 17, 90,173, 86,203,232, 55,167,
+245,201,201,209, 12,254,106,237, 23, 18, 15, 15, 79,232,141, 44, 98,238, 36,182, 88,176, 96,126,227, 67,199,207,254, 60,239,195,
+137,191, 68, 70, 70, 58,254,248,227,143,124,109,245,249,216, 27,162, 58,111,195,183, 59,246,253,176,122,197, 98,196,165, 22, 98,
+235,230, 47, 65, 56,118, 83, 45, 85, 85,153,147,140, 25, 51, 70,246,243,207, 63,251,102,100,100,148,232,245,122,205, 99,246, 8,
+154, 18,168, 11,244,112, 83,137, 33, 18,208,240,116,150,194,195, 81, 2, 33, 3,208, 20,197, 85,197,185,117,207,145, 69,188,190,
+ 24, 7,119,153, 95,249,118,195,231, 24,247,206,167,136,205, 19, 31,167,229,142,139,166,188, 50,108,150,187,140,139,108,224, 68,
+123,244,108,215, 8, 10,169, 8, 31,191, 59, 6, 29, 99, 82, 60, 50,139,248, 79, 53, 6,166,237,252,227,143,130,117,159,122,220,
+ 56, 82,102,193, 82,201,133, 56,190, 99,121,174,174, 88, 83, 92, 49, 37,103, 54, 25, 83,109,236,198,167,170,120,179,157,213,182,
+117,171,207, 39, 77, 24, 79,119,237,220,145,208,180, 16,121,165,102,138, 16,224,189,169, 19, 49,101,226, 91, 94,233, 89,185,115,
+190,252,114,211,236,168,147,100,161, 78,115,127, 94, 77,156, 52, 85,102, 5, 82, 74, 5, 80,202,202,132,139, 82, 42,128,209,204,
+129,162,192, 56,249,133, 21, 83,101,150,220,172,130,212,106,223,192, 31,227,116,241,107,117,250,228, 67, 85,112,225,158,194, 75,
+201, 89,119, 22,197,220, 82, 95, 5, 80,208,176,187,211, 88, 11, 75,160, 53,178, 72, 86,235,193, 90, 8, 53,174,159, 63, 2, 94,
+162,130, 22,127,123,253,135, 99,183,224, 80,105,208,127,140, 51,243,242, 62,163,107,200,208,145,171,215,109,190,182,226,243, 79,
+153,188, 98, 51,120, 66, 32, 21, 51,144,137, 5,229, 7, 3,131,174, 24, 95,110,252, 58,135, 5, 53, 12,231,206,177,117,233,159,
+224,201,171, 67,251,119,223, 77, 1, 98,138, 22,101, 52,240,111,228,223,107,224,235,210, 94,131,198,128, 99,205,179, 98, 46,144,
+ 51,250,220,184,211,182,112,134,180,108, 1, 10,184,174,203,141,159, 8, 0, 10,143,230,155,130,131,130,219, 61,153,214,180,105,
+ 80, 59, 91,218,253,145,165, 84,170,122,199,217,197,253,211,160, 86,109, 61,212,133, 38, 74,229,234,139,228,132, 27,216,181,113,
+206,118,222,104,158,127,250,200,158,207,215,108, 61,240,114,175,200,161,248,246,171, 47, 62,206,207,126, 36,180, 78, 85,178, 86,
+189,186,237,155, 45, 13,133, 98, 9,172, 44, 15, 43, 71,202, 62, 89, 14, 5, 5,133,176,178, 60,164,114, 21, 88,158,130,149,227,
+ 97,101,121,152,204,172, 98,226,152, 23, 39, 27,129, 43, 85,229,211, 39,248,249, 19, 34,137,196,159,160, 44,118, 45, 33, 4,201,
+ 57, 6,218,219,219,123, 39, 0, 72, 36, 18, 72, 36, 18,240, 60,143,152, 56,205, 59,110, 65,205, 39,161, 92,224,113, 22,115,106,
+ 81,202,111,125,171, 43,187,151,151,215,192, 39, 69,150,209,104,132, 86,171,197,133, 75,215, 28,191,249, 97, 95,100,114,106, 70,
+ 32, 79, 28, 77, 42,143,192,190,165,185, 15, 6, 86, 87,159,165,234,184,201, 14,225,111,209, 31, 76, 25,219,116,221,182,195, 87,
+ 19, 79, 44,170,113,157, 86, 64,175,143,204, 31,188, 61,188,253,210,181, 91, 19, 10,127,219, 52,189,182, 54, 18, 8, 4, 66,141,
+ 70,243,232,254, 94,255,245,174,246,215,227, 50,135,172, 89,189, 70, 26,243,160, 20,183,147,179, 48, 54,194,175,236, 13,199,134,
+118, 87,120, 6,186, 53,110,210,100,231,151,107,151, 10, 18,178,140,216,176,255, 42,162,126,217,116, 33, 39,247, 74, 36,212,217,
+134,250,140, 33,127,130,208,170,150,243,204,173, 60,104,141, 44, 76,102, 22, 86,158,160, 68,111, 69,110,145, 25, 37,122, 11,180,
+ 6, 22, 99,123,251, 85,121, 93, 45,122,196,157,162,168,195,132,144, 1,132,144, 8, 0,226,138,239,101,207,108,234,112,185, 32,
+123,236,251,172, 89,179, 62, 89,178,100,201,157,138,115, 43,210, 43,206,173, 41,189,210,245,174, 31,127,252,113,200,210,165, 75,
+ 23,119,238,220,121,247,239,191,255,254, 16, 64,161,173,211,135,130,202,133, 57,124,248,112,109, 21, 29,104,177, 90, 36, 14, 50,
+ 33, 26, 7,248,225,141, 79,190,117,251,126,233,248, 92,169, 88,192, 28, 59,118,204, 37,223,172, 4, 77, 51, 54,191,162, 40,221,
+155,117, 17,137,196, 71, 86,174, 92,137, 87, 6,118,147,165,229, 89,181,183,210, 12,106,157, 25,172,135,123,115,241,162,197, 75,
+149, 75,151, 45,159,114,248, 32, 95,164, 85,223, 93, 94,245, 20, 95,251,104,134,170,180, 6,139,162, 64,120, 46,163, 48,229, 90,
+123, 0,120,150,181, 88, 90,163, 21, 76,249,218, 26,138, 2,244, 70, 22, 12, 67,229, 22,197,237,185, 59,122,225,162,158,219,119,
+159,204, 34,180, 83,169, 78,151, 44, 71, 89,204,193, 58,195,104,230, 96,178,114,184,115, 51, 6,221,195, 91,162, 75,251, 96,232,
+141, 28,244, 38, 22, 1, 77,130, 0,192,173,202,134, 99,232,135,132,179, 26, 9,225, 84, 3, 58,184,195,195, 73, 12,111,103, 9,
+ 36, 98, 1,172, 44, 96, 48,243, 48,154, 57,164,228, 26, 80,106,144,161,245,243, 35, 26,187,122, 71,155,114, 82,100, 63, 23,164,
+ 69, 15,171, 81,156,114, 28,182,237,220,215, 52, 43, 75, 61,248,232,207, 59, 36,154, 18, 43,110,165,232,144, 91,100, 2, 24,119,
+204, 93,188, 65,242,209,244, 9, 67,182,237,250, 41,181, 87,183, 78,169,117, 45,179, 94, 19,183,125,207,222,125,155, 6, 12, 24,
+ 34,187,115,229, 40, 18,110,156,254, 92,151, 91,167,245, 89,116,104,104, 40, 59, 97,194,132,210,197,139, 23, 55, 60,120,240, 96,
+128, 70,163,185, 1,192,234,228,228, 20,220,188,169,255,205, 95,143, 31,243,121,113,200, 8, 97, 70,158, 1,142,114, 17,252, 61,
+228,184,116,225,132, 85, 44, 22, 86,185,222,164,124,122,112, 20,122,205,196,193, 75, 15, 35,239,228, 75,207,190, 53,126,108,234,
+175,231,227,242,215,255,240,235, 23, 62, 74,235, 13, 41,175, 89, 31,221,190,137,215,172,169, 99,176,100,221,118,156,139,137,203,
+213,209,222,159,103,155,216,147,213,155,210, 1, 1, 67, 65, 37, 19, 66, 87,162, 41, 78,186,126,188,249,159,100,166, 30,251,235,
+207,219,233,130, 82, 43,210,243,140, 84, 86, 65, 41, 56,158,192, 73, 46, 2,203, 19, 20, 21,228, 81, 59,182,255,128,107,215, 46,
+209, 96,232, 55, 1,204,171,177, 66,169,178,169, 66,165, 84, 88,102, 17,146,149,125, 90, 57, 30, 65, 77,155, 96,203,250, 85, 14,
+110, 30,158,120,174,187,237,107,163, 85,174,254,161,187,191, 91,143,179,191, 95,127,225,220,154, 13, 29,148, 13,220,215, 81, 20,
+183, 2, 4, 70,147,133, 67,113, 81, 33,196,230,116,116,244,209,192, 69,206, 33,165,196, 27,177, 57, 9,202,218, 6,252,252,216,
+ 3, 55, 40, 50,100,246,190, 67, 81, 75,250,246,126, 1,177, 41, 37,144,137, 5,144,138, 25, 72,197, 12,132, 20,135, 85, 27, 55,
+ 89, 11,139, 75, 7,228,223,249, 37,175, 30,253,243, 84,249,219,111,153,184,227,180,238,219,215,205,254,254,173,153,203,250, 70,
+ 14,125,157,138,189,118,230, 19, 61,112,218,182, 23, 61, 98, 83, 26,207,219,254,140,147,170,220,214,190,251,209,162,119,251, 12,
+ 24, 1,134, 17,192,106,181,226,167, 31,183,227,187, 13,115,239,155,181,249,175, 3,224,205,185,204,132, 61,219, 55,142,152, 57,
+103, 21, 21, 18,218,177,211,153,236,167,195,123,254, 31,123,231, 29, 21,213,213,181,241,231, 78, 99, 26,189,131,130, 21, 4, 11,
+ 40,246, 94,163,198, 30, 53,193, 18, 49,177, 39,198, 36,198, 68,141, 38,106,212,104, 76,236, 45,177,197,168,177,247,142, 13, 91,
+140, 10, 40,138, 40, 72,239,157,233,125,230,158,239, 15,192, 88, 40,131,229,123, 83,206,111,173, 89,112,135,225,153, 91,207,125,
+238, 62,251,236,195,114,153, 95,198,140,155, 20,234,225,225, 97,247, 87, 68,139,160, 81, 64, 19,244, 27, 52, 12,103,143, 30,198,
+131,216, 24,176,164,212, 48,177, 44,129,172,164, 40,215,108, 50,108,175,180,199, 67, 36,170,179,237,215, 29,254, 28, 14,243,100,
+ 2,249,207, 63,250,192, 48,249,179,175, 59,245,235,221, 53,214,134, 11, 69,106,122,142,227,141,232,184, 32,150,111,235, 51,110,
+198, 10,129, 78,111,129, 92, 99,194,169,173,149,123, 29,145,147,111,251,186, 45,251,141,155,252,205, 38,161,144,203, 49, 54,109,
+228,147,220,181, 93,211, 12, 95,111, 87,229,119, 75,215,181,185,118, 51,186,223,123,163,198,137,194, 2, 91, 50,222, 46, 98,187,
+ 15, 70,189, 19,108, 49, 27,199,104,138, 51, 42,173, 47,200,151, 56,201,124,235,249,105,254,138, 24, 53, 58,196, 16,212,127,198,
+121, 48, 72,214,230,197, 15, 5, 0, 47,111, 95, 29, 95,104,175,172, 65, 4,134, 0,192,154,205,187, 91,221,141,207,158,176,114,
+229, 42, 73, 84,146, 18,119,146,228, 16, 10, 56, 48,154, 88, 48, 86, 6,181, 89,194,157, 52,103,246, 44,251, 18,181, 5, 17, 49,
+ 5,136,141,188, 68, 12, 42,221, 40,137,217,126, 40,220,237,198, 0,104, 8, 32,145, 97,200, 47,234, 60,207,163,192,229, 26, 79,
+116,202,178,165,207,203,246,110, 13,234, 91,120,194,126,124, 27,105,123,134, 33, 77, 25, 2, 39,128,100, 21,151,221, 83,173,117,
+106,234,188,120, 44,251,254, 91,172,222,114, 24,217, 69, 58, 56, 88, 50,112,116,235, 34,124,177,228,119,104,245,149,103, 53, 84,
+231, 71, 42, 50, 70,207, 27,174,242,223,203, 63,183,100,201,146, 1,207, 29,155, 1,149, 28,179, 23, 62, 87,254,255, 75,151, 46,
+253,254,169,191,107,172, 53, 89, 79,140, 86,249, 70, 85, 99,182, 26,185,121,213,249,227,232,145, 67, 78, 37, 42, 35, 68, 2, 46,
+124,235,249, 97,254,218,163,110,111,183,114, 69,161,209, 1,187, 55,253, 84,172,211, 40,247, 90,213, 88,184, 7,180, 21,219, 74,
+ 79, 29, 58,120, 24, 13,124,221, 5,187,174, 22,167, 68, 39,107,159,132,122, 21, 5,105, 54,245,236, 53,188,161,239,188, 35,185,
+112,241,210,103, 42,160, 66,163,197,101,184,181, 55,239, 56,232,110, 39,230,131, 97, 0,165,214,140, 9, 99,134,189,250,109,140,
+176,220,113, 99,195,192,148,153, 44, 69, 81, 46,190,158,249,145, 78,106, 74,120,144,158,154,158,213,107,224, 23, 23, 20, 42, 70,
+ 23,250,254, 71,183, 31,196, 47, 41,209,104, 94,110,146, 31,189,193, 2,189,145, 69, 82, 82, 34, 62, 15,123, 11,124, 46, 7, 92,
+ 46, 91,154, 44,109,174,252,100, 84,101,199, 23,195, 83, 48,124,231,242,169,155,189, 61,220, 93,108,165, 98, 98, 43, 17, 50, 77,
+ 3,253, 5,237,218,117,176,169, 23, 16, 44,184, 26,167, 69,122,129, 22,201,217,114, 8, 61, 90,240, 70,244,120, 27, 59, 87,205,
+232, 86,156, 30,201,193,139, 73,138,207,112, 46,226,207,129, 91, 54,174, 20,230,201,140,120,152,174, 66,110,137, 14, 57, 37,122,
+228, 22,235, 96, 43,230,163,203,160,137,194,147, 71,127, 25,216,179,115,219, 53, 47,179,221,201,201, 41, 39, 83,179,114,222, 13,
+ 14,105,131,157,191,253,218,217,209,177,158,189, 76,150,162,176,246,232, 44, 90,180,200,102,233,210,165,188,181,107,215, 42,218,
+181,107,231, 57,123,246,236, 62,249,249,249,183,234,214,173, 27,112,246,208,246,139, 45,186, 12,110, 13,214,232,214,185,107,119,
+129,144,229, 33,252,196, 9,227,190,189,187,138,180, 90,229,228, 42, 13,135,196, 97, 81,158,138,129, 91,173, 90,177,182, 54,150,
+183,120, 28, 89,124,201,153,105, 59, 74,128, 67, 13,250,126,114,254, 82,228,163,248, 86, 81,169,238, 23,163, 30,231, 23,107,140,
+141,146,206,124, 81,101,195,203,101, 24,240,185, 28,216,137,121,224,148,181,170,182,222,193,143,193, 48,110,229,145, 83, 6, 76,
+217, 79,128, 97,144, 93,146,126,199,138,156, 13,134,176, 4,120,148,169,134, 74, 87, 26,154,175,237, 42, 65, 65, 94, 38, 54,172,
+217,142,232,200,219,232,253,246, 32,172,223,188, 11, 19,198,188,171,171,238,233,135,195, 41,139,104, 61, 21,205,178, 21,243, 0,
+ 48,144,169, 77, 56,120, 45, 3, 13,235,115,172,190, 49, 0,128,157,173, 4,114,165, 22, 28,129, 29, 18,163, 78, 73, 78, 95,186,
+ 57,123,238,194,149, 95,150,228,196,164, 63,190,119, 21, 1,174,114,212,175,101, 68,108,174, 61, 34,139,234, 33,192,175, 1, 56,
+130,219, 86,105, 23,198, 6, 45, 59,202, 57, 56,160, 85,139, 38,237,235,184, 59, 66,107,176,148, 69,181,184,248,117,219, 14,164,
+166,100,142, 43,122,112, 52,250,117, 56, 90,117,126,114,129,208,221,239,227,123, 55, 47, 36,191, 51,234, 99,120,213,242,109, 46,
+ 75,191, 99,229,205,203, 58, 83,101,177,210,104, 9, 36,142,179, 63,159,243,195,180,222,253,135,227,207,171, 23,112, 39, 54, 17,
+109,219,182,198,219, 67, 70, 64,169, 40, 14,220,191, 99,213, 91,102,141,242, 44, 79,104,158,214,166, 67, 15,134,181, 88,144,240,
+240,126, 98, 69, 90,218,156, 71,119,110,228, 60,178,127,166,123,202, 53,176,185,173,131,243, 29,189,209,130,172,172, 76, 92,255,
+ 35, 34, 68,155,243,168, 70, 5,132,133, 2, 46,194,163,243, 97, 44,155,195,180, 75,215,183, 12, 2,142,190,243,226,149,219,169,
+ 20,239, 5, 0, 0, 32, 0, 73, 68, 65, 84,218,229,100,231,112,164,246,174,172,115,173,198, 2, 47,161, 81,127, 55, 73, 46, 48,
+154, 88, 52,240,150, 86,169,233,230,237,247,253,140, 25,159, 55,230, 10,196, 80,170,245,134,156,236, 44,207, 77,187, 47,169,226,
+ 30,222,171, 85,219,221,193,254,135, 85,191, 8, 20, 58, 6,249,114, 61,138,149, 10,102,212,164,175,188,183,172, 91, 50,186, 42,
+163, 85, 65,186, 72,253,147,225, 87, 3,157,236, 4,140, 74,103,102,139, 20, 70,203,168, 33,175, 54,232,178,204,100, 77, 92,185,
+ 98,149, 36, 58, 73,137,187, 73,114,136, 4, 92,216, 8, 56, 48,152, 88, 88,121, 57,113, 60,221, 61, 39,119,104, 21,132,179,119,
+ 10,193,229,114,160, 85,150,104,120, 40,138,111,213,173,183,164,101,155,118,232,222,173, 43, 30,199, 63,242, 61,113,236, 96,207,
+ 27,215, 47,231,154,141,141,166,170, 11,226, 15,215, 40,176,160,209,112, 77, 54,158, 31,120,213,170,219,113,232,136, 15, 28,234,
+248,214, 98,220, 93, 93, 96, 38, 60, 76, 28, 51,204,234, 43,191,212,152, 3, 75, 23,206,134, 94,111,128,155,163, 13, 8, 1,182,
+173,153, 15,131,193, 0,111, 23, 33,228,234,202,103,147,171,206,143, 84, 22,133,170, 81,238,201, 83,102,172,170,247, 25,134, 57,
+ 49,107,214,172,175, 1,144, 89,179,102,125, 93,190,188,100,201, 18, 45,128,236,106,186, 14, 55, 61, 99,180,202, 55,174,242,171,
+ 91, 16,224,234,226,117, 35,252,236, 25,135, 35,119, 89,252,121, 56, 18,253,219,122, 65,192,227, 64,226,224,141,187, 41,114,156,
+ 60,180, 81,118,116,207, 47, 89,122,189,254,199,234,251,154,253, 90,217, 74,164,103,127,219,185,151,117,117,113,225,108, 8, 47,
+ 72, 42, 82,154,159,116,105,197,223, 60,198, 70,158,221,228, 69,192,156, 17,137, 68,126, 6,131,193,169,186, 3,187, 45, 60,173,
+ 44,137,151,121, 29,109, 43, 24, 46,215,178,115,215, 78,184,218,219, 64,111, 98, 49,235,203, 79,181, 97,189,109,101,163,222, 27,
+209,163,123,191,105, 23,249, 82,255, 11, 29, 66,252, 73,139, 22, 45,100, 92, 46,215,170, 84, 10,119,119,247,249, 28, 14,103,164,
+141,141,141,157,193, 96, 80, 26, 88,157, 68,173, 51, 64,103, 4, 52, 26, 29,248,130, 82,179,200,231, 50,208,234, 12,208,104, 13,
+ 85, 95, 24,185,247,175, 1,104,164,120, 42,166,116, 33,174,129,205,239,251,143,126, 58,252,189,208,185,181,154, 15,177, 77,201,
+145, 67,192, 24,209,186,177, 23, 46,157, 57, 76, 50, 83,227, 63,175,206,100, 1, 64,126, 65,177,143,155,155, 7,162,147, 85,200,
+ 42,210, 34,183,204,100,229,148,232,161,212, 42, 17, 92,199, 27, 50,185,220,231,165,247, 47,112,248,236,217,179,239,246, 27, 28,
+138,105, 95, 46,232,180,117,227, 79, 49, 82, 27,254,135,234,188,132, 8,107,140,214,253,251,247,139,103,206,156,217,112,243,230,
+205,156,209,163, 71,107,131,130,130, 68,239,191,255,126,167, 29, 59,118,136, 36, 18,145,246,238,213, 99,115,199,127, 50,107,240,
+166,213,139,154,151,148,148, 48,102,147,233,180,177,164,100,150,170, 26, 51,151,113,236,235,135,243,146,140, 99,223,234,236,118,
+204, 89,194,105, 42, 36,134, 17,104, 60,127, 47,226,230, 27,147,206,172, 85,138,223, 93,254, 73,182,140,157,163,227,184, 47,174,
+206,100, 1, 0,135,203,192, 96,182,192, 78,204, 7,135,195, 41, 55,241, 94,191,238, 61, 45,113,115,176, 1,159,203, 1,143,203,
+ 64,161, 49,161, 80, 97,196,199, 31, 88, 91, 33,132,176,102, 11,129,214, 96,134,166,236,233, 80,169, 40,196,236, 47,167,227,237,
+129,239, 96,252,228,233, 40,209, 2,145,201, 74, 24, 77,166,106, 47, 10, 14,195,129, 70,111,198,135,189,235,160, 88,101,132, 90,
+107,134,193,204, 66, 98,195, 3,159,199,129, 84,196,131,189,132, 15, 16, 34, 40,111, 76,248,124,190,206,100, 50,237,172,226,137,
+ 30,245,124, 60,160, 53,113,208, 38,244, 39,244,106,223, 8,177,215, 14,242, 46,255,121,175,254,103, 95,206,193,167, 19, 6,226,
+192,195,134,112,118,175, 3, 91,169, 24, 38,194, 1, 64,172, 76,216,155,207,114,140,239,140,252,121,243,182, 71,223,125, 59, 75,
+ 36, 83, 51, 16, 10,184,184,120,225, 60,110,220,140, 92, 93,248,224,232, 78,188, 70,248,132,227, 97,111,111, 15,145, 13, 23, 6,
+163,222, 96,125,234, 2, 1, 1, 66,164,238,141,126, 46,123,226, 15,177,176,168,224,189,234,141, 22, 79,100, 63,107,234,151,223,
+125,223,187,255,112,132,159, 56,128,253, 7,246, 90,218,247, 29,199,221,245,235, 70,116,234, 53, 8,157,122,135,226,244,225, 29,
+211,213, 44,211,100,226,180,185, 11,187,244,232,135,240,147, 7,144,151,155,185,220,218,245,229,242,153,105, 61,222, 26, 8,157,
+193,130,206, 61, 7,224,204,241,195,159,160,108,144,133,245, 55,177,231,218,103,112,204,211, 63,159,198,207,151, 25,248, 5, 10,
+ 3, 50, 11, 52, 72,201,211,224,232,158,173,196,250,246,194,208,186, 75,112,109,254,196,101, 23, 51,124,106,123,233,249,122,173,
+ 56, 62, 49, 41,112,252, 7, 97,252,250,126,129,156,124,185, 30, 5,114, 61, 10,229,122,168,116,102,248,213,246,231,152,204, 76,
+251,154, 30,103, 87, 7, 27,254,250,227,201,176,151,242,209, 33,240,229, 7,218,178, 44,251,151,201, 90, 89,106,178, 98,146,229,
+ 16, 10,184, 16, 10, 56, 16, 10,184, 48, 91,136, 85, 15, 46, 98,247, 70,253, 62,158,250,145,183,193, 12, 20,201, 13,224,113, 25,
+184,187, 58, 73, 91, 55, 31,137,109, 63,125, 2, 0,152, 48,115, 3,198,127,248, 62, 26, 55, 13,130,172,164,196,115,228,240,126,
+ 43, 1, 28,182,118, 93, 79,133, 71,248,134, 95,137,158,249,241,140,121,182,239, 13,236,206,189,147, 36, 71, 78,177, 30,137,241,
+202, 26, 69,222, 0,192,108, 97, 65, 64,176,125,239, 9,136,109,120, 40,144, 27, 65, 8,193,162,181,251, 96, 39,230, 35,167,164,
+180,187,191, 42,170,244, 35, 85, 68,164,106, 16,109, 28,128,210, 92, 46, 55,107, 35, 90, 75,150, 44,137, 93,178,100, 73,133, 17,
+178,167, 76,214,203, 77, 42, 45, 16, 72, 3,237, 93, 92,255, 12, 63,115,202,238,240, 93, 11, 46,221, 45,194,240,206,181,161, 42,
+ 78,199,143, 95,190, 87,204,128, 24, 56, 92,174, 76,175,213, 28,210,106,213,139, 1, 24,171, 60,105, 60, 27,133, 72, 69,182,231,
+215,111,250,205,236,234,238,142,157, 87,139, 51, 75,212,102,211, 95,221, 86, 38, 38,242,236,166,250,102,214,212, 87,151,247,248,
+118,117, 79,226, 44,129, 96,201,198,163, 0, 8, 88,150, 5, 97, 89,240, 69,182, 82,215, 6,237,242,202, 26, 58, 17,143,195,232,
+158,110, 1, 8,107,206, 44, 76,174, 58, 12,202, 0,112,144,240,177,247,114, 22, 0,228,113,149, 81,113,163,222, 43,237, 46,212,
+ 25, 68,138,166, 13, 27,146,214,173, 91,203,196, 98,171,202, 95,113, 61, 60, 60,110,205,157, 59, 55,112,252,248,241, 66, 27, 27,
+ 27,152,205,102,231, 95, 54,109, 98, 55, 45,158,128,161,159,172,135,192, 70, 8,173,206, 8, 62,159,135, 18,185, 10, 50,133, 6,
+ 74,141,169,230,103, 80, 82,146,161, 0, 88,118,228,176,205, 59,125,108,131,219,216,112, 4,104, 25,224,133, 75,103,143,144, 63,
+207,108,155,160,205,143,255,205,202, 19, 17, 42,157, 9,217, 69, 58,100, 21,233,144, 91,162, 67,110,177, 30,185, 37, 58, 48, 12,
+ 3,157,193,252, 74, 55, 46,117,254,163,253, 59,127,219, 50, 72,111,196,136, 46,189,223,193,244,121,235,235,236,252,121,233,249,
+100,194,233,104,101,162,173, 37, 54, 54, 54,245,131, 15, 62,104,190,123,247,110,110,179,102,205,180,113,113,113,146, 50, 19,105,
+180,181,149,136,183,174, 91,114,182, 77,155, 54,123,179,226, 31, 94, 40,235, 79,175,182, 97,175,211,117,172, 80,108,140,158,232,
+ 43,237,208,167,129,167, 4,190, 82,101,159, 64,219,187, 63, 22,245,248,244,251,130,139,171,243,115,244,230,115, 5, 90,110,139,
+ 44, 21,223,170, 28, 60,147, 94,151, 54,116,248, 8,112, 25, 14,140, 58, 77, 90,249,201,229,238, 96,131,249,187, 30,194, 86,196,
+135,157,152, 7, 91, 49, 31,157,154, 56,163, 6,237, 25, 49, 89, 88,104,244, 22,104,245,102,232, 12,102,184,250, 56, 97,243,206,
+253, 72,207,215,226,232,237, 66, 60, 74, 83,194,191,182, 20,132, 84,223, 76,178, 22,147,122,224,176,209,118, 92, 14, 3, 46,135,
+225, 52, 9,108,132, 98,149, 17, 2, 30, 7, 2,145, 24, 82, 33, 15,246, 98, 62, 4, 2, 62,242,243,243,161,215,235,225,235,235,
+ 43,170,218, 10, 18,216,217,138,225, 95,223, 27, 70,147, 25,167,174, 60,192,226,207,135,226,173, 46,173,192,240,109,241, 80, 31,
+ 2, 59,103, 59,176, 28, 14,140,102, 22, 6,163, 5, 0, 71, 87,153,158,143,143, 79, 15,169, 84, 42,213,104, 52,202,244,244,244,
+136,220, 71,135,211, 45,220,193, 19,207,132, 95,220, 57,224,237,183, 16, 29, 19,139, 3,135,143, 93, 45,116,145,207, 40,255,159,
+166, 77,155,182,115,117,117,181, 45, 42, 42, 82,220,191,127,255,214,203, 62, 23, 16, 14,231,179,246,157,186, 65, 37,203, 71, 94,
+ 70,138,213, 79,209,141,235,216,225,155, 37,235, 91, 6, 52, 10,104,105, 33,165,198,171,137,175, 29,190,152,183,166,101, 67,255,
+ 70, 45,203, 7,132, 52,246,173,186, 44, 27, 79, 98,215,123,204,248,233, 75, 6, 13, 31,139,139,225,199,176, 98,241,151, 59,165,
+ 14,110,141,157,157, 28, 90, 52,107,215, 27, 87,207, 31,131,200,206, 19, 78, 46,158,157, 70,127, 56,181,215,240,209,147,112,227,
+234,121,172, 94,250,245, 14,139, 94,249,187, 53,235, 42,117,175,239,214, 60,164,205, 40, 59,103, 15,200,228, 74,216, 57,185,163,
+113,112,235, 81, 15,238,234,103,170,243,147, 11, 94,218,116, 16, 2,189,145,160, 68,101, 68, 70,129, 22,169,185,165, 70,139,101,
+107,144, 19,100, 97, 25, 91, 17,143,231,108,122,236,123,239,252, 69, 82,199,199,131, 89,182,240, 75,174, 17, 34, 20,200, 74, 77,
+ 86,129,194,128, 2,185, 1, 42,157, 9,206, 82, 30, 88, 11, 91,227,167,238, 18,149, 17,118, 18, 62, 28, 36, 2,171,163,140, 21,
+177,241,215,189, 1,119,227,179,135,172, 88,177, 74,114, 39,249, 41,147,197, 47,141,102, 9, 5, 92, 88, 88, 22,176,226,138,231,
+243,248,211, 6,247,235,133,140, 66,109,233,168,101, 14, 3,255,160, 54,112, 21,179,232, 25, 58, 11, 0, 48,176, 95,105,106, 91,
+114,142, 26,199,255, 44, 0,158, 77,236,174,186, 45,214,106,185,155,118,157,252,108,255,190, 61, 14, 58, 11, 15,191,156, 78,133,
+ 70,111,134, 72,192,133, 80,192,133, 88,192,125, 38, 31,187,122,163, 85,154,115,151, 94,104,130, 70,167,131, 66,107, 2, 1,112,
+235,177, 10, 90,131, 25,114,181, 9,237, 2,157, 94, 45, 16,194, 48, 39, 9, 33,253,159, 55, 68,207,155,165,167, 34, 82, 21,105,
+220,126, 90,163,252,243,149, 25,185,167,115,182, 0,212,104, 4, 23,239,121,231,248,244,178, 64,234,212,216,193,206,225,207, 51,
+167, 79,216, 30,190,203, 34, 34,166,212,100,153,180,133, 88, 62,115,100,166, 66, 86,216, 29, 64,146,181, 95, 38,113,109, 28, 44,
+178, 17, 94,252, 97,213, 47, 70,119,143, 90,236,161, 63,101,249,114,141,229, 25, 55, 97,209,235, 57,132, 37, 2, 93,222, 99,171,
+250, 16, 56, 28,198, 56,239,147,119,192, 18,130,249,171,246,227,251, 25,161,176, 21,143,150, 48, 12, 35, 81,235,204,248,124,193,
+ 22, 44,255,102,156,157, 68,200, 3,195,148,230, 68,141, 25,241,142,117, 39,160,206,140,196,155,187, 85,202,228, 19,113, 79,119,
+ 23,182,237,244,118,100,219,182,109,101, 78, 78, 78, 16,139,197,127, 69, 42, 42,193,195,195,227,155,121,243,230, 5, 76,158, 60,
+249, 73,177, 79, 30,143,135,143, 63,250,136, 99,177, 16,156, 62,189, 13,110,117, 67,112,236,220,159,232,219,163, 53, 84, 26, 29,
+138,101, 74,176,224,190,244,137,168,148, 21, 94,204, 77,189,215,166, 99,247,129,136, 56,123,132,252,121,122,235,132,154,212,232,
+113,114,118,202,136,186,151,216,152, 97,156, 75, 35, 90,101, 38,203, 96, 98, 81,199, 67,130,140,212, 68, 56, 58, 56,100, 88,171,
+ 39,118, 11, 24,204,112,200,100, 6,100,155, 58, 47, 97, 63, 0,162,206,137, 27,185,255,247, 77, 49,177,247,239, 44, 30, 48,106,
+ 26,175,247,240,143,184, 63, 47,153,250, 53, 0,107, 11,239, 25, 31, 61,122,244, 96,220,184,113, 29,110,220,184, 97, 1,160, 97,
+ 24,198,196,229,114, 37, 6,131, 65,208,189,123,119,249,195,135, 15, 35, 80,113,210,226, 51,116,250, 96,191, 43, 35, 84,190,109,
+195, 26, 71,214,177, 83,190,213,189,115,123,180,111,234,131,140,206,237, 1, 96, 90,154,202, 54, 64,215,112,203, 94,147, 89,124,
+234,231, 95,143,127, 63, 33,180,215,231, 59,121,243, 87,228,156,152, 95,101, 34,106, 70,220,229, 62, 21,217,120, 30,151, 3, 59,
+ 49, 31,182, 98, 30,236,196,124,216,137,248, 48,153, 73, 77,158, 28,137,201,204,150, 70,180, 12,102,168,180,102, 92,188,147,135,
+ 92,185, 1, 50,165, 17, 90,163, 5, 4,164,244,105,212,138,214,188,224,241,117,199,242, 59,169,163,111,136,124,211,218,159,236,
+ 15, 94,203,124, 50,162,207, 65, 98, 3, 59, 73,233,104,236, 43, 87,174,192,197,165,250,167,125,150,101,113,224,204, 45,172,216,
+126, 17,103,182,125, 5,145,128,139,224,193, 11, 48,118, 72, 91,176,132, 69,226,163,216, 60,255, 38,205, 61, 56, 28, 49, 56, 12,
+ 3,189,137, 5, 64, 42,221,159, 6,131,193, 37, 61, 61, 93,225,231,231,231,233,237,237, 61,156,203,229, 18, 40,239,232,143,236,
+ 41,214, 92, 56,241,187, 68,173,213, 91, 36,102,249, 54,191, 28,109,127,248,249,129, 97, 24, 98,111,111, 47,184,120,241,162, 42,
+ 40, 40,200,237, 37, 47, 37,142,216,189,209,234,241, 83, 62, 27,222,176, 65, 3,236,255,125, 27, 8, 97, 14, 90,251,207,187,142,
+223,192,194,217,207,142, 48,252, 98,222,154,150,203, 23, 76,123,230,189, 41,179, 87, 84, 57,234, 80, 44,180,157, 49,116,228, 68,
+ 68,222,250, 3, 63, 46,248, 98,143, 94, 85, 60,214,100, 54,189, 91,156,147,188,167,126,147,182, 32, 70, 37,194,247,253,132,208,
+247, 39, 8,123, 15, 24,142, 27, 87,207,227,251,175,167,236,210,200,242, 63,128,149, 73,206, 44,225, 79,238,222,103, 8, 95,171,
+ 55, 98,205,178,111, 49,105,198, 98,180,235, 49,144,127,255,206,159,147, 1,124,103,117, 58,132,209,130,238, 65,174,165,230,217,
+196,226, 88, 50,151, 87,209, 25,200,227, 50,156, 22, 13, 28,161, 53,152,161,168,230,161,146, 39,224,231,202,228,138,186,235,190,
+255,140,171,214,153, 81, 32, 55, 32, 95,174, 71,161,236, 47,131, 85, 40,215,163, 64,110, 0,159,199, 32, 62, 41, 13, 28, 62,175,
+198,249,121, 37, 42, 19,218, 52,114, 42,189, 70, 95,178,119,196,196,179,111,123,230,242,221,161, 43, 86,172, 20,221, 77, 81, 34,
+ 38, 89, 81, 22,201,226, 66,200,231,192,166,236,119, 11, 91,154, 27, 89, 21,246,110, 13,234,135,141, 25,221,211,222, 86,140,236,
+132,124,240,184,165, 37, 98, 28,220,125,224, 32,212, 97,234,148,137,112,117,113, 68,122,161, 30,171, 15,199, 35,230,193, 99,176,
+218,154,109,246,154, 95,246,244, 29,255,241, 23,142, 28,190, 13,118,156, 77, 41, 93, 79,174, 5, 15,255, 60,174,203, 78,188,167,
+ 86, 41,138, 8,136,197,202, 28,100,134,152, 45,165,167,219,247,243,103, 97,207,246, 13, 56, 27,149,255,228, 12,188,118,112, 57,
+ 62,155,189, 8,133, 10, 3, 42, 58, 47,171,242, 35, 0, 10,158,138, 68,189,176,252,148, 57,170,104,153, 41, 91, 54, 84,162, 97,
+120,206, 92, 25,158,123,223,240,156, 94, 69,181,255, 54, 85,219,117,248,130, 41,114,116,107, 38, 17, 73,255, 56,125,250,184,244,
+ 72, 12,121, 98,178,140,154, 66,178,120,218,192, 76,133,172,160,119,141, 76,150,155,127, 51,161, 68,120,121,238,162,213,122,143,
+ 90,117,205,167,238, 40,138,148, 58,139,249,197, 28, 4,169, 69,234,224,166,227,217, 8, 87,240,181,134,111, 11, 11,227,212,213,
+ 69,158, 88, 66,112,226,102, 46, 8, 41,125, 68,218,119, 37, 11,101, 79,230,176,176,165,221, 42,231,238,228,131, 87,150,135, 98,
+109,248,123,227, 47, 27, 20,253,131,228,234, 81,223,207,127,210, 93,216,174,121,105, 36,203,222,222, 30,142,142,142,176,181,181,
+ 69,117, 93,135, 12,195,140, 25, 63,126,252, 11, 79,255,249,249,249,232,213,179, 59,214,110,216,140,230, 61,195,112,238,250, 89,
+ 24, 77, 44,130,155, 52, 64, 93,111, 39,100,228, 41, 95,234, 66,151,122, 4,124,220,166,251,144,175, 59,245, 24,136,139,103, 14,
+145, 63,207,252, 58,177,166,133, 16,251,247,234,112,124,225,194,249,245,231, 46, 94, 39,180, 19,241, 16,167, 50,128,195, 48,168,
+227, 33,129,139,148,131,136, 35, 59,116,161, 3, 59, 88, 93, 28,207,199,167,214,206,229,107, 55, 73,151, 47, 93,208, 61, 50,138,
+185,168,202,142, 47, 6, 0, 77,222,163,101, 15,129, 7,181,255, 8, 63,213,188,235, 59,240,240,110,240, 86,114,222, 67,171,205,
+ 6, 0, 77, 82, 82, 82,242,220,185,115, 3,150, 46, 93, 74,184, 92, 46, 11, 64,184,106,213, 42, 77, 66, 66,194, 29,148, 14,205,
+ 69,117, 55,155,158,111, 53,253,220,214,198,210,206, 89,194,105,218,192, 83,130,246, 77, 75,123, 69, 67,251,119,130,143,175, 47,
+146,114, 53, 45,138, 53, 44, 95,101,224, 54, 88,255, 75,204,237,122,174,220, 9,102,173,225, 1,128,163, 53, 61, 62, 12,254, 74,
+144, 47,143,102,217,137,249, 96, 75,207,149, 26, 25, 45,189,209, 2,173,222, 2,173,193, 12,181,193, 2,141,193, 2,150,148, 94,
+ 19, 12,195,192,104,102, 97,213, 99,243,115,231,190,189,179, 43, 26,212, 99, 96, 47, 41, 93, 55,251,178,114, 15, 12, 0, 23, 23,
+ 23,184,187,187, 91, 21, 21, 53, 24, 75, 47,113,131,137,125,210,173,111, 48,154, 65, 8, 65,124,252,163,175, 82,147,147, 7,251,
+249,251,117,105, 18,220,220, 89, 34,228, 0, 64,165, 70, 75,163,209, 88,236,236,236,220,157,157,157, 57, 89, 89, 89, 79,204,179,
+ 95,139,238,230,195,135, 14, 98,232,208,119, 84,113,183,238, 62, 25,226,174,213,106,153,142, 29, 59,218,251,248,248,112,244,122,
+189,162,166,135, 73,234,214,104,136,147,139,243,226, 49, 31, 76,106,212,189, 87, 95, 92,186, 16,142,163,135,118,255,166, 41,136,
+ 15,183, 86, 36, 32, 32,240,133, 81,135, 13,253, 27,189, 48,234,176,110,125,255, 42,141, 86,147,224,214,109, 9,195,195,217, 19,
+251,136,142, 99,156, 2,128,181,232,148,251,246,110,252,230,187,145,147,103, 55,236, 55,104, 36,198,188, 63, 22, 60, 30, 23, 17,
+231,142, 99,249,130,233, 39, 85,242,252, 48,107,210, 4, 74, 67,111,141, 5,181,196, 62,159,250, 54,108,134,168, 63,175, 34, 49,
+254,126,236,221,219, 55,154,250, 5,181,131,155,119,157, 79,211, 92,185, 75, 17, 23,103,172, 78,198,160,211,165,141, 13,123, 31,
+ 79,143, 58,108, 31, 18,224,194, 60,127, 1, 0,208, 40,243,141, 91,127,250, 60,161,124,212, 33,107, 52,164, 85,166, 43, 47, 41,
+ 56, 16,113,253,230,140,193,253,251,114, 10, 21,134,210, 8,150,220, 80,246,210,163,176,252,119,133, 30,254,222,182,120, 20, 27,
+197,234,228,133, 7,107,120, 93,234,198,190,219,231, 65,249,185,203,178, 4, 12,160,171,113,183, 20,223,126,226,178, 31, 87,136,
+238, 38,171, 16,147,162, 40,237, 42,228,115, 75, 13, 22,159,243,196,116,149,142,102,175, 38, 58,196,112,191,255, 48,108, 4, 10,
+ 21, 70,176, 44,192,227,114,202, 94, 2,164, 43, 25,100, 40, 53, 40, 44, 41, 64,114,106, 26,100,185,137,224,112, 56,112,245,110,
+100,117, 37,105, 11,177,241,210, 24, 72,208,240,254, 93,120,135,254,200,129, 68,200,131, 94,153,135,211,123,127, 42,208,171, 20,
+139,181, 26,213, 33,107,234, 57,254,149,130,192, 20, 40, 84, 58, 15, 33,159,139,253,219,215,225,221,177, 83,158,105,125,191,154,
+179, 16,224, 48, 40, 46, 81,130, 97,152,130,154,181, 75,204,237,170,150, 95, 50, 50,246,202, 26, 21,152,173, 23, 31, 20, 42,127,
+ 26, 37,167,195,207, 28,151, 94, 75, 21,226,214,163,156, 50,147, 85,192, 46,250,164,127,166, 82, 94,220, 7, 64,124,205,158, 11,
+ 57,125, 66, 63,156, 17,219,160, 81, 19,253,165,251,170, 20,153,218, 84,105,158, 67,251,225,115, 99, 35, 79,174,237, 39, 55, 37,
+125, 36,245,106, 98, 97,205,230,101,218,130,248, 5,149,116, 29,218, 44, 88,189,255, 73,183,225,204,165, 59, 74,127,183, 88, 96,
+ 33, 44, 8, 11, 76,253,102, 35,204,172, 5,172,197, 2,214, 66, 96,178, 16, 73,117,171,235,238, 93,247, 80,201,195,125,129,163,
+190,123,177,187,208,209,209, 17, 46, 46, 46,112,113,113,129,189,189,125,181, 70,139,207,231,219,242,120,207,238,234,180,180, 52,
+164,166,166,194,222,222, 30,132, 53,193, 96, 2,154,181,235,141,123,137,247,113,254,218, 29, 16,214, 2,169,109,205,103,121,145,
+122, 4,124,212,186,219,224,117, 61, 6,141,195,185, 67,191,144,219, 87,142, 79,210,230,199,111,177, 58, 66,111,177, 48, 38,147,
+ 9,253,123,119, 75,139,142,125,124,102,206,140,201,125, 59, 12,152, 36,108, 31, 80, 11, 58,131, 5,153,169,137,136, 56,242,171,
+174, 81,125,175,179, 61, 59,183, 77, 51,153, 76,176, 88, 44,213,222,200,117, 6, 99, 33,151, 47,150,142, 24, 49,138,127,251,214,
+173,131, 82, 55,255,253, 22,134,115,151, 33,108, 48, 67,200,208,224,224,198, 48,154, 88,104, 52,138,146,154,110,179, 82,169, 76,
+222,182,109, 91,253,176,176, 48, 73,147, 38, 77,248,137,137,137, 88,190,124,121,145, 82,169, 76,182, 86, 35,252,202,163, 85, 60,
+166, 36,161, 60,162,149,222,169, 61, 70, 12,232,132, 61, 39,175, 33,226,234, 13,164,169,108,239,168,204,188, 35, 25,105,217,250,
+166,206,138,131,131,218,215,229,238,223, 94,114, 48,182,219,172,247, 8, 17,134, 23, 94,158,175,182,254,226, 6,148, 90, 19,236,
+ 37,165,245,158,202, 35, 91, 92,134,177,218, 17, 49, 64,242,213, 27, 81,205, 90,249, 55, 65,116,178, 28,249, 50, 61,180,122, 51,
+ 88,150,128, 5,129,139,157, 13, 68, 2, 14,210, 83,147,193, 18, 99, 74, 13,111, 21, 5, 93,187,116,229, 1, 12, 24,134,240,248,
+ 60, 30, 8, 74,235, 43,138,197, 98,149,187,187,187, 85, 17, 45,163,217,140,161,125,219,162, 93,235, 96, 12,158, 84, 90, 51,243,
+194,111,179,224,100,203,199,158,157, 91,144,113,101,213,206,250,237, 39,135,223,191, 23, 59, 44, 54,250,143, 81,111,183, 20,183,
+240,228,101, 11, 42, 11,147,170,213,234,131, 0,108, 4, 2, 65,223, 46, 93,186, 56, 31, 60,120, 80,230,234,234,202,218, 8, 4,
+ 5,131, 6, 14, 96,249, 2, 65,113,249,103,175, 95,191,206,159, 52,105,146, 93, 73, 73, 73,122, 94, 94,222, 13, 0,166,170, 31,
+ 4, 3,122,129,131,221, 96, 24,145,173, 88,146, 86,175, 94, 3,239,214,237,218, 58, 12, 25,250, 46,132, 54, 66,156, 11, 63,131,
+ 53, 43,151,238, 83,229,196,125, 88,147, 61,249,186, 70, 29,102,166,167, 36,107,180,250,160,102,173,186, 49, 87,195,143, 76, 51,
+194,117, 37, 87,104,252,169,215,208, 41, 13,147,179, 85, 88,179,228, 43, 56, 57, 72,145,146,248, 80,155, 16,119,111,163, 73,167,
+248,202,106,147, 5, 64, 82,100, 25,214,254,253,190, 78,122,163, 5, 87, 46,158,212,177,102,182,239,141,203,167, 18,107, 55,106,
+ 45,106,214,186,167, 83,225,209, 45, 67, 53,192,158,234,116,178, 30,190, 24,193, 37, 6, 89,202,133,139,231, 29, 60,234, 52,229,
+ 50, 96, 96,212,235, 80,144,116,219,172,201,123,168, 80,100,221,183,106, 20,110, 81, 6,190,153, 61,239,135,143, 90,183,106, 37,
+ 37, 16, 61, 19,193, 42, 55, 88,133, 10, 3, 92,237,108,160, 85, 20, 32,225,246, 25,157,166,128, 91,101,189, 51,179, 65, 45, 41,
+204,207,179,249, 43,157, 33,190, 93, 85,159, 47,204,207,179, 49, 27,212,146,234,111,117, 92,216, 75,109,112, 47, 37,235, 73,226,
+187,144, 95,154,155,101,195,231, 62,201,211, 42,111, 11,170,161,155, 64,228,136,172, 34, 29, 24, 16,176, 22, 51,204, 38, 3,148,
+ 10, 5,178,178,115,145,151,155, 7,165, 82, 6,137,173, 19,154,181,104, 3, 59,169, 8,119, 35,246,129, 16, 98, 85, 93, 67, 19,
+195, 15,104,221,174,179,240,126,106,105, 46,150,136, 79,112,124,247,210, 34,149, 34,191,179, 42, 39, 33,161,166,109,177,217, 98,
+ 57, 31,243, 32,161,105,109,175,122,204,157, 68, 57,118,110, 94, 11, 67, 89,100,211,100,178,224,126,186, 26, 57,197, 26,164, 39,
+197, 17,214, 98, 57,143,255, 8,188,202, 3,128,224, 5, 55,107,140,222,163,135, 96,195,134,141, 72, 74, 78,101, 23, 79,235,151,
+174, 82,202,222,174,129,201,234,133,178, 90, 27,154,188, 71,203,180, 78,173, 51,143, 69, 23,115,180, 6, 82,101,130,143,200,173,
+ 14, 58,127,184,252,172, 86, 89,108, 99,209,107,120,199,119,126,184,187, 34,205, 82, 7, 13,195,226, 47, 66, 97, 43,230,129, 97,
+ 24,148,119, 23,174, 95, 56, 17, 18, 97,105,223,178, 86,111,198,232,207, 87, 96,231,138,233, 32, 0, 70,190,123, 77, 83,217,122,
+162,116,238,194,169, 94,184, 85, 59, 45, 53, 63,171,215,192, 47, 46,232,140, 66,253,128,119,194, 34, 91,181,106, 37, 19,139,197,
+ 16,139,197,176,183,183,135,147,147, 19, 28, 29, 29,171,221,118,147,201,164, 50, 24, 12, 46, 54, 54, 54, 96, 89, 22, 41, 41, 41,
+ 72, 73, 73,129, 92, 46, 71, 65, 65, 1,212, 42,133,249,214,133,253,188,102,237,251,193,187, 65, 16,234,248, 55, 7,159,203,128,
+199,227, 32,226,216,230,202,214,179, 98,147,213,117,208,250,158,131,199,227,220,161, 77,228,246,149,227,147,181,249,241,155,173,
+ 61, 70,101,221, 61,119,135, 14, 29, 26, 52,105,210, 36,193,188, 25,147,206,158, 12,143,136,223,127, 98,211,192,146, 18,153, 15,
+ 33, 4,142, 14, 14, 25,161, 3, 59, 28,239,222,177,117,218,133, 11, 23,216,221,187,119,235, 25,134,185, 87,149,102,105, 35,149,
+255,219,133,243, 23,231,119,238,218, 13, 91,182,239,238, 26,251, 32,174,107, 98, 98, 2,124,234, 52, 64,189,250,254,208, 48, 78,
+184,120,249, 42, 84,178,252,223,172, 89,207,231,162, 90, 76, 73, 73,201, 31,161,161,161,189,175, 93,187,198, 9, 13, 13,213, 20,
+ 22, 22, 94,127, 42,138, 69,170,211,188,241,243, 59, 5, 0,126,171,211,117,236,190, 44,163,236, 83, 0, 75,125,235,248, 34,226,
+234, 13,220,184,118,115, 99,161,196,119,193,135,163, 63,152, 88,119, 16,119,252,160,246,117,185,238, 78, 18,252,190,105, 57,247,
+216,141,212, 21,169, 69,150, 45, 75, 47,207, 95,104,205, 49,122,114,227, 80, 26,209,177,177, 51, 76, 22, 2,150,148, 54,184,118,
+ 34,126,101, 13,239, 11,154, 60,131,240,195,201,147, 38, 37, 54, 11,110,241,217,232, 15, 38, 11, 90, 52,240,193,173,199, 50,128,
+ 97,224,236, 41, 69, 78, 78, 14,174, 28,216,100, 46,201,122,184,145,203,101,191,171,193,254, 68, 73,218, 29,191,167, 22, 39, 22,
+ 22, 22, 34, 34, 34, 2,229, 6,203,205,205,173, 50,163,245,140,102, 81, 94,246,245,133, 63,254,210,113,194,152,119, 48,160, 91,
+ 83, 92,190,157, 8, 67, 89,189,166,242,161,228,201, 55,126,182,249, 52,180,129,225,163,161,141, 20, 90,147, 77,234, 55, 41,242,
+ 43, 40,157,131,149,173,100, 61, 13,197,197,197,199, 30, 61,122,212,169,121,243,230,117, 79,157, 58, 85, 28,123,243,236,180,167,
+ 87,226,139, 47,190,176,221,176, 97,131,132, 16,114,221, 96, 48, 36, 89,181,237, 28,252, 30, 21, 25,233, 98, 52,177,184,122,243,
+110,227,158, 29, 91,128, 37,192,237,219,183,177,101,235, 22,221,189,152, 59, 63,169,243, 60,191,171,194,188, 84,184, 63, 45,175,
+ 54,234,240,137,102, 78, 86,234, 79,231, 78, 30,216,217,186,235, 64,140,154,250,221,119, 17, 39,119,207,111,217,121, 0,167,113,
+235,222,136,186,113, 17,231, 79,157,249,193,168, 42,158,143,234,115, 71, 42, 92, 79,161, 88,242, 73,147,150, 93,145,158,150,138,
+148,132,251,191,233,138, 31,103,167, 37,114,127,203,206, 76,155, 92,191,105, 71, 92, 59,187,103, 90, 21, 70,171,202,115,222,199,
+ 77,188,233,212,137, 99, 35, 50, 51,127,246, 84,107,117, 66, 66,136, 78,104,195,203,181,229, 40,247, 42,172, 94,207, 56, 99, 65,
+118,221,161,239,142,158,124,114,205,154,149,124, 15, 71, 9,114, 75,116, 80,104,141, 80,106,140,224, 48, 12,252,188,165,208, 40,
+139,113,249,192,143, 38,131,170, 36, 20, 72, 52, 86,166, 41,117, 15, 88, 84,242,248,226,212, 47,166, 92,130,141,131,143,119,189,
+ 30,179,171,140,214, 41,179,238, 12,252, 98,202,241, 0, 66, 72, 79,169,123,128, 82,157,255,104,110,101,219,206, 48,165,215,247,
+168,238, 62, 48,154, 75,235,143,153, 89,192,194,178,101, 81, 62,128, 60,233,207,103,170,217,118,134,221,123,242, 58,178,243,100,
+208, 26, 76,208, 27,204, 48,154, 44,224,112,185,112,116,114,132,127,189, 16, 56, 56,218, 35, 47, 55, 27, 55, 46, 28, 67,124,204,
+229,235, 12,193, 2,109, 65,194, 5,107,142,145, 64,236, 24,224,229,237,201,201, 81, 24, 32,182,225,226,206,229, 83, 70,147, 65,
+255,147,149, 38,235, 5, 77, 89, 81,241,138,207,102,124, 57,242,215,109,219, 61,131,234,219, 35,179, 80,139,204, 2, 29,148, 58,
+ 83,153, 17, 99,161, 87, 21, 34,230,226,246, 92,139, 78,185, 2,255, 17, 42, 53, 90,102,163, 78,121,240,204, 45,151, 89,243,127,
+228, 62, 78, 76, 50, 45,250,180,127,166, 86,165,232, 87,227, 72,214, 83,252,250,113,253, 61,111, 98, 35, 94,232, 46, 36, 44, 88,
+ 66,112,252,102,238,147,238, 66,182, 44,243, 50, 58,177,234,105, 4,159,158,187,176, 91,191,105,231, 98, 30, 41,119,105,181,121,
+ 14, 15, 31,255, 84, 2, 0, 92, 46,247,201,171, 60, 55, 75,167,211, 25,170,233, 66,217,177,121,243,230,153,147, 39, 79, 22,102,
+100,100, 32, 49, 49, 17, 50,153, 12, 34,145, 8,103,206,156, 49,129, 53,255, 20,115,237,112,202,163,168,240,111, 3, 90,245,174,
+ 29,212,190, 31, 36, 18, 41,120,196,250,100, 76,137,123,163, 17,173,186, 14, 90,215,115,200, 4,156, 63,188,153,220,190,124,108,
+138,182, 32,126, 83, 77,247,165, 76, 38,139, 5,144,240,211, 79, 63,181,216,178,101, 75,253, 25, 51,102, 36,237, 88, 55,127, 13,
+ 0, 20, 21, 21, 1, 0,162,163,163,201,148, 41, 83,244, 58,157, 46,185,164,164, 36, 10,213, 12,128, 0, 0,109,129,228,251, 45,
+235,151, 54,203,200,202,121,167, 65,179, 54,112,171,223, 6,158,126,109, 81,162, 52,226,214,227,108, 36,197, 93, 64,220,213, 3,
+167, 52,182,230,249,168, 97,125,227,230,205,155,251,112, 56,156,122, 42,149,202,179, 73,147, 38,205,165, 82,105,116,243,230,205,
+ 67,120, 60, 94,102,100,100,100,106, 77,180,210, 46,111,215,215,233, 58,118,117,154,210,174,123, 82,174, 38, 36, 77,105, 23,173,
+ 17, 58, 76, 47,184,184, 90,255, 43,183,214, 10, 98, 44,140,221,191, 93,113,240,247, 77,203,185,163, 39,126, 97,185, 47,119,250,
+148, 39,182, 57, 87,179,112, 53, 39,231,163,176,193,127,149,119, 40,139,100,149,253,110, 85,152, 94, 46,143,145, 3,152, 25,243,
+128,191,238,254,167,147, 22, 6,183,238,248,126,151,183, 67, 57,102,129, 45,206, 30,254,153, 36,199, 92,220,207, 35,150, 57, 90,
+ 43,102, 3,168,182, 59,200, 96,176,198,100,189,184,142, 25,210,110,251,119,111, 29,123,240,240,161, 37, 67, 6, 13,118, 89,255,
+205,123,248,241,151, 35,144,138,133, 32, 44,139,247,186,251, 12,255,118,124,224, 64, 31, 15, 81,173,131,151, 50,175, 76, 93,121,
+127,166, 70, 99,140,183, 34, 18, 67, 10, 11, 11,175,218,218,218, 22,116,234,212,169,157, 80, 40,100, 10, 11, 11,121,238,238,238,
+102, 7, 7, 7, 67,102,102,166, 70,175,215, 31, 4, 80,163,178,227, 70, 19,139,148, 60, 29,142, 30, 58,136,187, 55, 47, 32, 46,
+238,145, 50,238, 65,220, 90,134, 71, 86,170,243, 18,138,129, 26, 63,224,131,173,112,212, 33,169,241,168, 67,139, 94,249,251,142,
+141,139,122,104,116,250,177,205, 59,244, 71,221,198, 29, 57, 70,147, 5,247,110, 95,194,165, 3, 43,127, 52,170,138,103,189,202,
+ 49,246,174, 93,223,159,112,109,240, 71,196, 73, 16,150,221, 8, 0,132,101, 55, 70, 95, 59, 53,185,109,191,241,112,118,175,219,
+ 92,150, 30,205,224, 37,170,135, 11,120, 28,245,233,131,191, 30, 78, 73, 73,193,195,135, 15,241,248,241, 99, 20, 23, 23,227,247,
+223, 83,106,116,124, 52, 37,169,231,226, 31,112,250, 12,123,111,212,241,225, 35,198,136,234,251, 7,113, 2,106, 59,193,197,150,
+135, 71,143, 83, 17, 31, 25,195, 62,186,117, 74,103, 84,228, 15,209,150,164, 86,106,252, 36,174,141, 61, 0,203,172,242,185, 11,
+219,183,239, 24,240,229,226, 37,237, 92,220,220, 43,108,199,139, 10,242,109,190,154,122, 44,224,198,159,127, 88, 53,215, 33,107,
+177, 20, 77, 28, 27,202,114, 75, 39, 10,197,147, 56,117,217,222, 43,125,152, 42,125,159,176,230,106, 35,248, 31,188,211, 25,102,
+150,133, 90,107,132, 66,173,135, 92,169, 67, 78,126, 17,238,198,196,224,242,241, 99, 72,124,116, 55,217,100, 48,132,115, 56,204,
+ 1,109, 94,252,229,154,245, 52,241,234,187, 56, 59, 35,185, 88, 5,145, 13, 15,169,241,145,122,181, 66,190,235,101,207, 35,109,
+ 81, 66, 78, 62,151,233, 29, 26, 58,226, 76,143, 62,131, 28, 90,119,232, 37,113,181,119,132,128, 71,144,144,146,141,168,235,103,
+212, 73,119,175, 40, 76, 6, 85,223,215, 49,235,203,223,156,234, 71, 29, 26,245,234,129, 35, 7,119, 61,196,229,242,108, 88,214,
+172, 55, 26,244,195, 94,197,100,189, 41, 8,177,100,142, 29,249,206, 51,207, 6,102,150,136, 71,190,123, 86,251,244,179,130,201,
+ 66, 36, 35,223,189,174, 41,109, 64, 42, 79,236,243,242,114,238, 95, 62,119, 97, 90, 90,209,237,226, 98,253, 37, 0,153, 58,157,
+238,165,215, 49, 47, 47,111,225,226,197,139, 7,104, 52,154,192,110,221,186, 9,237,237,237, 81, 84, 84,132,240,240,112,211,137,
+ 19, 39, 30,228,231,231,127, 11,228,155,181, 8,249, 45, 70,119, 56,236, 81,100,248,183,129,173,250,212, 14,234,208,207,250,198,
+ 76, 40,158,208, 99,208, 56,230,252,145,205,228, 86,196,145,143,180, 5, 9,191,188,194,110, 53,234,116,186,155, 58,157,238,254,
+156, 57,115, 90,123,120,120,120,124,251,237,183, 34,133, 66,193, 95,191,126,189,174,176,176, 48, 87,161, 80,220, 64, 21,249, 52,
+ 47, 18,109,146,103, 97,232,233,131,155,187,147,131,155,223,114,116,173,213,219,193,173,118, 67, 89, 65, 86,178,188, 32, 59, 28,
+192,249,178, 66,145, 53,162, 69,139, 22, 13, 24,134, 9, 5,208, 76, 42,149,250,217,218,218, 10, 9, 33,129, 12,195,196,178, 44,
+ 27,211,164, 73,147, 19, 15, 30, 60,168, 81, 49,217,180,203,219,245, 62, 1, 29,119, 23,107, 88,129,129, 35,216,157,118,121,187,
+ 30, 0,242,207,125,169, 1,112,244, 65,183,153, 67,143,221, 72, 93, 19, 91,226, 48,173, 32, 98,201,177,154,174,179, 60,243,174,
+223,235, 58,255,117, 57, 15, 50, 1,140,141,137,196,242,123,209, 55,230, 49, 4,124, 11,204,139,180,249,143, 35, 95,135, 62,159,
+207,215,213,170, 85,171,194,209,133, 66,161, 80,167,215, 87, 21, 64,185,108, 86,229, 96, 11,208,117,251,161,125,219,199, 30, 57,
+118,116, 73,151,158, 67, 92, 68,181,107,163,158, 59,131,237,179, 90, 78,187, 16, 93,112,107,208,151, 87, 54, 36,101,235, 98, 80,
+195,124, 24,149, 74, 21, 15,160, 68,165, 82, 13, 38,132,100, 48, 12,227, 83, 82, 82,114,199,100, 50,221,171,177, 33, 96, 49,170,
+125,251, 54,191, 51, 12,195, 35,102,118,217, 13, 62,119,183, 46, 39, 46, 19,175, 56, 45, 73, 80, 61,123,124,254,237,234,150, 13,
+253, 26,181, 44,159,235,176,105, 93, 59, 76,154,185,188,101,221,250,254, 45,255,154,255,176,218, 52, 1, 98,210,148,124,120,104,
+235,178, 43,209,127, 94,250,218,213,171,110,221,220,204,164,184,140,199,119, 22, 90,116,138, 67,175,122,156, 83, 30,199,174,220,
+242,211,204, 25, 57, 89,201, 91, 52, 5, 9,247, 1, 64, 83,144,112, 63, 46, 10,223, 20,230,102,206, 40,202, 79,250,233,101,247,
+133, 90,173,206,222,181,107,151, 99,199,142, 29, 57, 30, 30, 30, 40, 40, 40,192,165, 75,151, 88,150,101,179,106,172, 85,156,124,
+ 73, 93,204, 56,255,246,203,186,101, 2,169, 93, 63,179,217,236, 77, 8,192,227,241,114, 12, 26,197, 25, 37, 71,250, 37, 74, 82,
+117, 85,223, 51, 88, 6, 0,167,124,238, 66,150,101,153,101,107,182,167,242, 69,118, 21, 22, 67, 52,233,148, 18,150,101,173,158,
+235, 80,150, 30,213,240,117, 93,223, 12, 33, 11,154,183,106,247,181,201,100,212,149, 93, 31, 58, 0, 58, 66, 80,196,225, 48,151,
+185,172,233,172,226, 21, 30,166, 24, 6,246,132,225,193, 78,204, 3, 3, 6, 42,121, 49,169, 73, 78, 86,133,134, 56, 63, 62, 86,
+147,223,181,206,105,195,190,176,139,231, 78, 53,148,119, 13, 0, 0, 32, 0, 73, 68, 65, 84,189,107,177, 88,234,149,197, 12, 82,
+244, 90,245,126, 85,142,211,111, 64,164, 25,255,126, 78,150,155, 45,230, 13,127,145, 85,221, 40,127, 39,205,128,250,226,193,181,
+107,121,132,165,164,230,223, 74,202,208,252,134,103,167,213,121,149,245,228,122,120,120,124,195, 48,204,251, 54, 54, 54,182, 6,
+131, 65, 77, 8,217,145,151,151,183, 16, 47, 76,254, 27,194, 23,187,107,195,108, 68,146,185, 70,157,250, 15, 77,126,252,168,234,
+182, 93,226,214,168,183, 72, 42,157,169,211,170,119,104,242,226,183,191,230,253,233, 32, 20, 10, 67,108,109,109,249,133,133,133,
+ 55, 1,200,255, 78,199,189,121,243,230,190, 28, 14,167, 30,203,178, 30, 0, 28, 80, 58, 42,164,144,199,227,101,149, 69,180, 72,
+ 77, 53, 59,125,176,223,181,231, 91, 77, 63, 15,191,242,104, 85, 89,183,226, 19,106, 13, 95, 33,122,191, 95,247, 47,126, 59,116,
+180,162, 81,135,255,184,115,254,255, 79,179, 43,207,214,171,112, 44,199,198, 97, 81,207, 0,157,166, 48, 59,107,202,213,123, 5,
+ 55, 1, 40, 95,101, 61, 5, 2,193,104,163,209, 40, 22, 8, 4, 90,163,209,184,235,239,178,237, 98,247,128,113, 28, 16,171,103,
+166, 96,193, 68, 62, 55,104,229,223,114, 46,113,131,130,130, 58, 11, 4, 2, 95,139,197, 34, 49, 24, 12, 26,173, 86,155,146,154,
+154,250, 7, 42,159,248,252,141,174,167,212,221,127,165, 64, 32,252, 20, 0,140, 70,253,106,117,126,194,231, 85,253, 99, 21,159,
+255, 71, 31, 35,215,122,173, 18,120, 92,190, 27,202, 10,115,179,102,115, 65, 94,242,109,255,255,225,122, 82, 94,242,224, 82, 77,
+170, 73, 53,169,230,243,112,232,254,164,154,255, 75, 77,145, 87, 99, 31,145, 87, 99,171,139, 46, 87,242,121,186, 63, 41,229, 76,
+172,224, 5,192,138,130,165, 20, 10,133,242, 6, 96,233, 46,160,252, 47,209,229,196,101,188,201,207, 83,254,115, 84,154, 19,205,
+ 84,225, 74,107, 18, 18,124, 25,103,123,158,106, 82, 77,170, 73, 53,169, 38,213,164,154,255, 57,205,234,180,255,137, 93,146, 19,
+159, 91, 62, 9,224,255, 37,225,159,134, 85,169, 38,213,164,154, 84,147,106, 82, 77,170,249, 95,227,137,241,226,208,125, 65,161,
+ 80, 40, 20, 10,133,242,102,160, 57, 90, 20, 10,133, 66,161, 80, 40,175, 70, 69, 93,135,212,104, 81, 40, 20, 10,133, 66,161,188,
+ 6, 42, 77,134,167, 93,135, 20, 10,133, 66,161, 80, 40,175, 70,121, 68,203, 11,207,149,119,160, 70,139, 66,161, 80, 40, 20, 10,
+229,245,144,131,138,162, 91, 39, 78,156, 32, 21,253, 78,161, 80, 40, 20, 10,133,242,255,193, 63,220,139, 60, 29,201,154, 88,182,
+ 12,224,169,136, 22, 53, 88, 20, 10,133, 66,161, 80,254, 46,102,235, 31, 70,121, 36,171,252,149,243,130,209, 26, 48, 96, 0, 67,
+205, 22,133, 66,161, 80, 40,148,255, 21,255, 70, 47,194,121,126, 3,233, 97,166, 80, 40, 20, 10,133,242,191, 52, 91,255,166,237,
+161,229, 29, 40, 20, 10,133, 66,161, 80, 94, 13, 47, 0,253,159, 90,254,127,155,130,135, 66,161, 80, 40, 20, 10,229,223,206,196,
+202,150,105, 68,139, 66,161, 80, 40, 20, 10,229,245,155, 45, 10,133, 66,161, 80, 40, 20,202, 63, 25, 58,179, 57,213,164,154, 84,
+147,106, 82, 77,170, 73, 53,255,237,148,215,209, 2, 42,171,163, 69,161, 80, 40, 20, 10,133, 66,121, 41,250,163,180,126,214,196,
+178,159,253,169,209,162, 80, 40, 20, 10,133, 66,121,189,188, 48,253, 14, 53, 90, 20, 10,133, 66,161, 80, 40,175,215, 96,109,162,
+ 70,139, 66,161, 80, 40, 20, 10,229, 13, 67,141, 22,133, 66,161, 80, 40, 20,202, 27,130, 65,229, 35, 7,206,215, 64,231,101, 70,
+ 31,156,167,154, 84,147,106, 82, 77,170, 73, 53,169,230,127, 78,179, 58,237,243,248,231, 81, 94, 25,254, 36,254, 74,132,223,244,
+255,241,197,116,232, 43,213,164,154, 84,147,106, 82, 77,170, 73, 53,255,237, 76,124,238,231, 19,104,215, 33,133, 66,161, 80, 40,
+ 20,202,235, 53, 91,116, 10, 30, 10,133, 66,161, 80, 40,148,215, 68,165,221,132, 52,162, 69,161, 80, 40, 20, 10,133,242,106, 84,
+ 58,169, 52, 53, 90, 20, 10,133, 66,161, 80, 40,111,198,112, 81,163, 69,161, 80, 40, 20, 10,133,242, 26, 77,214,196, 10,255,122,
+226,196, 9, 66,247, 17,133, 66,161, 80, 40,148,255, 21,255, 90, 47, 82,190, 97,212,108, 81, 40, 20, 10,133, 66,161, 94,164,198,
+120,225,175,209,134, 19,203,150, 1,208, 81,135, 20, 10,133, 66,161, 80, 40,175, 74,127, 60, 59,242,112, 98,249, 50, 53, 90, 20,
+ 10,133, 66,161, 80, 40,175,206,196, 42,255, 74,187, 13, 41, 20, 10,133, 66,161,252, 47,249, 55,122, 17,134, 30, 86, 10,133, 66,
+161, 80, 40,148, 87,162,162,104,214, 38,186, 91, 40, 20, 10,133, 66,161, 80,222,172,225,162, 80, 40, 20, 10,133, 66,161,188, 9,
+147,245,166, 11,150,210,153,205,169, 38,213,164,154, 84,147,106, 82, 77,170,249, 95, 49, 89, 79,151,120, 0, 64, 71, 29, 82, 40,
+ 20, 10,133, 66,161,188, 42,116, 82,105, 10,133, 66,161, 80, 40,148, 55, 4,157, 84,154, 66,161, 80, 40, 20, 10,229,255,217,112,
+ 81,163, 69,161, 80, 40, 20, 10,133,242, 26, 77,214, 51,102,139,230,104, 81, 40, 20, 10,133, 66,161,188, 26,149,230,104, 49,168,
+124,228,192,249, 26,124,193,203,140, 62, 56, 79, 53,169, 38,213,164,154, 84,147,106, 82,205,255,156,102,117,218,231,241,207,103,
+ 34,254,159, 10,150,210,161,175, 84,147,106, 82, 77,170, 73, 53,169, 38,213,252,175, 65,203, 59, 80, 40, 20, 10,133, 66,161,188,
+110, 99,245, 60,212,104, 81, 40, 20, 10,133, 66,161,188, 26,180,142, 22,133, 66,161, 80, 40, 20,202, 27,194, 11,165, 81,173,242,
+159, 33,212,104, 81, 40, 20, 10,133, 66,161,188, 30,250,163, 52,170, 85,254,147, 26, 45, 10,133, 66,161, 80, 40,148,215, 72,133,
+117,180, 24, 0, 56,113,226, 4, 41, 91,238, 54, 96,192,128,203,116, 95, 81, 40, 20, 10,133, 66,249,255,228,223,234, 69,158, 68,
+180, 6, 12, 24,192, 0,136,160,135,154, 66,161, 80, 40, 20,202,255,130,127,163, 23,225, 60,231, 36,187,209,195, 76,161, 80, 40,
+ 20, 10,229,127,193,191,209,139,240,158,115,145, 20, 10,133, 66,161, 80, 40,255, 19,254,193, 94,196, 11,165,137,240, 39,203,126,
+ 2,101, 37, 31,104, 29, 45, 10,133, 66,161, 80, 40,148, 87,163,124,180,225, 11, 83,239,208, 40, 22,133, 66,161, 80, 40, 20,202,
+171, 81, 81,101,248, 77,116,183, 80, 40, 20, 10,133, 66,161,188, 65,104, 68,139, 66,161, 80, 40, 20, 10,229,213,121, 58,170,245,
+255, 22,205,162, 51,155, 83, 77,170, 73, 53,169, 38,213,164,154, 84,243,191,100,178,158, 89,166,149,225, 41, 20, 10,133, 66,161,
+ 80,222, 16,116,212, 33,133, 66,161, 80, 40, 20,202,171, 81, 62,226,240,233,101,106,180, 40, 20, 10,133, 66,161, 80, 94,163,217,
+122, 1,218,117, 72,161, 80, 40, 20, 10,133,242,106, 76,172,236, 15,212,104, 81, 40, 20, 10,133, 66,161,188, 33,195,197,160,242,
+145, 3,231,107, 32,252, 50,163, 15,206, 83, 77,170, 73, 53,169, 38,213,164,154, 84,243, 63,167, 89,157,246,121,252,243,248,159,
+ 21, 44,165, 67, 95,169, 38,213,164,154, 84,147,106, 82, 77,170,249,159,133,118, 29, 82, 40, 20, 10,133, 66,161,252, 13,140,150,
+ 27,143,199,251, 90, 44, 22,111, 16,139,197,191,240,120,188,159, 0, 56,213,244, 11,165, 82,233, 52, 79, 79,207,135,158,158,158,
+153,190,190,190,167,236,236, 36,159, 53, 16,162, 11, 0,254,107,218,158, 0, 0,159,137,197,226, 56,145, 72,148, 10, 96, 39,128,
+207, 0,184,190,138,240, 66,111, 12,187,255,233,224, 35, 11,189, 49,236,185, 63,245,247,240,240,184, 10,160,247,235, 58, 40, 35,
+ 36,232, 53, 92,138,244,225, 82,164,143,144,188,252, 83,131,157,157,221,251, 94, 94, 94, 55, 92, 92, 92,178,188,188,188,174,139,
+ 68,162,225, 53,148,112,247,240,240,248,209,199,199, 39,222,219,219,123, 21, 74,103, 39,255,219,210, 89,136,206,237,132, 40,104,
+111, 3,101, 71, 27,108,104,111,131,183,222, 2, 36, 47, 41,215, 9,192, 1,123,123,251, 59, 60, 30,239, 4,128,161,101,231,215,
+ 80, 30,143,119,194,222,222,254, 14,128, 3,101,159,123,153,243,244, 71, 0, 89, 0,190, 47, 91,254,196,199,199, 71, 25, 28, 28,
+156, 26, 28, 28,252,171,159,159,223, 24,107,197, 36, 18,201, 91, 62, 62, 62, 7,125,125,125, 83,219,183,111, 95, 92,171, 86,173,
+ 71,181,107,215,222, 46, 20, 10,187,209, 38,142, 66,161, 80,254,254, 12, 4,176, 4,192,218,152,152,152, 40, 66, 72, 20, 33, 36,
+ 42, 38, 38, 38, 10,192, 6, 0, 75, 81,121, 8,241,153,247, 93, 92, 92, 22, 44, 90,180, 72,151,147,147, 67, 10, 10, 10, 72,124,
+124, 60, 89, 57,119, 38,219,199,153, 71, 26,184, 57,105,188,188,188, 18,235,212,174,189,167,169, 45,103, 38,128,134,214,104, 62,
+133,147, 88, 44,190, 57,119,238, 92,213,213,171, 87, 85, 6,131, 65,197,178,172, 42, 59, 59, 91,117,254,252,121, 85,199,142, 29,
+ 85, 0, 62, 7,192,173,129,230, 19,190,243,198,101,178,245, 27,242,157, 55, 46, 63,253,126, 96, 96,224, 3,150,101,201,176, 97,
+195,244, 0,106,213, 68,243,121,106, 1,162,166,246,112, 28,110,139, 60,243,246,133,132,172,159, 65,134, 75,145,254, 50,154,238,
+238,238, 71,167, 77,155,166,200,202,202, 34,122,189,158,164,167,167,147, 73,147, 38,201,221,221,221,119, 89,185,237, 46, 65, 65,
+ 65,121, 55,110,220, 96,101, 50, 25,137,136,136, 96,155, 53,107,150,103,165,217,234,245,220,186,108,242,246,246, 62, 85,147,151,
+187,187,251,150,154, 30,163,182, 66,164, 27,163, 46, 17,114, 59,156, 28, 27,214,158,172,108, 85,155, 12,117,182,145,117,178,193,
+ 39, 93, 43, 46,101, 82,153,230,187, 93,187,118, 85,223,187,119,207, 82, 84, 84, 68, 30, 60,120,192, 78,152, 48, 65, 7, 32,118,
+194,132, 9,186, 7, 15, 30,176, 69, 69, 69,228,222,189,123,150,174, 93,187,170, 1,140,175,193,122,114, 0,108,155, 63,127, 62,
+ 33,132,144, 69,139, 22,145,224,224, 96,210,163, 71, 15,162, 82,169, 8, 33, 36,149, 16,242,171,217,108, 30,107,141,166,131,131,
+195,251,211,166, 77, 83,105, 52, 26, 82, 14,203,178, 68, 38,147,145,181,107,215,170, 61, 61, 61, 79, 85,242,144, 65,187, 60,168,
+ 38,213,164,154,127, 55,205,127, 50, 94, 40,205,211, 42,127, 89, 29,152, 24, 57,115,230,204,114, 83,117,186, 83,167, 78,183,198,
+142, 29, 27, 53,118,236,216,168, 78,157, 58, 69, 0, 56, 27, 25, 25, 25,245,213, 87, 95, 69, 1, 24, 89,205,129,112,234,208,161,
+131, 44, 55, 55,151,248,251,251,147,186,117,235,146,220,220, 92, 66, 8, 33,183,223,109, 73, 46, 52, 6,201,184,114,154,132, 31,
+ 62, 64, 38,120,241, 72,103, 47, 7,147,151,167,103,145,171,171,235, 98, 60, 59, 39, 99, 69, 7,247,157,198,141, 27, 43, 99, 99,
+ 99, 85, 9, 9, 9,170, 5, 11, 22,168,122,244,232,161, 10, 10, 10, 82, 13, 29, 58, 84,181,102,205, 26,149,209,104, 84,109,217,
+178, 69,101,111,111, 31, 91,129,217,122,105,163,197,227,241, 86,199,196,196,144,196,196, 68, 82, 22,165,168, 76,211,193,209,209,
+177,175,147,147,211,231,142,142,142,125, 1, 56, 0,128, 63, 96,219,220, 1,190,159, 52,111, 16,120, 98,100,175,134,107,123,181,
+110, 57,220,142, 35, 51,173,155, 65,200, 48,223,151, 50, 90, 14, 14, 14,239,127,246,217,103, 74,189, 94, 79, 52, 26, 13, 81,169,
+ 84, 68,163,209, 16,165, 82, 73, 70,142, 28,169, 16,137, 68,239, 84,167,233,234,234,186,240,202,149, 43,230,220,220, 92,114,229,
+202, 21,114,234,212, 41,178,126,253,122,214,221,221,125, 69, 77, 47, 64, 79, 79,207,115,225,225,225, 81,209,209,209, 81, 55,111,
+222,140, 50,153, 76, 81, 70,163, 49,202,104, 52, 70,157, 56,113, 34,234,208,161, 67, 81,123,247,238,141, 50, 24, 12, 81, 6,131,
+ 33, 74,175,215, 71,213,175, 95,255, 76, 77,143, 81, 27, 33, 50, 12, 87,143, 17,178,226, 99, 34,255, 97, 10,145, 77,239, 71,242,
+ 39,117, 33, 27, 90,215, 38, 93,196, 56,142, 23,231,246,172, 80,147,207,231, 95, 78, 77, 77,101,103,207,158,109,104,210,164,137,
+252,195, 15, 63,212,233,245,122, 66, 8, 33,122,189,158,124,248,225,135,186, 38, 77,154,200,103,207,158,109, 72, 73, 73, 97,121,
+ 60,222,249, 26,172,231,210,114,147,117,249,242,101,242, 52, 42,149,138,244,232,209, 35, 53, 56, 56,248,215,122,245,234,141,170,
+ 78,211,214,214,118,240,172, 89,179, 84,164, 2, 76, 38, 19, 81, 42,149, 36, 37, 37,133,173, 91,183,110, 54, 0, 23,218,152, 83,
+ 77,170, 73, 53,169,209,122, 99, 76,172,102,185,226,157,248,213, 87, 95, 69, 17, 66,162,230,204,153, 19, 85, 22,217, 18, 0,176,
+ 45,123,241, 0,140,152, 53,107, 86, 20, 33, 36,106,230,204,153,229,159,169,236, 64, 12,220,191,127,191,113,213,170, 85,196,195,
+195,131,120,122,122,146,213,171, 87, 19,150,101, 73,238,137, 93,228, 66, 99,144,184,175,195, 8, 33,132,196, 47,158, 74, 46, 52,
+ 6, 73,218,248, 29, 25, 61,122,180, 70, 34,145,140,172,226,224, 58,183,108,217, 82,169,213,106, 85,219,183,111, 87, 73, 36,146,
+219, 0,154,160,180, 43,146, 41, 91,215, 49, 77,154, 52, 81,220,191,127, 95,181,123,247,110, 21,128, 5, 86,158, 48, 13, 1,116,
+151, 74,165, 67,103,213,226, 39,144,173,223,144, 89, 30,184, 7,160, 25, 0,183,178,207,120,207,156, 57,147, 16, 66,136,143,143,
+207,149, 74, 52, 29,130,130,130,102, 38, 36, 36,204, 51,153, 76,243,162,163,163,231, 53,106,212,104,246,160,250, 94,237,143,140,
+124, 43, 68,254,221,148, 16,178,124,122,208, 79,111,183,233,181, 39,180,219,200, 15,234,185, 94,253,208, 93,164,121,207,129,171,
+124,174,235,208,170, 19,187, 86,173, 90, 55,211,211,211,159,152, 43,165, 82, 73,178,178,178, 72,114,114, 50,185,122,245, 42,241,
+242,242,186, 80,157,166,167,167,231,131,244,244,116,178,113,229, 74, 50,172, 89, 32,233,226,104, 71,186, 58,217,145, 86,182, 34,
+117, 99,160, 85, 77,141,214,157, 59,119,162, 0, 68, 1,136, 42, 42, 42,138, 42, 42, 42,138, 42, 41, 41,121,242, 30,128, 40,185,
+ 92, 30, 37,151,203,163, 12, 6, 67, 84,131, 6, 13,106,108,180, 58,138,208,177,173, 8,197,237,133,208, 14,172,229,154, 61,165,
+190,171,229,207,145,237, 73,201,199, 61,200,170,144, 90,164,147, 13, 62,177, 82,115,160,141,141, 77, 4,128, 25,101,166, 60,172,
+111,223,190, 26, 66, 8,233,219,183,175, 6, 64, 88,217,251,159,149,153,172,190, 86,174, 39,199,207,207, 79, 93, 30,201, 2,240,
+135,159,159,159, 58, 56, 56,152, 4, 7, 7, 19, 31, 31, 31,101,153,182, 85, 13, 90,195,134, 13,227,181, 90,237, 19, 3, 40,147,
+201, 72,118,118, 54, 73, 74, 74, 34,177,177,177,228,246,237,219, 36, 53, 53,149,236,219,183,207,226,232,232,120,146, 54,230, 84,
+147,106, 82, 77,106,180,222,168,209,122,254,245, 44, 39, 78,156, 32,207,189,245, 67,100,100,100,212,172, 89,179,162,170,113,102,
+ 19,231,204,153, 83, 30,245, 90, 82,197,205,127, 75,124,124, 60, 9, 11, 11, 35, 1, 1, 1, 36, 32, 32,128,140, 29, 59,150,200,
+229,114,162,122,124,159, 92,104, 12,114,251,189, 86,132, 16, 66,148,113,209,228, 66, 99,144,168,209, 29,200,221,187,119, 73,237,
+218,181,195,171,248,254,227,215,175, 95, 47,216,181,107, 87, 46, 74,243,177,248, 0,218, 1, 88, 45, 22,139,183,161,180,187,176,
+ 46, 0, 39,127,127,255, 98,141, 70,163, 26, 54,108,152, 10,128,111, 21,154, 93, 3, 2, 2, 18,183,108,217, 66,242,243,243, 73,
+113,113, 49, 89,214,177, 17, 33, 91,191, 33,139, 90,213,101, 55,110,220,168,159, 49, 99,134,218,217,217,249, 4, 0,239, 97,195,
+134,153, 9, 33,164, 75,151, 46,121, 21,137, 57, 58, 58,246, 77, 72, 72,152,167,211,233,230,201,100,178,121,197,197,197,243,142,
+ 29, 57, 50,175, 79,179, 70, 97,242,239,166,132, 28, 25,249, 86,200,219,181,156,134,174,232,221,122,114,214,236,241,195,230,116,
+104, 18,167, 91,250,233,165,119,235,123,252,248, 50, 71,219,205,205, 45, 71,175,215, 19, 0, 47,188, 18, 19, 19,137,139,139, 75,
+122,117, 26,206,206,206,115, 62, 27, 17,106,121,167,110, 45,146,184,106, 46, 49,157,219, 77, 76,167,182,147,199, 63, 76, 39,131,
+ 60, 93, 21,237, 4,156, 89,214,174,143,167,167,231,185,155, 55,111, 62, 99,180, 74, 74, 74, 42, 52, 90, 10,133, 34,202, 96, 48,
+ 68,249,249,249,157,121,213,179,190,157, 13, 26,116, 21,115,111, 71,135,117, 38, 5, 83,122,144,190, 14,252,212, 87,144, 27, 1,
+ 32, 2,192,232, 26,254, 31, 7,192,210,114, 67,245,195, 15, 63, 16, 66, 8,241,243,243, 83,227,213, 6,163, 56, 4, 6, 6, 38,
+143, 31, 63,222,220,184,113,227,252,142, 29, 59,202,110,221,186, 69, 46, 95,190, 76, 78,157, 58, 69, 14, 28, 56, 64,238,223,191,
+ 79,178,178,178, 72,124,124, 60,233,223,191,191, 12, 64, 87,218, 22, 82, 40,148,191, 51, 21,120,145,127, 60,156,242, 13, 27, 48,
+ 96, 0,243,212, 6, 58, 0, 16,181,106,213,170, 96,233,210,165,203, 81, 90, 11,130, 9,226,226,221, 30, 98,222,221, 30, 98,222,
+221, 32, 46,222, 45,139, 24,109, 90,188,120,241,194,224,224,224, 28, 0, 98, 0,158, 21,125, 17, 33,164,179,139,139, 11,210,211,
+211,225,224,224, 0, 7, 7, 7,164,167,167,131, 16, 2, 51, 1, 76, 4,208, 27,141,208,106,181,208,177, 4, 90, 22, 80,168, 84,
+240,244,244,132,209,104,108, 80,201,250, 55,127,239,189,247, 26, 4, 5, 5, 21,124,245,213, 87,217, 40,205,149,217, 54,110,220,
+184,115,127,252,241, 71,144, 74,165, 42,142,141,141,213, 53,107,214,172, 47, 0,207,132,132,132,247,215,174, 93,139,176,176, 48,
+ 84,113,211,105,214,191,127,255, 83,247,239,223,111, 48,122,244,104, 68, 68, 68, 96,217,178,101, 40, 44, 44, 36, 0,160,215,235,
+137,197, 98, 49,118,232,208,193,184,106,213,170, 54, 93,186,116,185, 89,191,126,125, 46, 0, 36, 39, 39, 63,174, 72,144, 97,152,
+ 70,117,234,212,129, 94,175, 71, 65, 65, 1,238,223,191, 15, 59, 7, 7,196,100, 23,122,116, 91,177,177,232,235, 35,231,248, 35,
+218, 4, 57,127,254, 86, 71,253,247,225, 17,254, 77,188, 61, 60, 12, 70,147,103,124, 78, 94,246,203, 28, 84,129, 64,144, 94, 88,
+ 88, 8,131,193, 0,173, 86, 11,133, 66,129,162,162, 34, 20, 22, 22, 34, 59, 59, 27, 2,129, 32,177, 58, 13,251,226,226, 43,201,
+215, 47, 51,251,126,254, 1, 13,204,197,224, 29, 92, 13,222,209, 13,104,104, 40,192, 47,115, 39,217, 25, 92,220,230,219,219,217,
+149, 56, 58, 58,110, 2,224, 87,157, 94, 72, 72, 8,138,138,138, 80, 84, 84, 4, 23, 23, 23, 56, 57, 57,193,201,201, 9, 50,153,
+ 12,114,185, 28, 10,133, 2,254,254,254,104,222,188, 57,118,236,216,241, 90, 78,238, 63, 13, 72, 50,195, 50,229,220,163,108, 8,
+164, 82,212,119,178,173,211,218, 22,206, 85,252, 75, 15, 62,159,191,223,217,217, 57, 28,192,199, 0,164, 0, 62,118,118,118, 14,
+231,243,249, 67, 0, 44, 2,176,171,134,171,241,253,252,249,243,103, 38, 36, 36, 72,238,222,189,139,175,190,250, 10, 11, 22, 44,
+192,227,199,143,215, 1, 96,203, 62,243,145,139,139,203, 9, 14,135,179, 25, 64, 63, 0,125,189,188,188,122, 86,163, 59,100,198,
+140, 25,186,150, 45, 91,198,199,197,197, 13,185,126,253,122,171,233,211,167,203,211,210,210, 16, 31, 31, 15, 47, 47, 47,248,248,
+248, 64,165, 82,161,164,164, 4, 67,134, 12,113,176,183,183, 31, 73,155,113, 10,133,242,119, 54, 89,207,121,145,127, 90, 68,171,
+194,229, 10,159,168, 37, 18,201,252,168,168,168,246,193,193,193, 60, 0,251, 0, 32,136,139,225, 67, 58,180,216,118,100,211, 15,
+193,135, 86,205, 13,238, 19,236,191, 45,136,139,242, 81,108, 39, 90,181,106,229, 20, 21, 21,213, 65, 40, 20,126, 82,201, 74, 16,
+ 0,112,114,114,130,131,131, 3, 28, 29, 29,225,228,228, 4,150,101,161,210,232,160,182, 0, 74,157, 1,114,185, 28,202,178,101,
+149,222, 8,181, 90,253,228,127, 43,160,219,248,241,227, 11,214,174, 93,155,159,147,147,243, 3,128,102, 97, 97, 97,131,215,172,
+ 89,131,139, 23, 47,234,250, 5, 52,116, 89,220,185,197,194, 38, 57,143,231, 5,240, 49, 1,192,149, 43, 87,174,160, 67,135, 14,
+ 96, 24, 38,180, 34, 65,177, 88,188, 97,207,158, 61,226,216,216, 88, 52,108,216, 48, 54, 52, 52,244,221, 31,126,248,161,129, 84,
+ 85,124, 13, 0,204, 69,185,177, 83,167, 78,253,102,241,226,197, 5, 5, 5, 5, 70,141, 70,227, 62,104,208, 32,164,167,167, 35,
+ 43, 43,235,143, 74, 76,102,124,116,116, 52,145,203,229, 72, 74, 74, 66,116,116,180,248,155,111,190,105, 99,225,112, 6,103,194,
+238,131,176,142,173,218,140,110,215, 2,187,110,220, 21, 92,125,148,236,216,170,110, 45,167, 59, 25, 57,245, 76, 12, 18, 95,230,
+104, 43,149,202,213, 11, 23, 46, 84,169, 84, 42,100,102,102,226,222,189,123,136,139,139, 67,106,106, 42,150, 45, 91,166, 42, 46,
+ 46, 94, 83,157,134,183,136,247,197,143,211,199, 49,188, 7,127, 0,119, 47, 3, 26, 37,160, 85, 65,255, 48, 10,191, 62,204,197,
+250,131,135,109,210,210,211, 29,247,238,221, 59,222,215,215, 55, 10,128,127, 85,122,132,148, 30, 66, 14,135,243,188, 9, 5,135,
+195, 81, 2,200,149, 74,165, 25,118,118,118, 25, 28, 14, 39,151, 16,162,126, 45, 79, 18,102, 24,193,229, 2, 54, 98,112,248, 85,
+ 78,237,249,110,104,104,232,158,140,140,140, 62, 73, 73, 73,237,215,172, 89,179, 80, 36, 18,197,172, 89,179,102, 97, 82, 82, 82,
+251,140,140,140, 62,161,161,161,123, 0,140,169,201,247,251,249,249, 77,157, 55,111, 30,150, 45, 91,134,230,205,155,195,223,223,
+ 95, 51,127,254,252,213, 0,230, 2,248,196,207,207,239,218,212,169, 83, 63,204,207,207,247,204,204,204,108,190,110,221,186, 73,
+171, 87,175,110,157,157,157, 45,170, 70,186, 83,239,222,189,113,250,244,105, 0,200, 1,144, 84, 84, 84,100,206,206,206, 70, 96,
+ 96, 32,218,180,105, 3,149, 74, 5,149, 74, 5,153, 76,134, 58,117,234,128,101,217,246,180, 41,167, 80, 40,148,255, 87,195, 85,
+177,209, 18,137, 68, 78, 33, 33, 33,168, 95,191,190, 19,202, 70,107,185,216,240,102,127, 62,126,132,196, 54,234, 12,152,232, 11,
+ 8,237,220, 84,226, 98,195,155, 93,246, 47,188, 58,117,234, 8, 67, 66, 66, 32,149, 74,107, 85,242,229, 17,185,185,185, 8, 9,
+ 9,129,163,163, 35, 28, 28, 28, 16, 18, 18, 2,163,209, 8,185, 82, 9,181, 5,208,152, 88,200,229,114, 20, 23,228, 65, 99, 1,
+204,118, 46, 72, 77, 77, 5,151,203, 77,174, 68,211,171, 97,195,134, 5, 49, 49, 49, 5, 0,174, 0,152,188, 96,193, 2,204,154,
+ 53, 11,223,126,251,237, 30, 73, 78, 74,239, 61,167,143,186,252, 62,255, 35, 55,127, 27,102, 4, 0, 99, 70, 70, 6, 28, 29, 29,
+ 33,149, 74, 43, 52, 6, 93,186,116,105, 41,149, 74,177,125,251,118,146,153,153,217, 17,165, 67,248,147, 25,166,212,236,137, 57,
+144, 3, 88, 29, 21, 21,213,246,155,111,190,121,212,171, 87, 47,126,187,118,237,176,104,209, 34, 0, 56, 81,145,166, 76, 38,251,
+115,204,152, 49,134, 75,151, 46,225,225,195,135,210, 35, 71,142, 12, 95,180,104, 81,211,180,180, 52,225,241, 83,103,222,222,153,
+161, 24,254, 67,248, 85,209,226,179, 17,127,186,218, 75,155,212,115,117, 70,116, 90,150,192,194,197,173,234,142,104, 91, 62,119,
+124, 55, 17, 47,186,179,144,147,211, 77,196,139,106,205,231,142, 83, 42,149,123,143, 29, 59,118,118,250,244,233,170,252,252,124,
+216,217,217,161,168,168, 8,223,127,255,189, 42, 58, 58,250,160,193, 96, 56, 94,157,174,133, 37, 45,125,234,250, 2,137, 49, 79,
+222, 51,178, 4,183, 12, 2, 12,152,252, 41, 2, 2, 3, 97, 48, 24,208,172, 89, 51,102,193,130, 5, 82, 7, 7,135, 47,171, 53,
+ 61,156, 23, 78, 55, 51,195, 48,185,132,144, 44,149, 74,149, 41, 22,139,211, 4, 2, 65, 90,113,113,113, 38, 33, 36,239,117,248,
+ 44,194,193, 23, 29,154,249, 1, 66, 49,210,138, 84,217,183, 85, 40,174,232,131,118,118,118,227,214,175, 95, 47,218,186,117,171,
+105,234,212,169,250, 73,147, 38,241,181, 90,173,251,164, 73,147,248, 83,167, 78,213,111,221,186,213,180,126,253,122,145,173,173,
+237,208,151, 89, 17,147,201,132,152,152,152, 31, 30, 63,126, 44, 69,105,185,145, 79,231,207,159, 31,150,144,144, 32, 90,187,118,
+ 45, 14, 28, 56,128, 3, 7, 14, 96,240,224,193,152, 54,109, 26,230,205,155, 87,149,156, 36, 56, 56, 56,196,197,197, 5,151, 47,
+ 95,206, 6,144, 6,160,165,173,173,173,221,224,193,131,209,167, 79, 31,232,116, 58, 24,141,198, 39, 70,139,203,229,194,209,209,
+209,133,182,129, 20, 10,133,242,198, 77,214, 51,102,139, 7, 0,229,161,186, 1, 3, 6, 48, 85,221, 24, 45, 37,249,144,169, 53,
+ 72,149,107,144, 94,194, 62,243, 55,150,101,171,252,246,236,236,236,227, 55,110,220, 24, 23, 18, 18,194,203,206, 46,237, 17, 11,
+ 9, 9,129, 70,163, 65,246,221,155, 80,179,128,180, 97, 16,212,106, 53, 74,226,238,192, 54,184, 61, 92,250,143,198,138,181,107,
+245, 69, 69, 69, 63, 87,164,105, 99, 99,195,175, 93,187,118, 65,114,114,178, 25, 64,177,131,131, 67,111, 95, 95, 95, 68, 68, 68,
+ 0,192, 46, 2,252,136,232, 75,192,229, 67, 32,165, 33, 21,219, 58,117,234, 32, 63, 63, 31, 42,149, 42,162, 34,205, 27, 55,110,
+ 36,152, 76,166,102,131, 6, 13, 98,126,251,237,183,125, 10,133,226, 91, 0,247,244, 44,184,119, 51,242,160,182, 64, 4,224, 45,
+ 39, 39,167,207,230,205,155,215,115,234,212,169, 56,118,236, 24,194,195,195,141, 40,205, 5,187, 81,129,172, 60, 41, 41,233,151,
+ 25, 51,102,180,227,112, 56,147,207,157, 59,103,246,247,247, 87, 24,141, 70, 75,163,128, 0,206,183, 11,190, 19,124, 60,121,162,
+ 99,145, 6, 15,250, 52,242,234,192, 48,192,131,172,252,180,199, 42, 20, 85,181, 79,187,216,112, 79, 12,233, 24,220,101, 92,232,
+ 64, 91,105,195, 38, 80,223,191,233,249,203,254, 83, 43,196,209, 9, 3, 46,231,231, 15, 62,118,236,216,240,136,136,136,143, 13,
+ 6, 67,125,161, 80,152, 40,147,201, 86,169, 84,170,106, 77, 22,151,203,237,175,247,170,237, 36, 43, 46,134,168, 44, 18,165, 48,
+177, 40,212,155,241,208,209, 31, 35,107,251, 60,233, 6,205,205,205,133,167,167, 39, 99,177, 88, 6, 86,165, 25, 30, 30,142, 1,
+ 3, 6,148, 27, 79, 48, 12, 3,134, 97, 10, 3, 2, 2,242,132, 66, 97,145, 64, 32, 80,252,248,227,143, 58,157, 78, 7, 30,143,
+ 39,178, 88, 44,220, 87, 57,219,219, 72,224, 46, 36,204,134, 73,131,186,247,106,222, 36,144, 92,185,125,151, 41,209,232,126,173,
+ 34, 10,184,206,207,207,143, 87, 92, 92,124, 28,192, 67,147,201,244,251,190,125,251, 68,239,191,255,190,110,255,254,253,163, 0,
+ 52, 88,190,124,249,112,149, 74, 85,163, 41, 21, 30, 63,126,188,110,241,226,197, 51,231,204,153,131, 29, 59,118, 76,125,252,248,
+241,172,178, 72,215,224,121,243,230,225,199, 31,127,196,142, 29, 59,216,135, 15, 31,158, 98, 89,246,241,244,233,211,131, 61, 60,
+ 60, 10,115,114,114, 30, 87, 33,219,170,111,223,190,250,107,215,174,217, 40,149,202,171, 0, 62,155, 50,101,202,248,182,109,219,
+ 42, 66, 67, 67,109,139,139,139,101, 18,137,196,102,203,150, 45, 78, 60, 30, 15,106,181, 26, 12,195, 64,169, 84, 26,104, 59, 72,
+161, 80,254,174, 84,230, 69,254, 33, 84,122,111,224, 85,180,129, 26,141, 38, 47, 61, 61, 61, 48, 43, 43,203, 12,192, 12, 0, 69,
+ 6,243,146,197, 91, 14,109, 29,218,206, 79,154, 99, 50,225,200,237, 88, 77,145,193, 92,158,252,110,206,202,202, 82,166,165,165,
+217,105,181, 90, 85, 37,223,245,199,134, 13, 27,180,151, 46, 93,178, 75, 74, 74,130,197, 98, 65,203,150, 45, 17, 31, 31,143,146,
+135, 49,144, 6,182,132,180,235, 0,196, 70,221, 70,116,248,121,164,168, 12,230, 71,115, 23,203, 85,106,245, 60,163,209,120,164,
+ 34, 65, 62,159, 95, 12,128, 16, 66, 44, 0,160, 80, 40,238,169, 84,170,206, 30, 30, 30,120,240,224,129, 84,109,193,180,225,179,
+ 87,172, 33,132, 88, 4,165,163,185, 62, 15, 13, 13, 69,100,100, 36, 0, 68, 86,164,169, 80, 40,166, 78,152, 48,225,210,246,237,
+219,121, 73, 73, 73,125,182,110,221,218,231,209,163, 71,132, 41, 78,183, 92,211,240,209, 32,108, 90,235,141,117, 2,194, 7, 12,
+ 24, 0, 47, 47, 47,108,217,178, 5,171, 86,173, 50,125,244,209, 71, 9,171, 86,173,106,157,159,159,255,123, 37,219, 47,151,201,
+100,103, 92, 92, 92, 62,110,218,180,169, 82,173, 86,163,168,168, 8,217,217,217,112,118,113,225,152,193,233,224,230,232,248,251,
+241, 92,165,148,119,230, 79,220,204,204,169, 50,154,213,142,207, 29, 51,180, 75,139, 46,159,204,153,109,139,107, 71,192, 76,152,
+ 7,178,117, 33, 62, 29, 59,220, 78,167,255,189,171,250,110,234,251, 81, 10,197, 78,133, 66,113,160,134, 39, 75,223, 14, 29, 58,
+236, 89,188,120,177,248,235,101,139,177, 60,176, 22,204, 69, 69, 40,208, 91, 80,168, 55, 67, 81,242, 16, 15, 30,196,194,197,197,
+ 21, 41, 41, 41,208,233,116,136,139,139, 35, 92, 46,247,120,117, 17,157,114,158,234, 46,148, 9,133,194, 34, 62,159,159,199,227,
+241,138,147,146,146,212, 58,157, 14, 28, 14, 71,106,177, 88,196, 86,172,107,109, 87, 87,215,233, 40, 45, 38,122, 76, 89, 88,184,
+ 58,132, 15, 71,240,208,173,142,171,203,219,115, 39,189,239,234,235,237, 46, 75, 74, 72, 52,253,124,246,122,161, 78, 95,249, 96,
+ 13, 0, 39,138,139,139,159, 68, 36,247,239,223,255,233,254,253,251,199, 3,216,134,210,121,183,206,203,100,178,141, 47,113,241,
+205, 61,120,240,224,204, 57,115,230, 64, 44, 22, 63, 41,158, 42, 22,139, 69, 0,176,123,247,110, 60,120,240,160, 45,202,242,181,
+ 88,150,221,147,147,147, 83,157,102,131,160,160,160,164, 67,135, 14,217, 0,240,158, 50,101, 74,251, 53,107,214, 96,236,216,177,
+ 5,177,177,177,237, 0, 36, 3,104, 48,121,242,228, 91, 59,118,236,112, 98, 89, 22, 37, 37, 37, 48, 24, 12,201,180, 41,167, 80,
+ 40,212,108,189, 17, 66, 0, 68,163,180,126, 86,127, 0, 39, 81,154,214, 81, 41, 62,101,238,236, 44,128, 65,229,247,199, 74,146,
+225,129,210, 17, 89,103, 0,108, 6,224, 81,153,168,139,139,203,151, 97, 97, 97,166,204,204, 76,146,155,155, 75, 14, 28, 56, 64,
+ 62, 31, 23,102,121,171,161, 55,219,208,219, 67,237,230,230, 22,239,229,234,252,107, 11, 9, 62, 7, 80,219,138, 13, 11,123,244,
+232,209,196,176,176,176,113,101,223, 59,110,207,158, 61,170,115,231,206,169,184, 92,238, 9,148,150,118, 40, 55,148, 99, 6, 14,
+ 28,168,210,235,245,170,128,128,128, 98,148, 38,238, 87,198,240,110,221,186,149,156, 62,125,154, 88, 44,150, 23,106, 20, 21, 20,
+ 20,144,240,240,112,210,177, 99, 71, 25,128,247,123,246,236, 25,113,253,250,245,136, 78,157, 58, 29,172,110,133, 93, 93, 93,103,
+223,189,123, 55, 50, 53, 53, 53,234,228,201,147, 81,191,255,254,123,212,228,201,147,239, 5, 7, 7,107, 19, 18, 18, 88,179,217,
+ 76,238,222,185, 67, 2, 26, 53, 82, 3,168, 83,153, 78, 15, 49,239,150, 98,203, 66,162, 91, 52,150,232,134,248, 16, 0, 68,185,
+226, 75,146, 55,181, 23,137,255,248,109,210, 93,196,189,241, 50,103,138,179,179,243,217,200,200, 72,162, 84, 42,201,253,251,247,
+201,152, 1,125,200,141,241,189,200,153, 62,126,100, 71,215,122,100, 69,239, 96,210,167,107,103,178, 97,195, 6,114,232,208, 33,
+ 50,123,246,108,214,213,213, 85,137, 42,114,180, 60, 61, 61,207,237,219,183, 47, 10, 64, 20,151,203,141, 82, 40, 20, 81, 74,165,
+242,120, 70, 70,198,250,128,128,128,153, 77,155, 54, 29, 21, 24, 24,216,163,123,189, 58, 51,123,218, 9,227,123,217,139, 18, 27,
+217, 74, 86,224,197,186, 87, 79,112, 0,234, 52,108,208, 64,121,249,242,101, 86,175,215,147,171, 87,175,178,141, 27,249,235,150,
+191,215,247, 96,202,150,165, 7,117,167,127, 59,171, 57,186,233,250,254, 15, 6,196,116,147,112,126,107, 47,125, 82,142,227,101,
+ 25, 1,224, 8,254, 26,117, 24, 6,224, 40,170, 30,133,200, 1,176,109,209,162, 69, 79,143, 52, 4, 0, 78,112,112,112, 20, 33,
+ 36, 42, 56, 56, 56,170,166, 43, 34,145, 72,166, 31, 59,118,108,190,175,175,239,178,208,208,208, 45, 50,153,236,228,168, 81,163,
+ 98, 80, 58, 24,132, 65,233,236, 8, 3,107,215,174, 93, 16, 29, 29, 77, 34, 34, 34,200,176, 97,195,148, 2,129, 96, 52,109,198,
+ 41, 20, 10,229,141, 48,177,146,159, 85,178, 56, 38, 38,166,188,134,214,148,170,196,103,205,154, 21, 21, 25, 25, 25,133,210, 42,
+241, 85,194,227,241, 14,127,244,209, 71,196,195,195, 67,229,238,238,126,152,207,229,142,247, 17, 35, 4, 47, 55,212,189,243,206,
+157, 59, 7,175, 91,183,174, 63,128,182, 0,248,181,106,213,202,206,205,205, 85, 93,191,126, 93,213,177, 99, 71,149,171,171,107,
+126, 80, 80,144,106,249,242,229, 42,147,201,164,154, 62,125,186, 10, 47,214,251,170, 8, 17,128,143,109,108,108, 14, 55,110,220,
+ 56,102,238,160, 30,166,101,211,198,147, 48, 63, 55, 21,128,117, 0, 62, 2,224, 8,128, 63,124,248,240, 11,113,113,113,103,131,
+130,130,126,177, 66,215,187,105,211,166, 23,247,236,217, 19,121,232,208,161,168, 47,191,252, 50,210,197,197, 37, 51, 33, 33,129,
+213,233,116,164,164,164,132,200,100, 50,114,242,228, 73,139,179,179,243,218, 74, 55, 92,200,205, 33,225,187, 42, 44,225,144, 49,
+103, 52,233,104,195,201,122,153, 51, 69, 42,149, 22, 23, 21, 21,145,220,220, 92,146,148,148, 68, 14, 30, 60, 72,250,118,104, 67,
+246, 78, 30, 74,118,141, 27, 76,126,236,219,134,180,181, 19,169, 61,237,108, 35,237,236,236,242,173, 25,117,232,233,233,121, 78,
+175,215, 63, 41,223, 80,187,118,237,168,128,128,128, 67, 65, 65, 65, 43,142, 29, 59,246,233,202,149, 43, 7,119,175, 87,103,230,
+247,125, 58,104, 53,231,247, 19,229,190,117,100, 86, 75,127, 93,153,153,175,144, 90, 46,206, 59, 47, 71, 68,176,229,230,215,108,
+ 54,147, 35,135, 15,147,247,222,126, 43, 70,126,102,247,230,171,243,166,238,153,222,210,255, 72, 71, 17, 70, 84,101,216,158, 60,
+138,216,194,165,139, 61,103,125, 63, 95,231,156,206, 14,156,117,237,236,158,153, 94,234, 61,127,127,255, 36, 66, 72, 78, 96, 96,
+ 96, 18,128, 93,129,129,129, 79, 47,127, 80,137,236,147,226,164,243,231,207, 39,101,215, 7, 7,192,183,139, 23, 47,142, 34,132,
+ 68,249,249,249, 93, 3,128,230, 82,184,118,117,224,108, 30,212,192,163,168,171, 3,103,115,115,105,197, 83, 70,213, 17,160, 81,
+103, 55,201,213,193,126, 94,202,110,181, 28,174,236,250,117,235,178,126,253,250,109, 1,176, 22,192, 66, 23, 23,151,171, 35, 70,
+140,120,176, 99,199,142, 7,203,151, 47, 55,254, 31,123, 87, 30,214,196,181,190,223,153, 76,246, 4,194, 26,194,174,178,168, 32,
+168,184,111,184,224, 46,238,104,221,171,117,185, 86,175,214,214,218,186, 20,193,170, 85, 91,107,181,181, 85,107, 69, 69, 91, 20,
+113, 41,238,168, 21,173,187, 40,130,130, 32, 59,178,132, 45, 4, 66,246,100,126,127, 40, 92,106, 89,130,109,127,183,246,230,125,
+158, 60,132,228,204,155,115,102,206,153,121,207,119,190,243,125,105,105,105,244,156, 57,115, 20, 28, 14,231, 83,243,125,208, 12,
+ 51,204, 48,227, 47, 67,109,100,120,199,150, 8,173,209, 31,125,244,209,125,154,166,107, 99,105,205,104,160,204,152,213,171, 87,
+223,167,105,186, 54, 58,252,171, 1,204, 26, 10,104, 22,182,115,231, 78,154,195,225,124,255,154,141,169,207, 41, 25, 55,110, 92,
+ 79,185, 92,222,205,193,193,161,219, 75,203,149,171,157,157, 93,198,225,195,135,171,149, 74,101, 53, 77,211,213,122,189,190,250,
+222,189,123,213, 3, 6, 12,168,174, 55,235,111,174,158,191,193, 42, 9,174,223, 93,243, 14,189, 74,130,235,175,124, 53,125,223,
+190,125,103, 51, 51, 51,127,182,180,180, 92, 97, 34,167,171,189,189,125,168,141,141,205,121, 59, 59,187, 85, 54, 54, 54,133, 90,
+173,150,174,168,168,160,159, 62,125, 74,255,242,203, 47,244,205,155, 55,105, 27, 27,155,252,198,234, 25,196,163,110, 85,108, 89,
+ 68, 27,247,109,160, 53, 59, 86,210, 0,104,217,182,143,233,210,111,195,233,187,243,134,209, 3,184,140, 27,175,113, 62, 97,101,
+101,181,231,248,241,227,198,244,244,116, 58, 54, 54,150, 62,125,250, 52,189,100,201, 18,186,173,147,163,186, 39,155, 44,238,199,
+161,206,191, 78,192, 82,181, 90,125, 95, 46,151,223,175,174,174,190,239,227,227,115,191,123,155,137,145, 13, 0, 0, 32, 0, 73,
+ 68, 65, 84,247,238, 49, 61,123,246,252,242,232,209,163, 75, 55,110,220, 56, 54,200,130,243,180, 38,238, 40, 77,127, 56,130,166,
+ 23,245,165,159,205, 29, 64, 15,226, 81, 15, 27,229,116,112,200,175,141,214,174, 80, 40,232,248,248,120,250,242,229,203,180,196,
+206, 78, 30,200, 99,204,239,195, 65,255, 62,150,176, 50,181,158, 3, 69,100,196,173,111, 63, 51, 40,207, 30,164,127,156, 53, 66,
+ 63,192,138,220, 89,175, 92, 20, 77,211,133, 19, 39, 78,204,162,105,186,240,216,177, 99,121, 52, 77, 23, 78,152, 48, 33,139,166,
+233, 66, 0, 63, 53,196,249, 74,112,210,125, 47, 69,214,162,176,176,176,251, 52, 77,223, 15, 11, 11,187, 15,188, 8,162,218, 95,
+ 68,238,191,189,251,115,163,250,244,126,250,232,156, 81,134,254, 34,114,127,131,245,180,162,126, 78,216,183,141,214,156, 63, 68,
+ 31, 95, 50,205,208, 87, 98,121,213,219,219,251,243,165, 75,151,198,220,188,121,243,145,193, 96,120,156,145,145,241,248,235,175,
+191,126,220,171, 87,175,235,182,182,182,137,108, 54,251,221,230,174,209,159, 4, 51,167,153,211,204,105,230, 52,227, 85, 3, 83,
+ 19,223,253,188,121,243,102, 1, 77,211,239,135,132,132, 96,211,166, 77,147, 59,116,232, 48,197,217,217,217, 30, 0, 10, 10, 10,
+106,146,146,146,228, 33, 33, 33, 8, 13, 13,197,150, 45, 91,190,196, 11, 95,150,255, 79, 20,157, 56,113,194,101,241,226,197,210,
+141, 27, 55, 26,231,204,153,211, 30, 64, 82,105,105,105,219,105,211,166, 45,162, 40, 42,196,221,221,221,191,176,176,176, 68,169,
+ 84, 30, 2,176, 27,205,172,153, 54, 6, 14, 9, 67,215, 86,142, 56, 79,194, 80,239,227, 17,161,161,161,111, 77,152, 48, 65,187,
+109,219, 54,189, 92, 46, 63,101, 34, 93, 94, 73, 73,201,186,218,127,108,108,108, 36, 15, 31, 62,124, 87, 44, 22,147, 25, 25, 25,
+ 80,171,213, 72, 79, 79, 55,226,197,210, 84,131,168,214,211,219,191, 59,118,177,221,251,211,131, 45,107, 82, 30,128,197, 96, 64,
+199,100,163,232,214,121,236,139, 79,145, 43,180,216,241, 58,237,148,201,100, 95, 44, 89,178,100,218,138, 21, 43,184,238,238,238,
+196,141, 27, 55,112,228,200, 17,181, 84, 42, 29, 14,224,234,127, 66, 63,181, 12, 70,163, 17,108, 54, 27, 0,240,241,199, 31,131,
+ 36, 73,166, 84, 42,101, 19, 4,193, 33, 8,130, 79, 16, 4, 67,151,249, 24, 70,121, 5,138, 43,100,200, 43,150, 53,201,103, 48,
+ 26,143,220,190,125,123, 89,231,206,157,201,187,119,239,162,164,164, 4,233,233,233,180,129,166,127,138, 87, 26, 94, 56, 37,170,
+ 77,175, 31,223,198,118, 92, 39,107, 14,201,142, 8, 69,160,134,100,236, 50, 98, 34, 94,196,210, 2,128,125, 4, 65,176, 0,148,
+249,248,248, 12,124,242,228, 9,207,199,199, 71,153,146,146,114,150, 32, 8,103, 0,251, 27,226,228,241,120,165, 0, 74,143, 29,
+ 59, 6, 0,243,240,226,228,117, 89,187,118,109, 97,124,124, 60,194,194,194,138, 1,236, 4, 0,161,181,237, 24,127, 17,139, 96,
+ 31, 8, 67, 47, 53,200, 29, 70,186, 65,171,171, 80,236, 48,168,131,128, 4,243,135, 79,208, 77,210,142,100,235,181,126,225,225,
+225,241,213,213,213,234,168,168, 40,205,236,217,179, 25,105,105,105,119, 0, 92, 3,112, 12, 47,125, 44,205, 48,195, 12, 51,204,
+248, 75,241,170, 5,171, 89, 31,173, 87, 85,235, 38, 0,223,165,166,166,214, 37,149, 78, 77, 77,189, 15, 96, 23, 94, 68,131, 31,
+221, 2,197,187,230,165, 69,107,247,107, 54,230, 85, 78,110, 64, 64, 0,239,201,147, 39, 44, 52,156,196,145,120, 13,206,223,161,
+161, 92,135,222,222,222, 95,233,116,186,152, 93,187,118, 29,101, 48, 24,211,254,128,218,119,247,242,242,170, 56,124,248,176, 49,
+ 54, 54,150, 94,179,102,141,193,209,209,177, 2,191,247,209,250, 13,103, 32,155, 17,189,188,189,179,252,222,140,190,244,179,165,
+ 99,232,107,211, 7,208,243,157,133,242, 64, 46,227,200, 31,156,149,120,137, 68,162,125, 60, 30, 79,110,105,105,121, 17, 64,239,
+ 63,114,141,108,109,109, 15, 74, 36,146,139,245, 95, 14, 14, 14, 49,246,246,246,223,216,217,217,173,177,178,178, 90,224,193,101,
+111, 91,218,214, 73,149, 56,206,135,142,235, 99, 79, 79,183, 99,191,186,116,248,106, 61, 29, 61, 60, 60,202, 34, 35, 35,141, 63,
+255,252, 51,189,114,229, 74, 99,171, 86,173,228,104,194,175,173, 73,139,150, 21,227, 72,244,132,158,198,226, 81,206,244,166,246,
+ 22,198,129,214,140,198,118, 40, 78,127, 41,128,103, 53,199,233,233,233,185,139,166,233,136,245,235,215, 71,224, 63,185, 64,135,
+132,135,135,175,165,105,122,109,120,120,248, 90, 0,195, 0, 32, 80, 68, 70, 30, 26,219,213, 80, 48,210,137,254,172,189,208, 16,
+ 40, 34, 35, 27,180,100,218, 80, 39, 78,206, 29,101, 44,156,219,135, 14,245, 18, 24,122,218,112, 46,177,217,236,165,120, 97,113,
+238, 14,128,109,158, 53,155, 57,205,156,102, 78,179, 69,235,111, 39,188, 76,130,196,198,198,102, 95,155, 54,109,142,186,187,187,
+ 31, 21, 10,133, 95,226,133,211,124, 75, 47,132,199,134, 13, 27,228, 34,145,168,211,159,120,113,197, 0,156,241,251,196,185,127,
+ 90,135, 89,231,136,197,105, 43, 38, 63, 92,231,136,197,245, 62,238,222,190,125,251,207,240, 34,154,247, 31,237,132,238, 54, 54,
+ 54, 95,219,216,216,228,191,244,205,114, 55,133,179, 43,131, 49,109, 32,151,113,163, 55,155, 44, 26,200,165,126,237,198, 96, 76,
+125, 67, 7, 96, 83,155, 45, 26,227,116,177,179,179,219,102, 99, 99, 83, 96,103,103,247,117, 11, 69,214,111, 56, 59,241,224, 56,
+200,138,113,162,183, 5,161, 24, 36, 98, 28,235,202,111,124, 83, 71, 11,218, 30, 16, 22, 22,246, 54, 77,211,111, 59, 57, 57,133,
+212, 19,254,254,161,161,161,193, 52, 77, 7,215, 70,128,239,206,135,120,128, 21,227,112, 31, 75, 66, 54,192,138,113,184, 59, 31,
+226,198,234, 57,208,138,113,164,143, 37, 33, 11,180, 36, 15,187,113,208,202,124, 51, 55,115,154, 57,205,156,102,161,245,207, 16,
+ 90,230, 14, 99,230, 52,115,154, 57,205,156,102, 78, 51,167,153,211, 44,180, 26, 22, 86,245, 95,117, 43,108,148,249,220,152, 97,
+134, 25,102,152, 97,134, 25,102,252, 33, 52, 26,176,148,104, 66,149,182,196,177,253,117,148,109,156,153,211,204,105,230, 52,115,
+154, 57,205,156,102,206,255, 57,206,230,184,255,191, 55,214,189,209, 48,155, 85,205,156,102, 78, 51,167,153,211,204,105,230, 52,
+115,254,207,130, 52,159, 2, 51,204, 48,195, 12, 51,204, 48,195,140, 63,132,128,151,127, 95, 13, 92,218,176,143, 22,213,125,125,
+177, 94,175, 23, 3, 0, 69, 81, 82,221,157, 53,142, 77,177, 51,129, 32,253,139,244, 59,160,128,121,122,224, 98, 3,156, 23,245,
+122,189,245, 75,206, 10,221,157, 53,195,154,228,236,190,254,124,253,242,250, 59,107,134,188, 90,134, 6, 24,204,238,235, 11, 94,
+169,171,147,169,103,133,192,111, 98, 98,253,101,245,124, 83, 56,255,151,193,236,177,190, 88,167,123,209,143,152, 76, 74,170,189,
+221,116, 63, 98,245, 88, 95, 80,191,188,238,246, 26,135,166, 56,249, 60, 78,153,167,179,253,151, 77,113,102, 20,148,190,175,168,
+ 81,217, 54,197,217,210,177,233,234,232, 24,100,120, 57, 54, 25,192,188,252,194,194,139,127,179,190,212, 21,192, 26, 0,150,245,
+ 62, 75, 4,240,158,185, 87,154, 97,134, 25,111,152,208, 74,192,139, 60,135,123, 94,138,173, 61,141, 10, 45,189, 94, 47,190,127,
+124, 45, 20,106, 32,104,230,122,177,199,184,221,191, 75,148,172, 87, 85,176,101,201, 81,254, 12,157,220,218,158,210, 90, 22, 20,
+ 20, 16, 0, 64, 16,196,247, 0,220, 26,224,180,190,127,124, 45,106, 52, 64,224,148,112,107, 55,192,178,132,197,250,128, 39, 16,
+ 12, 84, 42,149, 29, 0,128,199,227, 37, 43, 21,138, 43,246, 90,237,214, 87,203, 55,214,178,250,117, 29, 52, 99,189,184,253,184,
+221, 75, 12, 70, 35,251,249,221, 93,129,170,210, 52,138,169, 87,239, 92, 5,156, 93,219,128,168,106,132,239, 63,191, 59,105,165,
+ 45, 19, 24,196,230,114, 59, 89, 89, 91,247, 51,210,180,143,209,104, 36, 12,122,253, 99,121,101,229, 53,163, 94,255, 80,175, 81,
+216,222, 63,245,153,177,169,122,190,218,150, 73, 0,117, 28, 8, 17, 8,133, 3, 25, 76,102,111, 0, 48,232,116, 55, 20,213,213,
+ 87,198, 3,209,166,180,221,212,243,243,186,229,255,215,160,211,233,197,153,231,215, 66,173, 3, 2, 38,126, 38,238, 56,237,192,
+ 97, 0,208, 72, 31, 58, 84,167,157,234, 1, 0, 2,207,224,219, 28, 73, 64, 49, 0, 80, 57,133,226,167,177,171,161,214, 1, 62,
+193,225,226,230, 56,103,135, 30,177, 93, 49,127, 2, 7, 0, 46, 28,251,166,237,229,152,239, 70, 0,192,160, 9, 11,207, 14,157,
+184,248, 41, 0,108,217, 19, 99,251,211,103,147,155,228, 52,109,108, 86,178, 42,211, 98,189, 52,242, 66, 43, 87, 1, 37, 73, 75,
+ 75, 35, 1,192,201,201,201,164,177,233, 2,136, 10,129, 69, 36,131,209,207,211,203, 43, 0, 0,157,241,236, 89,130, 65,175,191,
+238, 8,236,252,147,251,210, 18,154,254,109,112, 86,130, 32,204, 29,210, 12, 51,204,120,211,112,250,165,184, 58,253,187,201,108,
+ 99, 71, 40,212,192,213,116,160,127,207,142,152, 63,109,164,176,254,119,209,187,195,221,210,238,158,108,255,195,129,173,100,199,
+142, 29,145,153,153,105, 82, 45,106, 52,192, 47,105, 0,100, 79, 44, 42, 4,130,103,219, 62,255,220,114,200,144, 33,148,147,147,
+ 19, 8,130, 64, 81, 81, 81,207,184,184,184,174,203,150, 45,251, 23,100, 79, 42,106, 52,168,250, 37,173,121,222,218,186,118,104,
+219, 10,107, 22, 79, 22, 1,192,170,153, 59,187,222, 77, 45,182,121,246,236, 89,208, 71, 31,125, 84,198,184,114,229, 59, 59, 32,
+162, 24,200, 51,165,158, 7,127,190,205, 21, 21,254,232, 49,125,241,226, 99, 94, 94, 94, 66,119,119,119,194,194,194, 2, 12, 6,
+ 3, 21, 21, 21,110, 73, 73, 73, 35,238,220,185,163,136,187,250, 61,251,222,157, 49, 25, 82,110, 15,149, 73,109, 87, 22,112, 47,
+ 88, 88, 36,207, 24, 63,222,101,242,228,201, 92, 79, 79, 79, 0,192,179,103,207,188,163,163,163,167, 28, 59,118, 44, 20,202, 2,
+125,141, 6,170,230,218, 94,199, 9,128, 11,244,182, 18,139,167, 51,152,204, 14,122,189,222,249,165,181,225,185, 65,167, 75,150,
+ 73,165,135, 94, 45,111,198,239,161,214, 1, 79, 10,129,193,253, 2, 48, 99,194, 96, 1, 0,124,244,214,134,158, 57, 89,233, 44,
+141, 70,131,182,237,124,250,124,250,217,151,231, 65,146,136,140,137,171, 43,111, 10,103,226,147, 76,172,253,116, 27, 10, 30, 69,
+247, 52, 84,166, 15,172,146, 87, 50, 0,192, 82, 36,154, 16, 29,245,227, 21, 39,255,144, 91,233,165, 90,147, 56,155, 26,155,231,
+162,190,118,204, 79,186,226,251,237,133,125, 76, 55, 55, 55, 60,122,244,168,101, 99,179, 50,213,194,232,232,248,120,235,135, 31,
+ 74, 2, 3, 3, 33, 20, 10, 65, 81, 20,244,122,253,224,235,215,175, 15, 94,187,118,237, 66, 84,166, 42, 76, 29,155, 38, 96, 43,
+ 65, 16, 3,103,207, 95,226, 56,114,108, 8, 38, 12,239,211,100, 97,173, 70,195, 96,177,217, 6,115,111, 53,195, 12, 51,254, 70,
+168,181, 94,213,223,121,184,167, 73,161, 69, 81,148,116,200,172,141,226,126, 61,252,112,247,225,211,202,236,220,194,234,218,239,
+202,147,163,219,142,237,227,236, 27, 31,127, 21,106,181, 26, 55,110,220,192,195,135, 15,145,149,149,133, 5, 11, 22,168, 95, 46,
+ 29, 54,196, 89, 17, 56, 37,220, 26,149,105, 66,111,118,106,235,184,148, 20,134, 74,165, 66,124,124, 60, 42, 42, 42,192,102,179,
+225,226,226,130,161, 67,135, 82, 41, 41, 41, 54, 65, 67,134,139, 2,135, 79,205,132,200,187,154,162,168,138,198,242,136, 80, 20,
+ 37, 13,154,185, 94,236,235,221, 10,207,178, 11, 42,215,124,246, 67,181,209, 72, 83, 25, 89, 57,218,171, 87,175, 34, 32, 32, 0,
+ 23, 47, 94,180, 45, 47, 47,255,100,231,206,157,107,152,155,191,221,174,211,148, 45, 71,227,124, 21,129, 83,194,173,109,165, 71,
+221, 47,159, 59,193, 74, 78, 78,102,237,218,181, 11,101,101,101, 96,179,217,176,178,178,130, 68, 34, 65,219,182,109,137, 85,171,
+ 86, 9,131,131,147,241,239,121, 33,238, 90,143,185,169,141,213,179,174,237,213, 57,124, 59,249, 5,207,152,211,167,201,190,125,
+251,254,102,218,222,166, 77, 27, 12, 27, 54,140, 59,125,250,116,207,201, 83,166, 25, 3, 71,205,126, 6,161,123, 77,179,156,138,
+ 60,158,109,205, 77,167,193, 83,166,156, 10, 15, 15,183,146, 72, 36, 16, 8, 4, 0,128,202,202, 74,151,236,236,236,158,161,161,
+161, 19,111, 39, 70, 81,129,193,121, 5, 16,184, 42,155, 58,159,255,171, 96, 50, 41,105,173, 21,201, 66,192,171,200,203, 47, 86,
+ 0,128, 70,163,129, 70,163,129, 90,173,198,187, 11, 23, 48,230, 77,236,238,229,222,111,201,131,172,231,197,229, 62,113,183,108,
+106,143,213, 53,195, 73,213,100,201,100,185,151,230,173,253,240, 67,137,131,195,127, 86, 4, 35, 15, 30,100,148,151,151, 15, 94,
+187,118,173, 47,205, 31, 32,243, 9, 14,183,106,138,179,169,177, 41,123,122,186,245,167,139,135,117,218,253, 89, 44, 12, 6, 3,
+110,222,188,137,248,248,120,124,249,229,151,244,217,179,103, 43, 45, 5,130,121,104,114,108,166, 90,244,117, 44,242,216,188,249,
+ 24,193,225,112,112,242,228, 73,164,164,164,128, 36, 73,116,236,216, 17, 51,102,204,192,224,193,131, 37,243,231, 47,160, 3,135,
+191,149, 1, 81,187,170, 63,216,151, 72, 0, 75, 86,174,221,236, 56,115,238, 34,108,249,116, 85,179, 66,203, 44,178,204, 48,195,
+140,191,177, 53,171,209, 16, 15,136,141,141,165, 95,190,250, 3, 0, 13,144,109,198,237,254,233,232, 61,227,233, 54,227,118,255,
+ 68, 3, 36, 13,144,150, 64,171,206,157, 59,235,100, 50, 25,125,231,206, 29,250,221,119,223, 85,108,223,190,253,202,233,211,167,
+163,245, 90,237, 94, 39, 71,199, 47,232, 70, 28,236,105,128,116, 7, 68,124, 62,191, 36, 55, 55,151, 62,115,230, 12, 29, 22, 22,
+ 70, 31, 58,116,136, 62,123,246, 44, 29, 23, 23, 71,159, 61,123,150,254,233,167,159,232,196,196, 68,250,233,211,167,180, 64, 32,
+ 40,113, 7, 68, 77,112, 50,104,128,209,118,220,174,229,199,238,234,194,219,141,219,189,140, 6, 24,214, 64,251,206,157, 59, 27,
+162,163,163,233,200,200, 72,250,192,129, 3,116, 98, 98, 34, 93, 90, 90, 74, 83, 28, 65, 73,237,113,141,213,147, 6, 72,103,103,
+231, 18,153, 76, 70,187,186,186,210,108, 54,155,118,112,112,160,219,182,109, 75,247,236,217,147, 30, 49, 98, 4, 61,109,218, 52,
+250,147, 79, 62,161,101, 50, 25,205,229,114,139,107,143,107,140, 51, 0,224, 9, 4,130,220,251,247,239,211,141, 65,169, 84,210,
+165,165,165,244,249,243,231,105,129, 64,144, 27, 0,240,154,226,228, 1, 93,252,253,253, 75, 74, 75, 75,105,173, 86, 75,231,230,
+230,210, 73, 73, 73,116, 74, 74, 10,157,155,155, 75, 43,149,202, 58,238,167, 79,159,210, 30, 30, 30, 37, 60,160, 11,109,222, 4,
+209,104, 95,122,245,229,230,224, 48, 66, 34,145, 40,143, 29, 59, 70, 63,127,254,156,222,191,127, 63, 77, 2, 27, 94, 45,215, 20,
+ 39, 27, 24,218,183,111, 95,195,205,155, 55,233, 7, 15, 30,208, 31,127,252, 49, 61,108,216, 48,122,248,240,225,244,218,181,107,
+233,252,252,124, 58, 63, 63,159, 30, 49, 98,132,129, 13, 12,109,174,127, 54, 52, 54, 69,128, 91,112,112,176, 82,171,213,210, 25,
+ 25, 25,116,135, 14, 29,242, 25,192,116, 1,224,219, 31,224, 52,215, 63,157, 1,107, 71, 71,199,194,155, 55,111,210, 49, 49, 49,
+180,187,187,123, 9, 3,152,109, 9,180,177, 4,218, 48,128,217,109,218,180, 41,185,121,243, 38, 93, 86, 86, 70,187,185,185, 21,
+ 58, 3,214,127,160, 47,145, 0,246,173, 92,187,153, 78,205, 87,208, 43,215,110,166, 1,228,210, 52, 77,163, 1, 31, 79, 51,204,
+ 48,227,159,143, 87,181,200, 63, 5,117, 55,201,224,224, 96, 2,192, 47, 77, 21, 86, 50, 24, 27,183,108,217, 66,169, 84, 42,252,
+240,195, 15, 85,147, 38, 78, 60,218,191, 95,191,140,214,238,238, 50,130, 36,155,205, 54, 92,194,225, 44,221,178,101,139,149, 70,
+163,193,189,123,247,208,181,107, 87, 72, 36, 18, 8,133, 66, 8,133, 66,136,197, 98,180,107,215, 14, 82,169, 20, 22, 22, 22, 88,
+177, 98,133,168,132,195, 89,218, 28,175,209, 72, 83, 0, 96, 48, 26,217, 44, 96,190, 71,183,110,247, 66, 67, 67, 73, 91, 91, 91,
+216,216,216, 64, 40, 20, 34, 37, 37, 5, 26,141, 6,124, 30,223,164, 32,173, 36, 73,146, 66,161, 16,151, 47, 95,198,146, 37, 75,
+208,187,119,111, 88, 89, 89,193,194,194, 2, 29, 58,116,192,208,161, 67, 49,111,222, 60,100,100,100,128, 48,193,169,228, 49, 69,
+ 45,154, 55,111,158, 56, 32, 32,160,193,239, 85, 42, 21,100, 50, 25, 74, 74, 74,224,226,226,130,144,144, 16,241, 99,138, 90,212,
+ 24,159, 45, 32,113,241,246, 62,117,231,206, 29, 59,129, 64,128,200,200, 72,156, 56,113, 2,231,206,157,195,153, 51,103, 16, 27,
+ 27,139,147, 39, 79,162,164,164, 4, 0,224,237,237,141, 35, 71,142,216, 9,197,226, 88, 91, 64, 98, 30,210,166, 33,167,184,248,
+ 66,135,162, 34,187,233,211,166, 93,171,174,174,198,244,233,211,177,113,211,166, 85, 76, 96,153, 41,199,183, 3, 68, 54,142,142,
+ 17,155, 55,111, 38,139,138,138, 48,126,252,248,210,173,155, 54,189,147,112,254,188,231,253,115,231, 60, 55,134,135,191,211,191,
+127,255,210,252,252,124, 28, 60,120,144,116,112,115,139,104, 7,136, 90, 90,207, 42, 96,201, 87, 95,125,197, 85,169, 84, 24, 50,
+100, 72,134, 49, 57,185,157, 30,248,177, 26, 72,249, 5,208, 54,119,124, 33,176,104,197,138, 21, 18, 14,135,131, 15, 62,248,160,
+180, 38, 39,199, 79, 15, 28,168, 4,178, 43,129,108, 61,112,160, 42, 51,211,111,230,204,153,165, 28, 14, 7,219,182,109,147, 20,
+254, 39,233,182,169,232, 10,224, 20,128,171, 0, 10,102,207, 95, 50, 59,160,123, 47, 28,220,187, 19,159,133,127, 20, 1, 96, 18,
+ 65, 16,135, 0, 44, 55,247, 60, 51,204,248,223,132, 41, 90,228,111,138, 70, 83,238, 80,245,149, 36,128, 1, 77,177, 88,219,218,
+118,245,243,243, 67,124,124, 60,252,253,253,239, 88, 89, 89,233, 89, 28, 14,152, 76, 38,104, 99,179, 58, 11, 60,129, 32,104,240,
+224,193,212,173, 91,183,224,225,225, 1, 30,143, 7, 38,147,249,155, 23,139,197,130,163,163, 35,228,114, 57,130,130,130,152, 59,
+118,236, 8,130, 90,253,105,179, 15,196,180, 36, 97,201,173,205,211,190,223, 31,209, 38, 48, 48, 16,149,149,114, 24,141, 70,240,
+249,124,104, 52, 26, 80, 20,245, 98, 9, 72, 71,203, 77, 57, 99, 6,131,193,192, 96, 48,224,225,225,129,141, 27, 55, 66,165, 82,
+129,197, 98, 1, 0,228,114, 57,100, 50, 25,146,146,146,144,157,157,141,151,179,240, 38, 97, 33, 18,141,156, 60,121,114,131, 9,
+127,213,106, 53, 42, 43, 43, 81, 89, 89, 9,153, 76, 6,149, 74,133, 94,189,122,177, 79,199,198,142, 68, 89,217,214, 6,143,225,
+114, 39, 30, 60,120, 80,204,102,179,161, 84, 42, 81, 85, 85,133,188,188, 60,228,228,228,168,164, 82,169,222,194,194,130,116,119,
+119, 39, 57, 28, 14,103,220,184,113,132, 92, 46, 7, 65, 16, 8, 14, 14,182, 61, 28, 25, 57, 25, 26,205,151,230, 33,109, 26, 46,
+ 0,234, 46, 26,205,232, 30,221,187, 95,190,115,247,110,192,210,165, 75,145,152,152,184,153, 31, 21,117,181, 6,120,216,212,177,
+ 25,192,162, 47,234, 9, 24, 58, 39,199, 95, 11,148,212, 43,146,237,158,153,121,110,230,204,153,143, 18, 19, 19,237,182,109,219,
+ 38,153, 52,126,252, 34, 0, 27, 90, 82, 71, 11,145,168,155,163,163, 35,206,158, 61,139,220,172,172,143,244,128,178, 69, 51, 46,
+ 6,163,111, 96, 96, 32, 78,158, 60,137,252,156,156,143,244,191,173,227,139,137, 18, 80, 66,101,100,124, 20, 17, 17,177,111,206,
+156, 57, 96, 80, 84, 95,232, 91,180,112,248, 59,199,247, 57, 11,150, 34, 98,207,142, 8, 0,115, 1, 24, 1,220, 49,247, 56, 51,
+204,248,223,182,106, 53,167, 69,222, 32,177,181,167,197, 22, 45,177, 88,236, 44, 20, 10, 81, 80, 80, 0,159,246,237,165, 28, 14,
+ 7,108, 38, 19, 92, 54,219,164, 26,212,212,212,248, 59, 57, 57,161,178,178, 18,118,118,118, 96,177, 88,117, 47, 54,155, 93,247,
+222,194,194, 2, 36, 73,194,205,205, 13, 53, 53, 53,254,205,242, 22, 39,137,163,118, 44,124,247,230,213,179,109,198,143,159, 0,
+107,107, 27,184,186,186, 64, 44, 22,131,199,227,193,213,213, 21,158,158,158,244,214,173, 91,193, 23,119, 52,233, 70, 94, 95, 60,
+ 81, 20, 5,131,193,128,226,226, 98,164,166,166, 34, 49, 49, 17, 55,111,222,196,131, 7, 15, 80, 85, 85, 5, 19,116, 22,106,148,
+202, 78, 20, 69, 53, 40,178,100, 50, 25,100, 50, 89,157,208, 42, 41, 41, 65,118,118, 54,170, 21,138,206, 77,136,222, 9,126,126,
+126, 12, 0,224,241,120,232,220,185, 51,118,239,222,173,255,249,196,137,183,124,111,222,180,113, 61,127,222,234,251, 93,187,222,
+ 10, 9, 9, 49,220,186,117, 11,114,185, 28, 79,158, 60,129,189,189, 61,197,230,114, 39,155,135,115,203,112, 31, 80,216, 85, 85,
+ 13,239,221,187,119,102,101,101, 37, 62,255,252,115,146,105, 97,177, 39,188,145, 37,190, 58, 48, 24,125, 2, 3, 3,113,234,212,
+ 41, 20,228,228,124,156,211,128,128,201, 1, 74,114, 51, 50, 62,142,136,136,192,208,161, 67, 65, 80, 84,159,150,214,175,103,207,
+158,126, 70,163, 17,143, 30, 61,130, 21,112,187,165,199,123,122,121, 5,212, 90,126, 5,192,181,198,202, 9,128,107, 9, 9, 9,
+224,241,120,240,241,245,237,210,194,159,217, 74, 16, 68,225,156, 5, 75, 17,115,238, 87, 0, 64,196,158, 29,197,245, 68,150, 25,
+102,152, 97,182,104,189,169, 22,173, 90, 97, 85,255,133,223, 8, 45, 19,197, 7, 0,128,201,100,130,205,225,128,205,102,191, 16,
+ 72, 28,142,201, 28, 4, 65,128,203,229,214, 9,171,250, 2,171,254,123, 62,159,111,146,128, 1,128,138,244,115,253,230,190, 51,
+135,205,225,112,160,209,168, 65,211, 52, 56, 28, 46,172,172,172,224,225,225, 1,185, 92,142,222,125,250,171,243,100,172, 88, 91,
+159,113,137,175,115,246,244,122, 61, 20, 10, 5, 42, 42, 42, 80, 94, 94, 14,185, 92, 14,165, 82,105,242, 86,116,163,209,200,200,
+203,203,195,143, 63,254,136,178,178, 50, 0, 47, 28,173,107,197, 85,237,223,204,204, 76, 68, 70, 70, 34, 43, 43,171, 69,215,167,
+ 95,191,126,136,141,141,101, 12, 8, 10,218,123,209,221,189,224,162,187,123,193,128,160,160,189,167, 78,157, 98, 56, 59, 59, 35,
+ 59, 59, 27,247,238,221, 67, 69, 69, 5,104,154, 54,239,159,127, 13, 60, 3, 42,106,202,203,231,172, 90,181,138, 22, 10,133,248,
+252,139, 47, 58,109, 0,166,154, 42, 96, 68, 77, 8, 24,209, 31, 19, 48,160,105, 26, 70,163, 17, 6,195,235,249,138, 19, 4, 65,
+ 48,153,204,150,134, 86,104, 73,225, 58,199,247, 21,159,108,196,153,147,209,181,159,167,153, 69,150, 25,102,152,241, 15, 64,163,
+142,240, 84, 61, 5, 89,247,183, 49, 20, 23, 23, 63, 87, 40, 20,109,220,221,221,145,159,159, 47,118,115,115,203, 97, 51,153, 96,
+177,217, 32,200,230, 53, 1,159,207,127, 84, 80, 80,208,199,217,217, 25,122,189,190, 78, 84,189,186,116, 88,107,165,121,240,224,
+ 1,248,124,254, 35,168,154,140,156, 0,131,166,162, 85,151, 46, 93,234, 44, 67, 86, 86, 86,176,178, 18,129,195,225, 98,245,234,
+213,198,109, 91,183,238,116, 27, 20, 94,249,246,178, 85,244,170, 13,123,255,212, 51,107,234,131,137,207,231, 63,114,117,117,237,
+ 37, 18,137, 16, 19, 19,131,236,236,108, 84, 84, 84,160,166,166, 6,106,181, 26, 53, 53, 53,208,104, 52,224,114,185,240,245,245,
+133,165,165, 37,226,226,226, 30, 65,173,110, 88, 92,150,149,197, 60,122,244,168, 87,247,238,221,235, 44, 42, 3, 7, 14, 36, 6,
+ 14, 28,104, 87,103, 69,171,169, 65,105,105, 41,238,220,185,131,184,184, 56, 16, 4,129,180,180, 52,131, 90,169,252,201, 60, 38,
+ 94, 15, 42,224, 6, 35, 34, 98,223,191,254,245,175,119,250,244,233, 3, 3, 48, 2, 64,228,127, 81,192, 0, 0,110,222,188,153,
+100, 48, 24,250,180,109,219, 22, 50,160, 7,128,147, 45, 18,145,233,233, 9,122,189, 62,168, 83,167, 78,136, 57,122,180, 31,128,
+236,134,202, 41,128,126, 1, 1, 1, 80, 42,149,120,242,248,241,253, 22,136,172,189, 43,215,110,158, 61,115,238, 34, 28,220,187,
+ 19, 17,123,118,228,237,219,189,221, 21, 38,248,143,153, 97,134, 25,255, 83,214,172,102,181,200,223, 20,243, 27, 19, 95, 84, 75,
+ 88, 42, 43, 42,238, 39, 36, 36,180,233,210,165, 11,246,238,221,219,189,119,175, 94,207, 89,108,182,158,205, 98,129, 52,225, 65,
+162, 84, 40, 46, 93,186,116,169,199,184,113,227,168, 91,183,110, 65, 34,145,212, 9,173,218,191, 20, 69,129,166,105,240,249,124,
+ 28, 63,126, 92,171, 84, 40, 46, 53,107, 45, 50, 24, 13,228, 75,161, 71,211, 52,100, 50, 25, 88, 44, 22,190,252,114, 27,190,222,
+186,117,154, 1,136,246, 22,216,127, 8,128,251, 95,123, 64,215,212, 92, 62,115,230, 76,215,208,208, 80,166,139,139, 11,100, 50,
+ 25, 42, 42, 42, 80, 86, 86, 6,185, 92, 14,185, 92,142,138,138, 10,200,100, 50,112,185, 92, 36, 38, 38,234, 84, 53, 53,151, 27,
+227,227,168, 84,199,102,205,154,181, 34, 33, 33,193,145,162, 40,232,116, 58, 24,141, 70, 24,141, 70,104,181, 90,164,167,167, 35,
+ 57, 57, 25, 41, 41, 41, 40, 47, 47, 7,147,201, 4,131,193,192,131, 7, 15, 42, 4, 58,221, 81,141,121, 76,191, 54,152, 64,204,
+245,235,215,223,153, 49, 99, 6,156, 92, 92,250, 35, 63,223, 36, 1,115,162, 9, 1, 83,249,122, 2,230, 63, 2,168,170,234,110,
+102,102,102,159, 1, 3, 6,192,209,197,101,179,111,126,254,197,199, 45,240,211, 50,232,245,215,174, 95,191, 30, 52,115,230, 76,
+236,221,187,119,179,125,102,230,185,146, 87,150, 57,237, 1,251,214,158,158,155,103,207,158,141, 11, 23, 46,192,160,215, 95,107,
+130,178,126,196,247, 86,179,231, 47,113,125,197,241,125, 55, 65, 16,139, 1,124,110,238, 81,102,152, 97,198, 63,217,162,213,162,
+165, 67,158,193,176,114,249,242,229, 58,146, 36, 49, 97,194, 4,139,147,167, 78,133, 60,120,248,208, 67, 42,149, 90, 25, 12,134,
+102,185,236,213,234,237,203,151, 47,151,105, 52, 26,180,107,215, 14,229,229,229, 48, 24, 12,160, 40, 10, 20, 69,129, 32, 8,144,
+ 36, 9,161, 80,136,132,132, 4,236,219,183, 79,110,175, 86,111,111,246, 33, 97, 48, 60,138,140,140, 4,131,193,160,185, 92, 46,
+ 8,130, 0, 69, 81,216,182,109,155,244,107, 32, 6, 0, 24, 36,169, 1, 0,146, 36, 76,245,222,109,118,221,146,205,102,195,248,
+ 98, 19, 64,179,101,173,213,234,175,182,108,217, 82,245,228,201, 19, 40, 20,138, 58,235, 91,117,117,117,157,115,189, 76, 38, 3,
+ 65, 16, 80, 40, 20, 56,117,234, 84,149,181, 90,253, 85, 99,124,101, 64, 81,126, 90,218,152,238,221,187,151,101,102,102,162,178,
+178, 18,143, 30, 61, 66, 92, 92, 28,142, 28, 57,130, 11, 23, 46, 32, 61, 61, 29,122,189, 30,206,206,206,160,105, 26, 39, 78,156,
+168,212, 87, 85,141, 40, 3,138,204, 99,162,113,180,146, 72,130, 28,196,226, 92,123, 59,187,252, 86, 18, 73,208,171,223,139,128,
+167, 79,159, 62,133, 94,175,135,135,135,135, 77, 83,126, 90,180, 94,127,253,250,245,235,152, 57,115, 38, 92,219,180,217,228, 14,
+216,191, 90,198, 29,176,119,247,244,220, 84, 43, 96,104,189,254,122, 75,235,108, 1,236,248,240,195, 15,149, 44, 22, 11, 81, 81,
+ 81, 30, 58, 47,175, 20, 10,152, 42, 4,218, 15, 0, 88,205, 29,239, 8,236,252,228,147, 79,138, 8,130,192,161, 67,135,236, 68,
+158,158, 73, 20, 48, 75, 4,180, 18, 1,173, 40, 96,150,200,211, 51, 41, 42, 42,202, 78,175,215, 99,217,178,101, 69,142,192,206,
+ 38, 40,151,208, 52, 61,154,166,233, 64,154,166, 93,247,237,222,142, 51, 39,163,107, 69,214, 92,188,112,122,159, 1, 32,201,220,
+227,204, 48,195,140,127, 50, 26, 52, 67, 81,221,215, 23, 3,180,184,127,207,142,184,251, 48,181,210,206,218,242,124,237,119,229,
+201,209,109, 7,249, 91,118,252,246,219,111,193,100, 50,145,151,151,135,199,143, 31,195,210,210, 18,211,166, 77, 83, 43,171,170,
+198,212,203,117, 56, 24, 64,220, 75,206, 23,249,212, 42,211,132,158, 84, 98,155,115,103, 98, 25, 34,145, 8,213,213,213, 32, 73,
+ 18, 92, 46, 23,124, 62, 31, 60, 30, 15,247,238,221,195,168,209, 99, 13, 37,252,192,255, 4, 44,253, 79, 62,181, 58,206,218, 88,
+ 67, 61, 0,126, 2,240,129,216,201,105,249,154, 53,107,120,195,134, 13, 3,139,197,130, 75, 43,239, 34,143,225,159,239, 32, 73,
+ 66,159, 95, 38, 95,237,217,202, 73,244, 56, 45, 27, 0, 33,213,221, 89,227, 84, 47,215,225,239,234,233,166,185,234,113,252,192,
+ 86,203,206,157, 95,248,163,203,100, 50, 20, 23, 23, 67, 42,149, 66, 38,147, 65,161, 80, 0, 0, 98, 99, 99,113, 38, 62, 69,174,
+116, 9,201,104,172,158,255,105,123,170,133,147,246,118,235,195,145, 7, 24,246,246,246, 40, 46, 46, 70, 73, 73, 9,100, 50, 25,
+148, 74, 37, 12, 6, 3,202,203,203,241, 67,196, 1, 67,153, 48, 48,171, 46, 32,100, 83,156,138, 60,158, 77,245,175,206, 1,190,
+238,244, 59,239,188, 99, 97,105,105, 9,163,209,136,138,138, 10,228,230,230, 34, 51, 51, 19,241,241,241, 10,169, 76, 3,133,221,
+144,252,186,128,165, 13,112,254,137,120,227, 56,235,199,173,114,114,116, 44,200,201,201, 17, 27, 12, 6, 56, 59, 59,235,101,229,
+229,155,216,192, 5, 11,160, 16, 0, 93, 10,172,249,106,199,142, 57, 99,199,142, 69,183,110,221,242,138,138,139, 91, 55,212,151,
+104,128,209, 14, 16,213,184,184, 36,223,185,115, 71,146,155,155,139,153, 51,103,150,230, 60,123,246,113,173,191, 86, 37,208,207,
+221,211,115, 83, 84, 84,148, 93,155, 54,109,224,239,239, 95,196,205,205,237,144, 10, 84, 54,210, 63, 27, 29,155,178,167,167, 91,
+ 47, 28,239,215,237,221,119,223,133, 94,175, 71,124,124, 60,110,223,190,141,156,156, 28,252,250,235,175, 50, 75,129,224,173,122,
+185, 14, 27,236,159, 35,188, 21, 30,135, 14, 69, 18, 44, 22, 11, 17, 17, 17, 72, 72, 72, 0, 0, 4, 4, 4, 96,246,236,217,208,
+235,245,152, 62,125, 6,125, 58,149,151,209, 84,255, 4,224, 7,224, 11,188, 16,121,221,104,154,230, 18, 4, 81, 0,192, 21, 45,
+243,201, 50,247, 79, 51,167,153,243,127,135,243, 31,137,102,115, 29,174,255, 14,162,223,166,249,152, 87, 16,189, 59,156,234,219,
+ 47,176,125,120,216, 90,178,123,247,238,112,117,117, 69, 64, 64, 0,114,115,115, 57, 86, 86, 86,205,229, 83,171, 14, 28, 62, 53,
+179, 99,199,142, 86, 31,127,252,177,104,232,208,161, 76, 87, 87, 87,208, 52,141,132,132, 4,196,196,196,104,247,238,221, 43,175,
+113, 24, 45,187,127,229,199,106, 83,242,169,221, 6,106, 0,172,115, 41, 40,216,179,104,225,194,181,157,187,116,121, 39, 44, 44,
+140, 20,242,121,204,141,171,231,114, 1, 96,253, 55, 71, 68, 99, 67,166,225, 43, 47,160,255,212,134,243,200,213,175,103,110,254,
+188,156,145,227,131,188, 62, 88, 60,199, 48,121,242,100,129,165,165, 37, 92, 93, 93, 97,109,109,141,140,140, 12,228,231,231,211,
+ 63,255,252,115,245,205, 7, 79,153, 39, 46,220,205,225,138, 28, 77,201, 75, 88, 21, 56,108, 82,214,200,145, 35,173,103,205,154,
+101,209,181,107, 87, 38,135,195, 1,135,195, 65,113,113, 49,210,211,211,181, 63,255,252,115,117,141,120, 68,197,253, 43, 81, 85,
+ 38,230, 58, 84, 6, 78, 9, 79,191,118, 49,108, 89,242,163, 71, 51,140, 64, 39,173, 86,235,108, 48, 24, 8,146, 36, 11,141, 70,
+227, 35,109, 85,213, 62,117, 64,216, 54,115,174, 67,211, 96, 48, 24, 88, 6,131, 1, 50,153, 12, 23, 47, 94,164,158, 61,123,182,
+230,225,195,135,107, 10, 10, 10,160,211,233, 48,113,226, 68, 4, 4, 4,224,202,149, 43, 40, 41, 46,254,185, 41,174, 84,160,146,
+147,159, 63,123,222,188,121,103, 35, 35, 35,201,135, 15, 31,218, 69, 68, 68,252,208,144,128,153, 49, 99,134,177, 56, 55,119,182,
+ 26,168,108,162,127, 54, 53, 54, 75,207, 69,125,253,112,220,132, 16,223,176,208, 53,204,222,189,123,195,206,206, 14,253,250,245,
+131, 86,171,181,242,241,241,105,110,108, 86, 5, 14,127, 43,163, 83,167, 78,130,109,219,182, 73,230,204,153,131,197,139, 23, 3,
+ 0,148, 74, 37, 46, 92,184,128,101,203,150, 21,229, 82, 61, 20,205,245,207,151,150,170, 90, 1,118, 21, 64, 32,128, 12,152, 29,
+223,205, 48,195,140,127, 38,106,147, 74, 59,226, 69, 98,233,211,120, 49, 57,111, 62,215,225,181,219, 73,168,159,230,227, 5, 28,
+ 31,235,221,102, 61, 91,176,124,147, 63, 67, 39,183,102, 18, 42,203,180,167, 79,137,230,114, 30,214,229, 83, 19,121, 87,219,102,
+254,212,125,227,250,245, 75,191,250,234,171,160,218, 16, 14,124, 62,255,145, 82,161,184,100,175, 86,111,175, 17,121, 95,106,105,
+110,190,124,160, 24,192, 66,235,251,247,119, 4,143,157,184,133,107,227,193, 92,181, 97,175,138, 65,146,154,244,130, 18,124,229,
+ 5, 8, 76,216, 32, 89,163, 1,146,101,142,250, 98,219,144,212, 79, 62,252,240,131,245,235,214,117, 23, 10,133,253,181,122,189,
+183,209,104, 4,140,198,180, 26,133,226, 42,173,213,222, 81, 7,132,110,229,138, 28,105,147,243, 18, 90,249, 84,217,100, 69,119,
+223,191,111,223,146,163, 71,143,254,174,237,182,106,245,142, 26, 43,159, 56, 83,218, 94,191,140, 10,184, 1,169,244, 70, 83,166,
+ 75,115,174, 67, 19,103, 31, 70,227,124,107,107,235,131, 65, 65, 65,220,193,131, 7, 99,212,168, 81,232,221,187, 55,140, 70, 35,
+104,154, 70, 85, 85, 21,142, 28, 57,130, 45, 91,182,164,181, 6,214, 53,199,167, 6, 46,113,206,156, 25,209,169, 83,167,136,166,
+ 4,204, 75,145,213,172, 79, 98,211, 99,147,147,166, 23,141,201,158,178,104,163,151, 70, 94,104,101,203,215, 75,146,147, 30,145,
+166,143,205,118, 85,134,132, 35, 61, 38,142, 31,191,136, 65, 81,253, 94,238,128,164,159, 60,126,124,191, 54,169, 52, 2,102, 95,
+108, 97, 95,170,141, 93,103,118,124, 55,195, 12, 51,254,233, 66,107, 20, 94,248,107,213,165,228,105, 52,215, 97,173,213,135,162,
+ 40,105,198,137, 5,211,154, 98,103, 2, 65, 47, 45, 89,104, 54,215,225,203,247,217, 64, 21,212,234, 79,127, 19,140,180,222,238,
+ 66,230, 43,229, 91, 18, 22,177, 2, 72,133, 94, 29, 12,233, 99,224,212,194, 23,124,221,215,127, 84,191, 77,141, 62,100,127,243,
+187,172,114, 21,112, 13,213,213,215, 80, 93,221,160,211, 46,147, 98,149, 55, 87,207, 87,219,158, 11,200,255,104,219, 95,229,108,
+ 86, 60,252,129,243,249,191,134,231,165,165, 39, 0, 8, 93, 98, 99, 29,206,197,198, 78,254,224,253,247, 39, 58, 58, 57,121,218,
+217,217, 89, 91, 88, 88,144,183,110,221,202,212,171, 84, 59, 58, 3,251, 95, 90, 83,155,133, 26,184,212, 46, 55,183,195,164,241,
+227, 23, 17, 20,213,183,190,128,161,245,250, 95, 61,128,157, 77, 89,178, 94,119,108,186,114, 28,131, 94, 90,178,192, 0,230,153,
+210, 55,242, 95,212, 99, 3,244,250, 13, 72, 76,108,160,207,183,184, 47,173, 39, 8,162, 10,102,199,119, 51,204, 48,227,159,139,
+218,124,135,167,255,191,127,120,176,153,211,204,249, 15,226,100,224,197, 46, 58,243,249, 52,115,154, 57,205,156,102, 78, 51, 76,
+ 2,101, 62, 5,102,152, 97, 50, 12,248,207, 50,152, 25,102,152, 97,134, 25,102,212,162,214, 55,171, 62,246, 0, 47, 92,119, 26,
+ 83,165, 45,217, 77,240, 58,202, 54,206,204,105,230, 52,115,154, 57,205,156,255, 21, 78, 62,126,191,236,109, 62,159,102,206,255,
+ 47,206,230,184,223,196,221,140,181, 62, 89,117,190, 89,255, 95, 48,155, 85,205,156,102, 78, 51,167,153,211,204,105,230, 52,115,
+254,211,225,248, 82,100,213,127, 1,104, 97,192, 82, 51,204, 48,195,140,127, 42,194,194, 64,210, 52, 8,154, 14, 35,105,250, 40,
+131,166, 67, 24, 52,141, 63,148, 10, 36, 36,164,225, 96,182,255,158,102,109, 97, 62,227,102,152,241,143, 66, 33, 26, 73, 42,109,
+246,209,250,239,194, 77, 34,145,236, 6, 64, 20, 21, 21,205, 7,144,107, 62, 37,127, 63,216,216,216, 4,233,245,122,200,229,242,
+ 75,127, 22, 39,131,193, 32, 12, 6, 3,253,119,104,159,175, 39,198,211, 36,124,234, 62,160,145,251, 36, 29, 7, 27, 42,235,227,
+133,153, 32,254, 19,139,139, 48,226,201,227,103, 56,222,130,159, 35, 71, 12,118,221, 9, 0,103,227,242, 22,225,175,137,171,213,
+214,222,222,254,114,207,188, 0, 0, 32, 0, 73, 68, 65, 84,254, 60, 69, 81,148,193, 96, 88, 40,149, 74, 99, 27, 23, 66, 33, 12,
+ 0, 96,210, 87, 86,202,138,196, 31,191,247, 47,130, 89,163,222, 39, 83, 43, 21,149, 12, 38, 35,139,195,148, 92, 95, 48,135, 60,
+ 91, 81,221,235,113, 67,199, 71, 71, 71, 55,154,197,187,131, 23, 70,144, 6,223,209, 1,126,153, 25, 95,108,239,254, 85,127, 15,
+ 59,102,102,222, 3,225,230, 93,149,187,217, 86,238,163,103, 78, 38, 98, 41, 62, 49, 99,223,190,178,234,127,234,216,217, 8,144,
+ 58, 38,179, 29, 97, 52,122,128, 32,248, 4, 0,218,104, 52, 18, 36,153,201,213,235,159, 46, 7,170, 95,131,211, 70, 11,248, 51,
+ 57, 28, 87,131, 94,239, 64, 0, 52,131,162,138,117,106,117, 30, 11, 72, 92, 9,200,254,233,156, 44, 14,199,197,160,215, 59, 0,
+192,223,177,158,102,252, 22,141, 10, 45,161, 80,120,143, 36, 73,151,250,201,112,107,243, 9,214,126, 86,255, 59,130, 32, 96, 48,
+ 24,242, 43, 42, 42,186,182,224,247, 45, 1, 76, 6, 80,187, 69,253, 48,128, 35,120,125,135, 99, 75, 22,139,181, 92, 32, 16, 12,
+ 82, 42,149, 29, 0,128,199,227, 37, 43, 20,138,203, 90,173,246,139,215,228,165, 0, 76, 18, 10,133, 3, 73,146, 28, 72,211, 52,
+ 65,211,244,149,234,234,234,203, 0,142, 2,120,157, 72, 9, 60,177, 88,188,193,198,198,102,234,202,149, 43,203,108,109,109,219,
+ 45, 91,182,236,110,121,121,249,143,165,165,165,171,209,130, 28,117,127, 49, 60, 37, 18,201, 97, 38,147,201,200,203,203, 27, 8,
+ 0,174,174,174, 87, 52, 26,141, 65, 42,149, 78, 3,240,172,133,124, 2, 0, 61,133, 66, 97, 87,161, 80, 24,104, 48, 24,124, 94,
+230,103,124, 82, 93, 93, 29,175,213,106,239, 1,184, 5, 64,241, 55, 26, 35, 22, 20, 69, 69,190,236,235,222, 0,170,254, 12,210,
+191,139,200, 2, 0,154,132,207,227,228,148,118,117,194,171, 67,251,198, 11, 19,112,107,160,172,201, 66,107, 80,127,199,209, 99,
+198, 12, 33, 1, 64,163, 59, 59,250,242,213,194,147,127,114,115,218, 78,152, 48,225, 70,100,100,164,181, 90,173,198,252,249,243,
+ 15,199,197,197,237,148,203,229, 43,155,188,113, 8,173,151,125,190,237, 2,159, 32, 72, 0, 16, 27,141, 6,241,243,231,207,188,
+ 31, 39,221, 24,158,156,124,115,163, 50,229,242, 45, 35,193, 92,160, 69,191, 20, 83, 42,225,227,129,224,209, 19,199,143, 90,183,
+ 46, 12, 83,223,154,218, 42, 57, 89,197,115,182,204, 96,151, 43, 5, 94,182,246,226, 49,235,214, 71, 19,215,175,157, 24, 19, 25,
+ 17,126,121,206, 28,219, 65,255, 64,177, 69,172,101,179,221,116, 6,195,112, 18, 40,164, 44, 44, 50,192, 98,213, 0, 0,105, 48,
+ 48, 52,114,185,103, 13, 69, 77,255, 20,184,243,137, 94,255,192, 84,206,245, 20,213, 83,228,229, 21,248,214,137, 19, 16,186,186,
+ 82, 20,135, 67, 2,128, 94,173,118,173,206,203,115,140, 26, 51,166, 71,216,211,167,191,132, 1,183,205,156,255, 21, 78, 51, 90,
+ 34,180, 72,146,116,121,254,252,185, 88, 32, 16,188,184, 25,211, 52, 12, 6, 3, 12, 6, 67, 93,242, 98,154,166,235,254,234,245,
+122,180,111,223,222,164, 25, 45,128, 65, 0,222, 30, 48, 96, 64,200, 23, 95,124,193,244,247,247,175, 77, 25,210,111,213,170, 85,
+223, 36, 36, 36, 28, 3,176, 31, 47,130, 55,154, 58,227, 29, 38, 16, 8, 14,125,254,249,231,150, 67,134, 12,161,156,156,156, 64,
+ 16, 4,138,138,138,122,198,197,197,117, 93,182,108,217, 66,133, 66, 49, 29,192,249, 22,156, 31, 63, 11, 11,139,232,241,227,199,
+187,244,239,223,159,235,235,235, 11,131,193,128, 7, 15, 30,204,185,119,239,222,148, 99,199,142,173,173,170,170, 10,129,233,249,
+218, 8,161, 80, 56,203,210,210,114, 67,104,104,168,205,244,233,211,217, 73, 73, 73, 21, 30, 30, 30,196,245,235,215,237,143, 28,
+ 57,178,112,211,166, 77,147,228,114,249,234,234,234,234, 3, 48, 33,135,162,133,133,197, 61,146, 36, 93, 76, 17,194, 47, 31,240,
+166,138,225,206,173, 91,183, 62,114,237,218,181,214,217,217,217,134,113,227,198, 29, 4,128,203,151, 47,251,235,116, 58, 98,232,
+208,161,103,243,243,243, 39, 3, 48,245, 38,217,209,198,198,230,228,212,169, 83,109, 60, 61, 61,249,173, 91,183, 38, 4, 2, 1,
+ 24, 12, 6, 42, 43, 43,157,146,146,146, 6,223,190,125, 91, 25, 23, 23, 87,174, 86,171,199, 0, 72,108,193,117,234, 45, 22,139,
+103, 48,153, 76, 63,189, 94,239, 12, 0, 20, 69, 61,215,233,116, 73, 82,169, 52, 18,192,141,215, 29, 32, 14, 14, 14, 95,111,216,
+176,193, 78, 42,149,210,155, 54,109,250,186,170,170,106,150, 41,199, 69, 68, 68,144,179,103,207,254, 75,162,160,175, 91, 23,206,
+ 12, 13, 93,171,251,179,121, 15,255,120, 20,247,238,222, 6, 94,164,205, 33, 26,232,127, 4, 0,214,123,239,189,143,174,221,122,
+ 96,218,212, 73,205,114,142, 12,114,249,156,201,102,217,170, 84,170, 27,149, 53,234,163, 2, 62,119,242,212, 41,193,105, 0,112,
+246,220, 47,147,187,119,183,190, 34,226,115, 38,113,185,220,222, 58,141,182,236,204,165,252, 15, 91, 34,170,156,157,157,207, 91,
+ 91, 91,243,203,203,203,139, 74, 74, 74,190, 27, 61,122,244,250,253,251,247, 91,103,102,102, 34, 47, 47, 15, 75,151, 46, 21,230,
+231,231, 47, 74, 76, 76,188,169,209,104, 26,181,108, 85, 85,149,111, 95,245,241,216, 80,145,200,142, 33,224, 91,194, 66,100, 3,
+ 15,207, 78,232,217,123, 52, 70,140,122, 7,233,105, 9, 61,247, 71,172, 75,120,254, 60,238, 51,161, 77,155,245, 50, 89,235, 70,
+175,173,111, 91,244, 31, 51,254,133,200, 10, 13, 13,195,211,148,148,170,236, 44,242,223,167, 79, 80,252, 17, 65,237, 57,122, 77,
+ 81,246,245,107, 39, 90,247,237, 55, 14, 0,186, 70, 70,132, 95,254,247, 52,235,160,175, 15, 87, 84,253, 67,158, 43,196, 58, 38,
+211, 15,122,125, 91, 91, 71,199, 40,149,209, 72,235, 42, 43, 93,141, 53, 53,142, 0,160,103, 50, 53, 2,161,240,145,147,151, 87,
+252,211,251,247, 3, 63,165,168,126,159, 52,157,160,188,150,115,214,176,109,219,196, 1, 11, 23,178,170,179,178,180, 25,187,118,
+213, 20,199,199, 27, 40, 14,135,118, 29, 62,156,176, 31, 56,144,187,240,201, 19,214,175,155, 54, 5, 50,195,195, 61, 86,107,181,
+135,204,156,255,175,156,255,235,168,117,130,175,191,251,112, 79,147, 66,139, 32, 8, 8, 4, 2, 68, 69, 69,129,201,100,130,162,
+ 40, 48,153,204, 70,223,187,185,185,153, 82,145, 9, 18,137,228,155,157, 59,119, 58, 12, 27, 54, 12, 92, 46,183,238, 11, 6,131,
+129, 33, 67,134, 96,240,224,193,204,130,130,130, 41, 81, 81, 81, 83, 54,110,220, 88, 44,147,201, 22,227,101, 98,232, 38, 48,176,
+ 93,187,118, 49, 23, 46, 92,224,169, 84, 42,196,199,199,163,162,162, 2,108, 54, 27, 46, 46, 46, 24, 58,116, 40,149,146,146, 98,
+ 51,100,200,144,152,167, 79,159, 6, 3,184, 98, 66, 93,187,138,197,226,171, 71,143, 30,229,118,234,212,137, 72, 79, 79, 71, 64,
+ 64, 0, 0,160,178,178, 18,227,198,141,227, 78,159, 62,221,115,202,148, 41,183,164, 82,105,127, 0,247,154,225,235, 34,145, 72,
+ 14,140, 31, 63,222,105,227,198,141,150, 22, 22, 22,200,206,206, 46,148, 72, 36,222,181,231,123,202,148, 41,236,209,163, 71, 59,
+110,217,178,101,123,116,116,244,135, 82,169,116, 22,128,251, 77,170,214,151,130,152,207,231,163,184,184, 24,135, 15, 31,198,162,
+ 69,139,192, 96, 48, 32,149, 74,113,228,200, 17,252,251,223,255,174, 21, 52, 38,137, 97, 62,159, 63,216,203,203,235,135,203,151,
+ 47,187, 88, 89, 89,193,201,201,137,252,228,147, 79,252, 60, 60, 60,120,173, 90,181, 98, 20, 22, 22, 34, 38, 38,198, 99,198,140,
+ 25, 39,115,115,115,231,168,213,234,102,151,212, 28, 28, 28,246,157, 62,125,218, 45, 57, 57, 25,187,118,237, 66,121,121, 57,216,
+108, 54,172,172,172, 32,145, 72,224,237,237, 77,124,252,241,199,252,209,163, 71,243, 23, 47, 94,188, 79,163,209,116, 54,225, 26,
+117, 18,139,197,187, 7, 14, 28,232, 17, 30, 30,110, 37,145, 72, 80, 59, 49,168,172,172,116,201,206,206,238, 25, 26, 26, 26,114,
+239,222,189, 76,169, 84,186, 0,192,195, 22, 14,156,206,190,190,190,193,227,198,141, 99, 20, 22, 22, 34, 50, 50, 50,184,170,170,
+170,179, 41,226,146,162,168,191,204, 98,101,164,105, 14,128, 63, 93,104,221,187,123, 27,243,223, 93, 90,237,228,234,202,186,112,
+254,135, 9,209,199,219,222,181,226,189, 72, 72, 45, 83, 66, 27, 50,254,105,183,161,195,222, 97,141, 28, 53,174,122,207,183,219,
+133,166, 8, 45, 38,155,101,123,248,208,151,185,215,174,223,243,187, 24,119,123,248,132, 49, 99,104, 22,203,202, 3, 0, 62, 92,
+246, 30, 51,230,212,169,136, 33,131,123, 20,244,235,219, 53,119,218,244,247,221, 90, 80,221,182,109,219,182,253, 37, 33, 33,193,
+129,195,225,160,188,188,220,118,207,158, 61, 95,246,237,219,151,204,200,200, 64, 74, 74, 10,178,178,178, 80, 89, 89,137, 33, 67,
+134, 8,239,223,191,255, 29,128, 70,133,150,150, 28,180,193,169,149,110,135, 45, 79,208, 90,107,144,139,105, 93,161,239,197,211,
+ 23, 59,254, 20,169, 12,112,112,108,239,253,246,236,181, 88,183,254, 24,243,199,195,155, 67, 47,197,253, 4,144,173, 27,207, 8,
+ 64,163,247,170,213, 43, 33,175, 82, 99,250,212,121,152, 49,117,158, 45, 13,141, 35,109, 80, 9, 52,202, 10, 43, 11,214,147,216,
+157,123,191, 28, 15,192,165,158,216,186,244, 79, 17, 91,235, 88,172,214, 48, 26, 61,188,199,141, 59,145,113,238, 92, 27, 90,171,
+181, 99,176,217,249, 22, 54, 54,197,122,181,154,214,105,181, 44,165, 82,233,156,145,156,236,216,247,227,143, 47, 93,223,180,169,
+255,167, 12, 70,183, 79, 12,134,187,141,114, 82, 84,143,224,111,190,177,247,155, 59,151,243, 48, 60, 92, 81, 26, 31,175,244, 26,
+ 57,178, 34,224, 95,255, 82, 3, 64, 85, 86, 22,235,233,218,181,124,251,192, 64, 94,175,229,203,173, 13, 26,141,100,221,186,117,
+221, 67, 95, 36, 47,111, 17,167,219,228,201,134,208,136,136,110,241,239,191, 63,128,208,233, 24,195,123,245,122,176, 41, 50,242,
+249, 31,225,252, 51,235, 89,112,245,170,186,220,195, 3, 1,227,198,149,185,137,197,234, 63,179,237,127,164,158,102,212,161,214,
+ 87,107,126,253, 25, 42, 98, 99, 99,251, 3,248, 5, 64,120,112,112,112, 24, 0,136, 68,162, 98,153, 76, 38,142,137,137,105, 86,
+100, 49,153, 76, 56, 58, 58,194,219,219, 91, 42,149, 74, 29,154,168, 64,158,209,104,116,161,105,186,206,250,210, 24,212,106, 53,
+210,210,210,208,177, 99,199,124,188, 72, 68,219,168, 81,135,207,231,103,164,164,164,216, 61,126,252, 24,247,238,221,131,135,135,
+ 7,172,173,173,193,100, 50,161,211,233, 32,151,203,209,174, 93, 59,112, 56, 28,116,233,210,165, 84,161, 80,120, 52,179, 4,196,
+ 17, 8, 4,105, 87,175, 94,117, 13, 8, 8,192,157, 59,119,224,234,234, 10,137, 68, 2, 0,200,202,202,194,245,235,215, 49,114,
+228, 72, 36, 36, 36, 96,226,196,137,121, 10,133,194, 27,128,186, 49, 66, 27, 27,155,194,203,151, 47,231,251,251,251,171, 20, 10,
+ 5, 89, 92, 92,204,140,143,143,215, 87, 85, 85, 9, 43, 43, 43,153, 50,153,140, 41,151,203, 41,133, 66,193, 36, 73,146,165, 84,
+ 42,153,151, 46, 93, 98,104,181,218, 38, 3,100,214, 94,167, 83,167, 78,193,223,223, 31, 49, 49, 49,248,224,131, 15,240,235,175,
+191,194,213,213, 21, 71,143, 30,197,242,229,203,145,154,154, 10, 59, 59, 59,248,250,250, 54,119,141,224,233,233,153,254,232,209,
+ 35, 79, 22,139, 85,155,215,177, 54, 95, 30, 74, 74, 74,240,236,217, 51, 60,127,254, 28, 94, 94, 94,152, 58,117,234,179,231,207,
+159,123, 53,215,243,156,157,157, 75,146,147,147,237, 58,118,236,136,226,226, 98, 88, 89, 89, 65, 36, 18,193,202,202,170,238,189,
+135,135, 7,222,127,255,125, 72, 36, 18,169, 74,165,114,104, 78, 4,249,251,251,159,191,116,233,146,157,165,165, 37,138,138,138,
+ 32,151,203, 65, 81, 20,248,124, 62,236,236,236,234,132,124, 90, 90, 26, 70,141, 26, 85,154,145,145, 49,172, 5, 22, 56,210,193,
+193, 33, 37, 49, 49,209,155,166,105,228,230,230, 34, 53, 53, 21,239,190,251,110,154, 74,165,106,143,255, 98,206,190, 3,251, 15,
+112,102,189, 61, 75,253,103,241,213,243,187, 98,205,154, 61,159, 53,126,108,111,205,147,228, 88,130, 99, 76, 69,103, 63,203, 74,
+ 0,120,144, 36, 23,169,201,118,240,233, 16, 76, 31, 63,121,131,125, 96,255, 30, 38,140,112, 0,129,212, 39,105,248,180, 49,238,
+161, 3, 29,231,190,247,222, 28,191, 1,125,251,147, 85, 10,133,248,187,239,182,117,201,200,120, 34, 6, 0, 15, 15, 31,233,194,
+133,203,238, 91, 8, 4,210, 95,174, 95, 53,126,245,213,190,164, 11, 87, 10,247,154, 80,101, 15,111,111,239,155,167, 78,157,178,
+ 19,139,197, 16,137, 68, 80, 40, 20,208,106,181,120,252,248,177, 42, 42, 42, 74,103,105,105,105, 81, 84, 84, 4,153, 76, 6,130,
+ 32,112,234,212,169, 92, 0,238,175, 18,213,250,104, 1,192,187, 35,124,152,190,131,188,173, 89, 28, 61,143,199,124,234, 8,194,
+192, 33,104,161,195,217,243, 15, 58,158,189,120,103,218,248, 9, 31,216,247,235, 63, 30,161,107, 66,116, 5, 5,185, 1, 90,244,
+ 75,105,200, 71,171,189, 23, 6,141,155, 56,126,210,186,117, 97, 8, 11, 13, 71,236,169, 19,149, 66, 1,169,182,180, 98,138, 2,
+123,246, 81,189,191,104,108, 94,117,117,129,235,186, 45, 81, 83, 71,141,125,223,165,111,191,113,184,126,237, 4, 34, 35,194,239,
+ 17, 60,250,141, 94, 70, 92, 11,176, 72,138,122,199,169,117,235, 67,210,130, 2,103,190, 80,200, 92, 26, 23, 39, 54, 24, 12,119,
+ 39, 45, 95, 94,117,252,210,165,186, 9,200, 39, 36,233,196, 96, 48,156,188, 71,141, 74, 76,143,141,125,135,163,215,199,124, 4,
+148,188,202, 25, 6, 88, 91,121,120, 44, 88,146,150,198,122, 24, 22, 86,173, 47, 40,168,232,186,108, 89,105, 67,191,159,127,241,
+162,128,237,228,100,105, 61,102,140,205,118,119,119, 90, 39,149,238,110,200,199,168, 33,206, 56,161,208,234,167,179,103,131,104,
+ 38,179,255,138,143, 62,226, 5, 7, 7, 67, 46,151,227,216,177, 99,216,189,107,151,218,209,209,241,145, 83, 82, 82,130,159, 92,
+190,198, 84,206,174,203,150,149, 26, 12, 6, 98,210,242,229, 67,146,179,178, 6, 21, 73,165,173, 0,192,209,198, 38,175,171,135,
+199,189,125,177,177,169, 95,183,110,109, 52,181,158,223,159, 59,231, 16,157,157, 61,215,198,198,134, 87, 44,149, 82, 28, 54,187,
+172,167,175,239,209,111, 87,175,254, 69,159,152,200,226,186,184, 88,138,130,131, 91,220,246,174,203,150,149,150, 87, 85, 81, 75,
+214,175,239,147, 83, 92,220,170, 90,173,246,146, 85, 85, 73, 12, 58, 29,105,201,231,151,181,105,215, 78,170,140,143, 47,108, 83,
+ 83,179,116, 47, 32,253,171,250, 79, 67, 90,228, 13,194,171,113,180,126,151,235,240,151,224,224,224,223,237,174,161,105,218, 36,
+107, 22,147,201,252,205, 50, 85, 19, 96, 17, 4,129,251,247,239,195,214,214, 22, 18,137, 4, 28,206,111,147, 15,150,148,148,224,
+215, 95,127,197,147, 39, 79,208,169, 83,167,218,101,140,198, 21, 17,135,243,222,150, 45, 91,172, 52, 26, 13,238,221,187,135,174,
+ 93,187,130,195,225,128,197, 98,253, 70, 4, 74,165, 82,116,232,208, 1, 43, 86,172, 16,109,220,184,241, 61,181, 90,189,174, 9,
+107,196,226,121,243,230,137,107, 45, 88,121,121,121,232,210,165, 75,221,247,246,246,246,120,240,224, 1,186,118,237, 10, 23, 23,
+ 23,132,132,132,136, 35, 35, 35, 23,235,245,250, 47, 26,227,100,179,217,164,191,191,127, 55, 0, 16, 8, 4, 32, 73,242,169,165,
+165,165,189,131,131,131,192,210,210,146,213,192,210,147,140, 36,201,102,173, 22, 36, 73,162,168,168, 8,126,126,126,168,172,124,
+145,193, 69,161, 80,192,203,203, 11,114,185,188, 78,180, 58, 57, 57, 65,169,108,218,245,171, 99,199,142, 97,237,219,183, 31, 42,
+ 16, 8, 56, 76, 38, 19, 15, 31, 62, 68, 64, 64, 0,162,162,162,224,230,230, 6, 62,159,143,180,180, 52,248,251,251,227,234,213,
+171,176,183,183, 71,135, 14, 29, 56, 98,177,248, 90,121,121,249,149,156,156,156,176, 38,234, 73, 10,133, 66, 92,189,122, 21,251,
+246,237, 67, 86, 86, 22, 10, 10, 10, 96, 97, 97,129,206,157, 59,195,215,215, 23,189,123,247, 70, 90, 90, 26,136,230, 59,147,196,
+219,219, 59,246,206,157, 59,118, 52, 77, 35, 50, 50, 18,213,213,213,208,104, 52, 32, 73, 18, 92, 46, 23,214,214,214, 24, 52,104,
+ 16,236,237,237,225,237,237,141, 35, 71,142,216,141, 24, 49,226,140, 84, 42,237, 12,160,168,185,243,106,109,109,189,116,237,218,
+181,174, 98,177, 24,217,217,217,168,172,172,132,131,131, 3, 6, 12, 24,224, 28, 23, 23,183, 84,167,211,109,251,111,141,230, 63,
+ 83,100, 1, 64, 61,199,119,226,194,249, 31, 38,120,183,169,240,239,212,142,239, 26, 19,235,224, 26, 21, 43,237, 0, 0,126, 62,
+ 14,201, 19,130,249,121, 15,147, 99,243, 46,156, 63,113,239,201, 83,196,152,178,180, 93, 89,163, 62,122, 49,238,246,240,128, 78,
+ 93,140, 91, 54, 47, 31,181,232,221,185, 28,177,195, 59, 40,206, 61,129,184,203,247,221,150,127, 48,207,254,139,173,223,159,189,
+ 24,119,155,172,172, 81,175, 49,205,148,229,246,245,254,111,123,219, 85,149, 70, 35, 61,133, 13,158,133, 31, 60, 60,218, 66, 46,
+151,131,203,229,114,167, 78,157,106, 88,185,114,101,141,165,165, 37,159, 32, 8, 92,185,114, 69, 10, 96, 88,115,188, 42,177, 53,
+109,208,234,244, 52,155, 97,164, 9, 11, 37, 97, 40,103, 39, 61,206,196,208,193, 3,139,251,246,240,219,184,114,221,214, 85,222,
+109, 3,236,231,204, 13,103,174, 15,155,182, 11, 4,250, 53,196,147,146,142,203,196,209,227, 60, 0,163,214,125, 26,134,140,140,
+ 52,235,249,111,203,194, 41, 14,207,169,189,123, 31,139, 93,251,174, 12,247,242,106,221,234,253,197, 33,167,191,252,230,203, 81,
+245, 45, 91,251, 35,214,158, 4, 16,100,202,185,253, 59,130,164,168,118, 36, 65,228,201,107,106, 24,180, 86,107,183, 52, 46, 78,
+121,225,214,173, 75,137,243,231, 91,116,100,177,218,118,100,177,192,208,106,203, 86, 3,165,159, 26,141, 5,107, 41,202, 50,243,
+228, 73, 39,138,205, 78, 80, 25,141,254, 48, 26, 27,138,159,212,113, 70,108, 44,170,115,115,117,229,215,174,169,130,190,249,166,
+212,117,216,176,109, 26,173,214,174,246, 86, 65, 18, 4,136, 90,215, 9,163,145,160, 86,172, 32,105,138,130,206,218,250,109, 84,
+ 84,180,109,142,243,131,194,194, 9,211,230,206, 29,117,242,220, 57,180,110,221,186,238,121,102,101,101,133,229,203,151, 99,217,
+178,101,156, 7, 15, 30,116,143,142,142,238,254,197,231,159, 59, 0,152, 96, 74, 61, 47,220,186,101,253,175,117,235, 86,119,234,
+218,213,237,224,225,195, 28, 79, 79, 79, 0,192,179,103,207,188, 55,111,218,228,238,231,239, 95,188,241,189,247,246, 39,175, 92,
+217, 1,192,181,166, 56,139,226,227, 53,209,217,217,115, 47, 95,185, 98,229,231,231, 7, 0, 72, 77, 77, 21,111,223,190,125, 94,
+135,144,144,233,235, 22, 46, 92, 19,172, 82,201, 44, 75, 74, 56,193, 95,127, 77,253, 52,105, 82,179,156,181,245, 4,128, 1,115,
+230,188,215,111,224, 64,223, 9,115,231,218,184,185,185, 17, 66,161, 16, 90,173, 22, 5, 5, 5,214,201,201,201,158,177, 85, 85,
+242,227,183,110, 69,194, 96, 24,242, 23,118,161, 6,181,200, 27,102,201,250,253,184,120,249,119, 64,108,108, 44,253, 82, 77,214,
+ 61,192, 13, 6,131, 73, 34,139,162, 40, 16, 4, 97,170,216, 2, 77,211, 40, 45, 45, 69, 82, 82, 18,158, 61,123, 6,133, 66,129,
+204,204, 76,236,217,179, 7,155, 55,111,198,221,187,119,161,211,233,160,213, 54,159,131, 86, 32, 16, 12, 30, 60,120, 48,117,235,
+214, 45,120,120,120,128,199,227,129,205,102,131,197, 98,213,189,184, 92, 46, 28, 29, 29, 33,151,203, 17, 20, 20,196, 20, 8, 4,
+131,155,177, 18,141,156, 60,121, 50,187,246,255,234,234,106, 48, 24,140, 58,209, 82, 93, 93,141,242,242,114,200,100, 50, 20, 22,
+ 22,162, 87,175, 94,108,145, 72, 52,210,212,171, 81, 83, 83, 83, 45,149, 74,173,250,245,235,103,253,228,201,147,223,101,251,253,
+229,151, 95, 84, 42,149,138, 73,146,164, 73,142,246,135, 14, 29, 66, 76, 76, 12, 46, 93,186,132,252,252,124,236,218,181, 11, 7,
+ 15, 30,196,169, 83,167,144,150,150,134, 29, 59,118,224,187,239,190,195,254,253,251,155,188, 70,237,219,183, 31, 17, 25, 25,217,
+163,103,207,158,124, 6,131,129,212,212, 84,188,255,254,251,144,201,100,176,183,183, 7, 0, 20, 23, 23, 99,219,182,109, 80,171,
+213, 16, 10,133,112,118,118,230,174, 91,183,174,175,189,189,253,208,166,234,104, 48, 24, 12, 12, 6, 3,238,238,238, 8, 13, 13,
+197,119,223,125,135,243,231,207,227,232,209,163, 88,184,112, 33,124,125,125,145,144,144,128,187,119,239,130,166,233, 38, 31, 50,
+ 92, 46, 55,228,224,193,131, 98, 54,155, 13,163,209,136,170,170, 42,228,230,230,226,246,237,219,170, 19, 39, 78, 84,159, 62,125,
+186,230,218,181,107,170, 27, 55,110,208, 0,234, 4,103,112,112,176, 45,155,205,126,203,132, 83,106, 47,145, 72, 86,205,155, 55,
+143, 91,191,207, 22, 21, 21, 97,194,132, 9,124, 30,143,183, 18,128,125, 83, 4,145,145,145,127,217,205, 34, 44, 60,204,242, 47,
+162,166,163,143,183,189,203, 49,166, 34, 38,246,185,107, 78,190,161,207,242, 15,183,218, 44,255,112,171, 77, 78,190,161, 79, 76,
+236,115, 87,142, 49, 21,209,199,219,222, 53, 65, 8,144,131,250, 59,142,117,176,181,218, 61, 97,204, 24,250,187,239,182,117, 89,
+244,238, 92,142,123,219,229,224,138,166,194,217,227, 95, 8, 10,116, 35, 58,250,146,220,239,190,219,214,101,194,152, 49,180,131,
+173,213,238, 65,253, 29,199,162,153,176, 51, 98, 91,174, 51,159,163,128,167,183, 47, 6,244,239, 4, 38,145,142, 99, 71,247,161,
+176,176, 16, 5, 5, 5, 40, 46, 46, 22,140, 30, 61, 26, 69, 69, 69,170, 43, 87,174, 72,149, 74,101,127, 0, 79,155,107,124,126,
+254, 99,163,170,218,160, 53, 26,152,250,170, 74, 86,205,194,165,209,131,239, 38,179,102, 23,201,156, 71,179, 57,214,236, 17, 67,
+186, 31,222,183, 55, 20,109,218,248,161, 91,247,161,189,172,133, 55,125, 27, 21,175, 25,136,253,249,216,241,147, 83, 39, 79,213,
+103,101,102,103,182,117,224,106,104,154,214, 45,253,248,251, 33, 76,129,107, 71, 79,159, 64,251, 39,233, 6,199,208, 21,111,253,
+120,250,228,151,249,215,175,157, 64,223,126,227,224,236,228,221,255,237,183,193,126, 83, 45, 90, 4, 77,123, 48,133,194, 12, 93,
+101,165, 59,197,225,228, 26, 12, 6,187, 59, 11, 22, 88,105, 89, 44, 71,131, 86, 91, 96,208,106, 11,180,108,182,229, 78, 31, 31,
+ 23,154,166,109,173, 92, 92,158,211,108,182,155, 94,171, 77, 39, 72,178, 77,131,179,115, 14,199, 69,232,238, 78, 21, 93,184,160,
+241, 24, 61,186, 2, 0, 52, 90,173, 93, 86,118,182,168, 88, 42, 21, 21, 21, 23,139,114,242,242, 68, 25,153,153,162,180,244,116,
+ 81, 74,122,186,229,163,164, 36,225,131, 71,143,132, 4,131,225, 96, 10,103, 86, 65, 65,199, 21, 43, 86,128,199,227, 65,175,215,
+ 55,116,207,134, 66,161,192,219,111,191,141, 26,160,167, 41,156, 6,131,129,248,215,186,117,171, 63, 90,189,218, 51, 38, 38,134,
+211,163, 71, 15,216,216,216,192,198,198, 6, 61,122,244, 64,244,177, 99,236,133,139, 23,187,172,218,187,247,109,146,195,113,109,
+142,179,212,203, 11, 54, 54, 54,188, 90,145, 5, 0,237,218,181,195,174, 93,187, 56,231,206,159, 23,125,250,195, 15, 91,195,111,
+220,240, 87,231,228, 40,108,219,182,165,217, 28,142,139,169,231, 19, 0,170, 84, 42,191,109,219,183,219,218,217,217, 17,197,197,
+197, 72, 79, 79, 71, 78, 78, 14,244,122, 61,186,117,235, 70, 28, 61,118, 76,164, 97, 48,186,255,197, 93,232,119, 90,228, 13,194,
+124, 52, 18, 71,139,122,249, 0,186, 10,128,136,141,141,165,107,151, 19, 95, 62, 28,235,196,148, 41, 66,235,117, 32,147,201, 32,
+147,201,176,119,239,222, 58, 97, 84, 11,141, 70, 99,138,104,241,119,114,114, 66,101,101, 37,218,182,109,251, 27, 75, 22,139,197,
+ 2, 69, 81, 96,177, 88,224,112, 56, 80,171,213,112,115,115, 67, 77, 77,141,127, 83,156, 74,165,178,179,141,141, 77,221, 3, 86,
+173, 86,215,137,172,218,250,106, 52, 26, 84, 84, 84,160,186,186, 26, 85, 85, 85, 80, 40, 20, 1,166,180,215,104, 52, 34, 41, 41,
+233, 89,187,118,237, 58, 51, 24, 12, 8,133, 66,129, 66,161,168,243, 45, 42, 47, 47,199,129, 3, 7, 20, 51,103,206,180, 59,117,
+234, 84,179, 9,139, 9,130,192,191,255,253,111,112, 56, 28,212,212,212,224,187,239,190,195,146, 37, 75,192, 98,177, 80, 85, 85,
+133, 93,187,118,225,253,247,223, 7, 69, 81,208,104, 52,216,190,125,123,163, 92,143, 31, 63,206,186,117,235, 86, 64,151, 46, 93,
+172,143, 31, 63, 94, 50,100,200, 16,251, 97,195,134,129,199,227, 65,169, 84, 66,167,211,161,103,207,158,104,223,190, 61,164, 82,
+ 41,206,158, 61, 91,234,237,237,109,119,251,246,109, 99, 81, 81, 81, 78, 51,226,154,174,103, 49,132,193, 96, 64,113,113, 49,100,
+ 50, 25, 74, 74, 74, 80, 80, 80,128,252,252,124, 80, 20,133,102,116, 22,108,109,109, 39,250,249,249, 49, 0,128,199,227,161,115,
+231,206, 88,189,122,181, 94,169, 84, 78, 6,112,246,101,177, 17,223,127,255,253,241,235,215,175, 83, 78, 78, 78, 72, 73, 73,129,
+189,189, 61,197,229,114,223,210,104, 52, 77, 90,163, 36, 18, 73,196,207, 63,255,108, 83, 43,174,107,207,115, 77,205,139,203, 49,
+ 97,194, 4,155,131, 7, 15, 70,232,245,250, 70,197,117, 97, 97,225, 95,103, 53, 32, 24,234,191,138,219,138, 7, 86,103, 63,203,
+202,168, 88,105,135,229, 31,110,165,218,251,189,152,188,206, 95, 0,234,139,207, 63,232, 48,125,172,229,105, 43,158,156,213, 28,
+207,136,193,174, 59,199,140, 25, 66, 78,157, 18,156,198, 98, 89,121,236,222, 19, 46, 22, 59,188, 83,175, 17,150,176,181,179,132,
+135, 59,155,136, 62,253, 68,252,241,202, 79,213,135, 14,126,153,241,227, 79,177,195,217,204,139, 67,207,198,229, 45,108,140,251,
+233, 51,217,169, 26, 53,215, 71, 94,150, 72,216, 56,244, 65,231, 78,237, 32,182,175,192,247, 17, 81,104,221,166, 27,212,106, 53,
+ 44, 45, 45,249, 6,131, 65,203, 96, 48, 14,153, 34,178, 0,224,210, 37,153,177, 67, 7,153,134, 81,101,212, 47, 90,242,197,248,
+ 33, 35,198,248, 14, 26, 52,216,120,225,226, 5,109,159, 0,109,225,136, 97,157,139,207, 93,220,153, 86, 88,144,233,221,193,191,
+ 47, 30, 39, 95, 25, 78,211, 72, 34,136,134, 69,103,114, 58,206,169,140,143,175, 68, 69,205, 55, 42,141, 9,188,245, 27, 30,141,
+ 24, 53,106,150, 95, 96,191, 64,227,197,184,203, 26, 54, 74,159, 88,246,237,253,124,209,220, 17,199,127, 56,180,125,232,185,179,
+ 17, 94,149,242,156,216,253,251,161,198, 27, 10,154, 32,236, 45, 4,130,146,178,170,170, 78, 19,195,195,229,147,150, 47, 63,223,
+145,162,124, 13, 90,109,102, 56,160,164,105,154, 48,234,245, 43, 31, 29, 62,204, 8, 35,136,143,195, 1,227, 6, 6,131,153,111,
+ 52,214, 56,147, 36,127, 45, 64,133,191,178,147,219,160,215, 59, 80, 28, 14, 89,114,229,138,222,255,157,119,212,181,227,145,207,
+231,227,228,201,147, 96,179,217,117, 47, 22,139, 85,247,222,193,193, 1,196,203,109,164,191,155,248, 53,192, 89, 59,110,139,138,
+138, 32, 18,137, 96,111,111,143,162,162, 34,220,184,113, 3, 79,159, 62, 5,147,201,196,240,225,195, 65, 54,226,219,252, 42,231,
+164,229,203,135,248,248,251,187, 45, 88,176,128,124,245,249,168,213,106, 81, 94, 94,142,177, 99,199,146,103,207,158,149,156,203,
+205, 29, 3,224, 80, 83,156, 1,163, 70,149, 21, 71, 71, 55,248,219, 93,186,116, 33,126,253,245, 87,206,240, 97,195,150,125,176,
+ 97,195,206,175, 15, 30,204, 51,232,245,146,150,180,157, 36, 73,146, 32, 8,184,186,186,162,188,188, 28,213,213, 47, 86,176,133,
+ 66, 33,172,173,173,161,211,233, 96,164,105,230, 95,217,127, 26,211, 34,111, 8,246,212, 19, 92,191,177,108, 81, 47,215, 69,107,
+111, 20, 3,234, 63, 88,140, 70,163, 73, 34,139,201,100, 54,235,115,101,138,149,235, 85,152, 34,180,106,235,202,229,114,127, 99,
+201,170, 21, 88,181,245, 36, 73, 18, 12, 6,163,217,135,248, 75, 49,196,168,170,170,194,177, 99,199,208,191,127,255,186,101,169,
+202,202, 74,200,100, 50, 84, 86, 86, 66,165, 82, 33, 43, 43, 11,151, 46, 93,130,151,151, 23, 96, 98,240,215,140,140,140,123,173,
+ 91,183,238, 90,251, 16, 31, 56,112,160,203,254,253,251, 11, 70,142, 28,233, 68,211, 52,214,172, 89, 83,218,179,103, 79,187,250,
+ 15,249,230,192, 96, 48,112,227,198, 13,120,121,121,129,166,105,176, 88, 44,164,166,166, 66, 44, 22,195,104, 52,130,162, 40,148,
+148,148,192,194,162,233, 24,137, 73, 73, 73,179,231,204,153, 83, 32, 18,137, 58,150,149,149, 21,114, 56,156,126,241,241,241,174,
+ 90,173, 22,150,150,150,176,180,180,196,153, 51,103, 96,101,101,133,247,222,123, 47, 87,169, 84,222, 16, 8, 4, 14, 74,165, 50,
+177,168,168,104, 77, 75,174,183, 94,175,135, 66,161, 64, 69, 69, 5,202,203,203, 33,151,203,161, 82,169,154,173, 99, 67,232,215,
+175, 31, 98, 99, 99, 25,159,125,246,217, 15, 25, 25, 25, 0, 0, 15, 15, 15,188,247,222,123, 12,103,103,103,100,101,101,225,222,
+189,123,208,106,181,160,105,186,201,193, 75, 81,212,192,153, 51,103,246,117,115,115, 35,180, 90, 45,140, 70, 35,212,106, 53,106,
+223,231,230,230,194,199,199,135,116,119,119,239,149,145,145, 49, 16,141,108,172,168, 63, 97,248,179, 17, 26,250,137, 6,111, 32,
+138,115, 79,192,153, 41, 6, 72, 75,208,202, 19, 40, 43,125,189, 40, 46, 82,169,116,195,138, 79,126,125,231,235, 45, 90,135,252,
+ 66,160,157,223, 56,120,251, 6, 97,246, 12, 61, 62,251,252, 24,220,220,219, 33, 39, 39, 7, 3, 7, 14,100, 21, 20, 20,204,169,
+174,174, 94,110, 42,247,197,139,183, 12, 23,206,156, 13,153,244,214,172,174,131, 7,143,212,159, 63,127, 6, 73,137,231,147,231,
+188, 53, 81, 74, 27,171, 9, 27, 43, 94, 66,106,202, 93,239,142,157, 7, 64,163, 55,244, 3,194,182, 0, 97,116,227,227, 29,154,
+211,167, 29,201,211, 39, 34,102, 76,157,254,118,167,160,160,161,186,243, 23,127,198,189,155, 23, 31,110,221, 50,239,234,103,219,
+143, 12, 28, 50,124, 98, 7,123,135, 27,103,252,218,170,231,186,218,138,158,125,191,191, 28,111, 48, 40, 22,151,171, 7, 64, 90,
+185,187,187, 28,191,116, 41,187, 51,147,201,176, 4, 12, 52, 77,183, 3, 96, 71, 82,212,170, 83,115,231, 6,248,188,124,144,234,
+ 1,163, 15, 64, 86, 2, 26, 1,192, 70, 35, 33,115, 40, 46,215,136,151,247, 69,146, 32, 64,211,244,111, 68,214,171, 66,139, 36,
+201,102, 13, 0,245, 57,235, 63,139,106, 39,212,187,119,239, 6,135,195, 1,155,205, 6,147,201,108,214,253,162, 62,103,114, 86,
+214,160, 3,135, 14,113, 26, 18, 89,101,101,101, 40, 43, 43, 67,117,117, 53,166, 76,153,194, 10,191,123,183, 11, 94,186,126, 52,
+198,233,230,232,168, 22,240,120,197,143, 31, 63,118,242,245,245,253, 77,125,229,114, 57,120, 60, 30, 14, 29, 62,204, 10, 30, 53,
+234,221,160, 51,103,182,162,153,248, 87, 13,181,157, 32, 8,136,197, 98, 88, 91, 91,131, 32, 8,232,245,122, 20, 21, 21, 33, 57,
+ 57, 25,119,239,222, 5,131, 32,244,127,101,231,105, 72,139,188,129, 86,173,223, 45, 31,214, 90,180,136,198,172, 47,166, 10, 45,
+ 6,131,241,218, 86,173,198, 96,202,210, 33,159,207,127, 84, 80, 80,208,199,217,217, 25,122,189,190, 78,104,213,183,196,213, 62,
+244,120, 60, 30, 30, 60,120, 0, 62,159,255, 72,165, 82, 53,201, 73,211,116,175,238,221,187, 35, 38, 38, 6, 87,174, 92, 65,102,
+102, 38,106,106,106,160, 86,171,161, 84, 42,145,156,156, 12,163,209, 8, 63, 63, 63, 8, 4, 2,240,249,252, 71,181,150,175,198,
+160, 80, 40, 10,153, 76,102, 59, 30,143, 87,247,153,163,163, 35,202,202,202,140, 58,157, 14, 7, 14, 28,144, 75, 36, 18, 1,143,
+199, 51, 89,184, 18, 4, 1,169, 84, 10, 23, 23,151, 58, 31,173,170,170, 42,136,197,226, 90, 97, 1,181, 90, 13, 11, 11, 11,208,
+ 52,221,220, 53, 82,165,167,167,127, 80,239,255,110,147, 38, 77,250, 49, 42, 42,170, 77, 92, 92, 28,110,223,190, 13,123,123,123,
+108,220,184, 49, 51, 59, 59,123, 42,128,187, 82,233,159,235, 23,105, 74, 31, 42, 43, 43, 59,246,232,209,163, 94,221,187,119,175,
+187, 75, 12, 28, 56,144, 24, 56,112,160, 93,125, 83,127, 73, 73, 9,238,220,185,131,184,184, 56, 16, 4,129,180,180, 52,131, 82,
+169,252,177, 9,106,150,179,179,243,254,213,171, 87, 11,245,122,125, 93,223,230,241,120,224,114,185, 96,177, 88, 96, 48, 24,200,
+206,206,198,216,177, 99, 69,223,124,243, 77,132, 90,173,246, 4,240,187,142,186,108,217,178, 55,210,199, 70,166,132,246, 65,146,
+ 92,228,231,227,144,188,103,247,103,125,230, 47,120,113,143,216,179,251, 51,189,159,143, 56,249, 65, 82,177,168,171, 24,205, 14,
+204,179,113,121,139, 52,186,179,163,207,158,251,101,242,135,203,222, 99,122,120,248, 72,227, 46,223,119, 11,210,127, 74,216,218,
+ 89,162,172, 84,142,236,220, 98,100,228,104,104, 15, 15, 31,233,189, 59,143, 56,159,111,251,202, 91, 81,163, 58,114,249,106,225,
+207,205,208,171,174,221,200, 28,183,117, 7,231,234,172, 57,221,216, 60,158, 19,202, 75, 31,193,205,205, 30, 99,131, 59, 98,223,
+193, 27, 16,137,108,224,224,224, 0,146, 36, 5,166,182,189,180,180,148, 56,246,211,181,119,102,190, 61,175,231,176,161,163,244,
+231,206,159,166,174, 92, 56,117, 35, 98,207,170,227, 52, 67,193, 39,232, 42, 94,171,214,146,196,103,233, 15,166, 14, 26, 60, 5,
+ 60,150,133, 23,208,190,193, 14, 91,183,193,128, 70,110, 76, 84, 24,119,230,219,243,123, 15, 27, 54, 70,127,254,252, 9,156, 63,
+115,240,214,218,181,173,206,100, 62, 63,204,186,121, 55,159, 59, 46,100, 97, 69,236,217, 39,154,137,163, 91, 63,117, 18,116, 86,
+ 2,153,111,172,202, 34, 9, 66, 94, 90, 82, 98,201,100, 50,149, 17,211,166,165, 1,128,142,162,202,170, 24, 12,123,130, 32, 82,
+ 1,164,110, 0,236,192,102, 87, 78,210,235, 13,203,221,220, 88, 84, 97, 33,163,194, 96, 48, 48, 0,246,135,191,207,191, 8, 6,
+ 69, 21,235,213,106, 87,151, 97,195, 24, 53, 57, 57, 76,161,131,131, 30, 0,116, 58, 93,179, 66, 11,141,108, 90,121,149,211,212,
+246,213,212,212,192,216,136, 16,124,149,179, 72, 42,109,245,114, 18, 94, 7,157, 78, 87, 39,178,202,202,202, 32,147,201, 32, 16,
+ 8, 80,162, 86, 59,152,194, 57,180, 71,143, 3,225, 97, 97,203,163,143, 29, 99,213, 23, 89,181, 47, 38,147,137,205, 91,182,176,
+150,124,248,225,194,119, 41,106, 41, 26, 88, 6,109,236,124,214, 78,218, 25, 12, 6, 40,138, 66, 78, 78, 14,114,115,115,145,147,
+147,131,156,156, 28,240,120, 60,208,127,241, 38,160, 55,216, 63, 11,245,150, 10,231,191,106,229,106, 50,188, 67, 75,156,225, 77,
+ 21, 6, 6,131,225, 79, 21, 90, 10,133, 34,238,210,165, 75, 61,198,141, 27, 71,221,186,117, 11, 18,137,164, 78,104,213,254,173,
+ 93,142,226,243,249, 56,126,252,184, 86,161, 80,196, 53, 51,152, 46,157, 57,115,166,107,104,104, 40,115,246,236,217,120,252,248,
+ 49, 22, 44, 88, 0,153, 76, 6,185, 92,142,178,178, 50,212,212,212,160, 71,143, 30,224,114,185, 72, 76, 76,212,213,212,212, 92,
+106,110,233, 76, 42,149, 86,219,219,219, 59,190,250, 93, 72, 72,136,195,183,223,126, 91,147,146,146,162,235,211,167,143,165,169,
+130,163, 22, 63,253,244, 83,157,165,238,233,211,167,248,246,219,111, 65,211, 52,104,154,198,253,251,247,241,197, 23, 95,212,197,
+ 62,107, 33,238,150,150,150,234,117, 58, 29,188,188,188,224,236,236, 12,149, 74,133,175,190,250, 74, 15,224,238,127,171, 55,171,
+ 84,170,232, 89,179,102,125,148,144,144,224, 72, 81,212, 11,147,246,203,246,105,181, 90,164,167,167, 35, 57, 57, 25, 41, 41, 41,
+ 40, 47, 47,175,155, 8, 60,120,240,160, 66,167,211, 29,105,140,215,222,222,126,205,190,125,251, 36,124, 62,255, 55,253,185,214,
+ 26, 90,107, 37, 45, 41, 41,129,149,149, 21,130,130,130,196,151, 46, 93, 90,163, 86,171, 67,241,207, 0, 17, 50,254,105,183, 37,
+139,198, 97, 66, 48, 63, 47, 38,246,249,175, 95,124,254,193, 3,214,187, 21, 0, 0, 32, 0, 73, 68, 65, 84, 75,103,120,113,242,
+132, 96,231,188,135,169, 86, 8, 25,127,162, 27,128,124, 52,237,167,101,188,124,181,240,100,247,238,214, 87, 98, 78,157,138, 88,
+185, 98,217,253,229, 31,204,179,175, 81, 62,227,122,184,179, 9, 0,200,200,209,208,137,143,141,170, 47,182, 46,187,255,217,150,
+111,200,226, 50,217,130, 59,119, 26, 15,111, 80, 95,188,144, 36,184, 30,237,251, 23,120,183,237,219,250,214,141, 67, 16,242,149,
+104,215,190, 27,134, 13,237,133, 43,191, 60, 64, 81,137, 10,133,133,133, 80,171,213, 77,134, 75, 72, 73, 60, 62,131, 38,104, 55,
+130, 38,114, 9,146,230,206,152, 53,183,223,168, 81, 99,232,216,216, 83,250, 19,199, 15, 93, 63, 18,185, 35,154,100, 49, 41,165,
+ 70,164, 33, 8, 85, 37,200,164,199,213,138, 23, 19, 26, 38,135,213,184,249,245,101, 96, 87,223, 14,237, 37, 51,102, 45, 16,141,
+ 28, 49,150, 62,115,230,132,241, 72,212,129, 43, 71,246,250, 31, 50,146,114, 86, 97, 94, 13,167, 82,174,171,164, 9,182, 85,181,
+220, 88, 83,156,225,169,114, 26, 21,162, 5,162,223,216, 14, 68, 27,141, 57,180, 70,211, 26, 76,102, 30,173,215, 75,160,211,149,
+135,171, 84,207, 63,101,179, 91,253, 31,123,215, 29,223, 84,245,190,159,155,221, 38,221,139, 14, 90, 70,129,210,197,178,128,178,
+ 87, 89, 45,162, 40,136,162, 56, 25,138,162, 44, 65, 16, 16, 80,134,130,128,130, 44, 21,144,189,161, 32, 80,164,165,140,130,108,
+232,166,133,206,164, 77,186,146, 54,251,142,243,251,131,182, 22,236, 72, 10,250, 83,191,121, 62,159,124,114,115,115,239,147,115,
+206, 61, 57,247,185,239,121,207,251, 46, 16, 8,158, 1, 69,113,102,138,210,194,100,202, 2, 0,183,220, 92, 31,147,147, 83, 33,
+223, 96,104, 3,150,173, 51, 0,178,217,104,204,175,204,203,243,113,235,219, 87,114,111,225, 66,105,179,238,221, 13, 84,149, 15,
+113, 67, 66,139,207,231, 3, 60, 30,103, 9,167,165,245,211,235,245,224,234, 9,173,210, 24, 39,195, 48,143,136,172,106,161, 85,
+253,127,177,132,115,211,130, 5,151, 3,134, 12, 41,141,143,143,111,214,175, 95, 63,170,162,162, 2, 21, 21, 21,143,136, 45, 95,
+ 95, 95, 42, 52, 60, 92,186, 59, 46, 46,208,210,246,180, 72, 68,243,120,127,185,208,250,151,163,222, 68,210,130, 70,166,208, 44,
+ 22, 90, 22, 90,180,104,154,166,225,229,229,133,226,226,226,122,111,252, 60, 30, 15,246,246,246,213,115,196, 13,174,188, 51, 26,
+141,171,103,204,152, 49,101,216,176, 97, 30,237,219,183,135, 74,165, 66,179,102,205, 96,103,103, 87,227, 59, 86,205,119,253,250,
+117,252,244,211, 79, 26,163,209,184,186, 17,206,111, 87,172, 88,241,193,168, 81,163,220,188,189,189,225,234,234,138,219,183,111,
+195,213,213, 21, 26,141, 6,105,105,105,112,116,116,172,241,219, 57,122,244,104,133,209,104,252,182, 17,241, 70, 18, 18, 18,204,
+142,142,142,183, 85, 42, 21,191,180,180, 84, 80, 86, 86, 38,208,104, 52, 66,181, 90, 45, 60,121,242,164,135,179,179,179,238,236,
+217,179,170,128,128, 0,254,253,251,247,249, 52, 77, 55,170, 94, 41,138,194,212,169, 83, 33, 18,137, 96, 52, 26,177,122,245,106,
+204,152, 49,163,198, 39,107,197,138, 21,152, 59,119,110,141,112,222,188,121,179,117, 3, 39, 33, 48,155,205,160,105,218,226, 5,
+ 10, 79,244, 68,108,153, 96, 47,204,200,200,136,238,214,173,219,233,125,251,246,185, 87,197, 36, 67, 81, 81, 17,138,138,138,160,
+ 82,169, 80, 89, 89, 9,134, 97,224,231,231,135,162,162, 34, 28, 62,124, 88, 93, 81, 81, 49, 4, 13,172, 56,228,243,249,227,123,
+247,238, 45,120,188, 12,213, 79,121,213,226, 93, 34,145, 64, 46,151,163,127,255,254,226,248,248,248,241, 0,254,213, 66,171,118,
+120,135,193, 67,222, 17,133,132,245, 48,221, 74,138,201, 11,110, 85,148, 55,110,164,211,113, 0,184,121,183,200,249, 86,154, 11,
+ 66,194,162,201,224, 33,174, 17, 69,133,155, 58, 0, 48, 55,148,174, 7, 0,156,165,146,209,145,131,186,203, 29,101, 50,222, 55,
+ 43, 55,255,250,195, 15,223, 62,179,255,248, 31,225, 29,190, 89,249, 48,188, 67,228,160,238, 92,106, 74,234,104, 0, 91, 44, 21,
+ 47,209,209, 35,110,252,180,245, 39,164, 38,157,245,253,116,106, 71,113,105, 17, 13,123, 7,127, 68,116,110,134, 77, 91,239,224,
+214,173, 91,133, 38,147,169,127,131,253,155, 34, 1, 73,201,119,131, 58,132,133,122,191, 62,126,130, 83,116,244, 72,196,196, 28,
+193, 47,219,182, 36,188, 52,118,212,143, 5,101, 26,190,151, 80, 42,146, 18, 78,204, 23, 57, 11, 68, 18,123,165,201,244, 48, 2,
+129, 80,104,231, 4,140,110,240,198, 51,105,194, 56,231, 1,131, 70,226,248,137, 35,248,101,219,166,115,159,135,189,188,165, 85,
+151, 16,170,251, 51, 95, 79,110,213,186, 85, 11,109,101,145,134, 71,137,205, 6, 3,231,248,245,182,236, 85, 89,115,199,103, 1,
+ 88,137,127,233,170, 67, 49,203,222, 50,154,205,227,252, 35, 34,174,202,175, 94,237,240, 21, 77,187,125, 6,148,126,110, 50,101,
+239, 3,242,202, 1,222,196,170, 49,125, 37, 96,167, 23, 8,124,156,121,188,155, 21, 44, 59, 12,124,126, 18,234,126, 16,191,253,
+203,240,225,221, 62,202,204, 20,121,246,234,101, 47,143,139,147, 86,101, 34,105, 80,104, 9, 4, 2,144,250,167,186, 30,225,164,
+182,111,231, 1, 15,167,252,235, 27,227, 68, 34, 17,116, 58, 29,104,212,107,209,125,132,211,231,212,169,188,204,204,204,118,110,
+110,110,143,136,172,210,210,210,154,109,131,193, 0,157, 78, 7,123,123,251, 36,125,221, 51, 34,143,112, 22, 37, 36, 24,150, 77,
+157, 58,255,213,177, 99,215,158,249,237, 55, 59,119,119,119,168,213,234, 71,132,150,201,100,194,128,129, 3, 69, 43,110,220,120,
+ 29, 26,205, 2, 75,218,179, 89,255,254,141,250, 3,243,249,124,112,127,241,212,225,127, 0, 19,234, 18, 94,188,198,166,112, 44,
+ 93,117, 88,207, 13,242,241,213,125,115, 35, 34, 34, 12,233,233,233, 8, 8, 8,168, 17, 43,181,127,211,201,201, 9, 46, 46, 46,
+184,126,253, 58,190,252,242, 75, 61,128,185,141,112, 86,232,116,186, 87, 34, 35, 35,245, 2,129, 0,193,193,193, 53,241,179, 56,
+142,131, 88, 44,134, 76, 38,195,141, 27, 55, 48, 98,196, 8,157, 78,167,123, 5,127,142,161,245, 56,167, 90,167,211,189, 54,120,
+240, 96, 93,114,114, 50,122,247,238,141, 91,183,110,161,178,178, 18,149,149,149,120,240,224, 1, 66, 67, 67,161,211,233,176,126,
+253,122,189, 78,167,123, 13,128,186, 33,206,138,138,138, 17, 51,102,204,224,239,218,181,171,149,159,159, 95, 88,215,174, 93,219,
+ 15, 28, 56,176,205,139, 47,190,216, 98,248,240,225, 62,237,218,181, 51, 12, 25, 50,196,115,216,176, 97,158, 58,157, 78,120,241,
+226, 69, 5, 77,211,195, 26, 41,103,141, 56, 73, 79, 79,175,153, 42, 20, 8, 4, 40, 46, 46,174,137,220, 95, 61, 40,213, 35,132,
+ 7, 53, 38,182,171, 5, 86,181,224,178,192,207,173, 46,206, 70, 79, 18,139,197,213, 22, 79, 98, 1,231,205,148,148,148,200,190,
+125,251,222,124,231,157,119, 42, 10, 11, 11,225,232,232,136,192,192, 64, 4, 5, 5,193,195,195, 3,102,179, 25,135, 14, 29,210,
+ 30, 62,124,248,142, 90,173,238,143, 63,199,208, 26,244, 88, 59, 62,168,107,144,173,182,102, 85, 11, 45, 59, 59, 59,248,249,249,
+ 85,183,237, 3,107,218,179,137,248,107, 57,171, 4,204,192, 1, 67, 90, 15,143,122,193,249,208,145, 75,226,181,235, 14,223,137,
+ 24,132,205,238, 45, 53, 71,221, 91,106,142, 70, 12,194,230,181,235, 14,223, 57,116,228,146,120,120,212, 11,206, 3, 7, 12,105,
+157,156,148,218,190,118,222,195,186,202,105,103,103,215,163,119,175,136,178,248, 11,231,184,165, 43,190,231, 13,232,255,210,141,
+ 45, 63, 30, 58,180,229,199, 67,135, 6,244,127,233,198,210, 21,223,243,226, 47,156,227,122,247,138, 40,179,179,179,235, 97, 73,
+221, 39, 77, 24,231, 28, 53,124, 36, 98, 98, 14, 49,251,119,175, 95,177,231, 64, 70,223,119,167, 36, 20,165,167,223, 34,202,252,
+ 83, 16,242,114,144,146,146,162,174, 18, 89,233,150,112, 78,124,111, 92,109,145,117,222,221,187,247,230,148, 20,176,177,177,199,
+232,223,126,187,161, 63,127, 83,169,190,150, 92, 92, 42, 87,149,222,215,104, 74, 76, 28,199,130,101, 89,254, 23, 95,212, 56,236,
+214,121,141,122,246,236,135,179,103,118, 98,219,214,141,106,142,131, 97,244,254,253,236,232,209, 11, 73,139,150, 45, 91,236,216,
+189,147,138,126,254, 5,103, 2,112, 35, 70,141,116,217,181,103, 23,213,186,109,235,150,129,129, 53, 33,109,254,117,125,233, 83,
+160,146, 2, 82, 20,191,255,222,213,161,119,239,219,140, 80, 24,180, 72, 36,106,179, 6, 16,143, 6,216,137, 0,189, 0,224, 45,
+ 0,252,244, 2, 65, 39,123,134,185, 85,161,211, 53, 7,128,197,132,220,175,139,115, 33, 80,166,201,201, 57,119,253,251,239,141,
+205, 94,121,197, 77,220,172,153, 19, 88,150,170, 30,223,235,123, 9, 4,130,199, 45, 48,245,114,250,121,120, 20, 28, 61,122, 20,
+ 65, 65, 65,240,243,243, 67,109, 31,217,234,128,220,238,238,238, 56,112,224, 0,200,163,193,169,235,229,236,210,170,213,245,229,
+203,150,153, 56,142, 67, 89, 89,217,159,172, 89,101,101,101,224, 56, 14, 39,142, 31, 55,105, 30,102, 2,177,168,238,253,249,252,
+202, 87,251,244, 89, 26, 21, 21,101,206,204,204,172, 89,121, 93,109,217, 82, 42,149,112,112,112,128,193,104,244, 7, 32,181,132,
+ 83,121,242,164, 12,141,140,235,117, 88,180,254,138,190,244,111, 23, 89,181, 19, 74, 79,176,200,162,197, 48, 12,252,253,253, 31,
+ 73,233,194,227,241, 30,121, 89,185,226,112,123,114,114,242,169, 33, 67,134,204,127,246,217,103, 39,205,159, 63,159,223,190,125,
+123,168,213,106,184,186,186,194,203,203, 11,105,105,105, 56,122,244, 40, 91, 92, 92,188, 1,192, 34,212, 17,192,174, 14,196,101,
+100,100, 68,119,236,216,113,207,236,217,179,157, 7, 15, 30, 44,244,247,247, 7, 33, 4, 55,110,220,192,193,131, 7,205, 91,182,
+108,209, 84,137,172, 56, 11,203,122, 90, 46,151,191, 52,108,216,176, 29,227,199,143,119,100, 89, 86,248,224,193, 3, 24,141, 70,
+208, 52,141,220,220, 92,115, 76, 76, 76,165, 78,167, 27, 7,224,180, 5,124,215,203,203,203, 67, 99, 99, 99,199, 95,188,120,241,
+203,119,222,121,199,125,224,192,129, 34,134, 97,112,225,194, 5, 85,151, 46, 93,188,148, 74,165,249,192,129, 3, 37, 6,131, 97,
+ 46,203,178, 22,165,224,161, 40, 10, 26,141, 6, 30, 30, 30, 48, 26,141,224, 56, 14, 38,147, 9, 14, 14, 14, 53,105,147, 8, 33,
+176,198,185,254,177, 62,192, 55,155,205, 24, 59,118, 44, 56,142,195,234,213,171,193, 48,140,213,100,206,206,206,215,110,222,188,
+ 25,221,185,115,231, 26,241, 82,221,135, 36, 18, 9, 60, 60, 60,224,238,238,142,152,152, 24, 8,133,194,107,141,249,187, 85,225,
+ 86,113,113,113,151,216,216,216, 30,119,238,220,121, 3, 64,103,179,217,236,199,178, 44,197,227,241, 20,132,144,219, 26,141,230,
+ 71, 88,152,130, 71,169, 84,126,249,230,155,111,118,217,185,115,167,131, 64,240,199, 95, 67, 32, 16, 64, 34,145,160, 58, 56, 38,
+ 33, 4, 38,147, 9,243,230,205,211,104,181,218, 47,255, 43,163, 68, 68,215,238,216,180,126,141,195,111,103, 79,169, 82, 50,112,
+208,213, 53,229,241,254,151, 95, 84,184,169,131, 60, 47,207, 33,162,107,119,139, 56,105,147,185,228,181,113,211, 2,170, 82,240,
+204,123,240, 32,123,227,142,237,171,178, 0,224,235,111, 87,183, 43, 42, 41,159,152,146,156, 58,122,195,134,221, 61, 24,179,185,
+196, 18,206, 63,196,203, 14, 53, 8, 12, 0,174,220,184, 83,212,106,196, 43, 39,231,182,109,237,244,188,178, 68, 95, 80, 89,169,
+251, 16, 64,150,165,117,239,213,179, 47,206,158,222,133, 95,182,237,208, 16,142,111,240,240,240, 32, 0,144,146,226, 65, 82, 82,
+202,201, 31,126,197, 46, 90, 33,185,181,104,218,135, 3,167,169, 53,165,223,174, 94,223,240, 84, 74,199, 78,207,162, 99,167,103,
+ 49,229,195,207,156, 67,195,130, 3, 0, 96,255,126,176, 97,109,147,143,205,255,124,225,243,139, 22, 45,132,166,194,136,234,116,
+ 61,105,119,147,143,103,101,193,244,111,238, 71,243, 25,230,194, 34, 66, 94,212, 37, 36,116,232, 49,115,230,239,231,191,249,166,
+149,154,207,239,249, 5,192,241, 40,138, 5, 33,246, 60, 30, 79, 33,163,233, 27, 21, 98,177, 15,197,113,207, 56,178,236, 33,186,
+129,252,159,243, 25,230, 10,166, 77,107,167, 43, 45,245,236,245,233,167, 30,130,153, 51,121, 13, 57,195,215,254,255, 90,194,121,
+245,246,237,227, 19,223,125,183, 96,193,252,249, 67, 54,108,220,104,223,161, 67, 7, 20, 22, 22, 34, 56, 56, 24,126,126,126,136,
+141,141,197,129,189,123,181,229, 21, 21,115, 1,252, 96, 9,231,246, 19, 39,210,218,135,133, 21,111,220,184,209, 55, 42, 42,138,
+210,106,181, 80,171,213, 80,171,213, 48, 26,141,168, 10, 8, 77,210, 51, 50, 82,104,154,222, 96,105,221, 89,149,202,110, 81,247,
+238,249, 34,142, 91,254,210,168, 81, 51, 22, 45, 94, 44,105,221,186, 53,101, 52, 26,107,172, 90,102,179, 25, 14, 14, 14,102,147,
+201,228,142, 58,252,222,234,226,148,108,217,194,168, 84, 42,120,122,122,214,132,107,170, 29,151,176,162,162, 2,132,144,255,108,
+ 2,244,191, 18,245, 42, 36, 87, 87,215,107, 2,129,160,121,109,235, 86, 93,185,243,106,239,163,105, 58,191,184,184, 56,226, 49,
+197, 91,159, 63, 84, 32,128,175, 6, 12, 24,240,210,244,233,211,169,248,248,120, 28, 62,124,152,100,101,101,237,175,178, 98,101,
+ 53,240,244, 84, 31,167,163, 68, 34,249, 88, 38,147, 13,170, 14,225, 32,149, 74,239,104,181,218, 51, 85,211,133, 21, 77,224,116,
+146, 72, 36, 83,101, 50, 89,100, 85,250, 21, 56, 58, 58,222,212,106,181,177, 70,163,113, 13,234, 79, 84,221, 16,167,189,179,179,
+243,151, 30, 30, 30,175,205,156, 57,211, 61, 33, 33, 65,113,246,236, 89, 81,121,121,249, 78,147,201,212, 80, 82,233, 63,113,186,
+185,185, 93,227,243,249,205,255,162,107,132,142, 29, 59,198,140, 24, 49, 34,106,220,184,113,160,105, 26, 63,252,240, 3, 98, 99,
+ 99,143,223,187,119, 47,186,145, 39,220,199, 57, 61,154, 55,111, 30, 63,105,210,164, 22, 99,199,142,149,186,186,186, 66, 32, 16,
+ 64,171,213,226,222,189,123,184,113,227, 6, 57,114,228, 72,229,245,235,215,243,117, 58, 93, 63, 0,197, 86,180,231,147, 60,137,
+ 63,194, 41, 16, 8,250,250,251,251,239, 94,176, 96,129, 99,100,100,164,189,187,187, 59,248,124, 62,104,154,134, 66,161,192,221,
+187,119,113,234,212, 41,237,254,253,251,181, 37, 37, 37, 99, 1,156,251,255, 40,231,211,228, 12,105,135,207, 31, 75, 20, 93,111,
+180,247, 70,142,109,180,156, 3,250,250,140, 28,253,210,176,161,132, 16,236, 59,112,242,100, 92, 66,163, 73,165,235, 45,103, 99,
+101,181,132, 51,184, 45,111, 65, 82,242,221, 71, 2, 90,134,133,134,167,135,116, 24,181,196, 18,162, 90,145,225, 31,169,123,173,
+233,216,218, 54,221, 71,166, 89, 67, 2, 17, 61,114,244,139, 81,159,205,157,131,175,190, 92,138, 35,251, 14, 29, 79,201,122, 36,
+ 77,208,191,174, 47,213,190,183,124,193,231, 15,224,241,120,254,148, 88,252, 59,173,213,102, 56, 2,194, 10,128,255, 5,160, 93,
+ 36, 18,181, 1,203,134,129, 16, 65, 5, 69,197,124,195,178,174, 0,228,141,113, 46, 17, 8,158,149,250,248,244, 89,205,113,115,
+110,221,189,235, 80,251,129,173,218,242, 92,251,161,210,215,215, 87,169, 80, 40,154, 89,194, 25,253,221,119,102,157, 76, 38,153,
+179,124,121,223, 74,131,161,239,162, 69,139, 4, 87,175, 94,197,250,239,191,103, 12,249,249, 59, 84,192,212,122,102, 67,234,229,
+108, 49,117,170,221,172,245,235,223, 10,108,219,214,235,141, 55,222, 16, 10,133, 66,104,181, 90,228,229,229,225,244,169, 83,166,
+228,148,148,100,141, 70,243,188, 53,117,143,254,238, 59,179, 75, 96, 32,164,158,158,228,183,184, 56,231,137, 31,127, 60,169,101,
+171, 86,206, 67,134, 14, 21, 58, 57, 57,161,172,172, 12, 15, 30, 60,192,161, 67,135,148,149,149,149,190, 0, 88, 75, 56,119, 92,
+188,216,241,196,185,115, 47, 47, 89,178, 68, 28, 30, 30, 14,103,103,103, 84, 84, 84,224,238,221,187, 56,119,238,156,113,195,134,
+ 13,106,181, 90, 61,137,101,217,163,127, 97, 95,250, 79, 78, 29,254,213, 30,254,150, 92,136, 8, 0,159, 87,109, 47, 70,227, 57,
+ 3,255,205,131,207,227, 8,112,115,115,219,100, 48, 24,136, 94,175,159, 8, 32,247, 31, 88, 78, 65, 68, 68,196,122,165, 82,217,
+131, 16, 2,103,103,231, 75, 73, 73, 73,239,163,158,149, 55,141,112,242, 1,244,112,112,112,232,238,232,232,216,215,104, 52,134,
+ 84, 77,191,165,104,181,218,115,102,179,249, 74,149,245,137,253,127,174, 59, 31, 64,164,175,175,239,187, 28,199,181,165, 40,202,
+133,101, 89,208, 52, 93,206,113,220, 61,181, 90,189, 5, 64,236, 63,160,156, 79,133, 51,180, 13, 94, 36, 60,132,212, 39, 8, 30,
+ 17, 90,143, 9, 8,138, 67, 74,114, 38, 14, 89, 81, 78,222,208, 65,254,235, 56, 22, 56, 29,151,247, 1, 26,119,174,253, 67,104,
+ 89, 32, 94,172, 22,153,109,248,111, 18,138, 60,194, 73, 17, 42, 55,184,227,139,191, 60,137,208,178, 20,161, 65,232, 11,130, 30,
+ 28,193,149,212,123, 56,251, 95, 27,235, 22, 0,205,120, 60, 94, 55,138,199,107, 67, 0, 45, 69, 81, 12, 8,113, 3, 33,153,224,
+243,147,230,155,205,153,168, 59,129,121,189,156, 95, 1,110,223,187,186, 94,226, 9, 4,222, 0,120, 85,214, 23,142,163, 40,150,
+ 80, 20, 83,123,122,235,177, 7,203, 6, 57,205, 64, 7,161, 68,226,207, 50, 76,179, 66,192,225, 4,203, 62, 99, 32,164,178, 57,
+240,249, 77, 32,205,218,186, 87,115,242, 37,146,128, 19,132,140, 84,201,100, 29,149,122,189, 39, 0,226, 32,147,165,104,180,218,
+109, 6,131, 97,157,181,117, 55, 3, 29, 68, 18, 73,115,150, 97,154, 1, 0, 79, 32, 80,238, 49, 26,253,243,157,156,222, 48, 24,
+141, 45, 28, 28, 28,104,147,201,164, 49, 24, 12,227, 24,134,249,205,154,186,223, 99,152,208,139, 60, 94,111,179, 76,230,110,166,
+ 40,153,137, 97,204, 38,179, 57,207, 96, 48,220, 1,176, 10, 64,230, 95,220,151,108,104,226, 31,208,198,105,227,180,113,218, 56,
+109,156,255,227,156,203, 0,167,175, 0, 55, 91,123,254,165,156, 82, 0, 1, 85, 15,139,255,198,186,255, 39,173, 91, 2, 91, 91,
+216, 96,131, 13, 54,216,240, 87, 99,118,253,110, 22, 54, 60, 61,232, 80,135, 79,150, 13,255,191,160, 26, 80,165,214,152, 4,155,
+162,108,207,216, 56,109,156, 54, 78, 27,167,141,211,198,105,227,252,159,227,108,140,251,223, 56, 37, 57,161,142,125,155,254,142,
+ 31,182,153,127,109,156, 54, 78, 27,103,157, 24, 49, 98, 4,207,214,158, 54, 78, 27,167,141,243,191, 14,158,173, 9,234, 69,179,
+170,215,211, 62,214,134,255,118, 95,248, 59,224, 87,245,178,230,120,159,127, 90,163, 30, 59,118,140, 3,128, 59, 41,119, 37, 21,
+ 21, 21,182,177,200, 6, 27,108,176, 9,173,191,249,166,245, 36, 55,183, 39,189, 49, 46,165, 40,200, 41, 10,114, 0, 75,159,226,
+177,141,193,215,195,195,227,163,208,208,208, 29,205,154, 53,155, 2,192,203,202,243,219, 73,165,210, 53, 50,153, 44, 94, 38,147,
+197, 75,165,210, 53, 0,218, 61,165,235, 70, 1,152, 40,145, 72,226,124,124,124, 10,196, 98,113, 28,128, 73,104,250,202,213,246,
+120, 24, 39,109, 49,128,142,214,156,232, 21, 54,114,175,103,216,200,219,158, 97, 35,239,186,135,143,104,231, 25, 54,242,174,103,
+216,200,219, 94, 97, 35,247,254, 5,253,245,105, 94,223,167, 85,158, 92,138, 66,174,133,229, 89, 69, 1,121, 20,133,252,127, 72,
+249,255,132, 14, 33,225,198,209, 99,198,216,219,134, 99, 27,108,176,225,127, 30,190,190,190, 47,249,248,248,156,241,241,241,137,
+245,245,245,125,201,130, 83, 6,213,113,147, 96, 41, 10,108, 35,131,126, 67,199, 53,102,174,172,125,238, 55, 22, 86,173, 54,103,
+ 51,138, 2, 75,170, 64, 81,224,188,188,188,214,250,248,248, 44,125,252,229,229,229,181,150,162,192,213, 58,150,173, 37,240,172,
+ 53,171, 54,123,253,245,215,247,149,149,149,197,152, 76,166,152,140,140,140,152,126,253,250,237,121,204, 18, 81, 47,167,157,157,
+221,171,221,186,247,184,126,238,194,149,140,244,123,217,242,228,180,251,217,199, 78,254,118, 53,188, 67,199,223,237,236,236, 94,
+181,226, 26, 81, 0, 38, 10, 4,130, 56, 7, 7,135,124,129, 64, 16, 7, 96, 50,159,207, 63,186,108,217,178,236,164,164,164,162,
+139, 23, 47,150,159, 59,119,174,224,157,119,222,185, 71, 81,212,177, 58, 4,251, 32, 11, 44, 48,243,115,114,114, 78, 42, 20,138,
+ 83,246,246,246, 95, 90,112,124, 13,167,103,216,200,219, 74,181,153, 40,213,102,226, 25, 54,146,212,218,190,109,101,155, 55,118,
+141,254,212, 23, 36, 18, 73, 64, 35,130,254,175, 52,209,255,169, 60, 0,188,171,190,139, 0,240, 93,213,171,122, 57,187,183,157,
+ 68,242,180,250,231,211,104, 79, 27,167,141,211,198,105,227,252,175,162, 75,213,187, 15, 30,250,107,213,220,187,173, 93,117,248,
+ 65, 70, 70,134, 3, 0, 4, 5, 5,189, 15,224,128, 53, 66,130,162, 48,139,227, 8, 15, 0,120, 60,234,211,254,253, 7,116,177,
+183,183,127, 36, 10,178, 94,175, 23,199,197,157, 29,200,113,132,170, 58,110, 22, 33, 88, 3,160,200,210,223, 48,153,140, 60,161,
+ 80, 12, 30,143,154, 22, 30,222,161,101,113,113,113, 2,143,199,219, 81, 80, 80, 80,102,181, 25,135,162,176,121,243,230, 32, 31,
+ 31,159, 63, 69,107, 86, 40, 20,226,145, 35,159,183,138,239, 77, 64, 98,148, 72,186,139, 40,202,135,101, 24, 23, 0, 16, 8, 4,
+101, 87,197,226,136,175,150, 44,145, 82, 20,197,149,148,148, 64,175,215,227,147, 79, 62,177, 79, 78, 78,126,161,184,184,120, 93,
+ 35,180, 65, 29, 59,117,249,228,212,169,147, 33,154,210, 50,195,230,111, 55, 94,215, 11, 68,186, 86,161,193,162,245,155,182,185,
+ 78,120,107,220,135,169,169, 73, 55, 81,119, 58,146,218,224, 1, 56,244,241,199, 31,135, 69, 71, 71,139, 43, 42, 42,236,244,122,
+125,203, 29, 59,118,204,139,136,136,112,232,220,185,179,120,247,238,221,148, 90,173, 6, 33, 68, 26, 28, 28, 76,198,140, 25, 99,
+216,179,103,207, 20, 0,107, 27, 16,190,179, 30,182, 37,111,117,251,246,237, 23, 0, 64, 70, 70,134,168, 86, 27, 11, 67, 66, 66,
+100, 0,144,150,150,246, 5, 33,220,199, 0, 64, 8, 86, 0,152, 83,135,105, 45, 35,172,215,104,128, 66,219,164, 11,251,236,194,
+122,143, 54,128,224, 30, 5,100, 84, 61, 16, 44, 2,106,197,133,122, 20, 41,114,185,188, 73,185, 9,163,162,162, 41,138,162,246,
+ 95,191,126,253,128, 82,169,108,197,113,236,123, 13,149,179,190,107,229,233,233,121,138,101, 89, 99,105,105,105, 77,160, 76,207,
+142, 47,246,112,119,148, 13, 84,149, 85, 36,148, 36, 31, 57,103, 97,223,164,220,221,221,223, 44, 46, 46, 94, 10,224,221,148,148,
+148, 46, 0, 16, 18, 18, 34, 2,112,205,201,201,169,167,217,100,162,108,227,159, 13, 54,216, 96,195,223, 34,180,110, 0,136,194,
+ 31, 41,120, 54, 53, 69,104,137, 1, 32, 33, 33, 1, 0, 36, 77, 40, 8, 85, 91,192, 76,157, 58, 21, 62, 62, 62,143,139, 23,196,
+199,199, 61, 73,101, 31,249,141,197,139, 23, 59,148,151,151, 15,250,241,199, 31,251, 16, 66,190,145,203,229,151, 27, 57,191,136,
+ 16,172,224,241,168, 79, 41,138,130, 68, 98,151, 62,105,210,164, 27, 85,223,181, 60,118,236,152,116,196,136, 17, 58, 0,217, 0,
+ 32,145,216,249,241,249,188, 32, 66, 72,245, 13,183, 94, 65,248, 50, 16,200,136,197, 3, 38,126,247, 29,243,204,136, 17, 2,153,
+167, 39, 5, 0,217,169,169,238, 43,190,254,186,103, 89, 86,150, 88,239,238, 94, 82,162,213,234,211,211,211, 33,145, 72, 40, 62,
+159,255, 76, 99, 21,150,201,100, 31, 45,249,106,185, 76, 83, 90,174, 55,104, 42, 76,124,134, 54, 58,218, 75,217,162, 66,101,137,
+131,189, 76,247,233,231, 11,197, 31,188, 55,254, 35,173, 86,251,126, 35, 84, 83,166, 77,155, 22,210,173, 91, 55,191,189,123,247,
+ 82,106,181, 26, 2,129,192,161,115,231,206,136,136,136, 96,207,158, 61, 75,181,106,213, 10,225,225,225,184,112,225, 2, 46, 93,
+186, 68,117,233,210, 69,122,240,224,193,215,105,154, 94,219,152,184,230,243,121,159, 4, 7, 7,119,150,201,100,166,160,160, 32,
+188,247,222,123, 32,132, 96,208,160, 65,225, 14, 14, 14, 7,180, 90,173, 56, 45, 45,181, 79, 99, 34, 91,153,116,100, 76,181,101,
+ 11, 64, 7, 16,220, 83, 37, 29,169, 61,253, 24,146,150,150,246,108, 89, 89, 25, 30, 94, 23, 82,147,192,188, 79,159, 62,214,244,
+165, 34, 66,176, 98,196,136,232, 79, 1,138, 26, 52,104, 80,249,148, 41, 83,120,169,169,169,175,189,248,226, 11,225, 25, 25,247,
+ 96,229,195, 64,208,224,193,131, 47,156, 56,113,194, 61, 40, 40, 72, 85, 90, 90, 90,243,133,183,187,203,144,115, 7, 87,127,244,
+229,154, 29,193,219, 9, 85,174, 74, 57,124,167,145,190, 73,189,249,230, 91, 69, 14, 14, 14,163,246,239,223,159,166, 80, 40, 4,
+ 34, 81,141,118,229,123,121,121,121, 6, 5, 5, 77,118,115,115, 83,242,121, 60, 47, 2, 66, 26,235,159,255,223,200, 72, 79, 21,
+182, 11, 10,166,109,227,181, 13, 54,216,240, 47,196,241, 42,113,117,252,241, 47, 4, 0, 16, 19, 19, 83, 19,153, 54, 58, 58,186,
+222, 39, 96, 66, 72,209,173, 91,183,252,117, 58, 29, 8, 33,150, 12,216,181,151,104, 22, 81, 20,111, 61,143, 71,189, 79, 81, 20,
+194,195, 59,220, 95,189,122,117, 93, 57,189, 76,225,225, 29,238,243,249,188,214,132, 16, 80, 20,239, 7, 66,184,162,122, 56,235,
+188, 17,137,197,146, 89, 0,224,237,237,147,245,235,175,191,154, 94,126,249,101,124,253,245,215,162,217,179,103,207, 16, 8, 4,
+ 83,114,115,115, 11, 27, 40, 39, 0,204,241,244,244,146,110,222,188, 57,104,210,164, 73, 55, 20, 10,197, 28, 0,240,241,241, 89,
+ 10, 32, 20, 64,118,173,125,216,176, 97, 79,193,123,239,189,151,174, 84, 42,231,212,199, 57, 10,104,227, 31, 28, 60, 96, 81, 66,
+ 2,225, 25,141, 84,241,249,243, 26, 85, 81, 17,157,169, 82, 73,183, 94,187, 22, 61,111,233, 82,161,127, 64, 0,226,143, 30,245,
+ 40,214,233, 84,106,163,209, 80, 84, 84, 68, 24,134,185,100, 65,221,195,188, 60,189,164, 27, 87,253,112,213, 81,200,231,188,154,
+251, 81, 66, 55, 55, 1, 79,234, 36,230, 11,120,198,214, 45,219,137, 1,132, 53,118,141, 68, 34,209,235,131, 7, 15,150,238,217,
+179,135, 10, 15, 15,135,139,139, 11,206,159, 63,143,155, 55,111,162,172,172,140, 71,211, 52,186,118,237,138,229,203,151, 35, 32,
+ 32, 0,229,229,229,200,205,205,245, 16,139,197,158, 52, 77,215,215,158,143,244,167, 89,179,102,193,199,199, 7, 12,195,160,180,
+180, 20, 12,195,192,193,193, 1, 0,144,159,159,143,163, 71,143, 88,210,151, 26, 5, 33, 4,207, 61,247, 92, 5, 69, 81, 41,143,
+ 91,180,172,225,244,243,243,219,173, 82, 21, 15, 27, 48, 96, 0,202,202,202,232,133, 11, 23,162, 99,199,142, 8, 10, 10,106,180,
+156,190,190,190, 19, 25,134,153, 15, 0,102,179,121,171,157,157,221,219,191,252,242,139,123,237, 20, 33,213,150,172, 34,101, 73,
+217,165,171, 73,105,211, 38,190,220, 47,225,242,221, 60,179,112,100,174,250,246, 17,117, 29,229,156, 35, 18,137,127,108,209,162,
+197,170,169, 83,167,250,184,185,185,193,104, 52,206, 43, 44, 44,196,228,201,147, 1, 0,195,135, 15,239, 40, 20, 10,127,125,231,
+157,119,208,170, 85,171,130,210,210,210,220,235,215,175,191,167,211,233,238, 54,181, 61, 45,196, 19,113,214, 35,178,254,113,229,
+180,113,218, 56,109,156,127, 13,167,165, 90,228, 31, 10, 5, 30, 13,231,176,233, 17,161, 21, 29, 29, 77,197,196,196, 16, 11, 42,
+ 86,210,188,121,115,127,123,123,123, 0, 40,177,182, 20, 28,199, 77,113,119,119, 87,206,153, 51,167, 87, 80, 80,144,105,202,148,
+ 41,119,179,179,179,231,214, 62,166,101,203,150, 95,126,255,253,247, 72, 79, 79,207, 94,186,116,233,133,146,146, 18,107,243,152,
+205, 38, 4,171,171,172, 99,197, 71,143, 30,237,152,144,144,240,254,183,223,126,235,249,193, 7, 31,136, 62,250,232,163,113, 0,
+190,110,140,132,207,231,235,234,154, 46,172, 11, 62, 62, 62, 38, 62,159, 95,111,144,184,104,192,222, 78, 44,238,191, 40, 33,129,
+152,178,179,117, 63,173, 92,233,184,241,247,223, 23,208,132, 52,243,242,242, 66,239,158, 61, 43,237,248,252, 98,101, 97, 33,231,
+213,166, 13,255,193,175,191,122,232,197, 98,249,158, 61,123,212, 37, 37, 37,135, 27, 53,225, 81,148,134, 35,196,228,208, 60,128,
+126,249,133,200,240,171, 87,110,166, 58,122,121,240,186,116, 14,239,152,154,158,125, 29, 28,103,166, 40,170,209, 96,129,206,206,
+206, 65, 37, 37, 37,208,104, 52,240,244,244,196,234,213,171,225,237,237, 13,157, 78,135,164,164, 36,210,188,121,115, 42, 33, 33,
+ 1,205,155, 55,135, 74,165,130,201,100, 66, 69, 69,133,210,104, 52,214,151,155,177,136,199,227,255,204,227, 81,111, 81, 20,133,
+214,173, 3,115,214,173, 91,103,226, 56, 14, 33, 33, 33,120,241,197, 23,113,240,224, 65, 36, 37, 37, 85, 91,158, 76, 45, 90,180,
+204,225,241,168, 22, 85, 90,169,201, 22,152,234,212, 62,114,185,124, 84, 19,255, 52, 60, 95, 95,223,113,109,219,182,125,255,213,
+ 87, 95,165,197, 98, 49,180, 90,109,117, 91,208,195,134, 13, 47, 31, 49, 34,218,249,248,241,227,245,150,211,108, 54,207, 47, 40,
+ 40,240,209,235,245, 24, 58,116,232, 71,223,124,243,141, 76, 44, 22, 3, 0, 88,150,125,196,146,181,228,219,237,167, 62,158,191,
+ 46,238,212,238,229,190, 75,102,191,221,111,220,148, 47,227, 0,156,172,171, 96, 38,147, 41, 75,173, 86,191, 59,109,218,180, 29,
+ 27, 54,108,112,157, 59,119, 46, 56,142, 3, 33, 4, 12,195,212, 36, 18,231, 56, 14,135, 14, 29, 66,102,102,230,151,143,137, 44,
+ 27,108,176,193,134,127, 28,172,208, 34,255, 68,248,224,225,180, 33, 30, 23, 91,127,123,100,120, 62,159,191,241,244,233,211,157,
+251,244,233, 35, 24, 56,112, 96,248,201,147, 39,195, 11, 10, 10,238, 86, 89, 15,194, 7, 14, 28, 24,238,229,229,133, 53,107,214,
+232,248,124,254,198, 38,254, 76,205, 77,175,176,176,240, 6,128,111, 14, 30, 60,184, 98,226,196,137,240,246,246, 14, 85, 40, 20,
+127,107,157,157, 36,146, 46,239,172, 94,205, 8,105,154,247,221, 55,223, 56,173,140,139, 91,177,119,223, 62,193,115,207, 61, 71,
+ 17, 66,112,231,246,109,251,229,107,215, 74,199,190,240, 66,118, 90, 86, 22,115,228,212, 41,186,168,160,160,180, 64,165,154, 15,
+160,180, 49,126,154,166, 19, 51, 50, 50,124,123,247,125,206,239,220,239,119,111,190,252,194,240, 1, 66, 1,143,186,151,157,127,
+205,199,219,195, 57, 62,238,140,158,166,233,196,198,120,180, 90,237, 3,134, 97,220, 8, 33,158,241,241,241,240,244,244, 68, 89,
+ 89, 25,104,154,134,201,100, 50,233,116, 58,187,146,146, 18, 24, 12, 6, 24,141, 70, 56, 57, 57,225,206,157, 59, 69, 12,195,156,
+173,143,147,101,217,119, 36, 18,201, 98,161, 80, 40, 22,137, 68,242,107,215,174, 65,163,209,180,116,113,113,249,154, 97, 24,200,
+229,114, 36, 36, 36,204,116,114,114,202, 6, 0, 59, 59, 59,136,197, 18,119,163,209,200, 0, 40,104,106,155, 19, 66,154,124,189,
+188,189,189, 3,236,237,237, 23,125,250,233,172,144, 78,157, 58, 67,165, 82,129,227, 56,200,100, 50,232,116, 58, 56, 57, 57,161,
+ 71,143, 30, 15, 22, 45, 90,164, 32, 4, 19, 26, 16,131,252,170,235,131,137, 19, 39,202,156,156,156,144,151,151,135,224,224,224,
+ 26,161,165, 80,149,220,185,120,245,110,234,180, 73,163,251,238, 60, 26,151,114, 42,254, 90,202, 11, 67,123,118,162, 40,210,178,
+161, 50, 42,149, 74,149, 64, 32,152, 50,113,226,196,197, 65, 65, 65,173, 9, 33,104,215,174, 29, 6, 15, 30,140, 95,127,253, 21,
+233,233,233,208,106,181,236,229,203,151,119, 41, 20,138, 99,182, 33,220, 6, 27,108,176,225, 47,197,159,124,179, 30,177,104,253,
+157, 80, 42,149,170,212,212,212,147,215,175, 95,143, 30, 51,102, 12,226,227,227,223, 4, 48, 13, 0, 36, 18,201,155, 99,198,140,
+193,245,235,215,145,154,154,122, 82,169, 84,170,158,198,111,138,197, 98,131,201,244,208, 56,101,103,103,103,103,229,233, 45,171,
+166, 12, 1,160,101, 3,251,234, 55,141, 8, 4, 62, 29,134, 14, 21,148,221,188,169,217,124,229,202,226, 29, 59,118, 8,122,245,
+234, 69,209,102, 51, 88,142, 67, 96, 96, 32, 53,112,208, 32,217,207, 59,118,184,177, 90,109,194,146, 79, 63, 61,191,233,157,119,
+ 42, 51,170,252,192, 26,131,209,104, 92,251,254,228,119, 7,197,197,159,247, 11, 13,110,227,118,242,116,220, 13,119,119,103,105,
+ 80,219,182,178,146,178, 82,118,238,236,153, 2,163,209,248, 93, 99, 60,122,189,254,208,153, 51,103, 94,240,247,247,247,188,123,
+247, 46, 76, 38, 19, 88,150,197,192,129, 3, 65, 8,145, 0,224, 4, 2, 1, 82, 83, 83, 97, 54,155,149, 25, 25, 25,242,123,247,
+238, 73, 0, 44,107,164,124, 57, 70,163, 17, 41, 41, 15,103,237,154, 55,111, 30, 25, 21, 21, 5,134, 97, 48,116,232, 80, 28, 57,
+114, 36, 50, 37, 37,101,101,109,205,247,164,215,188,202, 66, 22,226,235,235,123,176,106,151, 69, 78,240,126,126,126,225,129,129,
+129, 27,150, 45, 91, 38,106,222,188, 57, 8, 33,112,117,117,129, 78,167, 67,113,113, 9, 66, 67, 67,225,239,239,143,101,203,150,
+ 1,192,174,134, 44,110, 28,199, 65,161, 80,224,193,131, 7,200,202,202,130,191,191, 63, 40,138, 66, 69, 69, 5, 24,230, 97, 78,
+110,105,133,230,248,247, 63, 31,235,191,111,195,252,176,238, 29,218, 5, 92,185,145,172,124,125, 84,164,180, 93,171,128, 32,213,
+221,133, 60, 96, 97,189, 73,151,229,114,249, 61,185, 92, 62, 70,169, 84,138,202,203,203, 35, 34, 35, 35,215, 12, 26, 52, 8, 55,
+110,220,192,249,243,231,199, 74, 36, 18,165,217,108,102,188,189,189, 39, 80, 20,229,100, 54,155,119,150,148,148, 40,108,227,161,
+ 13, 54,216, 96,195, 83, 71,181,143, 22,106,189, 91,103,209, 10, 9, 9,145,101,103,103,191,209,178,101, 75, 49, 0,216,219,219,
+135, 6, 6, 6,206,200,202,202,170,176,182, 52, 58,157,110,239,142, 29, 59, 6,175, 90,181, 74, 52,124,248,240, 54, 7, 15, 30,
+236, 6, 0,195,135, 15,111,227,232,232,136, 29, 59,118,152,117, 58,221, 83,139,137, 68,211,116,159,174, 93,187,162,180,180, 20,
+217,217,217, 86, 77,161, 28, 59,118, 76,138,135,126, 89, 13,238,107, 8,140,201,228,234,226,231,199, 43,136,139, 51,151,106, 52,
+ 62,125,250,246,165,104,179, 25, 60, 30, 15, 37, 37, 37,200,205,205,133,179,139, 11,149,154,145,225,176,101,214,172, 99, 45, 59,
+117, 18,179, 38,147,187, 21,197,212, 22, 43,139,222,250,112,202, 7,135,118,238,220,229, 89,174,209,100,218,219, 75,141, 18,137,
+200,123,234,135, 31,178,165,165,165,227, 1, 84, 90,192,179,108,231,206,157, 67,135, 14, 29,122, 59, 32, 32,192, 75,165, 82,121,
+151,151,151,179,165,165,165,124, 60,244,181,162, 0, 32, 46, 46, 14, 26,141,134, 97, 89, 54, 1, 15, 99, 97,153, 44, 45,104,139,
+ 22, 45,156, 35, 34, 34,250,121,122,122, 66,173, 86,195,221,221, 29,157, 59,119,238,199,231,243,127,204,201,201, 81, 63,205, 94,
+ 31, 27, 27,235, 72, 8,121,150, 16,130,161, 67,135, 90,116, 14,203,178,111, 71, 69, 69,137, 40,138,130, 94,175,131,157,157, 61,
+100, 50, 7, 56, 58, 58, 33, 40,168, 61,228,114, 57,134, 12, 25, 98,202,204,204, 92,175, 80, 40,246, 54,194, 5,185, 92, 14,149,
+ 74,133,220,220, 92, 20, 23, 23, 3, 0,138,139,139,107,156,243,159, 6,212,106,245,200, 30, 61,122, 76,159, 60,121, 50, 24,134,
+193,200,145, 35,145,151,151,183,242,193,131, 7,123,124,125,125,199,189,253,246,219,158,238,238,238,152, 62,125,186, 61,128, 47,
+108,227,161, 13, 54,216, 96,195, 83,199,227, 62, 90,127,182,104, 53, 52, 39,234,237,237,221,155,162,168,121,122,189, 94, 92, 61,
+ 37, 67, 81,148,216,211,211,243,136, 94,175, 95,170, 80, 40,172,114,138, 43, 47, 47,215,220,191,127,255, 72, 98, 98,226,232, 81,
+163, 70, 33, 54, 54,118, 60, 0,140, 26, 53, 10,137,137,137,184,127,255,254,145,242,242,242,167,146,128,212,207,207,111, 88,223,
+190,125, 71,117,237,218, 21, 49, 49, 49, 96, 89,246,146, 53,231,215, 94, 97,136, 58, 86, 29, 86,239,179,136,201,113,202, 59, 0,
+ 0, 32, 0, 73, 68, 65, 84,140,207, 7, 69, 81, 53,214,140, 98,149, 10,233,105,105, 40, 45, 43,131,209, 96,128, 86,167, 99,131,
+ 90,181,210,171, 77, 38, 33, 5, 88, 59,247,149,115,253,234,229, 92,157, 86,235,229,238,234,166,151, 74, 37, 40,215,168, 69,215,
+174, 94,174, 4,144,105, 33,135,137, 16,210,247,215, 95,127,157,207,231,243,199, 56, 56, 56,224,253,247,223,231,247,235,215, 15,
+ 34,145, 8, 70,163, 17,229,229,229,216,177, 99,135,138,101,217,214, 85,231, 56, 72,165,210,109,124, 62, 63,191,162,162, 98, 94,
+163, 63, 96, 50, 13,143,142,142, 22,152, 76, 38, 44, 89,178, 4, 11, 22, 44,192,208,161, 67, 5, 87,175, 94, 29, 14, 96,231,211,
+234,241, 28,199, 33, 50, 50,178,182, 51,124,138, 37,231, 9,133,194,240,182,109,219, 66,165, 82, 65,165, 82,193,211,211, 19,190,
+190,190,240,246,246,198,202,149, 43,201,154, 53,107, 78,154,205,230,245,197,197,197, 69,150,148, 33, 43, 43,171,198, 50,104, 48,
+ 24,160,213,106,145,151,151, 87, 51,117,168,151, 57, 13,157,242,214,136, 78, 90,189, 94,119,229, 78, 70,238,188,143,198, 61,167,
+213,235,117, 25, 15,114,211,129,181,156, 5,253,123,194,248,241,227, 39,140, 30, 61, 26,149,149,149, 72, 76, 76, 68,207,158, 61,
+177, 98,197, 10,159,132,132,132,105, 93,187,118,133, 80, 40, 68,124,124, 60, 24,134,201,179,141,133, 54,216, 96,195, 63, 25,255,
+ 82,255,172, 6,209,160, 69,203,223,223,223,133,101,217,153, 81, 81, 81,145, 47,188,240, 2,134, 12, 25,242,200,247, 59,119,238,
+116, 60,112,224,192,210,181,107,215, 14, 53,155,205,203,172,153,234,227, 56,238,208,206,157, 59,135, 63,247,220,115,210,254,253,
+251, 7, 2,128, 68, 34, 49,237,220,185, 83,199,113,220,161, 38,212,165, 58, 16, 99, 17, 0,248,250,250,118, 20, 8, 4,163,134,
+ 13, 27,214,241,173,183,222, 66, 82, 82, 18,118,236,216,113, 47, 40, 40,232, 66, 81,145, 85,254,213,217,141,172, 58, 92,218,152,
+117,139, 47, 22,151,148, 23, 22,186, 56, 4, 4, 8, 93, 29, 29, 21, 49, 49, 49,254,131, 6, 13,162,242,242,242, 80, 86, 86, 6,
+131,193,128,171, 87,175,114, 2, 32, 71,224,234, 74,229, 36, 38, 82,124,177,184, 4,180,117, 43,221,253,125, 92,219,125, 62,123,
+ 82, 75,131,209, 16,166, 86,171, 25,129, 80, 40,108,238,237,146,151,150,105,213, 76,156, 81, 42,149, 70, 0, 16,112, 28,167,115,
+115,115,147,158, 62,125, 26, 98,177, 24, 20, 69,161, 67,135, 14,176,179,179, 19, 17, 66,114, 1,192,209,209, 81,188,113,227, 70,
+231,113,227,198,157,111,140,184, 75,151, 46, 66,137, 68,242,124, 80, 80, 16, 18, 19, 19,113,247,238,221,156,196,196,196, 22, 93,
+186,116, 65, 64, 64,192,243, 62, 62, 62,251,110,220,184,241, 84,150,247, 63, 92,177,106,189, 51, 60,203,178, 28, 69, 81,224,241,
+120,224, 56, 14, 42,149, 10,173, 91,183,198,186,117,235,176,122,245,234, 37, 10,133,226,168, 21, 92,172, 70,163,129, 76, 38,195,
+221,187,119,141, 81, 81, 81, 18, 30,143,135,123,247,238,213, 8, 45, 47, 15,183,208,158, 93,195,131,151,124,187,253,148, 76, 34,
+145, 12,233, 23, 17,146,156,145,147, 79, 8,213,232,180,113, 72, 72,136,168,117,235,214,227, 71,143, 30,141,172,172, 44, 44, 93,
+186,180, 88,161, 80,196,157, 58,117,234,165,201,147, 39,243,123,246,236,137,146,146, 18,252,252,243,207,204,181,107,215,126, 42,
+ 44, 44,220,110, 27,198,109,176,193, 6, 27,254, 33, 66,203,223,223,127,180, 72, 36,154,254,202, 43,175,240,219,183,111,143,162,
+162, 34, 56, 57, 57,209, 20, 69, 9, 1,192,197,197,133,182,183,183,199,164, 73,147,208,169, 83,167,222,179,102,205,234, 41, 16,
+ 8,214,201,229,242,109,150,252,176, 82,169,212,241,120,188,253,239,191,255,254,178,155, 55,111,180, 6,128,223,127,255,253,190,
+ 92, 46,159,173, 84, 42,117, 86,214,163, 58, 40, 38, 37,145,216, 93,105,215,174,221,131,136,136, 8,167, 23, 94,120, 1,158,158,
+158,184,126,253, 58,150, 47, 95,158, 97, 50,153,230,159, 59,119,142,249,187, 27,153, 49, 26, 11,175, 29, 62,236,216,239,181,215,
+156,166, 70, 69,125,243,193,251,239,175,250,252,243,207, 5,237,219,183,167,116, 58, 29,174, 92,185, 66, 14, 28, 56, 64,255,188,
+120,241,106,200,100,194,196, 3, 7,196, 38,147, 41,199, 74,203, 93,223, 94,125,122,183,255,102,213, 90, 24,244,149,184,114,233,
+ 56,202,202, 84,216,184,233, 96,123, 63, 63,210,183,160,160,224,156,165, 92, 20, 69, 5,197,198,198,122, 17, 66, 32, 22,139,177,
+104,209, 34,248,250,250,194,201,201, 9, 21, 21, 21,152, 54,109,154,243,199, 31,127,236, 12, 0, 73, 73, 73, 53,225, 25, 26,131,
+ 92, 46,239, 49,105,210, 36, 71,134, 97,112,242,228, 73, 19, 69, 81,243,206,156, 57,243, 99,135, 14, 29,196,189,123,247,118,220,
+190,125,123, 79, 0,241, 79, 75,104, 53,241,188,123,167, 79,159,238, 58,102,204, 24, 34, 20, 10,169,242,242,114,184,184,184, 96,
+221,186,117, 90,133, 66,113,220, 74,174, 69,179,103,207,158, 95,181,189,117,222,188,121,239, 46, 91,182,204,179,176,176,176,198,
+170,169, 44, 46, 61,219, 35,234, 67,182,164, 92,109,250,233,219, 89, 47,219,219, 73,196,243,150,253, 20, 79,243,113,185,209,126,
+197, 48, 98,169, 84, 42, 38,132, 96,255,254,253,200,201,201,121,187,164,164,164,144,101,217,131, 51,103,206,156,209,190,125,251,
+ 86,105,105,105, 57, 21, 21, 21, 43,148, 74,229, 3,219,112,103,131, 13, 54,216,240,151,161,218, 9,190,122,245,225,113, 60,156,
+ 78,172, 95,104,177, 44, 59,233,212,169, 83,124,142,227,176,105,211, 38, 92,187,118,141, 72,165,210,121, 82,169,244,123,123,123,
+123, 86,175,215, 79,124,239,189,247,198, 45, 88,176,128,215,187,119,111, 36, 38, 38,242, 90,183,110, 61, 30, 64,109,161, 53, 8,
+ 13,196,218, 80,171,213, 87,139,138, 10, 91,215, 10, 80,217, 90, 34,177,187,218, 72,101, 30,231,124, 60, 40,102,247, 69,139, 22,
+105,125,124,124, 76,119,239,222,197,134, 13, 27,184,107,215,174,197,137,197,226,141, 10,133,194,104, 33,231,211, 64, 13,167,152,
+ 97,174,255, 50, 99, 70,200, 51, 35, 71,114,239, 78,159, 94, 41,178,183,255,232,155,181,107,103,149, 87, 84,248,130,162,136,187,
+179,115,206,166, 69,139,150, 14,125,254,249,202,164,115,231,236,110,198,198, 10, 61,105,250,150, 53,229, 44, 40, 40, 56, 23, 31,
+127, 30, 91, 55,175,130,217,108,132,162,224,161, 78, 43, 46, 81,163, 17,145,245, 39, 78,134, 97,212, 47,189,244,146, 8,128,253,
+235,175,191, 46, 86, 42,149,104,211,166, 13, 0, 64,163,209,224,248,241,227, 8, 14, 14, 6, 0,220,185,115,167,102,187,177,114,
+202,100,178,231,123,246,236,137,156,156, 28, 36, 37, 37,253,166, 80, 40, 74, 0,252,150,151,151, 55,188,107,215,174, 56,116,232,
+208,136, 6,132,150, 85,215,200, 66,161,245, 39, 78,123,123,251,217, 7, 15, 30,124,251,210,165, 75, 99,102,204,152, 33, 28, 56,
+112, 32, 0,160,162,162, 66, 7,128,181,134, 83,175,215,111, 4, 80,179,114, 54, 59, 59,251,151,233,211,167, 39,124,242,201, 39,
+158,213,229, 83, 37, 31, 77, 84, 1,137, 97,253,222,254,188, 71,215,176,246, 95,174,217,113, 42, 55,175,104,135, 58,229,136,218,
+146,186, 19, 66, 64,211, 52, 56,142,131,155,155,155,182,164,164, 4, 74,165,242,129, 82,169,124, 63, 51, 51,211,170,186, 63,205,
+ 62,111,227,180,113,218, 56,109,156,255,163,176, 60, 50, 60, 33,132,225, 56, 14,241,241,241, 56,120,240, 32,107, 54,155, 39, 40,
+ 20,138,218,209,170,215, 94,191,126, 61,246,165,151, 94,218,150,150,150,198, 79, 78, 78, 6, 33,132,181,166, 52, 6,131,129,166,
+168, 63,239,123,210, 90,110,221,186, 21,133,133,133,230,188,188,188, 51, 12,195, 28,122,194,213,139, 79,188,234,112, 43, 96,124,
+213,100, 58,179,160, 87,175,200,249,177,177,146,119, 63,251,204,248,230, 91,111,205,100, 77, 38,154, 47, 18,113, 98,153,140,199,
+ 74, 36,194,164,115,231,236,214, 76,158,236,166, 55, 26, 79,238,176,194,193,188,218,162,213,175, 95,111,188,249,238, 39,208,215,
+178,104, 37, 94, 77,135,209, 12,171, 44, 90, 70,163, 49, 76,161, 80,192,206,206, 46, 23,128,247, 27,111,188, 1,142,227,160,215,
+235, 81, 81, 81, 1,185, 92,174,126,235,173,183,216, 42,241, 36, 24, 53,106,148,147, 37,188,129,129,129,190, 66,161, 16, 39, 79,
+158,132, 80, 40, 60, 14, 0, 66,161,240,120,108,108,236,240,177, 99,199,194,207,207, 47, 48, 43, 43,139, 66, 35,254,105, 94, 97,
+ 35,247, 18,160, 29, 40,180,125,104,130, 67, 91,207,176,145,183, 41, 32,163, 42,106,124, 74,151, 46, 93, 0, 11,253,178,106,163,
+106,113,199,106,154,166,247,205,154, 53,235,253,238,221,187, 15, 94,176, 96, 1,133,170, 80, 13, 79,136,244,130,130,130, 62,115,
+230,204, 57, 69, 8,121, 68,244, 43,139, 75,207, 62, 23, 61,133,148,151,171,111,170, 82,142,222,177,202, 98,202, 48, 79, 20,206,
+194, 6, 27,108,176,193,134,167,102,213,250, 19,234, 21, 90, 20, 69,109,234,219,183,239, 4, 0,124,138,162, 54,200,229,242, 63,
+ 13,254, 10,133, 34,221,215,215,247,235, 86,173, 90, 77, 4, 64, 40,138,218,100,101,161,138, 8,193,114, 30,143,154,245, 80,220,
+ 53, 41, 64,101,117, 90,146, 89, 0, 40, 30,143,191,237,198,141, 27,159,229,230,230,170, 44,180, 64, 52,136,167,177,234, 16, 0,
+118, 1, 15, 94,201,201, 57, 53, 61, 60,124,208,208,201,147,209,113,232, 80, 39,223, 22, 45, 88,189,217,204,221,185,112,129,186,
+180,127,191,232,102,108,172, 80,111, 52,158, 60, 4,228, 90, 91,206,130,130,130,115,103,227,206,157,126,121,212,240,193,129,173,
+124, 31,138,134, 7,114, 20,151,170, 79, 91, 35,178, 30, 19,189, 35,215,173, 91,119, 84, 36, 18, 9,106,167,178, 49,155,205,165,
+ 70,163, 49, 12, 0,202,202,202,124, 55,109,218,180,155,199,227,229, 52,198,151,156,156,124,100,254,252,249,163,178,179,179, 79,
+231,229,229,101, 3, 64,110,110,110, 54, 77,211,219, 20, 10,197,168,156,156,156, 3,176, 96, 17, 0, 1,218, 37, 93,216,215, 1,
+ 0,194,122,141, 70,210,133,125,118, 0, 58,132,245, 26, 13, 0,104,106, 46,195,218,168, 10,131, 48, 47, 49, 49,113,231,224,193,
+131,223,195, 19,196,244,122, 92,108,153,205,230, 22,143,239,172,182,108, 89, 67,100, 50,153,104,189, 94,207,176, 44, 43, 48,155,
+205,196,100, 50,217,210,215,216,208, 24,108,185, 47,109,248,215,130, 16,210, 21,128,103,245,176, 89,245,238,249,216,182, 9, 85,
+233, 2,171,135,202,170,207, 42,138,162,174,214,226,168,217,111,193,185, 0, 80, 12,224, 54, 69, 81,245, 25, 65, 54,213,247,185,
+ 94,161, 37,151,203, 15,192,130,164,209,150, 30,215, 0,230, 84,229,137, 3,154,158,135,173,134,131,101,217,162,220,220,220, 39,
+190,160, 60, 30,239,193,136, 17, 35,172, 58,190,177, 99,246, 0, 57, 31, 26,141,219, 99,190,251,174,243,201, 13, 27,252, 88,134,
+113,167, 0,194, 23,139, 75, 76, 38, 83,182, 39, 77,223,178,214,146,245,136, 53,230,126,193,144,172,251, 5,104,219,182, 45,185,
+119,239,222,211, 24, 84,111,105,181, 90,255,198,186,128, 78,167,235,109,161, 24,220, 85, 80, 80,176,171, 14,193,190, 91,161, 80,
+236,182,226, 78,145, 81, 37,170,120, 28,197,189, 28,214,107,244,126, 0, 92,117, 82,233,167,137,194,194,194, 52, 84,197,121,251,
+167, 33, 39, 39,199, 72, 81,212, 47,203,151, 47,127,253,230,205,155,123,228,114,185,209, 54, 20,219, 96,131, 13,255,101,145, 69,
+ 81, 84, 76,213,231,232, 42,163, 80,204,227,219,213,199, 84, 31, 87,251,152,106,142,199,247, 55,116, 46, 0,204,158, 61,251,179,
+165, 75,151, 74, 1, 88,154,140,185,201, 73,165,255, 42, 20,253, 67, 56,106,139,130,205,127, 69, 69,191, 3, 76, 96,152,203, 96,
+106,249,228,211, 79,215, 16,113,239,222,189,255,244, 83,107,117, 82,233, 90, 8,255, 95, 29,124,178,179,179,215, 5, 4, 4,108,
+148,203,229, 12,108,176,193,130,251,149,173, 9,108,248,151,194,179, 46, 97, 84,143, 40,139,110,232,251, 71, 30,220,235, 56,174,
+174,207, 20, 69,197, 44, 93,186, 52,218,138,242,214, 88,180,120,182,107,103,131, 13,255,110,252,127,172,164,181,193, 6, 27,108,
+248, 79, 60,121, 60,102,197,170, 22, 95,143,127,158, 61,123,246,103,104,120,198,201, 7, 15,173, 88, 62, 85,159,107,252,181, 40,
+ 60, 92, 57, 80, 23,172, 89, 77, 48,168, 9,245, 59, 99,227,180,113,218, 56,109,156, 54, 78, 27,167,141,243,127,142,179, 49,238,
+ 51,117, 8,162,168,250,166,250, 26,154, 70,124,124,187,177,115, 27, 59,150,162,168,250,194,252, 84, 79, 21, 62,254,254,151, 99,
+144,141,211,198,105,227,180,113,218, 56,109,156, 54, 78, 27,231,147,128, 16,210,149, 16, 18,133,135,211,223,132, 16, 18, 69, 8,
+ 25, 58,123,246,236, 57,213,251,102,207,158, 61,135, 16, 50,176,250,184,170, 99,106,206,169,222,247,248,251,227,251, 26, 58,182,
+129, 34, 78,120,108,187,230,243, 63,197, 71,203, 6, 27,108,176,193, 6, 27,108,176,161, 78, 84,175, 24,172,101,109, 82, 1,184,
+179,116,233,210,178, 90,190, 83, 42, 0,183, 0,116,170, 58, 78, 85, 37,210,106,251, 86,153,170, 62,155,234, 56,198,100,201,177,
+245, 96, 83, 61,219, 54,161, 85, 31, 58,121,243, 22, 7, 52,247,138,168,186, 0, 32, 85, 73,128,185,170,120, 69,164, 58,112, 17,
+199,129, 16, 2,185,178,252,250, 29, 37, 62,111,234,239, 5,249,194,205,203,206,110, 53, 71, 72,175,170, 93,231,212, 37,198, 79,
+146, 52, 40,183,148, 35,184, 25, 66,236,120,152,201, 17,116, 4, 0, 30,133,219, 6, 14, 95,167, 22, 89, 31, 79,170,174,126, 30,
+230,137, 9, 98,123,233, 43,206, 46,174,109,203,202,138, 51,204, 6,227,190,100, 21, 54,162, 9, 14,182,129,174,120,150, 35,248,
+ 12, 0, 79,200,195,202,140, 82,139, 87,114,216, 96,131, 13, 54, 60,169,117,228,137,226,226, 81, 20,197,214,193, 73, 61, 33,167,
+109,161,130, 5, 98,171,142,221,191,215,177,239,234, 63,169,220, 86, 9,173, 80, 79, 76, 6,133,133, 0, 8, 8,190, 72, 86,225,
+ 7,171,206,247,193, 32, 59, 62,127, 11, 0,190,193,204, 78, 39, 28, 18,234,108, 76, 30,250,216,137,248, 43, 1,112, 6,150,125,
+ 39, 89, 97,185,191, 88,152, 31,134, 10, 56,222, 47, 28, 33, 66,150, 35,219, 64, 16,227, 32,194,197,203, 5, 48, 88, 83,214,128,
+230, 94, 17,135,127, 87, 12,142,251, 97, 42,186,119,108, 3,194, 50, 0, 71, 67,218,123, 38,126,251,246, 13,116, 15, 9, 0,225,
+104,128, 99,224, 48,236, 27, 12, 11,119, 38,119,148, 77,203,131, 29,228, 11,183, 22, 30, 94,119, 55,111,222,226,237, 27, 24, 74,
+113,140, 25,105,191,159, 30,247,241,172,249, 3,194,160, 14,183, 68,108,117,244,193,187, 1, 45,219,207,252,100,225, 42,190,143,
+175,191,140,163,141, 76,225,131,148, 46,107, 87,204, 63, 32,226,229,172,188,173,192, 22, 75,251,114,168, 39, 38, 10, 36,226,209,
+246,118,178,182, 58, 93,197, 61,214, 76,239,227, 9, 5, 67,191,254,102,117,231,126,145,195, 29,216,138, 66, 30,205, 33,116,239,
+158,221, 45,190, 91,183,126,248, 93, 5,251, 60, 0,206,154, 58,115, 4,179,210,183, 79, 24, 46, 20,240,169,144,183, 55,243, 1,
+166, 73, 66, 43,196, 11,175, 82, 4,141,134,151, 32, 20,206,167, 40,177,171, 41,191, 17,236,133, 31, 41,130, 32, 80,216, 79, 17,
+236, 78, 86, 65,105, 27,242,108,176,225,191, 5, 30,143, 23,199,113, 92,255,167, 44, 12,158, 37,132, 92,182,181,238,255, 54,172,
+179,104, 81, 88,146,148,153,231, 10,214,140,176,160,192,197,128,117, 66,203,142,207,223,118, 53,163,200, 27,140, 25,155,191,124,
+127,143,137, 6, 24,218, 12,150,161,193, 50, 52, 24,198, 12,150,166, 65,104, 35,230,255, 20, 7,152, 42, 16, 17,222,110, 27,192,
+250, 88,250, 27, 66,194,251,229,250,133,211,110,148, 73,141, 93, 63, 44,253, 48, 79, 85,249,225,153,219,242,226, 80, 47,253,156,
+100, 37,126,182, 70, 16,196,109,152,138, 29,135,142,231,175,249, 81,155,202, 17, 2, 55, 39,251,246,227,162,147,252,183, 31,137,
+203, 91,189,205,144, 10, 0,206, 50,113,251,241,183, 51, 2,158,228, 34,120,217,217,173,222,184,254, 59,111, 31,119,123,138,185,
+180, 12, 12,203,194,191, 69, 20,127,206,148,113, 62, 75,190,221,242, 45, 52,198, 55, 27, 58,191,189, 23, 66, 91,182, 10,153,190,
+237,248,165, 0,173, 70,105, 58,189,243,179, 76, 24, 65,123,251,133, 8, 23, 47, 93,197,159,251,233,212,105, 38, 54,255, 74,154,
+ 18,201,141,141, 53, 33, 94, 56,178,116,217, 55, 29, 7, 12,139,118,224, 42, 85,124,131,182, 50,104,243, 79, 91, 22, 6,119,236,
+ 38,237, 29,222, 92,164,220, 55,137,210, 87,148,194,204,179,147, 12, 8, 27,228,164,127,125, 44,189,121,235,142, 41,201, 74,172,
+181,166,206, 44,249,163,239,113, 92,211,163,174, 83, 4,189,111, 94,142,155,200,202,175,130,176, 52,192,154,107,222,193,210, 32,
+220,195,247,238,147,126, 2,208, 52,161,197, 35, 24,124,230,194, 85,159,162, 66, 69,215,111,191,249,106, 14,185,122,245, 87,176,
+248, 37,165, 20,231,172, 21,152, 0,130, 90,187,243, 79,209, 44,140,121,229,108, 80,245,206, 1, 65,146, 30, 62, 14,212,192, 92,
+ 53,149,112, 62, 83,127,206, 54, 52,217, 96,195,255,139,197,132, 33,132, 8,158, 50,231,112, 66,200,137, 39,164,153, 9,224,221,
+170,237, 45, 0,190,126, 10, 69,107, 14,192,187,106,187, 16, 64,190,173, 7, 60, 17, 30,119,126,111,114, 28, 45, 59, 16, 14,216,
+255, 2, 0,216, 91, 91, 10, 2,216,129,226, 3,180, 22, 35,135, 69,194,195,203, 27,160,117,128, 89, 7,208,122,128,214, 2,180,
+ 30,197,138, 28,192,172, 5,178,126, 5, 67,136,196,234,234, 26,213, 64,250, 62, 12,236, 18, 0, 79,103, 59, 76, 29, 25,234,177,
+233,100,250,150, 45,167,211, 6, 37, 43,241,138, 69,101, 37, 4,221, 59,180,197,154, 45,218,212, 99, 55, 84, 67, 0, 96,120, 39,
+247,147,221, 67, 91,248,175,222,102, 72, 61,113,167,108, 40, 0, 12, 13,115,250,181, 91,123,159, 0,238, 9,194,211,112,132,244,
+246,109,217,150, 98,111,110, 4,167,201,135, 70,163, 71,254,131,237,112,245,123,134,199,114,232,219,216,249,246,124,204,254,104,
+238,114,161, 78, 83,100,226,204, 42,214,147, 95,198, 23,136, 57, 10, 5,231,140,149, 92, 57,251,201,132, 55,152,233,159,127, 57,
+ 27,192,184,134,120, 66,189, 48,101,229,202,213, 29,122, 70, 4,123, 21, 30,152, 74, 85,150, 21,129,225, 75, 37, 35,159,235, 9,
+151,118,161, 92, 81,252, 74, 74, 28, 56, 8, 46,238,129, 40,184,180, 19,217,151, 15, 82,189,186,140,146,252,188, 75,244, 58, 96,
+174, 83,104,181,245, 64,175, 33,125,186,237, 9, 12,240,245, 33,132, 3,199, 17, 16,142, 69,165,129,198,156,189, 89, 96, 89, 22,
+ 47, 13,233, 53, 80, 38,166, 8,199,113, 32,132, 67, 94, 97,137,238,236,149,212,129, 89,101,184, 98,137,165,170,211,179,253,123,
+221,190,126, 57,152, 78, 63,134,136,113, 75, 83, 41,224, 66,173, 62,215,235,198,169,159,131,129,159,154,174,229, 40,176,217, 39,
+151, 33,160,207, 4,254,198, 93, 39, 61,213,170,130,241, 7,182,175,127,249,135,141, 27,119,164, 42, 49,201, 26,145,245,113, 31,
+241,133,111,207,106,220,159, 11,148,169,242,106,217, 41, 91,187,242,134,108, 56,145,252, 81,226,162,238,193,115,143,147,242,132,
+ 76,195, 29,219,184,101,131, 13,127, 47, 8, 33, 79, 93,108,229,228,228,200,159, 68,108,249,249,249,245, 41, 40, 40, 88, 81,237,
+173, 66, 81,212,138,150, 45, 91,206,255,227, 65,245,145,103, 61, 53,203,178,227, 10, 10, 10, 18, 26,226,140,138,138,242, 61,126,
+252,120,171, 90,156,173, 0,180,170,235, 88, 23, 23, 23,182, 71,143, 30,217,199,143, 31,151,219,122, 72,147, 4,151,213, 66, 43,
+ 53,119,223,212, 46, 70, 69, 37, 0,164, 90,112,252, 35, 83,126, 6,154, 93,182,117,225, 27,203,194, 90,186,161, 66,107,194,233,
+107,217, 96, 89, 26, 44,195, 84, 89,182, 24,176, 12,141, 33,157, 60,208,195, 48, 9,107, 99,210,192,176,220,210,134, 56, 31,135,
+153,112,175,118, 30, 52,102, 47,199, 17,177, 68,200, 83, 7,249,187,123, 77,127,169, 19,111,234,200, 48,232,205,204,152,157,241,
+153,103, 83,148,216,108, 17, 39,247,231,240, 68,164,174,125, 44,211,104,221, 27,176, 70,117, 31,212,175,183, 19, 49,170, 65, 23,
+103,161, 66, 71, 35,171,132, 70,161,161, 28, 18, 74, 97, 17, 39, 71,208,177,185,159,143,244,226,158, 79, 31,184,243, 53, 2, 47,
+ 62, 35, 18,243, 24,176, 28,225,147,242,100,163, 91,112,164,176,218,111,171,161,114,218, 75, 29,223,232, 51, 56,202, 57,119,231,
+ 4,202, 62,104, 8,188,186,248,227, 65,194, 86, 40,175,197,160, 68,158, 77, 57, 25,202,209,204,189, 13,134,141,123, 5, 95,191,
+210, 21, 21,154, 10,240, 21,153,206, 98,161,196, 5, 48,215,201, 73, 88,140, 91,185,252, 75, 31, 1,159,247,176, 61,171, 95, 44,
+ 13,189,209, 8,176, 12,236, 4, 28, 40, 82,253, 29, 13,150, 54, 75, 59,142,250,244,125,128,189,210, 88,221, 83,148,216, 21,234,
+137,222,224,232, 96, 66,235, 65, 1, 23,146, 85,127,136,159, 16, 47,188,250,204,144,183,122, 19, 10,231,155,114,141,194,221, 17,
+ 29,209,202, 65, 38,211,164, 34,127,255,135,200,132, 29,105,214,243, 93,188,250,246, 20,233,166, 77,155, 70, 0,100, 50, 30,245,
+ 81,171,225, 12,110,198,159, 72,179,152, 15, 0,122,154,108,117, 20, 83,111,175,220,157,232, 14,254, 31, 25, 30,170, 45, 89,153,
+ 37, 92,153, 57,110, 94,218,179,211, 99,250,117,184,217, 47,143,162, 36,185,231,238, 25,213,214,244, 37, 43, 97,227,180,113,254,
+229,156, 78, 78, 78,173, 91,182,108, 57,159,166,233, 62, 34,145,168,153,217,108, 6,199,113,133, 98,177,248,124,118,118,246, 34,
+141, 70,115,255,159, 86,247,219,183,111, 91, 35,182, 26,229, 20, 10,133, 72, 75, 75,187,103,133,216, 58,243,216,249,191, 92,184,
+112, 1,123,247,238, 5, 0,164,167,167,163, 93,187,118,178,186, 78,124,240,224,129,172, 95,191,126,191, 0,240,111,136,243,206,
+157, 59,173,143, 29, 59,134,253,251,247, 3, 0,210,210,210, 16, 20, 20, 84,103, 97, 46, 92,184,192,127,237,181,215, 90, 3,144,
+255, 13,215,232,191, 32,178,106,191,255, 33,180, 98, 98, 98, 72,116,116, 52,245,248,118, 29,200, 10,112, 21,119,129,129, 5,128,
+ 44,107, 75,144, 82,132,229,107,182,159, 26,250,219,254,117,125,236, 68, 60, 44,216, 60, 61, 79, 85, 90,241,172,128,122, 56,253,
+194, 16,240, 92, 29,196,137, 75,199,119, 10, 40,171, 52,224,232,239, 5, 9,201, 74,235, 76,164,201, 10,196, 2,156,203,195, 79,
+ 44, 12,122,101,208,248,175, 99,119,239,158, 61,180,227, 39, 35, 59,226,200,165,236, 79, 0,166,209,168,239,132,227, 64, 56,166,
+198,249,189,234,209, 1,224, 30, 77,224,203,129, 60,220,199, 89,103,209,234, 11, 8,202,188, 48,204, 81, 42,254,126,226,196,247,
+156,104, 85, 6, 74, 77, 34,228,149, 25, 80,168, 23,162, 82,224,133,130,212, 59, 44,143, 66,108,163, 38, 23, 10, 26,194, 24, 92,
+ 92,197, 14,188,240,200,247,253, 52, 39, 63, 43, 19, 83, 12,223,233,197, 37, 46,197,191,173,202,102,180, 42, 45, 69,161,209,240,
+243,206,206, 46,237, 12, 37,217,124,117, 89, 49, 92,188,195, 48,116, 76, 52,190,136, 10, 69,133, 70, 11, 85,105, 34,105,235,227,
+ 68,229,156,223,129,185,195, 66, 80, 82,164,128,145, 6, 40,173,177,212, 96, 50, 84,214,219,142, 60,108,252,120,198,172, 87, 91,
+248,120,202,170, 23, 21, 16,142, 69,167,144, 64, 68,246,233,142,216, 11, 23,113,245, 78, 58,184,170, 69, 5,132,227,144,175, 44,
+ 43, 50,152,217,173, 86, 53, 40,203,128,208,134, 58,133, 24,154, 48,101, 24,238, 5, 41, 11,124,222,181,181,227, 59,179,163, 91,
+ 56,202, 36, 20, 12, 52, 11,131,137, 70,197,197,239,225,222,178, 3,164,118,118, 84, 23,232, 5, 55, 80,119,219, 26,104,204,191,
+175, 40,247, 65,101, 33, 94,139, 12,251,104,219,210, 15,100,148,221,195,174, 73,179,143, 90,178, 46, 46,236,122,234,181,197,135,
+227,246,238, 27,235,251,245,204, 55,250, 13,153,182, 53, 14,192, 73,219,184,101,195,191, 17, 47,191,252,178, 93, 81, 81, 81,188,
+191,191,127,104,100,100,164,180,119,239,222,208,106,181, 56,125,250, 52,180, 90,109, 11,127,127,255, 22,167, 79,159, 30,149,155,
+155,155,220,188,121,243,126,251,247,239,183,216,135,182, 74, 0,241,107,134, 96,128,161, 40, 10, 85,251,168,170,125, 77,206,115,
+ 43, 22,139,145,147,147,243,212, 45, 91, 5, 5, 5,247,154, 98,217,170,172,172, 20,249,249,249,193,211,211, 19, 44,203, 66,171,
+213,226,240,225,195, 80,171,213,224, 56, 14,246,246,246, 88,178,114, 51, 82,111,196,227,202,149, 43, 80,171,213,162,198, 56,243,
+243,243,169, 78,157, 58,193,104, 52,130, 97, 24, 24, 12, 6,156, 57,115,166,230,179, 64, 32,192,172,197,223, 34,253, 90, 60,110,
+222,188,137,252,252,252,191, 37,219,136, 21, 90,228,159,136,122, 99,102,253,237,171, 14, 89,150,153,179,105,219,238,196, 57,147,
+ 94,193,148,177,131,252, 23,173, 59, 56, 40,165, 24,219, 0, 32,196, 3,227, 95,239,223, 54,192, 69, 42,196, 23, 59,175, 1,132,
+204,121,210,223, 75, 42, 69,122,104, 51,238,147, 67, 87,114,226, 63,123,165, 11, 2,125,156,218,149,137, 75,197, 89, 89, 22,228,
+ 20,228, 24,184, 58, 72,218, 15,239,228,126, 18, 28, 7, 23, 71, 73, 48, 88, 6, 46, 14,146,246, 67,195,156,126, 5, 0, 39,169,
+ 48,184, 46,203, 87,125,136,240, 23, 78,144, 74, 4, 19,100,142, 46, 1,111,142,136,180, 31, 62, 98,148,189,131,144, 65,201,149,
+211,208, 8,155,131,118,107, 1, 35, 93,138,252,251,153,236,111,151, 83, 10,138, 43,140,211, 27, 45, 38, 65, 66,193,253, 52,207,
+214, 29, 35, 93,139, 99,230, 42, 91,191,181,179, 21, 15, 28,175, 98,199,139, 69, 50,175,110,246,191,103,221,175,228, 72,157, 22,
+157, 71,160, 81,171,179,105, 22, 62,122, 86,224,152, 25,247, 51,102, 15,235,128,178, 82, 37, 12,102, 6,106, 61, 99,246,118,177,
+147, 24,239,223,133,209,204,192, 68,115, 16,186,248,225,116,226,157, 98,142,166,127,173,143, 51,171, 4, 55,179, 14,223,116,168,
+189, 47,208, 3,157, 62,117,178,191, 9, 90,143,156,124, 57,182, 29, 79,236,146, 85,130,155, 79,114,157, 9,199, 60,156,126,174,
+101,201,162, 8,122, 55,197, 9, 62,216, 11,221, 68,118,162,239, 86,124,242, 90,232,115, 65,110, 18, 46, 63, 17, 20,103,134,140,
+ 21, 64, 47,102,225,236, 31, 8,206, 84, 65,116, 6, 67,121, 18,208,208,197,231, 3, 0, 49,107,241,245, 27, 97, 50,202, 53, 16,
+108,214, 73, 8, 58, 79, 0, 93,101,237,207, 44,225,238,152,227,230,165,246,152,113,172,239,226,216,254, 41,242,227, 11, 82,252,
+ 94,254,190, 19,176,181,165,237,118,109,195,191, 17,237,219,183,247, 46, 40, 40, 72,154, 49, 99,134,219,139, 47,190,136, 67,135,
+ 14, 65,163,209, 96,235,214,173, 88,189,122, 53, 22, 46, 92, 8,154,166,177,105,211, 38,233,129, 3, 7,186,173, 95,191, 62, 63,
+ 32, 32, 32, 44, 55, 55,183,176, 17,129, 69, 1,144, 0, 16, 86,221,187, 40, 0,220,137, 19, 39, 48,124,248,112,156, 56,113,130,
+171,218,199,226,225,195, 79,147,114,127,138,197, 98,136,197, 98,168,213,234,167, 34,182,132, 66, 33, 28, 28, 28, 32, 22,139, 81,
+ 81, 81, 97,181,216, 98, 24,134,159,159,159, 15,181, 90,141,200, 17, 35,240,237,210,165,232,223,191, 63, 34, 35, 35, 65, 8,193,
+153, 51,103, 48,168,103, 56, 94,121,190, 31, 82, 82, 82,192, 48,140, 69,229, 45, 44, 44, 68, 81, 81, 17,134,142, 24,129,205,235,
+215,163,123,247,238,104,223,190, 61, 24,134, 65,124,124, 60, 94, 30,210, 19,118, 47, 12, 66,122,122,186,173, 83, 91,110,205,122,
+ 42, 62, 90, 79,140, 36, 21, 46,115, 71,206,197,140, 29,210, 45,122, 68,175, 80,108,222,243,219,151,240,212,236, 6, 0,119,163,
+100,201, 27,253, 3,145,156, 91,134,223,110,202, 99, 82,138,241, 84, 86,107,112, 44, 60,220,157,164, 0, 95, 12,189,153, 99,156,
+178, 26,119, 96,230, 8,129,180,207,167,120,125, 68,178,127,247, 80,127,255,234, 85,135, 14,195, 87, 97,252,157,123, 1, 93,219,
+123, 7,128,165, 1,150,134,211, 43, 59,129,197,178, 70,203,209,179,149, 56,246,227,169, 83,123, 12,123, 97,140,189, 88,234, 12,
+ 86,147, 7,186,240, 14, 74, 50, 18,160,149,182, 67, 97, 78, 22,246,158,186,162,206,200, 47,209,240,120, 56, 93,164, 54,206,204,
+ 42, 67,101, 99,188, 6, 26, 75,231,207,157, 30,181,119,247, 30, 71, 73, 96, 47, 42,243,251,225,106,177,128,145,120,182,122,134,
+167,179,243, 32, 95,109,221,227,164, 53, 97, 89, 99, 60, 58,173,230,224,153,211, 39, 95,105,219,186,151,227,131,171,199,161, 55,
+ 24, 97,164,129,176,110,253,192,178, 68, 76,241, 40,206,137,207,167,148, 37,101,160,104,182,232,252,173, 7,138, 11,183,178,248,
+ 70, 71, 44,107, 48,186,200,227,234,158,226,127, 52,162, 95,103,128,214,227,249, 62, 29,240,237,142,223, 62, 4,216,183,158,236,
+ 34, 63,180,104, 17,160, 87,168, 39, 54, 16,130, 94,215, 14,175, 14,142,120,225, 99, 88, 99,209, 10,243,192,176,144,214,190, 63,
+127,187,228, 83, 55,247,230,237,248, 20, 71,131,120,119, 4, 52,249,132,202, 79,132,179, 95,119,176,190, 61,177,105,237, 55,149,
+ 28, 71,118,163,129,208, 22, 44, 7,112,185,231,192,166, 30, 66, 86, 86, 22, 60, 90, 92, 3, 40, 30, 72,203, 7, 48, 51, 15, 79,
+ 51,154,201,241, 53, 91,143,245,159, 57, 96,105,216,136, 96, 65, 64,226,173, 76,229,152,183,125,165,207, 6,240,131,146, 21, 50,
+ 94,177, 86,203,217,198, 47, 27,254, 77, 48, 24, 12, 7,151, 47, 95,238, 22, 29, 29, 93,109,145, 65, 98, 98, 34,182,108,217, 2,
+153,236,209,113,114,248,240,225, 32,132,184, 45, 88,176,224, 32,128,231,234,227,236,209,163,199,136,155, 55,111,202, 59,119,238,
+156, 85, 37,182, 68, 0,120,119,239,222,229,229,229,229, 81,174,174,174,196,215,215,151,150,203,229, 28, 0,246,237,183,223,230,
+239,219,183,175,173, 86,171, 61,215, 84,161, 37, 22,139,159,138,207,150, 80, 40, 4, 69, 81, 16,139,197, 16,137, 68, 32,132, 88,
+ 37,182, 88,150, 21,156, 56,113, 2,215,174, 93,195,194,206,157,241,137,159, 31,220,220,220, 16, 31, 31, 15, 66, 8,100, 50, 25,
+ 74, 75, 75,177,123,247,110, 12, 24, 48, 0, 12,195,136, 44,225,221,191,127, 63,174, 95,191,142,197, 17, 17,248,196,217, 25, 14,
+ 14, 14, 56,115,230,225,108,160, 68, 34, 65, 78, 78, 14,206,156, 57,131,126,253,250,217, 58,245, 19,194,226,206,211, 23, 16,148,
+ 82,240, 54,155,244, 32, 12, 1, 40,248,134,132, 64,148,146,242,168,115,142, 37,224,241, 48,119,237,182,152,168, 85, 31,143,160,
+ 38,140,236,226,187,232,231,184,201, 0,240,206, 75, 65,126, 82,137, 0,107,142, 36, 19, 30, 15,115,159, 70, 5, 67, 66, 32,162,
+ 74, 48, 57,178,123,123,200,203, 77,200,148,151,159, 77, 1, 44,202,226,252,219,170,215,177,253,104,124,222,234,237,134, 84, 66,
+ 8, 92, 28, 36,237,199,223,206, 12,248,249,196,245,220,149,123, 13,169,132, 35,112,145, 10,131,223, 74,233,217,232,170,195, 8,
+127,225,132,105,211,167,247, 28,249,214, 12, 59, 38,117, 31, 76,153,167,192,153,245,208,152, 69, 40,231,123, 35, 63, 55, 23, 95,
+109,138,201,211,104, 77,175, 36,169,172, 19,152, 25, 37,168, 20, 80,154, 23,191,250,226,179,216,165, 75, 22, 56,232,179,226, 43,
+249, 20,163,231,183,236, 43, 88,178,112, 21, 85, 97, 52,141,201, 42, 67, 69, 99, 60, 70, 71, 44, 91,190,114,109,212,123,227, 70,
+165, 6,181,235,235,206,202,239,187, 27, 52, 26,229,206,147,215,189,171,158, 20, 41, 0,200,204, 47,129, 74,173,101, 88,134, 62,
+231, 40,196,162,100, 75,172,131, 85,104,237, 5,207,232, 94, 97,175,121, 58,138,160,175, 44,135,151,163, 16, 67,186,183,121,141,
+254, 61,253,211,251, 74,107,228,218,227, 66,139, 6,161,245,184,188,108, 64, 48, 97,233, 96,176, 52,204,183,127,177,222, 50, 70,
+225,147, 41,125, 28,156, 92, 77, 15,120,208,202, 0,123, 15, 80, 78, 45, 0,231, 86,148, 48,100, 12,228, 89, 73,204,135,175,141,
+ 43,185,159,157,255,163,135,125,195,211,218, 52, 71,192,101,199,163,178, 40, 19,119,229,102,132, 41, 31,206,182, 59, 21,221, 0,
+107,139,152, 99,195,127, 20, 57, 57, 57,111,204,153, 51,231, 66,247,238,221,155,121,120,120,160, 67,135, 14, 56,122,244, 40,102,
+204,152, 81,115, 76,231,206,157, 65, 8, 65,105,105, 41,150, 47, 95, 94, 40,151,203,223,104,240, 1, 61, 41, 41,117,251,246,237,
+125, 66, 67, 67,205, 34,145,168, 28,128,164,188,188,220,174,180,180,148, 50, 24, 12,224, 56,142,115,118,118,102,229,114, 57,253,
+202, 43,175, 24, 47, 93,186,212, 70,171,213,230, 60,137, 69,203,223,223,255,110, 73, 73,137,154,162,168, 39, 14,253, 80, 45,178,
+ 60, 60, 60, 60, 43, 43, 43, 57, 0,101, 77, 9,253,192, 48, 12, 34, 34, 34,112, 42,225, 6, 78,252,118, 9, 26,121, 26, 38,191,
+247, 6, 58,116,232,128, 83,167, 78, 53,249,154,117,234,212, 9, 39,207, 92,192,133,107,183,144,147,126, 27, 31, 78,126, 15, 97,
+ 97, 97, 56,121,210,230,189, 96, 5,142,227, 81,223,172,227,143, 11,173,126, 49, 49, 49,213, 67,255,159,228,107,176, 7, 58, 9,
+ 93,196,191, 44, 24,214, 38, 68, 24,185, 0,148,208, 30,251,218,157,236, 57,247,171,239, 83,249, 94, 57,227,238, 42, 27, 95, 29,
+246,200,159, 70,137, 36,114, 37,117,215,173,148,224,215,158,239,238,143,205, 71,165,159, 3,192,152,222,173,241,123,134, 10, 87,
+210,149,187,146, 85, 72,122,210, 90,135,123, 65,202, 22, 99,215,242,143, 70,246,107,209,220, 27, 91, 14, 93, 0, 69,225,160, 69,
+ 55, 92, 66, 72,247,208, 22, 88,189,253,241, 21,134,222, 1, 43,247, 26, 82, 79, 39, 85, 12, 3,128,200, 96,233,175, 93,219,184,
+ 6,144,218,142, 91,117,192, 94, 44,152, 56,108,212,235,118, 76,250, 81, 32,251, 12, 40,198, 8,189,153,131,162,184, 2, 58,103,
+127,196, 39,222,210,171, 13,166,143,147, 85, 77,179,226,165, 20, 35, 75,116,245, 86,110,165, 86,239, 35,245,108, 99,224,243, 56,
+174,210, 72,240,123,114,182, 38,185, 16,105,150,112,100,101,193,244,172, 31,211,123,195,182,189,243,133, 34,241, 24, 62, 5,202,
+203, 69,230,185, 97,213, 98, 56, 58, 58,128, 51, 85, 2, 90, 21, 94,252,224, 43,213, 93, 57,221, 26, 0,218,185,195,161,119,107,
+225, 54, 1,143,202,143,203, 52,207,107,236, 55, 40, 26,147,198, 13,233, 44,228, 76, 90,124,180,124, 15, 54,126, 58, 18,175, 15,
+ 12, 17, 30,191,152, 62, 9,192,162,166, 94,107,194, 50, 32,180, 30,207,125,150,144, 74, 1, 23, 8,208,235,218,222, 37,193,192,
+ 13,139, 57,186, 0, 66, 86, 64,133,116, 12,144,137,184,252,139,224,242, 47, 18,190,127, 79, 80, 1,125, 40,202, 59,130,124,183,
+ 98,161,118,243,230, 45,167, 57, 30,190,176, 32, 84, 6, 88, 14, 40, 78,191, 0,147,201, 4,154, 5, 12, 6, 3,180, 90, 45,100,
+153, 39,107,124,180, 68, 66,106,232,212, 55, 71,116, 34,149,114,221,177, 84, 38,119,203,123,193,207,145, 74,185,238,114, 46,155,
+ 94,172, 53,218,172, 89, 54,252, 27,145, 37,151,203,135, 14, 31, 62,252,183, 83,167, 78,185,133,135,135, 3, 0,174, 93,187,246,
+240,161, 51, 34, 2, 65, 65, 65, 40, 42, 42,194,216,177, 99,139, 21, 10,197, 80, 52,226,243, 91, 81, 81,113,127,255,254,253,205,
+180, 90,109,231,121,243,230, 41, 91,180,104,161, 49, 24, 12, 84,121,121, 57,199, 48, 12, 92, 93, 93,197,157, 59,119, 70,143, 30,
+ 61, 42, 19, 19, 19, 91,230,229,229, 85, 0,200,110, 74,225, 71,142, 28,137,132,132,135,139,246,158, 70, 92, 45,145, 72,132,240,
+240,112,191,172,172,172,130,170,123,139,213, 99,124,237,219,203,173, 91,183,112,238, 70, 62, 4, 38, 61,196, 42, 57, 46, 31,218,
+143, 17, 19,223, 7,195, 52, 61,183,252,173, 91,183,112,248,204,101,200, 36, 2,164,165, 37, 97,255,254,253,152, 60,121,242, 19,
+113, 54, 17, 13,106,145,127, 56, 20,168,199, 79, 75, 0, 0,209,209,209,231,170,173, 21,181, 17, 24, 8,177,164, 18, 11, 34,187,
+248,205, 26,211,171, 13,159,214,200,193,177, 28,248, 66,192,203,195, 9,191,252,178,171,245,174, 61,123, 18,215,175, 91,191,150,
+ 99,152,185,119,149,208, 89, 81,168, 5,171,246, 92, 24,243,203,244,126,130,201,195,130,221, 0, 64, 36,224, 97,205,209, 36, 6,
+192,130, 39,169,237,179,126,197,208, 97,164, 0, 0, 32, 0, 73, 68, 65, 84,176,171,164, 49,193,203,221,249,243, 57,239, 70,185,
+245,139, 8,194,185, 43,119,177,118,127, 98,130, 88,137,237, 22,119,110,142,198,227,250,169,174, 85,135,224, 26,247,187,100, 89,
+226, 45,146,185,194,156, 29, 7,152, 13, 48, 24,205,200, 43, 97,145, 87,106,128, 64, 42,194,181,244,124,189,123, 33, 98,158,160,
+218,148, 76,106,231, 59,255,203,149,205, 13,250, 74, 70, 83, 86,204,136,196,151,133, 82,123,137,194, 26, 87,133,203, 5, 48,244,
+105, 37,124, 6,224,248, 98, 59,162,251,108,218,155,178,130,228, 83,104,203,147,131, 34, 4,246, 33, 81,112,180,231,139,122,181,
+ 20,230, 2,128, 76, 38, 21, 47,255, 98,134,243,199,159,126,209,168, 15, 88, 8, 32, 10, 10,244,254, 56,188,133, 43, 18,174,167,
+ 34,225, 78, 78, 82,194,181,180,176,254, 29,124, 17,212,220,101,170,184,172,124, 89, 10,172,183,144, 62,188, 48, 12, 64, 27,106,
+ 86, 29,134,120,225,213,174, 99,230,213,183,218,176, 78,180, 2,184,116,150,128,226,243, 1,138,247,112, 5,100,222, 69, 8, 92,
+ 2,201,174,189,135,117, 91,182,108, 95,156, 82,108,249,226, 12,154, 5,171,209,104, 32,147,201,112, 50,157, 49,190, 62, 68, 36,
+225,241,120,200, 75,191,241,135, 51,188, 27, 47, 84,212,127, 73,240,197,133, 93, 79, 57,138, 41,137,111,212, 23, 33,204,157,237,
+249, 77,189, 73,216, 96,195, 63, 1,106,181,250,118, 74, 74,202,144,142, 29, 59,110,253,232,163,143, 28,199,141, 27,231,251,222,
+123,239,241, 0,160,168,168,136, 91,189,122,181,252,187,239,190, 83, 23, 23, 23,191, 69,211,180, 37,161, 76,136, 66,161,184,244,
+227,143, 63,170,206,159, 63, 31,214,173, 91, 55,201, 51,207, 60,195,185,186,186, 10, 36, 18, 9,107, 50,153, 12,233,233,233,108,
+ 86, 86,150, 79,121,121,249, 61, 0,153,104, 66,198,138, 42,235,213, 34, 62,159, 63,159, 16, 18,254, 52,124,180,164, 82,169, 47,
+128,123, 20, 69,181,181,118,218,240, 79, 55,108,129, 0,101,101,101,208, 21, 38,193, 46, 63, 3, 29,101, 60,132,186, 58,192,201,
+201,233,137, 68,145, 90,173, 6,180, 5,184,112,225, 22,192, 48,112,118,118,134,179,179,243,223, 46,180,234,211, 34,255, 18, 76,
+168, 99, 95,195, 62, 90,161,158,152,108,111,194,234,137, 81,109, 68,173, 2,154,195,152,127, 13,183,242, 42, 49,247,217,110,201,
+124,137,163, 97,226, 27, 35, 35, 70,189,220, 18,253,122,116,165, 90,249, 56, 79, 93,182,234,135, 15, 66, 81, 60, 35, 89,137, 53,
+150,148, 40, 89,133,251, 28,148, 91,226,110,231, 79,106, 46,213,131,227, 8,226,238, 40,112, 39,187,108, 75,170, 10,247,173,169,
+ 93,168, 15, 6, 9,192,219, 67, 8,177,115,150,201, 42, 66,131,154,123, 12,122,174, 19,111,104,223, 8,136,248,192,133,223,111,
+225,147, 85, 7, 47,115, 28,137,186, 97,225,180,225,195, 21,134,143, 10,168,135, 43, 12,233, 71, 86, 24, 18, 66,200,195, 85,135,
+ 13, 27, 31,248,124,170, 80,151,115,213, 91,232,222, 14,250,204, 56,100,151,113,200, 81, 86, 64, 35,240,134,177,160, 0, 32, 92,
+238,185,134, 29,171, 27,132,135,135,135, 87,235,208,160, 54,223,111,219, 15,179, 78,141,251,241, 91, 81, 89,166,192,146, 13, 71,
+219,248,249,185,247, 45, 40, 40, 56,103,197, 96, 19,244, 91,204, 46, 47, 16,128, 47,148,224,248,250,189, 40,118,183,135,135, 84,
+ 4, 78,175,194,196,143,199, 57, 15,139, 28,231, 12, 0, 57,105, 55,209, 66,170,183,136,215,236,142, 81, 99,250,183,119, 1,173,
+199,182,147, 55, 13, 60, 96,232,246,211, 73,153,253,131, 93,236,198,244,106,225,186, 72, 94,254, 18, 74,154, 22, 84,180,218,162,
+ 85, 99,225,107,194,106,195,253, 0, 27,204, 33,115,207, 37,165,236,229,200,103,164, 34, 1, 69,145,202, 2, 16,123, 15,252,176,
+109, 95,165,152,182, 46, 19, 59, 7, 44,234,190,244,254,252,135,253, 4, 91,135, 45,189,246,110,236,231,207,122, 22, 22, 22,194,
+ 92, 53,119,120,191,148, 59,251, 70,100, 40,155,175,230, 76,167,151,189,248, 50,101,239, 41,158,249,245,246,120, 2,216,162, 73,
+219,240,175,134, 94,175,191,174,215,235, 59,204,156, 57,243,213,207, 62,251,172,143, 76, 38,107, 13, 0, 90,173,246, 62, 77,211,
+ 9, 85,255, 79,107, 86, 7, 18, 0,247, 50, 51, 51,239,103,102,102, 54,219,177, 99,135, 11, 0,187,170,239, 12, 0,202, 1, 20,
+225, 9, 86, 28, 86,139, 42,138,162,230, 63,173,118,168, 22, 85, 20, 69,181,109,202,249, 60, 30,143,165, 40, 10, 20, 69, 65, 34,
+145,224,252,249,243, 24, 29, 21,137,148,227,229, 8,119,113, 64,183,183, 38, 98, 79,108, 44,248,124, 62, 40,138, 2,159,207,183,
+234, 62, 34, 16, 8,112,225,194, 5,188, 62,246,101, 72, 4,128,179,179, 51,102,206,156,137, 35, 71,142, 64, 32,176,101,233,179,
+ 2,155,106, 9, 46, 11,227,104, 81, 88, 20,187,245, 43, 17, 88, 26,199,182,126,131,152,255, 99,239,188,195,162,184,218, 40,126,
+166,108, 99, 89, 58, 75, 47, 34, 17, 16,197,222,149,168,177, 37, 17, 99,139, 45, 49,182,168,196,104,212,152,216,141,198, 24,187,
+ 17, 99, 47,201,103,239,198,130, 73, 84, 18,123, 65,197, 2, 34, 32, 40, 74,239,157, 93,182, 76,249,254,160, 4,148,178,139,166,
+153,249, 61,207, 60,179,101,246,236,204,220,221,185,103,222,123,239,123, 35,138,180,209,153,152,231,147,137,160, 35, 40,228, 50,
+191,219, 29,120,238, 74,196,170,177,195, 2,228,111,117,239,133,183,186,117,167,155,182,237,186, 0,168, 98,180,122,162,150, 92,
+ 27, 44,135,111,182,253, 26, 53,241,224,133, 24, 2,186, 66, 12,235,221,150,103, 57,124, 83,199,193,188,160,105, 97,162, 56,120,
+229,250,117, 43,232,138,240,244,238,239,178, 6, 13,223, 0, 88, 29, 98, 99, 31, 97,253,174,159,184, 11, 55,163,247,104, 25,124,
+246, 56, 23,197,134,106,150,214,148, 12, 44, 76, 37, 62,111, 55, 53,255,133, 3, 15, 75,185,184, 49,207,177,176,148,139, 26,247,
+106, 44,255,133,231,121,222,204, 68,212,152,103,245,117,106,170,181,204,214, 93, 63,238, 88, 51,110,220, 56,211,172,164, 52,164,
+ 20, 68,160, 72,226, 12,189,220, 21,113,119, 47,169, 85, 26,198,144, 74,188,198,243,153,149,149,149, 17, 22,154,131,131, 91,150,
+ 65,175,213, 32, 35,169,212,171,166,100, 21,192,220,214,249,122,114,114,178,193,154, 58,134,203, 31,244,225, 4,177,137, 25, 76,
+ 70, 14, 10,144,196,101,107,208,202,201,172,244,162, 81,148,137,135, 33, 87,208,173,172,143,233,227, 68, 18,238, 45,156, 12,218,
+ 79, 51,153,248,179,119, 90, 59,227, 73, 66, 42, 46, 63, 72,222,245, 36, 7, 41,108, 84,234,174,184,148,188,192,254, 29,220,176,
+246, 68,228, 20, 64,191,223,152, 99,247,181,195, 8,158, 71,151,210,206,240,106,240, 64, 23, 95, 59,140, 48,112,164,225, 11,154,
+180, 24, 31,172,249,229,217,252,195,183,178,250,207,252,192,223,188, 83,167,119, 37, 96,180, 40, 84,107,244, 15,243, 80, 96,140,
+102,129,154,219, 10, 96,107,249, 27, 97, 73,220, 30,255,133,215, 47,237, 31,239,170, 44,247,234,151,226, 52,215, 1, 92, 31,219,
+222,100,129,184,251, 18,159,235,139,219,159, 9, 79,229,246, 94,138,171,200,161, 85,231,255,168,158, 8,154,130,230, 95,161,201,
+ 2,216,163,215,235,247,228,229,229,189, 74,205, 20,188,152,215,233,165,142,189,114, 51, 33,207,243,116, 89, 52,171,174,206,240,
+181,106, 86,110, 38,228,121,254,231,178,104, 86, 93, 81,173, 42,154, 28,199,165,180,105,211,198,186, 95,191,126, 96, 89, 22,143,
+ 30, 61,194,179,196, 68,244, 12,156, 2, 75, 75, 75, 92,186,127, 31,209,209,209,248,234,171,175,160,215,235,113,252,248,241,164,
+186, 52,105,154,214,189,241,198, 27,226, 1, 3, 6,128, 97, 24, 60,126,252, 24,201,201,201,152, 62,125, 58, 44, 44, 44, 16, 22,
+ 22, 86,161,153,149,149, 5,154,166,117,213, 68,183,254,140,223,210,191,157, 23, 76, 86,237, 70, 11, 96,193,234,145,127,110, 33,
+214, 93,134, 78,167, 71,227,200, 76,196, 71,254, 17,145,218, 76,133,222, 63,117, 63, 34,234, 73,216,213,183, 36,200, 8,135,177,
+119, 18,143,178,145,106, 38, 43, 44,132,174,208, 28,143,127, 65,124,122, 97,209,163,108,164, 26,125,199,192,177, 4,116, 42, 32,
+245, 54,174, 93,186,136, 11, 55,238,225, 86,120, 20,123, 45, 44,230, 32,201,225,155,135,217,120, 84,143,187, 16, 40,250,174,197,
+232,240, 88,183,182,222,246,110, 96, 25,240,156, 30, 22,195,246, 99, 76,100, 39,183,182,158,150,110,165,145, 44, 61,172, 62,254,
+ 29, 88, 35,171, 85,239,118,162,126,155,228,196,153,193,133,121,217, 29,122,116,237,104,106,225,251, 14,178, 98, 99,240,232,222,
+ 21,117, 88, 68,220,181,219,137,250,109, 47, 83,186,206,206,206,111,246,232,234,131, 97, 19,231, 64,167,202,199,227, 11, 63,162,
+ 40, 39, 13,151,175, 43, 16, 85, 80,208, 17,128,193, 17,173,235, 9, 76, 83, 36,228,162,115, 3, 81,130, 25, 52, 14, 31, 5,244,
+131,148, 40, 1,167, 41, 0,161,202, 66, 92,178, 54,127,240,150, 68, 22, 0,228, 82,130, 54,229,243,205, 13,138, 60,186,219,120,
+201, 41, 61,118,159,123, 0,142, 43,157,190,137,227,176,121,247,239,113,129,223,140,108,133, 38,110, 86, 45,238, 38,103, 16, 48,
+ 34,228, 79,240,240,191,117,240,235,198, 37,191, 45, 0, 56, 29,174, 76,181,110,236,191, 46,199, 31,245,156,110, 39, 34, 5,201,
+ 0, 2, 65,171,182, 78, 93,247,235,130, 54,231, 34,187,204,248,184,191, 57,248, 87, 50, 66, 55, 38, 50,141,125,179,253,242,103,
+103, 56,190,106,123,110,105,100,203,151, 79, 41,224,239, 94,138,211, 8, 89,225, 5, 4, 4, 0, 0, 69, 69, 69, 19,199,140, 25,
+179, 85, 36, 18, 41, 1, 16, 28,199,129,227, 56,122,213,170, 85, 34,150,101, 73,146, 36, 89,138,162,152,159,127,254, 89,207,178,
+108,102, 73, 73,201,196,186, 52, 25,134,137,155, 52,105,210, 27,117,141, 80, 60,112,224, 64,185,201,138, 19, 74,194, 32,147, 85,
+121, 93, 17,229,162,107, 9,210,126,221,121,228,194,133, 0, 8,240, 88, 20,153,137,248,231, 55, 9,207, 65, 74, 19, 74, 55,189,
+105,219,174, 11,203, 63, 99,236,158,149,176,236,251,109,155,121, 31, 0, 0, 13,207,142,172,207,209, 21,104,212, 67, 91,182,237,
+120,144,227,121,154,225,249, 29, 36,135,163, 37, 12, 30, 26, 50,210,174, 38, 82, 50,242,194,222,241,179,224,129,210, 38,195,138,
+230,194,178, 52, 14, 60,207,243, 21,205,133,171,101,200,202,215,212,153, 7,234,106,188,182,151,150,185, 53,225,236,213,187, 19,
+ 89,150,119,160, 40, 34, 77,173,101,182,190,172,201, 2,128,228,228,228,139, 33,231,146,207,222,111, 97,223,219, 86, 94, 22,229,
+ 82, 1, 89, 42,156, 77,206, 44,186, 88, 31,205,220, 98,125,255,185, 65, 39, 78, 74, 68, 20, 13,158, 47, 77, 40,202,243, 40,209,
+177, 57,215, 19,152,166, 0,208,204, 26, 78, 95, 30,103, 14, 80, 20,241,172, 46,189,208,232,212,181,195,150,135,124,241,224,105,
+238,142,167,121,136, 0,128,167,121,136, 56,116, 37,126, 65, 92, 90,225, 23, 17,207,114, 87,195,200,126, 21, 60,129,203,109,135,
+ 45,124,225,181,151, 61,159, 81,169,184, 7, 96, 32,144,212,107,216,140,245, 51, 8, 2,175,106,250,137, 24,181,142,119,127,254,
+197,242,200,150,112,173, 18, 16,248,103, 80, 30,213, 34, 73,114,241, 43,212,252,153, 32,136,119, 1,196, 26,241,177,208,162,162,
+162,102,175,248,240,178, 25,134,201, 54,100,195,191,161, 67,252,191,149,109,127,215, 23,247, 20, 52,255,122,205, 70,141, 26,241,
+ 70, 24, 22,225,124, 10,154,130,166,160,249,159,210,228,121,158,122,153,165, 6, 77,226,101, 22,161,140,254,245, 76,168,233,185,
+208,211,237, 53, 36, 54, 54,150, 16,206,130,128,128,128, 64,245, 16, 4,193,254, 9,154, 66,118, 60,129,114,131, 85, 37,186, 69,
+ 10,231, 68, 64, 64, 64, 64, 64, 64, 64,224,149,152,172,202,235, 82, 19,142,154,195,127,198,140, 38,168, 79, 8, 49, 68,208, 20,
+ 52, 5, 77, 65, 83,208, 20, 52, 5,205,255,156,102, 93,218,194,104,198, 63,217,128, 9,154,130,166,160, 41,104, 10,154,130,166,
+160,249,223,211,252, 55, 83, 99, 31, 45,161,233, 80, 64, 64, 64, 64, 64, 64, 64,224, 79, 66,232, 12, 47, 32, 32, 32, 32, 32, 32,
+ 32,240,114,212, 57,169,180,128,128,128,128,128,128,128,128, 64,253,168,125, 82,105, 1, 1, 1, 1, 1, 1, 1, 1,129,122, 99,
+252,164,210, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6,177, 77, 56, 5, 2, 2, 2, 2, 2, 2, 2, 2,127, 13, 85, 71, 29, 6, 7,
+ 7,243,149,215, 2, 2, 2, 2, 2, 2, 2, 2,127, 37,175,171, 23, 17,154, 14, 5, 4, 4, 4, 4, 4, 4, 4, 94,142, 9,130,
+209, 18, 16, 16, 16, 16, 16, 16, 16,248,115,168,177,143, 86,121,194,210,110,101,161,186,110,194,185, 18, 16, 16, 16, 16, 16, 16,
+248, 27,120,189,189,136,208, 63, 75, 64, 64, 64, 64, 64, 64, 64,240, 34, 2, 2, 2, 2, 2, 2, 2, 2, 2,255, 36,132,185, 14,
+ 5, 4, 4, 4, 4, 4, 4, 4,254, 98,195,245,167, 27, 45, 97,102,115, 65, 83,208, 20, 52, 5, 77, 65, 83,208, 20, 52,255, 75,
+ 38,171,138,217, 18, 70, 29, 10, 8, 8, 8, 8, 8, 8, 8,188, 28,117,142, 58, 20, 16, 16, 16, 16, 16, 16, 16, 16,168, 31, 19,
+ 0, 4,148, 61, 14, 64,165,168,150, 16,209, 18, 16, 16, 16, 16, 16, 16, 16,120, 57,182, 1,112, 44, 51, 88,167, 1,164, 10, 70,
+ 75, 64, 64, 64, 64, 64, 64, 64,224,213, 80,185, 95, 86,223, 74,230, 75, 48, 90, 2, 2, 2, 2, 2, 2, 2, 2, 47, 73,141,125,
+180, 8,212, 60,114, 32,196,136, 47,168,207,232,131, 16, 65, 83,208, 20, 52, 5, 77, 65, 83,208, 20, 52,255,115,154,117,105,135,
+224,223,199, 4, 99,204,215,171, 68, 24,250, 42,104, 10,154,130,166,160, 41,104, 10,154,130,230,127,150, 87, 62,234,176, 21, 96,
+ 34,156,214,215, 18,251,178, 69, 64, 64, 64, 64, 64, 64,160,118,254,156, 81,135,190,192,199, 31,250, 41,183,232, 35, 50,205, 35,
+ 0, 85,109,219, 42,149,202,173,114,185,252, 67,149, 74, 85, 76, 16, 4, 87,254, 58,207,243, 0, 80,121,174,163,199,153,153,153,
+254,117,125,183, 68, 34, 9,178,183,183,255,184,168,168, 72, 69, 16, 4, 79, 16, 4, 8,130, 0,128, 23,214, 44,203, 38,101,103,
+103,183,249, 87, 23, 33,207, 83,182,246,246, 55, 69, 20,229,108,236, 71, 89,142,139,207, 72, 79,239,104,196, 71,150, 17, 4,102,
+150,126, 45, 86, 2,152,243,186,253, 35,120,128, 50,100, 59, 63,192, 44, 6, 24,198,146,228, 20, 17,176, 81,195,113, 91, 0,128,
+ 0,216,250,126,183, 38, 20,111, 16, 60, 90, 16, 4, 44,120, 30,249, 60,129,123,210,246,136,251,155, 78,197, 32,145, 72,212,223,
+220,220, 92,145,157,157,125, 17,192, 1, 0,195,109,108,108,186, 22, 20, 20, 20,233,245,250, 19, 0,142,213, 71,216,191, 5,102,
+ 73,196,162,177, 37, 58,253,138,171,247,240, 99,215, 86,176, 97, 56, 44,151,137,105,127,141,150, 89,121,229, 62,118, 24, 41, 73,
+148, 45,229,215, 12,163,231, 72, 59,108, 96,185, 3,192,113, 43, 43,111,169,210,252, 55,145,132,138,207, 75, 47,250,240,253,140,
+140,196, 33, 47, 81,238,255, 68,108,109,109, 71,147, 36,249, 45,207,243, 96, 89,118, 94, 78, 78,206,206, 87, 36, 61, 15,128,101,
+217,227, 60, 0,223,190,164,222, 51, 0,110,101,143, 19, 0,184, 11,245,122,189,217,252,211, 79, 63, 5,118,239,222, 29,107,215,
+174,197,230,205,155,159,102,102,102, 46, 7,176, 11,128,246,111,208, 17,168,137, 38,192,187,171,250,180,103,245,255,251,134,171,
+244,114,207, 26,254,204, 63,124,244,209, 71, 58,158,231,249,232,232,104, 94,171,213,242,122,189,158,103, 24,134,103, 24,134,215,
+235,245, 21,139,179,179,115,242,115, 31,127, 65,147, 36,201,117,131, 7, 15, 46,228,121,158,191,125,251, 54,175, 86,171,121,141,
+ 70,195,107,181, 90,190,164,164,132, 87,171,213, 85, 22,123,123,251,244,218, 52,205,205,205,111, 91, 89, 89,165, 91, 89, 89,165,
+ 91, 91, 91,167, 91, 91, 91,167,219,216,216, 84, 44,182,182,182, 21,139, 82,169, 76, 87, 42,149,233,214,214,214,183,235,218,207,
+ 50,250, 0,184,104,192,210,167,154,207,246,172,108,180, 28, 29, 29,211,249,122,224,226,226,146,104,192,126,150, 99, 79, 16, 96,
+203, 63, 75, 16,224,164, 82,169, 91,229,247,241, 98,164,171,206,144,178,147,147,211, 96, 71, 71,199, 16, 71, 71,199,115, 78, 78,
+ 78,131, 13,248,137, 85,209, 52, 51, 51,187,109,107,107,155,238,224,224,144, 81,190, 56, 58, 58, 86, 89,156,156,156, 42, 22,123,
+123,251,116, 43, 43,171, 26,203,136, 7,168,154,150, 11, 0, 45, 5,222,162, 41, 42,216,222,222,190, 32, 60, 60,156,229,121,158,
+ 39, 73, 50,185,124, 27, 99,142,253,121,147,165,186,130,121, 89,231,165,161, 69,241,203,243,179,206, 75, 67, 85, 87, 48, 79, 19,
+138, 55,234,171,105, 32,213,105,142, 26, 53,106,212,189,244,244,244,228,188,188,188,212, 45, 91,182,196,200,100,178, 43, 91,182,
+108,137,201,203,203, 75, 77, 79, 79, 79, 30, 53,106,212, 61, 0,147,140,208, 4, 0,116,108,129, 14,227, 6, 57,170,238, 29, 31,
+169,122,171, 45,125,183,179, 31, 2,122,117, 20, 39,111,152,237,171,186,180,189,139,170,123,107, 50,194, 72, 77,130,166,233, 78,
+110,110,110, 99,149, 74,229, 71,101,203,200,242,197,193,193, 97,164,131,131,195, 72, 43, 43,171, 33,181,105, 30, 6, 40, 67, 22,
+ 87,153,172,211,144,134,110,170,103,139, 23,241,225,211,166,240, 99, 61, 93, 11,222,183,179,107,240, 55,148,209,159,170,105,103,
+103,151,162,215,235,121,157, 78,199,219,216,216,164,188,194,253, 92,205,243,252,106,158,231, 87, 3, 88,253, 10, 52, 43,174,103,
+ 70, 24,236,218, 52,101, 52, 73,206,144, 75, 36,231,164, 52,157, 33,165,233, 12,185, 68,114,142, 38,201, 47, 0,200,254, 73,101,
+244, 39,104, 42,148, 74,229,147,160,160, 32, 94,165, 82,241, 42,149,138, 15, 10, 10,226,149, 74,229, 19, 0, 10, 35, 52,235,171,
+243, 58, 69,176,158, 95, 94, 93, 68,203, 23,104,243, 86,139, 70, 71,167,142, 30, 6,238, 72, 16, 81,199, 29,211, 15, 29,219,180,
+ 25,187,107,215, 46, 0,192,135,253,251,163,119,187,118, 48, 83,152, 66, 34, 41,221, 29,130, 39, 32, 22,137, 49, 96,250,231,134,
+124,253,202, 1, 3, 6,124,112,228,200, 17, 5, 0,108,222,188, 25,131, 6, 13,130,181,181, 53,228,114, 57,196, 98, 49, 68, 34,
+ 81,149,117, 93, 80, 20,229,146,156,156,108, 39,147,201, 42,162,108, 28,199, 85, 89,120,158, 47,143,190,129, 97, 24,120,121,121,
+ 25,122,186,102,231,231,231,191, 89, 92, 92, 92,161, 81,221,210,176, 97, 67, 0, 56, 99,136,224,183, 75,190, 1,199, 20,131,166,
+ 1,134, 1, 52, 58, 18, 28, 95,173,185,193,164, 73,147, 42,246,187, 62,244,237, 27, 64, 16, 4,113, 36, 44, 44,236,104, 70, 70,
+134, 7,199,177,227,235, 25,233,250,244,209,163, 71, 10, 0,240,246,246,158, 4,224,168, 49,251, 65,211,180,203,253,251,247,237,
+164, 82,105,141,145,203, 74, 17, 76,232,116, 58,180,106,213,138, 49,230, 59,236, 1,183, 28,146, 28,223,178,117,235, 9, 11, 7,
+ 12,144,221,188,121, 83, 70,146, 36, 24,134,193,170, 85,171, 24,158,231, 45,155, 0,230,145, 64, 65, 45, 50,115, 1,140, 46,171,
+ 12,118, 0, 88, 85,197, 45,240,104,161,214, 75, 3, 30, 23, 13,104,215,190,193, 44, 68, 62, 8,111,231,169, 56, 14, 51, 90, 19,
+ 7,252,181, 81, 45,115,115,243,254,107,215,174, 85,238,216,177,163, 32, 58, 58, 90,183,101,203, 22,229,196,137, 19,205,116, 58,
+ 29, 2, 3, 3, 51,125,124,124,196,107,215,174, 85, 30, 59,118,236,173,226,226,226, 77, 70,149, 23,129,111,134,247,239,141, 18,
+ 61, 9,189,158, 81, 58, 42,205,246, 76, 29,213, 77,196,243, 90,236, 62, 17, 6, 61,195,253,104,100, 36,171,227,251,239,191,239,
+185,127,255,126, 58, 42, 42,138,110,220,184, 49, 56,142, 3,203,178,208,235,245, 0, 0,142,227,208,168, 81,163,151, 62, 47, 99,
+ 1,111, 91,123,235,115, 29,223,125,199,196, 81, 38,133,117,110, 38,198,137,105,179,157,114,205, 94, 0,157, 94,171,200, 46,207,
+131,166,105, 36, 38, 38,194,206,206,206,132,227,184, 84, 0,139,114,115,115,183,225,245,165,157,132,166,143,238,254,113,157, 67,
+251, 78,157, 40,123, 71, 59,196, 60, 74, 0, 77,176, 61,239,223, 10,235, 54,246,147, 25, 83,181, 12, 51, 24,192,205,215,237,192,
+ 29, 58, 77, 26, 72,144,212,102,130,231,240,245,134,147,133,203, 86, 6,201, 3,199,143,162,166, 79,159, 14, 87, 87, 87,143,129,
+ 3, 7,174, 4,240, 73,157, 58,237, 39, 13, 4, 69,110, 6,207, 99,225,250,147,133, 75, 87, 6,201, 63,169,135,206,191,156, 26,
+255, 35, 47,109,180,124, 1,207,166,174,118,103,151,205,252, 68,196,255,242, 63, 82,149,157, 81,227,182, 74,165,114,235,219,111,
+191,253,225,206,157,127, 68,163, 59,250,249, 97,224, 91, 93, 96,103, 99, 1,185,169,164,180, 58,226, 8,220,139,142, 55,200, 16,
+184,186,186, 6, 30, 61,122, 84, 81,217, 76,136,197,226,138,165,178,201, 42, 95,202, 43,224,218,144,201,100, 8, 9, 9, 1, 77,
+211,160, 40, 10, 52, 77, 87, 44,149,159, 83, 20, 5,123,123,163,186, 46, 45,183,176,176,104, 94, 88, 88,104,158,151,151, 7, 55,
+ 55,183, 2, 0,247, 43,189,223, 60, 51, 51,211,220, 24, 65,142, 41,198,244,113,190, 16,105,111, 64, 43,106, 7, 53,221, 25,215,
+110, 61, 68,240,153,139, 72, 78, 73, 67,151, 14, 45,241,209,136,247,113,238,220, 57,176,172,209, 45, 29,233, 60,143,149,253,250,
+ 5,204, 2, 8,162,103,207,158,121,147, 39, 79, 38,163,162,162, 62, 24, 56,112,128,223,163, 71,177,101, 81, 69, 98, 38,207, 99,
+ 29,128,116, 3,117, 37, 0,112,233,210, 37, 0,144,214,231,183, 39,149, 74,113,253,250,117,148, 55, 19,147, 36, 9,146, 36, 65,
+ 81, 20, 78,197,218,162, 88, 75, 66,149, 30,129, 41, 1,110,104,216,176, 33, 72,178,238, 46,137,221, 0,217, 53, 96, 32, 33, 18,
+ 77,119,116,114,242,232,234,233, 41, 15, 9, 9,161, 0,192,221,221,157, 79, 77, 77,205, 59,113,226, 68, 33, 13,108,118,231,249,
+ 93,181,153, 44, 87, 87,215,206,201,201,201,223,150,159,115,130, 32, 86, 54,104,208,224,171,138,114,227, 56, 44,250,177, 88, 52,
+117,234, 52,113,251,110,243, 1, 0,237,251,237, 71,193,227,101,190, 68,206, 92,139,191,250, 42, 81, 80, 80,112,176, 81,163, 70,
+ 84,118,118,246, 53, 0,207,244,122,253,236, 61,123,246,216,141, 27, 55, 46, 99,239,222,189,203, 1, 56,173, 88,177,162, 91,113,
+113,241, 33, 99,116,187, 52,199,187,173,155,251,117,112,115,117,197,197,107, 55, 33,150,136, 44, 39,141, 14,128, 66, 65, 99,245,
+142,211,220,179,164,156,201, 87,238, 99,151, 17, 38,171,221,251,239,191,239,177,127,255,126, 9, 0,220,191,127, 31,105,105,105,
+ 80, 42,149, 48, 49, 49,129, 72, 36, 2, 69, 81, 16,137, 68,175,196,100, 89,184,218,132, 30, 63,126,194,196,218,218, 18, 27, 62,
+159,138,143, 50,210, 97,105,166,128,190,168,216,227, 53,171, 40,188,253,253,253,101, 44,203,162,184,184, 24, 23, 46, 92,176, 48,
+ 49, 49,177,112,113,113, 89, 8, 35, 70, 79,201,100,178,244,146,146, 18,187,178,199, 25, 37, 37, 37,246, 0, 10,164, 82,105,249,
+117,186,168,108,109,104,115,226, 51,188,216, 76,152, 64, 16, 68,229,215,234, 75,219,118,109,155,135, 28, 59,178, 79,145, 95,152,
+ 6, 75,171, 12,144,200,199,182,109, 27, 97, 98, 98,142,133, 11,231,210,241, 61,223,114,238,243,238,224,144, 7, 15, 99,122,190,
+118,102,139, 39,182,245,236,247,161,181,137,220,172,172, 46,209, 99,231,246,169, 32, 73, 18, 95,125,245, 21,154, 54,109, 58,225,
+193,131, 7,243, 1,228,212, 46,131,109,205,222, 28,106, 45,145,149, 22, 49,199,234,177,229,192, 23,165, 58,115, 38, 98,120,191,
+134, 19,190,124,255,201,175, 77, 61, 81, 88,118, 99,174, 22,145, 72, 32,218,163,194, 48, 4, 7, 7,119, 13, 8, 8,184, 88,211,
+243,127, 1,142,248, 35,127, 86, 21,243, 69, 7, 7, 7,243, 1, 1, 1, 68,165,131,171,242,188, 54, 90, 0,182, 86, 22,242,144,
+205,139,166, 42,232, 27,167, 41,117, 66, 44, 82, 74,170, 84,228, 85,134,104,202,229,242, 15,119,238,220, 89, 37,164,228,102,111,
+ 7,177, 88, 4,145,152,128,165,127,105,246,250,188,203,193, 32,136, 26, 77, 86, 21,205,226,226,226,146,187,119,239, 42,118,236,
+216, 1, 59, 59, 59,120,120,120, 64, 46,151, 67, 38,147, 85, 49, 87,149, 13, 87, 53, 70,171,138,102,249,251, 52, 77,131, 36, 73,
+156, 59,119, 14, 12,195,224,253,247,223,127,193,100,209, 52, 93,147,113,171,105,120,234, 25, 0,247,121,158,127,179,172, 2,190,
+ 15,160,107,165,247,251, 40,149,202,217, 0,150, 27,170, 73, 81, 60,168,146,107,224, 92,130, 64, 39, 78,133, 86,212, 2,231,175,
+132, 97,231,214,181, 0, 0,143,198,109, 49,100, 96, 64, 69, 52,206,192,253,172,192,217,217,249, 64,102,102,214, 59,111,189,245,
+ 22,114,115,115,245,139, 22, 45, 66,243,230,205,225,237,237,109, 80, 25,213,112,231,156,126,255,254,125, 87,181, 90, 13,158,231,
+ 13, 49,103, 47,104, 18, 4,129, 61,123,246,160,164,164,228,133,141,173,186, 46,197, 23,131,220, 49,102,202, 46,172,140, 62,132,
+ 77,155, 54,213,122,236,114,160,121,137, 69,163,117, 18,138,105,190,124,238,167,210,143, 62,250,136, 26, 51,102, 12, 18, 18, 18,
+ 48,110,220,184,146,115,231,206,105,211, 82, 83, 79, 72, 56,110,131,174,170, 49,174, 81, 83, 42,149,238, 62,115,230, 12, 14, 29,
+ 42,245, 37, 49, 49, 49,240,242,242, 50,173, 98,146,115, 14,163,240,217, 6,132,158,138, 66,251,126,251, 17,122,106, 4,216,188,
+211,162, 54, 94,200, 55,230,124,214,131,234, 52, 15,101,103,103, 87,152,168,189,123,247,154,236,221,187,119, 0,128,147, 0, 14,
+ 1, 64, 78, 78,206,119, 70,106, 2, 4,198, 12, 29, 52, 0,180,216, 12, 81,177, 73,232,218,177, 21,236,237,236,112,255, 97, 28,
+158, 37,231,164, 19, 4, 70,247,233, 36, 89,174, 86,107,231, 95,190,135, 31,234,208, 36, 92, 92, 92,188, 15, 31, 62, 44,174, 20,
+129,174,248,143, 83, 20, 85,241,188,220,120,215,231,247, 89,110,178,204, 92, 20,161,223,108,236,108, 26, 26,190, 23, 94,238,239,
+194,234,221, 0,252,112,246, 44, 30, 61,136, 44,209,170,152, 30,127, 67, 25,253, 89,154,222,131, 6, 13,186,182,111,223, 62,203,
+196,196, 68, 92,186,116, 9, 30, 30, 30, 80,169, 84,134,220,240, 86,209, 44, 41, 41,177, 43,255, 12, 65, 16,118,229,129,119,173,
+ 86, 91, 94, 24,229,127, 68,203, 74,219, 89,214,162,233, 86,105,187,114,115,229,254, 10,142, 93, 34, 19,139, 15, 31, 63,118, 64,
+ 17, 25,117, 9, 45, 91,116,128,194,162, 9, 56, 54, 13,217, 57, 69,200,141, 77,193,146, 37, 43,177,112,209, 60,156,252,233,136,
+194,199,183,197, 81, 45,195, 52, 2, 80,242,218,148, 59,193, 79, 8, 57,181,119, 51,193,115, 80,167, 71, 73, 69,197, 79,228, 31,
+142, 24, 76, 13, 27, 54, 12, 39, 79,158,196,131, 7, 15, 54,215, 98,178, 66, 42, 69,230, 39, 68, 92, 58,180, 25, 60, 15,117, 70,
+148, 84,172,126, 34, 31,245,193, 16,234,163,225,189,113,227,247,117,232,221,242, 73,132,147, 29, 6,230,150, 89,108,154, 66,182,
+ 84,134,171,124, 40,110, 84, 50, 91, 23, 0, 16,149, 12,214, 5,252,209, 7,243,223, 64,223, 50, 99, 53,225,249, 27, 19,186, 62,
+ 6, 11, 0,188, 0, 5, 33, 17,135,238, 92,248,169,147, 60,225, 1,173,137,184,142, 20, 13,199,111,121,202,112,173, 0,147, 59,
+128,250,249,207,168, 84,170,226,184,184, 56,147,209, 3, 7,162,147,159, 31, 28,109,108,208,200,197, 5, 38, 82, 9, 36, 98, 81,
+149, 91, 86,131,219, 16, 8,130,247,241,241, 65,191,126,253, 32, 18,137, 32,151,203,161, 80, 40, 32,145, 72,170,141,102, 25,122,
+151,203,243, 60, 40,138, 66, 68, 68, 4,158, 61,123, 6, 75, 75, 75, 92,189,122, 21, 61,122,244,120, 33,170, 85,217,156, 25, 19,
+162,175,166,226, 47, 55, 98,103,140,209, 98, 89, 2, 69,124, 11,200,158, 78,134,138,104, 5,141,134,129, 70,163,193, 15, 87,116,
+184, 25, 87, 12,157, 78, 11,141, 70, 83,219,119,214, 4,233,228,228,244, 97,163, 70,141, 38,141, 24, 49, 66, 47,145, 72, 80, 92,
+ 92, 12,149, 74,133, 7, 15, 30,232,223,121,231,221,188,126,253, 2, 44, 78,159, 62,205,151, 53, 29,166, 27,161,157,237,236,236,
+236, 90,214, 60,155, 93,159, 95, 53, 65, 16, 21, 38,230,121, 70,127, 23, 9,154, 42, 45,147,205,155, 55,131,101, 89,240, 60, 95,
+ 99, 33,149, 16,196,111,139,150,174,177, 88, 17,244, 35, 44,172,237,113,241,226, 69,246,215, 95,127, 45, 36,128,152, 71, 15, 30,
+124,247, 30,240,243, 97, 64,103,204,254,229,230,230,154,120,120,120,192,197,197, 5, 28,199, 65,175,215, 87, 68, 95,178,179,179,
+161, 86,171, 97,109,154,135, 55,108, 92,192, 20, 94, 64,106,196,215,112, 84, 68, 97,215, 25,173,190,181, 55,238,253, 3, 46, 28,
+255, 43, 91, 94,242,174, 25,206,118, 14,174, 32,121, 61, 82, 50,178, 49,160,111,111, 80, 98, 5,226, 19,179,208,162,137,167,227,
+ 7,239,117,118,164, 8, 6, 51,151,239,159, 4,112, 63,212, 37, 87, 84, 84,196, 70, 69, 69,225,254,253, 82,191,107,110,110, 14,
+ 83, 83,211, 42,255,113,146, 36, 95, 42,162, 85,110,178,150,110,238, 97, 74,138,138, 81,192,134, 96,199,158, 48,180,240, 9,192,
+150,208, 91, 37,108,122, 78,207,213, 37, 37, 49, 7,254,197,193, 12, 7, 7,135,137, 28,199, 45,228,121, 62,175, 75,151, 46,246,
+251,247,239,183, 74, 78, 78, 70, 88, 88, 24,190,250,234,171, 76,150,101, 25,158,231, 9,158,231,191,126, 5, 95,199, 85, 50, 88,
+175, 18,145, 92,134, 41,182,230, 68,127,154, 52,247, 96, 10,138,226,179,180,252, 9, 21,195,173, 7,160,175,245,226, 70,146, 31,
+ 31, 57,184,217,201, 86,201,161,155,242, 45,164,166,235,176,244,243, 81,200,206, 46,196, 15,219,151, 1,144, 64,199, 80,120,179,
+219, 96,216,217, 57, 99,194,248, 9, 14,155,183,110,249,148,225,184,213,120, 77, 72,187,182,233, 39, 0, 33, 74,165,242,193,167,
+ 19, 38, 40, 61, 60, 70, 66, 38,147,225,192,129, 3,216,191, 97, 3, 27, 4, 12,145, 2,231, 3,129,159,106,213, 9,253, 67,103,
+106, 96,160,210,215, 55, 16, 82,169, 20,191,255,250, 63,148,164,237, 41,236,219, 9, 58, 85, 9,250, 54,232,199, 91, 63, 61, 69,
+228,136, 68,136, 5, 0,145, 12,169, 0,158,111, 6,251,183, 25,172,114, 78,227,143,126, 89, 19,170, 68,180,234,125,237, 20, 73,
+194,183, 79, 27,238,110, 15, 13,161,189,114, 10,201, 26,142, 93,241, 72, 71,221,201,231,191,120, 88,141,201, 42,251, 97,115,110,
+110,110,120,171, 77, 27, 12,244,247, 7, 77,211,144, 73,196, 48,147,153,128,103, 75, 35, 89,229, 77,135,181,212,137,168, 46,250,
+100, 99, 99, 3,177, 88, 92, 97,176,140,136,102, 85,171,201,113, 28,104,154,198,253,251,247,209,165, 75, 23,184,186,186,226,208,
+161, 67,232,211,167,207, 11, 77,137,198,154,172,114,163,245, 92, 51, 94, 31, 0,229,145, 44,163,140, 86,137,150, 64,150,182, 5,
+ 8,194, 15, 12, 3,176, 60,160, 41, 41, 1,207, 3, 60, 15,232,117, 90,148,148,148, 84,124,167, 33, 77,178, 14, 14, 14,110, 38,
+ 38, 38,139,103,205,154,233,219,162, 69, 75,100,102,102,130,227, 56,152,154,154, 66,165, 82,193,220,220, 28,157, 58,117,138, 95,
+188,120,113, 42,207, 99,130,145, 38,235,165, 41, 63,231,103,207,158,173,210,108, 88,190, 20,167, 38, 97,204,103,123, 33,161, 75,
+155,150,202,251,240,212,118,221,237,254,102,103, 92,187, 19,195,124, 60,115,157, 70,148, 29,182,220,129,227,118, 38,189,196,113,
+241, 60,143,172,172, 44,164,167,167,163,255,128, 1,216,191,111, 31,158, 62,125,138, 38, 77,154,160,123,247,238,176,179,179,195,
+211,167, 79,113,243,178, 6,154,220, 28,228,104,195, 32, 55,107,143,227, 23,227, 52, 95,109,214,197,253,141, 23,140,254, 0, 70,
+153,155,155, 55, 84,169, 84,169, 12,195, 28, 6,112, 24,192, 16,154,166,135,200,229,114,199,130,130,130, 39, 40, 29, 77,116,162,
+ 46, 49, 19,153,204, 70, 42, 51, 7,199,104, 64,211, 52, 92, 93, 61,192,179, 90,228, 22,168, 49,122, 88, 63,220,185,255, 16,191,
+158,191,193,232,245,220,247,134,156, 86,138,162,120,111,111,111,100,100,100, 64, 36, 18,193,196,196, 4, 10,133, 2,115,230,204,
+193,134, 13, 27, 42, 76, 86,125,141,214, 88,192,219,220, 77,113,227,219,141,165, 38, 43, 45, 37, 21,233, 73, 34, 40,109,236,241,
+253,134,160,226,220,167,105,237,127, 4, 98,254,237,149, 44,199,113, 95, 39, 39, 39,219,209, 52,237,192, 48, 12, 18, 19, 19,113,
+251,246,109, 76,158, 60, 57, 61, 59, 59,187, 27,234,121,140, 50,153, 44,163, 60,146, 85,214,116, 88, 83,115, 98, 94,165, 72, 86,
+ 94, 45,146, 53, 53, 19,122,122,184,152,157,219,190,118,186, 91,219,246,157, 72, 57,109,158, 91, 20,155,214,229,202,165,139,157,
+ 38,175,253,225,211,103,185, 69,189, 1, 60,174, 73, 84, 42, 18,189,211,161,115,103, 26,124, 58,104, 73, 23,172, 92, 49, 12,153,
+ 89, 5,200,205, 41,132, 88,108, 10,173,158, 2,203, 17,232,212,197, 31,255,219,117, 16, 77,199,143,163, 36, 34, 81, 47, 70,171,
+125,109,140, 86, 25,203,214,175, 95,239,230,227,227,131,157, 59,119,226,252,238,221,248, 40, 63, 31, 23, 73,146,210,139, 68,182,
+ 63,235,245,219, 80,135,209,170,172,211,180,105, 83,252,248,227,143,216,179,103, 79,194,135, 61, 50,142, 78,255, 16,118, 58, 29,
+222, 14,139,134,117,131,126, 64, 88, 52,172, 91,251,160, 17, 67, 35,150, 32,170,166,131, 10, 14, 14,238, 90,121,253, 47, 35, 21,
+ 53, 52,177,211, 0,186, 5, 7, 7,243,149,215,117, 94, 56,149, 94,129,203,122, 55,116,247,123,195,141,208, 31, 90,135,196, 98,
+ 70, 59, 63, 90, 39,121, 84,196, 79,127, 8, 4,213,114, 7,193, 83, 20, 5, 51, 19, 19, 40, 45, 45, 75,195,252, 36, 9,112, 0,
+167, 7, 8,182,212, 0,240, 28, 1,158, 53,234,130, 1,137, 68, 82,109,199,119, 99,251,102, 85,214, 44, 44, 44, 68,124,124, 60,
+ 38, 76,152, 0,185, 92, 94,234,220,211,210,224,238,238, 14,154,166,145,156,156,140,223,127,255, 29, 13, 27, 54,132, 84, 42, 53,
+202,109, 85,138, 46, 53, 71,233, 40,195,230,169,169,169,230,142,142,142, 48, 58,162,197,241, 80,105, 8,104,181, 44, 30, 61,122,
+132,148,148, 20,196, 63,137, 69,219,226, 2,240,160,192,243,188, 81, 17, 45,103,103,103, 63, 79, 79,207, 45,203,151, 47, 23,187,
+184,184,128,231,121, 88, 89, 89, 66,165, 82, 33, 43, 43, 27, 77,154, 52,129,171,171, 43,150, 47, 95, 14, 0,251,255,106,147,245,
+220,111,170,194,104, 85, 54, 92,159,189,231,134,156, 28, 5, 40,138,172, 48,206,117,244,209, 18, 3, 64,183,222,131,232,115,191,
+254,108,202, 0,139,211, 40,106, 49, 93,119, 57,234, 89,142,147,215,244,126, 98, 98, 34, 68, 34, 17,142, 28, 62,140,156,244,116,
+180,104,209, 2,237,218,181, 67,108,108, 44,238,220,185, 3, 27, 27, 27, 40, 93, 58,226,226, 19, 29, 34, 83,212,176,176,176, 64,
+ 92, 18,249,119,166, 12, 24,223,179,103,207,175,190,251,238, 59, 59, 7, 7, 7, 81,102,102,166,207,198,141, 27, 91,108,220,184,
+113,234,167,159,126,106,255,233,167,159, 90, 41,149, 74, 58, 45, 45,205,251,243,207, 63,111, 29, 18, 18,210, 16,192,154,218, 4,
+ 77, 77,205,172, 41,177, 41, 8,130,134,165,133, 21,104,137, 41, 56,134, 6,203, 1,230, 22, 74, 92,187,115, 4, 87,195, 11, 39,
+102,100,227,176, 65,241,177,178,114,183,177,177,121, 33, 82, 61,121,242,100,108,223,190,189,162, 25,177,190, 38,107,233,198, 30,
+ 10,162,204,100,165, 37,210, 32, 52, 13,113,234,167,235,121,185, 79,211,186,188, 14, 38,171,252, 26,199,243, 60,158, 60,121, 2,
+149, 74,133,203,151, 47,227,235,175,191,206,124,222,100,217,217,217,141, 55, 55, 55, 95, 84, 84, 84,180, 50, 45, 45,109, 93,157,
+ 55,126,165, 38,170,252,113,249,186,218,230, 68, 3,119,213,189,186, 72,150,171,163,236,204,157,203,123,221, 45,248,123, 4,158,
+ 77, 0, 30, 21, 60, 48, 11,181,123,243,221,182,125,201, 86,155,190,105,208,110,226,156, 51,137, 5, 37, 62, 53, 69,182, 56,150,
+109,101,170, 48, 3,144,129,176,219, 23, 42, 76, 86,118, 78, 62, 52, 58, 10, 26, 45,129, 18, 29,137,183,122,190,141, 13, 91,246,
+ 32, 57, 35, 7, 44,203, 54,123,205, 76,150,181,159,159, 95,224,144, 33, 67,176,120,241, 98,132,124,247,157,246, 19,130, 40,160,
+ 1,254, 52,203,130,227,121,130, 52,172, 19,123, 21,157,213,171, 87,255, 4,200,224,209, 35, 0, 0, 32, 0, 73, 68, 65, 84, 96,
+248,242,201,232,152, 91,132,209, 78,253,120,235, 6,253, 74, 55,124,127, 22, 15, 0,214,153, 33, 85,171,204,128,128, 0,162,188,
+101,205,216, 22,182,127, 58,116, 64, 64,192,197,224,224, 96, 84, 94,215,246, 1, 51,123,159,119,191,156, 49,105, 69,219, 62,254,
+ 68,234,140, 94,200, 41, 40, 97,230, 70,234, 36, 73,234,218, 77, 86,101,190,220,184, 17,119, 98, 74,255,199, 46,118,118,152,249,
+193, 7,224, 25,224,234,131, 72, 28, 12, 9,193,176,158, 61, 97, 42,147, 25, 28,217,224, 56,174,218, 40, 86,229,104,150,177, 81,
+167,188,188, 60, 28, 62,124, 24,237,218,181,131, 92, 46, 7, 77,211,104,222,188, 57, 30, 62,124, 8, 79, 79, 79, 16, 4,129,227,
+199,143, 99,224,192,129,120,252,248, 49, 58,118,236,168,120,246,236,153,209, 70, 43, 50, 50,210,156,231,249, 55,203,163, 31,245,
+ 69,163,209, 32, 42, 42, 10,253,250,245,131,149,149, 21,156,157,247, 35,228,204, 94,200,253, 62, 2, 65,192, 40,163,197,178,236,
+216,190,125,251,138, 9,130,128, 90,173,130, 76,102, 2, 83, 83, 5,204,204,204,225,237,237,131,148,148, 20,244,233,211, 71, 27,
+ 23, 23,183, 41, 53, 53,245,144,177,251,234,235,235,107,250,244,233,211,143, 26, 52,104, 32, 1, 0, 19, 19,147, 38,158,158,158,
+ 95, 60,126,252,184,208,216,168, 86,185,193, 34, 8, 2, 20, 69, 85, 24, 45,154, 36,225,232, 96, 87,241,188,172,127, 26, 81,139,
+ 86, 65,114,182, 70, 10, 0,110,110,110,216,176,245, 36,217,183,111, 95, 76,157, 58, 21,122,189, 30,155, 54,149, 14,178, 27, 49,
+ 98, 4,116, 58, 29,142, 30, 45, 29, 36, 73,211,116,173, 97,147,219,183,111, 35, 44, 44, 12,122,189, 30,249,249,249,248,229,151,
+ 95,112,241,210, 37, 28, 56,254, 27,158, 62,137, 69,115, 31,119,140, 27, 55, 22, 34,145, 8,187,118,237, 66,151, 46, 93,254,214,
+ 11,130, 72, 36,250,112,251,246,237,142, 59,119,238,204, 59,126,252,120,113,135, 14, 29,164, 65, 65, 65,118, 27, 54,108, 80,106,
+181, 90, 76,155, 54, 45,227,198,141, 27,154, 1, 3, 6,152,110,219,182,205,241,141, 55,222,232,197, 48, 76,117, 70,203, 20,192,
+ 48, 0, 35,115, 11,181,116, 94,161, 26, 28,163,197,147,167,241,200, 47,210,130, 99,117, 72, 72, 74, 65, 81, 9,139,236,156, 66,
+ 52,111,213,123,253,133, 11, 23,230,233,116,186,185, 0,130,235,218,207, 7, 15, 30,224,198,141, 27,120,250,244, 41,158, 60,121,
+ 82,213, 41,142, 31,143, 61,123,246, 24, 29,209,170,222,100, 81, 32, 52,158, 8, 62, 30,154,151, 17,155,250,218,152,172,178,107,
+208, 66, 71, 71,199,133,142,142,142,178,179,103,207, 90, 52,104,208, 0, 12,195,104,159,143,100,117,235,214,109,254,246,237,219,
+ 29, 61, 61, 61, 39, 3, 88,247, 79,216,119,146,196,248,149,155, 3,109,205, 36, 9, 41,120,180,166, 44,151, 32, 5,168, 10,128,
+ 11,251, 64,119, 94, 16, 63,121,192, 44,171,217, 59, 23,143,231,192,213, 56, 66, 54,238,113, 34, 54,111,222,128,233,211, 70,227,
+127, 63,172, 4,199,209,208,232, 41,184,121,116,128, 70,199,129, 32,105,180,104,213, 6,231, 47, 92,134,136, 4, 14,239,220,252,
+154,249, 44,228, 68, 68, 68,108, 58,126,252,248,148,169, 83,167,130,227, 56,201,162,205,155,213,153,153,153,203, 96, 92,254,171,
+231,117, 6,110,222,188, 57,102,246,134,204,159,166,127, 8,234,233, 41, 34, 39, 44, 26,214,239,207,226,113,100, 5,129,214, 62,
+200,145, 87, 95,197, 95,122,110,253,122, 24,173,114, 39, 89,121, 93, 29,173,188, 26,126, 99, 97,109, 53,150, 52,115,182,157, 57,
+245, 19,250,113, 90, 9,142, 54,248,160,232,247,221,223,155,166, 49,210,245,113, 40, 9, 50,230,139, 15,254,254,123,197,227, 85,
+251,247, 87,251, 94,234,251,239, 27,124,103, 86, 83, 20,203,216, 72, 22, 0,200,229,114,203, 94,189,122,161, 71,143, 30, 24, 60,
+120,112, 69,159,172,150, 45, 91,226,192,129, 3, 24, 52,104, 16,238,222,189, 11, 71, 71, 71, 52,110,220, 24,141, 27, 55,198,207,
+ 63,255,108,236, 69, 14, 44,203,194,207,207,175,124,212, 97,243,164,164, 36,243,250, 22,164, 70,163, 65,118,118, 54,172,173,173,
+ 33,145, 72,208,190,125, 59, 76,249,172, 61,108, 29,127,132,159,175, 15,138,139,139, 43,134,191, 27, 80,217,250, 53,106,212, 8,
+153,153,153,200,204,204,132, 82,169,132,147,147, 19, 28, 28, 28,176,102,205, 26,126,221,186,117,191,234,116,186, 77, 89, 89, 89,
+ 70, 71,178, 28, 28, 28,252, 9,130,152,175, 86,171, 37,149,238,112, 37, 74,165,242,132, 90,173, 94,150,154,154,106,112, 71, 80,
+130, 32,160,211,233, 64, 16, 4, 78, 63,113, 66,177,150, 64, 65, 82, 24,166,190,231, 94,197,120,137, 68,162, 58,155, 75,121,158,
+ 47, 30, 62,124,184,157,171,171, 11, 18,227, 30,224,200, 17, 30,223,125,247, 93,249,168, 72,196,148,221, 24,148, 63,239,222,189,
+ 59, 60, 60, 60,192, 27,145, 43,131,227, 56,220,191,127, 31,251, 79, 92,132,163,187, 47, 18, 30, 69,225,206,207,167,208, 64,105,
+141,166,173,218, 64,175,215,191, 84,234,141, 87,129, 94,175,223,225,229,229,197,107,181,218,139, 0, 54,132,135,135,143, 78, 77,
+ 77,157,118,242,228, 73,167, 33, 67,134,164,156, 58,117, 42, 8,192,206,240,240,240,192, 37, 75,150,244, 96, 24,166,218,209,130,
+ 20, 69,253,239,243,207, 63,239, 54,100,200, 16, 66, 76,234,181,103,207,236,162, 25, 70, 79,124, 57,119, 7,123,225,202, 69,146,
+ 97,244,196,224,225,159,115, 63,255, 30, 78, 78,252,108, 21,219,178, 67, 95, 68, 68, 68, 56, 4, 4, 4, 44,209,235,245,181, 26,
+173,242, 72, 85, 77, 17, 74,138,162, 48,122,244,104, 28, 56, 96,120, 15,170,113,128,167,185,187,226,198,210,141, 61, 21, 4, 93,
+ 84,201,100,189,129,224,227,161,121,233,143, 82, 94, 43,147, 5, 0,217,217,217, 91, 1,108,229, 56, 46,221,212,212, 20,133,133,
+133,213,253,254,100,225,225,225, 50,137, 68,130,222,189,123, 91,135,132,132,196,144, 36,185, 46, 37, 37,165, 70,199, 81, 93, 51,
+ 97,117,205,137,120,137, 81,135, 86, 74, 4,180,247,111,101, 22,109,177,216, 76, 70,151,220,109, 16, 35, 51, 39, 0,228,107,236,
+159, 92,123, 54,172,128,200,144,182,108,211,189, 53,204,105,211,128, 60,166,176, 90,163, 69, 82,212,157,252,220,188,119, 10, 10,
+181,184,114, 53, 2,195,135, 53,130, 70, 71,128,227, 72, 20, 21,107, 0, 74, 4, 18,192,136, 15, 70,129, 39,104,228,164,167,128,
+162,168,112, 48, 12, 94, 51,230, 4, 6, 6,190, 51,119,238,220,134, 51,103,206,196,204,153, 51,221,183,111,223,190,117,233,210,
+165, 51, 51, 51, 51,155,161,142,228,227,181,232, 52, 56,117, 96,193,140, 19,151,183,228,247,237,164,126,212,218,167, 52,242,213,
+218, 7, 57, 34, 17, 98,105, 10,217, 60, 95,181,155, 81, 64, 64, 64,215,202,235,127, 25,207,119,130,175,120,110, 80, 31,173, 70,
+ 13,157,223,110,213,210,239,179,121,115,231,153, 61,188,118, 1,179,191,217,192,123,181,233, 85,184,245,242, 29,109,145,169,199,
+ 59, 69, 89,177, 87, 13,245, 23, 0,240,246, 91,131,208,188, 73,187, 23,222,236,210,189, 52, 89,251,149,243,183,145,158,153,108,
+112,101, 91,102, 14,170,237,147,101,200,144,254,231, 81,171,213,121, 17, 17, 17,118, 73, 73, 73, 85, 58,190,123,120,120,128, 32,
+ 8,132,134,134,226,198,141, 27, 24, 62,124, 56,104,154,134, 72, 36,194,197,139, 23,141,138,198, 84,138, 46,149,143, 58,236,227,
+226,226, 82,211,104,195, 58,181,212,106, 53,242,243,243,113,230,204, 25, 52,106,212, 8, 75,151, 46,133,147,163, 61,230,205,155,
+ 1,142,227, 80, 80, 80, 0,150,101, 13,141,104,113,229,209, 34,142,227,144,153,153,137,134, 13, 27, 98,227,198,141, 8, 10, 10,
+ 90,146,154,154,122,210,216,125,116,117,117,181,100, 89,246,203,190,125,251,246, 26, 48, 96, 0,250,244,169,154,143,117,223,190,
+125,102, 71,143, 30, 93,246,253,247,223,191,173,211,233,150,103,100,100,100, 26,162,251,227,143,165,233,151,228, 29, 22, 98,246,
+144, 6, 24, 57,105, 23,214,172, 57, 6,169, 84, 90,165,226, 93,188,120,113,173, 38,134,227,121, 47,113,214,181,148, 25,179, 86,
+219, 45, 91, 22,130,144,144, 12,144, 36, 9, 71, 71, 71,144, 36,137,248,248,120,144, 36, 9,119,119,119,144, 36,137,228,228,228,
+242, 62,129,185,168,102,212, 99,245,119,225, 36, 74, 74, 74,144,152,240, 20, 73,113, 49, 80, 20,164, 65,105, 46, 71,238,131,251,
+104, 62,110,124, 69,254,167,191,153, 61, 90,173,118, 79,165,231,171, 79,157, 58,165, 37, 8, 98, 48, 74,251,105,148, 71, 52,150,
+ 48, 12,179,164, 38,145, 14, 29, 58,180,156, 59,119,174,168, 60,221,134,147,219,183,140, 78,167,227, 0,192,167,249,155, 85,220,
+126,108,108, 44,214,172, 89,131,226,226, 98,136,197, 98,177, 33,231,129,227,184,138, 17,134,213,153, 48, 99, 76, 22, 0,216,184,
+187,172, 15, 13,187,200,222,139,219,162, 14,143,254,197, 36, 53,129, 4,169,125,125, 77,214,243,145, 45, 23, 23,151,133, 28,199,
+241, 60,207, 47,168,244,150,212,205,205,237,242,217,179,103,109, 24,134,193,247,223,127,111,153,150,150,102,249,230,155,111,206,
+ 6, 80,163,209,170,174,153,176,186,230, 68, 84, 26,117, 40,149, 74,173,181,218, 26,131, 39, 47,140, 58,100, 89,120,155,155, 89,
+ 34, 23, 73,208,216,234, 91,230,217, 48, 57,231, 82,199,223,117,122,214,170,137, 41,171,111, 72, 22,104,225, 44,183, 4,199,243,
+ 53, 14,141,214,232,245,191,220, 13,187,211,219,205,181, 17,117, 50,248, 18,250, 15, 28, 2,141,134, 68,137,158, 0, 65,137, 64,
+ 80, 98, 52,107,222, 10,141,155, 54, 7, 15,224,246,205,107,140, 86,175, 63,247, 58,149,189, 99,231, 41,195, 9, 2,235,192,115,
+124, 53,121,180, 26, 14, 28, 56,112, 25,128,207,234,210,177,235, 48,101, 56, 73,150,234, 84,206,163,245,249,148, 64, 60,184, 41,
+178,184, 20,182, 66,220,167, 3, 78,103,134, 16,144,203,254, 24,117, 40, 34, 95, 42, 53,199,191,197,112,213,109,180, 92, 93, 93,
+ 45,205,165,178, 31, 63, 29, 55,214,236,217,189,235, 72,139, 12,197,213, 75, 49,185, 7,143, 30,203, 41,206,206, 24,103,132,201,
+170,104,230,179,113,104, 0, 15,223, 23,141,150, 76,161, 4, 0,120,248,182, 3,101,106, 92, 26,161,234,162, 89,245, 49, 89,149,
+ 47,216,213,229,208,154, 56,113, 34,182,111,223,142,206,157, 59,195,203,203,171,226, 98,111,108,212,172,154,232,146,209,163, 13,
+ 43, 83, 88, 88, 8,119,119,119,108,219,182, 13,225,225,225, 48, 51, 51,195,240,225,195, 81, 88, 88, 88, 97,176, 12,237, 12,207,
+243,124,236,217,179,103,219, 14, 29, 58,148, 23,137, 68, 68, 94, 94, 30, 44, 45, 45,177,113,227,198,226,212,212,212,211,245, 48,
+ 89, 67,196, 98,241,140, 97,195,134, 81, 62, 62, 62, 72, 79, 79,135,185,185,185,158, 32, 8, 17, 0, 88, 90, 90,234, 77, 76, 76,
+ 16, 24, 24,136, 22, 45, 90,248,207,156, 57,179, 51, 77,211, 27, 83, 82, 82,118,213,246, 91, 34, 8,162,162, 66, 29,183, 46, 10,
+ 90,109,105, 5,189,105,211, 38,148,245,117,251,163,137, 32, 46, 14, 48, 96, 36,139, 66,161,128,151,151, 87,181,101,239,239,239,
+143,219,183,111,151, 54, 77,210, 52,236,236,236,112,245,234, 85,131, 70, 82,149, 39,130,140,136,136,128,175,135, 45,194, 67,206,
+194, 86, 46, 66, 11, 39, 7,184,248,119, 69, 76, 76,204,223, 25,205, 34, 80,218, 15,163,103,217,111,112, 7,128,137,149,158,111,
+ 4,176,222, 24, 65,134, 97,120,146, 36,137,196,196, 68,157, 92, 46, 39,172,173,173,105,169, 84, 10,141, 70, 83, 97,184, 98, 99,
+ 99, 17, 28, 28,140,164,164, 36, 88, 91, 91,147, 22, 22, 22,208,233,116,185,134,232,123,123,123,195,193,193,161, 74,199,247,113,
+227,198,213,203,100,141, 6,252,182,127,187,188,129,148,164, 44,124,109,223,198,147,168,248, 18, 82, 11,217,127,193,100, 1, 64,
+ 94, 94,222, 86, 0, 91,203,159,219,218,218,142,161, 40,106,158, 70,163,177,184,120,241,162,165, 82,169, 36,118,237,218,165, 95,
+176, 96, 65, 30, 69, 81,185, 4, 65,172,253,251,205, 33, 34,179,242,227,220, 69, 86, 78,220,189, 18,254,218,180,196,217,141,115,
+ 69,141,148, 68, 83, 63, 12,204,120,120,101, 12, 19,215, 41, 61, 53,141,228,193, 69,214,114, 13,222, 49,123,238,226, 47, 99,162,
+238,184,201,204,101,152, 24, 56, 23,167,127, 61, 15,130, 20,225,242,181, 80,104,117, 44,178,114,242, 49,108,196,135,112,113,180,
+ 69,228,141, 51,153, 12,199,109,124,189, 76, 54,183,161,119,255, 49, 86, 82, 19,121,217, 57, 97,177,231,135, 25, 32,201,117,248,
+234,171,175,224,231,231, 55, 41, 34, 34,226,107,212,145, 71,139, 32,184, 13,205,186,142,176, 18, 75, 75,117,120,142,197,182,195,
+179,203,242,104, 77,199,198,173, 71,155, 53,245,120,178,168,182, 60, 90,175,145,201,170,188,174,221,104,185,187,187, 75, 77, 69,
+152, 32,162,232,153,159,126, 48, 64,153, 17,247, 0, 73, 15,239,148, 54, 47,232,212,186,180, 71, 15, 13, 73,133,222, 19, 85,243,
+119,240,181, 53, 93,149,148, 24,116, 71, 95, 69,179,188,194,125, 62,154,101,164,201,122, 65,179,178,217,170,156, 55,203,213,213,
+ 21,203,150, 45, 51, 36,143,214,243,199, 94, 78, 31,148,118,128,175,220, 25,190,143,129, 38,171, 90, 77,165, 82,137,236,236,210,
+ 12, 9,221,186,117, 67,183,110,127,140,103,208,233,116, 21, 81, 44, 51, 51,179,234, 34, 90, 47,104,154,152,152,204, 62,118,236,
+216,216,107,215,174, 13,253,226,139, 47, 68, 61,122,244, 40, 55,115, 42, 24, 54,183, 91, 21, 77,150,101, 3,207,156, 57, 67,113,
+ 28,135,109,219,182,225,246,237,219,188, 92, 46,159, 47,151,203, 55,152,152,152,176,106,181,122,226,248,241,227, 63, 92,180,104,
+ 17,233,239,239,143,235,215,175,147, 13, 27, 54, 28, 5, 84, 73, 98, 89,237,177,135,134,134,130, 36, 73, 48, 57, 9,152, 52,251,
+ 32, 76, 77,104, 68, 69, 69, 33, 39, 39,231,133, 36,166,134,156,207,202,145,146,242,197,223,223,191,162, 25,178,125,251,246,160,
+ 40, 10,119,239,222,173,169, 25,182,178, 38,111, 99, 99, 83,241,251, 16,139,197, 56,127,254, 60,190,249,230, 27,184, 89, 91, 34,
+247, 97, 56, 28,186,189,133, 94, 99,199, 99,248,240,225,160, 40, 10,214,214,214, 21,145, 95, 3,126, 75, 47, 67,101,205,177,190,
+190,190,163, 34, 35, 35, 93,154, 53,107,230, 24, 17, 17,209,221,207,207,207, 61, 60, 60,188,252,185, 20,134,245,205,169,208,188,
+117,235,214,145, 13, 27, 54, 4,142, 30, 61, 90,204,113, 28,251,236,217, 51, 61, 0,194,193,193,129,186,117,235, 22,119,242,228,
+ 73,168,213,106,184,184,184,144,206,206,206,196,185,115,231,184,135, 15, 31,134,242, 60, 63,215,144, 99,103, 89,182, 74, 26,135,
+242,199,251,246,237, 51,250,255,222,160,177,247,210, 30,111,250,184,102,165,220, 69,106,114, 28,216,124,165, 46,248,248, 41,141,
+145, 38,235,207, 46,163,191, 82,115,241,163, 71,143,156, 53, 26, 13, 36, 18, 9, 54,109,218,164, 91,182,108, 89,100, 86, 86, 86,
+ 23, 84, 63,162,188,138,102, 61, 71, 29,230,212,162,249,194,168,195,252,108,156, 62,126,226, 86, 91,197,192, 29,152,148,146, 89,
+209,177,145, 39, 8,235, 99,246, 77,186,200,219, 53, 75, 38,127, 94, 72, 22,178,170,211,181, 28,187, 86,173,213, 14, 25, 56,104,
+196,111, 7, 14,236, 87, 44, 88,184, 16, 87, 67,195,145,157, 87, 4,142,167,192, 17, 4,230,205, 91, 0, 7, 91,107, 20,164, 60,
+ 82,105,116,186,129,168,154, 67,235, 95, 95,238, 4, 65, 78, 62,119,114,215, 58,146, 0, 87,156, 30, 45,165, 10,227,228, 35,135,
+ 15,164,135, 12, 25,130, 99,199,142, 33, 34, 34, 98, 75, 45, 38,171, 66,147,231,201,201,225, 23, 15,174, 35, 0, 78,157, 25, 45,
+165,139,158,200, 71,125, 48,144, 30, 62,124, 56,126, 10,190,134, 3,167,158,108, 62,112, 10,167,240,122, 99,124,102,120, 51, 26,
+ 17, 93,154,120, 58,251,183,106, 42,163, 89, 53,146, 30,198, 33,167,184, 4,231, 30, 60,203, 35,121,178,222,185,117, 74, 47,144,
+ 98, 36, 36, 60,170,230,206, 74, 86, 86,161,151, 24,165, 73,146,100,149,104,214,203, 68,178, 42,239,167,189,189,125,149,233, 92,
+ 42, 87,220,229,125,128,234,145,218, 97,118, 66, 66,130,121, 66, 66, 2,120,158, 71,104,104,168,121,251,246,237,103,191, 76, 52,
+107,198,140, 25, 21, 81,171,231,215,213,189, 86, 23,101,157,210,131,244,122,253,225,153, 51,103, 78,106,223,190,125,239,133, 11,
+ 23, 18, 48, 98, 2,222,231,162, 57, 12,199,113,184,112,225, 2,142, 29, 59,198,234,116,186, 9,169,169,169,225,149, 54,249, 62,
+ 44, 44,236,220,160, 65,131,118, 69, 71, 71, 83,145,145,145,224,249,186,199,157,170,213,106,120,121,121,129, 97, 24,172,152,228,
+138,194,194,102, 96, 24, 6, 44,203,194,212,212,180, 34,138, 87,217, 60,215,245, 59, 98, 89,246, 5,163, 21, 26, 26, 10,138,162,
+208,165, 75, 23,220,185,115,167, 34,162, 85, 87, 4, 74,167,211, 37,216,219,219,219, 47, 94,188,184, 98,191, 50, 51, 51,113,246,
+236, 89,116,232,216, 9, 77, 38, 76, 68, 74, 74, 10,214,174, 93, 11, 39, 39, 39, 44, 93,186, 20, 57, 57, 57, 96, 24,230,175, 14,
+167,191, 19, 25, 25,233,242,193, 7, 31,100,132,135,135,187, 4, 7, 7, 91, 6, 4, 4,152,142, 24, 49, 34, 35, 60, 60,220,133,
+ 32,136, 78, 48,178, 19, 52,199,113,115,230,205,155,247,235,210,165, 75,103,127,246,217,103,237, 71,143, 30, 45, 18,137, 68, 92,
+114,114, 50,179,127,255,126,194,203,203,139, 20,139,197,196,153, 51,103,184,155, 55,111,222, 96, 24,102, 5,128,203,198, 68,156,
+ 43,155, 44,138,162, 12, 53, 89, 85,152,102, 39, 29,101, 70,102,118,217,176,105, 25,233,227,225,162,219,189,255,108,226,229,235,
+143, 30, 83, 26,102,218,143,181,164, 6,120,157,161, 40,234,144,175,175,239,152,201,147, 39,155,244,233,211, 71,186,104,209,162,
+252,194,194,194,154, 76, 86, 53, 55,204,127,201,168,195, 31,230,124, 17, 60,237,243,102, 99, 60, 63,118,104,128,144,226, 12,228,
+210, 20,105,110, 73,162,149, 59,133,194,172, 88,229,169,223,118,198, 3,168, 43, 47,219,173,176,251, 17, 61,155, 54,107,121,116,
+197,210, 21,118,243,103,205, 20, 29, 13,254, 5, 60,163, 67,232,197,139, 80,136, 89,254, 97, 88, 72,186, 70,167, 29,128,215,112,
+ 10,158,212,171,235, 15, 0, 56, 97,109,109,125,111,236,232,209, 94,190,190, 35, 32,151,203,113,228,200, 17,236,249,254,123, 54,
+ 8, 24, 42, 5,238, 4,214,145, 79, 47,227, 70,133,206,221,241, 99,199,122,183,106,245, 49,228,114, 57, 14, 31, 62,140, 93, 65,
+ 65, 6,235,252,203, 41,207, 12,127, 26,127,100,136,175,163,143, 22, 73, 20,222,120,244,172, 40,244,209,179, 34,112, 60,207,241,
+188,134, 36,145, 88,172,211, 45,125,244, 36,185, 94,166,160,188,233,112,201,183,147, 95, 93,155, 71, 37,243, 83,223, 33,221,213,
+152,172,164,202,115,164, 85,174,164,107,122,172,215,235,147, 12,148, 95,238,230,230,246,194,107,245, 15,253,242, 70,153, 44, 67,
+243,104, 1, 64,118,118,118, 42,128,249,215,175, 95,223,215,187,119,239,241, 0,146,235, 89, 70,219,186,118,237, 58, 1, 0, 69,
+ 16,196,150,148,148,148,240, 23,254,240,169,169, 49, 78, 78, 78,171, 60, 60, 60, 38,150,222,152, 18,219,234,168,200,159, 52,107,
+214, 76, 87, 93, 89,212,244,156,227,184, 58,203, 40, 47, 47, 15,237,218,181,123, 97, 78, 75,158,231,241,236,217,179,242,136, 83,
+197,185,175,205,192, 21, 21, 21, 77,156, 50,101,202, 86,145, 72,228, 6,128, 40, 55,185, 44,203, 82,235,215,175,151,177, 44, 75,
+ 1, 32, 72,146,100, 68, 34, 81,201,177, 99,199, 24,134, 97, 18, 52, 26,205,196,191,248, 2,113,152, 40,157,138,161, 56, 50, 50,
+210,167, 44,146,149, 20, 17, 17,113,247,192,129, 3, 74, 0, 7,235,169,123, 89,165, 82, 93, 94,182,108,153,255,166, 77,155,230,
+ 76,156, 56,177,221,240,225,195,233,110,221,186,225,244,233,211,236,133, 11, 23, 66,213,106,245,114, 99, 12, 86, 89, 89,230,187,
+186,186, 86, 24,174, 58,254,203,181,118,228,181,113,151,110,248,240, 19, 39,217,182,229,103,139,178, 82,180,215,244, 69,218,185,
+ 59,129, 8,252,135, 73, 79, 79,255, 2,192,130,181,107,215,166,180,104,209, 66, 42, 22,139,181,134,154,172,191, 16,134,203, 43,
+122,247,187, 94,239,159,232, 58,111,138, 71,175,238, 93,228,174, 13,236,156, 31,198,165, 35,246,250,233,226,123,167,190,125,202,
+107,114,251, 3, 48,164,231,250, 77,141, 78,215,104,198,204, 25,147, 36, 34, 81,111,150,101,155,247, 56,119,156,167, 40, 42, 92,
+171,215,159, 43,107, 46, 44,121,141,139,124,201,170, 85,171,188,124,125,125,113,228,200, 17,156,219,187, 23,195,178,178,112,158,
+162, 40, 82, 44,182, 57,165,211,173,134, 97, 6,105,201,154, 53,107,188,253,252,252,112,232,208, 33,156,217,181, 11, 67,235,167,
+ 83, 83, 93,215, 22,128,178,236,105, 22,128,104, 0,173, 1,152, 0,208,160,116,106, 39,219,202, 85, 88,217,123,229,239, 95, 34,
+ 8,226,207,236, 8, 91,119,102,248,231,137,136,125,218,250, 85,239,133, 90,173,206,241,242,242, 50,106,204,181, 94,175,175,181,
+ 13,151, 97,152, 36, 79, 79, 79,131,163, 22,134,152,162,156,156,156, 54,127, 98, 97,188, 84, 95,172, 42,149, 8,199, 61,117,116,
+116,228,202, 43,253,234, 76, 88,117,175,241, 64,188, 49,223,147,150,150, 22, 13,224,243,250,238,103, 74, 74,202, 81, 24, 48,105,
+180,161,219, 1, 64,110,110,238, 43,159,204,151,224,249,228, 69,139, 22, 25,101,176,193,243,181,153,207,240,162,162,162,246,134,
+124,183, 78,167,195,223,200,161,178,133,140,136,136, 24, 79, 16, 68, 31,148, 54, 9,108,193,171,201,230,125,185,160,160,224,242,
+202,149, 43,253,183,109,219, 54,141,231,121, 20, 20, 20, 4, 25,107,176, 42,238,158, 51, 50, 78,191,170, 3,207, 73,215,254,190,
+127, 75,210, 91,234, 60,221,180,237, 69,218, 93, 16,168, 8, 70,241, 60,255,191,145, 35, 71,118, 0,176,243,101,197,106, 24,117,
+248,178,196,115,185,249, 45,206,207,248,102,236,121, 75,179,190, 96,105, 31,104,201, 83,208,102,159, 6,240, 35, 12,235,230, 80,
+113,188, 12,199,173, 97,180,218, 53,149, 42,151,255, 66, 57, 91,251,249,249, 77, 27, 51,102, 12, 22, 44, 88,128, 51,171, 87,235,
+ 62, 33,136,124, 17,192,255, 90,122,163, 73, 18,192, 44, 67,117, 70,141, 26,133, 5, 11, 22,224,231, 21, 43,234,171, 83, 27, 74,
+130, 32,130, 1, 96,246,236,217,115,151, 45, 91,102, 53,103,206,156,230,203,151, 47, 95, 90,246,252, 65,249,251,101,117, 93,192,
+156, 57,115,154, 86,122,191, 16,192,173, 63,249,124, 86,155, 25,254,207,166,167,160, 41,104, 10,154,130,166,160, 41,104, 10,154,
+130,230,203,192,243,124,223,210, 85,205,235,154, 30, 87, 90,255, 45,208, 16, 16, 16, 16, 16, 16, 16, 16,248, 23, 82, 57,138, 85,
+159,247, 95, 33,229,125,180, 42,179, 13, 40, 29,214, 93,147, 43, 53,102,212, 67,125,156,109,136,160, 41,104, 10,154,130,166,160,
+ 41,104, 10,154,255, 57,205,186,180, 95,248, 60,207,243,125, 9,130, 8,230,121, 62,160,166,117,185,177,122,254,113,165,245, 43,
+235,118, 80, 13,229,125,179, 94,232,163,245,103, 35,132, 85, 5, 77, 65, 83,208, 20, 52, 5, 77, 65, 83,208,124, 41,202,155, 0,
+ 1,240,179,103,207,158,243, 15,108, 58,116, 44, 51, 89,149, 23, 0,181, 52, 29,242,252, 97, 42, 57, 25,230, 18,137, 92, 12, 0,
+ 90,173, 74,231,236,140, 2,130, 24,242,119, 78,120, 43,240,239,164,124,184,119,250, 43,222, 86, 64, 64, 64, 64,224,191, 65,102,
+121,164, 10, 64, 38, 0,162,236,185,182,108,157, 89,102,200,158,127, 92,229,253, 63,145, 84,212, 16,201,162,107, 50, 89, 89, 89,
+114, 91,154,206,245,102,217,146,198, 0, 64,211,100, 84, 86,150, 85, 12,207, 31,206,170,143,217,178,181,179, 11, 19, 81,148,179,
+ 33,219,234, 89, 54, 57, 43, 61,189,106,234,120,130,120, 29, 12,158,161, 38,226,101,204,198,159,110, 84,108,109,109,237,237,237,
+237,223, 51, 55, 55,239,152,151,151,119, 51, 51, 51,243,167, 90,230, 61, 92, 70, 16,152, 89,250,187,194, 74, 0,115,106,145, 54,
+102,219,231,241,146,203,229,147, 8,130,240, 43,251,131, 69,168, 84,170, 77, 0, 30,253, 7, 47, 72, 38, 0, 6,208, 52, 61,202,
+214,214,182, 93, 90, 90,218, 34, 0,245,205,230, 77, 3,152, 97,105,105, 57,204,210,210,210, 51, 39, 39,231,113, 65, 65,193, 33,
+ 0,107, 0,212, 57, 84,122,209,103,142, 29,187,245,233, 54,255,194,153, 11, 75, 22,125,159,122,253,133,247,103, 56,218,244,238,
+213,121,193,133, 83,215, 22,207,221,152,146, 99,228,190,145,101, 11, 80, 58, 58,146,199,139,201, 94, 95, 22, 17,128,126, 0,186,
+ 1,184, 0,224,148, 33,199, 93, 3, 29, 0,204, 45,219,231, 53, 0,206,255,195,127, 71,166,246,246,246, 43, 0,244,163,105, 58,
+ 50, 57, 57,121, 2,128,164,191,121,159,104, 0,109, 1,248,161, 52, 13,199, 45, 24,150,194,161, 78,108,108,108, 2,104,154,158,
+ 84,150,218,101, 83,118,118,118,240, 63,181, 96, 36, 18, 73,144,131,131,195,199,106,181, 90, 69, 16, 4, 95, 57,223, 35,195, 48,
+ 73, 89, 89, 89,109, 94,183,139, 26, 65, 16,183,254,225,187, 56,161,154,215,106,206,163,149,156, 12,115,154,206,245,206, 72, 11,
+ 31,150,146,122,127, 40, 0, 56, 57, 54, 63,100,231,208,236, 96,114,178, 68,231,224, 51, 80, 33,146,211,155, 40, 74,212,178, 68,
+171,177, 21,209,162, 44, 29,163,191, 75,106,249, 73,105,209, 63, 85,155,108, 81, 68, 81,206, 79, 99,206,219, 49,186, 28,136,100,
+ 78, 16,153,184,213,184,183, 78, 78, 78,245, 58, 74, 43, 43, 79, 51,157, 84, 54, 77, 36,162,122,113, 60,227,199,115, 0, 73,136,
+ 34, 24, 86,255,155, 88,163,249, 46, 55,247,113, 97,125,207,160,143, 13, 28,120, 96, 56, 8,244, 2,143,115, 4,112, 32, 58, 27,
+105, 70, 72, 24,106, 34, 94,198,108, 84,254,236, 90, 0, 95,188,234, 95,146,179,179,179, 85, 64, 64, 64,208, 55,223,124, 99,162,
+ 80, 40,136,132,132,132, 62,179,102,205,122,243,246,237,219,159, 39, 39, 39,167, 60,111,250, 8, 2, 51, 57,142, 39, 1,128, 36,
+137, 89, 74,165,157,156,162,168, 23,114, 27,177, 44, 43,207,204,204,152,204,113, 60, 81,182,237, 76,158,199, 58, 67, 12,163, 76,
+ 38, 27,225,215,172,229,231, 43, 86,173, 81,216,219,217,153, 50, 44,167,139,127,246, 84, 62,127,246, 23,237,227, 98, 31,173, 43,
+ 41, 41,217, 95,159,255, 53, 69, 81,195,164, 82,105, 0, 0,223,178,215, 30,106, 52,154, 96,150,101, 15, 26, 90,161,219,219,219,
+ 95,162, 40,170,129, 49, 95,204,178,108, 66,122,122,122,151,122, 22,209, 16, 55, 55,183, 31,187,118,237, 42,111,215,174, 29, 36,
+ 18, 9, 22, 44, 88, 48, 35, 53, 53,181, 46,163, 69, 3,152, 33,151,203,135,153,154,154,122, 22, 21, 21,197,169,213,234,163, 18,
+137,164,231,186,117,235, 92, 59,119,238,108,150,158,158, 78, 80, 20,101,255,243,207, 63,127, 20, 20, 20,212,135, 97,152, 30,117,
+ 85,114,249,113,252,124,105, 63, 95,255,252,184,243,243, 1,188,243,252,251, 76,137,108, 20, 79,185, 6,168,249, 59,137,101,230,
+195, 96,147, 37, 18,137,214, 57, 56, 56,140, 41, 41,205, 21,192, 63, 95,225, 0,128, 86,171,205,205,203,203,243,169,207, 95, 30,
+192, 56, 75, 75,203, 49, 95,126,249,165,213, 59,239,188,131,189,123,247,126,186,125,251,246,220,130,130,130,255,161, 52, 17,102,
+180,145,154, 51,211,210,210,222, 21,137, 68,132,171,171, 43,165, 86,171,141, 49, 90,222, 40,157,132,249, 22,128, 77, 40, 77, 93,
+208, 29, 40,253,191, 3, 88, 89,110,220, 72,146,220,228,227,227,243,222,195,135, 15, 55, 3, 88, 82,223,255,186,131,131,195,214,
+141, 27, 55, 14,237,223,191, 63,149,153,153,233,220,162, 69,139,125,105,105,105,254,175,224, 50, 50, 86, 42,149, 78,111,222,188,
+121,147,232,232,232,152,130,130,130, 53,101,231,179,182,255,148, 11,128,158,150,150,150, 61,230,205,155,167, 8, 8, 8,192,182,
+109,219,222,221,190,125,123, 81, 97, 97,225,111, 40,237,211,243, 82, 38,144,166,233, 73, 73, 73, 73,182, 60,207,195,209,209,113,
+ 18,128,127,164,209, 34, 73,114,221,160, 65,131,198,236,219,183, 79,254,244,233, 83,185,179,179,115, 69,242,108,130, 32,234, 93,
+127, 10,188, 52,219, 42, 25,174,186,243,104, 73, 36,114, 49,203,150, 52, 78, 73,189, 63,244,205,174,235, 45, 0,224,210,197, 41,
+ 67,237, 28,154, 70, 72, 36,242, 24,169,185,236,216,160,126, 61, 91,190, 31,208,149,112,113,180, 67, 82,106,134,253, 15, 7,206,
+188, 29,124,230,252, 49,148, 38, 16,171, 22, 70,151, 3, 19, 93, 8,162,175,124, 15,219,110, 41,216,240,115, 18,174,223,139,135,
+ 42, 63, 11, 13, 28, 76,176,106, 90,111, 56, 88,201,235,119,235,101,231,213,157,161,165, 7, 63, 24, 49,210,226,189, 1,190, 34,
+119, 7, 7,240,188, 20, 49,113, 69,157,126, 57,123,190,237,209,195,251, 39,153,138,188,134, 21,103, 60, 50,248,226,214,202, 17,
+ 38,197, 58, 12,160, 41,226,163,206,109,154,244, 24,241,174, 63,217,196,183, 17, 34, 31, 60,236,125,226,247,208, 85,228,181, 7,
+191, 49, 44,191,219, 84,140,227,119, 82,107, 77,232,247,130,225,232,209,163,167,191, 84, 42,173,146, 60, 73,163,209,136,127,251,
+ 45,164, 67,125,204, 70,249,119,104,181, 26, 82, 36,146,128, 36,137,207,253,252,154,249,102,101,101,157, 39, 8,226,199,148, 20,
+227,162, 5, 83, 0, 73, 46, 77,183, 38,165, 82, 71, 86,171,181, 1, 0, 66, 34,201,141, 39,201,102,243,230,206, 85, 80, 20,197,
+101,103,103, 67,165, 82, 17,227,199,143,151,197,197,197, 13, 74, 78, 78,254,190,142, 59, 18,108,223,190,221,219,209,209,241,133,
+217, 99, 83, 83, 83, 37,253,251,191, 87,159,162,247,110,222,162,213,244, 51,103,126,245, 45,200,201, 45,217,190,118,107,152, 94,
+ 38,215, 52,244,245, 17,109,218,182,203, 98,194,152, 15,167, 68, 69, 61,184, 11,227,230,171,115, 51, 49, 49, 57,182,122,245,106,
+191,238,221,187,139,236,236,236,144,158,158,142,135, 15, 31,250,253,254,251,239, 3,118,237,218, 53, 67,173, 86, 15, 2, 12,154,
+ 16,213,235,183,221, 63,218,153, 90,219,128,213,235,225,212,188, 85, 69,126,179,216,223,207,130,209,233,192,233,245,240, 13, 24,
+ 80, 22, 77,230,225,235,235, 91,223,172,187, 78, 77,155, 54,221,179,116,233, 82,177, 70,163, 65,104,104, 40,206,159, 63,207,165,
+166,166,214,149, 16,151, 38, 8,226,236,194,133, 11, 93,186,116,233, 98,150,149,149, 5,150,101,109,143, 31, 63, 62,169,101,203,
+150,230,174,174,174,146,221,187,119,163,168,168, 8, 12,195, 88,123,122,122, 90,143, 24, 49, 66,187,123,247,238, 25, 0, 86,212,
+ 20,201, 42,136,227,231,167, 18,158,111,251,180, 30,133, 52,226,215,183,167,191,141, 95,204,223, 32, 42, 34, 91,111,123,122,154,
+ 21, 36,203,103, 41,204,155, 89, 23, 36,135,204,122,219,211,115,251,175,143, 13,186, 25, 34,203, 42,155, 15, 14, 28, 56, 32,127,
+248,240,161,220,215,215, 23, 28,199, 85,100,224, 47, 79, 56,235,229,229, 85,159,243,184, 60, 48, 48,112,214,208,161, 67,209,188,
+121,243,138,164,168, 95,125,245, 21,102,205,154,101,117,233,210,165, 25,251,247,239,159,241,211, 79, 63,173, 0, 48,219,200,104,
+ 76, 57,198,150,241,215, 79,158, 60, 25,114,236,216,177, 15,103,206,156,233, 5, 96, 50,128, 5,217,217,217, 93,203,162, 49,146,
+ 50,163, 53,118,198,140, 25,159,204,158, 61, 27,239,190,251,238,130,208,208,208,111,235, 25,229,163, 24,134,121,183,127,255,254,
+148, 94,175,135,169,169, 41,244,122,253, 27, 47, 27,148, 0,176,113,226,196,137,159, 4, 6, 6,194,202,202, 10,122,189,222,251,
+192,129, 3,219, 23, 44, 88,208, 17,192,184, 26,246,117,212, 39,159,124, 50,120,228,200,145,104,211,166, 13,104,186,244, 52,174,
+ 94,189, 26,139, 23, 47, 86,156, 61,123,118,192,238,221,187, 7,156, 56,113,226, 40,170, 78,219,101, 20, 28,199,129,166,105, 36,
+ 38, 38,194,206,206, 78,202,113,220, 25,130, 32,182,229,228,228,252,244, 15,170,204, 87, 14, 25, 50,228,131,125,251,246, 41, 0,
+ 96,213,170, 85,152, 62,125, 58,236,237,237,161, 80, 40, 4,171,243,207,137,104, 77,168, 51,162, 85, 23, 42,149,170,213,156,207,
+ 62, 2, 73,150,222, 53, 54,106,232,134,101,115, 39, 16, 39,130,207,180,170, 53, 6, 47,115, 66,244,149,239, 33,117,157, 6,141,
+158,193,141,123, 79,112,110, 85,159,210,218,242,157,121,208,232,122,148, 87, 54,214, 18, 19,147,149, 90,150,189, 10, 7,135, 80,
+ 60,123,150, 89,151,201, 82, 58,216, 7,111,217,178,194,196,239, 13, 31,232, 24, 61,146, 51,146, 65, 16, 82,184, 56,155, 97,236,
+168,119, 68, 93,187, 58,217,126,253,245,214,211,105, 28, 6,170,178, 30,213,153, 48,212,219, 22, 59, 91,249,121, 13, 29,209,183,
+139,180,153, 95, 83,136,165, 38, 21,239,181,110,211, 6,173,219,180, 33,103, 23, 21,246,186,121, 43,172,215,145,179, 55, 52, 42,
+253,179, 67, 49, 89, 24, 93,199, 69,166,194,112, 76,157, 58, 21,246,246,246, 85, 54, 72, 79, 79,199,239,191,255, 86,237,103,140,
+184,144, 85,124,199,183,223,126,107,150,155,155,251,206,142, 29, 59,222,226, 56,238,219,180,180,180, 43,134,136,140, 4, 26,228,
+ 75,165, 61,198,172, 89,195,181,124,239, 61,202,210,193,129,228, 88,150, 72,121,252,216,102,237,247,223,119,203,137,141, 53, 41,
+182,182,206,201, 85,171, 85, 49, 49, 49,144,201,100, 4, 77,211,109,171,145, 74,231,121,172, 36, 73, 98, 22, 65, 16,144, 74,101,
+ 49,129,129,129,119,202,222,107,112,234,212, 41,121,191,126,253, 84, 0,158, 2,128, 84, 42,115,166, 40,210,187, 52, 19, 59, 86,
+ 26, 98, 48, 77, 77, 77, 63, 91,178,116,133,105, 65, 78,158, 90, 87, 92,172, 87,154, 43, 8, 66, 97, 70, 21,228, 23, 22, 38,167,
+102,106,230, 45, 90, 76, 77, 28, 59,242,179,226,226,226, 73,134,154,172, 22, 45, 90,220, 60,118,236,152,157,141,141, 13,242,242,
+242,144,157,157,141,155, 55,111,130,227, 56, 12, 26, 52, 72,218,169,125,187, 86,115,231,205,191,158,152,156,220,209, 16,179,101,
+106,109,139, 85, 93, 90,150, 86,214, 79,179, 43,202,103,219,144,128,138,109, 22, 39,229,151, 71,231, 94,102, 10,169,142, 61,122,
+244, 16, 3,192,184,113,227, 10, 10, 11, 11,151, 1,216,135,186, 51,250,207,152, 63,127,190,115,195,134, 13,221,247,237,219,135,
+162,162, 34, 0,176,107,216,176, 33,188,189,189,217, 11, 23, 46,192,219,219, 27,102,102,102,184,116,233, 18,174, 95,191,142, 54,
+109,218,152,137,197,226,161, 58,157,174, 90,163,213,173, 79,183,249,210,126,190,254, 62,173, 71, 65, 97,238,136,237,251, 15, 34,
+ 58,108,151,191, 70,247,112,190,152,189, 56, 82,205, 75, 71,103, 38, 40,102, 55,104,211,213,166, 81,211,247,224,222,250,142,109,
+ 9,123,249,201,252, 94, 13,151,211,178,146, 93,139,214,164,102,215,100,178, 0,172, 26, 52,104,208,144, 3, 7, 14, 88, 2, 64,
+120,120, 56,210,211,211,161, 84, 42, 33,147,201, 32, 18,137, 42,230, 39,173, 39,163, 55,109,218, 84, 97,218, 24,134,169,152, 5,
+ 64, 46,151,227,205, 55,223, 68,203,150, 45,241,211, 79, 63,141,174,193,104,117,105,223,190,253, 94,119,119,119,215,202, 47, 22,
+ 23, 23, 99,248,240,225, 0,128,174, 93,187,246, 48, 49, 49,225,203, 13, 97,106,106,106,209,173, 91,183,122, 1, 8,173,193, 89,
+170,147,147,147,241,229,151, 95, 34, 62, 62,254,211, 45, 91,182, 60, 3, 32,147, 72, 36, 21,247,199, 0,188,155, 54,109,186,110,
+250,244,233,136,139,139, 67,100,100,228, 77,212,191, 41,149, 53, 53, 53,141,213,235,245,109, 24,134,129, 90,173,198,192,129, 3,
+101, 71,143, 30, 77,167, 40, 42, 42, 43, 43,235, 67,148,246, 73, 49, 20, 25,128, 53,129,129,129,159,204,156, 57, 19,191,253,246,
+ 27, 78,156, 56,129,145, 35, 71, 98,218,180,105, 80, 40, 20, 99,166, 77,155,118, 29,165, 19,154, 63, 79,143, 77,155, 54,129,101,
+217, 23,254, 27, 50,153, 12, 93,186,116, 65,147, 38, 77,112,226,196,137, 30, 47, 97,180,220,187,116,233, 34,225, 56, 14,197,197,
+197,184,112,225,130,194,196,196, 68,225,226,226, 50, 30,192, 63,198,104,185,187,187, 7, 30, 56,112, 64, 81,185,245, 71, 42,149,
+162,210,239, 64,224,239,143,104,213,122,135, 85,129, 86,171,210,209, 52, 25,229,228,216,252,208,165,139, 83, 42,154, 14, 1, 50,
+ 74,171, 85,233, 0,128,229,120, 20,168, 24,152, 72, 73, 60, 77, 43,196,131,199, 89,213, 73, 85, 25,162, 41, 50,113,131,180,170,
+ 8,231,172, 0, 0, 32, 0, 73, 68, 65, 84,221, 83,240, 60, 15,173,142,133, 38, 63, 13,203, 78,171,240, 48,169, 4,218,226, 92,
+104,117,165,221,176,108,109,109,233, 51,103,126,153, 30, 18,242,251, 39,255,251,223,255,168, 36, 11,139,200, 66,160, 85,117,154,
+ 86, 86,158,102,156, 68,114,104,243,150, 5, 38, 60,245, 24, 49, 9,197,104,228,210, 14,182,150,174, 72,203, 42,198,213,200,159,
+ 17,245, 40, 24, 13, 29,221, 49,237,179,183,101, 75,150,238, 59, 40,102, 60,220,242,242,226, 11,106,218,207,242,187,168,173,191,
+198,128,201,121, 12, 54, 59, 14,108, 97,202, 11, 27, 40,148,110,104,221,221, 25, 74,215, 55,164,163,167, 45, 30, 5, 84, 49, 90,
+149, 53,211, 9,130,220, 76,146,196, 39, 4, 65,160,121,243, 22, 73,107,214,172,169, 46, 21,184,174,121,243, 22, 73, 20, 69,186,
+148, 94,216,201, 77, 60,207,165,215,177,159, 85, 76,141, 68, 34,157, 89, 26,246,119, 76, 60,125,250,180,110,200,144, 33, 88,189,
+122,181,100,214,172, 89,243, 40,138, 26, 87, 77,243, 94, 21,205,129,128,155,229, 27,111,244,254,246,234, 85, 94,164,215, 19, 57,
+ 55,111, 22,228,165,166, 50,105,133,133,146,195, 81, 81,239,126,252,197, 23, 18, 87, 87, 87, 92, 9, 14,182,201, 44, 46,230,243,
+ 52, 26,117, 94, 94, 30,207, 48,204,205, 26, 52,231, 40,149,118,242,237,219,183,123, 7, 6, 6,222, 73, 77, 77,157, 3, 0,142,
+142,142,203, 0, 52, 1,240,180,210,107,216,178,229, 96,242,248,241,227, 99, 50, 50, 50,230,212,182,159,149,104,106,167,180,147,
+239,223,186,251,190,181,153, 9,169,116,113, 34, 69,150,150, 52, 35, 49, 17,115,128,186,161,235, 27,166, 0,154,214,240,217,231,
+ 53, 9, 19, 19,147, 99, 39, 79,158,180, 19,137, 68, 96, 89, 22, 74,165, 18,241,241,241,200,203,203, 67, 97, 97, 33,158, 68, 61,
+132,135,171, 43,190,158, 61,203,113,242,172,217,199, 84, 42, 85,155,231, 42,179, 23, 39, 64,214,235, 94,136,236, 85, 55,139,193,
+243,205, 94, 6,150,123,101,226, 19, 18, 18,160, 80, 40,224,231,231,167,184,122,245,234,229, 90, 76, 86,229, 73,128,135,118,238,
+220,217,108,223,190,125,104,211,166, 13, 44, 44, 44,112,225,194, 5,132,135,135, 67,167,211,145, 69, 69, 69, 80, 40, 20, 88,190,
+124, 57,220,220,220, 80, 88, 88,136,167, 79,159,218,136, 68, 34,219,231, 50,218, 87,104, 94, 56,115, 97, 73,126,220,249,249,105,
+196,175,111,111,223,127, 16,227, 71, 12,131, 3,255,248,178,197, 27,196,146,222,253, 58,127,197, 83,174, 1,166,102,205,173,188,
+252,250, 65, 44, 81, 96,242,204,197,136,137, 56,101,165, 42,188,255, 41,193, 38,186, 46, 90,115,120,106, 53,199, 78, 0, 32, 93,
+ 93, 93, 63, 62,124,248,176, 89, 69,232,133,162, 42,230, 60,172, 60, 9,124, 45, 19,190,215,121, 62, 9,130, 64,124,124, 60,236,
+236,236,160, 80, 40, 42, 38, 16,127,248,240, 33,110,220,184,129,242,217, 40,106,208,252, 48, 36, 36,196,213,212,212,180,202, 6,
+ 60,207, 35, 43, 43, 11, 12,195, 64, 46,151,131,101, 89,232,116, 58,232,245,122,148,148,148, 40,154, 52,105, 50, 73,175,215,135,
+ 86,167,201,113,220,231, 67,135, 14,237, 28, 26, 26,234,249,253,247,223, 67,171,213,174, 74, 75, 75,195,224,193,131,193,113, 28,
+122,244,232,209,129,231,249,232,121,243,230, 1, 0,166, 79,159,174, 47, 46, 46, 14,172,207,177,151,209,164,117,235,214,158,191,
+253,246, 27,252,253,253,161,209,104,176,122,245,106,243, 45, 91,182,152,239,222,189, 91, 57,115,230,204, 31, 51, 51, 51,251,212,
+161, 73, 0, 88,229,224,224,240, 73,183,110,221, 76,202,230, 48,197,174, 93,187,240,245,215, 95, 31, 0, 48,239,151, 95,126, 89,
+120,226,196,137, 81, 31,127,252, 49,190,254,250,235,105,121,121,121, 59,106,210,124,242,228, 9,148, 74, 37,204,205,205, 75, 47,
+150, 58, 29,238,222,189,139,115,231,206,161,113,227,198,134, 28, 83, 77,251,233, 62,104,208,160, 31,247,239,223,111,150,152,152,
+136, 75,151, 46,193,195,195, 3, 42,149,202,144,185, 97, 67,254,132, 10,187, 70, 77,181, 90, 93,146,144,144,160, 88,177, 98, 5,
+ 28, 29, 29,225,238,238, 14,153, 76, 6,130, 32,160,215,235,107,155, 94,173,206,253,236,218, 21,116, 86,178, 85,127, 11, 75,171,
+ 79,121,158,167,243,243,115,183,234,144,119,228,241, 99,104,255,194, 99,255, 55,211, 10,192, 29, 84,157,243, 48,181,194,104, 5,
+ 7, 7,243, 1, 1, 1, 68,249,218,217, 25, 5, 89, 89, 86, 49,118, 14,205, 14,218, 57, 52, 45,155,247,139,140,162, 40,171, 24,
+123,123, 85, 1, 0,232, 24, 30,215,162,242,112, 63, 54, 13,225,177,105, 48,149, 26, 22,124,209,232,152,210, 30,171, 60,143,146,
+162, 63,110, 90,117,170, 92,104,116,165,221, 61,180, 26, 21,242, 51, 35,137, 33, 3,123,201, 62,249,100, 34, 28, 29,157,149, 53,
+233,233,164,178,105,147,167,191,107,105,109, 41, 66,240,213, 95,209,161,241, 64,200,164, 34,100,231,151, 0, 4,240,232,241, 57,
+128, 51, 67, 68, 76, 2,218, 55,149,163, 79,111, 95,197, 79, 71,162,191, 0,176,192,144,253,101,146,110, 66,236,245, 14, 68,172,
+ 30,250,172,104,112,121,207, 0, 83, 7,168, 9, 5,178, 83,159, 33,234,242, 81,131,238, 25, 57,142,251,212,214,214, 54,111,222,
+188,121,221, 26, 53,106,164,155, 52,105,210,189,103,207,158,125,254,220,221,202,119,155, 54,109, 66,108,108,108,242,183,223,126,
+123, 33, 43, 43,107,190,145, 5, 61,155,231, 17, 84,214, 20,151,117,252,248,241,214, 23, 47, 94,156, 22, 20, 20,100, 63,101,202,
+ 20,201,148, 41, 83,198, 2,248,166,182,230,194, 2,169,180,231,183,151, 46,241, 76, 82,146,102,207,250,245,146,141,215,174,205,
+211,113,156,147,173,157, 29,209,169,125,251, 98, 57, 73,102,101,167,167, 51, 74, 79, 79, 42,254,220, 57, 27,222,196, 36,229,151,
+ 95,126, 41, 40, 42, 42,170,113,234, 28,138,162, 84,213, 53, 23, 86,135,163,163,163,182,186, 62, 92,181, 84,136, 5, 28,207,235,
+ 44, 27, 54,228,123,247,232,216, 40, 54,250,241, 99,153,165, 37,229,213,200,195,231, 65, 84,252, 77,158,101, 75, 8,130, 40, 48,
+168,173,132,162,134, 5, 5, 5, 53, 51, 55, 55, 7,199,113,176,176,176, 64,102,102, 38,180, 90, 45, 10, 10, 10,160, 45,204,135,
+ 54, 63, 31,225,207,226,209,185, 91, 55, 12,121,187,183,239,238,227, 39,135,177, 44,123,160,214,246,188,230,173, 42, 34, 89,139,
+ 27,216,252,209, 22,148,152, 87, 97,186, 86,180,242,130, 88,161, 64,175,207,103,191,204, 31,253,206,233,211,167,127, 30, 52,104,
+208,187, 95,124,241, 5,153,154,154,250,107,124,124,124,103, 0,145,181,125, 72,161, 80,188,145,149,149,133,162,162, 34, 88, 88,
+ 88, 32, 40, 40, 8,246,246,246, 80,169, 84,184,117,235, 22,239,226,226, 66, 92,184,112, 1, 46, 46, 46,200,206,206,134, 78,167,
+131, 90,173, 78,211,106,181, 53, 54,151,151, 53, 15,190, 51,253,109,252, 18, 29,182,203,223,153,120,114,107,232,140,174,177,209,
+225, 81, 9,103,207, 93,253,134, 41,145, 37,230, 37,133,204,106,216,246,142,237,167, 95,126,141, 13,171, 22, 34, 58,244, 82,142,
+189, 91,193, 70, 19, 66,179,179,182,253, 45, 46, 46, 46,137,138,138, 50,187,119,239, 30, 8,130,128,133,133, 5,228,114,121,181,
+102,171, 30,144,149, 35, 80,197,197,197, 16,139,197,176,177,177,193,142, 29, 59, 42, 42, 94, 15, 15,143,218, 52,182,246,234,213,
+107,152,155,155,155, 89,229, 23,219,182,109,139,137, 19, 39, 98,243,230,205,184,118,237, 90,149,249, 52,211,210,210, 82,245,122,
+125,109,199,157,151,158,158,254,246,192,129, 3,195, 46, 95,190,108,190, 99,199, 14, 48, 12, 83,237,178,125,251,118,220,184,113,
+ 99, 1,128,168,122,254,142, 26, 15, 30, 60,248,210,222,189,123, 45, 51, 51, 51, 81,254,219, 40, 46, 46, 6,203,178,240,241,241,
+ 33, 24,134,169,171,223, 27, 73, 81,212,241,245,235,215,247, 27, 63,126, 60,104,154,134, 86,171,197,250,245,235, 49,107,214,172,
+244,178,155, 82, 29,128,121, 59,119,238, 28,245,222,123,239,161, 69,139, 22,190,231,207,215,220,179,163,168,168, 8, 69, 69, 69,
+ 16,137, 68,112,112,112,192,146, 37, 75,160,213,150, 94, 86,188,189,189, 43,254,198, 0,182,122,123,123,247,139,137,137, 89,141,
+210,190,107, 47,224,224,224, 48,144,231,249, 9, 44,203, 22,250,251,251,219,236,223,191,223, 44, 57, 57, 25, 97, 97, 97, 88,176,
+ 96, 65, 46,199,113, 44,199,113,132, 90,173,126, 98,103,103, 23, 38,149, 74, 77, 84, 42, 85, 78,118,118,246, 82, 0,191,254, 93,
+ 53, 57, 65, 16,132, 72, 36,194,184,113,227, 64,211, 52, 76, 76, 76, 80, 82, 82, 2,189, 94, 95, 97,230, 97,100,179,116,163, 70,
+ 10, 27, 26,226,241, 86,102, 77,166, 13,153, 26,160,116,116,114,134,165,185, 20, 15, 31, 70,118,254,253,183,115,235, 37,116,244,
+ 22, 78,171,223, 18,253, 52,255, 79,159,236,254,121, 47,242, 47, 53, 90, 47,204,121, 72, 87, 95,152, 67, 88,158, 63,156,149,156,
+ 44,209, 73, 36,242,152,242, 40,151,189,189,170,128, 32,134,176,202,166,253,193,232,244,101, 23, 10,190,108, 49,208,104,233, 89,
+196, 70, 71,224,242,217,147,176, 85, 37, 35,235, 73, 75, 64,220, 12, 90,117, 62, 74,180,186, 50, 83,194,226, 94,216,111, 40,200,
+207,129, 95,155, 0,128, 36,111,212,164,103, 97, 67, 4,116,106,221,156,138, 77,136, 64, 91,239,247,225,233,226,143,103,169, 5,
+200, 43,210, 32,183,160, 4, 45,253,102, 35, 51, 87,141, 2, 85, 9, 34, 99,119,195,217,201,147, 36,232,199, 61, 12, 53, 90,154,
+200, 99,208, 68,157,128,216,189, 51, 36, 62,239,129,114,239,130,132,251,231,113,239,151,181, 72,122,112, 5, 60,199,254,159,189,
+235, 14,139,226,106,191,103,102, 59,187, 75,239, 69,177,130, 98,239, 13, 69,108,104,236, 29, 75,172,209,168,216, 27,106,172, 81,
+209,104, 98,239, 37, 6,123, 55, 98, 23, 21, 11,118, 64, 64,172,244,178, 82,151,182,125,103,103,126,127, 80,130, 72, 89,208,228,
+251,126,249,246, 60,207, 60,187, 51, 59,115,246,157,123,239,220,123,230,189,247,190, 23,246,174,109,245,125, 72,118, 92,191,126,
+189,109,167, 78,157,216, 61,122,244,104,126,245,234,213,230, 18,137, 36,172, 80, 96, 52,239,209,163, 71,115,107,107,107,108,219,
+182, 77, 65, 16,196,142,106,102,118,177, 7, 44, 45, 45,237, 25,128,117,231,207,159,223, 49,117,234, 84,216,216,216, 52, 77, 73,
+ 73, 41,247,194,116, 14,167,249,248,245,235, 25, 14,139,197,156,220,185,147,187,250,250,245, 95,127, 63,114,132,219,205,211,147,
+ 96, 24, 6,161,161,161,194,141, 59,119, 10, 71, 15, 28, 24, 23,159,150, 70, 5, 5, 7,107, 36, 73, 73,121,105, 50,217,106,137,
+ 68,242,233, 63, 81,178,181, 90,237,227,152,216, 24,199,214,237, 90, 88,135, 68,197, 68,122,117,235,216,145, 36, 73,242,109,116,
+124,176,181,181,137,240,214,205, 91, 26,173, 86,251, 88, 31, 46, 62,159,223,175, 91,183,110,108,169, 84, 10, 7, 7, 7,164,167,
+167, 35, 57, 57,185,192,227,144, 35,133, 38, 39, 7,218,220,108,232,100,249,136,121,254, 12, 45,234,214,225,159,225,243,251,201,
+229,242, 10,133, 86,209, 91,102, 89, 11, 93, 23, 29,227, 25, 27,131, 39, 22,131,168,122,183,225, 64, 51, 51,179,197,217,217,217,
+ 87, 1,172,213,104, 52, 62,139, 23, 47,110,179,125,251,118,171,117,235,214,153, 76,153, 50,229, 76,126,126,126, 11, 20, 44,170,
+ 90, 94, 3,246,145,162, 40, 75, 0,182,129,129,129,176,177,177, 65, 78, 78, 78,145,167, 69, 45,151,203, 5,153,153,153, 80,169,
+ 84, 80,171,213, 48, 49, 49,193,139, 23, 47,178, 40,138,186, 92,153,113, 38,245,136,181, 42, 77,212, 79,150,110,162, 20, 13,101,
+238,145,150, 69, 75, 87,253, 42, 89, 3,224,215,222,117,235, 30,208,208,247, 99,222, 71, 92, 54,143,125,126, 47, 43,229,189,172,
+238,193,171, 49, 21,141,209, 98, 0,208, 4, 65, 48,174,174,174, 72, 79, 79, 7,139,197,130, 80, 40,132, 88, 44,198,146, 37, 75,
+176, 99,199,142,234, 8, 45,129, 72, 36, 90, 79,146,228, 72,146, 36,173,117, 58, 29,124,125,125,209,191,127,127,240,120, 60,104,
+ 52,154, 98,143,102,145,151,170, 18, 79, 71,232,147, 39, 79, 76,158, 60,249,172,218,242,180,178,178,186,163, 82,169, 16, 29, 29,
+141,139, 23, 47,118, 5, 16, 84,197,188,142, 14, 13, 13,237,237,238,238,254, 71,171, 86,173,234, 49, 12,131,166, 77,155,194,219,
+219, 27,254,254,254, 8, 11, 11, 67, 78, 78, 14,125,235,214,173,223, 1,108,174,106, 27, 94,152,190, 13,134, 14, 29,250,240,248,
+241,227,230,153,153,153, 80, 40, 20,144,201,100, 56,115,230, 12, 58,117,234, 4, 43, 43, 43, 28, 59,118,140, 98, 24,166,162,188,
+ 39, 73,146, 60,184,119,239,222,254,147, 39, 79,198,174, 93,187,112,242,228, 73, 12, 24, 48, 0, 35, 71,142, 68,122,122,186,237,
+166, 77,155,198, 21,118, 19,174,244,246,246, 70,126,126, 62,158, 63,127, 30,165,231, 51,143,236,236,108,100,103,103,195,200,200,
+168,228, 51, 70, 0,240,223,178,101,203,168, 57,115,230,160,110,221,186, 43, 99, 98, 98,182,160,140, 89,162, 52, 77,255,152,156,
+156,108,206,102,179, 45, 41,138, 66, 98, 98, 34, 94,188,120,129, 25, 51,102,100,101,101,101, 77, 5, 16, 15, 96,217,164, 73,147,
+214,206,155, 55,175,184, 44,205,155, 55, 47,224,234,213,171,189,255,105,111,142,171,171, 89, 99, 30,139, 63, 91,154,199,178,148,
+ 74,165,197,117,135, 90,173,134, 74,165,250,204,147,197,229,114, 44,219,180,168,121, 69, 33,207, 91,250,250,125,118,185, 11,164,
+187,213, 51,109, 38, 20,153,206,233,212,185,219,152, 94,189, 7,177, 40,173, 22, 55,110, 92,198,161, 67,187,225,233,238,138,186,
+245,155, 98,230,172,217,166, 42, 53,229,123,235,214,245,197,102, 79, 30, 92,207,203,205, 94, 82, 17,231,255, 56,174, 20,138,171,
+ 43,101,118, 29,150,165, 32, 11, 67, 56, 72, 11,119,173,204,205,205,119,234,116, 58, 79, 19, 19, 19,208,217,239,240,250,197, 83,
+100, 73, 57, 80, 41,116,160,153, 2,177,165,151,112, 81,169,113,255,198, 37,108,221,242, 43, 50, 51, 51,225,222,165, 43,242,217,
+ 53, 80,179, 70, 77, 40, 21,242,194,135, 6,208,168,181,176,182,117, 70, 72, 72,152, 54, 87, 38, 43,183, 66,226, 10, 52,110, 53,
+109, 93,161,210,116,128,128,199, 67, 78,158, 26,210, 66,145,117,236,236, 8,168,228, 10, 80,106, 13, 40,181, 22,214, 53,135,162,
+161,109, 55,208,186,203,141,171,148,124,180, 14,154,216,251,208,196,222,135, 81,135, 89,248,211,111, 84,169,134, 84,191,117,119,
+211,211,211,211, 34, 35, 35, 47,135,134,134, 14, 30, 49, 98, 4,238,222,189, 59, 5,192,180,194,238,155, 41, 35, 70,140, 64,104,
+104, 40, 34, 35, 35, 47,167,167,167,167,125,139,156,231,241,120, 10,149,170,160,141, 21, 10,133,130, 74,206,117,108, 51,100, 8,
+153, 19, 18,146,187,229,209,163,149, 7, 14, 30,228,246,232,222,157,208, 82, 20,104,157, 14,245, 93, 92,136, 94,189,122,137,252,
+ 79,159,182,100,105,181, 79, 22,250,248, 4,238, 25, 59, 54,239,153, 76,166,239, 64,243, 90,133, 93,134, 0, 80,171,130, 99,122,
+ 67,165, 82,109,255,241,135, 9, 61,130,238, 63,172, 81,179,134,163,201,141, 91, 65, 97,124, 35, 30, 89,183,118, 61,150, 52, 39,
+139,189,102,229, 82, 35,149, 74,165,175,104,117,179,178,178,194,167, 79,159,240,225,195, 7,168, 84, 42,104,181, 90,208,114, 25,
+212,210,108,168,115,178, 64, 40, 21,224,235,116, 80,102,164,162, 86,221, 58,192, 95, 51, 18, 43,237,138, 42, 75,104, 21,125, 10,
+ 76, 76,192, 21,137, 65,114, 56,122, 47,142, 14,160, 85,219,182,109, 79,159, 59,119,142, 59,113,226,196,118,183,111,223,222, 9,
+ 32, 62, 57, 57,185,251,242,229,203,159,237,220,185,147, 63,117,234,212, 6,155, 55,111, 30, 7, 96, 95,121, 36, 74,165,242,244,
+149, 43, 87, 70, 59, 59, 59,219,134,135,135, 67,169, 84,130,166,105,244,233,211, 7, 40, 24, 91, 3, 0,120,251,246,173, 66,169,
+ 84,166, 69, 68, 68,228,198,199,199,107,160,199, 44,193, 85,219, 37,143,115, 63,221, 31, 98,107,231,248, 68, 96, 84,171, 54,147,
+ 31, 50,120,238, 48,199, 77, 91,206, 38, 43,175, 71, 71,231,253,212,179,206, 6, 89,222,171, 25,102, 78,249,187,174, 7,196,232,
+ 51, 16,190,120,118,161,165,165, 37,216,108, 54, 56, 28, 14,184, 92, 46, 8,130,192,172, 89,179,176,127,255,254,202,186, 14, 63,
+ 19, 89,198,198,198,145,171, 87,175,118,154, 58,117, 42, 87, 32, 16, 64, 42,149,226,216,177, 99,152, 52,105, 18, 14, 29, 58, 84,
+230,248, 23, 61,186,148, 74,123, 75,231,140, 29, 59, 22,106,181, 26,222,222,222, 56,112,224,192, 28,157, 78, 23, 84,141, 71,250,
+ 73, 88, 88,152, 75, 88, 88,152, 9,128, 1, 35, 71,142, 60, 50,116,232, 80, 4, 5, 5,225,242,229,203, 93, 81, 48,233, 67, 1,
+192, 15,128, 77,225,103, 69,207,167,200,214,214,118, 55, 77,211, 3,172,173,173,195, 92, 93, 93,155, 28, 63,126,220, 44, 45, 45,
+173,104,242, 3, 98, 99, 99,113,248,240, 97,201,193,131, 7,115,117, 58,157, 37, 73,146, 87,178,179,179,151, 84, 32,216, 14,110,
+217,178,101, 66, 97,119, 32,206,157, 59,199,252,250,235,175,196,242,229,203, 33,149, 74,225,233,233,137,189,123,247,206,206,207,
+207,111,254,235,175,191,254, 48,124,248,112,172, 89,179, 6, 50,153,108, 75,101, 47, 43, 21,136, 47, 2, 64,199, 45, 91,182, 56,
+207,153, 51, 7,231,206,157, 67,171, 86,173,140, 98, 98, 98,246, 0,152, 92, 86,254, 49, 12,131,152,152, 24,200,229,114, 60,124,
+248, 16, 43, 87,174,148,150, 16, 89,179,167, 77,155,182,118,246,236,217, 88,191,126, 61, 19, 30, 30,158, 54,116,232, 80,219,253,
+251,247,179,234,215,175, 63, 91, 46,151,255, 99, 66,171, 65,125,139, 13,109, 90,117, 94,108,239, 88, 31,199,142,159, 64, 86, 86,
+ 86,113,154, 20,165, 11,195, 48,200,203,203,195,167, 79,159, 96,106, 98,140, 77,155,215,126, 55,125,202,132, 26, 40, 8,131,241,
+165,203,178,174,249,230,161, 35, 39,206,247, 30, 61, 1,225, 97, 47,225,127,100, 31, 34,194, 67,139,249, 40,173, 6,239,162, 94,
+224, 93,212, 11,216,218, 57,163, 87,143,174,196,168, 81,163,250,140, 29, 61,210, 26,192,223, 22, 58,226,255,177, 55, 11,248, 50,
+142,214,254,207,132, 86, 37,238, 58, 43,115,115,243,200, 83,167, 78, 89,186,187,187,179, 40,138,194,245, 27, 55, 48, 99,218,247,
+ 24, 55,214, 23, 26,152,131, 82,115, 65,115, 5,122, 89,162, 80,200,193,128,129, 76, 38, 67,112,112, 48, 24,154,130,255,254, 95,
+193, 48,116,177,208, 2, 24,168, 53, 26, 56,214,108,128,221, 7,214, 81,224,112,158, 65, 91,118,232,154,220, 76,150, 78, 75, 49,
+ 72, 78, 75, 64,130, 36, 2,166,198, 53,193,230,212, 68,102,182, 28,108,210, 14, 90,229, 91,232, 10,175,149,203,146,160,208,124,
+ 93,254,233,202,240,158, 50, 85,168,116, 21, 10,197,209,163, 71,143,126,247,219,111,191,241,250,246,237,235,122,246,236,217,142,
+ 0,208,183,111, 95, 87, 19, 19, 19, 28, 61,122, 84,173, 80, 40,142,126, 67,143, 79,183,182,109,219, 66, 42,149, 34, 54, 54, 54,
+172,194,123, 83,171, 45,197, 54, 54,172,180,187,119,181,233, 82,105,141,110,221,186, 17, 90,138, 2, 73, 16,200,202,201, 65,124,
+ 92, 28,204,204,204,136,200,183,111,197, 59,102,206,188,224,218,164, 9,187,104, 70,162, 62,184,124,249,178, 16, 5,227,178, 42,
+ 60, 86, 69,200,210, 82, 63, 77,240,241,241,185,112,244,232, 49,211,212,180,212,119,124, 30,143, 18,139, 5, 14, 99,199, 76,103,
+103,103,103,143, 6,144,175, 47,153, 84, 42, 69, 76, 76, 12,140,140,140,192,229,112, 64, 43,228,208,201,242,161,204, 74, 7, 75,
+163, 6, 79,167,131,133,144,143, 26,182,182,168,105,109,165, 23,231,135, 59, 55,139, 7,190,151,236, 46,220,212,214, 13, 60,145,
+ 24, 60, 99, 49,166, 7,220, 43,124, 27,229, 2,203,127,214,135,214,202,209,209,241,207,227,199,143,115,211,211,211, 17, 26, 26,
+ 26, 6, 32, 7,128, 49, 0, 58, 42, 42,234,118, 68, 68, 68,191,194, 89,119,149,205, 22,251,245,252,249,243, 61,221,221,221,169,
+218,181,107,139,210,210,210,106, 72,165, 82, 90, 34,145,124,230, 18,186,121,243, 38, 63, 47, 47, 79, 70,211,244,133, 66,145, 85,
+105,252,162,185,195, 28, 5,193, 33,152,229,225, 85,171,169,137, 85, 51,100, 81, 33, 77,159,132, 73,102,205, 29,230,184,125,203,
+217,100,165, 17,161, 58, 66,232, 18,107,176, 5, 74,125, 7, 49, 51, 64,193, 88,169,224,224, 96,196,199,199, 35, 38, 38,230, 51,
+ 65, 53,101,202, 20,248,251,251,235,229,209, 18,137, 68,235, 87,173, 90,229, 52,103,206, 28,110, 9, 81, 4, 31, 31, 31,228,228,
+228,224,192,129, 3,240,241,241,169,114,195, 95, 10,117,186,117,235,214,215,222,222, 30,153,153,153,176,179,179,131,187,187,123,
+255,160,160,160,218, 0, 98,171, 89,238,167,123,121,121,173, 93,189,122, 53,180, 90, 45, 38, 77,154,132,247,239,223,159,126,255,
+254,253,214,154, 53,107,206, 90,180,104,145,173,173,173, 45, 70,140, 24, 33,162, 40,106, 72,121, 36, 22, 22, 22,126,251,246,237,
+ 27,221,183,111, 95, 82,163,209,116,185,115,231, 14,226,226,226,160, 86,171, 65, 81, 20, 62,126,252, 8, 31, 31, 31, 73,225,236,
+198,143,122,216, 53,113,217,178,101, 19,102,205,154,133,141, 27, 55, 98,213,170, 85,191,155,154,154, 54,105,209,162, 69,203, 85,
+171, 86, 97,225,194,133,112,118,118,134,165,165,101,195,229,203,151,187,205,155, 55, 15,219,183,111,199,202,149, 43,127, 7,112,
+184, 58, 9, 65,211, 52,177, 97,195,134,230, 91,182,108,177, 47, 18, 89, 36, 73,226,212,169, 83, 8, 9, 9,233, 31, 29, 29, 93,
+214, 53,123,237,236,236,166,216,219,219,243,110,221,186, 37,118,118,118, 6, 69, 81,218, 66,145,181,163,102,205,154, 51, 62,126,
+252,136,190,125,251, 34, 58, 58,250, 40,128,113,166,166,166,178,121,243,230, 9,141,140,140, 76,229,114,249, 63,213,120,131, 69,
+ 18,227,215,175, 89,136,231, 33,111,113,254, 60, 23,207,159, 63,135,173,173, 45,248,124, 62, 24,134,129, 74,165, 66,122,122, 58,
+180, 26, 21,154, 54,174,131, 63, 14,110, 64, 90, 90, 58, 64, 18,229, 14,185, 33, 72, 98,204,132,239, 7,227,193,195, 27,216,179,
+103, 31,242,243,101,229,188,124, 11, 80,223,213, 13,142, 14, 54, 72, 76, 74, 4, 65,194,234,239,188,215,255,231, 93,135,197, 85,
+ 16,244, 9,239, 80, 18,102,102,102, 91, 79,158, 60,105,233,233,233,201,146,201,100,160,105, 26,157,221,221, 49,107,206, 28, 92,
+ 62,126, 28, 46,237,188, 65,168,197,160,132,250,205,122, 80, 42,228,104,212,178, 35,134,143, 24,137,132,248,120,120,245, 27, 10,
+165, 82, 94,252,134, 81,228,209, 82,171, 53,176,178,169,129,155, 55,111,178, 48,105,210,107,236, 40,219, 41,161,211,240, 94,189,
+251,168,236,148,173, 8, 65,240,115,127,104, 84, 26, 52,109,186, 28, 26,218, 18, 54, 78, 83,160,213, 94, 68,110,250,157,130,110,
+ 12, 75, 79, 36, 37, 36,128,100,113, 35,171,155,130,180, 44,253,171, 42,221,156,156,156,156,152,152,152,179,193,193,193, 99,134,
+ 12, 25,130,155, 55,111,254, 0, 0, 67,134, 12, 65,112,112, 48, 98, 98, 98,206,230,228,228,228,124,139,220,182,183,183, 31,208,
+181,107, 87,239, 54,109,218, 32, 32, 32, 0, 12,195, 60,208,235,193,230,112, 24,146, 36, 65,211, 52, 8, 0,153,217,217,120,255,
+254, 61, 50, 51, 50,160,213,106, 33,203,207,167,221, 92, 93,243, 25,154, 54,174,138, 61, 37,103, 24,162,140, 89,135, 69,199,170,
+113,171,241,207,158, 60, 74,200,203,207,183, 54, 55, 51,207,227,241,120, 58,105,118,118,206,235,200,112,181,158,141, 67, 17,162,
+ 34, 34, 34,154,164,164,164, 32, 33, 33, 1,148, 44, 15, 44,149, 26,164, 74,142,238, 29, 59,192, 8, 12, 4,160,193,161,181,224,
+176, 56,200, 43,152,157, 87,105,119,135,174,196, 75, 66,145,200, 34, 8,162,160,187, 80, 36, 2, 79,108,252,153,135, 75,159,242,
+196,231,243,143,159, 57,115,198,222,209,209, 17,107,214,172,129,147,147, 83, 67, 7, 7, 7,185,169,169,169,145,173,173, 45, 26,
+ 53,106,132,142, 29, 59,226,218,181,107,208, 35, 13, 40,134, 97,122, 61,120,240, 96,254,163, 71,143,134,139, 68, 34, 98,230,204,
+153,236, 62,125,250,128,207,231, 67, 46,151, 67, 42,149,226,196,137, 19, 25, 52, 77, 23, 77, 74,177, 20, 10,133,135, 9,130,136,
+149,201,100,115, 74, 19,254,241, 91, 83,135,180, 44,122, 18,147, 47, 28,236,225, 85,171,105, 55,175, 30,168,227,210, 13,221,188,
+ 18, 0, 96,131, 5, 59,206,251,151,101,102, 23,204,140,137,195, 55,175,223, 90,233,238,209,109,217,226,252,187,107, 55,238,207,
+174,116, 60, 29, 65, 16,160,105,250,179,216, 65,165,127, 31, 55,110, 28, 78,157, 58, 85,105, 58,146, 36, 57,114,234,212,169,220,
+ 82,158,103, 36, 39, 39,163, 95,191,126, 24, 50,100,200,103, 66,203,202,202, 10,118,118,118,136,139,139, 3,128, 76, 61,203,213,
+172,137, 19, 39, 18, 10,133, 2,147, 39, 79,198,129, 3, 7,224,237,237, 77, 4, 5, 5,205, 2, 48,167,170,133,157, 36,201, 77,
+139, 22, 45,154,239,227,227,131,172,172, 44, 92,189,122, 21,125,250,244,193,169, 83,167,172,175, 94,189,186,222,211,211, 19, 44,
+ 22, 11, 1, 1, 1,160, 40,170,194, 88, 95, 92, 46,119, 64,223,190,125,201,196,196, 68,112,185, 92,180,110,221, 26, 73, 73, 73,
+144,203,229, 72, 78, 78,198,236,217,179, 63,101,102,102,118,213,247, 57,226,114,185,115,102,205,154,133,147, 39, 79,194,215,215,
+247, 8,128,201, 57, 57, 57,195, 31, 61,122,116,114,224,192,129, 72, 78, 78,198,133, 11, 23,176,114,229, 74, 98,220,184,113,216,
+181,107, 23,102,207,158,253,123,161,215,169,188,130,159,151,150,150,102, 90,175, 94, 61,164,166,166, 34, 63, 63, 31, 23, 46, 92,
+176,185,118,237, 90,109, 71, 71, 71,147,152,152, 24,221,207, 63,255,204,155, 51,103, 14,182,110,221,138,208,208, 80,248,251,251,
+163, 91,183,110, 84,116,116,116,153, 94,178,194,144, 13, 23, 24,134,185, 37, 18,137,144,151,151, 87,244,220, 45,240,245,245,245,
+241,243, 43,112,178,167,164,164, 96,252,248,241, 99, 3, 3, 3,105, 79, 79, 79, 33,151,203,133, 82,169,148,253,147,173, 54,173,
+163, 1,208,168, 93, 67,140, 27,151, 15,226,101, 88, 52, 94,134, 69,128,199, 47, 24, 4,175, 80,200,209,178,105,125,180,107,221,
+ 22, 41,146,100, 28,245, 63, 8, 11, 43,199, 10,235, 17,134, 97,192,101,235,224,230,106,135,227,254,251, 16,112, 53, 16,254, 71,
+ 79, 20,143,121, 99,179, 57,104,209,178, 29, 90,183,118, 71,116,204, 71, 28, 60,184, 7,214, 54, 53, 12,157,131,213, 68,113,215,
+ 97,201,207, 82,202,191,155,187,187, 59, 43, 63, 63, 31, 74,165, 18,159, 62,125, 66, 92, 92, 28,204,204,205, 16,157, 18,139,174,
+ 66, 13, 62,209,185,136, 10,139,212, 17, 44, 78,104,101,127,216,215,163, 5,224,209, 2, 51, 38,122, 87,240,202,202, 64,100, 98,
+ 85,208,117, 67, 81, 31,176,125, 59, 85,158,208,162,116,218,219, 55,110,221,105, 59,113,220, 0,206,205, 59, 7,160, 85,211, 80,
+104, 77, 33, 83,170, 33,211,112, 64,154,246, 1, 50,130,192, 98,243,209,190,121,125, 92, 56,127, 77,195, 80,218, 64,189, 19,200,
+182, 9,168,212,136, 18, 66, 43,173, 84,191,131,133,222, 93,135,197, 13,175, 78,119,234,216,177, 99,131, 58,116,232, 32,244,244,
+244,172, 87,216,112,106,142, 29, 59, 38, 47, 12,134, 89, 85,124, 22, 13,222,206,206,174, 37,151,203,245,238,211,167, 79,203, 9,
+ 19, 38,224,245,235,215, 56,122,244,232,187,250,245,235,223,149, 72,202,159,145,205,226,241, 50,243,211,210,204,196,181,107,179,
+205,141,141, 83,174, 93,189,234,220,163,103, 79, 34, 33, 33, 1,153,153,153, 80, 42,149, 8, 13, 11, 99, 56, 44, 86, 18, 97, 98,
+ 66,190, 13, 9, 33, 89, 60, 94,102,121,222,198, 50, 16, 87,201,172, 67,191,234,122,183,106,216,155,215, 91,233,251, 99, 29,165,
+ 74,217, 36, 55, 55,151, 98,115, 56, 28, 39, 59,179,248,183, 31,245,175, 19, 85, 42, 85,192,237,219,183, 7,245,232,209,131,255,
+238, 85, 40,168,156, 28,168,115,164,224,210, 58, 88,180,108, 14,150, 70, 5,168,181,112,116, 99,160,204, 22, 34,232,233, 91,173,
+ 74,165,170, 52,168, 97,145,208, 34, 75, 9, 3,158, 88, 12,190,177, 9,248, 98,113,105,193, 80,217,155,156,176, 87,175, 94,221,
+219,183,111, 15,134, 97,176,127,255,126,104, 52, 26,158, 70,163,129, 90,173,134, 70,163, 65,110,110, 46,252,253,253,177,123,247,
+238, 71, 0,126,215,227,246, 41, 35, 35,163,129, 4, 65,216,176,217,108,185,181,181,181,232,212,169, 83,197,225, 38, 90,180,104,
+ 1, 99, 99, 99, 46, 10,131, 66,218,216,216,112, 14, 29, 58,100,214,191,127,255,251,101,118,119, 52,109,184,176, 14,101,238, 33,
+ 48,170, 85,219,196,170, 25,234,184,116, 3, 0,244,236, 55, 17,117,234,215, 68,110,198,171,218, 74, 69,220, 96, 46, 91,106, 30,
+185, 61,249,181, 81,223, 38, 19,100,105,247,222,163,236,233,253,101, 54, 20, 36, 73,150,219, 29,171,143,200, 42,208, 44,164,117,
+209, 56, 31, 0,200,204,204,132, 68, 34, 65, 84, 84, 20, 26, 52,104,128,172,172, 44, 56, 58, 58, 66,173, 86,163, 77,155, 54, 80,
+ 40, 20,216,178,101, 11, 30, 62,124,248, 8,192,108, 61,254,195,200,197,197,101,124,203,150, 45,113,245,234, 85, 60,127,254, 60,
+249,198,141, 27,142,238,238,238,168, 93,187,246,132,216,216,216,165,133, 93,125,250, 66,228,238,238, 62,211,199,199, 7, 17, 17,
+ 17,248,241,199, 31, 51, 19, 19, 19, 47,156, 62,125,122,242,202,149, 43, 73, 47, 47, 47, 72, 36, 18,108,218,180, 73,247,240,225,
+195,205, 0,214, 84,146,142,111, 18, 19, 19,157,148, 74, 37,178,178,178, 64, 81, 20,228,114, 57,174, 93,187, 6,127,127,255,212,
+ 66,145,245, 65, 95,227,154, 55,111,222,136, 36, 73,156, 60,121, 18, 0,126, 66, 65,196,254, 11,131, 7, 15, 78,254,249,231,159,
+ 29,151, 44, 89,130, 31,126,248, 1, 26,141, 6, 27, 55,110,196,146, 37, 75,174, 20,138,172,138, 42,209,223,236,236,236,166,252,
+248,227,143, 13,231,205,155,135,224,224, 96,155, 23, 47, 94,180, 14, 13, 13, 69,141, 26, 53,144,153,153,201,182,180,180,196,214,
+173, 91, 49,119,238,220,115, 0, 50, 30, 63,126, 60, 50, 38, 38,198, 15,192,166, 74, 68,251, 94, 71, 71,199, 41, 12,195, 48,114,
+185, 60,206,215,215,119,211,186,117,235, 48,119,238, 92, 68, 70, 70, 34, 39, 39, 7,198,198,198,196,162, 69,139,198,255,244,211,
+ 79,152, 52,105, 18, 35,147,201,118,255,211, 13, 53,195,232, 32,151, 70, 64,167, 50, 71,139,166, 13,208,162, 73, 45,220,184,243,
+ 18, 0,208,125,168, 59,228,178, 60, 28, 57,178, 31, 31, 62,188, 7,155,195,129,153,133,157, 62,158, 64,168,115,223, 32, 91, 35,
+ 65, 15,207,214,232,227,213, 21,191,255,113, 10,148, 86,131,201, 19, 71, 67,154,157,141, 63,254, 56,136,232,152,143, 96,115, 56,
+176,180,250,251, 3,161, 86,164, 69,254,223, 11, 45, 61,186,159, 64,211, 52,146,147,147,241,226,197, 11,196,198,198, 66, 40, 20,
+ 66, 65,233,232, 61,183, 31,210, 4,193, 77,162, 25,230, 17, 67, 21, 71, 41,254,146, 67,167, 75, 46, 17,177,214,212,220,220,156,
+167, 82, 41, 64, 81,218, 18,173, 10, 1, 16, 0,151, 13,216, 59,212, 65, 98, 66, 34,163, 84, 42,239, 85,248, 6,165, 82,110,189,
+116,225,140, 79,199, 78,238, 86,125,186,175,198,133,139,203, 33,205,205,133, 82,195,129, 76,169,129, 92, 9,152, 89,184,162, 77,
+211,102, 72, 73,201,196,171,231, 65,249,108,149, 92,159,129,162,239,119, 44,155,232, 50,113,198, 66, 24, 57,119,130, 42,234, 2,
+232,252,212, 98,143,150, 64,108, 14,139,154,110,200,150,169,112, 38,240, 37, 80,133,165, 94,210,210,210,228, 44, 22,235,152,143,
+143,207,198,151, 47, 95, 56, 1,192,203,151, 47,147, 36, 18,201,226,180,180,180,170,250,164,139,162,193, 19, 2,129,209,203,250,
+245,235,167,180,110,221,218,116,240,224,193,176,178,178, 66,104,104, 40,252,252,252,222,104, 52,154,133, 65, 65, 65, 21,118,245,
+168,213,234,228,151, 23, 47,154,116,253,254,123,179,133,253,251,111,242,241,241,217,186,102,205, 26,142,139,139, 11,161,213,104,
+ 16, 30, 30,206, 28, 63,118, 76,187,123,201,146, 45, 60,145,136,253,236,210, 37, 14,165, 82, 37,255,167, 11,177,163,163,163,135,
+123,151,206,110,155,127,219, 14,165, 34, 31, 79,131,175, 64, 42, 77,199,190,253,231,221, 28, 29, 25,143,228,228,228, 32,125, 5,
+240,225,195,135,231,183,107,217,178,101,221, 26, 53, 16, 30, 31, 11, 30,173, 3,151,162,192,210,168, 64, 82, 74,212,104,194,128,
+ 32,141, 33,249,148,139,117, 39,207, 70,232, 35,140, 27,126, 55, 0,107,146,114, 64, 16, 4,126,237,208, 4, 60, 99, 49,184, 34,
+ 49,166,255,121,167, 88, 24, 4,172, 89, 2,158, 88,140,122,237,244, 10, 8, 47,191,123,247,238,139,240,240,240, 54, 77,154, 52,
+193,252,249,243, 17, 23, 23, 7,154,166,145,154,154,170,148, 72, 36,201,233,233,233,113, 40,136,255,115,160,146, 70,172,164,234,
+112, 12, 10, 10, 42,238,110, 8, 12, 12,132,131,131, 3, 76, 77, 77,145,155,155,139,169, 83,167,154,173, 88,177, 2, 0,240,226,
+197, 11,148, 20, 40,165, 17,254, 50,106,115,118, 30, 35,101,242, 67, 6,103, 81, 33, 77,187,121, 37,162,103,191, 9,184, 21,240,
+ 59,238,220,184, 13, 11,118, 92, 44, 68,121,215, 50, 98, 51,114,147,100, 46,123,221, 90, 77,102, 73,100, 55,246,206, 28,240,142,
+101,111, 79,159, 89,178, 39, 55,187, 34, 91, 93, 92, 92, 96,107,107, 91, 60, 70,139,205,102, 99,210,164, 73, 96, 24, 70, 95,145,
+ 85,216,214,208,233, 74,165,210, 86, 32, 16,224,211,167, 79,248,248,241, 35,162,163,163,139, 67, 7,208, 52,173, 93,176, 96, 1,
+103,230,204,153,216,179,103, 15,238,221,187,247, 8,192,106, 0,250,190,172,141, 30, 49, 98,132,177, 90,173,198,137, 19, 39, 40,
+ 0,253,206,156, 57,243,162, 77,155, 54,236,222,189,123, 27,239,218,181,107,116, 97, 30,233, 45,180, 76, 76, 76,184, 26,141, 6,
+187,118,237, 66, 98, 98,162, 7,128,168,103,207,158,237, 29, 49, 98,196,238, 38, 77,154,212,143,136,136,120,159,159,159, 63, 29,
+192,171,202,200, 82, 83, 83, 39,182,110,221,250, 12, 77,211,206, 61,122,244, 16,253,246,219,111, 38,111,223,190,133,147,147, 19,
+104,154, 14, 71, 21,151,176,122,255,254,125,148, 68, 34,113,235,218,181, 43,174, 93,187,182, 65,167,211,173, 7,176,113,218,180,
+105,142,241,241,241,104,217,178, 37, 44, 44, 44,240,246,237,219, 60,137, 68,178, 27, 5, 75, 18, 85,230,194,141, 1,176,120,239,
+222,189,205,246,238,221,235,109, 97, 97,209, 62, 52, 52, 20, 15, 30, 60,192,230,205,155,177, 98,197, 10,116,238,220, 25,243,231,
+207,207, 0,224, 13,128,138,137,137,209, 43,110, 94,145,103, 11, 0, 90,181,106,149,226,231,231,135,201,147, 39, 51,135, 14, 29,
+218,118,236,216,177, 57,163, 71,143, 46,110, 3,199,143, 31,207, 28, 61,122,116, 60, 10,150, 97,250, 39,161,213,104,212, 48,177,
+168,131,252,236, 4,164, 39, 6, 67,104,108, 7,175,110,205, 33, 87,168,113,249,210, 57,188, 10, 15, 3, 73,146,176,181,171, 1,
+ 51,115, 43,188,123,247, 30,168,120,182,177, 86,163,209,192,216,188, 22,242,115, 18,161, 78,123, 9, 35,177, 13, 38,124, 63, 24,
+114,133, 6,231, 47,156, 67, 68,196, 43,176, 88, 44,216,217,215,128,169, 89, 1, 39,193, 84, 60,131,217, 0, 0,101,196,211,170,
+ 84,104,177, 88,172,187,215,175, 95, 31,214,174, 93, 59,246,135, 15, 31,240,225, 67,193,203,141, 84, 42,165, 8,232,206,166,133,
+ 95, 26, 85,193,229, 61, 80, 56, 59,163,228,218,133, 98, 99,227,228,183,111,162,108,165, 89,169, 8, 11,121,136, 15,239,194, 17,
+ 27, 29, 5,141, 70, 9, 22, 73,130,100,145,168, 85,167, 49, 30, 62, 10, 86, 43, 41, 42,184, 60,206, 2, 59,162,243, 68, 54, 46,
+ 35,215,174, 89, 26, 48,119,225, 42,163,225,195,246,224,213,219,215,200,167,236,192, 48,128,157,165, 8, 45,234, 46, 66,114, 74,
+ 58, 78,254,190, 75, 78,107, 52, 99, 74,197,208,250,130, 19, 0,108, 51,208,104,247,254,223, 39, 29,240, 63,190,106,225,204,169,
+182, 3,135,140, 1, 47,235, 53,180, 41, 47, 81,167, 77, 31, 16,124, 51, 92,189,121, 7, 65, 47, 94,167,210, 58,102,149,109, 38,
+ 14,189,171,132,179, 36,178,179,179, 31,127,250, 36,113, 42, 17, 5,222,137,207, 23, 84, 54, 59,174, 52,231,103, 17,231, 89, 44,
+178,213,218,181,107,181,182,182,182,154,136, 61,213,231,155, 0, 0, 32, 0, 73, 68, 65, 84,136, 8,236,217,179,135,126,249,242,
+229, 77,146, 36,119, 72, 36, 18,101,101,156,214, 90,109,216,113, 95,223, 70,109,135, 12, 97, 70,205,156, 41, 7,159, 63,107,211,
+175,191,250,166, 75,165, 14, 12, 77,195,218,194, 34,105,211,146, 37,126,195, 70,140,144, 70, 62,124,104, 20,124,241,162, 17,143,
+162, 94,234, 97,231,183, 64,185,156,201,201,201, 65,247,238, 61,192,145, 3,191, 65,163, 81, 65,146, 28, 15, 0,200,200,204, 65,
+ 37, 34,171, 52, 39, 35,151,203,135,252,180, 98,197,147,159,230,206,177,235,210,189, 7, 18,194, 66,161,201, 74, 7,161,165,192,
+ 33,216,144,165, 9,145,150,154,143,197, 71, 79,167,229,203,229, 67,202,104, 36,202,180,179,200, 99,197, 55, 49, 6, 87, 36, 6,
+ 79,108,252,153, 23, 75, 96, 98, 2,158, 72, 12, 54,143, 87,214, 0,238, 47, 56,243,243,243,135, 14, 27, 54,236,213,179,103,207,
+204, 39, 79,158,140,142, 29, 59,134, 40, 20, 10, 79, 0,121,213, 77, 79,154,166,147,187,116,233, 66, 18, 4, 33, 30, 51,102, 12,
+ 63, 61, 61,189, 56,178,122,126,126, 62,174, 93,187,134, 6, 13, 10,102,245, 71, 70, 70,162,113,227,198,229,114,254,176, 56, 34,
+ 25,192,154,185,195, 28, 55, 61, 9,147,204, 2,176,161, 78,253, 26,184,115,227, 54, 30,220, 9,246,109,223,132,222,254,221,152,
+ 54, 63, 11, 61, 71, 44,116,107, 53,153, 37, 54,177,199, 31,231,207,177,162, 94, 30, 92, 39,151,135,215,195,158, 11, 11,202,179,
+147, 32, 8, 48, 12,243, 69, 40, 7, 22,139,133, 99,199,142, 85,245,222, 79, 31, 56,112, 96,218,143, 63,254,200,149, 72, 36,120,
+243,230, 13,100, 50, 25, 4, 2, 1,110,220,184, 65, 1,216,117,236,216,177, 27,199,142, 29,235,141,130,217, 68,129, 85, 41,159,
+ 34,145,200,199,203,203, 11,111,222,188,193,243,231,207,207, 1,120, 21, 18, 18,114,238,195,135, 15, 35, 59,119,238,140,223,127,
+255,221, 71,161, 80, 28,168, 10, 39, 77,211, 37, 99, 38, 21,173,248, 16,150,159,159,223, 62, 56, 56,184,170,249, 46,201,204,204,
+236, 84, 40,172, 19,109,109,109, 77,194,194,194, 80,179,102, 77,104, 52,154,118, 85, 45, 75, 57, 57, 57,191,237,216,177,227,208,
+196,137, 19,241,243,207, 63,143, 57,125,250,244,152,239,190,251, 14,125,251,246,197,225,195,135,241,234,213,171, 13,208,111, 89,
+177,178,238,253, 21,128, 87,182,182,182, 51,106,212,168,129,205,155, 55, 35, 60, 60,220,111,205,154, 53, 75, 94,189,122,133, 6,
+ 13, 26,240,163,162,162,168,234,212, 33, 0, 96, 98, 98, 98,162,213,106,113,241,226,197,167, 0,230,142, 25, 51,198,102,235,214,
+173,222, 98,177, 24, 89, 89, 89,138,136,136,136,209, 0, 46,253,211,117, 29, 67, 16,203, 38,255, 48,107,239, 15,147, 71, 11, 90,
+183,106, 1,121,110, 18, 20,249,169,144,231,125,194,142, 3, 55, 65, 16, 36,172,173,237, 97, 99,231,132,248,248, 4, 60,186,114,
+ 85, 45,147, 43,182,242,180,244,134,138, 57,103, 22,112,182, 44,224,148,203,210,160,200, 79, 43,230,180,177,113, 40,228,140,199,
+195,224,171, 74,133, 76,246,155,154, 33,126,249,155,239,253,255, 51,170,182,214, 97, 73, 72,165,210,217, 83,167, 78,245, 92,188,
+120,177, 37, 69, 81, 44, 11, 11, 11,196,199,199, 83,103,207,158,205,202,207,207,159, 93, 29,107,216, 28,206, 43, 23,215, 6,158,
+ 3, 7, 14,164, 6, 12,232,207, 29, 59,177, 55,219,218,198, 6, 57,217,153,120,247, 38, 20,111, 95,191,132, 75,131,230, 88,185,
+102, 11, 96,102, 86,233, 66,146,133,203,234,244, 91,253,211,130, 83,157, 60,122,153, 52,104,220,156,219,162,158, 41, 52, 90, 10,
+ 73, 73, 73,184,116, 49, 76, 19,241,226, 65, 46, 77,169, 71,202, 51,244, 91,130, 39, 8,160,144,137,125, 77,108, 52,199,214,111,
+218, 49,127,215,190, 35, 11, 23,207,154, 44,234,236,222, 19,225,183,127,199,185,128, 83, 50,165, 74,189,137,203,194,175, 17,153,
+144,191,171, 98, 26, 40,149, 74, 77,233,246, 84,169, 84,106,190, 54,167, 15, 31, 62,140,212,212, 84,117, 92, 92,220,117,138,162,
+ 78, 87,176,216,243, 23,216, 1,168, 7,171, 84,183,127,114,119,239,253,211,141, 27,130,241,139, 22,169,199,140, 29,187, 0, 42,
+149, 6, 60, 30,195, 22,137, 72,240,249,156,200,135, 15,141,182, 77,155,102, 65,168,213,183,142, 84, 16, 54,160, 12,124,243, 89,
+135, 69, 30,173,174, 93, 59, 99,252,228,185, 80,148,240,104, 61,126,254, 14, 42, 13,244,246,104, 21, 34, 33, 46, 49,177,253,172,
+101, 63,157, 31,233,213,221,173,137,115, 45,190,117,237, 90, 16,219,217, 33, 51, 61, 29, 15,159,191,213,174, 57,117, 62,162, 80,
+100,233, 21, 87,134,166,233,130, 65,238, 0,186,207, 94, 12,130,197, 2, 10,195, 56, 20,205, 28,170,221,166, 35, 8, 54, 27, 58,
+134,134, 74,165,210,103,208, 95,210,199,143, 31,135,142, 25, 51, 38, 48, 32, 32,128,244,242,242,106,113,225,194, 5,250,107,202,
+142, 66,161,104, 15, 0, 2,129, 32,214,204,204,204,113,226,196,137,208,106,181,144,203,229,200,201,201, 65, 82, 82, 82,246,196,
+137, 19, 53, 0, 96,100,100,196, 27, 54,108,152, 73,101,156, 91,206, 38, 43,231, 14,115,220,110,193,142,243,206,205,120, 85,219,
+130, 29, 23,219,190, 9,189,125,203,217,100,165,137,131,108,109, 70, 92,208, 59,137,236,198,222, 63,206,159, 99,141, 27, 60, 84,
+231, 36,126,239, 43,176, 97,206, 86,198, 75, 16,196, 23,193, 73,245, 20, 89,159, 33, 47, 47,111,201,242,229,203,251, 74,165, 82,
+167,222,189,123,115,221,220,220,240,228,201, 19, 4, 4, 4, 80,143, 31, 63, 78,148,201,100, 75, 1, 40, 1,220,172, 78,154,186,
+186,186,214,102,179,217, 69, 93,105, 59, 11, 15,239,188,112,225,194,200,201,147, 39,163, 86,173, 90,141,162,162,162,248,168,194,
+115,196, 48, 76,113, 47,195,183, 4, 65, 16,209,219,182,109,115,180,179,179, 35,174, 93,187, 70,177, 88,172,234,120,110, 14, 31,
+ 60,120,176,157, 86,171,253, 97,202,148, 41,240,240,240, 0, 69, 81, 56,122,244, 40, 14, 30, 60,168,175,200,170, 16,239,222,189,
+123,153,152,152,216,101,193,130, 5,216,188,121,243,146, 5, 11, 22, 32, 49, 49, 17,239,222,189, 11,253, 26,222,220,220, 92, 69,
+ 66, 66,130,176, 67,135, 14,173, 35, 34, 34, 34, 60, 61, 61, 27, 79,158, 60, 25, 27, 54,108, 96,238,221,187, 55, 12,192,181,255,
+ 68,235,253,246, 67,150, 63, 71,199,190,177,102,237,111, 43,234,213,173,253,227,164, 9, 35, 88,174, 46,141, 33,203, 73,130,165,
+149, 45,156,106,212, 65,122, 90, 6,174, 95,191,166,203,200,200, 62,172, 35,137,213, 31, 62,100,165,124, 13,167,163, 83, 29,164,
+165,165,225,234,213,171,186,108,105,238,126,104,201, 53, 81,241,217,169, 48, 64, 31, 79,214, 20, 84, 16, 37,190, 34, 88,153,155,
+155,159, 48, 49, 49, 73, 53, 49, 49, 73, 53, 55, 55, 63, 1,232, 53,251,160, 71,137,218,129,245,217, 54,108,152, 0, 2, 65,123,
+176,217,243,204,204,205,175,153,154,154,102,118,237,218, 85,189,119,239, 94,101, 84, 84, 36,157,156,156,200,152,154,154,230, 20,
+159, 95, 22,103, 41,152,155,215, 53, 22,217, 55, 94, 97,234,212,226,161,216,190, 81,158,216,190, 81,158,169, 83,243, 71, 34,251,
+ 70,171,204,205,235, 26,235,101,103, 57,168, 99, 3,107, 23, 43,236,106, 96, 77, 40, 92,172,176,171,142, 13,172,245,190,247,138,
+187,253,116, 4, 1, 29, 10,166, 97,163, 26,156, 69, 28, 52,139,197, 58,226,228,228,100,143,170, 5,172,251,130,115, 44, 80,107,
+ 44,159,255,195, 25, 95,223,241,177,247,238,141,201,141,137, 25,149, 19, 29, 61, 34,244,212,169,145, 59, 71,142, 28, 59,138,207,
+159, 50, 12,168,171, 47,167,189,189,189,223,203,151, 47, 3,244,221, 74, 8, 47,189,211,179,110, 29,199, 27, 94, 61,218, 49, 62,
+ 83,135, 48, 62, 83,135, 48, 94, 61,218, 49,117,235, 56,222,248,138, 60, 34, 88, 44,150,183, 80, 40, 60, 33, 18, 10,195, 69, 66,
+ 97,184, 80, 40, 60,193, 98,177,188, 81,241, 24,170,207, 56, 45, 45, 45, 95,216,218,218,166, 86,101,179,178,178, 10,169,130,157,
+163,106,215,174,157, 72,146,228,150, 42, 62,211, 21,113,186, 24, 25, 25, 69,139, 68,162,164,146,155,145,145, 81,201,192, 80,150,
+ 66,161,240,178, 72, 36,218,170, 15,231, 47,203, 26,175,120,116,115,198,171, 95,150, 53, 94, 81,250,183,153,131,204, 39, 62, 9,
+ 92,157, 57,115,144,249, 68,125,236,180,177,177,185,103, 99, 99, 35,177,177,177,145,216,218,218, 86,184, 89, 89, 89,189,208,131,
+ 83, 96,108,108,188,213,216,216, 56, 85, 36, 18,233,196, 98,113,170, 72, 36,218,130, 18,161, 45,170,155,158, 36, 73,110,104,212,
+168,145,146,197, 98, 29, 42,245,211,230,122,245,234, 41,217,108,246,166, 42,114,154,116,238,220, 89, 23, 22, 22,198,120,120,120,
+ 48, 0,204,191, 97,190,219,153,155,155, 95, 51, 49, 49, 73, 48, 54, 54,222, 1, 64, 84, 77, 78, 2,128,183,163,163, 99,104,183,
+110,221,228,142,142,142,193, 0, 6,126, 67, 59,251, 14, 26, 52,136, 78, 72, 72, 96, 24,134, 97, 18, 18, 18,152, 65,131, 6,209,
+ 40, 8, 20,249, 53,117,242,178,105,211,166, 49,143, 31, 63,102, 30, 63,126,204, 4, 7, 7, 51,125,251,246,165, 1,124,255,149,
+245, 60,190,213,189,187,213,177,170,219,176,190,249,233,209, 67,221,233,155,151,182, 48, 43,151,254,200,244,244,104,204, 52,168,
+103,126,222,197,197,210,229, 91,112,174, 88, 58,149,233,209,165, 17,237, 86,215,252,148, 91, 29,171,186,255,240,189,255, 27,189,
+ 90,248,187, 7,156,253,229, 90,252, 92, 44,149, 13, 7, 7, 7,100,102,182, 19,176,217,238,124, 62,223,147,100,177,238,102,165,
+167,207, 41,124,221,210,253, 83,174,218, 10, 27,244,186,224, 85,176, 36, 65,117, 56, 63, 27,200, 94, 77,206,170,112,232,197, 89,
+222,162,210,180, 74,149, 98, 73, 81, 47,118,160,194, 52,248,140,211,209,209,241, 7,154,166,107,235,107, 16, 73,146,177,201,201,
+201, 7,170,147,158,245,235,215,103, 10,187,183,137,111,153,239,127, 71, 89,250, 95,226,252,227,183,166, 14, 13,154, 54, 92, 24,
+254, 50,106,115, 97,183, 98, 49, 86,205, 52, 55,118,239,214,117,249,195, 59,247,126, 94,181, 67,154,247, 31,190,119, 18,122,142,
+105,251, 6,156, 69, 65, 66,171,196,201,225,112,246,182,109,219,246,135, 39, 79,158, 28,210,233,116, 83,254, 71,203,103, 95, 22,
+139,181,192,213,213,181,197,187,119,239, 66,117, 58,221,102,148, 17, 40,178, 26,118, 46,173, 93,187,246,116, 46,151,203,207,207,
+207,151,166,164,164, 44, 7,112,250,191, 45, 61,221,234, 91,180,102,152,226,160,219,235,222,124,204,122,246,205, 56, 25, 90, 71,
+ 51,172,181,239, 98, 50, 67,254, 3,249,254,111, 19, 89,251,255,137, 63,238, 97,224, 52,112, 26, 56, 13,156, 6,206,111,206,105,
+100, 72, 79, 3,231,191,144,243, 95, 9,182, 33, 9, 12, 48,192, 0, 3,254,223, 65, 97, 72, 2, 3, 12,248,175, 67, 73,175, 86,
+177, 55,139,168, 64,149, 86,197, 37, 88, 29,101,123,219,192,105,224, 52,112, 26, 56, 13,156, 6, 78, 3,231,255, 28,231,191, 85,
+100,237,175, 96,255,111,131,193,173,106,224, 52,112, 26, 56, 13,156, 6, 78, 3,167,129,243,127, 65,104,149,185,111,232, 58, 52,
+224,111,199,246,193,112, 4,128, 89, 23,144,252,119,156,111,128, 1, 6, 24, 96,128, 1,255, 97,236, 71, 57, 93,135,255, 13, 66,
+203, 1, 64,123, 20, 44,124,251, 22,192, 3, 0,210,175,224,179, 2, 48,130, 32,136,225, 0,192, 48,204, 25, 20,204, 26,201,208,
+231, 98,129, 64,144,170, 84, 42,109, 10,191,167, 41,149,202,146,107, 25, 16,248,114, 54, 27, 83, 98, 43, 19,181,107,215, 78, 85,
+169, 84, 54,122,252,125, 14,195, 48,175, 72,146, 12, 23,139,197,119,222,189,123, 23, 80,149, 27,247,244,244, 28,207, 98,177,214,
+ 1,128, 78,167, 91,118,247,238,221, 35,127, 99,190,181,171,225, 96,247,187, 70,171,161, 82,211,179,150,227,203, 64,126, 0,128,
+ 93,253,224, 71, 80, 88, 88,248,125,211,140,128,138,227,232, 84,245,252, 10,208,154,195,225,248,216,218,218,246, 73, 74, 74,122,
+ 1, 96, 17, 80,121, 84,227, 26, 53,106,124,207,102,179,199,232,116,186,186, 44, 22, 43,154,162,168, 99,137,137,137,254,134, 58,
+196, 0, 3, 12, 48,192, 0, 61,196,214, 23,168,146,208,106, 96, 9, 59, 6,240, 6,129,158, 96,112,139, 0, 78,190,205,196, 39,
+125,175,255,174, 1,180, 90,170,224, 63,185, 36,116,215, 62,146,251,251,244,233,227, 52,115,230, 76,116,236,216, 17, 79,158, 60,
+233,112,248,240,225,137,167, 79,159,126, 69,211,244, 93, 0, 79, 0,189, 66, 41,136, 80, 16,167,101,116,159, 62,125,122,172, 91,
+183,142,213,184,113, 99, 40, 20, 10,220,187,119,207,125,211,166, 77, 91, 31, 61,122,116, 27,192,241, 66, 65, 80,238, 2,120, 74,
+165,210,166,104, 49, 78,130, 32,108,134, 13, 27,246,172,164,184, 42, 92, 95,141, 96, 24,230, 49, 65, 16,193, 58,157,238,201,217,
+179,103, 19, 27, 0,237,166,214,230,158,157, 19,171,113, 42,205,169, 82,169,108, 46,254,178, 30,108, 62, 31,170,188, 92,116,152,
+240,151,232,189,181, 98, 33, 8,154, 2, 11,140,212,115,237,214, 87, 0,194, 83, 82, 82, 94,121,120,120,196, 86, 53,135, 89, 44,
+214,186,235,215,175,219, 51, 12, 3, 47, 47,175,117, 0,254, 46,161,197,111,223,186,249,221,203,231, 78, 8,242,179, 82,209,123,
+224,200, 99,239, 19,211,198, 3, 56,247,153,104,234, 3, 91,130,192,194,105,235,143,179, 0, 96,247,210,209,139,182,244,194,246,
+185, 55,241, 9,128,103,161,248, 1,128, 95, 0,220,221,213, 7,182, 0, 22, 79, 91,127,156, 0,128, 61, 75, 71, 47,220,213, 7,
+219,102, 92,171,114,216,138,233,227,199,143,223,190,110,221, 58,150,189,189, 61,146,147,147,123, 55,106,212,200, 53, 55, 55,183,
+ 17, 42, 24, 68, 92,171, 86,173, 83,157,187,245,175, 51,100,184,183,208,218,202, 28, 41,146, 12,147, 83, 39, 14, 77,101, 61,190,
+215, 39, 46, 46,110,164,161, 14, 49,192, 0, 3, 12, 48,160, 28, 84, 63, 50,124, 75,123, 24,201, 52, 24,196,102, 17,223,119,106,
+221,168,251,168,239, 58,147,141,220,234,227,117,100, 84,175, 75,119,158,110, 34,131, 35, 3, 41, 29,227, 47,226,226, 98,136,164,
+226,153, 48, 90, 10,236,155, 23,143, 23,180,132, 19, 71,179,158, 61,123, 86,191, 85,171, 86,197, 75,195,116,239,222, 29,221,187,
+119, 39,118,239,222,221,252,230,205,155,205, 15, 30, 60,168, 9, 12, 12,252, 29, 21,199, 71,241,169, 87,175,222,166,237,219,183,
+243, 61, 60, 60,192,231,243,139,127, 16,139,197,232,223,191, 63,250,247,239,207, 74, 73, 73,241,186,124,249,178,215, 47,191,252,
+162,142,143,143, 95,128,191,162, 52, 87,136,229,203,151,183, 46,227,240,117,130, 32, 62, 82, 20, 21,218,188,121,243, 68, 87,160,
+254,212,239, 58,222,154,222,201, 69, 52,103,201,225, 50,121,216, 60, 30,254, 24, 95,208, 86,151, 20, 90,177,119,174, 65,108, 98,
+156, 41, 52, 54,126, 5, 32, 28,192, 43,134, 97,194,163,163,163,163, 26, 2,205,219,155,147,191, 31,146,210,205,170, 32,182,144,
+152,152, 8, 83, 83, 83, 35, 15, 15, 15, 9, 65, 16,171,238,221,187,247,173, 7,228,181, 91,181,112, 58, 87, 26,247, 10,159,222,
+ 60,198,188,225,238,194, 57, 59,254,252, 89,169,214,158,171,232, 34,130, 32,201, 95,130,105, 95, 20, 44,198,187, 60, 51, 51,211,
+ 3, 0, 44, 45, 45,121, 0,238,110,121,138,239,230,118, 34,190, 38,182, 27,151,197, 98,237, 58,124,248,240,228,239,191,255,190,
+ 96,233,136,135, 15, 33, 22,139,177,102,205,154, 90,243,231,207,247,163, 40,106,118,121,158,172,206,221,250,215,217,182,249,231,
+ 70,121, 89, 57,170,125,187, 78, 63,119,104,210,128,156,230, 51,223,120,155, 70,101,167,211,233,190, 55,120,182, 12, 48,192, 0,
+ 3, 12,168,138, 55,171, 82,161,229,106,133, 35, 45,155,184,140, 24,213,215,157,223,180, 73, 99,112,249,127,133,110,105,213,186,
+ 53, 90,181,110, 77,250,230,231,245,124,246,252,101,207,179, 55,159,168,228,218,248,211,239, 50, 48, 94, 95,171,138, 22,165, 93,
+ 55,208,182,155, 44, 59, 77, 0, 0, 34, 51, 27,229,210,139,159,238,116,234,212, 9, 78, 78, 78,220,192,192,192, 73,149, 8,173,
+165,111,223,190,229,179, 88, 21,199, 67,117,112,112,192,176, 97,195,208,160, 65, 3, 94,215,174, 93,151,150, 39,180, 4, 2, 65,
+ 26, 65, 16, 54, 0, 96, 97, 97,161, 91,181,106, 85, 40, 83, 0, 0, 96, 24,134,121, 76,146,228, 19,154,166,159,254,249,231,159,
+ 73,141, 0,155,222,173, 26, 60,152, 62,118,152,144, 57,187,181, 92,145,160,204,205, 45,243,184, 80, 44, 74, 55, 18,137, 94,241,
+133,130,112, 20,172,229, 21,238,228,228, 20,213, 8,112,106,219,160,246,205,221,115, 71, 27, 31,154,242,115,165,105,217,178,101,
+ 75,215,102,205,154, 9,116, 58, 29,100, 50, 25,246,236,217, 99,106,100,100,100,218,167, 79,159,149, 37, 11,128, 27,208,116,168,
+ 3,107,202,234, 20,221,140,106, 20, 36,179,206, 29, 90,199, 13,235,223,199,164,117,251,206,120,127,247, 40,178,178,242,144,147,
+157, 15,154,166,191,136,235, 51,227, 26, 82,119,245,195,166,221, 75, 70, 47, 38, 72,146,104, 62,120, 17, 6,216,229,204,218,187,
+119,111, 36, 0, 14,143,199, 43, 89, 14, 29,140, 28,155,108,170,223,171, 51,246, 44, 27, 11,134,166, 25, 0,155,170,224,205,178,
+ 49, 54, 54,190,116,243,230,205,118,109,218,180,193,147, 39, 79, 16, 19, 19,131,233,211,167,171,103,204,152,193, 29, 55,110, 28,
+ 49,111,222,188,153,191,252,242,203, 89, 0,143,190,120, 16,216,236, 49, 3,135,140,228,229,103,231, 42,213, 42,141,218,194,202,
+140, 86,201,148,242, 12,105,174,114,228,232, 31,212,145, 33, 79,199, 0,248, 66,104,125,101,122, 26, 96,128, 1, 6, 24,160, 7,
+ 24,134,105, 3,192, 26, 64, 58, 65, 16,207, 75,238, 23,158, 82,180, 90, 75,233,253, 12, 20,244, 74, 89,150,160,203, 64,193,112,
+ 31,107, 0, 58, 0,207, 8,130,144,126,165,137, 21,207, 50, 12, 8, 8, 96, 74,126,150, 16, 90, 12,195, 48,140, 54,243, 35,163,
+122,119,141,145, 63, 63,240,197,166,136, 60,199, 72,158,157,102,158, 30, 95,193,184, 90, 85,188, 10,251,119, 13,160, 29,221, 12,
+204,180, 54, 96,102,119, 53, 83, 62,123,246, 44,144,166,233, 0,223,206, 96,152,215,199, 25,230,245,113,102,110, 7, 48,103,207,
+158,189,238,231,231, 23,224,239,239, 31, 0,160,178,113, 74,169,121,207,131,153,167, 54, 96,202,195,219,183,111,153,189,123,247,
+ 50, 75,150, 44, 97, 14, 29, 58,196,160,146, 8,234, 94, 94, 94,247, 34, 34, 34,152,113,227,198,133,162,130,192,128,110,128,104,
+ 76, 45,187, 55,170, 83, 91, 53,234,239,155, 50,210, 46,130, 50,239,223,222,222,254, 51,123, 54,184,216, 49, 59,219,186, 48, 71,
+122,182,250,196, 48,204,117,134, 97, 54, 48, 12, 51,146, 97,152, 6, 0,208, 18, 48, 25,104,111,249, 65,121,122,155, 66, 61,165,
+125,165,235,222,181,108,217,210,117,193,130, 5, 89,106,181,154,137,141,141,101,246,237,219,199,220,186,117,139,185,120,241, 34,
+227,238,238,158, 82,194, 94,219,137, 13,156, 83,213, 7, 87,171,170, 83,138, 56, 44,214,206,231,183,206, 50, 31, 30,156, 97,158,
+157,244, 99,142,253, 52,138,153, 57,176,157,198,196,136,175, 4,208,173,188,235,102,116, 66,253, 6,181,172,223,197,199,199, 51,
+ 26,141,134,153, 48, 97, 2,227,229,229,197,244,234,213,139,233,209,163, 7,211,189,123,119,166, 91,183,110,204,157, 59,119,152,
+148,148, 20,166, 71,231, 86,178,126,110,104, 93, 5,211,154, 56, 59, 59,127,138,141,141,101, 52, 26, 13, 19, 24, 24,200, 28, 61,
+122,148, 9, 12, 12,100,124,125,125, 25, 0, 71,166, 77,155,166,144, 74,165,140,151,151, 87, 18,202,136, 26,239,236,236, 28, 21,
+241, 46, 49,113,203,250, 3,119,254,216,121,226,206,249,179,183,238, 92,186,241,236,202,197, 27,207, 79, 63, 13,139,190,232,236,
+236, 28, 85, 70,254,127, 85,122, 26, 96,128, 1, 6, 24, 80,185, 22, 41, 20, 90,125, 11,157, 29,125, 25,134,233, 81,106,191,111,
+161,112,250, 98,223,215,215,119, 73,201,253,162,115,124,125,125,151, 0, 96, 58,116,232,112,130, 97,152,250,223,192,252, 41,101,
+108,149,123,180,138, 64, 37, 61, 3,215,165, 15, 56, 58, 45,180, 25,111, 65,103,199, 3, 34, 59, 40, 8, 49, 50, 37,241,120,243,
+224, 92,197, 11, 73, 20,226,234, 91,112, 0, 4, 70, 69, 69,225,205,155, 55, 72, 76, 76,132, 80, 40,252,226,188,135, 15, 31,194,
+200,200, 8,246,246,246,250, 41, 93,245,231,237,220,171, 86,206, 16,119,240, 64,198,168, 31, 17, 24, 24,136,180,180, 52,112,185,
+ 92,240,120, 60, 80, 20, 85, 41, 31, 73, 22,172,248, 91,228,197, 42,235, 28, 15,128,205,183, 16, 95,222,189,114,118,109,242,113,
+ 0, 71,145,240, 1, 41, 74,157,126,158, 60,177, 8, 66,145, 80, 98,100, 36, 44,238, 46, 4, 16, 78, 16,196,251,150, 0, 71, 36,
+ 22, 92,254,125,237, 60, 59, 86, 72,160, 64,241,225, 85,153, 28, 61,122,244,152, 10, 96, 37,195, 48,217,205,154, 53,179, 93,183,
+110,157,121,114,114, 50, 94,191,126,141,211,167, 79,167, 83, 5, 55, 74, 48, 12,179, 26, 0,218, 3, 2, 51,107,179, 27, 59, 87,
+204, 54,198,221, 83,188,234,148, 34, 83,183,254, 87,134,142,155, 54, 99,251,236,254,144,229, 41,112,252, 86, 8,174,191,252, 56,
+ 0,192, 67, 84, 48,238,109,215, 35,124, 0,210,187, 15, 25, 50, 36,244,254,253,251, 86, 7, 15, 30, 4, 69, 81,101,110, 7, 15,
+ 30,196,237, 7, 47,103, 1,120,161,167, 89, 14,181,107,215,190,253,244,233, 83,107,161, 80,136, 91,183,110, 33, 59, 59,187,216,
+147, 53,126,252,120, 34, 59, 59,219,123,207,158, 61, 67,227,226,226, 54, 63,120,240, 32, 19, 5,107, 65,126, 86, 16, 88, 44,214,
+ 71,138,210, 52,180,119,171,207, 30,222,191,115,231,252,204, 87, 16, 91, 54,195,227,176,143,151,179,165,153, 10, 22,139,245,177,
+228,249,223, 34, 61, 13, 48,192, 0, 3, 12,168, 26, 8,130, 8, 96, 24,166, 31, 65, 16, 1,165,143,149,254, 94,116,158,159,159,
+ 95,241,126,209, 53, 27, 54,108, 88, 95, 98, 95,254,141,204,171,112, 48,124,215, 66, 5,217,181,172,147, 84,175,207, 67,245,230,
+ 18,184,206,157,192,107, 48, 0, 44,103,119, 36,188,186,139,176,107, 91,144, 20,249, 16, 12,173,131,189,107, 91,125, 13, 81, 54,
+108,216, 16, 74,101,193,208, 44,149, 74, 5,174,200, 92, 57,111,202,104, 1, 0,208,108,129,170,132,130,213,139,208,184,147, 39,
+218,166, 50,120,102, 91,224,168,104,155, 90,112,221,218, 9, 19,192,229,114,193,229,114, 65, 20, 14,253,209, 71,104, 17,133, 39,
+211, 5,221, 87,101, 25, 65,200,249,156,227, 39, 87,250,180,229,199,133,243, 84, 17,143,145,162,162,153,203,169,186, 43,250,216,
+ 43, 20, 9,147,141,132,194,112, 35,177,168, 88,104, 17, 4,241, 17, 0, 24, 14,199,255,232,106,159,102,162,212,104,145,242,121,
+ 32, 36, 74, 90, 83, 14,205,234,107,215,174,217,176,217,108, 59,157, 78,135,132,132, 4, 68, 70, 70, 98,219,182,109,169,121,121,
+121, 93, 67, 66, 66,222,149,212,142, 58, 35,222,105,255, 53,179,235,176, 95, 5, 9, 84, 31, 35,170, 92,122,172,154, 12,242, 26,
+208,181,249,149,169, 99,151, 97,208,119,189, 48,174,107, 35, 38, 54, 37, 75, 9,224, 86,161,235,181, 50, 36,135,132,132,244,236,
+210,165,203,177, 22, 45, 90,184, 49, 12,131,166, 77,155,194,219,219, 27,254,254,254, 8, 11, 11, 67,110,110,174,230,230,205,155,
+ 91, 1, 28,214,211, 44,161,185,185,249,245, 59,119,238, 88, 11,133, 66,220,188,121, 19, 10,133, 2,246,246,246,152, 49, 99, 6,
+111,195,134, 13,127,228,230,230, 14,247,243,243, 19,196,198,198,238,188,113,227, 70, 45, 20,172, 59,247, 69, 33, 80,171,213,251,
+143,251, 31,217, 62,195,103,166,227,157, 39,175, 3, 85,249,121,166,206,206,137,185,214,230, 98,227,173, 27, 87,215, 84,171,213,
+ 83,203, 78,207,123,213, 74, 79, 3, 12, 48,192, 0, 3,190, 64,133, 90,164,164,120, 42, 45,182,170, 34,210, 0, 40,124,125,125,
+151, 18, 4, 17,224,235,235,187,212,207,207, 79, 1, 32,229,239, 16, 89,197, 66,171, 95,191,126, 65, 1, 1, 1,232,215,175, 95,
+ 80,185, 20,180, 14,154,216,251,208,196,222,135, 81,135, 89,248,211,111, 84,169,155,167,171,109, 93,255, 53,183,238,168, 84, 42,
+246,145, 35, 71,138,199,109, 1,128, 78,167,251,230,185, 88, 21,161, 85, 40,244,190, 48,162, 54, 95, 28,180,127,238,240,246,150,
+ 58, 57, 71,253,240, 50,146, 85, 52,181,249,131, 70,254, 60,155,249,165, 60,206,139,115,166, 34,241,193,109, 8,197,226,196,201,
+247,195,139,189, 88,133, 34, 43, 6, 0,106,241,141, 3,247,206, 30,228,110,199, 5, 87,125,229, 12, 82, 84,180,106,111,156,246,
+112, 57,133, 13, 12,195, 32, 38, 38, 6,114,185, 28,193,193,193, 56,119,238, 92,122, 25, 34, 11,181,249,226,123,135, 22,141,105,
+103,146,247,137,171,126,126, 27, 41, 42, 90,175,174, 46,171,166,131, 58,113, 73,226, 38, 65,178,140,186,183,119,197,156, 31, 6,
+ 99,203,161, 63, 41,181, 77,231,126,219, 47, 93, 29,145,175,210, 44,213, 83,100, 21, 59, 27, 67, 66, 66, 26,133,132,132,240, 1,
+120,122,123,123, 95, 29, 58,116, 40,130,130,130,112,249,242,101, 23, 0,146,194,243,214,160, 96,161,236, 95, 0, 68,151,231,120,
+228,114,185, 39,111,223,190,221,216,193,193, 1,183,111,223,134, 66,161,192,180,105,211,212, 62, 62, 62,220,241,227,199, 19, 57,
+ 57, 57,197,158,172,224,224,224,204,242, 68, 22, 0, 36, 39, 39, 95, 59,119,250,104,199, 46, 93,186, 12,174,227,210,192, 36, 58,
+ 47, 55, 77, 40, 20, 24, 61, 8,186,203,125,254,244,209,206,228,228,228,103,101,167,103,160,222,233,105,128, 1, 6, 24, 96, 64,
+249,208, 75,139,148,242, 76, 85, 5, 37,174,227,248,249,249, 69,250,249,249,125,230,241,250, 74,148,158,117,120,165,168, 77,171,
+ 86, 28, 45, 93, 78,194,151, 55, 64,211, 85,185,217, 47,142,153,155,155, 83, 70, 70, 70,159, 9, 45, 90, 79,206,172, 11, 39, 16,
+ 61,125,116,177, 39,171,200,179,133,222,227,191, 74,104,209, 52, 29, 12,224, 51, 35,132, 54,174,163,182,246,119,235,212,168,142,
+ 35,169, 61,189, 13, 73,114, 74,185,242,173, 70,249, 38,143, 25, 16, 85,198, 32,235, 98, 78, 74, 11,129,200, 40,222, 72, 44, 42,
+ 45,178,226, 0, 64,100,235, 50,116,115,159, 6, 93,155, 55,168, 71, 82,167,126, 67,178, 92,155,239, 27,165,209, 68,203,152,243,
+229,164,225,202, 94,189,122,173,180,180,180, 20,108,223,190,221,212,217,217, 25, 20, 69,169, 75,139, 44,161,141,235,168,109,131,
+154,116,114,181, 51, 39,181,103,119, 32, 81,161,147,111,139,214,254,161,143,200,178, 50, 21,223,216,187,126,186,145,144,207,129,
+ 82,169,196,134,221,103,113,243, 81, 68,191,140,136,139, 55, 0,220,248,138, 2, 57,185, 95,191,126, 91,214,172, 89, 3,173, 86,
+139, 73,147, 38,225,227,199,143, 55,223,190,125,187,173,102,205,154, 11, 22, 45, 90,228, 96,103,103,135, 17, 35, 70,112,181, 90,
+237,248,114, 56, 54, 30, 63,126,188, 95,243,230,205, 17, 20, 20,132,236,236,108,216,219,219,195,199,199,135,231,231,231,247, 71,
+110,110,238,240,245,235,215, 11, 98, 98, 98, 42,244,100,125, 86,174,117,186,181,251,182, 76, 95,208,166,189, 59,249,225,195, 59,
+ 42,161,173, 7,121,247,246,229,251,150,150,150,127, 36, 36, 36,252,149,158,131,155, 86, 57, 61, 13, 48,192, 0, 3, 12,248, 54,
+ 32, 8,226, 74,225,184,171,207,188, 92,165, 69, 88,145,199,170,228,126,233,243, 11,127,255, 22, 47,203,251,203, 16, 94,159,135,
+119,232,215,175,159,222,211,234,105, 89,186, 94,226,169, 52,190,107, 0,173,163, 24,236,165, 30, 36,184, 34,115,101,255, 53,183,
+238,148,119,174, 72, 36,210,219,163, 69,171,148,149,101, 74,149,132, 86,225, 24,173,235, 12,195,124, 38,180, 76,109, 93, 61, 22,
+ 47,154,189,213,125,104,111, 50,245,135, 14,200,206, 87,169, 22,189,166,232, 36,121,197, 34,171,160, 21,215,198, 10, 69,226,112,
+129, 72, 88, 82,100, 37, 0,128,192,166, 94,219,133,115,102,236,238, 54,170, 63,145, 62,205, 29,210,108,133,106, 65, 36, 69, 36,
+ 43,152,225, 81,192,221,178,232,238,220,185,179, 15,192, 62, 15, 15,143, 84,145, 72,132,252,252,252, 47,242,160,200,222, 78, 67,
+123,147,169,147,219, 33, 75,166, 81, 45,138,164,144,162,160, 79, 86, 38,178,172,205,140,111,236, 93, 55, 93,152,146, 20, 7, 46,
+151, 11,177, 88,140, 91, 15,195,145, 17,121,233,107, 4, 22, 72,146, 92,229,235,235,187,114,198,140, 25,200,204,204,196,229,203,
+151,241,221,119,223,225,196,137, 19,206, 87,175, 94,221,226,233,233, 9, 22,139,133,128,128, 0,104,181,218,247,229,208, 12,158,
+ 50,101,202,130,161, 67,135,226,217,179,103,144, 72, 36,159,121,178,178,179,179,189,119,239,222, 61, 52, 54, 54,182, 82, 79, 86,
+ 41,180,173, 93,175, 37,119,201,242, 95,161,146,167,177,211,147,159, 4, 5,222, 34, 31,103,101,101, 9, 1,228, 84, 55, 61, 13,
+ 48,192, 0, 3, 12,208,219,171, 85,158, 22, 73, 47, 20, 81,233,101,237,151, 16, 88,101,237, 19,165,188, 96,234, 82,191,135,253,
+157,247,164,151, 71,139,109,219, 4, 84,106, 68, 9,161,149,246,217,239, 2, 99, 11,189,186, 14,181, 20,216,123, 15, 23,199,209,
+ 18,100,102,102, 10,172,172,172,148, 37, 5,130, 80, 40,132,131,131, 3,164, 82, 41,246,239,223, 15, 84, 62, 40,154, 50, 25, 58,
+ 22,109, 71, 77,194,115, 39, 30, 24,173,166,216,179,181,119,194,132,207,196, 22,151,203, 45, 26, 27, 86, 89,163,251,180,208,211,
+244, 24, 0,211,210,165,206,207, 2,145,104,130,192,170,134,213,156,233,147, 57,177,105, 42,220,113, 95,146,125,118,227, 98,113,
+ 34, 35,158,145,128,156, 71,149,240, 69, 15,220,115,180,180, 39, 43,169,133, 75,157,101, 2,161,224, 7,158, 69, 45, 59,223,121,
+211, 57,177,169, 42,226, 78,219, 69,185,231,126, 89, 36,140,129,241,130, 36,100,223,213, 35,123, 86,126,247,221,119, 43, 25,134,
+ 97,104,154, 94, 14, 0, 37,237,157,231,243, 3, 39,250,147, 18,129,238,203,164,231, 54, 46, 54, 78, 68,197,246, 90, 53, 29,212,
+201,214,220,228,198,222,245, 51,132,146,228,120,240,249,124, 24, 27, 27, 35, 49, 53, 7, 28, 54, 75,241,149,229,141,223,185,115,
+231,197,211,167, 79, 71,120,120, 56,166, 77,155, 38, 73, 72, 72, 56,127,234,212,169,105, 43, 86,172, 96,123,121,121, 65, 34,145,
+ 96,211,166, 77,218,135, 15, 31,174, 7,176,169,204,242,200,102, 79,254,249,231,159,153,148,148, 20, 34, 38, 38, 6,246,246,246,
+152, 57,115, 38,111,253,250,245,197, 99,178,170,226,201, 42, 66,114,114,114,208,205,219,143, 49,224,218, 86, 80, 90, 85, 80,118,
+102,194,253, 55,209,210, 32, 11, 30,111,190, 99,203,166,213, 74, 79, 3, 12, 48,192, 0, 3,190,137, 23,235,121, 69,251,255, 5,
+ 40,171,235, 80, 47,161,245,126,199,178,137, 46, 19,103, 44,132,145,115, 39,168,162, 46,128,206, 79, 45,246,104, 9,196,230,176,
+168,233,134,108,153, 10,103, 2, 95, 2,192,251,170, 88,149,151,151,135, 86,173, 90, 97,215,120,215,110,202,188, 76,129, 17, 0,
+ 21,223, 68,121,145,215,249,206,213,171, 87,229, 52, 77,159, 4,112,181, 18,154, 85,141, 27, 55,222,249,235,175,191,242,220, 70,
+ 77, 68,254,147, 7,165, 61, 40, 48, 50, 50, 2,159,207,199,171, 87,175,112,231,206, 29, 53,128, 85,149,100,232, 83,138,162,194,
+ 78,157, 58,149, 84,191,142, 99,239, 86, 45,154,205, 90,186,196,215,248,245,131,155, 88,190,126, 39, 93,191,181, 87,206,134, 19,
+ 23,243,114,196, 53,187, 43, 36,111, 67,245,184,213,176, 82, 34, 43,165, 97,237, 26,221, 90, 52,105,188,112,249,242,101, 38,145,
+ 15,110, 97,197, 47,123, 25,151,230, 61,114,126, 57,119, 41, 55, 67, 88,171,151, 50,237,205, 51,125,210, 48, 40, 40,104, 31,128,
+125, 69,251,165,237,245, 93,179,141,118,109,211, 91,186,225,196, 57, 89,174,113,205, 30, 21,217,107,237, 54,184,163,147,181,249,
+141, 29,107,127, 20,126, 74, 78, 0,159,207,135, 88, 44, 70,130, 36, 27, 43,183,158,150,105,104,186,247,215, 10, 45, 99, 99, 99,
+190, 70,163,193,174, 93,187,144,144,144,208, 1, 64,194,139, 23, 47,246,142, 28, 57,114,123,211,166, 77, 27, 70, 70, 70,190,207,
+207,207,159, 1,224, 77,121, 36,102,102,102, 29,172,173,173,137,199,143, 31,227,199, 31,127, 84,207,156, 57,147, 59,110,220, 56,
+ 66, 42,149, 86,215,147, 5, 0,112,116,116,244,232,217,189, 61, 58,245,156, 22,164, 86,102,223,143,125,243, 71, 16,201, 60, 18,
+ 84, 55, 61, 13, 48,192, 0, 3, 12,248,159, 65,245, 2,131,123, 0,108, 87, 75, 76,109,236,200,253,228,191,113, 38,147, 23, 29,
+204, 40,158,237, 99,114, 47,252,192, 92,217, 52,142,185,186, 99, 14, 51,173,111, 99,166,161, 13,241,201,213, 18, 83, 61,190, 20,
+110,159,173,238,253, 93, 3,104,123,214, 3,211,179, 30,152,190,174,208, 2, 88,218,178,101,203,139, 62,109,255,138,163,229,211,
+ 22, 12,128, 31, 1,136,203, 49,171,172, 21,195,237, 1,236,111,213,170, 21,117,247,238, 93,230,237,240, 30, 76, 72, 67, 43,102,
+198,140, 25,204,138, 21, 43,152,209,163, 71, 51,214,214,214, 84, 97, 66,216, 87,198, 57, 96,192, 0, 39, 0,168, 81,163,134, 89,
+107,183,250,159, 94, 5, 94,102,238,251,111,103, 14,249, 12, 97,218, 53,117,203,176,107,216, 37,204,200,190, 65,139, 74,146,175,
+152,211,206,206,110, 9,195, 48,189, 25,134,177, 7, 0, 23, 23, 75,113,203,134,245, 83,194,110, 95,102, 30, 28,221,201, 28,242,
+ 25,194,180,111,214, 40,211,201,205,243,141,192,166, 97, 91,125, 56,203, 66,153,246, 54,105,152, 97, 91,191, 99,104, 5,246, 22,
+115,214,105, 59,226, 82, 82, 74, 42,243,244,233, 83,230,234,213,171,204,131, 7, 15, 24,255, 83,151,152,154,109,134,231, 91, 53,
+ 29,212,169, 10, 69,167, 60, 59, 77,251,246,237,203,188,127,255,158,233,211,167, 15, 3,192,180,154,156, 23, 99, 99, 99,153,136,
+136, 8,102,233,210,165, 12,128, 35,211,167, 79, 87,228,228,228, 48, 61,122,244, 72, 40, 20, 88,236,234,216, 89,183,182,227,134,
+193,253, 59,175,242,249,113,168,199,215,166,231, 55,132,129,211,192,105,224, 52,112,254, 47,112,254,127,134,125,161, 87,171,232,
+179,165, 94, 30,173, 32,128, 66, 38,246, 53,177,209, 28, 91,191,105,199,252, 93,251,142, 44, 92, 60,107,178,168,179,123, 79,132,
+223,254, 29,231, 2, 78,201,148, 42,245, 38, 46, 11,191, 70,100, 66,254,174, 18, 43, 10,227,104,125,134,144,144, 16,161, 69,189,
+191, 98, 48,125, 40,136,205,186,183,138, 55, 40, 1, 48,229,229,203,151,191,122,122,122,174,251,161, 83,219, 33, 62, 29,187, 65,
+171,213,194,223,223, 31,241,241,241,231, 1, 44,211,215,227, 22, 30, 30,158,209,168,158,243,108, 14,139,189,112,198,232,193,214,
+233, 31, 95, 35, 41, 42, 4, 0,160, 82, 41,180,159,222,223,111, 94, 21,227,140,140,140,158, 90, 91, 91,191,181,182,182,150,186,
+214,169, 49,133, 15,206,242,105,222, 3,109, 50, 99,223, 32, 49,178,160,103, 84,165,148,107,146,222,223,109, 88,157,220,117,118,
+118,230,139, 56,152, 90,166,189,106,165, 54,245,195,155, 22,250,240,200, 85,234,245,171,183,248,247, 90,187,112, 2,223,196,196,
+ 4, 47, 35, 62, 96,249,111, 39,100, 10,181,182,119, 70,248,197,111,210, 61,198, 48, 12,180, 90,173,222, 19, 29,202,193,226,230,
+205,155, 55, 88,183,110,157,203,248,241,227,241,181,158,172,146,136,142, 77,246,117,172, 81,183,209,135,183, 47, 61, 45,140,184,
+199,190, 38, 61, 13, 48,192, 0, 3, 12,248,159, 65,223, 66,103,206,148, 18,159, 33,149, 10,173, 34, 68,164, 65, 14, 96, 77, 29,
+ 86,254,222, 37,235,182,172, 36,137,173, 19,104,134,249,157, 34,177, 58, 38, 19,233, 95,105,156,156,195, 6,213,107,208,104, 54,
+ 0,112,216,213,107, 32, 11,241, 30,192,208, 3,143,158,181, 57,240,232,217, 79,133,199,214, 2,168, 82, 95,174, 49, 27, 17,238,
+141,234, 58,118,110,217, 88,192,210, 41,144, 20,245, 17, 89, 50, 37,110, 69,198,103,147, 12,249,123, 85,141,138,137,137,185, 7,
+ 0,182,166,194,168,206,141,234,213,236,210,170,177,144, 67,168,145,244,250, 37,114, 20,106,220,140,140,207, 1, 65, 84,123, 64,
+245,183,178, 55, 53,252,210,243, 63, 65,244, 32, 8,226,246, 82,159, 81,252,149,191,157,252,166, 34, 11,128, 60, 57, 57, 57, 83,
+ 46,151, 91,166,164,164,168, 81,253, 32,113, 31,114,115,115,155,206,153, 51,103,205,130, 5,216, 12, 53,220, 0, 0, 32, 0, 73,
+ 68, 65, 84, 11, 22,110,220,184,145, 91,157, 49, 89,229, 65,154, 28,127,161, 75,227,111,151,255, 6, 24, 96,128, 1, 6,252, 79,
+ 96, 74,169, 79,232, 45,180,138, 5, 67, 26,210, 1,204,168, 91,151,153, 23, 29, 13,245,183,178,172, 44, 79,215, 87,226, 57,128,
+254,213,190,154, 36,242,158,188,143,207,127,250, 62, 62, 31, 52,195,208, 12,163, 34, 73, 36,202, 52,154,245,239, 99,146,171, 63,
+235,142, 32,116,207, 63, 36, 40, 94,124, 76, 84, 50, 52,205,208, 12,163, 38, 8,124,210,106,233,245,145, 49,241,151,254, 27,236,
+205, 8,191,248, 40,128, 34, 58, 63,122, 26, 49, 79, 38,211,236,204,136,186, 24,252, 13,243, 69, 27, 30, 30, 62,166, 67,135, 14,
+ 19,117, 58,221, 94, 0,218,175,224, 82, 83, 20,181,120,195,134, 13,231,195,195,195, 79, 7, 7, 7, 75,190,133,200,250, 91,243,
+223, 0, 3, 12, 48,192,128,127, 43,170,183,168,116,121,248,150, 34,235,191, 17, 17, 31,226, 90,253, 29,188,145, 31,226,154,252,
+127,176, 55, 53,234,194,139, 84,192,251,111, 74,222,155, 58,157,238,230,183, 20,213,215,175, 95,175,141, 50,150,213,249,111,203,
+127, 3, 12, 48,192, 0, 3,254,181,152, 82,158,248, 98, 27,210,198,128,127, 1,152,111, 37,178, 12, 48,192, 0, 3, 12, 48,160,
+ 26, 40,215,163, 69,160,252,153, 3,183,171,240, 7,213,153,125,112,219,192,105,224, 52,112, 26, 56, 13,156, 6, 78, 3,231,255,
+ 28,231,191, 17,246, 40, 24, 16,127,165,240,179, 66,241,245, 45, 97,152,250,106,224, 52,112, 26, 56, 13,156, 6, 78, 3,167,129,
+243,223,142, 50, 7,194, 3, 5,131,135, 13, 48,192, 0, 3, 12, 48,224,255, 19,248,133, 91,117,127, 55,192,128,191, 91,108, 21,
+ 11,174,234,140,209,170, 95,248,249,225,111, 52,214,199,222,222,126, 74,179,102,205,220,184, 92, 46,153,151,151,183,250,238,221,
+187,171, 74,159,212,185, 17,251, 5,139,132,211, 95, 71, 8,128, 96, 1, 36, 9, 29,131,164, 7,175, 20,173, 13,249,254, 95, 13,
+103, 35, 19,235, 63, 9,146,197,211, 81, 26,232,180, 26, 20, 12,183, 42, 0, 77, 83,241, 58,141,202,171,188,139,237,154, 15,174,
+ 73,233,232,141, 0,179, 11, 32,167, 3,244,110, 2,236,105, 12,168, 61, 4, 88, 63,130,197,252, 2, 29,177,136,205, 97, 45,145,
+132,156, 77,252, 55, 36,216,153, 51,103, 88, 95,115,253,240,225,195,203, 92, 64,212,193,193, 33, 64, 40, 20,214, 43,239, 58,153,
+ 76, 38,145, 72, 36,158,255,242,242,216, 5,192, 14, 0,141, 75, 29,127, 3, 96, 54,128,192,175,253, 3, 15,128,109, 11, 76,229,
+ 2,139, 0, 64, 3,252,146, 10,236, 11,250, 47, 26, 99,104,109,109,125,159,205,102,187,200,100, 50, 89, 94, 94, 94, 93, 99, 99,
+227,104,145, 72, 36,162, 40,234,125,122,122,122,151,138,174,101, 10, 38,165, 84,138, 38,128,241, 59, 96,164,142, 36,103,114,128,
+ 93, 42,154,222, 91, 88,131,235,179,192,237,116,252,181, 60,215, 66, 0,187,171,248,187, 1, 6,252, 29,248,170, 89,135,174, 5,
+245, 3, 60, 0,116,105,211,166,141,173, 76, 38,195,155, 55,111, 82, 1,220, 7, 16, 84,184,189,251, 22,150,146, 36,185,121,203,
+150, 45,243,103,206,156, 89,188, 24,244,171, 87,175,208,188,249,151, 49, 66, 89, 36,156,238, 94,190,109,243, 60,252, 29,218,244,
+ 24, 86, 40,180, 72, 64, 38,129,103,207,182,213, 53,193,216,220,220,124, 53, 65, 16,195, 73,146,172,180,210,160,105, 90,199, 48,
+204, 25,169, 84,186, 18, 64, 94, 85,254, 72, 36,228,107, 41,157,174,204,255, 96,179, 88, 58,153, 92, 85,110,216, 11, 11, 11,139,
+ 96,146, 36,235,148, 92, 48, 27,248,124, 1,237,242,126,163, 40, 42, 41, 35, 35, 67, 31, 17, 42, 32,217,220,217, 4,193,237, 9,
+146,118, 5, 8, 16, 32,223,209, 58,245, 45,154,210,108, 3,160,252, 26,145,101, 95,163,238,131,185,203, 54, 56, 69, 68,189,193,
+ 82,159,209,216,184,227, 8,150,204,158,136,109,251, 79, 96,246,148, 81,104,212,168,113,133,181, 46, 13,238,250,101,179,134,247,
+240,219,117,218,125,201,140,225,124,191, 93,103, 58, 47,245, 25,201, 91,191,243,116,231,165, 62, 35,248,126, 59, 79,187, 47,153,
+ 53,220,104,253,238,179, 52,128,177,213, 49,114,148,139,131,140,160,168, 50,223,140, 25, 54, 91,117,226,125,138,232, 63,241, 68,
+143, 31, 63,190,153, 66,161,120, 57,186,103,203, 13, 45, 92, 29,147,203, 58, 39,243, 83,178, 99,244,219, 16, 95, 14,215,168,213,
+ 64,223, 35,175, 42,116, 15,240,249,117,222,188,121,227, 66,211, 52,116, 58, 29, 40,138, 42,254, 84,171,213,232,210,165,203,183,
+154, 56,211, 31,192,234,130,135, 21,126, 0, 78,127, 5,151,152,205,102,207,229,241,120, 30, 20, 69,185, 1, 0,135,195,137, 82,
+169, 84, 65, 20, 69,109, 1,144, 95, 69,190,173,201,201,201,141,196, 98, 49, 52, 26, 77,241, 2,244, 44, 22,171, 97,205,154, 53,
+119, 41,149, 74,151,175,189,121, 91, 96,106, 71,119,247,109,227,230,207,103, 41,238,223,199,182,195,135,183, 34, 55, 23, 0,118,
+ 85,118, 45,143,199,187, 65,146,164,115, 85,254,143,166,233,120,181, 90,237, 85,149,107,216,108,182, 75, 74, 74,138,141,131,131,
+ 3,242,242,242, 32, 18,137, 68, 69,251, 95,131, 32,128,232, 13,116,161, 88,172, 57,150, 86, 86,157, 95,222,188, 41,106,210,164,
+ 9,201, 98,177,150, 64,255, 32,213,124, 0,155, 24,134, 49, 42,108, 47,182,181,111,223,190, 3, 65, 16, 20, 0,134,166,105,242,
+233,211,167,163,104,154,102, 23,214,121,155, 0, 28, 6,160, 50,232, 0, 3,254, 1,111,214,254,170, 10,173,171, 0, 60,218,180,
+105, 99,228,237,237, 13, 15, 15, 15,184,184,184, 64, 32, 16, 20, 84,226,153,153,182,161,161,161, 35,238,223,191, 63,226,242,229,
+203,120,253,250,181, 2,192, 67, 0,101, 62,212,221,251,185,207, 20,136,249,219, 1, 32, 61, 41, 83,146, 20,147,182, 93, 34,145,
+108, 2, 80, 50, 68,120,221,177, 99,199,206,155, 53,107, 22, 2, 2, 2,112,226,196, 9,168, 84, 42,228,229, 85,160, 95,228,105,
+144,222,217, 0,136, 98,129,132, 32, 64,104, 3,136,108,171,157, 82,230,230,230,171,103,207,158, 61,167, 81,163, 70,197, 81,204,
+181, 90, 45, 40,138,130, 86,171,133, 84, 42,197,188,121,243, 10, 26, 90,134, 1, 77,211,184,118,237,218,204, 41, 83,166, 64, 42,
+149,206, 45,139,179,125,171, 26, 47, 72,130,116, 42,242,213, 48, 58, 93,210,147,208,164,214,148, 78,199, 82, 42, 53,101,174, 84,
+ 46, 16,112, 43, 20,121, 28, 14,199,233,245,159,127,218,144, 60, 30, 24,157, 14,160,105, 48, 52, 93,152,156,133, 27, 83,112,140,
+209,209, 96,180, 58,208, 20, 13, 74,161, 66,219,233,211,245, 73,138,142, 28,158,209,137, 49, 63,204,183,107,215,190, 61,167, 86,
+ 13, 7, 80, 58, 26, 31, 99,147,236, 94,190,120,210,233,204, 31,187,166,169, 21,121,163, 0, 84, 43,206, 22, 79,104,114,115,231,
+158, 3, 78,207, 67, 35, 16,120,247, 62,110,223, 9, 2, 0,220,184, 27, 92, 36,184, 43,205, 42, 80,249, 77,103, 79, 26,196,223,
+176,243, 36,103,246,164,193,172,141, 59, 79,113,102, 77, 28,200,218,176,253, 4,119,214,196,129,172, 13, 59, 78,112,103, 77, 26,
+196,242,219,118,168, 25, 0,115, 0,210,242,200,202,203, 35,130,162,248,199,162, 83, 89, 0,144,190,119, 47,180,105,105,112, 88,
+185, 18, 0, 48,166,174,173,222, 93, 19, 86, 86, 86, 47, 56, 28,142, 83,101,231,105,181,218, 74, 69,240,248,241,227,155, 43, 20,
+138, 23, 20, 69, 49,108, 54,219,119,244,224, 94, 23,123,119,110,158, 89,242,156, 87,175,194, 44,215,175,255,115,208,233,151,121,
+204,136, 86,198, 47, 3, 54,143,111,221,111,193,145,176, 10, 26,100, 82,165, 82,225,253,251,247, 40,185,200,123, 9,232,170,249,
+ 72,145, 0,182, 89, 90, 90,182,203,204,204, 28, 3, 96,105,110,110,110, 51, 22,139, 5, 11, 11,139,165,106,181,250,163,169,169,
+233,193,156,156,156,224, 66,175,145,190, 75, 6,116, 49, 49, 49,241,191,112,225,130,121,203,150, 45,201,140,140, 12,212,174, 93,
+ 27, 89, 89, 89,109,239,223,191,223,106,210,164, 73,147,242,242,242,190, 47,124, 25,212, 23, 13,132, 66, 33, 51,110,220, 56, 66,
+167,251,235,118, 15, 29, 58, 4,175, 38, 84, 61,107, 51,161, 92,169,102,114, 2,223,155,254,200,229,114, 31,198,199,199,231, 84,
+ 53, 49,184,192,162,113,243,231,179,196,113,113, 16,135,133, 97, 76,110, 46,123, 99,129,119,171, 82,161, 69,146,164,179,255,137,
+223, 93,120, 60, 30, 40,138, 42, 22,131, 69,117,148, 86,171,133, 70,163,129, 86,171,133, 78,167,131, 86,163,133,223,218, 95,170,
+ 93, 23, 10,133, 66,161,189,189,125,170, 80, 40, 20,126,165,184,172,153, 69,146, 63,180,104,213,106,202,202, 65,131, 4,207,158,
+ 61, 19,144, 36, 9,138,162,176,105,211, 38,138, 97, 24,179, 70,128,201,107, 32,183,170,220,124, 62,159,253,199, 31,127,140,226,
+241,120, 0, 0,181, 90,141, 38, 77,154, 16,134, 54,223,128,255,160,216,250,194,203, 85,145,208,234,147,155,155, 11,157, 78, 7,
+ 99, 99, 99,176, 88,159,183,251,150,150,150,232,217,179, 39,186,116,233, 2,111,111,111,188,126,253,218,200,219,219,187,103,121,
+100,163,231,247, 67, 13, 23,219,194,198,132,182,127,116, 37,116,195,161,159,207, 90,127,250,244,105,126,137,211, 38, 77,157, 58,
+149,200,204,204,196,240,225,195,239,171, 84,170, 1,168,224,225,211,209, 72,242,244, 30, 3,154, 33,140,182, 60, 61, 64,168,149,
+ 10,134, 36, 73, 69, 81,215, 97,117, 82,137, 32,136,225, 14, 14, 14, 56,121,242, 36,212,234, 47,195,133,153,152,152, 32, 50, 50,
+242, 47,175, 26,139,133,246,237,219,179, 8,130, 24, 14, 96,110,217,156,164,211,163,231,113, 54, 69,251,253,122, 54,230,182,111,
+ 69,166,166,164,202, 24, 0,196,178,101,203,138,133, 27, 0,172, 94,189, 90, 31, 59, 65,114, 56, 72, 15, 10,250,171, 34,102,147,
+ 32,185, 4, 8, 14, 64,178, 11,122, 81,193, 0,140, 14,160, 41,128,214, 2, 2,251, 26,250, 36, 67, 91,199,154, 46, 1,235,127,
+219,109,166,210, 50, 56,121, 41, 16,177,177, 49, 96,145, 36,234,214,115, 65,175,174,157, 57,173,218,116,168,241,203,170,249,151,
+ 83, 18, 62,244, 1,240,172,202, 9, 77, 51,130,122, 53,173,112,240,208, 75, 88,155,139, 49,124,208,119, 48, 18,240,177,113,199,
+239, 88,187,196, 7, 46,117,157,177,111,235,186,114, 47, 55, 53, 53, 93,227,230, 82,207,121,247, 31, 87,224,214,176, 33,107,183,
+255, 21,184, 53, 42,252,108,236,198,218,237,127, 5,141, 26, 55, 98,237,246,191,130,102,141, 27,212,122, 33,121,186, 38, 43, 43,
+203,167,252,244, 44,149, 71,189, 10,242,136,147, 79, 23, 87,218,113,211,166, 1, 64,177,208,170, 10, 56, 28,142, 83, 74, 74,138,
+ 77,101,231, 85,230, 53, 40,244,100,189,160, 40, 10,105,105,105, 68,118,118, 54, 99,102,102, 54,232,250,190,165, 23,188,220,155,
+103, 1, 64, 88, 88,152,133,159,223,250, 65,167, 94,228, 66,241,100, 39,113,236,207, 32,122,204, 0,143, 23,151, 54,140,111,133,
+194, 37, 33, 74, 67,165, 82,197,182,104,209,130, 41,252,238,200,231,243,185,165,202,155, 67,253,250,245,191,240, 90,235,209,165,
+184,237,241,227,199, 62,141, 26, 53, 66,195,134, 13,131,219,181,107,103, 34, 18,137,112,253,250,117,184,185,185, 53, 54, 49, 49,
+121,122,230,204, 25,206,226,197,139,155, 31, 62,124, 24, 0,102,234,145,156, 61, 60, 61, 61, 79, 6, 4, 4, 8,184, 92, 46, 20,
+ 10, 5, 34, 35, 35, 97,106,106, 10, 30,143,135,129, 3, 7,178, 58,117,234,100,217,181,107,215,115,239,222,189, 27,133, 42,204,
+128, 82, 42,149,204,210,165, 75, 33, 20, 10, 33, 20, 10, 33, 18,137, 32, 18,137, 32, 22,128,216, 59,187,166,209,172,253,217, 70,
+115, 87,238,221,224,191,123,213,221, 26, 53,232, 21,137,137,137,217, 85, 45, 11,138,251,247, 33, 14, 11, 3, 74, 60,187,250,194,
+ 84,100, 1, 95, 95,223,202, 60, 82,224,114,185,232,216,177, 99,165,124, 22, 22, 22,231,217,108,246,103,111,166, 20, 69, 9,124,
+125,125,117,239,222,189, 19,145, 36, 41,162,105, 26,190,190,190, 58,138,162, 4, 54, 54, 54,193, 52, 77,167,102,100,100, 12,169,
+136,183, 43, 32, 8, 6, 6, 19, 28,206, 92,123, 7,135,218, 30,117,235, 10,111,223,190,205, 2, 0,103,103,103, 70, 34,145,100,
+ 95,186,116, 41,143, 13,236,113,102,152, 63,170, 32,178, 84, 0, 22,146, 36,185,141,207,231,179,107,213,170, 21,191,124,249,242,
+199,133, 30, 82, 48, 12, 67,214,170, 85,171,173,145,145,145,179, 74,165,162, 80,208,117,104,240,102,253, 11,192, 48, 76,171, 2,
+221, 94, 12, 53, 0, 94,145, 3,191,160,181,131, 85,169,227, 0,144, 81,248,162,104, 91,206,126, 38,128,215, 0, 26, 0,176, 41,
+252,237, 57, 65, 16, 89,213, 48,179,124,143, 86, 64, 64, 64,241, 43,108,191,126,253,138, 27, 22, 99, 99, 99, 60,127,254, 28, 4,
+ 65,192,216,216, 24, 38, 38, 38, 48, 53, 53, 69,110,110, 46, 94,191,126,141, 55,111,222, 32, 46, 46, 14, 4, 65,160,110,221,186,
+ 40, 42,236, 37, 80, 92,193, 29,255, 53, 0, 2, 49, 31, 4, 1,180,236,214, 12,205,186, 52, 65,155,103,209,179, 95,220, 38,246,
+ 75, 36,146,247, 0,216, 77,154, 52,153,212,190,125,123,252,246,219,111, 80,169, 84,191,149, 35,178,138, 57, 31,188,166, 90, 3,
+128,189,189,253,130,163,215, 63, 10,199,246,174, 39,151, 72, 36,155,171,145, 56,159, 85,196, 25, 25, 25,122,175,197, 71,211, 52,
+164, 82,105,133,156,165, 61, 4, 91,182,237, 52,203,203, 73,197,207, 27,143, 66,171,213, 98,254,252,249,160,105,186,120,203,206,
+206,214,203, 78, 70,167,251,210,119, 64, 22,244,158, 18,108,160,230,200, 2, 93,145,112,114, 39,136,255, 99,239,186,195,162,184,
+214,247, 59,179,125,233,189, 41,160,162, 40, 8,130, 13,197,134,189, 68, 76,172, 49,118,163,137, 55,137, 37,150, 68,108,209,152,
+ 40, 36,214,152,104,212, 24,163, 49, 54,236, 98,139,221,196,174, 32, 82, 20, 20, 17,144,186,244,178,109,118,103,206,239, 15,138,
+128,108, 65,115,127, 55,247,102,223,231,217,103,119,118,102,223, 61,101,230,156,247,124,231, 59,223, 33, 0,197, 2,120, 53, 95,
+245, 59, 33, 9, 79, 40, 61,176,226,155, 77, 54,209,143, 94,224,248,197,104, 48,165,153,200,126,112,180,210,228,216,109, 28, 14,
+170,120,232, 18,208, 18,159, 46,249,214,118,233,167,147, 14,168, 21,101, 62,168, 59,141,120,193,240, 67,195,226,171,149, 43,177,
+125,211,122,124,187,126, 19, 74, 75,138, 33, 16, 56, 84, 53,244, 44, 88,150,213,159,119, 66, 6,135,205,153, 74,125,243,227, 17,
+ 4,181,117,197,225,179,119,208,163,189, 39,142,254,126, 15,189, 58, 54,199,241, 11,209,232,219,165, 37, 78, 95,141,195,167, 51,
+198, 81,227,206,237, 28,220,152, 58,218,184,241, 7,155,178,210, 92, 68,173,218,141,188,205,155,145, 54,115, 38,130,170,174,185,
+ 67, 81, 16, 54,109, 10, 8, 13,215, 81,125, 36, 38, 38, 66,165, 82, 53, 52, 50,135,175,175,175,193,122, 87, 40, 20,247,181, 90,
+ 45,201,205,205,165,114,115,115, 97,110,110, 78,197,199,199,177,126,126,254, 35,200,163, 67, 63, 1, 64,120,248,234, 17, 7,239,
+151, 66,126, 99, 19, 20, 55,191,135,176,121, 44,189,253,203, 25,204,135,203,183,221,175,245,140,214, 73,103, 78, 78,206,144,156,
+156, 28, 0, 64,139, 22, 45, 30, 37, 37, 37,181,169,158,106,174,154, 66, 20,106,181, 90,239,234,233, 68,173, 86, 11,149, 74,133,
+254,253,251,243,244,229,221,214,214,182,171,175,175, 47,162,163,163,177,105,211, 38,187, 62,125,250,224,201,147, 39,160, 40, 10,
+171, 87,175,166,218,182,109, 43,200,207,207,199,160, 65,131,112,228,200,145,110,165,165,165,134,202,211,210,220,220,124,231,201,
+147, 39, 37, 52, 77,163,172,172, 12, 28,199,161,123,247,238,160,105, 26,113,113,113, 88,178,100, 9,142, 28, 57,130, 99,199,142,
+ 73, 59,118,236,184, 83, 46,151,251,162,238,180,190,174, 58, 34, 74,165,146,136,197, 98,136,197, 98, 72, 36, 18, 72, 36, 18,136,
+ 68, 34,148, 43,129, 15, 55,164,169,120, 18, 7,206,175,125,143,150, 83,103,175,166,215, 46,123,255, 18,128,227,198,222,243, 64,
+165, 79,214,119,191,252,178,105, 66, 73, 9, 13, 0, 59, 40,138, 99, 8,249,214,152,231, 29, 0,202,149, 37,240,244,106,138,195,
+ 7,142, 97,212,216,225, 13,138, 44,129, 64, 8,161, 64, 0, 43, 59,115,131,156, 66,161,208,249,209,163, 71,246, 2,129, 0,132,
+ 16,176, 44, 11,134, 97,114,151, 46, 93,234, 56,116,232, 80,203, 51,103,206,208, 67,135, 14,229,108,109,109, 43,238,220,185,147,
+167,213,106,237,123,246,236,169,147,211, 12, 8, 80, 90,183,250, 78,196,211, 6, 68, 44,254, 68, 60,105,210, 36,222,212,169, 83,
+145,158,158,142,105,211,166, 41,207,159, 63,175,206,201,206, 62, 46,226,184, 31, 24, 32,214,216, 54,185, 30,182, 4, 4, 4,116,
+ 56,122,244,232,251, 97, 97, 97,247, 22, 44, 88,240, 85,237,147,107,214,172, 89,121,250,244,105,207, 17, 35, 70,252,250,224,193,
+131, 45,141,105,151,222,180,239, 48,113,190, 25,116,105,145,106,227, 40, 69, 81, 81,181,218,236,208,234,227,176,176,176,197,225,
+225,225,241, 20, 69, 69,213,254,190,250,186,170,193, 98, 84, 67,199, 85,191,181, 91,180,104,145,127, 68, 68,196,234,224,224,224,
+253, 55,110,220,120, 6,160,177, 66, 75,191,143, 86,117,134,106,103,178, 94,167,134,210,210, 82,148,150,150, 34, 35, 35, 3, 91,
+183,110,173,122,160, 5,224,243,249,224,243,249, 53,254, 12,186,112, 49,234,207,239, 1,124,223,161, 67, 7,193,195,155,145,103,
+ 62,223, 62,187, 95,167,254, 29,120,247, 47, 62, 28,141,202,253, 8,135, 76,158, 60,217, 1, 0,118,239,222,157, 15,224,204,127,
+ 72, 53, 71, 38, 39, 39,127,234,234,234, 90,227,163, 82,123,250, 80,171,213, 66, 34,145,160,218,151, 69,169, 84, 98,235,214,173,
+ 90, 66, 72,164, 30, 78, 36,197, 95, 66,114,252,229,202,223,113, 28, 56,246,229,239, 87,172, 88, 1, 66, 72, 77,103,255, 81,149,
+229,196,160,200,107,168,204, 73,189,247,122,223, 19,150, 53, 48, 61, 33,156, 61,122,210, 76, 87,142,226,227,196,165, 24, 8, 4,
+ 2,112,181,172,153, 2, 94,229,104, 57,254, 73, 22,220,156,253,240,246,184, 25, 46, 71,127,253, 97,182,150, 81,126,211,216,178,
+246, 9, 8,198,156, 79, 63,197, 79,219,183, 99,201,242,149, 53, 10, 64,203,178,208, 26, 76, 39, 77,247,239,238, 15,109,121, 22,
+120, 60, 30,250, 6,181, 4,143,199,195,128,224,214,224,241,120, 24,212,221, 7,124, 62, 31,131,123,180, 69,171, 86,173,192,231,
+243,105, 3,245,142,164,248,139, 72,142,191, 82, 75,244, 18, 16, 0, 76,118,246, 43,215,107,178,179, 65, 60,236, 27,123,111, 97,
+218,180,105,197, 25, 25, 25, 76,253,115,238,238,238,194,107,215,174,217,232,152,182,171,129, 84, 42,237,200,231,243,239, 23, 22,
+ 22,114,102,102,102, 52,199,177,156,159,159, 63,239,236,182,197, 71,171,175, 89,180,104,241,209,119, 59, 90,141,216, 19, 25, 69,
+132,205,122, 80,148, 64,172,253, 96,249, 54,161, 64, 40,237, 8, 40,140, 25, 60,208, 42,149, 10,143, 31, 63,134,161,244, 16, 66,
+244, 78,211, 20, 21, 21, 77,246,245,245,189,246,253,247,223,219, 81, 20,133, 63,254,248, 3, 60, 30,175,230,149,146,146, 2,154,
+166,241,249,231,159, 51,165,165,165,211, 13,165,141,207,231,127,122,248,240, 97,107,145, 72,132,178,178,178,154,231,134,199,227,
+225,209,163, 71, 88,187,118, 45, 38, 79,158,140,244,244,116,184,185,185, 97,254,252,249, 22, 17, 17, 17,159, 50, 12,179,210,136,
+ 42,138, 85,171,213,157,204,204,204, 32,145, 72, 80, 45,184, 0,224,247,120, 65,156, 66,161,104,103,111, 47,119,113,188, 26,117,
+162, 91,159,183, 3,237, 29, 93,131,179,179,179, 27,181,117,214, 83, 96,123, 42,203, 46, 29,114,244,168,211,245,163, 71,185, 91,
+ 39, 79,190, 16,151,149,109, 51,250, 30,210,208, 72, 75,121,129,142, 29, 59,226,254,253,251,232,216,177, 99,109,209, 4,145, 72,
+ 4,161, 80, 8,161, 80, 8, 7, 91,163, 92, 40, 8, 77,211,184,126,253, 58, 88,150,133, 90,173,134, 90,173, 70,219,182,109, 11,
+ 47, 95,190,108, 1, 0, 41, 41, 41,100,226,196,137,197,183,111,223, 70,251,246,250,247, 83, 87, 82,212,197, 21,171,215, 89,127,
+179,113, 39,172,237,156,113,245,234, 85,246,236,217,179,101, 20,144,148, 28, 31,191,254,109,224,116, 36,192, 52,166,204,156,157,
+157,175,241,120,188,102,181,191, 43, 40, 40,176, 29, 57,114, 36,138,138,138,222, 26, 57,114,100,143,170, 54, 33,243,208,161, 67,
+ 19, 1, 64, 36, 18,129,166,105, 22, 38,252, 87,193,144, 22,169, 45,148,234, 11,174,240,240,240,208,250,223,213, 22, 85, 13,125,
+174,253,219,136,136,136,213,181,184, 21,175,145,124,195, 62, 90, 81, 81, 81,164, 1, 5,105, 52, 12, 9,173,106, 68, 71, 71,107,
+220,220,220,126, 74,142,121,222,175,101,128, 23,164,230,226,129, 0,190, 23,139,197,243, 38, 77,154,132, 91,183,110, 33, 46, 46,
+238,103,188,225, 42, 28,127,127,255,115, 98,177,216, 83,199, 52, 73, 90, 92, 92,220, 32, 29, 29,195,242,147, 39, 79, 66,159, 51,
+252,165, 75,151,106,119, 74,181,157,225, 27,190, 49, 56, 2, 13,163, 65,133, 92,241,178, 19,175, 18, 90, 21, 21, 21, 24, 59,118,
+108, 29,139, 86, 94, 94,158,193,252, 81, 20,133,181,199,143,227,124,100, 36,222, 10, 12,196,145, 59,119, 16, 49,105, 60,124, 60,
+155,128,176, 20, 8, 5,164,239,251, 1, 5,165,229,216,123,241, 58, 10,203,228,152,208,179, 39,188,173, 28,244,243, 10,132, 3,
+130,186, 6, 11, 47,220, 72,128, 64,192, 7, 13, 14, 68, 35,135,155,111,111,240,104, 26,214,206,205, 33, 20, 8, 32, 16,240,145,
+146,145, 15, 95,255,206,162, 40,145,100,192,235, 8, 45,119,207,230, 96, 89, 22,147, 39, 79,198,254,253,251, 97,239,226, 9,107,
+119,127,124,189,126, 59,222,234,223,211, 96,254,171, 71,240,124, 62, 31, 60, 30,239,149,247,234,207,198, 88, 39, 9, 71,192,212,
+175, 35,142, 0,132,160,233,170, 85,104,186,106, 21,238, 84,253,103,219,138, 10, 40, 20, 10,160,139, 95,163, 68,150, 90,173, 70,
+ 70, 70, 6,147,147,147,227,220,192,249, 92,181, 90,109, 80,216,236,218,181, 43,118,202,148, 41,157,236,236,236,238,197, 62,120,
+160, 9, 8, 12, 20,156,217,186,248, 88,245,180, 33, 0, 4, 6, 6, 22, 46, 94,188,248,216,196, 49,161,195,183,132,189,199,126,
+188,242, 87,190, 88, 42,237, 20,186, 96, 87,236,190, 49, 99, 12,207,205,168, 84,169, 1, 1, 1,196,152,124,201,229,242, 28, 61,
+167,135, 1,248,178, 67,135, 14, 86,125,250,244,193,181,107,215, 48,106,212, 40, 21,195, 48,201, 0, 48,116,232,208,214,123,247,
+238, 21, 37, 36, 36,192,209,209, 81,144,150,150,182, 19, 6, 28,228, 69, 34, 81,239,206,157, 59,211, 42,149,234, 21,145, 21, 17,
+ 17,129,113,227,198,161,117,235,214,224, 56, 14,229,229,229,232,211,167,143, 96,211,166, 77,189,141, 20, 90,115,124,124,124,214,
+162,114,213, 97,237,182, 48,177,106, 10, 10, 5, 5, 5, 57, 49,183, 47,198,247,236, 63,178, 83,179, 86,254,174,113,177,247,245,
+ 18, 58, 57, 57, 45,162,105,250, 93,142,227,120,165,165,165, 25, 49,106,117,171,182,158,158,206,221,135, 15, 71,137, 64,192,251,
+238,226, 69, 58,183,172,204, 2,128, 81, 83,144, 74, 77, 5, 60,189, 42, 93,253, 70,141, 29,142,251,247,239, 99,244,123, 35, 32,
+ 20, 10,193,231, 11, 42,159, 77, 97,165, 69,203,198,193,202,168,123, 83,163,209,212,180,225,213,126, 94, 12,195,160,218, 53,203,
+204,204,172,230,156, 74,165, 2, 69, 81,250,238, 13,186, 79,175,238,184, 17,157,164,157,254,249,119, 42, 65,193,253, 8, 23,142,
+219,245, 2,200,125,131,230,220,251,224,202,101, 78, 82, 43,107,176, 26, 13,252,134,143,174,121, 78,110,239,216, 34, 5,199, 73,
+139,211, 82, 49, 43,242,228, 95,189,103,174, 9,255, 1, 24,210, 34,181,133,210,155,130,162,168,168,176,176,176,197, 0, 72, 88,
+ 88,216,226,234,227,240,240,112, 5,128,204,215, 20, 91,175, 88,185,248,127,133,200,170,158, 94,208,135, 62,125,250,204,178,180,
+180,220, 84,125,156,113, 43, 19, 25,183, 50,225,219,198,175,123,135,192, 78, 37,227,198,141,131,189,189, 61, 22, 44, 88, 64, 0,
+252,220,216,255, 79, 73,138,183, 0, 64, 92, 93, 93, 23, 84, 53,200,129,119,238,220,113,188,123,247, 46, 58,119,238,252,210,116,
+207, 48,232,209,163,135, 62,170,178, 42,167,246,185,127,157,149,140, 3,195, 48,144,203, 21, 80,171, 25,104, 53, 28,180, 90, 45,
+ 58,250, 89,226,215,237, 97,149,223,105,171,173,103,149, 86,179,166, 46,150,176,180, 16,104,104,154, 82,220,139,205,105,176,197,
+ 84,171,213,136, 77, 75,195,131,231,207, 1, 0,111,135,235,119,124,253,245,226, 53,180,109,219,214, 80,106, 91, 54,117,115, 65,
+214,249,216,202,198, 91,145,129,187,127, 30,132,165,165, 5, 0,192, 47,100, 2,132,194, 74,161, 85,161, 96,224,208,198, 29, 20,
+ 33, 58,195, 2,152,217,186,156,227, 11, 37,158,132,229, 64, 8, 7,194,177, 32,132, 3, 79, 32, 52,155,245,209,251,224, 56, 22,
+ 65, 65, 65,160,120, 60,176, 26, 21,198, 12, 27,128,162,146, 50,216,219, 24,215, 73, 8,133, 66,132,132,132, 72,117,157,127,242,
+228,137,162,182, 48,211, 95, 71, 26, 84, 84, 40,160, 82,169,192,168,181, 96, 52, 90,176, 45,132,248,106,233,120,104, 25, 45,228,
+239, 5,131,209,104,193,125, 58, 2,140, 90,131,116, 51,154, 14,240,117,208,208,160, 20, 49,137, 50, 43, 67, 66,171, 90, 28,232,
+ 66, 67, 62,129, 58,196,214,131, 41, 83,166,116, 12, 8, 12,188,255,110,255,192,117, 15,227,226,179, 30,198,197,191,114,157,103,
+235,192,212,143, 35,246,207, 23, 8,165, 29, 67, 23,232, 95,117, 88, 27,181,167, 17,223, 16,139,203,202,202, 2, 44, 44, 44,144,
+148,148, 4, 30,143, 7,138,162,158, 0, 8, 0, 0, 87, 87,215,167,124, 62,223,139,199,227, 97,243,230,205, 20,159,207,111, 23,
+ 28, 28,188, 88,169, 84, 30,212, 51,160,243,181,180,180,172, 99,205, 18, 10,133, 8, 11, 11,195,196,137, 19,107, 68,150, 80, 40,
+196,174, 93,187,208,169, 83, 39,168,213,106, 95, 35,211,123, 23, 64, 79, 35, 44,126, 84,149, 56, 55, 40, 70,181, 90,237,148,130,
+119,223,109,133,171, 87,209,221,203,171,109,199,142, 29,193, 48, 47, 13, 58, 94, 94, 94,238,101,101,101, 57, 10,133,226, 55, 84,
+134, 33,136,209, 43,138,148, 28,210, 82, 42,221, 79,239,223,191,143,160,160,160, 26, 11, 86,109,107,150, 80, 40,132, 84,100,209,
+ 40,161,197,113,149,237, 82, 89, 89, 25,125,245,234, 85, 7, 31, 31, 31, 10, 0,124,124,124,168,152,152, 24, 59, 51, 51,179,252,
+150, 45, 91, 26, 26, 0, 11, 1,160,247,192,145,252,243,103, 79,155,107,129,149, 57, 60,222, 74,190,193, 54,146,104, 88,142,211,
+233,116, 47,181,178,198,174, 41, 99, 1, 0, 95,244, 31, 92, 51,216, 58,251,229, 98, 8, 4, 2,244, 91,176,248,149,103,137,227,
+ 56, 30, 76,248,159, 18, 89, 13, 89,180,222,172,111,126,105,209, 10, 15, 15,143, 15, 15, 15,127,197, 58,214, 72, 24,182,104,213,
+ 54,221, 53, 22,213, 15,171, 46,172, 95,191, 30,237,218,181,211,219, 17,109,218,180, 9,123,246,236, 89, 15, 32,165,209, 38,199,
+126, 29,252,176,225,104,188, 87,107, 63, 10, 0, 86,126, 58,140,174,168,168,192,245,235,215, 97,109,109,141, 39, 79,140, 14,251,
+101,105,109,109,253, 37, 77,211, 99,120,245, 87, 0, 52, 44, 48, 89,142,227, 34, 75, 74, 74,116,134,119, 32, 4, 96, 52, 90, 84,
+200,149, 80,171,213,248,244,243, 31, 12, 38, 34, 28,160, 24,117, 25, 63,164, 87,176, 84,151, 69, 39,168, 93,111,124, 50,201,226,
+149,206,155, 71, 3, 52, 13,180, 15,170,180,184,196,220,137, 7,199, 1, 44, 7, 56, 56,217,226,231,125,235,244,138,124, 45,203,
+ 85,141,142, 89,148,171, 88,248,118, 13,197,139,196,171, 53, 22, 36,145,176,114,202, 88, 40, 16,128, 35, 84,101,212, 7, 93,173,
+174, 72,234, 89,148,157,226,189, 61,234, 33, 62, 12,109,135, 67, 23, 98, 49,186,127, 0, 46,223, 78, 64,159, 46,109, 17,159,252,
+ 28,126,222,205,176,121,103, 36, 8, 65,217,143, 27,190,206,121,217,161,105,211,140,177,104,221,186,117, 75, 81,223,138, 85,251,
+157, 24,238, 15, 65,200, 75,139,150, 66,169,194,130, 69, 70,133,222,169,172,163,158, 93,165,198, 92,172,207, 98,101,140, 16,171,
+111,217,130,129,240, 44, 45, 0,116, 2, 22,254, 39, 27, 78,150,101,113,234,212,169,154,250,104,168, 30,107,215,157, 17, 34, 7,
+105,105,105,136,143,143, 71,215,174, 93, 81, 82, 82, 2, 1, 77, 99,254,195,135,104, 59,105, 18,212, 66, 33, 56,142,131, 72, 36,
+194,140, 25, 51,140, 46,207, 70,182,206, 85,142,215,172, 33,242,117,193,193,193,173,146, 42, 42, 16,255,232, 17,250,175, 88, 1,
+ 0, 56,125,250,116,157,123, 98,222,188,121,162,132,132,132,105,247,238,221,155,150,149,149,181, 30,192,124,157,237, 44, 81,213,
+248,104,189, 59,126, 20, 90,249,180,192,158, 95,246,213,156,159,247,217, 28, 8, 4, 66, 8,132, 2,216, 88,219, 24,149, 27,141,
+ 70, 83, 35, 90,229,114, 57,125,250,244,233,166, 3, 6, 12, 16,206,153, 51,135, 2,128, 61,123,246,208,223,127,255,189,249,249,
+243,231,133, 77,154, 52,201, 54, 96, 33, 40,205, 44, 80,137, 1,192,195,195, 3, 63,108, 59, 65, 15, 29, 58, 20,115,230,204,129,
+ 70,163,193,150, 45,149,207,213,184,113,227,192, 48, 12, 14, 31, 62, 92,253, 28,235,181, 70,105, 25,230,149,251,134,162, 40, 8,
+ 4, 2, 8, 69, 66,128,227, 64, 81,148,249,154, 53,107, 86,198,199,199,119,246,241,241,129, 74,165,154,132,202,197, 31,166, 56,
+ 90,255,101, 98, 75,159, 22,105,200,215,170,202, 42,165, 11,178,218,126, 91,186,132, 90,109,159, 45,188,222, 2, 10,227,124,180,
+ 26, 2,143,199, 51,104,173,170, 94,170,171, 15,243,230,205,131,165,165,165,174, 14,136, 60,124,248, 48, 33, 59, 59,123, 59,128,
+ 31, 94,171,114, 46, 70,199,127, 57,119, 68, 25,170,230, 86,109,108,108,242,251,246,237, 91, 14,128, 57,120,176,238, 0, 89,165,
+ 82,233,236,192,173,173,173,191,220,177, 99,199,236,225,195,135,211,245, 67, 12,212,158,222,171,126,105, 52, 26, 28, 60,120,112,
+246,194,133, 11, 81, 82, 82, 50, 87, 95, 39, 46,175, 80, 64, 81,229, 8,253, 52,238,144,177,141,186,206, 83, 22, 54,174,104,218,
+ 34, 64,103,103, 66, 11, 43,125,136,156, 61, 94,118, 96,150,150, 18,176,122, 56, 41,138, 78,121,158,158,213,196,221,197, 14, 79,
+ 51,100,112,110,214, 14, 69,153, 47,203,129,207,231, 65, 80, 53,117,104, 99,101, 14, 89, 94, 30,104,154,167, 87, 24,127,189, 55,
+ 26,183,227,158,227,240,133, 24, 48,202, 10,108,216,125, 22,140,170, 28,140,178, 2,140,178,242,125,245,194, 15, 64, 81,200,209,
+168, 42, 90, 55,166,222,249,124, 62,186,116,233,162, 83,232,100,102,102, 26,105,209, 34, 53, 22, 45,133,178,145,117,100,220,200,
+ 73,175,197,170,250,252,235, 10,131,234,144, 15, 82,169,180,211,174, 93,186,195, 56, 52, 4, 23, 23,151, 51, 22, 22, 22,205,141,
+189,190, 17,193, 75, 87,219,216,216,124,233,227,227,227,187, 97,195, 6, 1,143,199, 67,191,126,253, 90,187,184,184,164, 1,128,
+159,159,159, 91,117, 27,243,241,199, 31,147, 91,183,110,197, 85,142, 49,116, 67, 36, 18, 61,178,182,182,238,212,167, 79, 31,148,
+148,148, 32, 35, 35, 3,230,230,230,104,187,110, 29, 30,126,252, 49, 2,183,110, 5,221,183, 47, 40,138,130, 72, 36,194,195,135,
+ 15, 33,149, 74, 31, 41,149, 58, 67,190,117, 1,240, 45,128,238,120, 57, 93, 72, 0, 92, 71,101,216,133,219, 13,180,119, 52, 0,
+176, 28,103,168,178,198, 47, 88,176, 0,197, 2, 1, 48,116, 40,132, 41, 41, 96, 24, 6, 93,187,118,173,177,178,119,237,218, 21,
+124, 62, 31, 1, 1, 1,112,115,115,195,230,205,155,199,235, 19, 90,202,114, 6,105, 41, 47, 16, 28, 28, 92, 99,185, 26, 58,116,
+104,141, 69, 75, 32, 16,212, 88,182, 40,214,176,112,165, 40,138,212, 30, 36,179, 44, 75,241,249,124,254,220,185,115,169, 81,163,
+ 70, 17,181, 90,205,137, 68, 34,250,240,225,195,212,229,203,151,249, 21, 21, 21,134,172, 13, 21,239,189,247,158,147,187,123, 83,
+100, 60,141,199,161, 67, 4,235,215,175,199,181,107,149, 81, 54,146,146, 42, 23,174, 86, 31,247,233,211, 7,205,155, 55, 7, 49,
+112,227,251,143, 24,131, 47, 6, 12,169,108, 79,154, 59, 66, 32, 20, 64, 36, 20, 98,193,163, 23, 53,117,109,181,107,191, 40, 34,
+ 34, 98,180,143,143, 79,229,212, 62,192, 55,197,209,250,239,130, 1, 67,143,172,158, 72, 82,215, 58,150, 1,160,170,142,101,181,
+ 4,149,140,162,168,187,132,144,206,245,174,173, 62,175,174,247, 94,125,254,193,107, 36,191,122,175,195, 87,196,151,190, 17,113,
+242,205,155, 55,189, 59,118,236,136,244,244,244, 87, 86,194, 85,119, 92,230,230,230,144, 74,165,184,113,227, 6, 0, 36,235, 34,
+187,124,249,242,247,168,140,186,140,170,105,131,224, 62,239,246,190, 17, 52,184, 51,246,134,239, 43,201,206,206, 14,192,203, 24,
+ 58,148,155,155,219, 68,129,136, 63,214,203,223, 35, 4, 28,247,237,197,147,215, 87,232,203,161, 87,107,191,114, 0,138,234, 85,
+135,175,185,250, 16, 52, 77,143, 25, 62,124, 56,157,144,144,128,177, 99,199, 98,207,158, 61, 58,175,157, 56,113, 34,246,239,223,
+143,225,195,135,211,139, 22, 45,210, 25,222,161,174,181, 68,253,151,221,148, 73, 79, 30,224,215,253, 59,116,250, 32, 57, 57, 85,
+250, 99,229,229,229,215,124,215,185,163,254,153, 17, 78,171, 62, 31,125,239, 78,112,183, 94,253,132, 25,185,197,224,180, 42, 40,
+203, 94,254, 94, 94,156, 11,162, 85, 66,104,102, 7, 23, 7,107,220,191,249,187,154, 81, 43,207,235,227,156, 61,220, 15, 31, 15,
+243, 5, 8,135, 17,243,127, 70,212, 15,179,106, 70,208, 61, 70,205,193,197,131,223, 25,237,227, 87, 31, 2,129, 0, 15, 31, 62,
+ 84,232,178,102,241,120, 60, 99, 98,114, 85, 89, 29, 53,144,203, 21,144, 43,148,127,101,219,225,232,236,236,252,163,173,173,173,
+ 68,135,144,114,116,116,116,252,209,222,222, 94, 98,236,212,161, 46,145, 85, 21, 87,235,222,148, 41, 83, 26, 37,182,196, 98,113,
+243,228,228,228,154, 96,165,250,222,213,106, 53,250,244,233, 99,108,240,210,147, 0,158,185,186,186, 94,111,219,182,173,245,211,
+167, 79,177,111,223, 62,161, 64, 32,240,168,110, 63,202,202,202,192,227,241,144,151,151,167, 1,240, 62, 12, 76,157,169, 84,170,
+171, 87,175, 94,109, 63,108,216, 48,222,163, 71,143,192,227,241, 42,211, 21, 28,140,192,173, 91, 17, 55,119, 46, 66,158, 63,135,
+146, 97, 32,145, 72,112,238,220, 57, 70, 46,151, 95,213,197, 39,149, 74,183,167,166,166,250, 73, 36, 18, 48, 12, 3,142,227, 64,
+211, 52,197,231,243,123,216,216,216,108, 2,208,185, 94,101, 57, 5,118,238,211,134,213,106,217,236,244,167, 50, 67, 5, 80, 80,
+ 80,128,147, 39, 79,162,107,215,174, 8, 9, 9, 65,102,102, 38, 82, 82, 82,240,214, 91,111,213, 92,243,224,193, 3, 68, 71, 71,
+163,101,203,150,134, 45,122,180, 6, 45,219, 52,135, 80, 40,172,180,230, 8,132, 85, 3, 31, 65,141, 37, 75, 40, 16, 66,192, 23,
+ 64, 34,149, 24,109,209,162, 40, 10, 52, 77,131,162, 40, 72,165,210,234, 65, 54,215,180,105,211,236,194,194, 66, 87, 0, 60,169,
+ 84, 10,150,101,245, 14, 90, 56, 66,188,133,249, 55,178,230, 47, 92,235, 20, 30,126, 1, 23, 46,228,129,166,105,184,186,186,130,
+166,105,164,166,166,130,166,105,120,122,122,130,166,105,100,102,102, 86,139,196, 34,232, 22,195, 53,207, 13, 69, 81, 53, 34, 75,
+ 40, 18,214, 88,182, 0,160,184,184, 88, 57,124,248,240,223, 84, 42,213, 84,188,222,174, 39, 38,252,141, 65, 81,212,221,255,196,
+111, 27,129,161, 85,194,234, 21,167,120,125, 55,227, 91,221,186,117,219, 58,110,220,184,126, 27, 55,110,132,133,133, 5,178,179,
+179,107, 58, 68,145, 72, 4,119,119,119, 20, 22, 22, 98,219,182,109,120,241,226,197, 37, 0, 51,140, 77, 81,118,118,246,173, 39,
+ 49,201, 5,125, 70,119,179,247,235,214,198, 38, 35,249, 69,215,236,236,236, 27, 85, 34,235,231,113,243,222,154,218,103,100, 16,
+132, 34, 1, 50,158,228,224,226,201,235,255, 47,149,201,227,241,120, 20, 69, 97,236,216,177, 70, 93,255,222,123,239,225,234,213,
+171,208, 55,205,200, 85, 91,180,228, 74, 84, 40,254,186,129,213, 39,179, 38,226,147, 89, 19,107,196,132, 49, 83, 47, 0,224,230,
+118, 64,143, 95,191, 93,233, 0, 0, 32, 0, 73, 68, 65, 84,208, 98, 54, 70, 29,216,246, 97,135,160, 96,207, 78,126,205,113,251,
+ 94, 12,246,110,125,105,100,216,249,253, 74,124,179,243, 18,220,157,109,193,168, 42,112,230,208, 79, 57,140, 74,190,241, 53,141,
+114,149,226,150,162, 64, 8,215,168,188, 87,139, 39,129, 64, 0,127,127,127,157, 22,173,194,194, 66,133, 33,107, 86, 77, 29,169,
+ 53, 40,175, 80, 64, 33,255,203,132, 86, 96,143, 30, 61,206, 71, 70, 70,218, 59, 57, 57, 33, 43, 43,171,190,208, 10,236,222,189,
+251,249,200,200, 72,123,103,103,103,100,100,100, 24, 29, 86,164, 1,145, 5,153, 76, 70, 21, 21, 21,113,182,182,182,141, 18, 91,
+ 52, 77, 67,165, 82, 33, 49, 49,209,216,191, 53,122, 53,151,181,181,245,174,253,251,247, 91,231,231,231,131,199,227, 33, 49, 49,
+177,206,170,195,234,215,207, 63,255, 44, 28, 49, 98,196,142,226,226, 98,189,203,218,180, 90,237,250,137, 19, 39, 78,203,204,204,
+180,117,114,114, 66,118,118, 54, 68, 34, 17, 8, 33,160,250,244, 65,207,103,207,192,176, 44,164, 82, 41,146,146,146,176,125,251,
+246,138,170, 80, 49, 13, 26,200, 40,138,242, 22, 10,133,152, 48, 97, 66,157, 19,187,119,239,198,219,157,120,157, 28,173,249,229,
+ 90, 72, 84,185,210, 33,103,120, 60, 30, 21,216,165,111,235, 46,189,134,250, 63,142,187,253, 84,150,251,194, 80,163,164, 81,171,
+213,240,241,241,193,221,187,119,113,225,194, 5,244,237,219, 23, 33, 33, 33,136,141,141,197,239,191,255,142,232,232,104, 80, 20,
+ 5,123,123,251,106,247, 11,189, 62, 24,106,185, 22,121, 89, 5,175, 88,175,234, 31, 11,133, 66,168, 20,198, 45,238,123,244,232,
+ 17,238,222,189, 91, 19, 90,134,199,227,105, 39, 77,154, 4, 66, 8, 73, 77, 77,133,165,165, 37,153, 50,101, 10,203,231,243,181,
+153,153,198,249, 7, 91, 88, 88,192,219,219,187,206,192,167,250,213,179,103, 79,220,187,119, 15, 52, 77,131,207,231,195,201,201,
+ 9,215,175, 95, 55,120,227, 87,139,170,106,145,197, 23, 10,234,136, 62,142,227,202, 98, 99, 99, 63, 4, 16, 91,101,201, 2, 76,
+113,180, 76,248,255,195, 41,188,186,177,180, 65,139,214, 51, 0,253,247,237,219, 55,254,216,177, 99,235, 55,109,218,228, 24, 26,
+ 26,138,162,162, 34,120,122,122,194,213,213, 21, 81, 81, 81, 56,125,250,116, 62,203,178,243, 1, 52,100,250,233, 15, 61, 49,107,
+ 50,159,102, 71,170,202,203, 63,238, 24,226,139, 75, 7,255, 8,119,113,113,153,193,227,241, 62,157,178,248,157,169,189,135,119,
+ 70, 82,116, 42,110,253,254, 16,185,233,249, 6, 57,235, 59,195,219,216,216, 76, 51, 51, 51, 19,161,129,165,196, 13,172, 58,172,
+225,100, 89,150, 85,171,213, 56,112,224,128, 81, 98,107,223,190,125, 80, 42,149, 96, 95,157, 95,173,225, 36, 28,161,248, 2, 49,
+220,220,125,192, 48, 21,224,184,215, 94, 80, 89,195, 89, 61, 2,125, 42, 18,193, 41, 63, 31,183,111,223, 54, 78,114, 15, 29,106,
+168,142,148,106,101,217,132,239, 86, 45,136,154, 25,246,173, 77,223,110,237,241,197,186,221, 96,152,157,160,121, 52,164, 98, 33,
+ 58, 6,117, 7, 15, 42,252, 24,241, 89,177,188,180,104, 2, 94,221,138,167, 14, 39,209, 55,195, 66, 0,150,227,112,225,218, 29,
+163,243, 94,107,154, 3,124, 62, 31, 79,158, 60, 81, 52,180,218,144,199,171,156,230,172, 30,169,235,227, 36, 28, 71, 9,132, 18,
+184,123,182,133, 90, 85,254,151,212,145,147,147,211,103, 71,143, 30,181,175, 14,149, 16, 27, 27, 11,138,162, 18, 95, 90, 28, 43,
+207, 43, 20, 10,196,197,197, 33, 54, 54, 22,168, 92,225,102,244,115, 84,109,201,146,201,100, 84,118,118, 54,204,204,204,232,216,
+216, 88, 85, 64, 64,192, 61, 3,207,119, 13,167, 82,169,124,174,203,127, 82,169, 84, 54,145, 72, 36,130,122, 29,158, 91,171, 86,
+173,146, 26,152, 66,124, 37,157, 37, 37, 37,183, 23, 46, 92,216,113,240,224,193,248,236,179,207, 10,109,109,109, 45,127,252,241,
+ 71, 62,143,199,163,102,206,156,201,230,229,229,149,255,244,211, 79,214,199,142, 29, 67,113,113,241, 13, 35,242, 94,166, 84, 42,
+ 63,236,214,173,219,238,179,103,207,154,121,123,123,163,180,180, 20,132, 16,236,218,181, 11, 51,103,206,132, 68, 34, 65, 82, 82,
+ 18,222,126,251,109,185, 92, 46,255, 16,175,250, 78, 86,115, 82, 20, 69, 17,142,227,176,108,217,178,154,224,164,213,193, 74, 45,
+165, 20,182,207,107, 97, 62,231,167, 18,243,241, 95,252, 52, 9, 0, 88,173,150,125, 28,119,251,233,174, 31,190,184, 44, 20, 10,
+175, 25,168,163, 37,115,230,204,249,113,232,208,161, 82, 11, 11, 11, 20, 22, 22,226,250,245,235,184,121,243, 38,110,221,186, 5,
+181, 90, 13,123,123,123,216,218,218, 34, 59, 59, 27,143, 30, 61, 82, 0, 88,162,143, 83,100, 38,128, 87,235,234,149,191,149, 22,
+ 44, 65,173,213,134,181,173, 91, 66,129,192,168,231,168, 87,175, 94,232,210,165, 75,181, 88, 97,211,210,210,178, 85, 42, 21, 85,
+ 75,244,103, 86, 11,114, 15, 15, 15,237,158, 61,123,136, 33, 78,142,227, 94, 17,211, 61,123,246,172, 25, 20,118,233,210, 5, 60,
+ 30, 15, 49, 49, 49,186, 92, 83,234,112,222,218,190, 25,103,191, 90, 2,145, 80,136,249,137, 25, 53,162,107,119,223, 14, 16,136,
+132,240, 29, 54,170,246,111,183,160,114,186, 16,245, 68,150,190,254,232,141,159,119, 19,231, 63, 30,217,120,141, 45,120,170,177,
+ 87,169, 84,158,249,224,131, 15, 34, 2, 3, 3, 63,216,176, 97, 3, 37, 20, 10,177, 98,197, 10,146,149,149,245, 75,213,136,161,
+232,117, 82, 69, 8,249,229,202,145, 27, 31, 77, 14, 27, 78,205,219, 56,165,199,189,139,113,143,218,117,243, 70,187,110,222,184,
+119, 41, 1, 63, 44,222,183,135,213,176,203,114,114,114,210, 13, 80,169,250,119,111, 83,223, 25,222,254,234,229,139,246,141, 93,
+117,200,113, 92,228,190,125,251,102,143, 28, 57,146,190,115,231,206, 43, 62, 89,213,219,238,112, 28,135,243,231,207,131, 97, 24,
+252,242,203, 47, 28,199,113,186,227,104,129, 28,255,110, 99,196,228, 95,126, 61, 46, 18, 9, 41,220,188,118, 24, 37, 69,250, 87,
+117, 9,133, 2,252,188,235, 8, 35, 20, 10, 30, 55,116,158, 97,152,140,139, 23, 47, 58, 15, 98, 89, 1, 77,211, 13, 9,168, 6,
+ 17, 25, 25,169,225, 56, 46,205,192,101, 55,114, 95,164, 15,251,250,179,247,247, 13,125,247, 3,231,110,221,122, 8, 28,156,156,
+ 65, 81, 20,242,114,243,144, 20,119, 71,115,230,240,142,220, 10,185,113, 91,240,188,191,246, 74,141, 79, 22, 0,132,206,220, 84,
+227,159, 5, 0,195,166, 44, 68,159,174,126,160,140, 49, 61,189, 20, 89,156, 86,171,133,185,185, 57,180, 90,109,131, 33, 30,172,
+173,173,165, 74,165, 82, 81, 21,136, 81,239,136,153, 0,127,121, 29,177, 44,235, 91, 84, 84,132,138,138, 10,220,188,121,147,172,
+ 90,181, 74, 38,147,201,106,156, 54, 53, 26,141,111, 97, 97, 33,202,203,203,113,227,198, 13, 18, 17, 17, 33, 43, 40, 40, 88,220,
+152,103, 72, 42,149,118,226,243,249,247,138,138,138, 56, 51, 51, 51, 90,163,209,104, 2, 2, 2,196, 82,169,212,232, 13,213,179,
+179,179, 7,235, 58,231,229,229,149,156,156,156,220,138,101,217,218,123, 32, 10,149, 74,165,119,183,110,221,140,105, 63,230,236,
+220,185, 19, 71,142, 28, 9, 42, 45, 45,157,152,150,150,182, 27, 64, 16,159,207, 71, 76, 76, 76,162, 82,169, 28, 55,114,228,200,
+ 93, 69, 69, 69,183, 81,185, 5,143, 49, 56,155,148,148, 52,193,215,215,119,231,151, 95,126,105, 17, 18, 18,194,119,115,115, 67,
+231,206,157,145,148,148,132, 83,167, 78,105,182,108,217, 82, 33,151,203,223, 7,112, 94,127,181,131,210,106,181, 16,137, 68, 53,
+ 47,177, 88, 12,161, 80,136, 50, 5,193,244,117, 41, 10, 45,164,138,245, 43, 62, 60, 69, 0, 42, 39, 35, 37, 63, 47, 39,227, 54,
+ 69, 81,215,178,179,179, 75,116,148,153, 72,169, 84,182, 39,132,240, 40,138,218,200, 48,204,148, 89,179,102,185,174, 94,189, 26,
+109,218,180, 65,126,126, 62,204,205,205,225,237,237, 13,153, 76,134, 59,119,238,176,114,185,124, 43,128,149,168,242, 31,209,133,
+226,252, 82, 52,117,241,168, 99,249, 36,132,128,176,128, 70,197,130,101, 8,212,148, 6, 2,129, 6, 66,161,208,152, 41, 21,194,
+113, 28,138, 92, 93,193,197,197,225,214,173, 91, 32,132,232,180,170,249,248,248, 24,101, 33,101, 89,246, 21,161,117,251,246,109,
+240,120, 60,244,232,209, 3,209,209,209, 53, 22, 45,163,252, 18, 9, 7,145, 88, 84,103,186,144,162, 40, 8, 69, 34, 8, 68,194,
+134, 86,227,152,172, 88, 38,252,109, 96,236, 60,118, 49,128, 25, 15, 30, 60,216,221,187,119,239, 40, 66,136, 0,149,243,145,127,
+188,201,159,231,228,228,220,191,113,234,254, 34,231,166,182, 17, 67, 38,246, 64,155,246,158, 96,181, 44,174,159,142,193, 47,171,
+143,237,207,204,200,156, 2, 35,246, 62,227, 56,238,114,247, 78,109,104,212,138,213,237,230,230,198,189,206,170,195,146,146,146,
+229,243,231,207,199,103,159,125,246, 58,171, 14, 27,196,195, 71,178, 25, 20, 72,211, 97, 67,122, 14, 2, 69, 19,181, 90,165,167,
+225, 67, 77,228, 82,161, 80,240,248,110,108,118, 64, 67,215,201,100,178, 65, 83,167, 78, 61,207,231,243,155, 55,166,204, 57,142,
+ 75,203,205,205,237,103,248, 74,237,117,149,162,212,251,228,254,109,115,207, 30,217, 57,136,227,216,150, 20, 0, 30, 95,248, 84,
+195, 48,231, 84,138,210, 13, 48,114, 83,233, 53, 51,130, 49,231,187,223,177,249,179, 97,152, 21,113, 16, 59,150, 77,199,162,117,
+251,240,237,103,115,176,106,211,111,248, 98,206, 4,140, 30, 63,149, 35, 20,253,167,177,249,224,241,120,103,183,109,219, 54,121,
+250,244,233, 53,139, 22, 8, 33,117, 26, 97,141, 70,163,224, 56, 14, 91,183,110,229, 0,156,213,199, 87,183,142, 40,162,207, 95,
+202,216, 58, 42, 45, 45,125, 63, 56, 56,120, 23, 0, 49, 33,228, 73, 81, 81,209,191,128,151, 91, 67,149,151,151,191,223,173, 91,
+183, 93,132, 16, 49, 69, 81,175,156, 55, 6, 85,161, 30, 58,217,218,218,222,171,178,100,137, 95,199, 33, 94, 95, 81,235,153, 86,
+ 52,102, 10,145, 3, 48,171, 86,196,247,213, 65, 65, 65,181, 55,149, 78, 44, 42, 42,234,244, 26,233, 58,175, 80, 40,252,150, 45,
+ 91, 54, 87, 34,145,244,145,203,229,173, 1,192,220,220, 60, 73,165, 82, 93, 86, 40, 20, 27, 96, 56, 54,149,154,227,184, 36,173,
+ 86,235,239,232,232, 88,185,162,182, 74,108, 1,192,137,123,236, 61,128,237, 92,105, 20,223,107,116,194, 78,159, 62,221,204,214,
+214,118, 32, 69, 81,163, 9, 33, 62,101,101,101,170,101,203,150,221,136,140,140, 44,105,222,188,249,144,161, 67,135, 82,118,118,
+118,184,123,247, 46, 41, 40, 40, 56, 12, 96, 49,140, 88,105,205,113, 92,218,154, 53,107,208,216,231, 93,223,121,134, 97,114, 78,
+159, 62,237, 48, 56, 47,143,207,113, 28,134, 13, 27, 86, 71,192,213,199,227,199,143,161, 82,169, 12, 6,115, 44, 46, 46, 70, 80,
+ 80, 80,157, 1,106,245, 43, 45, 45, 13,118,118,118,117,254,199,208, 24, 75, 85, 82,132,190,115, 23, 2, 85, 43, 74,171, 81,105,
+201, 34, 32,106,147,174, 50,225,239,139,127,247,230,155, 70,153, 22, 93, 93, 93,199, 74,204,197,159,120,182,118, 13,200, 74,201,
+ 75, 40, 43,145,239,201,206,206,222,166,163, 33, 55,138,179,145, 1, 75, 77,230,223,127, 19,231,203, 56, 90, 44, 8, 97, 65, 56,
+ 2, 66, 56,112, 28, 91,185,225, 53,225, 64, 88,150,162, 40,252,169, 86,232,141, 12, 94, 63,157,182, 14, 14, 14, 43, 9, 33,131,
+121, 60, 30, 93,187,161,174,253,185,202,146,117, 86, 38,147,125,209,128,229,245,191,174, 60, 35, 35, 35, 27, 20,255,198,174, 58,
+ 28, 51,102, 12,219,200,103,243,178,185,185,185,107, 67,231, 42, 42, 42,210,179,179,179, 7,254, 77,202,179,246,138,193,198,112,
+ 54,122,213,161, 33, 78, 79, 79, 79, 49,195, 48, 29, 0,120, 83, 20,101, 3,160,144, 97,152,115,249,249,249,185, 0, 58, 1, 88,
+ 86,245,155,175, 0,220,251, 15, 63,239, 82, 7, 7,135,157, 52, 77, 55, 53,230,199, 90,173, 86, 93, 88, 88, 56,185,222,128,224,
+229, 20, 60,192,147, 8,133,119, 64,211, 77, 26,122, 30,117,125, 6, 33,153, 21, 10, 69, 16,245,178,205,175,225,180,183,183,191,
+199,231,243,155, 26,145,182, 23, 5, 5, 5,157, 76,109,242,127, 53,231,127, 51,234, 59,193,235,140, 20,255,239, 16, 90, 38, 78,
+ 19,167,137,211,196,105,226, 52,113,154, 56, 77,156,255,235, 66,171,193, 99,211, 18, 88, 19, 76, 48,193, 4, 19, 76, 48,193,132,
+ 55,195,169,122, 98,235, 84,245, 7, 74,143, 42,109,140, 73,240,117,148,237, 5, 19,167,137,211,196,105,226, 52,113,154, 56, 77,
+156,255, 56, 78, 19,254, 66,152,204,170, 38, 78, 19,167,137,211,196,105,226, 52,113,154, 56,255,215,161,115,234,144, 54,149,141,
+ 9, 38,152, 96,130, 9, 38,152, 96,194,191, 7, 70, 11, 45,115,103, 31, 95, 7,207,128, 93,182, 77,219,197,218, 54,109, 23,235,
+224, 25,176,203,220,217,199,247, 31, 90,110, 82, 0,227,249,124,254,121, 23, 23,151, 82,232,216,122,231,127, 0, 86, 0, 70,163,
+ 50,190,207, 8, 0,102,127, 37,121, 8,192, 31, 11,124, 50, 9, 72,159, 4,164,143, 5, 62, 9,249, 31,244, 27, 92, 49,219, 53,
+248,218,153,241,103, 86,204,118, 13,110,240,252,124, 87,251, 91,191,143,249,110,245, 39,110,118,127,209, 95, 90, 58, 57, 57,109,
+119,118,118,126,238,228,228,148,230,228,228,180, 19,128,181,169,185, 51,193, 4, 19, 76,248,183,161,218, 71,171,250, 85,227,163,
+197, 7,128,168,168,168, 16, 0, 87, 0,244, 14, 13, 13,189, 90,255,215,182, 30,254,211, 91,182,104,249,217,215, 43, 22, 83, 46,
+ 78, 14,102, 90,150, 99, 82,159,103,180, 93,254,117,196,161, 44, 17,127,125, 81,122,220,142,215, 72, 20,197,227,241,198,138,197,
+226, 80, 0,213,130, 45, 81,165, 82, 69,177, 44,123, 0,198, 45,211,134,179,179,243, 53, 30,143,215,172, 49,127,204,178,108,122,
+110,110,110,143,215, 44,204, 49, 30, 30, 30, 59, 67, 66, 66,204,130,130,130, 32, 18,137,176,108,217,178,249,217,217,217, 27,140,
+ 37,176,181,245,178,100,196,146, 79,249, 34,209, 0,162, 81,251, 19, 16,128, 22,199,113, 90,213, 69,161, 74,181,190,168, 40,165,
+204, 72,170,197, 0,166, 84,149,213, 14, 0,107,222,228, 46,153,220, 30, 26, 13, 91,121, 79, 8,249, 96,143, 63,179,190,178,100,
+201, 18,126,104,104, 40,118,236,216,209, 99,251,246,237, 31,150,149,149, 93, 4,112, 2,192,211, 55,189, 43,157,129, 25,221,122,
+244,248,110,242,252,249, 60,197,181,107,248,110,231,206,141,168,140,183,180,185,177,247,146, 80,136,209, 14, 14,130, 80, 66,208,
+129, 2, 40, 10,136,145, 21,112,167, 25,134, 61, 0, 35, 98,177,233,193,120,212, 93,142,191,183,177, 4, 37, 79,201, 82,241, 48,
+223,158, 37, 79, 47, 47, 5, 48,164,254,121,173, 82, 50,153,240,220, 67, 21, 36, 58, 3,192,186, 55, 44, 86, 51, 71, 71,199,216,
+227,199,143, 55, 13, 10, 10,226, 3,192,189,123,247, 38,133,134,134,246,149,201,100,254, 0, 74,255, 67,141,144,132, 79,211,159,
+136, 4,130, 1, 44,203,182, 3, 0, 30,143,247, 80,173,209,156,215,114,220,102, 24, 25,147,205, 4, 19, 76,248,223,133, 33, 45,
+242, 55,135,206,200,240,213,153, 35,181,223,107,195,220,169, 77,219,174,253, 70, 61, 46, 41,147, 43,159, 63,207, 44,154,247,201,
+170,243, 31,206, 89,123,108,221, 79, 81,167,175,222, 78,188,229, 27, 52, 48,193,220,169, 77, 91, 29,212,186,230,112, 61,164, 82,
+233,253, 45, 91,182, 48, 73, 73, 73,164,184,184,152, 60,126,252,152, 28, 62,124,152,124,244,209, 71, 74,169, 84,122, 31,128,135,
+ 49,156,206,206,206,185,143, 47,253, 78, 94,196, 70,147,180,123,183,137, 70,163, 33, 12,195, 16,134, 97, 72,194,217, 40, 18,123,
+226, 8,137, 57,124,128,168,213,106,162, 86,171,137, 74,165, 34, 45, 90,180,200, 50, 50,157,245,225,230,231,231,167,142,138,138,
+ 34,135, 14, 29, 34,243,231,207, 39,129,129,129, 44,128,153,198,230,221,220,201,187,143,101,147, 0,217,244,176,205,204,169, 27,
+231, 72,252,179, 24, 18,255, 44,153, 68, 94, 72, 36, 83, 22,108, 98, 44,155, 4,202,204,157,188,251, 24,202,187,173,173,109, 87,
+138,162, 72, 53, 0,144,102,205,154,149,215,126,121,120,120,212,121,185,187,187,151, 55,111,222,252,169,189,189,125,135,134, 56,
+199,181, 3, 33, 9,123, 9, 73,216, 75,150,244, 2,137,143,143,191, 69, 8,185, 82,253, 82, 40, 20, 87,142, 30, 61,122,229,157,
+119,222,185, 2,224,109, 61,229,100, 84,121, 78, 2,210,203,142, 31, 39,100,195, 6, 66, 66, 66, 72, 34, 64, 38, 1,233,141,228,
+108,225,226, 34,136, 89,187,230, 67,245,241,227,191,144, 51,103, 78,145,211,167,163,200,177,163, 59,201,198, 13,159, 48,206,206,
+130, 56, 0,173, 26,193,201, 7,176, 10,192,122, 84, 90, 46,147,100, 50, 25,201,201,201, 33, 0,146,170,190, 91,239,232,232,184,
+ 14, 13, 91,223,250,215,182,100,205, 29,236,114,230,221, 33, 61, 72, 89, 73, 22,121,119, 72, 15, 50,119,176, 75, 29,203,214, 96,
+ 47, 47,203, 89,195,218,201,226,239,237, 97,103, 13,107, 39, 27,236,229,101,249,154,229, 73,161,114,159,208, 45,151, 46, 93,210,
+146, 90,208,104, 52,100,247,238,221,172,173,173,237, 47,141,224,108,237,232,232,152,102,103,103,151, 84,251, 75,199,128, 17,221,
+124,122, 78, 90,110,223,246,157,144, 70,164, 51, 72, 34, 20,190, 56,127,240, 71,182, 32,253, 33, 81, 43,114, 73,201,147,104,242,
+ 34,241, 22,217,189,109,189, 70,196,231,191, 0, 16,244, 38,247, 82, 35, 97,226, 52,113,154, 56,255,134,156,250,180,200,127, 51,
+248,245, 51, 88, 31, 98,177, 40,108,249,146,133, 84,113, 65,177, 66, 89, 90,166,214, 40,149, 74, 90, 72,148, 15, 19,158,229,209,
+124, 94,241,220, 57,179, 45,195, 22, 45, 9,171, 0, 38, 24,249,159, 30,129,129,129,119,142, 28, 57,226,100,103,103,135,146,146,
+ 18, 20, 20, 20,224,206,157, 59, 32,132, 96,228,200,145,226, 46,157, 59,119, 88,186,108,217,205, 23,153,153,193,208,221,241,190,
+ 20, 47,118, 14, 88,211,163,114, 47,218, 47,158, 23, 84,246, 58, 20,133,237, 99, 66,107,174, 89,249,162,114,183, 12,137, 68, 82,
+179, 33,241,107, 32,184, 95,191,126, 66, 0,152, 54,109, 90,105, 89, 89, 89,120,149,133,195,168,157, 86,205,157,188,251, 56,184,
+186, 69,253,184,117,141,180, 93, 75,111, 48, 26, 45,210,114,178,192, 23,216,160,105, 83, 33,166, 78, 24, 32,232,213,205,206, 97,
+213, 87,219, 79,229,112, 24, 33,207, 79, 62,167,139,203,198,198,102,247,129, 3, 7,112,240,224, 65, 0, 64, 82, 82, 18,188,189,
+189,205, 13,165, 33, 46, 46,206,235,237,183,223,222, 95, 80, 80,208,202,208,181,245, 3,227,139,197, 98,244,232,209, 3,109,219,
+182,197,241,227,199,123, 87, 89,182,222, 8,138,107,215, 96,241,224, 1,112,245,181, 6, 47, 45, 58,118,244,188,117,250,212, 30,
+135, 83,167, 19,177,110,221, 78, 60,125, 90,105,104,243,242,242,194,248,113, 99, 4, 15, 31,222,240, 27, 61,122,252,141, 63,254,
+120,218,163, 74, 40, 25,194,151, 63,253,244,211,226,230,205,155, 99,244,232,209, 99,252,252,252, 92,172,172,172,176,109,219, 54,
+184,186,186,122,169,213,234, 39,199,143, 31,119,203,201,201,193,236,217,179,145,155,155, 59, 95, 23, 81,239, 65,189,151,138,135,
+249,246,108,211,113, 50, 44,172, 92,241,211,190, 3,120,124,127,119, 79, 21,147,184, 84,200, 94,157,168, 32,226, 41,178,116,139,
+176,102,157, 66,236, 91,249,189, 13,207,142,209, 14, 74,246,143,103, 75, 7,180,136,224, 75,148,187, 87,172,203, 46,120,133,116,
+116, 36,207,191,244,145, 93,220,121, 20, 0, 43,184,106,129, 85, 99,173, 37,120,187, 87,175, 94, 53, 21,247,252,249,115,168, 84,
+ 42,248,250,250,210,106,181,186,143,145,229,218,122,224,192,129,127,158, 62,125,218,190,117,235,214,178,194,194,194,154, 19, 46,
+246, 54,131,174, 30,217, 56,123,213,119,191,249,252, 74,168, 98, 89,226,177,135, 6,184,130,186,119,237,120,225,204,145, 61, 22,
+ 84,121, 6, 68, 54,249, 0, 87,128,148,253, 63,131, 50,179,195,216,143,230,241,251,244,235,219,100,192,144, 81, 23, 30, 39, 63,
+237, 7,224,174,105, 92,111,130, 9,255,104,171, 22,249, 95,203, 83,141,208, 10, 13, 13,165, 26,202, 32, 71,184, 0,103, 39,123,
+233,198,181,187,238,242, 24,181,218,220,198, 90, 45,176,182,226, 40, 75,107, 30,163,214,148,123,122,121,138, 56,194, 5,232,224,
+175,191,196,147,146, 74,165, 71, 78,156, 56,225, 36, 16, 8,192,113, 28, 28, 29, 29,145,154,154,138,226,226, 98,148,149,149,225,
+105, 98, 34,154,123,184, 99, 69,216, 66,215,217, 11,195,142,200,229,242, 78,168, 59,141,248,202,178, 81, 86, 83,119,223,232,234,
+ 45, 88, 94, 25,242, 87,125,215,192, 57, 99,151,162,166,166,167,167,195,194,194, 2,254,254,254, 22,215,175, 95,255, 67,143,200,
+170,195,105,107,235,101,201,137, 69, 7,183,252,184, 76,202,104,226,144,144, 82,136, 54,205,123,194,217,222, 3, 89,133,106,220,
+186,115, 2,113,177,123,209,178,137, 7,102,126,212, 87, 18,177,230,208, 1,161,182,185, 71,113,113,106,105, 67,156,165,165,165,
+ 22, 45, 90,180,128,135, 71,229,190,103, 44,203, 34, 33, 33, 1, 44,203,214, 28,215,126,223,117,248, 18,180,165,105,152, 60,105,
+ 18, 10, 10, 10, 44, 26,226, 20,240,160,157,247,225,120,190, 84, 0,136,204,237,212,229,229,229, 53,219,112, 48, 12,131,152,152,
+ 24, 4, 7, 7,135, 68, 70, 70, 26, 82, 69, 70,149, 39, 3,124,251,221, 47,191,108,154, 80, 82, 66, 3,192, 14,138,226, 24, 66,
+190, 53,246, 94,114,114, 18, 28, 62,123,230, 87, 7, 30,253, 8,118,214,223,224,206,157, 52, 48, 76,101,122, 11, 10,242, 48,235,
+147, 82, 8, 5,150, 56,126,252, 55,123, 95,223, 30,135,115,114, 24,127,212,157, 70,108, 40,157,146, 51,103,206, 96,214,172, 89,
+ 72, 72, 72,112,171,222,163, 77, 42,149, 98,237,218,181, 60, 95, 95, 95, 55,115,115,115,156, 61,123, 22,185,185,185,148,190,116,
+ 94, 57,119,229,235,146,167,151,151,230, 80,103, 7,255,180,239, 0, 62, 24, 55, 22, 46, 36,229, 15,235,150,212,215, 3,135,117,
+255,130,240,220, 67,205, 45, 3,108,189,253,135, 65, 40,178,192,204,207, 87, 34, 41,238,164,173,188, 44,246, 19,138,205,112, 95,
+177, 46,114,206, 43,233, 60, 52,134,157,182,247,122,199,243, 30,119, 61, 31,196,124,120, 59, 59,122,123,236, 75,161,229,197,167,
+104,214, 26,168,220,214,228,201,147, 39,120,250,244, 41,248,124, 62, 20, 10, 5,180, 90,109,131,233,116,115,115,155,161,213,106,
+191,168,170,231, 93, 18,137,228,253, 61,123,246,216,215, 22,218,142, 1, 35,186,217, 91,154,247,203,205, 43, 40,186,113, 55,254,
+241,188, 25,163,123, 95,187, 21,151,193, 8,222, 73, 47,137, 61, 94,162,163, 60, 37, 82,145,232,240,217,163,191, 89,104,158, 93,
+130,185,111,111, 8, 44,188,193,106, 50, 33, 47,170, 64,217,211,108,168,126,252, 1,237, 63,153,139,147,199, 14, 89,248,181,235,
+ 20,169,210,104,188, 1,168, 95,227,217,108, 12, 76,156, 38, 78, 19,231,223,147, 83,167, 22, 33,132,116, 4,224, 92,117, 88, 80,
+165, 11, 28, 0,228,163,114, 71, 1,231,170,182, 67, 84,235,103,245,143,107, 95, 91,255,184,246,231,130,170,207, 78, 85,239,119,
+ 41,138, 42, 52,144,116, 87, 84,110, 77,120,170,234, 29,168,154, 74, 52,232,120, 76, 81,116, 41,203,114, 98,161,163,147,114,218,
+187,253,218,253,126,225, 94,140,153,131, 21,127, 80,239, 14, 33,119, 30, 62,187, 73,209,148,134,162,104,163,252, 62,120, 60,222,
+216,141, 27, 55,182,179,178,178, 2,199,113,176,182,182,134, 76, 38,131, 90,173, 70, 73, 73, 9, 84,101,165, 96,202, 74,241, 32,
+227, 57,186,135,244,198,168,193, 3,125,127, 59,118, 98, 44,203,178,251,245,241,186, 5,116,168,177,100,173,108,102,255,210, 52,
+145, 81, 92, 35,186,190,233,224, 13,161,133, 5, 6,204, 11,123,147,123, 32,250,212,169, 83,103, 70,142, 28, 57,100,193,130, 5,
+116,118,118,246,217,212,212,212,238, 0, 18, 12,138, 10,177,228,211,143, 63, 13,181,181,181, 32,136, 60,127, 2,189, 58,140,131,
+153,136,135,130, 82, 6, 20, 5, 36,198, 31, 1, 69,217, 33, 54, 41, 27, 61,219, 91, 97,224, 32, 95,139, 99,135, 18, 23,224,165,
+127,208, 43, 85, 83, 84, 84,132,188,188, 60,104, 52, 26,104, 52, 26,140, 30, 51, 6,191,238,222,141,138,138, 10, 40, 20, 10,168,
+213,106,176, 44, 11,154,166,113, 62, 42, 18, 25,207, 18,209, 45, 56, 24,208,177,245,210,238, 24, 8, 0,220,122,252,248, 49, 18,
+ 19, 19,241,226,197, 11, 72, 36, 18,184,184,184, 96,229,202,149, 80,169, 42,247, 19, 27, 51,102, 76, 8,128,135,111,250, 64, 61,
+ 5,182,167,178,236,210, 33, 71,143, 58, 93, 63,122,148,187,117,242,228, 11,113, 89,217, 54, 99,126, 43, 20, 98,244,154,111, 63,
+106, 99,110,110,142, 23,233, 27,225,227, 35,196,252,185,246, 8,255, 38, 31, 0, 48,123, 86, 83,116,238,228,128,210,226, 67,112,
+112, 90,140, 77,155,230,180,156, 50,101,253, 36,185,156,221,101,128,122,233,137, 19, 39, 70,121,123,123, 55,137,142,142,166, 68,
+ 34, 17,164, 82, 41,164, 82, 41, 36, 18, 9,242,242,242,144,154,154, 74,214,172, 89,147, 9, 96,169, 62,162, 21,155,178,111, 2,
+ 24, 50,119, 48,206, 60,190,191,187,103, 19,222,179, 7,163,102,246,120, 30,123, 43,186,236,247,243,215,191,210, 42, 37, 25,197,
+ 47, 46, 44,108,209, 57,218,225,147,207,190,196, 15,107,150,227,241,237,107,133,206, 30,165,155,165,148,170,193,116,134,132,172,
+224,187, 58,219,105,103, 76, 25,101,115,210,249,198,140,211,124, 74,150,147,127,127, 45, 82,163, 21,226, 86, 29, 38,182,246,162,
+213,151, 46, 93,146,246,234,213, 11, 74,165,178,198, 50,185,103,207, 30, 78,171,213, 94,110,240,222,100,152, 47, 50, 51, 51, 93,
+ 21, 10, 5, 6, 15, 30, 60,123,237,218,181,230,213,251,201,177, 44, 91,199,146,245,245,134, 95,207,125,250,197,230,203,231,246,
+127,227,246,117,216,251,189, 39,204, 92,117, 25, 58,246,145,228,211,244, 39, 39,143,238,116,145,216,106, 32,181, 27, 8,101,174,
+ 2,143,183,127, 0,121,169, 18,157,191,254, 18,128, 8,106, 13,141,109,195, 70, 67, 96,239,134,229,211,223,119, 91,178,237,167,
+143, 56,142,219,104, 26,215,155, 96,130, 9,245,224, 76, 81, 84, 20, 0,132,133,133, 45, 14, 15, 15,143,167, 40, 42,138, 16, 18,
+ 90,101, 64,137, 34,132,132, 86, 95, 83, 37,206, 94, 57,174,190,182,254,113,253,207,139, 22, 45,242,139,136,136, 88, 29, 28, 28,
+188,255,198,141, 27,207, 0, 24, 18, 90, 67,171,132,213, 43, 91,239,208,213, 10,178,246,123, 29,139, 22,199, 93,123,242,236,185,
+124, 96,255, 46, 77,163,174, 62,188, 59,117,234,208,126, 99,135,245, 26,148,154, 94,144,216,210,211,197, 33, 62,254,161, 21,199,
+113,215,140, 41, 37,177, 88, 28,218,183,111, 95,126, 81, 81, 17,204,204,204, 32,147,201,144,153,153, 9,134, 97,160, 44, 41,134,
+170,164, 24,202,226, 34, 48, 37, 69,120,122,239, 14, 2, 90,122,137,171,156,229,245,162,218,234, 82,223, 82, 85,219,178, 37,178,
+180,132,216,210, 18, 84,227,167, 13,223,177,177,177,185, 85,221,169, 50, 12,243,201,194,133, 11,243, 57,142,195,170, 85,171,172,
+ 44, 44, 44, 34, 1,136, 13,145, 88, 58,242, 66,131,219,251,211,143, 82, 99,209, 35,112, 50, 90,183,120, 11,169,185, 10,228,151,
+ 49,200, 43,102,208,185,215,247,104, 22,248, 37,220,219,135, 35, 49,173, 16,110, 77,188,105,240,197,122, 55,127,206,200,200,168,
+115,188,127,223, 62,200,229,114,180,108,217, 18,227,198,141,195,194,133, 11, 49,110,220, 56,184,185,185, 97,194,187,111, 99,249,
+242,229,200,201,201, 49,148, 84, 85,235,214,173, 85,158,158,158, 42, 79, 79, 79, 21,195, 48, 40, 47, 47, 71,113,113,113,253,242,
+158,211,216,130,116,114,114, 90,228,226,226, 18,235,228,228, 20, 47, 22,139, 79,199, 80,212, 35,165,167,167,115,247,225,195,169,
+182,239,190,203, 75,147, 74,169,171,128,133, 49, 92, 14,118,130,161,125,250, 14, 17, 21, 23,237,172, 49, 82,189, 63,213, 17,127,
+ 94,245,195,245, 63, 58, 97,214, 39, 45, 65,209, 18, 80,180, 8,242,138, 75,232, 18, 20, 44,180,177,161, 12,221, 75,227, 1,196,
+116,239,222,221,109,230,204,153,148, 88, 44,198,236,217,179,153,233,211,167, 39,143, 27, 55, 46,249,226,197,139,172,167,167, 39,
+220,221,221, 41,119,119,119, 87, 0, 49, 85,191,209, 11,171,150,212,215, 42, 38,241, 15, 27,111,243,103, 44, 28,186,149,107,196,
+163, 87,172,203, 46,248,122,203,179,117,169,143,229, 94,143,111, 95, 43, 72,142, 59,201,165,222,189,146,159,149, 92,230,245,245,
+150,103,235, 22,111,206,106,240,161,190,122, 21,220,145,168,171,140,188, 66,206, 31, 62,172,143,124,198,180,177,173,237, 44,252,
+246,160,201,192,192,102, 30, 77, 39, 44, 95,189,137,153,254,209,167,204,142,159,119,146,178,178, 50,148,150,150, 98,211,166, 77,
+218,147, 39, 79,102,178, 44,251,169,174, 49, 16, 0,104, 52, 26,204,152, 49,195,220,202,202, 10, 25, 25, 25, 53, 22, 81, 0,200,
+150, 21, 60,188,126, 55,238,209,188,127,141, 9,169, 80,169, 84,231,174,220, 75,108,235,237,217,148,162,136,206,133, 40, 34,129,
+ 96, 64,167, 46, 93,120,132, 20,131,226,123,224,233,238, 53, 40,205, 41, 68,105, 94, 33,120, 2,115,104, 33,134,134, 19,193, 38,
+ 32, 8, 73,119,163,209,196,209,153, 47, 22, 8, 6,153,250, 19, 19, 76,248,103, 66,159, 22,169, 45,150, 34, 34, 34, 86,235, 59,
+ 95,235, 93, 93,239,184, 70, 72,213, 23, 97,181, 63, 3, 64, 68, 68,196,106, 66, 72,232,141, 27, 55,246, 1, 80, 24,153,133, 15,
+107,189, 27, 31, 71,139,167, 84,135, 47, 88,184, 20,182,214, 82,235,160, 14,222, 46,199,207, 94,189,119,237,198,189,196,102,238,
+ 14,142, 68,163,182,253,118,253, 15, 77, 41,185, 34,194,200, 68,248, 58, 56, 56,128, 97, 24, 60,121,242, 4, 47, 94,188, 0,195,
+ 48,208, 86, 84, 64, 85, 92, 12,101, 81, 17,216,138, 50, 8, 89, 22, 10, 89, 30,236,205, 36,192,203, 21,137, 6, 44,111, 84,131,
+ 66,171,250, 93, 98,101, 5,177,165, 21,104,129,192,224, 78,241,181,208, 49, 40, 40,232, 96, 92, 92, 92,151,254,253,251,127,133,
+202, 37,242,105,153,153,153,253,150, 45, 91,166,114,118,118,198,140, 25, 51,218, 0,152,108, 80,100,138,212,190,158, 46,109,208,
+218,107, 50,154,185,247, 69,113,133, 6,178, 82, 13,242,138, 25,108,251, 62, 24,135,119, 4,225,207,195, 61, 17,119,110, 0,138,
+ 53, 46,176,112,123, 7,132, 85,251,233,227, 60,127,254, 60, 86,174, 92,137,175,190,250, 10,171, 86,173,194, 87, 95,125,133,204,
+204, 76,248,251,251, 35, 61, 61, 29,103,206,156, 65,118,118, 54, 28, 28, 28,112,231,206, 29,108,216,176, 1,127,254,249,167,193,
+ 76, 87, 11, 87, 35,174,105,212, 92,186, 86,171,157,146, 61,124,120,187, 92, 59,187,182, 29, 58,116, 24, 50,123,246,108,175,238,
+221,187,215,156,247,242,242,242,144, 74,165, 57,168, 92, 65,217, 94, 31, 23, 7,116,112,116,244,135, 90,245,168,170,142, 5,160,
+ 40, 9,250, 14, 72, 68,247,158,247,192,104,132,160, 41, 49,104, 90, 2,173,182, 0,182,182,110, 32,132,242, 55,144,196,101, 50,
+153,204,251,194,133, 11,116,106,106, 42, 36, 18, 9, 0, 60, 95,177, 98,197, 15,235,214,173, 75,176,183,183,103,163,162,162,112,
+236,216, 49,132,134,134,242,166, 79,159,238,237,238,238,190,213, 80,190, 87,108,202,190,185,119,253,153,247, 4, 26,219,246, 18,
+105,179,230,168,176,120,231,227, 16, 7,115, 0, 56,155,146, 82,230,228, 81, 26, 81, 81, 22,155,110,211,180,252,155,179, 41,134,
+ 86,156,174,224,238, 39, 63,186,181,247,232,217,146,188,220, 34, 65,135,118,126,138,240,149,159, 9,155, 53,111,245,237,242,133,
+255,114,201, 44,149, 20, 15,152,125,230,209,145,179,119,202, 39, 78,253, 64, 59,237,195,153,202, 51,103,207, 31,229, 56,174, 29,
+116,172, 56,228, 56, 14,217,217,217,136,143,143, 71, 74, 74, 10,100, 50, 25,242,243,243, 81, 86, 86, 86, 51,221,104, 86, 86,122,
+234,135, 95, 78, 62, 48,151, 74,205,186,180,243,246,184, 29,157,144,103, 46,149,154,121, 55,247,104, 13,172,104,176, 29, 97, 89,
+182,157,196, 76, 10,128, 66,113,220, 53,148, 23,149,163,188,184, 28,101,133,229, 80, 49, 60, 40, 85, 52, 20,106, 26,158, 33, 3,
+ 81, 94,161, 68,121, 65, 9, 56,150, 13, 52,117, 55, 38,152, 96,130,158,190, 62, 42, 44, 44,108,177,145,215, 26, 61,189, 89, 95,
+120,133,133,133, 45,166, 40, 42,106,209,162, 69,126,208,189,160,170, 54,182, 55,240, 2, 96, 68,120,135,130,130,228,114, 75,202,
+119,228,220,207,191, 56,179,239,231,239,157, 84, 42,121,186,189,173, 5,107, 97, 38,114,152, 54, 99, 21,202,202,139, 70, 84, 24,
+ 31,142, 0, 69, 69, 69,120,246,236, 25,164, 82, 41,132, 2, 1, 88,133, 2,172,162, 2,138,162, 2,208,140, 10, 66,150,133,157,
+153, 20,158,110, 46,104,230,236, 98, 20,231,147, 75,191,215, 56,190,215,158, 46, 92, 19,228, 11,145,185, 5, 68,150, 22,248, 56,
+234, 10, 0, 64, 40, 20, 2,203,190, 50,202,104,210,164, 73,147, 19,123,247,238, 21,202,100, 50,196,196,196, 60, 0, 80, 2,192,
+ 18, 0,151,152,152,120, 33, 46, 46, 46,212,219,219, 27, 0, 90, 26, 34, 43,205,167, 89,141,150, 32, 35,231, 57, 82, 95, 68,195,
+206,186, 5, 4,102,173,145, 87,204, 64, 44,109, 1,141,234,229,236,163,178, 52, 13, 10,134,103, 84,222,213,106, 53,180, 90, 45,
+180, 90, 45,212,106, 53, 62,252,240, 67, 92,191,113, 3,251,143, 93,196,179,167, 73,104,211,220, 5,147, 38, 77, 68, 80, 80, 16,
+110,220,184,161,151,107,114,123,104,154, 88,128,191,126, 8, 13,145,133,189,170,235,194,115,183, 13,137, 45,138,162, 8,116, 76,
+ 69,214,195,186,224,224,224, 86, 73, 21, 21,136,127,244, 8,253, 87,172, 0, 0,156, 62,125,186, 78, 94,230,205,155, 39, 74, 72,
+ 72,152,118,239,222,189,105, 89, 89, 89,235, 1, 52,236,108, 78,128, 83,167,110,226, 95,255, 74,128, 76, 38, 3, 0, 28,216,247,
+ 82,151,166, 62, 99, 48,120,104,229,140,150,141,141, 13,214,175,247, 55,170, 60, 89,150,197,246,237,219,107,166, 11, 1,128,207,
+231,119,159, 55,111,222,200,134,174,111,213,170,149,208, 16,231,220,209, 77, 36,127, 62, 32,159, 88,183,106,230,103,229, 16,128,
+ 2, 77,180,127,116,102,246,172,185,163,155,108,220,112, 40, 83, 41,165, 84,187, 40, 54,195,157, 47, 81,238, 54, 38,141, 41,103,
+191, 87, 23,120, 78,217,157, 35, 43, 93, 50,243,131,241,246, 86, 54, 78, 21, 59,126, 8,183,165,121, 52, 57,113,143, 41,246,243,
+178,183,121,167,235,119,229,255,154,187, 44, 90,173,205,152,137,140, 19, 73,208, 19,226,130,101, 89,100,101,101, 65, 38,147, 33,
+ 61, 61, 29,249,249,149,211,175,249,249,249,224, 56,238, 77, 26, 68, 40,210,211,145,118,116, 7,154, 77,156,136,206, 95,173, 4,
+203,241,161,144,179, 88,223,173, 31,138, 74, 20, 80,113, 20,220, 58,118,195, 7,167,255, 0, 77, 88, 96,219,102, 83, 79, 98,130,
+ 9,255, 80, 24, 19,222,161, 90, 16,133,135,135,135,254,213,255, 95, 91,108,133,135,135,199,135,135,135, 55,230,191,234, 79, 25,
+214, 28, 87,251,104, 93,169,229,128,246, 74,167, 89,150,159,152,146,144,192,207,170, 80, 84,152, 57, 59, 57,170,204, 36, 98,174,
+164,180,140, 23,253,240, 1, 83,145,243,244,113, 35,242,145, 24, 23, 23,231,159,149,149,133,244,180, 52,104, 21, 21,160, 85,106,
+ 16,165, 28,253,123,116,131, 4,128,132,166, 32,228, 24,240,121, 34,148,149,151, 2, 64,162,193,206, 81,163,121,197,178, 69, 81,
+ 20, 68,150,150, 16,153,155, 67,100, 97, 89,199,194,101,140,197, 70, 44, 22,239,141,140,140,116,109,210,164, 9, 86,174, 92,137,
+166, 77,155,250,184,185,185,201,173,173,173,165,206,206,206,104,219,182, 45,186,117,235,134, 51,103,206, 0, 70,196,148,210,104,
+ 37,177,143,159,163,123,126,225, 13,252,113,229, 71,168, 21, 42,116, 8,249, 17, 12,191, 25, 28,253,190, 4,247,100, 15,228, 57,
+199, 43,173, 7, 46,195,240, 34,253, 57, 40,158, 40,222, 88,203, 83,245,231, 7, 15, 30, 96,223,241,171,112,245,244, 69,122,242,
+ 35, 60,186,124, 1,215, 29,237,225,233,219,182,102, 26, 72,103, 26, 89,240,191,222, 92, 25, 38,106,233, 39,227,197,133,133,133,
+ 98, 59, 59, 59, 85,117,217,185,186,186,190,137,216, 26,191,127, 26, 81,117, 0, 0, 32, 0, 73, 68, 65, 84, 96,193, 2, 20, 11,
+ 4,192,208,161, 16,166,164,128, 97, 24,116,237,218, 21,157, 59,119, 6, 0,116,237,218, 21,124, 62, 31, 1, 1, 1,112,115,115,
+195,230,205,155,199,235, 18, 90, 52,133, 24,173,182,192,199,203,203,171, 70,104,237,254, 85,134,232,123, 3, 64, 65,132, 77, 63,
+ 60,169,185,214,195,195, 3, 57,217, 41,160, 40, 18,103, 32,141, 95,185,184,184, 44,115,117,117,245, 90,183,110, 29, 79, 34,145,
+224,163,143, 62,106, 81, 94, 94,222,172,202,148,140, 69,139, 22, 1, 0,150, 47, 95,142, 21, 43, 86, 64,165, 82,201,117,145,237,
+ 94,223,206, 45,175,144,155, 70,202,205, 70,244,113,104,214,174,239,160,254,104,225,221, 23,125, 7,165, 3,192,106, 59,254,243,
+119,191, 93, 98,115,212,198,146,218,249,251,217,243,203,123,132,244, 93,178,176,252,242,215,223,108, 47, 54,232,243, 88,146,182,
+171,236,177,104,236,134,239,183,254,186,225,139, 69,115, 36,233, 50,117, 81,102, 17, 41,183, 16,243, 45, 90, 58, 83, 22,179, 62,
+255,234, 89, 86, 86,202,124,100,156, 53,184,210,146,227, 56,164,164,164,212,248,244, 41,149, 74, 84, 84, 84, 32, 35, 35,163,230,
+158, 81,152, 91, 13,158, 57,117, 88, 96,133, 66, 33,191,253, 48, 57,125,233,236, 9,193, 21, 10,133, 60, 57, 53, 61, 9,216,212,
+160, 26,163,105,250,161,188, 76,222, 95, 94,172,132, 44,230, 49,154,246,243,132, 70, 75, 65,173,101, 33, 43, 40,131, 74, 11,176,
+180, 0,126,239, 78, 2, 75,241,145,159,149, 9,154,199,123,128,186, 78,251, 38,152, 96,194, 63, 7,122,181, 72,181, 69, 43, 56,
+ 56,120,127,109,171, 83,245,103, 0, 42,232,119,229,145,213, 22, 83,213,211,137,186,254,167, 30,175,177,120,197, 71,203, 96,120,
+135,234,255,116,183, 46,117, 91,179,124, 66, 83, 78,171,109,147,151,159,171,229,243,197, 2,119,107, 69,118, 97,186,241,255,174,
+ 82,169,162, 46, 92,184, 48,124,192,128, 1,226,228,135, 15,160, 46, 41,129,186,164, 24, 2, 78, 11, 59,105, 39,208,140, 10,148,
+ 90,141, 38, 62, 28,148,101, 82, 92,189, 30,167, 81,169, 84, 81,198, 10, 45,154,199,171,235,151,101, 97, 1,177,165, 21,196, 22,
+ 22,245,167, 22, 13,137, 2,179,129, 3, 7,246,235,218,181, 43, 8, 33,216,190,125, 59, 24,134, 17, 49, 12, 3,181, 90, 13,134,
+ 97, 80, 90, 90,138, 95,127,253, 21, 91,182,108,185, 14,224, 23,131,157,153, 86,125,225,220,249, 75, 65,239, 79, 8, 21,156,142,
+ 90, 15,173,154,133,130,106,138,138, 10, 13,202,213,102, 96,237, 39, 2,185,167,192,227, 75, 16, 28,208, 2,199, 15, 29, 97,160,
+ 85, 93, 52, 82,133,215,177, 10,101,164, 63,199,139,167, 73,176, 40,205,129,163,149, 25,228, 41, 73,232, 48,105,242,107, 89, 39,
+220,221,221,193,113, 28,250,244,233, 83,227, 92,253,186, 98,171,160,160, 0, 39, 79,158, 68,215,174, 93, 17, 18, 18,130,204,204,
+ 76,164,164,164,224,173,183,222,170,185,230,193,131, 7,136,142,142, 70,203,150,250,141,132,249,133,154,211, 47, 50, 98,198,188,
+243,206, 59,194, 91,183,110,129, 16, 2,111,111, 43, 88, 89,154,131,162,197,240,245,117, 2, 80, 57, 6,232,221,187, 55, 74, 75,
+ 83,180, 69, 69,228,180,129,236,238, 5,112, 76,173, 86, 63,233,213,171,151,219,211,167, 79, 49,119,238, 92,254,129, 3, 7,170,
+ 77,201, 8, 11,171,187,152, 66,161,208, 61,117,223,166,157,207,103, 45,180,182, 33, 18,105,179,230, 86, 14, 1,104,225,221, 23,
+ 0, 48, 32,244,125,180,104,229,129,210,252,216,230, 74,197,243, 17, 66,126,145,109,236,166,204, 4,233, 80,255,169,202,188, 43,
+201,168,156, 58, 53, 88,237,138,228, 3,185,233,130,137, 7,143,157, 56, 51,227,173,208,183, 5, 26, 86,171,245,247, 20,216, 68,
+ 30, 61,149,151,153,150,254, 29,210,207,198,189,180,255,233,181,226,177,165,165,165, 48, 55, 55, 71, 92, 92,156,106,232,208,161,
+ 98,154,166,241,228,201,147, 26,161,229,228, 96,215,182,123,103,127,159,175, 55,252,122,206, 92, 44, 22, 15,234,221,201, 55, 33,
+ 57,237, 5, 33,212,115,157,214, 86,141,230,252,195,152, 7,125, 28,221, 90,241, 82,174,220,130,125,207,183,160, 82,209, 80,168,
+ 57,168,180,128,150, 39,132,107,251, 46,176,105,233, 11, 2,224,238,173,235, 26,149, 70,115,206,212,215,152, 96,194, 63,218,170,
+ 69,244,137,164,170,207,133, 0,158,135,135,135,231,215,178, 54,201, 0, 60, 0, 16, 88,117,157,172,222,239,100, 20, 69,221, 37,
+132,116,174,197, 35,171, 37,184,106,127, 86,215,187,230, 65, 35, 68, 86,237,247,186, 66, 75,215,146, 74, 0,112,112,112,112,234,
+208,161, 83,203,159,126, 62, 8, 66, 8, 30, 71,175, 69, 81,222, 35, 44, 91,125,179,101,147, 38, 77, 66, 50, 51, 51,175, 26,147,
+ 2,150,101, 15,236,220,185,115,126,151,142, 29, 58, 52,111,218, 20, 15,158,167, 66, 72, 88, 8, 89, 22, 52,163, 2,159, 85,163,
+169, 63, 11,154,178, 64, 86, 86, 9, 34,246, 30,140,171,138, 18,175, 23, 62,111,189,141,149, 47, 74, 64, 81, 20,214, 5,251, 67,
+100,105, 1,161,185, 5, 62, 62,113,169, 70, 92, 69,173, 92, 4,145,133, 5, 90,118, 49, 42, 32,188,252,242,229,203,247, 30, 62,
+124,216,217,223,223, 31,243,231,207,199,243,231,207,193,113, 28,114,115,115,149,217,217,217,153, 50,153,236, 57,128,163, 0,126,
+130, 17,145,199,133, 42,229,198,168,195,187,103, 6,247, 8,113,120,103,196, 22, 28, 59, 52, 15,197, 37,165,144,107,165,168, 80,
+106, 81,161,226,193,206,190, 29,186, 4, 4, 32, 43, 51, 15,241,183,206,149,243, 85,242,181,141,185, 65, 41,138, 66,116,116, 52,
+188,220, 44,145,244,199, 85, 56,152, 9, 16,232,230, 2,183,238, 61,106,226, 75,233,131,128, 7,237,248,241,227,107, 34,195, 15,
+ 28, 56, 48,117,226,196,137,174,243,230,205,195,207, 63,255,140,235,215,175,191,226,160, 29, 18, 18,130,107,215,174,125, 9, 96,
+185, 33,163,158, 90,173,134,143,143, 15,238,222,189,139, 11, 23, 46,160,111,223,190, 8, 9, 9, 65,108,108, 44,126,255,253,119,
+ 68, 71, 71,131,162, 40,216,219,219, 67, 83, 41,158, 53,186,200, 24, 6,145,223,124,187,115,241,134, 13, 91,252, 38, 76,152,128,
+195,135,247,227,253,169,109, 64,209, 98, 80,148, 24,111, 15,107,131,149, 95,221, 69,151, 46,189,225,224, 32,192,134,245,199,159,
+ 41, 20,236,175, 70, 20,227,215,191,255,254,187,155, 82,169, 68,113,113, 49,177,176,176,160, 10, 10, 42, 87,180, 54,100,209,146,
+203,229, 18, 93, 68, 15,239, 39,174, 45, 46, 35, 69,164, 60,122, 68,161, 54,186, 93,223, 65, 25, 24, 16, 58, 21,231,163,126,193,
+165,115, 23, 96,199,127,158, 10,243,178, 51,249,169,249,165,217, 21,222, 91,125, 59, 78,231,189,168, 56,183,117,214,219, 73, 60,
+ 87, 87, 46,114,209,143,165,197,250,132, 22, 0,170, 48, 97,207,137,163, 4,111,119, 11,238,210,202,223,195, 85, 84,148,159, 71,
+ 14, 29, 63, 19,199,164, 30, 62, 89, 75, 96, 17, 3, 66,125,101, 88, 88,216, 23, 85,159,119, 45, 93,186,116,122, 68, 68,132, 99,
+ 78, 78, 78,141,143, 86, 94,126,225,165,110, 67,103,177, 5,197, 37,234,157, 27, 62, 31, 45,149,136, 69, 75, 35,118, 94,209,240,
+112, 75, 23,175,150,227, 54,191, 59,119,217,156,228,199,209, 77,154, 73, 69, 56,254,249,114, 60,248,253, 50, 52,180, 16,255,186,
+112, 27, 42,134, 69,113,126, 1, 46, 78,251, 4, 22,206,182,216,114,229,112, 46,199,113, 63,154,186, 26, 19, 76,248,231, 66,151,
+ 22,161, 40,170,161, 24,123,185, 13,124,119, 87,223,239,116,240,252, 21,208, 25, 21,222,168, 37,120,249,249,249,121,215,174,221,
+198,149,168,175,113, 53,234,107,196, 71, 63, 64, 86,166, 26,153,185, 74, 88, 89, 89,221,212,243,211,250,145, 99,137, 92, 46, 31,
+185,116,217, 23, 57, 18,169, 25,122,245,235, 7, 23, 71, 39,152, 9, 5,224,105, 57,240, 40, 1,202,101, 54, 72,138,149, 99,225,
+206, 61,121,229,114,249,200, 6, 58,137,254,186, 68, 6, 69, 81, 16, 91, 89, 66,100, 97, 9,177,165, 85,157,105, 68,137,149, 21,
+ 36,150, 86,224,139, 68, 13, 57,195,191,194, 89, 94, 94, 62,106,244,232,209, 69, 37, 37, 37,152, 62,125, 58,174, 94,189, 26,125,
+238,220, 57,171,216,216, 88,169, 76, 38,107, 5, 96, 32,128,109,122, 68, 86, 29,206,162,162,148, 50,162, 85,141, 13,255,226, 83,
+133, 82,107,143, 49,147, 15,192,156,206,128,150,229, 64, 0,184,217,137,208,189,255, 87,200, 83,119,195,129,173,171,228, 28,163,
+156, 80, 47,134, 86, 29, 78, 66, 8,113,118,118,126,165, 12, 46, 92,184,128, 49,163, 71, 97,208,136,225,112,108,238, 5,167,254,
+111, 97,208,244,127, 97,235,214,173,160,105, 26, 14, 14, 14,245, 59,222, 26,206,221, 49, 16,236,123, 8,106,223, 67, 80,187,162,
+193, 7, 48,105,207,158, 61,223, 4, 6, 6, 94,190,126,253,250, 90, 0, 99,107,255, 87, 45,172,168,103,205,106,168,142,150,204,
+153, 51, 71,145,156,156, 12,115,115,115,104,181, 90, 92,191,126, 29, 91,182,108,193,186,117,235, 16, 29, 29, 13,123,123,123,180,
+108,217, 18, 42,149, 10,119,239,222, 85, 0, 88,162,135,147,147,201,180,163, 54,109,138, 40, 8, 13,237,137,157, 59,127,128,139,
+ 75, 55, 8,248, 46,224, 11, 28, 97,110,225,131, 29, 63,125,131, 33, 67, 58,224,196,241,131,133,249, 5,218, 81, 0,180, 70,220,
+ 75,202,219,183,111, 99,235,214,173, 24, 61,122,116,230,152, 49, 99,216,146,146,146, 26,139, 22, 33, 4,132, 16,172,168,242, 49,
+ 83,169, 84, 98, 93,156, 31, 44,140,203,252,124, 85,252,202,220,156,204,174, 87, 47,223, 28,127,233,220, 5, 60, 75,190,132, 75,
+231, 46,224,143, 75, 55,194,114,115, 50,187,118, 8,106, 45, 28, 57,125,230,103,187,143, 28,230, 89, 88,185, 98,247,145,195,188,
+113,179, 62, 93,213,105, 80,223, 37,134,238,249,170,122, 36,229,121,185,139, 86,175,253,190, 92,203, 40,233, 53,223,109,206, 82,
+200,178,151,212,186, 47,137,161,251, 83,161, 80,108, 83, 42,149,110, 74,165,210, 77,165, 82, 45,121,254,252,121,175,249,243,231,
+203, 88,150,173,177,150,202, 18, 78,220,124,244,231,174,213, 78, 14,182,210,110,157,253,218,172,223,118,232, 74,122, 70,238,111,
+181, 98,104, 53,148, 78,101,185, 66, 57,106,248,200,137, 21,197, 69, 42, 4,127, 26, 6, 78, 98, 1, 21, 11,104, 8, 15, 90,138,
+143,135, 95,175,135,212,206, 18,123, 83,239,203, 75, 52,204, 40,212,141,161,165, 47,239,111, 2, 19,167,137,211,196,249,247,228,
+252,111,134, 43,234,238,117,232, 90,199,162,101,104, 73,101,147, 38, 77,122,189,243,118,127,244, 14, 93, 10, 66, 8, 30,221,255,
+ 22, 69,178,199,104,226, 34, 70, 74,122,105, 48,128,171,141, 72, 76,250,243,140,140,174,115,150, 44, 61, 50,102, 96, 63, 95,255,
+230,205,197,205,154,121,194,220,201, 9,249,249, 50,252,121, 43, 65,179,106, 95,100, 92,149,200, 50,106, 98,146,227,184, 74, 39,
+119, 0,253,230, 44, 4,197,227, 1, 85, 97, 28,170, 59,198,230,157,187,129,226,243,193, 18, 14, 42,149,202,152,213,114, 47,158,
+ 62,125, 58,106,194,132, 9, 23,163,162,162,232, 65,131, 6,181, 63,122,244,232,155,236,153,135,138,188,228,203, 0, 66, 87, 45,
+154,113,160,107,223,225, 86,222,126,157,132,157,154,241,192,104, 40,100,101,166, 33,234,200, 29, 38,225,246,185, 82,162, 85,142,
+149,231, 39, 95,214,199,197, 48, 76,122,171, 86,173,156,183,110,221, 90,227, 12,207,178, 44,242,243,243,113,243,230, 77,180,235,
+220, 5,190, 83,167, 65, 38,147, 97,211,166, 77,240,240,240,192,176, 97,195, 80, 88, 88, 8,173, 86,107,236,132, 47, 11,224, 92,
+213, 11,245, 68, 22, 85,181, 5,144,222,105, 67, 47, 47, 47,145, 82,169,108, 79, 8,225, 81, 20,181, 81,173, 86, 79, 89,180,104,
+145,235,234,213,171,209,166, 77, 27,228,231,231,195,220,220, 28,222,222,222,144,201,100,184,115,231, 14, 43,151,203,183,162,114,
+ 35,107,153,129,244, 61,185,115, 39,181,235,236,217, 31, 31,249, 38, 98,134,183, 82,213, 91,100,103,215, 3,132,104, 33,147, 61,
+ 71, 89,233,117,230,171,149,191, 60,205,205,211,140, 4,144,108,100,158,151,207,156, 57, 19, 0, 36, 0,150,166,164,164,196,248,
+250,250,122,235,178,104, 25,131, 13,135, 50,149, 0,246,141, 26,228, 54,183, 52, 63,214,219,142,255, 60,181,171, 63,183,105,195,
+161, 76,165,149, 91,197,215,249,207,175, 38,101, 87,156,219,186,251,200, 97,222,228, 17,163,216,166, 22,201, 97, 18, 39,114,200,
+ 8,106, 18, 24, 24,232, 78, 81,133, 45,242, 10, 30,223,123,127,250,140,119,173,133,138,211,129, 77, 11, 90,210, 30, 29, 36,209,
+209,209,169,104,228,202,208, 42, 36,101,102,102,246, 90,180,104,209, 57, 66, 72, 29,223,132,188,252,194, 75,193,161, 51, 73,113,
+113, 73,140, 44,241,132, 49,177,212,238,220,185, 31,221,207,191, 93,135,195,223,172,142,112,238, 61,103, 62, 63,233,242, 21,128,
+213, 32,237,234, 21,176, 98, 53,183,254,198,249,220, 18,134, 25, 1, 83, 84,120, 19, 76,248,199, 91,179,244,105,145,191, 57,134,
+ 66,135, 51,188,209,153,241,106,209,228, 92, 27,239,102, 3, 61,154, 58, 2, 0, 82, 82,179,144,146,154,249,123,202,179,204, 65,
+ 6, 20,175,174,229,149, 53,155, 74, 83, 85, 33, 28,136,113,155, 74,215,225,180,183,183,191,199,231,243,155, 54,166, 52, 88,150,
+205,202,207,207,239, 96,100, 58,199, 53,111,222, 60, 34, 45, 45,237, 8,199,113,115, 27,169,246, 27,228,172,222, 84,154,230,139,
+250, 19,173,186, 29, 0, 80,124,145, 49,155, 74,215,230,108,103, 97, 97,177, 77, 32, 16,120, 84,215, 99,181, 15, 22,203,178, 60,
+134, 97, 36, 44,203,242, 0, 80, 52, 77,107, 5, 2,129,146,162, 40,173, 86,171, 77, 87,169, 84, 51,240, 50,224,168,190,188, 27,
+236,232,171,132, 22, 26,176,104, 93, 0,128,228,228,228,214,182,182,182, 99, 41,138, 26, 77, 8,241, 41, 43, 43, 83, 45, 91,182,
+ 44, 58, 50, 50,178,180,121,243,230,131,135, 14, 29, 74,197,198,198, 34, 46, 46,142, 20, 20, 20, 28,170,178, 98,165, 52,242, 94,
+162,197, 98,222,123,118,118,244, 80, 66, 16, 8, 2,138,162,241,176,164,132, 59, 45,151,179,191, 85, 9,198,198,222,159,213, 24,
+223,172, 89,179, 95, 82, 83, 83, 5,186, 44,169,186,242, 94, 31,223, 46,241, 91, 26,220,179,231,168,155,127,252,113,244,243, 85,
+241, 43,107,159,155, 53,220,246,253,113,159,204,249,118,223,230,239, 62,255,254, 88,209, 78, 99,210,217,190,125,123, 47,138,162,
+198, 2,240, 39,132,180, 34,132,146, 80, 20, 41,162, 40, 42, 30, 64,172, 90,173,142, 74, 72, 72,120,241, 6,121,127,157, 17,174,
+ 46,206,154, 77,165,193,178, 1, 44, 64,140,220, 84,250,255, 59,157, 38, 78, 19,167,137,243, 63,199,249,223,140, 15, 27,248,206,
+184,200,240,213, 72,121,150, 57, 40,229, 89, 38, 90,181,106, 69,158, 60,121,210, 40,145,166,171,147,102, 89,118,191, 92, 46,223,
+255, 38, 36, 5, 5, 5,157,254,205,133,183, 47, 53, 53,117,223, 95, 73, 88, 37,164, 86, 86,189, 94, 23, 15,203,203,203,187, 24,
+123, 49,195, 48,255,142,178,161,170,172, 89, 95,234,186, 96,224,192,129,105, 12,195, 92, 0,144, 65, 81,148, 13,128, 66,134, 97,
+206,105,181,218,220, 39, 79,158,116, 90,191,126,125,117,228,251,175, 0,220,123,205,116,112, 42, 21,187, 55, 43,139,221,251,111,
+200,227, 94,181, 90, 61,207,222,222,190,165, 82,169, 20, 41,149, 74, 97,237,197, 7, 82,169, 84,166,207, 33,190, 54,108, 44,169,
+ 93, 66,126,145,189,141, 37, 85, 95, 72,193,174, 9, 14, 43, 42,226,218,216, 53,193, 97, 99, 19, 22, 19, 19,147, 18, 24, 24,184,
+135,166,233,230,132, 16,103,128, 88, 19, 2, 25, 33, 36,159,207,231,103, 38, 36, 36,100,254,141, 26, 33,165,150,227,214,106,213,
+234,151,126,135,166,213,133, 38,152, 96,194,255, 14,116,250,104,241, 27,203,244,228,201, 19,202, 84,158, 38,212, 22, 91,250, 78,
+166,165,165,169, 0,220,168,122,213,199, 61, 0,195,254,238, 25,204,206,206,238,160,235,156,177, 34, 11,168,244,217, 2,226, 26,
+140,206,190,226,251,162, 50,124,127,228,179,198,166,237,193,131, 7,233, 48,114,138,221, 4, 19, 76, 48,193,132,127, 27,222,220,
+162,101,130, 9, 38,152, 96,130, 9, 38,152, 96, 66,131,216, 94, 75,112,213,177,110, 81,208,189,114,160, 49,115,175,175,179,250,
+224,130,137,211,196,105,226, 52,113,154, 56, 77,156, 38,206,127, 28,231,255, 42, 94, 17, 89,255, 31, 48, 45,125, 53,113,154, 56,
+ 77,156, 38, 78, 19,167,137,211,196,249, 79, 16, 89,245, 95, 0, 76, 83,135, 38,152, 96,194, 63, 24,145,145,145, 70,109, 42,250,
+222,231, 59, 66, 45, 44,108,151,149,151,150, 68,236, 95,251,254,209,234,239,199,140, 25,195,154, 74,209, 4, 19, 76,192,235, 56,
+195,183,104,209,180, 45,205,114,221, 9,161,121,132, 38, 26,170, 84,113, 32,165,168,168, 78,216, 1,119,119,119, 27, 1,141, 97,
+ 20, 33,230, 20,197,177, 28,143,190,254,236,217,139,132, 70, 36, 76,100,107,107, 59, 83, 40, 20,246, 87,171,213, 77,105,154,126,
+161, 82,169, 46,200,229,242, 31,240,106,224,194,255, 24, 90,183,110, 61,238,202,149, 43, 54, 61,122,244, 80, 73,165, 82,173, 66,
+161,224,159, 61,123, 86, 60,100,200,144,226,167, 79,159,190,214,138, 68, 55, 55,183,190, 59,118,236,104, 49,104,208, 32,180,106,
+213,170, 98,236,216,177,194,224,224, 96,225,244,233,211,159,101,101,101, 93,106, 36, 93, 91,138,162,126,165, 40,138,199,113,220,
+ 36,188, 12,221,240, 87,131,166,105,122, 6, 69, 81, 35, 8, 33, 94, 20, 69,165, 16, 66,142,114, 28,167, 47,112,171, 62,140, 2,
+240, 22, 77,211, 29, 0,128,227,184,104, 0,167, 1,227, 87,222,253,127,114,154,153,153,181, 7, 0,185, 92, 30,243, 87,113, 82,
+ 20,213, 30, 0, 8, 33,175,203, 57, 85, 42,149,126, 0, 0, 10,133,226, 39, 24,177, 29, 84,125,144,173, 62,164,195,151,143, 0,
+ 0,209,203,125, 0, 0,141, 57,166,254,245,136,106,204,127, 53,196,215, 24,142, 6,240,214,132, 9, 19, 86,255,246,219,111,203,
+ 1, 28,255,119,220,248, 46, 46,238, 63,172,251,110,187,219,167, 51,167, 69,160,114, 71, 8,253, 15, 36, 48, 64,196,227,189,173,
+102,217, 63, 18,128,255, 99,239,186,227,162,184,186,246, 51, 51, 59,219,119, 97,119,169, 75, 17, 5, 5, 17, 80,192,130, 61,162,
+ 38, 26,187, 70, 44, 81,177,196, 22,163, 38, 70,141, 26, 53, 26,107,140,137, 61,182,216,123,141,130,189,247,138,198,138,157,222,
+251,194, 46,219,103,190, 63, 96,121, 81, 41,139,154,188,201,251,113,126,191,113,156, 97,230,217,123,239,220,242,220,115,207, 61,
+103, 47, 0,142, 66,161,232,207,227,241, 90,235,245,122, 37,135,195, 73,209,235,245, 23,243,242,242,118,162,130, 8, 8, 86,151,
+235, 99,200, 13, 26, 56, 19,204,127,226,188,177, 36,116, 92, 17, 82,137,122,200,249, 7,116,163, 36,128,241,197,121,221,128,242,
+221,121, 84,212,249,124,237,226,226,210, 83,165, 82,105, 40,138, 98, 81,180,235,185,232,159,162,191, 19, 12,195,164,103,103,103,
+ 15,170, 12, 75, 92, 3,117,121, 98, 98,171,217,136, 66,147,142, 29,173, 78, 64,180,196, 29,205, 89, 96, 16, 11,212, 34, 41,210,
+129, 97,152, 20, 0,103, 73, 19, 34, 10,146,241,252, 31, 58,184,123, 20,151,107,205,226,107, 26,128, 19,128,123, 0,190, 6, 80,
+ 80,205,127,254, 54,121,211, 24,254, 8,128,148, 18,162, 85,202,221,125,155, 46, 93,186, 92,240,244,116,243,235,221,163,215,252,
+ 81, 35, 71, 19, 20, 69,226,193,195,135,156,207, 7, 13,249, 68, 46,151,187, 74,116,186,122, 32, 8, 70, 35, 16, 60, 80,169,242,
+146,246,238,220, 46,245,173, 91,215,108, 54, 51, 88,179,118,245,167,251,254, 56, 48,205, 74,178,229,227,236,236,188,117,202,148,
+ 41,206,221,186,117,163,156,157,157, 17, 27, 27, 43,219,181,107, 87,221, 21, 43, 86,244,201,201,201, 25, 4,224,233, 59,100,182,
+149,179,130,252, 68, 42, 36,218, 33,223,140,124, 35,206,164, 22,226, 36,128, 75,239, 90,122, 26,141,102,172, 70,163, 9,105,220,
+184, 49,187, 97,195, 6, 98,240,224,193, 44, 65, 16, 68, 97, 97,225,102, 0,239, 68,180,196, 98,241,170, 14, 29, 58,120,123,123,
+123,191,124,241,226, 69,167, 61,123,246, 28, 13, 15, 15,247, 18,139,197,207, 0,248, 84, 17,110, 83, 86, 86, 86, 96, 97, 97, 33,
+220,220,220, 54, 0,104,248, 23, 84, 34,130,162,168,131,174,174,174,236,162, 69,139, 14, 5, 6, 6, 58,101,103,103,155, 38, 77,
+154,212,254,250,245,235,159,154,205,230,110, 85, 32, 91,114,130, 32,214, 58, 57, 57,217, 47, 92,184,240,121,163, 70,141,238,241,
+249,124,222,179,103,207, 68, 19, 38, 76,248,230,233,211,167,125, 88,150, 29, 9, 84,105,128,144, 19, 4,177,214,197,197,197,126,
+254,252,249,177,193,193,193, 15,184, 92, 46,247,217,179,103,226,239,190,251,238,235,232,232,232,119,194, 36, 73,114, 77, 72, 72,
+136,252,135, 31,126,120, 92,183,110,221,171, 20, 69,241, 18, 19, 19,201, 89,179,102,125,117,234,212,169, 48,134, 97, 70,189, 75,
+ 58, 29, 29, 29,229,179,102,205,122,220,172, 89,179,235, 92, 46,151,251,228,201, 19,114,202,148, 41, 95, 61,127,254,220,234,116,
+ 42, 20,138, 80,130, 32,214,165,166,166,114, 0, 64,169, 84, 54,177,177,177, 89, 81, 58,166,165,197, 21,133,209,104,204,215,106,
+181, 3,178,179,179,203,116,132, 59,120,234,242,174, 0,176,194, 96,185, 46, 58, 87,118, 13,172,137,176, 38,211, 65,206, 69,126,
+241,126, 81, 15,237, 1, 0,253,139, 67,133,255,162, 6, 56, 28, 14, 19,228,252, 53,123, 55,181, 74, 46, 99,186,183,109,219,118,
+214,217,179,103, 87,183,105,211,230,187,109,219,182, 57, 38, 36, 36,252,116,233,210, 37,247,126,253,250, 13, 62,115,230,204,130,
+204,204,204,125, 31,170,242,243,184,124, 62, 65, 18, 16, 10, 68, 54,214, 60, 79,147,100,151,171,221,187, 15, 95,255,228, 73,240,
+138,232,104, 79,181, 82, 25, 50,110,220, 56,167, 94,189,122,145,238,238,238,120,254,252,185,221,182,109,219,234,173, 95,191,190,
+103,110,110,238,120, 0,113,239, 67,178,212,185,168,175,211, 35,152,101, 33, 43,105,176, 4,114,249, 6,220, 97, 31,227,254, 63,
+128,108,205,220,180,105,211, 15,207,159, 63,199,130, 5, 11, 0, 96,101, 21,223,159,208,189,123,247,206, 7, 14, 28, 16,238,221,
+187, 87,216,184,113, 99, 56, 59, 59,163,120, 50, 85,226,152,218,211,211,211,186, 50, 99,240,203,210,163, 67, 27, 62,200, 62,134,
+ 85,189, 82, 23, 8,221, 96,106,222,221,187,103,151,193,193,176,117, 16, 65, 32,225, 32, 55, 75, 21,240,228, 78, 66,135,115,123,
+158,255,244, 60, 42, 99,161, 58, 30, 51, 81,190, 79,190,255,138,216,217,217,109,120,245,234, 85,168, 88, 44,126,237,254,203,151,
+ 47,131,188,189,189,243, 0,124, 91, 85,226,230,224,224,176,131, 97, 24, 93, 86, 86,214, 48, 0,144, 74,165,219,197, 98,177, 60,
+ 37, 37,101,218, 95, 53,145,177,200,155, 92,228, 95,174,209, 42,177,215, 42, 43,214, 33, 65,154,153, 22,163, 70,142, 38,250,246,
+239,151,250,252,229, 43,134, 67,243,250, 31, 63,113, 66,228,231,231, 71,234, 86,174,132, 41, 35, 3,198,111,190,105,126,250,244,
+105, 99, 88,255,129,133, 52, 69,108,242,242,172, 37,218,189,115,151,243,129,253,251, 90, 0,168,140,104,241,156,157,157,183,158,
+ 63,127,222,213,211,211, 19,185,185,185,136,141,141,133, 90,173, 70,159, 62,125,232, 22, 45, 90,184,246,238,221,123,107, 94, 94,
+ 94,203, 42,104,182,156,234,184,113, 34, 71, 14,233,229,243,233, 39, 45,196,174,238,181,193,166,106,145,240, 34,186,113,228,249,
+235,227, 54,237, 63,250,244,121, 30,219, 5,101,199, 70,170, 80, 50, 51, 51, 39,247,236,217,115,127,104,104,168, 3,159,207,135,
+139,139, 11,209,173, 91,183,244,228,228,228,217,239,204, 90,138, 67,216,144, 36,105, 46,125, 46, 35, 60,144, 53,226, 38,151,203,
+ 33,151,203, 1,192,245,125,103,158, 50,153,108,165, 84, 42,237,173, 82,169, 10, 73,146,100, 9,130, 96,245,122,189, 80, 46,151,
+255,249, 56,250,169,139, 78,167,171,179,120,233,250,101,109, 91, 5,218,156, 58,117, 10,189,122,245, 98, 79,158, 60, 57,210,218,
+ 56,117, 4, 65,172,237,217,179,167,102,198,140, 25,218,231, 47, 99, 93, 31, 63,125, 73,136, 5, 60,198,222,222,158,190,121,243,
+ 38,103,201,146, 37,130, 89,179,102,173,101, 89,182,119, 21,202,115,109,191,126,253, 12, 19, 39, 78, 76,121,242,252,149,227,253,
+199,207, 89,137,128, 54,217,219,219, 81,215,175, 95,103,222, 5,147, 36,201, 53,147, 39, 79, 86,141, 28, 57, 50, 39, 43, 59,207,
+ 57, 71, 85,192,242,105,202,232,236,236,204, 57,116,232,144,110,199,142, 29,228,240,225,195,215, 48, 12, 19, 86,133,242, 93,211,
+173, 91,183,252, 41, 83,166,228, 62,123, 25,227,124,255,209, 83,136,248,180,209,201,201,145,186,117,235,150, 97,241,226,197,228,
+220,185,115,173, 74,167, 88, 44,222,178,103,207, 30,206,161, 67, 69,125,223,181,107,215, 72, 47, 47, 47, 81,233,103, 10,181, 58,
+144, 4,144,153,153, 41,106,214,172,217, 22, 0,111, 57,247, 13,158, 29,141,193, 83,129,177, 99,199,166, 84,181,178, 4, 43,199,
+ 85,250,140,121,181, 47,187, 68, 51,180, 7,135,195, 97,134, 15, 31,158,250,230,223,181, 90, 45, 1,160, 27,126,178,158,108,117,
+234,212,233,251, 35, 71,142,212,222,182,109,219,175, 59,118,236,208, 3,128, 64, 32,176,223,181,107,215,130, 62,125,250,160, 79,
+159, 62, 51,246,237,219,247,193,136,150,153, 53, 27, 0,128, 47,224,243,163,163,163, 9, 95, 95,223, 10, 61,238, 27, 24,230,246,
+250, 39, 79, 26,125,233,235,219, 56,155, 97,234,112, 63,253,180, 96,194,132, 9,153, 42,149, 10,177,177,177, 48, 24, 12, 24, 60,
+120, 48,213,166, 77, 27,151, 62,125,250, 44,207,207,207,255, 12,128,193,138, 58,185,216,213,213,117, 68, 94, 94, 94,129, 69,171,
+211,114,144,153,211, 58,200,196,111, 80,199,200,227, 82, 38,110,215,111, 24,226,228, 74, 66,237,235,137,203, 0,192,213, 32,163,
+138,147,129, 50,197,198, 13,158,102, 26,115, 29,220,132,109, 51,226, 10,127, 84,199, 87, 72,150, 62, 19,139,197, 61,212,106,245,
+190,226,193,217,167, 75,151, 46,184,126,253, 58, 0,180, 40, 38, 90,109, 73,146,252,156, 97,152,223, 1, 84, 20,202,109, 92,247,
+238,221, 63, 62,112,224,128, 20, 0,246,237,219, 7,163,209, 8, 47, 47, 47,112,185, 92,240,120, 60,208, 52, 93, 18, 29,196, 74,
+ 81, 58, 56,216,195,222,150,134, 92, 33,254,244,187,223,186,115,106,248,217, 32,221,252, 16,217,108, 46, 76,172, 14, 92, 59, 49,
+234,118,144, 33,248,147,182,100,196,154, 7,211, 34, 86, 61,110,164, 33,209, 21,113,208,253, 83, 70,118,146, 36,249,247,238,221,
+131,139,139,203,107,247, 41,138, 2,128,214,239, 0, 57,227,229,203,151,205,162,162,162, 16, 26, 26, 58,163,126,253,250, 29, 47,
+ 92,184,224,156,149,149,133,208,208,208,229,137,137,137,135,254,234, 60,149,230, 34,255, 43,170, 46,242, 13, 38,217,166,104, 22,
+ 76, 82, 20, 69,226,213,203, 88, 99,104,104,187,240,248,248,120, 73, 72, 72, 8, 73,211, 52,212,103,207, 66,123,235, 22, 36, 18,
+ 9,122,246,236, 73, 95,188,120,209,198, 70, 98,243, 69,204,171,152,124,138, 34,193,178,100,165, 54, 15,114,185,252,171,105,211,
+166, 57,123,123,123,195,100, 50,149,120, 52, 55,153, 76, 72, 72, 72,128, 68, 34,193,160, 65,131, 28, 69, 34,209, 87, 86,230,163,
+166,143,151,227,157,243, 71,215, 54,156, 48,170,147,216, 71,116, 10,226,132,241,144,236,251, 18,245,146,143, 99, 74,143, 16,241,
+201, 85, 51,130,107,187, 40,238,148, 82,177, 90, 45, 58,157,238,242,131, 7, 15,190,184,112,225, 2, 3, 0,231,206,157, 99, 31,
+ 63,126, 60,242,125,102,161, 12,195, 32, 55, 55, 23, 12,195, 80,197,215,150,243,127,181, 62,216,216,216,172,233,216,177, 99,191,
+184,184, 56,225,177, 99,199,236,226,227,227,237, 99, 98, 98, 28,124,124,124, 56, 11, 22, 44, 56,162,213, 25, 40,163,153,213,155,
+204,198,252,148,135, 15, 95,230,164,165,221,217,184,113, 99, 33, 65, 16, 61,173,252,141,207,148, 74,165,221,212,169, 83, 65,208,
+162, 38,117,235,213,247,166,104,161, 45, 73,243,108, 11, 11,181,230, 87,175, 94, 37, 76,157, 58,181, 86, 96, 96,160, 11,138,150,
+215,172,194,116,113,113,177,159, 56,113, 34, 56,124,105, 80,131,192,224,218, 60,190, 88, 74,209, 66,105, 72, 72, 72,155,151, 47,
+ 95, 38, 79,153, 50, 69,217,184,113,227, 42, 97, 54,110,220, 88, 62,124,248,112,147, 64, 40,109,230,233,233, 85,175,129,127,189,
+206, 62, 62, 62, 61, 56, 28,142, 41, 35, 35, 35,110,208,160, 65,202,174, 93,187, 58, 85, 5,211,209,209, 81, 62,101,202, 20,147,
+187,135, 87,135, 14, 31,127,210,148, 43,148,218,114,120, 98,153, 70,163, 53, 63,121,242, 36,110,250,244,233,202,160,160, 32, 71,
+107, 48, 53, 26, 13,109,111,111,143,128,128, 0,248,121,121, 33, 47, 47, 15, 7, 14, 28,192,166, 77,155,240,251,239,191, 99,231,
+206,157,104,212,242, 19, 72,165, 82, 36, 39, 39, 67,165, 82,209,127,119,133, 50,175,246,101, 87,232, 71,116, 27, 61,122,116,242,
+240,225,195, 83,133, 66, 33,243,230,161, 80, 40,204, 3, 6, 12, 72, 27,244,221,210,110,150,165,197, 74, 52, 89,247,142, 30, 61,
+250, 98,219,182,109,240,243,243, 67,135, 14, 29,120, 0,240,213, 87, 95,241,250,244,233,131, 61,123,246, 96,223,190,125,143,188,
+189,189,175, 0,232,110, 77, 58, 7, 13, 26,212, 50, 44, 44,236, 82, 88, 88,216,221,190,125,251,174, 27, 57,114,228,107, 35, 87,
+ 74,114,226,109,189, 94,143,192,224,198,162, 57, 27,110, 12,168, 12,239, 49,176,109, 93,116,244,166,133, 15, 31,198,205,240,243,
+147,121,196,196, 40, 54, 47, 94,108,111, 9,210,109, 52, 26,145,144,144, 0,185, 92,142, 1, 3, 6,216,243,249,252, 65, 86, 36,
+115, 73,247,238,221,135,196,199,199, 75,214,175, 95,175,188,123,247,174, 75, 74, 74,138,242,204,233, 19, 14,147,190,253, 74,106,
+ 43,225,241,146, 51, 88, 2, 0, 98,146, 33,142,126,133,150, 44, 11, 89,233,229,196,119, 18, 37,132, 66, 55,172,168,221, 82,246,
+116,226,158,160,190, 83, 34,131,237,229, 74,254,212, 10,222,104,176,104,209,162,189, 17, 17, 17,253, 91,182,108,185, 31,128,176,
+140,103, 4,141, 26, 53, 58,176,103,207,158, 33,173, 90,181,186, 12, 32,160,220, 89,164,155, 91,207, 63,254,248,195,206,114,109,
+111,111, 15,129, 64,240, 22,201,226,114,185, 32, 73,178,202,217,155,183,171, 63, 71, 81, 79,135, 7, 57, 71,177,103,209, 61, 44,
+250,244, 9, 51,191,121,140,110,229,160,104,156,220,115, 15,233,184,135, 78, 95,214, 70,255,233,129,237, 69,102,204,253, 39, 13,
+224, 25, 25, 25,159,183,110,221,122,111,167, 78,157,116, 81, 81, 81,200,200,200,128,171,107,201, 92, 59,245, 29, 32, 21, 34,145,
+ 8,238,238,238,240,246,246,238,127,241,226, 69,103,163,209,136,152,152, 24,164,167,167,223,249, 59,242, 84,154,139,252,203,228,
+ 77, 67,248, 35,111, 17,173,226,216, 66,231, 1,128, 37, 8,245,189, 7, 15,104,138,199, 27,184,125,199, 14, 62,151,203, 69, 92,
+ 92, 28, 30, 61,122, 4,205,153, 51, 40,188,122, 21,105,105,105, 40, 40, 40,128,147,147, 19,214,110,216, 32,214,155,217,161, 79,
+158, 62,165, 88,146, 45,109,111, 80,230, 22, 79, 62,159,223,190, 87,175, 94,229, 18,178,228,228,100,116,234,212,137,166, 40,170,
+172, 93, 13,111, 98, 18, 46, 14, 68,196,153,253,115,148, 74,222, 35,224,249, 4, 32,255, 14,192,234, 0,147, 30, 72,186, 15, 28,
+153, 13,143,130,104,226,196,156,112,103, 87, 17, 39,162, 12,166, 92,217, 86, 84, 47, 95, 95,223,223, 7, 14, 28, 72, 2, 64,219,
+182,109, 9, 95, 95,223,117, 0,188, 42,120,231,116, 37,131,228,245,156,156, 28,244,233,211,199,174,118,237,218,167,251,244,233,
+ 99,103,185,255,174,152, 22,109,178,159,159, 95,150, 64, 32,216, 9, 88,213,193,150, 96,202,100,178,149,157, 58,117,234,189, 99,
+199, 14, 46, 0,156, 63,127, 30, 17, 17, 17,120,248,240, 33,158, 61,123,198, 4, 7, 7, 59, 44,253,125,239,154,149,171,183, 44,
+233,209, 34,208,165, 77,147,224,122,146,130,156, 2, 39, 39,167, 22, 44,203,122, 89,153,206, 78,179,103,207,126,244,248, 69,156,
+ 45,201,161, 57, 92,154,195,183,177, 17, 59,201,165, 98, 55,133, 72,224,202, 39, 9,137, 70,163, 73,221,185,115, 39, 3,160,147,
+181,152,115,230,204,121,245,248,121,156,140, 32, 57, 28,154, 67,115, 37, 18,145,236,211, 14,161,141, 1,128, 11,150,171, 82,169,
+210, 54,109,218,100,168, 10,230, 15, 63,252,240, 32, 59,183, 64,206,161,105,154,195,161, 74,202, 82, 44, 20, 58,136,248,124,158,
+ 78,167, 75, 90,182,108, 89, 97, 85, 48,103,207,158,253,232,201,139,120, 5, 73, 16, 20, 65,144, 28, 27,169,216,206,206, 86,228,
+224, 32, 17,218,139, 56, 20, 79,165, 82, 37,109,221,186,213, 42, 76,131,193,192, 77, 75, 75,195,227,199,143,225,222,184, 49, 78,
+157, 58,133, 26, 53,106,160, 79,159, 62,232,215,175, 31,132, 66, 33,218, 54,171,143,169, 83,167,226,197,139, 23, 48, 24, 12,252,
+178, 48, 45,118, 82,111,138,139,139, 75, 84,101,149,231,141,119, 95, 75,103,144, 51,216, 21,250, 17,221, 74, 19,172,242,240, 21,
+ 10,133,185, 44,109,215,155,152,157, 58,117,250,254,204,153, 51,181,183,110,221,218,109,208,160, 65,151,183,110,221,138,166, 77,
+155,226,241,227,199,168, 85,171, 22, 54,111,222,140,126,253,250, 93, 94,190,124,121,183,168,168,168, 64, 79, 79,207,105,149, 97,
+246,237,219,119, 76, 80, 80,208,217,212,212,212,102,217,217,217, 1, 7, 14, 28, 24,218,179,103,207, 87,253,251,247,111, 87, 66,
+ 24,141,198, 29, 71, 14,239, 71,231,110,189, 80,215, 63, 96,205,224,105,219,234, 87,210, 54,217,135,192,186, 77, 41, 41, 25, 59,
+180, 90, 77, 31,154, 22,137,110,220, 80,236, 91,189,218,190,116,100,129,164,164, 36,116,237,218,149,230,114,185,173, 42, 73,231,
+162, 30, 61,122,244, 57,112,224,128,220,162,213,185,122,245, 42,238,223,191,143,216,216, 88,228,230,230,162,221,200, 2,140, 94,
+ 80,132, 61,122, 1,139, 79,190, 98,197,239,216,135,148,136,176, 6,156,237,108, 56, 87,134, 46,171,251,213,136, 53,126, 28,137,
+130,198,246,239,158, 33, 51, 70,183,175, 28, 76,162, 89,179,102,219,194,194,194, 8,189, 94, 15,189, 94,175, 7, 80,166, 87, 95,
+ 87, 87, 87, 65,131, 6, 13, 48,114,228, 72,210,198,198,102,121,121,233, 84,171,213,186,163, 71,143, 98,208,160, 65, 24, 63,126,
+ 60,234,212,169, 3,185, 92, 14,154,166,177,101,219,110,251,126, 67, 71,249, 52,108,217, 58,208,175, 97,211, 6,249, 58,170, 49,
+ 45,148, 15, 47, 71, 27, 82,102,222, 11, 28,163,240, 32,230, 26, 86,116, 75,100,110,110,214, 20, 76,250,252,231,232, 39, 23,210,
+ 30, 78, 11, 91,247,128,189,214, 60,115,219,215,241, 72, 51, 62, 70,171, 62, 30,240, 12,146,127, 35,118,135,239,187,150,167,149,
+ 82, 37,204,250,245,235,183,188,121,243, 38,191,117,235,214,136,139,139, 3, 77,151,204,167,204,239,147,206,217,179,103,243,181,
+ 90, 45,254,252,243, 79,132,135,135, 39, 25, 12,134,111,222, 39,157, 85,209,104, 89,184,200,191, 76,214,189,113,164,148,167,209,
+154, 13, 0, 70, 6, 17, 3,195,135,106, 34, 35, 35, 69, 60, 30, 15,113,113,113, 72, 73, 73,193,150, 77,155,204,109, 29, 29,243,
+ 59,184,186,170,182,108,218,196,234,245,122,176, 44, 11, 95, 95, 95,244,238,221, 91,248, 89,159,254,233,132,170,112,183, 21,203,
+ 60, 74,203,250,250,208,161, 67,223,250,251,164, 73,147, 96, 99, 99, 3,130, 32,156,173,200, 92,216,184,217, 61,220,228,158,178,
+ 52, 54,117, 75, 54, 40, 1,192,145, 2, 28, 27, 64, 96, 11,240,165, 0, 79, 4, 93,212,217,108,146,237, 16,219,171,213, 48, 87,
+ 0, 85, 89,234,129,139,139,203,140,179,103,207, 58, 68, 69, 69,177, 42,149, 10, 41, 41, 41,236,252,249,243, 29, 92, 92, 92,102,
+188,235, 23, 73, 78, 78,158,211,185,115,231,180,240,240,112,219,227,199,143,187,135,135,135,219,118,238,220, 57, 45, 57, 57,121,
+206,251,124,105, 46,151, 75, 61,124,248, 80, 49,119,238,220,126, 0,110,251,251,251,103,185,186,186,222, 70,145,209,100,133, 34,
+149, 74, 75, 72,150, 69,187,198,225,112, 64,211, 52, 92, 92, 92,244,217,217,217,230, 86, 13,189,132,190,182,164,209,133,207, 21,
+ 42,132, 2, 55,169,141,109, 72, 86, 86,214, 61,130, 32, 94, 90,185,196, 23,212,164, 73, 19,218,204,210,204, 15, 12,241,165, 0,
+ 0, 32, 0, 73, 68, 65, 84,232,129,109, 93,190, 26, 18,234,248,219,220,225, 53,150,205, 25,225,186,104,214, 23,190,115, 38, 15,
+ 8, 37, 25, 70, 91,171, 86, 45,103,139, 65,187, 21,234,243,224, 70,141, 26,113, 24,208,120,252, 52, 54, 45, 46, 49, 41,255,227,
+ 54,205, 74, 52,151,126, 65,193, 29, 28, 28, 28, 90,251,250,250, 54, 34, 8,194,170, 45,201, 66,161, 48,168,110,221,186, 28,146,
+162, 9, 59,185,212, 93, 42, 17, 58,149, 44,161,200,100,205, 21, 14, 14, 97, 36,203,230, 41,149, 74, 71,161, 80, 24, 84,133,188,
+115, 24,112,225,228,168,176,117,176,151, 73, 58,132,182,168,211,172,121, 51,159,250, 33, 77,155,249, 55,108,244, 25, 97, 50,169,
+188,188,188, 28, 45, 70,242,149,104, 90, 5, 59,118,236,192,220,185,115,209,192,195, 3,174,174,174,112,116,116,196,213,171, 87,
+113,243,230, 77,200,229,114,164,167,167, 99,241,226,197, 56,120,240, 32, 12, 6,131,180,170,245,201, 26,178, 85,145,152, 76, 38,
+242, 77,130, 85, 30,190, 80, 40,100, 44, 70,242,229,201,209,163, 71,183, 89, 52, 89, 95,127,253,117,203,165, 75,151, 94,142,142,
+142,134, 68, 34,193,205,155, 55, 49,116,232,208,203,203,151, 47,111, 57,106,212, 40,108,218,180, 9,175, 94,189,218, 80, 17, 94,
+223,190,125,103,125,241,197, 23,203, 46, 92,184, 64, 58, 57, 57, 65, 46,151,163, 71,143, 30,216,176, 97, 3,199,100, 50,109, 12,
+ 11, 11,187, 27, 22, 22,118,215,156,112,242,251,189,191,207,191,250,224,222, 93,140, 25, 55,145,167, 55, 25,167, 88,145,125,182,
+ 80, 34,201, 55,181,110,157,189,199,104,212,244,229,114, 69,182,119,239, 42, 34, 54,110, 44, 33, 91, 83,167, 78,133,173,173, 45,
+ 80,100,192,140, 10,180, 58, 35, 14, 30, 60, 88,210, 31,218,217,217,129,199,227,129,203,229,130,166,105, 80, 20,133,211,107,196,
+ 88, 61,181,136, 95,172,158, 74,224,228, 74, 66,253, 62,223, 78,228,138, 0,185, 19,239,238,151,155,253, 3, 3,218,217,225,234,
+174, 84,204,239, 28,149,120,115, 79,198, 4,109, 58,126, 41,231,181,134,147, 38, 77,242, 75, 79, 79,199,173, 91,183,112,235,214,
+173,242, 52, 64,218,195,135, 15,255, 84, 80, 80, 0, 79, 79, 79,116,239,222,189, 53,128,198,229,180, 27, 52,106,212, 8, 93,187,
+118, 69,104,104, 40, 26, 52,104, 0,189,193, 68,135, 13, 28, 81,247,225,171, 12,215,249,139,231,139,206,158, 59, 64, 94,190,124,
+129,218,182,255,164,109,179,208, 79,150,113,165,202,235, 16,218, 41,173,201,167,198,156,133, 32,229,167, 88,119,102, 28,185,226,
+124,184,100, 75,196, 10, 47,169, 84, 74,220,185,117,215,184,101,213,158,248, 0,113,247,244,235,187,178,160, 33, 82,209,110,136,
+ 39,201, 0,189,255, 41, 35,187, 64, 32, 88,122,225,194, 5,103,131,193,128, 7, 15, 30, 96,252,248,241,218,247,132, 44, 81,128,
+184,187,187,227,252,249,243, 24, 48, 96,128, 54, 45, 45,237,218,223,149,167,210, 92,228,127, 69, 56,165, 24,100,137, 36, 36, 36,
+228,202,229,114,215,186,117,235,146,122,189,190,104, 73, 98,223, 62,243,239, 27, 55, 30,209,106,181,227, 0,112, 87,254,246,219,
+ 26, 87, 55,183,208,129,131, 6, 17, 70,163, 17,157, 59,119,230, 69, 70, 70,218,189, 76, 79,207,183, 98,192,121,237,247, 6, 15,
+ 30,140,165, 75,151, 2, 0,198,142, 29, 91,162, 90, 39,172, 48, 88,146,216,162, 83,135, 46,141,108, 18,196, 43,108, 12,205,141,
+ 5, 53, 95, 72,175,139, 11,132,141, 64,242, 56, 16, 80, 96, 12, 70,211,179,244,158,183, 95, 60,171,231, 39,204,206,170,213,222,
+255, 35,252,126,106,107, 39,141, 89,187,199,234, 14, 71, 36,106, 34,145, 72,112,251,246,237,236, 70,141, 26,229,178, 44,107, 59,
+103,206, 28,123,145, 72,212,228, 61,202, 62,230,233,211,167,173, 91,180,104,241, 21, 73,146,237, 25,134, 57,157,150,150,182, 18,
+ 64,140,149,239,143, 6,240, 3,128,146,153,165, 94,175, 7, 73,146, 96, 89, 22,125,251,246,197,212,169, 83,253,238,223,191,143,
+179,103,207, 42,218,183,111,127, 29, 64, 46,128, 97, 0,202,212,154,169, 84,170,194,155, 55,111, 10,207,158, 61, 11,134, 97,160,
+ 80, 40, 96, 99, 99, 3, 62,159,143, 30, 61,122, 72,166, 76,153,210,238,196,137, 19,233,170,154, 53, 40, 65, 74,146,154, 47,145,
+ 72,225,236,218,106, 84,255,207,163, 89,150, 61, 88,133,206,129, 39,228,152,180,132, 89, 71, 46,154,185,156, 20,113,185,132,128,
+203, 1,159,209,224,251,159,230, 17, 92,214,204, 65, 21,215,231,185, 92, 46, 87,202,135,158,226, 81, 70, 17, 1,246, 67, 52, 14,
+138,162,120, 2,110,249,246, 24, 52, 73,146, 36, 73,114, 1, 88, 29,180,143,207,231,115,165,124,182, 92, 76, 33, 69, 80, 4, 65,
+240, 80,206, 78,180, 32,103,176, 22, 45, 18,111,220, 75, 93,105, 82,220,170, 85, 43, 28, 57,123, 27,251, 34, 78, 35, 51,238, 30,
+166,127,247, 53, 26, 55,110,140,200,200,200, 10,211,100,177,209, 42, 79,187,236,226,226, 18,149,156,156,220,176,188,119, 43, 90,
+ 50, 44, 71, 75,245, 54,254, 76, 91, 4,207,142, 70, 37, 54, 90,221, 91,181,106, 53,102,199,142, 29,250,142, 29, 59,242,250,246,
+237,139,128,128,128,150, 67,134, 12, 1, 0,180,111,223, 30, 75,151, 46,109, 57,100,200, 16,236,222,189, 27, 7, 14, 28,208,181,
+105,211,230,187,243,231,207, 39,161,104, 71,231, 91,194, 48, 76,215,181,107,215,190,169, 41,132,201,100,130,209,104, 84,154, 76,
+ 38,101,113, 95,132,101,203,150,103,158, 60, 17,137,239,166,205,134,163,131,115,144,149,117,136, 24, 60,113, 98,230,230,197,139,
+177,120,247,110, 76,172, 85, 75,180,245,209, 35,156,212,106,177,231,236,217,204,226,223,169,212, 54, 83,173, 86, 23, 30, 61,122,
+212,102,207,158, 61,144,201,100,168, 83,167, 14, 20, 10, 5,104,154, 6, 73, 9, 65,113,229,168,235,223, 4,192, 77, 0, 64, 45,
+ 23,168,125, 61,113,153, 32,144,203,146, 85,183, 41,226,215, 64, 77,123, 55,193,133, 49,155, 2,100, 54,142, 92, 28, 95, 25,143,
+ 19, 43, 18, 14,106, 51,241, 43, 76,120,130,242,109,190, 26,121,122,122, 34, 61, 61, 29, 71,143, 30, 85, 3,229, 18, 50, 48, 12,
+243,211,111,191,253, 54,105,218,180,105,124, 95, 95, 95, 0, 8, 2,112,171,172,103,197, 98, 49, 92, 93, 93, 75,136,101,223,240,
+ 81, 94, 35, 39,140, 18,246,252, 36, 20, 28,142, 61,114,213, 70,100,229, 27, 33,183,151,224,187, 9, 97,130,211,141, 92, 27,175,
+ 93,190,253,112, 97, 33, 26, 3,111,247, 7, 4,129, 91, 55,238, 93,174, 47,240, 5, 8, 18, 72, 32,207,129, 0,129, 2,194, 8,
+130,162, 88,179,217,140,248,248,120,176, 44,139, 1, 61,135, 38,140,152,127,192,177,229, 0, 21,220,235,186,128, 96,241,209, 63,
+133, 8,216,217,217, 5,101,101,101, 33, 38, 38, 6,225,225,225, 73,153,153,153,167,212,106,245,208,228,228,100, 0,200,126, 7,
+200, 18, 50, 31, 20, 20,132, 38, 77,154,160, 79,159, 62, 2,141, 70, 19,230,229,229,229,154,145,145,209,252,175,204,207,155, 92,
+228,127,138,104,149,217,208,140,198,186,186, 53,107,160, 62,125, 26,188,147, 39,177,199,197,165, 64,171,213,126, 11, 32,161,184,
+225,127,189,105,243,230, 43,221,174, 93,179,209, 71, 71,195,235,254,125,208, 50, 89, 80, 85, 19,176,113,227, 70,168, 84, 42,228,
+229,229, 1, 0, 86,172, 88, 1,149, 74, 5,147,149, 1,103, 57, 92,180,116,118,172,133, 84, 60, 3,195, 33, 37,177,117, 53, 77,
+ 37, 90,105,178,107,188,147, 58,143,116, 69,116, 92,136,184, 48, 75,223,148,160,244,208,102,106,224,218,162, 14, 56,224,180,172,
+ 74, 26, 45,235,254, 28, 14, 39,251,233,211,167, 93,125,124,124, 34, 0,216,191,139, 61,192, 27,242, 60, 45, 45,109,220,187,188,
+ 72, 81,212, 15,175, 94,189,114,220,176, 97,195, 87,115,230,204, 97, 75, 19, 45,203,255, 57, 28, 14, 88,150,133,173,173, 45,104,
+154,118,186,122,245,170, 83, 72, 72,200, 42,134, 97,130,202,201, 39, 27, 16, 16,128, 87,175, 94,129,195,225,192,214,214, 22,140,
+201,128,217, 19, 70,193, 76,241, 57,147, 39, 79, 14,234,213,171,215,131, 13, 27, 54, 24,109,154,181,104,158,149,149,245,112,204,
+128,129, 15, 14, 29, 58,164, 47,118,241, 80,249, 20,159,101,239, 62,123,246,140,114,115,113,162, 88,147,134, 17,115, 1,193,189,
+101, 44, 79,226, 12, 1,135, 98,185, 4, 9,190, 64,104, 27,147,152,152,197, 48,204, 99,107, 48, 25,134,185,243,234,213, 43,161,
+147,163, 29, 71, 83,168, 47, 16,210, 44, 47,246,206,237,151, 53,131, 27,121, 1,128,246,206,205,243,252,186,245,132,177,105, 25,
+226, 90,181,106, 89,133, 89, 88, 88,120, 55, 41, 41,137,114,114,114,226,196, 37, 36, 30,150, 73,196, 14, 54, 50, 89, 83, 0, 48,
+228,231,221, 36,117,186, 12,138,230, 56,101,100,101,101, 23, 22, 22,190,178, 54,239, 47, 94,188,224, 40,149,142,212,241,147,103,
+ 34,156, 68,124, 71, 41,143, 99,195, 39, 8, 66, 68, 17, 42,174,137,201, 20,136, 68,142, 49,137,137,217, 44,203,150,171, 33, 92,
+152, 59,176,103,209,247,154,189,187, 20, 54,238,221,187,135, 99,151, 31, 67,204,234, 65,104,243,112,114,211,122, 12,152, 60,237,
+189,237,254, 42, 35, 91,239,164,205, 90, 91, 47,234, 13,124,164, 84, 98, 8, 63, 96,192,128,217,219,182,109, 43, 49, 64,121,252,
+248, 49,218,182,109,107, 89,230, 64,135, 14, 29, 16, 18, 18,130,199,143, 31,195,219,219, 27,103,207,158,229, 83, 20,197, 31, 56,
+112,224,252,237,219,183, 31,173, 84,239,191,110, 29,134, 14, 29, 90,150, 97,245, 11, 0, 90, 66,238, 91, 48,117,225, 22,251,236,
+172, 76,164,103,164,222,181,182, 28, 8,130,192,224,137, 19, 51,215,234,245,216,113,227, 6, 6,137,197,162,205,207,159,163,115,
+ 72, 8,234,183,109,155,105, 77, 95,103,209,234,104,181, 90,208, 52, 13, 27, 27, 27,216,217,217,129,203,229,130,162, 93,192,225,
+ 5,130,228,114, 17,220, 42, 16,139,191, 21,107,194, 63,197,114,130, 64, 46,159,135, 59, 92, 81,185,182, 58,132,184, 6,122,176,
+ 44, 84,154, 4,156,179, 16, 18, 91, 15,216,210, 82,250,228, 23,171,124,101, 54,142, 92, 28, 91, 30,135,147,171, 18,247,107, 83,
+ 49,189,184, 44,152, 10, 38, 18,245,101, 50, 25, 18, 18, 18, 16, 31, 31,255, 8, 21, 27,248,107, 30, 63,126,252,146,207,231,251,
+ 57, 56, 56, 0,128,103,121, 19,115,134, 97, 74,236,176,182,238,216,107, 31,212,218, 75,240,113, 75, 63,108,137,152,135, 47,195,
+150,131,166, 8,152,205, 6,252,186,180, 11,204,186, 2,132,117, 27, 65,124,212,222, 59,240,116,132,254, 11, 99, 97,206,250,183,
+ 38, 2, 28,204,253,185,223, 85, 25, 95, 66,214, 7, 67,200,236,237, 29,197, 92, 46, 23,118, 54, 74,253,180,145,223,164,176, 44,
+ 91,210,110,104,138,107, 36,243, 21,133, 89,169, 5, 66, 25, 93, 8,176,100,205,119,243,102,243,225, 37, 49, 49,113, 92,235,214,
+173,231,231,231,231,231,168,213,234, 1, 0,224,233,233,233, 65,146, 36, 31, 64, 69,171, 35, 30, 40,219, 45, 4,247,254,253,251,
+144, 74,165, 72, 74, 74, 42,173,124, 1,195, 48,255,152, 77, 0,255, 80, 9, 6,112, 7,128, 18, 64,103,148,114,239, 64, 22,171,
+234, 62,138,140,140,100, 35, 35, 35, 63, 42, 25,188, 88,150, 49,101,103,131,213, 21,149, 45, 77,211, 44,128,210, 59,154, 68, 50,
+153,140,160,221,220, 64,240,139, 76, 63,216, 15,184,245,213,104,180,206,181, 12, 99, 6, 5,194, 0,182,212,164, 69, 45, 32, 48,
+207,190, 29,198,241,102, 32,149, 39, 43, 61,210, 1, 38, 22,102, 48, 84, 21,147,195,170,213,106,152, 76, 38,121,237,218,181,143,
+152, 76, 38,121,241,224,198,254,183,190,168,217,108,126, 73, 81, 20,190,250,234, 43, 88,180, 63,122,189, 30,169,169,169,208,233,
+116,208,235,245,120,245,234, 21,242,242,242,160,215,235,241,240,225, 67,120,122,122,130,162, 40,101, 5,157, 57,203,178, 44,220,
+221,221, 81,179,102, 77, 80, 4,139,223, 23,205,194,247,227, 71,161,159, 39,131,141, 43,127, 69,155, 54,109,234,213,170, 85,171,
+ 25,135,195, 49, 59, 59, 59,115, 15, 28, 56,112,216,108, 54,247,128,245, 61,207,209,169, 83,167,214,244,247,247,119,148,217, 72,
+141,124, 30, 5,158, 81,205,242,117, 89, 44, 71,147, 9,119,119, 15, 19,132, 34,239, 65,131, 6,153,203,211, 66,148,133,249,237,
+183,223, 42,125,125,125,109,229, 50,169,154, 71, 83,233, 92,176,153,121,247,110, 93, 7, 0,158,131,163, 22, 2,145, 95,120,120,
+184,169, 42,152, 51,102,204,240,116,112,112,144,145, 96,243,205, 6,195,127,214,219,117,250, 44,130,166, 11,193,229, 53, 26, 59,
+118, 44, 81, 21,204, 73,147, 38,213,242,243,243,147,201,108,196, 5, 28,154, 74,225, 50, 76,138, 0, 76, 42,173, 55,228, 8, 28,
+236, 53, 16, 73,130, 7, 13, 26, 84, 46,166, 69,155, 53,101,202,148,132, 55,136, 55,178,179,179,161, 77,125, 0,110, 82, 52, 2,
+ 37, 52, 26, 59,200,193,231,243, 75,182,190,151, 87, 93,203,179,209, 42,139,108, 89,251,110,163, 31, 43, 88, 2, 92, 91, 47,234,
+ 77,191, 89,201,201,201, 80, 42,149, 21,182,167,237,219,183, 79, 11, 13, 13, 77,239,208,161,131,254,200,145, 35, 32, 8, 2,103,
+207,158, 69, 82, 82, 18, 58,116,232, 0,150,101, 45,187,218,112,247,238, 93,180,111,223, 94,223,186,117,235,164, 98,255, 90,149,
+202,208,161, 67, 97, 52, 26, 81, 80, 80,128,236,236,108, 68, 70, 70, 34, 48, 48,144, 21,137, 68,189, 40,247, 79,230,133,125, 49,
+173,121, 64,131, 32,172, 90,190, 88,207,227,208, 11,171,210, 94, 9,130, 64,248,183,223,102,230, 5, 7,103,111, 85,171, 53,131,
+109,108, 68,181, 19, 18, 20,183, 79,156,176, 55, 24, 12, 86, 97, 88,180, 58,110,110,110, 37, 36,139,203,229,130,195,115, 0, 37,
+174, 15,158, 93, 7,136,156,123,225,220, 29,190,206, 86,140,131, 82, 9,142,139,101,229,187,118, 16,185, 99, 94,243,190,202, 3,
+ 45,250, 41,207,136,106, 96, 67,241,120, 64,178, 28,226,192,144, 95,125,106, 59,212, 20,226,218,222, 84,156, 92,149,248,135, 54,
+ 21,179, 0, 60,175,172,157, 27, 12, 6,173,217,108, 6, 73,146,224,112, 56,165,109, 2,175,252,241,199, 31,184,125,251, 54, 80,
+202,109, 79,126,126,190,153,162, 40, 8, 4, 2, 0,144, 84,208,223,129,166,105,208, 52,141,243,215, 47,218,245,251,172, 11,113,
+245,207, 83,104, 17,216, 31, 89, 5, 6,164,229, 25,144,171, 1,252, 27, 79, 71, 64,251,131,184,247, 42, 31, 65, 13, 2, 40,138,
+ 39, 14, 47, 11, 79, 27,131, 4,117, 60,122,103, 61, 98,234,232, 19,133,199,174, 29,122,252,232,226,190,123, 15,119,253, 22,241,
+188,121,227,214,234, 98,101, 2, 10, 10, 10, 88,130, 32,216,111,134, 79,123,185,117,104,142,121,249,128,123, 12, 71, 39,120,241,
+ 55,118,245, 30, 14, 14, 14, 87,237,236,236,206, 22,147, 35, 15,169, 84,122, 69,169, 84, 70,163,104,163,199,161,148,148, 20, 95,
+181, 90,221, 2, 69,155,179,226,178,178,178,218, 22,107,158,226, 42,208,132,109, 80,169, 84, 95,155,205,230,110,197,199,167,102,
+179, 57,232,217,179,103,126, 65, 65, 65,143,188,188,188,238,122,121,121, 29,243,242,242, 58,236,229,229,117, 56, 52, 52,116,169,
+197,221,195, 95,188,108,248, 22, 23,249,151, 17, 45, 20,147,172,117,197,103,148, 16, 45, 0,231,223, 52, 64, 51,241,249, 15, 77,
+ 99,198, 64,118,248, 48,232,103,207, 48, 36, 60,220, 70, 36, 18, 45, 71,145,143,166, 22, 18,137,100,213,172, 89,179,164,246, 11,
+ 22,192,229,226, 69,196, 70, 70,194, 72,211,183,222, 37,117,133,133,133,224,112, 56, 37,154, 24,177, 88, 12,179,217,140,178, 84,
+190,111, 53, 64, 19,174, 37,165, 69,131,135,154, 96,192, 22, 28, 87,181,190,209,255,229,116,199, 72,149,167,247,115, 53,215,251,
+ 71,135,166,142,203, 61, 90,222, 80, 19,156, 2,158, 76,128,248,248, 4,152,193, 84,105,189, 89,171,213,230,169,213,106, 4, 5,
+ 5,217,221,190,125,187,118, 96, 96,160,162,248,254,205,247,252, 48,205, 92, 92, 92,246,186,186,186,198,184,184,184,236, 5,208,
+172, 10,239,110,184,116,233, 18, 40,138,194,172, 89,179,144,159,159, 15,131,193,128,172,172, 44,196,199,199, 67,175,215, 35, 49,
+ 49, 17, 79,158, 60,129, 94,175, 71,108,108, 44,116,186,202, 39, 36, 12,195,192,198,198, 6,218,194, 2,172,158,247, 61,102, 76,
+153,128,188, 23, 81, 72, 76, 78,131,204, 86,140,113,227,198, 81,114,185,156, 97, 24,166,166,217,108,110,207, 48,204, 26,107,190,
+ 83,169,250,118,217,221,221, 61, 96,209,162, 69,126,223,207, 91,195,181,225, 20,176,124,169,128,225, 73,249, 44,175, 94, 83, 12,
+157,190,156,187,108,201, 47, 79,175, 93,187,150, 4,235,156,119,146, 0, 46, 7, 7, 7,251, 36, 37, 37, 5,250,250,250,214,181,
+247,168,197,231, 43, 93,115,185,202, 26, 42, 86,167,189, 65,184,214,104,181,102,205,154, 7, 87,174, 92, 73,174, 10,166, 88, 44,
+174,183,101,203,150, 0, 39, 39,167, 0, 90, 40, 20,104,242,242,246,152, 52,234,189,148, 76, 46, 32,109,100,159, 30, 60,120, 48,
+106,255,254,253,169, 85,193,244,246,246,246,157, 55,111,158,127,253,250,245,253,157, 61,107,243,133,174,238, 89, 2, 55,143, 44,
+ 97,253, 64, 62,220,106,118, 92,181,106,213,221,107,215,174, 89,133, 73, 81,148,137, 36, 73,208, 52, 13,145, 72,132,227,199,143,
+ 99,204, 23,253,225,238,106,135,186,190,190,104,247,229,215,216,191,127,127,137, 13, 15, 69, 81,229,142,232,155, 23,140,139, 8,
+ 86, 18, 81, 88, 91, 47, 10,107,235, 69, 5, 43,137,168,114,201, 86,241,223,203,122,198,170,222,168,156,229, 70, 43,200,214,209,
+243,231,207,255, 52,120,240, 96, 94,167, 78,157,112,227,198, 13, 12, 29, 58,244,242,129, 3, 7, 0, 0, 55,110,220,192, 55,223,
+124,115,249,204,153, 51, 24, 53,106, 20,218,182,109,203,187,116,233,210, 42, 88,225,251,199,100, 50, 97,227,198,141, 48,153, 76,
+144, 72, 36, 80, 40, 20,232,210,165, 11, 30, 60,120, 48,106,211,166, 77,209, 20, 77,127,222,185,219,103, 56,114,248, 0,158, 60,
+124, 48,106,243,252,129, 85,118, 10, 76,146, 36, 58,133,135,103,102,250,251,103,111, 86,169, 52,195,228,114,145,111,106,170,226,
+220,222,189,246, 86, 16, 53,194,108, 54,151,144, 43, 11,233,176, 28, 28,158, 3, 56,226, 0,112,164,141,113,239, 57,215,200, 13,
+193, 29, 94, 99, 60,174,200,127, 22,205, 35,135,246,250,222, 19,189,190,247, 68,247,201,181,134,136,106,224,119,113, 13,140,238,
+ 52,190,102,168, 87, 99, 91,168,210, 13,136,252, 53, 54, 78,155,133, 5, 0,158, 88,211,206, 25,134,121,148,148,148, 4, 30,143,
+135, 26, 53,106,248, 0,176,216, 5,110, 24, 62,124,248,216, 31,127,252,113, 2,128, 31,139,239, 73, 66, 67, 67,253, 11, 10, 10,
+240,236,217, 51, 0,184, 93,129, 54,184,100,151, 97,182, 42,150, 95,203,165, 62, 2,235,141,132, 92,222, 0, 73,217,122, 36,103,
+235,241,251,234, 30,136,186, 52, 23,183, 79, 14, 66, 92,106, 42,132,206, 61, 97, 54,233, 2,172,152,212,187,252,249,231,159,196,
+165, 75,151, 8,134, 97, 96, 52, 26,217,124,149,138,189,115,249, 50, 10, 47, 92, 32,108,108,108,136,150, 77, 90, 23,108,158,123,
+228,230,193,149,151,111, 27, 52, 85,158,168,191,143,204,120,249,242,101,179,189,123,247,134, 2,152, 81,191,126,253,107,241,241,
+241,205, 47, 94,188, 88,215,205,205,109,249,187,130, 90,220, 66,196,198,198,190,118, 20,187,133,208, 23,147,134, 78,197,100,174,
+ 59,128,111,240, 30,187,236,171, 32,231,255,197,198,240, 71,240,198,110,195, 55,137, 86,105, 71, 97,240,146,203,165, 70,163, 33,
+241,212,169, 83, 6,146, 36, 33, 18,137, 48,120,232, 80,114,245,111,191,181,234,223,172,217,217, 17, 31,127,124,236,236,153, 51,
+193, 33, 33, 33, 96, 89, 22, 36, 73, 98,247,238,221,133, 90,109, 97,150,187,187,187,204,154, 78,163,116, 3, 82,169, 84, 37, 68,
+ 43, 47, 47, 15, 78, 78, 78, 86, 47, 29,170, 85, 56,125,230,120, 84, 14,107,254, 50,190,211,243, 37,134,133,169, 61, 66,114, 25,
+ 51, 39,207,108, 68, 94, 33,139,124, 45, 56, 55, 72, 69,200, 96,239,158,134, 87,237, 67,158, 92,136,190,154,165, 53,107,171,180,
+ 91, 34, 61, 61,253,251,176,176,176, 44,165, 82, 73,216,216,216,192,213,213,149,236,222,189,123,102, 66, 66,194,143,239,250, 69,
+236,236,236,250,133,134,134, 70, 36, 37, 37,245,190,112,225, 66,205,139, 23, 47,246, 14, 13, 13,141,176,179,179,235,103, 37,196,
+158,105,211,166,169,121, 60, 30,154, 54,109,138,252,252,124, 20,239,242,169,240,176,102,137,148,203,229, 98,237,162, 31, 48, 99,
+202, 4,100, 71,223,192,189,203,167,112, 62,149,192,244,121,191,128,203,229,190,147,175,175, 58, 14,162,250,245, 93,164,143,191,
+ 25,218, 55,121,234,148, 41,210,187,119,239,210, 99,199,127,195,198,166,100,131,215,105, 49,133,143,190, 39,255, 84, 59,160,243,
+167,237, 48,107,198,196,250,197, 78, 59, 43,148,122, 14,162,250, 1, 46,210, 71, 19, 71,244,127, 57,126,252,120,225,194,133, 11,
+181,205,154, 53, 43, 76, 75, 75, 19,138,229, 10, 95,142,173, 44, 32, 54, 37, 85,210,172, 89,179, 87, 95,126,249,101,110, 85, 49,
+167, 79,159, 46, 58,113,226, 4, 39, 44, 44,204,148,147,147, 35,161,133,194, 32,130, 47,104,146,145,147, 99,219, 59, 44,236,121,
+239,222,189, 53,197, 14, 75,173,198,156, 57,115,166,232,201,147, 39,156,102,205,154, 25, 83, 83, 83,165, 98, 59,251, 64, 74,166,
+104, 28,147,146,102,211, 36, 36,228,197,216,177, 99,213, 21,165,179, 52, 73,145, 74,165, 73, 45, 90,180,192,175,191,254,138,101,
+203,150,161, 99,199,142,120,240,240, 1, 58,143,157, 0,191,209,223,224,240,213,235, 72, 74, 74,194,156, 57,115, 16, 24, 24, 8,
+ 46,151,251,164,204,246, 56, 42,154,184,155, 10,226,110, 42, 8, 98, 84, 52, 97,185, 46, 87,179,245, 99, 30, 74, 63, 95,214,115,
+183,103,150,173,233, 10, 86, 18, 81, 21,217, 97, 85, 70,182,122,247,238, 61,198,226,194, 97,216,176, 97,151,151, 47, 95,222,114,
+216,176,162,137,118,211,166, 77, 49,119,238,220,150,211,167, 79,191, 60,111,222, 60,180,107,215, 14, 94, 94, 94,149,110,124, 49,
+155,205, 48,153, 76,232,223,191, 63, 76, 38, 19, 50, 50, 50,240,244,233, 83,172, 91,183, 14, 44,203, 10, 0, 64,233,226,214,136,
+199,227,225,207, 59,183, 52, 51,134,133,108,175,130, 38,139, 40, 61,137, 41, 40, 40, 64,239,209,163, 51, 19,235,212,201, 94,147,
+153,169,249, 66, 46, 23,213,138,139, 83, 72,245,122, 87, 84, 96,151, 72, 16, 4, 24,134, 41, 33, 86, 22,194,245,230, 81, 60, 80,
+ 90, 37, 6, 13,115,244,226,182,100, 0, 64,235,129, 46,232, 62,185,214, 16,165,183,104, 69,171, 1, 69, 74,239,253,115, 95,178,
+249,201,230,133, 48,226, 81, 21, 52,214, 55,110,220,184, 1,153, 76,134,176,176, 48, 62, 73,146, 11, 44,243, 85, 20,249,206, 90,
+ 98,193,226,243,249,139, 7, 13, 26, 68,230,230,230,226,222,189,123, 0,112,166,188,126,137,101,217,146,188, 23,100, 19, 48, 51,
+ 60, 92,185,115, 28, 39, 47,238, 67, 76, 82, 6,226,210,181, 0,199, 22, 90,117, 34, 12,133, 73,208,231,222,129, 74, 39,178, 42,
+193, 92, 46, 55,163,126,253,250,108,227,198,141, 89,150,101,241,226,197, 11, 83,108, 92,156,233,214,210,165,236,253,145, 35, 9,
+233,211,167, 92,161, 80, 72,120,122,122, 66, 32, 16, 48, 2,129, 32,235,111, 28,188,255, 18,119, 11,127,129, 91,136, 15,169,213,
+ 98,241,239,148, 20,188,190,219,176,196,129,105, 89, 14, 75,193,218, 8,251,238, 91,181,218, 54,172,255, 64,117, 96, 96,160,220,
+213,213, 21, 4, 65,160, 71,207,158, 68,232,133, 11, 82,218,197, 5,118, 13, 27,150, 44, 71,156, 62,117, 10,199,143, 31, 87, 31,
+249,227,160,235,208, 47,190,232, 10, 96, 75, 5,137,225,240,249,252,146,223, 77, 73, 73, 1,159,207, 47,177,137, 80,169, 84,112,
+112,112, 64, 74, 74, 10,172, 92,153,219, 58,117,202,245, 41,233, 33,223,123,134, 72,105,226,152, 58, 21,102,150, 5, 77,152,129,
+ 66, 22, 70, 51,160, 51,178,104, 84,139, 82,156, 44, 52,201, 35,111, 28,120, 5, 96,107, 85, 74, 79,167,211,157,187,123,247,238,
+ 72,134, 97,246, 1, 32, 47, 92,184,192, 60,122,244,104, 12,172, 55, 92,127, 91,109, 47, 18, 77, 62,123,246,172, 98,242,228,201,
+ 57,145,145,145,121, 93,186,116,177, 93,183,110,157,162,109,219,182,147,179,178,178,118, 89,163, 8,140,143,143,223,146,144,144,
+ 48,166,113,227,198,200,206,206,134,193, 96, 64, 84, 84, 20,188,189,189,113,251,246,109,248,248,248,224,214,173, 91,168, 91,183,
+ 46,204,102, 51,180, 90, 45, 24,134, 49, 87,214,153,103,103,102, 0, 89,241, 72,190,113, 12, 79,239, 71,225,108, 50,129,149,187,
+ 34, 80,163,166,231, 59,249,169,241,113, 20,249, 43, 29,236, 78, 46,156, 61,211, 49,246,220,110, 28,216,184,146, 57,127,236,152,
+ 31, 79,138,145, 31,245,255,250, 51,189, 17, 30, 0,120,205, 67, 26,163,147,252,137, 89, 84, 19,169,103, 31, 85,236, 96,209,199,
+ 81,228,239,100,111,119,226,231, 5, 63, 74, 95, 28,223,140, 61,107,127,101,247,111,219, 25,168, 5, 66,252,253,253, 59,145, 36,
+ 41, 3,160, 45,182,243,178, 42,180, 77, 89,152,167, 35, 34,130,181, 64,200,161, 67,135, 58,137, 68, 34,103, 0, 70,141, 70,243,
+242,125, 48,207, 68, 70, 6, 91,210, 73, 16,132, 35, 0, 3,203,178, 47, 80,197, 16, 60,125,250,244,153,251,205, 55,223, 76, 49,
+155,205, 14,165,102,231,212,226,197,139, 57, 12,195, 80, 44,203, 26, 72,146, 52,156, 56,113,194,108, 50,153,146,181, 90,237,232,
+247,233, 69, 62,251,236, 51, 92,191,126,125, 54,138, 54, 97, 88,171,173,126,205, 78,171, 56,100,207, 59,227, 95,184,112, 97,206,
+231,159,127, 62,117,215,174, 93, 79,151, 47, 95,222,109,212,168, 81,216,189,123, 55,234,212,169,131, 63,255,252, 19,223,127,255,
+ 61, 0,180,156, 62,125,250,225, 13, 27, 54,120,197,198,198, 46,182, 66,163, 1,147,201,132,157, 59,119,162, 71,143, 30,112,112,
+112,128,139,139, 11, 8,130, 56,247,197, 23, 95,252, 6, 0, 20, 65,113, 1, 64,167,213,233,124,125, 27, 91,173,193,229,114,185,
+ 37,125, 93,106,106,106,201, 78,193, 79, 62,255, 60,243,247,133, 11,177,189,176, 16, 95,200,229,162, 68, 55, 55,229,225, 23, 47,
+ 70, 60, 44,234,156,217,138,180, 58,149,145, 44,107, 77, 26, 10, 83, 48,237,143,249, 49,206, 0, 58,182, 30,232,130,214, 3, 93,
+208,184,187, 35, 65, 82, 4,238,159,204,194,131,211,217,251,141, 42,156, 67,213,194,229, 60, 90,176, 96,193,225,143, 62,250,168,
+ 91,189,122,245, 48,124,248,240, 47, 55,110,220,200, 53, 26,141,227,241, 31, 55, 15,182, 36, 73,254,184,118,237,218, 17, 10,133,
+ 2,151, 46, 93,194,197,139, 23,207, 1,136, 47,175, 95, 2, 80,226, 51,171,134,187,143,246, 73,108,129, 40, 61,233, 10, 46, 95,
+250, 3,117, 2,191,134,208,185, 43, 20,190,243, 96,136, 94, 6,125,214, 73, 40,220,187, 32, 49,246, 5, 40, 14,255, 65,101, 70,
+ 40, 44,203, 62, 76, 76, 76,244,242,242,242, 34, 98, 98, 98, 76, 0, 88,179,217,204, 26, 90,181, 50,250, 45, 92, 72, 63,248,242,
+ 75,162,249,147, 39, 20, 75, 16, 76, 84, 84, 20, 0, 60,254,111,140,226, 22,119, 11, 15, 30, 60, 40,207,221, 66,149,164,126,253,
+250, 45, 47, 94,188,200,215,106,181, 56,127,254, 60,154, 52, 41,217,219,245, 95,245,126, 95,154,139,252,203,100, 68, 25,247,214,
+189,166,209,122,173, 98, 51, 4, 93,215,199,199,204, 37,177,169, 71,215,174,154,187,119,239,150,204,250,180, 55,111, 66,125,252,
+ 56,204,102, 51, 88,150,197,197, 11, 23, 48,104,224,192, 2,154, 34,126,175, 85,171, 38, 75,176,175,249,110,105, 95,198,236, 33,
+ 44, 44, 44,172,164,243, 73, 72, 72,128, 88, 44, 6,143,199, 3,195, 48, 48,153, 76,160, 40, 10,182,182,182, 48,153, 76,101,169,
+ 96,222,196, 52,154,179,213,189, 55,116, 30,144,226, 82, 96, 96, 71,202,106,193,131, 43, 44,105,156,206, 54, 4,186, 5,210,176,
+231,164,179,103, 22,127,156,204,232,178,122,227,237, 29, 93,149,109,249,247,105,208,160,193,111,131, 6, 13, 34, 1,160,125,251,
+246,100,131, 6, 13, 86,160,226, 80, 57, 21, 98, 10, 4, 2, 62, 0, 68, 68, 68,100, 63,125,250,180, 99, 68, 68, 68,118,233,251,
+ 86, 98,174, 91,180,104, 17, 68, 34, 17, 76, 38, 19,244,122,125,137,125, 86,233,179,193, 96,128,189,189, 61,142, 28, 57, 2,179,
+217,124,164,178,116,186,123,212, 4,225, 80, 27, 91, 34,206,226, 98, 38,247, 93, 72, 86, 9,102,109,103,113, 93,103,123,187, 83,
+ 63,207,159,227,144,243, 60, 10,137,137,137,236,137,227, 71,174,105,129,164,188,124,204,200, 85,163,110,161, 30,130, 38, 94,136,
+ 63,181,246, 59,118,122,107, 24, 81,246,174,193, 18, 76, 63,103,113, 93, 87, 7,187, 19,191,252, 60, 95,154,251, 60, 10, 41,169,
+169, 56,122, 36,226,174, 22,176, 44, 55, 14, 97, 24, 38,128, 97,152, 0, 0, 67, 42, 32, 47, 85,194,212,104, 52,245, 53, 26, 77,
+253, 15,137,201,178,108,125,150,101,173,198, 44,109, 19,181,100,201,146,232,148,148,148, 65,233,233,233, 29, 44, 71, 78, 78, 78,
+251,130,130,130, 54, 26,141,166, 85,225,146,154,182, 26,141,198,177,160,160, 64,169,213,106, 27, 1,136,170, 66,157, 47,145,210,
+ 94,167, 83, 82, 82,102,165,164,164, 16,149,165,147, 26, 29, 77,236,248,101,226, 31,107,215,174, 85,190, 39,254,107,233,204,204,
+204,220,183,107,215,174, 32, 79, 79, 79,175, 33, 67,134, 96,205,154, 53, 88,190,124,185, 14, 0, 54,108,216,160, 43,165,201,114,
+143,141,141,109, 92,206,178, 97,251, 82,218,146,173,159,124,242, 9,123,241,226, 69,244,232,209,163,196,145,232,250,245,235, 97,
+ 50,153, 84,237,218,181, 99, 0,160, 80,171, 81,177, 12, 11,189,161,220,245,247,183,202,147,199,227,125, 90,218, 95,160,197, 25,
+ 51,143,199, 3,203,178,168,219,178,101,102,110, 96, 96,246,198,188, 60,205,172,250,245,109, 70,248,250, 14,169, 7, 12, 44, 11,
+147, 32,136,215,180, 58,111, 30, 85,208,100,149, 78,103,122, 97, 50,134,255, 49, 63,230,184, 69,179, 37,144,112,160,205, 55,225,
+224,194,152, 12,109, 6,214,151, 71,126, 42,202,123,118,118,246,216,133, 11, 23,234,228,114, 57, 62,251,236, 51,204,155, 55,239,
+139,150, 45, 91,230, 57, 58, 58, 94,175, 83,167,206,253,190,125,251,166, 68, 69, 69,141, 13, 13, 13,197,179,103,207,240,203, 47,
+191,228,230,228,228, 12,168, 8,147, 32,136, 18, 77, 94,247,206,237,179, 87,175,248,149,105,247,209, 24,136,132, 54, 48,210,238,
+200, 46, 48, 34, 71,205, 66,207, 15, 1,143,203, 71,135,102,254,184,126, 98,179,198,172, 87,111,169,172,206, 23, 20, 20,236, 31,
+ 60,120,176,138,203,229, 66,175,215,179, 52, 77,131, 95,100,119,204,208, 29, 59, 26,154, 63,122,100, 50,179, 44, 67, 16, 4,190,
+253,246, 91,117, 78, 78,206,174,119,105, 71, 85,144,210,152, 31,202,221, 66,251, 55,198,159, 15,225, 22,226,175,200,251,191, 89,
+214,149,113,252, 71,163,101,217, 82,105, 57, 19, 4, 99, 54,155, 25,212,242,172, 37,141,141,137, 95,217,167, 79,216,176, 78,157,
+ 58,139, 58,119,238, 44,240,143, 46,154,141, 70, 68, 68,224,192,129, 3,154,147, 39, 79,170,248, 52,181,193,189,134,187,147,217,
+204,128, 32,152, 10,217,176, 84, 42, 29, 63,109,218, 52, 97, 94, 94, 30,150, 47, 95,206, 4, 5, 5,145, 98,177, 24, 6,131, 1,
+ 27, 54,108, 48,250,251,251,211, 36, 73, 34, 47, 47, 15, 36, 73, 62,177, 50,131,247,242,226,147, 58,252, 22,218,235, 64,227,175,
+134,218,249,133, 54,151,183,113,119,133,177, 33,139,228,132, 24, 60, 61,115, 50,231,225,137,165, 89,208,166,245, 66,229,225,129,
+202, 26, 8,126, 56,121,242,164,227,216,177, 99, 89,173, 86, 75,196,199,199,179,243,231,207,119, 28, 62,124,248, 15,201,201,201,
+253,222,241,163, 16,185,185,185, 32, 8,130, 41,238, 72, 44,179,254,170,172,203, 61,216,178,101,203,161,158, 61,123,118,111,215,
+174, 29,162,163,163, 75,150, 8, 75, 19, 45,203,238,195, 5, 11, 22,228, 2,152, 90, 25, 40, 77,211, 88,190,101, 31,114,115, 50,
+225,228,228, 2,129, 80,136,119,221, 97,201, 35,201, 89, 63,205,153,233,152,249,248, 58,241,224,218, 89,102,239,189,180,116,147,
+153, 45,219,227,127,126, 50, 91,204,254, 43,158,205,144,212,172,159,230,255,104,107, 89,214,220,117, 39, 69, 69,152,217,177,239,
+213, 68,254, 45,152,127,179,184,184,184, 32, 37, 37,133,112,113,113, 97,139,109,180,216, 10,136,214,235, 21,188,104,185,140,168,
+104,217,240, 93,241, 95,189,122, 53,191, 97,195,134, 19,159, 61,123,182,215,207,207,111, 20,128, 26, 58,157, 46,119,250,244,233,
+ 63,111,216,176, 97,152, 53,154, 44, 0,216,189,123,247,210,161, 67,135, 30,239,218,181,235,119, 12,195, 52, 40, 53,176,191,114,
+116,116, 44, 89,194,205, 72, 75,157, 50,114, 88,255, 41, 5, 5, 57, 86,251,185,147, 72, 36, 35,166, 79,159, 46, 80,171,213, 88,
+181,106, 21,227,239,239, 79, 90, 38, 69,219,182,109, 51,249,248,248,112,194,198,140,201, 92,146,154,138,185,151, 46,169,167, 4,
+ 4, 4,109,124,250,180, 17, 24,102,107,121, 90,157,178, 52, 89, 22,179,139,119,148,228, 98,178,181, 30, 64,199,230,125,156,113,
+104, 81, 12,114, 98,245, 63,195,132, 23,176, 34, 44, 80, 25,146,184,127,255,254, 14,105,105,105,135,102,206,156,105,219,168, 81,
+ 35, 4, 4, 4,208, 18,137, 36,196,226, 46, 38, 47, 47, 15,167, 79,159,198,154, 53,107,244, 15, 31, 62,236, 89,209,114,149,217,
+108, 78,247,241,241,177,148, 3, 75, 16, 68,150, 74, 71,216,238,169, 23, 34, 25, 50,114, 47,113,249,214, 85, 36, 27, 24,232,140,
+ 12,106,121, 6,163, 77,199, 37, 56,124,236,190, 57, 57,246,209, 35, 99, 97,206,239, 86,164,247,197,243,231,207, 15,206,153, 51,
+167,207,119,223,125, 39,204,204,204, 52,235,116, 58,102,223,190,125,212,144, 33, 67,204, 44,135,195,112, 57, 28,140, 31, 63,190,
+ 48, 55, 55,247, 15,224,111, 13, 48,253,151,184, 91,248, 11,220, 66,124, 48,109, 86,233,243,255,138,148,217, 66, 25,138,188,178,
+102,237,234, 79,119,239,220,229, 76, 81,164,243,139,151, 47,111,117,235,213, 59,233,212,169, 83, 10,174,173,109, 19, 0,140,126,
+212,168,107, 6, 93, 97,118,228,161, 67, 30,181,106,213, 12, 44, 14, 42,205, 50, 20,121,165,162, 31, 44, 40, 40, 80, 95,186,116,
+ 73, 51,117,234, 84, 34, 33, 33, 97,135,147,147, 83,223, 99,199,142, 73,122,245,234, 85, 24, 29, 29,189,223,217,217,185,123,104,
+104,168,116,226,196,137,186,130,130,130,170, 4, 30,125,196,102,228,212,187, 57,115,241,231, 55, 23,173,254, 24, 28,170, 5,116,
+ 52,192, 24,175,192,144,127, 10,192, 14, 84,193,223, 81,105, 17,139,197,129, 34,145, 8,119,239,222,205, 9, 9, 9,209,107,181,
+ 90,238,188,121,243,236,196, 98,113,224,187, 22, 60,203,178,108, 78, 78, 14, 24,134,225, 0, 32,138,207, 96,170,190, 23,191, 95,
+183,110,221, 14,237,217,179,231,147,206,157, 59,195,203,203, 11, 70,163, 17, 62, 62, 62,208,235,245,240,246,246,134, 78,167,195,
+236,217,179,145,151,151, 55, 1, 21,196, 60, 35, 8, 2, 38,147,169,196,216,214,213,205,163,200, 79,207,123,184,177, 16,211,164,
+215,147,200,141, 72,207,202,100,246,252,153,150,166, 49,152, 59, 60,207,208, 60,124,243, 57,141, 25,234,208, 33,227,146, 0, 64,
+199, 84, 28,113, 94,204,131,215,211, 35,235,145,150,158,137,221,119, 82,114,213, 6,166,227,211, 50, 48,171,148,206,127, 9,102,
+240,236,104,244, 30,103,253,179,239, 35,214, 18,170,242,228,110, 42,136,219,162,141, 44,214,110, 44,211, 71,214,123,226, 31,122,
+246,236,217, 33, 0,120,244,232, 81, 66,255,254,253,167,196,196,196,204, 1,112, 52, 54, 54,118,109, 85,128, 54,110,220,248, 12,
+192,208,138,158,217,181,120,232, 65, 0, 7,171,130,155,159,159,175,141,138,138,210, 78,156, 56,145, 72, 72, 72, 56,230,236,236,
+252,201,241,227,199, 69,189,122,245,210, 61,120,240,224,140,139,139, 75,235,246,237,219, 75,142,222,184,145,164,121,241, 34, 50,
+ 50, 38,198,205,200, 48,145, 21,181,207, 15, 76,178, 94, 35, 91, 7,231,198,252,116,232,167,152,246,140, 14,251,245, 57,184, 6,
+ 32,241, 61, 48, 47, 94,185,114,197,111,224,192,129,123,186,116,233,210,220,207,207, 15, 53,106,212,192,211,167, 79,145,145,145,
+129,123,247,238, 33, 34, 34, 34, 66,171,213, 86, 26, 80, 59, 59, 59,251,237,240, 68, 2,133,203,230, 85,179, 34,110, 93,110,226,
+211,170,243, 96, 97,128, 11,112,159,172, 26, 0, 0, 32, 0, 73, 68, 65, 84, 3,189,129, 69, 66,220, 11,204,158,241,187, 38, 37,
+238,217, 35,131,201,208, 19, 86,110,212, 41, 44, 44, 92,183,108,217, 50, 58, 50, 50,178,243,202,149, 43,165, 30, 30, 30, 20,151,
+203, 37, 1,176,183,111,223,102,199,141, 27,167,206,204,204, 60,162, 82,169,214,253,205, 99,244,197,151, 47, 95, 6, 83, 20,245,
+ 65,221, 45,188,135, 91,136,106,249,144,226,233,233,230, 87,219,195,101,148, 87, 13,183, 49,158, 30,238,225,101, 25,185,123,201,
+229, 82,207,154,174, 35,188,106,184,141,169,237,225, 50,202,211,211,205,207, 10,213,162,151,141,141,205, 49,165, 82, 25, 4, 0,
+182,182,182,221,101, 50,217, 67, 91, 91,219,238,197,179,192,238, 18,137,228,177,191,191,255,240,191, 81, 93, 89, 33,166,143,143,
+ 79,255,130,130,130, 47,125,124,124,250, 91,174, 95,188,120, 81,114,253, 46,152,238,238,238,237,110,223,190,221,111,241,226,197,
+159,213,169, 83,167,251,252,249,243, 63,251,227,143, 63,250,185,185,185, 53,122, 7, 76, 62,128,237, 52, 77,167,241,120,188,116,
+154,166,211, 44, 7,135,195, 73,163, 40, 42, 13,192,218,114,180,101,237, 75,205,114, 46, 59, 57, 57,197, 58, 57, 57,197, 58, 59,
+ 59,199, 58, 59, 59,199, 42,149,202,183, 14,123,123,251,203,214,150,167,175,179,164,101, 72, 13,233,149,250, 74,201,229,122, 78,
+ 98,223, 15,241,141,124,157, 37, 45,155,212,176,189, 82, 95, 41,189,244,255, 13, 51,200, 25, 44,187,198,151,101,215,248,178, 65,
+206, 96, 43,187,254,144,106,127,165, 82,201, 42,149,202, 89,127,213, 82, 66, 57,248,127,123,123,255,128,152, 94, 82,169,116, 87,
+141, 26, 53, 44,125, 93, 87, 27, 27,155,115, 18,137,164,107,113, 95,215, 85, 44, 22, 95,240,247,247, 31, 92, 25,166, 66,161,184,
+237,232,232,152, 90,124,164, 56, 57, 57,165, 56, 57, 57,165, 56, 58, 58, 38, 59, 58, 58, 38, 59, 56, 56, 36, 89, 14,153, 76,118,
+253, 29,243,238, 8,160, 41,128, 70, 0,108, 62, 96,121,122, 2, 24, 89,220, 7, 45, 4, 48, 28, 64,131, 15,240,141, 8, 90,168,
+ 24,205,151,185, 95,161, 37, 14,249,180,196, 33,159,111,235,118,165,130, 16, 60,214, 96,214, 85, 40, 20,243,108,108,108,254,144,
+ 74,165,151,164, 82,233, 33,123,123,251,249, 0,234,254,151,234,146, 4,192, 6, 20,249,103, 58,138,162,165,240, 67, 40,218, 84,
+224,241, 15,172,243,255,159,101,196,127,235,135,219, 87, 99, 86, 99, 86, 99, 86, 99, 86, 99, 86, 99,254, 11, 49,201,234,242,172,
+ 38, 90, 85, 36, 90,111, 30, 0, 42,240, 12, 95, 45,213, 82, 45,213, 82, 45,213,242,255, 88,152,234, 34,168,150, 42, 74,153, 75,
+203, 68, 5,172,180, 42,190,166,222,133,217,158,174,198,172,198,172,198,172,198,172,198,172,198,172,198,252,127,135, 89, 45, 31,
+ 80,170,213,170,213,152,213,152,213,152,213,152,213,152,213,152,213,152,255,235, 82,189,116, 88, 45,213, 82, 45,213, 82, 45,213,
+ 82, 45,213,242, 23,201,186, 82,132,235,181, 37,196,106,162, 85,117, 33, 1,124, 9,160, 55,128,218, 40,138,102,191, 15,192,111,
+120,183, 53,125, 27, 0, 83, 0,180, 64,209,238,156, 87, 0, 46,161,104,119, 78, 65,117,113,151, 45,246,246,246,211,104,154,150,
+ 1, 69,161, 77, 44,231,210,255, 55,155,205,185, 42,149,106,254, 95,148, 4, 10, 86,122, 80,182,164,181,116,218, 74,159,141, 70,
+227, 95,153,206,106,249,103,138,143, 66,161,216,158,157,157, 61, 0,165,130, 44, 87, 75,181,252, 47,136,131,131,195, 40,131,193,
+ 48,157,203,229,206,203,200,200, 88,253,255, 40,235,111,145,172,215,136, 86,100,100,228, 5, 0,232,210,165,203, 71, 0, 32,147,
+201,174,146, 36,233, 89,149, 95, 96, 24,230, 85,110,110,110,185, 14,212,100, 50,217, 85,138,162,222,194, 52, 26,141, 82, 14,135,
+147, 95,214, 59, 38,147, 41, 81,165, 82, 53,250,135, 20, 34, 1, 32, 82, 46,151,107,231,204,153,243, 91,155, 54,109,220,147,147,
+147, 77,147, 39, 79,110,253,231,159,127,118, 6,240,105, 21,201, 86, 51,130, 32, 54, 7, 5, 5, 29, 12, 15, 15,223, 19, 18, 18,
+194,203,202,202,146,238,219,183,207,117,203,150, 45, 81, 12,195, 12, 64, 5,129, 86,255, 63, 11, 77,211,178,196,196, 68, 41, 80,
+ 20,154,164,152, 88,193,104, 52,194,104, 52, 66,173, 86, 35, 48, 48,240,131,255,174,179,179,115, 48, 65, 16, 43, 37, 18, 73,163,
+130,130,130, 91, 0,198,164,164,164,252, 89,149,180,154, 76, 38,176, 44, 91,146, 78, 63, 63,191,234, 15, 90, 53,249,130,199,227,
+117,244,246,246,110,162,211,233,114, 94,189,122,117,211,108, 54,207,196,135,139,209,102, 11, 96, 38,159,207, 15,169, 93,187,182,
+251,179,103,207, 18, 12, 6,195, 13, 20, 5, 67,206,251, 16, 36,235,163,143, 62,186,188,106,213, 42,187,209,163, 71, 95,190,116,
+233, 82,203,106,178, 85, 45,255, 45,113,119,119,151,169,213,234,223, 1, 4,211, 52,237, 44, 16, 8, 32, 20, 10, 83,249,124,254,
+ 93,161, 80, 56,236,202,149, 43,185, 85,197, 52,155,205, 51, 99, 99, 99,157,155, 54,109,186,200,209,209,113,118,102,102,166,214,
+ 96, 48,156,201,201,201,153, 0, 64, 85,209,187,111,114,145,127, 25,201, 42,125,134,133,116,113,138, 51,198, 2,104,243, 26, 3,
+227,112,220,226,226,226, 28, 5, 2, 1, 24,134, 41, 25,204,222, 60, 44,247,245,122, 61, 2, 2, 2, 12,149, 12, 56,238, 9, 9,
+ 9,142, 60, 30,175,228,158, 94,175,135,171,171, 43,147,152,152,232, 88, 28,246,160, 68,116, 58, 29,220,220,220,254, 73, 49,143,
+190, 84, 40, 20,121,241,241, 9,129, 90,157,225,199,225, 99,167, 78, 27,208,251, 99,249,213,171, 87,153, 79, 63,253, 84,119,225,
+194,133, 47, 81, 20, 56,213,170,206,156, 32,136, 45,147, 39, 79,158, 45, 16,217,216,157,189,250, 72,183,101,223,145,164, 32,159,
+ 90,196,132, 9, 19,168,113,227,198, 93, 12, 14, 14,222,206, 48, 76, 67, 84, 65,179, 37,151,203,143,243,249,252,154,197,229, 23,
+159,147,147,243,201, 63,176, 66,114,240,182,243,216,178,238, 85, 42, 89, 89, 89, 40, 44, 44,124,235,240,243,243,179, 54, 86,102,
+149,210, 77,211,244,161, 5, 11, 22,184,166,166,164,224,215, 37, 75,154,162, 72,147,217,212,154,151,211,211,211,223, 74,167,175,
+175, 47,170,165, 74, 50,101,246,236,217, 11, 62,255,252,115,152,205,102, 20, 22, 22,186, 60,127,254,220,127,250,244,233, 61, 95,
+188,120,209, 4,192,203,247,157,140,123,123,123, 71,127,253,245,215,138, 38, 77,154,160, 56, 74,133,203,165, 75,151,154,110,216,
+176, 97, 80,124,124,188, 47,128,140,247,249, 1,133, 66,177,125,253,250,245,118, 34,145, 8,135, 15, 31,182,107,215,174,221,165,
+ 59,119,238,180,122, 15,178, 69,218,217,217,141, 3,208,150, 97, 24, 30,128, 27, 57, 57, 57,115, 81,117,175,238, 74,137, 68,178,
+159, 36,201, 90,192,127,188,209,147, 36,105, 79, 16, 68,166,229, 30, 65, 16,142, 12,195, 92,203,206,206,110, 94, 93, 29,255,221,
+ 98,103,103,247, 69, 90, 90,218, 42, 62,159,207,149,203,229, 16,137, 68,224,112, 56,224,112, 56, 53,248,124,126, 13, 62,159,223,
+ 41, 52, 52,116,204,185,115,231, 42,244,176,223, 44,200,105, 8, 72,226, 71,138, 32, 41, 0, 32,105,177,141,173,173, 45,126,252,
+241, 71,113,247,238,221,197, 0,112,249,242,229,240,193,131, 7,183, 75, 76, 76, 12, 40,143,108,149,197, 69,254, 69,178,174,162,
+ 1, 15,197,236,241,194,107, 45,151, 36,193,227,241,112,253,250,117, 88,227,172,220, 18, 34,161,194,222,160,216,195,248,159,127,
+254, 71, 1, 96, 25,104,120, 60, 30,174, 92,121,221,169,124,179,102,205, 74, 26,251,223, 37,189,253,138,156, 60,238,253,170, 40,
+ 93, 97, 43,139,188,107,239,253,202, 23,173,127,137, 67,239,113,179,250,106,180,134,198, 0,212,185, 57, 57, 57,183, 14, 28, 72,
+ 14,242,241,225,110,223,190,189,137,171,171,107,239, 42, 16,173, 41, 13, 27, 54,220, 79, 9,109,237,195, 7, 15, 9, 31,198, 33,
+ 13,131, 70, 78,156,151,144,146,169, 30, 49, 98,196,129,195,135, 15,135,255,244,211, 79,143, 39, 77,154, 52, 5,192,247,214,166,
+ 95, 32, 16,212,124,242,228,137,183,217,108,134,159,159,223, 63, 49,140, 65, 16,138,156,239,125, 14, 96,103,241,189,254, 40,242,
+220, 31, 12,224,110, 85,192, 44, 26,172,178,142, 15, 45,174,174,174,190, 3, 7, 14,180,207,206,204,196,175, 75,150, 88,110, 55,
+ 66, 37,203,136,150,246,163,215,235,241,217,103,159, 13, 52,155,205, 28, 11, 9,212,233,116,250,188,188, 60, 45,254, 99, 88,154,
+ 1,224, 99, 43,146,227, 41, 22,139,127, 6, 16, 92, 88, 88,232, 10, 0, 98,177, 56,137, 97,152,131,106,181,250,123,252, 39,128,
+111,149, 39,184, 0,252, 81,126, 40, 40,118,193,130, 5,207,166, 78,157,250,242,191,128, 89,211,201,201,105,126, 88, 88, 24,142,
+ 28, 57,130,163, 71,143, 26,133, 66, 33,103,240,224,193,196,152, 49, 99,228, 95,127,253,117, 39, 0,203,222,243, 51,119,154, 61,
+123,182,162, 94,189,122,216,183,111, 31,238,221,187, 87,232,237,237, 45,108,211,166, 13, 56, 28,142, 98,218,180,105,159, 2,216,
+252, 62, 63,144,157,157, 61,119,226,196,137, 91,118,238,220, 41,125,245,234, 21, 86,174, 92,105,223,183,111,223, 11,241,241,241,
+ 31, 85,129,108,241, 1,140, 3, 16, 74, 81, 84,171,193,131, 7,155,198,142, 29, 75,147, 36,105, 92,178,100,137,195,134, 13, 27,
+250,210, 52, 29,156,149,149,101,205, 36,141, 4,240,227,176, 97,195,134,158, 59,119, 78,126,243,230, 77,158,157,157, 29,204,102,
+115,137,166,152, 97, 24, 71, 75,157, 53,153, 76,240,245,245,117, 43,245,190,240,223, 74, 52, 72,146, 52, 48, 12, 67, 3, 16, 0,
+208, 85,118,253,191, 68,178, 20, 10,197,232,236,236,236,223,156,157,157,225,228,228,244,214, 88,171,211,233, 32, 16, 8,184,206,
+206,206,235,187,119,239, 78, 31, 58,116,168,220, 37, 64,130, 34,102, 30,222, 53,199, 85, 33,151, 2, 0,150,174, 57,161, 1,128,
+ 63,254,248, 3,201,201,201,144,203,229, 8, 8, 8,160,230,204,153,163,156, 48, 97,194,175, 57, 57, 57,195,202,195,122,147,139,
+252,203, 52, 90,235,202,186,174,208, 70,139,101,217,146, 56,121, 86, 86,218, 55,111,157,126, 3,143,208,235,245,120, 83,163,101,
+105,188, 52, 77,191,169,126, 4, 65, 16,108, 69,152,101,200, 96,177, 88, 28,168, 86,171, 87, 84, 97,118, 91,130,185,247, 43, 95,
+108,225, 79,238,111,137, 68,218,105, 98,209,121, 11,128,171, 49,195, 86,174,250,232, 35,215,113, 51,150,207, 42,204, 74,206,156,
+ 54,176,107, 77,111,103, 59,161, 56, 55, 61, 79, 81,183,110,135, 55, 52, 50,149,165,179,117,120,120,248,214,147,215, 99, 9,129,
+128,203,229, 80, 20,221,178,190,143,157,187, 45,101, 43, 5,108, 19, 94, 62,187, 58,100,200,144,250,147, 38, 77,106, 85, 5, 76,
+ 20, 15,184,216,182,109, 27, 8,130, 32,171,146,247, 15, 40,167, 43, 34, 89, 44,203,130, 32,136, 29,165, 6,149, 29,197,247,238,
+148, 34, 91,156,138,202,211,162, 77,181,144,170,193,131, 7, 15, 52,153, 76,156, 82,157,196,155, 4,166, 44, 18, 99, 85,222,149,
+ 74,229, 73, 0, 31, 19, 4, 1,189, 86,171,255,249,151, 95, 74,255,249,246, 27, 36,235,116,121,109,201,104, 52,194,108, 54,115,
+238,220,185, 67,151,170,235, 52, 0, 49, 0,123,150,101, 65,146,228,125, 43,202,211, 87, 36, 18, 93,141,136,136,176,105,212,168,
+ 17,193,227,241, 96, 50,153,240,224,193, 3,247,159,126,250,105,228,233,211,167, 63, 85,171,213,126,120, 59,120,186, 53,223,200,
+255,210,165, 75,106, 47, 47,175, 50,137,163, 74,165,226,248,248,248,124, 84, 14, 41,250,171, 49, 19,211,210,210,122,124,252,241,
+199,163, 82, 83, 83,163, 77, 38,211,119, 0, 2,236,237,237,239,244,234,213, 11, 66,161, 48,180,176,176,112,217,251,212,121, 71,
+ 71,199,238,205,155, 55,199,202,149, 43,241,211, 79, 63,181, 7,112, 6, 64, 59,149, 74,117,186, 91,183,110,144,201,100, 61,114,
+115,115, 55,191, 71, 59,242,105,221,186,245,250, 31,127,252, 81,122,228,200, 17,120,123,123, 35, 63, 63, 31,223,126,251,173,227,
+ 15, 63,252,112, 62, 55, 55,183, 77,169,118, 81, 30,166, 31,159,207,223,188,115,231, 78,137,151,151,151, 23,151,203, 37,189,188,
+188,144,157,157, 13,173, 86,203,159, 55,111, 94,125,161, 80,248,231,178,101,203, 54, 3,232, 85, 73, 58, 73, 0,115,215,174, 93,
+ 59,106,196,136, 17,178,129, 3, 7,154,245,122, 61,246,236,217, 3,138,162, 64,211, 52, 68, 34, 81, 73,240,106, 46,151,139,186,
+117,223,114,146,126,184,130,252,230,161,200, 14, 85,134,170, 45,187,158,174, 0,175,100,233,131,166,105, 8, 4, 2, 8, 4, 2,
+240,249,124, 60,121,242,100,134, 64, 32, 88, 66, 16,132,201, 26, 76,226, 63,236, 34, 16,192,205,202,174,241,182,105,200,223,217,
+127, 90,196,141, 32,136,165, 0, 66,139,134, 93,242,130,189,189,253,248,180,180,180, 56,107, 49,149, 74,165, 93, 86, 86,214, 50,
+165, 82, 9, 39, 39,167,146,241,219,213,213, 21, 70,163, 17,105,105,105, 96, 89, 22,185,185,185, 16,137, 68,112,113,113, 89, 54,
+ 98,196,136,125,235,214,173,203, 42, 19,147,193, 79,221,250, 78,159, 73, 81, 20, 9, 0, 20, 71, 34,249,122, 42, 80,179,102, 77,
+180,108,217, 18, 90,173, 22,121,121,121,240,247,247,231, 16, 4, 17, 78, 16,132, 13,203,178,171, 1,156,253, 31, 84, 20,150,107,
+ 12, 63,251,205,117, 81, 75,180,120, 46,151,107, 21,209, 42,126,190, 50, 13, 10,105, 52, 26,193,229,114, 95,211, 72, 16, 4, 1,
+179,217,252,218,125, 11,209,122, 23,162, 62,102,204, 24,102,253,250,245,163,114,114,114,214,224, 29,151, 18,194,195,195,223,178,
+247,152, 48, 97, 66, 98,122,122, 58,251, 89,135, 64,113,244,177,228,148,218,114,137,208, 65, 42,173, 37,144, 43,100, 89, 89, 89,
+215,138, 59, 19,107,165, 78,195,134, 13,133, 91, 14, 92, 74, 28,254,205,130, 57,141,188,236,108, 26,184,217,203,157,109,133, 60,
+ 9, 73,168, 5, 38, 99,162, 66,161,240,174,106,186, 45,253,130, 72, 36, 2, 73,146,255, 36,141, 22,199, 66,178,178,179,179,113,
+228,200, 17,116,238,220,249,142,133,132,168, 84, 42,164,164,164, 64,169, 84,222, 41,214,124, 84,186,140,200, 48, 12, 12, 6, 3,
+ 12, 6, 67, 9,129, 41, 85,135, 74, 8,140,229, 89,138,162,238,191, 99,218,231,200,229,242,214,161,161,161,188, 93,123,246,240,
+ 88,150, 85,163, 40,134, 90, 1,203,150, 19, 32,251, 13, 49,153, 76, 37, 90, 54,154,166, 17, 31, 31, 95, 50,112, 89, 98, 75, 10,
+ 4, 2,235, 84, 25,124,254,196,221,187,119,219, 52,105,210,132,200,202,202, 2,195, 48, 37,157,228,111,191,253, 38,232,221,187,
+183,107, 84, 84,212, 52,157, 78, 55,251, 29,242, 74,148, 71,136, 0,192,198,198,198, 4,235, 60,102, 87,138,105, 50,153,136, 22,
+ 45, 90, 76,202,204,204,172, 95, 88, 88, 56,207,154, 98, 4,112, 56, 49, 49,177,244,192,254,103,116,116,116, 97,159, 62,125,132,
+181,106,213, 10,121,244,232,209,123, 85, 82, 31, 31,159,102, 52, 77,227,198,141, 27, 58, 0,150,153,245,133,123,247,238,233,122,
+245,234,197,119,119,119,111,150,155,107,181,201,138,143,175,175,239, 41, 71, 71, 71,161,165, 15,117,112,112,160,215,173, 91, 39,
+ 77, 74, 74,130,193, 96,192,148, 41, 83,208,165, 75, 23,216,219,219, 99,194,132, 9, 78,139, 22, 45,218, 94, 80, 80,208,176, 34,
+165, 53,143,199,219,250,252,249,115,111,165, 82, 41,188,126,253, 58, 26, 52,104,128,204,204, 76,164,166,166,162,160,160, 0,169,
+169,169, 24, 54,108,152,227,175,191,254,234, 98,133, 38,171,132,100,173, 91,183, 46,119,255,254,253,212,239,191,255, 46,165,105,
+186,132,104,113, 56,156, 18,162,101,137,173,248, 14, 43, 13,185,197,164, 77,150,151,151,247, 62,118,110,124, 0,188,210, 36,139,
+207,231,131,207,231, 67, 32, 16,188, 87, 92,214,127,137,184, 18, 4,241,136,203,229,242, 69, 34, 17,151, 36, 73,240,249,252, 14,
+ 10,133,226, 97, 64, 64, 64,192,169, 83,167, 98,173, 1,209,106,181, 91,249,124, 62,237,232,232, 8, 0,240,246,246, 70,131, 6,
+ 13,160, 86,171,153,188,188, 60,200,100, 50, 50, 46, 46, 14,133,133,133, 72, 73, 73,129,135,135, 7, 77,146,228, 86, 20,217, 33,
+191, 37, 87,239,164,174, 1,176,198,114,109,111,111,159, 86, 90,211, 41, 16, 8,224,234,234,138,164,164, 36, 72,165, 82,234,135,
+ 31,126,232,181,103,207,158,158, 87,175, 94, 13, 7,176,173, 20,212,236,127,177,141,150,133,100,149, 62,255,135,104,117,233,210,
+101, 86,100,100,228, 71,101,205,194,105,154,254, 96,182, 46, 22, 66,101, 99, 99,243,166,214, 10, 12,195,148,167,209,170,242,239,
+ 8, 4, 2,225,232,209,163,243, 87,175, 94, 93,101,178, 21,182, 50,186, 68,139,245,214, 52,210,207,239,234,180,105,211,186,159,
+ 59,119, 46,169,145, 87, 45,142, 56, 57,174, 64, 96, 35,147,193,173, 70,231,193, 61,122,221, 67,209,238, 67,107,229,121,126,126,
+190,176,182,155, 72, 79,146, 90,162, 6,159, 35, 85,138,185,124,103,185,220,149,171,215,165,219,200,229, 60,157, 78,151,139, 10,
+130, 64, 3,128,147,147,211, 9,161, 80,232, 97,185,150,203,229,182, 44,203, 66, 36, 18, 65,169, 84, 74, 40,138,122, 90,170,113,
+197,165,165,165,117,168, 44, 97, 50,153,236, 4,159,207,247, 32, 73, 18, 4, 65,128,162, 40,144, 36, 9,146, 36, 75,254, 79, 81,
+ 20, 8,130,128, 70,163,137,139,141,141,237, 96, 69,126, 77, 0,130, 9,130,184,115,228,200, 17,132,132,132,224,216,177, 99,232,
+216,177, 35,242,242,242,240,224,193, 3,180,110,221, 26, 40, 90, 82,180, 74, 74, 27,191, 91, 38, 5, 79,158, 60, 41, 33, 46,165,
+ 15,169, 84,250, 62, 42,246,203, 97, 97, 97, 88,191,126, 61, 91, 60,153, 16, 19, 4,209,192,214,214,246,201,227,199,143,173,178,
+131, 97, 89, 22, 6,195,127, 30,181, 12, 94,197,246, 16, 85, 10, 14, 76, 81, 84,135,134, 13, 27, 18,121,121,121, 22, 2, 9, 14,
+135, 3,138,162, 64, 81, 20, 86,173, 90, 37,108,210,164,201,116, 62,159, 63,137,203,229,170,140, 70,227, 46,173, 86, 59, 15, 64,
+238, 63,169, 71,106,213,170,213, 55, 9, 9, 9, 93, 60, 60, 60, 34,222, 3,134, 53, 26,141,122, 0, 66,138,162,232, 15,208, 71,
+ 81,197,117, 75, 91,138,236,155,138,175,249, 40, 90, 38,182, 74,236,237,237,183, 31, 61,122,212,205,195,195, 3, 70,163, 17, 38,
+147, 9, 5, 5, 5,184,112,225, 2,116, 58, 29, 76, 38, 19,188,189,189, 49,115,230, 76,237,248,241,227, 5,107,215,174, 77, 47,
+ 40, 40, 24, 80, 9,236,248,125,251,246,137,149, 74,165,176,176,176, 16, 47, 95,190, 68,195,134, 13,145,159,159, 15,181, 90, 13,
+141, 70, 3,131,193, 0,149, 74, 37, 51,155,205,250, 74,176,102,148, 38, 89, 35, 71,142,188,207,227,241, 26,142, 29, 59, 22,137,
+137,137, 37,109,126,248,240,225,112,114,114, 42,105, 75,197,125,114,149, 58,102, 14,135, 3, 62,159, 15, 46,151,155, 91,163, 70,
+ 13, 16, 4, 33,136,139,139,123,151,165, 56, 27, 0, 42,154,166,121,165, 9, 22,159,207,199,141, 27, 55,166,241,120,188,242,180,
+ 89,229,181, 75,182, 42,215,255,109, 33, 8, 98, 41,151,203,229, 43, 20, 10,110,169, 9, 39, 87, 34,145,192,209,209,113, 37,128,
+ 78, 86,230, 59, 72,161, 80,148,244,239,129,129,129, 72, 72, 72, 56,152,151,151, 55, 40, 61, 61, 29, 36, 73,110, 37, 73,178,167,
+101,146,154,147,147, 3,119,119,247,160,242,240,154, 7, 59,143, 2,193,190,166,209,122, 99,130, 6, 27, 27, 27,196,196,196, 64,
+173, 86,179,207,158, 61, 35, 70,143, 30, 77,232,245,250, 77, 81, 81, 81,215, 80,180,219,190, 92, 46,242, 47,145,170,219,104, 89,
+ 52, 90,214, 14, 0, 4, 65, 84, 58,155, 48, 26,141, 18,127,127,255,178, 12,190,136,178,136, 86,241,114,210, 59, 85,116,154,166,
+165,239, 74,182,222,148,136,253, 59,157,126,154, 57,101,166,194,165, 86,237, 73,147,102,112,186,118,237,122,125,203,150, 45,102,
+ 69,189, 78,237,206,158,216,230,180,236,219,201,199,142, 30, 61, 10, 20, 25, 70, 91, 43,151, 35, 35, 35,157, 39,140, 27,131,153,
+ 19,199, 31,183,241,182,231, 73, 8,133, 88,160, 83,103, 72,192, 22,242,235,248,118, 57, 16, 17,145, 2, 32,170, 34, 16,145, 72,
+228,241,232,209, 35,239,210, 27, 9,244,122, 61, 68, 34, 17,206,158, 61,235, 32, 20, 10, 29, 0,160,176,176, 16, 1, 1, 1,214,
+106, 76, 60,158, 62,125,234, 45,149, 74,161,209,104,160,211,233, 96, 52, 26,193, 48, 12, 8,130, 0, 77,211,224,241,120, 16,139,
+197, 85,221,217,119, 23,192,231,157, 59,119,222,113,236,216, 49,248,251,251, 35, 39, 39, 7,209,209,209, 22,146, 85, 37, 27, 45,
+139,150,168,180, 61, 22,135,195,193,118, 47, 47, 12, 79, 78, 46, 33, 48, 75,109,109, 49,147,121,183,104, 26, 1, 1, 1,236,229,
+203,151,113,252,248,113,116,235,214,141, 56,116,232,144,193,108, 54,115,147,147,147,239, 39, 39, 39, 91,133,193, 48, 76, 73, 90,
+ 45,253,118,105,130, 85, 85,162,101, 50,153,164, 60, 30, 15, 90,173, 22, 22,205, 67,233,195,211,211, 19,217,217,217, 28,149, 74,
+197, 73, 78, 78, 22,205,157, 59,119,236,249,243,231,149,249,249,249,253,255,155,189,208,234,213,171, 61,134, 15, 31, 30,207,225,
+112,216,142, 29, 59, 14,140,139,139,235,161, 84, 42,207,156, 59,119,238, 23, 0, 62, 85,197,179,183,183,191,205,225,112,220, 84,
+ 42, 21,119,239,222,189,198,252,252,124,174,131,131, 67,154,165,239,176,148,181,209,104,180,106,231,178,189,189,253,237,204,204,
+ 76,238,138, 21, 43,140, 89, 89, 89, 92, 39, 39,167, 52, 11, 78,110,110, 46,119,239,222,189, 70,149, 74,197,181,181,181,189,157,
+151,151, 87, 41, 94,102,102,230,128,240,240,240, 75,103,206,156,177,167, 40, 10,113,113,113,200,202,202,130, 76, 38,195,214,173,
+ 91,225,225,225,129,125,251,246,101,103,103,103,127,241,243,207, 63, 79, 47, 38, 89,149,217,104,181, 14, 9, 9,241,200,205,205,
+133, 76, 38,131, 90,173,198,237,219,183,225,231,231,135,228,228,100,144, 36, 9,153, 76,134,223,126,251, 77, 67, 16, 68,118, 69,
+ 64, 66,161,176,199,136, 17, 35,100, 0, 48, 98,196, 8,217,136, 17, 35,202, 28,224,154, 53,107,134,149, 43, 87,190, 73,180,170,
+ 50, 49, 40,209, 58,149, 34, 71,218,166, 77,155,226,252,249,243,147,171, 72,142,244, 22,210,246,166, 54,139,207,231, 87,121, 51,
+ 13,195, 48, 92, 20,153, 52, 16,214, 92,255, 3,228, 35,161, 80,200,125,243,166, 70,163,225, 42,149,202, 86, 85, 32,190,118, 66,
+ 97,145,194,201,195,195, 3,121,121,121,102,189, 94,223,247,255,218,187,206,240, 38,174,180,123,102, 70,189, 88,238, 21, 3, 6,
+ 2,152, 14,166, 99, 58, 14, 16, 32, 75, 18,218, 38,212,133,152, 16,216, 44, 36, 11, 36, 31,201,134, 56,148, 64, 96, 33,129, 16,
+240, 66, 48, 16, 72, 66, 11, 29, 66, 89,140, 9, 53, 54, 4, 55,108, 76,115, 47,178, 44,217,146,101,149, 25,205,247,195,146, 34,
+ 27, 23,201,150, 41, 89,157,231,153,199, 26,207,232,232,206,157, 91,206,125,239,123,223,187,103,207, 30, 35, 0,132,133,133, 77,
+ 97, 24,166,130,166,105,138,207,231, 67,163,209,192,207,207,207,187, 14,219,232,210,163, 63,172, 8,168,238,163, 21, 24, 24,136,
+176,176, 48,232,116, 58,228,229,229, 33, 54, 54,214,200, 48,204,222,111,191,253,214,228,235,235,251,183, 9, 19, 38, 80,241,241,
+241, 11, 0, 44,170, 77,139,188, 96,214,172,232, 90,133,150, 89, 65, 94, 4, 48,180,250, 67, 86, 23, 63,117, 9,173,250,166, 14,
+249,124,190, 50, 51, 51, 83, 98,219,169,208, 52,141,160,160, 32, 19,203,178, 68, 77, 66,171, 49,166, 96, 46,151,235,246,209, 71,
+ 31, 41,191,253,246,219,169, 15, 31, 62, 92,110,207,119,246, 47,232,128, 93,213, 68,214,214, 53, 81,155, 55,173, 89,225,149,113,
+122, 39,182,127,189,142, 97, 24,196,119,237,218,117,144, 90,173,230,184, 75,140,144, 43,113,202, 44,178,236, 21,133, 36,128,239,
+110,220,184, 17, 63,102,204,152, 95,191,251,241,144, 87,238,253,251, 87, 5,165,242, 60, 89,219,118, 28, 94,179,150,175,151, 85,
+ 84,240,166, 76,153,226, 11, 96, 66,125,141,152, 82,169, 68,126,126,126,117, 1,134,187,119,239, 62,113,175, 93,137, 35, 73, 48,
+ 12,131,131, 7, 15, 66, 44, 22, 67, 34,145, 84, 57, 44, 34,171,129, 11, 21,210, 0, 96,244,232,209, 80, 40, 20,144, 74,165,118,
+167,171,186,120, 97, 89, 22,122,189, 30,122,189, 30, 6,131,129, 1,192,229,112, 56,152,157,157,109,181,242, 56, 34, 96,170,163,
+107,215,174,236,149, 43, 87,240,235,175,191, 66,163,209, 96,211,166, 77, 8, 12, 12, 28, 14,224, 19, 71,185,108,156,244,153,210,
+210, 82,110,105,105,169,213, 58,200,229,114,173,214, 3, 59, 45,121, 60, 14,135, 99, 29,141, 90, 14, 91,171, 22, 69, 81,240,247,
+247, 71, 64, 64, 0,182,110,221,202,107,213,170,213,184,103,217, 2,173, 93,187,182,237,198,141, 27,119,236,218,181,235,212,212,
+169, 83,127, 74, 76, 76,156,229,238,238,126,231,194,133, 11, 43, 4, 2,129,169,129,245, 59, 56, 55, 55,215,207,246, 95, 38,147,
+ 73, 76,211,180, 85,216,150,151,151,219, 61,192,224,114,185,193,201,201,201, 98, 0, 88,177, 98, 5, 23,128,216,226, 12,110,225,
+ 44, 47, 47,231,118,234,212, 41,216,222,178, 30, 23, 23, 55, 40, 34, 34,226,202,217,179,103, 61, 91,182,108,137,156,156, 28,228,
+228,228,160,109,219,182, 88,181,106,149,166,180,180, 52, 28, 64,154, 90,173, 62, 98, 39,103,144,167,167, 39, 55, 51, 51, 19, 52,
+ 77,163, 71,143, 30,216,178,101, 11,166, 76,153,130, 46, 93,186,160,180,180, 20,201,201,201,136,137,137,241,228,241,120,117,182,
+ 29, 90,173,246, 72,116,116,116,243,234, 22,173,105,211,166, 73, 10, 10, 10,172,101, 50, 42, 42,170,202, 20,162, 35,109,178,121,
+106,171,214,163, 33,160,105, 90, 38, 20, 10, 75, 5, 2, 1,223,226,159, 21, 27, 27,235,176, 53,171,218, 0,208,145,243,103, 6,
+139,104,173,161,111, 69, 64, 64,128,221, 60, 2,129,128,176,180,141, 52, 77, 67,165, 82, 49,129,129,129,214,233,253,132,132, 4,
+ 38, 36, 36,132,161, 40,138,226,243,249, 32, 8, 2, 98,177,184,214, 6,159,101,216,168, 87,167,124, 82,101,213,225,194,143, 0,
+131,193,128,132,132, 4, 24, 12, 6,196,198,198, 26,191,252,242,203, 92,165, 82,185, 16, 0,231,204,153, 51, 51,150, 44, 89, 66,
+249,249,249, 69, 20, 22, 22,162, 62, 45,242, 2,137,173, 39,172, 92,150, 94,232,226,184,113,227, 8,243,210, 74,194, 34,156, 28,
+ 17, 90,230,202, 87,111,207, 75, 16, 4,242,242,242,172,231,126,126,126, 14,255,150,189,240,246,246,214,244,239,223,223, 77, 46,
+151, 31, 89,187,118,109,131, 44, 89, 91,215, 68,109, 94,253,249,167, 94,138,148,107,200,206,205,131,162,208, 24,127,249,206,195,
+195, 0, 14, 3, 0,182,117,188, 72,188,147,250,141,189,156, 29,124, 68,221,185, 60,206,225,151,199,140,107, 62, 57,114, 17,249,
+238,187,239, 14,156, 49, 99,134,106,234,212,169,239, 73,165,210,246, 6,131,161,228,208,137, 19,143, 38, 79,158,220,138, 97,152,
+ 25,168, 39,230,136, 86,171,125, 60,116,232, 80,219,252,148,157, 59,119,206,255,209,163, 71,152, 63,127,126, 81, 78, 78,142,210,
+246, 94,123,210,104, 48, 24, 30,119,239,222,189,214,233, 66,203,148, 34, 0,148,149,149, 61,118, 32, 75,223,132,217,241,189,184,
+184, 24,119,239,222, 5,135,195, 65,191,126,253,112,249,242,101, 12, 28, 56, 48,193, 17,171, 86, 69, 69, 5, 90,182,108,137,138,
+138, 10,104, 52,154,114, 0,130,221,173, 90, 1, 0, 22, 20, 23,227,183, 47,191,196,181,213,171, 97, 91,158,237, 69,183,110,221,
+216,107,215,174,225,206,157, 59,208,233,116,152, 51,103, 14, 0, 16,230,178,235, 72,200,140, 54, 20, 69,141, 30, 51,102, 76, 16,
+ 0,104, 52, 26,226,198,141, 27, 16, 10,133,214,186,112,236,216, 49,228,228,228,128, 32, 8,120,122,122, 6,151,148,148,180, 2,
+240,176, 14,179, 63,241,240,225, 67,124,241,197, 23, 48,153, 76, 88,178,100, 9,218,181,107,103, 21, 88,143, 31, 63,198,138, 21,
+ 43,192, 48, 12, 62,253,244, 83,180,109,219, 22, 70,163, 81,136, 6,134,208,112, 6,222,127,255,253,140,195,135, 15,159,202,202,
+202,122,101,205,154, 53, 67, 8,130, 48, 45, 94,188,248, 11,153, 76,198, 52,134,183, 68, 85,134,187,247, 30, 91,133, 80,245,195,
+215,199,203, 97,190,244,251, 89,214,239, 51,140, 45, 31, 3,111, 47, 79, 71,147, 88,110, 52, 26, 53,175,191,254,186,199,193,131,
+ 7,137,182,109,219,226,193,131, 7, 22,203, 80, 57, 28, 15,233,144,163, 80, 40,218, 81, 20,197,187,119,239, 30, 66, 66, 66,208,
+183,111, 95,172, 92,185, 18,114,185, 28, 52, 77,195,207,207,207,100, 52, 26, 19, 12, 6,195,165,122,184,162,230,206,157,203, 3,
+240,142,217,178,213,117,225,194,133,166,117,235,214, 33, 33, 33,193,106,193,178,117,134,119,116,234,208,214,234,100,123,196,198,
+198, 46,225,243,249, 44,128,235,112, 60,208,179,190,186, 69,171, 33,214,172,166, 66, 83,174,100, 12, 12, 12,140,117,115,115, 27,
+ 87, 82, 82, 82,197,170, 21, 30, 30,110,240,247,247,143,179,151, 71, 42,149,150, 80, 20,229, 13, 0, 57, 57, 57,144, 72, 36,188,
+251,247,239,175, 70,101,240,108,180,106,213,106,181, 66,161,224,181, 50,183,167, 1, 1, 1,208,235,245,181,186,177, 92,189, 85,
+176, 19,192, 78,203,185,151,151, 87,158, 74,165, 18,173, 91,183, 78,189,122,245,106, 45,195, 48, 58, 0, 23,148, 74,165, 53,142,
+ 86,126,126,190,138,203,229,122,121,120,120, 52,179, 8,173,154,180,200, 11,134,218, 45, 90,102, 37,201, 86, 23, 68, 4, 65, 60,
+225,160, 94,143,208,170, 87,100, 49, 12, 83,197,202, 96,113,120,175,233,183,204,157,122,131,166, 14,205, 34, 75,120,232,208,161,
+221,107,215,174,189,110,239,247,108,125,180,182,173,255,124,141, 69,100,253,254,235, 89, 28, 73, 85,201,151,172,222,176,177,161,
+111,160,163,143,184,155,191,191,247,197, 47, 87, 69,201, 50, 78,199,224,167,109,255,102,127,191,121,179,207,205,155, 55,167,207,
+159, 63,191,133,185, 96, 41, 0,220, 6, 48, 25,118,172,210,201,201,201, 25, 85,173, 19, 78,227,241,120,254, 98,177, 24, 57, 57,
+ 57,234,244,244,116,135,167,100,228,114,249,168, 38, 40,128, 28,139,200,146,203,229, 72, 78, 78,198,176, 97,195, 0, 0,151, 47,
+ 95, 70,120,120, 56,226,227,227,209,179,103,207, 4, 0,189, 81, 79,160, 86,163,209,168,236,216,177,163,213,186,165, 82,169, 76,
+ 0, 16,153,151,135,232,192, 64,112, 56, 28, 92, 91,189, 26,203,140, 70,172,116, 80,192,119,239,222,157,189,113,227, 6, 30, 61,
+122, 4,154,166, 49,126,252,120, 52,176,210,119,233,208,161,195,185, 11, 23, 46,248, 74,165, 82,104, 52, 26,168,213,106,204,156,
+ 57, 19, 83,166, 76,129, 78,167,195,254,253,251,113,244,232, 81,184,185,185, 65,163,209, 64,163,209,120,142, 29, 59,246, 74, 90,
+ 90,218, 96, 0,247,106, 17, 90,236,168, 81,163, 16, 23, 23, 7,138,162,208,167, 79, 31, 20, 23,255,177, 24,200,223,223,191,166,
+107,212,179, 20, 90, 28, 14,135,141,141,141, 93, 51,100,200, 16,100,101,101,189,210,179,103,207, 77,179,102,205,202,105, 44,175,
+167,187, 27,186,119,106, 3,157, 78, 7,157, 78,135,160,160, 32,148,149,149, 33, 35, 35, 3, 58,157, 14,254,126, 30, 14,243,133,
+117,105,107,229,243,243,243,131, 70,163,193,195,135, 15,161,215,235,225,227,227,144,208,106, 62,106,212,168,255,238,221,187,215,
+ 59, 38, 38, 70, 63,116,232, 80,254,166, 77,155, 8,153, 76, 6,155,142,197, 81,196, 94,190,124,185,101, 68, 68, 68,104, 74, 74,
+ 10, 98, 99, 99,161,215,235, 17, 22, 22,134,244,244,116,244,239,223, 31,106,181,250,250,205,155, 55,143,218, 99, 24, 6,240,241,
+220,185,115, 97, 17, 91,113,113,113,200,203,203,131,155,155,219, 19, 66,203,226,251,104, 94, 53, 30,100, 79, 98, 45,130,200,198,
+242,180,204,195,195,195, 0, 96, 99, 3,173, 79, 0,128,172,172, 44, 65,215,174, 93,117, 66,161,144,111, 22,109, 27, 26,195,231,
+ 76, 56, 97, 37, 99,173, 8, 8, 8, 88,232,227,227, 19,209,186,117,107, 20, 20, 20,240,248,124, 62,194,195,195, 13,189,123,247,
+ 54, 4, 4, 4, 44,176,151, 71, 32, 16,164,240,120,188,193,149,131, 9, 6,153,153,153, 96, 89,118, 73,151, 46, 93,254, 81, 86,
+ 86,134,226,226, 98,190, 76, 38,179, 14,170, 67, 67, 67,161,211,233, 82, 28,176,188, 69,133,132,132,124,204,227,241, 86,202,229,
+242,154,194, 66,240, 61, 60, 60,100, 60, 30, 15, 6,131,161,138,216,172,174, 69, 94,116,145, 85, 69,104,217,168,200, 42, 66,199,
+ 17,139,150, 61, 86, 3,139,131,189,237,185, 69,212, 85,255,173,134,198,208,114,119,119,215, 89, 68,214,202,149, 43,175, 55,132,
+227,192,222, 61,129,238,166,242,230,185,215, 79, 34,237, 78, 60, 14, 39, 43,229, 75, 86,111,120,239,213, 9,111, 22, 84, 23,102,
+246,160,157,175,184,139,191,159,247,197,245,107, 87,203, 20, 41,215,144,151,159,143,147,215,111,198, 27,128,100, 0, 75,156,105,
+ 90, 6, 42,167, 14, 41,138,122,158, 10,172,213, 25, 62, 47, 47,207, 34,178,194, 0, 96,224,192,129, 9,102,145, 5,123, 45, 90,
+ 74,165,178,250,150, 53, 17, 0,124, 44,207,207,225,112, 16,254,241,199, 14,139, 44, 0,108,124,124, 60, 20, 10,133,101,164,216,
+ 80,145,133,128,128,128,127, 94,184,112,193,247,187,239,190, 43,221,181,107, 87,177,201,100,226,118,239,222, 61,184, 87,175, 94,
+196,238,221,187, 1, 0,147, 39, 79,198,146, 37, 75,144,148,148, 4,137, 68,130,129, 3, 7, 50,203,151, 47,247, 91,184,112,225,
+130,130,130,130,247,106,236, 29, 77, 38,158, 80, 40, 60, 15, 96,120, 74, 74, 10, 0, 92, 65,229, 22, 78, 22, 43, 66,173,215,236,
+233,124,203,202,202,184,110,110,110, 53,134,134,224, 85,142,134, 28,181, 64, 88, 57,127,253,245,215, 47,214,175, 95,127,248,131,
+ 15, 62,184,215, 72,206, 26, 45, 90,227,198,141,131, 86,103, 64,118,129, 10, 12, 67, 67,107, 40,116,152,207,214,162, 53,110,220,
+ 56,148, 87,232,145,153,167, 0, 77, 51, 40,211,218,221,151,139, 95,126,249,229, 51, 63,252,240, 67,192,213,171, 87,193, 48,140,
+ 41, 61, 61,253,225,235,175,191, 46, 91,188,120,177,119, 35, 22, 25,125,253,230,155,111, 78,252,245,215, 95, 21,161,161,161, 94,
+215,175, 95, 71, 97, 97, 33,104,154,198,240,225,195,193,231,243, 51, 87,175, 94,205, 3,240,181,189,239,198, 44,182, 12, 55,111,
+222,124,251,218,181,107, 94, 94, 94, 94,124, 83,135, 14,200, 59,123, 22, 7, 15, 30,124,226, 11,219,182,109, 3,236,140,194,111,
+177, 56,221,184,113,195, 41, 2,171, 74, 79,205,231, 55,120,250,241, 69,197,141, 27, 55,114,222,125,247,221, 78, 50,153,108,227,
+160, 65,131,134,121,123,123,147,158,158,158,177,205,154, 53,251, 71,247,238,221,237,158, 93,224,114,185,179, 36, 18, 73, 6, 77,
+211,148, 90,173,134, 70,163,169,108,164,105,154, 79,146, 36, 90,181,106,101,237, 75,250,244,233,131,128,128, 0, 38, 53, 53,117,
+150,189,252, 69, 69, 69, 85, 86, 33,214,128,185,225,225,225, 28,157, 78,135, 71,143, 30, 93,182,189, 80,147, 22,121, 65, 16, 89,
+167,248,178, 60,148,237,195, 53,107,214, 44,203,104, 52,178,201, 0,123,251,246,109, 54, 50, 50,178,206,163,162,162,130,245,243,
+243,203,171,161,243,131, 45,167, 78,167,171,242, 61,157, 78,199,250,251,251, 51, 90,173,246, 9, 78,173, 86,203, 6, 7, 7,231,
+212,197, 89, 3,102,222,186,117,235,219,101,203,150,245,117, 32,131,172,156,236,214, 14,108, 76, 76,204, 95, 89,150, 29, 50,168,
+ 83,203, 59,147,186,251,179,225,237,252,114,143, 30,216, 59,133,101,217, 33,213, 15, 75,128,211,186, 56, 59,248, 75, 58,142,232,
+220,162,228,247,211,251,216, 11,235,254,206,174, 31,223,142,237, 25,236,166,236,224, 35,114,116,143,152,122,119, 75,239,220,185,
+115,154,201,100, 98,245,122, 61,219,185,115,231,116,103,112, 54, 0,117,113,246, 64,165, 47,219,155, 53,252,175, 71, 35,210,249,
+ 59,203,178,172, 66,161, 96,213,106, 53,171,211,233, 88,134, 97, 88, 91, 0,248,221, 14, 78,214, 96, 48,176, 37, 37, 37, 44,236,
+247,185,171,145, 51, 48, 48,240,225,253,251,247,217,151, 94,122, 41,203,108,142, 95,168,209,104,216,234,208,104, 52,236,176, 97,
+195,216,244,244,116, 54, 36, 36,164, 34, 61, 61,157, 13, 12, 12,188, 91, 79, 58, 91, 55,111,222,252,188,143,143, 79, 44,128,118,
+ 14, 92,171, 51, 63,247,239,223,223,134,101,217, 57, 44,203, 70,214,114,204,119,133,129,130, 0, 0, 32, 0, 73, 68, 65, 84, 97,
+ 89,182,195,179,230, 52,231,111, 1,203,178,108,121,121, 57,171, 80, 40,216,220,220, 92,182,188,188,156, 85,171,213,236,173, 91,
+183,216,171, 87,175,178,119,238,220, 97,189,188,188, 10,236,225,180,240,233,245,122,182,180,180,148, 45, 44, 44,100,181, 90, 45,
+171,209,104,216,196,196, 68,246,183,223,126, 99, 83, 82, 82,106,226,123,130,211,219,219,123, 91,126,126,190,250,202,149, 43,229,
+ 91,183,110, 45, 15, 8, 8, 72, 1,208, 18, 64,123, 79, 79,207,252,191,255,253,239,172, 84, 42,125,220,192,122,212,137,203,229,
+222, 90,179,102,205,141,227,199,143, 23, 28, 61,122, 84,191, 99,199,142,236,249,243,231, 95,226,112, 56,183, 0,116,106, 96, 61,
+242,243,240,240,184,114,253,250,117,186,164,164,132, 85, 42,149,108,105,105, 41,171,209,104, 88,173, 86,203,234,245,122,214,104,
+ 52,178,151, 46, 93, 98,253,253,253,109,167, 37,151,214, 49,176, 94,196,178,236, 63, 89,150,229, 56,187,173,179,225, 30,228, 44,
+ 78,103,180,117, 36, 73, 26,204,109, 71,191,202,211,186,207,159, 85, 58, 71,140, 24,241,233,148, 41, 83,216,209,163, 71,179, 97,
+ 97, 97, 79, 28, 61,123,246,100,231,205,155,199, 30, 63,126,156,253,242,203, 47, 63,117, 66, 58, 57,168, 92,244,178,106,196,136,
+ 17,198,184,184, 56,118,242,228,201, 44,128, 81,117,105,145, 63,131,224,178,132,119, 32,108,255, 2,128,193, 96,200, 74, 75, 75,
+ 11, 12,165,105, 10, 0,190,249,230,155, 39, 44, 83,182,136,139,139,163, 9,130,200,168,235,215, 13, 6, 67,214,133, 11, 23,252,
+ 55,111,222,204,181, 49, 1,131,166,105, 83,110,110, 46,185,105,211,166, 42,247, 95,188,120,145,166,105, 58,211,193,135,140,233,
+209,163, 71,140, 51,114,235, 82,210,163,127,156, 57,249,179, 79,191,190,131,148, 50, 47,175, 26, 71, 97,251, 23,116, 0,241, 78,
+221, 86, 45,130, 67,174, 92,179, 42,202,195, 50, 5,249, 99, 66,190,178, 66,199, 12, 75,149,107,127,119,246, 27, 86,171,213,143,
+ 44, 43, 1, 53, 26, 77,230,115, 88, 8,111,161, 50,198, 21, 93,237,127,189,209, 72,167, 83,147,201, 4,119,119,119,171, 53,180,
+ 1, 22, 81,214, 98, 97,181,188,186,198,164,135,101,217, 95, 19, 19, 19, 67,102,206,156,233,182,107,215,174,251, 12,195,112,103,
+207,158,109, 8, 8, 8,224, 93,190,124,217, 8,128, 24, 50,100, 8, 39, 63, 63,159,205,201,201, 81,252,229, 47,127, 41,123,251,
+237,183,189,111,223,190,205, 55,153, 76,245, 5, 45,124,144,149,149, 53,162, 1,215,234,196,164, 73,147,238,163,241,219,216, 52,
+ 57,167, 5, 10,101, 41,238, 63,202, 49, 71, 48, 55,129,121, 92, 96,245,171, 50, 26,105, 40, 74,139, 29,182,104,101, 60,204, 49,
+111, 49,198,128, 97,114,205,124,149, 14,241,108, 73,121,253,189, 9,135, 51,112,249,242,229, 99, 72,146, 36,175, 93,187,166, 91,
+187,118,109, 86, 81, 81,209,120, 0,153, 0, 80, 82, 82, 50, 52, 38, 38,230,123, 59, 66, 57,212,134,100,163,209,216,127,233,210,
+165,239, 1, 24, 8,160,133,153,251,178,217,146,213,208, 8,230,133, 74,165,114,228,152, 49, 99,206, 82, 20,213,202,166, 30,249,
+ 0,144, 91,234, 5,203,178,126, 5, 5, 5,175,216, 67, 72, 16,196,134,166,106, 72,154,146,187,145,237,208, 11,177,146,241,252,
+249,243,159,141, 31, 63,158,211,178,101,203,255,107,217,178, 37, 89, 82, 82, 2,181, 90, 13,146, 36, 17, 16, 16,128,206,157, 59,
+ 35, 32, 32,192,148,146,146,178,234,195, 15, 63,172, 55, 38, 95,199,142, 29,219, 24,141,198,151, 72,146,108, 3,160, 13,203,178,
+109, 8,130,104, 3,192, 11, 0,100, 50,153, 44, 36, 36,132,211,175, 95, 63,244,237,219, 23, 23, 47, 94,196,129, 3, 7,118, 2,
+ 56, 99,107,205,170,174, 69,158, 7, 36,247, 0,219,233, 22,136,164,158, 24, 66,152,112,145, 37, 49,180,115,188, 53,206, 94,117,
+145, 85,251,166,210, 53,152,254, 70, 13, 31, 62,220, 90,225,236,232, 84, 30,213, 87,249,138,138,138, 70,205,154, 53,171, 10, 39,
+195, 48,186,226,226,226,119, 7, 12, 24,176,133,162, 40, 65,181, 2,251,184,176,176,240,169,238,213, 87, 61,142,214,168, 49,175,
+201, 27,203, 41,229,145, 47,165,157,248, 15, 10, 10,229,248, 49, 33,191,164, 76,207, 12, 77,151,151, 39, 54, 69,250, 31, 63,126,
+ 60,250, 5, 80,252, 53,137,214,198,110,158, 93,100, 71, 64,210,250,246,168, 35,204,225, 68,156, 82,201,243,243,243,215,125,252,
+241,199, 35, 87,173, 90,229,123,234,212, 41,153,101,128,242,198, 27,111, 20, 38, 38, 38, 14, 2, 32,168,168,168, 56,183,106,213,
+ 42,223,168,168, 40,111, 0,222, 0, 48,118,236,216,130,130,130,130,205,112,161, 78, 24,141,198,236,206, 29, 67,173, 3, 63,219,
+144, 14,182,159,105,154,206,118,132,175, 38, 30,219,115,134, 97,234,228,163, 40,234,131,190,125,251, 82, 31,124,240, 65,193,169,
+ 83,167, 44, 27,233,218, 42,180,180,122,130,146,218, 3, 29,128,181,230,195,153,208, 40, 20,138,254, 14,126,135,113,149,198, 26,
+ 7,148,142,156, 63, 19, 28, 57,114,228,147,201,147, 39,199,120,121,121,237,105,211,166, 77,168,191,191,191, 76, 36, 18, 65,167,
+211,149,233,245,250,187,105,105,105, 83, 63,249,228,147, 7,118, 89, 56, 98, 98, 40, 0, 60,147,201, 36, 36, 73, 82, 2, 64, 70,
+ 16,132,167, 69,104, 17, 4, 1,131,193,128, 71,143, 30, 97,217,178,101,204,249,243,231,191, 4,240,169, 3, 3,215,222, 0,124,
+109,218,113, 95, 0,122, 84, 6,176, 45, 34, 8,226,102, 83,231, 23, 97,194,197, 78,183, 64, 36,247, 64, 77,253, 68,221,155, 74,
+215, 86,225,138,138,138,250, 59,187, 18,215,198, 89, 84, 84,212,242,121,169, 33, 51,116,107,247, 97,219,218, 42,251, 28, 90, 68,
+ 88, 77,231,245, 65,165,165,231,127,125, 38,105,157,142,102, 77, 6,218,244,183,244,162,242,100, 87, 59,228,116,188,236,172,186,
+228,196, 52, 37,166,166,166, 14,152, 63,127,254, 39, 98,177,184, 15, 0,148,151,151, 95,203,205,205,253, 28,230, 85,133,245, 93,
+119,161,118,200,229,242, 94,207, 35,159, 94,175,255,199,128, 1, 3,190, 98, 24,102, 61, 77,211,151,255, 7, 94, 69,133,171, 52,
+190,184,248,233,167,159, 30, 0,232, 15, 0, 19, 39, 78,164, 0,224,192,129, 3, 14,139,231,153, 51,103, 50, 44,203, 26,204,229,
+ 65,131,202,213,133, 37,150, 54, 85,163,209,148,228,230,230,166, 48, 12,147, 2,224,123, 56,190,226,214,151, 32,136,227, 44,203,
+142, 51, 11,183,227, 44,203,142,179,253, 95, 83, 91,181,234,185,165,126,103,120, 23, 42,113, 32, 25, 68,245,169,192,250,206,235,
+ 67, 90,129, 38, 22, 64, 79, 87,238,254, 79,226,126,110,110,238,140, 70, 92,119,225,197, 67,166, 94,175, 31,255, 63,244,188, 42,
+215, 43,255,147,244,127, 13, 16, 88, 22,164,164,164, 52,153,139,192,179, 70,167, 91, 85, 7,224,213,207,109, 16, 89,147,240,114,
+ 9, 45, 23, 92,112,193, 5, 23, 26, 3,165, 43, 11, 92,248, 51,195,226,155,101, 57,175,197, 71,171,186,127,150,245,156, 64,237,
+ 43, 7, 28,217,149,188, 33,171, 36,206,185, 56, 93,156, 46, 78, 23,167,139,243,153,115,122, 0, 8, 1,176,166,158,251,170,175,
+ 46, 44, 0, 32, 7, 96,116,229,167,139,179, 17,250,193, 46,176, 44, 59,182,174,169, 67,130, 32, 78, 52,149,208,178, 58,195,247,
+192,242,206,183,176,220,114,110,175,208,106,106, 68,184, 56, 93,156, 46, 78, 23,167,139,211,197,233,226,116,113, 54, 82,104, 13,
+251,240,195, 15, 63, 66,101,104, 12,246,195, 15, 63,252,136,101,217,177,149,151,216,177, 77,249,219, 73, 61, 49, 36,185, 7, 88,
+203,145,212, 19, 67,106,185, 53,210,230,176,194, 53,117,232,130, 11, 46,184,224,130, 11, 46, 60,239,184,178,122,245,234,242,213,
+171, 87, 91, 28,223,139, 0, 16,102, 11, 87, 81, 83,254,176,121,154,208,158,133, 82,117,111,193,243, 12, 16, 68,114,120,211,184,
+ 60,193, 48,176,166,206, 0, 0,146, 74, 98,244, 21,255,165,105,195, 30, 0,185, 13, 37,238, 0,116,108,235, 33, 58,170, 99, 24,
+ 94, 86,153,126, 98,106,229, 54, 7, 14, 99, 34, 16, 46,224,243,127, 17,120,120,136,106,186,174, 83, 42,181, 58,189,126,228, 1,
+224, 87, 87, 29,112,193, 5, 23, 92,112,225, 5,129,196,211,211,243, 60, 73,146, 45, 45,255,176,141, 59, 88, 61, 6, 33,195, 48,
+121, 10,133, 98, 36, 42,167,138,159, 38,167,237,247,245,104, 96, 95,238,108, 56, 58,117,200, 1,170, 68, 97,125, 42, 59,102, 83,
+ 92,193,219,110,238, 30, 43,255, 58,235, 31,222,237,218,135, 18,205,155, 55, 3, 88, 32, 51, 43,219, 63,227, 94,250,136,159,118,
+125,253,126,169, 74,177,204,168,211,253,199, 81,238,142,128,164,133, 84,112,249, 63, 31,190,229,193, 1,141, 55, 87,236, 61, 77,
+168, 13,205, 83, 42,151,155, 58, 36,178, 60,188,189,207,172, 62,119, 78,228,217,173, 91,149,107, 44,203, 86,238,175,247,251,239,
+162,255, 27, 57,242,204, 68,133, 98,148, 75,108,253, 41, 17, 32,147,201, 22,114,185,220,161, 6,131,161, 37,159,207,207, 98, 24,
+ 38,182,164,164,100, 35,128, 28, 87,246,252,185, 17, 26, 32, 25, 20,218,166,229,222,220,252,130,132,210, 10,253,236,180, 92,181,
+194,149, 43, 14,163,174,253, 53,159,217,222,155, 0, 32,149, 74,127, 35, 73, 50,216, 86, 4, 88,246,236,181,156, 87,255,107, 50,
+153, 30, 40, 20,138, 1,117,208,182,241,242,242,218, 2,160,119,125, 1,147,205,177,217,110, 42, 20,138,119, 81,251,106, 61, 55,
+ 79, 79,207,207, 8,130,152, 68,146, 36, 85,223, 51,153, 76, 38,134,101,217,253, 37, 37, 37,159, 2, 40,171,237, 62, 79, 79,207,
+115,169,169,169,189,253,252,252,234,181,210,208, 52,141,204,204, 76,223, 62,125,250, 92, 82, 40, 20, 29,154,146,243,105,107,145,
+134,162,142, 85,135,181, 22,116, 0, 85,246, 23,106,210,136,172, 60,161,244,104,255,193,163,134,205,123,239, 3,201,173,196,187,
+248,229,226, 85,148,106,116,160, 72, 18, 30,110, 98,180,111,255, 18,177, 33,250,160,207,206,173, 27,214, 95,139, 59, 59,182, 66,
+163,250,139, 67, 50, 93,204, 89,182,228,245, 62, 18,111, 47, 6, 48, 49,248,231,152,238,146,255, 59,158,176, 12,229,244, 71, 14,
+139,172,243,231,197,133, 5, 5,136, 10, 10, 2,135,166, 33, 36, 73, 8, 9, 2, 66,146,132, 68, 40,196,232, 29, 59,240,249,169,
+ 83,226, 79, 94,121,197, 37,182,254,100,144, 74,165,179,130,130,130,214,110,223,190,221,187,117,235,214,144, 72, 36, 80, 40, 20,
+ 62,105,105,105, 61, 22, 45, 90, 52, 35, 47, 47,239,227,210,210,210,109,174,156,250,243,194,100,194,180,239, 86,190,219, 44,239,
+241,189,102,115, 87,237,107, 79,120, 51, 67,239, 22,107,243, 93, 57, 99, 55,122, 0, 72, 64,205,251,151,214,117,173, 86, 8,133,
+194,130,138,138, 10,191,186,238,225,243,249,133,122,189,222,191, 62, 46,146, 36,131,115,114,114,252,196, 98, 49, 24,134, 49,239,
+ 6, 96,178, 14,164,109,119, 63, 49, 7,170, 69,135, 14, 29, 12,117,113,186,185,185,125, 83, 88, 88, 24, 97,217, 39,208, 70, 80,
+213,136,156,156,156,136, 78,157, 58,125, 83, 86, 86, 54,178, 22,241,242,217,123,239,189,183,176, 75,151, 46, 22, 43,144,121, 23,
+132,202,191,114,185, 28,243,231,207,183,254,134,201,100,194,217,179,103,223,155, 53,107, 22, 74, 74, 74, 22,213,241,236, 45,253,
+252,252, 8,243,134,226,181, 98,249,242,229, 88,190,124, 57,190,254,250,107,130,203,229,122,212,147,159, 78,225,124, 90, 90,164,
+ 33, 22,172,122, 34,195,159, 64, 85,223,172, 19, 79, 8,173,167, 1,138, 43,248, 91,239, 1, 17, 67,231, 47, 92, 34,217,247,243,
+ 5,164,165,252,142,212,203, 63, 84,185,167,215,200, 89,200,151,151, 97,214,188,127, 74, 9,138, 51, 52,238,220,145,191, 25,117,
+218,239,236,180,102,249,183, 20,240,255,222,175, 79,103,110,142, 40, 13, 1,158, 34, 12,236,217,150,219,252,204,157,191,107, 64,
+127,149, 82,185, 74,198, 33,145,181,253,173,183, 48,200,104,132, 31, 69,129, 34, 8, 80, 0, 72,130, 64,133, 78,135,155,211,166,
+161,207,238,221,248,244,216, 49,241,103,175,190,234,144,216,146, 72, 36,183, 8,130,240, 84,171,213, 99, 81,185,177,244,139,128,
+ 78, 82,169,244, 4,203,178, 37, 26,141,166,199,115,148,174, 64, 84,206,209, 87, 31, 29,243, 80,185,162,202,161,157,133, 5, 2,
+193,219, 19, 39, 78,220,176,121,243,102,113, 65, 65, 1,114,115,115,193, 48, 12,132, 66, 33,218,181,107, 71,156, 59,119,206,123,
+201,146, 37,235, 78,156, 56, 33, 40, 43, 43,251,202,145,129, 13,151,203,141,246,242,242,122,197,223,223, 95, 82, 88, 88, 88,174,
+ 84, 42,207,234,116,186,183,209,240,109, 83, 72, 46,151, 59, 53, 36, 36,228,181,160,160, 32,255,156,156, 28,121,118,118,246, 81,
+157, 78,183, 19, 13,220,168,217, 38, 79,187,193, 28,173, 30, 64, 94, 72, 72, 72,210,163, 71,143, 10,157,200,153, 27, 18, 18,146,
+220, 0, 78, 9,128,159, 0, 4,213,115, 95, 46,128,201,112,208,154,109,205, 88,214,116,114,197,198,237,179,163,102, 14, 36,190,
+ 91, 20,209,238,157,175,207, 93, 37,121,236,224,148,188,138, 44,151,134,178, 79,100,153,183,180,170, 46,168,234,186, 86, 39,116,
+ 58,157,175,193, 96, 0,183,150,205,226, 53, 26, 13,220,220,220,124,237, 77,164, 72, 36,194, 15, 63,252, 0, 46,151, 11, 46,151,
+139,146,146, 18, 4, 7, 7, 91,207,121, 60,158,245,115,139, 22, 45,234,229, 99, 24,166, 15, 69, 81, 80,171,213, 96, 24,198,122,
+ 40,149, 74,176, 44, 11,129, 64, 0,134,169,220,206,201,230,122,159,218,248, 8,130,152, 20, 20, 20,132,125,251,246, 65,175,215,
+ 63,113, 93, 38,147, 33, 49,241,143, 77, 70, 40,138, 66,223,190,125, 73,130, 32, 38, 1, 88, 84, 7, 47, 11, 0,145,145,145,160,
+ 40, 10, 20, 69,129, 36, 73,235,103,203,193, 48, 12,150, 47, 95,142,106, 91,147, 61, 53,206,231, 13,245, 68,134,207, 67, 45, 62,
+ 90,100, 19,167,203,118,137,103,144, 88, 34,251,226,221,127,252, 83,122,226,210, 29,100,102,101, 62, 33,178, 0,224,183, 95,118,
+ 34, 47, 55, 7, 9,169,217,152,250,183, 5, 82,153,204,227,139,106, 13,106,173,203, 70,221,221,120, 95,126, 56,121,160, 80,109,
+204, 69,153, 39, 64,181,225,131, 43,214, 96,201,184,110, 2,153, 27,111,173, 61,233, 20,240,249,191,172, 62,119,206, 42,178,194,
+117, 58, 8, 24, 6, 52,195, 88, 69,150,158,166,161,213,235, 17,168, 86, 35, 99,214, 44,176, 70, 35, 62, 62,124, 88, 44,224,243,
+127,177, 39,157, 0,192,227,241, 2,143, 30, 61,218,162,107,215,174, 23, 97,127, 48,211,115, 77,252,142,234, 66,207,238,221,187,
+199,238,222,189,187, 5,143,199, 11,116, 6,167, 80, 40,156, 32,145, 72,138,132, 66,225,132, 6,166,147, 4,176, 98,246,236,217,
+241, 47,189,244,210, 5,179,176,178,138,154,151, 94,122,233,220,236,217,179,111, 1, 88, 94, 75, 89,175,137,179, 89, 80, 80,208,
+202,205,155, 55,139,211,211,211,145,147,147, 3,163,209,136, 55,223,124, 19, 12,195, 64,171,213, 66,175,215, 99,205,154, 53, 18,
+111,111,239,101,168,220, 40,216,158,103,231,185,187,187,167,239,218,181,107,226,195,135, 15,165, 23, 46, 92, 32, 18, 19, 19, 37,
+235,214,173, 27,239,237,237,157, 6, 64,208,128,252, 36, 3, 3, 3,191, 59,114,228,200,187,137,137,137,193,135, 14, 29,226, 94,
+187,118, 45,112,235,214,173,115, 2, 3, 3,119, 3,160, 26,248,142,122,136,197,226, 17,139, 23, 47, 54, 93,185,114, 37,231,202,
+149, 43, 57, 27, 54,108,192,160, 65,131,194,163,162,162,194, 26,200,217,211,205,205,109,248,226,197,139, 77,113,113,113,185,215,
+175, 95,207, 94,183,110, 29, 57,124,248,240,129, 43, 87,174,236,230, 32,231, 79, 87,174, 92, 25,146,149,149,213, 58, 59, 59,187,
+ 85,118,118,118, 72,118,118,118, 72, 78, 78, 78,203,188,188,188, 22,249,249,249,205, 11, 11, 11,155,199,198,198, 14, 4,176,215,
+ 30,206, 80,127,201,187,139,222,140, 40, 95,246,183, 49,236, 71,211, 95,102,151,188, 57,132,125,101,112,215,159, 41, 14,135,184,
+158,156,137, 96,119, 96,231,252,222, 45,155,251, 72, 18, 59,123, 73,219, 63,103,117,243,121,227,228, 88,132,148, 66,161,192,137,
+ 19, 39, 96,182, 94,245,176, 21, 89,165,165,165,200,203,203,179, 92,227,216,147, 78,153, 76,118,126,251,246,237,108, 69, 69, 5,
+ 84, 42, 21, 10, 11, 11,145,149,149,133,140,140, 12, 20, 23, 23,227,238,221,187, 16,139,197,231,237, 73, 39, 65, 16, 96, 24,198,
+ 42,164,206,158, 61,139,217,179,103, 67,161, 80, 88,255,199,225,112,172,159, 45,223,169,143,211, 98,121, 98, 24, 6,215,175, 95,
+199,220,185,115,177, 97,195, 6,236,221,187, 23,199,143, 31,135, 66,161,176,138, 45,154,166,235,229,148,203,229, 48,153,236, 27,
+ 51,177, 44, 11,149, 74,101,247,123,183, 21, 64, 28, 14,231, 9, 81,100, 57, 28, 41, 75,141,228,124,110, 97, 71,100,248,218, 71,
+216,150, 15,102, 83,221,208,166, 74, 36,201,225, 77,157, 52,243, 61,239,236,194, 82,228, 20,168, 64,145,127,244,123, 97, 17, 51,
+193,161, 72,220, 56, 83,105,184, 34, 41, 10, 42,141, 14, 74,181, 1, 19,103, 46,244,250,207,134,127, 77,165, 13, 21,117,198,120,
+233, 2,180,235, 44,149,190,222,169, 83, 11, 50, 69,144,138,176, 87, 46,131, 49, 1,108,220,171,232, 81,226, 71,117,248,133,255,
+186,166,204,176, 50, 17, 72,175,211,154,225,225, 33,242,236,214, 13, 81, 65, 65, 24,108, 52,130,199,178,120,185,160, 0,191, 47,
+ 92, 8,221,193,131, 32, 1,240, 38, 76,192,176,141, 27,113, 41, 40, 8, 1, 90, 45,148,239,191, 15,223,211,167,193,147,201, 68,
+ 40,178,111,241, 3, 65, 16, 24, 58,116, 40,206,157, 59,231, 61,122,244,232, 51,119,238,220,121,131,166,233, 75, 13,201, 91,119,
+119,247,223, 56, 28, 78,112,125,247,209, 52,157,173, 82,169, 28,222,102,132,195,225, 12,238,219,183,239,225, 67,135, 14,121, 26,
+ 12, 6,167,140, 66,248,124,254,232,241,227,199,111,255,246,219,111,101,115,230,204,217,126,252,248,241,114,189, 94,127,218,145,
+ 34, 5, 96,197,182,109,219,222,137,140,140,244,152, 51,103, 14,155,145,145, 97,107,189,242, 29, 52,104,208, 75,219,183,111, 15,
+232,221,187,247,123,115,231,206,229, 1,248,184, 62, 43,143, 84, 42,157,183,125,251,118, 31,185, 92, 14,181, 90,109,109,100,179,
+179,179, 33, 18,137, 64,146, 36, 72,146, 4,151,203,197, 23, 95,124,225, 61,111,222,188,133, 10,133, 98,161, 29, 86,178,232, 45,
+ 91,182,248,142, 28, 57,146,124,248,240, 33, 72,146,132, 80, 40,196, 91,111,189, 69,106,181, 90,207,168,168,168, 24,141, 70, 51,
+197,145, 60,228,114,185, 83,163,163,163,219,135,135,135,115, 82, 83, 83,209,191,127,127,220,184,113, 3, 19, 38, 76,224,150,149,
+149,181, 90,178,100,201,108,157, 78,231,104, 28,151, 64,177, 88,220,229,191,255,253,111, 86,243,230,205,173, 13, 75,171, 86,173,
+152,177, 99,199, 42, 82, 83, 83, 67,175, 92,185, 82, 60, 96,192, 0, 71, 54, 44,111, 38, 22,139, 59,156, 60,121, 50, 47, 42, 42,
+106,196,182,109,219,198, 3, 64,159, 62,125,142,126,254,249,231, 23, 20, 10, 69,231, 75,151, 46, 41, 6, 15, 30,156,109, 39, 95,
+ 80, 96, 96, 32, 51,127,254,124,105, 93, 55,237,216,177, 67,137,202, 13,151, 91, 3,168,115,191,182,208,144,128,101,107, 23, 78,
+ 18,129, 49,128, 53,106, 1, 67, 57, 96, 80,195,164, 47, 7,193, 19, 1, 70, 45,124, 5, 10,252, 52, 47, 84,182,116,223,253, 20,
+230, 46, 49, 54, 85, 94,118, 26, 46,212,216,212, 0, 8, 35, 8, 34,225,196,137, 19,232,219,183, 47, 78,156, 56,129,177, 99,199,
+ 38,216,138,129,196,196, 68, 12, 30, 60, 24,102,139,150, 93,190, 90, 42,149,234,195,229,203,151,199, 77,157, 58, 85, 92,165, 49,
+ 32, 73,120,120,120, 96,204,152, 49, 21, 26,141,230, 67,123, 19,202, 48, 12, 56, 28, 14,178,179,179,177, 99,199, 14,172, 90,181,
+ 10,237,218,181,131,209,104,124, 66,108,153,219, 61,187, 26, 63,154,166,113,243,230, 77,236,217,189, 27, 31, 47, 91, 6, 55, 55,
+ 55, 0,128,193, 96,128,162,164, 4, 66,161,208, 42,198,234, 17, 78,251,239,221,187,183, 48, 56, 56,184,202,148,161,229,175,185,
+205,130,201,100, 2, 77,211,168,168,168,192,134, 13, 27,104,150,101,247,215,215,255, 88, 68,209,194,133, 11,161,211,253, 97, 80,
+239,102,246, 73, 14, 9, 9, 65,247,238,221,173,231, 36, 73,178,246,114,254,103, 64, 23,104,109,238, 14, 93,190, 14, 0, 16, 28,
+ 28,140,208,208, 80, 4, 6, 6,214,202,217,212, 90,164, 33,112, 32, 50,124,237, 66,235,105,236,148,205,229, 9,135,181,105,219,
+158,200,204, 83,128,195,225, 64,226,238,131, 1,175, 45, 2, 69,145,144,122,248,128, 96,180,127, 40, 98,146, 2,135,226, 64, 81,
+166, 69, 72,235,182,164, 64, 40, 26,166,169, 71,104,201,220,185, 91, 22, 79, 25, 32, 44,166,179, 33,106, 33, 4, 99,233, 78,131,
+248, 32,189,203,240,193,232,118,162,200,163,119,182, 64,101, 28,110, 79,122, 41,154,134, 31, 69,193,192,178,248,125,225, 66,132,
+ 69, 71, 35,193, 34, 12,163,163,145, 16, 25, 9, 47, 46, 23, 2,146, 4,107, 52, 62, 49,167,111,143,208, 2,128,172,172, 44, 28,
+ 60,120,208,107,210,164, 73,135, 19, 19, 19,167, 58, 40, 54, 44, 92, 62,215,175, 95,247,107,221,186,117,173,247, 60,120,240, 0,
+189,122,245,114,120,122,138,207,231,143, 30, 62,124,248,190,131, 7, 15,186, 39, 39, 39,195,207,207,175,209, 66, 75, 32, 16, 12,
+142,136,136,216,183,107,215, 46, 89, 81, 81, 17,162,163,163,101,175,190,250,234,222,248,248,248,215,116, 58,157, 61, 98,179,138,
+200,138,142,142, 86,238,216,177,227, 63,168, 58, 69,152,183, 99,199,142,239,122,247,238,253,110,100,100,164, 7,128,119,204,190,
+ 3,117,138, 45,129, 64, 48,180, 77,155, 54, 85, 70,181, 2, 65,165,177, 73, 34,145,192,221,221, 29, 60, 30, 15, 58,157, 14, 97,
+ 97, 97, 4,159,207, 31,104,207, 51,187,185,185, 69,188,254,250,235,228,229,203,151,145,159,159, 15, 15, 15, 15, 72,165, 82, 48,
+ 12,131, 57,115,230, 80, 27, 54,108, 24,170,209, 56, 54,195,213,188,121,243,241, 35, 70,140,224, 36, 37, 37,225,225,195,135,208,
+233,116, 72, 75, 75,131, 76, 38,195,244,233,211,121,107,215,174,125, 53, 39, 39,199, 81,161,213, 37, 50, 50,178,192, 86,100, 89,
+ 32,145, 72,136,246,237,219, 43,188,189,189,123, 2,112, 68,104,117, 89,176, 96, 65,225,234,213,171, 7,159, 59,119,206, 26,244,
+242,220,185,115, 75, 0,224,171,175,190,138,243,245,245,237, 9,192, 94,161, 5,150,101, 77,127,253,235, 95, 31,243,249,124,112,
+185, 92,240,249,252, 42, 7,143,199, 3, 73,146,110,150,234, 92, 31, 95,202,195,252, 53,115,150,172, 91, 39, 17, 82,220,127,188,
+214, 21, 45, 60,120,128,200, 11,188,193, 75, 65,120, 84, 26, 45, 89,197, 3,224,151,165, 88,255,186,130,140,252,190,226,103, 3,
+227,233,123,191,164,164,236, 25,247, 1,189, 1,252, 27,149,155,235, 46, 3,112,253, 57,233,155,110, 1, 8, 27, 59,118,172, 85,
+108,157, 58,117, 10,163, 71,143,134, 82,169, 68, 82, 82,146,173,200,114,100,131,229, 91, 70,163,241,246, 15, 63,252, 48, 96,210,
+164, 73,132, 77,253, 66,114,114, 50,238,222,189,155, 96, 47, 31, 73,146, 48,153, 76,224,114,185, 88,183,110, 29, 12, 6, 3,190,
+255,254,123, 28, 56,112, 0, 36, 73,130, 32, 8, 16, 4, 1,153, 76,134,175,191,254,218,161,118,143, 97, 24,196,196,196, 96,233,
+146, 37, 86,145,101,158,201, 64,128,191, 63,188,125,124,112,255,254,253,122,133, 86, 73, 73,201,167,199,142, 29, 67, 93,206,240,
+199,142, 29,179,126,174,230, 12, 95,127, 63, 71, 81,208,233,116,120,249,229, 63,182,138, 93,176, 96,129,245,179, 66,161, 0, 69,
+ 81,150,188, 32,236,229,212,178,192,107,194, 63,254, 55,230,131, 15,170, 88,232,106,227,124, 26, 90,196, 89,214,173, 26,196, 86,
+152,217, 58, 27, 8, 96, 44, 42,125,180,242,128,167,232,163,197,178,166, 14,193,205,130,112, 59, 35, 17, 28,138, 2,223,221, 7,
+238, 94,254, 48,209,122,168, 10, 31,226,226,161,111, 0, 0,219, 98,246,131, 36, 73,112, 56, 20,116,122, 6,237, 90, 4,193,100,
+ 50,117,168,139,187, 35, 48, 96,168,191, 79,223,230, 45, 61,136, 36,207,135,104,239,231, 93,109, 34, 68,128,118,185, 82,162,191,
+ 84,212,167, 68, 85, 58, 32, 5,184, 82,175, 24, 32, 73,144, 4, 1, 49,143, 7,221,193,131,149, 94,155,209,149,125, 86, 66,100,
+ 36,200,159,127,134,155, 64, 0,138, 32,192, 49,155,160, 27,130,210,210, 82, 16, 4,129, 61,123,246,120, 78,159, 62,125,111, 82,
+ 82, 82,100, 69, 69,197, 65, 71, 56,148, 74,229,216,240,240,240, 11, 49, 49, 49,190, 1, 1, 1, 79, 92,207,207,207,199,204,153,
+ 51,139,148, 74,165, 67, 65,221,132, 66,225,132,241,227,199,111,223,185,115,167,236,222,189,123, 80,171,213,240,245,245,109,108,
+ 81,232,217,175, 95,191,195, 7, 15, 30,116,207,207,207,135, 74,165,130, 78,167,195,158, 61,123, 60,198,140, 25,115, 48, 53, 53,
+117, 52,128,248,122, 56, 62,177, 21, 89,115,231,206,189, 3,192, 15,192,150,234, 26,212,124,173,171,141,216, 82, 1, 88, 91,199,
+ 72,180,165, 68, 34, 65, 97, 97, 33,102,206,156,137,244,244, 63, 12,160, 65, 65, 65,214,145,222,253,251,247,225,235,235, 11,130,
+ 32,252,236,121,104, 95, 95, 95,169, 94,175,199,236,217,179,145,149,149, 85,133, 51, 59, 59, 27, 4, 65,136, 29,205, 72,127,127,
+127,127,173, 86,139, 65,131, 6,161,162,162,114, 95,223,201,147, 39,131,203,229,162,176,176, 16, 92, 46,215,167, 1,239,199,103,
+236,216,177,181,134, 86,145,201,100, 6, 79, 79,207,142, 14,114,122,191,250,234,171, 57,209,209,209, 79, 44,108,185,113,227,198,
+ 95,188,188,188,206,121,121,121,181,119,144,211,100, 43,170,120, 60, 94, 21,161,197,229,114, 65,146,164,221, 62,106,233,133,154,
+205, 28, 34,175,251,234,249, 35,103,182,240,115, 7,171, 46, 0,111,248,167,184, 93, 36,194,186, 13, 39, 1, 0,255,124,171, 23,
+186, 69,172,128,126,231, 72, 44,236, 79,241,167,101,235, 22, 3,248,228, 25,183,249, 95, 2,176,172,130,251, 22, 64,247,231,168,
+ 63,178,138,173, 83,167, 78,161,115,231,206, 40, 41, 41, 65,106,106,106, 67, 69,150,165,189, 91,250,217,103,159,253,242,198, 27,
+111, 72, 44,131, 86,145, 72,132,247,223,127, 95,171, 86,171,151, 58, 84,136, 76, 38,112, 56, 28,235, 32, 89, 40, 20, 34, 44, 44,
+204, 42,178, 8,130, 64,121,121, 57, 56, 28,142,101, 69, 34, 97,103, 26, 17, 24, 16, 0, 55, 55, 55,180,109,215, 14,247,204,237,
+136,229,179, 64, 32, 0, 65, 16,160,233,122, 13,121,101,102,167,246, 69,206,238,146, 45,162,168, 78,211,113, 80, 16, 76, 38,147,
+ 69,100,178,206,224,244,241,241,129, 90,173,182,151,243,185, 68, 45, 22, 45,139,208, 26,139, 74, 95,173, 39,194, 59, 12, 1,112,
+ 17, 77,184,164,146, 0, 75,152, 88, 22, 28,138, 52,207,221, 82,160, 40, 18,138,162, 60,108,252,244, 29,179,200, 58,128, 19,113,
+169, 8,110,211,249,143,121, 92,130, 0,216,186, 11,183,175, 59, 47,122,222, 27,253, 68, 5, 68, 30, 60,130,196, 16, 10,171,233,
+ 71, 79, 30,136, 16, 18,243,135, 6,139,111, 30,171,136, 78, 81, 25,234,237, 40,132, 36, 89,233,252, 78, 16, 53, 58,247,144,230,
+107, 20, 65,128,101, 89,176, 38,199,252,142, 45, 66, 94, 36, 18,193, 96, 48,128,162, 40,108,218,180,201, 35, 34, 34, 98,139,163,
+ 66, 11, 64,114, 65, 65,193,152, 57,115,230,156,218,191,127,191,143,143,143, 79,149,209,195,156, 57,115,228, 5, 5, 5, 99,224,
+160,211, 61,151,203,221,242,237,183,223,202, 30, 61,122,132,242,242,114,136, 68, 34,107,227,211,208,242,217,167, 79,159, 51,167,
+ 79,159,246, 84,169, 84, 48, 24, 12, 16,137, 68, 96, 89, 22, 20, 69,225,199, 31,127,244, 30, 55,110,220,201,204,204,204,225,117,
+165, 85, 36, 18,189,102, 22, 78,136,140,140,244,136,140,140, 28, 2,212, 26,169,215,138,200,200, 72,143, 69,139, 22,189,170,213,
+106,215,214,241,204, 89, 10,133, 34, 64, 36, 18,225,208,161, 67,144, 74,165, 16,139,197, 8, 10, 10,130, 66,161,128, 88, 44, 6,
+203,178, 48, 26,141,150,198,162,216,158, 7, 47, 42, 42, 82,211, 52,237,126,234,212, 41, 20, 23,255,241,149, 22, 45, 90, 64,169,
+ 84,194,100, 50,149, 59,154,153,185,185,185, 5, 4, 65, 52,191,125,251, 54, 30, 61,122,132,209,163, 71,227,231,159,127, 70,175,
+ 94,149,179,195,122,189,190, 33, 65,252, 24,138,162,216, 58,202, 45, 1,192,211,153,156,230,206,203, 33, 78,147,201,100,178,136,
+ 44,219,191,182,226,171,158,223,172, 82,157, 59,250, 75,119,172,158, 55, 98,230,200,206, 62,208, 22, 61,132,208,205, 7,132, 71,
+ 8,214,109, 56,137,164, 7,149,239,107,221,222,223,176, 47,106, 12, 32,242, 66,168,187, 28, 1,110,156,215,239, 22, 62,115,161,
+229,110, 59, 78,120, 94, 59,166,209,163, 71, 67,161, 80, 64, 42,149, 58,195, 63,231,170, 86,171, 77, 59,114,228, 72,207,177, 99,
+199,130,207,231, 35, 45, 45, 13,241,241,241,169, 0,174, 58, 42,180,184, 92, 46, 62,251,236, 51,188,243,206, 59,240,247,247,199,
+210,165, 75,193,225,112,172, 7, 65, 16, 86, 11,151, 35,240,243,175,123,225,163,197, 33,190, 62, 99,184,187,187,251,103, 36, 73,
+ 78,162,236,200, 56,134, 97, 24,147,201,180, 95,165, 82,213, 25,222,193,226,184,110,207,187,176,205,131,122,250,180, 70,115, 62,
+ 13, 45,210, 16, 84, 95,109, 88,139, 69,203,178,234,240,137,173,128, 44, 79,121,209,108,178,187,216, 84, 9, 37, 72,234,110,118,
+ 78, 46,188, 61,165,102,145,101, 62, 72, 18,221, 58, 87, 14,102, 79,196,165, 34,184,117,103,112, 40, 10, 28,138,130, 84, 36, 64,
+ 65,126, 30, 56, 28,242,110,109,188, 93, 40,188,241, 70,251,230, 33,158,222, 92,200,125,245, 8,244,175,197, 48,208,211, 13,193,
+129,124,140,242, 22,182,236, 66,225,141,186,173,111,172, 85,104, 25,104, 26,188, 9, 19,172,211,133, 9,145,145, 8,139,142, 6,
+ 51,126, 60, 52, 6, 67, 21, 83,113, 67,133,150, 72, 36, 66, 89, 89, 25,166, 78,157,170, 48, 26,141,239, 54, 48,139,227,139,139,
+139, 39, 78,155, 54,173,216, 34, 96, 12, 6, 3,166, 77,155, 86, 92, 92, 92, 60,209, 14, 43,209, 19, 48, 26,141,239,246,234,213,
+ 75, 33,151,203,173,233,108, 72,131, 99,129,151,151,215,137, 29, 59,118,120,233,116, 58,208, 52,109,229, 20,137, 68,160, 40, 10,
+190,190,190,216,183,111,159,175,151,151, 87,157,123, 86,105,181,218, 35,209,209,209, 74, 0,136,142,142, 86, 18, 4, 17, 75, 16,
+196, 86,130, 32,190,173,118,108, 37, 8, 34,214,246, 94,173, 86,123,184, 46,110,189, 94, 31,155,154,154,202,138,197, 98, 80, 20,
+ 5,131,193, 0,161, 80,104, 53,137,151,150,150, 66,171,173,156,230,142,143,143,135,209,104,188,108,207,179,151,149,149,157,143,
+137,137, 49,181,104,209, 2,157, 59,119, 70, 88, 88, 24,250,245,235,135,150, 45, 91,226,243,207, 63,103, 52, 26,141,195,117, 47,
+ 55, 55,247,196, 79, 63,253,100,108,222,188, 57,122,246,236, 9,129, 64,128,110,221,186, 33, 40, 40, 8,171, 86,173,210,171, 84,
+170, 83, 13,120, 77,153,137,137,137, 84, 29, 34, 87, 6, 59, 86,239, 86, 67,214,205,155, 55,169,126,253,250, 29,173,126,161, 79,
+159, 62, 71,165, 82,169,187,197,196,238,200,136,220, 86, 92, 9, 4, 2,235, 97,249, 63,135,195,177,103,244, 67,118,244,151,238,
+248,226,157, 97, 51, 71,118,246,196,209,243,215,193, 51, 40, 1,125, 29, 51,130,140, 17, 4, 79, 2,127,119,110,240,115,208, 7,
+ 44, 4,112, 7,149,113,152,150,226,249,130,213,241,189,184,184, 24,169,169,169,136,143,143, 71,191,126,253,112,249,242,101,224,
+ 15, 7,121,135,161, 82,169,150, 70, 69, 69,105, 44, 43,249,150, 45, 91,166, 45, 43, 43, 91,234,104, 27,204,178, 44,184, 92, 46,
+ 66, 67, 67,177,104,209, 34,156, 60,121, 18,105,105,105, 48, 26,141, 86, 33,100,241,201,116,196,162,197,227,241,224,239,239, 15,
+163,209,104,181,102, 1,192,189,244,116,112, 56, 28,152, 76, 38,232,245,250,122, 45, 90,238,238,238,159,109,223,190,253, 61,185,
+ 92, 30, 88, 84, 84,228,103,123, 20, 20, 20,248,229,229,229,249,229,228,228,248,101,101,101,249, 61,126,252,216,239,225,195,135,
+129,107,214,172,121,207,221,221,253, 51,123,210, 73, 81, 20,186,117,235,134, 5, 11, 22, 88,143,205,155, 55, 91,143,139, 23, 47,
+ 58,236,188, 78, 81, 20, 66,151,175,195,152, 34,214,122,156,244, 37,172, 71,210, 63,231,214,197,217,228, 90,164, 65,250,197,188,
+218,208,118, 99,233, 26, 96, 89,117,104,105,203,172,110, 27,213,157,225,155, 12,180,190,226,194,131,140,244, 97,161, 93,122,147,
+249,114,117,149,229,159, 97, 67, 39,130, 32, 8, 52,107,221, 25, 20,135, 3,138, 34,193,161, 40,120,200,132, 72,189,125,219,164,
+211,106, 47,212,196, 57, 4,224,240, 69,252,205,111,141,234, 38,204,229, 23,194, 55, 80, 2, 30,183, 82, 59,178, 15, 38, 86,235,
+ 33, 56, 64, 23, 55,204,202,241, 22, 93, 40,168,216,236,169, 49, 28,141,173,101, 4,104, 50,153, 32, 21, 8, 80,161,211, 65, 75,
+211, 24,186,113,163,117,186,144, 36, 8,220, 2,208,117,227, 70, 92, 57,120, 16, 50, 62, 31, 16, 8,236, 94, 21, 82,147,208,146,
+203,229,152, 49, 99, 70,113, 94, 94,222,244,134,248,104, 89,160,211,233, 46,229,231,231, 79,159, 56,113,226,158, 67,135, 14,121,
+ 77,156, 56, 81,145,159,159, 63,221, 78,191,167, 39, 80, 81, 81,113, 48, 43, 43,171,124,198,140, 25,187,247,238,221,235,237,227,
+227, 99, 29,137, 52,168,176, 18,132,124,196,136, 17, 2,123,238,171,231,150, 40,179,115,251, 59,102,203, 86,215,185,115,231, 94,
+ 65,165,255,149, 45,150,111,219,182,109,178,205, 20,227, 86, 0, 27,235, 34, 46, 45, 45,253,118,209,162, 69,127,187,116,233,146,
+143, 80, 40, 4, 65, 16,224,241,120,104,219,182,173,117, 21, 13,151,203, 5,203,178,248,224,131, 15,228,133,133,133, 95,217,249,
+110,230, 70, 69, 69, 13,174,168,168,240,156, 49, 99, 6, 37, 20, 10, 81, 80, 80,128, 13, 27, 54, 48, 59,119,238, 84,106, 52,154,
+153, 13, 16,194, 49,255,250,215,191,134,170,213,234,214,115,230,204,225,169, 84, 42,104,181, 90, 44, 94,188, 88,255,221,119,223,
+101,107,181, 90,135, 3,254,246,239,223, 63,227,241,227,199, 3,203,203,203, 75,196, 98,113,117,107, 31, 33,145, 72,122, 3,216,
+237, 8,103, 88, 88,216,253,204,204,204,126, 43, 86,172,136, 53, 26,141,220, 27, 55,110, 88,157,225, 55,109,218,116, 81, 40, 20,
+142,128,131,155,175, 18, 4, 97, 18, 8, 4, 85, 44, 88,213, 63,115, 56,156,122,219,180, 14, 1,226, 21, 95,188, 61,120,230,203,
+ 29,221,113,228,252,111,136, 58,252,224,110,187,153,190,161, 47,121, 22,193, 84,148,138,127,190,213, 11,235,246,254, 6,160,114,
+234,208, 84,152, 4,182,228, 62, 88,183,230,120,168,144,231, 62, 7,125,192, 69, 84,134,204,120,222, 80, 69,100, 37, 37, 37, 97,
+216,176, 97, 0,128,203,151, 47, 35, 60, 60, 28,151, 47, 95,198,192,129, 3, 29,142,165,101,198,127, 75, 75, 75, 31, 95,188,120,
+177, 83,243,230,205,113,245,234,213,135, 0,254,235,104, 34, 45, 66,139,195,225,224,205, 55,223, 68, 68, 68, 4, 90,180,104, 81,
+101,181,161,229,179, 35, 98,131,166,105,116,233,210, 5, 58,189, 30, 60, 30,207, 58, 53,201,225,112,224,235,231,135,140,140, 12,
+187, 44, 90, 36, 73, 78,122,237,181,215,200,228,228,100, 76,153, 50, 5,123,246,236,169,245,222,105,211,166,225,135, 31,126,192,
+107,175,189, 70,126,244,209, 71,117,134,119,176, 56,161,219,243, 76,150,126,186,190,118,223, 89,156, 77,173, 69, 26, 3,155,208,
+ 14, 53, 78,154,212,240,191,232, 42, 66,203, 38, 72, 88,211, 8, 45,218,176,231,231,239,191, 89,212,111,203, 64,223, 64, 63,119,
+ 40, 84, 90,171,216, 74,184,120, 0, 0,240,198,220,149,224, 80,149, 83,138, 50,169, 16, 34, 30,133,131,187,190,146, 27, 12, 21,
+ 53,150,174, 50, 46,249,206, 71, 3,218,186,243, 37, 70,148, 6,176,232,236,251,199, 78, 57, 68,235, 3, 79, 10,174, 30,158,240,
+ 73, 42,193, 91, 47, 73,101, 95, 37, 43,223,129,209,180,249,137, 14, 81,169,212, 42,111,223, 22,141,222,190, 29, 55,166, 79, 71,
+ 51,134, 65,108, 80, 16,188,184, 92,184, 11, 4, 32, 9, 2,218,227,199,113,229,208, 33,248, 11, 4,128,155, 27,232,207, 63,135,
+ 46, 53, 21,198,178, 50,109, 3, 70,102,152, 60,121,178, 92, 46,151, 79,212,235,245,151, 26,155,207, 90,173,246,116, 86, 86, 40,
+104, 68,151, 0, 0, 9, 69, 73, 68, 65, 84,214, 59,253,251,247,223, 98, 52, 26,223,213,106,181,141, 90, 25,165,215,235, 79,231,
+231,231, 79,152, 60,121,242,129,195,135, 15,251,120,120,120, 52,152,171,184,184,184,151,147,138,147, 9,192,199,102,231,246,119,
+ 34, 35, 35, 61,110,222,188,249,183, 29, 59,118,108,177, 25, 77,248,205,158, 61,251,237,106, 34,171,222, 85,135, 0, 50, 11, 11,
+ 11, 63,127,255,253,247, 87,174, 95,191, 94,106,113,124,255,253,247,223, 65,211, 52,184, 92, 46, 24,134,193,236,217,179,213,197,
+197,197,235, 80,123, 68,231, 39,138, 86,105,105,105,219, 21, 43, 86,236,216,184,113, 99, 4, 69, 81, 18,134, 97, 52,229,229,229,
+177, 21, 21, 21, 51,209,176, 56, 90,166,162,162,162, 25,159,124,242,201,140, 13, 27, 54,188, 70,146,164, 31, 77,211,242,178,178,
+178, 99, 90,173,246, 59, 52, 96, 42,233,234,213,171, 69,111,189,245,214,131,162,162,162, 14,193,193,193, 42,169, 84,170,215,235,
+245,148, 72, 36,146, 73, 36,146, 48, 0, 87, 9,130, 72,113,132, 51, 33, 33, 33,127,206,156, 57,143,116, 58, 93,232,214,173, 91,
+227,100, 50,217,121,130, 32, 8, 30,143,231, 41, 18,137,134, 1,136, 37, 8,226,158, 35,156, 36, 73,154,108,173, 87,213,253,179,
+248,124,190, 93, 62, 90,173,125,197,179, 34,218,114,112,228,194,111,136, 58,146, 25,195,176,236,161, 67, 9, 37,199,151,134, 3,
+134,253,111,161,219,196,221,149,211,133, 0, 76,133, 73, 48,236,159, 6, 66,236,131,184, 28, 46, 84, 90,195, 9,184, 80, 19,172,
+225, 29,228,114, 57,146,147,147, 45, 34, 43, 12, 0, 6, 14, 28,152, 96, 17, 91,241,241,241,232,217,179,103, 2, 0,174,163,229,
+181,180,180,244,253,169, 83,167,158, 54, 15,142,223,111,192,192,207, 42,180, 44,130,170, 69,139, 22,214,115,219,195,198, 71,203,
+ 46, 48, 12, 3, 30,143, 7, 14,135,131,192,160, 32,235,111,177, 44,139,140,140, 12, 40, 20, 10,187,132, 22, 69, 81, 20, 65, 16,
+152, 50,197,190, 5,201,127,253,235, 95, 17, 27, 27, 11,202, 78, 85, 72, 81, 20, 66, 66, 66,234,189,199,162, 75,237,229, 12, 14,
+ 14,110, 48,103, 83,107,145,134, 10,172,154, 62,215, 36,170,106,171, 16, 79, 11,185,106,181,234,227, 93,219, 55,173,159, 61,239,
+ 3,105,210,253, 2,168,212, 58, 80, 20,105,219,120,130,195,161, 32,147, 8,209, 60,192, 29,123,255,243,239,178,178, 82,229, 39,
+168,101,223,195, 22,110,188,185, 35,122,191, 36,224, 5,106, 16,218,117, 50, 40,225, 31, 34,128,205,175,101,118, 48,252, 23,188,
+146,169, 17,254,156,169,153,123,171, 68,255,164,208,210,235, 71, 46, 27, 53,234, 76,212,201,147,226, 62, 49, 49,184, 63,123, 54,
+130,180, 90, 8,204, 83,137, 36, 65, 64,202,227, 65,202,227, 85,138,172, 13, 27,160,165,105,108,156, 62,189, 92,167,215,143,114,
+164,146, 23, 23, 23, 99,252,248,241, 69,185,185,185, 99,208,128,169,189,218,160,209,104, 14, 2, 56,232, 44, 62,157, 78,119, 41,
+ 59, 59,251,149,241,227,199,159, 60,125,250,180,239,115, 18,100,206, 34,182, 12, 55,111,222,124, 59, 46, 46,238, 62,170,110, 44,
+170,140,139,139,187, 63,103,206, 28, 98,199,142, 29,223, 1,248, 23,236, 12,224,169,209,104, 54,157, 61,123, 22,131, 7, 15,254,
+215,234,213,171,189,123,245,234, 5, 63, 63, 63,148,149,149, 33, 62, 62, 30, 11, 23, 46, 84,148,150,150,174, 86, 42,149,235, 29,
+ 76,179, 65,167,211, 77,179, 93, 74,237,140,124,208,233,116, 59,243,242,242,118, 58,139,112,254,252,249,191,103,100,100, 20,251,
+250,250,246,229,241,120, 93, 81,233, 7,148, 15,224, 59, 71, 5,145, 5,243,230,205,187,157,145,145, 33,111,214,172, 89, 63, 51,
+167, 7, 42,183, 49,218,222, 0,206,220,223,126,251, 45,184,119,239,222, 36,151,203,101, 41,138, 2,151,203,101, 57, 28, 14,107,
+246,171, 97, 1,224,216,177, 99, 2, 0,117,110,155,115,191, 80,187, 98,218,191,127,253, 40, 37,191,226, 80,106, 65,249, 34, 0,
+236,254, 36,241, 47,221,124,169,145, 35,219,103, 67, 23, 61, 16,132,172, 50, 80, 37,171,206, 3, 33,241, 71,182,169, 25,150, 31,
+189,155, 79,131, 88,235,210, 84, 53,143,171, 97, 14,239,144,151,151,103, 43,178, 44, 86,171,176,129, 3, 7, 38,152, 69,150,229,
+ 90, 67,252,203,206,153, 76,166, 70,245, 97, 44,203, 34, 42, 42, 10,219,182,109, 67,125, 17,205,205,171,251,136,250,248, 44, 22,
+ 45,134, 97, 96, 48, 24,144,148,148,100,141,217,101,153, 46,180,132,118,160,105,186,206,213,234, 12,195, 48,122,189, 30, 63,254,
+248,163, 93, 98,107,223,190,125,168,168,168, 0, 83,143,130,179, 13,197,208,189,123,119, 40, 20, 10,235, 98,159,176,176, 63, 66,
+229, 25, 12, 6,135,132,171,133, 51, 52, 52, 20,114,185, 28, 22,127,225,230,211,255, 48,246,208, 26,205,159,181,220,215,106,209,
+122,234, 61,166, 64, 44, 59,221,107, 64, 68,248,244,183, 23, 74,212, 58, 6,143, 30, 61, 70, 81, 97, 30, 72,130, 68, 96,179, 96,
+180,108, 25, 2, 17,159,196,158,232,245,154,132, 43,231,127, 85,151,149,140,174,141,107,172, 59,239,202,134, 9,225,253,218,180,
+113, 35, 64, 27, 1,198, 8,208, 70,192,100,254,107,249,159,169,106,153, 75, 78, 86,178, 31,221, 82, 92, 59,161, 50,212,184,103,
+213, 68, 32,220,195,203,235,204,242, 99,199,196, 38,131, 1,197,239,191, 15, 49, 77, 67,104, 30,149, 84, 62,136, 0,244,231,159,
+ 87,138,172,105,211,202, 85, 74,165, 67, 91,240,248,248,248,252, 70, 16,132, 79, 81, 81,209, 11, 21, 25,222,215,215,247, 4,203,
+178,114,185, 92,222,235, 57, 74,151, 31, 0, 37, 0, 67, 13, 3, 9, 95, 56,238,255, 99, 65,136,175,175,239, 71, 36, 73,246,103,
+ 89,214,155, 36,201, 18,147,201,116,181,176,176,112, 13,128, 12, 87,127,250,204, 96,137, 12,223,170,158,251, 10, 1,252, 3,149,
+ 78,193,143,236, 37,239,230,238,238,174,227, 27, 15,255,165,179, 96,232,164, 48,119,180, 14,112, 3,151, 39, 68,110, 41,141,115,
+ 41,165,216,126, 49, 63, 75,107,100,198,165, 23,149, 39,186, 94, 69,157,112,250, 22, 60,206,132,151,151,215,245, 51,103,206,244,
+106,221,186, 53,105,235,240,110,137,149,103,153,222,226,112, 42,181,220,165, 75,151,232, 41, 83,166, 92, 45, 40, 40, 24, 92, 27,
+167,155,155,219, 47,119,238,220,121, 89,165, 82, 61, 33,168,108, 35,197, 91,206, 53, 26, 13,230,205,155,119,182,182, 45,120,220,
+221,221, 55,172, 95,191,254,189, 55,222,120,131,180,132,163,176, 61, 44,219, 5, 89, 14,131,193,128,221,187,119,155,190,250,234,
+171,175, 85, 42, 85,173, 83,135,129,129,129, 89,185,185,185,193,150, 80, 11,246, 4, 21, 13, 9, 9,201,123,252,248,113,208,211,
+228,124,129, 5, 87, 21,235,214, 51, 49, 77,112, 69,162,249,110, 82,207, 79,223,152,186,192, 59,164, 77, 59,194, 63,176, 25, 8,
+144, 40,200,207,193,227, 7,233,236,225,239,191, 41,214,148, 42, 62,211,106, 53,223,212,197,211, 17,104,211, 74,198,219,207,103,
+208, 30, 22, 1, 84,109,127,170, 39, 70, 28, 0, 12, 92,242,238,163, 50,227,228,148, 58,166,125, 44, 98,235,227,195,135,197,252,
+246,237,159, 8, 20,103, 50,153,160, 75, 77,197,198,233,211, 29, 22, 89, 46,184,224,130, 83,208, 26,245,199,200, 50,162, 50, 62,
+151,163, 22, 19, 34,212, 79, 50,153, 5, 38,145, 48,117, 33, 9,130, 79,179, 72, 3,139, 95,196,156,242, 45, 9,121,208,186,178,
+223, 46, 60,183,155, 74, 3,144,120,121,121,157,167, 40,170,165,197, 34, 99,107,173,175, 97, 67,233, 71, 5, 5, 5, 35, 0,212,
+181, 66,184,141,155,155,219, 55, 12,195,244,177,103, 83,105,138,162,110,148,149,149,205, 71, 29,155, 74, 55,197,170, 67,111,111,
+239,140,199,143, 31,183,177,172,162,182,237, 43,107, 90, 89,126,239,222, 61, 12, 25, 50,228,113,126,126,126,200,211,228,124, 94,
+ 81,203,170,195,231,199,162,101,131, 32,158, 64, 58,131, 47, 18, 14, 55, 25,233, 80, 16, 0,135,203,189,171,175,208, 94,208,105,
+213,187, 80,203,116,225,211,196, 68, 32, 92,192,231,255,194,147,201, 68, 53,137, 54, 99, 89,153, 86,167,215,143,116,137, 44, 23,
+ 92,112,193, 5, 23, 94, 32,180,247,242,242, 58,195,229,114, 5,182, 98,178,250,103, 11,104,154,174, 40, 42, 42, 26, 13, 32,237,
+ 41,115,254,111,194, 65, 39,181, 8,123, 57,205,199,144,231,157,179, 9,159,157,117, 34,231, 16, 51,231,242, 23, 36,157, 67,158,
+ 87, 78,203,243, 58,192, 27,225, 72, 57,114, 86,126,218,164,147,117,118, 58,155,138,211, 89,245,168,134,116,178, 77,240,222,151,
+191, 32,233, 28,242,188,113, 86, 47, 63,118,242, 58,196,105,103,153,114, 52,157,172,179,211,217, 84,156,141,173, 71,117,164,147,
+109,108, 89,170,229,221, 47,199, 11,136,228, 30, 96,147,123,128, 77,234, 89, 99,220,198,200,218,190,231,144, 35, 97, 83,173, 4,
+176,132,221, 55,243, 19,207, 43,167,109, 62, 56,115,171,128, 38,216,118,224,162,179, 57,171,229,167,179,176,220,188,194, 36, 22,
+118, 4, 28,117,228,217,157,241,222,171, 61,171, 83,120, 27, 32,178, 28,226,116, 86,185,111,106, 78,103,213,165,234,156,206, 40,
+247, 53,189,247, 38,124, 71,206, 74,167, 83,234, 82, 83,148,249, 26,202, 79,163,121,171,115, 58,163, 46, 85,231,116, 70,185,127,
+ 26,156,206,168, 75, 53,113, 58,163,220,215,246,238, 95, 84, 67,147,101,186,208, 28,226,129,176, 67,108, 69, 3, 0,217,144, 76,
+107, 66, 75,217, 80,103,115, 58, 59,205, 77, 33, 54, 29,176,192, 60,115, 78, 39,191,163,229,102, 78,103,142,110,134, 58,235, 29,
+ 53, 69,121,183,229,116, 22,127,117, 30,103,188,167,154, 56, 27,155,222, 90,210,233,244,103,111,108,185,127, 90,156, 78,126, 71,
+ 78,169, 75,213, 56,135, 58,121, 48, 48,212,230,124,185, 51, 57,157, 85,151,106, 72,103,163,223, 83, 77,156,141, 77,111, 45,233,
+116,250,179, 59,163, 15,105, 42,222,103,105,209, 98,201, 90,203, 68,116,181,227,169, 8,141,103, 54, 37,231, 32,247,159,138,211,
+193,233,153,136, 38,120,247,207, 52,157,206,228,172,158, 70,103, 78,247, 52,101, 58,157,201,233, 64, 90,255,116,156, 47,218,123,
+127, 30,243,179, 54,190,198, 76, 75,213,102, 29,109,138,116, 58,147,211, 78,238, 63, 5,103, 35,222,253,159, 14,156,231, 37, 33,
+150,140,119,242,200, 4, 78,182,192, 52,217,115, 59, 57,157, 67,155,194, 66,216, 4,112,122, 58,205, 35,229, 79,155,224,217, 95,
+148, 60,117,213, 37, 87, 93,122,238,234, 82,181, 50, 57,212,137,150, 34,167, 90,158,171,115, 58,227, 55,108, 57,156, 85, 70,155,
+250,217,157, 89,151,154,226,221,191,104,248,127,145,193,179,185, 29, 76,112,153, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130,
0};
diff --git a/source/blender/editors/datafiles/claystrips.png.c b/source/blender/editors/datafiles/claystrips.png.c
new file mode 100644
index 00000000000..b6ebc54ebb2
--- /dev/null
+++ b/source/blender/editors/datafiles/claystrips.png.c
@@ -0,0 +1,290 @@
+/* DataToC output of file <claystrips_png> */
+
+int datatoc_claystrips_png_size= 9087;
+char datatoc_claystrips_png[]= {
+137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 96, 0, 0, 0, 96, 8, 6, 0, 0, 0,226,152,
+119, 56, 0, 0, 0, 1,115, 82, 71, 66, 0,174,206, 28,233, 0, 0, 0, 6, 98, 75, 71, 68, 0,255, 0,255, 0,255,160,189,167,
+147, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,215, 1, 66, 40,155,120, 0, 0, 0, 7,116, 73, 77, 69, 7,220,
+ 3, 18, 11, 2, 3,179,242, 79,233, 0, 0, 0, 25,116, 69, 88,116, 67,111,109,109,101,110,116, 0, 67,114,101, 97,116,101,100,
+ 32,119,105,116,104, 32, 71, 73, 77, 80, 87,129, 14, 23, 0, 0, 32, 0, 73, 68, 65, 84,120,218,237,125, 91,143, 37,199,113,230,
+ 87,153, 89, 85,231,214, 51,211,195, 33, 72, 13,181, 94,131, 67,137, 23,107, 13,138, 52, 47, 35,122, 73, 8, 16,236, 39, 61, 88,
+128, 40, 81,126,144, 4,239,171,254,131,159, 23,254, 27,122,149, 13,120, 33, 8,235, 39,173, 5,173,177, 90,136, 38, 69, 64,182,
+ 41,137,226,144,115, 35,102,166, 79,159, 91, 93, 51,115, 31, 42, 34, 39, 42, 79,158,230,202,242,202, 90,123, 26,104,244,189,186,
+ 42, 51, 50,226,139, 47,190,136,147, 1,240,120,240,246,175,246,166, 30, 44,193,131, 13,120,176, 1, 15,222, 30,108,192,131, 13,
+120,240,246, 96, 3, 30,108,192,131,183,223,252,155,249,109,186,153,233,108,134, 43, 79, 60, 1,103, 45,138,162,192,227,143, 63,
+142,178, 44,225,156,195,102,179,193,123,239,189, 55,250,253, 44,203,240,225,245,235, 56, 61, 57,121,176, 1,191,210,177,211, 26,
+ 90,107,124,226, 19,159,192,107,175,189,134,171, 87,175,226,145, 71, 31,133, 82,195,129,156,148, 37, 0,192, 57, 7,107, 45,148,
+ 82,225,103,222,123,120,239,195,231, 0,112,253,250,117,188,245,214, 91,248,251,183,222,194,141,235,215,113,227,198, 13,116, 93,
+ 7,248,223,254, 28, 51,251, 77,101,194, 58,207, 49,159,205,240,228, 83, 79,225,149, 87, 94,193,139, 47,190,136,135, 47, 93,130,
+115, 14, 93,215,193, 90,139,182,235, 0, 0, 69,158, 67, 41, 21, 22, 59,203, 50,104,173,145,101,217,104,241,189, 88, 96,185, 65,
+239,191,255, 62,190,251,221,239,226,199, 63,254, 49,238,220,185,131,174,109,255,253,110, 64, 94, 20,120,242,169,167,240,217,103,
+159,197,213,171, 87,113,229,202, 21,104,173,209,117, 29,156,115, 97, 33,123,107, 97,173, 13,139,169,149, 66,150,101,232,173, 69,
+145,231,208, 90,143,172,158,223,248,107,231,220,240,238, 61, 84,150,193, 58,135,147,123,247,240, 63,254,246,111,241,191,127,244,
+ 35,124,240,193, 7, 88,157,158,254,251,217,128,203,143, 61,134, 39, 62,245, 41,124,246,217,103,241,202, 31,254, 33, 30,190,116,
+105,180,232,236,195,121, 3,156,115,104,233, 36,104,173, 81,228,121,248,122, 62,155, 5, 11,143, 23, 94,158, 6,190,142,247, 30,
+150, 54, 68, 41,133,211,211, 83,252,253,155,111,226, 39,239,188,131,159,189,251, 46,174, 93,187,246, 91,227,158,254,197, 55,224,
+241, 43, 87,240,185,207,125, 14,207, 63,255, 60,254,227,239,254, 46,142,207,159, 71,219,117,240,222, 7, 95,206, 11,159,101, 89,
+176, 92,107, 45,250,190, 71,111, 45, 12,197,136,186,105, 96,173,197,185,163, 35,104,173,247, 22, 61,254,200, 27, 32, 55,193,210,
+201,106,154, 6,187,237, 22,215,174, 93,195,123,239,189,135, 55,223,124, 19,255,248, 15,255,240,111, 99, 3,102,243, 57,254,243,
+171,175,226,229,151, 94,194, 39, 63,249, 73, 92,190,124, 57,160, 23, 0,208, 90, 67,101,217,176, 80,145,213,242,231,206, 57,180,
+109,139,182,235,160,148,130,209, 26, 93,223, 3, 0, 22,243, 57,180,214,112,206, 33,203, 50,100,116, 45,190,190,116, 67,124, 45,
+107, 45, 44,197,151,158,174,211,180, 45,154,170, 66, 93,215, 56, 57, 57,193,187, 63,251, 25,254,219, 95,255,245,191,170,107,250,
+181, 54,224,252,241, 49,190,244, 39,127,130,171, 87,175,226,194,241, 49,142, 22,139, 96,229,222,123, 24, 99,194, 63,144,110, 39,
+203,178,251, 65,150,252, 54, 91,170,115, 14,125,223, 7,235, 85, 74, 97, 62,155,133, 83, 99,140, 9,127, 27,191,141, 92,144,181,
+104,218, 22,109,219,134,191,235,186, 14,117, 93,163,218,237,176,221,237,208,181, 45,150,167,167,184,121,227, 6,254,251,223,252,
+ 13,110,223,188,249,255,199, 6, 92,124,232, 33,124,227, 27,223,192, 75, 47,191,140,217,116, 58, 44, 52, 45, 44,163, 21,137, 88,
+ 84,150, 33, 19,238,199, 57, 7,103,109,248,199,210,109,100, 89,134,190,239,131,251, 49,198, 96, 82,150,240,222,163,235, 58,204,
+231,243,209,181, 83,110, 72,186,183,237,110, 23,126,191,235,186, 1,158, 2,232,105, 51,214,235, 53,178, 44, 67, 93,215,248,201,
+ 59,239,224,175,254,242, 47,127,163,168,233, 87,218,128,115,231,207,227,235, 95,255, 58,190,240,133, 47,160, 40,138, 17, 4,140,
+177,186, 86, 10, 16, 27,194,139, 12,239,225,163,127,204, 22,203, 39,196, 57,135,166,105,208,245, 61,138, 60, 15,238,172,239,123,
+204,102,179,189, 83, 21, 47,126,223,247,225,122, 50, 22,244,125, 31, 54,131, 97,111,181,221,226,206,157, 59,152, 76, 38,200,243,
+ 28,167,167,167,248,193, 15,126,128, 31,254,240,135,216,109,183,191, 29, 27,144, 23, 5,190,248,197, 47,226,171,111,188,129,243,
+231,206, 5, 95,204, 22,205,254, 89,126, 61,242,205,188,184, 2,201,132,197,243, 62,184, 32,185, 56,117,211,160,235, 58, 76,202,
+ 18,179,217, 44,248,245,233,116,186,247,247, 62,113, 10, 56,183,144, 27, 32,175,223,247,253,144,119,120,143,182,105,112,122,122,
+138,249,124, 62, 66, 91,255,248, 79,255,132,239,125,239,123,120,255,151,191, 68,211, 52,225, 57,126, 99, 27,144, 41,133,103, 63,
+251, 89,252,151, 63,251, 51,124,250,211,159, 30,225,116,233,207,179, 44, 11,110, 72,186,128, 44,203,194,131, 75,191,205, 65, 52,
+ 88, 45,197, 1,182,126,107, 45,218,182, 69,211,182,112,206, 97, 58,153,132,107,207,102,179,224,214,148, 64, 70,222,251,209,102,
+112, 80,103,100,197,247,237, 68, 96,230,251,104,219, 22,235,213, 10,219,237, 22,211,233, 20, 69, 81,192, 24, 3,173, 53,242,162,
+192,245, 15, 63,196,219,111,191,141,255,249,119,127,135,187,119,238, 96,179,217,192, 19, 0,248,127,182, 1,153, 82,248,210,151,
+190,132,175,253,233,159, 98, 49,159, 7, 24,201, 11,200,214,158, 17,181,192,139, 41,173,159, 79, 69,140,225, 99,183, 17,252, 63,
+ 16, 78, 3, 47, 82,219,117,152, 77,167, 97,115,138,162, 24,197,154, 17,158,167, 5,229,239,117,125,143,186,174,209,245, 61, 12,
+221, 87, 79,215,102, 3,225,141,170,171, 42, 24, 24, 7,110,109, 12, 84,150,161, 44, 75, 20,101,137,174,109,241,211,159,254, 20,
+ 63,121,231, 29,252,228,237,183,113,227,198,141, 95, 59,159, 72,110,128,210, 26, 95,254,242,151,241,213, 55,222,192,156,142, 63,
+ 47,120, 88,120,122, 88,249, 49, 14,142,177, 59,226, 13, 11, 27,112,192,255,243, 6,176, 43, 50, 90,195, 24, 19, 54, 32,143, 50,
+227,216,250,229, 6, 55, 77, 19,172,221, 82, 28,145,167,129,255, 23,103,209,174,239,177,221,110, 67,188, 97,247,202,107, 96,204,
+ 64,159,221,190,125, 27,255,235, 71, 63,194,219,111,189,133, 95,252,252,231,255,124,138, 6,192,159,199,139,255,250,235,175,227,
+245,175,124, 5,243,217, 44, 88,190, 49, 38,208, 3,169,119,185,232,108,245, 90, 88,190, 76,194,216, 90, 51,250,200,139,198,139,
+202,191,163,148, 2,188, 71, 71,176,148,131,120, 81, 20, 35, 67,144,159,103,156, 97, 39,178,102,118,135,241, 41,149,208,214,211,
+ 66,247,125,143,166,105,194,117, 84,244,236,179,217, 12, 79, 92,185,130, 79, 63,249, 36, 30,122,232, 33,156, 44,151,216,172,215,
+191,230, 6,100, 25,222,248,218,215,240,229,215, 95,199,185,163,163,224,219,195,113,167,223, 73,157, 2,249,181,116, 79,241,239,
+197,249, 64,240,231,226,154, 50,142,240, 27,199, 8,165, 20,138,162,216, 63, 1,194, 0,194,198,136,132,173,167,128, 44,145, 90,
+223,247,163,216,101, 9, 26,231,121, 14, 67,207,108,140, 65, 73,236, 44,111,162,124,198,249,124,142,199, 30,123, 12, 79, 63,253,
+ 52,202,201, 4, 63,255, 21, 79, 67,112, 65,231,206,159,199,183,190,245, 45,188,244,210, 75, 56, 90, 44, 70, 15,205,150, 42, 33,
+165, 92, 28, 25,116,247, 78,132,240,205,242,251,169,192,201,239,140, 82, 36, 69,225, 9, 45, 25,173, 49,159,207, 3, 12,150, 49,
+ 68, 34, 35,240,102, 18,199,180,217,110,135, 5,213, 58,184, 34,222, 80,201,200, 42,165,208, 81, 54,174,148,194,234,244, 20, 39,
+ 39, 39,184,120,241, 34,242, 60, 15,255,131, 93, 25,255,127, 0,168,235, 26,239,190,251, 46,190,253,237,111, 99,189, 90,253,223,
+159,128,231,158,123, 14,255,245, 47,254, 2, 87, 30,127, 28,139,249, 60, 4, 43,165, 84, 8,178,236,251,226,133,148, 46, 71, 90,
+112,216, 12,233,118,132,191,150,113, 32, 70, 70,242, 20,240, 3,202,235, 74, 43,142, 99, 83, 42, 47,136,239,155, 23,159,249, 37,
+134,171,236,218,188,247,232,218, 22,206,123,148,101,137,237,118, 59, 58,185,155,205, 38, 24, 4,159, 70,254,249,133, 11, 23,240,
+194, 11, 47,224,131,235,215,113,239,238,221,143,223,128,167,159,121,230,207,191,249,205,111, 6,254, 70,107, 13,107, 45,202,178,
+ 28, 61, 92,252, 32, 33,249, 74, 88,124, 88,244,136, 32,147,167, 73, 90,105,124, 50,100,102,172,148, 26, 78,129,181,200,201, 93,
+228, 84, 47,136, 93, 86,202, 29,202,205,224,235, 4, 74,131, 2, 51, 95, 83, 22,129, 44,185, 39,165, 20,202,162,192,122,189, 70,
+215,117, 48,198,224,252,133, 11, 35, 96, 16,146,204, 44,131,166,204,253,185,231,158, 3,128,143,117, 73,234,115, 87,175, 2, 64,
+ 88,112,107, 45,180, 82, 33,250, 75,146,139, 23, 94,243,194, 75, 11, 22,254, 44,184, 4,250,158, 34,107, 83,148, 29,139,149, 9,
+ 31,179,136, 39,210,145, 69,243,169,236,201, 37, 65, 4, 76,105,253, 35, 88, 43,232, 17, 25, 51,120,241,229,102, 72, 18, 47,203,
+ 50, 20,130,254,232,251, 30,199,199,199, 33, 22,236, 8, 37, 49,194,226,211, 83, 22, 5, 52,185, 52,231, 61, 62,255,249,207,227,
+ 43, 95,253, 42, 20,253,239,116, 73, 82, 36, 81,140, 8,140, 49,163, 84, 94, 30,113, 21, 33, 12, 9, 39,101, 80,221, 91,104,233,
+ 14,232,231, 50,176,203, 13,201,196,207, 37, 94,215, 90, 67,211,105,236,105,161,242, 40,248,142,114, 11, 50,160,140, 16,150, 12,
+206, 61, 17,127,177, 27,226,205,224, 4,174,169,107,204,230,115,180, 77, 3, 99, 12,150,203, 37, 38,147, 9,180,214, 40,203,114,
+244,127,229,198, 27,173, 97,180,198, 31,188,240, 2,178, 44,195,119,190,243, 29,180, 77,147, 40,207,146,181, 3,128, 86, 10, 5,
+ 5,154,192,102, 70,254, 62, 69, 39,179,149,239,185, 24,105,229, 7, 18,177,248,243,140, 16, 6,195, 94,165, 84,192,253,158, 32,
+105,211,182, 33, 96, 34,113, 63, 1,165,208,137,115,244, 51,166,185, 25,210,242,115,179,123,100,151, 35,223,172,181,232,187, 14,
+ 57,229, 31, 23, 47, 94,132,214, 26,211,233, 52,184, 66, 94,120,173, 53,114,226,174,216,131,216,190,199, 51,207, 60,131, 63,250,
+227, 63,134,206,243,253, 13,200,232, 2, 0,160,141, 9, 46, 68,137,239, 75, 50, 77, 50,156, 42,225,191,165,127, 15, 31,227,223,
+161, 19, 49,242,223, 34, 56,243, 38,168,136, 89,101, 43,141,171,106,242,132,166,226,129, 18,240,152, 51,237, 56,144, 75, 56,202,
+207,109,180,198,108, 62, 71,223,247, 3, 45,190, 88,160,156, 78,161,180,198,114,185, 28,242, 4,250,123, 25,136,229, 73,208, 4,
+ 99,255,224,249,231,241,218,107,175,141,248,176,160,138, 96,107,103,235,144,148, 3, 91,129, 60,194,217, 30,152, 77,159,146,189,
+ 19, 16,185,165, 24, 17,141,174, 67, 22, 37,173, 90,146,128,241,145,151,150, 31,111,146,220, 12, 43, 8,181, 80,165,163, 83, 34,
+ 51, 94, 6, 35,222,123, 56,186, 15, 38,239,182,155, 77, 72,214,202,178, 68,223,247,168,234, 26, 69,158, 7, 55,206,245,236,172,
+235,208, 57,135,178, 44,241,242, 75, 47,193, 89,139,239,127,255,251,193, 61, 42,208,131, 26, 99,194, 81,149, 55,109,173, 13,214,
+ 58, 90,124, 97,217, 18,117,248,120, 65,229,251,190, 15,186,191, 89, 7, 16,145,116, 29, 18, 81,197,185,200, 94, 18, 38, 3,179,
+176, 74, 25,180,115, 50, 58, 54, 50,118, 35, 50, 96, 51,147, 90,237,118,128,247,176,125, 31,114,130,158,104,139, 60,207, 81,144,
+123,153, 16,117,195, 44, 48,127,174,148,194,185,115,231,240,234,171,175,226,197, 23, 95, 20, 6, 67,255,144,143,184, 33,180, 50,
+ 98, 44, 19, 22, 31, 47,122,204,116,198, 27, 19,163,158, 56,136,199,144,213,138, 69,214, 74, 5,190, 62,150,160,200, 35, 31,223,
+ 71, 12, 85,131,175,167, 0, 25,200, 57, 66, 50,210,141,133, 4,144,138, 66,124, 42,202,201,100, 88,232,201, 4,198, 24,228,121,
+142,166,105, 80,148, 37,234,186,198,106,185, 68,158,231, 1,218, 22,101, 57, 32, 76, 65,217,191,242,202, 43,120,228,145, 71,216,
+149, 15,190,154,143, 78,236, 78,172,181,193,234, 51,177,248, 50,147, 77, 45,124, 42, 48, 38, 93, 81,180, 9, 1,182,146,213, 27,
+ 99,130,144,171, 20, 73,143, 68, 71,108,189, 41, 42, 67,210, 40,206,185, 16,216, 3,172,165,140,182,160, 69, 27,197, 0, 99, 48,
+153, 78, 81,148, 37, 76, 81, 12,240,211, 90,204,230,115, 76,166, 83,104,173,177, 94,175, 81,215, 53,118,219, 45,142,142,142,194,
+243, 44,142,142,134,196, 78, 84, 0, 45, 81, 34, 69, 81,224,229,171, 87,161,180,134,226,165,208, 34,121,226, 55, 46,223,177,107,
+ 10, 8, 72, 66, 60, 97,141,113, 54,187,151, 20, 69,112, 51,222, 8,127,192,189,177,159,150, 22,202, 11, 47,177,191, 20, 1,240,
+230, 72, 3,144,238,197,210,207,140, 49,131,239,142, 98,128, 68, 68,206, 57, 56,162,182, 79, 79, 78,144,231,121, 64, 64, 77,219,
+222,223,104,165,240,208,165, 75,104,219, 22,155,245,122,160,179, 5,146,155, 76, 38,152, 77,167,152, 78,167,184,112,254, 60, 62,
+243,153,207, 64, 5,151, 34,162,115,202,189,248,216,125, 36,104,135, 20, 85,145, 60, 5,188,192,156,128, 37,114, 10, 31,113, 68,
+188,128, 57,225,244,142,202,142,114,225,101,205, 89, 6,228,120,241, 89, 4,198, 11,220,245,125, 72,168,164, 2,143, 93,145,117,
+ 14, 74,107,204, 72,159,180, 89,175, 3,220, 60, 90, 44,134,210,105, 81,192,246, 61,218,166,193,100, 54, 27,174,217,117,152,204,
+102, 33,111,240,228, 90, 89,253,177,152,207, 15,171,163, 25, 10,202, 27, 98,182, 16,145,165,159, 85, 28, 63, 35, 9,216,183,252,
+ 67,247, 34,138,250,146,147,231,100, 43, 6, 8,169, 56, 36, 17,157, 44, 28,201,224, 44,197, 5, 18, 0,148, 69, 17,170,100,198,
+ 24,172, 86, 43,212,117,141,201,116,138,249,124, 14,219,247,216,108, 54,208, 68, 77,192,123, 44, 22, 11, 84, 85,133,122,183,187,
+ 15,169, 41,195,103, 99, 48,198,220,223,128, 81,150, 42,248,115,149, 58, 9, 7, 22, 54, 46,200,164, 24,208, 56, 14,248, 68,133,
+ 12,226, 84, 72, 84,195, 6, 97,164,139,161,251,180, 66,101,145,188,158,184,183,156, 54,144, 13,136,209,144, 44,234, 51, 97,199,
+155, 98, 5,162,241, 4, 69, 1,192, 20, 5,166,211,233, 80,212,161, 83, 85, 87, 21,156,181,152, 83, 37,209, 57,135,178, 40, 48,
+153, 76, 80,150, 37,114,170,234,121,112,127, 64,194, 69, 4,122,129,240,174,181,118,175, 40,157, 90,240, 36,250, 73, 36, 97,136,
+ 22,122, 47,120, 71,155,144, 58,101,172,148,144, 5,248,179, 72, 57, 41, 32, 96,229,134,230,228,140, 92, 25,187, 34,182,246,212,
+ 41, 41,203,114,168, 89, 55, 13,142, 22, 11, 28, 29, 29, 97,179,217, 12, 18, 23,165, 48,161, 18,170, 33, 55,197,155, 39, 11, 84,
+ 76,183, 27,196,148,177,120, 72,182, 58, 38,168,156,115, 67, 96, 57, 64, 46, 73, 42, 57,165,126, 56,116, 18,178, 68, 57,241,227,
+ 54,149, 23,107, 84, 44,250,152,205,226,123,147,226, 49, 9,101,165, 20,222, 11,177, 88,128,168,121, 14, 77, 39,162,109, 91, 44,
+ 79, 78,194, 38, 77,167, 83,116,125, 15,103, 45, 12,233, 90,251,190, 71, 78,238,139,107, 12,147,201, 4,206,251, 16,196, 21,179,
+138,225, 61,162, 3, 82, 5, 15, 31, 45,120,106, 19,246,172, 93, 34,161, 67,137, 89,164,112,115,194,237,201,148,223, 69, 52,134,
+ 22,185,139, 36,227,246, 42,111,130, 87,146,137, 22,187, 28, 94,252,160,206,163, 13,225,211, 16,199,141,245,122,141,147,123,247,
+ 80, 78, 38, 56, 62, 62,134,179, 22,155,205, 6,125,215,193, 8,101, 69, 57,153, 12, 65,154,174, 23,128, 68,215, 65, 33, 1,253,
+100,246, 40, 57, 32, 62, 54,103,249,217,189,120,146,250, 24, 37,101,238,128,202, 77,110,188,132,115,133,168, 7,200, 83,151,186,
+191, 44,170, 57,135,223, 37,106,187, 19,138,108,201,121, 41,165, 80,150,229,136, 41,182,214,162, 35,216, 57,153, 76,144, 41,133,
+187,119,239, 14,148,196,100, 18,146, 51,195, 37, 77,173,209,145, 52,134,121,173,166,105, 6, 24,107, 12,224,253,125, 24, 42,249,
+ 25,169, 84, 72, 21, 53,152,158,216,251,249, 33,173,140,116, 67, 18, 98,210,123,170,182,124,200,173,132,218, 2,163, 26, 82,209,
+ 85, 85,181, 39,222,149,174, 71,107, 29, 98,138,124,150, 44,203, 70,149, 48, 73, 71, 56,113, 58, 56, 54,228,100,217, 76,242,157,
+156,156, 96,181, 90, 97, 62,159,227,194,241,241,160, 73,173,235,251, 53, 11,239,135,216,153,101,152,206,102, 40,138, 98,168,180,
+145, 43, 50,114, 97,108, 92,120,161,155,222, 17, 49,181,231, 43,197,105,201, 82,137, 86,204,144,198,191,155,162, 57, 14, 72,207,
+195, 38, 9, 52,196,190, 56,203, 50,148,137, 26,177, 92,108,201,238,202,197,231, 24,199,207, 36,105, 25, 25, 3,216,215, 75,195,
+204,178, 12, 93,215,225,238,157, 59,120,248,225,135,199, 98, 1,231,144,211,198, 58,239,225,233,239,140, 49,104,182, 91, 56,231,
+ 80,215,181,128,161,226, 65,227,138, 23,223,164,132,161,214,218,225,194,241,226,127, 12,230,207, 82, 68,220, 25,180,197, 30,199,
+ 79,208,144, 51, 85,246,213, 92, 96,137,221, 97,138, 19,226, 86, 40, 22, 2,179, 8, 56,112,248, 66, 20, 16,171, 48,228,189, 24,
+ 99, 80, 78, 38, 88,173, 86,104,219, 22,147,201, 4, 71,231,206, 13, 39, 68,107, 52,117, 61, 64, 88,214, 29, 9,215,214,117, 29,
+202,162,184,223,164, 39,249,148, 56, 14,112,224, 83, 7,152,199, 36,245, 28, 23,102, 34,154,195,127, 76,226, 37, 73,183, 56, 31,
+144, 20, 68,219,182,129,117,116, 36,165,145,127, 31,171,239,228, 9,231,103, 27, 81, 14, 98,161,120,227,100,198, 45,101,244, 92,
+138,188,125,251, 54,238,221,189,139,163,163, 35,228,121,142,106,183,131, 39,133,181,230,120,165, 84,112,209, 92,176,209,198, 12,
+ 27,224, 36,121, 37,234,182, 25, 45, 24, 87,167, 98,110,197, 37,178, 80, 28, 42,208,124, 12,130, 58,132,166,226,160, 26, 47, 68,
+ 31, 89, 23,243, 70, 41, 88, 43, 23, 78,178,159,242,122,114,179,249,251, 49, 10,228,255, 83,150, 37,142,142,142,176, 94,173,176,
+ 92, 46,241, 24, 81, 18, 69, 89, 14, 25, 58, 9,203, 10,206, 5,178, 12, 93,211, 64, 41,133,182,235, 80, 87, 21,148, 39,127,197,
+ 21,160,192, 9, 37, 84,199,142, 45, 46,166,126, 15, 20, 92, 66, 16,162,119, 31,159, 32, 81,204,207, 14,104, 70, 37, 10,139,121,
+ 39, 99, 12, 12,249,126,185, 81, 62,186, 70,124, 93, 67,156, 18, 47,178,204,124,229,166,132,250, 46,209,206,129,132,227, 32, 76,
+144,114,177, 88,224,131, 15, 62,192,102,187, 69,145,231,152,207,231,208,198,160,239, 58,116, 84, 62,117,180, 30,225,228,101, 25,
+202,201, 4,134,143, 47, 43, 22,120, 51, 92,148, 84, 73,218, 90, 30, 99, 21, 87,185, 18,150,183, 39,212, 74, 48,160, 62,194,252,
+242,123, 82,101,237,163,250,174,166, 56,208,146, 66,129, 19,156,164, 4, 68,168, 61,152,144,235,163, 90, 64,236, 94,227, 46,204,
+174,239,209, 19,180,228,205, 45, 39, 19, 44,151, 75,220,187,115, 7,231,207,157, 27,130, 56,197, 22,254, 60, 47,138,128,176, 90,
+170, 31,228,198,192,120, 74,146, 88,135,153,114, 3, 28,136,186,174, 11, 13,119,225,253, 0,247, 63,242,223, 31,179,224, 72,180,
+ 48, 73, 12, 31,208, 11,113, 63,177,251,146,106,234, 84,117, 46,174,160,245, 36,127,103,186, 61,150,219,199, 20,119,208, 19,137,
+ 56, 25, 19,119,143, 60,250, 40,110,221,186,133,255,240, 59,191,131, 60,207, 49,157,205,194, 41,208, 81, 91,149, 22,140,174,145,
+ 62,109,100,185,194,255,115,214, 6, 0, 59,194,219,113,131, 92,172, 9,197, 33,138, 57,177,224, 42,209,184, 17,159,136,184, 3,
+ 82,234,254, 51,165, 70,253, 4,135,228,239,161, 51,134,122,199, 24,239,199, 89,116,252,191, 66,193,134,172,152, 99, 15,255, 77,
+211, 52, 88, 44, 22,120,255,151,191,196,127,250,253,223,199,241,133, 11, 35, 69,133,228,161, 24,113,221,231,130,168, 24, 35, 89,
+ 78, 25,148,229,162,177, 27, 96, 81, 43,136,172, 11, 15,113,198,130,199,139,157, 9,152,155, 90,236, 67, 27, 32, 85,212, 44, 87,
+ 47,242, 28, 59,234,255,146,192, 64, 26, 85,104, 87,165, 77,154,205,102, 48,132,238,228, 6,201, 66, 79, 74, 73,205,139,202,240,
+213,210, 61, 77, 72, 35,244,222, 47,126,129,201, 51,207,220, 87, 61,144, 75,148, 48,190,107,219, 80, 25, 51,153, 40,142,196, 90,
+ 77,169,112, 46,104,247,249, 98,206, 57, 40,194,206,129, 51, 74,248,254,176,224, 9,247,227, 18,139,140,132,208, 74, 6,217, 88,
+ 1, 97,140, 65, 81,150, 67, 79,153,176, 54,249, 55,142, 92, 84,219,182,208, 74,225,104,177, 8,113, 32,134,150,210, 35,196,174,
+136,117, 62,242,247,180,168, 45, 88,231,240,238,187,239,226,137, 79,125, 10, 57, 41, 36,156,247,128,240, 22,124, 10,114, 18,191,
+153, 61,205, 62, 91,126,148,177, 74, 78, 62, 21,148, 83, 46,200, 71,110,104,143,212, 59,227,116,140,126, 47,225, 86,164,236,144,
+147, 40,153,165,202, 92,161, 23, 69, 24, 54, 32,174,168,241,194,103, 66, 62, 25,187,174, 17,157,109, 12, 50,239,161, 68,166,204,
+235,178,152,207,177, 90,173,198,144, 85, 92, 87, 54,186, 56,242, 38,102, 68, 31,167,168, 1,162, 40,194,142, 43, 21, 84, 4,163,
+230,139,196, 73, 58, 52, 88, 35,213, 97, 19,147,112, 92, 89,114,145, 79,142,185,253, 92,244, 14, 75,221,191,188,127,166, 45,152,
+120,235, 5,197, 32, 75,149,177,223,143, 51,234, 80, 21,164,191,239,186, 14, 77,211,160,105,154, 16,212, 79,150,203,144,224,177,
+120, 87,214, 21,248, 36,122, 42, 12,153, 84, 6,155, 69, 5,114, 45, 52, 57, 82, 27, 31,138,206,146,204, 59, 64, 45, 28, 90,112,
+217,221, 46,239,197, 31,112,101,210,138, 36, 69, 13, 0,109,211, 12,165,194,201,228,254,105, 98, 45, 41,185, 14, 41,187,148,126,
+ 61,238, 49,142, 79,162,244,255,177,122,155, 81,207,209,209, 17,250, 15, 62, 64, 83,215,161,227, 50,206,101,164,235,180, 28,132,
+ 71, 42, 4,153, 92, 69,228, 26, 31, 85, 57,116, 67,138,159, 14,185, 22, 28,192,250,201, 77,226,251,144, 10,140, 3, 39, 71, 42,
+159,165,133,199, 56, 62, 14,172,103,125, 95,102,220,123,201,160,115, 48,121,126, 63, 87, 34,235,230,161, 34, 69, 81,192, 59,135,
+ 15, 63,252, 16,231, 47, 92, 24,209,229,220, 80, 50,146, 87,134, 13, 72, 80, 5, 35,249,160, 56,158,220, 65,210,117,221, 72,174,
+120, 22, 71,116, 40, 43,141, 33,104,170, 40,147,186, 70,140,215, 89, 4, 85,215,117,128,206,177,245,202, 19,196,165, 65, 43, 71,
+ 38, 68,150, 30,171, 45, 70,136, 42,203,224,100, 7, 15,117,221,111,169,177,251,218,181,107,120,242,169,167, 70, 48,151, 79, 67,
+181,219,161, 33,165,117, 81,150,247,201, 56,159,232, 78,137, 31, 66, 50,145, 93,223, 67, 19, 22,102,153,246, 89, 45,168,169, 90,
+109, 60,128, 73,138,189, 92,130,142,136,143,190,164,152, 21, 41,147,229,181, 36, 39, 31,199, 14,105,137, 49, 18,226,153, 67,113,
+126, 98,157, 11,254,159,107,209,252,222, 52, 13, 50,165, 48,155,207,113,235,214,173, 80, 46,141, 93,119,215,117, 65, 35,148,101,
+ 25,140, 79, 80, 6, 18,130, 58,241, 51, 14,118,121,158,163,109,219, 32, 99,148,141,124,177,111,151,232,232,172,138,215, 33, 42,
+ 34, 94, 56,230,105,226,241, 8, 69, 81,160,239,186, 97, 34, 10, 17, 94,210,144,120, 88, 71, 32,217, 36,161, 39,146, 58,173, 20,
+242,168, 1,208, 18, 32, 96, 8,202,198,200, 45,179,252,183,214, 90,108,214,107,220,254,232,163,209,224, 17, 94, 35,126, 30,110,
+ 32,183,214,194,100, 17, 93, 32,231, 56,248, 51,132,183, 93,215,193, 79, 38,201, 62,223, 67, 62, 53, 85,108, 65,164,162, 59, 43,
+ 35,150,238, 39,190, 78,128,151,130, 42, 1,117, 60, 74,216, 39,209,140, 76,236,228,233, 25,157, 56,225,158,117,158, 67,115, 25,
+149, 54,206, 90,139,150,144, 80, 85, 85,216,237,118,216,110, 54,232,218, 54,120, 6, 54, 28,107, 45,170,170, 66,219,182, 65,216,
+101, 82,130,172, 24, 13,113,207, 20, 39, 27,198, 24, 84,117, 61,238,255,194,253, 97,124,123,149,169,152, 9,149,138, 8,225, 91,
+ 15,117, 77,198,244, 64,223,247,131,178, 32,106,168,208, 90,135, 69, 97,171, 15,240, 79,148, 22, 57, 27,150,113, 33, 84,192,200,
+218, 37,157, 30,126,207,251, 80, 92, 97,119,210,118, 29,218,166, 25,180, 63,147, 9, 46, 28, 31,227,198,205,155,161,206, 44,103,
+ 87,180, 77, 3,109, 12,102,116, 95, 74,169,241, 6,248,216,250,152, 67, 23, 41,183,247,126,208, 82, 82,243,116,198, 52, 46,245,
+ 79, 37,229,138,169,158, 2, 81, 71,254, 56, 58,226, 80,153, 82, 6,114,206, 60,251,168,143,215,139,209, 7, 65,102, 40, 40,231,
+152, 82, 80, 66,166, 51,218,120, 25, 35,200,133,177,112,184,200,243,208,216,200,242,245, 15, 63,252, 16,199, 23, 47,142, 59,112,
+138, 2,166,239,131,166,200, 89, 59,176,161,158,118, 55, 5, 23, 67, 11,191, 96, 19,181,214, 80,100,109,140, 58,152,214,149,250,
+202, 84, 11,145, 44,222,251, 68,118,123,168, 56, 51, 98, 69,163,123,149,174,164, 35, 74,194, 8,245,155,204, 29, 0,160, 21,215,
+ 9,106,139, 4,112,224,160, 27, 43, 51, 36,213,209,247, 61, 90, 49,157,171,105, 26,120,231,112,235,214, 45, 60,243,123,191, 55,
+122,182,190,109, 81, 85, 85, 72,220,192, 65, 56,149,132,200,250,111, 28, 0, 57,203, 99, 40,154, 42,130, 39,191, 78,212,129, 67,
+162, 37, 78,139, 63, 35, 72, 75, 50,142,239,131,181, 62, 60, 23, 78,206,130,144,127, 35,185,127, 41,191, 31, 37, 90,214,194, 69,
+153,126,220,155, 44, 93, 22,103,182, 93,215,161,170, 42, 84, 85, 5, 0, 88, 46,151, 1, 9,113,204,100,174, 42,232, 76,181, 30,
+130,112,150,104,184, 8, 86,168,212, 64, 38,209,226, 51,146, 48,198,132,169, 34,241, 28, 55,159,144, 29,142, 18, 44,105,233,226,
+ 4,166,170, 95,103, 13, 4,137,169,137, 64, 15,183,109,208,101,114,192,147,194, 94, 69, 49, 65,142, 55,235, 73,205,236, 19,160,
+ 96,143,144,163,133,103, 5,116,136, 5,228, 90, 0, 96,183,219, 5, 99,181,148,116,113,214, 94,215, 53,106, 10,220, 6,114,192,
+197, 33, 26, 88,164,242,124, 81, 46, 62,199,110, 32, 38,157, 70, 13, 29, 9,154, 34, 86, 50, 28,170, 13,140,240,184, 64, 48, 28,
+236,248,235, 78, 44,196,174,170, 70, 67, 96, 99,215,193, 69, 28,110,178, 54,220,172,205,255, 87,248,252,216, 75,132, 46, 24, 99,
+ 6,139,110, 26,104,165, 80, 85, 21,238,221,187,135,205,118, 59,140,101, 35,218,158, 71, 25, 44,151, 75,236,170,106,168, 19,100,
+217, 16, 3, 36, 39, 62,202, 62,197, 64,189,216,205,140,228,125, 20,248,242, 60, 15, 69,253, 20, 17,151,154,148, 24, 99,252,179,
+ 20,114, 50, 75,149,115, 65,165,206, 7, 0,214,171,213,168,173, 40,238,176,148,195,252,130,242,193,185, 17,207,115, 72,161, 33,
+239, 37, 19, 94,161,109,219, 1,130,110,183, 33, 64,243,243, 54,117,141,213,106,133,211,211,211, 97, 38, 42, 53,117, 59,231, 96,
+ 88, 19,106, 83,202,231,104,113,184,154,196,197,232,140, 38,224, 26, 99,144,115,122, 79,169,126, 38, 10, 59,135, 84, 5,114,254,
+ 68,204, 66,166, 80, 79,120,120,177, 25, 13, 85,182,164, 74,186,109, 91,204,154, 6,115,154,123, 17, 10,239,236, 58,200,141,142,
+148,207, 89, 6, 37, 79, 0, 97,253, 61, 8, 76,168,176,237,186,161, 48, 67, 16,157,209,215,116, 58,133,202,178,209,224,191,134,
+ 96,234,185,115,231,208,118, 29,182,155, 13, 60,157, 86,195,205, 3, 18, 53, 72,109,103, 70, 15, 44,131, 72,128,127,162,237, 83,
+182,129,198,104, 37, 37, 57,116, 9, 25, 99,138,157, 60, 36,212, 98,203,231,222, 49,214,247, 79,167, 83, 84,116,196,251,190, 71,
+ 79,238,169,161, 5,145, 67, 58,226, 96, 45,179, 94, 47, 44, 93,198, 9, 43, 50,102, 93,150, 40,200, 61,183,212, 31,160,133,218,
+ 66,150, 79,101,207,242,108, 54,195,116, 58, 29, 88, 89,151,168,127,166, 70,199,112,242,163, 4, 21,192,124,183,244,197,204,121,
+200, 38,185,184, 74, 21,187,186, 56,144,230,162, 91, 63, 62, 33,222,123,100,162,200, 18, 55,228,149,147, 9,106,202, 74,243,162,
+ 8,147,216, 75,146, 9, 90, 49,111, 66,142,196, 57,132,245, 33,122,232,242, 60, 15,149,193,160,172,238,186,161,217,142,202,180,
+ 70,107, 76, 72, 45,119,243,230, 77, 92,190,124, 57,244, 19,179, 27, 83, 74, 97,181, 90, 81, 16,142,230, 56, 28,122,240,216, 63,
+243, 6,236,104,214,154, 34,157,166, 84,154,197, 11, 61,154, 57, 17,181,154, 30,146, 35,198,138,181,152,195,145,115,126,120,224,
+171,119, 14, 29,249,232,197, 98, 17,166,162,240,201,130,208,185,118,125, 31,178,219,152,140,211,137, 33, 32, 18,140, 72,151,215,
+182, 45,170,186,198,233,106, 53,140,177,161, 38, 14, 83, 20, 56, 71, 82, 21,134,171,203,229, 18,119,239,222,189, 79, 71,103,130,
+110,149, 92,121, 44,247,102, 9,139, 76, 76, 60,249, 85,173, 53,244, 25, 52,115,236,223, 15,113,239,113,160,142,121,168,184,101,
+ 41,110,228, 54,132,208,118,187,221,125,242, 75,184, 79,166, 36,100, 37,207, 71, 19,192, 98,191, 31,244, 61,226, 99,252, 51,174,
+ 22,206,166, 83,180, 77,131, 13,117,203, 24,173,209, 91, 27,166, 50,158,158,158, 98,181, 90, 13,227,119,138,130,116, 65,137,102,
+231, 94, 8,139,226,214,211,184, 27,134, 79, 0, 79, 52, 60,212, 47, 48,154,173, 35,160,175, 60,154,103,149, 49,189,247,208,228,
+ 71,157,184,159, 82,184, 5, 9, 26,154,186, 30, 70, 21, 19,111,197, 99,243, 57, 65,146, 42,235, 56, 33, 11, 68, 28,183,226,138,
+210,226,168,154, 70,110,136,131,112,215,117,129,202,168,118, 59,244,214, 98,117,122,138,187,119,239,162,170,170,209,240, 39, 0,
+ 48,177,168, 41,142, 7,169,252, 32,158, 86, 37,253,187,236,170,145,200, 74,102,159,169,215, 2, 72, 9,114,247,180, 64, 66,197,
+ 16,183, 20,197,243,133,186,174,195,122,189,198,226,232, 8,206,185, 16, 87,164, 27,100, 96, 97, 69,112,149, 60,146,146,185,144,
+ 82, 1, 21, 73, 57, 35, 67, 80,102, 66,119,187, 29, 90,106,194,240,222,163,169,170, 1,251,239,118, 3,253,192, 11, 79,109,171,
+134,103,107, 86, 85, 53,170, 36,237,233,242, 19, 83,173,138, 60, 15, 29,127,220,255, 42, 45,112,111,100,101,170, 67, 62, 66, 62,
+ 54,130,163,146,204,138, 55, 48, 12,141, 37,183, 35, 55,191,216,110, 3, 53,205, 57,129,108,194,147, 61, 16, 78, 36,115, 49,239,
+100, 5, 76,239, 89, 19, 36,160,167,167, 56, 18, 42,113,194,149, 43,165,176,221,110,177, 60, 61, 69, 79,241,130, 65,202,108, 54,
+195, 29, 0,134,199,206,112,144,136, 27,216,226,114, 99, 56,150,212,104,198, 68,156, 21,115,255, 83,243,219, 82,197,239,100, 91,
+ 83,162,150,156,211, 32, 17,185,153,114,100,129,142, 38,232, 50, 49,198,247, 50,165, 70,105,134,162,220, 25,207,227,102, 92, 20,
+216,153, 29,117, 18, 98, 83,188, 40,138, 2, 37, 25, 28,215, 4,154,166, 65, 77,133, 22,166,237, 37, 34,156, 77,167, 88,139, 17,
+104,114, 8,136, 97, 30,166,166,155,145, 74, 3, 45,146,171,152,254,149, 11,196,101, 74,105, 57, 49,172,149,110,202,201,169,234,
+137, 18,165, 84, 39,247,180, 24,135,200,185, 0, 93, 69,230,217, 19,223,239,196,160,214,158,104, 96, 54, 34,118, 33,150, 78, 68,
+ 75, 42,230, 64,222, 81, 0,149, 30,129, 45,158,239,131, 93, 55,187,177,134, 42, 93, 28, 23, 23,139, 5,154,166, 25, 32,103,219,
+142,158,183, 38,137,167,201, 34,157,191,148,242,201,241, 91, 49, 38,150,141,211,220,115,107,157,131,141,212,105,241, 34,203,210,
+165, 75,100,224,136,168,241,148, 80, 86, 14,214, 11, 83, 94, 40, 39,225,124,132, 19, 29,231, 28,118, 84,133,226,134, 10,182,218,
+174,239, 7,164, 98, 76, 24, 16, 46, 27,181, 37,241, 22, 98, 16,137,186,156,152,184,107, 73, 49,199,243,172,229,218,221,188,121,
+115,232,134,164,252,198,121,143,135, 46, 94, 28, 10,248,222,195, 88,145,112,100,162, 1, 46,158, 40, 37,221, 4, 19, 81, 33, 23,
+216,237, 6, 58, 66,140, 56,139,149,205,161,199, 76, 10,186,162, 65, 73, 41,169, 74,170,211, 61,116,184, 16, 58,145,253,107,252,
+ 55, 21,229, 39,211,233, 20,117, 85, 13,155, 50,155,161,164, 97,124, 44, 19, 9, 98, 45,242,233,188,169, 41,151,169,178, 12,208,
+ 26, 69,150, 1,162, 9,187,110, 26,212, 44,117,167,198, 12,118,207, 60,131,154,217, 80,103, 45,214,155, 13, 86, 12, 83,229,172,
+184, 84,159,173,117, 14,153, 88, 32, 89,233, 79, 77,175,141, 19, 23, 89, 73,219, 75,232, 68, 16, 5,171,211, 18,101, 72,159, 16,
+208, 6, 20, 70,228, 22, 43, 29, 24,217,176, 75, 89,173,215,152, 76, 38,184,120,241, 98,200, 98, 59,145,120, 49,101, 33, 11,229,
+ 41, 5, 30,183, 24,197,131,101,123, 58, 13, 25, 53, 92,120,239, 3,236,237,186, 14, 91, 2, 3,114,192,121, 77, 53,135, 48,178,
+140,253,219,161,196, 72, 90,117, 30, 77, 84, 12, 13,208,162,254,170,196, 64,138, 34, 33,251,142,133,185,253,129,222,227, 84,151,
+140, 44,148,123,231,144, 69,136, 43, 52, 67, 83,137,210,146, 85,242,230,196,226,168, 64, 97,208, 96, 37, 38,207,100, 64,102,244,
+ 35, 3,243,136, 92,164,231,204,148, 66,181,219, 13,100,156,181, 88,158,158, 66,122, 24,118,199,125,223,135,154,136,225,116,156,
+253, 92,140,201,229, 6,104, 65,218,133, 14,114, 94,104,178, 66,153,170,167,134, 55, 73,168, 25,187,158,148,184, 75,139,137, 94,
+113, 60,104,187, 14,158, 94, 33,169,174,235,208, 14, 84, 85, 21, 86,171, 21, 54,155, 13,242, 60,199,165, 75,151, 48,159,207, 71,
+250,165,208,124, 40,220,140,156,148, 30,247, 7,199, 39, 53, 32, 25,154,170,213, 52, 13,118,187, 93, 64, 90,121, 81, 4, 84,196,
+ 11,239, 40,145,148,242,124,195, 71, 72,214,114, 83,178, 18,217, 42,100,157, 67, 30,213,129, 25,246,229,121, 30,220,128, 19,181,
+130, 67,139, 28,143, 68,142,171, 93,169, 19, 32, 5, 82,172, 81,229,216,210, 52, 13,150,203, 37, 78, 78, 78,208,117, 29, 46, 94,
+188, 56, 12, 93, 37, 40,106,133,134,167, 35, 14,135,221,149, 49, 6, 77,219,134,110,120,110,196, 75,161, 58, 70, 87, 46, 86, 0,
+138,211,188, 38, 94, 40, 12,152,141, 84,223,148,144,233, 32, 39,137,219,126, 98, 55,196, 62,212, 8,139,151,189,183,123,170,103,
+ 65, 87, 28, 74,232,112, 70,149, 44,165,170, 11,121,138,214,208, 98,180,152,115, 14,125,219, 34,163,225,120,109,219, 98,179,217,
+224,248,248, 24,115,122,117,167,160,140,176, 22, 53,189,156,149,148,184, 48,244,118,226, 36, 4,119, 41,220, 88, 72,196,200, 69,
+ 49, 28,237,173, 13, 52,132, 38, 68,228, 4, 64,224,156, 41, 52,197,132,177,149, 2, 47, 75,210, 73,106,230,181,214,152, 16,165,
+ 26, 6, 94,136, 5,110,154, 38, 28, 83, 62, 9,121,180,152,146, 74, 72,225,250, 67,172,169, 68, 97, 35, 53, 91,215,193,208,189,
+ 48, 85, 60,235,123,108,214,107, 44,151, 75, 84,117,141,123,247,238, 97, 58,157,134, 23, 99,144,167, 74,206, 2,226,225,123,117,
+ 93,135, 83,145, 2, 14, 1,189,113,114, 38, 80, 98,156, 72, 90,154, 17,225, 5, 69,195, 49,131, 73, 77, 99,173, 69,211,117,168,
+118, 59,100,212,190, 41,135, 99,243, 8,128,120,138,148, 28,214, 23, 72, 42, 57, 12, 67,104,244,229, 72,176, 67,228, 94,234, 53,
+ 6,124,244,114, 38, 78, 36, 74, 74, 41, 24,106, 27,229, 69,109,154, 6,203,147, 19,172,214,107,220,190,125, 27, 77, 93,163, 41,
+ 75,172,215,235,144, 27,152,162, 0, 8, 5, 49,133,109, 8,159, 91,138, 11,204,221,239,197, 29, 81,168, 41,138, 2,104, 91, 52,
+ 20, 63,131, 52, 38,234,182, 12, 74,136,178, 12,192, 67,139,193,230,198,211,241,155, 76,167,123, 67,241,120, 40, 29,143,237,226,
+197,142,199,126,133,151,158,162,122,192, 89,242,148,184, 6, 28, 47,184,172, 64,133, 90, 52,161, 29, 67, 80,153,135,162,246,212,
+ 37,223, 25,131,150, 94, 29,239,206,157, 59,216, 85, 21,234,166, 65, 57,153,224,233,167,159,198,165,135, 31, 30, 93,191,205, 50,
+228,100, 88,204,224, 86, 85, 53,212, 13,120,146,138,128,164,204, 7,201,207, 57, 25, 11,191, 39, 74,152,153, 82,152,208,164, 21,
+103,109, 56, 5,108,253,204,157,193,123, 42, 73, 10,171,149, 40, 33,206,140,115,177, 0,241, 20, 90,153,213,198, 69,153,152,138,
+ 24,189, 40, 67,162, 22,124,232,149, 50, 70, 42,102, 81,171,104,182, 91,108, 54, 27,236,126,171,177,119, 0, 0, 2,206, 73, 68,
+ 65, 84,118, 59,228,121,142, 25,128,106,183,195,148, 70,200, 72,132,199,125,190,146,130,150,180, 2, 15,212,107,232,197,127,216,
+247, 59, 41, 40,227, 53,145,129, 89,142,244,177, 22,179,217, 12, 43, 10,194,185,156, 44, 73,180, 8,195, 83,211,117, 29, 26, 78,
+ 92, 68,237,210,123, 31, 38, 99,121,162,115,195, 28,207,104,248,133,161,105, 80,188, 73,129,150, 16,173, 64, 41, 69, 68,220,123,
+155,137,121,112,161,205,147, 11,222,252,114, 87, 81,128,102, 56,185, 88, 44, 70,254, 27,192,240,170,123, 98,182, 4,128,176,113,
+210,184, 24, 5, 5,185,137, 40,164, 56, 81, 27,224,207,101,125, 92,146,117,153,112,171, 53, 21,226, 83,221, 65,124,221,193, 5,
+ 17,127, 35, 19, 12, 69, 11, 33,155,203,100,191,112,140,203, 25, 31, 55,162, 90,212, 11,148, 32, 37,126,178,217,205,104,141, 76,
+136, 1,248,232, 59, 33,131, 73,141, 39,230,205,110, 9,245,116,109,139, 83,122,169, 17, 69, 10, 57, 69, 90,125,153,179, 56, 42,
+158,112,220,200,148, 10, 35,229,249,101,170, 88, 11,203,229, 67,153,187,184,232,217,246, 52,174,194, 32,184,198,192,181,228, 76,
+180,114, 57, 58, 81, 25, 48, 52,233,105, 10,104, 0, 6, 13, 60,177,126,124, 51, 74,142,174,164, 28, 64,186, 25,249, 66,155,124,
+131,187,170, 66, 71, 86,176,247,138, 71, 52, 67, 39, 12, 1, 20, 15, 16,203, 87,226,124, 36,188,200, 27, 33,150,144,132,209, 98,
+201,226, 74, 93, 85, 88,158,156,132,105,133,172, 96,227,190,134,150,192, 7, 23,108,182,219,237,208,110,196,197, 22, 97, 12, 46,
+114, 53,146,154, 72, 17,137, 18,150, 50,114, 98,113,150,117, 46,240, 96, 33, 19,102, 77,165,124,117, 33, 14, 80,101, 89, 98, 50,
+153,132, 1,213,169, 49,241,178,148,201,242,188,188, 44, 71,163,123,101, 33, 91, 74,202,195, 56, 74, 17, 99,152, 70,144,245, 87,
+230,107,120,209, 55,155,205,200, 18,173,152,232,251,232,163,143,226,242,229,203,152,209, 75,225, 90,231, 0,122,105,196,160,164,
+163,211,204, 19,208,121,174,167, 87,106,152,243,198, 69,123,218,144,150,105,110, 97, 48,225,100, 18, 49,168, 34, 96,161,201,224,
+216, 21,247, 17, 41,105,186,174,195, 71, 31,125,116, 95,116,171,245,253, 57, 65,121, 14, 80,225,165, 44,138, 33,251,229,128,196,
+ 92, 12,249, 75,134,109, 85, 85, 13, 20, 65,228,171,227,217,211, 18, 59,143,116, 68,209, 76, 33,239,253,160,191,140, 40,226, 94,
+ 8,104,229,171, 44, 49, 50, 89,204,231,120,255,253,247, 67,158,192,244,181, 38,151,215, 81,198,203,226,179,166,174, 67,241,158,
+101, 36, 77,211,160, 37, 94,200, 37, 12,110,143, 32,228, 87,103,162,181,104,154, 38, 12,238,246,228,254, 60,185,160,170,174, 7,
+ 20, 84,148, 37, 86,171,213,240,178, 75, 50,173,150,252, 63, 89,167,162, 76, 81,186, 19,185,192, 76, 90,181,109, 59,200,252,132,
+164, 59,140, 50, 16,175,178, 33,199, 9,164, 50,229, 84,214,204,110,145,255,215,150,168,240,176,168,125,143,140, 90, 86, 89,168,
+165, 8, 20,100, 81, 39, 13,191,122,119, 71,214, 45,135,175, 42,238,135, 38, 35,203,164, 98, 46,158,125, 23,189, 46, 50,207, 34,
+109,154, 38,232,146,156, 76,112,133,225,253, 31, 32, 1, 67,246, 69,185,191,176, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130,
+ 0};
+
diff --git a/source/blender/editors/gpencil/CMakeLists.txt b/source/blender/editors/gpencil/CMakeLists.txt
index ce21d47ae48..762db26bc4f 100644
--- a/source/blender/editors/gpencil/CMakeLists.txt
+++ b/source/blender/editors/gpencil/CMakeLists.txt
@@ -47,4 +47,8 @@ set(SRC
gpencil_intern.h
)
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_gpencil "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/gpencil/SConscript b/source/blender/editors/gpencil/SConscript
index dca419d2fb7..9d92a238eb7 100644
--- a/source/blender/editors/gpencil/SConscript
+++ b/source/blender/editors/gpencil/SConscript
@@ -8,4 +8,9 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../gpu ../../blenloader ../../bmesh ../../blenfont'
incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern'
-env.BlenderLib ( 'bf_editors_gpencil', sources, Split(incs), [], libtype=['core'], priority=[45] )
+defs = []
+
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
+env.BlenderLib ( 'bf_editors_gpencil', sources, Split(incs), defs, libtype=['core'], priority=[45] )
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 76af016b6c6..528991e31f0 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -79,7 +79,7 @@ typedef enum eDrawStrokeFlags {
GP_DRAWDATA_ONLYV2D = (1<<2), /* only draw 'canvas' strokes */
GP_DRAWDATA_ONLYI2D = (1<<3), /* only draw 'image' strokes */
GP_DRAWDATA_IEDITHACK = (1<<4), /* special hack for drawing strokes in Image Editor (weird coordinates) */
- GP_DRAWDATA_NO_XRAY = (1<<5), /* dont draw xray in 3D view (which is default) */
+ GP_DRAWDATA_NO_XRAY = (1<<5), /* don't draw xray in 3D view (which is default) */
} eDrawStrokeFlags;
@@ -298,7 +298,7 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s
for (i=0, pt1=points, pt2=points+1; i < (totpoints-1); i++, pt1++, pt2++) {
float s0[2], s1[2]; /* segment 'center' points */
- float t0[2], t1[2]; /* tesselated coordinates */
+ float t0[2], t1[2]; /* tessellated coordinates */
float m1[2], m2[2]; /* gradient and normal */
float mt[2], sc[2]; /* gradient for thickness, point for end-cap */
float pthick; /* thickness at segment point */
@@ -513,7 +513,7 @@ static void gp_draw_strokes (bGPDframe *gpf, int offsx, int offsy, int winx, int
glDepthMask(0);
glEnable(GL_DEPTH_TEST);
- /* first arg is normally rv3d->dist, but this isnt available here and seems to work quite well without */
+ /* first arg is normally rv3d->dist, but this isn't available here and seems to work quite well without */
bglPolygonOffset(1.0f, 1.0f);
#if 0
glEnable(GL_POLYGON_OFFSET_LINE);
@@ -783,7 +783,7 @@ void draw_gpencil_view3d (Scene *scene, View3D *v3d, ARegion *ar, short only3d)
gpd= gpencil_data_get_active_v3d(scene); // XXX
if (gpd == NULL) return;
- /* when rendering to the offscreen buffer we dont want to
+ /* when rendering to the offscreen buffer we don't want to
* 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;
@@ -791,10 +791,10 @@ void draw_gpencil_view3d (Scene *scene, View3D *v3d, ARegion *ar, short only3d)
BLI_copy_rcti_rctf(&rect, &rectf);
}
else {
- rect.xmin= 0;
- rect.ymin= 0;
- rect.xmax= ar->winx;
- rect.ymax= ar->winy;
+ rect.xmin = 0;
+ rect.ymin = 0;
+ rect.xmax = ar->winx;
+ rect.ymax = ar->winy;
}
/* draw it! */
diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c
index c932eb4c7d0..3b0847c2e0f 100644
--- a/source/blender/editors/gpencil/editaction_gpencil.c
+++ b/source/blender/editors/gpencil/editaction_gpencil.c
@@ -561,7 +561,7 @@ static short mirror_gpf_xaxis (bGPDframe *gpf, Scene *scene)
static short mirror_gpf_marker (bGPDframe *gpf, Scene *scene)
{
static TimeMarker *marker;
- static short initialised = 0;
+ static short initialized = 0;
int diff;
/* In order for this mirror function to work without
@@ -581,16 +581,16 @@ static short mirror_gpf_marker (bGPDframe *gpf, Scene *scene)
}
else {
/* initialization time */
- if (initialised) {
+ if (initialized) {
/* reset everything for safety */
marker = NULL;
- initialised = 0;
+ initialized = 0;
}
else {
/* try to find a marker */
marker= ED_markers_get_first_selected(&scene->markers);
- if(marker) {
- initialised= 1;
+ if (marker) {
+ initialized= 1;
}
}
}
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 9a492153b7f..ced7dab91f4 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -143,7 +143,7 @@ bGPdata **gpencil_data_get_pointers (bContext *C, PointerRNA *ptr)
SpaceClip *sc= (SpaceClip *)CTX_wm_space_data(C);
MovieClip *clip= ED_space_clip(sc);
- if(clip) {
+ if (clip) {
/* for now, as long as there's a clip, default to using that in Clip Editor */
if (ptr) RNA_id_pointer_create(&clip->id, ptr);
return &clip->gpd;
@@ -213,14 +213,14 @@ static int gp_data_add_exec (bContext *C, wmOperator *op)
void GPENCIL_OT_data_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Grease Pencil Add New";
- ot->idname= "GPENCIL_OT_data_add";
- ot->description= "Add new Grease Pencil datablock";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Grease Pencil Add New";
+ ot->idname = "GPENCIL_OT_data_add";
+ ot->description = "Add new Grease Pencil datablock";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* callbacks */
- ot->exec= gp_data_add_exec;
- ot->poll= gp_add_poll;
+ ot->exec = gp_data_add_exec;
+ ot->poll = gp_add_poll;
}
/* ******************* Unlink Data ************************ */
@@ -261,14 +261,14 @@ static int gp_data_unlink_exec (bContext *C, wmOperator *op)
void GPENCIL_OT_data_unlink (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Grease Pencil Unlink";
- ot->idname= "GPENCIL_OT_data_unlink";
- ot->description= "Unlink active Grease Pencil datablock";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Grease Pencil Unlink";
+ ot->idname = "GPENCIL_OT_data_unlink";
+ ot->description = "Unlink active Grease Pencil datablock";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* callbacks */
- ot->exec= gp_data_unlink_exec;
- ot->poll= gp_data_unlink_poll;
+ ot->exec = gp_data_unlink_exec;
+ ot->poll = gp_data_unlink_poll;
}
/* ******************* Add New Layer ************************ */
@@ -298,14 +298,14 @@ static int gp_layer_add_exec (bContext *C, wmOperator *op)
void GPENCIL_OT_layer_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add New Layer";
- ot->idname= "GPENCIL_OT_layer_add";
- ot->description= "Add new Grease Pencil layer for the active Grease Pencil datablock";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Add New Layer";
+ ot->idname = "GPENCIL_OT_layer_add";
+ ot->description = "Add new Grease Pencil layer for the active Grease Pencil datablock";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* callbacks */
- ot->exec= gp_layer_add_exec;
- ot->poll= gp_add_poll;
+ ot->exec = gp_layer_add_exec;
+ ot->poll = gp_add_poll;
}
/* ******************* Delete Active Frame ************************ */
@@ -349,14 +349,14 @@ static int gp_actframe_delete_exec (bContext *C, wmOperator *op)
void GPENCIL_OT_active_frame_delete (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Active Frame";
- ot->idname= "GPENCIL_OT_active_frame_delete";
- ot->description= "Delete the active frame for the active Grease Pencil datablock";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Delete Active Frame";
+ ot->idname = "GPENCIL_OT_active_frame_delete";
+ ot->description = "Delete the active frame for the active Grease Pencil datablock";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* callbacks */
- ot->exec= gp_actframe_delete_exec;
- ot->poll= gp_actframe_delete_poll;
+ ot->exec = gp_actframe_delete_exec;
+ ot->poll = gp_actframe_delete_poll;
}
/* ************************************************ */
@@ -402,7 +402,7 @@ static void gp_strokepoint_convertcoords (bContext *C, bGPDstroke *gps, bGPDspoi
VECCOPY2D(mvalf, mvali);
}
else {
- if(subrect) {
+ if (subrect) {
mvalf[0]= (((float)pt->x/100.0f) * (subrect->xmax - subrect->xmin)) + subrect->xmin;
mvalf[1]= (((float)pt->y/100.0f) * (subrect->ymax - subrect->ymin)) + subrect->ymin;
}
@@ -561,7 +561,7 @@ static void gp_layer_to_curve (bContext *C, bGPdata *gpd, bGPDlayer *gpl, short
return;
/* initialize camera framing */
- if(gp_camera_view_subrect(C, &subrect)) {
+ if (gp_camera_view_subrect(C, &subrect)) {
subrect_ptr= &subrect;
}
@@ -632,21 +632,21 @@ static int gp_convert_layer_exec (bContext *C, wmOperator *op)
void GPENCIL_OT_convert (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Convert Grease Pencil";
- ot->idname= "GPENCIL_OT_convert";
- ot->description= "Convert the active Grease Pencil layer to a new Object";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Convert Grease Pencil";
+ ot->idname = "GPENCIL_OT_convert";
+ ot->description = "Convert the active Grease Pencil layer to a new Object";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= gp_convert_layer_exec;
- ot->poll= gp_convert_poll;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = gp_convert_layer_exec;
+ ot->poll = gp_convert_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_gpencil_convertmodes, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_gpencil_convertmodes, 0, "Type", "");
}
/* ************************************************ */
diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c
index 954c79bb17d..0afe791029f 100644
--- a/source/blender/editors/gpencil/gpencil_ops.c
+++ b/source/blender/editors/gpencil/gpencil_ops.c
@@ -50,7 +50,7 @@
void ED_keymap_gpencil(wmKeyConfig *keyconf)
{
- wmKeyMap *keymap= WM_keymap_find(keyconf, "Grease Pencil", 0, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "Grease Pencil", 0, 0);
wmKeyMapItem *kmi;
/* Draw */
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 535a0f947f1..b21c059fcc1 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -902,7 +902,7 @@ static void gp_stroke_eraser_dostroke (tGPsdata *p, int mval[], int mvalo[], sho
}
#endif
else {
- if(p->subrect == NULL) { /* normal 3D view */
+ if (p->subrect == NULL) { /* normal 3D view */
x0= (int)(pt1->x / 100 * p->ar->winx);
y0= (int)(pt1->y / 100 * p->ar->winy);
x1= (int)(pt2->x / 100 * p->ar->winx);
@@ -940,10 +940,10 @@ static void gp_stroke_doeraser (tGPsdata *p)
rcti rect;
/* rect is rectangle of eraser */
- rect.xmin= p->mval[0] - p->radius;
- rect.ymin= p->mval[1] - p->radius;
- rect.xmax= p->mval[0] + p->radius;
- rect.ymax= p->mval[1] + p->radius;
+ rect.xmin = p->mval[0] - p->radius;
+ rect.ymin = p->mval[1] - p->radius;
+ rect.xmax = p->mval[0] + p->radius;
+ rect.ymax = p->mval[1] + p->radius;
/* loop over strokes, checking segments for intersections */
for (gps= gpf->strokes.first; gps; gps= gpn) {
@@ -1204,7 +1204,7 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode)
if (p->gpl == NULL) {
p->gpl= gpencil_layer_addnew(p->gpd);
- if(p->custom_color[3])
+ if (p->custom_color[3])
copy_v3_v3(p->gpl->color, p->custom_color);
}
if (p->gpl->flag & GP_LAYER_LOCKED) {
@@ -1756,7 +1756,7 @@ static tGPsdata *gpencil_stroke_begin(bContext *C, wmOperator *op)
if (gp_session_initdata(C, p))
gp_paint_initstroke(p, p->paintmode);
- if(p->status != GP_STATUS_ERROR)
+ if (p->status != GP_STATUS_ERROR)
p->status= GP_STATUS_PAINTING;
return op->customdata;
@@ -1919,19 +1919,19 @@ static EnumPropertyItem prop_gpencil_drawmodes[] = {
void GPENCIL_OT_draw (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Grease Pencil Draw";
- ot->idname= "GPENCIL_OT_draw";
- ot->description= "Make annotations on the active data";
+ ot->name = "Grease Pencil Draw";
+ ot->idname = "GPENCIL_OT_draw";
+ ot->description = "Make annotations on the active data";
/* api callbacks */
- ot->exec= gpencil_draw_exec;
- ot->invoke= gpencil_draw_invoke;
- ot->modal= gpencil_draw_modal;
- ot->cancel= gpencil_draw_cancel;
- ot->poll= gpencil_draw_poll;
+ ot->exec = gpencil_draw_exec;
+ ot->invoke = gpencil_draw_invoke;
+ ot->modal = gpencil_draw_modal;
+ ot->cancel = gpencil_draw_cancel;
+ ot->poll = gpencil_draw_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* settings for drawing */
RNA_def_enum(ot->srna, "mode", prop_gpencil_drawmodes, 0, "Mode", "Way to interpret mouse movements");
diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c
index 1ab00082043..36624b88a9f 100644
--- a/source/blender/editors/gpencil/gpencil_undo.c
+++ b/source/blender/editors/gpencil/gpencil_undo.c
@@ -69,10 +69,10 @@ int ED_undo_gpencil_step(bContext *C, int step, const char *name)
gpd_ptr= gpencil_data_get_pointers(C, NULL);
- if(step==1) { /* undo */
+ if (step==1) { /* undo */
//printf("\t\tGP - undo step\n");
- if(cur_node->prev) {
- if(!name || strcmp(cur_node->name, name) == 0) {
+ if (cur_node->prev) {
+ if (!name || strcmp(cur_node->name, name) == 0) {
cur_node= cur_node->prev;
new_gpd= cur_node->gpd;
}
@@ -80,17 +80,17 @@ int ED_undo_gpencil_step(bContext *C, int step, const char *name)
}
else if (step==-1) {
//printf("\t\tGP - redo step\n");
- if(cur_node->next) {
- if(!name || strcmp(cur_node->name, name) == 0) {
+ if (cur_node->next) {
+ if (!name || strcmp(cur_node->name, name) == 0) {
cur_node= cur_node->next;
new_gpd= cur_node->gpd;
}
}
}
- if(new_gpd) {
- if(gpd_ptr) {
- if(*gpd_ptr) {
+ if (new_gpd) {
+ if (gpd_ptr) {
+ if (*gpd_ptr) {
bGPdata *gpd= *gpd_ptr;
bGPDlayer *gpl, *gpld;
@@ -124,11 +124,11 @@ void gpencil_undo_push(bGPdata *gpd)
//printf("\t\tGP - undo push\n");
- if(cur_node) {
+ if (cur_node) {
/* remove all un-done nodes from stack */
undo_node= cur_node->next;
- while(undo_node) {
+ while (undo_node) {
bGPundonode *next_node= undo_node->next;
free_gpencil_data(undo_node->gpd);
@@ -153,7 +153,7 @@ void gpencil_undo_finish(void)
{
bGPundonode *undo_node= undo_nodes.first;
- while(undo_node) {
+ while (undo_node) {
free_gpencil_data(undo_node->gpd);
MEM_freeN(undo_node->gpd);
diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h
index c725808ec34..9b20553e0cc 100644
--- a/source/blender/editors/include/ED_datafiles.h
+++ b/source/blender/editors/include/ED_datafiles.h
@@ -69,6 +69,9 @@ extern char datatoc_blur_png[];
extern int datatoc_clay_png_size;
extern char datatoc_clay_png[];
+extern int datatoc_claystrips_png_size;
+extern char datatoc_claystrips_png[];
+
extern int datatoc_clone_png_size;
extern char datatoc_clone_png[];
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 17a06bbb9ac..5bb30ab6d40 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -192,7 +192,7 @@ struct UvVertMap *EDBM_make_uv_vert_map(struct BMEditMesh *em, int selected, int
void EM_add_data_layer(struct BMEditMesh *em, struct CustomData *data, int type, const char *name);
void EM_free_data_layer(struct BMEditMesh *em, struct CustomData *data, int type);
-void EDBM_toggle_select_all(struct BMEditMesh *em);
+void EDBM_select_toggle_all(struct BMEditMesh *em);
void EDBM_flag_enable_all(struct BMEditMesh *em, const char hflag);
void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag);
void EDBM_select_mirrored(struct Object *obedit, struct BMEditMesh *em, int extend);
diff --git a/source/blender/editors/include/ED_numinput.h b/source/blender/editors/include/ED_numinput.h
index 2b99e52057d..e723ff73532 100644
--- a/source/blender/editors/include/ED_numinput.h
+++ b/source/blender/editors/include/ED_numinput.h
@@ -28,6 +28,15 @@
#define __ED_NUMINPUT_H__
+/*
+ The ctrl value has different meaning:
+ 0 : No value has been typed
+
+ otherwise, |value| - 1 is where the cursor is located after the period
+ Positive : number is positive
+ Negative : number is negative
+*/
+
typedef struct NumInput {
short idx;
short idx_max;
diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h
index 51699d095ae..6f7d0c55b9a 100644
--- a/source/blender/editors/include/ED_screen_types.h
+++ b/source/blender/editors/include/ED_screen_types.h
@@ -41,6 +41,7 @@ typedef struct ScreenAnimData {
short flag; /* flags for playback */
int sfra; /* frame that playback was started from */
int nextfra; /* next frame to go to (when ANIMPLAY_FLAG_USE_NEXT_FRAME is set) */
+ double last_duration; /* used for frame dropping */
} ScreenAnimData;
/* for animplayer */
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index 4532a351c7d..f6dee351c29 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -175,8 +175,8 @@ typedef enum SnapMode
#define SNAP_MIN_DISTANCE 30
-int peelObjectsTransForm(struct TransInfo *t, struct ListBase *depth_peels, const float mval[2]);
-int peelObjectsContext(struct bContext *C, struct ListBase *depth_peels, const float mval[2]);
+int peelObjectsTransForm(struct TransInfo *t, struct ListBase *depth_peels, const float mval[2], SnapMode mode);
+int peelObjectsContext(struct bContext *C, struct ListBase *depth_peels, const float mval[2], SnapMode mode);
int snapObjectsTransform(struct TransInfo *t, const float mval[2], int *r_dist, float r_loc[3], float r_no[3], SnapMode mode);
int snapObjectsContext(struct bContext *C, const float mval[2], int *r_dist, float r_loc[3], float r_no[3], SnapMode mode);
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index f35af356c94..c1fa45a10a1 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -843,17 +843,13 @@ DEF_ICON(LONGDISPLAY)
DEF_ICON(SHORTDISPLAY)
DEF_ICON(GHOST)
DEF_ICON(IMGDISPLAY)
-#ifndef DEF_ICON_BLANK_SKIP
- DEF_ICON(BLANK284)
- DEF_ICON(BLANK285)
-#endif
+DEF_ICON(SAVE_AS)
+DEF_ICON(SAVE_COPY)
DEF_ICON(BOOKMARKS)
DEF_ICON(FONTPREVIEW)
DEF_ICON(FILTER)
DEF_ICON(NEWFOLDER)
-#ifndef DEF_ICON_BLANK_SKIP
- DEF_ICON(BLANK285F)
-#endif
+DEF_ICON(OPEN_RECENT)
DEF_ICON(FILE_PARENT)
DEF_ICON(FILE_REFRESH)
DEF_ICON(FILE_FOLDER)
@@ -864,26 +860,26 @@ DEF_ICON(FILE_MOVIE)
DEF_ICON(FILE_SCRIPT)
DEF_ICON(FILE_SOUND)
DEF_ICON(FILE_FONT)
-#ifndef DEF_ICON_BLANK_SKIP
- DEF_ICON(BLANK291b)
+DEF_ICON(FILE_TEXT)
- /* available */
- DEF_ICON(BLANK292)
- DEF_ICON(BLANK293)
- DEF_ICON(BLANK294)
- DEF_ICON(BLANK295)
- DEF_ICON(BLANK296)
- DEF_ICON(BLANK297)
- DEF_ICON(BLANK298)
- DEF_ICON(BLANK299)
+ /* FILE SELECT */
+DEF_ICON(RECOVER_AUTO)
+DEF_ICON(SAVE_PREFS)
+DEF_ICON(LINK_BLEND)
+DEF_ICON(APPEND_BLEND)
+DEF_ICON(IMPORT)
+DEF_ICON(EXPORT)
+DEF_ICON(EXTERNAL_DATA)
+DEF_ICON(LOAD_FACTORY)
+#ifndef DEF_ICON_BLANK_SKIP
DEF_ICON(BLANK300)
DEF_ICON(BLANK301)
DEF_ICON(BLANK302)
DEF_ICON(BLANK303)
DEF_ICON(BLANK304)
- DEF_ICON(BLANK305)
- DEF_ICON(BLANK306)
#endif
+DEF_ICON(LOOP_BACK)
+DEF_ICON(LOOP_FORWARDS)
DEF_ICON(BACK)
DEF_ICON(FORWARD)
#ifndef DEF_ICON_BLANK_SKIP
@@ -968,6 +964,7 @@ DEF_ICON(BRUSH_ADD)
DEF_ICON(BRUSH_BLOB)
DEF_ICON(BRUSH_BLUR)
DEF_ICON(BRUSH_CLAY)
+DEF_ICON(BRUSH_CLAY_STRIPS)
DEF_ICON(BRUSH_CLONE)
DEF_ICON(BRUSH_CREASE)
DEF_ICON(BRUSH_DARKEN)
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index 4e7474c6f5f..041ab08a37d 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -133,8 +133,9 @@ enum {
TH_STRIP_SELECT,
TH_LAMP,
-
TH_SPEAKER,
+ TH_CAMERA,
+ TH_EMPTY,
TH_NODE,
TH_NODE_IN_OUT,
@@ -149,6 +150,7 @@ enum {
TH_CONSOLE_CURSOR,
TH_SEQ_MOVIE,
+ TH_SEQ_MOVIECLIP,
TH_SEQ_IMAGE,
TH_SEQ_SCENE,
TH_SEQ_AUDIO,
@@ -156,6 +158,7 @@ enum {
TH_SEQ_PLUGIN,
TH_SEQ_TRANSITION,
TH_SEQ_META,
+ TH_SEQ_PREVIEW,
TH_EDGE_SHARP,
TH_EDITMESH_ACTIVE,
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index edddd9bf407..b6821abf243 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -81,7 +81,7 @@
/* avoid unneeded calls to ui_get_but_val */
#define UI_BUT_VALUE_UNSET DBL_MAX
-#define UI_GET_BUT_VALUE_INIT(_but, _value) if(_value == DBL_MAX) { (_value)= ui_get_but_val(_but); }
+#define UI_GET_BUT_VALUE_INIT(_but, _value) if (_value == DBL_MAX) { (_value)= ui_get_but_val(_but); }
/*
* a full doc with API notes can be found in bf-blender/trunk/blender/doc/guides/interface_API.txt
@@ -107,7 +107,7 @@ void ui_block_to_window_fl(const ARegion *ar, uiBlock *block, float *x, float *y
gx= *x;
gy= *y;
- if(block->panel) {
+ if (block->panel) {
gx += block->panel->ofsx;
gy += block->panel->ofsy;
}
@@ -137,10 +137,10 @@ void ui_block_to_window_rct(const ARegion *ar, uiBlock *block, rctf *graph, rcti
ui_block_to_window_fl(ar, block, &tmpr.xmin, &tmpr.ymin);
ui_block_to_window_fl(ar, block, &tmpr.xmax, &tmpr.ymax);
- winr->xmin= tmpr.xmin;
- winr->ymin= tmpr.ymin;
- winr->xmax= tmpr.xmax;
- winr->ymax= tmpr.ymax;
+ winr->xmin = tmpr.xmin;
+ winr->ymin = tmpr.ymin;
+ winr->xmax = tmpr.xmax;
+ winr->ymax = tmpr.ymax;
}
void ui_window_to_block_fl(const ARegion *ar, uiBlock *block, float *x, float *y) /* for mouse cursor */
@@ -167,7 +167,7 @@ void ui_window_to_block_fl(const ARegion *ar, uiBlock *block, float *x, float *y
*y= (a*(py-f) + d*(c-px))/(a*e-d*b);
*x= (px- b*(*y)- c)/a;
- if(block->panel) {
+ if (block->panel) {
*x -= block->panel->ofsx;
*y -= block->panel->ofsy;
}
@@ -198,7 +198,7 @@ void ui_block_translate(uiBlock *block, int x, int y)
{
uiBut *bt;
- for(bt= block->buttons.first; bt; bt=bt->next) {
+ for (bt= block->buttons.first; bt; bt=bt->next) {
bt->x1 += x;
bt->y1 += y;
bt->x2 += x;
@@ -220,21 +220,21 @@ static void ui_text_bounds_block(uiBlock *block, float offset)
uiStyleFontSet(&style->widget);
- for(bt= block->buttons.first; bt; bt= bt->next) {
- if(bt->type!=SEPR) {
+ for (bt= block->buttons.first; bt; bt= bt->next) {
+ if (bt->type!=SEPR) {
j= BLF_width(style->widget.uifont_id, bt->drawstr);
- if(j > i) i = j;
+ if (j > i) i = j;
}
- if(bt->next && bt->x1 < bt->next->x1)
+ if (bt->next && bt->x1 < bt->next->x1)
lastcol++;
}
/* cope with multi collumns */
bt= block->buttons.first;
- while(bt) {
- if(bt->next && bt->x1 < bt->next->x1) {
+ while (bt) {
+ if (bt->next && bt->x1 < bt->next->x1) {
nextcol= 1;
col++;
}
@@ -243,12 +243,12 @@ static void ui_text_bounds_block(uiBlock *block, float offset)
bt->x1 = x1addval;
bt->x2 = bt->x1 + i + block->bounds;
- if(col == lastcol)
+ if (col == lastcol)
bt->x2= MAX2(bt->x2, offset + block->minbounds);
ui_check_but(bt); // clips text again
- if(nextcol)
+ if (nextcol)
x1addval+= i + block->bounds;
bt= bt->next;
@@ -260,8 +260,8 @@ void ui_bounds_block(uiBlock *block)
uiBut *bt;
int xof;
- if(block->buttons.first==NULL) {
- if(block->panel) {
+ if (block->buttons.first==NULL) {
+ if (block->panel) {
block->minx= 0.0; block->maxx= block->panel->sizex;
block->miny= 0.0; block->maxy= block->panel->sizey;
}
@@ -272,12 +272,12 @@ void ui_bounds_block(uiBlock *block)
block->maxx= block->maxy= -10000;
bt= block->buttons.first;
- while(bt) {
- if(bt->x1 < block->minx) block->minx= bt->x1;
- if(bt->y1 < block->miny) block->miny= bt->y1;
+ while (bt) {
+ if (bt->x1 < block->minx) block->minx= bt->x1;
+ if (bt->y1 < block->miny) block->miny= bt->y1;
- if(bt->x2 > block->maxx) block->maxx= bt->x2;
- if(bt->y2 > block->maxy) block->maxy= bt->y2;
+ if (bt->x2 > block->maxx) block->maxx= bt->x2;
+ if (bt->y2 > block->maxy) block->maxy= bt->y2;
bt= bt->next;
}
@@ -292,13 +292,13 @@ void ui_bounds_block(uiBlock *block)
/* hardcoded exception... but that one is annoying with larger safety */
bt= block->buttons.first;
- if(bt && strncmp(bt->str, "ERROR", 5)==0) xof= 10;
+ if (bt && strncmp(bt->str, "ERROR", 5)==0) xof= 10;
else xof= 40;
- block->safety.xmin= block->minx-xof;
- block->safety.ymin= block->miny-xof;
- block->safety.xmax= block->maxx+xof;
- block->safety.ymax= block->maxy+xof;
+ block->safety.xmin = block->minx-xof;
+ block->safety.ymin = block->miny-xof;
+ block->safety.xmax = block->maxx+xof;
+ block->safety.ymax = block->maxy+xof;
}
static void ui_centered_bounds_block(const bContext *C, uiBlock *block)
@@ -345,8 +345,8 @@ static void ui_popup_bounds_block(const bContext *C, uiBlock *block, int bounds_
oldheight= block->maxy - block->miny;
/* first we ensure wide enough text bounds */
- if(bounds_calc==UI_BLOCK_BOUNDS_POPUP_MENU) {
- if(block->flag & UI_BLOCK_LOOP) {
+ if (bounds_calc==UI_BLOCK_BOUNDS_POPUP_MENU) {
+ if (block->flag & UI_BLOCK_LOOP) {
block->bounds= 50;
ui_text_bounds_block(block, block->minx);
}
@@ -369,19 +369,19 @@ static void ui_popup_bounds_block(const bContext *C, uiBlock *block, int bounds_
startx= window->eventstate->x + block->minx + (block->mx*width)/oldwidth;
starty= window->eventstate->y + block->miny + (block->my*height)/oldheight;
- if(startx<10)
+ if (startx<10)
startx= 10;
- if(starty<10)
+ if (starty<10)
starty= 10;
endx= startx+width;
endy= starty+height;
- if(endx>xmax) {
+ if (endx>xmax) {
endx= xmax-10;
startx= endx-width;
}
- if(endy>ymax-20) {
+ if (endy>ymax-20) {
endy= ymax-20;
starty= endy-height;
}
@@ -395,7 +395,7 @@ static void ui_popup_bounds_block(const bContext *C, uiBlock *block, int bounds_
/* used for various cases */
void uiBoundsBlock(uiBlock *block, int addval)
{
- if(block==NULL)
+ if (block==NULL)
return;
block->bounds= addval;
@@ -452,7 +452,7 @@ static int ui_but_float_precision(uiBut *but, double value)
int prec;
/* first check if prec is 0 and fallback to a simple default */
- if((prec= (int)but->a2) == 0) {
+ if ((prec= (int)but->a2) == 0) {
prec= (but->hardmax < 10.001f) ? 3 : 2;
}
@@ -460,16 +460,16 @@ static int ui_but_float_precision(uiBut *but, double value)
* the number, this is so 0.00001 is not displayed as 0.00,
* _but_, this is only for small values si 10.0001 will not get
* the same treatment */
- if(value != 0.0 && (value= ABS(value)) < 0.1) {
+ if (value != 0.0 && (value= ABS(value)) < 0.1) {
int value_i= (int)((value * PRECISION_FLOAT_MAX_POW) + 0.5);
- if(value_i != 0) {
+ if (value_i != 0) {
const int prec_span= 3; /* show: 0.01001, 5 would allow 0.0100001 for eg. */
int test_prec;
int prec_min= -1;
int dec_flag= 0;
int i= PRECISION_FLOAT_MAX;
- while(i && value_i) {
- if(value_i % 10) {
+ while (i && value_i) {
+ if (value_i % 10) {
dec_flag |= 1<<i;
prec_min= i;
}
@@ -482,12 +482,12 @@ static int ui_but_float_precision(uiBut *but, double value)
dec_flag= (dec_flag >> (prec_min + 1)) & ((1 << prec_span) - 1);
- while(dec_flag) {
+ while (dec_flag) {
test_prec++;
dec_flag = dec_flag >> 1;
}
- if(test_prec > prec) {
+ if (test_prec > prec) {
prec= test_prec;
}
}
@@ -502,14 +502,14 @@ static void ui_draw_linkline(uiLinkLine *line)
{
rcti rect;
- if(line->from==NULL || line->to==NULL) return;
+ if (line->from==NULL || line->to==NULL) return;
- rect.xmin= (line->from->x1+line->from->x2)/2.0f;
- rect.ymin= (line->from->y1+line->from->y2)/2.0f;
- rect.xmax= (line->to->x1+line->to->x2)/2.0f;
- rect.ymax= (line->to->y1+line->to->y2)/2.0f;
+ rect.xmin = (line->from->x1+line->from->x2)/2.0f;
+ rect.ymin = (line->from->y1+line->from->y2)/2.0f;
+ rect.xmax = (line->to->x1+line->to->x2)/2.0f;
+ rect.ymax = (line->to->y1+line->to->y2)/2.0f;
- if(line->flag & UI_SELECT)
+ if (line->flag & UI_SELECT)
glColor3ub(100,100,100);
else
glColor3ub(0,0,0);
@@ -523,10 +523,10 @@ static void ui_draw_links(uiBlock *block)
uiLinkLine *line;
but= block->buttons.first;
- while(but) {
- if(but->type==LINK && but->link) {
+ while (but) {
+ if (but->type==LINK && but->link) {
line= but->link->lines.first;
- while(line) {
+ while (line) {
ui_draw_linkline(line);
line= line->next;
}
@@ -542,16 +542,16 @@ static int ui_but_equals_old(uiBut *but, uiBut *oldbut)
{
/* various properties are being compared here, hopefully sufficient
* to catch all cases, but it is simple to add more checks later */
- if(but->retval != oldbut->retval) return 0;
- if(but->rnapoin.data != oldbut->rnapoin.data) return 0;
- if(but->rnaprop != oldbut->rnaprop)
- if(but->rnaindex != oldbut->rnaindex) return 0;
- if(but->func != oldbut->func) return 0;
- if(but->funcN != oldbut->funcN) return 0;
- if(oldbut->func_arg1 != oldbut && but->func_arg1 != oldbut->func_arg1) return 0;
- if(oldbut->func_arg2 != oldbut && but->func_arg2 != oldbut->func_arg2) return 0;
- if(!but->funcN && ((but->poin != oldbut->poin && (uiBut*)oldbut->poin != oldbut) || but->pointype != oldbut->pointype)) return 0;
- if(but->optype != oldbut->optype) return 0;
+ if (but->retval != oldbut->retval) return 0;
+ if (but->rnapoin.data != oldbut->rnapoin.data) return 0;
+ if (but->rnaprop != oldbut->rnaprop)
+ if (but->rnaindex != oldbut->rnaindex) return 0;
+ if (but->func != oldbut->func) return 0;
+ if (but->funcN != oldbut->funcN) return 0;
+ if (oldbut->func_arg1 != oldbut && but->func_arg1 != oldbut->func_arg1) return 0;
+ if (oldbut->func_arg2 != oldbut && but->func_arg2 != oldbut->func_arg2) return 0;
+ if (!but->funcN && ((but->poin != oldbut->poin && (uiBut*)oldbut->poin != oldbut) || but->pointype != oldbut->pointype)) return 0;
+ if (but->optype != oldbut->optype) return 0;
return 1;
}
@@ -563,25 +563,25 @@ static void ui_but_update_linklines(uiBlock *block, uiBut *oldbut, uiBut *newbut
uiBut *but;
/* if active button is LINK */
- if(newbut->type==LINK && newbut->link) {
+ if (newbut->type==LINK && newbut->link) {
SWAP(uiLink *, oldbut->link, newbut->link);
- for(line= oldbut->link->lines.first; line; line= line->next) {
- if(line->to==newbut)
+ for (line= oldbut->link->lines.first; line; line= line->next) {
+ if (line->to==newbut)
line->to= oldbut;
- if(line->from==newbut)
+ if (line->from==newbut)
line->from= oldbut;
}
}
/* check all other button links */
- for(but= block->buttons.first; but; but= but->next) {
- if(but!=newbut && but->type==LINK && but->link) {
- for(line= but->link->lines.first; line; line= line->next) {
- if(line->to==newbut)
+ for (but= block->buttons.first; but; but= but->next) {
+ if (but!=newbut && but->type==LINK && but->link) {
+ for (line= but->link->lines.first; line; line= line->next) {
+ if (line->to==newbut)
line->to= oldbut;
- if(line->from==newbut)
+ if (line->from==newbut)
line->from= oldbut;
}
}
@@ -595,12 +595,12 @@ static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut
int found= 0;
oldblock= block->oldblock;
- if(!oldblock)
+ if (!oldblock)
return found;
- for(oldbut=oldblock->buttons.first; oldbut; oldbut=oldbut->next) {
- if(ui_but_equals_old(oldbut, but)) {
- if(oldbut->active) {
+ for (oldbut=oldblock->buttons.first; oldbut; oldbut=oldbut->next) {
+ if (ui_but_equals_old(oldbut, but)) {
+ if (oldbut->active) {
#if 0
// but->flag= oldbut->flag;
#else
@@ -638,14 +638,14 @@ static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut
/* typically the same pointers, but not on undo/redo */
/* XXX some menu buttons store button itself in but->poin. Ugly */
- if(oldbut->poin != (char *)oldbut) {
+ if (oldbut->poin != (char *)oldbut) {
SWAP(char *, oldbut->poin, but->poin)
SWAP(void *, oldbut->func_argN, but->func_argN)
}
/* copy hardmin for list rows to prevent 'sticking' highlight to mouse position
* when scrolling without moving mouse (see [#28432]) */
- if(ELEM(oldbut->type, ROW, LISTROW))
+ if (ELEM(oldbut->type, ROW, LISTROW))
oldbut->hardmax= but->hardmax;
ui_but_update_linklines(block, oldbut, but);
@@ -679,24 +679,24 @@ int uiButActiveOnly(const bContext *C, uiBlock *block, uiBut *but)
int activate= 0, found= 0, isactive= 0;
oldblock= block->oldblock;
- if(!oldblock)
+ if (!oldblock)
activate= 1;
else {
- for(oldbut=oldblock->buttons.first; oldbut; oldbut=oldbut->next) {
- if(ui_but_equals_old(oldbut, but)) {
+ for (oldbut=oldblock->buttons.first; oldbut; oldbut=oldbut->next) {
+ if (ui_but_equals_old(oldbut, but)) {
found= 1;
- if(oldbut->active)
+ if (oldbut->active)
isactive= 1;
break;
}
}
}
- if(activate || found==0) {
+ if (activate || found==0) {
ui_button_activate_do( (bContext *)C, CTX_wm_region(C), but);
}
- else if(found && isactive==0) {
+ else if (found && isactive==0) {
BLI_remlink(&block->buttons, but);
ui_free_but(C, but);
@@ -706,17 +706,17 @@ int uiButActiveOnly(const bContext *C, uiBlock *block, uiBut *but)
return 1;
}
-/* use to check if we need to disable undo, but dont make any changes
+/* use to check if we need to disable undo, but don't make any changes
* returns FALSE if undo needs to be disabled. */
static int ui_but_is_rna_undo(uiBut *but)
{
- if(but->rnapoin.id.data) {
+ if (but->rnapoin.id.data) {
/* avoid undo push for buttons who's ID are screen or wm level
* we could disable undo for buttons with no ID too but may have
* unforeseen consequences, so best check for ID's we _know_ are not
* handled by undo - campbell */
ID *id= but->rnapoin.id.data;
- if(ID_CHECK_UNDO(id) == FALSE) {
+ if (ID_CHECK_UNDO(id) == FALSE) {
return FALSE;
}
else {
@@ -743,32 +743,32 @@ static void ui_menu_block_set_keyaccels(uiBlock *block)
int tot_missing= 0;
/* only do it before bounding */
- if(block->minx != block->maxx)
+ if (block->minx != block->maxx)
return;
- for(pass=0; pass<2; pass++) {
+ for (pass=0; pass<2; pass++) {
/* 2 Passes, on for first letter only, second for any letter if first fails
* fun first pass on all buttons so first word chars always get first priority */
- for(but=block->buttons.first; but; but=but->next) {
- if(!ELEM4(but->type, BUT, MENU, BLOCK, PULLDOWN) || (but->flag & UI_HIDDEN)) {
+ for (but=block->buttons.first; but; but=but->next) {
+ if (!ELEM4(but->type, BUT, MENU, BLOCK, PULLDOWN) || (but->flag & UI_HIDDEN)) {
/* pass */
}
- else if(but->menu_key=='\0') {
- if(but->str) {
- for(str_pt= but->str; *str_pt; ) {
+ else if (but->menu_key=='\0') {
+ if (but->str) {
+ for (str_pt= but->str; *str_pt; ) {
menu_key= tolower(*str_pt);
- if((menu_key >= 'a' && menu_key <= 'z') && !(menu_key_mask & 1<<(menu_key-'a'))) {
+ if ((menu_key >= 'a' && menu_key <= 'z') && !(menu_key_mask & 1<<(menu_key-'a'))) {
menu_key_mask |= 1<<(menu_key-'a');
break;
}
- if(pass==0) {
+ if (pass==0) {
/* Skip to next delimiter on first pass (be picky) */
- while(isalpha(*str_pt))
+ while (isalpha(*str_pt))
str_pt++;
- if(*str_pt)
+ if (*str_pt)
str_pt++;
}
else {
@@ -777,7 +777,7 @@ static void ui_menu_block_set_keyaccels(uiBlock *block)
}
}
- if(*str_pt) {
+ if (*str_pt) {
but->menu_key= menu_key;
}
else {
@@ -786,7 +786,7 @@ static void ui_menu_block_set_keyaccels(uiBlock *block)
}
/* if all keys have been used just exit, unlikely */
- if(menu_key_mask == (1<<26)-1) {
+ if (menu_key_mask == (1<<26)-1) {
return;
}
}
@@ -794,7 +794,7 @@ static void ui_menu_block_set_keyaccels(uiBlock *block)
}
/* check if second pass is needed */
- if(!tot_missing) {
+ if (!tot_missing) {
break;
}
}
@@ -808,7 +808,7 @@ void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, const short do_st
if (do_strip) {
char *cpoin= strchr(but->str, '|');
- if(cpoin) {
+ if (cpoin) {
*cpoin= '\0';
}
}
@@ -844,14 +844,14 @@ static void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block)
IDProperty *prop_menu_name= NULL;
/* only do it before bounding */
- if(block->minx != block->maxx)
+ if (block->minx != block->maxx)
return;
- for(but=block->buttons.first; but; but=but->next) {
- if(but->optype) {
+ for (but=block->buttons.first; but; but=but->next) {
+ if (but->optype) {
IDProperty *prop= (but->opptr)? but->opptr->data: NULL;
- if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE,
+ if (WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE,
buf, sizeof(buf)))
{
ui_but_add_shortcut(but, buf, FALSE);
@@ -868,7 +868,7 @@ static void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block)
IDP_AssignString(prop_menu_name, mt->idname, sizeof(mt->idname));
- if(WM_key_event_operator_string(C, "WM_OT_call_menu", WM_OP_INVOKE_REGION_WIN, prop_menu, FALSE,
+ if (WM_key_event_operator_string(C, "WM_OT_call_menu", WM_OP_INVOKE_REGION_WIN, prop_menu, FALSE,
buf, sizeof(buf)))
{
ui_but_add_shortcut(but, buf, FALSE);
@@ -894,30 +894,30 @@ void uiEndBlock(const bContext *C, uiBlock *block)
* on matching buttons, we need this to make button event handling non
* blocking, while still allowing buttons to be remade each redraw as it
* is expected by blender code */
- for(but=block->buttons.first; but; but=but->next) {
- if(ui_but_update_from_old_block(C, block, &but))
+ for (but=block->buttons.first; but; but=but->next) {
+ if (ui_but_update_from_old_block(C, block, &but))
ui_check_but(but);
/* temp? Proper check for greying out */
- if(but->optype) {
+ if (but->optype) {
wmOperatorType *ot= but->optype;
- if(but->context)
+ if (but->context)
CTX_store_set((bContext*)C, but->context);
- if(ot == NULL || WM_operator_poll_context((bContext*)C, ot, but->opcontext)==0) {
+ if (ot == NULL || WM_operator_poll_context((bContext*)C, ot, but->opcontext)==0) {
but->flag |= UI_BUT_DISABLED;
but->lock = 1;
}
- if(but->context)
+ if (but->context)
CTX_store_set((bContext*)C, NULL);
}
ui_but_anim_flag(but, (scene)? scene->r.cfra: 0.0f);
}
- if(block->oldblock) {
+ if (block->oldblock) {
block->auto_open= block->oldblock->auto_open;
block->auto_open_last= block->oldblock->auto_open_last;
block->tooltipdisabled= block->oldblock->tooltipdisabled;
@@ -926,21 +926,21 @@ void uiEndBlock(const bContext *C, uiBlock *block)
}
/* handle pending stuff */
- if(block->layouts.first) uiBlockLayoutResolve(block, NULL, NULL);
+ if (block->layouts.first) uiBlockLayoutResolve(block, NULL, NULL);
ui_block_do_align(block);
- if((block->flag & UI_BLOCK_LOOP) && (block->flag & UI_BLOCK_NUMSELECT)) {
+ if ((block->flag & UI_BLOCK_LOOP) && (block->flag & UI_BLOCK_NUMSELECT)) {
ui_menu_block_set_keyaccels(block); /* could use a different flag to check */
}
- if(block->flag & UI_BLOCK_LOOP) ui_menu_block_set_keymaps(C, block);
+ if (block->flag & UI_BLOCK_LOOP) ui_menu_block_set_keymaps(C, block);
/* after keymaps! */
- if(block->dobounds == UI_BLOCK_BOUNDS) ui_bounds_block(block);
- else if(block->dobounds == UI_BLOCK_BOUNDS_TEXT) ui_text_bounds_block(block, 0.0f);
- else if(block->dobounds == UI_BLOCK_BOUNDS_POPUP_CENTER) ui_centered_bounds_block(C, block);
- else if(block->dobounds) ui_popup_bounds_block(C, block, block->dobounds);
+ if (block->dobounds == UI_BLOCK_BOUNDS) ui_bounds_block(block);
+ else if (block->dobounds == UI_BLOCK_BOUNDS_TEXT) ui_text_bounds_block(block, 0.0f);
+ else if (block->dobounds == UI_BLOCK_BOUNDS_POPUP_CENTER) ui_centered_bounds_block(C, block);
+ else if (block->dobounds) ui_popup_bounds_block(C, block, block->dobounds);
- if(block->minx==0.0f && block->maxx==0.0f) uiBoundsBlock(block, 0);
- if(block->flag & UI_BUT_ALIGN) uiBlockEndAlign(block);
+ if (block->minx==0.0f && block->maxx==0.0f) uiBoundsBlock(block, 0);
+ if (block->flag & UI_BUT_ALIGN) uiBlockEndAlign(block);
block->endblock= 1;
}
@@ -949,14 +949,14 @@ void uiEndBlock(const bContext *C, uiBlock *block)
void ui_fontscale(short *points, float aspect)
{
- if(aspect < 0.9f || aspect > 1.1f) {
+ if (aspect < 0.9f || aspect > 1.1f) {
float pointsf= *points;
/* for some reason scaling fonts goes too fast compared to widget size */
aspect= sqrt(aspect);
pointsf /= aspect;
- if(aspect > 1.0f)
+ if (aspect > 1.0f)
*points= ceilf(pointsf);
else
*points= floorf(pointsf);
@@ -975,14 +975,14 @@ static void ui_but_to_pixelrect(rcti *rect, const ARegion *ar, uiBlock *block, u
gx= (but?but->x1:block->minx) + (block->panel?block->panel->ofsx:0.0f);
gy= (but?but->y1:block->miny) + (block->panel?block->panel->ofsy:0.0f);
- rect->xmin= floorf(getsizex*(0.5f+ 0.5f*(gx*block->winmat[0][0]+ gy*block->winmat[1][0]+ block->winmat[3][0])));
- rect->ymin= floorf(getsizey*(0.5f+ 0.5f*(gx*block->winmat[0][1]+ gy*block->winmat[1][1]+ block->winmat[3][1])));
+ rect->xmin = floorf(getsizex*(0.5f+ 0.5f*(gx*block->winmat[0][0]+ gy*block->winmat[1][0]+ block->winmat[3][0])));
+ rect->ymin = floorf(getsizey*(0.5f+ 0.5f*(gx*block->winmat[0][1]+ gy*block->winmat[1][1]+ block->winmat[3][1])));
gx= (but?but->x2:block->maxx) + (block->panel?block->panel->ofsx:0.0f);
gy= (but?but->y2:block->maxy) + (block->panel?block->panel->ofsy:0.0f);
- rect->xmax= floorf(getsizex*(0.5f+ 0.5f*(gx*block->winmat[0][0]+ gy*block->winmat[1][0]+ block->winmat[3][0])));
- rect->ymax= floorf(getsizey*(0.5f+ 0.5f*(gx*block->winmat[0][1]+ gy*block->winmat[1][1]+ block->winmat[3][1])));
+ rect->xmax = floorf(getsizex*(0.5f+ 0.5f*(gx*block->winmat[0][0]+ gy*block->winmat[1][0]+ block->winmat[3][0])));
+ rect->ymax = floorf(getsizey*(0.5f+ 0.5f*(gx*block->winmat[0][1]+ gy*block->winmat[1][1]+ block->winmat[3][1])));
}
@@ -997,15 +997,15 @@ void uiDrawBlock(const bContext *C, uiBlock *block)
/* get menu region or area region */
ar= CTX_wm_menu(C);
- if(!ar)
+ if (!ar)
ar= CTX_wm_region(C);
- if(!block->endblock)
+ if (!block->endblock)
uiEndBlock(C, block);
/* disable AA, makes widgets too blurry */
multisample_enabled= glIsEnabled(GL_MULTISAMPLE_ARB);
- if(multisample_enabled)
+ if (multisample_enabled)
glDisable(GL_MULTISAMPLE_ARB);
/* we set this only once */
@@ -1030,19 +1030,19 @@ void uiDrawBlock(const bContext *C, uiBlock *block)
wmOrtho2(-0.01f, ar->winx-0.01f, -0.01f, ar->winy-0.01f);
/* back */
- if(block->flag & UI_BLOCK_LOOP)
+ if (block->flag & UI_BLOCK_LOOP)
ui_draw_menu_back(&style, block, &rect);
- else if(block->panel)
+ else if (block->panel)
ui_draw_aligned_panel(&style, block, &rect);
/* widgets */
- for(but= block->buttons.first; but; but= but->next) {
- if(!(but->flag & (UI_HIDDEN|UI_SCROLLED))) {
+ for (but= block->buttons.first; but; but= but->next) {
+ if (!(but->flag & (UI_HIDDEN|UI_SCROLLED))) {
ui_but_to_pixelrect(&rect, ar, block, but);
/* XXX: figure out why invalid coordinates happen when closing render window */
/* and material preview is redrawn in main window (temp fix for bug #23848) */
- if(rect.xmin < rect.xmax && rect.ymin < rect.ymax)
+ if (rect.xmin < rect.xmax && rect.ymin < rect.ymax)
ui_draw_but(C, ar, &style, but, &rect);
}
}
@@ -1053,7 +1053,7 @@ void uiDrawBlock(const bContext *C, uiBlock *block)
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
- if(multisample_enabled)
+ if (multisample_enabled)
glEnable(GL_MULTISAMPLE_ARB);
ui_draw_links(block);
@@ -1065,13 +1065,13 @@ static void ui_is_but_sel(uiBut *but, double *value)
{
short is_push=0, is_true=1;
- if(ELEM3(but->type, TOGN, ICONTOGN, OPTIONN)) is_true= 0;
+ if (ELEM3(but->type, TOGN, ICONTOGN, OPTIONN)) is_true= 0;
- if( but->bit ) {
+ if ( but->bit ) {
int lvalue;
UI_GET_BUT_VALUE_INIT(but, *value)
lvalue= (int)*value;
- if( BTST(lvalue, (but->bitnr)) ) is_push= is_true;
+ if ( BTST(lvalue, (but->bitnr)) ) is_push= is_true;
else is_push= !is_true;
}
else {
@@ -1091,23 +1091,23 @@ static void ui_is_but_sel(uiBut *but, double *value)
case ICONTOG:
case OPTION:
UI_GET_BUT_VALUE_INIT(but, *value)
- if(*value != (double)but->hardmin) is_push= 1;
+ if (*value != (double)but->hardmin) is_push= 1;
break;
case ICONTOGN:
case TOGN:
case OPTIONN:
UI_GET_BUT_VALUE_INIT(but, *value)
- if(*value==0.0) is_push= 1;
+ if (*value==0.0) is_push= 1;
break;
case ROW:
case LISTROW:
UI_GET_BUT_VALUE_INIT(but, *value)
/* support for rna enum buts */
- if(but->rnaprop && (RNA_property_flag(but->rnaprop) & PROP_ENUM_FLAG)) {
- if((int)*value & (int)but->hardmax) is_push= 1;
+ if (but->rnaprop && (RNA_property_flag(but->rnaprop) & PROP_ENUM_FLAG)) {
+ if ((int)*value & (int)but->hardmax) is_push= 1;
}
else {
- if(*value == (double)but->hardmax) is_push= 1;
+ if (*value == (double)but->hardmax) is_push= 1;
}
break;
case COL:
@@ -1119,8 +1119,8 @@ static void ui_is_but_sel(uiBut *but, double *value)
}
}
- if(is_push==2);
- else if(is_push==1) but->flag |= UI_SELECT;
+ if (is_push==2);
+ else if (is_push==1) but->flag |= UI_SELECT;
else but->flag &= ~UI_SELECT;
}
@@ -1129,9 +1129,9 @@ static uiBut *ui_find_inlink(uiBlock *block, void *poin)
uiBut *but;
but= block->buttons.first;
- while(but) {
- if(but->type==INLINK) {
- if(but->poin == poin) return but;
+ while (but) {
+ if (but->type==INLINK) {
+ if (but->poin == poin) return but;
}
but= but->next;
}
@@ -1161,24 +1161,24 @@ void uiComposeLinks(uiBlock *block)
int a;
but= block->buttons.first;
- while(but) {
- if(but->type==LINK) {
+ while (but) {
+ if (but->type==LINK) {
link= but->link;
/* for all pointers in the array */
- if(link) {
- if(link->ppoin) {
+ if (link) {
+ if (link->ppoin) {
ppoin= link->ppoin;
- for(a=0; a < *(link->totlink); a++) {
+ for (a=0; a < *(link->totlink); a++) {
bt= ui_find_inlink(block, (*ppoin)[a] );
- if(bt) {
+ if (bt) {
ui_add_link_line(&link->lines, but, bt);
}
}
}
- else if(link->poin) {
+ else if (link->poin) {
bt= ui_find_inlink(block, *(link->poin) );
- if(bt) {
+ if (bt) {
ui_add_link_line(&link->lines, but, bt);
}
}
@@ -1193,7 +1193,7 @@ void uiComposeLinks(uiBlock *block)
void uiBlockSetButLock(uiBlock *block, int val, const char *lockstr)
{
- if(val) {
+ if (val) {
block->lock= val ? 1:0;
block->lockstr= lockstr;
}
@@ -1217,18 +1217,18 @@ void ui_delete_linkline(uiLinkLine *line, uiBut *but)
link= line->from->link;
/* are there more pointers allowed? */
- if(link->ppoin) {
+ if (link->ppoin) {
- if(*(link->totlink)==1) {
+ if (*(link->totlink)==1) {
*(link->totlink)= 0;
MEM_freeN(*(link->ppoin));
*(link->ppoin)= NULL;
}
else {
b= 0;
- for(a=0; a< (*(link->totlink)); a++) {
+ for (a=0; a< (*(link->totlink)); a++) {
- if( (*(link->ppoin))[a] != line->to->poin ) {
+ if ( (*(link->ppoin))[a] != line->to->poin ) {
(*(link->ppoin))[b]= (*(link->ppoin))[a];
b++;
}
@@ -1254,30 +1254,30 @@ void ui_get_but_vectorf(uiBut *but, float vec[3])
PropertyRNA *prop;
int a, tot;
- if(but->editvec) {
+ if (but->editvec) {
copy_v3_v3(vec, but->editvec);
}
- if(but->rnaprop) {
+ if (but->rnaprop) {
prop= but->rnaprop;
vec[0]= vec[1]= vec[2]= 0.0f;
- if(RNA_property_type(prop) == PROP_FLOAT) {
+ if (RNA_property_type(prop) == PROP_FLOAT) {
tot= RNA_property_array_length(&but->rnapoin, prop);
tot= MIN2(tot, 3);
- for(a=0; a<tot; a++)
+ for (a=0; a<tot; a++)
vec[a]= RNA_property_float_get_index(&but->rnapoin, prop, a);
}
}
- else if(but->pointype == CHA) {
+ else if (but->pointype == CHA) {
char *cp= (char *)but->poin;
vec[0]= ((float)cp[0])/255.0f;
vec[1]= ((float)cp[1])/255.0f;
vec[2]= ((float)cp[2])/255.0f;
}
- else if(but->pointype == FLO) {
+ else if (but->pointype == FLO) {
float *fp= (float *)but->poin;
copy_v3_v3(vec, fp);
}
@@ -1298,14 +1298,14 @@ void ui_set_but_vectorf(uiBut *but, const float vec[3])
{
PropertyRNA *prop;
- if(but->editvec) {
+ if (but->editvec) {
copy_v3_v3(but->editvec, vec);
}
- if(but->rnaprop) {
+ if (but->rnaprop) {
prop= but->rnaprop;
- if(RNA_property_type(prop) == PROP_FLOAT) {
+ if (RNA_property_type(prop) == PROP_FLOAT) {
int tot;
int a;
@@ -1317,13 +1317,13 @@ void ui_set_but_vectorf(uiBut *but, const float vec[3])
}
}
}
- else if(but->pointype == CHA) {
+ else if (but->pointype == CHA) {
char *cp= (char *)but->poin;
cp[0]= (char)(0.5f + vec[0]*255.0f);
cp[1]= (char)(0.5f + vec[1]*255.0f);
cp[2]= (char)(0.5f + vec[2]*255.0f);
}
- else if(but->pointype == FLO) {
+ else if (but->pointype == FLO) {
float *fp= (float *)but->poin;
copy_v3_v3(fp, vec);
}
@@ -1331,10 +1331,10 @@ void ui_set_but_vectorf(uiBut *but, const float vec[3])
int ui_is_but_float(uiBut *but)
{
- if(but->pointype==FLO && but->poin)
+ if (but->pointype==FLO && but->poin)
return 1;
- if(but->rnaprop && RNA_property_type(but->rnaprop) == PROP_FLOAT)
+ if (but->rnaprop && RNA_property_type(but->rnaprop) == PROP_FLOAT)
return 1;
return 0;
@@ -1345,7 +1345,7 @@ int ui_is_but_unit(uiBut *but)
UnitSettings *unit= but->block->unit;
const int unit_type= uiButGetUnitType(but);
- if(unit_type == PROP_UNIT_NONE)
+ if (unit_type == PROP_UNIT_NONE)
return 0;
#if 1 // removed so angle buttons get correct snapping
@@ -1382,27 +1382,27 @@ double ui_get_but_val(uiBut *but)
PropertyRNA *prop;
double value = 0.0;
- if(but->editval) { return *(but->editval); }
- if(but->poin==NULL && but->rnapoin.data==NULL) return 0.0;
+ if (but->editval) { return *(but->editval); }
+ if (but->poin==NULL && but->rnapoin.data==NULL) return 0.0;
- if(but->rnaprop) {
+ if (but->rnaprop) {
prop= but->rnaprop;
switch(RNA_property_type(prop)) {
case PROP_BOOLEAN:
- if(RNA_property_array_check(prop))
+ if (RNA_property_array_check(prop))
value= RNA_property_boolean_get_index(&but->rnapoin, prop, but->rnaindex);
else
value= RNA_property_boolean_get(&but->rnapoin, prop);
break;
case PROP_INT:
- if(RNA_property_array_check(prop))
+ if (RNA_property_array_check(prop))
value= RNA_property_int_get_index(&but->rnapoin, prop, but->rnaindex);
else
value= RNA_property_int_get(&but->rnapoin, prop);
break;
case PROP_FLOAT:
- if(RNA_property_array_check(prop))
+ if (RNA_property_array_check(prop))
value= RNA_property_float_get_index(&but->rnapoin, prop, but->rnaindex);
else
value= RNA_property_float_get(&but->rnapoin, prop);
@@ -1415,7 +1415,7 @@ double ui_get_but_val(uiBut *but)
break;
}
}
- else if(but->type== HSVSLI) {
+ else if (but->type== HSVSLI) {
float h, s, v, *fp;
fp= (but->editvec)? but->editvec: (float *)but->poin;
@@ -1427,16 +1427,16 @@ double ui_get_but_val(uiBut *but)
case 'V': value= v; break;
}
}
- else if( but->pointype == CHA ) {
+ else if ( but->pointype == CHA ) {
value= *(char *)but->poin;
}
- else if( but->pointype == SHO ) {
+ else if ( but->pointype == SHO ) {
value= *(short *)but->poin;
}
- else if( but->pointype == INT ) {
+ else if ( but->pointype == INT ) {
value= *(int *)but->poin;
}
- else if( but->pointype == FLO ) {
+ else if ( but->pointype == FLO ) {
value= *(float *)but->poin;
}
@@ -1448,31 +1448,31 @@ void ui_set_but_val(uiBut *but, double value)
PropertyRNA *prop;
/* value is a hsv value: convert to rgb */
- if(but->rnaprop) {
+ if (but->rnaprop) {
prop= but->rnaprop;
- if(RNA_property_editable(&but->rnapoin, prop)) {
+ if (RNA_property_editable(&but->rnapoin, prop)) {
switch(RNA_property_type(prop)) {
case PROP_BOOLEAN:
- if(RNA_property_array_length(&but->rnapoin, prop))
+ if (RNA_property_array_length(&but->rnapoin, prop))
RNA_property_boolean_set_index(&but->rnapoin, prop, but->rnaindex, value);
else
RNA_property_boolean_set(&but->rnapoin, prop, value);
break;
case PROP_INT:
- if(RNA_property_array_length(&but->rnapoin, prop))
+ if (RNA_property_array_length(&but->rnapoin, prop))
RNA_property_int_set_index(&but->rnapoin, prop, but->rnaindex, (int)value);
else
RNA_property_int_set(&but->rnapoin, prop, (int)value);
break;
case PROP_FLOAT:
- if(RNA_property_array_length(&but->rnapoin, prop))
+ if (RNA_property_array_length(&but->rnapoin, prop))
RNA_property_float_set_index(&but->rnapoin, prop, but->rnaindex, value);
else
RNA_property_float_set(&but->rnapoin, prop, value);
break;
case PROP_ENUM:
- if(RNA_property_flag(prop) & PROP_ENUM_FLAG) {
+ if (RNA_property_flag(prop) & PROP_ENUM_FLAG) {
int ivalue= (int)value;
ivalue ^= RNA_property_enum_get(&but->rnapoin, prop); /* toggle for enum/flag buttons */
RNA_property_enum_set(&but->rnapoin, prop, ivalue);
@@ -1490,8 +1490,8 @@ void ui_set_but_val(uiBut *but, double value)
* so leave this unset */
value= UI_BUT_VALUE_UNSET;
}
- else if(but->pointype==0);
- else if(but->type==HSVSLI ) {
+ else if (but->pointype==0);
+ else if (but->type==HSVSLI ) {
float h, s, v, *fp;
fp= (but->editvec)? but->editvec: (float *)but->poin;
@@ -1508,9 +1508,9 @@ void ui_set_but_val(uiBut *but, double value)
}
else {
/* first do rounding */
- if(but->pointype==CHA)
+ if (but->pointype==CHA)
value= (char)floor(value+0.5);
- else if(but->pointype==SHO ) {
+ else if (but->pointype==SHO ) {
/* gcc 3.2.1 seems to have problems
* casting a double like 32772.0 to
* a short so we cast to an int, then
@@ -1519,24 +1519,24 @@ void ui_set_but_val(uiBut *but, double value)
gcckludge = (int) floor(value+0.5);
value= (short)gcckludge;
}
- else if(but->pointype==INT )
+ else if (but->pointype==INT )
value= (int)floor(value+0.5);
- else if(but->pointype==FLO ) {
+ else if (but->pointype==FLO ) {
float fval= (float)value;
- if(fval>= -0.00001f && fval<= 0.00001f) fval= 0.0f; /* prevent negative zero */
+ if (fval>= -0.00001f && fval<= 0.00001f) fval= 0.0f; /* prevent negative zero */
value= fval;
}
/* then set value with possible edit override */
- if(but->editval)
+ if (but->editval)
value= *but->editval= value;
- else if(but->pointype==CHA)
+ else if (but->pointype==CHA)
value= *((char *)but->poin)= (char)value;
- else if(but->pointype==SHO)
+ else if (but->pointype==SHO)
value= *((short *)but->poin)= (short)value;
- else if(but->pointype==INT)
+ else if (but->pointype==INT)
value= *((int *)but->poin)= (int)value;
- else if(but->pointype==FLO)
+ else if (but->pointype==FLO)
value= *((float *)but->poin)= (float)value;
}
@@ -1546,9 +1546,9 @@ void ui_set_but_val(uiBut *but, double value)
int ui_get_but_string_max_length(uiBut *but)
{
- if(ELEM(but->type, TEX, SEARCH_MENU))
+ if (ELEM(but->type, TEX, SEARCH_MENU))
return but->hardmax;
- else if(but->type == IDPOIN)
+ else if (but->type == IDPOIN)
return MAX_ID_NAME-2;
else
return UI_MAX_DRAW_STR;
@@ -1559,16 +1559,16 @@ static double ui_get_but_scale_unit(uiBut *but, double value)
UnitSettings *unit= but->block->unit;
int unit_type= uiButGetUnitType(but);
- if(unit_type == PROP_UNIT_LENGTH) {
+ if (unit_type == PROP_UNIT_LENGTH) {
return value * (double)unit->scale_length;
}
- else if(unit_type == PROP_UNIT_AREA) {
+ else if (unit_type == PROP_UNIT_AREA) {
return value * pow(unit->scale_length, 2);
}
- else if(unit_type == PROP_UNIT_VOLUME) {
+ else if (unit_type == PROP_UNIT_VOLUME) {
return value * pow(unit->scale_length, 3);
}
- else if(unit_type == PROP_UNIT_TIME) { /* WARNING - using evil_C :| */
+ else if (unit_type == PROP_UNIT_TIME) { /* WARNING - using evil_C :| */
Scene *scene= CTX_data_scene(but->block->evil_C);
return FRA2TIME(value);
}
@@ -1580,7 +1580,7 @@ static double ui_get_but_scale_unit(uiBut *but, double value)
/* str will be overwritten */
void ui_convert_to_unit_alt_name(uiBut *but, char *str, size_t maxlen)
{
- if(ui_is_but_unit(but)) {
+ if (ui_is_but_unit(but)) {
UnitSettings *unit= but->block->unit;
int unit_type= uiButGetUnitType(but);
char *orig_str;
@@ -1601,11 +1601,11 @@ static void ui_get_but_string_unit(uiBut *but, char *str, int len_max, double va
int unit_type= uiButGetUnitType(but);
int precision= but->a2;
- if(unit->scale_length<0.0001f) unit->scale_length= 1.0f; // XXX do_versions
+ if (unit->scale_length<0.0001f) unit->scale_length= 1.0f; // XXX do_versions
/* Sanity checks */
- if(precision > PRECISION_FLOAT_MAX) precision= PRECISION_FLOAT_MAX;
- else if(precision==0) precision= 2;
+ if (precision > PRECISION_FLOAT_MAX) precision= PRECISION_FLOAT_MAX;
+ else if (precision==0) precision= 2;
bUnit_AsString(str, len_max, ui_get_but_scale_unit(but, value), precision, unit->system, unit_type>>16, do_split, pad);
}
@@ -1617,7 +1617,7 @@ static float ui_get_but_step_unit(uiBut *but, float step_default)
step = bUnit_ClosestScalar(ui_get_but_scale_unit(but, step_default), but->block->unit->system, unit_type);
- if(step > 0.0f) { /* -1 is an error value */
+ if (step > 0.0f) { /* -1 is an error value */
return (float)((double)step/ui_get_but_scale_unit(but, 1.0))*100.0f;
}
else {
@@ -1628,37 +1628,37 @@ static float ui_get_but_step_unit(uiBut *but, float step_default)
void ui_get_but_string(uiBut *but, char *str, size_t maxlen)
{
- if(but->rnaprop && ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
+ if (but->rnaprop && ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
PropertyType type;
char *buf= NULL;
int buf_len;
type= RNA_property_type(but->rnaprop);
- if(type == PROP_STRING) {
+ if (type == PROP_STRING) {
/* RNA string */
buf= RNA_property_string_get_alloc(&but->rnapoin, but->rnaprop, str, maxlen, &buf_len);
}
- else if(type == PROP_POINTER) {
+ else if (type == PROP_POINTER) {
/* RNA pointer */
PointerRNA ptr= RNA_property_pointer_get(&but->rnapoin, but->rnaprop);
buf= RNA_struct_name_get_alloc(&ptr, str, maxlen, &buf_len);
}
- if(!buf) {
+ if (!buf) {
str[0] = '\0';
}
- else if(buf && buf != str) {
+ else if (buf && buf != str) {
/* string was too long, we have to truncate */
memcpy(str, buf, MIN2(maxlen, buf_len+1));
MEM_freeN(buf);
}
}
- else if(but->type == IDPOIN) {
+ else if (but->type == IDPOIN) {
/* ID pointer */
- if(but->idpoin_idpp) { /* Can be NULL for ID properties by python */
+ if (but->idpoin_idpp) { /* Can be NULL for ID properties by python */
ID *id= *(but->idpoin_idpp);
- if(id) {
+ if (id) {
BLI_strncpy(str, id->name+2, maxlen);
return;
}
@@ -1666,17 +1666,17 @@ void ui_get_but_string(uiBut *but, char *str, size_t maxlen)
str[0] = '\0';
return;
}
- else if(but->type == TEX) {
+ else if (but->type == TEX) {
/* string */
BLI_strncpy(str, but->poin, maxlen);
return;
}
- else if(but->type == SEARCH_MENU) {
+ else if (but->type == SEARCH_MENU) {
/* string */
BLI_strncpy(str, but->poin, maxlen);
return;
}
- else if(ui_but_anim_expression_get(but, str, maxlen))
+ else if (ui_but_anim_expression_get(but, str, maxlen))
; /* driver expression */
else {
/* number editing */
@@ -1684,8 +1684,8 @@ void ui_get_but_string(uiBut *but, char *str, size_t maxlen)
value= ui_get_but_val(but);
- if(ui_is_but_float(but)) {
- if(ui_is_but_unit(but)) {
+ if (ui_is_but_float(but)) {
+ if (ui_is_but_unit(but)) {
ui_get_but_string_unit(but, str, maxlen, value, 0);
}
else {
@@ -1722,12 +1722,12 @@ int ui_set_but_string_eval_num(bContext *C, uiBut *but, const char *str, double
#ifdef WITH_PYTHON
- if(str[0] != '\0') {
+ if (str[0] != '\0') {
int is_unit_but= ui_is_but_unit(but);
/* only enable verbose if we won't run again with units */
- if(BPY_button_exec(C, str, value, is_unit_but==FALSE) != -1) {
+ if (BPY_button_exec(C, str, value, is_unit_but==FALSE) != -1) {
/* if the value parsed ok without unit conversion this button may still need a unit multiplier */
- if(is_unit_but) {
+ if (is_unit_but) {
char str_new[128];
BLI_snprintf(str_new, sizeof(str_new), "%f", *value);
@@ -1737,7 +1737,7 @@ int ui_set_but_string_eval_num(bContext *C, uiBut *but, const char *str, double
ok= TRUE; /* parse normal string via py (no unit conversion needed) */
}
}
- else if(is_unit_but) {
+ else if (is_unit_but) {
/* parse failed, this is a unit but so run replacements and parse again */
ok= ui_set_but_string_eval_num_unit(C, but, str, value);
}
@@ -1759,23 +1759,23 @@ int ui_set_but_string_eval_num(bContext *C, uiBut *but, const char *str, double
int ui_set_but_string(bContext *C, uiBut *but, const char *str)
{
- if(but->rnaprop && ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
- if(RNA_property_editable(&but->rnapoin, but->rnaprop)) {
+ if (but->rnaprop && ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
+ if (RNA_property_editable(&but->rnapoin, but->rnaprop)) {
PropertyType type;
type= RNA_property_type(but->rnaprop);
- if(type == PROP_STRING) {
+ if (type == PROP_STRING) {
/* RNA string */
RNA_property_string_set(&but->rnapoin, but->rnaprop, str);
return 1;
}
- else if(type == PROP_POINTER) {
+ else if (type == PROP_POINTER) {
/* RNA pointer */
PointerRNA ptr, rptr;
PropertyRNA *prop;
- if(str == NULL || str[0] == '\0') {
+ if (str == NULL || str[0] == '\0') {
RNA_property_pointer_set(&but->rnapoin, but->rnaprop, PointerRNA_NULL);
return 1;
}
@@ -1783,7 +1783,7 @@ int ui_set_but_string(bContext *C, uiBut *but, const char *str)
ptr= but->rnasearchpoin;
prop= but->rnasearchprop;
- if(prop && RNA_property_collection_lookup_string(&ptr, prop, str, &rptr))
+ if (prop && RNA_property_collection_lookup_string(&ptr, prop, str, &rptr))
RNA_property_pointer_set(&but->rnapoin, but->rnaprop, rptr);
return 1;
@@ -1793,28 +1793,28 @@ int ui_set_but_string(bContext *C, uiBut *but, const char *str)
}
}
}
- else if(but->type == IDPOIN) {
+ else if (but->type == IDPOIN) {
/* ID pointer */
but->idpoin_func(C, str, but->idpoin_idpp);
return 1;
}
- else if(but->type == TEX) {
+ else if (but->type == TEX) {
/* string */
- if(ui_is_but_utf8(but)) BLI_strncpy_utf8(but->poin, str, but->hardmax);
+ if (ui_is_but_utf8(but)) BLI_strncpy_utf8(but->poin, str, but->hardmax);
else BLI_strncpy(but->poin, str, but->hardmax);
return 1;
}
- else if(but->type == SEARCH_MENU) {
+ else if (but->type == SEARCH_MENU) {
/* string */
BLI_strncpy(but->poin, str, but->hardmax);
return 1;
}
- else if(ui_but_anim_expression_set(but, str)) {
+ else if (ui_but_anim_expression_set(but, str)) {
/* driver expression */
return 1;
}
- else if(str[0]=='#') {
+ else if (str[0]=='#') {
/* shortcut to create new driver expression (versus immediate Py-execution) */
return ui_but_anim_expression_create(but, str+1);
}
@@ -1822,16 +1822,16 @@ int ui_set_but_string(bContext *C, uiBut *but, const char *str)
/* number editing */
double value;
- if(ui_set_but_string_eval_num(C, but, str, &value) == FALSE) {
+ if (ui_set_but_string_eval_num(C, but, str, &value) == FALSE) {
return 0;
}
- if(!ui_is_but_float(but)) value= (int)floor(value + 0.5);
- if(but->type==NUMABS) value= fabs(value);
+ if (!ui_is_but_float(but)) value= (int)floor(value + 0.5);
+ if (but->type==NUMABS) value= fabs(value);
/* not that we use hard limits here */
- if(value < (double)but->hardmin) value= but->hardmin;
- if(value > (double)but->hardmax) value= but->hardmax;
+ if (value < (double)but->hardmin) value= but->hardmin;
+ if (value > (double)but->hardmax) value= but->hardmax;
ui_set_but_val(but, value);
return 1;
@@ -1855,9 +1855,9 @@ static double soft_range_round_up(double value, double max)
/* round up to .., 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, .. */
double newmax= pow(10.0, ceil(log(value)/M_LN10));
- if(newmax*0.2 >= max && newmax*0.2 >= value)
+ if (newmax*0.2 >= max && newmax*0.2 >= value)
return newmax*0.2;
- else if(newmax*0.5 >= max && newmax*0.5 >= value)
+ else if (newmax*0.5 >= max && newmax*0.5 >= value)
return newmax*0.5;
else
return newmax;
@@ -1868,9 +1868,9 @@ static double soft_range_round_down(double value, double max)
/* round down to .., 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, .. */
double newmax= pow(10.0, floor(log(value)/M_LN10));
- if(newmax*5.0 <= max && newmax*5.0 <= value)
+ if (newmax*5.0 <= max && newmax*5.0 <= value)
return newmax*5.0;
- else if(newmax*2.0 <= max && newmax*2.0 <= value)
+ else if (newmax*2.0 <= max && newmax*2.0 <= value)
return newmax*2.0;
else
return newmax;
@@ -1880,9 +1880,9 @@ void ui_set_but_soft_range(uiBut *but, double value)
{
/* ideally we would not limit this but practically, its more then
* enough worst case is very long vectors wont use a smart soft-range
- * which isnt so bad. */
+ * which isn't so bad. */
- if(but->rnaprop) {
+ if (but->rnaprop) {
const PropertyType type= RNA_property_type(but->rnaprop);
double softmin, softmax /*, step, precision*/;
double value_min= value;
@@ -1890,7 +1890,7 @@ void ui_set_but_soft_range(uiBut *but, double value)
/* clamp button range to something reasonable in case
* we get -inf/inf from RNA properties */
- if(type == PROP_INT) {
+ if (type == PROP_INT) {
int imin, imax, istep;
const int array_len= RNA_property_array_length(&but->rnapoin, but->rnaprop);
@@ -1900,14 +1900,14 @@ void ui_set_but_soft_range(uiBut *but, double value)
/*step= istep;*/ /*UNUSED*/
/*precision= 1;*/ /*UNUSED*/
- if(array_len >= 2) {
+ if (array_len >= 2) {
int value_range[2];
RNA_property_int_get_array_range(&but->rnapoin, but->rnaprop, value_range);
value_min= (double)value_range[0];
value_max= (double)value_range[1];
}
}
- else if(type == PROP_FLOAT) {
+ else if (type == PROP_FLOAT) {
float fmin, fmax, fstep, fprecision;
const int array_len= RNA_property_array_length(&but->rnapoin, but->rnaprop);
@@ -1917,7 +1917,7 @@ void ui_set_but_soft_range(uiBut *but, double value)
/*step= fstep;*/ /*UNUSED*/
/*precision= fprecision;*/ /*UNUSED*/
- if(array_len >= 2) {
+ if (array_len >= 2) {
float value_range[2];
RNA_property_float_get_array_range(&but->rnapoin, but->rnaprop, value_range);
value_min= (double)value_range[0];
@@ -1928,22 +1928,22 @@ void ui_set_but_soft_range(uiBut *but, double value)
return;
/* if the value goes out of the soft/max range, adapt the range */
- if(value_min+1e-10 < softmin) {
- if(value_min < 0.0)
+ if (value_min+1e-10 < softmin) {
+ if (value_min < 0.0)
softmin= -soft_range_round_up(-value_min, -softmin);
else
softmin= soft_range_round_down(value_min, softmin);
- if(softmin < (double)but->hardmin)
+ if (softmin < (double)but->hardmin)
softmin= (double)but->hardmin;
}
- if(value_max-1e-10 > softmax) {
- if(value_max < 0.0)
+ if (value_max-1e-10 > softmax) {
+ if (value_max < 0.0)
softmax= -soft_range_round_down(-value_max, -softmax);
else
softmax= soft_range_round_up(value_max, softmax);
- if(softmax > (double)but->hardmax)
+ if (softmax > (double)but->hardmax)
softmax= but->hardmax;
}
@@ -1956,7 +1956,7 @@ void ui_set_but_soft_range(uiBut *but, double value)
static void ui_free_link(uiLink *link)
{
- if(link) {
+ if (link) {
BLI_freelistN(&link->lines);
MEM_freeN(link);
}
@@ -1965,16 +1965,16 @@ static void ui_free_link(uiLink *link)
/* can be called with C==NULL */
static void ui_free_but(const bContext *C, uiBut *but)
{
- if(but->opptr) {
+ if (but->opptr) {
WM_operator_properties_free(but->opptr);
MEM_freeN(but->opptr);
}
- if(but->func_argN) {
+ if (but->func_argN) {
MEM_freeN(but->func_argN);
}
- if(but->active) {
+ if (but->active) {
/* XXX solve later, buttons should be free-able without context ideally,
* however they may have open tooltips or popup windows, which need to
* be closed using a context pointer */
@@ -1982,7 +1982,7 @@ static void ui_free_but(const bContext *C, uiBut *but)
ui_button_active_free(C, but);
}
else {
- if(but->active) {
+ if (but->active) {
MEM_freeN(but->active);
}
}
@@ -2004,7 +2004,7 @@ void uiFreeBlock(const bContext *C, uiBlock *block)
{
uiBut *but;
- while( (but= block->buttons.first) ) {
+ while ( (but= block->buttons.first) ) {
BLI_remlink(&block->buttons, but);
ui_free_but(C, but);
}
@@ -2029,7 +2029,7 @@ void uiFreeBlocks(const bContext *C, ListBase *lb)
{
uiBlock *block;
- while( (block= lb->first) ) {
+ while ( (block= lb->first) ) {
BLI_remlink(lb, block);
uiFreeBlock(C, block);
}
@@ -2039,11 +2039,11 @@ void uiFreeInactiveBlocks(const bContext *C, ListBase *lb)
{
uiBlock *block, *nextblock;
- for(block=lb->first; block; block=nextblock) {
+ for (block=lb->first; block; block=nextblock) {
nextblock= block->next;
- if(!block->handle) {
- if(!block->active) {
+ if (!block->handle) {
+ if (!block->active) {
BLI_remlink(lb, block);
uiFreeBlock(C, block);
}
@@ -2060,7 +2060,7 @@ void uiBlockSetRegion(uiBlock *block, ARegion *region)
/* each listbase only has one block with this name, free block
* if is already there so it can be rebuilt from scratch */
- if(lb) {
+ if (lb) {
oldblock= BLI_findstring(lb, block->name, offsetof(uiBlock, name));
if (oldblock) {
@@ -2100,11 +2100,11 @@ uiBlock *uiBeginBlock(const bContext *C, ARegion *region, const char *name, shor
BLI_strncpy(block->name, name, sizeof(block->name));
- if(region)
+ if (region)
uiBlockSetRegion(block, region);
/* window matrix and aspect */
- if(region && region->swinid) {
+ if (region && region->swinid) {
wm_subwindow_getmatrix(window, region->swinid, block->winmat);
wm_subwindow_getsize(window, region->swinid, &getsizex, &getsizey);
@@ -2146,7 +2146,7 @@ void ui_check_but(uiBut *but)
ui_is_but_sel(but, &value);
/* only update soft range while not editing */
- if(but->rnaprop && !(but->editval || but->editstr || but->editvec)) {
+ if (but->rnaprop && !(but->editval || but->editstr || but->editvec)) {
UI_GET_BUT_VALUE_INIT(but, value)
ui_set_but_soft_range(but, value);
}
@@ -2159,8 +2159,8 @@ void ui_check_but(uiBut *but)
case NUMSLI:
case HSVSLI:
UI_GET_BUT_VALUE_INIT(but, value)
- if(value < (double)but->hardmin) ui_set_but_val(but, but->hardmin);
- else if(value > (double)but->hardmax) ui_set_but_val(but, but->hardmax);
+ if (value < (double)but->hardmin) ui_set_but_val(but, but->hardmin);
+ else if (value > (double)but->hardmax) ui_set_but_val(but, but->hardmax);
break;
case NUMABS:
@@ -2168,27 +2168,27 @@ void ui_check_but(uiBut *but)
double value_abs;
UI_GET_BUT_VALUE_INIT(but, value)
value_abs= fabs(value);
- if(value_abs < (double)but->hardmin) ui_set_but_val(but, but->hardmin);
- else if(value_abs > (double)but->hardmax) ui_set_but_val(but, but->hardmax);
+ if (value_abs < (double)but->hardmin) ui_set_but_val(but, but->hardmin);
+ else if (value_abs > (double)but->hardmax) ui_set_but_val(but, but->hardmax);
break;
}
case ICONTOG:
case ICONTOGN:
- if(!but->rnaprop || (RNA_property_flag(but->rnaprop) & PROP_ICONS_CONSECUTIVE)) {
- if(but->flag & UI_SELECT) but->iconadd= 1;
+ if (!but->rnaprop || (RNA_property_flag(but->rnaprop) & PROP_ICONS_CONSECUTIVE)) {
+ if (but->flag & UI_SELECT) but->iconadd= 1;
else but->iconadd= 0;
}
break;
case ICONROW:
- if(!but->rnaprop || (RNA_property_flag(but->rnaprop) & PROP_ICONS_CONSECUTIVE)) {
+ if (!but->rnaprop || (RNA_property_flag(but->rnaprop) & PROP_ICONS_CONSECUTIVE)) {
UI_GET_BUT_VALUE_INIT(but, value)
but->iconadd= (int)value- (int)(but->hardmin);
}
break;
case ICONTEXTROW:
- if(!but->rnaprop || (RNA_property_flag(but->rnaprop) & PROP_ICONS_CONSECUTIVE)) {
+ if (!but->rnaprop || (RNA_property_flag(but->rnaprop) & PROP_ICONS_CONSECUTIVE)) {
UI_GET_BUT_VALUE_INIT(but, value)
but->iconadd= (int)value- (int)(but->hardmin);
}
@@ -2205,7 +2205,7 @@ void ui_check_but(uiBut *but)
case MENU:
case ICONTEXTROW:
- if(but->x2 - but->x1 > 24) {
+ if (but->x2 - but->x1 > 24) {
UI_GET_BUT_VALUE_INIT(but, value)
ui_set_name_menu(but, (int)value);
}
@@ -2218,11 +2218,11 @@ void ui_check_but(uiBut *but)
UI_GET_BUT_VALUE_INIT(but, value)
- if(ui_is_but_float(but)) {
- if(value == (double) FLT_MAX) BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%sinf", but->str);
- else if(value == (double) -FLT_MAX) BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s-inf", but->str);
+ if (ui_is_but_float(but)) {
+ if (value == (double) FLT_MAX) BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%sinf", but->str);
+ else if (value == (double) -FLT_MAX) BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s-inf", but->str);
/* support length type buttons */
- else if(ui_is_but_unit(but)) {
+ else if (ui_is_but_unit(but)) {
char new_str[sizeof(but->drawstr)];
ui_get_but_string_unit(but, new_str, sizeof(new_str), value, TRUE);
BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s%s", but->str, new_str);
@@ -2236,7 +2236,7 @@ void ui_check_but(uiBut *but)
BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s%d", but->str, (int)value);
}
- if(but->rnaprop) {
+ if (but->rnaprop) {
PropertySubType pstype = RNA_property_subtype(but->rnaprop);
if (pstype == PROP_PERCENTAGE)
@@ -2245,7 +2245,7 @@ void ui_check_but(uiBut *but)
break;
case LABEL:
- if(ui_is_but_float(but)) {
+ if (ui_is_but_float(but)) {
int prec;
UI_GET_BUT_VALUE_INIT(but, value)
prec= ui_but_float_precision(but, value);
@@ -2260,7 +2260,7 @@ void ui_check_but(uiBut *but)
case IDPOIN:
case TEX:
case SEARCH_MENU:
- if(!but->editstr) {
+ if (!but->editstr) {
char str[UI_MAX_DRAW_STR];
ui_get_but_string(but, str, UI_MAX_DRAW_STR-strlen(but->str));
@@ -2284,16 +2284,16 @@ void ui_check_but(uiBut *but)
if (but->flag & UI_SELECT) {
but->drawstr[0]= '\0';
- if(but->modifier_key) {
+ if (but->modifier_key) {
char *str= but->drawstr;
- if(but->modifier_key & KM_SHIFT)
+ if (but->modifier_key & KM_SHIFT)
str= strcat(str, "Shift ");
- if(but->modifier_key & KM_CTRL)
+ if (but->modifier_key & KM_CTRL)
str= strcat(str, "Ctrl ");
- if(but->modifier_key & KM_ALT)
+ if (but->modifier_key & KM_ALT)
str= strcat(str, "Alt ");
- if(but->modifier_key & KM_OSKEY)
+ if (but->modifier_key & KM_OSKEY)
str= strcat(str, "Cmd ");
(void)str; /* UNUSED */
@@ -2308,7 +2308,7 @@ void ui_check_but(uiBut *but)
case BUT_TOGDUAL:
/* trying to get the dual-icon to left of text... not very nice */
- if(but->str[0]) {
+ if (but->str[0]) {
BLI_strncpy(but->drawstr, " ", UI_MAX_DRAW_STR);
BLI_strncpy(but->drawstr+2, but->str, UI_MAX_DRAW_STR-2);
}
@@ -2323,7 +2323,7 @@ void ui_check_but(uiBut *but)
}
/* if we are doing text editing, this will override the drawstr */
- if(but->editstr)
+ if (but->editstr)
BLI_strncpy(but->drawstr, but->editstr, UI_MAX_DRAW_STR);
/* text clipping moved to widget drawing code itself */
@@ -2333,7 +2333,7 @@ void ui_check_but(uiBut *but)
void uiBlockBeginAlign(uiBlock *block)
{
/* if other align was active, end it */
- if(block->flag & UI_BUT_ALIGN) uiBlockEndAlign(block);
+ if (block->flag & UI_BUT_ALIGN) uiBlockEndAlign(block);
block->flag |= UI_BUT_ALIGN_DOWN;
block->alignnr++;
@@ -2348,7 +2348,7 @@ static int buts_are_horiz(uiBut *but1, uiBut *but2)
dx= fabs( but1->x2 - but2->x1);
dy= fabs( but1->y1 - but2->y2);
- if(dx > dy) return 0;
+ if (dx > dy) return 0;
return 1;
}
@@ -2369,9 +2369,9 @@ static void ui_block_do_align_but(uiBut *first, short nr)
/* auto align */
- for(but=first; but && but->alignnr == nr; but=but->next) {
- if(but->next && but->next->alignnr == nr) {
- if(buts_are_horiz(but, but->next)) cols++;
+ for (but=first; but && but->alignnr == nr; but=but->next) {
+ if (but->next && but->next->alignnr == nr) {
+ if (buts_are_horiz(but, but->next)) cols++;
else rows++;
}
}
@@ -2379,18 +2379,18 @@ static void ui_block_do_align_but(uiBut *first, short nr)
/* rows==0: 1 row, cols==0: 1 column */
/* note; how it uses 'flag' in loop below (either set it, or OR it) is confusing */
- for(but=first, prev=NULL; but && but->alignnr == nr; prev=but, but=but->next) {
+ for (but=first, prev=NULL; but && but->alignnr == nr; prev=but, but=but->next) {
next= but->next;
- if(next && next->alignnr != nr)
+ if (next && next->alignnr != nr)
next= NULL;
/* clear old flag */
but->flag &= ~UI_BUT_ALIGN;
- if(flag==0) { /* first case */
- if(next) {
- if(buts_are_horiz(but, next)) {
- if(rows==0)
+ if (flag==0) { /* first case */
+ if (next) {
+ if (buts_are_horiz(but, next)) {
+ if (rows==0)
flag= UI_BUT_ALIGN_RIGHT;
else
flag= UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT;
@@ -2400,10 +2400,10 @@ static void ui_block_do_align_but(uiBut *first, short nr)
}
}
}
- else if(next==NULL) { /* last case */
- if(prev) {
- if(buts_are_horiz(prev, but)) {
- if(rows==0)
+ else if (next==NULL) { /* last case */
+ if (prev) {
+ if (buts_are_horiz(prev, but)) {
+ if (rows==0)
flag= UI_BUT_ALIGN_LEFT;
else
flag= UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_LEFT;
@@ -2411,39 +2411,39 @@ static void ui_block_do_align_but(uiBut *first, short nr)
else flag= UI_BUT_ALIGN_TOP;
}
}
- else if(buts_are_horiz(but, next)) {
+ else if (buts_are_horiz(but, next)) {
/* check if this is already second row */
- if( prev && buts_are_horiz(prev, but)==0) {
+ if ( prev && buts_are_horiz(prev, but)==0) {
flag &= ~UI_BUT_ALIGN_LEFT;
flag |= UI_BUT_ALIGN_TOP;
/* exception case: bottom row */
- if(rows>0) {
+ if (rows>0) {
uiBut *bt= but;
- while(bt && bt->alignnr == nr) {
- if(bt->next && bt->next->alignnr == nr && buts_are_horiz(bt, bt->next)==0 ) break;
+ while (bt && bt->alignnr == nr) {
+ if (bt->next && bt->next->alignnr == nr && buts_are_horiz(bt, bt->next)==0 ) break;
bt= bt->next;
}
- if(bt==NULL || bt->alignnr != nr) flag= UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT;
+ if (bt==NULL || bt->alignnr != nr) flag= UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT;
}
}
else flag |= UI_BUT_ALIGN_LEFT;
}
else {
- if(cols==0) {
+ if (cols==0) {
flag |= UI_BUT_ALIGN_TOP;
}
else { /* next button switches to new row */
- if(prev && buts_are_horiz(prev, but))
+ if (prev && buts_are_horiz(prev, but))
flag |= UI_BUT_ALIGN_LEFT;
else {
flag &= ~UI_BUT_ALIGN_LEFT;
flag |= UI_BUT_ALIGN_TOP;
}
- if( (flag & UI_BUT_ALIGN_TOP)==0) { /* stil top row */
- if(prev) {
- if(next && buts_are_horiz(but, next))
+ if ( (flag & UI_BUT_ALIGN_TOP)==0) { /* stil top row */
+ if (prev) {
+ if (next && buts_are_horiz(but, next))
flag = UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT|UI_BUT_ALIGN_RIGHT;
else {
/* last button in top row */
@@ -2461,30 +2461,30 @@ static void ui_block_do_align_but(uiBut *first, short nr)
but->flag |= flag;
/* merge coordinates */
- if(prev) {
+ if (prev) {
// simple cases
- if(rows==0) {
+ if (rows==0) {
but->x1= (prev->x2+but->x1)/2.0f;
prev->x2= but->x1;
}
- else if(cols==0) {
+ else if (cols==0) {
but->y2= (prev->y1+but->y2)/2.0f;
prev->y1= but->y2;
}
else {
- if(buts_are_horiz(prev, but)) {
+ if (buts_are_horiz(prev, but)) {
but->x1= (prev->x2+but->x1)/2.0f;
prev->x2= but->x1;
/* copy height too */
but->y2= prev->y2;
}
- else if(prev->prev && buts_are_horiz(prev->prev, prev)==0) {
+ else if (prev->prev && buts_are_horiz(prev->prev, prev)==0) {
/* the previous button is a single one in its row */
but->y2= (prev->y1+but->y2)/2.0f;
prev->y1= but->y2;
but->x1= prev->x1;
- if(next && buts_are_horiz(but, next)==0)
+ if (next && buts_are_horiz(but, next)==0)
but->x2= prev->x2;
}
else {
@@ -2502,15 +2502,15 @@ void ui_block_do_align(uiBlock *block)
short nr;
/* align buttons with same align nr */
- for(but=block->buttons.first; but;) {
- if(but->alignnr) {
+ for (but=block->buttons.first; but;) {
+ if (but->alignnr) {
nr= but->alignnr;
ui_block_do_align_but(but, nr);
/* skip with same number */
- for(; but && but->alignnr == nr; but=but->next);
+ for (; but && but->alignnr == nr; but=but->next);
- if(!but)
+ if (!but)
break;
}
else
@@ -2531,8 +2531,8 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
uiBut *but;
int slen;
- if(type & BUTPOIN) { /* a pointer is required */
- if(poin==NULL)
+ if (type & BUTPOIN) { /* a pointer is required */
+ if (poin==NULL)
return NULL;
}
@@ -2548,7 +2548,7 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
but->retval= retval;
slen= strlen(str);
- if(slen >= UI_MAX_NAME_STR-1) {
+ if (slen >= UI_MAX_NAME_STR-1) {
but->str= MEM_mallocN(slen+2, "ui_def_but str"); /* why +2 ? */
}
else {
@@ -2575,7 +2575,7 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
but->aspect= 1.0f; //XXX block->aspect;
but->block= block; // pointer back, used for frontbuffer status, and picker
- if((block->flag & UI_BUT_ALIGN) && ui_but_can_align(but))
+ if ((block->flag & UI_BUT_ALIGN) && ui_but_can_align(but))
but->alignnr= block->alignnr;
but->func= block->func;
@@ -2583,24 +2583,24 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
but->func_arg2= block->func_arg2;
but->funcN= block->funcN;
- if(block->func_argN)
+ if (block->func_argN)
but->func_argN= MEM_dupallocN(block->func_argN);
but->pos= -1; /* cursor invisible */
- if(ELEM4(but->type, NUM, NUMABS, NUMSLI, HSVSLI)) { /* add a space to name */
+ if (ELEM4(but->type, NUM, NUMABS, NUMSLI, HSVSLI)) { /* add a space to name */
/* slen remains unchanged from previous assignment, ensure this stays true */
- if(slen>0 && slen<UI_MAX_NAME_STR-2) {
- if(but->str[slen-1]!=' ') {
+ if (slen>0 && slen<UI_MAX_NAME_STR-2) {
+ if (but->str[slen-1]!=' ') {
but->str[slen]= ' ';
but->str[slen+1]= 0;
}
}
}
- if((block->flag & UI_BLOCK_LOOP) || ELEM8(but->type, MENU, TEX, LABEL, IDPOIN, BLOCK, BUTM, SEARCH_MENU, PROGRESSBAR))
+ if ((block->flag & UI_BLOCK_LOOP) || ELEM8(but->type, MENU, TEX, LABEL, IDPOIN, BLOCK, BUTM, SEARCH_MENU, PROGRESSBAR))
but->flag |= (UI_TEXT_LEFT|UI_ICON_LEFT);
- else if(but->type==BUT_TOGDUAL)
+ else if (but->type==BUT_TOGDUAL)
but->flag |= UI_ICON_LEFT;
but->flag |= (block->flag & UI_BUT_ALIGN);
@@ -2612,14 +2612,14 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
}
/* keep track of UI_interface.h */
- if(ELEM7(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, BUTM));
- else if(ELEM3(but->type, SCROLL, SEPR, FTPREVIEW));
- else if(but->type >= SEARCH_MENU);
+ if (ELEM7(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, BUTM));
+ else if (ELEM3(but->type, SCROLL, SEPR, FTPREVIEW));
+ else if (but->type >= SEARCH_MENU);
else but->flag |= UI_BUT_UNDO;
BLI_addtail(&block->buttons, but);
- if(block->curlayout)
+ if (block->curlayout)
ui_layout_add_but(block->curlayout, but);
#ifdef WITH_PYTHON
@@ -2653,8 +2653,8 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s
int freestr= 0, icon= 0;
/* use rna values if parameters are not specified */
- if(!str) {
- if(type == MENU && proptype == PROP_ENUM) {
+ if (!str) {
+ if (type == MENU && proptype == PROP_ENUM) {
EnumPropertyItem *item;
DynStr *dynstr;
int i, totitem, value, free;
@@ -2664,19 +2664,19 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s
dynstr= BLI_dynstr_new();
BLI_dynstr_appendf(dynstr, "%s%%t", RNA_property_ui_name(prop));
- for(i=0; i<totitem; i++) {
- if(!item[i].identifier[0]) {
- if(item[i].name)
+ for (i=0; i<totitem; i++) {
+ if (!item[i].identifier[0]) {
+ if (item[i].name)
BLI_dynstr_appendf(dynstr, "|%s%%l", item[i].name);
else
BLI_dynstr_append(dynstr, "|%l");
}
- else if(item[i].icon)
+ else if (item[i].icon)
BLI_dynstr_appendf(dynstr, "|%s %%i%d %%x%d", item[i].name, item[i].icon, item[i].value);
else
BLI_dynstr_appendf(dynstr, "|%s %%x%d", item[i].name, item[i].value);
- if(value == item[i].value)
+ if (value == item[i].value)
icon= item[i].icon;
}
str= BLI_dynstr_get_cstring(dynstr);
@@ -2688,13 +2688,13 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s
freestr= 1;
}
- else if(ELEM(type, ROW, LISTROW) && proptype == PROP_ENUM) {
+ else if (ELEM(type, ROW, LISTROW) && proptype == PROP_ENUM) {
EnumPropertyItem *item;
int i, totitem, free;
RNA_property_enum_items_gettexted(block->evil_C, ptr, prop, &item, &totitem, &free);
- for(i=0; i<totitem; i++) {
- if(item[i].identifier[0] && item[i].value == (int)max) {
+ for (i=0; i<totitem; i++) {
+ if (item[i].identifier[0] && item[i].value == (int)max) {
str= item[i].name;
icon= item[i].icon;
}
@@ -2713,44 +2713,44 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s
}
}
- if(!tip && proptype != PROP_ENUM)
+ if (!tip && proptype != PROP_ENUM)
tip= RNA_property_ui_description(prop);
- if(min == max || a1 == -1 || a2 == -1) {
- if(proptype == PROP_INT) {
+ if (min == max || a1 == -1 || a2 == -1) {
+ if (proptype == PROP_INT) {
int hardmin, hardmax, softmin, softmax, step;
RNA_property_int_range(ptr, prop, &hardmin, &hardmax);
RNA_property_int_ui_range(ptr, prop, &softmin, &softmax, &step);
- if(!ELEM(type, ROW, LISTROW) && min == max) {
+ if (!ELEM(type, ROW, LISTROW) && min == max) {
min= hardmin;
max= hardmax;
}
- if(a1 == -1)
+ if (a1 == -1)
a1= step;
- if(a2 == -1)
+ if (a2 == -1)
a2= 0;
}
- else if(proptype == PROP_FLOAT) {
+ else if (proptype == PROP_FLOAT) {
float hardmin, hardmax, softmin, softmax, step, precision;
RNA_property_float_range(ptr, prop, &hardmin, &hardmax);
RNA_property_float_ui_range(ptr, prop, &softmin, &softmax, &step, &precision);
- if(!ELEM(type, ROW, LISTROW) && min == max) {
+ if (!ELEM(type, ROW, LISTROW) && min == max) {
min= hardmin;
max= hardmax;
}
- if(a1 == -1)
+ if (a1 == -1)
a1= step;
- if(a2 == -1)
+ if (a2 == -1)
a2= precision;
}
- else if(proptype == PROP_STRING) {
+ else if (proptype == PROP_STRING) {
min= 0;
max= RNA_property_string_maxlength(prop);
- if(max == 0) /* interface code should ideally support unlimited length */
+ if (max == 0) /* interface code should ideally support unlimited length */
max= UI_MAX_DRAW_STR;
}
}
@@ -2761,12 +2761,12 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s
but->rnapoin= *ptr;
but->rnaprop= prop;
- if(RNA_property_array_length(&but->rnapoin, but->rnaprop))
+ if (RNA_property_array_length(&but->rnapoin, but->rnaprop))
but->rnaindex= index;
else
but->rnaindex= 0;
- if(icon) {
+ if (icon) {
but->icon= (BIFIconID)icon;
but->flag |= UI_HAS_ICON;
but->flag|= UI_ICON_LEFT;
@@ -2781,7 +2781,7 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s
}
/* If this button uses units, calculate the step from this */
- if((proptype == PROP_FLOAT) && ui_is_but_unit(but)) {
+ if ((proptype == PROP_FLOAT) && ui_is_but_unit(but)) {
but->a1= ui_get_but_step_unit(but, but->a1);
}
@@ -2797,7 +2797,7 @@ static uiBut *ui_def_but_rna_propname(uiBlock *block, int type, int retval, cons
PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
uiBut *but;
- if(prop) {
+ if (prop) {
but= ui_def_but_rna(block, type, retval, str, x1, y1, x2, y2, ptr, prop, index, min, max, a1, a2, tip);
}
else {
@@ -2813,14 +2813,15 @@ static uiBut *ui_def_but_operator_ptr(uiBlock *block, int type, wmOperatorType *
{
uiBut *but;
- if(!str) {
- if(ot) str = ot->name;
+ if (!str) {
+ if (ot && ot->srna)
+ str = RNA_struct_ui_name(ot->srna);
+ else
+ str = "";
}
-
- if ((!tip || tip[0]=='\0') && ot && ot->description) {
- tip= ot->description;
- tip = TIP_(tip);
+ if ((!tip || tip[0]=='\0') && ot && ot->srna) {
+ tip = RNA_struct_ui_description(ot->srna);
}
but= ui_def_but(block, type, -1, str, x1, y1, x2, y2, NULL, 0, 0, 0, 0, tip);
@@ -2828,7 +2829,7 @@ static uiBut *ui_def_but_operator_ptr(uiBlock *block, int type, wmOperatorType *
but->opcontext= opcontext;
but->flag &= ~UI_BUT_UNDO; /* no need for ui_but_is_undo(), we never need undo here */
- if(!ot) {
+ if (!ot) {
but->flag |= UI_BUT_DISABLED;
but->lock = 1;
but->lockstr = "";
@@ -2836,12 +2837,15 @@ static uiBut *ui_def_but_operator_ptr(uiBlock *block, int type, wmOperatorType *
return but;
}
+
+#if 0 /* UNUSED */
static uiBut *UNUSED_FUNCTION(ui_def_but_operator)(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, const char *tip)
{
wmOperatorType *ot = WM_operatortype_find(opname, 0);
if (str == NULL && ot == NULL) str = opname;
return ui_def_but_operator_ptr(block, type, ot, opcontext, str, x1, y1, x2, y2, tip);
}
+#endif
static uiBut *ui_def_but_operator_text(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip)
{
@@ -2850,8 +2854,8 @@ static uiBut *ui_def_but_operator_text(uiBlock *block, int type, const char *opn
ot= WM_operatortype_find(opname, 0);
- if(!str) {
- if(ot) str= ot->name;
+ if (!str) {
+ if (ot) str= ot->name;
else str= opname;
}
@@ -2864,7 +2868,7 @@ static uiBut *ui_def_but_operator_text(uiBlock *block, int type, const char *opn
but->opcontext= opcontext;
but->flag &= ~UI_BUT_UNDO; /* no need for ui_but_is_undo(), we never need undo here */
- if(!ot) {
+ if (!ot) {
but->flag |= UI_BUT_DISABLED;
but->lock = 1;
but->lockstr = "";
@@ -2890,7 +2894,8 @@ static int findBitIndex(unsigned int x)
{
if (!x || !is_power_of_2_i(x)) { /* is_power_of_2_i(x) strips lowest bit */
return -1;
- } else {
+ }
+ else {
int idx= 0;
if (x&0xFFFF0000) idx+=16, x>>=16;
@@ -2928,23 +2933,23 @@ void autocomplete_do_name(AutoComplete *autocpl, const char *name)
const char *startname= autocpl->startname;
int a;
- for(a=0; a<autocpl->maxlen-1; a++) {
- if(startname[a]==0 || startname[a]!=name[a])
+ for (a=0; a<autocpl->maxlen-1; a++) {
+ if (startname[a]==0 || startname[a]!=name[a])
break;
}
/* found a match */
- if(startname[a]==0) {
+ if (startname[a]==0) {
/* first match */
- if(truncate[0]==0)
+ if (truncate[0]==0)
BLI_strncpy(truncate, name, autocpl->maxlen);
else {
/* remove from truncate what is not in bone->name */
- for(a=0; a<autocpl->maxlen-1; a++) {
- if(name[a] == 0) {
+ for (a=0; a<autocpl->maxlen-1; a++) {
+ if (name[a] == 0) {
truncate[a]= 0;
break;
}
- else if(truncate[a]!=name[a])
+ else if (truncate[a]!=name[a])
truncate[a]= 0;
}
}
@@ -2953,10 +2958,10 @@ void autocomplete_do_name(AutoComplete *autocpl, const char *name)
void autocomplete_end(AutoComplete *autocpl, char *autoname)
{
- if(autocpl->truncate[0])
+ if (autocpl->truncate[0])
BLI_strncpy(autoname, autocpl->truncate, autocpl->maxlen);
else {
- if (autoname != autocpl->startname) /* dont copy a string over its self */
+ if (autoname != autocpl->startname) /* don't copy a string over its self */
BLI_strncpy(autoname, autocpl->startname, autocpl->maxlen);
}
MEM_freeN(autocpl->truncate);
@@ -2969,14 +2974,14 @@ static void autocomplete_id(bContext *C, char *str, void *arg_v)
int blocktype= (intptr_t)arg_v;
ListBase *listb= which_libbase(CTX_data_main(C), blocktype);
- if(listb==NULL) return;
+ if (listb==NULL) return;
/* search if str matches the beginning of an ID struct */
- if(str[0]) {
+ if (str[0]) {
AutoComplete *autocpl= autocomplete_begin(str, MAX_ID_NAME-2);
ID *id;
- for(id= listb->first; id; id= id->next)
+ for (id= listb->first; id; id= id->next)
autocomplete_do_name(autocpl, id->name+2);
autocomplete_end(autocpl, str);
@@ -2985,7 +2990,7 @@ static void autocomplete_id(bContext *C, char *str, void *arg_v)
static void ui_check_but_and_iconize(uiBut *but, int icon)
{
- if(icon) {
+ if (icon) {
but->icon= (BIFIconID) icon;
but->flag|= UI_HAS_ICON;
}
@@ -2998,7 +3003,8 @@ static uiBut *uiDefButBit(uiBlock *block, int type, int bit, int retval, const c
int bitIdx= findBitIndex(bit);
if (bitIdx==-1) {
return NULL;
- } else {
+ }
+ else {
return uiDefBut(block, type|BIT|bitIdx, retval, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip);
}
}
@@ -3082,7 +3088,8 @@ static uiBut *uiDefIconButBit(uiBlock *block, int type, int bit, int retval, int
int bitIdx= findBitIndex(bit);
if (bitIdx==-1) {
return NULL;
- } else {
+ }
+ else {
return uiDefIconBut(block, type|BIT|bitIdx, retval, icon, x1, y1, x2, y2, poin, min, max, a1, a2, tip);
}
}
@@ -3160,7 +3167,8 @@ static uiBut *uiDefIconTextButBit(uiBlock *block, int type, int bit, int retval,
int bitIdx= findBitIndex(bit);
if (bitIdx==-1) {
return NULL;
- } else {
+ }
+ else {
return uiDefIconTextBut(block, type|BIT|bitIdx, retval, icon, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip);
}
}
@@ -3268,19 +3276,19 @@ void uiBlockFlipOrder(uiBlock *block)
uiBut *but, *next;
float centy, miny=10000, maxy= -10000;
- if(U.uiflag & USER_MENUFIXEDORDER)
+ if (U.uiflag & USER_MENUFIXEDORDER)
return;
- else if(block->flag & UI_BLOCK_NO_FLIP)
+ else if (block->flag & UI_BLOCK_NO_FLIP)
return;
- for(but= block->buttons.first; but; but= but->next) {
- if(but->flag & UI_BUT_ALIGN) return;
- if(but->y1 < miny) miny= but->y1;
- if(but->y2 > maxy) maxy= but->y2;
+ for (but= block->buttons.first; but; but= but->next) {
+ if (but->flag & UI_BUT_ALIGN) return;
+ if (but->y1 < miny) miny= but->y1;
+ if (but->y2 > maxy) maxy= but->y2;
}
/* mirror trick */
centy= (miny+maxy)/2.0f;
- for(but= block->buttons.first; but; but= but->next) {
+ for (but= block->buttons.first; but; but= but->next) {
but->y1 = centy-(but->y1-centy);
but->y2 = centy-(but->y2-centy);
SWAP(float, but->y1, but->y2);
@@ -3289,7 +3297,7 @@ void uiBlockFlipOrder(uiBlock *block)
/* also flip order in block itself, for example for arrowkey */
lb.first= lb.last= NULL;
but= block->buttons.first;
- while(but) {
+ while (but) {
next= but->next;
BLI_remlink(&block->buttons, but);
BLI_addtail(&lb, but);
@@ -3370,7 +3378,7 @@ void uiButSetDragImage(uiBut *but, const char *path, int icon, struct ImBuf *imb
PointerRNA *uiButGetOperatorPtrRNA(uiBut *but)
{
- if(but->optype && !but->opptr) {
+ if (but->optype && !but->opptr) {
but->opptr= MEM_callocN(sizeof(PointerRNA), "uiButOpPtr");
WM_operator_properties_create_ptr(but->opptr, but->optype);
}
@@ -3473,7 +3481,7 @@ uiBut *uiDefIDPoinBut(uiBlock *block, uiIDPoinFuncFP func, short blocktype, int
but->idpoin_idpp= (ID**) idpp;
ui_check_but(but);
- if(blocktype)
+ if (blocktype)
uiButSetCompleteFunc(but, autocomplete_id, (void *)(intptr_t)blocktype);
return but;
@@ -3552,7 +3560,7 @@ uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg,
uiBut *but= ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip);
/* XXX temp, old menu calls pass on icon arrow, which is now UI_ICON_SUBMENU flag */
- if(icon!=ICON_RIGHTARROW_THIN) {
+ if (icon!=ICON_RIGHTARROW_THIN) {
but->icon= (BIFIconID) icon;
but->flag|= UI_ICON_LEFT;
}
@@ -3626,9 +3634,9 @@ void uiButSetSearchFunc(uiBut *but, uiButSearchFunc sfunc, void *arg, uiButHandl
uiButSetFunc(but, bfunc, arg, active);
/* search buttons show red-alert if item doesn't exist, not for menus */
- if(0==(but->block->flag & UI_BLOCK_LOOP)) {
+ if (0==(but->block->flag & UI_BLOCK_LOOP)) {
/* skip empty buttons, not all buttons need input, we only show invalid */
- if(but->drawstr[0])
+ if (but->drawstr[0])
ui_but_search_test(but);
}
}
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index 5e095bae922..9b48e956468 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -69,11 +69,11 @@ void ui_but_anim_flag(uiBut *but, float cfra)
fcu= ui_but_get_fcurve(but, NULL, &driven);
- if(fcu) {
- if(!driven) {
+ if (fcu) {
+ if (!driven) {
but->flag |= UI_BUT_ANIMATED;
- if(fcurve_frame_has_keyframe(fcu, cfra, 0))
+ if (fcurve_frame_has_keyframe(fcu, cfra, 0))
but->flag |= UI_BUT_ANIMATED_KEY;
}
else {
@@ -90,10 +90,10 @@ int ui_but_anim_expression_get(uiBut *but, char *str, size_t maxlen)
fcu= ui_but_get_fcurve(but, NULL, &driven);
- if(fcu && driven) {
+ if (fcu && driven) {
driver= fcu->driver;
- if(driver && driver->type == DRIVER_TYPE_PYTHON) {
+ if (driver && driver->type == DRIVER_TYPE_PYTHON) {
BLI_strncpy(str, driver->expression, maxlen);
return 1;
}
@@ -110,10 +110,10 @@ int ui_but_anim_expression_set(uiBut *but, const char *str)
fcu= ui_but_get_fcurve(but, NULL, &driven);
- if(fcu && driven) {
+ if (fcu && driven) {
driver= fcu->driver;
- if(driver && driver->type == DRIVER_TYPE_PYTHON) {
+ if (driver && driver->type == DRIVER_TYPE_PYTHON) {
BLI_strncpy_utf8(driver->expression, str, sizeof(driver->expression));
driver->flag |= DRIVER_FLAG_RECOMPILE;
WM_event_add_notifier(but->block->evil_C, NC_ANIMATION|ND_KEYFRAME, NULL);
@@ -185,11 +185,11 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra)
fcu= ui_but_get_fcurve(but, &action, &driven);
- if(fcu && !driven) {
+ if (fcu && !driven) {
id= but->rnapoin.id.data;
// TODO: this should probably respect the keyingset only option for anim
- if(autokeyframe_cfra_can_key(scene, id)) {
+ if (autokeyframe_cfra_can_key(scene, id)) {
ReportList *reports = CTX_wm_reports(C);
short flag = ANIM_get_keyframing_flags(scene, 1);
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 01700e1c52a..a2f253cecaf 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -83,16 +83,16 @@ void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float r
int a;
/* mult */
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
vec[a][0]*= rad; vec[a][1]*= rad;
}
glBegin(mode);
/* start with corner right-bottom */
- if(roundboxtype & UI_CNR_BOTTOM_RIGHT) {
+ if (roundboxtype & UI_CNR_BOTTOM_RIGHT) {
glVertex2f(maxx-rad, miny);
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
glVertex2f(maxx-rad+vec[a][0], miny+vec[a][1]);
}
glVertex2f(maxx, miny+rad);
@@ -100,9 +100,9 @@ void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float r
else glVertex2f(maxx, miny);
/* corner right-top */
- if(roundboxtype & UI_CNR_TOP_RIGHT) {
+ if (roundboxtype & UI_CNR_TOP_RIGHT) {
glVertex2f(maxx, maxy-rad);
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
glVertex2f(maxx-vec[a][1], maxy-rad+vec[a][0]);
}
glVertex2f(maxx-rad, maxy);
@@ -110,9 +110,9 @@ void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float r
else glVertex2f(maxx, maxy);
/* corner left-top */
- if(roundboxtype & UI_CNR_TOP_LEFT) {
+ if (roundboxtype & UI_CNR_TOP_LEFT) {
glVertex2f(minx+rad, maxy);
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
glVertex2f(minx+rad-vec[a][0], maxy-vec[a][1]);
}
glVertex2f(minx, maxy-rad);
@@ -120,9 +120,9 @@ void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float r
else glVertex2f(minx, maxy);
/* corner left-bottom */
- if(roundboxtype & UI_CNR_BOTTOM_LEFT) {
+ if (roundboxtype & UI_CNR_BOTTOM_LEFT) {
glVertex2f(minx, miny+rad);
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
glVertex2f(minx+vec[a][1], miny+rad-vec[a][0]);
}
glVertex2f(minx+rad, miny);
@@ -154,30 +154,30 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl
int a;
/* mult */
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
vec[a][0]*= rad; vec[a][1]*= rad;
}
/* get current color, needs to be outside of glBegin/End */
glGetFloatv(GL_CURRENT_COLOR, color);
/* 'shade' defines strength of shading */
- coltop[0]= color[0]+shadetop; if(coltop[0]>1.0f) coltop[0]= 1.0f;
- coltop[1]= color[1]+shadetop; if(coltop[1]>1.0f) coltop[1]= 1.0f;
- coltop[2]= color[2]+shadetop; if(coltop[2]>1.0f) coltop[2]= 1.0f;
- coldown[0]= color[0]+shadedown; if(coldown[0]<0.0f) coldown[0]= 0.0f;
- coldown[1]= color[1]+shadedown; if(coldown[1]<0.0f) coldown[1]= 0.0f;
- coldown[2]= color[2]+shadedown; if(coldown[2]<0.0f) coldown[2]= 0.0f;
+ coltop[0]= color[0]+shadetop; if (coltop[0]>1.0f) coltop[0]= 1.0f;
+ coltop[1]= color[1]+shadetop; if (coltop[1]>1.0f) coltop[1]= 1.0f;
+ coltop[2]= color[2]+shadetop; if (coltop[2]>1.0f) coltop[2]= 1.0f;
+ coldown[0]= color[0]+shadedown; if (coldown[0]<0.0f) coldown[0]= 0.0f;
+ coldown[1]= color[1]+shadedown; if (coldown[1]<0.0f) coldown[1]= 0.0f;
+ coldown[2]= color[2]+shadedown; if (coldown[2]<0.0f) coldown[2]= 0.0f;
glShadeModel(GL_SMOOTH);
glBegin(mode);
/* start with corner right-bottom */
- if(roundboxtype & UI_CNR_BOTTOM_RIGHT) {
+ if (roundboxtype & UI_CNR_BOTTOM_RIGHT) {
round_box_shade_col(coltop, coldown, 0.0);
glVertex2f(maxx-rad, miny);
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
round_box_shade_col(coltop, coldown, vec[a][1]*idiv);
glVertex2f(maxx-rad+vec[a][0], miny+vec[a][1]);
}
@@ -191,12 +191,12 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl
}
/* corner right-top */
- if(roundboxtype & UI_CNR_TOP_RIGHT) {
+ if (roundboxtype & UI_CNR_TOP_RIGHT) {
round_box_shade_col(coltop, coldown, (div-rad)*idiv);
glVertex2f(maxx, maxy-rad);
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
round_box_shade_col(coltop, coldown, (div-rad+vec[a][1])*idiv);
glVertex2f(maxx-vec[a][1], maxy-rad+vec[a][0]);
}
@@ -209,12 +209,12 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl
}
/* corner left-top */
- if(roundboxtype & UI_CNR_TOP_LEFT) {
+ if (roundboxtype & UI_CNR_TOP_LEFT) {
round_box_shade_col(coltop, coldown, 1.0);
glVertex2f(minx+rad, maxy);
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
round_box_shade_col(coltop, coldown, (div-vec[a][1])*idiv);
glVertex2f(minx+rad-vec[a][0], maxy-vec[a][1]);
}
@@ -228,12 +228,12 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl
}
/* corner left-bottom */
- if(roundboxtype & UI_CNR_BOTTOM_LEFT) {
+ if (roundboxtype & UI_CNR_BOTTOM_LEFT) {
round_box_shade_col(coltop, coldown, rad*idiv);
glVertex2f(minx, miny+rad);
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
round_box_shade_col(coltop, coldown, (rad-vec[a][1])*idiv);
glVertex2f(minx+vec[a][1], miny+rad-vec[a][0]);
}
@@ -262,29 +262,29 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float
int a;
/* mult */
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
vec[a][0]*= rad; vec[a][1]*= rad;
}
/* get current color, needs to be outside of glBegin/End */
glGetFloatv(GL_CURRENT_COLOR, color);
/* 'shade' defines strength of shading */
- colLeft[0]= color[0]+shadeLeft; if(colLeft[0]>1.0f) colLeft[0]= 1.0f;
- colLeft[1]= color[1]+shadeLeft; if(colLeft[1]>1.0f) colLeft[1]= 1.0f;
- colLeft[2]= color[2]+shadeLeft; if(colLeft[2]>1.0f) colLeft[2]= 1.0f;
- colRight[0]= color[0]+shadeRight; if(colRight[0]<0.0f) colRight[0]= 0.0f;
- colRight[1]= color[1]+shadeRight; if(colRight[1]<0.0f) colRight[1]= 0.0f;
- colRight[2]= color[2]+shadeRight; if(colRight[2]<0.0f) colRight[2]= 0.0f;
+ colLeft[0]= color[0]+shadeLeft; if (colLeft[0]>1.0f) colLeft[0]= 1.0f;
+ colLeft[1]= color[1]+shadeLeft; if (colLeft[1]>1.0f) colLeft[1]= 1.0f;
+ colLeft[2]= color[2]+shadeLeft; if (colLeft[2]>1.0f) colLeft[2]= 1.0f;
+ colRight[0]= color[0]+shadeRight; if (colRight[0]<0.0f) colRight[0]= 0.0f;
+ colRight[1]= color[1]+shadeRight; if (colRight[1]<0.0f) colRight[1]= 0.0f;
+ colRight[2]= color[2]+shadeRight; if (colRight[2]<0.0f) colRight[2]= 0.0f;
glShadeModel(GL_SMOOTH);
glBegin(mode);
/* start with corner right-bottom */
- if(roundboxtype & UI_CNR_BOTTOM_RIGHT) {
+ if (roundboxtype & UI_CNR_BOTTOM_RIGHT) {
round_box_shade_col(colLeft, colRight, 0.0);
glVertex2f(maxx-rad, miny);
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
round_box_shade_col(colLeft, colRight, vec[a][0]*idiv);
glVertex2f(maxx-rad+vec[a][0], miny+vec[a][1]);
}
@@ -298,11 +298,11 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float
}
/* corner right-top */
- if(roundboxtype & UI_CNR_TOP_RIGHT) {
+ if (roundboxtype & UI_CNR_TOP_RIGHT) {
round_box_shade_col(colLeft, colRight, 0.0);
glVertex2f(maxx, maxy-rad);
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
round_box_shade_col(colLeft, colRight, (div-rad-vec[a][0])*idiv);
glVertex2f(maxx-vec[a][1], maxy-rad+vec[a][0]);
@@ -316,11 +316,11 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float
}
/* corner left-top */
- if(roundboxtype & UI_CNR_TOP_LEFT) {
+ if (roundboxtype & UI_CNR_TOP_LEFT) {
round_box_shade_col(colLeft, colRight, (div-rad)*idiv);
glVertex2f(minx+rad, maxy);
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
round_box_shade_col(colLeft, colRight, (div-rad+vec[a][0])*idiv);
glVertex2f(minx+rad-vec[a][0], maxy-vec[a][1]);
}
@@ -334,11 +334,11 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float
}
/* corner left-bottom */
- if(roundboxtype & UI_CNR_BOTTOM_LEFT) {
+ if (roundboxtype & UI_CNR_BOTTOM_LEFT) {
round_box_shade_col(colLeft, colRight, 1.0);
glVertex2f(minx, miny+rad);
- for(a=0; a<7; a++) {
+ for (a=0; a<7; a++) {
round_box_shade_col(colLeft, colRight, (vec[a][0])*idiv);
glVertex2f(minx+vec[a][1], miny+rad-vec[a][0]);
}
@@ -360,7 +360,7 @@ void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad)
{
float color[4];
- if(roundboxtype & UI_RB_ALPHA) {
+ if (roundboxtype & UI_RB_ALPHA) {
glGetFloatv(GL_CURRENT_COLOR, color);
color[3]= 0.5;
glColor4fv(color);
@@ -382,7 +382,7 @@ void uiRoundBox(float minx, float miny, float maxx, float maxy, float rad)
{
float color[4];
- if(roundboxtype & UI_RB_ALPHA) {
+ if (roundboxtype & UI_RB_ALPHA) {
glGetFloatv(GL_CURRENT_COLOR, color);
color[3]= 0.5;
glColor4fv(color);
@@ -401,7 +401,7 @@ void uiEmboss(float x1, float y1, float x2, float y2, int sel)
{
/* below */
- if(sel) glColor3ub(200,200,200);
+ if (sel) glColor3ub(200,200,200);
else glColor3ub(50,50,50);
fdrawline(x1, y1, x2, y1);
@@ -409,7 +409,7 @@ void uiEmboss(float x1, float y1, float x2, float y2, int sel)
fdrawline(x2, y1, x2, y2);
/* top */
- if(sel) glColor3ub(50,50,50);
+ if (sel) glColor3ub(50,50,50);
else glColor3ub(200,200,200);
fdrawline(x1, y2, x2, y2);
@@ -477,8 +477,8 @@ static void ui_draw_but_CHARTAB(uiBut *but)
int charmax = G.charmax;
/* FO_BUILTIN_NAME font in use. There are TTF FO_BUILTIN_NAME and non-TTF FO_BUILTIN_NAME fonts */
- if(!strcmp(G.selfont->name, FO_BUILTIN_NAME)) {
- if(G.ui_international == TRUE) {
+ if (!strcmp(G.selfont->name, FO_BUILTIN_NAME)) {
+ if (G.ui_international == TRUE) {
charmax = 0xff;
}
else {
@@ -487,7 +487,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
}
/* Category list exited without selecting the area */
- if(G.charmax == 0)
+ if (G.charmax == 0)
charmax = G.charmax = 0xffff;
/* Calculate the size of the button */
@@ -506,9 +506,9 @@ static void ui_draw_but_CHARTAB(uiBut *but)
cs = G.charstart;
/* Set the font, in case it is not FO_BUILTIN_NAME font */
- if(G.selfont && strcmp(G.selfont->name, FO_BUILTIN_NAME)) {
+ if (G.selfont && strcmp(G.selfont->name, FO_BUILTIN_NAME)) {
// Is the font file packed, if so then use the packed file
- if(G.selfont->packedfile) {
+ if (G.selfont->packedfile) {
pf = G.selfont->packedfile;
FTF_SetFont(pf->data, pf->size, 14.0);
}
@@ -522,7 +522,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
}
}
else {
- if(G.ui_international == TRUE) {
+ if (G.ui_international == TRUE) {
FTF_SetFont((unsigned char *) datatoc_bfont_ttf, datatoc_bfont_ttf_size, 14.0);
}
}
@@ -534,14 +534,14 @@ static void ui_draw_but_CHARTAB(uiBut *but)
glRectf((rect->xmin), (rect->ymin), (rect->xmax), (rect->ymax));
glColor3ub(0, 0, 0);
- for(y = 0; y < 6; y++) {
+ for (y = 0; y < 6; y++) {
// Do not draw more than the category allows
- if(cs > charmax) break;
+ if (cs > charmax) break;
- for(x = 0; x < 12; x++)
+ for (x = 0; x < 12; x++)
{
// Do not draw more than the category allows
- if(cs > charmax) break;
+ if (cs > charmax) break;
// Draw one grid cell
glBegin(GL_LINE_LOOP);
@@ -610,7 +610,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
glShadeModel(GL_FLAT);
/* Return Font Settings to original */
- if(U.fontsize && U.fontname[0]) {
+ if (U.fontsize && U.fontname[0]) {
result = FTF_SetFont((unsigned char *)U.fontname, 0, U.fontsize);
}
else if (U.fontsize) {
@@ -622,7 +622,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
}
/* resets the font size */
- if(G.ui_international == TRUE) {
+ if (G.ui_international == TRUE) {
// uiSetCurFont(but->block, UI_HELV);
}
}
@@ -769,8 +769,8 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol),
/* log scale for alpha */
alpha = scopes->wavefrm_alpha*scopes->wavefrm_alpha;
- for(c=0; c<3; c++) {
- for(i=0; i<3; i++) {
+ for (c=0; c<3; c++) {
+ for (i=0; i<3; i++) {
colors_alpha[c][i] = colors[c][i] * alpha;
colorsycc_alpha[c][i] = colorsycc[c][i] * alpha;
}
@@ -811,7 +811,7 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol),
fdrawline(rect.xmin+w, rect.ymin, rect.xmin+w, rect.ymax);
/* 16-235-240 level in case of ITU-R BT601/709 */
glColor4f(1.f, 0.4f, 0.f, 0.2f);
- if (ELEM(scopes->wavefrm_mode, SCOPES_WAVEFRM_YCC_601, SCOPES_WAVEFRM_YCC_709)){
+ if (ELEM(scopes->wavefrm_mode, SCOPES_WAVEFRM_YCC_601, SCOPES_WAVEFRM_YCC_709)) {
fdrawline(rect.xmin+22, yofs+h*16.0f/255.0f, rect.xmax+1, yofs+h*16.0f/255.0f);
fdrawline(rect.xmin+22, yofs+h*235.0f/255.0f, rect.xmin+w3, yofs+h*235.0f/255.0f);
fdrawline(rect.xmin+3*w3, yofs+h*235.0f/255.0f, rect.xmax+1, yofs+h*235.0f/255.0f);
@@ -826,7 +826,7 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol),
/* LUMA (1 channel) */
glBlendFunc(GL_ONE,GL_ONE);
glColor3f(alpha, alpha, alpha);
- if (scopes->wavefrm_mode == SCOPES_WAVEFRM_LUMA){
+ if (scopes->wavefrm_mode == SCOPES_WAVEFRM_LUMA) {
glBlendFunc(GL_ONE,GL_ONE);
@@ -1004,9 +1004,9 @@ void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wco
fdrawline(centerx - (diam/2)-5, centery, centerx + (diam/2)+5, centery);
fdrawline(centerx, centery - (diam/2)-5, centerx, centery + (diam/2)+5);
/* circles */
- for(j=0; j<5; j++) {
+ for (j=0; j<5; j++) {
glBegin(GL_LINE_STRIP);
- for(i=0; i<=360; i=i+15) {
+ for (i=0; i<=360; i=i+15) {
const float a= DEG2RADF((float)i);
const float r= (j+1)/10.0f;
glVertex2f(polar_to_x(centerx,diam,r,a), polar_to_y(centery,diam,r,a));
@@ -1018,7 +1018,7 @@ void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wco
fdrawline(polar_to_x(centerx, diam, 0.5f, skin_rad), polar_to_y(centery,diam,0.5,skin_rad),
polar_to_x(centerx, diam, 0.1f, skin_rad), polar_to_y(centery,diam,0.1,skin_rad));
/* saturation points */
- for(i=0; i<6; i++)
+ for (i=0; i<6; i++)
vectorscope_draw_target(centerx, centery, diam, colors[i]);
if (scopes->ok && scopes->vecscope != NULL) {
@@ -1052,10 +1052,10 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect)
float x1, y1, sizex, sizey;
float v3[2], v1[2], v2[2], v1a[2], v2a[2];
int a;
- float pos, colf[4]= {0,0,0,0}; /* initialize in case the colorband isnt valid */
+ float pos, colf[4]= {0,0,0,0}; /* initialize in case the colorband isn't valid */
coba= (ColorBand *)(but->editcoba? but->editcoba: but->poin);
- if(coba==NULL) return;
+ if (coba==NULL) return;
x1= rect->xmin;
y1= rect->ymin;
@@ -1086,9 +1086,9 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect)
glColor4fv( &cbd->r );
glVertex2fv(v1); glVertex2fv(v2);
- for( a = 1; a <= sizex; a++ ) {
+ for ( a = 1; a <= sizex; a++ ) {
pos = ((float)a) / (sizex-1);
- do_colorband( coba, pos, colf );
+ do_colorband(coba, pos, colf);
if (but->block->color_profile != BLI_PR_NONE)
linearrgb_to_srgb_v3_v3(colf, colf);
@@ -1117,10 +1117,10 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect)
cbd= coba->data;
glBegin(GL_LINES);
- for(a=0; a<coba->tot; a++, cbd++) {
+ for (a=0; a<coba->tot; a++, cbd++) {
v1[0]=v2[0]=v3[0]=v1a[0]=v2a[0]= x1+ cbd->pos*sizex;
- if(a==coba->cur) {
+ if (a==coba->cur) {
glColor3ub(0, 0, 0);
glVertex2fv(v1);
glVertex2fv(v3);
@@ -1185,7 +1185,7 @@ void ui_draw_but_NORMAL(uiBut *but, uiWidgetColors *wcol, rcti *rect)
glCullFace(GL_BACK); glEnable(GL_CULL_FACE);
/* disable blender light */
- for(a=0; a<8; a++) {
+ for (a=0; a<8; a++) {
old[a]= glIsEnabled(GL_LIGHT0+a);
glDisable(GL_LIGHT0+a);
}
@@ -1207,14 +1207,14 @@ void ui_draw_but_NORMAL(uiBut *but, uiWidgetColors *wcol, rcti *rect)
glPushMatrix();
glTranslatef(rect->xmin + 0.5f*(rect->xmax-rect->xmin), rect->ymin+ 0.5f*(rect->ymax-rect->ymin), 0.0f);
- if( rect->xmax-rect->xmin < rect->ymax-rect->ymin)
+ if ( rect->xmax-rect->xmin < rect->ymax-rect->ymin)
size= (rect->xmax-rect->xmin)/200.f;
else
size= (rect->ymax-rect->ymin)/200.f;
glScalef(size, size, size);
- if(displist==0) {
+ if (displist==0) {
GLUquadricObj *qobj;
displist= glGenLists(1);
@@ -1249,8 +1249,8 @@ void ui_draw_but_NORMAL(uiBut *but, uiWidgetColors *wcol, rcti *rect)
glPopMatrix();
/* enable blender light */
- for(a=0; a<8; a++) {
- if(old[a])
+ for (a=0; a<8; a++) {
+ if (old[a])
glEnable(GL_LIGHT0+a);
}
}
@@ -1262,8 +1262,8 @@ static void ui_draw_but_curve_grid(rcti *rect, float zoomx, float zoomy, float o
glBegin(GL_LINES);
dx= step*zoomx;
fx= rect->xmin + zoomx*(-offsx);
- if(fx > rect->xmin) fx -= dx*(floorf(fx-rect->xmin));
- while(fx < rect->xmax) {
+ if (fx > rect->xmin) fx -= dx*(floorf(fx-rect->xmin));
+ while (fx < rect->xmax) {
glVertex2f(fx, rect->ymin);
glVertex2f(fx, rect->ymax);
fx+= dx;
@@ -1271,8 +1271,8 @@ static void ui_draw_but_curve_grid(rcti *rect, float zoomx, float zoomy, float o
dy= step*zoomy;
fy= rect->ymin + zoomy*(-offsy);
- if(fy > rect->ymin) fy -= dy*(floorf(fy-rect->ymin));
- while(fy < rect->ymax) {
+ if (fy > rect->ymin) fy -= dy*(floorf(fy-rect->ymin));
+ while (fy < rect->ymax) {
glVertex2f(rect->xmin, fy);
glVertex2f(rect->xmax, fy);
fy+= dy;
@@ -1303,10 +1303,10 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
/* need scissor test, curve can draw outside of boundary */
glGetIntegerv(GL_VIEWPORT, scissor);
- scissor_new.xmin= ar->winrct.xmin + rect->xmin;
- scissor_new.ymin= ar->winrct.ymin + rect->ymin;
- scissor_new.xmax= ar->winrct.xmin + rect->xmax;
- scissor_new.ymax= ar->winrct.ymin + rect->ymax;
+ scissor_new.xmin = ar->winrct.xmin + rect->xmin;
+ scissor_new.ymin = ar->winrct.ymin + rect->ymin;
+ scissor_new.xmax = ar->winrct.xmin + rect->xmax;
+ scissor_new.ymax = ar->winrct.ymin + rect->ymax;
BLI_isect_rcti(&scissor_new, &ar->winrct, &scissor_new);
glScissor(scissor_new.xmin, scissor_new.ymin, scissor_new.xmax-scissor_new.xmin, scissor_new.ymax-scissor_new.ymin);
@@ -1317,7 +1317,7 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
offsy= cumap->curr.ymin-but->aspect/zoomy;
/* backdrop */
- if(cumap->flag & CUMA_DO_CLIP) {
+ if (cumap->flag & CUMA_DO_CLIP) {
glColor3ubvShade((unsigned char *)wcol->inner, -20);
glRectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax);
glColor3ubv((unsigned char*)wcol->inner);
@@ -1367,7 +1367,7 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
/* cfra option */
/* XXX 2.48 */
#if 0
- if(cumap->flag & CUMA_DRAW_CFRA) {
+ if (cumap->flag & CUMA_DRAW_CFRA) {
glColor3ub(0x60, 0xc0, 0x40);
glBegin(GL_LINES);
glVertex2f(rect->xmin + zoomx*(cumap->sample[0]-offsx), rect->ymin);
@@ -1379,8 +1379,8 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
/* XXX 2.48 */
#if 0
- if(cumap->flag & CUMA_DRAW_SAMPLE) {
- if(cumap->cur==3) {
+ if (cumap->flag & CUMA_DRAW_SAMPLE) {
+ if (cumap->cur==3) {
float lum= cumap->sample[0]*0.35f + cumap->sample[1]*0.45f + cumap->sample[2]*0.2f;
glColor3ub(240, 240, 240);
@@ -1390,9 +1390,9 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
glEnd();
}
else {
- if(cumap->cur==0)
+ if (cumap->cur==0)
glColor3ub(240, 100, 100);
- else if(cumap->cur==1)
+ else if (cumap->cur==1)
glColor3ub(100, 240, 100);
else
glColor3ub(100, 100, 240);
@@ -1411,25 +1411,25 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
glEnable(GL_BLEND);
glBegin(GL_LINE_STRIP);
- if(cuma->table==NULL)
+ if (cuma->table==NULL)
curvemapping_changed(cumap, 0); /* 0 = no remove doubles */
cmp= cuma->table;
/* first point */
- if((cuma->flag & CUMA_EXTEND_EXTRAPOLATE)==0)
+ if ((cuma->flag & CUMA_EXTEND_EXTRAPOLATE)==0)
glVertex2f(rect->xmin, rect->ymin + zoomy*(cmp[0].y-offsy));
else {
fx= rect->xmin + zoomx*(cmp[0].x-offsx + cuma->ext_in[0]);
fy= rect->ymin + zoomy*(cmp[0].y-offsy + cuma->ext_in[1]);
glVertex2f(fx, fy);
}
- for(a=0; a<=CM_TABLE; a++) {
+ for (a=0; a<=CM_TABLE; a++) {
fx= rect->xmin + zoomx*(cmp[a].x-offsx);
fy= rect->ymin + zoomy*(cmp[a].y-offsy);
glVertex2f(fx, fy);
}
/* last point */
- if((cuma->flag & CUMA_EXTEND_EXTRAPOLATE)==0)
+ if ((cuma->flag & CUMA_EXTEND_EXTRAPOLATE)==0)
glVertex2f(rect->xmax, rect->ymin + zoomy*(cmp[CM_TABLE].y-offsy));
else {
fx= rect->xmin + zoomx*(cmp[CM_TABLE].x-offsx - cuma->ext_out[0]);
@@ -1444,8 +1444,8 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
cmp= cuma->curve;
glPointSize(3.0f);
bglBegin(GL_POINTS);
- for(a=0; a<cuma->totpoint; a++) {
- if(cmp[a].flag & SELECT)
+ for (a=0; a<cuma->totpoint; a++) {
+ if (cmp[a].flag & SELECT)
UI_ThemeColor(TH_TEXT_HI);
else
UI_ThemeColor(TH_TEXT);
@@ -1475,7 +1475,7 @@ static ImBuf *scale_trackpreview_ibuf(ImBuf *ibuf, float track_pos[2], int width
scaleibuf= IMB_allocImBuf(width, height, 32, IB_rect);
- for(y= 0; y<height; y++) {
+ for (y= 0; y<height; y++) {
for (x= 0; x<width; x++) {
float src_x= scalex*(x)+margin-off_x;
float src_y= scaley*(y)+margin-off_y;
@@ -1506,14 +1506,14 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
glGetIntegerv(GL_VIEWPORT, scissor);
glScissor(ar->winrct.xmin + (rect.xmin-1), ar->winrct.ymin+(rect.ymin-1), (rect.xmax+1)-(rect.xmin-1), (rect.ymax+1)-(rect.ymin-1));
- if(scopes->track_disabled) {
+ if (scopes->track_disabled) {
glColor4f(0.7f, 0.3f, 0.3f, 0.3f);
uiSetRoundBox(15);
uiDrawBox(GL_POLYGON, rect.xmin-1, rect.ymin, rect.xmax+1, rect.ymax+1, 3.0f);
ok= 1;
}
- else if(scopes->track_preview) {
+ else if (scopes->track_preview) {
/* additional margin around image */
/* NOTE: should be kept in sync with value from BKE_movieclip_update_scopes */
const int margin= 3;
@@ -1532,7 +1532,7 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
width= rect.xmax-rect.xmin+1;
height = rect.ymax-rect.ymin;
- if(width > 0 && height > 0) {
+ if (width > 0 && height > 0) {
zoomx= (float)width / (scopes->track_preview->x-2*margin);
zoomy= (float)height / (scopes->track_preview->y-2*margin);
@@ -1549,8 +1549,8 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
glTranslatef(off_x+rect.xmin+track_pos[0]*zoomx, off_y+rect.ymin+track_pos[1]*zoomy, 0.f);
glScissor(ar->winrct.xmin + rect.xmin, ar->winrct.ymin+rect.ymin, rect.xmax-rect.xmin, rect.ymax-rect.ymin);
- for(a= 0; a< 2; a++) {
- if(a==1) {
+ for (a= 0; a< 2; a++) {
+ if (a==1) {
glLineStipple(3, 0xaaaa);
glEnable(GL_LINE_STIPPLE);
UI_ThemeColor(TH_SEL_MARKER);
@@ -1574,7 +1574,7 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
ok= 1;
}
- if(!ok) {
+ if (!ok) {
glColor4f(0.f, 0.f, 0.f, 0.3f);
uiSetRoundBox(15);
uiDrawBox(GL_POLYGON, rect.xmin-1, rect.ymin, rect.xmax+1, rect.ymax+1, 3.0f);
@@ -1647,14 +1647,14 @@ void ui_dropshadow(rctf *rct, float radius, float aspect, int UNUSED(select))
glEnable(GL_BLEND);
- if(radius > (rct->ymax-rct->ymin-10.0f)/2.0f)
+ if (radius > (rct->ymax-rct->ymin-10.0f)/2.0f)
rad= (rct->ymax-rct->ymin-10.0f)/2.0f;
else
rad= radius;
i= 12;
#if 0
- if(select) {
+ if (select) {
a= i*aspect; /* same as below */
}
else
@@ -1663,7 +1663,7 @@ void ui_dropshadow(rctf *rct, float radius, float aspect, int UNUSED(select))
a= i*aspect;
}
- for(; i--; a-=aspect) {
+ for (; i--; a-=aspect) {
/* alpha ranges from 2 to 20 or so */
glColor4ub(0, 0, 0, alpha);
alpha+= 2;
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index cae6f61d269..21c3f4ca038 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -212,18 +212,18 @@ static int ui_but_editable(uiBut *but)
static uiBut *ui_but_prev(uiBut *but)
{
- while(but->prev) {
+ while (but->prev) {
but= but->prev;
- if(!ui_but_editable(but)) return but;
+ if (!ui_but_editable(but)) return but;
}
return NULL;
}
static uiBut *ui_but_next(uiBut *but)
{
- while(but->next) {
+ while (but->next) {
but= but->next;
- if(!ui_but_editable(but)) return but;
+ if (!ui_but_editable(but)) return but;
}
return NULL;
}
@@ -233,8 +233,8 @@ static uiBut *ui_but_first(uiBlock *block)
uiBut *but;
but= block->buttons.first;
- while(but) {
- if(!ui_but_editable(but)) return but;
+ while (but) {
+ if (!ui_but_editable(but)) return but;
but= but->next;
}
return NULL;
@@ -245,8 +245,8 @@ static uiBut *ui_but_last(uiBlock *block)
uiBut *but;
but= block->buttons.last;
- while(but) {
- if(!ui_but_editable(but)) return but;
+ while (but) {
+ if (!ui_but_editable(but)) return but;
but= but->prev;
}
return NULL;
@@ -254,8 +254,8 @@ static uiBut *ui_but_last(uiBlock *block)
static int ui_is_a_warp_but(uiBut *but)
{
- if(U.uiflag & USER_CONTINUOUS_MOUSE)
- if(ELEM4(but->type, NUM, NUMABS, HSVCIRCLE, TRACKPREVIEW))
+ if (U.uiflag & USER_CONTINUOUS_MOUSE)
+ if (ELEM4(but->type, NUM, NUMABS, HSVCIRCLE, TRACKPREVIEW))
return TRUE;
return FALSE;
@@ -286,10 +286,10 @@ static void ui_apply_but_func(bContext *C, uiBut *but)
* handling is done, i.e. menus are closed, in order to avoid conflicts
* with these functions removing the buttons we are working with */
- if(but->func || but->funcN || block->handle_func || but->rename_func || (but->type == BUTM && block->butm_func) || but->optype || but->rnaprop) {
+ if (but->func || but->funcN || block->handle_func || but->rename_func || (but->type == BUTM && block->butm_func) || but->optype || but->rnaprop) {
after= MEM_callocN(sizeof(uiAfterFunc), "uiAfterFunc");
- if(but->func && ELEM(but, but->func_arg1, but->func_arg2)) {
+ if (but->func && ELEM(but, but->func_arg1, but->func_arg2)) {
/* exception, this will crash due to removed button otherwise */
but->func(C, but->func_arg1, but->func_arg2);
}
@@ -311,7 +311,7 @@ static void ui_apply_but_func(bContext *C, uiBut *but)
after->handle_func_arg= block->handle_func_arg;
after->retval= but->retval;
- if(but->type == BUTM) {
+ if (but->type == BUTM) {
after->butm_func= block->butm_func;
after->butm_func_arg= block->butm_func_arg;
after->a2= but->a2;
@@ -324,7 +324,7 @@ static void ui_apply_but_func(bContext *C, uiBut *but)
after->rnapoin= but->rnapoin;
after->rnaprop= but->rnaprop;
- if(but->context)
+ if (but->context)
after->context= CTX_store_copy(but->context);
but->optype= NULL;
@@ -340,17 +340,17 @@ static void ui_apply_autokey_undo(bContext *C, uiBut *but)
Scene *scene= CTX_data_scene(C);
uiAfterFunc *after;
- if(but->flag & UI_BUT_UNDO) {
+ if (but->flag & UI_BUT_UNDO) {
const char *str= NULL;
/* define which string to use for undo */
if ELEM(but->type, LINK, INLINK) str= "Add button link";
else if ELEM(but->type, MENU, ICONTEXTROW) str= but->drawstr;
- else if(but->drawstr[0]) str= but->drawstr;
+ else if (but->drawstr[0]) str= but->drawstr;
else str= but->tip;
- /* fallback, else we dont get an undo! */
- if(str == NULL || str[0] == '\0') {
+ /* fallback, else we don't get an undo! */
+ if (str == NULL || str[0] == '\0') {
str= "Unknown Action";
}
@@ -374,51 +374,51 @@ static void ui_apply_but_funcs_after(bContext *C)
funcs= UIAfterFuncs;
UIAfterFuncs.first= UIAfterFuncs.last= NULL;
- for(afterf=funcs.first; afterf; afterf=after.next) {
+ for (afterf=funcs.first; afterf; afterf=after.next) {
after= *afterf; /* copy to avoid memleak on exit() */
BLI_freelinkN(&funcs, afterf);
- if(after.context)
+ if (after.context)
CTX_store_set(C, after.context);
- if(after.opptr) {
+ if (after.opptr) {
/* free in advance to avoid leak on exit */
opptr= *after.opptr,
MEM_freeN(after.opptr);
}
- if(after.optype)
+ if (after.optype)
WM_operator_name_call(C, after.optype->idname, after.opcontext, (after.opptr)? &opptr: NULL);
- if(after.opptr)
+ if (after.opptr)
WM_operator_properties_free(&opptr);
- if(after.rnapoin.data)
+ if (after.rnapoin.data)
RNA_property_update(C, &after.rnapoin, after.rnaprop);
- if(after.context) {
+ if (after.context) {
CTX_store_set(C, NULL);
CTX_store_free(after.context);
}
- if(after.func)
+ if (after.func)
after.func(C, after.func_arg1, after.func_arg2);
- if(after.funcN)
+ if (after.funcN)
after.funcN(C, after.func_argN, after.func_arg2);
- if(after.func_argN)
+ if (after.func_argN)
MEM_freeN(after.func_argN);
- if(after.handle_func)
+ if (after.handle_func)
after.handle_func(C, after.handle_func_arg, after.retval);
- if(after.butm_func)
+ if (after.butm_func)
after.butm_func(C, after.butm_func_arg, after.a2);
- if(after.rename_func)
+ if (after.rename_func)
after.rename_func(C, after.rename_arg1, after.rename_orig);
- if(after.rename_orig)
+ if (after.rename_orig)
MEM_freeN(after.rename_orig);
- if(after.undostr[0])
+ if (after.undostr[0])
ED_undo_push(C, after.undostr);
}
}
@@ -442,7 +442,7 @@ static void ui_apply_but_BUTM(bContext *C, uiBut *but, uiHandleButtonData *data)
static void ui_apply_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data)
{
- if(ELEM3(but->type, MENU, ICONROW, ICONTEXTROW))
+ if (ELEM3(but->type, MENU, ICONROW, ICONTEXTROW))
ui_set_but_val(but, data->value);
ui_check_but(but);
@@ -457,50 +457,50 @@ static void ui_apply_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data)
int w, lvalue, push;
/* local hack... */
- if(but->type==BUT_TOGDUAL && data->togdual) {
- if(but->pointype==SHO)
+ if (but->type==BUT_TOGDUAL && data->togdual) {
+ if (but->pointype==SHO)
but->poin += 2;
- else if(but->pointype==INT)
+ else if (but->pointype==INT)
but->poin += 4;
}
value= ui_get_but_val(but);
lvalue= (int)value;
- if(but->bit) {
+ if (but->bit) {
w= BTST(lvalue, but->bitnr);
- if(w) lvalue = BCLR(lvalue, but->bitnr);
+ if (w) lvalue = BCLR(lvalue, but->bitnr);
else lvalue = BSET(lvalue, but->bitnr);
- if(but->type==TOGR) {
- if(!data->togonly) {
+ if (but->type==TOGR) {
+ if (!data->togonly) {
lvalue= 1<<(but->bitnr);
ui_set_but_val(but, (double)lvalue);
}
else {
- if(lvalue==0) lvalue= 1<<(but->bitnr);
+ if (lvalue==0) lvalue= 1<<(but->bitnr);
}
}
ui_set_but_val(but, (double)lvalue);
- if(but->type==ICONTOG || but->type==ICONTOGN) ui_check_but(but);
+ if (but->type==ICONTOG || but->type==ICONTOGN) ui_check_but(but);
}
else {
- if(value==0.0) push= 1;
+ if (value==0.0) push= 1;
else push= 0;
- if(ELEM3(but->type, TOGN, ICONTOGN, OPTIONN)) push= !push;
+ if (ELEM3(but->type, TOGN, ICONTOGN, OPTIONN)) push= !push;
ui_set_but_val(but, (double)push);
- if(but->type==ICONTOG || but->type==ICONTOGN) ui_check_but(but);
+ if (but->type==ICONTOG || but->type==ICONTOGN) ui_check_but(but);
}
/* end local hack... */
- if(but->type==BUT_TOGDUAL && data->togdual) {
- if(but->pointype==SHO)
+ if (but->type==BUT_TOGDUAL && data->togdual) {
+ if (but->pointype==SHO)
but->poin -= 2;
- else if(but->pointype==INT)
+ else if (but->pointype==INT)
but->poin -= 4;
}
@@ -517,8 +517,8 @@ static void ui_apply_but_ROW(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
ui_set_but_val(but, but->hardmax);
/* states of other row buttons */
- for(bt= block->buttons.first; bt; bt= bt->next)
- if(bt!=but && bt->poin==but->poin && ELEM(bt->type, ROW, LISTROW))
+ for (bt= block->buttons.first; bt; bt= bt->next)
+ if (bt!=but && bt->poin==but->poin && ELEM(bt->type, ROW, LISTROW))
ui_check_but(bt);
ui_apply_but_func(C, but);
@@ -529,7 +529,7 @@ static void ui_apply_but_ROW(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
static void ui_apply_but_TEX(bContext *C, uiBut *but, uiHandleButtonData *data)
{
- if(!data->str)
+ if (!data->str)
return;
ui_set_but_string(C, but, data->str);
@@ -548,8 +548,8 @@ static void ui_apply_but_TEX(bContext *C, uiBut *but, uiHandleButtonData *data)
static void ui_apply_but_NUM(bContext *C, uiBut *but, uiHandleButtonData *data)
{
- if(data->str) {
- if(ui_set_but_string(C, but, data->str)) {
+ if (data->str) {
+ if (ui_set_but_string(C, but, data->str)) {
data->value= ui_get_but_val(but);
}
else {
@@ -569,27 +569,29 @@ static void ui_apply_but_NUM(bContext *C, uiBut *but, uiHandleButtonData *data)
static void ui_apply_but_TOG3(bContext *C, uiBut *but, uiHandleButtonData *data)
{
- if(but->pointype==SHO ) {
+ if (but->pointype==SHO ) {
short *sp= (short *)but->poin;
- if( BTST(sp[1], but->bitnr)) {
+ if ( BTST(sp[1], but->bitnr)) {
sp[1]= BCLR(sp[1], but->bitnr);
sp[0]= BCLR(sp[0], but->bitnr);
}
- else if( BTST(sp[0], but->bitnr)) {
+ else if ( BTST(sp[0], but->bitnr)) {
sp[1]= BSET(sp[1], but->bitnr);
- } else {
+ }
+ else {
sp[0]= BSET(sp[0], but->bitnr);
}
}
else {
- if( BTST(*(but->poin+2), but->bitnr)) {
+ if ( BTST(*(but->poin+2), but->bitnr)) {
*(but->poin+2)= BCLR(*(but->poin+2), but->bitnr);
*(but->poin)= BCLR(*(but->poin), but->bitnr);
}
- else if( BTST(*(but->poin), but->bitnr)) {
+ else if ( BTST(*(but->poin), but->bitnr)) {
*(but->poin+2)= BSET(*(but->poin+2), but->bitnr);
- } else {
+ }
+ else {
*(but->poin)= BSET(*(but->poin), but->bitnr);
}
}
@@ -651,12 +653,12 @@ static int ui_but_mouse_inside_icon(uiBut *but, ARegion *ar, wmEvent *event)
ui_window_to_block(ar, but->block, &x, &y);
- rect.xmin= but->x1; rect.xmax= but->x2;
- rect.ymin= but->y1; rect.ymax= but->y2;
+ rect.xmin = but->x1; rect.xmax = but->x2;
+ rect.ymin = but->y1; rect.ymax = but->y2;
- if(but->imb); /* use button size itself */
- else if(but->flag & UI_ICON_LEFT) {
- rect.xmax= rect.xmin + (rect.ymax-rect.ymin);
+ if (but->imb); /* use button size itself */
+ else if (but->flag & UI_ICON_LEFT) {
+ rect.xmax = rect.xmin + (rect.ymax-rect.ymin);
}
else {
int delta= (rect.xmax-rect.xmin) - (rect.ymax-rect.ymin);
@@ -672,14 +674,14 @@ static int ui_but_start_drag(bContext *C, uiBut *but, uiHandleButtonData *data,
/* prevent other WM gestures to start while we try to drag */
WM_gestures_remove(C);
- if( ABS(data->dragstartx - event->x) + ABS(data->dragstarty - event->y) > U.dragthreshold ) {
+ if ( ABS(data->dragstartx - event->x) + ABS(data->dragstarty - event->y) > U.dragthreshold ) {
wmDrag *drag;
button_activate_state(C, but, BUTTON_STATE_EXIT);
data->cancel= 1;
drag= WM_event_start_drag(C, but->icon, but->dragtype, but->dragpoin, ui_get_but_val(but));
- if(but->imb)
+ if (but->imb)
WM_event_drag_image(drag, but->imb, but->imb_scale, but->x2-but->x1, but->y2-but->y1);
return 1;
}
@@ -697,31 +699,31 @@ static void ui_delete_active_linkline(uiBlock *block)
int a, b;
but= block->buttons.first;
- while(but) {
- if(but->type==LINK && but->link) {
+ while (but) {
+ if (but->type==LINK && but->link) {
line= but->link->lines.first;
- while(line) {
+ while (line) {
nline= line->next;
- if(line->flag & UI_SELECT) {
+ if (line->flag & UI_SELECT) {
BLI_remlink(&but->link->lines, line);
link= line->from->link;
/* are there more pointers allowed? */
- if(link->ppoin) {
+ if (link->ppoin) {
- if(*(link->totlink)==1) {
+ if (*(link->totlink)==1) {
*(link->totlink)= 0;
MEM_freeN(*(link->ppoin));
*(link->ppoin)= NULL;
}
else {
b= 0;
- for(a=0; a< (*(link->totlink)); a++) {
+ for (a=0; a< (*(link->totlink)); a++) {
- if( (*(link->ppoin))[a] != line->to->poin ) {
+ if ( (*(link->ppoin))[a] != line->to->poin ) {
(*(link->ppoin))[b]= (*(link->ppoin))[a];
b++;
}
@@ -749,10 +751,10 @@ static uiLinkLine *ui_is_a_link(uiBut *from, uiBut *to)
uiLink *link;
link= from->link;
- if(link) {
+ if (link) {
line= link->lines.first;
- while(line) {
- if(line->from==from && line->to==to) return line;
+ while (line) {
+ if (line->from==from && line->to==to) return line;
line= line->next;
}
}
@@ -772,7 +774,7 @@ static void ui_add_smart_controller(bContext *C, uiBut *from, uiBut *to)
uiLink *link= from->link;
- if(link->ppoin)
+ if (link->ppoin)
sens_from_links= (bController ***)(link->ppoin);
else return;
@@ -790,7 +792,7 @@ static void ui_add_smart_controller(bContext *C, uiBut *from, uiBut *to)
if (ob) break;
} CTX_DATA_END;
- if(!ob) return;
+ if (!ob) return;
/* (2) check if the sensor and the actuator are from the same object */
for (act_iter= ob->actuators.first; act_iter; act_iter= (bActuator *)act_iter->next) {
@@ -799,7 +801,7 @@ static void ui_add_smart_controller(bContext *C, uiBut *from, uiBut *to)
}
// only works if the sensor and the actuator are from the same object
- if(!act_iter) return;
+ if (!act_iter) return;
/* (3) add a new controller */
if (WM_operator_name_call(C, "LOGIC_OT_controller_add", WM_OP_EXEC_DEFAULT, NULL) & OPERATOR_FINISHED) {
@@ -831,7 +833,7 @@ static void ui_add_link(bContext *C, uiBut *from, uiBut *to)
void **oldppoin;
int a;
- if( (line= ui_is_a_link(from, to)) ) {
+ if ( (line= ui_is_a_link(from, to)) ) {
line->flag |= UI_SELECT;
ui_delete_active_linkline(from->block);
return;
@@ -841,13 +843,13 @@ static void ui_add_link(bContext *C, uiBut *from, uiBut *to)
return;
}
else if (from->type==LINK && to->type==INLINK) {
- if( from->link->tocode != (int)to->hardmin ) {
+ if ( from->link->tocode != (int)to->hardmin ) {
ui_add_smart_controller(C, from, to);
return;
}
}
- else if(from->type==INLINK && to->type==LINK) {
- if( to->link->tocode == (int)from->hardmin ) {
+ else if (from->type==INLINK && to->type==LINK) {
+ if ( to->link->tocode == (int)from->hardmin ) {
return;
}
}
@@ -855,18 +857,18 @@ static void ui_add_link(bContext *C, uiBut *from, uiBut *to)
link= from->link;
/* are there more pointers allowed? */
- if(link->ppoin) {
+ if (link->ppoin) {
oldppoin= *(link->ppoin);
(*(link->totlink))++;
*(link->ppoin)= MEM_callocN( *(link->totlink)*sizeof(void *), "new link");
- for(a=0; a< (*(link->totlink))-1; a++) {
+ for (a=0; a< (*(link->totlink))-1; a++) {
(*(link->ppoin))[a]= oldppoin[a];
}
(*(link->ppoin))[a]= to->poin;
- if(oldppoin) MEM_freeN(oldppoin);
+ if (oldppoin) MEM_freeN(oldppoin);
}
else {
*(link->poin)= to->poin;
@@ -880,15 +882,15 @@ static void ui_apply_but_LINK(bContext *C, uiBut *but, uiHandleButtonData *data)
ARegion *ar= CTX_wm_region(C);
uiBut *bt;
- for(bt= but->block->buttons.first; bt; bt= bt->next) {
- if( ui_mouse_inside_button(ar, bt, but->linkto[0]+ar->winrct.xmin, but->linkto[1]+ar->winrct.ymin) )
+ for (bt= but->block->buttons.first; bt; bt= bt->next) {
+ if ( ui_mouse_inside_button(ar, bt, but->linkto[0]+ar->winrct.xmin, but->linkto[1]+ar->winrct.ymin) )
break;
}
- if(bt && bt!=but) {
+ if (bt && bt!=but) {
if (!ELEM(bt->type, LINK, INLINK) || !ELEM(but->type, LINK, INLINK))
return;
- if(but->type==LINK) ui_add_link(C, but, bt);
+ if (but->type==LINK) ui_add_link(C, but, bt);
else ui_add_link(C, bt, but);
ui_apply_but_func(C, but);
@@ -938,11 +940,11 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
/* if we cancel and have not applied yet, there is nothing to do,
* otherwise we have to restore the original value again */
- if(data->cancel) {
- if(!data->applied)
+ if (data->cancel) {
+ if (!data->applied)
return;
- if(data->str) MEM_freeN(data->str);
+ if (data->str) MEM_freeN(data->str);
data->str= data->origstr;
data->origstr= NULL;
data->value= data->origvalue;
@@ -953,9 +955,9 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
else {
/* we avoid applying interactive edits a second time
* at the end with the appliedinteractive flag */
- if(interactive)
+ if (interactive)
data->appliedinteractive= 1;
- else if(data->appliedinteractive)
+ else if (data->appliedinteractive)
return;
}
@@ -1076,13 +1078,13 @@ static void ui_but_drop(bContext *C, wmEvent *event, uiBut *but, uiHandleButtonD
wmDrag *wmd;
ListBase *drags= event->customdata; /* drop event type has listbase customdata by default */
- for(wmd= drags->first; wmd; wmd= wmd->next) {
- if(wmd->type==WM_DRAG_ID) {
+ for (wmd= drags->first; wmd; wmd= wmd->next) {
+ if (wmd->type==WM_DRAG_ID) {
/* align these types with UI_but_active_drop_name */
- if(ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
+ if (ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
ID *id= (ID *)wmd->poin;
- if(but->poin==NULL && but->rnapoin.data==NULL) {}
+ if (but->poin==NULL && but->rnapoin.data==NULL) {}
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
BLI_strncpy(data->str, id->name+2, data->maxlen);
button_activate_state(C, but, BUTTON_STATE_EXIT);
@@ -1100,14 +1102,14 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
static ColorBand but_copypaste_coba = {0};
char buf[UI_MAX_DRAW_STR+1]= {0};
- if(mode=='v' && but->lock)
+ if (mode=='v' && but->lock)
return;
- if(mode=='v') {
+ if (mode=='v') {
/* extract first line from clipboard in case of multi-line copies */
char *p, *pbuf= WM_clipboard_text_get(0);
p= pbuf;
- if(p) {
+ if (p) {
int i = 0;
while (*p && *p!='\r' && *p!='\n' && i<UI_MAX_DRAW_STR) {
buf[i++]=*p;
@@ -1121,8 +1123,8 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
/* numeric value */
if ELEM4(but->type, NUM, NUMABS, NUMSLI, HSVSLI) {
- if(but->poin==NULL && but->rnapoin.data==NULL);
- else if(mode=='c') {
+ if (but->poin==NULL && but->rnapoin.data==NULL);
+ else if (mode=='c') {
ui_get_but_string(but, buf, sizeof(buf));
WM_clipboard_text_set(buf, 0);
}
@@ -1139,11 +1141,11 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
}
/* RGB triple */
- else if(but->type==COL) {
+ else if (but->type==COL) {
float rgb[3];
- if(but->poin==NULL && but->rnapoin.data==NULL);
- else if(mode=='c') {
+ if (but->poin==NULL && but->rnapoin.data==NULL);
+ else if (mode=='c') {
ui_get_but_vectorf(but, rgb);
BLI_snprintf(buf, sizeof(buf), "[%f, %f, %f]", rgb[0], rgb[1], rgb[2]);
@@ -1160,11 +1162,11 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
}
/* text/string and ID data */
- else if(ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
+ else if (ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
uiHandleButtonData *active_data= but->active;
- if(but->poin==NULL && but->rnapoin.data==NULL);
- else if(mode=='c') {
+ if (but->poin==NULL && but->rnapoin.data==NULL);
+ else if (mode=='c') {
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
BLI_strncpy(buf, active_data->str, UI_MAX_DRAW_STR);
WM_clipboard_text_set(active_data->str, 0);
@@ -1174,10 +1176,10 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
else {
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
- if(ui_is_but_utf8(but)) BLI_strncpy_utf8(active_data->str, buf, active_data->maxlen);
+ if (ui_is_but_utf8(but)) BLI_strncpy_utf8(active_data->str, buf, active_data->maxlen);
else BLI_strncpy(active_data->str, buf, active_data->maxlen);
- if(but->type == SEARCH_MENU) {
+ if (but->type == SEARCH_MENU) {
/* else uiSearchboxData.active member is not updated [#26856] */
ui_searchbox_update(C, data->searchbox, but, 1);
}
@@ -1185,18 +1187,18 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
}
}
/* colorband (not supported by system clipboard) */
- else if(but->type==BUT_COLORBAND) {
- if(mode=='c') {
- if(but->poin==NULL)
+ else if (but->type==BUT_COLORBAND) {
+ if (mode=='c') {
+ if (but->poin==NULL)
return;
memcpy(&but_copypaste_coba, but->poin, sizeof(ColorBand));
}
else {
- if(but_copypaste_coba.tot==0)
+ if (but_copypaste_coba.tot==0)
return;
- if(!but->poin)
+ if (!but->poin)
but->poin= MEM_callocN(sizeof(ColorBand), "colorband");
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
@@ -1206,7 +1208,7 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
}
/* operator button (any type) */
else if (but->optype) {
- if(mode=='c') {
+ if (mode=='c') {
PointerRNA *opptr;
char *str;
opptr= uiButGetOperatorPtrRNA(but); /* allocated when needed, the button owns it */
@@ -1228,8 +1230,8 @@ static int ui_textedit_delete_selection(uiBut *but, uiHandleButtonData *data)
char *str= data->str;
int len= strlen(str);
int change= 0;
- if(but->selsta != but->selend && len) {
- memmove( str+but->selsta, str+but->selend, (len - but->selend) + 1 );
+ if (but->selsta != but->selend && len) {
+ memmove(str + but->selsta, str + but->selend, (len - but->selend) + 1);
change= 1;
}
@@ -1255,9 +1257,9 @@ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, sho
BLI_strncpy(origstr, but->drawstr, data->maxlen);
/* XXX solve generic */
- if(but->type==NUM || but->type==NUMSLI)
+ if (but->type==NUM || but->type==NUMSLI)
startx += (int)(0.5f*(but->y2 - but->y1));
- else if(ELEM(but->type, TEX, SEARCH_MENU)) {
+ else if (ELEM(but->type, TEX, SEARCH_MENU)) {
startx += 5;
if (but->flag & UI_HAS_ICON)
startx += UI_DPI_ICON_SIZE;
@@ -1319,7 +1321,7 @@ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, sho
}
}
but->pos += but->ofs;
- if(but->pos<0) but->pos= 0;
+ if (but->pos<0) but->pos= 0;
}
if (fstyle->kerning == 1)
@@ -1353,7 +1355,7 @@ static int ui_textedit_type_buf(uiBut *but, uiHandleButtonData *data,
str= data->str;
len= strlen(str);
- if(len-(but->selend - but->selsta)+1 <= data->maxlen) {
+ if (len-(but->selend - but->selsta)+1 <= data->maxlen) {
int step= utf8_buf_len;
/* type over the current selection */
@@ -1362,7 +1364,7 @@ static int ui_textedit_type_buf(uiBut *but, uiHandleButtonData *data,
len= strlen(str);
}
- if(len + step < data->maxlen) {
+ if (len + step < data->maxlen) {
memmove(&str[but->pos + step], &str[but->pos], (len + 1) - but->pos);
memcpy(&str[but->pos], utf8_buf, step * sizeof(char));
but->pos += step;
@@ -1417,11 +1419,11 @@ static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, strCursorJump
BLI_str_cursor_step_utf8(str, len, &pos_i, direction, jump);
but->pos = pos_i;
- if(select) {
+ if (select) {
/* existing selection */
if (has_sel) {
- if(data->selextend == 0) {
+ if (data->selextend == 0) {
data->selextend= EXTEND_RIGHT;
}
@@ -1472,11 +1474,11 @@ static int ui_textedit_delete(uiBut *but, uiHandleButtonData *data, int directio
int changed= 0;
if (jump == STRCUR_JUMP_ALL) {
- if(len) changed=1;
+ if (len) changed=1;
str[0]= '\0';
but->pos= 0;
}
- else if(direction) { /* delete */
+ else if (direction) { /* delete */
if ((but->selend - but->selsta) > 0) {
changed= ui_textedit_delete_selection(but, data);
}
@@ -1494,7 +1496,7 @@ static int ui_textedit_delete(uiBut *but, uiHandleButtonData *data, int directio
if ((but->selend - but->selsta) > 0) {
changed= ui_textedit_delete_selection(but, data);
}
- else if(but->pos>0) {
+ else if (but->pos>0) {
int pos = but->pos;
int step;
@@ -1517,7 +1519,7 @@ static int ui_textedit_autocomplete(bContext *C, uiBut *but, uiHandleButtonData
str= data->str;
- if(data->searchbox)
+ if (data->searchbox)
ui_searchbox_autocomplete(C, data->searchbox, but, data->str);
else
but->autocomplete_func(C, str, but->autofunc_arg);
@@ -1542,7 +1544,7 @@ static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste
/* extract the first line from the clipboard */
p = pbuf= WM_clipboard_text_get(0);
- if(p && p[0]) {
+ if (p && p[0]) {
unsigned int y;
i= 0;
while (*p && *p!='\r' && *p!='\n' && i<UI_MAX_DRAW_STR-1) {
@@ -1560,8 +1562,8 @@ static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste
for (y=0; y<strlen(buf); y++)
{
/* add contents of buffer */
- if(len+1 < data->maxlen) {
- for(x= data->maxlen; x>but->pos; x--)
+ if (len+1 < data->maxlen) {
+ for (x= data->maxlen; x>but->pos; x--)
str[x]= str[x-1];
str[but->pos]= buf[y];
but->pos++;
@@ -1580,7 +1582,7 @@ static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste
/* cut & copy */
else if (copy || cut) {
/* copy the contents to the copypaste buffer */
- for(x= but->selsta; x <= but->selend; x++) {
+ for (x= but->selsta; x <= but->selend; x++) {
if (x==but->selend)
buf[x] = '\0';
else
@@ -1590,8 +1592,8 @@ static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste
WM_clipboard_text_set(buf, 0);
/* for cut only, delete the selection afterwards */
- if(cut)
- if((but->selend - but->selsta) > 0)
+ if (cut)
+ if ((but->selend - but->selsta) > 0)
changed= ui_textedit_delete_selection(but, data);
}
@@ -1602,7 +1604,7 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data)
{
int len;
- if(data->str) {
+ if (data->str) {
MEM_freeN(data->str);
data->str= NULL;
}
@@ -1612,7 +1614,7 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data)
data->str= MEM_callocN(sizeof(char)*data->maxlen + 1, "textedit str");
ui_get_but_string(but, data->str, data->maxlen);
- if(ELEM3(but->type, NUM, NUMABS, NUMSLI)) {
+ if (ELEM3(but->type, NUM, NUMABS, NUMSLI)) {
ui_convert_to_unit_alt_name(but, data->str, data->maxlen);
}
@@ -1630,7 +1632,7 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data)
but->selend = len;
/* optional searchbox */
- if(but->type==SEARCH_MENU) {
+ if (but->type==SEARCH_MENU) {
data->searchbox= ui_searchbox_create(C, data->region, but);
ui_searchbox_update(C, data->searchbox, but, 1); /* 1= reset */
}
@@ -1642,18 +1644,18 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data)
static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data)
{
- if(but) {
- if(ui_is_but_utf8(but)) {
+ if (but) {
+ if (ui_is_but_utf8(but)) {
int strip= BLI_utf8_invalid_strip(but->editstr, strlen(but->editstr));
/* not a file?, strip non utf-8 chars */
- if(strip) {
- /* wont happen often so isnt that annoying to keep it here for a while */
+ if (strip) {
+ /* wont happen often so isn't that annoying to keep it here for a while */
printf("%s: invalid utf8 - stripped chars %d\n", __func__, strip);
}
}
- if(data->searchbox) {
- if(data->cancel==0)
+ if (data->searchbox) {
+ if (data->cancel==0)
ui_searchbox_apply(but, data->searchbox);
ui_searchbox_free(C, data->searchbox);
@@ -1672,21 +1674,21 @@ static void ui_textedit_next_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa
uiBut *but;
/* label and roundbox can overlap real buttons (backdrops...) */
- if(ELEM4(actbut->type, LABEL, SEPR, ROUNDBOX, LISTBOX))
+ if (ELEM4(actbut->type, LABEL, SEPR, ROUNDBOX, LISTBOX))
return;
- for(but= actbut->next; but; but= but->next) {
- if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
- if(!(but->flag & UI_BUT_DISABLED)) {
+ for (but= actbut->next; but; but= but->next) {
+ if (ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
+ if (!(but->flag & UI_BUT_DISABLED)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
}
}
}
- for(but= block->buttons.first; but!=actbut; but= but->next) {
- if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
- if(!(but->flag & UI_BUT_DISABLED)) {
+ for (but= block->buttons.first; but!=actbut; but= but->next) {
+ if (ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
+ if (!(but->flag & UI_BUT_DISABLED)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
@@ -1700,21 +1702,21 @@ static void ui_textedit_prev_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa
uiBut *but;
/* label and roundbox can overlap real buttons (backdrops...) */
- if(ELEM4(actbut->type, LABEL, SEPR, ROUNDBOX, LISTBOX))
+ if (ELEM4(actbut->type, LABEL, SEPR, ROUNDBOX, LISTBOX))
return;
- for(but= actbut->prev; but; but= but->prev) {
- if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
- if(!(but->flag & UI_BUT_DISABLED)) {
+ for (but= actbut->prev; but; but= but->prev) {
+ if (ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
+ if (!(but->flag & UI_BUT_DISABLED)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
}
}
}
- for(but= block->buttons.last; but!=actbut; but= but->prev) {
- if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
- if(!(but->flag & UI_BUT_DISABLED)) {
+ for (but= block->buttons.last; but!=actbut; but= but->prev) {
+ if (ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
+ if (!(but->flag & UI_BUT_DISABLED)) {
data->postbut= but;
data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
return;
@@ -1732,7 +1734,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
case WHEELUPMOUSE:
case WHEELDOWNMOUSE:
case MOUSEMOVE:
- if(data->searchbox)
+ if (data->searchbox)
ui_searchbox_event(C, data->searchbox, but, event);
break;
@@ -1746,10 +1748,10 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
case LEFTMOUSE: {
/* exit on LMB only on RELEASE for searchbox, to mimic other popups, and allow multiple menu levels */
- if(data->searchbox)
+ if (data->searchbox)
inbox= ui_searchbox_inside(data->searchbox, event->x, event->y);
- if(event->val==KM_PRESS) {
+ if (event->val==KM_PRESS) {
mx= event->x;
my= event->y;
ui_window_to_block(data->region, block, &mx, &my);
@@ -1762,15 +1764,15 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
button_activate_state(C, but, BUTTON_STATE_TEXT_SELECTING);
retval= WM_UI_HANDLER_BREAK;
}
- else if(inbox==0) {
+ else if (inbox==0) {
/* if searchbox, click outside will cancel */
- if(data->searchbox)
+ if (data->searchbox)
data->cancel= data->escapecancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
retval= WM_UI_HANDLER_BREAK;
}
}
- else if(inbox) {
+ else if (inbox) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
retval= WM_UI_HANDLER_BREAK;
}
@@ -1778,17 +1780,17 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
}
}
- if(event->val==KM_PRESS) {
+ if (event->val==KM_PRESS) {
switch (event->type) {
case VKEY:
case XKEY:
case CKEY:
- if(event->ctrl || event->oskey) {
- if(event->type == VKEY)
+ if (event->ctrl || event->oskey) {
+ if (event->type == VKEY)
changed= ui_textedit_copypaste(but, data, 1, 0, 0);
- else if(event->type == CKEY)
+ else if (event->type == CKEY)
changed= ui_textedit_copypaste(but, data, 0, 1, 0);
- else if(event->type == XKEY)
+ else if (event->type == XKEY)
changed= ui_textedit_copypaste(but, data, 0, 0, 1);
retval= WM_UI_HANDLER_BREAK;
@@ -1803,7 +1805,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
retval= WM_UI_HANDLER_BREAK;
break;
case DOWNARROWKEY:
- if(data->searchbox) {
+ if (data->searchbox) {
ui_searchbox_event(C, data->searchbox, but, event);
break;
}
@@ -1813,7 +1815,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
retval= WM_UI_HANDLER_BREAK;
break;
case UPARROWKEY:
- if(data->searchbox) {
+ if (data->searchbox) {
ui_searchbox_event(C, data->searchbox, but, event);
break;
}
@@ -1839,12 +1841,12 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
case TABKEY:
/* there is a key conflict here, we can't tab with autocomplete */
- if(but->autocomplete_func || data->searchbox) {
+ if (but->autocomplete_func || data->searchbox) {
changed= ui_textedit_autocomplete(C, but, data);
update= 1; /* do live update for tab key */
}
/* the hotkey here is not well defined, was G.qual so we check all */
- else if(event->shift || event->ctrl || event->alt || event->oskey) {
+ else if (event->shift || event->ctrl || event->alt || event->oskey) {
ui_textedit_prev_but(block, but, data);
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
@@ -1856,20 +1858,20 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
break;
}
- if((event->ascii || event->utf8_buf[0]) && (retval == WM_UI_HANDLER_CONTINUE)) {
+ if ((event->ascii || event->utf8_buf[0]) && (retval == WM_UI_HANDLER_CONTINUE)) {
char ascii = event->ascii;
const char *utf8_buf= event->utf8_buf;
/* exception that's useful for number buttons, some keyboard
* numpads have a comma instead of a period */
- if(ELEM3(but->type, NUM, NUMABS, NUMSLI)) { /* could use data->min*/
- if(event->type == PADPERIOD && ascii == ',') {
+ if (ELEM3(but->type, NUM, NUMABS, NUMSLI)) { /* could use data->min*/
+ if (event->type == PADPERIOD && ascii == ',') {
ascii = '.';
utf8_buf= NULL; /* force ascii fallback */
}
}
- if(utf8_buf && utf8_buf[0]) {
+ if (utf8_buf && utf8_buf[0]) {
int utf8_buf_len= BLI_str_utf8_size(utf8_buf);
/* keep this printf until utf8 is well tested */
if (utf8_buf_len != 1) {
@@ -1887,21 +1889,21 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
}
/* textbutton with magnifier icon: do live update for search button */
- if(but->icon==ICON_VIEWZOOM)
+ if (but->icon==ICON_VIEWZOOM)
update= 1;
}
- if(changed) {
+ if (changed) {
/* only update when typing for TAB key */
- if(update && data->interactive) ui_apply_button(C, block, but, data, 1);
+ if (update && data->interactive) ui_apply_button(C, block, but, data, 1);
else ui_check_but(but);
but->changed= TRUE;
- if(data->searchbox)
+ if (data->searchbox)
ui_searchbox_update(C, data->searchbox, but, 1); /* 1 = reset */
}
- if(changed || (retval == WM_UI_HANDLER_BREAK))
+ if (changed || (retval == WM_UI_HANDLER_BREAK))
ED_region_tag_redraw(data->region);
}
@@ -1920,13 +1922,13 @@ static void ui_do_but_textedit_select(bContext *C, uiBlock *block, uiBut *but, u
break;
}
case LEFTMOUSE:
- if(event->val == KM_RELEASE)
+ if (event->val == KM_RELEASE)
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
retval= WM_UI_HANDLER_BREAK;
break;
}
- if(retval == WM_UI_HANDLER_BREAK) {
+ if (retval == WM_UI_HANDLER_BREAK) {
ui_check_but(but);
ED_region_tag_redraw(data->region);
}
@@ -1936,14 +1938,14 @@ static void ui_do_but_textedit_select(bContext *C, uiBlock *block, uiBut *but, u
static void ui_numedit_begin(uiBut *but, uiHandleButtonData *data)
{
- if(but->type == BUT_CURVE) {
+ if (but->type == BUT_CURVE) {
but->editcumap= (CurveMapping*)but->poin;
}
- else if(but->type == BUT_COLORBAND) {
+ else if (but->type == BUT_COLORBAND) {
data->coba= (ColorBand*)but->poin;
but->editcoba= data->coba;
}
- else if(ELEM3(but->type, BUT_NORMAL, HSVCUBE, HSVCIRCLE)) {
+ else if (ELEM3(but->type, BUT_NORMAL, HSVCUBE, HSVCIRCLE)) {
ui_get_but_vectorf(but, data->origvec);
copy_v3_v3(data->vec, data->origvec);
but->editvec= data->vec;
@@ -1984,7 +1986,7 @@ static void ui_numedit_end(uiBut *but, uiHandleButtonData *data)
static void ui_numedit_apply(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data)
{
- if(data->interactive) ui_apply_button(C, block, but, data, 1);
+ if (data->interactive) ui_apply_button(C, block, but, data, 1);
else ui_check_but(but);
ED_region_tag_redraw(data->region);
@@ -2003,7 +2005,7 @@ static void ui_blockopen_begin(bContext *C, uiBut *but, uiHandleButtonData *data
switch(but->type) {
case BLOCK:
case PULLDOWN:
- if(but->menu_create_func) {
+ if (but->menu_create_func) {
menufunc= but->menu_create_func;
arg= but->poin;
}
@@ -2013,7 +2015,7 @@ static void ui_blockopen_begin(bContext *C, uiBut *but, uiHandleButtonData *data
}
break;
case MENU:
- if(but->menu_create_func) {
+ if (but->menu_create_func) {
menufunc= but->menu_create_func;
arg= but->poin;
}
@@ -2043,14 +2045,14 @@ static void ui_blockopen_begin(bContext *C, uiBut *but, uiHandleButtonData *data
break;
}
- if(func || handlefunc) {
+ if (func || handlefunc) {
data->menu= ui_popup_block_create(C, data->region, but, func, handlefunc, arg);
- if(but->block->handle)
+ if (but->block->handle)
data->menu->popup= but->block->handle->popup;
}
- else if(menufunc || menustr) {
+ else if (menufunc || menustr) {
data->menu= ui_popup_menu_create(C, data->region, but, menufunc, arg, menustr);
- if(but->block->handle)
+ if (but->block->handle)
data->menu->popup= but->block->handle->popup;
}
@@ -2060,14 +2062,14 @@ static void ui_blockopen_begin(bContext *C, uiBut *but, uiHandleButtonData *data
static void ui_blockopen_end(bContext *C, uiBut *but, uiHandleButtonData *data)
{
- if(but) {
+ if (but) {
but->editval= NULL;
but->editvec= NULL;
but->block->auto_open_last= PIL_check_seconds_timer();
}
- if(data->menu) {
+ if (data->menu) {
ui_popup_block_free(C, data->menu);
data->menu= NULL;
}
@@ -2077,23 +2079,23 @@ static void ui_blockopen_end(bContext *C, uiBut *but, uiHandleButtonData *data)
static int ui_do_but_BUT(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event)
{
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(event->type == LEFTMOUSE && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (event->type == LEFTMOUSE && event->val==KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_WAIT_RELEASE);
return WM_UI_HANDLER_BREAK;
}
- else if(event->type == LEFTMOUSE && but->block->handle) {
+ else if (event->type == LEFTMOUSE && but->block->handle) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
}
- else if(ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS) {
+ else if (ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_WAIT_FLASH);
return WM_UI_HANDLER_BREAK;
}
}
- else if(data->state == BUTTON_STATE_WAIT_RELEASE) {
- if(event->type == LEFTMOUSE && event->val!=KM_PRESS) {
- if(!(but->flag & UI_SELECT))
+ else if (data->state == BUTTON_STATE_WAIT_RELEASE) {
+ if (event->type == LEFTMOUSE && event->val!=KM_PRESS) {
+ if (!(but->flag & UI_SELECT))
data->cancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
@@ -2105,24 +2107,24 @@ static int ui_do_but_BUT(bContext *C, uiBut *but, uiHandleButtonData *data, wmEv
static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event)
{
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
but->drawstr[0]= 0;
but->modifier_key= 0;
button_activate_state(C, but, BUTTON_STATE_WAIT_KEY_EVENT);
return WM_UI_HANDLER_BREAK;
}
}
- else if(data->state == BUTTON_STATE_WAIT_KEY_EVENT) {
+ else if (data->state == BUTTON_STATE_WAIT_KEY_EVENT) {
- if(event->type == MOUSEMOVE)
+ if (event->type == MOUSEMOVE)
return WM_UI_HANDLER_CONTINUE;
- if(event->type == LEFTMOUSE && event->val==KM_PRESS) {
+ if (event->type == LEFTMOUSE && event->val==KM_PRESS) {
/* only cancel if click outside the button */
- if(ui_mouse_inside_button(but->active->region, but, event->x, event->y) == 0) {
+ if (ui_mouse_inside_button(but->active->region, but, event->x, event->y) == 0) {
/* data->cancel doesnt work, this button opens immediate */
- if(but->flag & UI_BUT_IMMEDIATE)
+ if (but->flag & UI_BUT_IMMEDIATE)
ui_set_but_val(but, 0);
else
data->cancel= 1;
@@ -2133,18 +2135,18 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data
/* always set */
but->modifier_key = 0;
- if(event->shift) but->modifier_key |= KM_SHIFT;
- if(event->alt) but->modifier_key |= KM_ALT;
- if(event->ctrl) but->modifier_key |= KM_CTRL;
- if(event->oskey) but->modifier_key |= KM_OSKEY;
+ if (event->shift) but->modifier_key |= KM_SHIFT;
+ if (event->alt) but->modifier_key |= KM_ALT;
+ if (event->ctrl) but->modifier_key |= KM_CTRL;
+ if (event->oskey) but->modifier_key |= KM_OSKEY;
ui_check_but(but);
ED_region_tag_redraw(data->region);
- if(event->val==KM_PRESS) {
- if(ISHOTKEY(event->type)) {
+ if (event->val==KM_PRESS) {
+ if (ISHOTKEY(event->type)) {
- if(WM_key_event_string(event->type)[0])
+ if (WM_key_event_string(event->type)[0])
ui_set_but_val(but, event->type);
else
data->cancel= 1;
@@ -2152,7 +2154,7 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
}
- else if(event->type == ESCKEY) {
+ else if (event->type == ESCKEY) {
data->cancel= 1;
data->escapecancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
@@ -2166,18 +2168,18 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data
static int ui_do_but_KEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event)
{
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_WAIT_KEY_EVENT);
return WM_UI_HANDLER_BREAK;
}
}
- else if(data->state == BUTTON_STATE_WAIT_KEY_EVENT) {
- if(event->type == MOUSEMOVE)
+ else if (data->state == BUTTON_STATE_WAIT_KEY_EVENT) {
+ if (event->type == MOUSEMOVE)
return WM_UI_HANDLER_CONTINUE;
- if(event->val==KM_PRESS) {
- if(WM_key_event_string(event->type)[0])
+ if (event->val==KM_PRESS) {
+ if (WM_key_event_string(event->type)[0])
ui_set_but_val(but, event->type);
else
data->cancel= 1;
@@ -2191,20 +2193,20 @@ static int ui_do_but_KEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data, w
static int ui_do_but_TEX(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event)
{
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(ELEM(event->type, LEFTMOUSE, EVT_BUT_OPEN) && event->val==KM_PRESS) {
- if(but->dt == UI_EMBOSSN && !event->ctrl);
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (ELEM(event->type, LEFTMOUSE, EVT_BUT_OPEN) && event->val==KM_PRESS) {
+ if (but->dt == UI_EMBOSSN && !event->ctrl);
else {
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
return WM_UI_HANDLER_BREAK;
}
}
}
- else if(data->state == BUTTON_STATE_TEXT_EDITING) {
+ else if (data->state == BUTTON_STATE_TEXT_EDITING) {
ui_do_but_textedit(C, block, but, data, event);
return WM_UI_HANDLER_BREAK;
}
- else if(data->state == BUTTON_STATE_TEXT_SELECTING) {
+ else if (data->state == BUTTON_STATE_TEXT_SELECTING) {
ui_do_but_textedit_select(C, block, but, data, event);
return WM_UI_HANDLER_BREAK;
}
@@ -2214,8 +2216,8 @@ static int ui_do_but_TEX(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
static int ui_do_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event)
{
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
data->togdual= event->ctrl;
data->togonly= !event->shift;
button_activate_state(C, but, BUTTON_STATE_EXIT);
@@ -2228,11 +2230,11 @@ static int ui_do_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data, wmEv
static int ui_do_but_EXIT(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event)
{
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
/* first handle click on icondrag type button */
- if(event->type==LEFTMOUSE && but->dragpoin) {
- if(ui_but_mouse_inside_icon(but, data->region, event)) {
+ if (event->type==LEFTMOUSE && but->dragpoin) {
+ if (ui_but_mouse_inside_icon(but, data->region, event)) {
/* tell the button to wait and keep checking further events to
* see if it should start dragging */
@@ -2243,27 +2245,27 @@ static int ui_do_but_EXIT(bContext *C, uiBut *but, uiHandleButtonData *data, wmE
}
}
- if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
+ if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
int ret = WM_UI_HANDLER_BREAK;
/* XXX (a bit ugly) Special case handling for filebrowser drag button */
- if(but->dragpoin && but->imb && ui_but_mouse_inside_icon(but, data->region, event)) {
+ if (but->dragpoin && but->imb && ui_but_mouse_inside_icon(but, data->region, event)) {
ret = WM_UI_HANDLER_CONTINUE;
}
button_activate_state(C, but, BUTTON_STATE_EXIT);
return ret;
}
}
- else if(data->state == BUTTON_STATE_WAIT_DRAG) {
+ else if (data->state == BUTTON_STATE_WAIT_DRAG) {
/* this function also ends state */
- if(ui_but_start_drag(C, but, data, event)) {
+ if (ui_but_start_drag(C, but, data, event)) {
return WM_UI_HANDLER_BREAK;
}
/* If the mouse has been pressed and released, getting to
* this point without triggering a drag, then clear the
* drag state for this button and continue to pass on the event */
- if(event->type==LEFTMOUSE && event->val==KM_RELEASE) {
+ if (event->type==LEFTMOUSE && event->val==KM_RELEASE) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_CONTINUE;
}
@@ -2279,25 +2281,25 @@ static int ui_do_but_EXIT(bContext *C, uiBut *but, uiHandleButtonData *data, wmE
/* var names match ui_numedit_but_NUM */
static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, float softmax, float softrange, int snap)
{
- if(tempf==softmin || tempf==softmax || snap==0) {
+ if (tempf==softmin || tempf==softmax || snap==0) {
/* pass */
}
else {
float fac= 1.0f;
- if(ui_is_but_unit(but)) {
+ if (ui_is_but_unit(but)) {
UnitSettings *unit= but->block->unit;
int unit_type= uiButGetUnitType(but)>>16;
- if(bUnit_IsValid(unit->system, unit_type)) {
+ if (bUnit_IsValid(unit->system, unit_type)) {
fac= (float)bUnit_BaseScalar(unit->system, unit_type);
- if(ELEM3(unit_type, B_UNIT_LENGTH, B_UNIT_AREA, B_UNIT_VOLUME)) {
+ if (ELEM3(unit_type, B_UNIT_LENGTH, B_UNIT_AREA, B_UNIT_VOLUME)) {
fac /= unit->scale_length;
}
}
}
- if(fac != 1.0f) {
+ if (fac != 1.0f) {
/* snap in unit-space */
tempf /= fac;
/* softmin /= fac; */ /* UNUSED */
@@ -2305,18 +2307,18 @@ static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, floa
softrange /= fac;
}
- if(snap==1) {
- if(softrange < 2.10f) tempf= 0.1f*floorf(10.0f*tempf);
- else if(softrange < 21.0f) tempf= floorf(tempf);
+ if (snap==1) {
+ if (softrange < 2.10f) tempf= 0.1f*floorf(10.0f*tempf);
+ else if (softrange < 21.0f) tempf= floorf(tempf);
else tempf= 10.0f*floorf(tempf/10.0f);
}
- else if(snap==2) {
- if(softrange < 2.10f) tempf= 0.01f*floorf(100.0f*tempf);
- else if(softrange < 21.0f) tempf= 0.1f*floorf(10.0f*tempf);
+ else if (snap==2) {
+ if (softrange < 2.10f) tempf= 0.01f*floorf(100.0f*tempf);
+ else if (softrange < 21.0f) tempf= 0.1f*floorf(10.0f*tempf);
else tempf= floor(tempf);
}
- if(fac != 1.0f)
+ if (fac != 1.0f)
tempf *= fac;
}
@@ -2325,7 +2327,7 @@ static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, floa
static float ui_numedit_apply_snap(int temp, float softmin, float softmax, int snap)
{
- if(temp==softmin || temp==softmax)
+ if (temp==softmin || temp==softmax)
return temp;
switch(snap) {
@@ -2347,13 +2349,13 @@ static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, i
float deler, tempf, softmin, softmax, softrange;
int lvalue, temp, changed= 0;
- if(mx == data->draglastx)
+ if (mx == data->draglastx)
return changed;
/* drag-lock - prevent unwanted scroll adjustments */
/* change value (now 3) to adjust threshold in pixels */
- if(data->draglock) {
- if(abs(mx-data->dragstartx) <= 3)
+ if (data->draglock) {
+ if (abs(mx-data->dragstartx) <= 3)
return changed;
data->draglock= 0;
@@ -2364,19 +2366,20 @@ static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, i
softmax= but->softmax;
softrange= softmax - softmin;
- if(ui_is_a_warp_but(but)) {
+ if (ui_is_a_warp_but(but)) {
/* Mouse location isn't screen clamped to the screen so use a linear mapping
* 2px == 1-int, or 1px == 1-ClickStep */
- if(ui_is_but_float(but)) {
+ if (ui_is_but_float(but)) {
fac *= 0.01f*but->a1;
tempf = (float)data->startvalue + ((float)(mx - data->dragstartx) * fac);
tempf= ui_numedit_apply_snapf(but, tempf, softmin, softmax, softrange, snap);
#if 1 /* fake moving the click start, nicer for dragging back after passing the limit */
- if(tempf < softmin) {
+ if (tempf < softmin) {
data->dragstartx -= (softmin-tempf) / fac;
tempf= softmin;
- } else if (tempf > softmax) {
+ }
+ else if (tempf > softmax) {
data->dragstartx += (tempf-softmax) / fac;
tempf= softmax;
}
@@ -2384,25 +2387,26 @@ static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, i
CLAMP(tempf, softmin, softmax);
#endif
- if(tempf != (float)data->value) {
+ if (tempf != (float)data->value) {
data->dragchange= 1;
data->value= tempf;
changed= 1;
}
}
else {
- if(softrange > 256) fac= 1.0; /* 1px == 1 */
- else if(softrange > 32) fac= 1.0/2.0; /* 2px == 1 */
+ if (softrange > 256) fac= 1.0; /* 1px == 1 */
+ else if (softrange > 32) fac= 1.0/2.0; /* 2px == 1 */
else fac= 1.0/16.0; /* 16px == 1? */
temp= data->startvalue + (((double)mx - data->dragstartx) * (double)fac);
temp= ui_numedit_apply_snap(temp, softmin, softmax, snap);
#if 1 /* fake moving the click start, nicer for dragging back after passing the limit */
- if(temp < softmin) {
+ if (temp < softmin) {
data->dragstartx -= (softmin-temp) / fac;
temp= softmin;
- } else if (temp > softmax) {
+ }
+ else if (temp > softmax) {
data->dragstartx += (temp-softmax) / fac;
temp= softmax;
}
@@ -2410,7 +2414,7 @@ static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, i
CLAMP(temp, softmin, softmax);
#endif
- if(temp != data->value) {
+ if (temp != data->value) {
data->dragchange= 1;
data->value= temp;
changed= 1;
@@ -2422,7 +2426,7 @@ static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, i
else {
/* Use a non-linear mapping of the mouse drag especially for large floats (normal behavior) */
deler= 500;
- if(!ui_is_but_float(but)) {
+ if (!ui_is_but_float(but)) {
/* prevent large ranges from getting too out of control */
if (softrange > 600) deler = powf(softrange, 0.75);
@@ -2431,13 +2435,15 @@ static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, i
}
deler /= fac;
- if(softrange > 11) {
+ if (softrange > 11) {
/* non linear change in mouse input- good for high precicsion */
data->dragf+= (((float)(mx-data->draglastx))/deler) * (fabsf(data->dragstartx-mx)*0.002f);
- } else if (softrange > 129) { /* only scale large int buttons */
+ }
+ else if (softrange > 129) { /* only scale large int buttons */
/* non linear change in mouse input- good for high precicsionm ints need less fine tuning */
data->dragf+= (((float)(mx-data->draglastx))/deler) * (fabsf(data->dragstartx-mx)*0.004f);
- } else {
+ }
+ else {
/*no scaling */
data->dragf += ((float)(mx - data->draglastx)) / deler;
}
@@ -2447,7 +2453,7 @@ static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, i
tempf= (softmin + data->dragf*softrange);
- if(!ui_is_but_float(but)) {
+ if (!ui_is_but_float(but)) {
temp= floorf(tempf + 0.5f);
temp= ui_numedit_apply_snap(temp, softmin, softmax, snap);
@@ -2455,7 +2461,7 @@ static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, i
CLAMP(temp, softmin, softmax);
lvalue= (int)data->value;
- if(temp != lvalue) {
+ if (temp != lvalue) {
data->dragchange= 1;
data->value= (double)temp;
changed= 1;
@@ -2467,7 +2473,7 @@ static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, i
CLAMP(tempf, softmin, softmax);
- if(tempf != (float)data->value) {
+ if (tempf != (float)data->value) {
data->dragchange= 1;
data->value= tempf;
changed= 1;
@@ -2491,27 +2497,27 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
ui_window_to_block(data->region, block, &mx, &my);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
/* XXX hardcoded keymap check.... */
- if(event->type == WHEELDOWNMOUSE && event->alt) {
+ if (event->type == WHEELDOWNMOUSE && event->alt) {
mx= but->x1;
click= 1;
}
- else if(event->type == WHEELUPMOUSE && event->alt) {
+ else if (event->type == WHEELUPMOUSE && event->alt) {
mx= but->x2;
click= 1;
}
- else if(event->val==KM_PRESS) {
- if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->ctrl) {
+ else if (event->val==KM_PRESS) {
+ if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->ctrl) {
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
retval= WM_UI_HANDLER_BREAK;
}
- else if(event->type == LEFTMOUSE) {
+ else if (event->type == LEFTMOUSE) {
data->dragstartx= data->draglastx= ui_is_a_warp_but(but) ? screen_mx:mx;
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
retval= WM_UI_HANDLER_BREAK;
}
- else if(ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS)
+ else if (ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS)
click= 1;
else if (event->type == MINUSKEY && event->val==KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
@@ -2522,43 +2528,43 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
}
}
- else if(data->state == BUTTON_STATE_NUM_EDITING) {
- if(event->type == ESCKEY) {
+ else if (data->state == BUTTON_STATE_NUM_EDITING) {
+ if (event->type == ESCKEY) {
data->cancel= 1;
data->escapecancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
- else if(event->type == LEFTMOUSE && event->val!=KM_PRESS) {
- if(data->dragchange)
+ else if (event->type == LEFTMOUSE && event->val!=KM_PRESS) {
+ if (data->dragchange)
button_activate_state(C, but, BUTTON_STATE_EXIT);
else
click= 1;
}
- else if(event->type == MOUSEMOVE) {
+ else if (event->type == MOUSEMOVE) {
float fac;
int snap;
fac= 1.0f;
- if(event->shift) fac /= 10.0f;
- if(event->alt) fac /= 20.0f;
+ if (event->shift) fac /= 10.0f;
+ if (event->alt) fac /= 20.0f;
snap= (event->ctrl)? (event->shift)? 2: 1: 0;
- if(ui_numedit_but_NUM(but, data, fac, snap, (ui_is_a_warp_but(but) ? screen_mx:mx)))
+ if (ui_numedit_but_NUM(but, data, fac, snap, (ui_is_a_warp_but(but) ? screen_mx:mx)))
ui_numedit_apply(C, block, but, data);
}
retval= WM_UI_HANDLER_BREAK;
}
- else if(data->state == BUTTON_STATE_TEXT_EDITING) {
+ else if (data->state == BUTTON_STATE_TEXT_EDITING) {
ui_do_but_textedit(C, block, but, data, event);
retval= WM_UI_HANDLER_BREAK;
}
- else if(data->state == BUTTON_STATE_TEXT_SELECTING) {
+ else if (data->state == BUTTON_STATE_TEXT_SELECTING) {
ui_do_but_textedit_select(C, block, but, data, event);
retval= WM_UI_HANDLER_BREAK;
}
- if(click) {
+ if (click) {
/* we can click on the side arrows to increment/decrement,
* or click inside to edit the value directly */
float tempf, softmin, softmax;
@@ -2567,23 +2573,23 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
softmin= but->softmin;
softmax= but->softmax;
- if(!ui_is_but_float(but)) {
- if(mx < (but->x1 + (but->x2 - but->x1)/3 - 3)) {
+ if (!ui_is_but_float(but)) {
+ if (mx < (but->x1 + (but->x2 - but->x1)/3 - 3)) {
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
temp= (int)data->value - 1;
- if(temp>=softmin && temp<=softmax)
+ if (temp>=softmin && temp<=softmax)
data->value= (double)temp;
else
data->cancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
- else if(mx > (but->x1 + (2*(but->x2 - but->x1)/3) + 3)) {
+ else if (mx > (but->x1 + (2*(but->x2 - but->x1)/3) + 3)) {
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
temp= (int)data->value + 1;
- if(temp>=softmin && temp<=softmax)
+ if (temp>=softmin && temp<=softmax)
data->value= (double)temp;
else
data->cancel= 1;
@@ -2594,7 +2600,7 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
}
else {
- if(mx < (but->x1 + (but->x2 - but->x1)/3 - 3)) {
+ if (mx < (but->x1 + (but->x2 - but->x1)/3 - 3)) {
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
tempf= (float)data->value - 0.01f * but->a1;
@@ -2603,7 +2609,7 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
- else if(mx > but->x1 + (2*((but->x2 - but->x1)/3) + 3)) {
+ else if (mx > but->x1 + (2*((but->x2 - but->x1)/3) + 3)) {
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
tempf= (float)data->value + 0.01f * but->a1;
@@ -2631,9 +2637,9 @@ static int ui_numedit_but_SLI(uiBut *but, uiHandleButtonData *data, int shift, i
softmax= but->softmax;
softrange= softmax - softmin;
- if(but->type==NUMSLI) deler= ((but->x2-but->x1) - 5.0f*but->aspect);
- else if(but->type==HSVSLI) deler= ((but->x2-but->x1)/2.0f - 5.0f*but->aspect);
- else if(but->type==SCROLL) {
+ if (but->type==NUMSLI) deler= ((but->x2-but->x1) - 5.0f*but->aspect);
+ else if (but->type==HSVSLI) deler= ((but->x2-but->x1)/2.0f - 5.0f*but->aspect);
+ else if (but->type==SCROLL) {
int horizontal= (but->x2 - but->x1 > but->y2 - but->y1);
float size= (horizontal)? (but->x2-but->x1): -(but->y2-but->y1);
deler= size*(but->softmax - but->softmin)/(but->softmax - but->softmin + but->a1);
@@ -2642,26 +2648,26 @@ static int ui_numedit_but_SLI(uiBut *but, uiHandleButtonData *data, int shift, i
f= (float)(mx-data->dragstartx)/deler + data->dragfstart;
- if(shift)
+ if (shift)
f= (f-data->dragfstart)/10.0f + data->dragfstart;
CLAMP(f, 0.0f, 1.0f);
tempf= softmin + f*softrange;
temp= floorf(tempf+0.5f);
- if(ctrl) {
- if(tempf==softmin || tempf==softmax);
- else if(ui_is_but_float(but)) {
+ if (ctrl) {
+ if (tempf==softmin || tempf==softmax);
+ else if (ui_is_but_float(but)) {
- if(shift) {
- if(tempf==softmin || tempf==softmax);
- else if(softmax-softmin < 2.10f) tempf= 0.01f * floorf(100.0f*tempf);
- else if(softmax-softmin < 21.0f) tempf= 0.1f * floorf(10.0f*tempf);
+ if (shift) {
+ if (tempf==softmin || tempf==softmax);
+ else if (softmax-softmin < 2.10f) tempf= 0.01f * floorf(100.0f*tempf);
+ else if (softmax-softmin < 21.0f) tempf= 0.1f * floorf(10.0f*tempf);
else tempf= floorf(tempf);
}
else {
- if(softmax-softmin < 2.10f) tempf= 0.1f * floorf(10.0f*tempf);
- else if(softmax-softmin < 21.0f) tempf= floorf(tempf);
+ if (softmax-softmin < 2.10f) tempf= 0.1f * floorf(10.0f*tempf);
+ else if (softmax-softmin < 21.0f) tempf= floorf(tempf);
else tempf= 10.0f*floorf(tempf/10.0f);
}
}
@@ -2671,12 +2677,12 @@ static int ui_numedit_but_SLI(uiBut *but, uiHandleButtonData *data, int shift, i
}
}
- if(!ui_is_but_float(but)) {
+ if (!ui_is_but_float(but)) {
lvalue= floor(data->value+0.5);
CLAMP(temp, softmin, softmax);
- if(temp != lvalue) {
+ if (temp != lvalue) {
data->value= temp;
data->dragchange= 1;
changed= 1;
@@ -2685,7 +2691,7 @@ static int ui_numedit_but_SLI(uiBut *but, uiHandleButtonData *data, int shift, i
else {
CLAMP(tempf, softmin, softmax);
- if(tempf != (float)data->value) {
+ if (tempf != (float)data->value) {
data->value= tempf;
data->dragchange= 1;
changed= 1;
@@ -2704,23 +2710,23 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
my= event->y;
ui_window_to_block(data->region, block, &mx, &my);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
/* XXX hardcoded keymap check.... */
- if(event->type == WHEELDOWNMOUSE && event->alt) {
+ if (event->type == WHEELDOWNMOUSE && event->alt) {
mx= but->x1;
click= 2;
}
- else if(event->type == WHEELUPMOUSE && event->alt) {
+ else if (event->type == WHEELUPMOUSE && event->alt) {
mx= but->x2;
click= 2;
}
- else if(event->val==KM_PRESS) {
- if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->ctrl) {
+ else if (event->val==KM_PRESS) {
+ if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->ctrl) {
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
retval= WM_UI_HANDLER_BREAK;
}
/* alt-click on sides to get "arrows" like in NUM buttons, and match wheel usage above */
- else if(event->type == LEFTMOUSE && event->alt) {
+ else if (event->type == LEFTMOUSE && event->alt) {
int halfpos = (but->x1 + but->x2) / 2;
click = 2;
if (mx < halfpos)
@@ -2728,13 +2734,13 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
else
mx = but->x2;
}
- else if(event->type == LEFTMOUSE) {
+ else if (event->type == LEFTMOUSE) {
data->dragstartx= mx;
data->draglastx= mx;
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
retval= WM_UI_HANDLER_BREAK;
}
- else if(ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS)
+ else if (ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS)
click= 1;
else if (event->type == MINUSKEY && event->val==KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
@@ -2744,34 +2750,34 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
}
}
}
- else if(data->state == BUTTON_STATE_NUM_EDITING) {
- if(event->type == ESCKEY) {
+ else if (data->state == BUTTON_STATE_NUM_EDITING) {
+ if (event->type == ESCKEY) {
data->cancel= 1;
data->escapecancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
- else if(event->type == LEFTMOUSE && event->val!=KM_PRESS) {
- if(data->dragchange)
+ else if (event->type == LEFTMOUSE && event->val!=KM_PRESS) {
+ if (data->dragchange)
button_activate_state(C, but, BUTTON_STATE_EXIT);
else
click= 1;
}
- else if(event->type == MOUSEMOVE) {
- if(ui_numedit_but_SLI(but, data, event->shift, event->ctrl, mx))
+ else if (event->type == MOUSEMOVE) {
+ if (ui_numedit_but_SLI(but, data, event->shift, event->ctrl, mx))
ui_numedit_apply(C, block, but, data);
}
retval= WM_UI_HANDLER_BREAK;
}
- else if(data->state == BUTTON_STATE_TEXT_EDITING) {
+ else if (data->state == BUTTON_STATE_TEXT_EDITING) {
ui_do_but_textedit(C, block, but, data, event);
retval= WM_UI_HANDLER_BREAK;
}
- else if(data->state == BUTTON_STATE_TEXT_SELECTING) {
+ else if (data->state == BUTTON_STATE_TEXT_SELECTING) {
ui_do_but_textedit_select(C, block, but, data, event);
retval= WM_UI_HANDLER_BREAK;
}
- if(click) {
+ if (click) {
if (click==2) {
/* nudge slider to the left or right */
float f, tempf, softmin, softmax, softrange;
@@ -2787,7 +2793,7 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
temp= (int)data->value;
#if 0
- if(but->type==SLI) {
+ if (but->type==SLI) {
f= (float)(mx-but->x1)/(but->x2-but->x1); /* same as below */
}
else
@@ -2798,20 +2804,20 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
f= softmin + f*softrange;
- if(!ui_is_but_float(but)) {
- if(f<temp) temp--;
+ if (!ui_is_but_float(but)) {
+ if (f<temp) temp--;
else temp++;
- if(temp>=softmin && temp<=softmax)
+ if (temp>=softmin && temp<=softmax)
data->value= temp;
else
data->cancel= 1;
}
else {
- if(f<tempf) tempf -= 0.01f;
+ if (f<tempf) tempf -= 0.01f;
else tempf += 0.01f;
- if(tempf>=softmin && tempf<=softmax)
+ if (tempf>=softmin && tempf<=softmax)
data->value= tempf;
else
data->cancel= 1;
@@ -2840,10 +2846,10 @@ static int ui_do_but_SCROLL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
my= event->y;
ui_window_to_block(data->region, block, &mx, &my);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(event->val==KM_PRESS) {
- if(event->type == LEFTMOUSE) {
- if(horizontal) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (event->val==KM_PRESS) {
+ if (event->type == LEFTMOUSE) {
+ if (horizontal) {
data->dragstartx= mx;
data->draglastx= mx;
}
@@ -2856,22 +2862,22 @@ static int ui_do_but_SCROLL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
}
/* UNUSED - otherwise code is ok, add back if needed */
#if 0
- else if(ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS)
+ else if (ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS)
click= 1;
#endif
}
}
- else if(data->state == BUTTON_STATE_NUM_EDITING) {
- if(event->type == ESCKEY) {
+ else if (data->state == BUTTON_STATE_NUM_EDITING) {
+ if (event->type == ESCKEY) {
data->cancel= 1;
data->escapecancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
- else if(event->type == LEFTMOUSE && event->val!=KM_PRESS) {
+ else if (event->type == LEFTMOUSE && event->val!=KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
- else if(event->type == MOUSEMOVE) {
- if(ui_numedit_but_SLI(but, data, 0, 0, (horizontal)? mx: my))
+ else if (event->type == MOUSEMOVE) {
+ if (ui_numedit_but_SLI(but, data, 0, 0, (horizontal)? mx: my))
ui_numedit_apply(C, block, but, data);
}
@@ -2885,11 +2891,11 @@ static int ui_do_but_SCROLL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event)
{
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
/* first handle click on icondrag type button */
- if(event->type==LEFTMOUSE && but->dragpoin && event->val==KM_PRESS) {
- if(ui_but_mouse_inside_icon(but, data->region, event)) {
+ if (event->type==LEFTMOUSE && but->dragpoin && event->val==KM_PRESS) {
+ if (ui_but_mouse_inside_icon(but, data->region, event)) {
button_activate_state(C, but, BUTTON_STATE_WAIT_DRAG);
data->dragstartx= event->x;
data->dragstarty= event->y;
@@ -2898,13 +2904,13 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, wm
}
/* regular open menu */
- if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
+ if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_MENU_OPEN);
return WM_UI_HANDLER_BREAK;
}
- else if(ELEM3(but->type, MENU, ICONROW, ICONTEXTROW)) {
+ else if (ELEM3(but->type, MENU, ICONROW, ICONTEXTROW)) {
- if(event->type == WHEELDOWNMOUSE && event->alt) {
+ if (event->type == WHEELDOWNMOUSE && event->alt) {
data->value= ui_step_name_menu(but, -1);
button_activate_state(C, but, BUTTON_STATE_EXIT);
ui_apply_button(C, but->block, but, data, 1);
@@ -2921,7 +2927,7 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, wm
return WM_UI_HANDLER_BREAK;
}
- else if(event->type == WHEELUPMOUSE && event->alt) {
+ else if (event->type == WHEELUPMOUSE && event->alt) {
data->value= ui_step_name_menu(but, 1);
button_activate_state(C, but, BUTTON_STATE_EXIT);
ui_apply_button(C, but->block, but, data, 1);
@@ -2933,15 +2939,15 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, wm
return WM_UI_HANDLER_BREAK;
}
}
- else if(but->type==COL) {
- if( ELEM(event->type, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->alt) {
+ else if (but->type==COL) {
+ if ( ELEM(event->type, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->alt) {
float *hsv= ui_block_hsv_get(but->block);
float col[3];
ui_get_but_vectorf(but, col);
rgb_to_hsv_compat(col[0], col[1], col[2], hsv, hsv+1, hsv+2);
- if(event->type==WHEELDOWNMOUSE)
+ if (event->type==WHEELDOWNMOUSE)
hsv[2]= CLAMPIS(hsv[2]-0.05f, 0.0f, 1.0f);
else
hsv[2]= CLAMPIS(hsv[2]+0.05f, 0.0f, 1.0f);
@@ -2955,21 +2961,21 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, wm
}
}
}
- else if(data->state == BUTTON_STATE_WAIT_DRAG) {
+ else if (data->state == BUTTON_STATE_WAIT_DRAG) {
/* this function also ends state */
- if(ui_but_start_drag(C, but, data, event)) {
+ if (ui_but_start_drag(C, but, data, event)) {
return WM_UI_HANDLER_BREAK;
}
/* outside icon quit, not needed if drag activated */
- if(0==ui_but_mouse_inside_icon(but, data->region, event)) {
+ if (0==ui_but_mouse_inside_icon(but, data->region, event)) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
data->cancel= 1;
return WM_UI_HANDLER_BREAK;
}
- if(event->type==LEFTMOUSE && event->val==KM_RELEASE) {
+ if (event->type==LEFTMOUSE && event->val==KM_RELEASE) {
button_activate_state(C, but, BUTTON_STATE_MENU_OPEN);
return WM_UI_HANDLER_BREAK;
}
@@ -2994,11 +3000,11 @@ static int ui_numedit_but_NORMAL(uiBut *but, uiHandleButtonData *data, int mx, i
rad= (but->x2 - but->x1);
radsq= rad*rad;
- if(fp[2]>0.0f) {
+ if (fp[2]>0.0f) {
mdx= (rad*fp[0]);
mdy= (rad*fp[1]);
}
- else if(fp[2]> -1.0f) {
+ else if (fp[2]> -1.0f) {
mrad= rad/sqrtf(fp[0]*fp[0] + fp[1]*fp[1]);
mdx= 2.0f*mrad*fp[0] - (rad*fp[0]);
@@ -3011,7 +3017,7 @@ static int ui_numedit_but_NORMAL(uiBut *but, uiHandleButtonData *data, int mx, i
fp= data->vec;
mrad= dx*dx+dy*dy;
- if(mrad < radsq) { /* inner circle */
+ if (mrad < radsq) { /* inner circle */
fp[0]= dx;
fp[1]= dy;
fp[2]= sqrt( radsq-dx*dx-dy*dy );
@@ -3024,7 +3030,7 @@ static int ui_numedit_but_NORMAL(uiBut *but, uiHandleButtonData *data, int mx, i
dy*= (2.0f*mrad - 1.0f);
mrad= dx*dx+dy*dy;
- if(mrad < radsq) {
+ if (mrad < radsq) {
fp[0]= dx;
fp[1]= dy;
fp[2]= -sqrt( radsq-dx*dx-dy*dy );
@@ -3046,8 +3052,8 @@ static int ui_do_but_NORMAL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
my= event->y;
ui_window_to_block(data->region, block, &mx, &my);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(event->type==LEFTMOUSE && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (event->type==LEFTMOUSE && event->val==KM_PRESS) {
data->dragstartx= mx;
data->dragstarty= my;
data->draglastx= mx;
@@ -3055,20 +3061,20 @@ static int ui_do_but_NORMAL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
/* also do drag the first time */
- if(ui_numedit_but_NORMAL(but, data, mx, my))
+ if (ui_numedit_but_NORMAL(but, data, mx, my))
ui_numedit_apply(C, block, but, data);
return WM_UI_HANDLER_BREAK;
}
}
- else if(data->state == BUTTON_STATE_NUM_EDITING) {
- if(event->type == MOUSEMOVE) {
- if(mx!=data->draglastx || my!=data->draglasty) {
- if(ui_numedit_but_NORMAL(but, data, mx, my))
+ else if (data->state == BUTTON_STATE_NUM_EDITING) {
+ if (event->type == MOUSEMOVE) {
+ if (mx!=data->draglastx || my!=data->draglasty) {
+ if (ui_numedit_but_NORMAL(but, data, mx, my))
ui_numedit_apply(C, block, but, data);
}
}
- else if(event->type==LEFTMOUSE && event->val!=KM_PRESS)
+ else if (event->type==LEFTMOUSE && event->val!=KM_PRESS)
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
@@ -3212,8 +3218,8 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
my= event->y;
ui_window_to_block(data->region, block, &mx, &my);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(event->type==LEFTMOUSE && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (event->type==LEFTMOUSE && event->val==KM_PRESS) {
data->dragstartx= mx;
data->dragstarty= my;
data->draglastx= mx;
@@ -3221,7 +3227,7 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
/* also do drag the first time */
- if(ui_numedit_but_HSVCUBE(but, data, mx, my))
+ if (ui_numedit_but_HSVCUBE(but, data, mx, my))
ui_numedit_apply(C, block, but, data);
return WM_UI_HANDLER_BREAK;
@@ -3237,8 +3243,8 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
return WM_UI_HANDLER_BREAK;
}
/* XXX hardcoded keymap check.... */
- else if (event->type == DELKEY && event->val == KM_PRESS) {
- if (but->a1==UI_GRAD_V_ALT){
+ else if (event->type == BACKSPACEKEY && event->val == KM_PRESS) {
+ if (but->a1==UI_GRAD_V_ALT) {
int len;
/* reset only value */
@@ -3267,19 +3273,19 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
}
}
}
- else if(data->state == BUTTON_STATE_NUM_EDITING) {
- if(event->type == ESCKEY) {
+ else if (data->state == BUTTON_STATE_NUM_EDITING) {
+ if (event->type == ESCKEY) {
data->cancel= 1;
data->escapecancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
- else if(event->type == MOUSEMOVE) {
- if(mx!=data->draglastx || my!=data->draglasty) {
- if(ui_numedit_but_HSVCUBE(but, data, mx, my))
+ else if (event->type == MOUSEMOVE) {
+ if (mx!=data->draglastx || my!=data->draglasty) {
+ if (ui_numedit_but_HSVCUBE(but, data, mx, my))
ui_numedit_apply(C, block, but, data);
}
}
- else if(event->type==LEFTMOUSE && event->val!=KM_PRESS)
+ else if (event->type==LEFTMOUSE && event->val!=KM_PRESS)
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
@@ -3295,8 +3301,8 @@ static int ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, int mx
float rgb[3];
float hsv[3];
- rect.xmin= but->x1; rect.xmax= but->x2;
- rect.ymin= but->y1; rect.ymax= but->y2;
+ rect.xmin = but->x1; rect.xmax = but->x2;
+ rect.ymin = but->y1; rect.ymax = but->y2;
ui_get_but_vectorf(but, rgb);
copy_v3_v3(hsv, ui_block_hsv_get(but->block));
@@ -3308,7 +3314,7 @@ static int ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, int mx
if (hsv[2] == 0.f) hsv[2] = 0.0001f;
}
- if(U.uiflag & USER_CONTINUOUS_MOUSE) {
+ if (U.uiflag & USER_CONTINUOUS_MOUSE) {
float fac= shift ? 0.05f : 1.0f;
/* slow down the mouse, this is fairly picky */
mx = (data->dragstartx*(1.0f-fac) + mx*fac);
@@ -3317,12 +3323,12 @@ static int ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, int mx
ui_hsvcircle_vals_from_pos(hsv, hsv+1, &rect, (float)mx, (float)my);
- if(but->flag & UI_BUT_COLOR_CUBIC)
+ if (but->flag & UI_BUT_COLOR_CUBIC)
hsv[1]= 1.0f - sqrt3f(1.0f - hsv[1]);
hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb+1, rgb+2);
- if((but->flag & UI_BUT_VEC_SIZE_LOCK) && (rgb[0] || rgb[1] || rgb[2])) {
+ if ((but->flag & UI_BUT_VEC_SIZE_LOCK) && (rgb[0] || rgb[1] || rgb[2])) {
normalize_v3(rgb);
mul_v3_fl(rgb, but->a2);
}
@@ -3379,7 +3385,7 @@ static void ui_ndofedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, wmND
hsv_to_rgb(hsv[0], hsv[1], hsv[2], data->vec, data->vec+1, data->vec+2);
- if((but->flag & UI_BUT_VEC_SIZE_LOCK) && (data->vec[0] || data->vec[1] || data->vec[2])) {
+ if ((but->flag & UI_BUT_VEC_SIZE_LOCK) && (data->vec[0] || data->vec[1] || data->vec[2])) {
normalize_v3(data->vec);
mul_v3_fl(data->vec, but->a2);
}
@@ -3395,8 +3401,8 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle
my= event->y;
ui_window_to_block(data->region, block, &mx, &my);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(event->type==LEFTMOUSE && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (event->type==LEFTMOUSE && event->val==KM_PRESS) {
data->dragstartx= mx;
data->dragstarty= my;
data->draglastx= mx;
@@ -3404,7 +3410,7 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
/* also do drag the first time */
- if(ui_numedit_but_HSVCIRCLE(but, data, mx, my, event->shift))
+ if (ui_numedit_but_HSVCIRCLE(but, data, mx, my, event->shift))
ui_numedit_apply(C, block, but, data);
return WM_UI_HANDLER_BREAK;
@@ -3420,7 +3426,7 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle
return WM_UI_HANDLER_BREAK;
}
/* XXX hardcoded keymap check.... */
- else if (event->type == DELKEY && event->val == KM_PRESS) {
+ else if (event->type == BACKSPACEKEY && event->val == KM_PRESS) {
int len;
/* reset only saturation */
@@ -3448,32 +3454,32 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle
return WM_UI_HANDLER_BREAK;
}
}
- else if(data->state == BUTTON_STATE_NUM_EDITING) {
- if(event->type == ESCKEY) {
+ else if (data->state == BUTTON_STATE_NUM_EDITING) {
+ if (event->type == ESCKEY) {
data->cancel= 1;
data->escapecancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
/* XXX hardcoded keymap check.... */
- else if(event->type == WHEELDOWNMOUSE) {
+ else if (event->type == WHEELDOWNMOUSE) {
float *hsv= ui_block_hsv_get(but->block);
hsv[2]= CLAMPIS(hsv[2]-0.05f, 0.0f, 1.0f);
ui_set_but_hsv(but); // converts to rgb
ui_numedit_apply(C, block, but, data);
}
- else if(event->type == WHEELUPMOUSE) {
+ else if (event->type == WHEELUPMOUSE) {
float *hsv= ui_block_hsv_get(but->block);
hsv[2]= CLAMPIS(hsv[2]+0.05f, 0.0f, 1.0f);
ui_set_but_hsv(but); // converts to rgb
ui_numedit_apply(C, block, but, data);
}
- else if(event->type == MOUSEMOVE) {
- if(mx!=data->draglastx || my!=data->draglasty) {
- if(ui_numedit_but_HSVCIRCLE(but, data, mx, my, event->shift))
+ else if (event->type == MOUSEMOVE) {
+ if (mx!=data->draglastx || my!=data->draglasty) {
+ if (ui_numedit_but_HSVCIRCLE(but, data, mx, my, event->shift))
ui_numedit_apply(C, block, but, data);
}
}
- else if(event->type==LEFTMOUSE && event->val!=KM_PRESS) {
+ else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
return WM_UI_HANDLER_BREAK;
@@ -3488,7 +3494,7 @@ static int ui_numedit_but_COLORBAND(uiBut *but, uiHandleButtonData *data, int mx
float dx;
int changed= 0;
- if(data->draglastx == mx)
+ if (data->draglastx == mx)
return changed;
dx= ((float)(mx - data->draglastx))/(but->x2-but->x1);
@@ -3514,11 +3520,11 @@ static int ui_do_but_COLORBAND(bContext *C, uiBlock *block, uiBut *but, uiHandle
my= event->y;
ui_window_to_block(data->region, block, &mx, &my);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(event->type==LEFTMOUSE && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (event->type==LEFTMOUSE && event->val==KM_PRESS) {
coba= (ColorBand*)but->poin;
- if(event->ctrl) {
+ if (event->ctrl) {
/* insert new key on mouse location */
float pos= ((float)(mx - but->x1))/(but->x2-but->x1);
colorband_element_add(coba, pos);
@@ -3531,11 +3537,11 @@ static int ui_do_but_COLORBAND(bContext *C, uiBlock *block, uiBut *but, uiHandle
data->draglasty= my;
/* activate new key when mouse is close */
- for(a=0, cbd= coba->data; a<coba->tot; a++, cbd++) {
+ for (a=0, cbd= coba->data; a<coba->tot; a++, cbd++) {
xco= but->x1 + (cbd->pos*(but->x2-but->x1));
xco= ABS(xco-mx);
- if(a==coba->cur) xco+= 5; // selected one disadvantage
- if(xco<mindist) {
+ if (a==coba->cur) xco+= 5; // selected one disadvantage
+ if (xco<mindist) {
coba->cur= a;
mindist= xco;
}
@@ -3548,14 +3554,14 @@ static int ui_do_but_COLORBAND(bContext *C, uiBlock *block, uiBut *but, uiHandle
return WM_UI_HANDLER_BREAK;
}
}
- else if(data->state == BUTTON_STATE_NUM_EDITING) {
- if(event->type == MOUSEMOVE) {
- if(mx!=data->draglastx || my!=data->draglasty) {
- if(ui_numedit_but_COLORBAND(but, data, mx))
+ else if (data->state == BUTTON_STATE_NUM_EDITING) {
+ if (event->type == MOUSEMOVE) {
+ if (mx!=data->draglastx || my!=data->draglasty) {
+ if (ui_numedit_but_COLORBAND(but, data, mx))
ui_numedit_apply(C, block, but, data);
}
}
- else if(event->type==LEFTMOUSE && event->val!=KM_PRESS)
+ else if (event->type==LEFTMOUSE && event->val!=KM_PRESS)
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
@@ -3577,38 +3583,38 @@ static int ui_numedit_but_CURVE(uiBut *but, uiHandleButtonData *data, int snap,
/* offsx= cumap->curr.xmin; */
/* offsy= cumap->curr.ymin; */
- if(snap) {
+ if (snap) {
float d[2];
d[0]= mx - data->dragstartx;
d[1]= my - data->dragstarty;
- if(len_v2(d) < 3.0f)
+ if (len_v2(d) < 3.0f)
snap= 0;
}
- if(data->dragsel != -1) {
+ if (data->dragsel != -1) {
int moved_point= 0; /* for ctrl grid, can't use orig coords because of sorting */
fx= (mx-data->draglastx)/zoomx;
fy= (my-data->draglasty)/zoomy;
- for(a=0; a<cuma->totpoint; a++) {
- if(cmp[a].flag & SELECT) {
+ for (a=0; a<cuma->totpoint; a++) {
+ if (cmp[a].flag & SELECT) {
float origx= cmp[a].x, origy= cmp[a].y;
cmp[a].x+= fx;
cmp[a].y+= fy;
- if(snap) {
+ if (snap) {
cmp[a].x= 0.125f*floorf(0.5f + 8.0f*cmp[a].x);
cmp[a].y= 0.125f*floorf(0.5f + 8.0f*cmp[a].y);
}
- if(cmp[a].x!=origx || cmp[a].y!=origy)
+ if (cmp[a].x!=origx || cmp[a].y!=origy)
moved_point= 1;
}
}
curvemapping_changed(cumap, 0); /* no remove doubles */
- if(moved_point) {
+ if (moved_point) {
data->draglastx= mx;
data->draglasty= my;
changed= 1;
@@ -3621,14 +3627,14 @@ static int ui_numedit_but_CURVE(uiBut *but, uiHandleButtonData *data, int snap,
fy= (my-data->draglasty)/zoomy;
/* clamp for clip */
- if(cumap->flag & CUMA_DO_CLIP) {
- if(cumap->curr.xmin-fx < cumap->clipr.xmin)
+ if (cumap->flag & CUMA_DO_CLIP) {
+ if (cumap->curr.xmin-fx < cumap->clipr.xmin)
fx= cumap->curr.xmin - cumap->clipr.xmin;
- else if(cumap->curr.xmax-fx > cumap->clipr.xmax)
+ else if (cumap->curr.xmax-fx > cumap->clipr.xmax)
fx= cumap->curr.xmax - cumap->clipr.xmax;
- if(cumap->curr.ymin-fy < cumap->clipr.ymin)
+ if (cumap->curr.ymin-fy < cumap->clipr.ymin)
fy= cumap->curr.ymin - cumap->clipr.ymin;
- else if(cumap->curr.ymax-fy > cumap->clipr.ymax)
+ else if (cumap->curr.ymax-fy > cumap->clipr.ymax)
fy= cumap->curr.ymax - cumap->clipr.ymax;
}
@@ -3654,8 +3660,8 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt
my= event->y;
ui_window_to_block(data->region, block, &mx, &my);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(event->type==LEFTMOUSE && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (event->type==LEFTMOUSE && event->val==KM_PRESS) {
CurveMapping *cumap= (CurveMapping*)but->poin;
CurveMap *cuma= cumap->cm+cumap->cur;
CurveMapPoint *cmp;
@@ -3668,7 +3674,7 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt
offsx= cumap->curr.xmin;
offsy= cumap->curr.ymin;
- if(event->ctrl) {
+ if (event->ctrl) {
fx= ((float)my - but->x1)/zoomx + offsx;
fy= ((float)my - but->y1)/zoomy + offsy;
@@ -3679,11 +3685,11 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt
/* check for selecting of a point */
cmp= cuma->curve; /* ctrl adds point, new malloc */
- for(a=0; a<cuma->totpoint; a++) {
+ for (a=0; a<cuma->totpoint; a++) {
fx= but->x1 + zoomx*(cmp[a].x-offsx);
fy= but->y1 + zoomy*(cmp[a].y-offsy);
dist= (fx-mx)*(fx-mx) + (fy-my)*(fy-my);
- if(dist < mindist) {
+ if (dist < mindist) {
sel= a;
mindist= dist;
}
@@ -3701,7 +3707,7 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt
/* loop through the curve segment table and find what's near the mouse.
* 0.05 is kinda arbitrary, but seems to be what works nicely. */
- for(i=0; i<=CM_TABLE; i++) {
+ for (i=0; i<=CM_TABLE; i++) {
if ( (fabsf(fx - cmp[i].x) < 0.05f) &&
(fabsf(fy - cmp[i].y) < 0.05f))
{
@@ -3715,8 +3721,8 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt
cmp= cuma->curve;
/* find newly added point and make it 'sel' */
- for(a=0; a<cuma->totpoint; a++)
- if(cmp[a].x == fx)
+ for (a=0; a<cuma->totpoint; a++)
+ if (cmp[a].x == fx)
sel = a;
break;
@@ -3724,11 +3730,11 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt
}
}
- if(sel!= -1) {
+ if (sel!= -1) {
/* ok, we move a point */
/* deselect all if this one is deselect. except if we hold shift */
- if(event->shift == FALSE) {
- for(a=0; a<cuma->totpoint; a++)
+ if (event->shift == FALSE) {
+ for (a=0; a<cuma->totpoint; a++)
cmp[a].flag &= ~SELECT;
cmp[sel].flag |= SELECT;
}
@@ -3751,23 +3757,23 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt
return WM_UI_HANDLER_BREAK;
}
}
- else if(data->state == BUTTON_STATE_NUM_EDITING) {
- if(event->type == MOUSEMOVE) {
- if(mx!=data->draglastx || my!=data->draglasty) {
- if(ui_numedit_but_CURVE(but, data, event->ctrl, mx, my))
+ else if (data->state == BUTTON_STATE_NUM_EDITING) {
+ if (event->type == MOUSEMOVE) {
+ if (mx!=data->draglastx || my!=data->draglasty) {
+ if (ui_numedit_but_CURVE(but, data, event->ctrl, mx, my))
ui_numedit_apply(C, block, but, data);
}
}
- else if(event->type==LEFTMOUSE && event->val!=KM_PRESS) {
- if(data->dragsel != -1) {
+ else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) {
+ if (data->dragsel != -1) {
CurveMapping *cumap= (CurveMapping*)but->poin;
CurveMap *cuma= cumap->cm+cumap->cur;
CurveMapPoint *cmp= cuma->curve;
- if(!data->dragchange) {
+ if (!data->dragchange) {
/* deselect all, select one */
- if(event->shift == FALSE) {
- for(a=0; a<cuma->totpoint; a++)
+ if (event->shift == FALSE) {
+ for (a=0; a<cuma->totpoint; a++)
cmp[a].flag &= ~SELECT;
cmp[data->dragsel].flag |= SELECT;
}
@@ -3801,8 +3807,8 @@ static int ui_numedit_but_HISTOGRAM(uiBut *but, uiHandleButtonData *data, int mx
int changed= 1;
float /* dx, */ dy, yfac=1.f; /* UNUSED */
- /* rect.xmin= but->x1; rect.xmax= but->x2; */
- /* rect.ymin= but->y1; rect.ymax= but->y2; */
+ /* rect.xmin = but->x1; rect.xmax = but->x2; */
+ /* rect.ymin = but->y1; rect.ymax = but->y2; */
/* dx = mx - data->draglastx; */ /* UNUSED */
dy = my - data->draglasty;
@@ -3811,7 +3817,8 @@ static int ui_numedit_but_HISTOGRAM(uiBut *but, uiHandleButtonData *data, int mx
if (in_scope_resize_zone(but, data->dragstartx, data->dragstarty)) {
/* resize histogram widget itself */
hist->height = (but->y2 - but->y1) + (data->dragstarty - my);
- } else {
+ }
+ else {
/* scale histogram values */
yfac = MIN2(powf(hist->ymax, 2.f), 1.f) * 0.5f;
hist->ymax += dy * yfac;
@@ -3833,8 +3840,8 @@ static int ui_do_but_HISTOGRAM(bContext *C, uiBlock *block, uiBut *but, uiHandle
my= event->y;
ui_window_to_block(data->region, block, &mx, &my);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(event->type==LEFTMOUSE && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (event->type==LEFTMOUSE && event->val==KM_PRESS) {
data->dragstartx= mx;
data->dragstarty= my;
data->draglastx= mx;
@@ -3842,13 +3849,13 @@ static int ui_do_but_HISTOGRAM(bContext *C, uiBlock *block, uiBut *but, uiHandle
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
/* also do drag the first time */
- if(ui_numedit_but_HISTOGRAM(but, data, mx, my))
+ if (ui_numedit_but_HISTOGRAM(but, data, mx, my))
ui_numedit_apply(C, block, but, data);
return WM_UI_HANDLER_BREAK;
}
/* XXX hardcoded keymap check.... */
- else if (event->type == DELKEY && event->val == KM_PRESS) {
+ else if (event->type == BACKSPACEKEY && event->val == KM_PRESS) {
Histogram *hist = (Histogram *)but->poin;
hist->ymax = 1.f;
@@ -3856,19 +3863,19 @@ static int ui_do_but_HISTOGRAM(bContext *C, uiBlock *block, uiBut *but, uiHandle
return WM_UI_HANDLER_BREAK;
}
}
- else if(data->state == BUTTON_STATE_NUM_EDITING) {
- if(event->type == ESCKEY) {
+ else if (data->state == BUTTON_STATE_NUM_EDITING) {
+ if (event->type == ESCKEY) {
data->cancel= 1;
data->escapecancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
- else if(event->type == MOUSEMOVE) {
- if(mx!=data->draglastx || my!=data->draglasty) {
- if(ui_numedit_but_HISTOGRAM(but, data, mx, my))
+ else if (event->type == MOUSEMOVE) {
+ if (mx!=data->draglastx || my!=data->draglasty) {
+ if (ui_numedit_but_HISTOGRAM(but, data, mx, my))
ui_numedit_apply(C, block, but, data);
}
}
- else if(event->type==LEFTMOUSE && event->val!=KM_PRESS) {
+ else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
return WM_UI_HANDLER_BREAK;
@@ -3884,8 +3891,8 @@ static int ui_numedit_but_WAVEFORM(uiBut *but, uiHandleButtonData *data, int mx,
int changed= 1;
float /* dx, */ dy /* , yfac=1.f */; /* UNUSED */
- /* rect.xmin= but->x1; rect.xmax= but->x2; */
- /* rect.ymin= but->y1; rect.ymax= but->y2; */
+ /* rect.xmin = but->x1; rect.xmax = but->x2; */
+ /* rect.ymin = but->y1; rect.ymax = but->y2; */
/* dx = mx - data->draglastx; */ /* UNUSED */
dy = my - data->draglasty;
@@ -3894,7 +3901,8 @@ static int ui_numedit_but_WAVEFORM(uiBut *but, uiHandleButtonData *data, int mx,
if (in_scope_resize_zone(but, data->dragstartx, data->dragstarty)) {
/* resize waveform widget itself */
scopes->wavefrm_height = (but->y2 - but->y1) + (data->dragstarty - my);
- } else {
+ }
+ else {
/* scale waveform values */
/* yfac = scopes->wavefrm_yfac; */ /* UNUSED */
scopes->wavefrm_yfac += dy/200.0f;
@@ -3916,8 +3924,8 @@ static int ui_do_but_WAVEFORM(bContext *C, uiBlock *block, uiBut *but, uiHandleB
my= event->y;
ui_window_to_block(data->region, block, &mx, &my);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(event->type==LEFTMOUSE && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (event->type==LEFTMOUSE && event->val==KM_PRESS) {
data->dragstartx= mx;
data->dragstarty= my;
data->draglastx= mx;
@@ -3925,13 +3933,13 @@ static int ui_do_but_WAVEFORM(bContext *C, uiBlock *block, uiBut *but, uiHandleB
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
/* also do drag the first time */
- if(ui_numedit_but_WAVEFORM(but, data, mx, my))
+ if (ui_numedit_but_WAVEFORM(but, data, mx, my))
ui_numedit_apply(C, block, but, data);
return WM_UI_HANDLER_BREAK;
}
/* XXX hardcoded keymap check.... */
- else if (event->type == DELKEY && event->val == KM_PRESS) {
+ else if (event->type == BACKSPACEKEY && event->val == KM_PRESS) {
Scopes *scopes = (Scopes *)but->poin;
scopes->wavefrm_yfac = 1.f;
@@ -3939,19 +3947,19 @@ static int ui_do_but_WAVEFORM(bContext *C, uiBlock *block, uiBut *but, uiHandleB
return WM_UI_HANDLER_BREAK;
}
}
- else if(data->state == BUTTON_STATE_NUM_EDITING) {
- if(event->type == ESCKEY) {
+ else if (data->state == BUTTON_STATE_NUM_EDITING) {
+ if (event->type == ESCKEY) {
data->cancel= 1;
data->escapecancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
- else if(event->type == MOUSEMOVE) {
- if(mx!=data->draglastx || my!=data->draglasty) {
- if(ui_numedit_but_WAVEFORM(but, data, mx, my))
+ else if (event->type == MOUSEMOVE) {
+ if (mx!=data->draglastx || my!=data->draglasty) {
+ if (ui_numedit_but_WAVEFORM(but, data, mx, my))
ui_numedit_apply(C, block, but, data);
}
}
- else if(event->type==LEFTMOUSE && event->val!=KM_PRESS) {
+ else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
return WM_UI_HANDLER_BREAK;
@@ -3967,8 +3975,8 @@ static int ui_numedit_but_VECTORSCOPE(uiBut *but, uiHandleButtonData *data, int
int changed= 1;
/* float dx, dy; */
- /* rect.xmin= but->x1; rect.xmax= but->x2; */
- /* rect.ymin= but->y1; rect.ymax= but->y2; */
+ /* rect.xmin = but->x1; rect.xmax = but->x2; */
+ /* rect.ymin = but->y1; rect.ymax = but->y2; */
/* dx = mx - data->draglastx; */
/* dy = my - data->draglasty; */
@@ -3992,8 +4000,8 @@ static int ui_do_but_VECTORSCOPE(bContext *C, uiBlock *block, uiBut *but, uiHand
my= event->y;
ui_window_to_block(data->region, block, &mx, &my);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(event->type==LEFTMOUSE && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (event->type==LEFTMOUSE && event->val==KM_PRESS) {
data->dragstartx= mx;
data->dragstarty= my;
data->draglastx= mx;
@@ -4001,25 +4009,25 @@ static int ui_do_but_VECTORSCOPE(bContext *C, uiBlock *block, uiBut *but, uiHand
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
/* also do drag the first time */
- if(ui_numedit_but_VECTORSCOPE(but, data, mx, my))
+ if (ui_numedit_but_VECTORSCOPE(but, data, mx, my))
ui_numedit_apply(C, block, but, data);
return WM_UI_HANDLER_BREAK;
}
}
- else if(data->state == BUTTON_STATE_NUM_EDITING) {
- if(event->type == ESCKEY) {
+ else if (data->state == BUTTON_STATE_NUM_EDITING) {
+ if (event->type == ESCKEY) {
data->cancel= 1;
data->escapecancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
- else if(event->type == MOUSEMOVE) {
- if(mx!=data->draglastx || my!=data->draglasty) {
- if(ui_numedit_but_VECTORSCOPE(but, data, mx, my))
+ else if (event->type == MOUSEMOVE) {
+ if (mx!=data->draglastx || my!=data->draglasty) {
+ if (ui_numedit_but_VECTORSCOPE(but, data, mx, my))
ui_numedit_apply(C, block, but, data);
}
}
- else if(event->type==LEFTMOUSE && event->val!=KM_PRESS) {
+ else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
return WM_UI_HANDLER_BREAK;
@@ -4042,8 +4050,8 @@ static int ui_do_but_CHARTAB(bContext *UNUSED(C), uiBlock *UNUSED(block), uiBut
my= event->y;
ui_window_to_block(data->region, block, &mx, &my);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
/* Calculate the size of the button */
width = abs(but->x2 - but->x1);
height = abs(but->y2 - but->y1);
@@ -4065,30 +4073,30 @@ static int ui_do_but_CHARTAB(bContext *UNUSED(C), uiBlock *UNUSED(block), uiBut
che = cs + (y*12) + x;
- if(che > G.charmax)
+ if (che > G.charmax)
che = 0;
- if(G.obedit) {
+ if (G.obedit) {
do_textedit(0,0,che);
}
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
}
- else if(ELEM(event->type, WHEELUPMOUSE, PAGEUPKEY)) {
- for(but= block->buttons.first; but; but= but->next) {
- if(but->type == CHARTAB) {
+ else if (ELEM(event->type, WHEELUPMOUSE, PAGEUPKEY)) {
+ for (but= block->buttons.first; but; but= but->next) {
+ if (but->type == CHARTAB) {
G.charstart = G.charstart - (12*6);
- if(G.charstart < 0)
+ if (G.charstart < 0)
G.charstart = 0;
- if(G.charstart < G.charmin)
+ if (G.charstart < G.charmin)
G.charstart = G.charmin;
ui_draw_but(but);
//Really nasty... to update the num button from the same butblock
- for(bt= block->buttons.first; bt; bt= bt->next)
+ for (bt= block->buttons.first; bt; bt= bt->next)
{
- if(ELEM(bt->type, NUM, NUMABS)) {
+ if (ELEM(bt->type, NUM, NUMABS)) {
ui_check_but(bt);
ui_draw_but(bt);
}
@@ -4100,19 +4108,19 @@ static int ui_do_but_CHARTAB(bContext *UNUSED(C), uiBlock *UNUSED(block), uiBut
return WM_UI_HANDLER_BREAK;
}
- else if(ELEM(event->type, WHEELDOWNMOUSE, PAGEDOWNKEY)) {
- for(but= block->buttons.first; but; but= but->next) {
- if(but->type == CHARTAB) {
+ else if (ELEM(event->type, WHEELDOWNMOUSE, PAGEDOWNKEY)) {
+ for (but= block->buttons.first; but; but= but->next) {
+ if (but->type == CHARTAB) {
G.charstart = G.charstart + (12*6);
- if(G.charstart > (0xffff - 12*6))
+ if (G.charstart > (0xffff - 12*6))
G.charstart = 0xffff - (12*6);
- if(G.charstart > G.charmax - 12*6)
+ if (G.charstart > G.charmax - 12*6)
G.charstart = G.charmax - 12*6;
ui_draw_but(but);
- for(bt= block->buttons.first; bt; bt= bt->next)
+ for (bt= block->buttons.first; bt; bt= bt->next)
{
- if(ELEM(bt->type, NUM, NUMABS)) {
+ if (ELEM(bt->type, NUM, NUMABS)) {
ui_check_but(bt);
ui_draw_but(bt);
}
@@ -4138,20 +4146,20 @@ static int ui_do_but_LINK(bContext *C, uiBut *but, uiHandleButtonData *data, wmE
{
VECCOPY2D(but->linkto, event->mval);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(event->type == LEFTMOUSE && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (event->type == LEFTMOUSE && event->val==KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_WAIT_RELEASE);
return WM_UI_HANDLER_BREAK;
}
- else if(event->type == LEFTMOUSE && but->block->handle) {
+ else if (event->type == LEFTMOUSE && but->block->handle) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
}
}
- else if(data->state == BUTTON_STATE_WAIT_RELEASE) {
+ else if (data->state == BUTTON_STATE_WAIT_RELEASE) {
- if(event->type == LEFTMOUSE && event->val!=KM_PRESS) {
- if(!(but->flag & UI_SELECT))
+ if (event->type == LEFTMOUSE && event->val!=KM_PRESS) {
+ if (!(but->flag & UI_SELECT))
data->cancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
@@ -4170,7 +4178,7 @@ static int ui_numedit_but_TRACKPREVIEW(bContext *C, uiBut *but, uiHandleButtonDa
dx = mx - data->draglastx;
dy = my - data->draglasty;
- if(shift) {
+ if (shift) {
dx /= 5.0f;
dy /= 5.0f;
}
@@ -4178,9 +4186,10 @@ static int ui_numedit_but_TRACKPREVIEW(bContext *C, uiBut *but, uiHandleButtonDa
if (in_scope_resize_zone(but, data->dragstartx, data->dragstarty)) {
/* resize preview widget itself */
scopes->track_preview_height = (but->y2 - but->y1) + (data->dragstarty - my);
- } else {
- if(scopes->marker) {
- if(scopes->marker->framenr!=scopes->framenr)
+ }
+ else {
+ if (scopes->marker) {
+ if (scopes->marker->framenr!=scopes->framenr)
scopes->marker= BKE_tracking_ensure_marker(scopes->track, scopes->framenr);
scopes->marker->flag&= ~(MARKER_DISABLED|MARKER_TRACKED);
@@ -4207,8 +4216,8 @@ static int ui_do_but_TRACKPREVIEW(bContext *C, uiBlock *block, uiBut *but, uiHan
my= event->y;
ui_window_to_block(data->region, block, &mx, &my);
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
- if(event->type==LEFTMOUSE && event->val==KM_PRESS) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (event->type==LEFTMOUSE && event->val==KM_PRESS) {
data->dragstartx= mx;
data->dragstarty= my;
data->draglastx= mx;
@@ -4216,25 +4225,25 @@ static int ui_do_but_TRACKPREVIEW(bContext *C, uiBlock *block, uiBut *but, uiHan
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
/* also do drag the first time */
- if(ui_numedit_but_TRACKPREVIEW(C, but, data, mx, my, event->shift))
+ if (ui_numedit_but_TRACKPREVIEW(C, but, data, mx, my, event->shift))
ui_numedit_apply(C, block, but, data);
return WM_UI_HANDLER_BREAK;
}
}
- else if(data->state == BUTTON_STATE_NUM_EDITING) {
- if(event->type == ESCKEY) {
+ else if (data->state == BUTTON_STATE_NUM_EDITING) {
+ if (event->type == ESCKEY) {
data->cancel= 1;
data->escapecancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
- else if(event->type == MOUSEMOVE) {
- if(mx!=data->draglastx || my!=data->draglasty) {
- if(ui_numedit_but_TRACKPREVIEW(C, but, data, mx, my, event->shift))
+ else if (event->type == MOUSEMOVE) {
+ if (mx!=data->draglastx || my!=data->draglasty) {
+ if (ui_numedit_but_TRACKPREVIEW(C, but, data, mx, my, event->shift))
ui_numedit_apply(C, block, but, data);
}
}
- else if(event->type==LEFTMOUSE && event->val!=KM_PRESS) {
+ else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
return WM_UI_HANDLER_BREAK;
@@ -4253,7 +4262,7 @@ static void but_shortcut_name_func(bContext *C, void *arg1, int UNUSED(event))
IDProperty *prop= (but->opptr)? but->opptr->data: NULL;
/* complex code to change name of button */
- if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE,
+ if (WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE,
shortcut_str, sizeof(shortcut_str)))
{
ui_but_add_shortcut(but, shortcut_str, TRUE);
@@ -4316,7 +4325,7 @@ static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg)
kmi_id = kmi->id;
/* copy properties, prop can be NULL for reset */
- if(prop)
+ if (prop)
prop= IDP_CopyProperty(prop);
WM_keymap_properties_reset(kmi, prop);
@@ -4379,12 +4388,12 @@ static int ui_but_menu(bContext *C, uiBut *but)
int length;
const char *name;
- if((but->rnapoin.data && but->rnaprop)==0 && but->optype==NULL)
+ if ((but->rnapoin.data && but->rnaprop)==0 && but->optype==NULL)
return 0;
button_timers_tooltip_remove(C, but);
- if(but->rnaprop)
+ if (but->rnaprop)
name= RNA_property_ui_name(but->rnaprop);
else if (but->optype)
name= but->optype->name;
@@ -4396,19 +4405,19 @@ static int ui_but_menu(bContext *C, uiBut *but)
uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_DEFAULT);
- if(but->rnapoin.data && but->rnaprop) {
+ if (but->rnapoin.data && but->rnaprop) {
short is_anim= RNA_property_animateable(&but->rnapoin, but->rnaprop);
/* second slower test, saved people finding keyframe items in menus when its not possible */
- if(is_anim)
+ if (is_anim)
is_anim= RNA_property_path_from_ID_check(&but->rnapoin, but->rnaprop);
length= RNA_property_array_length(&but->rnapoin, but->rnaprop);
/* Keyframes */
- if(but->flag & UI_BUT_ANIMATED_KEY) {
+ if (but->flag & UI_BUT_ANIMATED_KEY) {
/* replace/delete keyfraemes */
- if(length) {
+ if (length) {
uiItemBooleanO(layout, "Replace Keyframes", ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1);
uiItemBooleanO(layout, "Replace Single Keyframe", ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 0);
uiItemBooleanO(layout, "Delete Keyframes", ICON_NONE, "ANIM_OT_keyframe_delete_button", "all", 1);
@@ -4424,9 +4433,9 @@ static int ui_but_menu(bContext *C, uiBut *but)
}
- else if(but->flag & UI_BUT_DRIVEN);
- else if(is_anim) {
- if(length) {
+ else if (but->flag & UI_BUT_DRIVEN);
+ else if (is_anim) {
+ if (length) {
uiItemBooleanO(layout, "Insert Keyframes", ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1);
uiItemBooleanO(layout, "Insert Single Keyframe", ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 0);
}
@@ -4435,10 +4444,10 @@ static int ui_but_menu(bContext *C, uiBut *but)
}
/* Drivers */
- if(but->flag & UI_BUT_DRIVEN) {
+ if (but->flag & UI_BUT_DRIVEN) {
uiItemS(layout);
- if(length) {
+ if (length) {
uiItemBooleanO(layout, "Delete Drivers", ICON_NONE, "ANIM_OT_driver_button_remove", "all", 1);
uiItemBooleanO(layout, "Delete Single Driver", ICON_NONE, "ANIM_OT_driver_button_remove", "all", 0);
}
@@ -4449,11 +4458,11 @@ static int ui_but_menu(bContext *C, uiBut *but)
if (ANIM_driver_can_paste())
uiItemO(layout, "Paste Driver", ICON_NONE, "ANIM_OT_paste_driver_button");
}
- else if(but->flag & (UI_BUT_ANIMATED_KEY|UI_BUT_ANIMATED));
- else if(is_anim) {
+ else if (but->flag & (UI_BUT_ANIMATED_KEY|UI_BUT_ANIMATED));
+ else if (is_anim) {
uiItemS(layout);
- if(length) {
+ if (length) {
uiItemBooleanO(layout, "Add Drivers", ICON_NONE, "ANIM_OT_driver_button_add", "all", 1);
uiItemBooleanO(layout, "Add Single Driver", ICON_NONE, "ANIM_OT_driver_button_add", "all", 0);
}
@@ -4466,10 +4475,10 @@ static int ui_but_menu(bContext *C, uiBut *but)
/* Keying Sets */
// TODO: check on modifyability of Keying Set when doing this
- if(is_anim) {
+ if (is_anim) {
uiItemS(layout);
- if(length) {
+ if (length) {
uiItemBooleanO(layout, "Add All to Keying Set", ICON_NONE, "ANIM_OT_keyingset_button_add", "all", 1);
uiItemBooleanO(layout, "Add Single to Keying Set", ICON_NONE, "ANIM_OT_keyingset_button_add", "all", 0);
uiItemO(layout, "Remove from Keying Set", ICON_NONE, "ANIM_OT_keyingset_button_remove");
@@ -4487,7 +4496,7 @@ static int ui_but_menu(bContext *C, uiBut *but)
//Copy Property Value
//Paste Property Value
- if(length) {
+ if (length) {
uiItemBooleanO(layout, "Reset All to Default Values", ICON_NONE, "UI_OT_reset_default_button", "all", 1);
uiItemBooleanO(layout, "Reset Single to Default Value", ICON_NONE, "UI_OT_reset_default_button", "all", 0);
}
@@ -4501,17 +4510,17 @@ static int ui_but_menu(bContext *C, uiBut *but)
}
/* Operator buttons */
- if(but->optype) {
+ if (but->optype) {
uiBlock *block = uiLayoutGetBlock(layout);
uiBut *but2;
IDProperty *prop= (but->opptr)? but->opptr->data: NULL;
int w = uiLayoutGetWidth(layout);
wmKeyMap *km;
- wmKeyMapItem *kmi= NULL;
+ wmKeyMapItem *kmi = NULL;
int kmi_id= WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, 1, &km);
if (kmi_id)
- kmi= WM_keymap_item_find_id(km, kmi_id);
+ kmi = WM_keymap_item_find_id(km, kmi_id);
/* keyboard shortcuts */
if ((kmi) && ISKEYBOARD(kmi->type)) {
@@ -4539,7 +4548,7 @@ static int ui_but_menu(bContext *C, uiBut *but)
char buf[512];
PointerRNA ptr_props;
- if(but->rnapoin.data && but->rnaprop) {
+ if (but->rnapoin.data && but->rnaprop) {
BLI_snprintf(buf, sizeof(buf), "%s.%s", RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop));
WM_operator_properties_create(&ptr_props, "WM_OT_doc_view");
@@ -4588,27 +4597,27 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
data= but->active;
retval= WM_UI_HANDLER_CONTINUE;
- if(but->flag & UI_BUT_DISABLED)
+ if (but->flag & UI_BUT_DISABLED)
return WM_UI_HANDLER_CONTINUE;
- if( (data->state == BUTTON_STATE_HIGHLIGHT) &&
+ if ( (data->state == BUTTON_STATE_HIGHLIGHT) &&
/* check prevval because of modal operators [#24016],
* modifier check is to allow Ctrl+C for copy.
* if this causes other problems, remove this check and suffer the bug :) - campbell */
((event->prevval != KM_PRESS) || (ISKEYMODIFIER(event->prevtype)) || (event->type == EVT_DROP))
) {
/* handle copy-paste */
- if(ELEM(event->type, CKEY, VKEY) && event->val==KM_PRESS && (event->ctrl || event->oskey)) {
+ if (ELEM(event->type, CKEY, VKEY) && event->val==KM_PRESS && (event->ctrl || event->oskey)) {
ui_but_copy_paste(C, but, data, (event->type == CKEY)? 'c': 'v');
return WM_UI_HANDLER_BREAK;
}
/* handle drop */
- else if(event->type == EVT_DROP) {
+ else if (event->type == EVT_DROP) {
ui_but_drop (C, event, but, data);
}
/* handle keyframing */
- else if(event->type == IKEY && !ELEM3(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift) && event->val == KM_PRESS) {
- if(event->alt)
+ else if (event->type == IKEY && !ELEM3(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift) && event->val == KM_PRESS) {
+ if (event->alt)
ui_but_anim_delete_keyframe(C);
else
ui_but_anim_insert_keyframe(C);
@@ -4618,8 +4627,8 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
return WM_UI_HANDLER_BREAK;
}
/* handle drivers */
- else if(event->type == DKEY && !ELEM3(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift) && event->val == KM_PRESS) {
- if(event->alt)
+ else if (event->type == DKEY && !ELEM3(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift) && event->val == KM_PRESS) {
+ if (event->alt)
ui_but_anim_remove_driver(C);
else
ui_but_anim_add_driver(C);
@@ -4629,8 +4638,8 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
return WM_UI_HANDLER_BREAK;
}
/* handle keyingsets */
- else if(event->type == KKEY && !ELEM3(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift) && event->val == KM_PRESS) {
- if(event->alt)
+ else if (event->type == KKEY && !ELEM3(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift) && event->val == KM_PRESS) {
+ if (event->alt)
ui_but_anim_remove_keyingset(C);
else
ui_but_anim_add_keyingset(C);
@@ -4641,13 +4650,13 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
}
/* reset to default */
/* XXX hardcoded keymap check.... */
- else if(event->type == BACKSPACEKEY && event->val == KM_PRESS) {
+ else if (event->type == BACKSPACEKEY && event->val == KM_PRESS) {
/* ctrl+backspace = reset active button; backspace = reset a whole array*/
if (!(ELEM3(but->type, HSVCIRCLE, HSVCUBE, HISTOGRAM)))
ui_set_but_default(C, !event->ctrl);
}
/* handle menu */
- else if(event->type == RIGHTMOUSE && event->val == KM_PRESS) {
+ else if (event->type == RIGHTMOUSE && event->val == KM_PRESS) {
/* RMB has two options now */
if (ui_but_menu(C, but)) {
return WM_UI_HANDLER_BREAK;
@@ -4656,16 +4665,16 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
}
/* verify if we can edit this button */
- if(ELEM(event->type, LEFTMOUSE, RETKEY)) {
+ if (ELEM(event->type, LEFTMOUSE, RETKEY)) {
/* this should become disabled button .. */
- if(but->lock) {
- if(but->lockstr) {
+ if (but->lock) {
+ if (but->lockstr) {
BKE_report(NULL, RPT_WARNING, but->lockstr);
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_BREAK;
}
}
- else if(but->pointype && but->poin==NULL) {
+ else if (but->pointype && but->poin==NULL) {
/* there's a pointer needed */
BKE_reportf(NULL, RPT_WARNING, "DoButton pointer error: %s", but->str);
button_activate_state(C, but, BUTTON_STATE_EXIT);
@@ -4741,7 +4750,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
retval= ui_do_but_BUT(C, but, data, event);
break;
case COL:
- if(but->a1 == UI_GRAD_V_ALT) // signal to prevent calling up color picker
+ if (but->a1 == UI_GRAD_V_ALT) // signal to prevent calling up color picker
retval= ui_do_but_EXIT(C, but, data, event);
else
retval= ui_do_but_BLOCK(C, but, data, event);
@@ -4791,9 +4800,9 @@ static uiBut *ui_but_find_activated(ARegion *ar)
uiBlock *block;
uiBut *but;
- for(block=ar->uiblocks.first; block; block=block->next)
- for(but=block->buttons.first; but; but= but->next)
- if(but->active)
+ for (block=ar->uiblocks.first; block; block=block->next)
+ for (but=block->buttons.first; but; but= but->next)
+ if (but->active)
return but;
return NULL;
@@ -4809,15 +4818,15 @@ void uiFreeActiveButtons(const bContext *C, bScreen *screen)
{
ScrArea *sa= screen->areabase.first;
- for(;sa; sa= sa->next) {
+ for (;sa; sa= sa->next) {
ARegion *ar= sa->regionbase.first;
- for(;ar; ar= ar->next) {
+ for (;ar; ar= ar->next) {
uiBut *but= ui_but_find_activated(ar);
- if(but) {
+ if (but) {
uiHandleButtonData *data= but->active;
- if(data->menu==NULL && data->searchbox==NULL)
- if(data->state == BUTTON_STATE_HIGHLIGHT)
+ if (data->menu==NULL && data->searchbox==NULL)
+ if (data->state == BUTTON_STATE_HIGHLIGHT)
ui_button_active_free(C, but);
}
}
@@ -4833,8 +4842,8 @@ int UI_but_active_drop_name(bContext *C)
ARegion *ar= CTX_wm_region(C);
uiBut *but= ui_but_find_activated(ar);
- if(but) {
- if(ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU))
+ if (but) {
+ if (ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU))
return 1;
}
@@ -4845,12 +4854,12 @@ static void ui_blocks_set_tooltips(ARegion *ar, int enable)
{
uiBlock *block;
- if(!ar)
+ if (!ar)
return;
/* we disabled buttons when when they were already shown, and
* re-enable them on mouse move */
- for(block=ar->uiblocks.first; block; block=block->next)
+ for (block=ar->uiblocks.first; block; block=block->next)
block->tooltipdisabled= !enable;
}
@@ -4859,8 +4868,8 @@ static int ui_mouse_inside_region(ARegion *ar, int x, int y)
uiBlock *block;
/* check if the mouse is in the region */
- if(!BLI_in_rcti(&ar->winrct, x, y)) {
- for(block=ar->uiblocks.first; block; block=block->next)
+ if (!BLI_in_rcti(&ar->winrct, x, y)) {
+ for (block=ar->uiblocks.first; block; block=block->next)
block->auto_open= FALSE;
return 0;
@@ -4871,7 +4880,7 @@ static int ui_mouse_inside_region(ARegion *ar, int x, int y)
* even when they are not visible, so we need to make a copy of the mask to
* use to check
*/
- if(ar->v2d.mask.xmin!=ar->v2d.mask.xmax) {
+ if (ar->v2d.mask.xmin!=ar->v2d.mask.xmax) {
View2D *v2d= &ar->v2d;
rcti mask_rct;
int mx, my;
@@ -4882,26 +4891,26 @@ static int ui_mouse_inside_region(ARegion *ar, int x, int y)
ui_window_to_region(ar, &mx, &my);
/* make a copy of the mask rect, and tweak accordingly for hidden scrollbars */
- mask_rct.xmin= v2d->mask.xmin;
- mask_rct.xmax= v2d->mask.xmax;
- mask_rct.ymin= v2d->mask.ymin;
- mask_rct.ymax= v2d->mask.ymax;
+ mask_rct.xmin = v2d->mask.xmin;
+ mask_rct.xmax = v2d->mask.xmax;
+ mask_rct.ymin = v2d->mask.ymin;
+ mask_rct.ymax = v2d->mask.ymax;
if (v2d->scroll & (V2D_SCROLL_VERTICAL_HIDE|V2D_SCROLL_VERTICAL_FULLR)) {
if (v2d->scroll & V2D_SCROLL_LEFT)
- mask_rct.xmin= v2d->vert.xmin;
+ mask_rct.xmin = v2d->vert.xmin;
else if (v2d->scroll & V2D_SCROLL_RIGHT)
- mask_rct.xmax= v2d->vert.xmax;
+ mask_rct.xmax = v2d->vert.xmax;
}
if (v2d->scroll & (V2D_SCROLL_HORIZONTAL_HIDE|V2D_SCROLL_HORIZONTAL_FULLR)) {
if (v2d->scroll & (V2D_SCROLL_BOTTOM|V2D_SCROLL_BOTTOM_O))
- mask_rct.ymin= v2d->hor.ymin;
+ mask_rct.ymin = v2d->hor.ymin;
else if (v2d->scroll & V2D_SCROLL_TOP)
- mask_rct.ymax= v2d->hor.ymax;
+ mask_rct.ymax = v2d->hor.ymax;
}
/* check if in the rect */
- if(!BLI_in_rcti(&mask_rct, mx, my))
+ if (!BLI_in_rcti(&mask_rct, mx, my))
return 0;
}
@@ -4910,12 +4919,12 @@ static int ui_mouse_inside_region(ARegion *ar, int x, int y)
static int ui_mouse_inside_button(ARegion *ar, uiBut *but, int x, int y)
{
- if(!ui_mouse_inside_region(ar, x, y))
+ if (!ui_mouse_inside_region(ar, x, y))
return 0;
ui_window_to_block(ar, but->block, &x, &y);
- if(!ui_but_contains_pt(but, x, y))
+ if (!ui_but_contains_pt(but, x, y))
return 0;
return 1;
@@ -4927,34 +4936,34 @@ static uiBut *ui_but_find_mouse_over(ARegion *ar, int x, int y)
uiBut *but, *butover= NULL;
int mx, my;
-// if(!win->active)
+// if (!win->active)
// return NULL;
- if(!ui_mouse_inside_region(ar, x, y))
+ if (!ui_mouse_inside_region(ar, x, y))
return NULL;
- for(block=ar->uiblocks.first; block; block=block->next) {
+ for (block=ar->uiblocks.first; block; block=block->next) {
mx= x;
my= y;
ui_window_to_block(ar, block, &mx, &my);
- for(but=block->buttons.first; but; but= but->next) {
+ for (but=block->buttons.first; but; but= but->next) {
/* note, LABEL is included for hilights, this allows drags */
- if(but->type==LABEL && but->dragpoin==NULL)
+ if (but->type==LABEL && but->dragpoin==NULL)
continue;
- if(ELEM3(but->type, ROUNDBOX, SEPR, LISTBOX))
+ if (ELEM3(but->type, ROUNDBOX, SEPR, LISTBOX))
continue;
- if(but->flag & UI_HIDDEN)
+ if (but->flag & UI_HIDDEN)
continue;
- if(but->flag & UI_SCROLLED)
+ if (but->flag & UI_SCROLLED)
continue;
- if(ui_but_contains_pt(but, mx, my))
+ if (ui_but_contains_pt(but, mx, my))
butover= but;
}
/* CLIP_EVENTS prevents the event from reaching other blocks */
if (block->flag & UI_BLOCK_CLIP_EVENTS) {
/* check if mouse is inside block */
- if(block->minx <= mx && block->maxx >= mx &&
+ if (block->minx <= mx && block->maxx >= mx &&
block->miny <= my && block->maxy >= my)
break;
}
@@ -4969,18 +4978,18 @@ static uiBut *ui_list_find_mouse_over(ARegion *ar, int x, int y)
uiBut *but;
int mx, my;
-// if(!win->active)
+// if (!win->active)
// return NULL;
- if(!ui_mouse_inside_region(ar, x, y))
+ if (!ui_mouse_inside_region(ar, x, y))
return NULL;
- for(block=ar->uiblocks.first; block; block=block->next) {
+ for (block=ar->uiblocks.first; block; block=block->next) {
mx= x;
my= y;
ui_window_to_block(ar, block, &mx, &my);
- for(but=block->buttons.last; but; but= but->prev)
- if(but->type == LISTBOX && ui_but_contains_pt(but, mx, my))
+ for (but=block->buttons.last; but; but= but->prev)
+ if (but->type == LISTBOX && ui_but_contains_pt(but, mx, my))
return but;
}
@@ -5001,18 +5010,18 @@ static void button_timers_tooltip_remove(bContext *C, uiBut *but)
uiHandleButtonData *data;
data= but->active;
- if(data) {
+ if (data) {
- if(data->tooltiptimer) {
+ if (data->tooltiptimer) {
WM_event_remove_timer(data->wm, data->window, data->tooltiptimer);
data->tooltiptimer= NULL;
}
- if(data->tooltip) {
+ if (data->tooltip) {
ui_tooltip_free(C, data->tooltip);
data->tooltip= NULL;
}
- if(data->autoopentimer) {
+ if (data->autoopentimer) {
WM_event_remove_timer(data->wm, data->window, data->autoopentimer);
data->autoopentimer= NULL;
}
@@ -5026,14 +5035,14 @@ static void button_tooltip_timer_reset(bContext *C, uiBut *but)
data= but->active;
- if(data->tooltiptimer) {
+ if (data->tooltiptimer) {
WM_event_remove_timer(data->wm, data->window, data->tooltiptimer);
data->tooltiptimer= NULL;
}
- if(U.flag & USER_TOOLTIPS)
- if(!but->block->tooltipdisabled)
- if(!wm->drags.first)
+ if (U.flag & USER_TOOLTIPS)
+ if (!but->block->tooltipdisabled)
+ if (!wm->drags.first)
data->tooltiptimer= WM_event_add_timer(data->wm, data->window, TIMER, BUTTON_TOOLTIP_DELAY);
}
@@ -5042,26 +5051,26 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
uiHandleButtonData *data;
data= but->active;
- if(data->state == state)
+ if (data->state == state)
return;
/* highlight has timers for tooltips and auto open */
- if(state == BUTTON_STATE_HIGHLIGHT) {
+ if (state == BUTTON_STATE_HIGHLIGHT) {
but->flag &= ~UI_SELECT;
button_tooltip_timer_reset(C, but);
/* automatic open pulldown block timer */
- if(ELEM3(but->type, BLOCK, PULLDOWN, ICONTEXTROW)) {
- if(data->used_mouse && !data->autoopentimer) {
+ if (ELEM3(but->type, BLOCK, PULLDOWN, ICONTEXTROW)) {
+ if (data->used_mouse && !data->autoopentimer) {
int time;
- if(but->block->auto_open==TRUE) time= 1; // test for toolbox
- else if((but->block->flag & UI_BLOCK_LOOP && but->type != BLOCK) || but->block->auto_open==TRUE) time= 5*U.menuthreshold2;
- else if(U.uiflag & USER_MENUOPENAUTO) time= 5*U.menuthreshold1;
+ if (but->block->auto_open==TRUE) time= 1; // test for toolbox
+ else if ((but->block->flag & UI_BLOCK_LOOP && but->type != BLOCK) || but->block->auto_open==TRUE) time= 5*U.menuthreshold2;
+ else if (U.uiflag & USER_MENUOPENAUTO) time= 5*U.menuthreshold1;
else time= -1;
- if(time >= 0)
+ if (time >= 0)
data->autoopentimer= WM_event_add_timer(data->wm, data->window, TIMER, 0.02*(double)time);
}
}
@@ -5072,65 +5081,66 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
}
/* text editing */
- if(state == BUTTON_STATE_TEXT_EDITING && data->state != BUTTON_STATE_TEXT_SELECTING)
+ if (state == BUTTON_STATE_TEXT_EDITING && data->state != BUTTON_STATE_TEXT_SELECTING)
ui_textedit_begin(C, but, data);
- else if(data->state == BUTTON_STATE_TEXT_EDITING && state != BUTTON_STATE_TEXT_SELECTING)
+ else if (data->state == BUTTON_STATE_TEXT_EDITING && state != BUTTON_STATE_TEXT_SELECTING)
ui_textedit_end(C, but, data);
- else if(data->state == BUTTON_STATE_TEXT_SELECTING && state != BUTTON_STATE_TEXT_EDITING)
+ else if (data->state == BUTTON_STATE_TEXT_SELECTING && state != BUTTON_STATE_TEXT_EDITING)
ui_textedit_end(C, but, data);
/* number editing */
- if(state == BUTTON_STATE_NUM_EDITING) {
- if(ui_is_a_warp_but(but))
+ if (state == BUTTON_STATE_NUM_EDITING) {
+ if (ui_is_a_warp_but(but))
WM_cursor_grab(CTX_wm_window(C), TRUE, TRUE, NULL);
ui_numedit_begin(but, data);
- } else if(data->state == BUTTON_STATE_NUM_EDITING) {
+ }
+ else if (data->state == BUTTON_STATE_NUM_EDITING) {
ui_numedit_end(but, data);
- if(ui_is_a_warp_but(but))
+ if (ui_is_a_warp_but(but))
WM_cursor_ungrab(CTX_wm_window(C));
}
/* menu open */
- if(state == BUTTON_STATE_MENU_OPEN)
+ if (state == BUTTON_STATE_MENU_OPEN)
ui_blockopen_begin(C, but, data);
- else if(data->state == BUTTON_STATE_MENU_OPEN)
+ else if (data->state == BUTTON_STATE_MENU_OPEN)
ui_blockopen_end(C, but, data);
/* add a short delay before exiting, to ensure there is some feedback */
- if(state == BUTTON_STATE_WAIT_FLASH) {
+ if (state == BUTTON_STATE_WAIT_FLASH) {
data->flashtimer= WM_event_add_timer(data->wm, data->window, TIMER, BUTTON_FLASH_DELAY);
}
- else if(data->flashtimer) {
+ else if (data->flashtimer) {
WM_event_remove_timer(data->wm, data->window, data->flashtimer);
data->flashtimer= NULL;
}
/* add a blocking ui handler at the window handler for blocking, modal states
* but not for popups, because we already have a window level handler*/
- if(!(but->block->handle && but->block->handle->popup)) {
- if(button_modal_state(state)) {
- if(!button_modal_state(data->state))
+ if (!(but->block->handle && but->block->handle->popup)) {
+ if (button_modal_state(state)) {
+ if (!button_modal_state(data->state))
WM_event_add_ui_handler(C, &data->window->modalhandlers, ui_handler_region_menu, NULL, data);
}
else {
- if(button_modal_state(data->state))
+ if (button_modal_state(data->state))
WM_event_remove_ui_handler(&data->window->modalhandlers, ui_handler_region_menu, NULL, data, 1); /* 1 = postpone free */
}
}
/* wait for mousemove to enable drag */
- if(state == BUTTON_STATE_WAIT_DRAG) {
+ if (state == BUTTON_STATE_WAIT_DRAG) {
but->flag &= ~UI_SELECT;
}
data->state= state;
- if(state != BUTTON_STATE_EXIT) {
+ if (state != BUTTON_STATE_EXIT) {
/* When objects for eg. are removed, running ui_check_but() can access
* the removed data - so disable update on exit. Also in case of
* highlight when not in a popup menu, we remove because data used in
* button below popup might have been removed by action of popup. Needs
* a more reliable solution... */
- if(state != BUTTON_STATE_HIGHLIGHT || (but->block->flag & UI_BLOCK_LOOP))
+ if (state != BUTTON_STATE_HIGHLIGHT || (but->block->flag & UI_BLOCK_LOOP))
ui_check_but(but);
}
@@ -5147,7 +5157,7 @@ static void button_activate_init(bContext *C, ARegion *ar, uiBut *but, uiButtonA
data->wm= CTX_wm_manager(C);
data->window= CTX_wm_window(C);
data->region= ar;
- if( ELEM(but->type, BUT_CURVE, SEARCH_MENU) ); // XXX curve is temp
+ if ( ELEM(but->type, BUT_CURVE, SEARCH_MENU) ); // XXX curve is temp
else data->interactive= 1;
data->state = BUTTON_STATE_INIT;
@@ -5159,42 +5169,42 @@ static void button_activate_init(bContext *C, ARegion *ar, uiBut *but, uiButtonA
/* we disable auto_open in the block after a threshold, because we still
* want to allow auto opening adjacent menus even if no button is activated
* in between going over to the other button, but only for a short while */
- if(type == BUTTON_ACTIVATE_OVER && but->block->auto_open==TRUE)
- if(but->block->auto_open_last+BUTTON_AUTO_OPEN_THRESH < PIL_check_seconds_timer())
+ if (type == BUTTON_ACTIVATE_OVER && but->block->auto_open==TRUE)
+ if (but->block->auto_open_last+BUTTON_AUTO_OPEN_THRESH < PIL_check_seconds_timer())
but->block->auto_open= FALSE;
- if(type == BUTTON_ACTIVATE_OVER) {
+ if (type == BUTTON_ACTIVATE_OVER) {
data->used_mouse= 1;
}
button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT);
/* activate right away */
- if(but->flag & UI_BUT_IMMEDIATE) {
- if(but->type==HOTKEYEVT)
+ if (but->flag & UI_BUT_IMMEDIATE) {
+ if (but->type==HOTKEYEVT)
button_activate_state(C, but, BUTTON_STATE_WAIT_KEY_EVENT);
/* .. more to be added here */
}
- if(type == BUTTON_ACTIVATE_OPEN) {
+ if (type == BUTTON_ACTIVATE_OPEN) {
button_activate_state(C, but, BUTTON_STATE_MENU_OPEN);
/* activate first button in submenu */
- if(data->menu && data->menu->region) {
+ if (data->menu && data->menu->region) {
ARegion *subar= data->menu->region;
uiBlock *subblock= subar->uiblocks.first;
uiBut *subbut;
- if(subblock) {
+ if (subblock) {
subbut= ui_but_first(subblock);
- if(subbut)
+ if (subbut)
ui_handle_button_activate(C, subar, subbut, BUTTON_ACTIVATE);
}
}
}
- else if(type == BUTTON_ACTIVATE_TEXT_EDITING)
+ else if (type == BUTTON_ACTIVATE_TEXT_EDITING)
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
- else if(type == BUTTON_ACTIVATE_APPLY)
+ else if (type == BUTTON_ACTIVATE_APPLY)
button_activate_state(C, but, BUTTON_STATE_WAIT_FLASH);
}
@@ -5204,18 +5214,18 @@ static void button_activate_exit(bContext *C, uiHandleButtonData *data, uiBut *b
uiBut *bt;
/* ensure we are in the exit state */
- if(data->state != BUTTON_STATE_EXIT)
+ if (data->state != BUTTON_STATE_EXIT)
button_activate_state(C, but, BUTTON_STATE_EXIT);
/* apply the button action or value */
- if(!onfree)
+ if (!onfree)
ui_apply_button(C, block, but, data, 0);
/* if this button is in a menu, this will set the button return
* value to the button value and the menu return value to ok, the
* menu return value will be picked up and the menu will close */
- if(block->handle && !(block->flag & UI_BLOCK_KEEP_OPEN)) {
- if(!data->cancel || data->escapecancel) {
+ if (block->handle && !(block->flag & UI_BLOCK_KEEP_OPEN)) {
+ if (!data->cancel || data->escapecancel) {
uiPopupBlockHandle *menu;
menu= block->handle;
@@ -5224,18 +5234,18 @@ static void button_activate_exit(bContext *C, uiHandleButtonData *data, uiBut *b
}
}
- if(!onfree && !data->cancel) {
+ if (!onfree && !data->cancel) {
/* autokey & undo push */
ui_apply_autokey_undo(C, but);
/* popup menu memory */
- if(block->flag & UI_BLOCK_POPUP_MEMORY)
+ if (block->flag & UI_BLOCK_POPUP_MEMORY)
ui_popup_menu_memory(block, but);
}
/* disable tooltips until mousemove + last active flag */
- for(block=data->region->uiblocks.first; block; block=block->next) {
- for(bt=block->buttons.first; bt; bt=bt->next)
+ for (block=data->region->uiblocks.first; block; block=block->next) {
+ for (bt=block->buttons.first; bt; bt=bt->next)
bt->flag &= ~UI_BUT_LAST_ACTIVE;
block->tooltipdisabled= 1;
@@ -5244,9 +5254,9 @@ static void button_activate_exit(bContext *C, uiHandleButtonData *data, uiBut *b
ui_blocks_set_tooltips(data->region, 0);
/* clean up */
- if(data->str)
+ if (data->str)
MEM_freeN(data->str);
- if(data->origstr)
+ if (data->origstr)
MEM_freeN(data->origstr);
/* redraw (data is but->active!) */
@@ -5257,13 +5267,13 @@ static void button_activate_exit(bContext *C, uiHandleButtonData *data, uiBut *b
but->active= NULL;
but->flag &= ~(UI_ACTIVE|UI_SELECT);
but->flag |= UI_BUT_LAST_ACTIVE;
- if(!onfree)
+ if (!onfree)
ui_check_but(but);
/* adds empty mousemove in queue for re-init handler, in case mouse is
* still over a button. we cannot just check for this ourselfs because
* at this point the mouse may be over a button in another region */
- if(mousemove)
+ if (mousemove)
WM_event_add_mousemove(C);
}
@@ -5274,7 +5284,7 @@ void ui_button_active_free(const bContext *C, uiBut *but)
/* this gets called when the button somehow disappears while it is still
* active, this is bad for user interaction, but we need to handle this
* case cleanly anyway in case it happens */
- if(but->active) {
+ if (but->active) {
data= but->active;
data->cancel= 1;
button_activate_exit((bContext*)C, data, but, 0, 1);
@@ -5288,27 +5298,27 @@ static uiBut *ui_context_button_active(const bContext *C, int (*but_check_cb)(ui
ARegion *ar= CTX_wm_region(C);
- while(ar) {
+ while (ar) {
uiBlock *block;
uiBut *but, *activebut= NULL;
/* find active button */
- for(block=ar->uiblocks.first; block; block=block->next) {
- for(but=block->buttons.first; but; but= but->next) {
- if(but->active)
+ for (block=ar->uiblocks.first; block; block=block->next) {
+ for (but=block->buttons.first; but; but= but->next) {
+ if (but->active)
activebut= but;
- else if(!activebut && (but->flag & UI_BUT_LAST_ACTIVE))
+ else if (!activebut && (but->flag & UI_BUT_LAST_ACTIVE))
activebut= but;
}
}
- if(activebut && (but_check_cb == NULL || but_check_cb(activebut))) {
+ if (activebut && (but_check_cb == NULL || but_check_cb(activebut))) {
uiHandleButtonData *data= activebut->active;
but_found= activebut;
/* recurse into opened menu, like colorpicker case */
- if(data && data->menu && (ar != data->menu->region)) {
+ if (data && data->menu && (ar != data->menu->region)) {
ar = data->menu->region;
}
else {
@@ -5345,7 +5355,7 @@ void uiContextActiveProperty(const bContext *C, struct PointerRNA *ptr, struct P
memset(ptr, 0, sizeof(*ptr));
- if(activebut && activebut->rnapoin.data) {
+ if (activebut && activebut->rnapoin.data) {
*ptr= activebut->rnapoin;
*prop= activebut->rnaprop;
*index= activebut->rnaindex;
@@ -5359,7 +5369,7 @@ void uiContextActiveProperty(const bContext *C, struct PointerRNA *ptr, struct P
void uiContextActivePropertyHandle(bContext *C)
{
uiBut *activebut= ui_context_rna_button_active(C);
- if(activebut) {
+ if (activebut) {
/* TODO, look into a better way to handle the button change
* currently this is mainly so reset defaults works for the
* operator redo panel - campbell */
@@ -5381,7 +5391,7 @@ wmOperator *uiContextActiveOperator(const struct bContext *C)
}
/* scan active regions ui */
- for(block=ar_ctx->uiblocks.first; block; block=block->next) {
+ for (block=ar_ctx->uiblocks.first; block; block=block->next) {
if (block->ui_operator) {
return block->ui_operator;
}
@@ -5396,7 +5406,7 @@ wmOperator *uiContextActiveOperator(const struct bContext *C)
if (ar == ar_ctx) {
continue;
}
- for(block=ar->uiblocks.first; block; block=block->next) {
+ for (block=ar->uiblocks.first; block; block=block->next) {
if (block->ui_operator) {
return block->ui_operator;
}
@@ -5415,26 +5425,26 @@ void uiContextAnimUpdate(const bContext *C)
uiBlock *block;
uiBut *but, *activebut;
- while(ar) {
+ while (ar) {
/* find active button */
activebut= NULL;
- for(block=ar->uiblocks.first; block; block=block->next) {
- for(but=block->buttons.first; but; but= but->next) {
+ for (block=ar->uiblocks.first; block; block=block->next) {
+ for (but=block->buttons.first; but; but= but->next) {
ui_but_anim_flag(but, (scene)? scene->r.cfra: 0.0f);
ED_region_tag_redraw(ar);
- if(but->active)
+ if (but->active)
activebut= but;
- else if(!activebut && (but->flag & UI_BUT_LAST_ACTIVE))
+ else if (!activebut && (but->flag & UI_BUT_LAST_ACTIVE))
activebut= but;
}
}
- if(activebut) {
+ if (activebut) {
/* always recurse into opened menu, so all buttons update (like colorpicker) */
uiHandleButtonData *data= activebut->active;
- if(data && data->menu)
+ if (data && data->menu)
ar = data->menu->region;
else
return;
@@ -5453,9 +5463,9 @@ static uiBut *uit_but_find_open_event(ARegion *ar, wmEvent *event)
uiBlock *block;
uiBut *but;
- for(block=ar->uiblocks.first; block; block=block->next) {
- for(but=block->buttons.first; but; but= but->next)
- if(but==event->customdata)
+ for (block=ar->uiblocks.first; block; block=block->next) {
+ for (but=block->buttons.first; but; but= but->next)
+ if (but==event->customdata)
return but;
}
return NULL;
@@ -5465,14 +5475,14 @@ static int ui_handle_button_over(bContext *C, wmEvent *event, ARegion *ar)
{
uiBut *but;
- if(event->type == MOUSEMOVE) {
+ if (event->type == MOUSEMOVE) {
but= ui_but_find_mouse_over(ar, event->x, event->y);
- if(but)
+ if (but)
button_activate_init(C, ar, but, BUTTON_ACTIVATE_OVER);
}
- else if(event->type == EVT_BUT_OPEN) {
+ else if (event->type == EVT_BUT_OPEN) {
but= uit_but_find_open_event(ar, event);
- if(but) {
+ if (but) {
button_activate_init(C, ar, but, BUTTON_ACTIVATE_OVER);
ui_do_button(C, but->block, but, event);
}
@@ -5504,7 +5514,7 @@ static void ui_handle_button_activate(bContext *C, ARegion *ar, uiBut *but, uiBu
uiHandleButtonData *data;
oldbut= ui_but_find_activated(ar);
- if(oldbut) {
+ if (oldbut) {
data= oldbut->active;
data->cancel= 1;
button_activate_exit(C, data, oldbut, 0, 0);
@@ -5530,7 +5540,7 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
retval= WM_UI_HANDLER_CONTINUE;
- if(data->state == BUTTON_STATE_HIGHLIGHT) {
+ if (data->state == BUTTON_STATE_HIGHLIGHT) {
switch(event->type) {
case WINDEACTIVATE:
case EVT_BUT_CANCEL:
@@ -5540,15 +5550,15 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
break;
case MOUSEMOVE:
/* verify if we are still over the button, if not exit */
- if(!ui_mouse_inside_button(ar, but, event->x, event->y)) {
+ if (!ui_mouse_inside_button(ar, but, event->x, event->y)) {
data->cancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
- else if(ui_but_find_mouse_over(ar, event->x, event->y) != but) {
+ else if (ui_but_find_mouse_over(ar, event->x, event->y) != but) {
data->cancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
- else if(event->x!=event->prevx || event->y!=event->prevy) {
+ else if (event->x!=event->prevx || event->y!=event->prevy) {
/* re-enable tooltip on mouse move */
ui_blocks_set_tooltips(ar, 1);
button_tooltip_timer_reset(C, but);
@@ -5557,19 +5567,19 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
break;
case TIMER: {
/* handle tooltip timer */
- if(event->customdata == data->tooltiptimer) {
+ if (event->customdata == data->tooltiptimer) {
WM_event_remove_timer(data->wm, data->window, data->tooltiptimer);
data->tooltiptimer= NULL;
- if(!data->tooltip)
+ if (!data->tooltip)
data->tooltip= ui_tooltip_create(C, data->region, but);
}
/* handle menu auto open timer */
- else if(event->customdata == data->autoopentimer) {
+ else if (event->customdata == data->autoopentimer) {
WM_event_remove_timer(data->wm, data->window, data->autoopentimer);
data->autoopentimer= NULL;
- if(ui_mouse_inside_button(ar, but, event->x, event->y))
+ if (ui_mouse_inside_button(ar, but, event->x, event->y))
button_activate_state(C, but, BUTTON_STATE_MENU_OPEN);
}
@@ -5579,7 +5589,7 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
case WHEELDOWNMOUSE:
case MIDDLEMOUSE:
/* XXX hardcoded keymap check... but anyway, while view changes, tooltips should be removed */
- if(data->tooltiptimer) {
+ if (data->tooltiptimer) {
WM_event_remove_timer(data->wm, data->window, data->tooltiptimer);
data->tooltiptimer= NULL;
}
@@ -5590,7 +5600,7 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
}
}
}
- else if(data->state == BUTTON_STATE_WAIT_RELEASE) {
+ else if (data->state == BUTTON_STATE_WAIT_RELEASE) {
switch(event->type) {
case WINDEACTIVATE:
data->cancel= 1;
@@ -5598,7 +5608,7 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
break;
case MOUSEMOVE:
- if(ELEM(but->type,LINK, INLINK)) {
+ if (ELEM(but->type,LINK, INLINK)) {
but->flag |= UI_SELECT;
ui_do_button(C, block, but, event);
ED_region_tag_redraw(data->region);
@@ -5606,15 +5616,15 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
else {
/* deselect the button when moving the mouse away */
/* also de-activate for buttons that only show higlights */
- if(ui_mouse_inside_button(ar, but, event->x, event->y)) {
- if(!(but->flag & UI_SELECT)) {
+ if (ui_mouse_inside_button(ar, but, event->x, event->y)) {
+ if (!(but->flag & UI_SELECT)) {
but->flag |= (UI_SELECT|UI_ACTIVE);
data->cancel= 0;
ED_region_tag_redraw(data->region);
}
}
else {
- if(but->flag & UI_SELECT) {
+ if (but->flag & UI_SELECT) {
but->flag &= ~(UI_SELECT|UI_ACTIVE);
data->cancel= 1;
ED_region_tag_redraw(data->region);
@@ -5630,30 +5640,30 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
retval= WM_UI_HANDLER_BREAK;
}
- else if(data->state == BUTTON_STATE_WAIT_FLASH) {
+ else if (data->state == BUTTON_STATE_WAIT_FLASH) {
switch(event->type) {
case TIMER: {
- if(event->customdata == data->flashtimer)
+ if (event->customdata == data->flashtimer)
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
}
retval= WM_UI_HANDLER_CONTINUE;
}
- else if(data->state == BUTTON_STATE_MENU_OPEN) {
+ else if (data->state == BUTTON_STATE_MENU_OPEN) {
/* check for exit because of mouse-over another button */
switch(event->type) {
case MOUSEMOVE:
- if(data->menu && data->menu->region)
- if(ui_mouse_inside_region(data->menu->region, event->x, event->y))
+ if (data->menu && data->menu->region)
+ if (ui_mouse_inside_region(data->menu->region, event->x, event->y))
break;
{
uiBut *bt= ui_but_find_mouse_over(ar, event->x, event->y);
- if(bt && bt->active != data) {
- if(but->type != COL) /* exception */
+ if (bt && bt->active != data) {
+ if (but->type != COL) /* exception */
data->cancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
@@ -5669,14 +5679,14 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
// retval= WM_UI_HANDLER_BREAK; XXX why ?
}
- if(data->state == BUTTON_STATE_EXIT) {
+ if (data->state == BUTTON_STATE_EXIT) {
postbut= data->postbut;
posttype= data->posttype;
button_activate_exit(C, data, but, (postbut == NULL), 0);
/* for jumping to the next button with tab while text editing */
- if(postbut)
+ if (postbut)
button_activate_init(C, ar, postbut, posttype);
}
@@ -5689,22 +5699,22 @@ static int ui_handle_list_event(bContext *C, wmEvent *event, ARegion *ar)
int retval= WM_UI_HANDLER_CONTINUE;
int value, min, max;
- if(but && (event->val == KM_PRESS)) {
+ if (but && (event->val == KM_PRESS)) {
Panel *pa= but->block->panel;
- if(ELEM(event->type, UPARROWKEY, DOWNARROWKEY) ||
+ if (ELEM(event->type, UPARROWKEY, DOWNARROWKEY) ||
((ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt))) {
/* activate up/down the list */
value= RNA_property_int_get(&but->rnapoin, but->rnaprop);
- if(ELEM(event->type, UPARROWKEY, WHEELUPMOUSE))
+ if (ELEM(event->type, UPARROWKEY, WHEELUPMOUSE))
value--;
else
value++;
- if(value < pa->list_scroll)
+ if (value < pa->list_scroll)
pa->list_scroll= value;
- else if(value >= pa->list_scroll+pa->list_size)
+ else if (value >= pa->list_scroll+pa->list_size)
pa->list_scroll= value - pa->list_size + 1;
RNA_property_int_range(&but->rnapoin, but->rnaprop, &min, &max);
@@ -5716,12 +5726,12 @@ static int ui_handle_list_event(bContext *C, wmEvent *event, ARegion *ar)
retval= WM_UI_HANDLER_BREAK;
}
- else if(ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->shift) {
+ else if (ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->shift) {
/* silly replacement for proper grip */
- if(pa->list_grip_size == 0)
+ if (pa->list_grip_size == 0)
pa->list_grip_size= pa->list_size;
- if(event->type == WHEELUPMOUSE)
+ if (event->type == WHEELUPMOUSE)
pa->list_grip_size--;
else
pa->list_grip_size++;
@@ -5732,10 +5742,10 @@ static int ui_handle_list_event(bContext *C, wmEvent *event, ARegion *ar)
retval= WM_UI_HANDLER_BREAK;
}
- else if(ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE)) {
- if(pa->list_last_len > pa->list_size) {
+ else if (ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE)) {
+ if (pa->list_last_len > pa->list_size) {
/* list template will clamp */
- if(event->type == WHEELUPMOUSE)
+ if (event->type == WHEELUPMOUSE)
pa->list_scroll--;
else
pa->list_scroll++;
@@ -5759,29 +5769,29 @@ static void ui_handle_button_return_submenu(bContext *C, wmEvent *event, uiBut *
menu= data->menu;
/* copy over return values from the closing menu */
- if((menu->menuretval & UI_RETURN_OK) || (menu->menuretval & UI_RETURN_UPDATE)) {
- if(but->type == COL)
+ if ((menu->menuretval & UI_RETURN_OK) || (menu->menuretval & UI_RETURN_UPDATE)) {
+ if (but->type == COL)
copy_v3_v3(data->vec, menu->retvec);
- else if(ELEM3(but->type, MENU, ICONROW, ICONTEXTROW))
+ else if (ELEM3(but->type, MENU, ICONROW, ICONTEXTROW))
data->value= menu->retvalue;
}
- if(menu->menuretval & UI_RETURN_UPDATE) {
- if(data->interactive) ui_apply_button(C, but->block, but, data, 1);
+ if (menu->menuretval & UI_RETURN_UPDATE) {
+ if (data->interactive) ui_apply_button(C, but->block, but, data, 1);
else ui_check_but(but);
menu->menuretval= 0;
}
/* now change button state or exit, which will close the submenu */
- if((menu->menuretval & UI_RETURN_OK) || (menu->menuretval & UI_RETURN_CANCEL)) {
- if(menu->menuretval != UI_RETURN_OK)
+ if ((menu->menuretval & UI_RETURN_OK) || (menu->menuretval & UI_RETURN_CANCEL)) {
+ if (menu->menuretval != UI_RETURN_OK)
data->cancel= 1;
button_activate_exit(C, data, but, 1, 0);
}
- else if(menu->menuretval & UI_RETURN_OUT) {
- if(event->type==MOUSEMOVE && ui_mouse_inside_button(data->region, but, event->x, event->y)) {
+ else if (menu->menuretval & UI_RETURN_OUT) {
+ if (event->type==MOUSEMOVE && ui_mouse_inside_button(data->region, but, event->x, event->y)) {
button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT);
}
else {
@@ -5811,12 +5821,12 @@ static void ui_handle_button_return_submenu(bContext *C, wmEvent *event, uiBut *
static void ui_mouse_motion_towards_init(uiPopupBlockHandle *menu, int mx, int my, int force)
{
- if(!menu->dotowards || force) {
+ if (!menu->dotowards || force) {
menu->dotowards= 1;
menu->towardsx= mx;
menu->towardsy= my;
- if(force)
+ if (force)
menu->towardstime= DBL_MAX; /* unlimited time */
else
menu->towardstime= PIL_check_seconds_timer();
@@ -5828,7 +5838,7 @@ static int ui_mouse_motion_towards_check(uiBlock *block, uiPopupBlockHandle *men
float p1[2], p2[2], p3[2], p4[2], oldp[2], newp[2];
int closer;
- if(!menu->dotowards) return 0;
+ if (!menu->dotowards) return 0;
/* verify that we are moving towards one of the edges of the
* menu block, in other words, in the triangle formed by the
@@ -5851,7 +5861,7 @@ static int ui_mouse_motion_towards_check(uiBlock *block, uiPopupBlockHandle *men
newp[0]= mx;
newp[1]= my;
- if(len_v2v2(oldp, newp) < 4.0f)
+ if (len_v2v2(oldp, newp) < 4.0f)
return menu->dotowards;
closer= 0;
@@ -5860,11 +5870,11 @@ static int ui_mouse_motion_towards_check(uiBlock *block, uiPopupBlockHandle *men
closer |= isect_point_tri_v2(newp, oldp, p3, p4);
closer |= isect_point_tri_v2(newp, oldp, p4, p1);
- if(!closer)
+ if (!closer)
menu->dotowards= 0;
/* 1 second timer */
- if(PIL_check_seconds_timer() - menu->towardstime > BUTTON_MOUSE_TOWARDS_THRESH)
+ if (PIL_check_seconds_timer() - menu->towardstime > BUTTON_MOUSE_TOWARDS_THRESH)
menu->dotowards= 0;
return menu->dotowards;
@@ -5872,12 +5882,12 @@ static int ui_mouse_motion_towards_check(uiBlock *block, uiPopupBlockHandle *men
static char ui_menu_scroll_test(uiBlock *block, int my)
{
- if(block->flag & (UI_BLOCK_CLIPTOP|UI_BLOCK_CLIPBOTTOM)) {
- if(block->flag & UI_BLOCK_CLIPTOP)
- if(my > block->maxy-14)
+ if (block->flag & (UI_BLOCK_CLIPTOP|UI_BLOCK_CLIPBOTTOM)) {
+ if (block->flag & UI_BLOCK_CLIPTOP)
+ if (my > block->maxy-14)
return 't';
- if(block->flag & UI_BLOCK_CLIPBOTTOM)
- if(my < block->miny+14)
+ if (block->flag & UI_BLOCK_CLIPBOTTOM)
+ if (my < block->miny+14)
return 'b';
}
return 0;
@@ -5887,7 +5897,7 @@ static int ui_menu_scroll(ARegion *ar, uiBlock *block, int my)
{
char test= ui_menu_scroll_test(block, my);
- if(test) {
+ if (test) {
uiBut *b1= block->buttons.first;
uiBut *b2= block->buttons.last;
uiBut *bnext;
@@ -5895,36 +5905,36 @@ static int ui_menu_scroll(ARegion *ar, uiBlock *block, int my)
int dy= 0;
/* get first and last visible buttons */
- while(b1 && ui_but_next(b1) && (b1->flag & UI_SCROLLED))
+ while (b1 && ui_but_next(b1) && (b1->flag & UI_SCROLLED))
b1= ui_but_next(b1);
- while(b2 && ui_but_prev(b2) && (b2->flag & UI_SCROLLED))
+ while (b2 && ui_but_prev(b2) && (b2->flag & UI_SCROLLED))
b2= ui_but_prev(b2);
/* skips separators */
bnext= ui_but_next(b1);
bprev= ui_but_prev(b2);
- if(bnext==NULL || bprev==NULL)
+ if (bnext==NULL || bprev==NULL)
return 0;
- if(test=='t') {
+ if (test=='t') {
/* bottom button is first button */
- if(b1->y1 < b2->y1)
+ if (b1->y1 < b2->y1)
dy= bnext->y1 - b1->y1;
/* bottom button is last button */
else
dy= bprev->y1 - b2->y1;
}
- else if(test=='b') {
+ else if (test=='b') {
/* bottom button is first button */
- if(b1->y1 < b2->y1)
+ if (b1->y1 < b2->y1)
dy= b1->y1 - bnext->y1;
/* bottom button is last button */
else
dy= b2->y1 - bprev->y1;
}
- if(dy) {
+ if (dy) {
- for(b1= block->buttons.first; b1; b1= b1->next) {
+ for (b1= block->buttons.first; b1; b1= b1->next) {
b1->y1 -= dy;
b1->y2 -= dy;
}
@@ -5959,43 +5969,43 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
/* check if mouse is inside block */
inside= 0;
- if(block->minx <= mx && block->maxx >= mx)
- if(block->miny <= my && block->maxy >= my)
+ if (block->minx <= mx && block->maxx >= mx)
+ if (block->miny <= my && block->maxy >= my)
inside= 1;
/* if there's an active modal button, don't check events or outside, except for search menu */
but= ui_but_find_activated(ar);
- if(but && button_modal_state(but->active->state) && but->type!=SEARCH_MENU) {
+ if (but && button_modal_state(but->active->state) && but->type!=SEARCH_MENU) {
/* if a button is activated modal, always reset the start mouse
* position of the towards mechanism to avoid loosing focus,
* and don't handle events */
ui_mouse_motion_towards_init(menu, mx, my, 1);
}
- else if(event->type == TIMER) {
- if(event->customdata == menu->scrolltimer)
+ else if (event->type == TIMER) {
+ if (event->customdata == menu->scrolltimer)
ui_menu_scroll(ar, block, my);
}
else {
/* for ui_mouse_motion_towards_block */
- if(event->type == MOUSEMOVE) {
+ if (event->type == MOUSEMOVE) {
ui_mouse_motion_towards_init(menu, mx, my, 0);
/* add menu scroll timer, if needed */
- if(ui_menu_scroll_test(block, my))
- if(menu->scrolltimer==NULL)
+ if (ui_menu_scroll_test(block, my))
+ if (menu->scrolltimer==NULL)
menu->scrolltimer=
WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, MENU_SCROLL_INTERVAL);
}
/* first block own event func */
- if(block->block_event_func && block->block_event_func(C, block, event));
+ if (block->block_event_func && block->block_event_func(C, block, event));
/* events not for active search menu button */
- else if(but==NULL || but->type!=SEARCH_MENU) {
+ else if (but==NULL || but->type!=SEARCH_MENU) {
switch(event->type) {
/* closing sublevels of pulldowns */
case LEFTARROWKEY:
- if(event->val==KM_PRESS && (block->flag & UI_BLOCK_LOOP))
- if(block->saferct.first)
+ if (event->val==KM_PRESS && (block->flag & UI_BLOCK_LOOP))
+ if (block->saferct.first)
menu->menuretval= UI_RETURN_OUT;
retval= WM_UI_HANDLER_BREAK;
@@ -6003,16 +6013,16 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
/* opening sublevels of pulldowns */
case RIGHTARROWKEY:
- if(event->val==KM_PRESS && (block->flag & UI_BLOCK_LOOP)) {
+ if (event->val==KM_PRESS && (block->flag & UI_BLOCK_LOOP)) {
but= ui_but_find_activated(ar);
- if(!but) {
+ if (!but) {
/* no item active, we make first active */
- if(block->direction & UI_TOP) but= ui_but_last(block);
+ if (block->direction & UI_TOP) but= ui_but_last(block);
else but= ui_but_first(block);
}
- if(but && ELEM(but->type, BLOCK, PULLDOWN))
+ if (but && ELEM(but->type, BLOCK, PULLDOWN))
ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE_OPEN);
}
@@ -6024,40 +6034,40 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
case WHEELUPMOUSE:
case WHEELDOWNMOUSE:
/* arrowkeys: only handle for block_loop blocks */
- if(event->alt || event->shift || event->ctrl || event->oskey);
- else if(inside || (block->flag & UI_BLOCK_LOOP)) {
- if(event->val==KM_PRESS) {
+ if (event->alt || event->shift || event->ctrl || event->oskey);
+ else if (inside || (block->flag & UI_BLOCK_LOOP)) {
+ if (event->val==KM_PRESS) {
but= ui_but_find_activated(ar);
- if(but) {
+ if (but) {
/* is there a situation where UI_LEFT or UI_RIGHT would also change navigation direction? */
- if( ((ELEM(event->type, DOWNARROWKEY, WHEELDOWNMOUSE)) && (block->direction & UI_DOWN)) ||
+ if ( ((ELEM(event->type, DOWNARROWKEY, WHEELDOWNMOUSE)) && (block->direction & UI_DOWN)) ||
((ELEM(event->type, DOWNARROWKEY, WHEELDOWNMOUSE)) && (block->direction & UI_RIGHT)) ||
((ELEM(event->type, UPARROWKEY, WHEELUPMOUSE)) && (block->direction & UI_TOP))
) {
/* the following is just a hack - uiBut->type set to BUT and BUTM have there menus built
* opposite ways - this should be changed so that all popup-menus use the same uiBlock->direction */
- if(but->type & BUT)
+ if (but->type & BUT)
but= ui_but_next(but);
else
but= ui_but_prev(but);
}
else {
- if(but->type & BUT)
+ if (but->type & BUT)
but= ui_but_prev(but);
else
but= ui_but_next(but);
}
- if(but)
+ if (but)
ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE);
}
- if(!but) {
- if( ((ELEM(event->type, UPARROWKEY, WHEELUPMOUSE)) && (block->direction & UI_DOWN)) ||
+ if (!but) {
+ if ( ((ELEM(event->type, UPARROWKEY, WHEELUPMOUSE)) && (block->direction & UI_DOWN)) ||
((ELEM(event->type, UPARROWKEY, WHEELUPMOUSE)) && (block->direction & UI_RIGHT)) ||
((ELEM(event->type, DOWNARROWKEY, WHEELDOWNMOUSE)) && (block->direction & UI_TOP))
) {
- if((bt= ui_but_first(block)) && (bt->type & BUT)) {
+ if ((bt= ui_but_first(block)) && (bt->type & BUT)) {
bt= ui_but_last(block);
}
else {
@@ -6065,7 +6075,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
}
}
else {
- if((bt= ui_but_first(block)) && (bt->type & BUT)) {
+ if ((bt= ui_but_first(block)) && (bt->type & BUT)) {
/* keep ui_but_first() */
}
else {
@@ -6073,7 +6083,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
}
}
- if(bt)
+ if (bt)
ui_handle_button_activate(C, ar, bt, BUTTON_ACTIVATE);
}
}
@@ -6086,50 +6096,50 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
case ONEKEY: case PAD1:
act= 1;
case TWOKEY: case PAD2:
- if(act==0) act= 2;
+ if (act==0) act= 2;
case THREEKEY: case PAD3:
- if(act==0) act= 3;
+ if (act==0) act= 3;
case FOURKEY: case PAD4:
- if(act==0) act= 4;
+ if (act==0) act= 4;
case FIVEKEY: case PAD5:
- if(act==0) act= 5;
+ if (act==0) act= 5;
case SIXKEY: case PAD6:
- if(act==0) act= 6;
+ if (act==0) act= 6;
case SEVENKEY: case PAD7:
- if(act==0) act= 7;
+ if (act==0) act= 7;
case EIGHTKEY: case PAD8:
- if(act==0) act= 8;
+ if (act==0) act= 8;
case NINEKEY: case PAD9:
- if(act==0) act= 9;
+ if (act==0) act= 9;
case ZEROKEY: case PAD0:
- if(act==0) act= 10;
+ if (act==0) act= 10;
- if((block->flag & UI_BLOCK_NUMSELECT) && event->val==KM_PRESS) {
- if(event->alt) act+= 10;
+ if ((block->flag & UI_BLOCK_NUMSELECT) && event->val==KM_PRESS) {
+ if (event->alt) act+= 10;
count= 0;
- for(but= block->buttons.first; but; but= but->next) {
+ for (but= block->buttons.first; but; but= but->next) {
int doit= 0;
- if(but->type!=LABEL && but->type!=SEPR)
+ if (but->type!=LABEL && but->type!=SEPR)
count++;
/* exception for rna layer buts */
- if(but->rnapoin.data && but->rnaprop) {
+ if (but->rnapoin.data && but->rnaprop) {
if (ELEM(RNA_property_subtype(but->rnaprop), PROP_LAYER, PROP_LAYER_MEMBER)) {
if (but->rnaindex== act-1)
doit=1;
}
}
/* exception for menus like layer buts, with button aligning they're not drawn in order */
- else if(but->type==TOGR) {
- if(but->bitnr==act-1)
+ else if (but->type==TOGR) {
+ if (but->bitnr==act-1)
doit= 1;
}
- else if(count==act)
+ else if (count==act)
doit=1;
- if(doit) {
+ if (doit) {
ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE_APPLY);
break;
}
@@ -6167,19 +6177,19 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
case YKEY:
case ZKEY:
{
- if( (event->val == KM_PRESS) &&
+ if ( (event->val == KM_PRESS) &&
(event->shift == FALSE) &&
(event->ctrl == FALSE) &&
(event->oskey == FALSE)
) {
- for(but= block->buttons.first; but; but= but->next) {
+ for (but= block->buttons.first; but; but= but->next) {
- if(but->menu_key==event->type) {
- if(but->type == BUT) {
+ if (but->menu_key==event->type) {
+ if (but->type == BUT) {
/* mainly for operator buttons */
ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE_APPLY);
}
- else if(ELEM(but->type, BLOCK, PULLDOWN)) {
+ else if (ELEM(but->type, BLOCK, PULLDOWN)) {
/* open submenus (like right arrow key) */
ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE_OPEN);
}
@@ -6203,15 +6213,15 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
}
/* here we check return conditions for menus */
- if(block->flag & UI_BLOCK_LOOP) {
+ if (block->flag & UI_BLOCK_LOOP) {
/* if we click outside the block, verify if we clicked on the
* button that opened us, otherwise we need to close */
- if(inside==0) {
+ if (inside==0) {
uiSafetyRct *saferct= block->saferct.first;
- if(ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE) && event->val==KM_PRESS) {
- if(saferct && !BLI_in_rctf(&saferct->parent, event->x, event->y)) {
- if(block->flag & (UI_BLOCK_OUT_1))
+ if (ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE) && event->val==KM_PRESS) {
+ if (saferct && !BLI_in_rctf(&saferct->parent, event->x, event->y)) {
+ if (block->flag & (UI_BLOCK_OUT_1))
menu->menuretval= UI_RETURN_OK;
else
menu->menuretval= UI_RETURN_OUT;
@@ -6219,45 +6229,45 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
}
}
- if(menu->menuretval);
- else if(event->type==ESCKEY && event->val==KM_PRESS) {
+ if (menu->menuretval);
+ else if (event->type==ESCKEY && event->val==KM_PRESS) {
/* esc cancels this and all preceding menus */
menu->menuretval= UI_RETURN_CANCEL;
}
- else if(ELEM(event->type, RETKEY, PADENTER) && event->val==KM_PRESS) {
+ else if (ELEM(event->type, RETKEY, PADENTER) && event->val==KM_PRESS) {
/* enter will always close this block, we let the event
* get handled by the button if it is activated, otherwise we cancel */
- if(!ui_but_find_activated(ar))
+ if (!ui_but_find_activated(ar))
menu->menuretval= UI_RETURN_CANCEL | UI_RETURN_POPUP_OK;
}
else {
ui_mouse_motion_towards_check(block, menu, mx, my);
/* check mouse moving outside of the menu */
- if(inside==0 && (block->flag & UI_BLOCK_MOVEMOUSE_QUIT)) {
+ if (inside==0 && (block->flag & UI_BLOCK_MOVEMOUSE_QUIT)) {
uiSafetyRct *saferct;
/* check for all parent rects, enables arrowkeys to be used */
- for(saferct=block->saferct.first; saferct; saferct= saferct->next) {
+ for (saferct=block->saferct.first; saferct; saferct= saferct->next) {
/* for mouse move we only check our own rect, for other
* events we check all preceding block rects too to make
* arrow keys navigation work */
- if(event->type!=MOUSEMOVE || saferct==block->saferct.first) {
- if(BLI_in_rctf(&saferct->parent, (float)event->x, (float)event->y))
+ if (event->type!=MOUSEMOVE || saferct==block->saferct.first) {
+ if (BLI_in_rctf(&saferct->parent, (float)event->x, (float)event->y))
break;
- if(BLI_in_rctf(&saferct->safety, (float)event->x, (float)event->y))
+ if (BLI_in_rctf(&saferct->safety, (float)event->x, (float)event->y))
break;
}
}
/* strict check, and include the parent rect */
- if(!menu->dotowards && !saferct) {
- if(block->flag & (UI_BLOCK_OUT_1))
+ if (!menu->dotowards && !saferct) {
+ if (block->flag & (UI_BLOCK_OUT_1))
menu->menuretval= UI_RETURN_OK;
else
menu->menuretval= UI_RETURN_OUT;
}
- else if(menu->dotowards && event->type==MOUSEMOVE)
+ else if (menu->dotowards && event->type==MOUSEMOVE)
retval= WM_UI_HANDLER_BREAK;
}
}
@@ -6268,20 +6278,20 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
* buttons inside this region. disabled inside check .. not sure
* anymore why it was there? but it meant enter didn't work
* for example when mouse was not over submenu */
- if((/*inside &&*/ (!menu->menuretval || (menu->menuretval & UI_RETURN_UPDATE)) && retval == WM_UI_HANDLER_CONTINUE) || event->type == TIMER) {
+ if ((/*inside &&*/ (!menu->menuretval || (menu->menuretval & UI_RETURN_UPDATE)) && retval == WM_UI_HANDLER_CONTINUE) || event->type == TIMER) {
but= ui_but_find_activated(ar);
- if(but) {
+ if (but) {
ScrArea *ctx_area= CTX_wm_area(C);
ARegion *ctx_region= CTX_wm_region(C);
- if(menu->ctx_area) CTX_wm_area_set(C, menu->ctx_area);
- if(menu->ctx_region) CTX_wm_region_set(C, menu->ctx_region);
+ if (menu->ctx_area) CTX_wm_area_set(C, menu->ctx_area);
+ if (menu->ctx_region) CTX_wm_region_set(C, menu->ctx_region);
retval= ui_handle_button_event(C, event, but);
- if(menu->ctx_area) CTX_wm_area_set(C, ctx_area);
- if(menu->ctx_region) CTX_wm_region_set(C, ctx_region);
+ if (menu->ctx_area) CTX_wm_area_set(C, ctx_area);
+ if (menu->ctx_region) CTX_wm_region_set(C, ctx_region);
}
else
retval= ui_handle_button_over(C, event, ar);
@@ -6290,9 +6300,9 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
/* if we set a menu return value, ensure we continue passing this on to
* lower menus and buttons, so always set continue then, and if we are
* inside the region otherwise, ensure we swallow the event */
- if(menu->menuretval)
+ if (menu->menuretval)
return WM_UI_HANDLER_CONTINUE;
- else if(inside)
+ else if (inside)
return WM_UI_HANDLER_BREAK;
else
return retval;
@@ -6314,11 +6324,11 @@ static int ui_handle_menu_return_submenu(bContext *C, wmEvent *event, uiPopupBlo
data= but->active;
submenu= data->menu;
- if(submenu->menuretval) {
+ if (submenu->menuretval) {
/* first decide if we want to close our own menu cascading, if
* so pass on the sub menu return value to our own menu handle */
- if((submenu->menuretval & UI_RETURN_OK) || (submenu->menuretval & UI_RETURN_CANCEL)) {
- if(!(block->flag & UI_BLOCK_KEEP_OPEN)) {
+ if ((submenu->menuretval & UI_RETURN_OK) || (submenu->menuretval & UI_RETURN_CANCEL)) {
+ if (!(block->flag & UI_BLOCK_KEEP_OPEN)) {
menu->menuretval= submenu->menuretval;
menu->butretval= data->retval;
}
@@ -6330,7 +6340,7 @@ static int ui_handle_menu_return_submenu(bContext *C, wmEvent *event, uiPopupBlo
* will actually close the submenu too */
ui_handle_button_return_submenu(C, event, but);
- if(update)
+ if (update)
submenu->menuretval = 0;
}
@@ -6341,7 +6351,7 @@ static int ui_handle_menu_return_submenu(bContext *C, wmEvent *event, uiPopupBlo
ui_window_to_block(ar, block, &mx, &my);
ui_mouse_motion_towards_init(menu, mx, my, 1);
- if(menu->menuretval)
+ if (menu->menuretval)
return WM_UI_HANDLER_CONTINUE;
else
return WM_UI_HANDLER_BREAK;
@@ -6359,12 +6369,12 @@ static int ui_handle_menus_recursive(bContext *C, wmEvent *event, uiPopupBlockHa
data= (but)? but->active: NULL;
submenu= (data)? data->menu: NULL;
- if(submenu)
+ if (submenu)
retval= ui_handle_menus_recursive(C, event, submenu);
/* now handle events for our own menu */
- if(retval == WM_UI_HANDLER_CONTINUE || event->type == TIMER) {
- if(submenu && submenu->menuretval)
+ if (retval == WM_UI_HANDLER_CONTINUE || event->type == TIMER) {
+ if (submenu && submenu->menuretval)
retval= ui_handle_menu_return_submenu(C, event, menu);
else
retval= ui_handle_menu_event(C, event, menu, (submenu == NULL));
@@ -6385,26 +6395,26 @@ static int ui_handler_region(bContext *C, wmEvent *event, void *UNUSED(userdata)
ar= CTX_wm_region(C);
retval= WM_UI_HANDLER_CONTINUE;
- if(ar==NULL) return retval;
- if(ar->uiblocks.first==NULL) return retval;
+ if (ar==NULL) return retval;
+ if (ar->uiblocks.first==NULL) return retval;
/* either handle events for already activated button or try to activate */
but= ui_but_find_activated(ar);
retval= ui_handler_panel_region(C, event);
- if(retval == WM_UI_HANDLER_CONTINUE)
+ if (retval == WM_UI_HANDLER_CONTINUE)
retval= ui_handle_list_event(C, event, ar);
- if(retval == WM_UI_HANDLER_CONTINUE) {
- if(but)
+ if (retval == WM_UI_HANDLER_CONTINUE) {
+ if (but)
retval= ui_handle_button_event(C, event, but);
else
retval= ui_handle_button_over(C, event, ar);
}
/* re-enable tooltips */
- if(event->type == MOUSEMOVE && (event->x!=event->prevx || event->y!=event->prevy))
+ if (event->type == MOUSEMOVE && (event->x!=event->prevx || event->y!=event->prevy))
ui_blocks_set_tooltips(ar, 1);
/* delayed apply callbacks */
@@ -6419,17 +6429,17 @@ static void ui_handler_remove_region(bContext *C, void *UNUSED(userdata))
ARegion *ar;
ar= CTX_wm_region(C);
- if(ar == NULL) return;
+ if (ar == NULL) return;
uiFreeBlocks(C, &ar->uiblocks);
sc= CTX_wm_screen(C);
- if(sc == NULL) return;
+ if (sc == NULL) return;
/* delayed apply callbacks, but not for screen level regions, those
* we rather do at the very end after closing them all, which will
* be done in ui_handler_region/window */
- if(BLI_findindex(&sc->regionbase, ar) == -1)
+ if (BLI_findindex(&sc->regionbase, ar) == -1)
ui_apply_but_funcs_after(C);
}
@@ -6443,23 +6453,23 @@ static int ui_handler_region_menu(bContext *C, wmEvent *event, void *UNUSED(user
/* here we handle buttons at the window level, modal, for example
* while number sliding, text editing, or when a menu block is open */
ar= CTX_wm_menu(C);
- if(!ar)
+ if (!ar)
ar= CTX_wm_region(C);
but= ui_but_find_activated(ar);
- if(but) {
+ if (but) {
/* handle activated button events */
data= but->active;
- if(data->state == BUTTON_STATE_MENU_OPEN) {
+ if (data->state == BUTTON_STATE_MENU_OPEN) {
/* handle events for menus and their buttons recursively,
* this will handle events from the top to the bottom menu */
retval= ui_handle_menus_recursive(C, event, data->menu);
/* handle events for the activated button */
- if(retval == WM_UI_HANDLER_CONTINUE || event->type == TIMER) {
- if(data->menu->menuretval)
+ if (retval == WM_UI_HANDLER_CONTINUE || event->type == TIMER) {
+ if (data->menu->menuretval)
ui_handle_button_return_submenu(C, event, but);
else
ui_handle_button_event(C, event, but);
@@ -6472,7 +6482,7 @@ static int ui_handler_region_menu(bContext *C, wmEvent *event, void *UNUSED(user
}
/* re-enable tooltips */
- if(event->type == MOUSEMOVE && (event->x!=event->prevx || event->y!=event->prevy))
+ if (event->type == MOUSEMOVE && (event->x!=event->prevx || event->y!=event->prevy))
ui_blocks_set_tooltips(ar, 1);
/* delayed apply callbacks */
@@ -6490,25 +6500,25 @@ static int ui_handler_popup(bContext *C, wmEvent *event, void *userdata)
ui_handle_menus_recursive(C, event, menu);
/* free if done, does not free handle itself */
- if(menu->menuretval) {
+ if (menu->menuretval) {
/* copy values, we have to free first (closes region) */
uiPopupBlockHandle temp= *menu;
ui_popup_block_free(C, menu);
UI_remove_popup_handlers(&CTX_wm_window(C)->modalhandlers, menu);
- if((temp.menuretval & UI_RETURN_OK) || (temp.menuretval & UI_RETURN_POPUP_OK)) {
- if(temp.popup_func)
+ if ((temp.menuretval & UI_RETURN_OK) || (temp.menuretval & UI_RETURN_POPUP_OK)) {
+ if (temp.popup_func)
temp.popup_func(C, temp.popup_arg, temp.retvalue);
- if(temp.optype)
+ if (temp.optype)
WM_operator_name_call(C, temp.optype->idname, temp.opcontext, NULL);
}
- else if(temp.cancel_func)
+ else if (temp.cancel_func)
temp.cancel_func(temp.popup_arg);
}
else {
/* re-enable tooltips */
- if(event->type == MOUSEMOVE && (event->x!=event->prevx || event->y!=event->prevy))
+ if (event->type == MOUSEMOVE && (event->x!=event->prevx || event->y!=event->prevy))
ui_blocks_set_tooltips(menu->region, 1);
}
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 552d5b0d221..4b5612c6408 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -147,13 +147,13 @@ static void def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int
di = MEM_callocN(sizeof(DrawInfo), "drawinfo");
di->type= type;
- if(type == ICON_TYPE_TEXTURE) {
+ if (type == ICON_TYPE_TEXTURE) {
di->data.texture.x= xofs;
di->data.texture.y= yofs;
di->data.texture.w= size;
di->data.texture.h= size;
}
- else if(type == ICON_TYPE_BUFFER) {
+ else if (type == ICON_TYPE_BUFFER) {
iimg = MEM_mallocN(sizeof(IconImage), "icon_img");
iimg->rect = MEM_mallocN(size*size*sizeof(unsigned int), "icon_rect");
iimg->w = size;
@@ -476,6 +476,7 @@ static void init_brush_icons(void)
INIT_BRUSH_ICON(ICON_BRUSH_BLOB, blob);
INIT_BRUSH_ICON(ICON_BRUSH_BLUR, blur);
INIT_BRUSH_ICON(ICON_BRUSH_CLAY, clay);
+ INIT_BRUSH_ICON(ICON_BRUSH_CLAY_STRIPS, claystrips);
INIT_BRUSH_ICON(ICON_BRUSH_CLONE, clone);
INIT_BRUSH_ICON(ICON_BRUSH_CREASE, crease);
INIT_BRUSH_ICON(ICON_BRUSH_DARKEN, darken);
@@ -516,7 +517,7 @@ static void init_internal_icons(void)
if (icondir) {
BLI_join_dirfile(iconfilestr, sizeof(iconfilestr), icondir, btheme->tui.iconfile);
bbuf = IMB_loadiffname(iconfilestr, IB_rect); /* if the image is missing bbuf will just be NULL */
- if(bbuf && (bbuf->x < ICON_IMAGE_W || bbuf->y < ICON_IMAGE_H)) {
+ if (bbuf && (bbuf->x < ICON_IMAGE_W || bbuf->y < ICON_IMAGE_H)) {
printf("\n***WARNING***\nIcons file %s too small.\nUsing built-in Icons instead\n", iconfilestr);
IMB_freeImBuf(bbuf);
bbuf= NULL;
@@ -526,21 +527,21 @@ static void init_internal_icons(void)
printf("%s: 'icons' data path not found, continuing\n", __func__);
}
}
- if(bbuf==NULL)
+ if (bbuf==NULL)
bbuf = IMB_ibImageFromMemory((unsigned char*)datatoc_blender_icons_png, datatoc_blender_icons_png_size, IB_rect, "<blender icons>");
- if(bbuf) {
+ if (bbuf) {
/* free existing texture if any */
- if(icongltex.id) {
+ if (icongltex.id) {
glDeleteTextures(1, &icongltex.id);
icongltex.id= 0;
}
/* we only use a texture for cards with non-power of two */
- if(GPU_non_power_of_two_support()) {
+ if (GPU_non_power_of_two_support()) {
glGenTextures(1, &icongltex.id);
- if(icongltex.id) {
+ if (icongltex.id) {
icongltex.w = bbuf->x;
icongltex.h = bbuf->y;
icongltex.invw = 1.0f/bbuf->x;
@@ -552,7 +553,7 @@ static void init_internal_icons(void)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glBindTexture(GL_TEXTURE_2D, 0);
- if(glGetError() == GL_OUT_OF_MEMORY) {
+ if (glGetError() == GL_OUT_OF_MEMORY) {
glDeleteTextures(1, &icongltex.id);
icongltex.id= 0;
}
@@ -560,12 +561,12 @@ static void init_internal_icons(void)
}
}
- if(icongltex.id)
+ if (icongltex.id)
icontype= ICON_TYPE_TEXTURE;
else
icontype= ICON_TYPE_BUFFER;
- if(bbuf) {
+ if (bbuf) {
for (y=0; y<ICON_GRID_ROWS; y++) {
for (x=0; x<ICON_GRID_COLS; x++) {
def_internal_icon(bbuf, BIFICONID_FIRST + y*ICON_GRID_COLS + x,
@@ -603,21 +604,21 @@ static void init_iconfile_list(struct ListBase *list)
list->first = list->last = NULL;
icondir = BLI_get_folder(BLENDER_DATAFILES, "icons");
- if(icondir==NULL)
+ if (icondir==NULL)
return;
/* since BLI_dir_contents changes the current working directory, restore it
* back to old value afterwards */
- if(!BLI_current_working_dir(olddir, sizeof(olddir)))
+ if (!BLI_current_working_dir(olddir, sizeof(olddir)))
restoredir = 0;
totfile = BLI_dir_contents(icondir, &dir);
if (restoredir && !chdir(olddir)) {} /* fix warning about checking return value */
- for(i=0; i<totfile; i++) {
- if( (dir[i].type & S_IFREG) ) {
+ for (i=0; i<totfile; i++) {
+ if ( (dir[i].type & S_IFREG) ) {
char *filename = dir[i].relname;
- if(BLI_testextensie(filename, ".png")) {
+ if (BLI_testextensie(filename, ".png")) {
/* loading all icons on file start is overkill & slows startup
* its possible they change size after blender load anyway. */
#if 0
@@ -630,7 +631,7 @@ static void init_iconfile_list(struct ListBase *list)
BLI_join_dirfile(iconfilestr, sizeof(iconfilestr), icondir, filename);
bbuf= IMB_loadiffname(iconfilestr, IB_rect);
- if(bbuf) {
+ if (bbuf) {
ifilex = bbuf->x;
ifiley = bbuf->y;
IMB_freeImBuf(bbuf);
@@ -677,7 +678,7 @@ static void free_iconfile_list(struct ListBase *list)
{
IconFile *ifile=NULL, *next_ifile=NULL;
- for(ifile=list->first; ifile; ifile=next_ifile) {
+ for (ifile=list->first; ifile; ifile=next_ifile) {
next_ifile = ifile->next;
BLI_freelinkN(list, ifile);
}
@@ -688,7 +689,7 @@ int UI_iconfile_get_index(const char *filename)
IconFile *ifile;
ListBase *list=&(iconfilelist);
- for(ifile=list->first; ifile; ifile=ifile->next) {
+ for (ifile=list->first; ifile; ifile=ifile->next) {
if (BLI_path_cmp(filename, ifile->filename) == 0) {
return ifile->index;
}
@@ -708,7 +709,7 @@ ListBase *UI_iconfile_list(void)
void UI_icons_free(void)
{
#ifndef WITH_HEADLESS
- if(icongltex.id) {
+ if (icongltex.id) {
glDeleteTextures(1, &icongltex.id);
icongltex.id= 0;
}
@@ -722,9 +723,9 @@ void UI_icons_free_drawinfo(void *drawinfo)
{
DrawInfo *di = drawinfo;
- if(di) {
- if(di->type == ICON_TYPE_BUFFER) {
- if(di->data.buffer.image) {
+ if (di) {
+ if (di->type == ICON_TYPE_BUFFER) {
+ if (di->data.buffer.image) {
MEM_freeN(di->data.buffer.image->rect);
MEM_freeN(di->data.buffer.image);
}
@@ -859,24 +860,24 @@ static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect),
ImBuf *ima= NULL;
/* sanity check */
- if(w<=0 || h<=0 || w>2000 || h>2000) {
+ if (w<=0 || h<=0 || w>2000 || h>2000) {
printf("%s: icons are %i x %i pixels?\n", __func__, w, h);
BLI_assert(!"invalid icon size");
return;
}
/* modulate color */
- if(alpha != 1.0f)
+ if (alpha != 1.0f)
glPixelTransferf(GL_ALPHA_SCALE, alpha);
- if(rgb) {
+ if (rgb) {
glPixelTransferf(GL_RED_SCALE, rgb[0]);
glPixelTransferf(GL_GREEN_SCALE, rgb[1]);
glPixelTransferf(GL_BLUE_SCALE, rgb[2]);
}
/* rect contains image in 'rendersize', we only scale if needed */
- if(rw!=w && rh!=h) {
+ if (rw!=w && rh!=h) {
/* first allocate imbuf for scaling and copy preview into it */
ima = IMB_allocImBuf(rw, rh, 32, IB_rect);
memcpy(ima->rect, rect, rw*rh*sizeof(unsigned int));
@@ -885,7 +886,7 @@ static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect),
}
/* draw */
- if(is_preview) {
+ if (is_preview) {
glaDrawPixelsSafe(x, y, w, h, w, GL_RGBA, GL_UNSIGNED_BYTE, rect);
}
else {
@@ -893,14 +894,14 @@ static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect),
glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, rect);
}
- if(ima)
+ if (ima)
IMB_freeImBuf(ima);
/* restore color */
- if(alpha != 0.0f)
+ if (alpha != 0.0f)
glPixelTransferf(GL_ALPHA_SCALE, 1.0f);
- if(rgb) {
+ if (rgb) {
glPixelTransferf(GL_RED_SCALE, 1.0f);
glPixelTransferf(GL_GREEN_SCALE, 1.0f);
glPixelTransferf(GL_BLUE_SCALE, 1.0f);
@@ -911,7 +912,7 @@ static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy
{
float x1, x2, y1, y2;
- if(rgb) glColor4f(rgb[0], rgb[1], rgb[2], alpha);
+ if (rgb) glColor4f(rgb[0], rgb[1], rgb[2], alpha);
else glColor4f(1.0f, 1.0f, 1.0f, alpha);
x1= ix*icongltex.invw;
@@ -981,29 +982,29 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al
w = (int)(fdraw_size/aspect + 0.5f);
h = (int)(fdraw_size/aspect + 0.5f);
- if(di->type == ICON_TYPE_VECTOR) {
+ if (di->type == ICON_TYPE_VECTOR) {
/* vector icons use the uiBlock transformation, they are not drawn
* with untransformed coordinates like the other icons */
di->data.vector.func((int)x, (int)y, ICON_DEFAULT_HEIGHT, ICON_DEFAULT_HEIGHT, 1.0f);
}
- else if(di->type == ICON_TYPE_TEXTURE) {
+ else if (di->type == ICON_TYPE_TEXTURE) {
icon_draw_texture(x, y, (float)w, (float)h, di->data.texture.x, di->data.texture.y,
di->data.texture.w, di->data.texture.h, alpha, rgb);
}
- else if(di->type == ICON_TYPE_BUFFER) {
+ else if (di->type == ICON_TYPE_BUFFER) {
/* it is a builtin icon */
iimg= di->data.buffer.image;
- if(!iimg->rect) return; /* something has gone wrong! */
+ if (!iimg->rect) return; /* something has gone wrong! */
icon_draw_rect(x, y, w, h, aspect, iimg->w, iimg->h, iimg->rect, alpha, rgb, is_preview);
}
- else if(di->type == ICON_TYPE_PREVIEW) {
+ else if (di->type == ICON_TYPE_PREVIEW) {
PreviewImage* pi = BKE_previewimg_get((ID*)icon->obj);
- if(pi) {
+ if (pi) {
/* no create icon on this level in code */
- if(!pi->rect[size]) return; /* something has gone wrong! */
+ if (!pi->rect[size]) return; /* something has gone wrong! */
/* preview images use premul alpha ... */
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
@@ -1040,13 +1041,13 @@ static void ui_id_brush_render(bContext *C, ID *id)
PreviewImage *pi = BKE_previewimg_get(id);
enum eIconSizes i;
- if(!pi)
+ if (!pi)
return;
- for(i = 0; i < NUM_ICON_SIZES; i++) {
+ for (i = 0; i < NUM_ICON_SIZES; i++) {
/* check if rect needs to be created; changed
* only set by dynamic icons */
- if((pi->changed[i] || !pi->rect[i])) {
+ if ((pi->changed[i] || !pi->rect[i])) {
icon_set_image(C, id, pi, i);
pi->changed[i] = 0;
}
@@ -1058,7 +1059,7 @@ static int ui_id_brush_get_icon(bContext *C, ID *id)
{
Brush *br = (Brush*)id;
- if(br->flag & BRUSH_CUSTOM_ICON) {
+ if (br->flag & BRUSH_CUSTOM_ICON) {
BKE_icon_getid(id);
ui_id_brush_render(C, id);
}
@@ -1072,34 +1073,34 @@ static int ui_id_brush_get_icon(bContext *C, ID *id)
* be strictly in one paint mode only to avoid
* checking various context stuff here */
- if(CTX_wm_view3d(C) && ob) {
- if(ob->mode & OB_MODE_SCULPT)
+ if (CTX_wm_view3d(C) && ob) {
+ if (ob->mode & OB_MODE_SCULPT)
mode = OB_MODE_SCULPT;
- else if(ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT))
+ else if (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT))
mode = OB_MODE_VERTEX_PAINT;
- else if(ob->mode & OB_MODE_TEXTURE_PAINT)
+ else if (ob->mode & OB_MODE_TEXTURE_PAINT)
mode = OB_MODE_TEXTURE_PAINT;
}
- else if((sima = CTX_wm_space_image(C)) &&
+ else if ((sima = CTX_wm_space_image(C)) &&
(sima->flag & SI_DRAWTOOL)) {
mode = OB_MODE_TEXTURE_PAINT;
}
/* reset the icon */
- if(mode == OB_MODE_SCULPT) {
+ if (mode == OB_MODE_SCULPT) {
items = brush_sculpt_tool_items;
tool = br->sculpt_tool;
}
- else if(mode == OB_MODE_VERTEX_PAINT) {
+ else if (mode == OB_MODE_VERTEX_PAINT) {
items = brush_vertex_tool_items;
tool = br->vertexpaint_tool;
}
- else if(mode == OB_MODE_TEXTURE_PAINT) {
+ else if (mode == OB_MODE_TEXTURE_PAINT) {
items = brush_image_tool_items;
tool = br->imagepaint_tool;
}
- if(!items || !RNA_enum_icon_from_value(items, tool, &id->icon_id))
+ if (!items || !RNA_enum_icon_from_value(items, tool, &id->icon_id))
id->icon_id = 0;
}
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index dd4bbc75249..a0935e7abdd 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -68,6 +68,7 @@ typedef enum {
UI_WTYPE_NUMBER,
UI_WTYPE_SLIDER,
UI_WTYPE_EXEC,
+ UI_WTYPE_TOOLTIP,
/* strings */
UI_WTYPE_NAME,
@@ -84,7 +85,7 @@ typedef enum {
UI_WTYPE_PULLDOWN,
UI_WTYPE_MENU_ITEM,
UI_WTYPE_MENU_BACK,
-
+
/* specials */
UI_WTYPE_ICON,
UI_WTYPE_SWATCH,
@@ -465,6 +466,8 @@ extern int ui_button_is_active(struct ARegion *ar);
void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3);
void ui_draw_anti_roundbox(int mode, float minx, float miny, float maxx, float maxy, float rad);
void ui_draw_menu_back(struct uiStyle *style, uiBlock *block, rcti *rect);
+uiWidgetColors* ui_tooltip_get_theme(void);
+void ui_draw_tooltip_background(uiStyle *UNUSED(style), uiBlock *block, rcti *rect);
void ui_draw_search_back(struct uiStyle *style, uiBlock *block, rcti *rect);
int ui_link_bezier_points(rcti *rect, float coord_array[][2], int resol);
void ui_draw_link_bezier(rcti *rect);
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index a0dbecbd4a6..88db06c5ec3 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -172,7 +172,7 @@ static const char *ui_item_name_add_colon(const char *name, char namestr[UI_MAX_
{
int len= strlen(name);
- if(len != 0 && len+1 < UI_MAX_NAME_STR) {
+ if (len != 0 && len+1 < UI_MAX_NAME_STR) {
BLI_strncpy(namestr, name, UI_MAX_NAME_STR);
namestr[len]= ':';
namestr[len+1]= '\0';
@@ -185,23 +185,23 @@ static const char *ui_item_name_add_colon(const char *name, char namestr[UI_MAX_
static int ui_item_fit(int item, int pos, int all, int available, int last, int alignment, int *offset)
{
/* available == 0 is unlimited */
- if(available == 0)
+ if (available == 0)
return item;
- if(offset)
+ if (offset)
*offset= 0;
- if(all > available) {
+ if (all > available) {
/* contents is bigger than available space */
- if(last)
+ if (last)
return available-pos;
else
return (item*available)/all;
}
else {
/* contents is smaller or equal to available space */
- if(alignment == UI_LAYOUT_ALIGN_EXPAND) {
- if(last)
+ if (alignment == UI_LAYOUT_ALIGN_EXPAND) {
+ if (last)
return available-pos;
else
return (item*available)/all;
@@ -225,9 +225,9 @@ static int ui_text_icon_width(uiLayout *layout, const char *name, int icon, int
{
int variable = ui_layout_vary_direction(layout) == UI_ITEM_VARY_X;
- if(icon && !name[0])
+ if (icon && !name[0])
return UI_UNIT_X; /* icon only */
- else if(icon)
+ else if (icon)
return (variable)? UI_GetStringWidth(name) + (compact? 5: 10) + UI_UNIT_X: 10*UI_UNIT_X; /* icon + text */
else
return (variable)? UI_GetStringWidth(name) + (compact? 5: 10) + UI_UNIT_X: 10*UI_UNIT_X; /* text only */
@@ -235,37 +235,37 @@ static int ui_text_icon_width(uiLayout *layout, const char *name, int icon, int
static void ui_item_size(uiItem *item, int *r_w, int *r_h)
{
- if(item->type == ITEM_BUTTON) {
+ if (item->type == ITEM_BUTTON) {
uiButtonItem *bitem= (uiButtonItem*)item;
- if(r_w) *r_w= bitem->but->x2 - bitem->but->x1;
- if(r_h) *r_h= bitem->but->y2 - bitem->but->y1;
+ if (r_w) *r_w= bitem->but->x2 - bitem->but->x1;
+ if (r_h) *r_h= bitem->but->y2 - bitem->but->y1;
}
else {
uiLayout *litem= (uiLayout*)item;
- if(r_w) *r_w= litem->w;
- if(r_h) *r_h= litem->h;
+ if (r_w) *r_w= litem->w;
+ if (r_h) *r_h= litem->h;
}
}
static void ui_item_offset(uiItem *item, int *r_x, int *r_y)
{
- if(item->type == ITEM_BUTTON) {
+ if (item->type == ITEM_BUTTON) {
uiButtonItem *bitem= (uiButtonItem*)item;
- if(r_x) *r_x= bitem->but->x1;
- if(r_y) *r_y= bitem->but->y1;
+ if (r_x) *r_x= bitem->but->x1;
+ if (r_y) *r_y= bitem->but->y1;
}
else {
- if(r_x) *r_x= 0;
- if(r_y) *r_y= 0;
+ if (r_x) *r_x= 0;
+ if (r_y) *r_y= 0;
}
}
static void ui_item_position(uiItem *item, int x, int y, int w, int h)
{
- if(item->type == ITEM_BUTTON) {
+ if (item->type == ITEM_BUTTON) {
uiButtonItem *bitem= (uiButtonItem*)item;
bitem->but->x1= x;
@@ -308,7 +308,7 @@ static uiLayout *ui_item_local_sublayout(uiLayout *test, uiLayout *layout, int a
{
uiLayout *sub;
- if(ui_layout_local_dir(test) == UI_LAYOUT_HORIZONTAL)
+ if (ui_layout_local_dir(test) == UI_LAYOUT_HORIZONTAL)
sub= uiLayoutRow(layout, align);
else
sub= uiLayoutColumn(layout, align);
@@ -327,16 +327,16 @@ static void ui_layer_but_cb(bContext *C, void *arg_but, void *arg_index)
int shift= win->eventstate->shift;
int len= RNA_property_array_length(ptr, prop);
- if(!shift) {
+ if (!shift) {
RNA_property_boolean_set_index(ptr, prop, index, TRUE);
- for(i=0; i<len; i++)
- if(i != index)
+ for (i=0; i<len; i++)
+ if (i != index)
RNA_property_boolean_set_index(ptr, prop, i, 0);
RNA_property_update(C, ptr, prop);
- for(cbut=but->block->buttons.first; cbut; cbut=cbut->next)
+ for (cbut=but->block->buttons.first; cbut; cbut=cbut->next)
ui_check_but(cbut);
}
}
@@ -359,11 +359,11 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
uiBlockSetCurLayout(block, sub);
/* create label */
- if(name[0])
+ if (name[0])
uiDefBut(block, LABEL, 0, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
/* create buttons */
- if(type == PROP_BOOLEAN && ELEM(subtype, PROP_LAYER, PROP_LAYER_MEMBER)) {
+ if (type == PROP_BOOLEAN && ELEM(subtype, PROP_LAYER, PROP_LAYER_MEMBER)) {
/* special check for layer layout */
int butw, buth, unit;
int cols= (len >= 20)? 2: 1;
@@ -376,28 +376,28 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
butw= unit;
buth= unit;
- if(ptr->type == &RNA_Armature) {
+ if (ptr->type == &RNA_Armature) {
bArmature *arm= (bArmature *)ptr->data;
layer_used= arm->layer_used;
}
- for(b=0; b<cols; b++) {
+ for (b=0; b<cols; b++) {
uiBlockBeginAlign(block);
- for(a=0; a<colbuts; a++) {
- if(layer_used & (1<<(a+b*colbuts))) icon= ICON_LAYER_USED;
+ for (a=0; a<colbuts; a++) {
+ if (layer_used & (1<<(a+b*colbuts))) icon= ICON_LAYER_USED;
else icon= ICON_BLANK1;
- but= uiDefAutoButR(block, ptr, prop, a+b*colbuts, "", icon, x + butw*a, y+buth, butw, buth);
- if(subtype == PROP_LAYER_MEMBER)
+ but = uiDefAutoButR(block, ptr, prop, a+b*colbuts, "", icon, x + butw*a, y+buth, butw, buth);
+ if (subtype == PROP_LAYER_MEMBER)
uiButSetFunc(but, ui_layer_but_cb, but, SET_INT_IN_POINTER(a+b*colbuts));
}
- for(a=0; a<colbuts; a++) {
- if(layer_used & (1<<(a+len/2+b*colbuts))) icon= ICON_LAYER_USED;
+ for (a=0; a<colbuts; a++) {
+ if (layer_used & (1<<(a+len/2+b*colbuts))) icon= ICON_LAYER_USED;
else icon= ICON_BLANK1;
- but= uiDefAutoButR(block, ptr, prop, a+len/2+b*colbuts, "", icon, x + butw*a, y, butw, buth);
- if(subtype == PROP_LAYER_MEMBER)
+ but = uiDefAutoButR(block, ptr, prop, a+len/2+b*colbuts, "", icon, x + butw*a, y, butw, buth);
+ if (subtype == PROP_LAYER_MEMBER)
uiButSetFunc(but, ui_layer_but_cb, but, SET_INT_IN_POINTER(a+len/2+b*colbuts));
}
uiBlockEndAlign(block);
@@ -405,7 +405,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
x += colbuts*butw + style->buttonspacex;
}
}
- else if(subtype == PROP_MATRIX) {
+ else if (subtype == PROP_MATRIX) {
int totdim, dim_size[3]; /* 3 == RNA_MAX_ARRAY_DIMENSION */
int row, col;
@@ -417,16 +417,16 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
w /= dim_size[0];
/* h /= dim_size[1]; */ /* UNUSED */
- for(a=0; a<len; a++) {
+ for (a=0; a<len; a++) {
col= a % dim_size[0];
row= a / dim_size[0];
- but= uiDefAutoButR(block, ptr, prop, a, "", ICON_NONE, x + w*col, y+(dim_size[1]*UI_UNIT_Y)-(row*UI_UNIT_Y), w, UI_UNIT_Y);
- if(slider && but->type==NUM)
+ but = uiDefAutoButR(block, ptr, prop, a, "", ICON_NONE, x + w*col, y+(dim_size[1]*UI_UNIT_Y)-(row*UI_UNIT_Y), w, UI_UNIT_Y);
+ if (slider && but->type==NUM)
but->type= NUMSLI;
}
}
- else if(subtype == PROP_DIRECTION) {
+ else if (subtype == PROP_DIRECTION) {
uiDefButR_prop(block, BUT_NORMAL, 0, name, x, y, UI_UNIT_X*3, UI_UNIT_Y*3, ptr, prop, 0, 0, 0, -1, -1, NULL);
}
else {
@@ -434,7 +434,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
* to work with common cases, but may need to be re-worked */
/* special case, boolean array in a menu, this could be used in a more generic way too */
- if(ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA) && !expand) {
+ if (ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA) && !expand) {
uiDefAutoButR(block, ptr, prop, -1, "", ICON_NONE, 0, 0, w, UI_UNIT_Y);
}
else {
@@ -445,29 +445,29 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
/* layout for known array subtypes */
char str[3]= {'\0'};
- if(!icon_only) {
- if(type != PROP_BOOLEAN) {
+ if (!icon_only) {
+ if (type != PROP_BOOLEAN) {
str[1]= ':';
}
}
/* show checkboxes for rna on a non-emboss block (menu for eg) */
- if(type == PROP_BOOLEAN && ELEM(layout->root->block->dt, UI_EMBOSSN, UI_EMBOSSP)) {
+ if (type == PROP_BOOLEAN && ELEM(layout->root->block->dt, UI_EMBOSSN, UI_EMBOSSP)) {
boolarr= MEM_callocN(sizeof(int)*len, "ui_item_array");
RNA_property_boolean_get_array(ptr, prop, boolarr);
}
- for(a=0; a<len; a++) {
- if(!icon_only) str[0]= RNA_property_array_item_char(prop, a);
- if(boolarr) icon= boolarr[a] ? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT;
- but= uiDefAutoButR(block, ptr, prop, a, str, icon, 0, 0, w, UI_UNIT_Y);
- if(slider && but->type==NUM)
+ for (a=0; a<len; a++) {
+ if (!icon_only) str[0]= RNA_property_array_item_char(prop, a);
+ if (boolarr) icon= boolarr[a] ? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT;
+ but = uiDefAutoButR(block, ptr, prop, a, str, icon, 0, 0, w, UI_UNIT_Y);
+ if (slider && but->type==NUM)
but->type= NUMSLI;
- if(toggle && but->type==OPTION)
+ if (toggle && but->type==OPTION)
but->type= TOG;
}
- if(boolarr) {
+ if (boolarr) {
MEM_freeN(boolarr);
}
}
@@ -486,8 +486,8 @@ static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *pt
RNA_property_enum_items_gettexted(block->evil_C, ptr, prop, &item, &totitem, &free);
uiBlockSetCurLayout(block, ui_item_local_sublayout(layout, layout, 1));
- for(a=0; a<totitem; a++) {
- if(!item[a].identifier[0])
+ for (a=0; a<totitem; a++) {
+ if (!item[a].identifier[0])
continue;
name= (!uiname || uiname[0])? item[a].name: "";
@@ -495,14 +495,14 @@ static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *pt
value= item[a].value;
itemw= ui_text_icon_width(block->curlayout, name, icon, 0);
- if(icon && name[0] && !icon_only)
- but= uiDefIconTextButR_prop(block, ROW, 0, icon, name, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
- else if(icon)
- but= uiDefIconButR_prop(block, ROW, 0, icon, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
+ if (icon && name[0] && !icon_only)
+ but = uiDefIconTextButR_prop(block, ROW, 0, icon, name, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
+ else if (icon)
+ but = uiDefIconButR_prop(block, ROW, 0, icon, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
else
- but= uiDefButR_prop(block, ROW, 0, name, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
+ but = uiDefButR_prop(block, ROW, 0, name, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL);
- if(ui_layout_local_dir(layout) != UI_LAYOUT_HORIZONTAL)
+ if (ui_layout_local_dir(layout) != UI_LAYOUT_HORIZONTAL)
but->flag |= UI_TEXT_LEFT;
}
uiBlockSetCurLayout(block, layout);
@@ -535,7 +535,7 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, const char *n
sub= uiLayoutRow(layout, 0);
uiBlockSetCurLayout(block, sub);
- if(name[0]) {
+ if (name[0]) {
/* XXX UI_GetStringWidth is not accurate */
#if 0
labelw = UI_GetStringWidth(name);
@@ -549,33 +549,33 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, const char *n
type= RNA_property_type(prop);
subtype= RNA_property_subtype(prop);
- if(subtype == PROP_FILEPATH || subtype == PROP_DIRPATH) {
+ if (subtype == PROP_FILEPATH || subtype == PROP_DIRPATH) {
uiBlockSetCurLayout(block, uiLayoutRow(sub, 1));
uiDefAutoButR(block, ptr, prop, index, "", icon, x, y, w-UI_UNIT_X, h);
/* BUTTONS_OT_file_browse calls uiFileBrowseContextProperty */
- but= uiDefIconButO(block, BUT, subtype==PROP_DIRPATH ?
+ but = uiDefIconButO(block, BUT, subtype==PROP_DIRPATH ?
"BUTTONS_OT_directory_browse" :
"BUTTONS_OT_file_browse",
WM_OP_INVOKE_DEFAULT, ICON_FILESEL, x, y, UI_UNIT_X, h, NULL);
}
- else if(flag & UI_ITEM_R_EVENT) {
+ else if (flag & UI_ITEM_R_EVENT) {
uiDefButR_prop(block, KEYEVT, 0, name, x, y, w, h, ptr, prop, index, 0, 0, -1, -1, NULL);
}
- else if(flag & UI_ITEM_R_FULL_EVENT) {
- if(RNA_struct_is_a(ptr->type, &RNA_KeyMapItem)) {
+ else if (flag & UI_ITEM_R_FULL_EVENT) {
+ if (RNA_struct_is_a(ptr->type, &RNA_KeyMapItem)) {
char buf[128];
WM_keymap_item_to_string(ptr->data, buf, sizeof(buf));
- but= uiDefButR_prop(block, HOTKEYEVT, 0, buf, x, y, w, h, ptr, prop, 0, 0, 0, -1, -1, NULL);
+ but = uiDefButR_prop(block, HOTKEYEVT, 0, buf, x, y, w, h, ptr, prop, 0, 0, 0, -1, -1, NULL);
uiButSetFunc(but, ui_keymap_but_cb, but, NULL);
if (flag & UI_ITEM_R_IMMEDIATE)
uiButSetFlag(but, UI_BUT_IMMEDIATE);
}
}
else
- but= uiDefAutoButR(block, ptr, prop, index, (type == PROP_ENUM && !(flag & UI_ITEM_R_ICON_ONLY))? NULL: "", icon, x, y, w, h);
+ but = uiDefAutoButR(block, ptr, prop, index, (type == PROP_ENUM && !(flag & UI_ITEM_R_ICON_ONLY))? NULL: "", icon, x, y, w, h);
uiBlockSetCurLayout(block, layout);
return but;
@@ -590,16 +590,16 @@ void uiFileBrowseContextProperty(const bContext *C, PointerRNA *ptr, PropertyRNA
memset(ptr, 0, sizeof(*ptr));
*prop= NULL;
- if(!ar)
+ if (!ar)
return;
- for(block=ar->uiblocks.first; block; block=block->next) {
- for(but=block->buttons.first; but; but= but->next) {
+ for (block=ar->uiblocks.first; block; block=block->next) {
+ for (but=block->buttons.first; but; but= but->next) {
prevbut= but->prev;
/* find the button before the active one */
- if((but->flag & UI_BUT_LAST_ACTIVE) && prevbut && prevbut->rnapoin.data) {
- if(RNA_property_type(prevbut->rnaprop) == PROP_STRING) {
+ if ((but->flag & UI_BUT_LAST_ACTIVE) && prevbut && prevbut->rnapoin.data) {
+ if (RNA_property_type(prevbut->rnaprop) == PROP_STRING) {
*ptr= prevbut->rnapoin;
*prop= prevbut->rnaprop;
return;
@@ -620,12 +620,12 @@ static void ui_item_disabled(uiLayout *layout, const char *name)
uiBlockSetCurLayout(block, layout);
- if(!name)
+ if (!name)
name= "";
w= ui_text_icon_width(layout, name, 0, 0);
- but= uiDefBut(block, LABEL, 0, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+ but = uiDefBut(block, LABEL, 0, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
but->flag |= UI_BUT_DISABLED;
but->lock = 1;
but->lockstr = "";
@@ -638,11 +638,14 @@ PointerRNA uiItemFullO_ptr(uiLayout *layout, wmOperatorType *ot, const char *nam
uiBut *but;
int w;
- if(!name) {
- name= IFACE_(ot->name);
+ if (!name) {
+ if (ot && ot->srna)
+ name = RNA_struct_ui_name(ot->srna);
+ else
+ name = "";
}
- if(layout->root->type == UI_LAYOUT_MENU && !icon)
+ if (layout->root->type == UI_LAYOUT_MENU && !icon)
icon= ICON_BLANK1;
/* create button */
@@ -654,7 +657,7 @@ PointerRNA uiItemFullO_ptr(uiLayout *layout, wmOperatorType *ot, const char *nam
uiBlockSetEmboss(block, UI_EMBOSSN);
/* create the button */
- if(icon) {
+ if (icon) {
if (name[0]) {
but = uiDefIconTextButO_ptr(block, BUT, ot, context, icon, name, 0, 0, w, UI_UNIT_Y, NULL);
}
@@ -663,26 +666,26 @@ PointerRNA uiItemFullO_ptr(uiLayout *layout, wmOperatorType *ot, const char *nam
}
}
else {
- but= uiDefButO_ptr(block, BUT, ot, context, name, 0, 0, w, UI_UNIT_Y, NULL);
+ but = uiDefButO_ptr(block, BUT, ot, context, name, 0, 0, w, UI_UNIT_Y, NULL);
}
assert(but->optype != NULL);
/* text alignment for toolbar buttons */
- if((layout->root->type == UI_LAYOUT_TOOLBAR) && !icon)
+ if ((layout->root->type == UI_LAYOUT_TOOLBAR) && !icon)
but->flag |= UI_TEXT_LEFT;
if (flag & UI_ITEM_R_NO_BG)
uiBlockSetEmboss(block, UI_EMBOSS);
- if(layout->redalert)
+ if (layout->redalert)
uiButSetFlag(but, UI_BUT_REDALERT);
/* assign properties */
- if(properties || (flag & UI_ITEM_O_RETURN_PROPS)) {
+ if (properties || (flag & UI_ITEM_O_RETURN_PROPS)) {
PointerRNA *opptr= uiButGetOperatorPtrRNA(but);
- if(properties) {
+ if (properties) {
opptr->data= properties;
}
else {
@@ -730,7 +733,7 @@ static void uiItemEnumO_ptr__internal(uiLayout *layout, wmOperatorType *ot, cons
WM_operator_properties_create_ptr(&ptr, ot);
RNA_property_enum_set(&ptr, prop, value);
- if(!name)
+ if (!name)
name = ui_menu_enumpropname(layout, &ptr, prop, value);
uiItemFullO_ptr(layout, ot, name, icon, ptr.data, layout->root->opcontext, 0);
@@ -752,7 +755,7 @@ void uiItemEnumO_ptr(uiLayout *layout, wmOperatorType *ot, const char *name, int
RNA_property_enum_set(&ptr, prop, value);
- if(!name)
+ if (!name)
name = ui_menu_enumpropname(layout, &ptr, prop, value);
uiItemFullO_ptr(layout, ot, name, icon, ptr.data, layout->root->opcontext, 0);
@@ -761,7 +764,7 @@ void uiItemEnumO(uiLayout *layout, const char *opname, const char *name, int ico
{
wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
- if(ot) {
+ if (ot) {
uiItemEnumO_ptr(layout, ot, name, icon, propname, value);
}
else {
@@ -780,7 +783,7 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname
uiBut *bt;
uiBlock *block= layout->root->block;
- if(!ot || !ot->srna) {
+ if (!ot || !ot->srna) {
ui_item_disabled(layout, opname);
RNA_warning("%s '%s'", ot ? "unknown operator" : "operator missing srna", opname);
return;
@@ -792,7 +795,7 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname
/* don't let bad properties slip through */
BLI_assert((prop == NULL) || (RNA_property_type(prop) == PROP_ENUM));
- if(prop && RNA_property_type(prop) == PROP_ENUM) {
+ if (prop && RNA_property_type(prop) == PROP_ENUM) {
EnumPropertyItem *item;
int totitem, i, free;
uiLayout *split= uiLayoutSplit(layout, 0, 0);
@@ -800,13 +803,13 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname
RNA_property_enum_items_gettexted(block->evil_C, &ptr, prop, &item, &totitem, &free);
- for(i=0; i<totitem; i++) {
- if(item[i].identifier[0]) {
- if(properties) {
+ for (i=0; i<totitem; i++) {
+ if (item[i].identifier[0]) {
+ if (properties) {
PointerRNA tptr;
WM_operator_properties_create_ptr(&tptr, ot);
- if(tptr.data) {
+ if (tptr.data) {
IDP_FreeProperty(tptr.data);
MEM_freeN(tptr.data);
}
@@ -820,8 +823,8 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname
}
}
else {
- if(item[i].name) {
- if(i != 0) {
+ if (item[i].name) {
+ if (i != 0) {
column= uiLayoutColumn(split, 0);
/* inconsistent, but menus with labels do not look good flipped */
block->flag |= UI_BLOCK_NO_FLIP;
@@ -870,7 +873,7 @@ void uiItemEnumO_value(uiLayout *layout, const char *name, int icon, const char
RNA_property_enum_set(&ptr, prop, value);
/* same as uiItemEnumO */
- if(!name)
+ if (!name)
name = ui_menu_enumpropname(layout, &ptr, prop, value);
uiItemFullO_ptr(layout, ot, name, icon, ptr.data, layout->root->opcontext, 0);
@@ -890,10 +893,10 @@ void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char
WM_operator_properties_create_ptr(&ptr, ot);
/* enum lookup */
- if((prop= RNA_struct_find_property(&ptr, propname))) {
+ if ((prop= RNA_struct_find_property(&ptr, propname))) {
RNA_property_enum_items_gettexted(layout->root->block->evil_C, &ptr, prop, &item, NULL, &free);
- if(item==NULL || RNA_enum_value_from_id(item, value_str, &value)==0) {
- if(free) {
+ if (item==NULL || RNA_enum_value_from_id(item, value_str, &value)==0) {
+ if (free) {
MEM_freeN(item);
}
RNA_warning("%s.%s, enum %s not found", RNA_struct_identifier(ptr.type), propname, value_str);
@@ -912,7 +915,7 @@ void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char
RNA_property_enum_set(&ptr, prop, value);
/* same as uiItemEnumO */
- if(!name)
+ if (!name)
name = ui_menu_enumpropname(layout, &ptr, prop, value);
uiItemFullO_ptr(layout, ot, name, icon, ptr.data, layout->root->opcontext, 0);
@@ -988,32 +991,32 @@ static void ui_item_rna_size(uiLayout *layout, const char *name, int icon, Point
subtype= RNA_property_subtype(prop);
len= RNA_property_array_length(ptr, prop);
- if(ELEM3(type, PROP_STRING, PROP_POINTER, PROP_ENUM) && !name[0] && !icon_only)
+ if (ELEM3(type, PROP_STRING, PROP_POINTER, PROP_ENUM) && !name[0] && !icon_only)
name= "non-empty text";
- else if(type == PROP_BOOLEAN && !name[0] && !icon_only)
+ else if (type == PROP_BOOLEAN && !name[0] && !icon_only)
icon= ICON_DOT;
w= ui_text_icon_width(layout, name, icon, 0);
h= UI_UNIT_Y;
/* increase height for arrays */
- if(index == RNA_NO_INDEX && len > 0) {
- if(!name[0] && icon == ICON_NONE)
+ if (index == RNA_NO_INDEX && len > 0) {
+ if (!name[0] && icon == ICON_NONE)
h= 0;
- if(ELEM(subtype, PROP_LAYER, PROP_LAYER_MEMBER))
+ if (ELEM(subtype, PROP_LAYER, PROP_LAYER_MEMBER))
h += 2*UI_UNIT_Y;
- else if(subtype == PROP_MATRIX)
+ else if (subtype == PROP_MATRIX)
h += ceil(sqrt(len))*UI_UNIT_Y;
else
h += len*UI_UNIT_Y;
}
- else if(ui_layout_vary_direction(layout) == UI_ITEM_VARY_X) {
- if(type == PROP_BOOLEAN && name[0])
+ else if (ui_layout_vary_direction(layout) == UI_ITEM_VARY_X) {
+ if (type == PROP_BOOLEAN && name[0])
w += UI_UNIT_X/5;
- else if(type == PROP_ENUM)
+ else if (type == PROP_ENUM)
w += UI_UNIT_X/4;
- else if(type == PROP_FLOAT || type == PROP_INT)
+ else if (type == PROP_FLOAT || type == PROP_INT)
w += UI_UNIT_X*3;
}
@@ -1037,26 +1040,26 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
len= (is_array) ? RNA_property_array_length(ptr, prop) : 0;
/* set name and icon */
- if(!name)
+ if (!name)
name= RNA_property_ui_name(prop);
- if(icon == ICON_NONE)
+ if (icon == ICON_NONE)
icon= RNA_property_ui_icon(prop);
- if(ELEM4(type, PROP_INT, PROP_FLOAT, PROP_STRING, PROP_POINTER))
+ if (ELEM4(type, PROP_INT, PROP_FLOAT, PROP_STRING, PROP_POINTER))
name= ui_item_name_add_colon(name, namestr);
- else if(type == PROP_BOOLEAN && is_array && index == RNA_NO_INDEX)
+ else if (type == PROP_BOOLEAN && is_array && index == RNA_NO_INDEX)
name= ui_item_name_add_colon(name, namestr);
- else if(type == PROP_ENUM && index != RNA_ENUM_VALUE)
+ else if (type == PROP_ENUM && index != RNA_ENUM_VALUE)
name= ui_item_name_add_colon(name, namestr);
- if(layout->root->type == UI_LAYOUT_MENU) {
- if(type == PROP_BOOLEAN && ((is_array == FALSE) || (index != RNA_NO_INDEX))) {
- if(is_array) icon= (RNA_property_boolean_get_index(ptr, prop, index)) ? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT;
+ if (layout->root->type == UI_LAYOUT_MENU) {
+ if (type == PROP_BOOLEAN && ((is_array == FALSE) || (index != RNA_NO_INDEX))) {
+ if (is_array) icon= (RNA_property_boolean_get_index(ptr, prop, index)) ? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT;
else icon= (RNA_property_boolean_get(ptr, prop)) ? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT;
}
- else if(type == PROP_ENUM && index == RNA_ENUM_VALUE) {
+ else if (type == PROP_ENUM && index == RNA_ENUM_VALUE) {
int enum_value= RNA_property_enum_get(ptr, prop);
- if(RNA_property_flag(prop) & PROP_ENUM_FLAG) {
+ if (RNA_property_flag(prop) & PROP_ENUM_FLAG) {
icon= (enum_value & value)? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT;
}
else {
@@ -1078,39 +1081,39 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
uiBlockSetEmboss(block, UI_EMBOSSN);
/* array property */
- if(index == RNA_NO_INDEX && is_array)
+ if (index == RNA_NO_INDEX && is_array)
ui_item_array(layout, block, name, icon, ptr, prop, len, 0, 0, w, h, expand, slider, toggle, icon_only);
/* enum item */
- else if(type == PROP_ENUM && index == RNA_ENUM_VALUE) {
- if(icon && name[0] && !icon_only)
+ else if (type == PROP_ENUM && index == RNA_ENUM_VALUE) {
+ if (icon && name[0] && !icon_only)
uiDefIconTextButR_prop(block, ROW, 0, icon, name, 0, 0, w, h, ptr, prop, -1, 0, value, -1, -1, NULL);
- else if(icon)
+ else if (icon)
uiDefIconButR_prop(block, ROW, 0, icon, 0, 0, w, h, ptr, prop, -1, 0, value, -1, -1, NULL);
else
uiDefButR_prop(block, ROW, 0, name, 0, 0, w, h, ptr, prop, -1, 0, value, -1, -1, NULL);
}
/* expanded enum */
- else if(type == PROP_ENUM && (expand || RNA_property_flag(prop) & PROP_ENUM_FLAG))
+ else if (type == PROP_ENUM && (expand || RNA_property_flag(prop) & PROP_ENUM_FLAG))
ui_item_enum_expand(layout, block, ptr, prop, name, h, icon_only);
/* property with separate label */
- else if(type == PROP_ENUM || type == PROP_STRING || type == PROP_POINTER) {
+ else if (type == PROP_ENUM || type == PROP_STRING || type == PROP_POINTER) {
but= ui_item_with_label(layout, block, name, icon, ptr, prop, index, 0, 0, w, h, flag);
ui_but_add_search(but, ptr, prop, NULL, NULL);
- if(layout->redalert)
+ if (layout->redalert)
uiButSetFlag(but, UI_BUT_REDALERT);
}
/* single button */
else {
- but= uiDefAutoButR(block, ptr, prop, index, name, icon, 0, 0, w, h);
+ but = uiDefAutoButR(block, ptr, prop, index, name, icon, 0, 0, w, h);
- if(slider && but->type==NUM)
+ if (slider && but->type==NUM)
but->type= NUMSLI;
- if(toggle && but->type==OPTION)
+ if (toggle && but->type==OPTION)
but->type= TOG;
- if(layout->redalert)
+ if (layout->redalert)
uiButSetFlag(but, UI_BUT_REDALERT);
}
@@ -1122,7 +1125,7 @@ void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, int flag,
{
PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
- if(!prop) {
+ if (!prop) {
ui_item_disabled(layout, propname);
RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
@@ -1135,7 +1138,7 @@ void uiItemEnumR(uiLayout *layout, const char *name, int icon, struct PointerRNA
{
PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
- if(!prop || RNA_property_type(prop) != PROP_ENUM) {
+ if (!prop || RNA_property_type(prop) != PROP_ENUM) {
ui_item_disabled(layout, propname);
RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
@@ -1150,7 +1153,7 @@ void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *pr
EnumPropertyItem *item;
int ivalue, a, free;
- if(!prop || RNA_property_type(prop) != PROP_ENUM) {
+ if (!prop || RNA_property_type(prop) != PROP_ENUM) {
ui_item_disabled(layout, propname);
RNA_warning("enum property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
@@ -1158,7 +1161,7 @@ void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *pr
RNA_property_enum_items_gettexted(layout->root->block->evil_C, ptr, prop, &item, NULL, &free);
- if(!RNA_enum_value_from_id(item, value, &ivalue)) {
+ if (!RNA_enum_value_from_id(item, value, &ivalue)) {
if (free) {
MEM_freeN(item);
}
@@ -1167,8 +1170,8 @@ void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *pr
return;
}
- for(a=0; item[a].identifier; a++) {
- if(item[a].value == ivalue) {
+ for (a=0; item[a].identifier; a++) {
+ if (item[a].value == ivalue) {
uiItemFullR(layout, ptr, prop, RNA_ENUM_VALUE, ivalue, 0, name ? name : item[a].name, icon ? icon : item[a].icon);
break;
}
@@ -1187,13 +1190,13 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname
prop= RNA_struct_find_property(ptr, propname);
- if(!prop) {
+ if (!prop) {
ui_item_disabled(layout, propname);
RNA_warning("enum property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
- if(RNA_property_type(prop) != PROP_ENUM) {
+ if (RNA_property_type(prop) != PROP_ENUM) {
RNA_warning("not an enum property: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -1205,13 +1208,13 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname
RNA_property_enum_items_gettexted(block->evil_C, ptr, prop, &item, &totitem, &free);
- for(i=0; i<totitem; i++) {
- if(item[i].identifier[0]) {
+ for (i=0; i<totitem; i++) {
+ if (item[i].identifier[0]) {
uiItemEnumR(column, item[i].name, ICON_NONE, ptr, propname, item[i].value);
}
else {
- if(item[i].name) {
- if(i != 0) {
+ if (item[i].name) {
+ if (i != 0) {
column= uiLayoutColumn(split, 0);
/* inconsistent, but menus with labels do not look good flipped */
block->flag |= UI_BLOCK_NO_FLIP;
@@ -1263,17 +1266,17 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s
/* build a temporary list of relevant items first */
RNA_PROP_BEGIN(&but->rnasearchpoin, itemptr, but->rnasearchprop) {
- if(flag & PROP_ID_SELF_CHECK)
- if(itemptr.data == but->rnapoin.id.data)
+ if (flag & PROP_ID_SELF_CHECK)
+ if (itemptr.data == but->rnapoin.id.data)
continue;
/* use filter */
- if(RNA_property_type(but->rnaprop)==PROP_POINTER) {
- if(RNA_property_pointer_poll(&but->rnapoin, but->rnaprop, &itemptr)==0)
+ if (RNA_property_type(but->rnaprop)==PROP_POINTER) {
+ if (RNA_property_pointer_poll(&but->rnapoin, but->rnaprop, &itemptr)==0)
continue;
}
- if(itemptr.type && RNA_struct_is_ID(itemptr.type)) {
+ if (itemptr.type && RNA_struct_is_ID(itemptr.type)) {
ID *id= itemptr.data;
char name_ui[MAX_ID_NAME];
@@ -1290,8 +1293,8 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s
iconid = 0;
}
- if(name) {
- if(skip_filter || BLI_strcasestr(name, str)) {
+ if (name) {
+ if (skip_filter || BLI_strcasestr(name, str)) {
cis = MEM_callocN(sizeof(CollItemSearch), "CollectionItemSearch");
cis->name = MEM_dupallocN(name);
cis->index = i;
@@ -1332,10 +1335,10 @@ static void search_id_collection(StructRNA *ptype, PointerRNA *ptr, PropertyRNA
RNA_STRUCT_BEGIN(ptr, iprop) {
/* if it's a collection and has same pointer type, we've got it */
- if(RNA_property_type(iprop) == PROP_COLLECTION) {
+ if (RNA_property_type(iprop) == PROP_COLLECTION) {
srna= RNA_property_pointer_type(ptr, iprop);
- if(ptype == srna) {
+ if (ptype == srna) {
*prop= iprop;
break;
}
@@ -1350,8 +1353,8 @@ void ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRN
PointerRNA sptr;
/* for ID's we do automatic lookup */
- if(!searchprop) {
- if(RNA_property_type(prop) == PROP_POINTER) {
+ if (!searchprop) {
+ if (RNA_property_type(prop) == PROP_POINTER) {
ptype= RNA_property_pointer_type(ptr, prop);
search_id_collection(ptype, &sptr, &searchprop);
searchptr= &sptr;
@@ -1359,7 +1362,7 @@ void ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRN
}
/* turn button into search button */
- if(searchprop) {
+ if (searchprop) {
but->type= SEARCH_MENU;
but->hardmax= MAX2(but->hardmax, 256);
but->rnasearchpoin= *searchptr;
@@ -1382,13 +1385,13 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna
/* validate arguments */
prop= RNA_struct_find_property(ptr, propname);
- if(!prop) {
+ if (!prop) {
RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
type= RNA_property_type(prop);
- if(!ELEM(type, PROP_POINTER, PROP_STRING)) {
+ if (!ELEM(type, PROP_POINTER, PROP_STRING)) {
RNA_warning("Property %s must be a pointer or string", propname);
return;
}
@@ -1396,7 +1399,7 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna
searchprop= RNA_struct_find_property(searchptr, searchpropname);
- if(!searchprop) {
+ if (!searchprop) {
RNA_warning("search collection property not found: %s.%s", RNA_struct_identifier(ptr->type), searchpropname);
return;
}
@@ -1406,15 +1409,15 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna
}
/* get icon & name */
- if(icon==ICON_NONE) {
- if(type == PROP_POINTER)
+ if (icon==ICON_NONE) {
+ if (type == PROP_POINTER)
icontype= RNA_property_pointer_type(ptr, prop);
else
icontype= RNA_property_pointer_type(searchptr, searchprop);
icon= RNA_struct_ui_icon(icontype);
}
- if(!name)
+ if (!name)
name= RNA_property_ui_name(prop);
/* create button */
@@ -1445,35 +1448,35 @@ static void ui_item_menu(uiLayout *layout, const char *name, int icon, uiMenuCre
uiBlockSetCurLayout(block, layout);
- if(layout->root->type == UI_LAYOUT_HEADER)
+ if (layout->root->type == UI_LAYOUT_HEADER)
uiBlockSetEmboss(block, UI_EMBOSS);
- if(!name)
+ if (!name)
name= "";
- if(layout->root->type == UI_LAYOUT_MENU && !icon)
+ if (layout->root->type == UI_LAYOUT_MENU && !icon)
icon= ICON_BLANK1;
w= ui_text_icon_width(layout, name, icon, 1);
h= UI_UNIT_Y;
- if(layout->root->type == UI_LAYOUT_HEADER) /* ugly .. */
+ if (layout->root->type == UI_LAYOUT_HEADER) /* ugly .. */
w -= 10;
- if(name[0] && icon)
- but= uiDefIconTextMenuBut(block, func, arg, icon, name, 0, 0, w, h, tip);
- else if(icon)
- but= uiDefIconMenuBut(block, func, arg, icon, 0, 0, w, h, tip);
+ if (name[0] && icon)
+ but = uiDefIconTextMenuBut(block, func, arg, icon, name, 0, 0, w, h, tip);
+ else if (icon)
+ but = uiDefIconMenuBut(block, func, arg, icon, 0, 0, w, h, tip);
else
- but= uiDefMenuBut(block, func, arg, name, 0, 0, w, h, tip);
+ but = uiDefMenuBut(block, func, arg, name, 0, 0, w, h, tip);
- if(argN) { /* ugly .. */
+ if (argN) { /* ugly .. */
but->poin= (char*)but;
but->func_argN= argN;
}
- if(layout->root->type == UI_LAYOUT_HEADER)
+ if (layout->root->type == UI_LAYOUT_HEADER)
uiBlockSetEmboss(block, UI_EMBOSS);
- else if(ELEM(layout->root->type, UI_LAYOUT_PANEL, UI_LAYOUT_TOOLBAR)) {
+ else if (ELEM(layout->root->type, UI_LAYOUT_PANEL, UI_LAYOUT_TOOLBAR)) {
but->type= MENU;
but->flag |= UI_TEXT_LEFT;
}
@@ -1483,18 +1486,18 @@ void uiItemM(uiLayout *layout, bContext *UNUSED(C), const char *menuname, const
{
MenuType *mt;
- mt= WM_menutype_find(menuname, FALSE);
+ mt = WM_menutype_find(menuname, FALSE);
- if(mt==NULL) {
+ if (mt==NULL) {
RNA_warning("not found %s", menuname);
return;
}
- if(!name) {
- name= IFACE_(mt->label);
+ if (!name) {
+ name = IFACE_(mt->label);
}
- if(layout->root->type == UI_LAYOUT_MENU && !icon)
+ if (layout->root->type == UI_LAYOUT_MENU && !icon)
icon= ICON_BLANK1;
ui_item_menu(layout, name, icon, ui_item_menutype_func, mt, NULL, mt->description);
@@ -1509,19 +1512,19 @@ static uiBut *uiItemL_(uiLayout *layout, const char *name, int icon)
uiBlockSetCurLayout(block, layout);
- if(!name)
+ if (!name)
name= "";
- if(layout->root->type == UI_LAYOUT_MENU && !icon)
+ if (layout->root->type == UI_LAYOUT_MENU && !icon)
icon= ICON_BLANK1;
w= ui_text_icon_width(layout, name, icon, 0);
- if(icon && name[0])
- but= uiDefIconTextBut(block, LABEL, 0, icon, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
- else if(icon)
- but= uiDefIconBut(block, LABEL, 0, icon, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+ if (icon && name[0])
+ but = uiDefIconTextBut(block, LABEL, 0, icon, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+ else if (icon)
+ but = uiDefIconBut(block, LABEL, 0, icon, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
else
- but= uiDefBut(block, LABEL, 0, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+ but = uiDefBut(block, LABEL, 0, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
return but;
}
@@ -1535,8 +1538,8 @@ void uiItemLDrag(uiLayout *layout, PointerRNA *ptr, const char *name, int icon)
{
uiBut *but= uiItemL_(layout, name, icon);
- if(ptr && ptr->type)
- if(RNA_struct_is_ID(ptr->type))
+ if (ptr && ptr->type)
+ if (RNA_struct_is_ID(ptr->type))
uiButSetDragID(but, ptr->id.data);
}
@@ -1551,16 +1554,16 @@ void uiItemV(uiLayout *layout, const char *name, int icon, int argval)
uiBlockSetCurLayout(block, layout);
- if(!name)
+ if (!name)
name= "";
- if(layout->root->type == UI_LAYOUT_MENU && !icon)
+ if (layout->root->type == UI_LAYOUT_MENU && !icon)
icon= ICON_BLANK1;
w= ui_text_icon_width(layout, name, icon, 0);
- if(icon && name[0])
+ if (icon && name[0])
uiDefIconTextButF(block, BUT, argval, icon, name, 0, 0, w, UI_UNIT_Y, retvalue, 0.0, 0.0, 0, 0, "");
- else if(icon)
+ else if (icon)
uiDefIconButF(block, BUT, argval, icon, 0, 0, w, UI_UNIT_Y, retvalue, 0.0, 0.0, 0, 0, "");
else
uiDefButF(block, BUT, argval, name, 0, 0, w, UI_UNIT_Y, retvalue, 0.0, 0.0, 0, 0, "");
@@ -1578,7 +1581,7 @@ void uiItemS(uiLayout *layout)
/* level items */
void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg)
{
- if(!func)
+ if (!func)
return;
ui_item_menu(layout, name, icon, func, arg, NULL, "");
@@ -1586,7 +1589,7 @@ void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc
typedef struct MenuItemLevel {
int opcontext;
- /* dont use pointers to the strings because python can dynamically
+ /* don't use pointers to the strings because python can dynamically
* allocate strings and free before the menu draws, see [#27304] */
char opname[OP_MAX_TYPENAME];
char propname[MAX_IDPROP_NAME];
@@ -1608,15 +1611,15 @@ void uiItemMenuEnumO(uiLayout *layout, const char *opname, const char *propname,
UI_OPERATOR_ERROR_RET(ot, opname, return);
- if(!ot->srna) {
+ if (!ot->srna) {
ui_item_disabled(layout, opname);
RNA_warning("operator missing srna '%s'", opname);
return;
}
- if(!name)
+ if (!name)
name= ot->name;
- if(layout->root->type == UI_LAYOUT_MENU && !icon)
+ if (layout->root->type == UI_LAYOUT_MENU && !icon)
icon= ICON_BLANK1;
lvl= MEM_callocN(sizeof(MenuItemLevel), "MenuItemLevel");
@@ -1641,15 +1644,15 @@ void uiItemMenuEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propn
PropertyRNA *prop;
prop= RNA_struct_find_property(ptr, propname);
- if(!prop) {
+ if (!prop) {
ui_item_disabled(layout, propname);
RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
- if(!name)
+ if (!name)
name= RNA_property_ui_name(prop);
- if(layout->root->type == UI_LAYOUT_MENU && !icon)
+ if (layout->root->type == UI_LAYOUT_MENU && !icon)
icon= ICON_BLANK1;
lvl= MEM_callocN(sizeof(MenuItemLevel), "MenuItemLevel");
@@ -1671,13 +1674,13 @@ static void ui_litem_estimate_row(uiLayout *litem)
litem->w= 0;
litem->h= 0;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_size(item, &itemw, &itemh);
litem->w += itemw;
litem->h= MAX2(itemh, litem->h);
- if(item->next)
+ if (item->next)
litem->w += litem->space;
}
}
@@ -1699,16 +1702,16 @@ static void ui_litem_layout_row(uiLayout *litem)
totw= 0;
tot= 0;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_size(item, &itemw, &itemh);
totw += itemw;
tot++;
}
- if(totw == 0)
+ if (totw == 0)
return;
- if(w != 0)
+ if (w != 0)
w -= (tot-1)*litem->space;
fixedw= 0;
@@ -1718,21 +1721,21 @@ static void ui_litem_layout_row(uiLayout *litem)
x= 0;
flag= 0;
- for(item=litem->items.first; item; item=item->next) {
- if(item->flag)
+ for (item=litem->items.first; item; item=item->next) {
+ if (item->flag)
continue;
ui_item_size(item, &itemw, &itemh);
minw= ui_litem_min_width(itemw);
- if(w - lastw > 0)
+ if (w - lastw > 0)
neww= ui_item_fit(itemw, x, totw, w-lastw, !item->next, litem->alignment, NULL);
else
neww= 0; /* no space left, all will need clamping to minimum size */
x += neww;
- if((neww < minw || itemw == minw) && w != 0) {
+ if ((neww < minw || itemw == minw) && w != 0) {
/* fixed size */
item->flag= 1;
fixedw += minw;
@@ -1747,17 +1750,17 @@ static void ui_litem_layout_row(uiLayout *litem)
}
lastw= fixedw;
- } while(flag);
+ } while (flag);
freex= 0;
fixedx= 0;
x= litem->x;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_size(item, &itemw, &itemh);
minw= ui_litem_min_width(itemw);
- if(item->flag) {
+ if (item->flag) {
/* fixed minimum size items */
itemw= ui_item_fit(minw, fixedx, fixedw, MIN2(w, fixedw), !item->next, litem->alignment, NULL);
fixedx += itemw;
@@ -1770,12 +1773,12 @@ static void ui_litem_layout_row(uiLayout *litem)
/* align right/center */
offset= 0;
- if(litem->alignment == UI_LAYOUT_ALIGN_RIGHT) {
- if(freew > 0 && freew < w-fixedw)
+ if (litem->alignment == UI_LAYOUT_ALIGN_RIGHT) {
+ if (freew > 0 && freew < w-fixedw)
offset= (w - fixedw) - freew;
}
- else if(litem->alignment == UI_LAYOUT_ALIGN_CENTER) {
- if(freew > 0 && freew < w-fixedw)
+ else if (litem->alignment == UI_LAYOUT_ALIGN_CENTER) {
+ if (freew > 0 && freew < w-fixedw)
offset= ((w - fixedw) - freew)/2;
}
@@ -1783,7 +1786,7 @@ static void ui_litem_layout_row(uiLayout *litem)
ui_item_position(item, x+offset, y-itemh, itemw, itemh);
x += itemw;
- if(item->next)
+ if (item->next)
x += litem->space;
}
@@ -1802,13 +1805,13 @@ static void ui_litem_estimate_column(uiLayout *litem)
litem->w= 0;
litem->h= 0;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_size(item, &itemw, &itemh);
litem->w= MAX2(litem->w, itemw);
litem->h += itemh;
- if(item->next)
+ if (item->next)
litem->h += litem->space;
}
}
@@ -1821,13 +1824,13 @@ static void ui_litem_layout_column(uiLayout *litem)
x= litem->x;
y= litem->y;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_size(item, NULL, &itemh);
y -= itemh;
ui_item_position(item, x, y, litem->w, itemh);
- if(item->next)
+ if (item->next)
y -= litem->space;
}
@@ -1844,7 +1847,7 @@ static void ui_litem_estimate_root(uiLayout *UNUSED(litem))
static void ui_litem_layout_root(uiLayout *litem)
{
- if(litem->root->type == UI_LAYOUT_HEADER)
+ if (litem->root->type == UI_LAYOUT_HEADER)
ui_litem_layout_row(litem);
else
ui_litem_layout_column(litem);
@@ -1872,16 +1875,16 @@ static void ui_litem_layout_box(uiLayout *litem)
litem->x += style->boxspace;
- if(w != 0) litem->w -= 2*style->boxspace;
- if(h != 0) litem->h -= 2*style->boxspace;
+ if (w != 0) litem->w -= 2*style->boxspace;
+ if (h != 0) litem->h -= 2*style->boxspace;
ui_litem_layout_column(litem);
litem->x -= style->boxspace;
litem->y -= style->boxspace;
- if(w != 0) litem->w += 2*style->boxspace;
- if(h != 0) litem->h += style->boxspace;
+ if (w != 0) litem->w += 2*style->boxspace;
+ if (h != 0) litem->h += style->boxspace;
/* roundbox around the sublayout */
but= box->roundbox;
@@ -1903,16 +1906,16 @@ static void ui_litem_estimate_column_flow(uiLayout *litem)
/* compute max needed width and total height */
toth= 0;
totitem= 0;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_size(item, &itemw, &itemh);
maxw= MAX2(maxw, itemw);
toth += itemh;
totitem++;
}
- if(flow->number <= 0) {
+ if (flow->number <= 0) {
/* auto compute number of columns, not very good */
- if(maxw == 0) {
+ if (maxw == 0) {
flow->totcol= 1;
return;
}
@@ -1934,7 +1937,7 @@ static void ui_litem_estimate_column_flow(uiLayout *litem)
/* create column per column */
col= 0;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_size(item, &itemw, &itemh);
y -= itemh + style->buttonspacey;
@@ -1943,7 +1946,7 @@ static void ui_litem_estimate_column_flow(uiLayout *litem)
maxw= MAX2(itemw, maxw);
/* decide to go to next one */
- if(col < flow->totcol-1 && emy <= -emh) {
+ if (col < flow->totcol-1 && emy <= -emh) {
x += maxw + litem->space;
maxw= 0;
y= 0;
@@ -1966,7 +1969,7 @@ static void ui_litem_layout_column_flow(uiLayout *litem)
/* compute max needed width and total height */
toth= 0;
totitem= 0;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_size(item, &itemw, &itemh);
toth += itemh;
totitem++;
@@ -1983,7 +1986,7 @@ static void ui_litem_layout_column_flow(uiLayout *litem)
/* create column per column */
col= 0;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_size(item, NULL, &itemh);
itemw= ui_item_fit(1, x-litem->x, flow->totcol, w, col == flow->totcol-1, litem->alignment, &offset);
@@ -1994,7 +1997,7 @@ static void ui_litem_layout_column_flow(uiLayout *litem)
miny= MIN2(miny, y);
/* decide to go to next one */
- if(col < flow->totcol-1 && emy <= -emh) {
+ if (col < flow->totcol-1 && emy <= -emh) {
x += itemw + style->columnspace;
y= litem->y;
col++;
@@ -2017,7 +2020,7 @@ static void ui_litem_estimate_absolute(uiLayout *litem)
litem->w= 0;
litem->h= 0;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_offset(item, &itemx, &itemy);
ui_item_size(item, &itemw, &itemh);
@@ -2043,7 +2046,7 @@ static void ui_litem_layout_absolute(uiLayout *litem)
totw= 0;
toth= 0;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_offset(item, &itemx, &itemy);
ui_item_size(item, &itemw, &itemh);
@@ -2057,25 +2060,25 @@ static void ui_litem_layout_absolute(uiLayout *litem)
totw -= minx;
toth -= miny;
- if(litem->w && totw > 0)
+ if (litem->w && totw > 0)
scalex= (float)litem->w/(float)totw;
- if(litem->h && toth > 0)
+ if (litem->h && toth > 0)
scaley= (float)litem->h/(float)toth;
x= litem->x;
y= litem->y - scaley*toth;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_offset(item, &itemx, &itemy);
ui_item_size(item, &itemw, &itemh);
- if(scalex != 1.0f) {
+ if (scalex != 1.0f) {
newx= (itemx - minx)*scalex;
itemw= (itemx - minx + itemw)*scalex - newx;
itemx= minx + newx;
}
- if(scaley != 1.0f) {
+ if (scaley != 1.0f) {
newy= (itemy - miny)*scaley;
itemh= (itemy - miny + itemh)*scaley - newy;
itemy= miny + newy;
@@ -2104,7 +2107,7 @@ static void ui_litem_layout_split(uiLayout *litem)
const int tot= BLI_countlist(&litem->items);
int itemh, x, y, w, colw=0;
- if(tot == 0)
+ if (tot == 0)
return;
x= litem->x;
@@ -2116,13 +2119,13 @@ static void ui_litem_layout_split(uiLayout *litem)
colw= w*percentage;
colw= MAX2(colw, 0);
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_size(item, NULL, &itemh);
ui_item_position(item, x, y-itemh, colw, itemh);
x += colw;
- if(item->next) {
+ if (item->next) {
colw= (w - (int)(w*percentage))/(tot-1);
colw= MAX2(colw, 0);
@@ -2145,7 +2148,7 @@ static void ui_litem_estimate_overlap(uiLayout *litem)
litem->w= 0;
litem->h= 0;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_size(item, &itemw, &itemh);
litem->w= MAX2(itemw, litem->w);
@@ -2161,7 +2164,7 @@ static void ui_litem_layout_overlap(uiLayout *litem)
x= litem->x;
y= litem->y;
- for(item=litem->items.first; item; item=item->next) {
+ for (item=litem->items.first; item; item=item->next) {
ui_item_size(item, &itemw, &itemh);
ui_item_position(item, x, y-itemh, litem->w, itemh);
@@ -2421,16 +2424,16 @@ static void ui_item_scale(uiLayout *litem, float scale[2])
uiItem *item;
int x, y, w, h;
- for(item=litem->items.last; item; item=item->prev) {
+ for (item=litem->items.last; item; item=item->prev) {
ui_item_size(item, &w, &h);
ui_item_offset(item, &x, &y);
- if(scale[0] != 0.0f) {
+ if (scale[0] != 0.0f) {
x *= scale[0];
w *= scale[0];
}
- if(scale[1] != 0.0f) {
+ if (scale[1] != 0.0f) {
y *= scale[1];
h *= scale[1];
}
@@ -2443,16 +2446,16 @@ static void ui_item_estimate(uiItem *item)
{
uiItem *subitem;
- if(item->type != ITEM_BUTTON) {
+ if (item->type != ITEM_BUTTON) {
uiLayout *litem= (uiLayout*)item;
- for(subitem=litem->items.first; subitem; subitem=subitem->next)
+ for (subitem=litem->items.first; subitem; subitem=subitem->next)
ui_item_estimate(subitem);
- if(litem->items.first == NULL)
+ if (litem->items.first == NULL)
return;
- if(litem->scale[0] != 0.0f || litem->scale[1] != 0.0f)
+ if (litem->scale[0] != 0.0f || litem->scale[1] != 0.0f)
ui_item_scale(litem, litem->scale);
switch(litem->item.type) {
@@ -2492,16 +2495,16 @@ static void ui_item_align(uiLayout *litem, short nr)
uiButtonItem *bitem;
uiLayoutItemBx *box;
- for(item=litem->items.last; item; item=item->prev) {
- if(item->type == ITEM_BUTTON) {
+ for (item=litem->items.last; item; item=item->prev) {
+ if (item->type == ITEM_BUTTON) {
bitem= (uiButtonItem*)item;
- if(ui_but_can_align(bitem->but))
- if(!bitem->but->alignnr)
+ if (ui_but_can_align(bitem->but))
+ if (!bitem->but->alignnr)
bitem->but->alignnr= nr;
}
- else if(item->type == ITEM_LAYOUT_ABSOLUTE);
- else if(item->type == ITEM_LAYOUT_OVERLAP);
- else if(item->type == ITEM_LAYOUT_BOX) {
+ else if (item->type == ITEM_LAYOUT_ABSOLUTE);
+ else if (item->type == ITEM_LAYOUT_OVERLAP);
+ else if (item->type == ITEM_LAYOUT_BOX) {
box= (uiLayoutItemBx*)item;
box->roundbox->alignnr= nr;
BLI_remlink(&litem->root->block->buttons, box->roundbox);
@@ -2517,8 +2520,8 @@ static void ui_item_flag(uiLayout *litem, int flag)
uiItem *item;
uiButtonItem *bitem;
- for(item=litem->items.last; item; item=item->prev) {
- if(item->type == ITEM_BUTTON) {
+ for (item=litem->items.last; item; item=item->prev) {
+ if (item->type == ITEM_BUTTON) {
bitem= (uiButtonItem*)item;
bitem->but->flag |= flag;
}
@@ -2531,17 +2534,17 @@ static void ui_item_layout(uiItem *item)
{
uiItem *subitem;
- if(item->type != ITEM_BUTTON) {
+ if (item->type != ITEM_BUTTON) {
uiLayout *litem= (uiLayout*)item;
- if(litem->items.first == NULL)
+ if (litem->items.first == NULL)
return;
- if(litem->align)
+ if (litem->align)
ui_item_align(litem, ++litem->root->block->alignnr);
- if(!litem->active)
+ if (!litem->active)
ui_item_flag(litem, UI_BUT_INACTIVE);
- if(!litem->enabled)
+ if (!litem->enabled)
ui_item_flag(litem, UI_BUT_DISABLED);
switch(litem->item.type) {
@@ -2573,31 +2576,31 @@ static void ui_item_layout(uiItem *item)
break;
}
- for(subitem=litem->items.first; subitem; subitem=subitem->next)
+ for (subitem=litem->items.first; subitem; subitem=subitem->next)
ui_item_layout(subitem);
}
}
static void ui_layout_end(uiBlock *block, uiLayout *layout, int *x, int *y)
{
- if(layout->root->handlefunc)
+ if (layout->root->handlefunc)
uiBlockSetHandleFunc(block, layout->root->handlefunc, layout->root->argv);
ui_item_estimate(&layout->item);
ui_item_layout(&layout->item);
- if(x) *x= layout->x;
- if(y) *y= layout->y;
+ if (x) *x= layout->x;
+ if (y) *y= layout->y;
}
static void ui_layout_free(uiLayout *layout)
{
uiItem *item, *next;
- for(item=layout->items.first; item; item=next) {
+ for (item=layout->items.first; item; item=next) {
next= item->next;
- if(item->type == ITEM_BUTTON)
+ if (item->type == ITEM_BUTTON)
MEM_freeN(item);
else
ui_layout_free((uiLayout*)item);
@@ -2628,10 +2631,10 @@ uiLayout *uiBlockLayout(uiBlock *block, int dir, int type, int x, int y, int siz
layout->enabled= 1;
layout->context= NULL;
- if(type == UI_LAYOUT_MENU)
+ if (type == UI_LAYOUT_MENU)
layout->space= 0;
- if(dir == UI_LAYOUT_HORIZONTAL) {
+ if (dir == UI_LAYOUT_HORIZONTAL) {
layout->h= size;
layout->root->emh= em*UI_UNIT_Y;
}
@@ -2672,7 +2675,7 @@ void ui_layout_add_but(uiLayout *layout, uiBut *but)
bitem->but= but;
BLI_addtail(&layout->items, bitem);
- if(layout->context) {
+ if (layout->context) {
but->context= layout->context;
but->context->used= 1;
}
@@ -2693,12 +2696,12 @@ void uiBlockLayoutResolve(uiBlock *block, int *x, int *y)
{
uiLayoutRoot *root;
- if(x) *x= 0;
- if(y) *y= 0;
+ if (x) *x= 0;
+ if (y) *y= 0;
block->curlayout= NULL;
- for(root=block->layouts.first; root; root=root->next) {
+ for (root=block->layouts.first; root; root=root->next) {
/* NULL in advance so we don't interfere when adding button */
ui_layout_end(block, root->layout, x, y);
ui_layout_free(root->layout);
@@ -2730,13 +2733,13 @@ static void ui_intro_button(DynStr *ds, uiButtonItem *bitem)
BLI_dynstr_appendf(ds, "'draw_string':'''%s''', ", but->drawstr);
BLI_dynstr_appendf(ds, "'tip':'''%s''', ", but->tip ? but->tip : ""); // not exactly needed, rna has this
- if(but->optype) {
+ if (but->optype) {
char *opstr = WM_operator_pystring(but->block->evil_C, but->optype, but->opptr, 0);
BLI_dynstr_appendf(ds, "'operator':'''%s''', ", opstr ? opstr : "");
MEM_freeN(opstr);
}
- if(but->rnaprop) {
+ if (but->rnaprop) {
BLI_dynstr_appendf(ds, "'rna':'%s.%s[%d]', ", RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop), but->rnaindex);
}
@@ -2748,7 +2751,7 @@ static void ui_intro_items(DynStr *ds, ListBase *lb)
BLI_dynstr_append(ds, "[");
- for(item=lb->first; item; item=item->next) {
+ for (item=lb->first; item; item=item->next) {
BLI_dynstr_append(ds, "{");
@@ -2779,7 +2782,7 @@ static void ui_intro_items(DynStr *ds, ListBase *lb)
BLI_dynstr_append(ds, "}");
- if(item != lb->last)
+ if (item != lb->last)
BLI_dynstr_append(ds, ", ");
}
BLI_dynstr_append(ds, "], ");
@@ -2815,24 +2818,24 @@ static void ui_layout_operator_buts__reset_cb(bContext *UNUSED(C), void *op_pt,
/* this function does not initialize the layout, functions can be called on the layout before and after */
void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align, const short flag)
{
- if(!op->properties) {
+ if (!op->properties) {
IDPropertyTemplate val = {0};
op->properties= IDP_New(IDP_GROUP, &val, "wmOperatorProperties");
}
- if(flag & UI_LAYOUT_OP_SHOW_TITLE) {
+ if (flag & UI_LAYOUT_OP_SHOW_TITLE) {
uiItemL(layout, op->type->name, ICON_NONE);
}
/* poll() on this operator may still fail, at the moment there is no nice feedback when this happens
* just fails silently */
- if(!WM_operator_repeat_check(C, op)) {
+ if (!WM_operator_repeat_check(C, op)) {
uiBlockSetButLock(uiLayoutGetBlock(layout), TRUE, "Operator cannot redo");
uiItemL(layout, "* Redo Unsupported *", ICON_NONE); // XXX, could give some nicer feedback or not show redo panel at all?
}
/* menu */
- if(op->type->flag & OPTYPE_PRESET) {
+ if (op->type->flag & OPTYPE_PRESET) {
/* XXX, no simple way to get WM_MT_operator_presets.bl_label from python! Label remains the same always! */
PointerRNA op_ptr;
uiLayout *row;
@@ -2852,7 +2855,7 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in
op_ptr= uiItemFullO(row, "WM_OT_operator_preset_add", "", ICON_ZOOMOUT, op_ptr.data, WM_OP_INVOKE_DEFAULT, 0);
}
- if(op->type->ui) {
+ if (op->type->ui) {
op->layout= layout;
op->type->ui((bContext*)C, op);
op->layout= NULL;
@@ -2869,7 +2872,7 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in
/* main draw call */
empty= uiDefAutoButsRNA(layout, &ptr, check_prop, label_align) == 0;
- if(empty && (flag & UI_LAYOUT_OP_SHOW_EMPTY)) {
+ if (empty && (flag & UI_LAYOUT_OP_SHOW_EMPTY)) {
uiItemL(layout, IFACE_("No Properties"), ICON_NONE);
}
}
@@ -2893,7 +2896,7 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in
{
uiBut *but;
- for(but= uiLayoutGetBlock(layout)->buttons.first; but; but= but->next) {
+ for (but= uiLayoutGetBlock(layout)->buttons.first; but; but= but->next) {
/* no undo for buttons for operator redo panels */
uiButClearFlag(but, UI_BUT_UNDO);
@@ -2910,7 +2913,7 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in
/* this is a bit of a hack but best keep it in one place at least */
MenuType *uiButGetMenuType(uiBut *but)
{
- if(but->menu_create_func == ui_item_menutype_func) {
+ if (but->menu_create_func == ui_item_menutype_func) {
return (MenuType *)but->poin;
}
else {
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 5ca3f730006..4e97a38fe25 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -89,7 +89,7 @@ static void eyedropper_exit(bContext *C, wmOperator *op)
{
WM_cursor_restore(CTX_wm_window(C));
- if(op->customdata)
+ if (op->customdata)
MEM_freeN(op->customdata);
op->customdata= NULL;
}
@@ -102,7 +102,7 @@ static int eyedropper_cancel(bContext *C, wmOperator *op)
static void eyedropper_sample(bContext *C, Eyedropper *eye, int mx, int my)
{
- if(RNA_property_type(eye->prop) == PROP_FLOAT) {
+ if (RNA_property_type(eye->prop) == PROP_FLOAT) {
Scene *scene = CTX_data_scene(C);
const int color_manage = scene->r.color_mgt_flag & R_COLOR_MANAGEMENT;
float col[4];
@@ -135,7 +135,7 @@ static int eyedropper_modal(bContext *C, wmOperator *op, wmEvent *event)
case RIGHTMOUSE:
return eyedropper_cancel(C, op);
case LEFTMOUSE:
- if(event->val==KM_RELEASE) {
+ if (event->val==KM_RELEASE) {
eyedropper_sample(C, eye, event->x, event->y);
eyedropper_exit(C, op);
return OPERATOR_FINISHED;
@@ -157,7 +157,8 @@ static int eyedropper_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
- } else {
+ }
+ else {
eyedropper_exit(C, op);
return OPERATOR_CANCELLED;
}
@@ -175,7 +176,8 @@ static int eyedropper_exec (bContext *C, wmOperator *op)
eyedropper_exit(C, op);
return OPERATOR_FINISHED;
- } else {
+ }
+ else {
return OPERATOR_CANCELLED;
}
}
@@ -189,19 +191,19 @@ static int eyedropper_poll(bContext *C)
static void UI_OT_eyedropper(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Eyedropper";
- ot->idname= "UI_OT_eyedropper";
- ot->description= "Sample a color from the Blender Window to store in a property";
+ ot->name = "Eyedropper";
+ ot->idname = "UI_OT_eyedropper";
+ ot->description = "Sample a color from the Blender Window to store in a property";
/* api callbacks */
- ot->invoke= eyedropper_invoke;
- ot->modal= eyedropper_modal;
- ot->cancel= eyedropper_cancel;
- ot->exec= eyedropper_exec;
- ot->poll= eyedropper_poll;
+ ot->invoke = eyedropper_invoke;
+ ot->modal = eyedropper_modal;
+ ot->cancel = eyedropper_cancel;
+ ot->exec = eyedropper_exec;
+ ot->poll = eyedropper_poll;
/* flags */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
/* properties */
}
@@ -219,15 +221,15 @@ static int reset_default_theme_exec(bContext *C, wmOperator *UNUSED(op))
static void UI_OT_reset_default_theme(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reset to Default Theme";
- ot->idname= "UI_OT_reset_default_theme";
- ot->description= "Reset to the default theme colors";
+ ot->name = "Reset to Default Theme";
+ ot->idname = "UI_OT_reset_default_theme";
+ ot->description = "Reset to the default theme colors";
/* callbacks */
- ot->exec= reset_default_theme_exec;
+ ot->exec = reset_default_theme_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
}
/* Copy Data Path Operator ------------------------ */
@@ -259,16 +261,16 @@ static int copy_data_path_button_exec(bContext *C, wmOperator *UNUSED(op))
static void UI_OT_copy_data_path_button(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Data Path";
- ot->idname= "UI_OT_copy_data_path_button";
- ot->description= "Copy the RNA data path for this property to the clipboard";
+ ot->name = "Copy Data Path";
+ ot->idname = "UI_OT_copy_data_path_button";
+ ot->description = "Copy the RNA data path for this property to the clipboard";
/* callbacks */
- ot->exec= copy_data_path_button_exec;
+ ot->exec = copy_data_path_button_exec;
//op->poll= ??? // TODO: need to have some valid property before this can be done
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
}
/* Reset to Default Values Button Operator ------------------------ */
@@ -296,7 +298,7 @@ static int reset_default_button_exec(bContext *C, wmOperator *op)
/* if there is a valid property that is editable... */
if (ptr.data && prop && RNA_property_editable(&ptr, prop)) {
- if(RNA_property_reset(&ptr, prop, (all)? -1: index)) {
+ if (RNA_property_reset(&ptr, prop, (all)? -1: index)) {
/* perform updates required for this property */
RNA_property_update(C, &ptr, prop);
@@ -307,12 +309,12 @@ static int reset_default_button_exec(bContext *C, wmOperator *op)
}
}
- /* Since we dont want to undo _all_ edits to settings, eg window
+ /* Since we don't want to undo _all_ edits to settings, eg window
* edits on the screen or on operator settings.
* it might be better to move undo's inline - campbell */
- if(success) {
+ if (success) {
ID *id= ptr.id.data;
- if(id && ID_CHECK_UNDO(id)) {
+ if (id && ID_CHECK_UNDO(id)) {
/* do nothing, go ahead with undo */
}
else {
@@ -327,16 +329,16 @@ static int reset_default_button_exec(bContext *C, wmOperator *op)
static void UI_OT_reset_default_button(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reset to Default Value";
- ot->idname= "UI_OT_reset_default_button";
- ot->description= "Reset this property's value to its default value";
+ ot->name = "Reset to Default Value";
+ ot->idname = "UI_OT_reset_default_button";
+ ot->description = "Reset this property's value to its default value";
/* callbacks */
- ot->poll= reset_default_button_poll;
- ot->exec= reset_default_button_exec;
+ ot->poll = reset_default_button_poll;
+ ot->exec = reset_default_button_exec;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array");
@@ -346,13 +348,13 @@ static void UI_OT_reset_default_button(wmOperatorType *ot)
static int copy_to_selected_list(bContext *C, PointerRNA *ptr, ListBase *lb)
{
- if(RNA_struct_is_a(ptr->type, &RNA_Object))
+ if (RNA_struct_is_a(ptr->type, &RNA_Object))
*lb = CTX_data_collection_get(C, "selected_editable_objects");
- else if(RNA_struct_is_a(ptr->type, &RNA_EditBone))
+ else if (RNA_struct_is_a(ptr->type, &RNA_EditBone))
*lb = CTX_data_collection_get(C, "selected_editable_bones");
- else if(RNA_struct_is_a(ptr->type, &RNA_PoseBone))
+ else if (RNA_struct_is_a(ptr->type, &RNA_PoseBone))
*lb = CTX_data_collection_get(C, "selected_pose_bones");
- else if(RNA_struct_is_a(ptr->type, &RNA_Sequence))
+ else if (RNA_struct_is_a(ptr->type, &RNA_Sequence))
*lb = CTX_data_collection_get(C, "selected_editable_sequences");
else
return 0;
@@ -372,9 +374,9 @@ static int copy_to_selected_button_poll(bContext *C)
CollectionPointerLink *link;
ListBase lb;
- if(copy_to_selected_list(C, &ptr, &lb)) {
- for(link= lb.first; link; link=link->next)
- if(link->ptr.data != ptr.data && RNA_property_editable(&link->ptr, prop))
+ if (copy_to_selected_list(C, &ptr, &lb)) {
+ for (link= lb.first; link; link=link->next)
+ if (link->ptr.data != ptr.data && RNA_property_editable(&link->ptr, prop))
success= 1;
BLI_freelistN(&lb);
@@ -399,10 +401,10 @@ static int copy_to_selected_button_exec(bContext *C, wmOperator *op)
CollectionPointerLink *link;
ListBase lb;
- if(copy_to_selected_list(C, &ptr, &lb)) {
- for(link= lb.first; link; link=link->next) {
- if(link->ptr.data != ptr.data && RNA_property_editable(&link->ptr, prop)) {
- if(RNA_property_copy(&link->ptr, &ptr, prop, (all)? -1: index)) {
+ if (copy_to_selected_list(C, &ptr, &lb)) {
+ for (link= lb.first; link; link=link->next) {
+ if (link->ptr.data != ptr.data && RNA_property_editable(&link->ptr, prop)) {
+ if (RNA_property_copy(&link->ptr, &ptr, prop, (all)? -1: index)) {
RNA_property_update(C, &link->ptr, prop);
success= 1;
}
@@ -419,16 +421,16 @@ static int copy_to_selected_button_exec(bContext *C, wmOperator *op)
static void UI_OT_copy_to_selected_button(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy To Selected";
- ot->idname= "UI_OT_copy_to_selected_button";
- ot->description= "Copy property from this object to selected objects or bones";
+ ot->name = "Copy To Selected";
+ ot->idname = "UI_OT_copy_to_selected_button";
+ ot->description = "Copy property from this object to selected objects or bones";
/* callbacks */
- ot->poll= copy_to_selected_button_poll;
- ot->exec= copy_to_selected_button_exec;
+ ot->poll = copy_to_selected_button_poll;
+ ot->exec = copy_to_selected_button_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array");
@@ -474,13 +476,13 @@ static int reports_to_text_exec(bContext *C, wmOperator *UNUSED(op))
static void UI_OT_reports_to_textblock(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reports to Text Block";
- ot->idname= "UI_OT_reports_to_textblock";
- ot->description= "Write the reports ";
+ ot->name = "Reports to Text Block";
+ ot->idname = "UI_OT_reports_to_textblock";
+ ot->description = "Write the reports ";
/* callbacks */
- ot->poll= reports_to_text_poll;
- ot->exec= reports_to_text_exec;
+ ot->poll = reports_to_text_poll;
+ ot->exec = reports_to_text_exec;
}
#ifdef WITH_PYTHON
@@ -536,7 +538,7 @@ static int ui_editsource_uibut_match(uiBut *but_a, uiBut *but_b)
/* this just needs to be a 'good-enough' comparison so we can know beyond
* reasonable doubt that these buttons are the same between redraws.
* if this fails it only means edit-source fails - campbell */
- if( (but_a->x1 == but_b->x1) &&
+ if ( (but_a->x1 == but_b->x1) &&
(but_a->x2 == but_b->x2) &&
(but_a->y1 == but_b->y1) &&
(but_a->y2 == but_b->y2) &&
@@ -609,7 +611,7 @@ static int editsource_text_edit(bContext *C, wmOperator *op,
/* naughty!, find text area to set, not good behavior
* but since this is a dev tool lets allow it - campbell */
ScrArea *sa= BKE_screen_find_big_area(CTX_wm_screen(C), SPACE_TEXT, 0);
- if(sa) {
+ if (sa) {
SpaceText *st= sa->spacedata.first;
st->text= text;
}
@@ -647,7 +649,7 @@ static int editsource_exec(bContext *C, wmOperator *op)
/* redraw and get active button python info */
ED_region_do_draw(C, ar);
- for(BLI_ghashIterator_init(&ghi, ui_editsource_info->hash);
+ for (BLI_ghashIterator_init(&ghi, ui_editsource_info->hash);
!BLI_ghashIterator_isDone(&ghi);
BLI_ghashIterator_step(&ghi))
{
@@ -693,12 +695,12 @@ static int editsource_exec(bContext *C, wmOperator *op)
static void UI_OT_editsource(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reports to Text Block";
- ot->idname= "UI_OT_editsource";
- ot->description= "Edit source code for a button";
+ ot->name = "Reports to Text Block";
+ ot->idname = "UI_OT_editsource";
+ ot->description = "Edit source code for a button";
/* callbacks */
- ot->exec= editsource_exec;
+ ot->exec = editsource_exec;
}
#endif /* WITH_PYTHON */
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index b1099576505..08c96aaf0fb 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -103,17 +103,17 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat
static int panel_aligned(ScrArea *sa, ARegion *ar)
{
- if(sa->spacetype==SPACE_BUTS && ar->regiontype == RGN_TYPE_WINDOW) {
+ if (sa->spacetype==SPACE_BUTS && ar->regiontype == RGN_TYPE_WINDOW) {
SpaceButs *sbuts= sa->spacedata.first;
return sbuts->align;
}
- else if(sa->spacetype==SPACE_USERPREF && ar->regiontype == RGN_TYPE_WINDOW)
+ else if (sa->spacetype==SPACE_USERPREF && ar->regiontype == RGN_TYPE_WINDOW)
return BUT_VERTICAL;
- else if(sa->spacetype==SPACE_FILE && ar->regiontype == RGN_TYPE_CHANNELS)
+ else if (sa->spacetype==SPACE_FILE && ar->regiontype == RGN_TYPE_CHANNELS)
return BUT_VERTICAL;
- else if(sa->spacetype==SPACE_IMAGE && ar->regiontype == RGN_TYPE_PREVIEW)
+ else if (sa->spacetype==SPACE_IMAGE && ar->regiontype == RGN_TYPE_PREVIEW)
return BUT_VERTICAL;
- else if(ELEM3(ar->regiontype, RGN_TYPE_UI, RGN_TYPE_TOOLS, RGN_TYPE_TOOL_PROPS))
+ else if (ELEM3(ar->regiontype, RGN_TYPE_UI, RGN_TYPE_TOOLS, RGN_TYPE_TOOL_PROPS))
return BUT_VERTICAL;
return 0;
@@ -126,34 +126,34 @@ static int panels_re_align(ScrArea *sa, ARegion *ar, Panel **r_pa)
*r_pa= NULL;
- if(sa->spacetype==SPACE_BUTS && ar->regiontype == RGN_TYPE_WINDOW) {
+ if (sa->spacetype==SPACE_BUTS && ar->regiontype == RGN_TYPE_WINDOW) {
SpaceButs *sbuts= sa->spacedata.first;
- if(sbuts->align)
- if(sbuts->re_align || sbuts->mainbo!=sbuts->mainb)
+ if (sbuts->align)
+ if (sbuts->re_align || sbuts->mainbo!=sbuts->mainb)
return 1;
}
- else if(ar->regiontype==RGN_TYPE_UI)
+ else if (ar->regiontype==RGN_TYPE_UI)
return 1;
- else if(sa->spacetype==SPACE_IMAGE && ar->regiontype == RGN_TYPE_PREVIEW)
+ else if (sa->spacetype==SPACE_IMAGE && ar->regiontype == RGN_TYPE_PREVIEW)
return 1;
- else if(sa->spacetype==SPACE_FILE && ar->regiontype == RGN_TYPE_CHANNELS)
+ else if (sa->spacetype==SPACE_FILE && ar->regiontype == RGN_TYPE_CHANNELS)
return 1;
/* in case panel is added or disappears */
- for(pa=ar->panels.first; pa; pa=pa->next) {
- if((pa->runtime_flag & PNL_WAS_ACTIVE) && !(pa->runtime_flag & PNL_ACTIVE))
+ for (pa=ar->panels.first; pa; pa=pa->next) {
+ if ((pa->runtime_flag & PNL_WAS_ACTIVE) && !(pa->runtime_flag & PNL_ACTIVE))
return 1;
- if(!(pa->runtime_flag & PNL_WAS_ACTIVE) && (pa->runtime_flag & PNL_ACTIVE))
+ if (!(pa->runtime_flag & PNL_WAS_ACTIVE) && (pa->runtime_flag & PNL_ACTIVE))
return 1;
- if(pa->activedata)
+ if (pa->activedata)
active= 1;
}
/* in case we need to do an animation (size changes) */
- for(pa=ar->panels.first; pa; pa=pa->next) {
- if(pa->runtime_flag & PNL_ANIM_ALIGN) {
- if(!active)
+ for (pa=ar->panels.first; pa; pa=pa->next) {
+ if (pa->runtime_flag & PNL_ANIM_ALIGN) {
+ if (!active)
*r_pa= pa;
return 1;
}
@@ -183,14 +183,14 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int
int align= panel_aligned(sa, ar);
/* check if Panel exists, then use that one */
- for(pa=ar->panels.first; pa; pa=pa->next)
- if(strncmp(pa->panelname, idname, UI_MAX_NAME_STR)==0)
- if(strncmp(pa->tabname, tabname, UI_MAX_NAME_STR)==0)
+ for (pa=ar->panels.first; pa; pa=pa->next)
+ if (strncmp(pa->panelname, idname, UI_MAX_NAME_STR)==0)
+ if (strncmp(pa->tabname, tabname, UI_MAX_NAME_STR)==0)
break;
newpanel= (pa == NULL);
- if(!newpanel) {
+ if (!newpanel) {
pa->type= pt;
}
else {
@@ -200,8 +200,8 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int
BLI_strncpy(pa->panelname, idname, UI_MAX_NAME_STR);
BLI_strncpy(pa->tabname, tabname, UI_MAX_NAME_STR);
- if(pt->flag & PNL_DEFAULT_CLOSED) {
- if(align == BUT_VERTICAL)
+ if (pt->flag & PNL_DEFAULT_CLOSED) {
+ if (align == BUT_VERTICAL)
pa->flag |= PNL_CLOSEDY;
else
pa->flag |= PNL_CLOSEDX;
@@ -216,11 +216,11 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int
BLI_addtail(&ar->panels, pa);
/* make new Panel tabbed? */
- if(hookname) {
- for(patab= ar->panels.first; patab; patab= patab->next) {
- if((patab->runtime_flag & PNL_ACTIVE) && patab->paneltab==NULL) {
- if(strncmp(hookname, patab->panelname, UI_MAX_NAME_STR)==0) {
- if(strncmp(tabname, patab->tabname, UI_MAX_NAME_STR)==0) {
+ if (hookname) {
+ for (patab= ar->panels.first; patab; patab= patab->next) {
+ if ((patab->runtime_flag & PNL_ACTIVE) && patab->paneltab==NULL) {
+ if (strncmp(hookname, patab->panelname, UI_MAX_NAME_STR)==0) {
+ if (strncmp(tabname, patab->tabname, UI_MAX_NAME_STR)==0) {
pa->paneltab= patab;
ui_panel_copy_offset(pa, patab);
break;
@@ -236,19 +236,19 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int
/* if a new panel is added, we insert it right after the panel
* that was last added. this way new panels are inserted in the
* right place between versions */
- for(palast=ar->panels.first; palast; palast=palast->next)
- if(palast->runtime_flag & PNL_LAST_ADDED)
+ for (palast=ar->panels.first; palast; palast=palast->next)
+ if (palast->runtime_flag & PNL_LAST_ADDED)
break;
- if(newpanel) {
+ if (newpanel) {
pa->sortorder= (palast)? palast->sortorder+1: 0;
- for(panext=ar->panels.first; panext; panext=panext->next)
- if(panext != pa && panext->sortorder >= pa->sortorder)
+ for (panext=ar->panels.first; panext; panext=panext->next)
+ if (panext != pa && panext->sortorder >= pa->sortorder)
panext->sortorder++;
}
- if(palast)
+ if (palast)
palast->runtime_flag &= ~PNL_LAST_ADDED;
/* assign to block */
@@ -257,8 +257,8 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int
*open= 0;
- if(pa->paneltab) return pa;
- if(pa->flag & PNL_CLOSED) return pa;
+ if (pa->paneltab) return pa;
+ if (pa->flag & PNL_CLOSED) return pa;
*open= 1;
@@ -269,23 +269,23 @@ void uiEndPanel(uiBlock *block, int width, int height)
{
Panel *pa= block->panel;
- if(pa->runtime_flag & PNL_NEW_ADDED) {
+ if (pa->runtime_flag & PNL_NEW_ADDED) {
pa->runtime_flag &= ~PNL_NEW_ADDED;
pa->sizex= width;
pa->sizey= height;
}
else {
/* check if we need to do an animation */
- if(!ELEM(width, 0, pa->sizex) || !ELEM(height, 0, pa->sizey)) {
+ if (!ELEM(width, 0, pa->sizex) || !ELEM(height, 0, pa->sizey)) {
pa->runtime_flag |= PNL_ANIM_ALIGN;
- if(height != 0)
+ if (height != 0)
pa->ofsy += pa->sizey-height;
}
/* update width/height if non-zero */
- if(width != 0)
+ if (width != 0)
pa->sizex= width;
- if(height != 0)
+ if (height != 0)
pa->sizey= height;
}
}
@@ -301,7 +301,7 @@ static void ui_offset_panel_block(uiBlock *block)
ofsy= block->panel->sizey - style->panelspace;
- for(but= block->buttons.first; but; but=but->next) {
+ for (but= block->buttons.first; but; but=but->next) {
but->y1 += ofsy;
but->y2 += ofsy;
}
@@ -319,7 +319,7 @@ static void uiPanelPush(uiBlock *block)
{
glPushMatrix();
- if(block->panel)
+ if (block->panel)
glTranslatef((float)block->panel->ofsx, (float)block->panel->ofsy, 0.0);
}
@@ -332,10 +332,10 @@ static void uiPanelPop(uiBlock *UNUSED(block))
/* triangle 'icon' for panel header */
void UI_DrawTriIcon(float x, float y, char dir)
{
- if(dir=='h') {
+ if (dir=='h') {
ui_draw_anti_tria( x-3, y-5, x-3, y+5, x+7,y );
}
- else if(dir=='t') {
+ else if (dir=='t') {
ui_draw_anti_tria( x-5, y-7, x+5, y-7, x, y+3);
}
else { /* 'v' = vertical, down */
@@ -346,7 +346,7 @@ void UI_DrawTriIcon(float x, float y, char dir)
/* triangle 'icon' inside rect */
static void ui_draw_tria_rect(rctf *rect, char dir)
{
- if(dir=='h') {
+ if (dir=='h') {
float half= 0.5f*(rect->ymax - rect->ymin);
ui_draw_anti_tria(rect->xmin, rect->ymin, rect->xmin, rect->ymax, rect->xmax, rect->ymin+half);
}
@@ -441,10 +441,10 @@ static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *r
Panel *panel= block->panel;
rcti hrect;
int pnl_icons;
- const char *activename= IFACE_(panel->drawname[0] ? panel->drawname : panel->panelname);
+ const char *activename = IFACE_(panel->drawname[0] ? panel->drawname : panel->panelname);
/* + 0.001f to avoid flirting with float inaccuracy */
- if(panel->control & UI_PNL_CLOSE) pnl_icons=(panel->labelofs+2*PNL_ICON+5)/block->aspect + 0.001f;
+ if (panel->control & UI_PNL_CLOSE) pnl_icons=(panel->labelofs+2*PNL_ICON+5)/block->aspect + 0.001f;
else pnl_icons= (panel->labelofs+PNL_ICON+5)/block->aspect + 0.001f;
/* active tab */
@@ -452,8 +452,8 @@ static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *r
UI_ThemeColor(TH_TITLE);
hrect= *rect;
- if(dir == 'h') {
- hrect.xmin= rect->xmin+pnl_icons;
+ if (dir == 'h') {
+ hrect.xmin = rect->xmin+pnl_icons;
hrect.ymin += 2.0f/block->aspect;
uiStyleFontDraw(&style->paneltitle, &hrect, activename);
}
@@ -461,7 +461,7 @@ static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *r
/* ignore 'pnl_icons', otherwise the text gets offset horizontally
* + 0.001f to avoid flirting with float inaccuracy
*/
- hrect.xmin= rect->xmin + (PNL_ICON+5)/block->aspect + 0.001f;
+ hrect.xmin = rect->xmin + (PNL_ICON+5)/block->aspect + 0.001f;
uiStyleFontDrawRotated(&style->paneltitle, &hrect, activename);
}
}
@@ -473,10 +473,10 @@ static void rectf_scale(rctf *rect, float scale)
float sizex= 0.5f*scale*(rect->xmax - rect->xmin);
float sizey= 0.5f*scale*(rect->ymax - rect->ymin);
- rect->xmin= centx - sizex;
- rect->xmax= centx + sizex;
- rect->ymin= centy - sizey;
- rect->ymax= centy + sizey;
+ rect->xmin = centx - sizex;
+ rect->xmax = centx + sizex;
+ rect->ymin = centy - sizey;
+ rect->ymax = centy + sizey;
}
/* panel integrated in buttonswindow, tool/property lists etc */
@@ -488,14 +488,14 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
rctf itemrect;
int ofsx;
- if(panel->paneltab) return;
- if(panel->type && (panel->type->flag & PNL_NO_HEADER)) return;
+ if (panel->paneltab) return;
+ if (panel->type && (panel->type->flag & PNL_NO_HEADER)) return;
/* calculate header rect */
/* + 0.001f to prevent flicker due to float inaccuracy */
headrect= *rect;
- headrect.ymin= headrect.ymax;
- headrect.ymax= headrect.ymin + floor(PNL_HEADER/block->aspect + 0.001f);
+ headrect.ymin = headrect.ymax;
+ headrect.ymax = headrect.ymin + floor(PNL_HEADER/block->aspect + 0.001f);
{
float minx= rect->xmin;
@@ -504,7 +504,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
glEnable(GL_BLEND);
- if(btheme->tui.panel.show_header) {
+ if (btheme->tui.panel.show_header) {
/* draw with background color */
glEnable(GL_BLEND);
glColor4ubv((unsigned char*)btheme->tui.panel.header);
@@ -513,7 +513,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
fdrawline(minx, y, maxx, y);
fdrawline(minx, y, maxx, y);
}
- else if(!(panel->runtime_flag & PNL_FIRST)) {
+ else if (!(panel->runtime_flag & PNL_FIRST)) {
/* draw embossed separator */
minx += 5.0f/block->aspect;
maxx -= 5.0f/block->aspect;
@@ -529,14 +529,14 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
}
/* horizontal title */
- if(!(panel->flag & PNL_CLOSEDX)) {
+ if (!(panel->flag & PNL_CLOSEDX)) {
ui_draw_aligned_panel_header(style, block, &headrect, 'h');
/* itemrect smaller */
- itemrect.xmax= headrect.xmax - 5.0f/block->aspect;
- itemrect.xmin= itemrect.xmax - (headrect.ymax-headrect.ymin);
- itemrect.ymin= headrect.ymin;
- itemrect.ymax= headrect.ymax;
+ itemrect.xmax = headrect.xmax - 5.0f/block->aspect;
+ itemrect.xmin = itemrect.xmax - (headrect.ymax-headrect.ymin);
+ itemrect.ymin = headrect.ymin;
+ itemrect.ymax = headrect.ymax;
rectf_scale(&itemrect, 0.7f);
ui_draw_panel_dragwidget(&itemrect);
@@ -545,10 +545,10 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
/* if the panel is minimized vertically:
* (------)
*/
- if(panel->flag & PNL_CLOSEDY) {
+ if (panel->flag & PNL_CLOSEDY) {
}
- else if(panel->flag & PNL_CLOSEDX) {
+ else if (panel->flag & PNL_CLOSEDX) {
/* draw vertical title */
ui_draw_aligned_panel_header(style, block, &headrect, 'v');
}
@@ -556,22 +556,22 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
else {
/* in some occasions, draw a border */
- if(panel->flag & PNL_SELECT) {
- if(panel->control & UI_PNL_SOLID) uiSetRoundBox(UI_CNR_ALL);
+ if (panel->flag & PNL_SELECT) {
+ if (panel->control & UI_PNL_SOLID) uiSetRoundBox(UI_CNR_ALL);
else uiSetRoundBox(UI_CNR_NONE);
UI_ThemeColorShade(TH_BACK, -120);
uiRoundRect(0.5f + rect->xmin, 0.5f + rect->ymin, 0.5f + rect->xmax, 0.5f + headrect.ymax+1, 8);
}
- if(panel->control & UI_PNL_SCALE)
+ if (panel->control & UI_PNL_SCALE)
ui_draw_panel_scalewidget(rect);
}
/* draw optional close icon */
ofsx= 6;
- if(panel->control & UI_PNL_CLOSE) {
+ if (panel->control & UI_PNL_CLOSE) {
UI_ThemeColor(TH_TEXT);
ui_draw_x_icon(rect->xmin+2+ofsx, rect->ymax+2);
@@ -582,16 +582,16 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
UI_ThemeColor(TH_TEXT);
/* itemrect smaller */
- itemrect.xmin= headrect.xmin + 5.0f/block->aspect;
- itemrect.xmax= itemrect.xmin + (headrect.ymax-headrect.ymin);
- itemrect.ymin= headrect.ymin;
- itemrect.ymax= headrect.ymax;
+ itemrect.xmin = headrect.xmin + 5.0f/block->aspect;
+ itemrect.xmax = itemrect.xmin + (headrect.ymax-headrect.ymin);
+ itemrect.ymin = headrect.ymin;
+ itemrect.ymax = headrect.ymax;
rectf_scale(&itemrect, 0.35f);
- if(panel->flag & PNL_CLOSEDY)
+ if (panel->flag & PNL_CLOSEDY)
ui_draw_tria_rect(&itemrect, 'h');
- else if(panel->flag & PNL_CLOSEDX)
+ else if (panel->flag & PNL_CLOSEDX)
ui_draw_tria_rect(&itemrect, 'h');
else
ui_draw_tria_rect(&itemrect, 'v');
@@ -603,7 +603,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
static int get_panel_header(Panel *pa)
{
- if(pa->type && (pa->type->flag & PNL_NO_HEADER))
+ if (pa->type && (pa->type->flag & PNL_NO_HEADER))
return 0;
return PNL_HEADER;
@@ -611,26 +611,26 @@ static int get_panel_header(Panel *pa)
static int get_panel_size_y(Panel *pa)
{
- if(pa->type && (pa->type->flag & PNL_NO_HEADER))
+ if (pa->type && (pa->type->flag & PNL_NO_HEADER))
return pa->sizey;
return PNL_HEADER + pa->sizey;
}
-/* this function is needed because uiBlock and Panel itself dont
+/* this function is needed because uiBlock and Panel itself don't
* change sizey or location when closed */
static int get_panel_real_ofsy(Panel *pa)
{
- if(pa->flag & PNL_CLOSEDY) return pa->ofsy+pa->sizey;
- else if(pa->paneltab && (pa->paneltab->flag & PNL_CLOSEDY)) return pa->ofsy+pa->sizey;
- else if(pa->paneltab) return pa->paneltab->ofsy;
+ if (pa->flag & PNL_CLOSEDY) return pa->ofsy+pa->sizey;
+ else if (pa->paneltab && (pa->paneltab->flag & PNL_CLOSEDY)) return pa->ofsy+pa->sizey;
+ else if (pa->paneltab) return pa->paneltab->ofsy;
else return pa->ofsy;
}
static int get_panel_real_ofsx(Panel *pa)
{
- if(pa->flag & PNL_CLOSEDX) return pa->ofsx+get_panel_header(pa);
- else if(pa->paneltab && (pa->paneltab->flag & PNL_CLOSEDX)) return pa->ofsx+get_panel_header(pa);
+ if (pa->flag & PNL_CLOSEDX) return pa->ofsx+get_panel_header(pa);
+ else if (pa->paneltab && (pa->paneltab->flag & PNL_CLOSEDX)) return pa->ofsx+get_panel_header(pa);
else return pa->ofsx+pa->sizex;
}
@@ -648,10 +648,10 @@ static int find_leftmost_panel(const void *a1, const void *a2)
{
const PanelSort *ps1=a1, *ps2=a2;
- if(ps1->pa->ofsx > ps2->pa->ofsx) return 1;
- else if(ps1->pa->ofsx < ps2->pa->ofsx) return -1;
- else if(ps1->pa->sortorder > ps2->pa->sortorder) return 1;
- else if(ps1->pa->sortorder < ps2->pa->sortorder) return -1;
+ if (ps1->pa->ofsx > ps2->pa->ofsx) return 1;
+ else if (ps1->pa->ofsx < ps2->pa->ofsx) return -1;
+ else if (ps1->pa->sortorder > ps2->pa->sortorder) return 1;
+ else if (ps1->pa->sortorder < ps2->pa->sortorder) return -1;
return 0;
}
@@ -665,10 +665,10 @@ static int find_highest_panel(const void *a1, const void *a2)
* prevent them from being sorted */
if (ps1->pa->sortorder < ps2->pa->sortorder && ps1->pa->type->flag & PNL_NO_HEADER) return -1;
- if(ps1->pa->ofsy+ps1->pa->sizey < ps2->pa->ofsy+ps2->pa->sizey) return 1;
- else if(ps1->pa->ofsy+ps1->pa->sizey > ps2->pa->ofsy+ps2->pa->sizey) return -1;
- else if(ps1->pa->sortorder > ps2->pa->sortorder) return 1;
- else if(ps1->pa->sortorder < ps2->pa->sortorder) return -1;
+ if (ps1->pa->ofsy+ps1->pa->sizey < ps2->pa->ofsy+ps2->pa->sizey) return 1;
+ else if (ps1->pa->ofsy+ps1->pa->sizey > ps2->pa->ofsy+ps2->pa->sizey) return -1;
+ else if (ps1->pa->sortorder > ps2->pa->sortorder) return 1;
+ else if (ps1->pa->sortorder < ps2->pa->sortorder) return -1;
return 0;
}
@@ -677,8 +677,8 @@ static int compare_panel(const void *a1, const void *a2)
{
const PanelSort *ps1=a1, *ps2=a2;
- if(ps1->pa->sortorder > ps2->pa->sortorder) return 1;
- else if(ps1->pa->sortorder < ps2->pa->sortorder) return -1;
+ if (ps1->pa->sortorder > ps2->pa->sortorder) return 1;
+ else if (ps1->pa->sortorder < ps2->pa->sortorder) return -1;
return 0;
}
@@ -693,18 +693,18 @@ static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
int align= panel_aligned(sa, ar);
/* count active, not tabbed panels */
- for(pa= ar->panels.first; pa; pa= pa->next)
- if((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==NULL)
+ for (pa= ar->panels.first; pa; pa= pa->next)
+ if ((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==NULL)
tot++;
- if(tot==0) return 0;
+ if (tot==0) return 0;
/* extra; change close direction? */
- for(pa= ar->panels.first; pa; pa= pa->next) {
- if((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==NULL) {
- if((pa->flag & PNL_CLOSEDX) && (align==BUT_VERTICAL))
+ for (pa= ar->panels.first; pa; pa= pa->next) {
+ if ((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==NULL) {
+ if ((pa->flag & PNL_CLOSEDX) && (align==BUT_VERTICAL))
pa->flag ^= PNL_CLOSED;
- else if((pa->flag & PNL_CLOSEDY) && (align==BUT_HORIZONTAL))
+ else if ((pa->flag & PNL_CLOSEDY) && (align==BUT_HORIZONTAL))
pa->flag ^= PNL_CLOSED;
}
}
@@ -713,22 +713,22 @@ static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
panelsort= MEM_callocN(tot*sizeof(PanelSort), "panelsort");
ps= panelsort;
- for(pa= ar->panels.first; pa; pa= pa->next) {
- if((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==NULL) {
+ for (pa= ar->panels.first; pa; pa= pa->next) {
+ if ((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==NULL) {
ps->pa= MEM_dupallocN(pa);
ps->orig= pa;
ps++;
}
}
- if(drag) {
+ if (drag) {
/* while we are dragging, we sort on location and update sortorder */
- if(align==BUT_VERTICAL)
+ if (align==BUT_VERTICAL)
qsort(panelsort, tot, sizeof(PanelSort), find_highest_panel);
else
qsort(panelsort, tot, sizeof(PanelSort), find_leftmost_panel);
- for(ps=panelsort, a=0; a<tot; a++, ps++)
+ for (ps=panelsort, a=0; a<tot; a++, ps++)
ps->orig->sortorder= a;
}
else
@@ -740,10 +740,10 @@ static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
ps->pa->ofsx= 0;
ps->pa->ofsy= -get_panel_size_y(ps->pa);
- for(a=0; a<tot-1; a++, ps++) {
+ for (a=0; a<tot-1; a++, ps++) {
psnext= ps+1;
- if(align==BUT_VERTICAL) {
+ if (align==BUT_VERTICAL) {
psnext->pa->ofsx= ps->pa->ofsx;
psnext->pa->ofsy= get_panel_real_ofsy(ps->pa) - get_panel_size_y(psnext->pa);
}
@@ -756,9 +756,9 @@ static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
/* we interpolate */
done= 0;
ps= panelsort;
- for(a=0; a<tot; a++, ps++) {
- if((ps->pa->flag & PNL_SELECT)==0) {
- if((ps->orig->ofsx != ps->pa->ofsx) || (ps->orig->ofsy != ps->pa->ofsy)) {
+ for (a=0; a<tot; a++, ps++) {
+ if ((ps->pa->flag & PNL_SELECT)==0) {
+ if ((ps->orig->ofsx != ps->pa->ofsx) || (ps->orig->ofsy != ps->pa->ofsy)) {
ps->orig->ofsx= floorf(0.5f + fac*(float)ps->pa->ofsx + (1.0f-fac)*(float)ps->orig->ofsx);
ps->orig->ofsy= floorf(0.5f + fac*(float)ps->pa->ofsy + (1.0f-fac)*(float)ps->orig->ofsy);
done= 1;
@@ -767,8 +767,8 @@ static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
}
/* copy locations to tabs */
- for(pa= ar->panels.first; pa; pa= pa->next)
- if(pa->paneltab && (pa->runtime_flag & PNL_ACTIVE))
+ for (pa= ar->panels.first; pa; pa= pa->next)
+ if (pa->paneltab && (pa->runtime_flag & PNL_ACTIVE))
ui_panel_copy_offset(pa, pa->paneltab);
/* free panelsort array */
@@ -788,11 +788,11 @@ static void ui_panels_size(ScrArea *sa, ARegion *ar, int *x, int *y)
int sizey = UI_PANEL_WIDTH;
/* compute size taken up by panels, for setting in view2d */
- for(pa= ar->panels.first; pa; pa= pa->next) {
- if(pa->runtime_flag & PNL_ACTIVE) {
+ for (pa= ar->panels.first; pa; pa= pa->next) {
+ if (pa->runtime_flag & PNL_ACTIVE) {
int pa_sizex, pa_sizey;
- if(align==BUT_VERTICAL) {
+ if (align==BUT_VERTICAL) {
pa_sizex= pa->ofsx + pa->sizex;
pa_sizey= get_panel_real_ofsy(pa);
}
@@ -822,12 +822,12 @@ static void ui_do_animate(const bContext *C, Panel *panel)
fac= MIN2(fac, 1.0f);
/* for max 1 second, interpolate positions */
- if(uiAlignPanelStep(sa, ar, fac, 0))
+ if (uiAlignPanelStep(sa, ar, fac, 0))
ED_region_tag_redraw(ar);
else
fac= 1.0f;
- if(fac >= 1.0f) {
+ if (fac >= 1.0f) {
panel_activate_state(C, panel, PANEL_STATE_EXIT);
return;
}
@@ -839,8 +839,8 @@ void uiBeginPanels(const bContext *UNUSED(C), ARegion *ar)
/* set all panels as inactive, so that at the end we know
* which ones were used */
- for(pa=ar->panels.first; pa; pa=pa->next) {
- if(pa->runtime_flag & PNL_ACTIVE)
+ for (pa=ar->panels.first; pa; pa=pa->next) {
+ if (pa->runtime_flag & PNL_ACTIVE)
pa->runtime_flag= PNL_WAS_ACTIVE;
else
pa->runtime_flag= 0;
@@ -855,25 +855,25 @@ void uiEndPanels(const bContext *C, ARegion *ar, int *x, int *y)
Panel *panot, *panew, *patest, *pa, *firstpa;
/* offset contents */
- for(block= ar->uiblocks.first; block; block= block->next)
- if(block->active && block->panel)
+ for (block= ar->uiblocks.first; block; block= block->next)
+ if (block->active && block->panel)
ui_offset_panel_block(block);
/* consistency; are panels not made, whilst they have tabs */
- for(panot= ar->panels.first; panot; panot= panot->next) {
- if((panot->runtime_flag & PNL_ACTIVE)==0) { // not made
+ for (panot= ar->panels.first; panot; panot= panot->next) {
+ if ((panot->runtime_flag & PNL_ACTIVE)==0) { // not made
- for(panew= ar->panels.first; panew; panew= panew->next) {
- if((panew->runtime_flag & PNL_ACTIVE)) {
- if(panew->paneltab==panot) { // panew is tab in notmade pa
+ for (panew= ar->panels.first; panew; panew= panew->next) {
+ if ((panew->runtime_flag & PNL_ACTIVE)) {
+ if (panew->paneltab==panot) { // panew is tab in notmade pa
break;
}
}
}
/* now panew can become the new parent, check all other tabs */
- if(panew) {
- for(patest= ar->panels.first; patest; patest= patest->next) {
- if(patest->paneltab == panot) {
+ if (panew) {
+ for (patest= ar->panels.first; patest; patest= patest->next) {
+ if (patest->paneltab == panot) {
patest->paneltab= panew;
}
}
@@ -885,8 +885,8 @@ void uiEndPanels(const bContext *C, ARegion *ar, int *x, int *y)
}
/* re-align, possibly with animation */
- if(panels_re_align(sa, ar, &pa)) {
- if(pa)
+ if (panels_re_align(sa, ar, &pa)) {
+ if (pa)
panel_activate_state(C, pa, PANEL_STATE_ANIMATION);
else
uiAlignPanelStep(sa, ar, 1.0, 0);
@@ -894,12 +894,12 @@ void uiEndPanels(const bContext *C, ARegion *ar, int *x, int *y)
/* tag first panel */
firstpa= NULL;
- for(block= ar->uiblocks.first; block; block=block->next)
- if(block->active && block->panel)
- if(!firstpa || block->panel->sortorder < firstpa->sortorder)
+ for (block= ar->uiblocks.first; block; block=block->next)
+ if (block->active && block->panel)
+ if (!firstpa || block->panel->sortorder < firstpa->sortorder)
firstpa= block->panel;
- if(firstpa)
+ if (firstpa)
firstpa->runtime_flag |= PNL_FIRST;
/* compute size taken up by panel */
@@ -913,14 +913,14 @@ void uiDrawPanels(const bContext *C, ARegion *ar)
UI_ThemeClearColor(TH_BACK);
/* draw panels, selected on top */
- for(block= ar->uiblocks.first; block; block=block->next) {
- if(block->active && block->panel && !(block->panel->flag & PNL_SELECT)) {
+ for (block= ar->uiblocks.first; block; block=block->next) {
+ if (block->active && block->panel && !(block->panel->flag & PNL_SELECT)) {
uiDrawBlock(C, block);
}
}
- for(block= ar->uiblocks.first; block; block=block->next) {
- if(block->active && block->panel && (block->panel->flag & PNL_SELECT)) {
+ for (block= ar->uiblocks.first; block; block=block->next) {
+ if (block->active && block->panel && (block->panel->flag & PNL_SELECT)) {
uiDrawBlock(C, block);
}
}
@@ -934,21 +934,21 @@ static void check_panel_overlap(ARegion *ar, Panel *panel)
/* also called with panel==NULL for clear */
- for(pa=ar->panels.first; pa; pa=pa->next) {
+ for (pa=ar->panels.first; pa; pa=pa->next) {
pa->flag &= ~PNL_OVERLAP;
- if(panel && (pa != panel)) {
- if(pa->paneltab==NULL && (pa->runtime_flag & PNL_ACTIVE)) {
+ if (panel && (pa != panel)) {
+ if (pa->paneltab==NULL && (pa->runtime_flag & PNL_ACTIVE)) {
float safex= 0.2, safey= 0.2;
- if(pa->flag & PNL_CLOSEDX) safex= 0.05;
- else if(pa->flag & PNL_CLOSEDY) safey= 0.05;
- else if(panel->flag & PNL_CLOSEDX) safex= 0.05;
- else if(panel->flag & PNL_CLOSEDY) safey= 0.05;
+ if (pa->flag & PNL_CLOSEDX) safex= 0.05;
+ else if (pa->flag & PNL_CLOSEDY) safey= 0.05;
+ else if (panel->flag & PNL_CLOSEDX) safex= 0.05;
+ else if (panel->flag & PNL_CLOSEDY) safey= 0.05;
- if(pa->ofsx > panel->ofsx- safex*panel->sizex)
- if(pa->ofsx+pa->sizex < panel->ofsx+ (1.0f+safex)*panel->sizex)
- if(pa->ofsy > panel->ofsy- safey*panel->sizey)
- if(pa->ofsy+pa->sizey < panel->ofsy+ (1.0f+safey)*panel->sizey)
+ if (pa->ofsx > panel->ofsx- safex*panel->sizex)
+ if (pa->ofsx+pa->sizex < panel->ofsx+ (1.0f+safex)*panel->sizex)
+ if (pa->ofsy > panel->ofsy- safey*panel->sizey)
+ if (pa->ofsy+pa->sizey < panel->ofsy+ (1.0f+safey)*panel->sizey)
pa->flag |= PNL_OVERLAP;
}
}
@@ -965,7 +965,7 @@ static void ui_do_drag(const bContext *C, wmEvent *event, Panel *panel)
short align= panel_aligned(sa, ar), dx=0, dy=0;
/* first clip for window, no dragging outside */
- if(!BLI_in_rcti(&ar->winrct, event->x, event->y))
+ if (!BLI_in_rcti(&ar->winrct, event->x, event->y))
return;
dx= (event->x-data->startx) & ~(PNL_GRID-1);
@@ -974,10 +974,10 @@ static void ui_do_drag(const bContext *C, wmEvent *event, Panel *panel)
dx *= (float)(ar->v2d.cur.xmax - ar->v2d.cur.xmin)/(float)(ar->winrct.xmax - ar->winrct.xmin);
dy *= (float)(ar->v2d.cur.ymax - ar->v2d.cur.ymin)/(float)(ar->winrct.ymax - ar->winrct.ymin);
- if(data->state == PANEL_STATE_DRAG_SCALE) {
+ if (data->state == PANEL_STATE_DRAG_SCALE) {
panel->sizex = MAX2(data->startsizex+dx, UI_PANEL_MINX);
- if(data->startsizey-dy < UI_PANEL_MINY)
+ if (data->startsizey-dy < UI_PANEL_MINY)
dy= -UI_PANEL_MINY+data->startsizey;
panel->sizey= data->startsizey-dy;
@@ -991,7 +991,7 @@ static void ui_do_drag(const bContext *C, wmEvent *event, Panel *panel)
panel->ofsy = data->startofsy+dy;
check_panel_overlap(ar, panel);
- if(align) uiAlignPanelStep(sa, ar, 0.2, 1);
+ if (align) uiAlignPanelStep(sa, ar, 0.2, 1);
}
ED_region_tag_redraw(ar);
@@ -1001,7 +1001,7 @@ static void ui_do_drag(const bContext *C, wmEvent *event, Panel *panel)
/* this function is supposed to call general window drawing too */
-/* also it supposes a block has panel, and isnt a menu */
+/* also it supposes a block has panel, and isn't a menu */
static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, int my, int event)
{
ScrArea *sa= CTX_wm_area(C);
@@ -1014,34 +1014,34 @@ static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, in
/* XXX weak code, currently it assumes layout style for location of widgets */
/* check open/collapsed button */
- if(event==RETKEY)
+ if (event==RETKEY)
button= 1;
- else if(event==AKEY)
+ else if (event==AKEY)
button= 1;
- else if(block->panel->flag & PNL_CLOSEDX) {
- if(my >= block->maxy) button= 1;
+ else if (block->panel->flag & PNL_CLOSEDX) {
+ if (my >= block->maxy) button= 1;
}
- else if(block->panel->control & UI_PNL_CLOSE) {
+ else if (block->panel->control & UI_PNL_CLOSE) {
/* whole of header can be used to collapse panel (except top-right corner) */
- if(mx <= block->maxx-8-PNL_ICON) button= 2;
- //else if(mx <= block->minx+10+2*PNL_ICON+2) button= 1;
+ if (mx <= block->maxx-8-PNL_ICON) button= 2;
+ //else if (mx <= block->minx+10+2*PNL_ICON+2) button= 1;
}
- else if(mx <= block->maxx-PNL_ICON-12) {
+ else if (mx <= block->maxx-PNL_ICON-12) {
button= 1;
}
- if(button) {
- if(button==2) { // close
+ if (button) {
+ if (button==2) { // close
ED_region_tag_redraw(ar);
}
else { // collapse
- if(block->panel->flag & PNL_CLOSED) {
+ if (block->panel->flag & PNL_CLOSED) {
block->panel->flag &= ~PNL_CLOSED;
/* snap back up so full panel aligns with screen edge */
if (block->panel->snap & PNL_SNAP_BOTTOM)
block->panel->ofsy= 0;
}
- else if(align==BUT_HORIZONTAL) {
+ else if (align==BUT_HORIZONTAL) {
block->panel->flag |= PNL_CLOSEDX;
}
else {
@@ -1051,20 +1051,20 @@ static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, in
block->panel->ofsy= -block->panel->sizey;
}
- for(pa= ar->panels.first; pa; pa= pa->next) {
- if(pa->paneltab==block->panel) {
- if(block->panel->flag & PNL_CLOSED) pa->flag |= PNL_CLOSED;
+ for (pa= ar->panels.first; pa; pa= pa->next) {
+ if (pa->paneltab==block->panel) {
+ if (block->panel->flag & PNL_CLOSED) pa->flag |= PNL_CLOSED;
else pa->flag &= ~PNL_CLOSED;
}
}
}
- if(align)
+ if (align)
panel_activate_state(C, block->panel, PANEL_STATE_ANIMATION);
else
ED_region_tag_redraw(ar);
}
- else if(mx <= (block->maxx-PNL_ICON-12)+PNL_ICON+2) {
+ else if (mx <= (block->maxx-PNL_ICON-12)+PNL_ICON+2) {
panel_activate_state(C, block->panel, PANEL_STATE_DRAG);
}
}
@@ -1080,7 +1080,7 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
int retval, mx, my, inside_header= 0, inside_scale= 0, inside;
retval= WM_UI_HANDLER_CONTINUE;
- for(block=ar->uiblocks.last; block; block=block->prev) {
+ for (block=ar->uiblocks.last; block; block=block->prev) {
mx= event->x;
my= event->y;
ui_window_to_block(ar, block, &mx, &my);
@@ -1089,20 +1089,20 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
inside= 0;
pa= block->panel;
- if(!pa || pa->paneltab!=NULL)
+ if (!pa || pa->paneltab!=NULL)
continue;
- if(pa->type && pa->type->flag & PNL_NO_HEADER) // XXX - accessed freed panels when scripts reload, need to fix.
+ if (pa->type && pa->type->flag & PNL_NO_HEADER) // XXX - accessed freed panels when scripts reload, need to fix.
continue;
- if(block->minx <= mx && block->maxx >= mx)
- if(block->miny <= my && block->maxy+PNL_HEADER >= my)
+ if (block->minx <= mx && block->maxx >= mx)
+ if (block->miny <= my && block->maxy+PNL_HEADER >= my)
inside= 1;
- if(inside && event->val==KM_PRESS) {
- if(event->type == AKEY && !ELEM4(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift, event->alt)) {
+ if (inside && event->val==KM_PRESS) {
+ if (event->type == AKEY && !ELEM4(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift, event->alt)) {
- if(pa->flag & PNL_CLOSEDY) {
- if((block->maxy <= my) && (block->maxy+PNL_HEADER >= my))
+ if (pa->flag & PNL_CLOSEDY) {
+ if ((block->maxy <= my) && (block->maxy+PNL_HEADER >= my))
ui_handle_panel_header(C, block, mx, my, event->type);
}
else
@@ -1113,53 +1113,53 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
}
/* on active button, do not handle panels */
- if(ui_button_is_active(ar))
+ if (ui_button_is_active(ar))
continue;
- if(inside) {
+ if (inside) {
/* clicked at panel header? */
- if(pa->flag & PNL_CLOSEDX) {
- if(block->minx <= mx && block->minx+PNL_HEADER >= mx)
+ if (pa->flag & PNL_CLOSEDX) {
+ if (block->minx <= mx && block->minx+PNL_HEADER >= mx)
inside_header= 1;
}
- else if((block->maxy <= my) && (block->maxy+PNL_HEADER >= my)) {
+ else if ((block->maxy <= my) && (block->maxy+PNL_HEADER >= my)) {
inside_header= 1;
}
- else if(pa->control & UI_PNL_SCALE) {
- if(block->maxx-PNL_HEADER <= mx)
- if(block->miny+PNL_HEADER >= my)
+ else if (pa->control & UI_PNL_SCALE) {
+ if (block->maxx-PNL_HEADER <= mx)
+ if (block->miny+PNL_HEADER >= my)
inside_scale= 1;
}
- if(event->val==KM_PRESS) {
+ if (event->val==KM_PRESS) {
/* open close on header */
- if(ELEM(event->type, RETKEY, PADENTER)) {
- if(inside_header) {
+ if (ELEM(event->type, RETKEY, PADENTER)) {
+ if (inside_header) {
ui_handle_panel_header(C, block, mx, my, RETKEY);
break;
}
}
- else if(event->type == LEFTMOUSE) {
- if(inside_header) {
+ else if (event->type == LEFTMOUSE) {
+ if (inside_header) {
ui_handle_panel_header(C, block, mx, my, 0);
break;
}
- else if(inside_scale && !(pa->flag & PNL_CLOSED)) {
+ else if (inside_scale && !(pa->flag & PNL_CLOSED)) {
panel_activate_state(C, pa, PANEL_STATE_DRAG_SCALE);
break;
}
}
- else if(event->type == ESCKEY) {
+ else if (event->type == ESCKEY) {
/*XXX 2.50*/
#if 0
- if(block->handler) {
+ if (block->handler) {
rem_blockhandler(sa, block->handler);
ED_region_tag_redraw(ar);
retval= WM_UI_HANDLER_BREAK;
}
#endif
}
- else if(event->type==PADPLUSKEY || event->type==PADMINUS) {
+ else if (event->type==PADPLUSKEY || event->type==PADMINUS) {
#if 0 // XXX make float panel exception?
int zoom=0;
@@ -1171,13 +1171,13 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
else
zoom=1;
- if(zoom) {
+ if (zoom) {
ScrArea *sa= CTX_wm_area(C);
SpaceLink *sl= sa->spacedata.first;
- if(sa->spacetype!=SPACE_BUTS) {
- if(!(pa->control & UI_PNL_SCALE)) {
- if(event->type==PADPLUSKEY) sl->blockscale+= 0.1;
+ if (sa->spacetype!=SPACE_BUTS) {
+ if (!(pa->control & UI_PNL_SCALE)) {
+ if (event->type==PADPLUSKEY) sl->blockscale+= 0.1;
else sl->blockscale-= 0.1;
CLAMP(sl->blockscale, 0.6, 1.0);
@@ -1204,30 +1204,30 @@ static int ui_handler_panel(bContext *C, wmEvent *event, void *userdata)
uiHandlePanelData *data= panel->activedata;
/* verify if we can stop */
- if(event->type == LEFTMOUSE && event->val!=KM_PRESS) {
+ if (event->type == LEFTMOUSE && event->val!=KM_PRESS) {
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= CTX_wm_region(C);
int align= panel_aligned(sa, ar);
- if(align)
+ if (align)
panel_activate_state(C, panel, PANEL_STATE_ANIMATION);
else
panel_activate_state(C, panel, PANEL_STATE_EXIT);
}
- else if(event->type == MOUSEMOVE) {
- if(data->state == PANEL_STATE_DRAG)
+ else if (event->type == MOUSEMOVE) {
+ if (data->state == PANEL_STATE_DRAG)
ui_do_drag(C, event, panel);
}
- else if(event->type == TIMER && event->customdata == data->animtimer) {
- if(data->state == PANEL_STATE_ANIMATION)
+ else if (event->type == TIMER && event->customdata == data->animtimer) {
+ if (data->state == PANEL_STATE_ANIMATION)
ui_do_animate(C, panel);
- else if(data->state == PANEL_STATE_DRAG)
+ else if (data->state == PANEL_STATE_DRAG)
ui_do_drag(C, event, panel);
}
data= panel->activedata;
- if(data && data->state == PANEL_STATE_ANIMATION)
+ if (data && data->state == PANEL_STATE_ANIMATION)
return WM_UI_HANDLER_CONTINUE;
else
return WM_UI_HANDLER_BREAK;
@@ -1246,11 +1246,11 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat
wmWindow *win= CTX_wm_window(C);
ARegion *ar= CTX_wm_region(C);
- if(data && data->state == state)
+ if (data && data->state == state)
return;
- if(state == PANEL_STATE_EXIT || state == PANEL_STATE_ANIMATION) {
- if(data && data->state != PANEL_STATE_ANIMATION) {
+ if (state == PANEL_STATE_EXIT || state == PANEL_STATE_ANIMATION) {
+ if (data && data->state != PANEL_STATE_ANIMATION) {
/* XXX:
* - the panel tabbing function call below (test_add_new_tabs()) has been commented out
* "It is too easy to do by accident when reordering panels, is very hard to control and use, and has no real benefit." - BillRey
@@ -1265,26 +1265,26 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat
else
pa->flag |= PNL_SELECT;
- if(data && data->animtimer) {
+ if (data && data->animtimer) {
WM_event_remove_timer(CTX_wm_manager(C), win, data->animtimer);
data->animtimer= NULL;
}
- if(state == PANEL_STATE_EXIT) {
+ if (state == PANEL_STATE_EXIT) {
MEM_freeN(data);
pa->activedata= NULL;
WM_event_remove_ui_handler(&win->modalhandlers, ui_handler_panel, ui_handler_remove_panel, pa, 0);
}
else {
- if(!data) {
+ if (!data) {
data= MEM_callocN(sizeof(uiHandlePanelData), "uiHandlePanelData");
pa->activedata= data;
WM_event_add_ui_handler(C, &win->modalhandlers, ui_handler_panel, ui_handler_remove_panel, pa);
}
- if(ELEM(state, PANEL_STATE_ANIMATION, PANEL_STATE_DRAG))
+ if (ELEM(state, PANEL_STATE_ANIMATION, PANEL_STATE_DRAG))
data->animtimer= WM_event_add_timer(CTX_wm_manager(C), win, TIMER, ANIMATION_INTERVAL);
data->state= state;
@@ -1301,15 +1301,15 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat
/* XXX exception handling, 3d window preview panel */
#if 0
- if(block->drawextra==BIF_view3d_previewdraw)
+ if (block->drawextra==BIF_view3d_previewdraw)
BIF_view3d_previewrender_clear(curarea);
#endif
/* XXX exception handling, 3d window preview panel */
#if 0
- if(block->drawextra==BIF_view3d_previewdraw)
+ if (block->drawextra==BIF_view3d_previewdraw)
BIF_view3d_previewrender_signal(curarea, PR_DISPRECT);
- else if(strcmp(block->name, "image_panel_preview")==0)
+ else if (strcmp(block->name, "image_panel_preview")==0)
image_preview_event(2);
#endif
}
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index f971410672c..13962777da3 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -174,32 +174,36 @@ static MenuData *decompose_menu_string(const char *str)
*s= '\0';
s++;
- } else if (s[1]=='t') {
+ }
+ else if (s[1]=='t') {
nitem_is_title= (s != instr); /* check for empty title */
*s= '\0';
s++;
- } else if (s[1]=='l') {
+ }
+ else if (s[1]=='l') {
nitem_is_sepr= 1;
- if(!nitem) nitem= "";
+ if (!nitem) nitem= "";
*s= '\0';
s++;
- } else if (s[1]=='i') {
+ }
+ else if (s[1]=='i') {
nicon= atoi(s+2);
*s= '\0';
s++;
}
- } else if (c=='|' || c == '\n' || c=='\0') {
+ }
+ else if (c=='|' || c == '\n' || c=='\0') {
if (nitem) {
*s= '\0';
- if(nitem_is_title) {
+ if (nitem_is_title) {
menudata_set_title(md, nitem, nicon);
nitem_is_title= 0;
}
- else if(nitem_is_sepr) {
+ else if (nitem_is_sepr) {
/* prevent separator to get a value */
menudata_add_item(md, nitem, -1, nicon, 1);
nretval= md->nitems+1;
@@ -217,7 +221,8 @@ static MenuData *decompose_menu_string(const char *str)
if (c=='\0') {
break;
}
- } else if (!nitem) {
+ }
+ else if (!nitem) {
nitem= s;
}
@@ -254,20 +259,20 @@ int ui_step_name_menu(uiBut *but, int step)
if (md->items[i].retval==value)
break;
- if(step==1) {
+ if (step==1) {
/* skip separators */
- for(; i<md->nitems-1; i++) {
- if(md->items[i+1].retval != -1) {
+ for (; i<md->nitems-1; i++) {
+ if (md->items[i+1].retval != -1) {
value= md->items[i+1].retval;
break;
}
}
}
else {
- if(i>0) {
+ if (i>0) {
/* skip separators */
- for(; i>0; i--) {
- if(md->items[i-1].retval != -1) {
+ for (; i>0; i--) {
+ if (md->items[i-1].retval != -1) {
value= md->items[i-1].retval;
break;
}
@@ -298,7 +303,7 @@ static ARegion *ui_add_temporary_region(bScreen *sc)
static void ui_remove_temporary_region(bContext *C, bScreen *sc, ARegion *ar)
{
- if(CTX_wm_window(C))
+ if (CTX_wm_window(C))
wm_draw_region_clear(CTX_wm_window(C), ar);
ED_region_exit(C, ar);
@@ -308,34 +313,90 @@ static void ui_remove_temporary_region(bContext *C, bScreen *sc, ARegion *ar)
/************************* Creating Tooltips **********************/
-#define MAX_TOOLTIP_LINES 8
+typedef enum {
+ UI_TIP_LC_MAIN,
+ UI_TIP_LC_NORMAL,
+ UI_TIP_LC_PYTHON,
+ UI_TIP_LC_ALERT,
+ UI_TIP_LC_SUBMENU
+} uiTooltipLineColor;
+#define UI_TIP_LC_MAX 5
+#define MAX_TOOLTIP_LINES 8
typedef struct uiTooltipData {
rcti bbox;
uiFontStyle fstyle;
char lines[MAX_TOOLTIP_LINES][512];
- unsigned int color[MAX_TOOLTIP_LINES];
+ uiTooltipLineColor color_id[MAX_TOOLTIP_LINES];
int totline;
int toth, spaceh, lineh;
} uiTooltipData;
+static void rgb_tint(float col[3],
+ float h, float h_strength,
+ float v, float v_strength)
+{
+ float col_hsv_from[3];
+ float col_hsv_to[3];
+
+ rgb_to_hsv(col[0], col[1], col[2], col_hsv_from + 0, col_hsv_from + 1, col_hsv_from + 2);
+
+ col_hsv_to[0] = h;
+ col_hsv_to[1] = h_strength;
+ col_hsv_to[2] = (col_hsv_from[2] * (1.0f - v_strength)) + (v * v_strength);
+
+ hsv_to_rgb(col_hsv_to[0], col_hsv_to[1], col_hsv_to[2], col + 0, col + 1, col + 2);
+}
+
static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
{
uiTooltipData *data= ar->regiondata;
+ uiWidgetColors* theme = ui_tooltip_get_theme();
rcti bbox= data->bbox;
- int a;
-
- ui_draw_menu_back(UI_GetStyle(), NULL, &data->bbox);
+ float tip_colors[UI_TIP_LC_MAX][3];
+
+ float *main_color = tip_colors[UI_TIP_LC_MAIN]; /* the color from the theme */
+ float *normal_color = tip_colors[UI_TIP_LC_NORMAL];
+ float *python_color = tip_colors[UI_TIP_LC_PYTHON];
+ float *alert_color = tip_colors[UI_TIP_LC_ALERT];
+ float *submenu_color = tip_colors[UI_TIP_LC_SUBMENU];
+
+ float background_color[3];
+ float tone_bg;
+ int i;
+
+ /* draw background */
+ ui_draw_tooltip_background(UI_GetStyle(), NULL, &bbox);
+
+ /* set background_color */
+ rgb_uchar_to_float(background_color, (const unsigned char *)theme->inner);
+
+ /* calculate normal_color */
+ rgb_uchar_to_float(main_color, (const unsigned char *)theme->text);
+ copy_v3_v3(normal_color, main_color);
+ copy_v3_v3(python_color, main_color);
+ copy_v3_v3(alert_color, main_color);
+ copy_v3_v3(submenu_color, main_color);
+
+ /* find the brightness difference between background and text colors */
+ tone_bg = rgb_to_grayscale(background_color);
+ /* tone_fg = rgb_to_grayscale(main_color); */
+
+ rgb_tint(normal_color, 0.0f, 0.0f, tone_bg, 0.3f); /* a shade darker (to bg) */
+ rgb_tint(python_color, 0.666f, 0.25f, tone_bg, 0.3f); /* blue */
+ rgb_tint(alert_color, 0.0f, 0.8f, tone_bg, 0.1f); /* bright red */
+ rgb_tint(submenu_color, 0.0f, 0.0f, tone_bg, 0.3f); /* a shade darker (to bg) */
+
/* draw text */
uiStyleFontSet(&data->fstyle);
- bbox.ymax= bbox.ymax - 0.5f*((bbox.ymax - bbox.ymin) - data->toth);
- bbox.ymin= bbox.ymax - data->lineh;
+ bbox.ymax = bbox.ymax - 0.5f*((bbox.ymax - bbox.ymin) - data->toth);
+ bbox.ymin = bbox.ymax - data->lineh;
- for(a=0; a<data->totline; a++) {
- cpack(data->color[a]);
- uiStyleFontDraw(&data->fstyle, &bbox, data->lines[a]);
+ for (i = 0; i < data->totline; i++) {
+ glColor3fv(tip_colors[data->color_id[i]]);
+ uiStyleFontDraw(&data->fstyle, &bbox, data->lines[i]);
bbox.ymin -= data->lineh + data->spaceh;
bbox.ymax -= data->lineh + data->spaceh;
}
@@ -362,33 +423,33 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
float x1f, x2f, y1f, y2f;
int x1, x2, y1, y2, winx, winy, ofsx, ofsy, w, h, a;
- if(but->flag & UI_BUT_NO_TOOLTIP)
+ if (but->flag & UI_BUT_NO_TOOLTIP)
return NULL;
/* create tooltip data */
data= MEM_callocN(sizeof(uiTooltipData), "uiTooltipData");
/* special case, enum rna buttons only have enum item description, use general enum description too before the specific one */
- if(but->rnaprop && RNA_property_type(but->rnaprop) == PROP_ENUM) {
+ if (but->rnaprop && RNA_property_type(but->rnaprop) == PROP_ENUM) {
const char *descr= RNA_property_description(but->rnaprop);
- if(descr && descr[0]) {
+ if (descr && descr[0]) {
BLI_strncpy(data->lines[data->totline], descr, sizeof(data->lines[0]));
- data->color[data->totline]= 0xFFFFFF;
+ data->color_id[data->totline] = UI_TIP_LC_MAIN;
data->totline++;
}
- if(ELEM(but->type, ROW, MENU)) {
+ if (ELEM(but->type, ROW, MENU)) {
EnumPropertyItem *item;
int i, totitem, free;
int value = (but->type == ROW)? but->hardmax: ui_get_but_val(but);
RNA_property_enum_items_gettexted(C, &but->rnapoin, but->rnaprop, &item, &totitem, &free);
- for(i=0; i<totitem; i++) {
- if(item[i].identifier[0] && item[i].value == value) {
- if(item[i].description && item[i].description[0]) {
+ for (i=0; i<totitem; i++) {
+ if (item[i].identifier[0] && item[i].value == value) {
+ if (item[i].description && item[i].description[0]) {
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "%s: %s", item[i].name, item[i].description);
- data->color[data->totline]= 0xDDDDDD;
+ data->color_id[data->totline] = UI_TIP_LC_SUBMENU;
data->totline++;
}
break;
@@ -401,52 +462,52 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
}
}
- if(but->tip && but->tip[0] != '\0') {
+ if (but->tip && but->tip[0] != '\0') {
BLI_strncpy(data->lines[data->totline], but->tip, sizeof(data->lines[0]));
- data->color[data->totline]= 0xFFFFFF;
+ data->color_id[data->totline] = UI_TIP_LC_MAIN;
data->totline++;
}
- if(but->optype && !(but->block->flag & UI_BLOCK_LOOP)) {
+ if (but->optype && !(but->block->flag & UI_BLOCK_LOOP)) {
/* operator keymap (not menus, they already have it) */
prop= (but->opptr)? but->opptr->data: NULL;
- if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE,
+ if (WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE,
buf, sizeof(buf)))
{
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Shortcut: %s"), buf);
- data->color[data->totline]= 0x888888;
+ data->color_id[data->totline] = UI_TIP_LC_NORMAL;
data->totline++;
}
}
- if(ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
+ if (ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
/* full string */
ui_get_but_string(but, buf, sizeof(buf));
- if(buf[0]) {
+ if (buf[0]) {
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Value: %s"), buf);
- data->color[data->totline]= 0x888888;
+ data->color_id[data->totline] = UI_TIP_LC_NORMAL;
data->totline++;
}
}
- if(but->rnaprop) {
+ if (but->rnaprop) {
int unit_type= uiButGetUnitType(but);
if (unit_type == PROP_UNIT_ROTATION) {
if (RNA_property_type(but->rnaprop) == PROP_FLOAT) {
float value= RNA_property_array_check(but->rnaprop) ? RNA_property_float_get_index(&but->rnapoin, but->rnaprop, but->rnaindex) : RNA_property_float_get(&but->rnapoin, but->rnaprop);
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Radians: %f"), value);
- data->color[data->totline]= 0x888888;
+ data->color_id[data->totline] = UI_TIP_LC_NORMAL;
data->totline++;
}
}
- if(but->flag & UI_BUT_DRIVEN) {
- if(ui_but_anim_expression_get(but, buf, sizeof(buf))) {
+ if (but->flag & UI_BUT_DRIVEN) {
+ if (ui_but_anim_expression_get(but, buf, sizeof(buf))) {
/* expression */
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Expression: %s"), buf);
- data->color[data->totline]= 0x888888;
+ data->color_id[data->totline] = UI_TIP_LC_NORMAL;
data->totline++;
}
}
@@ -454,15 +515,15 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
/* rna info */
if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) {
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Python: %s.%s"), RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop));
- data->color[data->totline]= 0x888888;
+ data->color_id[data->totline] = UI_TIP_LC_PYTHON;
data->totline++;
}
- if(but->rnapoin.id.data) {
+ if (but->rnapoin.id.data) {
ID *id= but->rnapoin.id.data;
- if(id->lib && id->lib->name) {
+ if (id->lib && id->lib->name) {
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Library: %s"), id->lib->name);
- data->color[data->totline]= 0x888888;
+ data->color_id[data->totline] = UI_TIP_LC_NORMAL;
data->totline++;
}
}
@@ -477,21 +538,21 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
/* operator info */
if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) {
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Python: %s"), str);
- data->color[data->totline]= 0x888888;
+ data->color_id[data->totline] = UI_TIP_LC_PYTHON;
data->totline++;
}
MEM_freeN(str);
/* second check if we are disabled - why */
- if(but->flag & UI_BUT_DISABLED) {
+ if (but->flag & UI_BUT_DISABLED) {
const char *poll_msg;
CTX_wm_operator_poll_msg_set(C, NULL);
WM_operator_poll_context(C, but->optype, but->opcontext);
poll_msg= CTX_wm_operator_poll_msg_get(C);
- if(poll_msg) {
+ if (poll_msg) {
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Disabled: %s"), poll_msg);
- data->color[data->totline]= 0x6666ff; /* alert */
+ data->color_id[data->totline] = UI_TIP_LC_ALERT; /* alert */
data->totline++;
}
}
@@ -501,7 +562,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
MenuType *mt= uiButGetMenuType(but);
if (mt) {
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Python: %s"), mt->idname);
- data->color[data->totline]= 0x888888;
+ data->color_id[data->totline] = UI_TIP_LC_PYTHON;
data->totline++;
}
}
@@ -510,7 +571,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
assert(data->totline < MAX_TOOLTIP_LINES);
- if(data->totline == 0) {
+ if (data->totline == 0) {
MEM_freeN(data);
return NULL;
}
@@ -535,7 +596,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
h= BLF_height_max(data->fstyle.uifont_id);
- for(a=0, fontw=0, fonth=0; a<data->totline; a++) {
+ for (a=0, fontw=0, fonth=0; a<data->totline; a++) {
w= BLF_width(data->fstyle.uifont_id, data->lines[a]);
fontw= MAX2(fontw, w);
fonth += (a == 0)? h: h+TIP_MARGIN_Y;
@@ -566,9 +627,9 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
/* copy to int, gets projected if possible too */
x1= x1f; y1= y1f; x2= x2f; y2= y2f;
- if(butregion) {
+ if (butregion) {
/* XXX temp, region v2ds can be empty still */
- if(butregion->v2d.cur.xmin != butregion->v2d.cur.xmax) {
+ if (butregion->v2d.cur.xmin != butregion->v2d.cur.xmax) {
UI_view2d_to_region_no_clip(&butregion->v2d, x1f, y1f, &x1, &y1);
UI_view2d_to_region_no_clip(&butregion->v2d, x2f, y2f, &x2, &y2);
}
@@ -581,9 +642,9 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
wm_window_get_size(CTX_wm_window(C), &winx, &winy);
- if(x2 > winx) {
+ if (x2 > winx) {
/* super size */
- if(x2 > winx + x1) {
+ if (x2 > winx + x1) {
x2= winx;
x1= 0;
}
@@ -594,22 +655,22 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
}
/* ensure at least 5 px above screen bounds
* 25 is just a guess to be above the menu item */
- if(y1 < 5) {
+ if (y1 < 5) {
y2 += (-y1) + 30;
y1 = 30;
}
/* widget rect, in region coords */
- data->bbox.xmin= MENU_SHADOW_SIDE;
- data->bbox.xmax= x2-x1 + MENU_SHADOW_SIDE;
- data->bbox.ymin= MENU_SHADOW_BOTTOM;
- data->bbox.ymax= y2-y1 + MENU_SHADOW_BOTTOM;
+ data->bbox.xmin = MENU_SHADOW_SIDE;
+ data->bbox.xmax = x2-x1 + MENU_SHADOW_SIDE;
+ data->bbox.ymin = MENU_SHADOW_BOTTOM;
+ data->bbox.ymax = y2-y1 + MENU_SHADOW_BOTTOM;
/* region bigger for shadow */
- ar->winrct.xmin= x1 - MENU_SHADOW_SIDE;
- ar->winrct.xmax= x2 + MENU_SHADOW_SIDE;
- ar->winrct.ymin= y1 - MENU_SHADOW_BOTTOM;
- ar->winrct.ymax= y2 + MENU_TOP;
+ ar->winrct.xmin = x1 - MENU_SHADOW_SIDE;
+ ar->winrct.xmax = x2 + MENU_SHADOW_SIDE;
+ ar->winrct.ymin = y1 - MENU_SHADOW_BOTTOM;
+ ar->winrct.ymax = y2 + MENU_TOP;
/* adds subwindow */
ED_region_init(C, ar);
@@ -659,35 +720,35 @@ typedef struct uiSearchboxData {
int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int iconid)
{
/* hijack for autocomplete */
- if(items->autocpl) {
+ if (items->autocpl) {
autocomplete_do_name(items->autocpl, name);
return 1;
}
/* hijack for finding active item */
- if(items->active) {
- if(poin==items->active)
+ if (items->active) {
+ if (poin==items->active)
items->offset_i= items->totitem;
items->totitem++;
return 1;
}
- if(items->totitem>=items->maxitem) {
+ if (items->totitem>=items->maxitem) {
items->more= 1;
return 0;
}
/* skip first items in list */
- if(items->offset_i > 0) {
+ if (items->offset_i > 0) {
items->offset_i--;
return 1;
}
- if(items->names)
+ if (items->names)
BLI_strncpy(items->names[items->totitem], name, items->maxstrlen);
- if(items->pointers)
+ if (items->pointers)
items->pointers[items->totitem]= poin;
- if(items->icons)
+ if (items->icons)
items->icons[items->totitem]= iconid;
items->totitem++;
@@ -708,10 +769,10 @@ static void ui_searchbox_select(bContext *C, ARegion *ar, uiBut *but, int step)
/* apply step */
data->active+= step;
- if(data->items.totitem==0)
+ if (data->items.totitem==0)
data->active= 0;
- else if(data->active > data->items.totitem) {
- if(data->items.more) {
+ else if (data->active > data->items.totitem) {
+ if (data->items.more) {
data->items.offset++;
data->active= data->items.totitem;
ui_searchbox_update(C, ar, but, 0);
@@ -719,13 +780,13 @@ static void ui_searchbox_select(bContext *C, ARegion *ar, uiBut *but, int step)
else
data->active= data->items.totitem;
}
- else if(data->active < 1) {
- if(data->items.offset) {
+ else if (data->active < 1) {
+ if (data->items.offset) {
data->items.offset--;
data->active= 1;
ui_searchbox_update(C, ar, but, 0);
}
- else if(data->active < 0)
+ else if (data->active < 0)
data->active= 0;
}
@@ -756,11 +817,11 @@ static void ui_searchbox_butrect(rcti *rect, uiSearchboxData *data, int itemnr)
int buth= (data->bbox.ymax-data->bbox.ymin - 2*MENU_TOP)/SEARCH_ITEMS;
*rect= data->bbox;
- rect->xmin= data->bbox.xmin + 3.0f;
- rect->xmax= data->bbox.xmax - 3.0f;
+ rect->xmin = data->bbox.xmin + 3.0f;
+ rect->xmax = data->bbox.xmax - 3.0f;
- rect->ymax= data->bbox.ymax - MENU_TOP - itemnr*buth;
- rect->ymin= rect->ymax - buth;
+ rect->ymax = data->bbox.ymax - MENU_TOP - itemnr*buth;
+ rect->ymin = rect->ymax - buth;
}
}
@@ -780,13 +841,13 @@ void ui_searchbox_apply(uiBut *but, ARegion *ar)
but->func_arg2= NULL;
- if(data->active) {
+ if (data->active) {
char *name= data->items.names[data->active-1];
char *cpoin= strchr(name, '|');
- if(cpoin) cpoin[0]= 0;
+ if (cpoin) cpoin[0]= 0;
BLI_strncpy(but->editstr, name, data->items.maxstrlen);
- if(cpoin) cpoin[0]= '|';
+ if (cpoin) cpoin[0]= '|';
but->func_arg2= data->items.pointers[data->active-1];
}
@@ -806,14 +867,14 @@ void ui_searchbox_event(bContext *C, ARegion *ar, uiBut *but, wmEvent *event)
ui_searchbox_select(C, ar, but, 1);
break;
case MOUSEMOVE:
- if(BLI_in_rcti(&ar->winrct, event->x, event->y)) {
+ if (BLI_in_rcti(&ar->winrct, event->x, event->y)) {
rcti rect;
int a;
- for(a=0; a<data->items.totitem; a++) {
+ for (a=0; a<data->items.totitem; a++) {
ui_searchbox_butrect(&rect, data, a);
- if(BLI_in_rcti(&rect, event->x - ar->winrct.xmin, event->y - ar->winrct.ymin)) {
- if( data->active!= a+1) {
+ if (BLI_in_rcti(&rect, event->x - ar->winrct.xmin, event->y - ar->winrct.ymin)) {
+ if ( data->active!= a+1) {
data->active= a+1;
ui_searchbox_select(C, ar, but, 0);
break;
@@ -833,7 +894,7 @@ void ui_searchbox_update(bContext *C, ARegion *ar, uiBut *but, int reset)
/* reset vars */
data->items.totitem= 0;
data->items.more= 0;
- if(reset==0) {
+ if (reset==0) {
data->items.offset_i= data->items.offset;
}
else {
@@ -841,21 +902,21 @@ void ui_searchbox_update(bContext *C, ARegion *ar, uiBut *but, int reset)
data->active= 0;
/* handle active */
- if(but->search_func && but->func_arg2) {
+ if (but->search_func && but->func_arg2) {
data->items.active= but->func_arg2;
but->search_func(C, but->search_arg, but->editstr, &data->items);
data->items.active= NULL;
/* found active item, calculate real offset by centering it */
- if(data->items.totitem) {
+ if (data->items.totitem) {
/* first case, begin of list */
- if(data->items.offset_i < data->items.maxitem) {
+ if (data->items.offset_i < data->items.maxitem) {
data->active= data->items.offset_i+1;
data->items.offset_i= 0;
}
else {
/* second case, end of list */
- if(data->items.totitem - data->items.offset_i <= data->items.maxitem) {
+ if (data->items.totitem - data->items.offset_i <= data->items.maxitem) {
data->active= 1 + data->items.offset_i - data->items.totitem + data->items.maxitem;
data->items.offset_i= data->items.totitem - data->items.maxitem;
}
@@ -872,22 +933,22 @@ void ui_searchbox_update(bContext *C, ARegion *ar, uiBut *but, int reset)
}
/* callback */
- if(but->search_func)
+ if (but->search_func)
but->search_func(C, but->search_arg, but->editstr, &data->items);
/* handle case where editstr is equal to one of items */
- if(reset && data->active==0) {
+ if (reset && data->active==0) {
int a;
- for(a=0; a<data->items.totitem; a++) {
+ for (a=0; a<data->items.totitem; a++) {
char *cpoin= strchr(data->items.names[a], '|');
- if(cpoin) cpoin[0]= 0;
- if(0==strcmp(but->editstr, data->items.names[a]))
+ if (cpoin) cpoin[0]= 0;
+ if (0==strcmp(but->editstr, data->items.names[a]))
data->active= a+1;
- if(cpoin) cpoin[0]= '|';
+ if (cpoin) cpoin[0]= '|';
}
- if(data->items.totitem==1 && but->editstr[0])
+ if (data->items.totitem==1 && but->editstr[0])
data->active= 1;
}
@@ -901,7 +962,7 @@ void ui_searchbox_autocomplete(bContext *C, ARegion *ar, uiBut *but, char *str)
{
uiSearchboxData *data= ar->regiondata;
- if(str[0]) {
+ if (str[0]) {
data->items.autocpl= autocomplete_begin(str, ui_get_but_string_max_length(but));
but->search_func(C, but->search_arg, but->editstr, &data->items);
@@ -918,17 +979,17 @@ static void ui_searchbox_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
/* pixel space */
wmOrtho2(-0.01f, ar->winx-0.01f, -0.01f, ar->winy-0.01f);
- if(!data->noback)
+ if (!data->noback)
ui_draw_search_back(NULL, NULL, &data->bbox); /* style not used yet */
/* draw text */
- if(data->items.totitem) {
+ if (data->items.totitem) {
rcti rect;
int a;
if (data->preview) {
/* draw items */
- for(a=0; a<data->items.totitem; a++) {
+ for (a=0; a<data->items.totitem; a++) {
ui_searchbox_butrect(&rect, data, a);
/* widget itself */
@@ -939,22 +1000,23 @@ static void ui_searchbox_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
}
/* indicate more */
- if(data->items.more) {
+ if (data->items.more) {
ui_searchbox_butrect(&rect, data, data->items.maxitem-1);
glEnable(GL_BLEND);
UI_icon_draw(rect.xmax-18, rect.ymin-7, ICON_TRIA_DOWN);
glDisable(GL_BLEND);
}
- if(data->items.offset) {
+ if (data->items.offset) {
ui_searchbox_butrect(&rect, data, 0);
glEnable(GL_BLEND);
UI_icon_draw(rect.xmin, rect.ymax-9, ICON_TRIA_UP);
glDisable(GL_BLEND);
}
- } else {
+ }
+ else {
/* draw items */
- for(a=0; a<data->items.totitem; a++) {
+ for (a=0; a<data->items.totitem; a++) {
ui_searchbox_butrect(&rect, data, a);
/* widget itself */
@@ -962,13 +1024,13 @@ static void ui_searchbox_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
}
/* indicate more */
- if(data->items.more) {
+ if (data->items.more) {
ui_searchbox_butrect(&rect, data, data->items.maxitem-1);
glEnable(GL_BLEND);
UI_icon_draw((rect.xmax-rect.xmin)/2, rect.ymin-9, ICON_TRIA_DOWN);
glDisable(GL_BLEND);
}
- if(data->items.offset) {
+ if (data->items.offset) {
ui_searchbox_butrect(&rect, data, 0);
glEnable(GL_BLEND);
UI_icon_draw((rect.xmax-rect.xmin)/2, rect.ymax-7, ICON_TRIA_UP);
@@ -1026,7 +1088,7 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
/* special case, hardcoded feature, not draw backdrop when called from menus,
* assume for design that popup already added it */
- if(but->block->flag & UI_BLOCK_LOOP)
+ if (but->block->flag & UI_BLOCK_LOOP)
data->noback= 1;
if (but->a1 > 0 && but->a2 > 0) {
@@ -1036,20 +1098,20 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
}
/* compute position */
- if(but->block->flag & UI_BLOCK_LOOP) {
+ if (but->block->flag & UI_BLOCK_LOOP) {
/* this case is search menu inside other menu */
/* we copy region size */
ar->winrct= butregion->winrct;
/* widget rect, in region coords */
- data->bbox.xmin= MENU_SHADOW_SIDE;
- data->bbox.xmax= (ar->winrct.xmax-ar->winrct.xmin) - MENU_SHADOW_SIDE;
- data->bbox.ymin= MENU_SHADOW_BOTTOM;
- data->bbox.ymax= (ar->winrct.ymax-ar->winrct.ymin) - MENU_SHADOW_BOTTOM;
+ data->bbox.xmin = MENU_SHADOW_SIDE;
+ data->bbox.xmax = (ar->winrct.xmax-ar->winrct.xmin) - MENU_SHADOW_SIDE;
+ data->bbox.ymin = MENU_SHADOW_BOTTOM;
+ data->bbox.ymax = (ar->winrct.ymax-ar->winrct.ymin) - MENU_SHADOW_BOTTOM;
/* check if button is lower half */
- if( but->y2 < (but->block->miny+but->block->maxy)/2 ) {
+ if ( but->y2 < (but->block->miny+but->block->maxy)/2 ) {
data->bbox.ymin += (but->y2-but->y1);
}
else {
@@ -1071,12 +1133,12 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
y2f += ofsy;
/* minimal width */
- if(x2f - x1f < 150) x2f= x1f+150; // XXX arbitrary
+ if (x2f - x1f < 150) x2f= x1f+150; // XXX arbitrary
/* copy to int, gets projected if possible too */
x1= x1f; y1= y1f; x2= x2f; y2= y2f;
- if(butregion->v2d.cur.xmin != butregion->v2d.cur.xmax) {
+ if (butregion->v2d.cur.xmin != butregion->v2d.cur.xmax) {
UI_view2d_to_region_no_clip(&butregion->v2d, x1f, y1f, &x1, &y1);
UI_view2d_to_region_no_clip(&butregion->v2d, x2f, y2f, &x2, &y2);
}
@@ -1088,9 +1150,9 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
wm_window_get_size(CTX_wm_window(C), &winx, &winy);
- if(x2 > winx) {
+ if (x2 > winx) {
/* super size */
- if(x2 > winx + x1) {
+ if (x2 > winx + x1) {
x2= winx;
x1= 0;
}
@@ -1100,7 +1162,7 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
}
}
- if(y1 < 0) {
+ if (y1 < 0) {
int newy1;
UI_view2d_to_region_no_clip(&butregion->v2d, 0, but->y2 + ofsy, NULL, &newy1);
newy1 += butregion->winrct.ymin;
@@ -1110,16 +1172,16 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
}
/* widget rect, in region coords */
- data->bbox.xmin= MENU_SHADOW_SIDE;
- data->bbox.xmax= x2-x1 + MENU_SHADOW_SIDE;
- data->bbox.ymin= MENU_SHADOW_BOTTOM;
- data->bbox.ymax= y2-y1 + MENU_SHADOW_BOTTOM;
+ data->bbox.xmin = MENU_SHADOW_SIDE;
+ data->bbox.xmax = x2-x1 + MENU_SHADOW_SIDE;
+ data->bbox.ymin = MENU_SHADOW_BOTTOM;
+ data->bbox.ymax = y2-y1 + MENU_SHADOW_BOTTOM;
/* region bigger for shadow */
- ar->winrct.xmin= x1 - MENU_SHADOW_SIDE;
- ar->winrct.xmax= x2 + MENU_SHADOW_SIDE;
- ar->winrct.ymin= y1 - MENU_SHADOW_BOTTOM;
- ar->winrct.ymax= y2;
+ ar->winrct.xmin = x1 - MENU_SHADOW_SIDE;
+ ar->winrct.xmax = x2 + MENU_SHADOW_SIDE;
+ ar->winrct.ymin = y1 - MENU_SHADOW_BOTTOM;
+ ar->winrct.ymax = y2;
}
/* adds subwindow */
@@ -1131,7 +1193,8 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
/* prepare search data */
if (data->preview) {
data->items.maxitem= data->prv_rows * data->prv_cols;
- } else {
+ }
+ else {
data->items.maxitem= SEARCH_ITEMS;
}
data->items.maxstrlen= but->hardmax;
@@ -1139,7 +1202,7 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
data->items.names= MEM_callocN(data->items.maxitem*sizeof(void *), "search names");
data->items.pointers= MEM_callocN(data->items.maxitem*sizeof(void *), "search pointers");
data->items.icons= MEM_callocN(data->items.maxitem*sizeof(int), "search icons");
- for(x1=0; x1<data->items.maxitem; x1++)
+ for (x1=0; x1<data->items.maxitem; x1++)
data->items.names[x1]= MEM_callocN(but->hardmax+1, "search pointers");
return ar;
@@ -1159,7 +1222,7 @@ void ui_but_search_test(uiBut *but)
/* possibly very large lists (such as ID datablocks) only
* only validate string RNA buts (not pointers) */
- if(but->rnaprop && RNA_property_type(but->rnaprop) != PROP_STRING) {
+ if (but->rnaprop && RNA_property_type(but->rnaprop) != PROP_STRING) {
return;
}
@@ -1169,19 +1232,19 @@ void ui_but_search_test(uiBut *but)
items->maxitem= 10;
items->maxstrlen= 256;
items->names= MEM_callocN(items->maxitem*sizeof(void *), "search names");
- for(x1=0; x1<items->maxitem; x1++)
+ for (x1=0; x1<items->maxitem; x1++)
items->names[x1]= MEM_callocN(but->hardmax+1, "search names");
but->search_func(but->block->evil_C, but->search_arg, but->drawstr, items);
/* only redalert when we are sure of it, this can miss cases when >10 matches */
- if(items->totitem==0)
+ if (items->totitem==0)
uiButSetFlag(but, UI_BUT_REDALERT);
- else if(items->more==0) {
- for(x1= 0; x1<items->totitem; x1++)
- if(strcmp(but->drawstr, items->names[x1])==0)
+ else if (items->more==0) {
+ for (x1= 0; x1<items->totitem; x1++)
+ if (strcmp(but->drawstr, items->names[x1])==0)
break;
- if(x1==items->totitem)
+ if (x1==items->totitem)
uiButSetFlag(but, UI_BUT_REDALERT);
}
@@ -1206,25 +1269,25 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
short dir1= 0, dir2=0;
/* transform to window coordinates, using the source button region/block */
- butrct.xmin= but->x1; butrct.xmax= but->x2;
- butrct.ymin= but->y1; butrct.ymax= but->y2;
+ butrct.xmin = but->x1; butrct.xmax = but->x2;
+ butrct.ymin = but->y1; butrct.ymax = but->y2;
ui_block_to_window_fl(butregion, but->block, &butrct.xmin, &butrct.ymin);
ui_block_to_window_fl(butregion, but->block, &butrct.xmax, &butrct.ymax);
/* calc block rect */
- if(block->minx == 0.0f && block->maxx == 0.0f) {
- if(block->buttons.first) {
+ if (block->minx == 0.0f && block->maxx == 0.0f) {
+ if (block->buttons.first) {
block->minx= block->miny= 10000;
block->maxx= block->maxy= -10000;
bt= block->buttons.first;
- while(bt) {
- if(bt->x1 < block->minx) block->minx= bt->x1;
- if(bt->y1 < block->miny) block->miny= bt->y1;
+ while (bt) {
+ if (bt->x1 < block->minx) block->minx= bt->x1;
+ if (bt->y1 < block->miny) block->miny= bt->y1;
- if(bt->x2 > block->maxx) block->maxx= bt->x2;
- if(bt->y2 > block->maxy) block->maxy= bt->y2;
+ if (bt->x2 > block->maxx) block->maxx= bt->x2;
+ if (bt->y2 > block->maxy) block->maxy= bt->y2;
bt= bt->next;
}
@@ -1254,16 +1317,16 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
wm_window_get_size(window, &winx, &winy);
- if(block->direction & UI_CENTER) center= ysize/2;
+ if (block->direction & UI_CENTER) center= ysize/2;
else center= 0;
/* check if there's space at all */
- if( butrct.xmin-xsize > 0.0f) left= 1;
- if( butrct.xmax+xsize < winx) right= 1;
- if( butrct.ymin-ysize+center > 0.0f) down= 1;
- if( butrct.ymax+ysize-center < winy) top= 1;
+ if ( butrct.xmin-xsize > 0.0f) left= 1;
+ if ( butrct.xmax+xsize < winx) right= 1;
+ if ( butrct.ymin-ysize+center > 0.0f) down= 1;
+ if ( butrct.ymax+ysize-center < winy) top= 1;
- if(top==0 && down==0) {
+ if (top==0 && down==0) {
if (butrct.ymin-ysize < winy-butrct.ymax-ysize)
top= 1;
else
@@ -1273,74 +1336,74 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
dir1= block->direction & UI_DIRECTION;
/* secundary directions */
- if(dir1 & (UI_TOP|UI_DOWN)) {
- if(dir1 & UI_LEFT) dir2= UI_LEFT;
- else if(dir1 & UI_RIGHT) dir2= UI_RIGHT;
+ if (dir1 & (UI_TOP|UI_DOWN)) {
+ if (dir1 & UI_LEFT) dir2= UI_LEFT;
+ else if (dir1 & UI_RIGHT) dir2= UI_RIGHT;
dir1 &= (UI_TOP|UI_DOWN);
}
- if(dir2==0) if(dir1==UI_LEFT || dir1==UI_RIGHT) dir2= UI_DOWN;
- if(dir2==0) if(dir1==UI_TOP || dir1==UI_DOWN) dir2= UI_LEFT;
+ if (dir2==0) if (dir1==UI_LEFT || dir1==UI_RIGHT) dir2= UI_DOWN;
+ if (dir2==0) if (dir1==UI_TOP || dir1==UI_DOWN) dir2= UI_LEFT;
- /* no space at all? dont change */
- if(left || right) {
- if(dir1==UI_LEFT && left==0) dir1= UI_RIGHT;
- if(dir1==UI_RIGHT && right==0) dir1= UI_LEFT;
+ /* no space at all? don't change */
+ if (left || right) {
+ if (dir1==UI_LEFT && left==0) dir1= UI_RIGHT;
+ if (dir1==UI_RIGHT && right==0) dir1= UI_LEFT;
/* this is aligning, not append! */
- if(dir2==UI_LEFT && right==0) dir2= UI_RIGHT;
- if(dir2==UI_RIGHT && left==0) dir2= UI_LEFT;
+ if (dir2==UI_LEFT && right==0) dir2= UI_RIGHT;
+ if (dir2==UI_RIGHT && left==0) dir2= UI_LEFT;
}
- if(down || top) {
- if(dir1==UI_TOP && top==0) dir1= UI_DOWN;
- if(dir1==UI_DOWN && down==0) dir1= UI_TOP;
- if(dir2==UI_TOP && top==0) dir2= UI_DOWN;
- if(dir2==UI_DOWN && down==0) dir2= UI_TOP;
+ if (down || top) {
+ if (dir1==UI_TOP && top==0) dir1= UI_DOWN;
+ if (dir1==UI_DOWN && down==0) dir1= UI_TOP;
+ if (dir2==UI_TOP && top==0) dir2= UI_DOWN;
+ if (dir2==UI_DOWN && down==0) dir2= UI_TOP;
}
- if(dir1==UI_LEFT) {
+ if (dir1==UI_LEFT) {
xof= butrct.xmin - block->maxx;
- if(dir2==UI_TOP) yof= butrct.ymin - block->miny-center;
+ if (dir2==UI_TOP) yof= butrct.ymin - block->miny-center;
else yof= butrct.ymax - block->maxy+center;
}
- else if(dir1==UI_RIGHT) {
+ else if (dir1==UI_RIGHT) {
xof= butrct.xmax - block->minx;
- if(dir2==UI_TOP) yof= butrct.ymin - block->miny-center;
+ if (dir2==UI_TOP) yof= butrct.ymin - block->miny-center;
else yof= butrct.ymax - block->maxy+center;
}
- else if(dir1==UI_TOP) {
+ else if (dir1==UI_TOP) {
yof= butrct.ymax - block->miny;
- if(dir2==UI_RIGHT) xof= butrct.xmax - block->maxx;
+ if (dir2==UI_RIGHT) xof= butrct.xmax - block->maxx;
else xof= butrct.xmin - block->minx;
// changed direction?
- if((dir1 & block->direction)==0) {
- if(block->direction & UI_SHIFT_FLIPPED)
+ if ((dir1 & block->direction)==0) {
+ if (block->direction & UI_SHIFT_FLIPPED)
xof+= dir2==UI_LEFT?25:-25;
uiBlockFlipOrder(block);
}
}
- else if(dir1==UI_DOWN) {
+ else if (dir1==UI_DOWN) {
yof= butrct.ymin - block->maxy;
- if(dir2==UI_RIGHT) xof= butrct.xmax - block->maxx;
+ if (dir2==UI_RIGHT) xof= butrct.xmax - block->maxx;
else xof= butrct.xmin - block->minx;
// changed direction?
- if((dir1 & block->direction)==0) {
- if(block->direction & UI_SHIFT_FLIPPED)
+ if ((dir1 & block->direction)==0) {
+ if (block->direction & UI_SHIFT_FLIPPED)
xof+= dir2==UI_LEFT?25:-25;
uiBlockFlipOrder(block);
}
}
/* and now we handle the exception; no space below or to top */
- if(top==0 && down==0) {
- if(dir1==UI_LEFT || dir1==UI_RIGHT) {
+ if (top==0 && down==0) {
+ if (dir1==UI_LEFT || dir1==UI_RIGHT) {
// align with bottom of screen
// yof= ysize; (not with menu scrolls)
}
}
/* or no space left or right */
- if(left==0 && right==0) {
- if(dir1==UI_TOP || dir1==UI_DOWN) {
+ if (left==0 && right==0) {
+ if (dir1==UI_TOP || dir1==UI_DOWN) {
// align with left size of screen
xof= -block->minx+5;
}
@@ -1351,16 +1414,16 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
yof += block->yofs/block->aspect;
#if 0
/* clamp to window bounds, could be made into an option if its ever annoying */
- if( (offscreen= (block->miny+yof)) < 0) yof -= offscreen; /* bottom */
- else if((offscreen= (block->maxy+yof)-winy) > 0) yof -= offscreen; /* top */
- if( (offscreen= (block->minx+xof)) < 0) xof -= offscreen; /* left */
- else if((offscreen= (block->maxx+xof)-winx) > 0) xof -= offscreen; /* right */
+ if ( (offscreen= (block->miny+yof)) < 0) yof -= offscreen; /* bottom */
+ else if ((offscreen= (block->maxy+yof)-winy) > 0) yof -= offscreen; /* top */
+ if ( (offscreen= (block->minx+xof)) < 0) xof -= offscreen; /* left */
+ else if ((offscreen= (block->maxx+xof)-winx) > 0) xof -= offscreen; /* right */
#endif
}
/* apply offset, buttons in window coords */
- for(bt= block->buttons.first; bt; bt= bt->next) {
+ for (bt= block->buttons.first; bt; bt= bt->next) {
ui_block_to_window_fl(butregion, but->block, &bt->x1, &bt->y1);
ui_block_to_window_fl(butregion, but->block, &bt->x2, &bt->y2);
@@ -1380,38 +1443,38 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
block->maxy += yof;
/* safety calculus */
- if(but) {
+ if (but) {
float midx= (butrct.xmin+butrct.xmax)/2.0f;
float midy= (butrct.ymin+butrct.ymax)/2.0f;
/* when you are outside parent button, safety there should be smaller */
// parent button to left
- if( midx < block->minx ) block->safety.xmin= block->minx-3;
- else block->safety.xmin= block->minx-40;
+ if ( midx < block->minx ) block->safety.xmin = block->minx-3;
+ else block->safety.xmin = block->minx-40;
// parent button to right
- if( midx > block->maxx ) block->safety.xmax= block->maxx+3;
- else block->safety.xmax= block->maxx+40;
+ if ( midx > block->maxx ) block->safety.xmax = block->maxx+3;
+ else block->safety.xmax = block->maxx+40;
// parent button on bottom
- if( midy < block->miny ) block->safety.ymin= block->miny-3;
- else block->safety.ymin= block->miny-40;
+ if ( midy < block->miny ) block->safety.ymin = block->miny-3;
+ else block->safety.ymin = block->miny-40;
// parent button on top
- if( midy > block->maxy ) block->safety.ymax= block->maxy+3;
- else block->safety.ymax= block->maxy+40;
+ if ( midy > block->maxy ) block->safety.ymax = block->maxy+3;
+ else block->safety.ymax = block->maxy+40;
// exception for switched pulldowns...
- if(dir1 && (dir1 & block->direction)==0) {
- if(dir2==UI_RIGHT) block->safety.xmax= block->maxx+3;
- if(dir2==UI_LEFT) block->safety.xmin= block->minx-3;
+ if (dir1 && (dir1 & block->direction)==0) {
+ if (dir2==UI_RIGHT) block->safety.xmax = block->maxx+3;
+ if (dir2==UI_LEFT) block->safety.xmin = block->minx-3;
}
block->direction= dir1;
}
else {
- block->safety.xmin= block->minx-40;
- block->safety.ymin= block->miny-40;
- block->safety.xmax= block->maxx+40;
- block->safety.ymax= block->maxy+40;
+ block->safety.xmin = block->minx-40;
+ block->safety.ymin = block->miny-40;
+ block->safety.xmax = block->maxx+40;
+ block->safety.ymax = block->maxy+40;
}
/* keep a list of these, needed for pulldown menus */
@@ -1419,7 +1482,7 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
saferct->parent= butrct;
saferct->safety= block->safety;
BLI_freelistN(&block->saferct);
- if(but)
+ if (but)
BLI_duplicatelist(&block->saferct, &but->block->saferct);
BLI_addhead(&block->saferct, saferct);
}
@@ -1428,7 +1491,7 @@ static void ui_block_region_draw(const bContext *C, ARegion *ar)
{
uiBlock *block;
- for(block=ar->uiblocks.first; block; block=block->next)
+ for (block=ar->uiblocks.first; block; block=block->next)
uiDrawBlock(C, block);
}
@@ -1438,14 +1501,14 @@ static void ui_popup_block_clip(wmWindow *window, uiBlock *block)
wm_window_get_size(window, &winx, &winy);
- if(block->minx < MENU_SHADOW_SIDE)
+ if (block->minx < MENU_SHADOW_SIDE)
block->minx= MENU_SHADOW_SIDE;
- if(block->maxx > winx-MENU_SHADOW_SIDE)
+ if (block->maxx > winx-MENU_SHADOW_SIDE)
block->maxx= winx-MENU_SHADOW_SIDE;
- if(block->miny < MENU_SHADOW_BOTTOM)
+ if (block->miny < MENU_SHADOW_BOTTOM)
block->miny= MENU_SHADOW_BOTTOM;
- if(block->maxy > winy-MENU_TOP)
+ if (block->maxy > winy-MENU_TOP)
block->maxy= winy-MENU_TOP;
}
@@ -1457,33 +1520,33 @@ void ui_popup_block_scrolltest(uiBlock *block)
block->flag &= ~(UI_BLOCK_CLIPBOTTOM|UI_BLOCK_CLIPTOP);
- for(bt= block->buttons.first; bt; bt= bt->next)
+ for (bt= block->buttons.first; bt; bt= bt->next)
bt->flag &= ~UI_SCROLLED;
- if(block->buttons.first==block->buttons.last)
+ if (block->buttons.first==block->buttons.last)
return;
/* mark buttons that are outside boundary and the ones next to it for arrow(s) */
- for(bt= block->buttons.first; bt; bt= bt->next) {
- if(bt->y1 < block->miny) {
+ for (bt= block->buttons.first; bt; bt= bt->next) {
+ if (bt->y1 < block->miny) {
bt->flag |= UI_SCROLLED;
block->flag |= UI_BLOCK_CLIPBOTTOM;
/* make space for arrow */
- if(bt->y2 < block->miny +10) {
- if(is_flip && bt->next && bt->next->y1 > bt->y1)
+ if (bt->y2 < block->miny +10) {
+ if (is_flip && bt->next && bt->next->y1 > bt->y1)
bt->next->flag |= UI_SCROLLED;
- else if(!is_flip && bt->prev && bt->prev->y1 > bt->y1)
+ else if (!is_flip && bt->prev && bt->prev->y1 > bt->y1)
bt->prev->flag |= UI_SCROLLED;
}
}
- if(bt->y2 > block->maxy) {
+ if (bt->y2 > block->maxy) {
bt->flag |= UI_SCROLLED;
block->flag |= UI_BLOCK_CLIPTOP;
/* make space for arrow */
- if(bt->y1 > block->maxy -10) {
- if(!is_flip && bt->next && bt->next->y2 < bt->y2)
+ if (bt->y1 > block->maxy -10) {
+ if (!is_flip && bt->next && bt->next->y2 < bt->y2)
bt->next->flag |= UI_SCROLLED;
- else if(is_flip && bt->prev && bt->prev->y2 < bt->y2)
+ else if (is_flip && bt->prev && bt->prev->y2 < bt->y2)
bt->prev->flag |= UI_SCROLLED;
}
}
@@ -1518,12 +1581,12 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut
UI_add_region_handlers(&ar->handlers);
/* create ui block */
- if(create_func)
+ if (create_func)
block= create_func(C, handle->region, arg);
else
block= handle_create_func(C, handle, arg);
- if(block->handle) {
+ if (block->handle) {
memcpy(block->handle, handle, sizeof(uiPopupBlockHandle));
MEM_freeN(handle);
handle= block->handle;
@@ -1533,12 +1596,12 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut
ar->regiondata= handle;
- if(!block->endblock)
+ if (!block->endblock)
uiEndBlock(C, block);
/* if this is being created from a button */
- if(but) {
- if(ELEM(but->type, BLOCK, PULLDOWN))
+ if (but) {
+ if (ELEM(but->type, BLOCK, PULLDOWN))
block->xofs = -2; /* for proper alignment */
block->aspect = but->block->aspect;
@@ -1559,17 +1622,17 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut
/* the block and buttons were positioned in window space as in 2.4x, now
* these menu blocks are regions so we bring it back to region space.
* additionally we add some padding for the menu shadow or rounded menus */
- ar->winrct.xmin= block->minx - MENU_SHADOW_SIDE;
- ar->winrct.xmax= block->maxx + MENU_SHADOW_SIDE;
- ar->winrct.ymin= block->miny - MENU_SHADOW_BOTTOM;
- ar->winrct.ymax= block->maxy + MENU_TOP;
+ ar->winrct.xmin = block->minx - MENU_SHADOW_SIDE;
+ ar->winrct.xmax = block->maxx + MENU_SHADOW_SIDE;
+ ar->winrct.ymin = block->miny - MENU_SHADOW_BOTTOM;
+ ar->winrct.ymax = block->maxy + MENU_TOP;
block->minx -= ar->winrct.xmin;
block->maxx -= ar->winrct.xmin;
block->miny -= ar->winrct.ymin;
block->maxy -= ar->winrct.ymin;
- for(bt= block->buttons.first; bt; bt= bt->next) {
+ for (bt= block->buttons.first; bt; bt= bt->next) {
bt->x1 -= ar->winrct.xmin;
bt->x2 -= ar->winrct.xmin;
bt->y1 -= ar->winrct.ymin;
@@ -1599,7 +1662,7 @@ void ui_popup_block_free(bContext *C, uiPopupBlockHandle *handle)
{
ui_remove_temporary_region(C, CTX_wm_screen(C), handle->region);
- if(handle->scrolltimer)
+ if (handle->scrolltimer)
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), handle->scrolltimer);
MEM_freeN(handle);
@@ -1626,20 +1689,20 @@ static void ui_block_func_MENUSTR(bContext *UNUSED(C), uiLayout *layout, void *a
/* columns and row estimation */
columns= (md->nitems+20)/20;
- if(columns<1)
+ if (columns<1)
columns= 1;
- if(columns>8)
+ if (columns>8)
columns= (md->nitems+25)/25;
rows= md->nitems/columns;
- if(rows<1)
+ if (rows<1)
rows= 1;
- while(rows*columns<md->nitems)
+ while (rows*columns<md->nitems)
rows++;
/* create title */
- if(md->title) {
- if(md->titleicon) {
+ if (md->title) {
+ if (md->titleicon) {
uiItemL(layout, md->title, md->titleicon);
}
else {
@@ -1651,8 +1714,8 @@ static void ui_block_func_MENUSTR(bContext *UNUSED(C), uiLayout *layout, void *a
/* inconsistent, but menus with labels do not look good flipped */
entry= md->items;
- for(a=0; a<md->nitems; a++, entry++) {
- if(entry->sepr && entry->str[0]) {
+ for (a=0; a<md->nitems; a++, entry++) {
+ if (entry->sepr && entry->str[0]) {
block->flag |= UI_BLOCK_NO_FLIP;
break;
}
@@ -1661,18 +1724,18 @@ static void ui_block_func_MENUSTR(bContext *UNUSED(C), uiLayout *layout, void *a
/* create items */
split= uiLayoutSplit(layout, 0, 0);
- for(a=0; a<md->nitems; a++) {
- if(a == column_end) {
+ for (a=0; a<md->nitems; a++) {
+ if (a == column_end) {
/* start new column, and find out where it ends in advance, so we
* can flip the order of items properly per column */
column_start= a;
column_end= md->nitems;
- for(b=a+1; b<md->nitems; b++) {
+ for (b=a+1; b<md->nitems; b++) {
entry= &md->items[b];
/* new column on N rows or on separation label */
- if(((b-a) % rows == 0) || (entry->sepr && entry->str[0])) {
+ if (((b-a) % rows == 0) || (entry->sepr && entry->str[0])) {
column_end = b;
break;
}
@@ -1681,17 +1744,17 @@ static void ui_block_func_MENUSTR(bContext *UNUSED(C), uiLayout *layout, void *a
column= uiLayoutColumn(split, 0);
}
- if(block->flag & UI_BLOCK_NO_FLIP)
+ if (block->flag & UI_BLOCK_NO_FLIP)
entry= &md->items[a];
else
entry= &md->items[column_start + column_end-1-a];
- if(entry->sepr) {
+ if (entry->sepr) {
uiItemL(column, entry->str, entry->icon);
bt= block->buttons.last;
bt->flag= UI_TEXT_LEFT;
}
- else if(entry->icon) {
+ else if (entry->icon) {
uiDefIconTextButF(block, BUTM|FLO, B_NOP, entry->icon, entry->str, 0, 0,
UI_UNIT_X*5, UI_UNIT_Y, &handle->retvalue, (float) entry->retval, 0.0, 0, 0, "");
}
@@ -1713,7 +1776,7 @@ void ui_block_func_ICONROW(bContext *UNUSED(C), uiLayout *layout, void *arg_but)
uiBlockSetFlag(block, UI_BLOCK_MOVEMOUSE_QUIT);
- for(a=(int)but->hardmin; a<=(int)but->hardmax; a++)
+ for (a=(int)but->hardmin; a<=(int)but->hardmax; a++)
uiDefIconButF(block, BUTM|FLO, B_NOP, but->icon+(a-but->hardmin), 0, 0, UI_UNIT_X*5, UI_UNIT_Y,
&handle->retvalue, (float)a, 0.0, 0, 0, "");
}
@@ -1732,16 +1795,16 @@ void ui_block_func_ICONTEXTROW(bContext *UNUSED(C), uiLayout *layout, void *arg_
md= decompose_menu_string(but->str);
/* title */
- if(md->title) {
+ if (md->title) {
bt= uiDefBut(block, LABEL, 0, md->title, 0, 0, UI_UNIT_X*5, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
bt->flag= UI_TEXT_LEFT;
}
/* loop through the menu options and draw them out with icons & text labels */
- for(a=0; a<md->nitems; a++) {
+ for (a=0; a<md->nitems; a++) {
entry= &md->items[md->nitems-a-1];
- if(entry->sepr)
+ if (entry->sepr)
uiItemS(layout);
else
uiDefIconTextButF(block, BUTM|FLO, B_NOP, (short)((but->icon)+(entry->retval-but->hardmin)), entry->str,
@@ -1793,13 +1856,13 @@ static void ui_update_block_buts_rgb(uiBlock *block, float *rgb)
rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2);
// this updates button strings, is hackish... but button pointers are on stack of caller function
- for(bt= block->buttons.first; bt; bt= bt->next) {
+ for (bt= block->buttons.first; bt; bt= bt->next) {
if (bt->rnaprop) {
ui_set_but_vectorf(bt, rgb);
}
- else if(strcmp(bt->str, "Hex: ")==0) {
+ else if (strcmp(bt->str, "Hex: ")==0) {
float rgb_gamma[3];
double intpart;
char col[16];
@@ -1808,7 +1871,8 @@ static void ui_update_block_buts_rgb(uiBlock *block, float *rgb)
if (block->color_profile == BLI_PR_NONE) {
copy_v3_v3(rgb_gamma, rgb);
- } else {
+ }
+ else {
/* make an sRGB version, for Hex code */
linearrgb_to_srgb_v3_v3(rgb_gamma, rgb);
}
@@ -1821,23 +1885,23 @@ static void ui_update_block_buts_rgb(uiBlock *block, float *rgb)
strcpy(bt->poin, col);
}
- else if(bt->str[1]==' ') {
- if(bt->str[0]=='R') {
+ else if (bt->str[1]==' ') {
+ if (bt->str[0]=='R') {
ui_set_but_val(bt, rgb[0]);
}
- else if(bt->str[0]=='G') {
+ else if (bt->str[0]=='G') {
ui_set_but_val(bt, rgb[1]);
}
- else if(bt->str[0]=='B') {
+ else if (bt->str[0]=='B') {
ui_set_but_val(bt, rgb[2]);
}
- else if(bt->str[0]=='H') {
+ else if (bt->str[0]=='H') {
ui_set_but_val(bt, hsv[0]);
}
- else if(bt->str[0]=='S') {
+ else if (bt->str[0]=='S') {
ui_set_but_val(bt, hsv[1]);
}
- else if(bt->str[0]=='V') {
+ else if (bt->str[0]=='V') {
ui_set_but_val(bt, hsv[2]);
}
}
@@ -1859,7 +1923,7 @@ static void do_picker_rna_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
ui_update_block_buts_rgb(but->block, rgb);
}
- if(popup)
+ if (popup)
popup->menuretval= UI_RETURN_UPDATE;
}
@@ -1874,7 +1938,7 @@ static void do_hsv_rna_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
ui_update_block_buts_rgb(but->block, rgb);
- if(popup)
+ if (popup)
popup->menuretval= UI_RETURN_UPDATE;
}
@@ -1895,7 +1959,7 @@ static void do_hex_rna_cb(bContext *UNUSED(C), void *bt1, void *hexcl)
ui_update_block_buts_rgb(but->block, rgb);
- if(popup)
+ if (popup)
popup->menuretval= UI_RETURN_UPDATE;
}
@@ -1904,7 +1968,7 @@ static void close_popup_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
uiBut *but= (uiBut *)bt1;
uiPopupBlockHandle *popup= but->block->handle;
- if(popup)
+ if (popup)
popup->menuretval= UI_RETURN_OK;
}
@@ -1913,26 +1977,26 @@ static void picker_new_hide_reveal(uiBlock *block, short colormode)
uiBut *bt;
/* tag buttons */
- for(bt= block->buttons.first; bt; bt= bt->next) {
+ for (bt= block->buttons.first; bt; bt= bt->next) {
if (bt->type == LABEL) {
- if( bt->str[1]=='G') {
- if(colormode==2) bt->flag &= ~UI_HIDDEN;
+ if ( bt->str[1]=='G') {
+ if (colormode==2) bt->flag &= ~UI_HIDDEN;
else bt->flag |= UI_HIDDEN;
}
}
- if(bt->type==NUMSLI || bt->type==TEX) {
- if( bt->str[1]=='e') {
- if(colormode==2) bt->flag &= ~UI_HIDDEN;
+ if (bt->type==NUMSLI || bt->type==TEX) {
+ if ( bt->str[1]=='e') {
+ if (colormode==2) bt->flag &= ~UI_HIDDEN;
else bt->flag |= UI_HIDDEN;
}
- else if( ELEM3(bt->str[0], 'R', 'G', 'B')) {
- if(colormode==0) bt->flag &= ~UI_HIDDEN;
+ else if ( ELEM3(bt->str[0], 'R', 'G', 'B')) {
+ if (colormode==0) bt->flag &= ~UI_HIDDEN;
else bt->flag |= UI_HIDDEN;
}
- else if( ELEM3(bt->str[0], 'H', 'S', 'V')) {
- if(colormode==1) bt->flag &= ~UI_HIDDEN;
+ else if ( ELEM3(bt->str[0], 'H', 'S', 'V')) {
+ if (colormode==1) bt->flag &= ~UI_HIDDEN;
else bt->flag |= UI_HIDDEN;
}
}
@@ -2007,7 +2071,8 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR
if (block->color_profile == BLI_PR_NONE) {
BLI_strncpy(tip, "Value in Display Color Space", sizeof(tip));
copy_v3_v3(rgb_gamma, rgb);
- } else {
+ }
+ else {
BLI_strncpy(tip, "Value in Linear RGB Color Space", sizeof(tip));
/* make an sRGB version, for Hex code */
linearrgb_to_srgb_v3_v3(rgb_gamma, rgb);
@@ -2069,7 +2134,7 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR
uiButSetFunc(bt, do_hsv_rna_cb, bt, hsv);
uiBlockEndAlign(block);
- if(rgb[3] != FLT_MAX) {
+ if (rgb[3] != FLT_MAX) {
bt= uiDefButR_prop(block, NUMSLI, 0, "A ", 0, -120, butwidth, UI_UNIT_Y, ptr, prop, 3, 0.0, 0.0, 0, 0, "Alpha");
uiButSetFunc(bt, do_picker_rna_cb, bt, NULL);
}
@@ -2093,16 +2158,16 @@ static int ui_picker_small_wheel_cb(const bContext *UNUSED(C), uiBlock *block, w
{
float add= 0.0f;
- if(event->type==WHEELUPMOUSE)
+ if (event->type==WHEELUPMOUSE)
add= 0.05f;
- else if(event->type==WHEELDOWNMOUSE)
+ else if (event->type==WHEELDOWNMOUSE)
add= -0.05f;
- if(add!=0.0f) {
+ if (add!=0.0f) {
uiBut *but;
- for(but= block->buttons.first; but; but= but->next) {
- if(but->type==HSVCUBE && but->active==NULL) {
+ for (but= block->buttons.first; but; but= but->next) {
+ if (but->type==HSVCUBE && but->active==NULL) {
uiPopupBlockHandle *popup= block->handle;
float col[3];
float *hsv= ui_block_hsv_get(block);
@@ -2116,7 +2181,7 @@ static int ui_picker_small_wheel_cb(const bContext *UNUSED(C), uiBlock *block, w
ui_set_but_vectorf(but, col);
ui_update_block_buts_rgb(block, col);
- if(popup)
+ if (popup)
popup->menuretval= UI_RETURN_UPDATE;
return 1;
@@ -2164,9 +2229,9 @@ static int ui_popup_string_hash(char *str)
int hash;
char *delimit= strchr(str, '|');
- if(delimit) *delimit= 0;
+ if (delimit) *delimit= 0;
hash= BLI_ghashutil_strhash(str);
- if(delimit) *delimit= '|';
+ if (delimit) *delimit= '|';
return hash;
}
@@ -2182,21 +2247,21 @@ uiBut *ui_popup_menu_memory(uiBlock *block, uiBut *but)
static int mem[256], first=1;
int hash= block->puphash;
- if(first) {
+ if (first) {
/* init */
memset(mem, -1, sizeof(mem));
first= 0;
}
- if(but) {
+ if (but) {
/* set */
mem[hash & 255 ]= ui_popup_string_hash(but->str);
return NULL;
}
else {
/* get */
- for(but=block->buttons.first; but; but=but->next)
- if(ui_popup_string_hash(but->str) == mem[hash & 255])
+ for (but=block->buttons.first; but; but=but->next)
+ if (ui_popup_string_hash(but->str) == mem[hash & 255])
return but;
return NULL;
@@ -2224,17 +2289,17 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
uiPopupMenu *pup= arg_pup;
int offset[2], direction, minwidth, width, height, flip;
- if(pup->menu_func) {
+ if (pup->menu_func) {
pup->block->handle= handle;
pup->menu_func(C, pup->layout, pup->menu_arg);
pup->block->handle= NULL;
}
- if(pup->but) {
+ if (pup->but) {
/* minimum width to enforece */
minwidth= pup->but->x2 - pup->but->x1;
- if(pup->but->type == PULLDOWN || pup->but->menu_create_func) {
+ if (pup->but->type == PULLDOWN || pup->but->menu_create_func) {
direction= UI_DOWN;
flip= 1;
}
@@ -2253,7 +2318,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
/* in some cases we create the block before the region,
* so we set it delayed here if necessary */
- if(BLI_findindex(&handle->region->uiblocks, block) == -1)
+ if (BLI_findindex(&handle->region->uiblocks, block) == -1)
uiBlockSetRegion(block, handle->region);
block->direction= direction;
@@ -2262,12 +2327,12 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
uiBlockSetFlag(block, UI_BLOCK_MOVEMOUSE_QUIT);
- if(pup->popup) {
+ if (pup->popup) {
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT|UI_BLOCK_RET_1);
uiBlockSetDirection(block, direction);
/* offset the mouse position, possibly based on earlier selection */
- if((block->flag & UI_BLOCK_POPUP_MEMORY) &&
+ if ((block->flag & UI_BLOCK_POPUP_MEMORY) &&
(bt= ui_popup_menu_memory(block, NULL))) {
/* position mouse on last clicked item, at 0.8*width of the
* button, so it doesn't overlap the text too much, also note
@@ -2280,7 +2345,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
/* position mouse at 0.8*width of the button and below the tile
* on the first item */
offset[0]= 0;
- for(bt=block->buttons.first; bt; bt=bt->next)
+ for (bt=block->buttons.first; bt; bt=bt->next)
offset[0]= MIN2(offset[0], -(bt->x1 + 0.8f*(bt->x2 - bt->x1)));
offset[1]= 1.5*UI_UNIT_Y;
@@ -2291,11 +2356,11 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
}
else {
/* for a header menu we set the direction automatic */
- if(!pup->slideout && flip) {
+ if (!pup->slideout && flip) {
ScrArea *sa= CTX_wm_area(C);
- if(sa && sa->headertype==HEADERDOWN) {
+ if (sa && sa->headertype==HEADERDOWN) {
ARegion *ar= CTX_wm_region(C);
- if(ar && ar->regiontype == RGN_TYPE_HEADER) {
+ if (ar && ar->regiontype == RGN_TYPE_HEADER) {
uiBlockSetDirection(block, UI_TOP);
uiBlockFlipOrder(block);
}
@@ -2307,7 +2372,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
}
/* if menu slides out of other menu, override direction */
- if(pup->slideout)
+ if (pup->slideout)
uiBlockSetDirection(block, UI_RIGHT);
uiEndBlock(C, block);
@@ -2328,7 +2393,7 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut
pup->but= but;
uiLayoutSetOperatorContext(pup->layout, WM_OP_INVOKE_REGION_WIN);
- if(!but) {
+ if (!but) {
/* no button to start from, means we are a popup */
pup->mx= window->eventstate->x;
pup->my= window->eventstate->y;
@@ -2343,13 +2408,13 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut
/* if this is an rna button then we can assume its an enum
* flipping enums is generally not good since the order can be
* important [#28786] */
- if(but->rnaprop && RNA_property_type(but->rnaprop) == PROP_ENUM) {
+ if (but->rnaprop && RNA_property_type(but->rnaprop) == PROP_ENUM) {
pup->block->flag |= UI_BLOCK_NO_FLIP;
}
}
#endif
- if(str) {
+ if (str) {
/* menu is created from a string */
pup->menu_func= ui_block_func_MENUSTR;
pup->menu_arg= str;
@@ -2362,7 +2427,7 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut
handle= ui_popup_block_create(C, butregion, but, NULL, ui_block_func_POPUP, pup);
- if(!but) {
+ if (!but) {
handle->popup= 1;
UI_add_popup_handlers(C, &window->modalhandlers, handle);
@@ -2393,15 +2458,15 @@ uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon)
pup->block->handle= MEM_callocN(sizeof(uiPopupBlockHandle), "uiPopupBlockHandle");
/* create title button */
- if(title && title[0]) {
+ if (title && title[0]) {
char titlestr[256];
- if(icon) {
+ if (icon) {
BLI_snprintf(titlestr, sizeof(titlestr), " %s", title);
uiDefIconTextBut(pup->block, LABEL, 0, icon, titlestr, 0, 0, 200, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
}
else {
- but= uiDefBut(pup->block, LABEL, 0, title, 0, 0, 200, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+ but = uiDefBut(pup->block, LABEL, 0, title, 0, 0, 200, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
but->flag= UI_TEXT_LEFT;
}
}
@@ -2439,7 +2504,7 @@ static void operator_name_cb(bContext *C, void *arg, int retval)
{
const char *opname= arg;
- if(opname && retval > 0)
+ if (opname && retval > 0)
WM_operator_name_call(C, opname, WM_OP_EXEC_DEFAULT, NULL);
}
@@ -2447,7 +2512,7 @@ static void operator_cb(bContext *C, void *arg, int retval)
{
wmOperator *op= arg;
- if(op && retval > 0)
+ if (op && retval > 0)
WM_operator_call(C, op);
else
WM_operator_free(op);
@@ -2542,26 +2607,26 @@ void uiPupMenuReports(bContext *C, ReportList *reports)
DynStr *ds;
char *str;
- if(!reports || !reports->list.first)
+ if (!reports || !reports->list.first)
return;
- if(!CTX_wm_window(C))
+ if (!CTX_wm_window(C))
return;
ds= BLI_dynstr_new();
- for(report=reports->list.first; report; report=report->next) {
- if(report->type < reports->printlevel)
+ for (report=reports->list.first; report; report=report->next) {
+ if (report->type < reports->printlevel)
; /* pass */
- else if(report->type >= RPT_ERROR)
+ else if (report->type >= RPT_ERROR)
BLI_dynstr_appendf(ds, "Error %%i%d%%t|%s", ICON_ERROR, report->message);
- else if(report->type >= RPT_WARNING)
+ else if (report->type >= RPT_WARNING)
BLI_dynstr_appendf(ds, "Warning %%i%d%%t|%s", ICON_ERROR, report->message);
- else if(report->type >= RPT_INFO)
+ else if (report->type >= RPT_INFO)
BLI_dynstr_appendf(ds, "Info %%i%d%%t|%s", ICON_INFO, report->message);
}
str= BLI_dynstr_get_cstring(ds);
- if(str[0] != '\0')
+ if (str[0] != '\0')
ui_popup_menu_create(C, NULL, NULL, NULL, NULL, str);
MEM_freeN(str);
@@ -2573,14 +2638,14 @@ void uiPupMenuInvoke(bContext *C, const char *idname)
uiPopupMenu *pup;
uiLayout *layout;
Menu menu;
- MenuType *mt= WM_menutype_find(idname, TRUE);
+ MenuType *mt = WM_menutype_find(idname, TRUE);
- if(mt==NULL) {
+ if (mt==NULL) {
printf("%s: named menu \"%s\" not found\n", __func__, idname);
return;
}
- if(mt->poll && mt->poll(C, mt)==0)
+ if (mt->poll && mt->poll(C, mt)==0)
return;
pup= uiPupMenuBegin(C, mt->label, ICON_NONE);
@@ -2656,11 +2721,11 @@ void uiPupBlockOperator(bContext *C, uiBlockCreateFunc func, wmOperator *op, int
void uiPupBlockClose(bContext *C, uiBlock *block)
{
- if(block->handle) {
+ if (block->handle) {
wmWindow *win = CTX_wm_window(C);
/* if loading new .blend while popup is open, window will be NULL */
- if(win) {
+ if (win) {
UI_remove_popup_handlers(&win->modalhandlers, block->handle);
ui_popup_block_free(C, block->handle);
}
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 65e2b98f4b9..6a2038b18bc 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -132,8 +132,8 @@ static uiFont *uifont_to_blfont(int id)
{
uiFont *font= U.uifonts.first;
- for(; font; font= font->next) {
- if(font->uifont_id==id) {
+ for (; font; font= font->next) {
+ if (font->uifont_id==id) {
return font;
}
}
@@ -154,14 +154,14 @@ void uiStyleFontDrawExt(uiFontStyle *fs, rcti *rect, const char *str,
height= BLF_ascender(fs->uifont_id);
yofs= ceil( 0.5f*(rect->ymax - rect->ymin - height));
- if(fs->align==UI_STYLE_TEXT_CENTER) {
+ if (fs->align==UI_STYLE_TEXT_CENTER) {
xofs= floor( 0.5f*(rect->xmax - rect->xmin - BLF_width(fs->uifont_id, str)));
/* don't center text if it chops off the start of the text, 2 gives some margin */
- if(xofs < 2) {
+ if (xofs < 2) {
xofs= 2;
}
}
- else if(fs->align==UI_STYLE_TEXT_RIGHT) {
+ else if (fs->align==UI_STYLE_TEXT_RIGHT) {
xofs= rect->xmax - rect->xmin - BLF_width(fs->uifont_id, str) - 1;
}
@@ -219,10 +219,10 @@ void uiStyleFontDrawRotated(uiFontStyle *fs, rcti *rect, const char *str)
angle= 90.0f;
/* translate rect to vertical */
- txtrect.xmin= rect->xmin - (rect->ymax - rect->ymin);
- txtrect.ymin= rect->ymin - (rect->xmax - rect->xmin);
- txtrect.xmax= rect->xmin;
- txtrect.ymax= rect->ymin;
+ txtrect.xmin = rect->xmin - (rect->ymax - rect->ymin);
+ txtrect.ymin = rect->ymin - (rect->xmax - rect->xmin);
+ txtrect.xmax = rect->xmin;
+ txtrect.ymax = rect->ymin;
/* clip is very strict, so we give it some space */
/* clipping is done without rotation, so make rect big enough to contain both positions */
@@ -306,12 +306,12 @@ void uiStyleInit(void)
uiStyle *style= U.uistyles.first;
/* recover from uninitialized dpi */
- if(U.dpi == 0)
+ if (U.dpi == 0)
U.dpi= 72;
CLAMP(U.dpi, 48, 128);
/* default builtin */
- if(font==NULL) {
+ if (font==NULL) {
font= MEM_callocN(sizeof(uiFont), "ui font");
BLI_addtail(&U.uifonts, font);
@@ -319,19 +319,19 @@ void uiStyleInit(void)
font->uifont_id= UIFONT_DEFAULT;
}
- for(font= U.uifonts.first; font; font= font->next) {
+ for (font= U.uifonts.first; font; font= font->next) {
- if(font->uifont_id==UIFONT_DEFAULT) {
+ if (font->uifont_id==UIFONT_DEFAULT) {
#ifdef WITH_INTERNATIONAL
int font_size= datatoc_bfont_ttf_size;
unsigned char *font_ttf= (unsigned char*)datatoc_bfont_ttf;
static int last_font_size = 0;
/* use unicode font for translation */
- if(U.transopts & USER_DOTRANSLATE) {
+ if (U.transopts & USER_DOTRANSLATE) {
font_ttf= BLF_get_unifont(&font_size);
- if(!font_ttf) {
+ if (!font_ttf) {
/* fall back if not found */
font_size= datatoc_bfont_ttf_size;
font_ttf= (unsigned char*)datatoc_bfont_ttf;
@@ -339,7 +339,7 @@ void uiStyleInit(void)
}
/* relload only if needed */
- if(last_font_size != font_size) {
+ if (last_font_size != font_size) {
BLF_unload("default");
last_font_size = font_size;
}
@@ -351,7 +351,7 @@ void uiStyleInit(void)
}
else {
font->blf_id= BLF_load(font->filename);
- if(font->blf_id == -1)
+ if (font->blf_id == -1)
font->blf_id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size);
}
@@ -370,7 +370,7 @@ void uiStyleInit(void)
}
}
- if(style==NULL) {
+ if (style==NULL) {
ui_style_new(&U.uistyles, "Default Style", UIFONT_DEFAULT );
}
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index a9aa3368a28..3df4dd7c887 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -84,7 +84,7 @@ void uiTemplateHeader(uiLayout *layout, bContext *C, int menus)
uiBlock *block;
block= uiLayoutAbsoluteBlock(layout);
- if(menus) ED_area_header_standardbuttons(C, block, 0);
+ if (menus) ED_area_header_standardbuttons(C, block, 0);
else ED_area_header_switchbutton(C, block, 0);
}
@@ -105,7 +105,7 @@ static void id_search_call_cb(bContext *C, void *arg_template, void *item)
TemplateID *template= (TemplateID*)arg_template;
/* ID */
- if(item) {
+ if (item) {
PointerRNA idptr;
RNA_id_pointer_create(item, &idptr);
@@ -124,29 +124,29 @@ static void id_search_cb(const bContext *C, void *arg_template, const char *str,
int flag= RNA_property_flag(template->prop);
/* ID listbase */
- for(id= lb->first; id; id= id->next) {
- if(!((flag & PROP_ID_SELF_CHECK) && id == id_from)) {
+ for (id= lb->first; id; id= id->next) {
+ if (!((flag & PROP_ID_SELF_CHECK) && id == id_from)) {
/* use filter */
- if(RNA_property_type(template->prop)==PROP_POINTER) {
+ if (RNA_property_type(template->prop)==PROP_POINTER) {
PointerRNA ptr;
RNA_id_pointer_create(id, &ptr);
- if(RNA_property_pointer_poll(&template->ptr, template->prop, &ptr)==0)
+ if (RNA_property_pointer_poll(&template->ptr, template->prop, &ptr)==0)
continue;
}
/* hide dot-datablocks, but only if filter does not force it visible */
- if(U.uiflag & USER_HIDE_DOT)
+ if (U.uiflag & USER_HIDE_DOT)
if ((id->name[2]=='.') && (str[0] != '.'))
continue;
- if(BLI_strcasestr(id->name+2, str)) {
+ if (BLI_strcasestr(id->name+2, str)) {
char name_ui[MAX_ID_NAME];
name_uiprefix_id(name_ui, id);
iconid= ui_id_icon_get((bContext*)C, id, template->preview);
- if(!uiSearchItemAdd(items, name_ui, id, iconid))
+ if (!uiSearchItemAdd(items, name_ui, id, iconid))
break;
}
}
@@ -182,7 +182,7 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem)
/* fake button, it holds space for search items */
uiDefBut(block, LABEL, 0, "", 10, 15, w, h, NULL, 0, 0, 0, 0, NULL);
- but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, w, 19, template.prv_rows, template.prv_cols, "");
+ but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, w, 19, template.prv_rows, template.prv_cols, "");
uiButSetSearchFunc(but, id_search_cb, &template, id_search_call_cb, idptr.data);
}
/* list view */
@@ -190,7 +190,7 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem)
/* fake button, it holds space for search items */
uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL);
- but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, 19, 0, 0, "");
+ but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, 19, 0, 0, "");
uiButSetSearchFunc(but, id_search_cb, &template, id_search_call_cb, idptr.data);
}
@@ -221,14 +221,14 @@ void uiIDContextProperty(bContext *C, PointerRNA *ptr, PropertyRNA **prop)
memset(ptr, 0, sizeof(*ptr));
*prop= NULL;
- if(!ar)
+ if (!ar)
return;
- for(block=ar->uiblocks.first; block; block=block->next) {
- for(but=block->buttons.first; but; but= but->next) {
+ for (block=ar->uiblocks.first; block; block=block->next) {
+ for (but=block->buttons.first; but; but= but->next) {
/* find the button before the active one */
- if((but->flag & (UI_BUT_LAST_ACTIVE|UI_ACTIVE))) {
- if(but->func_argN) {
+ if ((but->flag & (UI_BUT_LAST_ACTIVE|UI_ACTIVE))) {
+ if (but->func_argN) {
template= but->func_argN;
*ptr= template->ptr;
*prop= template->prop;
@@ -261,20 +261,20 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
RNA_property_pointer_set(&template->ptr, template->prop, idptr);
RNA_property_update(C, &template->ptr, template->prop);
- if(id && CTX_wm_window(C)->eventstate->shift) /* useful hidden functionality, */
+ if (id && CTX_wm_window(C)->eventstate->shift) /* useful hidden functionality, */
id->us= 0;
break;
case UI_ID_FAKE_USER:
- if(id) {
- if(id->flag & LIB_FAKEUSER) id_us_plus(id);
+ if (id) {
+ if (id->flag & LIB_FAKEUSER) id_us_plus(id);
else id_us_min(id);
}
else return;
break;
case UI_ID_LOCAL:
- if(id) {
- if(id_make_local(id, 0)) {
+ if (id) {
+ if (id_make_local(id, 0)) {
/* reassign to get get proper updates/notifiers */
idptr= RNA_property_pointer_get(&template->ptr, template->prop);
RNA_property_pointer_set(&template->ptr, template->prop, idptr);
@@ -283,18 +283,18 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
}
break;
case UI_ID_ALONE:
- if(id) {
+ if (id) {
const int do_scene_obj= (GS(id->name) == ID_OB) &&
(template->ptr.type == &RNA_SceneObjects);
/* make copy */
- if(do_scene_obj) {
+ if (do_scene_obj) {
Scene *scene= CTX_data_scene(C);
ED_object_single_user(scene, (struct Object *)id);
WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
}
else {
- if(id) {
+ if (id) {
id_single_user(C, id, &template->ptr, template->prop);
}
}
@@ -309,7 +309,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
static const char *template_id_browse_tip(StructRNA *type)
{
- if(type) {
+ if (type) {
switch(RNA_type_to_ID_code(type)) {
case ID_SCE: return N_("Browse Scene to be linked");
case ID_OB: return N_("Browse Object to be linked");
@@ -356,138 +356,138 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
block= uiLayoutGetBlock(layout);
uiBlockBeginAlign(block);
- if(idptr.type)
+ if (idptr.type)
type= idptr.type;
- if(flag & UI_ID_PREVIEWS) {
+ if (flag & UI_ID_PREVIEWS) {
- but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*6, UI_UNIT_Y*6,
+ but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*6, UI_UNIT_Y*6,
TIP_(template_id_browse_tip(type)));
- if(type) {
+ if (type) {
but->icon= RNA_struct_ui_icon(type);
if (id) but->icon = ui_id_icon_get(C, id, 1);
uiButSetFlag(but, UI_HAS_ICON|UI_ICON_PREVIEW);
}
- if((idfrom && idfrom->lib) || !editable)
+ if ((idfrom && idfrom->lib) || !editable)
uiButSetFlag(but, UI_BUT_DISABLED);
uiLayoutRow(layout, 1);
template->preview= 1;
}
- else if(flag & UI_ID_BROWSE) {
- but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y,
+ else if (flag & UI_ID_BROWSE) {
+ but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y,
TIP_(template_id_browse_tip(type)));
- if(type) {
+ if (type) {
but->icon= RNA_struct_ui_icon(type);
/* default dragging of icon for id browse buttons */
uiButSetDragID(but, id);
uiButSetFlag(but, UI_HAS_ICON|UI_ICON_LEFT);
}
- if((idfrom && idfrom->lib) || !editable)
+ if ((idfrom && idfrom->lib) || !editable)
uiButSetFlag(but, UI_BUT_DISABLED);
}
/* text button with name */
- if(id) {
+ if (id) {
char name[UI_MAX_NAME_STR];
const short user_alert= (id->us <= 0);
//text_idbutton(id, name);
name[0]= '\0';
- but= uiDefButR(block, TEX, 0, name, 0, 0, UI_UNIT_X*6, UI_UNIT_Y, &idptr, "name", -1, 0, 0, -1, -1, NULL);
+ but = uiDefButR(block, TEX, 0, name, 0, 0, UI_UNIT_X*6, UI_UNIT_Y, &idptr, "name", -1, 0, 0, -1, -1, NULL);
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_RENAME));
- if(user_alert) uiButSetFlag(but, UI_BUT_REDALERT);
+ if (user_alert) uiButSetFlag(but, UI_BUT_REDALERT);
- if(id->lib) {
- if(id->flag & LIB_INDIRECT) {
- but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_INDIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
+ if (id->lib) {
+ if (id->flag & LIB_INDIRECT) {
+ but = uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_INDIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
TIP_("Indirect library datablock, cannot change"));
uiButSetFlag(but, UI_BUT_DISABLED);
}
else {
- but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_DIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
+ but = uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_DIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
TIP_("Direct linked library datablock, click to make local"));
- if(!id_make_local(id, 1 /* test */) || (idfrom && idfrom->lib))
+ if (!id_make_local(id, 1 /* test */) || (idfrom && idfrom->lib))
uiButSetFlag(but, UI_BUT_DISABLED);
}
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_LOCAL));
}
- if(id->us > 1) {
+ if (id->us > 1) {
char numstr[32];
BLI_snprintf(numstr, sizeof(numstr), "%d", id->us);
- but= uiDefBut(block, BUT, 0, numstr, 0,0,UI_UNIT_X + ((id->us < 10) ? 0:10), UI_UNIT_Y, NULL, 0, 0, 0, 0,
+ but = uiDefBut(block, BUT, 0, numstr, 0,0,UI_UNIT_X + ((id->us < 10) ? 0:10), UI_UNIT_Y, NULL, 0, 0, 0, 0,
TIP_("Display number of users of this data (click to make a single-user copy)"));
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ALONE));
- if(!id_copy(id, NULL, 1 /* test only */) || (idfrom && idfrom->lib) || !editable)
+ if (!id_copy(id, NULL, 1 /* test only */) || (idfrom && idfrom->lib) || !editable)
uiButSetFlag(but, UI_BUT_DISABLED);
}
- if(user_alert) uiButSetFlag(but, UI_BUT_REDALERT);
+ if (user_alert) uiButSetFlag(but, UI_BUT_REDALERT);
- if(id->lib == NULL && !(ELEM5(GS(id->name), ID_GR, ID_SCE, ID_SCR, ID_TXT, ID_OB))) {
+ if (id->lib == NULL && !(ELEM5(GS(id->name), ID_GR, ID_SCE, ID_SCR, ID_TXT, ID_OB))) {
uiDefButR(block, TOG, 0, "F", 0, 0, UI_UNIT_X, UI_UNIT_Y, &idptr, "use_fake_user", -1, 0, 0, -1, -1, NULL);
}
}
- if(flag & UI_ID_ADD_NEW) {
+ if (flag & UI_ID_ADD_NEW) {
int w= id?UI_UNIT_X: (flag & UI_ID_OPEN)? UI_UNIT_X*3: UI_UNIT_X*6;
- if(newop) {
- but= uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN, (id)? "": IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL);
+ if (newop) {
+ but = uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN, (id)? "": IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL);
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
}
else {
- but= uiDefIconTextBut(block, BUT, 0, ICON_ZOOMIN, (id)? "": IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
+ but = uiDefIconTextBut(block, BUT, 0, ICON_ZOOMIN, (id)? "": IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
}
- if((idfrom && idfrom->lib) || !editable)
+ if ((idfrom && idfrom->lib) || !editable)
uiButSetFlag(but, UI_BUT_DISABLED);
}
- if(flag & UI_ID_OPEN) {
+ if (flag & UI_ID_OPEN) {
int w= id?UI_UNIT_X: (flag & UI_ID_ADD_NEW)? UI_UNIT_X*3: UI_UNIT_X*6;
- if(openop) {
- but= uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id)? "": IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL);
+ if (openop) {
+ but = uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id)? "": IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL);
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN));
}
else {
- but= uiDefIconTextBut(block, BUT, 0, ICON_FILESEL, (id)? "": IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
+ but = uiDefIconTextBut(block, BUT, 0, ICON_FILESEL, (id)? "": IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN));
}
- if((idfrom && idfrom->lib) || !editable)
+ if ((idfrom && idfrom->lib) || !editable)
uiButSetFlag(but, UI_BUT_DISABLED);
}
/* delete button */
- if(id && (flag & UI_ID_DELETE) && (RNA_property_flag(template->prop) & PROP_NEVER_UNLINK)==0) {
- if(unlinkop) {
- but= uiDefIconButO(block, BUT, unlinkop, WM_OP_INVOKE_REGION_WIN, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL);
+ if (id && (flag & UI_ID_DELETE) && (RNA_property_flag(template->prop) & PROP_NEVER_UNLINK)==0) {
+ if (unlinkop) {
+ but = uiDefIconButO(block, BUT, unlinkop, WM_OP_INVOKE_REGION_WIN, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL);
/* so we can access the template from operators, font unlinking needs this */
uiButSetNFunc(but, NULL, MEM_dupallocN(template), NULL);
}
else {
- but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0,
+ but = uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0,
TIP_("Unlink datablock. Shift + Click to set users to zero, data will then not be saved"));
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_DELETE));
- if(RNA_property_flag(template->prop) & PROP_NEVER_NULL)
+ if (RNA_property_flag(template->prop) & PROP_NEVER_NULL)
uiButSetFlag(but, UI_BUT_DISABLED);
}
- if((idfrom && idfrom->lib) || !editable)
+ if ((idfrom && idfrom->lib) || !editable)
uiButSetFlag(but, UI_BUT_DISABLED);
}
- if(idcode == ID_TE)
+ if (idcode == ID_TE)
uiTemplateTextureShow(layout, C, &template->ptr, template->prop);
uiBlockEndAlign(block);
@@ -502,7 +502,7 @@ static void ui_template_id(uiLayout *layout, bContext *C, PointerRNA *ptr, const
prop= RNA_struct_find_property(ptr, propname);
- if(!prop || RNA_property_type(prop) != PROP_POINTER) {
+ if (!prop || RNA_property_type(prop) != PROP_POINTER) {
RNA_warning("pointer property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -513,9 +513,9 @@ static void ui_template_id(uiLayout *layout, bContext *C, PointerRNA *ptr, const
template->prv_rows = prv_rows;
template->prv_cols = prv_cols;
- if(newop)
+ if (newop)
flag |= UI_ID_ADD_NEW;
- if(openop)
+ if (openop)
flag |= UI_ID_OPEN;
type= RNA_property_pointer_type(ptr, prop);
@@ -525,7 +525,7 @@ static void ui_template_id(uiLayout *layout, bContext *C, PointerRNA *ptr, const
/* create UI elements for this template
* - template_ID makes a copy of the template data and assigns it to the relevant buttons
*/
- if(template->idlb) {
+ if (template->idlb) {
uiLayoutRow(layout, 1);
template_ID(C, layout, template, type, idcode, flag, newop, openop, unlinkop);
}
@@ -650,9 +650,9 @@ static void modifiers_setOnCage(bContext *C, void *ob_v, void *md_v)
/* undo button operation */
md->mode ^= eModifierMode_OnCage;
- for(i = 0, md=ob->modifiers.first; md; ++i, md=md->next) {
- if(md == md_v) {
- if(i >= cageIndex)
+ for (i = 0, md=ob->modifiers.first; md; ++i, md=md->next) {
+ if (md == md_v) {
+ if (i >= cageIndex)
md->mode ^= eModifierMode_OnCage;
break;
}
@@ -686,8 +686,8 @@ static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v)
static int modifier_can_delete(ModifierData *md)
{
/* fluid particle modifier can't be deleted here */
- if(md->type == eModifierType_ParticleSystem)
- if(((ParticleSystemModifierData *)md)->psys->part->type == PART_FLUID)
+ if (md->type == eModifierType_ParticleSystem)
+ if (((ParticleSystemModifierData *)md)->psys->part->type == PART_FLUID)
return 0;
return 1;
@@ -788,20 +788,21 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
/* place holder button */
uiBlockSetEmboss(block, UI_EMBOSSN);
- but= uiDefIconBut(block, BUT, 0, ICON_NONE, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, NULL);
+ but = uiDefIconBut(block, BUT, 0, ICON_NONE, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, NULL);
uiButSetFlag(but, UI_BUT_DISABLED);
uiBlockSetEmboss(block, UI_EMBOSS);
}
} /* tessellation point for curve-typed objects */
else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
- /* some modifiers could work with pre-tesselated curves only */
+ /* some modifiers could work with pre-tessellated curves only */
if (ELEM3(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) {
- /* add disabled pre-tesselated button, so users could have
+ /* add disabled pre-tessellated button, so users could have
* message for this modifiers */
but = uiDefIconButBitI(block, TOG, eModifierMode_ApplyOnSpline, 0, ICON_SURFACE_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0,
TIP_("This modifier could be applied on splines' points only"));
uiButSetFlag(but, UI_BUT_DISABLED);
- } else if (mti->type != eModifierTypeType_Constructive) {
+ }
+ else if (mti->type != eModifierTypeType_Constructive) {
/* constructive modifiers tessellates curve before applying */
uiItemR(row, &ptr, "use_apply_on_spline", 0, "", ICON_NONE);
}
@@ -841,9 +842,9 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
ParticleSystem *psys= ((ParticleSystemModifierData *)md)->psys;
if (!(ob->mode & OB_MODE_PARTICLE_EDIT) && psys->pathcache) {
- if(ELEM(psys->part->ren_as, PART_DRAW_GR, PART_DRAW_OB))
+ if (ELEM(psys->part->ren_as, PART_DRAW_GR, PART_DRAW_OB))
uiItemO(row, "Convert", ICON_NONE, "OBJECT_OT_duplicates_make_real");
- else if(psys->part->ren_as == PART_DRAW_PATH)
+ else if (psys->part->ren_as == PART_DRAW_PATH)
uiItemO(row, "Convert", ICON_NONE, "OBJECT_OT_modifier_convert");
}
}
@@ -868,7 +869,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
}
/* error messages */
- if(md->error) {
+ if (md->error) {
box = uiLayoutBox(column);
row = uiLayoutRow(box, 0);
uiItemL(row, md->error, ICON_ERROR);
@@ -885,7 +886,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
int i, lastCageIndex, cageIndex;
/* verify we have valid data */
- if(!RNA_struct_is_a(ptr->type, &RNA_Modifier)) {
+ if (!RNA_struct_is_a(ptr->type, &RNA_Modifier)) {
RNA_warning("Expected modifier on object");
return NULL;
}
@@ -893,7 +894,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
ob= ptr->id.data;
md= ptr->data;
- if(!ob || !(GS(ob->id.name) == ID_OB)) {
+ if (!ob || !(GS(ob->id.name) == ID_OB)) {
RNA_warning("Expected modifier on object");
return NULL;
}
@@ -906,10 +907,10 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
// XXX virtual modifiers are not accesible for python
vmd = modifiers_getVirtualModifierList(ob);
- for(i=0; vmd; i++, vmd=vmd->next) {
- if(md == vmd)
+ for (i=0; vmd; i++, vmd=vmd->next) {
+ if (md == vmd)
return draw_modifier(layout, scene, ob, md, i, cageIndex, lastCageIndex);
- else if(vmd->mode & eModifierMode_Virtual)
+ else if (vmd->mode & eModifierMode_Virtual)
i--;
}
@@ -953,9 +954,9 @@ static void do_constraint_panels(bContext *C, void *ob_pt, int event)
// if there are problems because of this, then rna needs changed update functions.
//
// object_test_constraints(ob);
- // if(ob->pose) update_pose_constraint_flags(ob->pose);
+ // if (ob->pose) update_pose_constraint_flags(ob->pose);
- if(ob->type==OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
+ if (ob->type==OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
else DAG_id_tag_update(&ob->id, OB_RECALC_OB);
WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
@@ -1020,7 +1021,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
if (con->flag & CONSTRAINT_DISABLE)
uiLayoutSetRedAlert(row, 1);
- if(proxy_protected == 0) {
+ if (proxy_protected == 0) {
uiItemR(row, &ptr, "name", 0, "", ICON_NONE);
}
else
@@ -1111,7 +1112,7 @@ uiLayout *uiTemplateConstraint(uiLayout *layout, PointerRNA *ptr)
bConstraint *con;
/* verify we have valid data */
- if(!RNA_struct_is_a(ptr->type, &RNA_Constraint)) {
+ if (!RNA_struct_is_a(ptr->type, &RNA_Constraint)) {
RNA_warning("Expected constraint on object");
return NULL;
}
@@ -1119,7 +1120,7 @@ uiLayout *uiTemplateConstraint(uiLayout *layout, PointerRNA *ptr)
ob= ptr->id.data;
con= ptr->data;
- if(!ob || !(GS(ob->id.name) == ID_OB)) {
+ if (!ob || !(GS(ob->id.name) == ID_OB)) {
RNA_warning("Expected constraint on object");
return NULL;
}
@@ -1127,9 +1128,9 @@ uiLayout *uiTemplateConstraint(uiLayout *layout, PointerRNA *ptr)
uiBlockSetButLock(uiLayoutGetBlock(layout), (ob && ob->id.lib), ERROR_LIBDATA_MESSAGE);
/* hrms, the temporal constraint should not draw! */
- if(con->type==CONSTRAINT_TYPE_KINEMATIC) {
+ if (con->type==CONSTRAINT_TYPE_KINEMATIC) {
bKinematicConstraint *data= con->data;
- if(data->flag & CONSTRAINT_IK_TEMP)
+ if (data->flag & CONSTRAINT_IK_TEMP)
return NULL;
}
@@ -1165,7 +1166,7 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M
PointerRNA material_ptr;
PointerRNA texture_ptr;
- if(id && !ELEM4(GS(id->name), ID_MA, ID_TE, ID_WO, ID_LA)) {
+ if (id && !ELEM4(GS(id->name), ID_MA, ID_TE, ID_WO, ID_LA)) {
RNA_warning("Expected ID of type material, texture, lamp or world");
return;
}
@@ -1174,18 +1175,18 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M
pid= id;
pparent= NULL;
- if(id && (GS(id->name) == ID_TE)) {
- if(parent && (GS(parent->name) == ID_MA))
+ if (id && (GS(id->name) == ID_TE)) {
+ if (parent && (GS(parent->name) == ID_MA))
pr_texture= &((Material*)parent)->pr_texture;
- else if(parent && (GS(parent->name) == ID_WO))
+ else if (parent && (GS(parent->name) == ID_WO))
pr_texture= &((World*)parent)->pr_texture;
- else if(parent && (GS(parent->name) == ID_LA))
+ else if (parent && (GS(parent->name) == ID_LA))
pr_texture= &((Lamp*)parent)->pr_texture;
- if(pr_texture) {
- if(*pr_texture == TEX_PR_OTHER)
+ if (pr_texture) {
+ if (*pr_texture == TEX_PR_OTHER)
pid= parent;
- else if(*pr_texture == TEX_PR_BOTH)
+ else if (*pr_texture == TEX_PR_BOTH)
pparent= parent;
}
}
@@ -1203,8 +1204,8 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M
/* add buttons */
if (pid && show_buttons) {
- if(GS(pid->name) == ID_MA || (pparent && GS(pparent->name) == ID_MA)) {
- if(GS(pid->name) == ID_MA) ma= (Material*)pid;
+ if (GS(pid->name) == ID_MA || (pparent && GS(pparent->name) == ID_MA)) {
+ if (GS(pid->name) == ID_MA) ma= (Material*)pid;
else ma= (Material*)pparent;
/* Create RNA Pointer */
@@ -1215,22 +1216,22 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M
uiItemR(col, &material_ptr, "preview_render_type", UI_ITEM_R_EXPAND, "", ICON_NONE);
}
- if(pr_texture) {
+ if (pr_texture) {
/* Create RNA Pointer */
RNA_pointer_create(id, &RNA_Texture, tex, &texture_ptr);
uiLayoutRow(layout, 1);
uiDefButS(block, ROW, B_MATPRV, IFACE_("Texture"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_TEXTURE, 0, 0, "");
- if(GS(parent->name) == ID_MA)
+ if (GS(parent->name) == ID_MA)
uiDefButS(block, ROW, B_MATPRV, IFACE_("Material"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
- else if(GS(parent->name) == ID_LA)
+ else if (GS(parent->name) == ID_LA)
uiDefButS(block, ROW, B_MATPRV, IFACE_("Lamp"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
- else if(GS(parent->name) == ID_WO)
+ else if (GS(parent->name) == ID_WO)
uiDefButS(block, ROW, B_MATPRV, IFACE_("World"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
uiDefButS(block, ROW, B_MATPRV, IFACE_("Both"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_BOTH, 0, 0, "");
/* Alpha button for texture preview */
- if(*pr_texture!=TEX_PR_OTHER) {
+ if (*pr_texture!=TEX_PR_OTHER) {
row = uiLayoutRow(layout, 0);
uiItemR(row, &texture_ptr, "use_preview_alpha", 0, NULL, ICON_NONE);
}
@@ -1263,12 +1264,12 @@ static void colorband_add_cb(bContext *C, void *cb_v, void *coba_v)
ColorBand *coba= coba_v;
float pos= 0.5f;
- if(coba->tot > 1) {
- if(coba->cur > 0) pos= (coba->data[coba->cur-1].pos + coba->data[coba->cur].pos) * 0.5f;
+ if (coba->tot > 1) {
+ if (coba->cur > 0) pos= (coba->data[coba->cur-1].pos + coba->data[coba->cur].pos) * 0.5f;
else pos= (coba->data[coba->cur+1].pos + coba->data[coba->cur].pos) * 0.5f;
}
- if(colorband_element_add(coba, pos)) {
+ if (colorband_element_add(coba, pos)) {
rna_update_cb(C, cb_v, NULL);
ED_undo_push(C, "Add colorband");
}
@@ -1278,7 +1279,7 @@ static void colorband_del_cb(bContext *C, void *cb_v, void *coba_v)
{
ColorBand *coba= coba_v;
- if(colorband_element_remove(coba, coba->cur)) {
+ if (colorband_element_remove(coba, coba->cur)) {
ED_undo_push(C, "Delete colorband");
rna_update_cb(C, cb_v, NULL);
}
@@ -1291,10 +1292,10 @@ static void colorband_flip_cb(bContext *C, void *cb_v, void *coba_v)
ColorBand *coba= coba_v;
int a;
- for(a=0; a<coba->tot; a++) {
+ for (a=0; a<coba->tot; a++) {
data_tmp[a]= coba->data[coba->tot - (a + 1)];
}
- for(a=0; a<coba->tot; a++) {
+ for (a=0; a<coba->tot; a++) {
data_tmp[a].pos = 1.0f - data_tmp[a].pos;
coba->data[a]= data_tmp[a];
}
@@ -1326,7 +1327,7 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand
const int line1_y= yoffs + 65 + UI_UNIT_Y + 2; /* 2 for some space between the buttons */
const int line2_y= yoffs + 65;
- if(coba==NULL) return;
+ if (coba==NULL) return;
bt= uiDefBut(block, BUT, 0, IFACE_("Add"), 0+xoffs,line1_y,40,UI_UNIT_Y, NULL, 0, 0, 0, 0,
TIP_("Add a new color stop to the colorband"));
@@ -1353,7 +1354,7 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand
- if(coba->tot) {
+ if (coba->tot) {
CBData *cbd= coba->data + coba->cur;
/* better to use rna so we can animate them */
@@ -1387,7 +1388,7 @@ static void colorband_buttons_small(uiLayout *layout, uiBlock *block, ColorBand
uiButSetNFunc(bt, colorband_flip_cb, MEM_dupallocN(cb), coba);
uiBlockEndAlign(block);
- if(coba->tot) {
+ if (coba->tot) {
CBData *cbd= coba->data + coba->cur;
PointerRNA ptr;
RNA_pointer_create(cb->ptr.id.data, &RNA_ColorRampElement, cbd, &ptr);
@@ -1407,7 +1408,7 @@ static void colorband_buttons_small(uiLayout *layout, uiBlock *block, ColorBand
static void colorband_buttons_layout(uiLayout *layout, uiBlock *block, ColorBand *coba, rctf *butr, int small, RNAUpdateCb *cb)
{
- if(small)
+ if (small)
colorband_buttons_small(layout, block, coba, butr, cb);
else
colorband_buttons_large(layout, block, coba, 0, 0, cb);
@@ -1421,19 +1422,19 @@ void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, const char *propname
uiBlock *block;
rctf rect;
- if(!prop || RNA_property_type(prop) != PROP_POINTER)
+ if (!prop || RNA_property_type(prop) != PROP_POINTER)
return;
cptr= RNA_property_pointer_get(ptr, prop);
- if(!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_ColorRamp))
+ if (!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_ColorRamp))
return;
cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb");
cb->ptr= *ptr;
cb->prop= prop;
- rect.xmin= 0; rect.xmax= 200;
- rect.ymin= 0; rect.ymax= 190;
+ rect.xmin = 0; rect.xmax = 200;
+ rect.ymin = 0; rect.ymax = 190;
block= uiLayoutAbsoluteBlock(layout);
colorband_buttons_layout(layout, block, cptr.data, &rect, !expand, cb);
@@ -1453,19 +1454,19 @@ void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, const char *propname
Histogram *hist;
rctf rect;
- if(!prop || RNA_property_type(prop) != PROP_POINTER)
+ if (!prop || RNA_property_type(prop) != PROP_POINTER)
return;
cptr= RNA_property_pointer_get(ptr, prop);
- if(!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_Histogram))
+ if (!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_Histogram))
return;
cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb");
cb->ptr= *ptr;
cb->prop= prop;
- rect.xmin= 0; rect.xmax= 200;
- rect.ymin= 0; rect.ymax= 190;
+ rect.xmin = 0; rect.xmax = 200;
+ rect.ymin = 0; rect.ymax = 190;
block= uiLayoutAbsoluteBlock(layout);
//colorband_buttons_layout(layout, block, cptr.data, &rect, !expand, cb);
@@ -1492,11 +1493,11 @@ void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, const char *propname)
Scopes *scopes;
rctf rect;
- if(!prop || RNA_property_type(prop) != PROP_POINTER)
+ if (!prop || RNA_property_type(prop) != PROP_POINTER)
return;
cptr= RNA_property_pointer_get(ptr, prop);
- if(!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_Scopes))
+ if (!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_Scopes))
return;
scopes = (Scopes *)cptr.data;
@@ -1504,8 +1505,8 @@ void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, const char *propname)
cb->ptr= *ptr;
cb->prop= prop;
- rect.xmin= 0; rect.xmax= 200;
- rect.ymin= 0; rect.ymax= 190;
+ rect.xmin = 0; rect.xmax = 200;
+ rect.ymin = 0; rect.ymax = 190;
block= uiLayoutAbsoluteBlock(layout);
@@ -1529,11 +1530,11 @@ void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, const char *propna
Scopes *scopes;
rctf rect;
- if(!prop || RNA_property_type(prop) != PROP_POINTER)
+ if (!prop || RNA_property_type(prop) != PROP_POINTER)
return;
cptr= RNA_property_pointer_get(ptr, prop);
- if(!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_Scopes))
+ if (!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_Scopes))
return;
scopes = (Scopes *)cptr.data;
@@ -1541,8 +1542,8 @@ void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, const char *propna
cb->ptr= *ptr;
cb->prop= prop;
- rect.xmin= 0; rect.xmax= 200;
- rect.ymin= 0; rect.ymax= 190;
+ rect.xmin = 0; rect.xmax = 200;
+ rect.ymin = 0; rect.ymax = 190;
block= uiLayoutAbsoluteBlock(layout);
@@ -1563,7 +1564,7 @@ static void curvemap_buttons_zoom_in(bContext *C, void *cumap_v, void *UNUSED(ar
float d;
/* we allow 20 times zoom */
- if( (cumap->curr.xmax - cumap->curr.xmin) > 0.04f*(cumap->clipr.xmax - cumap->clipr.xmin) ) {
+ if ( (cumap->curr.xmax - cumap->curr.xmin) > 0.04f*(cumap->clipr.xmax - cumap->clipr.xmin) ) {
d= 0.1154f*(cumap->curr.xmax - cumap->curr.xmin);
cumap->curr.xmin+= d;
cumap->curr.xmax-= d;
@@ -1580,31 +1581,31 @@ static void curvemap_buttons_zoom_out(bContext *C, void *cumap_v, void *UNUSED(u
CurveMapping *cumap = cumap_v;
float d, d1;
- /* we allow 20 times zoom, but dont view outside clip */
- if( (cumap->curr.xmax - cumap->curr.xmin) < 20.0f*(cumap->clipr.xmax - cumap->clipr.xmin) ) {
+ /* we allow 20 times zoom, but don't view outside clip */
+ if ( (cumap->curr.xmax - cumap->curr.xmin) < 20.0f*(cumap->clipr.xmax - cumap->clipr.xmin) ) {
d= d1= 0.15f*(cumap->curr.xmax - cumap->curr.xmin);
- if(cumap->flag & CUMA_DO_CLIP)
- if(cumap->curr.xmin-d < cumap->clipr.xmin)
+ if (cumap->flag & CUMA_DO_CLIP)
+ if (cumap->curr.xmin-d < cumap->clipr.xmin)
d1= cumap->curr.xmin - cumap->clipr.xmin;
cumap->curr.xmin-= d1;
d1= d;
- if(cumap->flag & CUMA_DO_CLIP)
- if(cumap->curr.xmax+d > cumap->clipr.xmax)
+ if (cumap->flag & CUMA_DO_CLIP)
+ if (cumap->curr.xmax+d > cumap->clipr.xmax)
d1= -cumap->curr.xmax + cumap->clipr.xmax;
cumap->curr.xmax+= d1;
d= d1= 0.15f*(cumap->curr.ymax - cumap->curr.ymin);
- if(cumap->flag & CUMA_DO_CLIP)
- if(cumap->curr.ymin-d < cumap->clipr.ymin)
+ if (cumap->flag & CUMA_DO_CLIP)
+ if (cumap->curr.ymin-d < cumap->clipr.ymin)
d1= cumap->curr.ymin - cumap->clipr.ymin;
cumap->curr.ymin-= d1;
d1= d;
- if(cumap->flag & CUMA_DO_CLIP)
- if(cumap->curr.ymax+d > cumap->clipr.ymax)
+ if (cumap->flag & CUMA_DO_CLIP)
+ if (cumap->curr.ymax+d > cumap->clipr.ymax)
d1= -cumap->curr.ymax + cumap->clipr.ymax;
cumap->curr.ymax+= d1;
}
@@ -1744,7 +1745,7 @@ static void curvemap_buttons_reset(bContext *C, void *cb_v, void *cumap_v)
int a;
cumap->preset = CURVE_PRESET_LINE;
- for(a=0; a<CM_TOT; a++)
+ for (a=0; a<CM_TOT; a++)
curvemap_reset(cumap->cm+a, &cumap->clipr, cumap->preset, CURVEMAP_SLOPE_POSITIVE);
cumap->black[0]=cumap->black[1]=cumap->black[2]= 0.0f;
@@ -1772,42 +1773,42 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe
/* curve chooser */
row= uiLayoutRow(layout, 0);
- if(labeltype=='v') {
+ if (labeltype=='v') {
/* vector */
sub= uiLayoutRow(row, 1);
uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT);
- if(cumap->cm[0].curve) {
+ if (cumap->cm[0].curve) {
bt= uiDefButI(block, ROW, 0, "X", 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, 0.0, 0.0, "");
uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
}
- if(cumap->cm[1].curve) {
+ if (cumap->cm[1].curve) {
bt= uiDefButI(block, ROW, 0, "Y", 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, 0.0, 0.0, "");
uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
}
- if(cumap->cm[2].curve) {
+ if (cumap->cm[2].curve) {
bt= uiDefButI(block, ROW, 0, "Z", 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, 0.0, 0.0, "");
uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
}
}
- else if(labeltype=='c') {
+ else if (labeltype=='c') {
/* color */
sub= uiLayoutRow(row, 1);
uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT);
- if(cumap->cm[3].curve) {
+ if (cumap->cm[3].curve) {
bt= uiDefButI(block, ROW, 0, "C", 0, 0, dx, dx, &cumap->cur, 0.0, 3.0, 0.0, 0.0, "");
uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
}
- if(cumap->cm[0].curve) {
+ if (cumap->cm[0].curve) {
bt= uiDefButI(block, ROW, 0, "R", 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, 0.0, 0.0, "");
uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
}
- if(cumap->cm[1].curve) {
+ if (cumap->cm[1].curve) {
bt= uiDefButI(block, ROW, 0, "G", 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, 0.0, 0.0, "");
uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
}
- if(cumap->cm[2].curve) {
+ if (cumap->cm[2].curve) {
bt= uiDefButI(block, ROW, 0, "B", 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, 0.0, 0.0, "");
uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
}
@@ -1817,15 +1818,15 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe
sub= uiLayoutRow(row, 1);
uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT);
- if(cumap->cm[0].curve) {
+ if (cumap->cm[0].curve) {
bt= uiDefButI(block, ROW, 0, "H", 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, 0.0, 0.0, "");
uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
}
- if(cumap->cm[1].curve) {
+ if (cumap->cm[1].curve) {
bt= uiDefButI(block, ROW, 0, "S", 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, 0.0, 0.0, "");
uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
}
- if(cumap->cm[2].curve) {
+ if (cumap->cm[2].curve) {
bt= uiDefButI(block, ROW, 0, "V", 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, 0.0, 0.0, "");
uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL);
}
@@ -1847,14 +1848,14 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe
bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMOUT, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Zoom out"));
uiButSetFunc(bt, curvemap_buttons_zoom_out, cumap, NULL);
- if(brush)
+ if (brush)
bt= uiDefIconBlockBut(block, curvemap_brush_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, TIP_("Tools"));
else
bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, TIP_("Tools"));
uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
- if(cumap->flag & CUMA_DO_CLIP) icon= ICON_CLIPUV_HLT; else icon= ICON_CLIPUV_DEHLT;
+ if (cumap->flag & CUMA_DO_CLIP) icon= ICON_CLIPUV_HLT; else icon= ICON_CLIPUV_DEHLT;
bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, 0, icon, 0, 0, dx, dx, TIP_("Clipping Options"));
uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
@@ -1871,7 +1872,7 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe
uiDefBut(block, BUT_CURVE, 0, "", 0, 0, size, MIN2(size, 200), cumap, 0.0f, 1.0f, bg, 0, "");
/* black/white levels */
- if(levels) {
+ if (levels) {
split= uiLayoutSplit(layout, 0, 0);
uiItemR(uiLayoutColumn(split, 0), ptr, "black_level", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
uiItemR(uiLayoutColumn(split, 0), ptr, "white_level", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
@@ -1891,20 +1892,20 @@ void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, const char *propn
PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
PointerRNA cptr;
- if(!prop) {
+ if (!prop) {
RNA_warning("curve property not found: %s.%s",
RNA_struct_identifier(ptr->type), propname);
return;
}
- if(RNA_property_type(prop) != PROP_POINTER) {
+ if (RNA_property_type(prop) != PROP_POINTER) {
RNA_warning("curve is not a pointer: %s.%s",
RNA_struct_identifier(ptr->type), propname);
return;
}
cptr= RNA_property_pointer_get(ptr, prop);
- if(!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_CurveMapping))
+ if (!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_CurveMapping))
return;
cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb");
@@ -1938,20 +1939,20 @@ void uiTemplateColorWheel(uiLayout *layout, PointerRNA *ptr, const char *propnam
col = uiLayoutColumn(layout, 0);
row= uiLayoutRow(col, 1);
- but= uiDefButR_prop(block, HSVCIRCLE, 0, "", 0, 0, WHEEL_SIZE, WHEEL_SIZE, ptr, prop, -1, 0.0, 0.0, 0, 0, "");
+ but = uiDefButR_prop(block, HSVCIRCLE, 0, "", 0, 0, WHEEL_SIZE, WHEEL_SIZE, ptr, prop, -1, 0.0, 0.0, 0, 0, "");
- if(lock) {
+ if (lock) {
but->flag |= UI_BUT_COLOR_LOCK;
}
- if(lock_luminosity) {
+ if (lock_luminosity) {
float color[4]; /* in case of alpha */
but->flag |= UI_BUT_VEC_SIZE_LOCK;
RNA_property_float_get_array(ptr, prop, color);
but->a2= len_v3(color);
}
- if(cubic)
+ if (cubic)
but->flag |= UI_BUT_COLOR_CUBIC;
uiItemS(row);
@@ -1969,13 +1970,13 @@ static void handle_layer_buttons(bContext *C, void *arg1, void *arg2)
wmWindow *win= CTX_wm_window(C);
int i, tot, shift= win->eventstate->shift;
- if(!shift) {
+ if (!shift) {
tot= RNA_property_array_length(&but->rnapoin, but->rnaprop);
/* Normally clicking only selects one layer */
RNA_property_boolean_set_index(&but->rnapoin, but->rnaprop, cur, TRUE);
- for(i = 0; i < tot; ++i) {
- if(i != cur)
+ for (i = 0; i < tot; ++i) {
+ if (i != cur)
RNA_property_boolean_set_index(&but->rnapoin, but->rnaprop, i, FALSE);
}
}
@@ -2013,14 +2014,14 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname,
cols= (layers / 2) + (layers % 2);
groups= ((cols / 2) < cols_per_group) ? (1) : (cols / cols_per_group);
- if(used_ptr && used_propname) {
+ if (used_ptr && used_propname) {
used_prop= RNA_struct_find_property(used_ptr, used_propname);
if (!used_prop) {
RNA_warning("used layers property not found: %s.%s", RNA_struct_identifier(ptr->type), used_propname);
return;
}
- if(RNA_property_array_length(used_ptr, used_prop) < layers)
+ if (RNA_property_array_length(used_ptr, used_prop) < layers)
used_prop = NULL;
}
@@ -2042,12 +2043,12 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname,
int icon = 0;
int butlay = 1 << layer;
- if(active_layer & butlay)
+ if (active_layer & butlay)
icon = ICON_LAYER_ACTIVE;
- else if(used_prop && RNA_property_boolean_get_index(used_ptr, used_prop, layer))
+ else if (used_prop && RNA_property_boolean_get_index(used_ptr, used_prop, layer))
icon = ICON_LAYER_USED;
- but= uiDefAutoButR(block, ptr, prop, layer, "", icon, 0, 0, UI_UNIT_X/2, UI_UNIT_Y/2);
+ but = uiDefAutoButR(block, ptr, prop, layer, "", icon, 0, 0, UI_UNIT_X/2, UI_UNIT_Y/2);
uiButSetFunc(but, handle_layer_buttons, but, SET_INT_IN_POINTER(layer));
but->type= TOG;
}
@@ -2063,20 +2064,20 @@ static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon, int
ID *id= NULL;
int icon;
- if(!itemptr->data)
+ if (!itemptr->data)
return rnaicon;
/* try ID, material or texture slot */
- if(RNA_struct_is_ID(itemptr->type)) {
+ if (RNA_struct_is_ID(itemptr->type)) {
id= itemptr->id.data;
}
- else if(RNA_struct_is_a(itemptr->type, &RNA_MaterialSlot)) {
+ else if (RNA_struct_is_a(itemptr->type, &RNA_MaterialSlot)) {
id= RNA_pointer_get(itemptr, "material").data;
}
- else if(RNA_struct_is_a(itemptr->type, &RNA_TextureSlot)) {
+ else if (RNA_struct_is_a(itemptr->type, &RNA_TextureSlot)) {
id= RNA_pointer_get(itemptr, "texture").data;
}
- else if(RNA_struct_is_a(itemptr->type, &RNA_DynamicPaintSurface)) {
+ else if (RNA_struct_is_a(itemptr->type, &RNA_DynamicPaintSurface)) {
DynamicPaintSurface *surface= (DynamicPaintSurface*)itemptr->data;
if (surface->format == MOD_DPAINT_SURFACE_F_PTEX) return ICON_TEXTURE_SHADED;
@@ -2085,10 +2086,10 @@ static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon, int
}
/* get icon from ID */
- if(id) {
+ if (id) {
icon= ui_id_icon_get(C, id, big);
- if(icon)
+ if (icon)
return icon;
}
@@ -2109,37 +2110,37 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
/* list item behind label & other buttons */
sub= uiLayoutRow(overlap, 0);
- but= uiDefButR_prop(block, LISTROW, 0, "", 0,0, UI_UNIT_X*10,UI_UNIT_Y, activeptr, activeprop, 0, 0, i, 0, 0, "");
+ but = uiDefButR_prop(block, LISTROW, 0, "", 0,0, UI_UNIT_X*10,UI_UNIT_Y, activeptr, activeprop, 0, 0, i, 0, 0, "");
uiButSetFlag(but, UI_BUT_NO_TOOLTIP);
sub= uiLayoutRow(overlap, 0);
/* retrieve icon and name */
icon= list_item_icon_get(C, itemptr, rnaicon, 0);
- if(icon == ICON_NONE || icon == ICON_DOT)
+ if (icon == ICON_NONE || icon == ICON_DOT)
icon= 0;
namebuf= RNA_struct_name_get_alloc(itemptr, NULL, 0, NULL);
name= (namebuf)? namebuf: "";
/* hardcoded types */
- if(itemptr->type == &RNA_MeshTexturePolyLayer || itemptr->type == &RNA_MeshLoopColorLayer) {
+ if (itemptr->type == &RNA_MeshTexturePolyLayer || itemptr->type == &RNA_MeshLoopColorLayer) {
uiItemL(sub, name, icon);
uiBlockSetEmboss(block, UI_EMBOSSN);
uiDefIconButR(block, TOG, 0, ICON_SCENE, 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "active_render", 0, 0, 0, 0, 0, NULL);
uiBlockSetEmboss(block, UI_EMBOSS);
}
- else if(RNA_struct_is_a(itemptr->type, &RNA_MaterialTextureSlot)) {
+ else if (RNA_struct_is_a(itemptr->type, &RNA_MaterialTextureSlot)) {
uiItemL(sub, name, icon);
uiBlockSetEmboss(block, UI_EMBOSS);
uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, ptr, "use_textures", i, 0, 0, 0, 0, NULL);
}
- else if(RNA_struct_is_a(itemptr->type, &RNA_SceneRenderLayer) || RNA_struct_is_a(itemptr->type, &RNA_FreestyleLineSet)) {
+ else if (RNA_struct_is_a(itemptr->type, &RNA_SceneRenderLayer) || RNA_struct_is_a(itemptr->type, &RNA_FreestyleLineSet)) {
uiItemL(sub, name, icon);
uiBlockSetEmboss(block, UI_EMBOSS);
uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "use", 0, 0, 0, 0, 0, NULL);
}
- else if(RNA_struct_is_a(itemptr->type, &RNA_MaterialSlot)) {
+ else if (RNA_struct_is_a(itemptr->type, &RNA_MaterialSlot)) {
/* provision to draw active node name */
Material *ma, *manode;
Scene *scene= CTX_data_scene(C);
@@ -2150,19 +2151,19 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
uiItemL(sub, name, icon);
ma= give_current_material(ob, index+1);
- if (ma && !scene_use_new_shading_nodes(scene)){
+ if (ma && !scene_use_new_shading_nodes(scene)) {
manode= give_node_material(ma);
- if(manode) {
+ if (manode) {
char str[MAX_ID_NAME + 12];
BLI_snprintf(str, sizeof(str), "Node %s", manode->id.name+2);
uiItemL(sub, str, ui_id_icon_get(C, &manode->id, 1));
}
- else if(ma->use_nodes) {
+ else if (ma->use_nodes) {
uiItemL(sub, "Node <none>", ICON_NONE);
}
}
}
- else if(itemptr->type == &RNA_ShapeKey) {
+ else if (itemptr->type == &RNA_ShapeKey) {
Object *ob= (Object*)activeptr->data;
Key *key= (Key*)itemptr->id.data;
@@ -2172,18 +2173,18 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
uiBlockSetEmboss(block, UI_EMBOSSN);
row= uiLayoutRow(split, 1);
- if(i == 0 || (key->type != KEY_RELATIVE)) uiItemL(row, "", ICON_NONE);
+ if (i == 0 || (key->type != KEY_RELATIVE)) uiItemL(row, "", ICON_NONE);
else uiItemR(row, itemptr, "value", 0, "", ICON_NONE);
uiItemR(row, itemptr, "mute", 0, "", 0);
- if( (key->flag & KEYBLOCK_MUTE) ||
+ if ( (key->flag & KEYBLOCK_MUTE) ||
(ob->mode == OB_MODE_EDIT && !((ob->shapeflag & OB_SHAPE_EDIT_MODE) && ob->type == OB_MESH)) )
{
uiLayoutSetActive(row, 0);
}
uiBlockSetEmboss(block, UI_EMBOSS);
}
- else if(itemptr->type == &RNA_VertexGroup) {
+ else if (itemptr->type == &RNA_VertexGroup) {
bDeformGroup *dg= (bDeformGroup *)itemptr->data;
uiItemL(sub, name, icon);
/* RNA does not allow nice lock icons, use lower level buttons */
@@ -2195,7 +2196,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
uiBlockSetEmboss(block, UI_EMBOSS);
#endif
}
- else if(itemptr->type == &RNA_KeyingSetPath) {
+ else if (itemptr->type == &RNA_KeyingSetPath) {
KS_Path *ksp = (KS_Path*)itemptr->data;
/* icon needs to be the type of ID which is currently active */
@@ -2204,7 +2205,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
/* nothing else special to do... */
uiItemL(sub, name, icon); /* fails, backdrop LISTROW... */
}
- else if(itemptr->type == &RNA_DynamicPaintSurface) {
+ else if (itemptr->type == &RNA_DynamicPaintSurface) {
char name_final[96];
const char *enum_name;
PropertyRNA *prop = RNA_struct_find_property(itemptr, "surface_type");
@@ -2222,11 +2223,11 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
}
uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "is_active", i, 0, 0, 0, 0, NULL);
}
- else if(itemptr->type == &RNA_MovieTrackingObject) {
+ else if (itemptr->type == &RNA_MovieTrackingObject) {
MovieTrackingObject *tracking_object= (MovieTrackingObject*)itemptr->data;
split= uiLayoutSplit(sub, 0.75f, 0);
- if(tracking_object->flag&TRACKING_OBJECT_CAMERA) {
+ if (tracking_object->flag&TRACKING_OBJECT_CAMERA) {
uiItemL(split, name, ICON_CAMERA_DATA);
}
else {
@@ -2265,7 +2266,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
/* If the special property is set for the item, and it is a collection... */
PropertyRNA *prop_list= RNA_struct_find_property(itemptr, prop_list_id);
- if(prop_list && RNA_property_type(prop_list) == PROP_STRING) {
+ if (prop_list && RNA_property_type(prop_list) == PROP_STRING) {
int prop_names_len;
char *prop_names = RNA_property_string_get_alloc(itemptr, prop_list, NULL, 0, &prop_names_len);
char *prop_names_end= prop_names + prop_names_len;
@@ -2309,44 +2310,44 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
block= uiLayoutGetBlock(layout);
pa= block->panel;
- if(!pa) {
+ if (!pa) {
RNA_warning("Only works inside a panel");
return;
}
- if(!activeptr->data)
+ if (!activeptr->data)
return;
- if(ptr->data) {
+ if (ptr->data) {
prop= RNA_struct_find_property(ptr, propname);
- if(!prop) {
+ if (!prop) {
RNA_warning("Property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
}
activeprop= RNA_struct_find_property(activeptr, activepropname);
- if(!activeprop) {
+ if (!activeprop) {
RNA_warning("Property not found: %s.%s", RNA_struct_identifier(ptr->type), activepropname);
return;
}
- if(prop) {
+ if (prop) {
type= RNA_property_type(prop);
- if(type != PROP_COLLECTION) {
+ if (type != PROP_COLLECTION) {
RNA_warning("uiExpected collection property");
return;
}
}
activetype= RNA_property_type(activeprop);
- if(activetype != PROP_INT) {
+ if (activetype != PROP_INT) {
RNA_warning("Expected integer property");
return;
}
/* get icon */
- if(ptr->data && prop) {
+ if (ptr->data && prop) {
ptype= RNA_property_pointer_type(ptr, prop);
rnaicon= RNA_struct_ui_icon(ptype);
}
@@ -2354,20 +2355,20 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
/* get active data */
activei= RNA_property_int_get(activeptr, activeprop);
- if(listtype == 'i') {
+ if (listtype == 'i') {
box= uiLayoutListBox(layout, ptr, prop, activeptr, activeprop);
col= uiLayoutColumn(box, 1);
row= uiLayoutRow(col, 0);
- if(ptr->data && prop) {
+ if (ptr->data && prop) {
/* create list items */
RNA_PROP_BEGIN(ptr, itemptr, prop) {
/* create button */
- if(!(i % 9))
+ if (!(i % 9))
row= uiLayoutRow(col, 0);
icon= list_item_icon_get(C, &itemptr, rnaicon, 1);
- but= uiDefIconButR_prop(block, LISTROW, 0, icon, 0,0,UI_UNIT_X*10,UI_UNIT_Y, activeptr, activeprop, 0, 0, i, 0, 0, "");
+ but = uiDefIconButR_prop(block, LISTROW, 0, icon, 0,0,UI_UNIT_X*10,UI_UNIT_Y, activeptr, activeprop, 0, 0, i, 0, 0, "");
uiButSetFlag(but, UI_BUT_NO_TOOLTIP);
@@ -2376,17 +2377,17 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
RNA_PROP_END;
}
}
- else if(listtype == 'c') {
+ else if (listtype == 'c') {
/* compact layout */
row= uiLayoutRow(layout, 1);
- if(ptr->data && prop) {
+ if (ptr->data && prop) {
/* create list items */
RNA_PROP_BEGIN(ptr, itemptr, prop) {
found= (activei == i);
- if(found) {
+ if (found) {
/* create button */
name= RNA_struct_name_get_alloc(&itemptr, NULL, 0, NULL);
icon= list_item_icon_get(C, &itemptr, rnaicon, 0);
@@ -2403,22 +2404,22 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
}
/* if not found, add in dummy button */
- if(i == 0)
+ if (i == 0)
uiItemL(row, "", ICON_NONE);
/* next/prev button */
BLI_snprintf(numstr, sizeof(numstr), "%d :", i);
- but= uiDefIconTextButR_prop(block, NUM, 0, 0, numstr, 0,0,UI_UNIT_X*5,UI_UNIT_Y, activeptr, activeprop, 0, 0, 0, 0, 0, "");
- if(i == 0)
+ but = uiDefIconTextButR_prop(block, NUM, 0, 0, numstr, 0,0,UI_UNIT_X*5,UI_UNIT_Y, activeptr, activeprop, 0, 0, 0, 0, 0, "");
+ if (i == 0)
uiButSetFlag(but, UI_BUT_DISABLED);
}
else {
/* default rows */
- if(rows == 0)
+ if (rows == 0)
rows= 5;
if (maxrows == 0)
maxrows = 5;
- if(pa->list_grip_size != 0)
+ if (pa->list_grip_size != 0)
rows= pa->list_grip_size;
/* layout */
@@ -2429,13 +2430,13 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
/* init numbers */
RNA_property_int_range(activeptr, activeprop, &min, &max);
- if(prop)
+ if (prop)
len= RNA_property_collection_length(ptr, prop);
items= CLAMPIS(len, rows, MAX2(rows, maxrows));
/* if list length changes and active is out of view, scroll to it */
- if(pa->list_last_len != len)
- if((activei < pa->list_scroll || activei >= pa->list_scroll+items))
+ if (pa->list_last_len != len)
+ if ((activei < pa->list_scroll || activei >= pa->list_scroll+items))
pa->list_scroll= activei;
pa->list_scroll= MIN2(pa->list_scroll, len-items);
@@ -2443,10 +2444,10 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
pa->list_size= items;
pa->list_last_len= len;
- if(ptr->data && prop) {
+ if (ptr->data && prop) {
/* create list items */
RNA_PROP_BEGIN(ptr, itemptr, prop) {
- if(i >= pa->list_scroll && i<pa->list_scroll+items)
+ if (i >= pa->list_scroll && i<pa->list_scroll+items)
list_item_row(C, col, ptr, &itemptr, i, rnaicon, activeptr, activeprop, prop_list);
i++;
@@ -2455,14 +2456,14 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
}
/* add dummy buttons to fill space */
- while(i < pa->list_scroll+items) {
- if(i >= pa->list_scroll)
+ while (i < pa->list_scroll+items) {
+ if (i >= pa->list_scroll)
uiItemL(col, "", ICON_NONE);
i++;
}
/* add scrollbar */
- if(len > items) {
+ if (len > items) {
col= uiLayoutColumn(row, 0);
uiDefButI(block, SCROLL, 0, "", 0,0,UI_UNIT_X*0.75,UI_UNIT_Y*items, &pa->list_scroll, 0, len-items, items, 0, "");
}
@@ -2475,7 +2476,7 @@ static void operator_call_cb(bContext *C, void *UNUSED(arg1), void *arg2)
{
wmOperatorType *ot= arg2;
- if(ot)
+ if (ot)
WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL);
}
@@ -2483,11 +2484,11 @@ static void operator_search_cb(const bContext *C, void *UNUSED(arg), const char
{
GHashIterator *iter= WM_operatortype_iter();
- for( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) {
+ for ( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) {
wmOperatorType *ot= BLI_ghashIterator_getValue(iter);
- if(BLI_strcasestr(ot->name, str)) {
- if(WM_operator_poll((bContext*)C, ot)) {
+ if (BLI_strcasestr(ot->name, str)) {
+ if (WM_operator_poll((bContext*)C, ot)) {
char name[256];
int len= strlen(ot->name);
@@ -2495,7 +2496,7 @@ static void operator_search_cb(const bContext *C, void *UNUSED(arg), const char
BLI_strncpy(name, ot->name, sizeof(name));
/* check for hotkey */
- if(len < sizeof(name)-6) {
+ if (len < sizeof(name)-6) {
if (WM_key_event_operator_string(C, ot->idname, WM_OP_EXEC_DEFAULT, NULL, TRUE,
&name[len+1], sizeof(name)-len-1))
{
@@ -2503,7 +2504,7 @@ static void operator_search_cb(const bContext *C, void *UNUSED(arg), const char
}
}
- if(0==uiSearchItemAdd(items, name, ot, 0))
+ if (0==uiSearchItemAdd(items, name, ot, 0))
break;
}
}
@@ -2520,7 +2521,7 @@ void uiTemplateOperatorSearch(uiLayout *layout)
block= uiLayoutGetBlock(layout);
uiBlockSetCurLayout(block, layout);
- but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 0, 0, UI_UNIT_X*6, UI_UNIT_Y, 0, 0, "");
+ but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 0, 0, UI_UNIT_X*6, UI_UNIT_Y, 0, 0, "");
uiButSetSearchFunc(but, operator_search_cb, NULL, operator_call_cb, NULL);
}
@@ -2571,29 +2572,32 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
uiBlockSetHandleFunc(block, do_running_jobs, NULL);
- if(sa->spacetype==SPACE_NODE) {
- if(WM_jobs_test(wm, sa))
+ if (sa->spacetype==SPACE_NODE) {
+ if (WM_jobs_test(wm, sa))
owner = sa;
handle_event= B_STOPCOMPO;
- } else if (sa->spacetype==SPACE_SEQ) {
- if(WM_jobs_test(wm, sa))
+ }
+ else if (sa->spacetype==SPACE_SEQ) {
+ if (WM_jobs_test(wm, sa))
owner = sa;
handle_event = B_STOPSEQ;
- } else if(sa->spacetype==SPACE_CLIP) {
- if(WM_jobs_test(wm, sa))
+ }
+ else if (sa->spacetype==SPACE_CLIP) {
+ if (WM_jobs_test(wm, sa))
owner = sa;
handle_event= B_STOPCLIP;
- } else {
+ }
+ else {
Scene *scene;
/* another scene can be rendering too, for example via compositor */
- for(scene= CTX_data_main(C)->scene.first; scene; scene= scene->id.next)
- if(WM_jobs_test(wm, scene))
+ for (scene= CTX_data_main(C)->scene.first; scene; scene= scene->id.next)
+ if (WM_jobs_test(wm, scene))
break;
owner = scene;
handle_event= B_STOPRENDER;
}
- if(owner) {
+ if (owner) {
uiLayout *ui_abs;
ui_abs= uiLayoutAbsolute(layout, 0);
@@ -2606,10 +2610,10 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
uiLayoutRow(layout, 0);
}
- if(WM_jobs_test(wm, screen))
+ if (WM_jobs_test(wm, screen))
uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_CANCEL, IFACE_("Capture"), 0,0,85,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0,
TIP_("Stop screencast"));
- if(screen->animtimer)
+ if (screen->animtimer)
uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_CANCEL, TIP_("Anim Player"), 0,0,100,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0,
TIP_("Stop animation playback"));
}
@@ -2645,12 +2649,12 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
/* make a box around the report to make it stand out */
uiBlockBeginAlign(block);
- but= uiDefBut(block, ROUNDBOX, 0, "", 0, 0, UI_UNIT_X+10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
+ but = uiDefBut(block, ROUNDBOX, 0, "", 0, 0, UI_UNIT_X+10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
/* set the report's bg color in but->col - ROUNDBOX feature */
rgb_float_to_uchar(but->col, rti->col);
but->col[3]= 255;
- but= uiDefBut(block, ROUNDBOX, 0, "", UI_UNIT_X+10, 0, UI_UNIT_X+width, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
+ but = uiDefBut(block, ROUNDBOX, 0, "", UI_UNIT_X+10, 0, UI_UNIT_X+width, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
but->col[0]= but->col[1]= but->col[2]= FTOCHAR(rti->greyscale);
but->col[3]= 255;
@@ -2658,11 +2662,11 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
/* icon and report message on top */
- if(report->type & RPT_ERROR_ALL)
+ if (report->type & RPT_ERROR_ALL)
icon = ICON_ERROR;
- else if(report->type & RPT_WARNING_ALL)
+ else if (report->type & RPT_WARNING_ALL)
icon = ICON_ERROR;
- else if(report->type & RPT_INFO_ALL)
+ else if (report->type & RPT_INFO_ALL)
icon = ICON_INFO;
/* XXX: temporary operator to dump all reports to a text block, but only if more than 1 report
@@ -2684,7 +2688,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
static void keymap_item_modified(bContext *UNUSED(C), void *kmi_p, void *UNUSED(unused))
{
- wmKeyMapItem *kmi= (wmKeyMapItem*)kmi_p;
+ wmKeyMapItem *kmi = (wmKeyMapItem*)kmi_p;
WM_keyconfig_update_tag(NULL, kmi);
}
@@ -2694,7 +2698,7 @@ static void template_keymap_item_properties(uiLayout *layout, const char *title,
uiItemS(layout);
- if(title)
+ if (title)
uiItemL(layout, title, ICON_NONE);
flow= uiLayoutColumnFlow(layout, 2, 0);
@@ -2702,15 +2706,15 @@ static void template_keymap_item_properties(uiLayout *layout, const char *title,
RNA_STRUCT_BEGIN(ptr, prop) {
int flag= RNA_property_flag(prop);
- if(flag & PROP_HIDDEN)
+ if (flag & PROP_HIDDEN)
continue;
/* recurse for nested properties */
- if(RNA_property_type(prop) == PROP_POINTER) {
+ if (RNA_property_type(prop) == PROP_POINTER) {
PointerRNA propptr= RNA_property_pointer_get(ptr, prop);
const char *name= RNA_property_ui_name(prop);
- if(propptr.data && RNA_struct_is_a(propptr.type, &RNA_OperatorProperties)) {
+ if (propptr.data && RNA_struct_is_a(propptr.type, &RNA_OperatorProperties)) {
template_keymap_item_properties(layout, name, &propptr);
continue;
}
@@ -2726,14 +2730,14 @@ void uiTemplateKeymapItemProperties(uiLayout *layout, PointerRNA *ptr)
{
PointerRNA propptr= RNA_pointer_get(ptr, "properties");
- if(propptr.data) {
+ if (propptr.data) {
uiBut *but= uiLayoutGetBlock(layout)->buttons.last;
template_keymap_item_properties(layout, NULL, &propptr);
/* attach callbacks to compensate for missing properties update,
* we don't know which keymap (item) is being modified there */
- for(; but; but=but->next)
+ for (; but; but=but->next)
uiButSetFunc(but, keymap_item_modified, ptr->data, NULL);
}
}
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index 610e9f8762d..91b37896e66 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -60,15 +60,15 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
{
int arraylen= RNA_property_array_length(ptr, prop);
- if(arraylen && index == -1)
+ if (arraylen && index == -1)
return NULL;
- if(icon && name && name[0] == '\0')
- but= uiDefIconButR_prop(block, ICONTOG, 0, icon, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
- else if(icon)
- but= uiDefIconTextButR_prop(block, ICONTOG, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+ if (icon && name && name[0] == '\0')
+ but = uiDefIconButR_prop(block, ICONTOG, 0, icon, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+ else if (icon)
+ but = uiDefIconTextButR_prop(block, ICONTOG, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
else
- but= uiDefButR_prop(block, OPTION, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+ but = uiDefButR_prop(block, OPTION, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
break;
}
case PROP_INT:
@@ -76,49 +76,49 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
{
int arraylen= RNA_property_array_length(ptr, prop);
- if(arraylen && index == -1) {
- if(ELEM(RNA_property_subtype(prop), PROP_COLOR, PROP_COLOR_GAMMA))
- but= uiDefButR_prop(block, COL, 0, name, x1, y1, x2, y2, ptr, prop, 0, 0, 0, -1, -1, NULL);
+ if (arraylen && index == -1) {
+ if (ELEM(RNA_property_subtype(prop), PROP_COLOR, PROP_COLOR_GAMMA))
+ but = uiDefButR_prop(block, COL, 0, name, x1, y1, x2, y2, ptr, prop, 0, 0, 0, -1, -1, NULL);
}
- else if(RNA_property_subtype(prop) == PROP_PERCENTAGE || RNA_property_subtype(prop) == PROP_FACTOR)
- but= uiDefButR_prop(block, NUMSLI, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+ else if (RNA_property_subtype(prop) == PROP_PERCENTAGE || RNA_property_subtype(prop) == PROP_FACTOR)
+ but = uiDefButR_prop(block, NUMSLI, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
else
- but= uiDefButR_prop(block, NUM, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+ but = uiDefButR_prop(block, NUM, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
break;
}
case PROP_ENUM:
- if(icon && name && name[0] == '\0')
- but= uiDefIconButR_prop(block, MENU, 0, icon, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
- else if(icon)
- but= uiDefIconTextButR_prop(block, MENU, 0, icon, NULL, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+ if (icon && name && name[0] == '\0')
+ but = uiDefIconButR_prop(block, MENU, 0, icon, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+ else if (icon)
+ but = uiDefIconTextButR_prop(block, MENU, 0, icon, NULL, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
else
- but= uiDefButR_prop(block, MENU, 0, NULL, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+ but = uiDefButR_prop(block, MENU, 0, NULL, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
break;
case PROP_STRING:
- if(icon && name && name[0] == '\0')
- but= uiDefIconButR_prop(block, TEX, 0, icon, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
- else if(icon)
- but= uiDefIconTextButR_prop(block, TEX, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+ if (icon && name && name[0] == '\0')
+ but = uiDefIconButR_prop(block, TEX, 0, icon, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+ else if (icon)
+ but = uiDefIconTextButR_prop(block, TEX, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
else
- but= uiDefButR_prop(block, TEX, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+ but = uiDefButR_prop(block, TEX, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
break;
case PROP_POINTER: {
PointerRNA pptr;
pptr= RNA_property_pointer_get(ptr, prop);
- if(!pptr.type)
+ if (!pptr.type)
pptr.type= RNA_property_pointer_type(ptr, prop);
icon= RNA_struct_ui_icon(pptr.type);
- if(icon == ICON_DOT)
+ if (icon == ICON_DOT)
icon= 0;
- but= uiDefIconTextButR_prop(block, IDPOIN, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
+ but = uiDefIconTextButR_prop(block, IDPOIN, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
break;
}
case PROP_COLLECTION: {
char text[256];
BLI_snprintf(text, sizeof(text), IFACE_("%d items"), RNA_property_collection_length(ptr, prop));
- but= uiDefBut(block, LABEL, 0, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, NULL);
+ but = uiDefBut(block, LABEL, 0, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, NULL);
uiButSetFlag(but, UI_BUT_DISABLED);
break;
}
@@ -141,22 +141,22 @@ int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int (*check_prop)(Pointe
RNA_STRUCT_BEGIN(ptr, prop) {
flag= RNA_property_flag(prop);
- if(flag & PROP_HIDDEN || (check_prop && check_prop(ptr, prop)==FALSE))
+ if (flag & PROP_HIDDEN || (check_prop && check_prop(ptr, prop)==FALSE))
continue;
- if(label_align != '\0') {
+ if (label_align != '\0') {
PropertyType type = RNA_property_type(prop);
int is_boolean = (type == PROP_BOOLEAN && !RNA_property_array_check(prop));
name= RNA_property_ui_name(prop);
- if(label_align=='V') {
+ if (label_align=='V') {
col= uiLayoutColumn(layout, 1);
- if(!is_boolean)
+ if (!is_boolean)
uiItemL(col, name, ICON_NONE);
}
- else if(label_align=='H') {
+ else if (label_align=='H') {
split = uiLayoutSplit(layout, 0.5f, 0);
col= uiLayoutColumn(split, 0);
@@ -194,16 +194,16 @@ int uiIconFromID(ID *id)
PointerRNA ptr;
short idcode;
- if(id==NULL)
+ if (id==NULL)
return ICON_NONE;
idcode= GS(id->name);
/* exception for objects */
- if(idcode == ID_OB) {
+ if (idcode == ID_OB) {
ob= (Object*)id;
- if(ob->type == OB_EMPTY)
+ if (ob->type == OB_EMPTY)
return ICON_EMPTY_DATA;
else
return uiIconFromID(ob->data);
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 0e51932df90..3baa672e42d 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -41,6 +41,7 @@
#include "BLI_listbase.h"
#include "BLI_rect.h"
#include "BLI_string.h"
+#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
@@ -245,7 +246,7 @@ static int round_box_shadow_edges(float (*vert)[2], rcti *rect, float rad, int r
rad+= step;
- if(2.0f*rad > rect->ymax-rect->ymin)
+ if (2.0f*rad > rect->ymax-rect->ymin)
rad= 0.5f*(rect->ymax-rect->ymin);
minx= rect->xmin-step;
@@ -254,59 +255,59 @@ static int round_box_shadow_edges(float (*vert)[2], rcti *rect, float rad, int r
maxy= rect->ymax+step;
/* mult */
- for(a=0; a < WIDGET_CURVE_RESOLU; a++) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++) {
vec[a][0]= rad*cornervec[a][0];
vec[a][1]= rad*cornervec[a][1];
}
/* start with left-top, anti clockwise */
- if(roundboxalign & UI_CNR_TOP_LEFT) {
- for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
+ if (roundboxalign & UI_CNR_TOP_LEFT) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= minx+rad-vec[a][0];
vert[tot][1]= maxy-vec[a][1];
}
}
else {
- for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= minx;
vert[tot][1]= maxy;
}
}
- if(roundboxalign & UI_CNR_BOTTOM_LEFT) {
- for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
+ if (roundboxalign & UI_CNR_BOTTOM_LEFT) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= minx+vec[a][1];
vert[tot][1]= miny+rad-vec[a][0];
}
}
else {
- for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= minx;
vert[tot][1]= miny;
}
}
- if(roundboxalign & UI_CNR_BOTTOM_RIGHT) {
- for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
+ if (roundboxalign & UI_CNR_BOTTOM_RIGHT) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= maxx-rad+vec[a][0];
vert[tot][1]= miny+vec[a][1];
}
}
else {
- for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= maxx;
vert[tot][1]= miny;
}
}
- if(roundboxalign & UI_CNR_TOP_RIGHT) {
- for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
+ if (roundboxalign & UI_CNR_TOP_RIGHT) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= maxx-vec[a][1];
vert[tot][1]= maxy-rad+vec[a][0];
}
}
else {
- for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= maxx;
vert[tot][1]= maxy;
}
@@ -333,14 +334,14 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
minsize= MIN2((rect->xmax-rect->xmin)*hnum, (rect->ymax-rect->ymin)*vnum);
- if(2.0f*rad > minsize)
+ if (2.0f*rad > minsize)
rad= 0.5f*minsize;
- if(2.0f*(radi+1.0f) > minsize)
+ if (2.0f*(radi+1.0f) > minsize)
radi= 0.5f*minsize - 1.0f;
/* mult */
- for(a=0; a < WIDGET_CURVE_RESOLU; a++) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++) {
veci[a][0]= radi*cornervec[a][0];
veci[a][1]= radi*cornervec[a][1];
vec[a][0]= rad*cornervec[a][0];
@@ -348,9 +349,9 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
}
/* corner left-bottom */
- if(roundboxalign & UI_CNR_BOTTOM_LEFT) {
+ if (roundboxalign & UI_CNR_BOTTOM_LEFT) {
- for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
wt->inner_v[tot][0]= minxi+veci[a][1];
wt->inner_v[tot][1]= minyi+radi-veci[a][0];
@@ -375,9 +376,9 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
}
/* corner right-bottom */
- if(roundboxalign & UI_CNR_BOTTOM_RIGHT) {
+ if (roundboxalign & UI_CNR_BOTTOM_RIGHT) {
- for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
wt->inner_v[tot][0]= maxxi-radi+veci[a][0];
wt->inner_v[tot][1]= minyi+veci[a][1];
@@ -404,9 +405,9 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
wt->halfwayvert= tot;
/* corner right-top */
- if(roundboxalign & UI_CNR_TOP_RIGHT) {
+ if (roundboxalign & UI_CNR_TOP_RIGHT) {
- for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
wt->inner_v[tot][0]= maxxi-veci[a][1];
wt->inner_v[tot][1]= maxyi-radi+veci[a][0];
@@ -431,9 +432,9 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
}
/* corner left-top */
- if(roundboxalign & UI_CNR_TOP_LEFT) {
+ if (roundboxalign & UI_CNR_TOP_LEFT) {
- for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
+ for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
wt->inner_v[tot][0]= minxi+radi-veci[a][0];
wt->inner_v[tot][1]= maxyi-veci[a][1];
@@ -483,21 +484,21 @@ static void widget_num_tria(uiWidgetTrias *tria, rcti *rect, float triasize, cha
centy= (float)rect->ymin + 0.5f*minsize;
sizex= sizey= -0.5f*triasize*minsize;
- if(where=='r') {
+ if (where=='r') {
centx= (float)rect->xmax - 0.5f*minsize;
sizex= -sizex;
}
- else if(where=='t') {
+ else if (where=='t') {
centy= (float)rect->ymax - 0.5f*minsize;
sizey= -sizey;
i2=0; i1= 1;
}
- else if(where=='b') {
+ else if (where=='b') {
sizex= -sizex;
i2=0; i1= 1;
}
- for(a=0; a<3; a++) {
+ for (a=0; a<3; a++) {
tria->vec[a][0]= sizex*num_tria_vert[a][i1] + centx;
tria->vec[a][1]= sizey*num_tria_vert[a][i2] + centy;
}
@@ -518,21 +519,21 @@ static void widget_scroll_circle(uiWidgetTrias *tria, rcti *rect, float triasize
centy= (float)rect->ymin + 0.5f*minsize;
sizex= sizey= -0.5f*triasize*minsize;
- if(where=='r') {
+ if (where=='r') {
centx= (float)rect->xmax - 0.5f*minsize;
sizex= -sizex;
}
- else if(where=='t') {
+ else if (where=='t') {
centy= (float)rect->ymax - 0.5f*minsize;
sizey= -sizey;
i2=0; i1= 1;
}
- else if(where=='b') {
+ else if (where=='b') {
sizex= -sizex;
i2=0; i1= 1;
}
- for(a=0; a<16; a++) {
+ for (a=0; a<16; a++) {
tria->vec[a][0]= sizex*scroll_circle_vert[a][i1] + centx;
tria->vec[a][1]= sizey*scroll_circle_vert[a][i2] + centy;
}
@@ -561,10 +562,10 @@ static void widget_menu_trias(uiWidgetTrias *tria, rcti *rect)
/* XXX exception */
asp= ((float)rect->xmax-rect->xmin)/((float)rect->ymax-rect->ymin);
- if(asp > 1.2f && asp < 2.6f)
+ if (asp > 1.2f && asp < 2.6f)
centx= rect->xmax - 0.3f*(rect->ymax-rect->ymin);
- for(a=0; a<6; a++) {
+ for (a=0; a<6; a++) {
tria->vec[a][0]= size*menu_tria_vert[a][0] + centx;
tria->vec[a][1]= size*menu_tria_vert[a][1] + centy;
}
@@ -583,7 +584,7 @@ static void widget_check_trias(uiWidgetTrias *tria, rcti *rect)
centy= rect->ymin + 0.5f*(rect->ymax-rect->ymin);
size= 0.5f*(rect->ymax-rect->ymin);
- for(a=0; a<6; a++) {
+ for (a=0; a<6; a++) {
tria->vec[a][0]= size*check_tria_vert[a][0] + centx;
tria->vec[a][1]= size*check_tria_vert[a][1] + centy;
}
@@ -622,7 +623,7 @@ static void round_box_shade_col4_r(unsigned char col_r[4], const char col1[4], c
static void widget_verts_to_quad_strip(uiWidgetBase *wtb, const int totvert, float quad_strip[WIDGET_SIZE_MAX*2+2][2])
{
int a;
- for(a=0; a<totvert; a++) {
+ for (a=0; a<totvert; a++) {
copy_v2_v2(quad_strip[a*2], wtb->outer_v[a]);
copy_v2_v2(quad_strip[a*2+1], wtb->inner_v[a]);
}
@@ -633,7 +634,7 @@ static void widget_verts_to_quad_strip(uiWidgetBase *wtb, const int totvert, flo
static void widget_verts_to_quad_strip_open(uiWidgetBase *wtb, const int totvert, float quad_strip[WIDGET_SIZE_MAX*2][2])
{
int a;
- for(a=0; a<totvert; a++) {
+ for (a=0; a<totvert; a++) {
quad_strip[a*2][0]= wtb->outer_v[a][0];
quad_strip[a*2][1]= wtb->outer_v[a][1];
quad_strip[a*2+1][0]= wtb->outer_v[a][0];
@@ -659,8 +660,8 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
glEnable(GL_BLEND);
/* backdrop non AA */
- if(wtb->inner) {
- if(wcol->shaded==0) {
+ if (wtb->inner) {
+ if (wcol->shaded==0) {
if (wcol->alpha_check) {
float inner_v_half[WIDGET_SIZE_MAX][2];
float x_mid= 0.0f; /* used for dumb clamping of values */
@@ -690,7 +691,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
glColor4ubv((unsigned char*)wcol->inner);
glEnableClientState(GL_VERTEX_ARRAY);
- for(a=0; a<wtb->totvert; a++) {
+ for (a=0; a<wtb->totvert; a++) {
x_mid += wtb->inner_v[a][0];
}
x_mid /= wtb->totvert;
@@ -702,7 +703,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
/* 1/2 solid color */
glColor4ub(wcol->inner[0], wcol->inner[1], wcol->inner[2], 255);
- for(a=0; a<wtb->totvert; a++) {
+ for (a=0; a<wtb->totvert; a++) {
inner_v_half[a][0]= MIN2(wtb->inner_v[a][0], x_mid);
inner_v_half[a][1]= wtb->inner_v[a][1];
}
@@ -730,7 +731,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
shadecolors4(col1, col2, wcol->inner, wcol->shadetop, wcol->shadedown);
glShadeModel(GL_SMOOTH);
- for(a=0; a<wtb->totvert; a++, col_pt += 4) {
+ for (a=0; a<wtb->totvert; a++, col_pt += 4) {
round_box_shade_col4_r(col_pt, col1, col2, wtb->inner_uv[a][wtb->shadedir]);
}
@@ -747,7 +748,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
}
/* for each AA step */
- if(wtb->outline) {
+ if (wtb->outline) {
float quad_strip[WIDGET_SIZE_MAX*2+2][2]; /* + 2 because the last pair is wrapped */
float quad_strip_emboss[WIDGET_SIZE_MAX*2][2]; /* only for emboss */
@@ -758,7 +759,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
widget_verts_to_quad_strip(wtb, wtb->totvert, quad_strip);
- if(wtb->emboss) {
+ if (wtb->emboss) {
widget_verts_to_quad_strip_open(wtb, wtb->halfwayvert, quad_strip_emboss);
}
@@ -774,7 +775,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
glDrawArrays(GL_QUAD_STRIP, 0, wtb->totvert*2 + 2);
/* emboss bottom shadow */
- if(wtb->emboss) {
+ if (wtb->emboss) {
glColor4f(1.0f, 1.0f, 1.0f, 0.02f);
glVertexPointer(2, GL_FLOAT, 0, quad_strip_emboss);
@@ -788,7 +789,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
}
/* decoration */
- if(wtb->tria1.tot || wtb->tria2.tot) {
+ if (wtb->tria1.tot || wtb->tria2.tot) {
const unsigned char tcol[4] = {wcol->item[0],
wcol->item[1],
wcol->item[2],
@@ -797,11 +798,11 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
for (j = 0; j < WIDGET_AA_JITTER; j++) {
glTranslatef(1.0f * jit[j][0], 1.0f * jit[j][1], 0.0f);
- if(wtb->tria1.tot) {
+ if (wtb->tria1.tot) {
glColor4ubv(tcol);
widget_trias_draw(&wtb->tria1);
}
- if(wtb->tria2.tot) {
+ if (wtb->tria2.tot) {
glColor4ubv(tcol);
widget_trias_draw(&wtb->tria2);
}
@@ -822,7 +823,7 @@ static void widget_draw_preview(BIFIconID icon, float UNUSED(alpha), rcti *rect)
{
int w, h, size;
- if(icon==ICON_NONE)
+ if (icon==ICON_NONE)
return;
w = rect->xmax - rect->xmin;
@@ -830,7 +831,7 @@ static void widget_draw_preview(BIFIconID icon, float UNUSED(alpha), rcti *rect)
size = MIN2(w, h);
size -= PREVIEW_PAD*2; /* padding */
- if(size > 0) {
+ if (size > 0) {
int x = rect->xmin + w/2 - size/2;
int y = rect->ymin + h/2 - size/2;
@@ -857,11 +858,11 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect
}
/* this icon doesn't need draw... */
- if(icon==ICON_BLANK1 && (but->flag & UI_ICON_SUBMENU)==0) return;
+ if (icon==ICON_BLANK1 && (but->flag & UI_ICON_SUBMENU)==0) return;
/* we need aspect from block, for menus... these buttons are scaled in uiPositionBlock() */
aspect= but->block->aspect;
- if(aspect != but->aspect) {
+ if (aspect != but->aspect) {
/* prevent scaling up icon in pupmenu */
if (aspect < 1.0f) {
height= UI_DPI_ICON_SIZE;
@@ -876,27 +877,28 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect
/* calculate blend color */
if ELEM4(but->type, TOG, ROW, TOGN, LISTROW) {
- if(but->flag & UI_SELECT);
- else if(but->flag & UI_ACTIVE);
+ if (but->flag & UI_SELECT);
+ else if (but->flag & UI_ACTIVE);
else alpha= 0.5f;
}
/* extra feature allows more alpha blending */
- if(but->type==LABEL && but->a1==1.0f) alpha *= but->a2;
+ if (but->type==LABEL && but->a1==1.0f) alpha *= but->a2;
glEnable(GL_BLEND);
- if(icon && icon!=ICON_BLANK1) {
- if(but->flag & UI_ICON_LEFT) {
+ if (icon && icon!=ICON_BLANK1) {
+ if (but->flag & UI_ICON_LEFT) {
if (but->type==BUT_TOGDUAL) {
if (but->drawstr[0]) {
xs= rect->xmin-1;
- } else {
+ }
+ else {
xs= (rect->xmin+rect->xmax- height)/2;
}
}
else if (but->block->flag & UI_BLOCK_LOOP) {
- if(but->type==SEARCH_MENU)
+ if (but->type==SEARCH_MENU)
xs= rect->xmin+4;
else
xs= rect->xmin+1;
@@ -915,7 +917,7 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect
}
/* to indicate draggable */
- if(but->dragpoin && (but->flag & UI_ACTIVE)) {
+ if (but->dragpoin && (but->flag & UI_ACTIVE)) {
float rgb[3]= {1.25f, 1.25f, 1.25f};
UI_icon_draw_aspect_color(xs, ys, icon, aspect, rgb);
}
@@ -933,6 +935,22 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect
glDisable(GL_BLEND);
}
+static void ui_text_clip_give_prev_off(uiBut *but)
+{
+ char *prev_utf8 = BLI_str_find_prev_char_utf8(but->drawstr, but->drawstr + but->ofs);
+ int bytes = but->drawstr + but->ofs - prev_utf8;
+
+ but->ofs -= bytes;
+}
+
+static void ui_text_clip_give_next_off(uiBut *but)
+{
+ char *next_utf8 = BLI_str_find_next_char_utf8(but->drawstr + but->ofs, NULL);
+ int bytes = next_utf8 - (but->drawstr + but->ofs);
+
+ but->ofs += bytes;
+}
+
/* sets but->ofs to make sure text is correctly visible */
static void ui_text_leftclip(uiFontStyle *fstyle, uiBut *but, rcti *rect)
{
@@ -948,46 +966,49 @@ static void ui_text_leftclip(uiFontStyle *fstyle, uiBut *but, rcti *rect)
BLF_enable(fstyle->uifont_id, BLF_KERNING_DEFAULT);
/* if text editing we define ofs dynamically */
- if(but->editstr && but->pos >= 0) {
- if(but->ofs > but->pos)
+ if (but->editstr && but->pos >= 0) {
+ if (but->ofs > but->pos)
but->ofs= but->pos;
- if(BLF_width(fstyle->uifont_id, but->drawstr) <= okwidth)
+ if (BLF_width(fstyle->uifont_id, but->drawstr) <= okwidth)
but->ofs = 0;
}
else but->ofs= 0;
but->strwidth= BLF_width(fstyle->uifont_id, but->drawstr + but->ofs);
- while(but->strwidth > okwidth) {
+ while (but->strwidth > okwidth) {
/* textbut exception, clip right when... */
- if(but->editstr && but->pos >= 0) {
+ if (but->editstr && but->pos >= 0) {
float width;
char buf[UI_MAX_DRAW_STR];
/* copy draw string */
- BLI_strncpy(buf, but->drawstr, sizeof(buf));
+ BLI_strncpy_utf8(buf, but->drawstr, sizeof(buf));
/* string position of cursor */
buf[but->pos]= 0;
width= BLF_width(fstyle->uifont_id, buf+but->ofs);
/* if cursor is at 20 pixels of right side button we clip left */
- if(width > okwidth-20)
- but->ofs++;
+ if (width > okwidth-20)
+ ui_text_clip_give_next_off(but);
else {
+ int len, bytes;
/* shift string to the left */
- if(width < 20 && but->ofs > 0)
- but->ofs--;
- but->drawstr[ strlen(but->drawstr)-1 ]= 0;
+ if (width < 20 && but->ofs > 0)
+ ui_text_clip_give_prev_off(but);
+ len= strlen(but->drawstr);
+ bytes= BLI_str_utf8_size(BLI_str_find_prev_char_utf8(but->drawstr, but->drawstr + len));
+ but->drawstr[ len-bytes ]= 0;
}
}
else
- but->ofs++;
+ ui_text_clip_give_next_off(but);
but->strwidth= BLF_width(fstyle->uifont_id, but->drawstr+but->ofs);
- if(but->strwidth < 10) break;
+ if (but->strwidth < 10) break;
}
if (fstyle->kerning==1)
@@ -1018,34 +1039,40 @@ static void ui_text_label_rightclip(uiFontStyle *fstyle, uiBut *but, rcti *rect)
/* chop off the leading text, starting from the right */
while (but->strwidth > okwidth && cp2 > but->drawstr) {
+ int bytes = BLI_str_utf8_size(cp2);
+ if (bytes < 0)
+ bytes = 1;
+
/* shift the text after and including cp2 back by 1 char, +1 to include null terminator */
- memmove(cp2-1, cp2, strlen(cp2)+1);
- cp2--;
+ memmove(cp2-bytes, cp2, strlen(cp2)+1);
+ cp2-=bytes;
but->strwidth= BLF_width(fstyle->uifont_id, but->drawstr+but->ofs);
- if(but->strwidth < 10) break;
+ if (but->strwidth < 10) break;
}
/* after the leading text is gone, chop off the : and following space, with ofs */
while ((but->strwidth > okwidth) && (but->ofs < 2))
{
- but->ofs++;
+ ui_text_clip_give_next_off(but);
but->strwidth= BLF_width(fstyle->uifont_id, but->drawstr+but->ofs);
- if(but->strwidth < 10) break;
+ if (but->strwidth < 10) break;
}
}
/* once the label's gone, chop off the least significant digits */
- while(but->strwidth > okwidth ) {
- int pos= strlen(but->drawstr);
-
- but->drawstr[ pos-1 ] = 0;
- pos--;
+ while (but->strwidth > okwidth ) {
+ int len= strlen(but->drawstr);
+ int bytes= BLI_str_utf8_size(BLI_str_find_prev_char_utf8(but->drawstr, but->drawstr + len));
+ if (bytes < 0)
+ bytes = 1;
+
+ but->drawstr[ len-bytes ]= 0;
but->strwidth= BLF_width(fstyle->uifont_id, but->drawstr+but->ofs);
- if(but->strwidth < 10) break;
+ if (but->strwidth < 10) break;
}
if (fstyle->kerning==1)
@@ -1063,7 +1090,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
uiStyleFontSet(fstyle);
- if(but->editstr || (but->flag & UI_TEXT_LEFT))
+ if (but->editstr || (but->flag & UI_TEXT_LEFT))
fstyle->align= UI_STYLE_TEXT_LEFT;
else
fstyle->align= UI_STYLE_TEXT_CENTER;
@@ -1072,7 +1099,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
BLF_enable(fstyle->uifont_id, BLF_KERNING_DEFAULT);
/* text button selection and cursor */
- if(but->editstr && but->pos != -1) {
+ if (but->editstr && but->pos != -1) {
short t=0, pos=0, ch;
short selsta_tmp, selend_tmp, selsta_draw, selwidth_draw;
@@ -1081,7 +1108,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
selsta_tmp = but->selsta;
selend_tmp = but->selend;
- if(but->drawstr[0]!=0) {
+ if (but->drawstr[0]!=0) {
if (but->selsta >= but->ofs) {
ch= but->drawstr[selsta_tmp];
@@ -1090,8 +1117,10 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
selsta_draw = BLF_width(fstyle->uifont_id, but->drawstr+but->ofs);
but->drawstr[selsta_tmp]= ch;
- } else
+ }
+ else {
selsta_draw = 0;
+ }
ch= but->drawstr[selend_tmp];
but->drawstr[selend_tmp]= 0;
@@ -1103,11 +1132,12 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
glColor3ubv((unsigned char*)wcol->item);
glRects(rect->xmin+selsta_draw, rect->ymin+2, rect->xmin+selwidth_draw, rect->ymax-2);
}
- } else {
+ }
+ else {
/* text cursor */
pos= but->pos;
- if(pos >= but->ofs) {
- if(but->drawstr[0]!=0) {
+ if (pos >= but->ofs) {
+ if (but->drawstr[0]!=0) {
ch= but->drawstr[pos];
but->drawstr[pos]= 0;
@@ -1126,14 +1156,14 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
BLF_disable(fstyle->uifont_id, BLF_KERNING_DEFAULT);
// ui_rasterpos_safe(x, y, but->aspect);
-// if(but->type==IDPOIN) transopts= 0; // no translation, of course!
+// if (but->type==IDPOIN) transopts= 0; // no translation, of course!
// else transopts= ui_translate_buttons();
/* cut string in 2 parts - only for menu entries */
- if((but->block->flag & UI_BLOCK_LOOP)) {
- if(ELEM5(but->type, SLI, NUM, TEX, NUMSLI, NUMABS)==0) {
+ if ((but->block->flag & UI_BLOCK_LOOP)) {
+ if (ELEM5(but->type, SLI, NUM, TEX, NUMSLI, NUMABS)==0) {
cpoin= strchr(but->drawstr, '|');
- if(cpoin) *cpoin= 0;
+ if (cpoin) *cpoin= 0;
}
}
@@ -1141,17 +1171,17 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
uiStyleFontDrawExt(fstyle, rect, but->drawstr+but->ofs, &font_xofs, &font_yofs);
- if(but->menu_key != '\0') {
+ if (but->menu_key != '\0') {
char fixedbuf[128];
char *str;
BLI_strncpy(fixedbuf, but->drawstr + but->ofs, sizeof(fixedbuf));
str= strchr(fixedbuf, but->menu_key-32); /* upper case */
- if(str==NULL)
+ if (str==NULL)
str= strchr(fixedbuf, but->menu_key);
- if(str) {
+ if (str) {
int ul_index= -1;
float ul_advance;
@@ -1174,7 +1204,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
}
/* part text right aligned */
- if(cpoin) {
+ if (cpoin) {
fstyle->align= UI_STYLE_TEXT_RIGHT;
rect->xmax -= ui_but_draw_menu_icon(but) ? UI_DPI_ICON_SIZE : 5;
uiStyleFontDraw(fstyle, rect, cpoin+1);
@@ -1186,7 +1216,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *but, rcti *rect)
{
- if(but==NULL) return;
+ if (but==NULL) return;
/* clip but->drawstr to fit in available space */
if (but->editstr && but->pos >= 0) {
@@ -1209,16 +1239,16 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
}
else {
- if(but->type==BUT_TOGDUAL) {
+ if (but->type==BUT_TOGDUAL) {
int dualset= 0;
- if(but->pointype==SHO)
+ if (but->pointype==SHO)
dualset= BTST( *(((short *)but->poin)+1), but->bitnr);
- else if(but->pointype==INT)
+ else if (but->pointype==INT)
dualset= BTST( *(((int *)but->poin)+1), but->bitnr);
widget_draw_icon(but, ICON_DOT, dualset?1.0f:0.25f, rect);
}
- else if(but->type==MENU && (but->flag & UI_BUT_NODE_LINK)) {
+ else if (but->type==MENU && (but->flag & UI_BUT_NODE_LINK)) {
int tmp = rect->xmin;
rect->xmin = rect->xmax - (rect->ymax - rect->ymin) - 1;
widget_draw_icon(but, ICON_LAYER_USED, 1.0f, rect);
@@ -1233,10 +1263,10 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
rect->xmin += (int)((float)UI_icon_get_width(but->icon+but->iconadd) * UI_DPI_ICON_FAC);
- if(but->editstr || (but->flag & UI_TEXT_LEFT))
+ if (but->editstr || (but->flag & UI_TEXT_LEFT))
rect->xmin += 5;
}
- else if((but->flag & UI_TEXT_LEFT))
+ else if ((but->flag & UI_TEXT_LEFT))
rect->xmin += 5;
/* always draw text for textbutton cursor */
@@ -1367,7 +1397,7 @@ static struct uiWidgetColors wcol_menu_item= {
{0, 0, 0, 255},
{0, 0, 0, 0},
{86, 128, 194, 255},
- {255, 255, 255, 255},
+ {172, 172, 172, 128},
{255, 255, 255, 255},
{0, 0, 0, 255},
@@ -1390,6 +1420,19 @@ static struct uiWidgetColors wcol_menu_back= {
25, -20
};
+/* tooltip colour */
+static struct uiWidgetColors wcol_tooltip= {
+ {0, 0, 0, 255},
+ {25, 25, 25, 230},
+ {45, 45, 45, 230},
+ {100, 100, 100, 255},
+
+ {160, 160, 160, 255},
+ {255, 255, 255, 255},
+
+ 0,
+ 25, -20
+};
static struct uiWidgetColors wcol_radio= {
{0, 0, 0, 255},
@@ -1524,6 +1567,7 @@ void ui_widget_color_init(ThemeUI *tui)
tui->wcol_menu= wcol_menu;
tui->wcol_pulldown= wcol_pulldown;
tui->wcol_menu_back= wcol_menu_back;
+ tui->wcol_tooltip = wcol_tooltip;
tui->wcol_menu_item= wcol_menu_item;
tui->wcol_box= wcol_box;
tui->wcol_scroll= wcol_scroll;
@@ -1537,7 +1581,7 @@ void ui_widget_color_init(ThemeUI *tui)
static void widget_state_blend(char cp[3], const char cpstate[3], const float fac)
{
- if(fac != 0.0f) {
+ if (fac != 0.0f) {
cp[0]= (int)((1.0f-fac)*cp[0] + fac*cpstate[0]);
cp[1]= (int)((1.0f-fac)*cp[1] + fac*cpstate[1]);
cp[2]= (int)((1.0f-fac)*cp[2] + fac*cpstate[2]);
@@ -1551,41 +1595,41 @@ static void widget_state(uiWidgetType *wt, int state)
wt->wcol= *(wt->wcol_theme);
- if(state & UI_SELECT) {
+ if (state & UI_SELECT) {
copy_v4_v4_char(wt->wcol.inner, wt->wcol.inner_sel);
- if(state & UI_BUT_ANIMATED_KEY)
+ if (state & UI_BUT_ANIMATED_KEY)
widget_state_blend(wt->wcol.inner, wcol_state->inner_key_sel, wcol_state->blend);
- else if(state & UI_BUT_ANIMATED)
+ else if (state & UI_BUT_ANIMATED)
widget_state_blend(wt->wcol.inner, wcol_state->inner_anim_sel, wcol_state->blend);
- else if(state & UI_BUT_DRIVEN)
+ else if (state & UI_BUT_DRIVEN)
widget_state_blend(wt->wcol.inner, wcol_state->inner_driven_sel, wcol_state->blend);
copy_v3_v3_char(wt->wcol.text, wt->wcol.text_sel);
- if(state & UI_SELECT)
+ if (state & UI_SELECT)
SWAP(short, wt->wcol.shadetop, wt->wcol.shadedown);
}
else {
- if(state & UI_BUT_ANIMATED_KEY)
+ if (state & UI_BUT_ANIMATED_KEY)
widget_state_blend(wt->wcol.inner, wcol_state->inner_key, wcol_state->blend);
- else if(state & UI_BUT_ANIMATED)
+ else if (state & UI_BUT_ANIMATED)
widget_state_blend(wt->wcol.inner, wcol_state->inner_anim, wcol_state->blend);
- else if(state & UI_BUT_DRIVEN)
+ else if (state & UI_BUT_DRIVEN)
widget_state_blend(wt->wcol.inner, wcol_state->inner_driven, wcol_state->blend);
- if(state & UI_ACTIVE) { /* mouse over? */
+ if (state & UI_ACTIVE) { /* mouse over? */
wt->wcol.inner[0]= wt->wcol.inner[0]>=240? 255 : wt->wcol.inner[0]+15;
wt->wcol.inner[1]= wt->wcol.inner[1]>=240? 255 : wt->wcol.inner[1]+15;
wt->wcol.inner[2]= wt->wcol.inner[2]>=240? 255 : wt->wcol.inner[2]+15;
}
}
- if(state & UI_BUT_REDALERT) {
+ if (state & UI_BUT_REDALERT) {
char red[4]= {255, 0, 0};
widget_state_blend(wt->wcol.inner, red, 0.4f);
}
- if(state & UI_BUT_NODE_ACTIVE) {
+ if (state & UI_BUT_NODE_ACTIVE) {
char blue[4]= {86, 128, 194};
widget_state_blend(wt->wcol.inner, blue, 0.3f);
}
@@ -1602,24 +1646,24 @@ static void widget_state_numslider(uiWidgetType *wt, int state)
/* now, set the inner-part so that it reflects state settings too */
// TODO: maybe we should have separate settings for the blending colors used for this case?
- if(state & UI_SELECT) {
+ if (state & UI_SELECT) {
- if(state & UI_BUT_ANIMATED_KEY)
+ if (state & UI_BUT_ANIMATED_KEY)
widget_state_blend(wt->wcol.item, wcol_state->inner_key_sel, blend);
- else if(state & UI_BUT_ANIMATED)
+ else if (state & UI_BUT_ANIMATED)
widget_state_blend(wt->wcol.item, wcol_state->inner_anim_sel, blend);
- else if(state & UI_BUT_DRIVEN)
+ else if (state & UI_BUT_DRIVEN)
widget_state_blend(wt->wcol.item, wcol_state->inner_driven_sel, blend);
- if(state & UI_SELECT)
+ if (state & UI_SELECT)
SWAP(short, wt->wcol.shadetop, wt->wcol.shadedown);
}
else {
- if(state & UI_BUT_ANIMATED_KEY)
+ if (state & UI_BUT_ANIMATED_KEY)
widget_state_blend(wt->wcol.item, wcol_state->inner_key, blend);
- else if(state & UI_BUT_ANIMATED)
+ else if (state & UI_BUT_ANIMATED)
widget_state_blend(wt->wcol.item, wcol_state->inner_anim, blend);
- else if(state & UI_BUT_DRIVEN)
+ else if (state & UI_BUT_DRIVEN)
widget_state_blend(wt->wcol.item, wcol_state->inner_driven, blend);
}
}
@@ -1630,7 +1674,7 @@ static void widget_state_label(uiWidgetType *wt, int state)
/* call this for option button */
widget_state(wt, state);
- if(state & UI_SELECT)
+ if (state & UI_SELECT)
UI_GetThemeColor4ubv(TH_TEXT_HI, (unsigned char *)wt->wcol.text);
else
UI_GetThemeColor4ubv(TH_TEXT, (unsigned char *)wt->wcol.text);
@@ -1645,7 +1689,7 @@ static void widget_state_option_menu(uiWidgetType *wt, int state)
widget_state(wt, state);
/* if not selected we get theme from menu back */
- if(state & UI_SELECT)
+ if (state & UI_SELECT)
UI_GetThemeColor4ubv(TH_TEXT_HI, (unsigned char *)wt->wcol.text);
else {
bTheme *btheme= UI_GetTheme(); /* XXX */
@@ -1668,7 +1712,7 @@ static void widget_state_pulldown(uiWidgetType *wt, int state)
copy_v4_v4_char(wt->wcol.inner, wt->wcol.inner_sel);
copy_v3_v3_char(wt->wcol.outline, wt->wcol.inner);
- if(state & UI_ACTIVE)
+ if (state & UI_ACTIVE)
copy_v3_v3_char(wt->wcol.text, wt->wcol.text_sel);
}
@@ -1677,12 +1721,12 @@ static void widget_state_menu_item(uiWidgetType *wt, int state)
{
wt->wcol= *(wt->wcol_theme);
- if(state & (UI_BUT_DISABLED|UI_BUT_INACTIVE)) {
+ if (state & (UI_BUT_DISABLED|UI_BUT_INACTIVE)) {
wt->wcol.text[0]= 0.5f*(wt->wcol.text[0]+wt->wcol.text_sel[0]);
wt->wcol.text[1]= 0.5f*(wt->wcol.text[1]+wt->wcol.text_sel[1]);
wt->wcol.text[2]= 0.5f*(wt->wcol.text[2]+wt->wcol.text_sel[2]);
}
- else if(state & UI_ACTIVE) {
+ else if (state & UI_ACTIVE) {
copy_v4_v4_char(wt->wcol.inner, wt->wcol.inner_sel);
copy_v3_v3_char(wt->wcol.text, wt->wcol.text_sel);
}
@@ -1701,7 +1745,7 @@ static void widget_softshadow(rcti *rect, int roundboxalign, float radin, float
float quad_strip[WIDGET_SIZE_MAX*2][2];
/* prevent tooltips to not show round shadow */
- if( 2.0f*radout > 0.2f*(rect1.ymax-rect1.ymin) )
+ if ( 2.0f*radout > 0.2f*(rect1.ymax-rect1.ymin) )
rect1.ymax -= 0.2f*(rect1.ymax-rect1.ymin);
else
rect1.ymax -= 2.0f*radout;
@@ -1715,7 +1759,7 @@ static void widget_softshadow(rcti *rect, int roundboxalign, float radin, float
glEnableClientState(GL_VERTEX_ARRAY);
- for(step= 1; step<=radout; step++, alpha*=alphastep) {
+ for (step= 1; step<=radout; step++, alpha*=alphastep) {
round_box_shadow_edges(wtb.outer_v, &rect1, radin, UI_CNR_ALL, (float)step);
glColor4f(0.0f, 0.0f, 0.0f, alpha);
@@ -1788,7 +1832,7 @@ void ui_hsvcircle_vals_from_pos(float *valrad, float *valdist, rcti *rect, float
float centy= (float)(rect->ymin + rect->ymax)/2;
float radius, dist;
- if( rect->xmax-rect->xmin > rect->ymax-rect->ymin )
+ if ( rect->xmax-rect->xmin > rect->ymax-rect->ymin )
radius= (float)(rect->ymax - rect->ymin)/2;
else
radius= (float)(rect->xmax - rect->xmin)/2;
@@ -1796,7 +1840,7 @@ void ui_hsvcircle_vals_from_pos(float *valrad, float *valdist, rcti *rect, float
mx-= centx;
my-= centy;
dist= sqrt( mx*mx + my*my);
- if(dist < radius)
+ if (dist < radius)
*valdist= dist/radius;
else
*valdist= 1.0f;
@@ -1820,7 +1864,7 @@ static void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, rcti *rect)
centx= (float)(rect->xmin + rect->xmax)/2;
centy= (float)(rect->ymin + rect->ymax)/2;
- if( rect->xmax-rect->xmin > rect->ymax-rect->ymin )
+ if ( rect->xmax-rect->xmin > rect->ymax-rect->ymin )
radius= (float)(rect->ymax - rect->ymin)/2;
else
radius= (float)(rect->xmax - rect->xmin)/2;
@@ -1847,7 +1891,7 @@ static void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, rcti *rect)
glColor3fv(colcent);
glVertex2f( centx, centy);
- for(a=0; a<=tot; a++, ang+=radstep) {
+ for (a=0; a<=tot; a++, ang+=radstep) {
float si= sin(ang);
float co= cos(ang);
@@ -1876,7 +1920,7 @@ static void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, rcti *rect)
/* cursor */
ang= 2.0f*(float)M_PI*hsvo[0] + 0.5f*(float)M_PI;
- if(but->flag & UI_BUT_COLOR_CUBIC)
+ if (but->flag & UI_BUT_COLOR_CUBIC)
cursor_radius = (1.0f - powf(1.0f - hsvo[1], 3.0f));
else
cursor_radius = hsvo[1];
@@ -1946,7 +1990,7 @@ void ui_draw_gradient(rcti *rect, const float hsv[3], int type, float alpha)
/* old below */
- for(dx=0.0f; dx<1.0f; dx+= 0.05f) {
+ for (dx=0.0f; dx<1.0f; dx+= 0.05f) {
// previous color
copy_v3_v3(col0[0], col1[0]);
copy_v3_v3(col0[1], col1[1]);
@@ -2000,7 +2044,7 @@ void ui_draw_gradient(rcti *rect, const float hsv[3], int type, float alpha)
dy= (rect->ymax-rect->ymin)/3.0;
glBegin(GL_QUADS);
- for(a=0; a<3; a++, sy+=dy) {
+ for (a=0; a<3; a++, sy+=dy) {
glColor4f(col0[a][0], col0[a][1], col0[a][2], alpha);
glVertex2f(sx1, sy);
@@ -2142,7 +2186,7 @@ static void widget_numbut(uiWidgetColors *wcol, rcti *rect, int state, int round
float rad= 0.5f*(rect->ymax - rect->ymin);
float textofs = rad*0.75f;
- if(state & UI_SELECT)
+ if (state & UI_SELECT)
SWAP(short, wcol->shadetop, wcol->shadedown);
widget_init(&wtb);
@@ -2151,7 +2195,7 @@ static void widget_numbut(uiWidgetColors *wcol, rcti *rect, int state, int round
round_box_edges(&wtb, roundboxalign, rect, rad);
/* decoration */
- if(!(state & UI_TEXTINPUT)) {
+ if (!(state & UI_TEXTINPUT)) {
widget_num_tria(&wtb.tria1, rect, 0.6f, 'l');
widget_num_tria(&wtb.tria2, rect, 0.6f, 'r');
}
@@ -2192,7 +2236,7 @@ void ui_draw_link_bezier(rcti *rect)
{
float coord_array[LINK_RESOL+1][2];
- if(ui_link_bezier_points(rect, coord_array, LINK_RESOL)) {
+ if (ui_link_bezier_points(rect, coord_array, LINK_RESOL)) {
/* we can reuse the dist variable here to increment the GL curve eval amount*/
// const float dist= 1.0f/(float)LINK_RESOL; // UNUSED
@@ -2223,7 +2267,7 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat
/* determine horizontal/vertical */
horizontal= (rect->xmax - rect->xmin > rect->ymax - rect->ymin);
- if(horizontal)
+ if (horizontal)
rad= 0.5f*(rect->ymax - rect->ymin);
else
rad= 0.5f*(rect->xmax - rect->xmin);
@@ -2231,25 +2275,25 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat
wtb.shadedir= (horizontal)? 1: 0;
/* draw back part, colors swapped and shading inverted */
- if(horizontal)
+ if (horizontal)
SWAP(short, wcol->shadetop, wcol->shadedown);
round_box_edges(&wtb, UI_CNR_ALL, rect, rad);
widgetbase_draw(&wtb, wcol);
/* slider */
- if(slider->xmax-slider->xmin<2 || slider->ymax-slider->ymin<2);
+ if (slider->xmax-slider->xmin<2 || slider->ymax-slider->ymin<2);
else {
SWAP(short, wcol->shadetop, wcol->shadedown);
copy_v4_v4_char(wcol->inner, wcol->item);
- if(wcol->shadetop>wcol->shadedown)
+ if (wcol->shadetop>wcol->shadedown)
wcol->shadetop+= 20; /* XXX violates themes... */
else wcol->shadedown+= 20;
- if(state & UI_SCROLL_PRESSED) {
+ if (state & UI_SCROLL_PRESSED) {
wcol->inner[0]= wcol->inner[0]>=250? 255 : wcol->inner[0]+5;
wcol->inner[1]= wcol->inner[1]>=250? 255 : wcol->inner[1]+5;
wcol->inner[2]= wcol->inner[2]>=250? 255 : wcol->inner[2]+5;
@@ -2264,13 +2308,13 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat
round_box_edges(&wtb, UI_CNR_ALL, slider, rad);
- if(state & UI_SCROLL_ARROWS) {
- if(wcol->item[0] > 48) wcol->item[0]-= 48;
- if(wcol->item[1] > 48) wcol->item[1]-= 48;
- if(wcol->item[2] > 48) wcol->item[2]-= 48;
+ if (state & UI_SCROLL_ARROWS) {
+ if (wcol->item[0] > 48) wcol->item[0]-= 48;
+ if (wcol->item[1] > 48) wcol->item[1]-= 48;
+ if (wcol->item[2] > 48) wcol->item[2]-= 48;
wcol->item[3]= 255;
- if(horizontal) {
+ if (horizontal) {
widget_scroll_circle(&wtb.tria1, slider, 0.6f, 'l');
widget_scroll_circle(&wtb.tria2, slider, 0.6f, 'r');
}
@@ -2305,42 +2349,42 @@ static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
/* determine horizontal/vertical */
horizontal= (rect->xmax - rect->xmin > rect->ymax - rect->ymin);
- if(horizontal) {
+ if (horizontal) {
fac= (rect->xmax - rect->xmin)/(size);
- rect1.xmin= rect1.xmin + ceilf(fac*((float)value - but->softmin));
- rect1.xmax= rect1.xmin + ceilf(fac*(but->a1 - but->softmin));
+ rect1.xmin = rect1.xmin + ceilf(fac*((float)value - but->softmin));
+ rect1.xmax = rect1.xmin + ceilf(fac*(but->a1 - but->softmin));
/* ensure minimium size */
min= rect->ymax - rect->ymin;
- if(rect1.xmax - rect1.xmin < min) {
- rect1.xmax= rect1.xmin + min;
+ if (rect1.xmax - rect1.xmin < min) {
+ rect1.xmax = rect1.xmin + min;
- if(rect1.xmax > rect->xmax) {
- rect1.xmax= rect->xmax;
- rect1.xmin= MAX2(rect1.xmax - min, rect->xmin);
+ if (rect1.xmax > rect->xmax) {
+ rect1.xmax = rect->xmax;
+ rect1.xmin = MAX2(rect1.xmax - min, rect->xmin);
}
}
}
else {
fac= (rect->ymax - rect->ymin)/(size);
- rect1.ymax= rect1.ymax - ceilf(fac*((float)value - but->softmin));
- rect1.ymin= rect1.ymax - ceilf(fac*(but->a1 - but->softmin));
+ rect1.ymax = rect1.ymax - ceilf(fac*((float)value - but->softmin));
+ rect1.ymin = rect1.ymax - ceilf(fac*(but->a1 - but->softmin));
/* ensure minimium size */
min= rect->xmax - rect->xmin;
- if(rect1.ymax - rect1.ymin < min) {
- rect1.ymax= rect1.ymin + min;
+ if (rect1.ymax - rect1.ymin < min) {
+ rect1.ymax = rect1.ymin + min;
- if(rect1.ymax > rect->ymax) {
- rect1.ymax= rect->ymax;
- rect1.ymin= MAX2(rect1.ymax - min, rect->ymin);
+ if (rect1.ymax > rect->ymax) {
+ rect1.ymax = rect->ymax;
+ rect1.ymin = MAX2(rect1.ymax - min, rect->ymin);
}
}
}
- if(state & UI_SELECT)
+ if (state & UI_SELECT)
state= UI_SCROLL_PRESSED;
else
state= 0;
@@ -2376,15 +2420,15 @@ static void widget_progressbar(uiBut *but, uiWidgetColors *wcol, rcti *rect, int
static void widget_link(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect, int UNUSED(state), int UNUSED(roundboxalign))
{
- if(but->flag & UI_SELECT) {
+ if (but->flag & UI_SELECT) {
rcti rectlink;
UI_ThemeColor(TH_TEXT_HI);
- rectlink.xmin= (rect->xmin+rect->xmax)/2;
- rectlink.ymin= (rect->ymin+rect->ymax)/2;
- rectlink.xmax= but->linkto[0];
- rectlink.ymax= but->linkto[1];
+ rectlink.xmin = (rect->xmin+rect->xmax)/2;
+ rectlink.ymin = (rect->ymin+rect->ymax)/2;
+ rectlink.xmax = but->linkto[0];
+ rectlink.ymax = but->linkto[1];
ui_draw_link_bezier(&rectlink);
}
@@ -2412,14 +2456,14 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s
widgetbase_draw(&wtb, wcol);
/* draw left/right parts only when not in text editing */
- if(!(state & UI_TEXTINPUT)) {
+ if (!(state & UI_TEXTINPUT)) {
/* slider part */
copy_v3_v3_char(outline, wcol->outline);
copy_v3_v3_char(wcol->outline, wcol->item);
copy_v3_v3_char(wcol->inner, wcol->item);
- if(!(state & UI_SELECT))
+ if (!(state & UI_SELECT))
SWAP(short, wcol->shadetop, wcol->shadedown);
rect1= *rect;
@@ -2428,15 +2472,15 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s
fac= ((float)value-but->softmin)*(rect1.xmax - rect1.xmin - offs)/(but->softmax - but->softmin);
/* left part of slider, always rounded */
- rect1.xmax= rect1.xmin + ceil(offs+1.0f);
+ rect1.xmax = rect1.xmin + ceil(offs+1.0f);
round_box_edges(&wtb1, roundboxalign & ~(UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT), &rect1, offs);
wtb1.outline= 0;
widgetbase_draw(&wtb1, wcol);
/* right part of slider, interpolate roundness */
- rect1.xmax= rect1.xmin + fac + offs;
+ rect1.xmax = rect1.xmin + fac + offs;
rect1.xmin+= floor(offs-1.0f);
- if(rect1.xmax + offs > rect->xmax)
+ if (rect1.xmax + offs > rect->xmax)
offs*= (rect1.xmax + offs - rect->xmax)/offs;
else
offs= 0.0f;
@@ -2445,7 +2489,7 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s
widgetbase_draw(&wtb1, wcol);
copy_v3_v3_char(wcol->outline, outline);
- if(!(state & UI_SELECT))
+ if (!(state & UI_SELECT))
SWAP(short, wcol->shadetop, wcol->shadedown);
}
@@ -2474,7 +2518,7 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
if (RNA_property_subtype(but->rnaprop) == PROP_COLOR_GAMMA)
color_profile = BLI_PR_NONE;
- if(RNA_property_array_length(&but->rnapoin, but->rnaprop)==4) {
+ if (RNA_property_array_length(&but->rnapoin, but->rnaprop)==4) {
col[3]= RNA_property_float_get_index(&but->rnapoin, but->rnaprop, 3);
}
}
@@ -2486,7 +2530,7 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
ui_get_but_vectorf(but, col);
- if(state & (UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN|UI_BUT_REDALERT)) {
+ if (state & (UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN|UI_BUT_REDALERT)) {
// draw based on state - color for keyed etc
widgetbase_draw(&wtb, wcol);
@@ -2513,7 +2557,7 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
static void widget_icon_has_anim(uiBut *UNUSED(but), uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign))
{
- if(state & (UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN|UI_BUT_REDALERT)) {
+ if (state & (UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN|UI_BUT_REDALERT)) {
uiWidgetBase wtb;
widget_init(&wtb);
@@ -2530,7 +2574,7 @@ static void widget_textbut(uiWidgetColors *wcol, rcti *rect, int state, int roun
{
uiWidgetBase wtb;
- if(state & UI_SELECT)
+ if (state & UI_SELECT)
SWAP(short, wcol->shadetop, wcol->shadedown);
widget_init(&wtb);
@@ -2599,7 +2643,7 @@ static void widget_menunodebut(uiWidgetColors *wcol, rcti *rect, int UNUSED(stat
static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign))
{
- if(state & UI_ACTIVE) {
+ if (state & UI_ACTIVE) {
uiWidgetBase wtb;
float rad= 0.5f*(rect->ymax - rect->ymin); // 4.0f
@@ -2647,7 +2691,7 @@ static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int UN
widget_init(&wtb);
/* square */
- recttemp.xmax= recttemp.xmin + (recttemp.ymax-recttemp.ymin);
+ recttemp.xmax = recttemp.xmin + (recttemp.ymax-recttemp.ymin);
/* smaller */
delta= 1 + (recttemp.ymax-recttemp.ymin)/8;
@@ -2660,7 +2704,7 @@ static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int UN
round_box_edges(&wtb, UI_CNR_ALL, &recttemp, 4.0f);
/* decoration */
- if(state & UI_SELECT) {
+ if (state & UI_SELECT) {
widget_check_trias(&wtb.tria1, &recttemp);
}
@@ -2749,7 +2793,7 @@ static void widget_draw_extra_mask(const bContext *C, uiBut *but, uiWidgetType *
widget_init(&wtb);
- if(but->block->drawextra) {
+ if (but->block->drawextra) {
/* note: drawextra can change rect +1 or -1, to match round errors of existing previews */
but->block->drawextra(C, but->poin, but->block->drawextra_arg1, but->block->drawextra_arg2, rect);
@@ -2838,6 +2882,11 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
wt.wcol_theme= &btheme->tui.wcol_tool;
wt.draw= widget_roundbut;
break;
+
+ case UI_WTYPE_TOOLTIP:
+ wt.wcol_theme = &btheme->tui.wcol_tooltip;
+ wt.draw = widget_menu_back;
+ break;
/* strings */
@@ -2939,11 +2988,11 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
static int widget_roundbox_set(uiBut *but, rcti *rect)
{
/* alignment */
- if(but->flag & UI_BUT_ALIGN) {
+ if (but->flag & UI_BUT_ALIGN) {
- if(but->flag & UI_BUT_ALIGN_TOP)
+ if (but->flag & UI_BUT_ALIGN_TOP)
rect->ymax+= 1;
- if(but->flag & UI_BUT_ALIGN_LEFT)
+ if (but->flag & UI_BUT_ALIGN_LEFT)
rect->xmin-= 1;
switch(but->flag & UI_BUT_ALIGN) {
@@ -2980,7 +3029,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
uiWidgetType *wt= NULL;
/* handle menus separately */
- if(but->dt==UI_EMBOSSP) {
+ if (but->dt==UI_EMBOSSP) {
switch (but->type) {
case LABEL:
widget_draw_text_icon(&style->widgetlabel, &tui->wcol_menu_back, but, rect);
@@ -2993,7 +3042,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
wt= widget_type(UI_WTYPE_MENU_ITEM);
}
}
- else if(but->dt==UI_EMBOSSN) {
+ else if (but->dt==UI_EMBOSSN) {
/* "nothing" */
wt= widget_type(UI_WTYPE_ICON);
}
@@ -3001,7 +3050,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
switch (but->type) {
case LABEL:
- if(but->block->flag & UI_BLOCK_LOOP)
+ if (but->block->flag & UI_BLOCK_LOOP)
widget_draw_text_icon(&style->widgetlabel, &tui->wcol_menu_back, but, rect);
else {
wt= widget_type(UI_WTYPE_LABEL);
@@ -3039,7 +3088,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
case SEARCH_MENU:
wt= widget_type(UI_WTYPE_NAME);
- if(but->block->flag & UI_BLOCK_LOOP)
+ if (but->block->flag & UI_BLOCK_LOOP)
wt->wcol_theme= &btheme->tui.wcol_menu_back;
break;
@@ -3060,7 +3109,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
wt= widget_type(UI_WTYPE_TOGGLE);
/* option buttons have strings outside, on menus use different colors */
- if(but->block->flag & UI_BLOCK_LOOP)
+ if (but->block->flag & UI_BLOCK_LOOP)
wt->state= widget_state_option_menu;
break;
@@ -3068,9 +3117,9 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
case MENU:
case BLOCK:
case ICONTEXTROW:
- if(but->flag & UI_BUT_NODE_LINK)
+ if (but->flag & UI_BUT_NODE_LINK)
wt= widget_type(UI_WTYPE_MENU_NODE_LINK);
- else if(!but->str[0] && but->icon)
+ else if (!but->str[0] && but->icon)
wt= widget_type(UI_WTYPE_MENU_ICON_RADIO);
else
wt= widget_type(UI_WTYPE_MENU_RADIO);
@@ -3105,7 +3154,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
break;
case HSVCUBE:
- if(but->a1 == UI_GRAD_V_ALT) // vertical V slider, uses new widget draw now
+ if (but->a1 == UI_GRAD_V_ALT) // vertical V slider, uses new widget draw now
ui_draw_but_HSV_v(but, rect);
else // other HSV pickers...
ui_draw_but_HSVCUBE(but, rect);
@@ -3161,24 +3210,24 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
}
}
- if(wt) {
+ if (wt) {
rcti disablerect= *rect; /* rect gets clipped smaller for text */
int roundboxalign, state;
roundboxalign= widget_roundbox_set(but, rect);
state= but->flag;
- if(but->editstr) state |= UI_TEXTINPUT;
+ if (but->editstr) state |= UI_TEXTINPUT;
wt->state(wt, state);
- if(wt->custom)
+ if (wt->custom)
wt->custom(but, &wt->wcol, rect, state, roundboxalign);
- else if(wt->draw)
+ else if (wt->draw)
wt->draw(&wt->wcol, rect, state, roundboxalign);
wt->text(fstyle, &wt->wcol, but, rect);
- if(state & (UI_BUT_DISABLED|UI_BUT_INACTIVE))
- if(but->dt!=UI_EMBOSSP)
+ if (state & (UI_BUT_DISABLED|UI_BUT_INACTIVE))
+ if (but->dt!=UI_EMBOSSP)
widget_disabled(&disablerect);
}
}
@@ -3188,18 +3237,18 @@ void ui_draw_menu_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
uiWidgetType *wt= widget_type(UI_WTYPE_MENU_BACK);
wt->state(wt, 0);
- if(block)
+ if (block)
wt->draw(&wt->wcol, rect, block->flag, block->direction);
else
wt->draw(&wt->wcol, rect, 0, 0);
- if(block) {
- if(block->flag & UI_BLOCK_CLIPTOP) {
+ if (block) {
+ if (block->flag & UI_BLOCK_CLIPTOP) {
/* XXX no scaling for UI here yet */
glColor3ubv((unsigned char*)wt->wcol.text);
UI_DrawTriIcon((rect->xmax+rect->xmin)/2, rect->ymax-8, 't');
}
- if(block->flag & UI_BLOCK_CLIPBOTTOM) {
+ if (block->flag & UI_BLOCK_CLIPBOTTOM) {
/* XXX no scaling for UI here yet */
glColor3ubv((unsigned char*)wt->wcol.text);
UI_DrawTriIcon((rect->xmax+rect->xmin)/2, rect->ymin+10, 'v');
@@ -3207,6 +3256,19 @@ void ui_draw_menu_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
}
}
+uiWidgetColors* ui_tooltip_get_theme(void) {
+ uiWidgetType *wt = widget_type(UI_WTYPE_TOOLTIP);
+ return wt->wcol_theme;
+}
+
+void ui_draw_tooltip_background(uiStyle *UNUSED(style), uiBlock *UNUSED(block), rcti *rect)
+{
+ uiWidgetType *wt = widget_type(UI_WTYPE_TOOLTIP);
+ wt->state(wt, 0);
+ /* wt->draw ends up using same function to draw the tooltip as menu_back */
+ wt->draw(&wt->wcol, rect, 0, 0);
+}
+
void ui_draw_search_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
{
uiWidgetType *wt= widget_type(UI_WTYPE_BOX);
@@ -3216,7 +3278,7 @@ void ui_draw_search_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
glDisable(GL_BLEND);
wt->state(wt, 0);
- if(block)
+ if (block)
wt->draw(&wt->wcol, rect, block->flag, UI_CNR_ALL);
else
wt->draw(&wt->wcol, rect, 0, UI_CNR_ALL);
@@ -3240,11 +3302,11 @@ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, const char *name, int ic
/* text location offset */
rect->xmin+=5;
- if(iconid) rect->xmin+= UI_DPI_ICON_SIZE;
+ if (iconid) rect->xmin+= UI_DPI_ICON_SIZE;
/* cut string in 2 parts? */
cpoin= strchr(name, '|');
- if(cpoin) {
+ if (cpoin) {
*cpoin= 0;
rect->xmax -= BLF_width(fstyle->uifont_id, cpoin+1) + 10;
}
@@ -3253,9 +3315,9 @@ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, const char *name, int ic
uiStyleFontDraw(fstyle, rect, name);
/* part text right aligned */
- if(cpoin) {
+ if (cpoin) {
fstyle->align= UI_STYLE_TEXT_RIGHT;
- rect->xmax= _rect.xmax - 5;
+ rect->xmax = _rect.xmax - 5;
uiStyleFontDraw(fstyle, rect, cpoin+1);
*cpoin= '|';
}
@@ -3263,7 +3325,7 @@ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, const char *name, int ic
/* restore rect, was messed with */
*rect= _rect;
- if(iconid) {
+ if (iconid) {
int xs= rect->xmin+4;
int ys= 1 + (rect->ymin+rect->ymax- UI_DPI_ICON_SIZE)/2;
glEnable(GL_BLEND);
@@ -3291,21 +3353,23 @@ void ui_draw_preview_item(uiFontStyle *fstyle, rcti *rect, const char *name, int
trect.xmax = trect.xmin + font_dims[0] + 10;
trect.ymin += 10;
trect.ymax = trect.ymin + font_dims[1];
- if(trect.xmax > rect->xmax - PREVIEW_PAD)
+ if (trect.xmax > rect->xmax - PREVIEW_PAD)
trect.xmax = rect->xmax - PREVIEW_PAD;
bg_rect = trect;
bg_rect.xmin = rect->xmin + PREVIEW_PAD;
bg_rect.ymin = rect->ymin + PREVIEW_PAD;
- bg_rect.xmax += PREVIEW_PAD / 2;
+ bg_rect.xmax = rect->xmax - PREVIEW_PAD;
bg_rect.ymax += PREVIEW_PAD / 2;
- if(bg_rect.xmax > rect->xmax - PREVIEW_PAD)
+ if (bg_rect.xmax > rect->xmax - PREVIEW_PAD)
bg_rect.xmax = rect->xmax - PREVIEW_PAD;
UI_GetThemeColor3ubv(TH_BUTBACK, bg_col);
- glColor3ubv(bg_col);
+ glColor4ubv((unsigned char*)wt->wcol.item);
+ glEnable(GL_BLEND);
glRecti(bg_rect.xmin, bg_rect.ymin, bg_rect.xmax, bg_rect.ymax);
+ glDisable(GL_BLEND);
if (state == UI_ACTIVE)
glColor3ubv((unsigned char*)wt->wcol.text);
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 3d609fd6b7a..1ab2320a052 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -43,6 +43,7 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
+#include "BLI_math.h"
#include "BKE_DerivedMesh.h"
#include "BKE_global.h"
@@ -88,10 +89,10 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
const char *cp= error;
- if(btheme) {
+ if (btheme) {
// first check for ui buttons theme
- if(colorid < TH_THEMEUI) {
+ if (colorid < TH_THEMEUI) {
switch(colorid) {
@@ -160,41 +161,41 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
switch(colorid) {
case TH_BACK:
- if(theme_regionid==RGN_TYPE_WINDOW)
+ if (theme_regionid==RGN_TYPE_WINDOW)
cp= ts->back;
- else if(theme_regionid==RGN_TYPE_CHANNELS)
+ else if (theme_regionid==RGN_TYPE_CHANNELS)
cp= ts->list;
- else if(theme_regionid==RGN_TYPE_HEADER)
+ else if (theme_regionid==RGN_TYPE_HEADER)
cp= ts->header;
else
cp= ts->button;
break;
case TH_TEXT:
- if(theme_regionid==RGN_TYPE_WINDOW)
+ if (theme_regionid==RGN_TYPE_WINDOW)
cp= ts->text;
- else if(theme_regionid==RGN_TYPE_CHANNELS)
+ else if (theme_regionid==RGN_TYPE_CHANNELS)
cp= ts->list_text;
- else if(theme_regionid==RGN_TYPE_HEADER)
+ else if (theme_regionid==RGN_TYPE_HEADER)
cp= ts->header_text;
else
cp= ts->button_text;
break;
case TH_TEXT_HI:
- if(theme_regionid==RGN_TYPE_WINDOW)
+ if (theme_regionid==RGN_TYPE_WINDOW)
cp= ts->text_hi;
- else if(theme_regionid==RGN_TYPE_CHANNELS)
+ else if (theme_regionid==RGN_TYPE_CHANNELS)
cp= ts->list_text_hi;
- else if(theme_regionid==RGN_TYPE_HEADER)
+ else if (theme_regionid==RGN_TYPE_HEADER)
cp= ts->header_text_hi;
else
cp= ts->button_text_hi;
break;
case TH_TITLE:
- if(theme_regionid==RGN_TYPE_WINDOW)
+ if (theme_regionid==RGN_TYPE_WINDOW)
cp= ts->title;
- else if(theme_regionid==RGN_TYPE_CHANNELS)
+ else if (theme_regionid==RGN_TYPE_CHANNELS)
cp= ts->list_title;
- else if(theme_regionid==RGN_TYPE_HEADER)
+ else if (theme_regionid==RGN_TYPE_HEADER)
cp= ts->header_title;
else
cp= ts->button_title;
@@ -244,6 +245,10 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
cp= ts->lamp; break;
case TH_SPEAKER:
cp= ts->speaker; break;
+ case TH_CAMERA:
+ cp= ts->camera; break;
+ case TH_EMPTY:
+ cp= ts->empty; break;
case TH_SELECT:
cp= ts->select; break;
case TH_ACTIVE:
@@ -367,6 +372,8 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
case TH_SEQ_MOVIE:
cp= ts->movie; break;
+ case TH_SEQ_MOVIECLIP:
+ cp= ts->movieclip; break;
case TH_SEQ_IMAGE:
cp= ts->image; break;
case TH_SEQ_SCENE:
@@ -381,6 +388,8 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
cp= ts->transition; break;
case TH_SEQ_META:
cp= ts->meta; break;
+ case TH_SEQ_PREVIEW:
+ cp= ts->preview_back; break;
case TH_CONSOLE_OUTPUT:
cp= ts->console_output; break;
@@ -471,11 +480,6 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
return (unsigned char *)cp;
}
-
-#define SETCOL(col, r, g, b, a) col[0]=r; col[1]=g; col[2]= b; col[3]= a;
-#define SETCOLF(col, r, g, b, a) col[0]=r*255; col[1]=g*255; col[2]= b*255; col[3]= a*255;
-#define SETCOLTEST(col, r, g, b, a) if(col[3]==0) {col[0]=r; col[1]=g; col[2]= b; col[3]= a;}
-
/* use this call to init new bone color sets in Theme */
static void ui_theme_init_boneColorSets(bTheme *btheme)
{
@@ -483,65 +487,65 @@ static void ui_theme_init_boneColorSets(bTheme *btheme)
/* define default color sets - currently we only define 15 of these, though that should be ample */
/* set 1 */
- SETCOL(btheme->tarm[0].solid, 0x9a, 0x00, 0x00, 255);
- SETCOL(btheme->tarm[0].select, 0xbd, 0x11, 0x11, 255);
- SETCOL(btheme->tarm[0].active, 0xf7, 0x0a, 0x0a, 255);
+ rgba_char_args_set(btheme->tarm[0].solid, 0x9a, 0x00, 0x00, 255);
+ rgba_char_args_set(btheme->tarm[0].select, 0xbd, 0x11, 0x11, 255);
+ rgba_char_args_set(btheme->tarm[0].active, 0xf7, 0x0a, 0x0a, 255);
/* set 2 */
- SETCOL(btheme->tarm[1].solid, 0xf7, 0x40, 0x18, 255);
- SETCOL(btheme->tarm[1].select, 0xf6, 0x69, 0x13, 255);
- SETCOL(btheme->tarm[1].active, 0xfa, 0x99, 0x00, 255);
+ rgba_char_args_set(btheme->tarm[1].solid, 0xf7, 0x40, 0x18, 255);
+ rgba_char_args_set(btheme->tarm[1].select, 0xf6, 0x69, 0x13, 255);
+ rgba_char_args_set(btheme->tarm[1].active, 0xfa, 0x99, 0x00, 255);
/* set 3 */
- SETCOL(btheme->tarm[2].solid, 0x1e, 0x91, 0x09, 255);
- SETCOL(btheme->tarm[2].select, 0x59, 0xb7, 0x0b, 255);
- SETCOL(btheme->tarm[2].active, 0x83, 0xef, 0x1d, 255);
+ rgba_char_args_set(btheme->tarm[2].solid, 0x1e, 0x91, 0x09, 255);
+ rgba_char_args_set(btheme->tarm[2].select, 0x59, 0xb7, 0x0b, 255);
+ rgba_char_args_set(btheme->tarm[2].active, 0x83, 0xef, 0x1d, 255);
/* set 4 */
- SETCOL(btheme->tarm[3].solid, 0x0a, 0x36, 0x94, 255);
- SETCOL(btheme->tarm[3].select, 0x36, 0x67, 0xdf, 255);
- SETCOL(btheme->tarm[3].active, 0x5e, 0xc1, 0xef, 255);
+ rgba_char_args_set(btheme->tarm[3].solid, 0x0a, 0x36, 0x94, 255);
+ rgba_char_args_set(btheme->tarm[3].select, 0x36, 0x67, 0xdf, 255);
+ rgba_char_args_set(btheme->tarm[3].active, 0x5e, 0xc1, 0xef, 255);
/* set 5 */
- SETCOL(btheme->tarm[4].solid, 0xa9, 0x29, 0x4e, 255);
- SETCOL(btheme->tarm[4].select, 0xc1, 0x41, 0x6a, 255);
- SETCOL(btheme->tarm[4].active, 0xf0, 0x5d, 0x91, 255);
+ rgba_char_args_set(btheme->tarm[4].solid, 0xa9, 0x29, 0x4e, 255);
+ rgba_char_args_set(btheme->tarm[4].select, 0xc1, 0x41, 0x6a, 255);
+ rgba_char_args_set(btheme->tarm[4].active, 0xf0, 0x5d, 0x91, 255);
/* set 6 */
- SETCOL(btheme->tarm[5].solid, 0x43, 0x0c, 0x78, 255);
- SETCOL(btheme->tarm[5].select, 0x54, 0x3a, 0xa3, 255);
- SETCOL(btheme->tarm[5].active, 0x87, 0x64, 0xd5, 255);
+ rgba_char_args_set(btheme->tarm[5].solid, 0x43, 0x0c, 0x78, 255);
+ rgba_char_args_set(btheme->tarm[5].select, 0x54, 0x3a, 0xa3, 255);
+ rgba_char_args_set(btheme->tarm[5].active, 0x87, 0x64, 0xd5, 255);
/* set 7 */
- SETCOL(btheme->tarm[6].solid, 0x24, 0x78, 0x5a, 255);
- SETCOL(btheme->tarm[6].select, 0x3c, 0x95, 0x79, 255);
- SETCOL(btheme->tarm[6].active, 0x6f, 0xb6, 0xab, 255);
+ rgba_char_args_set(btheme->tarm[6].solid, 0x24, 0x78, 0x5a, 255);
+ rgba_char_args_set(btheme->tarm[6].select, 0x3c, 0x95, 0x79, 255);
+ rgba_char_args_set(btheme->tarm[6].active, 0x6f, 0xb6, 0xab, 255);
/* set 8 */
- SETCOL(btheme->tarm[7].solid, 0x4b, 0x70, 0x7c, 255);
- SETCOL(btheme->tarm[7].select, 0x6a, 0x86, 0x91, 255);
- SETCOL(btheme->tarm[7].active, 0x9b, 0xc2, 0xcd, 255);
+ rgba_char_args_set(btheme->tarm[7].solid, 0x4b, 0x70, 0x7c, 255);
+ rgba_char_args_set(btheme->tarm[7].select, 0x6a, 0x86, 0x91, 255);
+ rgba_char_args_set(btheme->tarm[7].active, 0x9b, 0xc2, 0xcd, 255);
/* set 9 */
- SETCOL(btheme->tarm[8].solid, 0xf4, 0xc9, 0x0c, 255);
- SETCOL(btheme->tarm[8].select, 0xee, 0xc2, 0x36, 255);
- SETCOL(btheme->tarm[8].active, 0xf3, 0xff, 0x00, 255);
+ rgba_char_args_set(btheme->tarm[8].solid, 0xf4, 0xc9, 0x0c, 255);
+ rgba_char_args_set(btheme->tarm[8].select, 0xee, 0xc2, 0x36, 255);
+ rgba_char_args_set(btheme->tarm[8].active, 0xf3, 0xff, 0x00, 255);
/* set 10 */
- SETCOL(btheme->tarm[9].solid, 0x1e, 0x20, 0x24, 255);
- SETCOL(btheme->tarm[9].select, 0x48, 0x4c, 0x56, 255);
- SETCOL(btheme->tarm[9].active, 0xff, 0xff, 0xff, 255);
+ rgba_char_args_set(btheme->tarm[9].solid, 0x1e, 0x20, 0x24, 255);
+ rgba_char_args_set(btheme->tarm[9].select, 0x48, 0x4c, 0x56, 255);
+ rgba_char_args_set(btheme->tarm[9].active, 0xff, 0xff, 0xff, 255);
/* set 11 */
- SETCOL(btheme->tarm[10].solid, 0x6f, 0x2f, 0x6a, 255);
- SETCOL(btheme->tarm[10].select, 0x98, 0x45, 0xbe, 255);
- SETCOL(btheme->tarm[10].active, 0xd3, 0x30, 0xd6, 255);
+ rgba_char_args_set(btheme->tarm[10].solid, 0x6f, 0x2f, 0x6a, 255);
+ rgba_char_args_set(btheme->tarm[10].select, 0x98, 0x45, 0xbe, 255);
+ rgba_char_args_set(btheme->tarm[10].active, 0xd3, 0x30, 0xd6, 255);
/* set 12 */
- SETCOL(btheme->tarm[11].solid, 0x6c, 0x8e, 0x22, 255);
- SETCOL(btheme->tarm[11].select, 0x7f, 0xb0, 0x22, 255);
- SETCOL(btheme->tarm[11].active, 0xbb, 0xef, 0x5b, 255);
+ rgba_char_args_set(btheme->tarm[11].solid, 0x6c, 0x8e, 0x22, 255);
+ rgba_char_args_set(btheme->tarm[11].select, 0x7f, 0xb0, 0x22, 255);
+ rgba_char_args_set(btheme->tarm[11].active, 0xbb, 0xef, 0x5b, 255);
/* set 13 */
- SETCOL(btheme->tarm[12].solid, 0x8d, 0x8d, 0x8d, 255);
- SETCOL(btheme->tarm[12].select, 0xb0, 0xb0, 0xb0, 255);
- SETCOL(btheme->tarm[12].active, 0xde, 0xde, 0xde, 255);
+ rgba_char_args_set(btheme->tarm[12].solid, 0x8d, 0x8d, 0x8d, 255);
+ rgba_char_args_set(btheme->tarm[12].select, 0xb0, 0xb0, 0xb0, 255);
+ rgba_char_args_set(btheme->tarm[12].active, 0xde, 0xde, 0xde, 255);
/* set 14 */
- SETCOL(btheme->tarm[13].solid, 0x83, 0x43, 0x26, 255);
- SETCOL(btheme->tarm[13].select, 0x8b, 0x58, 0x11, 255);
- SETCOL(btheme->tarm[13].active, 0xbd, 0x6a, 0x11, 255);
+ rgba_char_args_set(btheme->tarm[13].solid, 0x83, 0x43, 0x26, 255);
+ rgba_char_args_set(btheme->tarm[13].select, 0x8b, 0x58, 0x11, 255);
+ rgba_char_args_set(btheme->tarm[13].active, 0xbd, 0x6a, 0x11, 255);
/* set 15 */
- SETCOL(btheme->tarm[14].solid, 0x08, 0x31, 0x0e, 255);
- SETCOL(btheme->tarm[14].select, 0x1c, 0x43, 0x0b, 255);
- SETCOL(btheme->tarm[14].active, 0x34, 0x62, 0x2b, 255);
+ rgba_char_args_set(btheme->tarm[14].solid, 0x08, 0x31, 0x0e, 255);
+ rgba_char_args_set(btheme->tarm[14].select, 0x1c, 0x43, 0x0b, 255);
+ rgba_char_args_set(btheme->tarm[14].active, 0x34, 0x62, 0x2b, 255);
/* reset flags too */
for (i = 0; i < 20; i++)
@@ -551,23 +555,23 @@ static void ui_theme_init_boneColorSets(bTheme *btheme)
/* use this call to init new variables in themespace, if they're same for all */
static void ui_theme_init_new_do(ThemeSpace *ts)
{
- SETCOLTEST(ts->header_text, 0, 0, 0, 255);
- SETCOLTEST(ts->header_title, 0, 0, 0, 255);
- SETCOLTEST(ts->header_text_hi, 255, 255, 255, 255);
+ rgba_char_args_test_set(ts->header_text, 0, 0, 0, 255);
+ rgba_char_args_test_set(ts->header_title, 0, 0, 0, 255);
+ rgba_char_args_test_set(ts->header_text_hi, 255, 255, 255, 255);
- SETCOLTEST(ts->panel_text, 0, 0, 0, 255);
- SETCOLTEST(ts->panel_title, 0, 0, 0, 255);
- SETCOLTEST(ts->panel_text_hi, 255, 255, 255, 255);
+ rgba_char_args_test_set(ts->panel_text, 0, 0, 0, 255);
+ rgba_char_args_test_set(ts->panel_title, 0, 0, 0, 255);
+ rgba_char_args_test_set(ts->panel_text_hi, 255, 255, 255, 255);
- SETCOLTEST(ts->button, 145, 145, 145, 245);
- SETCOLTEST(ts->button_title, 0, 0, 0, 255);
- SETCOLTEST(ts->button_text, 0, 0, 0, 255);
- SETCOLTEST(ts->button_text_hi, 255, 255, 255, 255);
+ rgba_char_args_test_set(ts->button, 145, 145, 145, 245);
+ rgba_char_args_test_set(ts->button_title, 0, 0, 0, 255);
+ rgba_char_args_test_set(ts->button_text, 0, 0, 0, 255);
+ rgba_char_args_test_set(ts->button_text_hi, 255, 255, 255, 255);
- SETCOLTEST(ts->list, 165, 165, 165, 255);
- SETCOLTEST(ts->list_title, 0, 0, 0, 255);
- SETCOLTEST(ts->list_text, 0, 0, 0, 255);
- SETCOLTEST(ts->list_text_hi, 255, 255, 255, 255);
+ rgba_char_args_test_set(ts->list, 165, 165, 165, 255);
+ rgba_char_args_test_set(ts->list_title, 0, 0, 0, 255);
+ rgba_char_args_test_set(ts->list_text, 0, 0, 0, 255);
+ rgba_char_args_test_set(ts->list_text_hi, 255, 255, 255, 255);
}
static void ui_theme_init_new(bTheme *btheme)
@@ -602,11 +606,11 @@ void ui_theme_init_default(void)
bTheme *btheme;
/* we search for the theme with name Default */
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
- if(strcmp("Default", btheme->name)==0) break;
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
+ if (strcmp("Default", btheme->name)==0) break;
}
- if(btheme==NULL) {
+ if (btheme==NULL) {
btheme= MEM_callocN(sizeof(bTheme), "theme");
BLI_addtail(&U.themes, btheme);
strcpy(btheme->name, "Default");
@@ -618,7 +622,7 @@ void ui_theme_init_default(void)
ui_widget_color_init(&btheme->tui);
btheme->tui.iconfile[0]= 0;
btheme->tui.panel.show_header = FALSE;
- SETCOL(btheme->tui.panel.header, 0, 0, 0, 25);
+ rgba_char_args_set(btheme->tui.panel.header, 0, 0, 0, 25);
/* Bone Color Sets */
ui_theme_init_boneColorSets(btheme);
@@ -627,117 +631,119 @@ void ui_theme_init_default(void)
ui_theme_init_new(btheme);
/* space view3d */
- SETCOLF(btheme->tv3d.back, 0.225, 0.225, 0.225, 1.0);
- SETCOL(btheme->tv3d.text, 0, 0, 0, 255);
- SETCOL(btheme->tv3d.text_hi, 255, 255, 255, 255);
+ rgba_char_args_set_fl(btheme->tv3d.back, 0.225, 0.225, 0.225, 1.0);
+ rgba_char_args_set(btheme->tv3d.text, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.text_hi, 255, 255, 255, 255);
- SETCOLF(btheme->tv3d.header, 0.45, 0.45, 0.45, 1.0);
- SETCOLF(btheme->tv3d.button, 0.45, 0.45, 0.45, 1.0);
- SETCOL(btheme->tv3d.panel, 165, 165, 165, 127);
+ rgba_char_args_set_fl(btheme->tv3d.header, 0.45, 0.45, 0.45, 1.0);
+ rgba_char_args_set_fl(btheme->tv3d.button, 0.45, 0.45, 0.45, 1.0);
+ rgba_char_args_set(btheme->tv3d.panel, 165, 165, 165, 127);
- SETCOL(btheme->tv3d.shade1, 160, 160, 160, 100);
- SETCOL(btheme->tv3d.shade2, 0x7f, 0x70, 0x70, 100);
-
- SETCOLF(btheme->tv3d.grid, 0.251, 0.251, 0.251, 1.0);
- SETCOL(btheme->tv3d.wire, 0x0, 0x0, 0x0, 255);
- SETCOL(btheme->tv3d.lamp, 0, 0, 0, 40);
- SETCOL(btheme->tv3d.speaker, 0, 0, 0, 255);
- SETCOL(btheme->tv3d.select, 241, 88, 0, 255);
- SETCOL(btheme->tv3d.active, 255, 170, 64, 255);
- SETCOL(btheme->tv3d.group, 8, 48, 8, 255);
- SETCOL(btheme->tv3d.group_active, 85, 187, 85, 255);
- SETCOL(btheme->tv3d.transform, 0xff, 0xff, 0xff, 255);
- SETCOL(btheme->tv3d.vertex, 0, 0, 0, 255);
- SETCOL(btheme->tv3d.vertex_select, 255, 133, 0, 255);
+ rgba_char_args_set(btheme->tv3d.shade1, 160, 160, 160, 100);
+ rgba_char_args_set(btheme->tv3d.shade2, 0x7f, 0x70, 0x70, 100);
+
+ rgba_char_args_set_fl(btheme->tv3d.grid, 0.251, 0.251, 0.251, 1.0);
+ rgba_char_args_set(btheme->tv3d.wire, 0x0, 0x0, 0x0, 255);
+ rgba_char_args_set(btheme->tv3d.lamp, 0, 0, 0, 40);
+ rgba_char_args_set(btheme->tv3d.speaker, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.camera, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.empty, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.select, 241, 88, 0, 255);
+ rgba_char_args_set(btheme->tv3d.active, 255, 170, 64, 255);
+ rgba_char_args_set(btheme->tv3d.group, 8, 48, 8, 255);
+ rgba_char_args_set(btheme->tv3d.group_active, 85, 187, 85, 255);
+ rgba_char_args_set(btheme->tv3d.transform, 0xff, 0xff, 0xff, 255);
+ rgba_char_args_set(btheme->tv3d.vertex, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.vertex_select, 255, 133, 0, 255);
btheme->tv3d.vertex_size= 3;
btheme->tv3d.outline_width= 1;
- SETCOL(btheme->tv3d.edge, 0x0, 0x0, 0x0, 255);
- SETCOL(btheme->tv3d.edge_select, 255, 160, 0, 255);
- SETCOL(btheme->tv3d.edge_seam, 219, 37, 18, 255);
- SETCOL(btheme->tv3d.edge_facesel, 75, 75, 75, 255);
- SETCOL(btheme->tv3d.face, 0, 0, 0, 18);
- SETCOL(btheme->tv3d.face_select, 255, 133, 0, 60);
- SETCOL(btheme->tv3d.normal, 0x22, 0xDD, 0xDD, 255);
- SETCOL(btheme->tv3d.vertex_normal, 0x23, 0x61, 0xDD, 255);
- SETCOL(btheme->tv3d.face_dot, 255, 133, 0, 255);
- SETCOL(btheme->tv3d.editmesh_active, 255, 255, 255, 128);
- SETCOLF(btheme->tv3d.edge_crease, 0.8, 0, 0.6, 1.0);
- SETCOL(btheme->tv3d.edge_sharp, 0, 255, 255, 255);
- SETCOL(btheme->tv3d.header_text, 0, 0, 0, 255);
- SETCOL(btheme->tv3d.header_text_hi, 255, 255, 255, 255);
- SETCOL(btheme->tv3d.button_text, 0, 0, 0, 255);
- SETCOL(btheme->tv3d.button_text_hi, 255, 255, 255, 255);
- SETCOL(btheme->tv3d.button_title, 0, 0, 0, 255);
- SETCOL(btheme->tv3d.title, 0, 0, 0, 255);
- SETCOL(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255);
- SETCOL(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51);
+ rgba_char_args_set(btheme->tv3d.edge, 0x0, 0x0, 0x0, 255);
+ rgba_char_args_set(btheme->tv3d.edge_select, 255, 160, 0, 255);
+ rgba_char_args_set(btheme->tv3d.edge_seam, 219, 37, 18, 255);
+ rgba_char_args_set(btheme->tv3d.edge_facesel, 75, 75, 75, 255);
+ rgba_char_args_set(btheme->tv3d.face, 0, 0, 0, 18);
+ rgba_char_args_set(btheme->tv3d.face_select, 255, 133, 0, 60);
+ rgba_char_args_set(btheme->tv3d.normal, 0x22, 0xDD, 0xDD, 255);
+ rgba_char_args_set(btheme->tv3d.vertex_normal, 0x23, 0x61, 0xDD, 255);
+ rgba_char_args_set(btheme->tv3d.face_dot, 255, 133, 0, 255);
+ rgba_char_args_set(btheme->tv3d.editmesh_active, 255, 255, 255, 128);
+ rgba_char_args_set_fl(btheme->tv3d.edge_crease, 0.8, 0, 0.6, 1.0);
+ rgba_char_args_set(btheme->tv3d.edge_sharp, 0, 255, 255, 255);
+ rgba_char_args_set(btheme->tv3d.header_text, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.header_text_hi, 255, 255, 255, 255);
+ rgba_char_args_set(btheme->tv3d.button_text, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.button_text_hi, 255, 255, 255, 255);
+ rgba_char_args_set(btheme->tv3d.button_title, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.title, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255);
+ rgba_char_args_set(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51);
btheme->tv3d.facedot_size= 4;
- SETCOL(btheme->tv3d.extra_edge_len, 32, 0, 0, 255);
- SETCOL(btheme->tv3d.extra_face_area, 0, 32, 0, 255);
- SETCOL(btheme->tv3d.extra_face_angle, 0, 0, 128, 255);
+ rgba_char_args_set(btheme->tv3d.extra_edge_len, 32, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.extra_face_area, 0, 32, 0, 255);
+ rgba_char_args_set(btheme->tv3d.extra_face_angle, 0, 0, 128, 255);
- SETCOL(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255);
+ rgba_char_args_set(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255);
- SETCOL(btheme->tv3d.nurb_uline, 0x90, 0x90, 0x00, 255);
- SETCOL(btheme->tv3d.nurb_vline, 0x80, 0x30, 0x60, 255);
- SETCOL(btheme->tv3d.nurb_sel_uline, 0xf0, 0xff, 0x40, 255);
- SETCOL(btheme->tv3d.nurb_sel_vline, 0xf0, 0x90, 0xa0, 255);
+ rgba_char_args_set(btheme->tv3d.nurb_uline, 0x90, 0x90, 0x00, 255);
+ rgba_char_args_set(btheme->tv3d.nurb_vline, 0x80, 0x30, 0x60, 255);
+ rgba_char_args_set(btheme->tv3d.nurb_sel_uline, 0xf0, 0xff, 0x40, 255);
+ rgba_char_args_set(btheme->tv3d.nurb_sel_vline, 0xf0, 0x90, 0xa0, 255);
- SETCOL(btheme->tv3d.handle_free, 0, 0, 0, 255);
- SETCOL(btheme->tv3d.handle_auto, 0x90, 0x90, 0x00, 255);
- SETCOL(btheme->tv3d.handle_vect, 0x40, 0x90, 0x30, 255);
- SETCOL(btheme->tv3d.handle_align, 0x80, 0x30, 0x60, 255);
- SETCOL(btheme->tv3d.handle_sel_free, 0, 0, 0, 255);
- SETCOL(btheme->tv3d.handle_sel_auto, 0xf0, 0xff, 0x40, 255);
- SETCOL(btheme->tv3d.handle_sel_vect, 0x40, 0xc0, 0x30, 255);
- SETCOL(btheme->tv3d.handle_sel_align, 0xf0, 0x90, 0xa0, 255);
+ rgba_char_args_set(btheme->tv3d.handle_free, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.handle_auto, 0x90, 0x90, 0x00, 255);
+ rgba_char_args_set(btheme->tv3d.handle_vect, 0x40, 0x90, 0x30, 255);
+ rgba_char_args_set(btheme->tv3d.handle_align, 0x80, 0x30, 0x60, 255);
+ rgba_char_args_set(btheme->tv3d.handle_sel_free, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.handle_sel_auto, 0xf0, 0xff, 0x40, 255);
+ rgba_char_args_set(btheme->tv3d.handle_sel_vect, 0x40, 0xc0, 0x30, 255);
+ rgba_char_args_set(btheme->tv3d.handle_sel_align, 0xf0, 0x90, 0xa0, 255);
- SETCOL(btheme->tv3d.act_spline, 0xdb, 0x25, 0x12, 255);
- SETCOL(btheme->tv3d.lastsel_point, 0xff, 0xff, 0xff, 255);
+ rgba_char_args_set(btheme->tv3d.act_spline, 0xdb, 0x25, 0x12, 255);
+ rgba_char_args_set(btheme->tv3d.lastsel_point, 0xff, 0xff, 0xff, 255);
- SETCOL(btheme->tv3d.bone_solid, 200, 200, 200, 255);
- SETCOL(btheme->tv3d.bone_pose, 80, 200, 255, 80); // alpha 80 is not meant editable, used for wire+action draw
+ rgba_char_args_set(btheme->tv3d.bone_solid, 200, 200, 200, 255);
+ rgba_char_args_set(btheme->tv3d.bone_pose, 80, 200, 255, 80); // alpha 80 is not meant editable, used for wire+action draw
- SETCOL(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
- SETCOL(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
+ rgba_char_args_set(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
+ rgba_char_args_set(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
/* space buttons */
/* to have something initialized */
btheme->tbuts= btheme->tv3d;
- SETCOLF(btheme->tbuts.back, 0.45, 0.45, 0.45, 1.0);
- SETCOL(btheme->tbuts.panel, 0x82, 0x82, 0x82, 255);
+ rgba_char_args_set_fl(btheme->tbuts.back, 0.45, 0.45, 0.45, 1.0);
+ rgba_char_args_set(btheme->tbuts.panel, 0x82, 0x82, 0x82, 255);
/* graph editor */
btheme->tipo= btheme->tv3d;
- SETCOLF(btheme->tipo.back, 0.42, 0.42, 0.42, 1.0);
- SETCOLF(btheme->tipo.list, 0.4, 0.4, 0.4, 1.0);
- SETCOL(btheme->tipo.grid, 94, 94, 94, 255);
- SETCOL(btheme->tipo.panel, 255, 255, 255, 150);
- SETCOL(btheme->tipo.shade1, 150, 150, 150, 100); /* scrollbars */
- SETCOL(btheme->tipo.shade2, 0x70, 0x70, 0x70, 100);
- SETCOL(btheme->tipo.vertex, 0, 0, 0, 255);
- SETCOL(btheme->tipo.vertex_select, 255, 133, 0, 255);
- SETCOL(btheme->tipo.hilite, 0x60, 0xc0, 0x40, 255);
+ rgba_char_args_set_fl(btheme->tipo.back, 0.42, 0.42, 0.42, 1.0);
+ rgba_char_args_set_fl(btheme->tipo.list, 0.4, 0.4, 0.4, 1.0);
+ rgba_char_args_set(btheme->tipo.grid, 94, 94, 94, 255);
+ rgba_char_args_set(btheme->tipo.panel, 255, 255, 255, 150);
+ rgba_char_args_set(btheme->tipo.shade1, 150, 150, 150, 100); /* scrollbars */
+ rgba_char_args_set(btheme->tipo.shade2, 0x70, 0x70, 0x70, 100);
+ rgba_char_args_set(btheme->tipo.vertex, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tipo.vertex_select, 255, 133, 0, 255);
+ rgba_char_args_set(btheme->tipo.hilite, 0x60, 0xc0, 0x40, 255);
btheme->tipo.vertex_size= 3;
- SETCOL(btheme->tipo.handle_vertex, 0, 0, 0, 255);
- SETCOL(btheme->tipo.handle_vertex_select, 255, 133, 0, 255);
- SETCOL(btheme->tipo.handle_auto_clamped, 0x99, 0x40, 0x30, 255);
- SETCOL(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255);
+ rgba_char_args_set(btheme->tipo.handle_vertex, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tipo.handle_vertex_select, 255, 133, 0, 255);
+ rgba_char_args_set(btheme->tipo.handle_auto_clamped, 0x99, 0x40, 0x30, 255);
+ rgba_char_args_set(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255);
btheme->tipo.handle_vertex_size= 4;
- SETCOL(btheme->tipo.ds_channel, 82, 96, 110, 255);
- SETCOL(btheme->tipo.ds_subchannel, 124, 137, 150, 255);
- SETCOL(btheme->tipo.group, 79, 101, 73, 255);
- SETCOL(btheme->tipo.group_active, 135, 177, 125, 255);
+ rgba_char_args_set(btheme->tipo.ds_channel, 82, 96, 110, 255);
+ rgba_char_args_set(btheme->tipo.ds_subchannel, 124, 137, 150, 255);
+ rgba_char_args_set(btheme->tipo.group, 79, 101, 73, 255);
+ rgba_char_args_set(btheme->tipo.group_active, 135, 177, 125, 255);
/* dopesheet */
btheme->tact= btheme->tipo;
- SETCOL(btheme->tact.strip, 12, 10, 10, 128);
- SETCOL(btheme->tact.strip_select, 255, 140, 0, 255);
+ rgba_char_args_set(btheme->tact.strip, 12, 10, 10, 128);
+ rgba_char_args_set(btheme->tact.strip_select, 255, 140, 0, 255);
/* space nla */
btheme->tnla= btheme->tact;
@@ -745,131 +751,132 @@ void ui_theme_init_default(void)
/* space file */
/* to have something initialized */
btheme->tfile= btheme->tv3d;
- SETCOLF(btheme->tfile.back, 0.3, 0.3, 0.3, 1);
- SETCOLF(btheme->tfile.panel, 0.3, 0.3, 0.3, 1);
- SETCOLF(btheme->tfile.list, 0.4, 0.4, 0.4, 1);
- SETCOL(btheme->tfile.text, 250, 250, 250, 255);
- SETCOL(btheme->tfile.text_hi, 15, 15, 15, 255);
- SETCOL(btheme->tfile.panel, 145, 145, 145, 255); // bookmark/ui regions
- SETCOL(btheme->tfile.active, 130, 130, 130, 255); // selected files
- SETCOL(btheme->tfile.hilite, 255, 140, 25, 255); // selected files
+ rgba_char_args_set_fl(btheme->tfile.back, 0.3, 0.3, 0.3, 1);
+ rgba_char_args_set_fl(btheme->tfile.panel, 0.3, 0.3, 0.3, 1);
+ rgba_char_args_set_fl(btheme->tfile.list, 0.4, 0.4, 0.4, 1);
+ rgba_char_args_set(btheme->tfile.text, 250, 250, 250, 255);
+ rgba_char_args_set(btheme->tfile.text_hi, 15, 15, 15, 255);
+ rgba_char_args_set(btheme->tfile.panel, 145, 145, 145, 255); // bookmark/ui regions
+ rgba_char_args_set(btheme->tfile.active, 130, 130, 130, 255); // selected files
+ rgba_char_args_set(btheme->tfile.hilite, 255, 140, 25, 255); // selected files
- SETCOL(btheme->tfile.grid, 250, 250, 250, 255);
- SETCOL(btheme->tfile.image, 250, 250, 250, 255);
- SETCOL(btheme->tfile.movie, 250, 250, 250, 255);
- SETCOL(btheme->tfile.scene, 250, 250, 250, 255);
+ rgba_char_args_set(btheme->tfile.grid, 250, 250, 250, 255);
+ rgba_char_args_set(btheme->tfile.image, 250, 250, 250, 255);
+ rgba_char_args_set(btheme->tfile.movie, 250, 250, 250, 255);
+ rgba_char_args_set(btheme->tfile.scene, 250, 250, 250, 255);
/* space seq */
btheme->tseq= btheme->tv3d;
- SETCOL(btheme->tseq.back, 116, 116, 116, 255);
- SETCOL(btheme->tseq.movie, 81, 105, 135, 255);
- SETCOL(btheme->tseq.image, 109, 88, 129, 255);
- SETCOL(btheme->tseq.scene, 78, 152, 62, 255);
- SETCOL(btheme->tseq.audio, 46, 143, 143, 255);
- SETCOL(btheme->tseq.effect, 169, 84, 124, 255);
- SETCOL(btheme->tseq.plugin, 126, 126, 80, 255);
- SETCOL(btheme->tseq.transition, 162, 95, 111, 255);
- SETCOL(btheme->tseq.meta, 109, 145, 131, 255);
-
+ rgba_char_args_set(btheme->tseq.back, 116, 116, 116, 255);
+ rgba_char_args_set(btheme->tseq.movie, 81, 105, 135, 255);
+ rgba_char_args_set(btheme->tseq.movieclip, 32, 32, 143, 255);
+ rgba_char_args_set(btheme->tseq.image, 109, 88, 129, 255);
+ rgba_char_args_set(btheme->tseq.scene, 78, 152, 62, 255);
+ rgba_char_args_set(btheme->tseq.audio, 46, 143, 143, 255);
+ rgba_char_args_set(btheme->tseq.effect, 169, 84, 124, 255);
+ rgba_char_args_set(btheme->tseq.plugin, 126, 126, 80, 255);
+ rgba_char_args_set(btheme->tseq.transition, 162, 95, 111, 255);
+ rgba_char_args_set(btheme->tseq.meta, 109, 145, 131, 255);
+ rgba_char_args_set(btheme->tseq.preview_back, 0, 0, 0, 255);
/* space image */
btheme->tima= btheme->tv3d;
- SETCOL(btheme->tima.back, 53, 53, 53, 255);
- SETCOL(btheme->tima.vertex, 0, 0, 0, 255);
- SETCOL(btheme->tima.vertex_select, 255, 133, 0, 255);
+ rgba_char_args_set(btheme->tima.back, 53, 53, 53, 255);
+ rgba_char_args_set(btheme->tima.vertex, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tima.vertex_select, 255, 133, 0, 255);
btheme->tima.vertex_size= 3;
btheme->tima.facedot_size= 3;
- SETCOL(btheme->tima.face, 255, 255, 255, 10);
- SETCOL(btheme->tima.face_select, 255, 133, 0, 60);
- SETCOL(btheme->tima.editmesh_active, 255, 255, 255, 128);
- SETCOLF(btheme->tima.preview_back, 0.45, 0.45, 0.45, 1.0);
- SETCOLF(btheme->tima.preview_stitch_face, 0.5, 0.5, 0.0, 0.2);
- SETCOLF(btheme->tima.preview_stitch_edge, 1.0, 0.0, 1.0, 0.2);
- SETCOLF(btheme->tima.preview_stitch_vert, 0.0, 0.0, 1.0, 0.2);
- SETCOLF(btheme->tima.preview_stitch_stitchable, 0.0, 1.0, 0.0, 1.0);
- SETCOLF(btheme->tima.preview_stitch_unstitchable, 1.0, 0.0, 0.0, 1.0);
+ rgba_char_args_set(btheme->tima.face, 255, 255, 255, 10);
+ rgba_char_args_set(btheme->tima.face_select, 255, 133, 0, 60);
+ rgba_char_args_set(btheme->tima.editmesh_active, 255, 255, 255, 128);
+ rgba_char_args_set_fl(btheme->tima.preview_back, 0.45, 0.45, 0.45, 1.0);
+ rgba_char_args_set_fl(btheme->tima.preview_stitch_face, 0.5, 0.5, 0.0, 0.2);
+ rgba_char_args_set_fl(btheme->tima.preview_stitch_edge, 1.0, 0.0, 1.0, 0.2);
+ rgba_char_args_set_fl(btheme->tima.preview_stitch_vert, 0.0, 0.0, 1.0, 0.2);
+ rgba_char_args_set_fl(btheme->tima.preview_stitch_stitchable, 0.0, 1.0, 0.0, 1.0);
+ rgba_char_args_set_fl(btheme->tima.preview_stitch_unstitchable, 1.0, 0.0, 0.0, 1.0);
/* space text */
btheme->text= btheme->tv3d;
- SETCOL(btheme->text.back, 153, 153, 153, 255);
- SETCOL(btheme->text.shade1, 143, 143, 143, 255);
- SETCOL(btheme->text.shade2, 0xc6, 0x77, 0x77, 255);
- SETCOL(btheme->text.hilite, 255, 0, 0, 255);
+ rgba_char_args_set(btheme->text.back, 153, 153, 153, 255);
+ rgba_char_args_set(btheme->text.shade1, 143, 143, 143, 255);
+ rgba_char_args_set(btheme->text.shade2, 0xc6, 0x77, 0x77, 255);
+ rgba_char_args_set(btheme->text.hilite, 255, 0, 0, 255);
/* syntax highlighting */
- SETCOL(btheme->text.syntaxn, 0, 0, 200, 255); /* Numbers Blue*/
- SETCOL(btheme->text.syntaxl, 100, 0, 0, 255); /* Strings red */
- SETCOL(btheme->text.syntaxc, 0, 100, 50, 255); /* Comments greenish */
- SETCOL(btheme->text.syntaxv, 95, 95, 0, 255); /* Special */
- SETCOL(btheme->text.syntaxb, 128, 0, 80, 255); /* Builtin, red-purple */
+ rgba_char_args_set(btheme->text.syntaxn, 0, 0, 200, 255); /* Numbers Blue*/
+ rgba_char_args_set(btheme->text.syntaxl, 100, 0, 0, 255); /* Strings red */
+ rgba_char_args_set(btheme->text.syntaxc, 0, 100, 50, 255); /* Comments greenish */
+ rgba_char_args_set(btheme->text.syntaxv, 95, 95, 0, 255); /* Special */
+ rgba_char_args_set(btheme->text.syntaxb, 128, 0, 80, 255); /* Builtin, red-purple */
/* space oops */
btheme->toops= btheme->tv3d;
- SETCOLF(btheme->toops.back, 0.45, 0.45, 0.45, 1.0);
+ rgba_char_args_set_fl(btheme->toops.back, 0.45, 0.45, 0.45, 1.0);
- SETCOLF(btheme->toops.match, 0.2, 0.5, 0.2, 0.3); /* highlighting search match - soft green*/
- SETCOLF(btheme->toops.selected_highlight, 0.51, 0.53, 0.55, 0.3);
+ rgba_char_args_set_fl(btheme->toops.match, 0.2, 0.5, 0.2, 0.3); /* highlighting search match - soft green*/
+ rgba_char_args_set_fl(btheme->toops.selected_highlight, 0.51, 0.53, 0.55, 0.3);
/* space info */
btheme->tinfo= btheme->tv3d;
- SETCOLF(btheme->tinfo.back, 0.45, 0.45, 0.45, 1.0);
+ rgba_char_args_set_fl(btheme->tinfo.back, 0.45, 0.45, 0.45, 1.0);
/* space user preferences */
btheme->tuserpref= btheme->tv3d;
- SETCOLF(btheme->tuserpref.back, 0.45, 0.45, 0.45, 1.0);
+ rgba_char_args_set_fl(btheme->tuserpref.back, 0.45, 0.45, 0.45, 1.0);
/* space console */
btheme->tconsole= btheme->tv3d;
- SETCOL(btheme->tconsole.back, 0, 0, 0, 255);
- SETCOL(btheme->tconsole.console_output, 96, 128, 255, 255);
- SETCOL(btheme->tconsole.console_input, 255, 255, 255, 255);
- SETCOL(btheme->tconsole.console_info, 0, 170, 0, 255);
- SETCOL(btheme->tconsole.console_error, 220, 96, 96, 255);
- SETCOL(btheme->tconsole.console_cursor, 220, 96, 96, 255);
+ rgba_char_args_set(btheme->tconsole.back, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tconsole.console_output, 96, 128, 255, 255);
+ rgba_char_args_set(btheme->tconsole.console_input, 255, 255, 255, 255);
+ rgba_char_args_set(btheme->tconsole.console_info, 0, 170, 0, 255);
+ rgba_char_args_set(btheme->tconsole.console_error, 220, 96, 96, 255);
+ rgba_char_args_set(btheme->tconsole.console_cursor, 220, 96, 96, 255);
/* space time */
btheme->ttime= btheme->tv3d;
- SETCOLF(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0);
- SETCOLF(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0);
- SETCOL(btheme->ttime.shade1, 173, 173, 173, 255); // sliders
+ rgba_char_args_set_fl(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0);
+ rgba_char_args_set_fl(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0);
+ rgba_char_args_set(btheme->ttime.shade1, 173, 173, 173, 255); // sliders
/* space node, re-uses syntax color storage */
btheme->tnode= btheme->tv3d;
- SETCOL(btheme->tnode.edge_select, 255, 255, 255, 255);
- SETCOL(btheme->tnode.syntaxl, 155, 155, 155, 160); /* TH_NODE, backdrop */
- SETCOL(btheme->tnode.syntaxn, 100, 100, 100, 255); /* in/output */
- SETCOL(btheme->tnode.syntaxb, 108, 105, 111, 255); /* operator */
- SETCOL(btheme->tnode.syntaxv, 104, 106, 117, 255); /* generator */
- SETCOL(btheme->tnode.syntaxc, 105, 117, 110, 255); /* group */
+ rgba_char_args_set(btheme->tnode.edge_select, 255, 255, 255, 255);
+ rgba_char_args_set(btheme->tnode.syntaxl, 155, 155, 155, 160); /* TH_NODE, backdrop */
+ rgba_char_args_set(btheme->tnode.syntaxn, 100, 100, 100, 255); /* in/output */
+ rgba_char_args_set(btheme->tnode.syntaxb, 108, 105, 111, 255); /* operator */
+ rgba_char_args_set(btheme->tnode.syntaxv, 104, 106, 117, 255); /* generator */
+ rgba_char_args_set(btheme->tnode.syntaxc, 105, 117, 110, 255); /* group */
btheme->tnode.noodle_curving = 5;
/* space logic */
btheme->tlogic= btheme->tv3d;
- SETCOL(btheme->tlogic.back, 100, 100, 100, 255);
+ rgba_char_args_set(btheme->tlogic.back, 100, 100, 100, 255);
/* space clip */
btheme->tclip= btheme->tv3d;
- SETCOL(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255);
- SETCOL(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255);
- SETCOL(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255);
- SETCOL(btheme->tclip.sel_marker, 0xff, 0xff, 0x00, 255);
- SETCOL(btheme->tclip.dis_marker, 0x7f, 0x00, 0x00, 255);
- SETCOL(btheme->tclip.lock_marker, 0x7f, 0x7f, 0x7f, 255);
- SETCOL(btheme->tclip.path_before, 0xff, 0x00, 0x00, 255);
- SETCOL(btheme->tclip.path_after, 0x00, 0x00, 0xff, 255);
- SETCOL(btheme->tclip.grid, 0x5e, 0x5e, 0x5e, 255);
- SETCOL(btheme->tclip.cframe, 0x60, 0xc0, 0x40, 255);
- SETCOL(btheme->tclip.handle_vertex, 0x00, 0x00, 0x00, 0xff);
- SETCOL(btheme->tclip.handle_vertex_select, 0xff, 0xff, 0, 0xff);
+ rgba_char_args_set(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255);
+ rgba_char_args_set(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255);
+ rgba_char_args_set(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255);
+ rgba_char_args_set(btheme->tclip.sel_marker, 0xff, 0xff, 0x00, 255);
+ rgba_char_args_set(btheme->tclip.dis_marker, 0x7f, 0x00, 0x00, 255);
+ rgba_char_args_set(btheme->tclip.lock_marker, 0x7f, 0x7f, 0x7f, 255);
+ rgba_char_args_set(btheme->tclip.path_before, 0xff, 0x00, 0x00, 255);
+ rgba_char_args_set(btheme->tclip.path_after, 0x00, 0x00, 0xff, 255);
+ rgba_char_args_set(btheme->tclip.grid, 0x5e, 0x5e, 0x5e, 255);
+ rgba_char_args_set(btheme->tclip.cframe, 0x60, 0xc0, 0x40, 255);
+ rgba_char_args_set(btheme->tclip.handle_vertex, 0x00, 0x00, 0x00, 0xff);
+ rgba_char_args_set(btheme->tclip.handle_vertex_select, 0xff, 0xff, 0, 0xff);
btheme->tclip.handle_vertex_size= 4;
}
void UI_SetTheme(int spacetype, int regionid)
{
- if(spacetype==0) { // called for safety, when delete themes
+ if (spacetype==0) { // called for safety, when delete themes
theme_active= U.themes.first;
theme_spacetype= SPACE_VIEW3D;
theme_regionid= RGN_TYPE_WINDOW;
@@ -1181,16 +1188,16 @@ void init_userdef_do_versions(void)
// countall();
/* the UserDef struct is not corrected with do_versions() .... ugh! */
- if(U.wheellinescroll == 0) U.wheellinescroll = 3;
- if(U.menuthreshold1==0) {
+ if (U.wheellinescroll == 0) U.wheellinescroll = 3;
+ if (U.menuthreshold1==0) {
U.menuthreshold1= 5;
U.menuthreshold2= 2;
}
- if(U.tb_leftmouse==0) {
+ if (U.tb_leftmouse==0) {
U.tb_leftmouse= 5;
U.tb_rightmouse= 5;
}
- if(U.mixbufsize==0) U.mixbufsize= 2048;
+ if (U.mixbufsize==0) U.mixbufsize= 2048;
if (strcmp(U.tempdir, "/") == 0) {
BLI_system_temporary_dir(U.tempdir);
}
@@ -1203,14 +1210,18 @@ void init_userdef_do_versions(void)
// XXX error(STRINGIFY(BLENDER_STARTUP_FILE)" is buggy, please consider removing it.\n");
}
/* transform widget settings */
- if(U.tw_hotspot==0) {
+ if (U.tw_hotspot==0) {
U.tw_hotspot= 14;
U.tw_size= 20; // percentage of window size
U.tw_handlesize= 16; // percentage of widget radius
}
- if(U.pad_rot_angle==0)
+ if (U.pad_rot_angle==0)
U.pad_rot_angle= 15;
-
+ /* graph editor - unselected F-Curve visibility */
+ if (U.fcu_inactive_alpha == 0) {
+ U.fcu_inactive_alpha = 0.25f;
+ }
+
/* signal for derivedmesh to use colorband */
/* run in case this was on and is now off in the user prefs [#28096] */
vDM_ColorBand_store((U.flag & USER_CUSTOM_RANGE) ? (&U.coba_weight):NULL);
@@ -1232,19 +1243,19 @@ void init_userdef_do_versions(void)
U.uiflag |= USER_GLOBALUNDO;
if (U.undosteps==0) U.undosteps=32;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* check for alpha==0 is safe, then color was never set */
- if(btheme->tv3d.edge_seam[3]==0) {
- SETCOL(btheme->tv3d.edge_seam, 230, 150, 50, 255);
+ if (btheme->tv3d.edge_seam[3]==0) {
+ rgba_char_args_set(btheme->tv3d.edge_seam, 230, 150, 50, 255);
}
- if(btheme->tv3d.normal[3]==0) {
- SETCOL(btheme->tv3d.normal, 0x22, 0xDD, 0xDD, 255);
+ if (btheme->tv3d.normal[3]==0) {
+ rgba_char_args_set(btheme->tv3d.normal, 0x22, 0xDD, 0xDD, 255);
}
- if(btheme->tv3d.vertex_normal[3]==0) {
- SETCOL(btheme->tv3d.vertex_normal, 0x23, 0x61, 0xDD, 255);
+ if (btheme->tv3d.vertex_normal[3]==0) {
+ rgba_char_args_set(btheme->tv3d.vertex_normal, 0x23, 0x61, 0xDD, 255);
}
- if(btheme->tv3d.face_dot[3]==0) {
- SETCOL(btheme->tv3d.face_dot, 255, 138, 48, 255);
+ if (btheme->tv3d.face_dot[3]==0) {
+ rgba_char_args_set(btheme->tv3d.face_dot, 255, 138, 48, 255);
btheme->tv3d.facedot_size= 4;
}
}
@@ -1257,89 +1268,89 @@ void init_userdef_do_versions(void)
if (bmain->versionfile <= 236) {
bTheme *btheme;
/* new space type */
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* check for alpha==0 is safe, then color was never set */
- if(btheme->ttime.back[3]==0) {
+ if (btheme->ttime.back[3]==0) {
// copied from ui_theme_init_default
btheme->ttime= btheme->tv3d;
- SETCOLF(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0);
- SETCOLF(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0);
- SETCOL(btheme->ttime.shade1, 173, 173, 173, 255); // sliders
+ rgba_char_args_set_fl(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0);
+ rgba_char_args_set_fl(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0);
+ rgba_char_args_set(btheme->ttime.shade1, 173, 173, 173, 255); // sliders
}
- if(btheme->text.syntaxn[3]==0) {
- SETCOL(btheme->text.syntaxn, 0, 0, 200, 255); /* Numbers Blue*/
- SETCOL(btheme->text.syntaxl, 100, 0, 0, 255); /* Strings red */
- SETCOL(btheme->text.syntaxc, 0, 100, 50, 255); /* Comments greenish */
- SETCOL(btheme->text.syntaxv, 95, 95, 0, 255); /* Special */
- SETCOL(btheme->text.syntaxb, 128, 0, 80, 255); /* Builtin, red-purple */
+ if (btheme->text.syntaxn[3]==0) {
+ rgba_char_args_set(btheme->text.syntaxn, 0, 0, 200, 255); /* Numbers Blue*/
+ rgba_char_args_set(btheme->text.syntaxl, 100, 0, 0, 255); /* Strings red */
+ rgba_char_args_set(btheme->text.syntaxc, 0, 100, 50, 255); /* Comments greenish */
+ rgba_char_args_set(btheme->text.syntaxv, 95, 95, 0, 255); /* Special */
+ rgba_char_args_set(btheme->text.syntaxb, 128, 0, 80, 255); /* Builtin, red-purple */
}
}
}
if (bmain->versionfile <= 237) {
bTheme *btheme;
/* bone colors */
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* check for alpha==0 is safe, then color was never set */
- if(btheme->tv3d.bone_solid[3]==0) {
- SETCOL(btheme->tv3d.bone_solid, 200, 200, 200, 255);
- SETCOL(btheme->tv3d.bone_pose, 80, 200, 255, 80);
+ if (btheme->tv3d.bone_solid[3]==0) {
+ rgba_char_args_set(btheme->tv3d.bone_solid, 200, 200, 200, 255);
+ rgba_char_args_set(btheme->tv3d.bone_pose, 80, 200, 255, 80);
}
}
}
if (bmain->versionfile <= 238) {
bTheme *btheme;
/* bone colors */
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* check for alpha==0 is safe, then color was never set */
- if(btheme->tnla.strip[3]==0) {
- SETCOL(btheme->tnla.strip_select, 0xff, 0xff, 0xaa, 255);
- SETCOL(btheme->tnla.strip, 0xe4, 0x9c, 0xc6, 255);
+ if (btheme->tnla.strip[3]==0) {
+ rgba_char_args_set(btheme->tnla.strip_select, 0xff, 0xff, 0xaa, 255);
+ rgba_char_args_set(btheme->tnla.strip, 0xe4, 0x9c, 0xc6, 255);
}
}
}
if (bmain->versionfile <= 239) {
bTheme *btheme;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* Lamp theme, check for alpha==0 is safe, then color was never set */
- if(btheme->tv3d.lamp[3]==0) {
- SETCOL(btheme->tv3d.lamp, 0, 0, 0, 40);
+ if (btheme->tv3d.lamp[3]==0) {
+ rgba_char_args_set(btheme->tv3d.lamp, 0, 0, 0, 40);
/* TEMPORAL, remove me! (ton) */
U.uiflag |= USER_PLAINMENUS;
}
}
- if(U.obcenter_dia==0) U.obcenter_dia= 6;
+ if (U.obcenter_dia==0) U.obcenter_dia= 6;
}
if (bmain->versionfile <= 241) {
bTheme *btheme;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* Node editor theme, check for alpha==0 is safe, then color was never set */
- if(btheme->tnode.syntaxn[3]==0) {
+ if (btheme->tnode.syntaxn[3]==0) {
/* re-uses syntax color storage */
btheme->tnode= btheme->tv3d;
- SETCOL(btheme->tnode.edge_select, 255, 255, 255, 255);
- SETCOL(btheme->tnode.syntaxl, 150, 150, 150, 255); /* TH_NODE, backdrop */
- SETCOL(btheme->tnode.syntaxn, 129, 131, 144, 255); /* in/output */
- SETCOL(btheme->tnode.syntaxb, 127,127,127, 255); /* operator */
- SETCOL(btheme->tnode.syntaxv, 142, 138, 145, 255); /* generator */
- SETCOL(btheme->tnode.syntaxc, 120, 145, 120, 255); /* group */
+ rgba_char_args_set(btheme->tnode.edge_select, 255, 255, 255, 255);
+ rgba_char_args_set(btheme->tnode.syntaxl, 150, 150, 150, 255); /* TH_NODE, backdrop */
+ rgba_char_args_set(btheme->tnode.syntaxn, 129, 131, 144, 255); /* in/output */
+ rgba_char_args_set(btheme->tnode.syntaxb, 127,127,127, 255); /* operator */
+ rgba_char_args_set(btheme->tnode.syntaxv, 142, 138, 145, 255); /* generator */
+ rgba_char_args_set(btheme->tnode.syntaxc, 120, 145, 120, 255); /* group */
}
/* Group theme colors */
- if(btheme->tv3d.group[3]==0) {
- SETCOL(btheme->tv3d.group, 0x0C, 0x30, 0x0C, 255);
- SETCOL(btheme->tv3d.group_active, 0x66, 0xFF, 0x66, 255);
+ if (btheme->tv3d.group[3]==0) {
+ rgba_char_args_set(btheme->tv3d.group, 0x0C, 0x30, 0x0C, 255);
+ rgba_char_args_set(btheme->tv3d.group_active, 0x66, 0xFF, 0x66, 255);
}
/* Sequence editor theme*/
- if(btheme->tseq.movie[3]==0) {
- SETCOL(btheme->tseq.movie, 81, 105, 135, 255);
- SETCOL(btheme->tseq.image, 109, 88, 129, 255);
- SETCOL(btheme->tseq.scene, 78, 152, 62, 255);
- SETCOL(btheme->tseq.audio, 46, 143, 143, 255);
- SETCOL(btheme->tseq.effect, 169, 84, 124, 255);
- SETCOL(btheme->tseq.plugin, 126, 126, 80, 255);
- SETCOL(btheme->tseq.transition, 162, 95, 111, 255);
- SETCOL(btheme->tseq.meta, 109, 145, 131, 255);
+ if (btheme->tseq.movie[3]==0) {
+ rgba_char_args_set(btheme->tseq.movie, 81, 105, 135, 255);
+ rgba_char_args_set(btheme->tseq.image, 109, 88, 129, 255);
+ rgba_char_args_set(btheme->tseq.scene, 78, 152, 62, 255);
+ rgba_char_args_set(btheme->tseq.audio, 46, 143, 143, 255);
+ rgba_char_args_set(btheme->tseq.effect, 169, 84, 124, 255);
+ rgba_char_args_set(btheme->tseq.plugin, 126, 126, 80, 255);
+ rgba_char_args_set(btheme->tseq.transition, 162, 95, 111, 255);
+ rgba_char_args_set(btheme->tseq.meta, 109, 145, 131, 255);
}
}
@@ -1355,17 +1366,17 @@ void init_userdef_do_versions(void)
if (bmain->versionfile <= 242) {
bTheme *btheme;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* long keyframe color */
/* check for alpha==0 is safe, then color was never set */
- if(btheme->tact.strip[3]==0) {
- SETCOL(btheme->tv3d.edge_sharp, 255, 32, 32, 255);
- SETCOL(btheme->tact.strip_select, 0xff, 0xff, 0xaa, 204);
- SETCOL(btheme->tact.strip, 0xe4, 0x9c, 0xc6, 204);
+ if (btheme->tact.strip[3]==0) {
+ rgba_char_args_set(btheme->tv3d.edge_sharp, 255, 32, 32, 255);
+ rgba_char_args_set(btheme->tact.strip_select, 0xff, 0xff, 0xaa, 204);
+ rgba_char_args_set(btheme->tact.strip, 0xe4, 0x9c, 0xc6, 204);
}
/* IPO-Editor - Vertex Size*/
- if(btheme->tipo.vertex_size == 0) {
+ if (btheme->tipo.vertex_size == 0) {
btheme->tipo.vertex_size= 3;
}
}
@@ -1376,31 +1387,31 @@ void init_userdef_do_versions(void)
}
if (bmain->versionfile < 245 || (bmain->versionfile == 245 && bmain->subversionfile < 3)) {
bTheme *btheme;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
- SETCOL(btheme->tv3d.editmesh_active, 255, 255, 255, 128);
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
+ rgba_char_args_set(btheme->tv3d.editmesh_active, 255, 255, 255, 128);
}
- if(U.coba_weight.tot==0)
+ if (U.coba_weight.tot==0)
init_colorband(&U.coba_weight, 1);
}
if ((bmain->versionfile < 245) || (bmain->versionfile == 245 && bmain->subversionfile < 11)) {
bTheme *btheme;
for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* these should all use the same color */
- SETCOL(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255);
- SETCOL(btheme->tipo.cframe, 0x60, 0xc0, 0x40, 255);
- SETCOL(btheme->tact.cframe, 0x60, 0xc0, 0x40, 255);
- SETCOL(btheme->tnla.cframe, 0x60, 0xc0, 0x40, 255);
- SETCOL(btheme->tseq.cframe, 0x60, 0xc0, 0x40, 255);
- //SETCOL(btheme->tsnd.cframe, 0x60, 0xc0, 0x40, 255); Not needed anymore
- SETCOL(btheme->ttime.cframe, 0x60, 0xc0, 0x40, 255);
+ rgba_char_args_set(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255);
+ rgba_char_args_set(btheme->tipo.cframe, 0x60, 0xc0, 0x40, 255);
+ rgba_char_args_set(btheme->tact.cframe, 0x60, 0xc0, 0x40, 255);
+ rgba_char_args_set(btheme->tnla.cframe, 0x60, 0xc0, 0x40, 255);
+ rgba_char_args_set(btheme->tseq.cframe, 0x60, 0xc0, 0x40, 255);
+ //rgba_char_args_set(btheme->tsnd.cframe, 0x60, 0xc0, 0x40, 255); Not needed anymore
+ rgba_char_args_set(btheme->ttime.cframe, 0x60, 0xc0, 0x40, 255);
}
}
if ((bmain->versionfile < 245) || (bmain->versionfile == 245 && bmain->subversionfile < 13)) {
bTheme *btheme;
for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* action channel groups (recolor anyway) */
- SETCOL(btheme->tact.group, 0x39, 0x7d, 0x1b, 255);
- SETCOL(btheme->tact.group_active, 0x7d, 0xe9, 0x60, 255);
+ rgba_char_args_set(btheme->tact.group, 0x39, 0x7d, 0x1b, 255);
+ rgba_char_args_set(btheme->tact.group_active, 0x7d, 0xe9, 0x60, 255);
/* bone custom-color sets */
if (btheme->tarm[0].solid[3] == 0)
@@ -1419,50 +1430,50 @@ void init_userdef_do_versions(void)
/* IPO Editor: Handles/Vertices */
col = btheme->tipo.vertex;
- SETCOL(btheme->tipo.handle_vertex, col[0], col[1], col[2], 255);
+ rgba_char_args_set(btheme->tipo.handle_vertex, col[0], col[1], col[2], 255);
col = btheme->tipo.vertex_select;
- SETCOL(btheme->tipo.handle_vertex_select, col[0], col[1], col[2], 255);
+ rgba_char_args_set(btheme->tipo.handle_vertex_select, col[0], col[1], col[2], 255);
btheme->tipo.handle_vertex_size= btheme->tipo.vertex_size;
/* Sequence/Image Editor: colors for GPencil text */
col = btheme->tv3d.bone_pose;
- SETCOL(btheme->tseq.bone_pose, col[0], col[1], col[2], 255);
- SETCOL(btheme->tima.bone_pose, col[0], col[1], col[2], 255);
+ rgba_char_args_set(btheme->tseq.bone_pose, col[0], col[1], col[2], 255);
+ rgba_char_args_set(btheme->tima.bone_pose, col[0], col[1], col[2], 255);
col = btheme->tv3d.vertex_select;
- SETCOL(btheme->tseq.vertex_select, col[0], col[1], col[2], 255);
+ rgba_char_args_set(btheme->tseq.vertex_select, col[0], col[1], col[2], 255);
}
}
if (bmain->versionfile < 250) {
bTheme *btheme;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* this was not properly initialized in 2.45 */
- if(btheme->tima.face_dot[3]==0) {
- SETCOL(btheme->tima.editmesh_active, 255, 255, 255, 128);
- SETCOL(btheme->tima.face_dot, 255, 133, 0, 255);
+ if (btheme->tima.face_dot[3]==0) {
+ rgba_char_args_set(btheme->tima.editmesh_active, 255, 255, 255, 128);
+ rgba_char_args_set(btheme->tima.face_dot, 255, 133, 0, 255);
btheme->tima.facedot_size= 2;
}
/* DopeSheet - (Object) Channel color */
- SETCOL(btheme->tact.ds_channel, 82, 96, 110, 255);
- SETCOL(btheme->tact.ds_subchannel, 124, 137, 150, 255);
+ rgba_char_args_set(btheme->tact.ds_channel, 82, 96, 110, 255);
+ rgba_char_args_set(btheme->tact.ds_subchannel, 124, 137, 150, 255);
/* DopeSheet - Group Channel color (saner version) */
- SETCOL(btheme->tact.group, 79, 101, 73, 255);
- SETCOL(btheme->tact.group_active, 135, 177, 125, 255);
+ rgba_char_args_set(btheme->tact.group, 79, 101, 73, 255);
+ rgba_char_args_set(btheme->tact.group_active, 135, 177, 125, 255);
/* Graph Editor - (Object) Channel color */
- SETCOL(btheme->tipo.ds_channel, 82, 96, 110, 255);
- SETCOL(btheme->tipo.ds_subchannel, 124, 137, 150, 255);
+ rgba_char_args_set(btheme->tipo.ds_channel, 82, 96, 110, 255);
+ rgba_char_args_set(btheme->tipo.ds_subchannel, 124, 137, 150, 255);
/* Graph Editor - Group Channel color */
- SETCOL(btheme->tipo.group, 79, 101, 73, 255);
- SETCOL(btheme->tipo.group_active, 135, 177, 125, 255);
+ rgba_char_args_set(btheme->tipo.group, 79, 101, 73, 255);
+ rgba_char_args_set(btheme->tipo.group_active, 135, 177, 125, 255);
/* Nla Editor - (Object) Channel color */
- SETCOL(btheme->tnla.ds_channel, 82, 96, 110, 255);
- SETCOL(btheme->tnla.ds_subchannel, 124, 137, 150, 255);
+ rgba_char_args_set(btheme->tnla.ds_channel, 82, 96, 110, 255);
+ rgba_char_args_set(btheme->tnla.ds_subchannel, 124, 137, 150, 255);
/* NLA Editor - New Strip colors */
- SETCOL(btheme->tnla.strip, 12, 10, 10, 128);
- SETCOL(btheme->tnla.strip_select, 255, 140, 0, 255);
+ rgba_char_args_set(btheme->tnla.strip, 12, 10, 10, 128);
+ rgba_char_args_set(btheme->tnla.strip_select, 255, 140, 0, 255);
}
/* adjust grease-pencil distances */
@@ -1476,31 +1487,31 @@ void init_userdef_do_versions(void)
if (bmain->versionfile < 250 || (bmain->versionfile == 250 && bmain->subversionfile < 1)) {
bTheme *btheme;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* common (new) variables, it checks for alpha==0 */
ui_theme_init_new(btheme);
- if(btheme->tui.wcol_num.outline[3]==0)
+ if (btheme->tui.wcol_num.outline[3]==0)
ui_widget_color_init(&btheme->tui);
/* Logic editor theme, check for alpha==0 is safe, then color was never set */
- if(btheme->tlogic.syntaxn[3]==0) {
+ if (btheme->tlogic.syntaxn[3]==0) {
/* re-uses syntax color storage */
btheme->tlogic= btheme->tv3d;
- SETCOL(btheme->tlogic.back, 100, 100, 100, 255);
+ rgba_char_args_set(btheme->tlogic.back, 100, 100, 100, 255);
}
- SETCOLF(btheme->tinfo.back, 0.45, 0.45, 0.45, 1.0);
- SETCOLF(btheme->tuserpref.back, 0.45, 0.45, 0.45, 1.0);
+ rgba_char_args_set_fl(btheme->tinfo.back, 0.45, 0.45, 0.45, 1.0);
+ rgba_char_args_set_fl(btheme->tuserpref.back, 0.45, 0.45, 0.45, 1.0);
}
}
if (bmain->versionfile < 250 || (bmain->versionfile == 250 && bmain->subversionfile < 3)) {
/* new audio system */
- if(U.audiochannels == 0)
+ if (U.audiochannels == 0)
U.audiochannels = 2;
- if(U.audiodevice == 0) {
+ if (U.audiodevice == 0) {
#ifdef WITH_OPENAL
U.audiodevice = 2;
#endif
@@ -1508,9 +1519,9 @@ void init_userdef_do_versions(void)
U.audiodevice = 1;
#endif
}
- if(U.audioformat == 0)
+ if (U.audioformat == 0)
U.audioformat = 0x24;
- if(U.audiorate == 0)
+ if (U.audiorate == 0)
U.audiorate = 44100;
}
@@ -1520,7 +1531,7 @@ void init_userdef_do_versions(void)
if (bmain->versionfile < 250 || (bmain->versionfile == 250 && bmain->subversionfile < 8)) {
wmKeyMap *km;
- for(km=U.user_keymaps.first; km; km=km->next) {
+ for (km=U.user_keymaps.first; km; km=km->next) {
if (strcmp(km->idname, "Armature_Sketch")==0)
strcpy(km->idname, "Armature Sketch");
else if (strcmp(km->idname, "View3D")==0)
@@ -1558,7 +1569,7 @@ void init_userdef_do_versions(void)
}
}
if (bmain->versionfile < 250 || (bmain->versionfile == 250 && bmain->subversionfile < 16)) {
- if(U.wmdrawmethod == USER_DRAW_TRIPLE)
+ if (U.wmdrawmethod == USER_DRAW_TRIPLE)
U.wmdrawmethod = USER_DRAW_AUTOMATIC;
}
@@ -1573,39 +1584,39 @@ void init_userdef_do_versions(void)
U.keyhandles_new = HD_AUTO;
/* init new curve colors */
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* init colors used for handles in 3D-View */
- SETCOL(btheme->tv3d.handle_free, 0, 0, 0, 255);
- SETCOL(btheme->tv3d.handle_auto, 0x90, 0x90, 0x00, 255);
- SETCOL(btheme->tv3d.handle_vect, 0x40, 0x90, 0x30, 255);
- SETCOL(btheme->tv3d.handle_align, 0x80, 0x30, 0x60, 255);
- SETCOL(btheme->tv3d.handle_sel_free, 0, 0, 0, 255);
- SETCOL(btheme->tv3d.handle_sel_auto, 0xf0, 0xff, 0x40, 255);
- SETCOL(btheme->tv3d.handle_sel_vect, 0x40, 0xc0, 0x30, 255);
- SETCOL(btheme->tv3d.handle_sel_align, 0xf0, 0x90, 0xa0, 255);
- SETCOL(btheme->tv3d.act_spline, 0xdb, 0x25, 0x12, 255);
+ rgba_char_args_set(btheme->tv3d.handle_free, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.handle_auto, 0x90, 0x90, 0x00, 255);
+ rgba_char_args_set(btheme->tv3d.handle_vect, 0x40, 0x90, 0x30, 255);
+ rgba_char_args_set(btheme->tv3d.handle_align, 0x80, 0x30, 0x60, 255);
+ rgba_char_args_set(btheme->tv3d.handle_sel_free, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.handle_sel_auto, 0xf0, 0xff, 0x40, 255);
+ rgba_char_args_set(btheme->tv3d.handle_sel_vect, 0x40, 0xc0, 0x30, 255);
+ rgba_char_args_set(btheme->tv3d.handle_sel_align, 0xf0, 0x90, 0xa0, 255);
+ rgba_char_args_set(btheme->tv3d.act_spline, 0xdb, 0x25, 0x12, 255);
/* same colors again for Graph Editor... */
- SETCOL(btheme->tipo.handle_free, 0, 0, 0, 255);
- SETCOL(btheme->tipo.handle_auto, 0x90, 0x90, 0x00, 255);
- SETCOL(btheme->tipo.handle_vect, 0x40, 0x90, 0x30, 255);
- SETCOL(btheme->tipo.handle_align, 0x80, 0x30, 0x60, 255);
- SETCOL(btheme->tipo.handle_sel_free, 0, 0, 0, 255);
- SETCOL(btheme->tipo.handle_sel_auto, 0xf0, 0xff, 0x40, 255);
- SETCOL(btheme->tipo.handle_sel_vect, 0x40, 0xc0, 0x30, 255);
- SETCOL(btheme->tipo.handle_sel_align, 0xf0, 0x90, 0xa0, 255);
+ rgba_char_args_set(btheme->tipo.handle_free, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tipo.handle_auto, 0x90, 0x90, 0x00, 255);
+ rgba_char_args_set(btheme->tipo.handle_vect, 0x40, 0x90, 0x30, 255);
+ rgba_char_args_set(btheme->tipo.handle_align, 0x80, 0x30, 0x60, 255);
+ rgba_char_args_set(btheme->tipo.handle_sel_free, 0, 0, 0, 255);
+ rgba_char_args_set(btheme->tipo.handle_sel_auto, 0xf0, 0xff, 0x40, 255);
+ rgba_char_args_set(btheme->tipo.handle_sel_vect, 0x40, 0xc0, 0x30, 255);
+ rgba_char_args_set(btheme->tipo.handle_sel_align, 0xf0, 0x90, 0xa0, 255);
/* edge crease */
- SETCOLF(btheme->tv3d.edge_crease, 0.8, 0, 0.6, 1.0);
+ rgba_char_args_set_fl(btheme->tv3d.edge_crease, 0.8, 0, 0.6, 1.0);
}
}
if (bmain->versionfile <= 252) {
bTheme *btheme;
/* init new curve colors */
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
if (btheme->tv3d.lastsel_point[3] == 0)
- SETCOL(btheme->tv3d.lastsel_point, 0xff, 0xff, 0xff, 255);
+ rgba_char_args_set(btheme->tv3d.lastsel_point, 0xff, 0xff, 0xff, 255);
}
}
if (bmain->versionfile < 252 || (bmain->versionfile == 252 && bmain->subversionfile < 5)) {
@@ -1625,7 +1636,7 @@ void init_userdef_do_versions(void)
5, -5
};
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
/* init progress bar theme */
btheme->tui.wcol_progress= wcol_progress;
}
@@ -1633,17 +1644,17 @@ void init_userdef_do_versions(void)
if (bmain->versionfile < 255 || (bmain->versionfile == 255 && bmain->subversionfile < 2)) {
bTheme *btheme;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
- SETCOL(btheme->tv3d.extra_edge_len, 32, 0, 0, 255);
- SETCOL(btheme->tv3d.extra_face_angle, 0, 32, 0, 255);
- SETCOL(btheme->tv3d.extra_face_area, 0, 0, 128, 255);
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
+ rgba_char_args_set(btheme->tv3d.extra_edge_len, 32, 0, 0, 255);
+ rgba_char_args_set(btheme->tv3d.extra_face_angle, 0, 32, 0, 255);
+ rgba_char_args_set(btheme->tv3d.extra_face_area, 0, 0, 128, 255);
}
}
if (bmain->versionfile < 256 || (bmain->versionfile == 256 && bmain->subversionfile < 4)) {
bTheme *btheme;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
- if((btheme->tv3d.outline_width) == 0) btheme->tv3d.outline_width= 1;
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
+ if ((btheme->tv3d.outline_width) == 0) btheme->tv3d.outline_width= 1;
}
}
@@ -1654,7 +1665,7 @@ void init_userdef_do_versions(void)
if (bmain->versionfile < 258 || (bmain->versionfile == 258 && bmain->subversionfile < 2)) {
bTheme *btheme;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
btheme->tnode.noodle_curving = 5;
}
}
@@ -1662,7 +1673,7 @@ void init_userdef_do_versions(void)
if (bmain->versionfile < 259 || (bmain->versionfile == 259 && bmain->subversionfile < 1)) {
bTheme *btheme;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
btheme->tv3d.speaker[3] = 255;
}
}
@@ -1676,40 +1687,40 @@ void init_userdef_do_versions(void)
if (U.keyhandles_new == HD_AUTO)
U.keyhandles_new = HD_AUTO_ANIM;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
- if(btheme->tv3d.bundle_solid[3] == 0)
- SETCOL(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
+ if (btheme->tv3d.bundle_solid[3] == 0)
+ rgba_char_args_set(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
- if(btheme->tv3d.camera_path[3] == 0)
- SETCOL(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
+ if (btheme->tv3d.camera_path[3] == 0)
+ rgba_char_args_set(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
- if((btheme->tclip.back[3]) == 0) {
+ if ((btheme->tclip.back[3]) == 0) {
btheme->tclip= btheme->tv3d;
- SETCOL(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255);
- SETCOL(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255);
- SETCOL(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255);
- SETCOL(btheme->tclip.sel_marker, 0xff, 0xff, 0x00, 255);
- SETCOL(btheme->tclip.dis_marker, 0x7f, 0x00, 0x00, 255);
- SETCOL(btheme->tclip.lock_marker, 0x7f, 0x7f, 0x7f, 255);
- SETCOL(btheme->tclip.path_before, 0xff, 0x00, 0x00, 255);
- SETCOL(btheme->tclip.path_after, 0x00, 0x00, 0xff, 255);
- SETCOL(btheme->tclip.grid, 0x5e, 0x5e, 0x5e, 255);
- SETCOL(btheme->tclip.cframe, 0x60, 0xc0, 0x40, 255);
- SETCOL(btheme->tclip.handle_vertex, 0x00, 0x00, 0x00, 0xff);
- SETCOL(btheme->tclip.handle_vertex_select, 0xff, 0xff, 0, 0xff);
+ rgba_char_args_set(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255);
+ rgba_char_args_set(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255);
+ rgba_char_args_set(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255);
+ rgba_char_args_set(btheme->tclip.sel_marker, 0xff, 0xff, 0x00, 255);
+ rgba_char_args_set(btheme->tclip.dis_marker, 0x7f, 0x00, 0x00, 255);
+ rgba_char_args_set(btheme->tclip.lock_marker, 0x7f, 0x7f, 0x7f, 255);
+ rgba_char_args_set(btheme->tclip.path_before, 0xff, 0x00, 0x00, 255);
+ rgba_char_args_set(btheme->tclip.path_after, 0x00, 0x00, 0xff, 255);
+ rgba_char_args_set(btheme->tclip.grid, 0x5e, 0x5e, 0x5e, 255);
+ rgba_char_args_set(btheme->tclip.cframe, 0x60, 0xc0, 0x40, 255);
+ rgba_char_args_set(btheme->tclip.handle_vertex, 0x00, 0x00, 0x00, 0xff);
+ rgba_char_args_set(btheme->tclip.handle_vertex_select, 0xff, 0xff, 0, 0xff);
btheme->tclip.handle_vertex_size= 4;
}
/* auto-clamped handles -> based on auto */
- if(btheme->tipo.handle_auto_clamped[3] == 0)
- SETCOL(btheme->tipo.handle_auto_clamped, 0x99, 0x40, 0x30, 255);
- if(btheme->tipo.handle_sel_auto_clamped[3] == 0)
- SETCOL(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255);
+ if (btheme->tipo.handle_auto_clamped[3] == 0)
+ rgba_char_args_set(btheme->tipo.handle_auto_clamped, 0x99, 0x40, 0x30, 255);
+ if (btheme->tipo.handle_sel_auto_clamped[3] == 0)
+ rgba_char_args_set(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255);
}
/* enable (Cycles) addon by default */
- if(!BLI_findstring(&U.addons, "cycles", offsetof(bAddon, module))) {
+ if (!BLI_findstring(&U.addons, "cycles", offsetof(bAddon, module))) {
bAddon *baddon= MEM_callocN(sizeof(bAddon), "bAddon");
BLI_strncpy(baddon->module, "cycles", sizeof(baddon->module));
BLI_addtail(&U.addons, baddon);
@@ -1719,29 +1730,49 @@ void init_userdef_do_versions(void)
if (bmain->versionfile < 260 || (bmain->versionfile == 260 && bmain->subversionfile < 5)) {
bTheme *btheme;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
- SETCOL(btheme->tui.panel.header, 0, 0, 0, 25);
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
+ rgba_char_args_set(btheme->tui.panel.header, 0, 0, 0, 25);
btheme->tui.icon_alpha= 1.0;
}
}
if (bmain->versionfile < 261 || (bmain->versionfile == 261 && bmain->subversionfile < 4)) {
bTheme *btheme;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
- SETCOLF(btheme->tima.preview_stitch_face, 0.071, 0.259, 0.694, 0.150);
- SETCOLF(btheme->tima.preview_stitch_edge, 1.0, 0.522, 0.0, 0.7);
- SETCOLF(btheme->tima.preview_stitch_vert, 1.0, 0.522, 0.0, 0.5);
- SETCOLF(btheme->tima.preview_stitch_stitchable, 0.0, 1.0, 0.0, 1.0);
- SETCOLF(btheme->tima.preview_stitch_unstitchable, 1.0, 0.0, 0.0, 1.0);
- SETCOLF(btheme->tima.preview_stitch_active, 0.886, 0.824, 0.765, 0.140);
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
+ rgba_char_args_set_fl(btheme->tima.preview_stitch_face, 0.071, 0.259, 0.694, 0.150);
+ rgba_char_args_set_fl(btheme->tima.preview_stitch_edge, 1.0, 0.522, 0.0, 0.7);
+ rgba_char_args_set_fl(btheme->tima.preview_stitch_vert, 1.0, 0.522, 0.0, 0.5);
+ rgba_char_args_set_fl(btheme->tima.preview_stitch_stitchable, 0.0, 1.0, 0.0, 1.0);
+ rgba_char_args_set_fl(btheme->tima.preview_stitch_unstitchable, 1.0, 0.0, 0.0, 1.0);
+ rgba_char_args_set_fl(btheme->tima.preview_stitch_active, 0.886, 0.824, 0.765, 0.140);
- SETCOLF(btheme->toops.match, 0.2, 0.5, 0.2, 0.3);
- SETCOLF(btheme->toops.selected_highlight, 0.51, 0.53, 0.55, 0.3);
+ rgba_char_args_set_fl(btheme->toops.match, 0.2, 0.5, 0.2, 0.3);
+ rgba_char_args_set_fl(btheme->toops.selected_highlight, 0.51, 0.53, 0.55, 0.3);
}
U.use_16bit_textures = 1;
}
+ if (bmain->versionfile < 262 || (bmain->versionfile == 262 && bmain->subversionfile < 2)) {
+ bTheme *btheme;
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
+ if (btheme->tui.wcol_menu_item.item[3] == 255)
+ rgba_char_args_set(btheme->tui.wcol_menu_item.item, 172, 172, 172, 128);
+ }
+ }
+
+ if (bmain->versionfile < 262 || (bmain->versionfile == 262 && bmain->subversionfile < 3)) {
+ bTheme *btheme;
+ for (btheme= U.themes.first; btheme; btheme= btheme->next) {
+ if (btheme->tui.wcol_tooltip.inner[3] == 0) {
+ btheme->tui.wcol_tooltip = btheme->tui.wcol_menu_back;
+ }
+ if (btheme->tui.wcol_tooltip.text[0] == 160) { /* hrmf */
+ rgba_char_args_set(btheme->tui.wcol_tooltip.text, 255, 255, 255, 255);
+ }
+ }
+ }
+
/* Freestyle color settings */
{
bTheme *btheme;
@@ -1749,8 +1780,8 @@ void init_userdef_do_versions(void)
for(btheme= U.themes.first; btheme; btheme= btheme->next) {
/* check for alpha==0 is safe, then color was never set */
if(btheme->tv3d.freestyle_edge_mark[3]==0) {
- SETCOL(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255);
- SETCOL(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51);
+ rgba_char_args_set(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255);
+ rgba_char_args_set(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51);
}
}
}
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 2feccf7a4e8..9072db77b6f 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -73,9 +73,9 @@
*/
static int view2d_scroll_mapped(int scroll)
{
- if(scroll & V2D_SCROLL_HORIZONTAL_HIDE)
+ if (scroll & V2D_SCROLL_HORIZONTAL_HIDE)
scroll &= ~(V2D_SCROLL_HORIZONTAL);
- if(scroll & V2D_SCROLL_VERTICAL_HIDE)
+ if (scroll & V2D_SCROLL_VERTICAL_HIDE)
scroll &= ~(V2D_SCROLL_VERTICAL);
return scroll;
}
@@ -86,20 +86,20 @@ static void view2d_masks(View2D *v2d)
int scroll;
/* mask - view frame */
- v2d->mask.xmin= v2d->mask.ymin= 0;
- v2d->mask.xmax= v2d->winx - 1; /* -1 yes! masks are pixels */
- v2d->mask.ymax= v2d->winy - 1;
+ v2d->mask.xmin = v2d->mask.ymin = 0;
+ v2d->mask.xmax = v2d->winx - 1; /* -1 yes! masks are pixels */
+ v2d->mask.ymax = v2d->winy - 1;
#if 0
// XXX see above
v2d->scroll &= ~(V2D_SCROLL_HORIZONTAL_HIDE|V2D_SCROLL_VERTICAL_HIDE);
/* check size if: */
if (v2d->scroll & V2D_SCROLL_HORIZONTAL)
- if(!(v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL))
+ if (!(v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL))
if (v2d->tot.xmax-v2d->tot.xmin <= v2d->cur.xmax-v2d->cur.xmin)
v2d->scroll |= V2D_SCROLL_HORIZONTAL_HIDE;
if (v2d->scroll & V2D_SCROLL_VERTICAL)
- if(!(v2d->scroll & V2D_SCROLL_SCALE_VERTICAL))
+ if (!(v2d->scroll & V2D_SCROLL_SCALE_VERTICAL))
if (v2d->tot.ymax-v2d->tot.ymin <= v2d->cur.ymax-v2d->cur.ymin)
v2d->scroll |= V2D_SCROLL_VERTICAL_HIDE;
#endif
@@ -114,29 +114,29 @@ static void view2d_masks(View2D *v2d)
if (scroll & V2D_SCROLL_LEFT) {
/* on left-hand edge of region */
v2d->vert= v2d->mask;
- v2d->vert.xmax= V2D_SCROLL_WIDTH;
- v2d->mask.xmin= v2d->vert.xmax + 1;
+ v2d->vert.xmax = V2D_SCROLL_WIDTH;
+ v2d->mask.xmin = v2d->vert.xmax + 1;
}
else if (scroll & V2D_SCROLL_RIGHT) {
/* on right-hand edge of region */
v2d->vert= v2d->mask;
v2d->vert.xmax++; /* one pixel extra... was leaving a minor gap... */
- v2d->vert.xmin= v2d->vert.xmax - V2D_SCROLL_WIDTH;
- v2d->mask.xmax= v2d->vert.xmin - 1;
+ v2d->vert.xmin = v2d->vert.xmax - V2D_SCROLL_WIDTH;
+ v2d->mask.xmax = v2d->vert.xmin - 1;
}
/* horizontal scroller */
if (scroll & (V2D_SCROLL_BOTTOM|V2D_SCROLL_BOTTOM_O)) {
/* on bottom edge of region (V2D_SCROLL_BOTTOM_O is outliner, the other is for standard) */
v2d->hor= v2d->mask;
- v2d->hor.ymax= V2D_SCROLL_HEIGHT;
- v2d->mask.ymin= v2d->hor.ymax + 1;
+ v2d->hor.ymax = V2D_SCROLL_HEIGHT;
+ v2d->mask.ymin = v2d->hor.ymax + 1;
}
else if (scroll & V2D_SCROLL_TOP) {
/* on upper edge of region */
v2d->hor= v2d->mask;
- v2d->hor.ymin= v2d->hor.ymax - V2D_SCROLL_HEIGHT;
- v2d->mask.ymax= v2d->hor.ymin - 1;
+ v2d->hor.ymin = v2d->hor.ymax - V2D_SCROLL_HEIGHT;
+ v2d->mask.ymax = v2d->hor.ymin - 1;
}
/* adjust vertical scroller if there's a horizontal scroller, to leave corner free */
@@ -144,11 +144,11 @@ static void view2d_masks(View2D *v2d)
/* just set y min/max for vertical scroller to y min/max of mask as appropriate */
if (scroll & (V2D_SCROLL_BOTTOM|V2D_SCROLL_BOTTOM_O)) {
/* on bottom edge of region (V2D_SCROLL_BOTTOM_O is outliner, the other is for standard) */
- v2d->vert.ymin= v2d->mask.ymin;
+ v2d->vert.ymin = v2d->mask.ymin;
}
else if (scroll & V2D_SCROLL_TOP) {
/* on upper edge of region */
- v2d->vert.ymax= v2d->mask.ymax;
+ v2d->vert.ymax = v2d->mask.ymax;
}
}
}
@@ -161,7 +161,7 @@ static void view2d_masks(View2D *v2d)
* - for some of these presets, it is expected that the region will have defined some
* additional settings necessary for the customisation of the 2D viewport to its requirements
* - this function should only be called from region init() callbacks, where it is expected that
- * this is called before UI_view2d_size_update(), as this one checks that the rects are properly initialised.
+ * this is called before UI_view2d_size_update(), as this one checks that the rects are properly initialized.
*/
void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
{
@@ -170,7 +170,7 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
/* initialize data if there is a need for such */
if ((v2d->flag & V2D_IS_INITIALISED) == 0) {
- /* set initialised flag so that View2D doesn't get reinitialised next time again */
+ /* set initialized flag so that View2D doesn't get reinitialised next time again */
v2d->flag |= V2D_IS_INITIALISED;
init= 1;
@@ -196,9 +196,9 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
v2d->align= (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y);
v2d->keeptot= V2D_KEEPTOT_BOUNDS;
- v2d->tot.xmin= v2d->tot.ymin= 0.0f;
- v2d->tot.xmax= (float)(winx - 1);
- v2d->tot.ymax= (float)(winy - 1);
+ v2d->tot.xmin = v2d->tot.ymin = 0.0f;
+ v2d->tot.xmax = (float)(winx - 1);
+ v2d->tot.ymax = (float)(winy - 1);
v2d->cur= v2d->tot;
@@ -281,18 +281,18 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
v2d->scroll |= V2D_SCROLL_HORIZONTAL_HIDE;
v2d->scroll &= ~V2D_SCROLL_VERTICAL_HIDE;
- v2d->tot.xmin= 0.0f;
- v2d->tot.xmax= winx;
+ v2d->tot.xmin = 0.0f;
+ v2d->tot.xmax = winx;
- v2d->tot.ymax= 0.0f;
- v2d->tot.ymin= -winy;
+ v2d->tot.ymax = 0.0f;
+ v2d->tot.ymin = -winy;
- v2d->cur.xmin= 0.0f;
+ v2d->cur.xmin = 0.0f;
/* bad workaround for keeping zoom level with scrollers */
- v2d->cur.xmax= (winx - V2D_SCROLL_WIDTH)*panelzoom;
+ v2d->cur.xmax = (winx - V2D_SCROLL_WIDTH)*panelzoom;
- v2d->cur.ymax= 0.0f;
- v2d->cur.ymin= (-winy)*panelzoom;
+ v2d->cur.ymax = 0.0f;
+ v2d->cur.ymin = (-winy)*panelzoom;
}
break;
@@ -362,10 +362,10 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
* NOTE: width and height must use FLT_MIN instead of 1, otherwise it is impossible to
* get enough resolution in Graph Editor for editing some curves
*/
- if(width < FLT_MIN) width= 1;
- if(height < FLT_MIN) height= 1;
- if(winx < 1) winx= 1;
- if(winy < 1) winy= 1;
+ if (width < FLT_MIN) width= 1;
+ if (height < FLT_MIN) height= 1;
+ if (winx < 1) winx= 1;
+ if (winy < 1) winy= 1;
/* V2D_LIMITZOOM indicates that zoom level should be preserved when the window size changes */
if (resize && (v2d->keepzoom & V2D_KEEPZOOM)) {
@@ -375,7 +375,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
zoom= winx / width;
oldzoom= v2d->oldwinx / curwidth;
- if(oldzoom != zoom)
+ if (oldzoom != zoom)
width *= zoom/oldzoom;
}
@@ -383,7 +383,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
zoom= winy / height;
oldzoom= v2d->oldwiny / curheight;
- if(oldzoom != zoom)
+ if (oldzoom != zoom)
height *= zoom/oldzoom;
}
}
@@ -502,7 +502,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
cur->xmax += width - (cur->xmax - cur->xmin);
}
else if (v2d->keepofs & V2D_KEEPOFS_X) {
- if(v2d->align & V2D_ALIGN_NO_POS_X)
+ if (v2d->align & V2D_ALIGN_NO_POS_X)
cur->xmin -= width - (cur->xmax - cur->xmin);
else
cur->xmax += width - (cur->xmax - cur->xmin);
@@ -520,7 +520,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
cur->ymax += height - (cur->ymax - cur->ymin);
}
else if (v2d->keepofs & V2D_KEEPOFS_Y) {
- if(v2d->align & V2D_ALIGN_NO_POS_Y)
+ if (v2d->align & V2D_ALIGN_NO_POS_Y)
cur->ymin -= height - (cur->ymax - cur->ymin);
else
cur->ymax += height - (cur->ymax - cur->ymin);
@@ -546,8 +546,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
/* width */
if ( (curwidth > totwidth) && !(v2d->keepzoom & (V2D_KEEPZOOM|V2D_LOCKZOOM_X|V2D_LIMITZOOM)) ) {
/* if zoom doesn't have to be maintained, just clamp edges */
- if (cur->xmin < tot->xmin) cur->xmin= tot->xmin;
- if (cur->xmax > tot->xmax) cur->xmax= tot->xmax;
+ if (cur->xmin < tot->xmin) cur->xmin = tot->xmin;
+ if (cur->xmax > tot->xmax) cur->xmax = tot->xmax;
}
else if (v2d->keeptot == V2D_KEEPTOT_STRICT) {
/* This is an exception for the outliner (and later channel-lists, headers)
@@ -595,8 +595,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
temp= (tot->xmax + tot->xmin) * 0.5f;
diff= curheight * 0.5f;
- cur->xmin= temp - diff;
- cur->xmax= temp + diff;
+ cur->xmin = temp - diff;
+ cur->xmax = temp + diff;
}
else if (cur->xmin < tot->xmin) {
/* move cur across so that it sits at minimum of tot */
@@ -629,8 +629,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
/* height */
if ( (curheight > totheight) && !(v2d->keepzoom & (V2D_KEEPZOOM|V2D_LOCKZOOM_Y|V2D_LIMITZOOM)) ) {
/* if zoom doesn't have to be maintained, just clamp edges */
- if (cur->ymin < tot->ymin) cur->ymin= tot->ymin;
- if (cur->ymax > tot->ymax) cur->ymax= tot->ymax;
+ if (cur->ymin < tot->ymin) cur->ymin = tot->ymin;
+ if (cur->ymax > tot->ymax) cur->ymax = tot->ymax;
}
else {
/* This here occurs when:
@@ -645,8 +645,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
temp= (tot->ymax + tot->ymin) * 0.5f;
diff= curheight * 0.5f;
- cur->ymin= temp - diff;
- cur->ymax= temp + diff;
+ cur->ymin = temp - diff;
+ cur->ymax = temp + diff;
}
else if (cur->ymin < tot->ymin) {
/* there's still space remaining, so shift up */
@@ -680,7 +680,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
/* width is in negative-x half */
if (v2d->cur.xmax > 0) {
v2d->cur.xmin -= v2d->cur.xmax;
- v2d->cur.xmax= 0.0f;
+ v2d->cur.xmax = 0.0f;
}
}
else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) {
@@ -738,13 +738,13 @@ void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag)
if (ar->v2d.flag & V2D_VIEWSYNC_AREA_VERTICAL) {
if (flag == V2D_LOCK_COPY) {
/* other views with locks on must copy active */
- ar->v2d.cur.ymin= v2dcur->cur.ymin;
- ar->v2d.cur.ymax= v2dcur->cur.ymax;
+ ar->v2d.cur.ymin = v2dcur->cur.ymin;
+ ar->v2d.cur.ymax = v2dcur->cur.ymax;
}
else { /* V2D_LOCK_SET */
/* active must copy others */
- v2dcur->cur.ymin= ar->v2d.cur.ymin;
- v2dcur->cur.ymax= ar->v2d.cur.ymax;
+ v2dcur->cur.ymin = ar->v2d.cur.ymin;
+ v2dcur->cur.ymax = ar->v2d.cur.ymax;
}
/* region possibly changed, so refresh */
@@ -764,13 +764,13 @@ void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag)
if (ar->v2d.flag & V2D_VIEWSYNC_SCREEN_TIME) {
if (flag == V2D_LOCK_COPY) {
/* other views with locks on must copy active */
- ar->v2d.cur.xmin= v2dcur->cur.xmin;
- ar->v2d.cur.xmax= v2dcur->cur.xmax;
+ ar->v2d.cur.xmin = v2dcur->cur.xmin;
+ ar->v2d.cur.xmax = v2dcur->cur.xmax;
}
else { /* V2D_LOCK_SET */
/* active must copy others */
- v2dcur->cur.xmin= ar->v2d.cur.xmin;
- v2dcur->cur.xmax= ar->v2d.cur.xmax;
+ v2dcur->cur.xmin = ar->v2d.cur.xmin;
+ v2dcur->cur.xmax = ar->v2d.cur.xmax;
}
/* region possibly changed, so refresh */
@@ -797,39 +797,39 @@ void UI_view2d_curRect_reset (View2D *v2d)
/* handle width - posx and negx flags are mutually exclusive, so watch out */
if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) {
/* width is in negative-x half */
- v2d->cur.xmin= (float)-width;
- v2d->cur.xmax= 0.0f;
+ v2d->cur.xmin = (float)-width;
+ v2d->cur.xmax = 0.0f;
}
else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) {
/* width is in positive-x half */
- v2d->cur.xmin= 0.0f;
- v2d->cur.xmax= (float)width;
+ v2d->cur.xmin = 0.0f;
+ v2d->cur.xmax = (float)width;
}
else {
/* width is centered around x==0 */
const float dx= (float)width / 2.0f;
- v2d->cur.xmin= -dx;
- v2d->cur.xmax= dx;
+ v2d->cur.xmin = -dx;
+ v2d->cur.xmax = dx;
}
/* handle height - posx and negx flags are mutually exclusive, so watch out */
if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) {
/* height is in negative-y half */
- v2d->cur.ymin= (float)-height;
- v2d->cur.ymax= 0.0f;
+ v2d->cur.ymin = (float)-height;
+ v2d->cur.ymax = 0.0f;
}
else if ((v2d->align & V2D_ALIGN_NO_NEG_Y) && !(v2d->align & V2D_ALIGN_NO_POS_Y)) {
/* height is in positive-y half */
- v2d->cur.ymin= 0.0f;
- v2d->cur.ymax= (float)height;
+ v2d->cur.ymin = 0.0f;
+ v2d->cur.ymax = (float)height;
}
else {
/* height is centered around y==0 */
const float dy= (float)height / 2.0f;
- v2d->cur.ymin= -dy;
- v2d->cur.ymax= dy;
+ v2d->cur.ymin = -dy;
+ v2d->cur.ymax = dy;
}
}
@@ -846,9 +846,9 @@ void UI_view2d_totRect_set_resize (View2D *v2d, int width, int height, int resiz
/* hrumf! */
/* XXX: there are work arounds for this in the panel and file browse code. */
- if(scroll & V2D_SCROLL_HORIZONTAL)
+ if (scroll & V2D_SCROLL_HORIZONTAL)
width -= V2D_SCROLL_WIDTH;
- if(scroll & V2D_SCROLL_VERTICAL)
+ if (scroll & V2D_SCROLL_VERTICAL)
height -= V2D_SCROLL_HEIGHT;
if (ELEM3(0, v2d, width, height)) {
@@ -860,39 +860,39 @@ void UI_view2d_totRect_set_resize (View2D *v2d, int width, int height, int resiz
/* handle width - posx and negx flags are mutually exclusive, so watch out */
if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) {
/* width is in negative-x half */
- v2d->tot.xmin= (float)-width;
- v2d->tot.xmax= 0.0f;
+ v2d->tot.xmin = (float)-width;
+ v2d->tot.xmax = 0.0f;
}
else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) {
/* width is in positive-x half */
- v2d->tot.xmin= 0.0f;
- v2d->tot.xmax= (float)width;
+ v2d->tot.xmin = 0.0f;
+ v2d->tot.xmax = (float)width;
}
else {
/* width is centered around x==0 */
const float dx= (float)width / 2.0f;
- v2d->tot.xmin= -dx;
- v2d->tot.xmax= dx;
+ v2d->tot.xmin = -dx;
+ v2d->tot.xmax = dx;
}
/* handle height - posx and negx flags are mutually exclusive, so watch out */
if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) {
/* height is in negative-y half */
- v2d->tot.ymin= (float)-height;
- v2d->tot.ymax= 0.0f;
+ v2d->tot.ymin = (float)-height;
+ v2d->tot.ymax = 0.0f;
}
else if ((v2d->align & V2D_ALIGN_NO_NEG_Y) && !(v2d->align & V2D_ALIGN_NO_POS_Y)) {
/* height is in positive-y half */
- v2d->tot.ymin= 0.0f;
- v2d->tot.ymax= (float)height;
+ v2d->tot.ymin = 0.0f;
+ v2d->tot.ymax = (float)height;
}
else {
/* height is centered around y==0 */
const float dy= (float)height / 2.0f;
- v2d->tot.ymin= -dy;
- v2d->tot.ymax= dy;
+ v2d->tot.ymin = -dy;
+ v2d->tot.ymax = dy;
}
/* make sure that 'cur' rect is in a valid state as a result of these changes */
@@ -911,17 +911,17 @@ int UI_view2d_tab_set(View2D *v2d, int tab)
int changed= 0;
/* if tab changed, change offset */
- if(tab != v2d->tab_cur && v2d->tab_offset) {
- if(tab < v2d->tab_num)
+ if (tab != v2d->tab_cur && v2d->tab_offset) {
+ if (tab < v2d->tab_num)
offset= &v2d->tab_offset[tab*2];
else
offset= default_offset;
v2d->cur.xmax += offset[0] - v2d->cur.xmin;
- v2d->cur.xmin= offset[0];
+ v2d->cur.xmin = offset[0];
v2d->cur.ymin += offset[1] - v2d->cur.ymax;
- v2d->cur.ymax= offset[1];
+ v2d->cur.ymax = offset[1];
/* validation should happen in subsequent totRect_set */
@@ -929,10 +929,10 @@ int UI_view2d_tab_set(View2D *v2d, int tab)
}
/* resize array if needed */
- if(tab >= v2d->tab_num) {
+ if (tab >= v2d->tab_num) {
new_offset= MEM_callocN(sizeof(float)*(tab+1)*2, "view2d tab offset");
- if(v2d->tab_offset) {
+ if (v2d->tab_offset) {
memcpy(new_offset, v2d->tab_offset, sizeof(float)*v2d->tab_num*2);
MEM_freeN(v2d->tab_offset);
}
@@ -995,13 +995,13 @@ void UI_view2d_view_ortho(View2D *v2d)
curmasked.ymin-= yofs; curmasked.ymax-=yofs;
/* XXX ton: this flag set by outliner, for icons */
- if(v2d->flag & V2D_PIXELOFS_X) {
- curmasked.xmin= floorf(curmasked.xmin) - 0.001f;
- curmasked.xmax= floorf(curmasked.xmax) - 0.001f;
+ if (v2d->flag & V2D_PIXELOFS_X) {
+ curmasked.xmin = floorf(curmasked.xmin) - 0.001f;
+ curmasked.xmax = floorf(curmasked.xmax) - 0.001f;
}
- if(v2d->flag & V2D_PIXELOFS_Y) {
- curmasked.ymin= floorf(curmasked.ymin) - 0.001f;
- curmasked.ymax= floorf(curmasked.ymax) - 0.001f;
+ if (v2d->flag & V2D_PIXELOFS_Y) {
+ curmasked.ymin = floorf(curmasked.ymin) - 0.001f;
+ curmasked.ymax = floorf(curmasked.ymax) - 0.001f;
}
/* set matrix on all appropriate axes */
@@ -1078,7 +1078,7 @@ static void step_to_grid(float *step, int *power, int unit)
if (loga < 0.0f) {
if (rem < 0.2f) rem= 0.2f;
- else if(rem < 0.5f) rem= 0.5f;
+ else if (rem < 0.5f) rem= 0.5f;
else rem= 1.0f;
*step= rem * (float)pow(10.0, (*power));
@@ -1094,7 +1094,7 @@ static void step_to_grid(float *step, int *power, int unit)
}
else {
if (rem < 2.0f) rem= 2.0f;
- else if(rem < 5.0f) rem= 5.0f;
+ else if (rem < 5.0f) rem= 5.0f;
else rem= 10.0f;
*step= rem * (float)pow(10.0, (*power));
@@ -1143,7 +1143,7 @@ View2DGrid *UI_view2d_grid_calc(Scene *scene, View2D *v2d, short xunits, short x
space= v2d->cur.xmax - v2d->cur.xmin;
pixels= (float)(v2d->mask.xmax - v2d->mask.xmin);
- if(pixels!=0.0f) {
+ if (pixels!=0.0f) {
grid->dx= (U.v2d_min_gridsize * space) / (seconddiv * pixels);
step_to_grid(&grid->dx, &grid->powerx, xunits);
grid->dx *= seconddiv;
@@ -1307,13 +1307,13 @@ void UI_view2d_constant_grid_draw(View2D *v2d)
start= v2d->cur.xmin - (float)fmod(v2d->cur.xmin, step);
glBegin(GL_LINES);
- for(; start<v2d->cur.xmax; start+=step) {
+ for (; start<v2d->cur.xmax; start+=step) {
glVertex2f(start, v2d->cur.ymin);
glVertex2f(start, v2d->cur.ymax);
}
start= v2d->cur.ymin - (float)fmod(v2d->cur.ymin, step);
- for(; start<v2d->cur.ymax; start+=step) {
+ for (; start<v2d->cur.ymax; start+=step) {
glVertex2f(v2d->cur.xmin, start);
glVertex2f(v2d->cur.xmax, start);
}
@@ -1411,16 +1411,16 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short
/* scroller 'button' extents */
totsize= v2d->tot.xmax - v2d->tot.xmin;
scrollsize= (float)(hor.xmax - hor.xmin);
- if(totsize==0.0f) totsize = 1.0f; /* avoid divide by zero */
+ if (totsize==0.0f) totsize = 1.0f; /* avoid divide by zero */
fac1= (v2d->cur.xmin - v2d->tot.xmin) / totsize;
- if(fac1<=0.0f)
+ if (fac1<=0.0f)
scrollers->hor_min= hor.xmin;
else
scrollers->hor_min= (int)(hor.xmin + (fac1 * scrollsize));
fac2= (v2d->cur.xmax - v2d->tot.xmin) / totsize;
- if(fac2>=1.0f)
+ if (fac2>=1.0f)
scrollers->hor_max= hor.xmax;
else
scrollers->hor_max= (int)(hor.xmin + (fac2 * scrollsize));
@@ -1437,7 +1437,7 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short
}
/* check whether sliders can disappear due to the full-range being used */
- if(v2d->keeptot) {
+ if (v2d->keeptot) {
if ((fac1 <= 0.0f) && (fac2 >= 1.0f)) {
v2d->scroll |= V2D_SCROLL_HORIZONTAL_FULLR;
scrollers->horfull= 1;
@@ -1452,16 +1452,16 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short
/* scroller 'button' extents */
totsize= v2d->tot.ymax - v2d->tot.ymin;
scrollsize= (float)(vert.ymax - vert.ymin);
- if(totsize==0.0f) totsize = 1.0f; /* avoid divide by zero */
+ if (totsize==0.0f) totsize = 1.0f; /* avoid divide by zero */
fac1= (v2d->cur.ymin- v2d->tot.ymin) / totsize;
- if(fac1<=0.0f)
+ if (fac1<=0.0f)
scrollers->vert_min= vert.ymin;
else
scrollers->vert_min= (int)(vert.ymin + (fac1 * scrollsize));
fac2= (v2d->cur.ymax - v2d->tot.ymin) / totsize;
- if(fac2>=1.0f)
+ if (fac2>=1.0f)
scrollers->vert_max= vert.ymax;
else
scrollers->vert_max= (int)(vert.ymin + (fac2 * scrollsize));
@@ -1479,7 +1479,7 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short
}
/* check whether sliders can disappear due to the full-range being used */
- if(v2d->keeptot) {
+ if (v2d->keeptot) {
if ((fac1 <= 0.0f) && (fac2 >= 1.0f)) {
v2d->scroll |= V2D_SCROLL_VERTICAL_FULLR;
scrollers->vertfull= 1;
@@ -1559,16 +1559,16 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
/* horizontal scrollbar */
if (scroll & V2D_SCROLL_HORIZONTAL) {
/* only draw scrollbar when it doesn't fill the entire space */
- if(vs->horfull==0) {
+ if (vs->horfull==0) {
bTheme *btheme= UI_GetTheme();
uiWidgetColors wcol= btheme->tui.wcol_scroll;
rcti slider;
int state;
- slider.xmin= vs->hor_min;
- slider.xmax= vs->hor_max;
- slider.ymin= hor.ymin;
- slider.ymax= hor.ymax;
+ slider.xmin = vs->hor_min;
+ slider.xmax = vs->hor_max;
+ slider.ymin = hor.ymin;
+ slider.ymax = hor.ymax;
state= (v2d->scroll_ui & V2D_SCROLL_H_ACTIVE)?UI_SCROLL_PRESSED:0;
@@ -1628,7 +1628,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
for (; fac < hor.xmax-10; fac+=dfac, val+=grid->dx) {
/* make prints look nicer for scrollers */
- if(fac < hor.xmin+10)
+ if (fac < hor.xmin+10)
continue;
switch (vs->xunits) {
@@ -1670,16 +1670,16 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
/* vertical scrollbar */
if (scroll & V2D_SCROLL_VERTICAL) {
/* only draw scrollbar when it doesn't fill the entire space */
- if(vs->vertfull==0) {
+ if (vs->vertfull==0) {
bTheme *btheme= UI_GetTheme();
uiWidgetColors wcol= btheme->tui.wcol_scroll;
rcti slider;
int state;
- slider.xmin= vert.xmin;
- slider.xmax= vert.xmax;
- slider.ymin= vs->vert_min;
- slider.ymax= vs->vert_max;
+ slider.xmin = vert.xmin;
+ slider.xmax = vert.xmax;
+ slider.ymin = vs->vert_min;
+ slider.ymax = vs->vert_max;
state= (v2d->scroll_ui & V2D_SCROLL_V_ACTIVE)?UI_SCROLL_PRESSED:0;
@@ -1738,7 +1738,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
for (; fac < vert.ymax-10; fac+= dfac, val += grid->dy) {
/* make prints look nicer for scrollers */
- if(fac < vert.ymin+10)
+ if (fac < vert.ymin+10)
continue;
scroll_printstr(scene, (float)(vert.xmax)-2.0f, fac, val, grid->powery, vs->yunits, 'v');
@@ -1779,14 +1779,14 @@ void UI_view2d_listview_cell_to_view(View2D *v2d, short columnwidth, short rowhe
if ELEM(NULL, v2d, rect)
return;
if ((columnwidth <= 0) && (rowheight <= 0)) {
- rect->xmin= rect->xmax= 0.0f;
- rect->ymin= rect->ymax= 0.0f;
+ rect->xmin = rect->xmax = 0.0f;
+ rect->ymin = rect->ymax = 0.0f;
return;
}
/* x-coordinates */
- rect->xmin= startx + (float)(columnwidth * column);
- rect->xmax= startx + (float)(columnwidth * (column + 1));
+ rect->xmin = startx + (float)(columnwidth * column);
+ rect->xmax = startx + (float)(columnwidth * (column + 1));
if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) {
/* simply negate the values for the coordinates if in negative half */
@@ -1795,8 +1795,8 @@ void UI_view2d_listview_cell_to_view(View2D *v2d, short columnwidth, short rowhe
}
/* y-coordinates */
- rect->ymin= starty + (float)(rowheight * row);
- rect->ymax= starty + (float)(rowheight * (row + 1));
+ rect->ymin = starty + (float)(rowheight * row);
+ rect->ymax = starty + (float)(rowheight * (row + 1));
if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) {
/* simply negate the values for the coordinates if in negative half */
@@ -1935,12 +1935,12 @@ void UI_view2d_to_region_no_clip(View2D *v2d, float x, float y, int *regionx, in
/* although we don't clamp to lie within region bounds, we must avoid exceeding size of ints */
if (regionx) {
if (x < INT_MIN) *regionx= INT_MIN;
- else if(x > INT_MAX) *regionx= INT_MAX;
+ else if (x > INT_MAX) *regionx= INT_MAX;
else *regionx= (int)x;
}
if (regiony) {
if (y < INT_MIN) *regiony= INT_MIN;
- else if(y > INT_MAX) *regiony= INT_MAX;
+ else if (y > INT_MAX) *regiony= INT_MAX;
else *regiony= (int)y;
}
}
@@ -2039,7 +2039,7 @@ void UI_view2d_text_cache_add(View2D *v2d, float x, float y, const char *str, co
UI_view2d_view_to_region(v2d, x, y, mval, mval+1);
- if(mval[0]!=V2D_IS_CLIPPED && mval[1]!=V2D_IS_CLIPPED) {
+ if (mval[0]!=V2D_IS_CLIPPED && mval[1]!=V2D_IS_CLIPPED) {
int len= strlen(str)+1;
/* use calloc, rect has to be zeroe'd */
View2DString *v2s= MEM_callocN(sizeof(View2DString)+len, "View2DString");
@@ -2083,19 +2083,19 @@ void UI_view2d_text_cache_draw(ARegion *ar)
// glPushMatrix();
ED_region_pixelspace(ar);
- for(v2s= strings.first; v2s; v2s= v2s->next) {
+ for (v2s= strings.first; v2s; v2s= v2s->next) {
const char *str= (const char *)(v2s+1);
int xofs=0, yofs;
yofs= ceil( 0.5f*(v2s->rect.ymax - v2s->rect.ymin - BLF_height_default("28")));
- if(yofs<1) yofs= 1;
+ if (yofs<1) yofs= 1;
- if(col_pack_prev != v2s->col.pack) {
+ if (col_pack_prev != v2s->col.pack) {
glColor3ubv(v2s->col.ub);
col_pack_prev= v2s->col.pack;
}
- if(v2s->rect.xmin >= v2s->rect.xmax)
+ if (v2s->rect.xmin >= v2s->rect.xmax)
BLF_draw_default((float)v2s->mval[0]+xofs, (float)v2s->mval[1]+yofs, 0.0, str, BLF_DRAW_STR_DUMMY_MAX);
else {
BLF_clipping_default(v2s->rect.xmin-4, v2s->rect.ymin-4, v2s->rect.xmax+4, v2s->rect.ymax+4);
@@ -2110,7 +2110,7 @@ void UI_view2d_text_cache_draw(ARegion *ar)
// glMatrixMode(GL_MODELVIEW);
// glPopMatrix();
- if(strings.first)
+ if (strings.first)
BLI_freelistN(&strings);
}
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 49dae81d985..c729e944c62 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -291,18 +291,18 @@ static int view_pan_cancel(bContext *UNUSED(C), wmOperator *op)
static void VIEW2D_OT_pan(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Pan View";
- ot->description= "Pan the view";
- ot->idname= "VIEW2D_OT_pan";
+ ot->name = "Pan View";
+ ot->description = "Pan the view";
+ ot->idname = "VIEW2D_OT_pan";
/* api callbacks */
- ot->exec= view_pan_exec;
- ot->invoke= view_pan_invoke;
- ot->modal= view_pan_modal;
- ot->cancel= view_pan_cancel;
+ ot->exec = view_pan_exec;
+ ot->invoke = view_pan_invoke;
+ ot->modal = view_pan_modal;
+ ot->cancel = view_pan_cancel;
/* operator is modal */
- ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
+ ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
/* rna - must keep these in sync with the other operators */
RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX);
@@ -341,12 +341,12 @@ static int view_scrollright_exec(bContext *C, wmOperator *op)
static void VIEW2D_OT_scroll_right(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Scroll Right";
- ot->description= "Scroll the view right";
- ot->idname= "VIEW2D_OT_scroll_right";
+ ot->name = "Scroll Right";
+ ot->description = "Scroll the view right";
+ ot->idname = "VIEW2D_OT_scroll_right";
/* api callbacks */
- ot->exec= view_scrollright_exec;
+ ot->exec = view_scrollright_exec;
/* rna - must keep these in sync with the other operators */
RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX);
@@ -385,12 +385,12 @@ static int view_scrollleft_exec(bContext *C, wmOperator *op)
static void VIEW2D_OT_scroll_left(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Scroll Left";
- ot->description= "Scroll the view left";
- ot->idname= "VIEW2D_OT_scroll_left";
+ ot->name = "Scroll Left";
+ ot->description = "Scroll the view left";
+ ot->idname = "VIEW2D_OT_scroll_left";
/* api callbacks */
- ot->exec= view_scrollleft_exec;
+ ot->exec = view_scrollleft_exec;
/* rna - must keep these in sync with the other operators */
RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX);
@@ -418,7 +418,7 @@ static int view_scrolldown_exec(bContext *C, wmOperator *op)
RNA_int_set(op->ptr, "deltax", 0);
RNA_int_set(op->ptr, "deltay", -40);
- if(RNA_boolean_get(op->ptr, "page")) {
+ if (RNA_boolean_get(op->ptr, "page")) {
ARegion *ar= CTX_wm_region(C);
RNA_int_set(op->ptr, "deltay", ar->v2d.mask.ymin - ar->v2d.mask.ymax);
}
@@ -433,12 +433,12 @@ static int view_scrolldown_exec(bContext *C, wmOperator *op)
static void VIEW2D_OT_scroll_down(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Scroll Down";
- ot->description= "Scroll the view down";
- ot->idname= "VIEW2D_OT_scroll_down";
+ ot->name = "Scroll Down";
+ ot->description = "Scroll the view down";
+ ot->idname = "VIEW2D_OT_scroll_down";
/* api callbacks */
- ot->exec= view_scrolldown_exec;
+ ot->exec = view_scrolldown_exec;
/* rna - must keep these in sync with the other operators */
RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX);
@@ -468,7 +468,7 @@ static int view_scrollup_exec(bContext *C, wmOperator *op)
RNA_int_set(op->ptr, "deltax", 0);
RNA_int_set(op->ptr, "deltay", 40);
- if(RNA_boolean_get(op->ptr, "page")) {
+ if (RNA_boolean_get(op->ptr, "page")) {
ARegion *ar= CTX_wm_region(C);
RNA_int_set(op->ptr, "deltay", ar->v2d.mask.ymax - ar->v2d.mask.ymin);
}
@@ -483,12 +483,12 @@ static int view_scrollup_exec(bContext *C, wmOperator *op)
static void VIEW2D_OT_scroll_up(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Scroll Up";
- ot->description= "Scroll the view up";
- ot->idname= "VIEW2D_OT_scroll_up";
+ ot->name = "Scroll Up";
+ ot->description = "Scroll the view up";
+ ot->idname = "VIEW2D_OT_scroll_up";
/* api callbacks */
- ot->exec= view_scrollup_exec;
+ ot->exec = view_scrollup_exec;
/* rna - must keep these in sync with the other operators */
RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX);
@@ -711,14 +711,14 @@ static int view_zoomin_invoke(bContext *C, wmOperator *op, wmEvent *event)
static void VIEW2D_OT_zoom_in(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Zoom In";
- ot->description= "Zoom in the view";
- ot->idname= "VIEW2D_OT_zoom_in";
+ ot->name = "Zoom In";
+ ot->description = "Zoom in the view";
+ ot->idname = "VIEW2D_OT_zoom_in";
/* api callbacks */
- ot->invoke= view_zoomin_invoke;
-// ot->exec= view_zoomin_exec; // XXX, needs view_zoomdrag_init called first.
- ot->poll= view_zoom_poll;
+ ot->invoke = view_zoomin_invoke;
+// ot->exec = view_zoomin_exec; // XXX, needs view_zoomdrag_init called first.
+ ot->poll = view_zoom_poll;
/* rna - must keep these in sync with the other operators */
RNA_def_float(ot->srna, "zoomfacx", 0, -FLT_MAX, FLT_MAX, "Zoom Factor X", "", -FLT_MAX, FLT_MAX);
@@ -753,7 +753,7 @@ static int view_zoomout_invoke(bContext *C, wmOperator *op, wmEvent *event)
vzd= op->customdata;
- if(U.uiflag & USER_ZOOM_TO_MOUSEPOS) {
+ if (U.uiflag & USER_ZOOM_TO_MOUSEPOS) {
ARegion *ar= CTX_wm_region(C);
/* store initial mouse position (in view space) */
@@ -768,14 +768,14 @@ static int view_zoomout_invoke(bContext *C, wmOperator *op, wmEvent *event)
static void VIEW2D_OT_zoom_out(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Zoom Out";
- ot->description= "Zoom out the view";
- ot->idname= "VIEW2D_OT_zoom_out";
+ ot->name = "Zoom Out";
+ ot->description = "Zoom out the view";
+ ot->idname = "VIEW2D_OT_zoom_out";
/* api callbacks */
- ot->invoke= view_zoomout_invoke;
-// ot->exec= view_zoomout_exec; // XXX, needs view_zoomdrag_init called first.
- ot->poll= view_zoom_poll;
+ ot->invoke = view_zoomout_invoke;
+// ot->exec = view_zoomout_exec; // XXX, needs view_zoomdrag_init called first.
+ ot->poll = view_zoom_poll;
/* rna - must keep these in sync with the other operators */
RNA_def_float(ot->srna, "zoomfacx", 0, -FLT_MAX, FLT_MAX, "Zoom Factor X", "", -FLT_MAX, FLT_MAX);
@@ -867,7 +867,7 @@ static void view_zoomdrag_exit(bContext *C, wmOperator *op)
if (op->customdata) {
v2dViewZoomData *vzd= op->customdata;
- if(vzd->timer)
+ if (vzd->timer)
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), vzd->timer);
MEM_freeN(op->customdata);
@@ -975,7 +975,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event)
if (event->type == TIMER && event->customdata == vzd->timer) {
view_zoomdrag_apply(C, op);
}
- else if(event->type == MOUSEMOVE) {
+ else if (event->type == MOUSEMOVE) {
float dx, dy;
/* calculate new delta transform, based on zooming mode */
@@ -1063,20 +1063,20 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event)
static void VIEW2D_OT_zoom(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Zoom 2D View";
- ot->description= "Zoom in/out the view";
- ot->idname= "VIEW2D_OT_zoom";
+ ot->name = "Zoom 2D View";
+ ot->description = "Zoom in/out the view";
+ ot->idname = "VIEW2D_OT_zoom";
/* api callbacks */
- ot->exec= view_zoomdrag_exec;
- ot->invoke= view_zoomdrag_invoke;
- ot->modal= view_zoomdrag_modal;
- ot->cancel= view_zoomdrag_cancel;
+ ot->exec = view_zoomdrag_exec;
+ ot->invoke = view_zoomdrag_invoke;
+ ot->modal = view_zoomdrag_modal;
+ ot->cancel = view_zoomdrag_cancel;
- ot->poll= view_zoom_poll;
+ ot->poll = view_zoom_poll;
/* operator is repeatable */
- // ot->flag= OPTYPE_BLOCKING;
+ // ot->flag = OPTYPE_BLOCKING;
/* rna - must keep these in sync with the other operators */
RNA_def_float(ot->srna, "deltax", 0, -FLT_MAX, FLT_MAX, "Delta X", "", -FLT_MAX, FLT_MAX);
@@ -1116,12 +1116,12 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
* if zoom is allowed to be changed
*/
if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0) {
- v2d->cur.xmin= rect.xmin;
- v2d->cur.xmax= rect.xmax;
+ v2d->cur.xmin = rect.xmin;
+ v2d->cur.xmax = rect.xmax;
}
if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) {
- v2d->cur.ymin= rect.ymin;
- v2d->cur.ymax= rect.ymax;
+ v2d->cur.ymin = rect.ymin;
+ v2d->cur.ymax = rect.ymax;
}
}
else /* if (gesture_mode == GESTURE_MODAL_OUT) */ {
@@ -1138,16 +1138,16 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
zoom= size / (rect.xmax - rect.xmin);
center= (v2d->cur.xmax + v2d->cur.xmin) * 0.5f;
- v2d->cur.xmin= center - (size * zoom);
- v2d->cur.xmax= center + (size * zoom);
+ v2d->cur.xmin = center - (size * zoom);
+ v2d->cur.xmax = center + (size * zoom);
}
if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) {
size= (v2d->cur.ymax - v2d->cur.ymin);
zoom= size / (rect.ymax - rect.ymin);
center= (v2d->cur.ymax + v2d->cur.ymin) * 0.5f;
- v2d->cur.ymin= center - (size * zoom);
- v2d->cur.ymax= center + (size * zoom);
+ v2d->cur.ymin = center - (size * zoom);
+ v2d->cur.ymax = center + (size * zoom);
}
}
@@ -1164,17 +1164,17 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
static void VIEW2D_OT_zoom_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Zoom to Border";
- ot->description= "Zoom in the view to the nearest item contained in the border";
- ot->idname= "VIEW2D_OT_zoom_border";
+ ot->name = "Zoom to Border";
+ ot->description = "Zoom in the view to the nearest item contained in the border";
+ ot->idname = "VIEW2D_OT_zoom_border";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= view_borderzoom_exec;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = view_borderzoom_exec;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= view_zoom_poll;
+ ot->poll = view_zoom_poll;
/* rna */
RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, "Gesture Mode", "", INT_MIN, INT_MAX);
@@ -1547,7 +1547,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event)
if ( ((vsm->scroller=='h') && (v2d->keepofs & V2D_LOCKOFS_X)) ||
((vsm->scroller=='v') && (v2d->keepofs & V2D_LOCKOFS_Y)) )
{
- /* free customdata initialised */
+ /* free customdata initialized */
scroller_activate_exit(C, op);
/* can't catch this event for ourselves, so let it go to someone else? */
@@ -1559,7 +1559,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event)
if ( ((vsm->scroller=='h') && (v2d->scroll & (V2D_SCROLL_HORIZONTAL_HIDE|V2D_SCROLL_HORIZONTAL_FULLR))) ||
((vsm->scroller=='v') && (v2d->scroll & (V2D_SCROLL_VERTICAL_HIDE|V2D_SCROLL_VERTICAL_FULLR))) )
{
- /* free customdata initialised */
+ /* free customdata initialized */
scroller_activate_exit(C, op);
/* can't catch this event for ourselves, so let it go to someone else? */
@@ -1587,19 +1587,19 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event)
static void VIEW2D_OT_scroller_activate(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Scroller Activate";
- ot->description= "Scroll view by mouse click and drag";
- ot->idname= "VIEW2D_OT_scroller_activate";
+ ot->name = "Scroller Activate";
+ ot->description = "Scroll view by mouse click and drag";
+ ot->idname = "VIEW2D_OT_scroller_activate";
/* flags */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
/* api callbacks */
- ot->invoke= scroller_activate_invoke;
- ot->modal= scroller_activate_modal;
- ot->cancel= scroller_activate_cancel;
+ ot->invoke = scroller_activate_invoke;
+ ot->modal = scroller_activate_modal;
+ ot->cancel = scroller_activate_cancel;
- ot->poll= view2d_poll;
+ ot->poll = view2d_poll;
}
/* ********************************************************* */
@@ -1616,29 +1616,29 @@ static int reset_exec(bContext *C, wmOperator *UNUSED(op))
winx= (float)(v2d->mask.xmax - v2d->mask.xmin + 1);
winy= (float)(v2d->mask.ymax - v2d->mask.ymin + 1);
- v2d->cur.xmax= v2d->cur.xmin + winx;
- v2d->cur.ymax= v2d->cur.ymin + winy;
+ v2d->cur.xmax = v2d->cur.xmin + winx;
+ v2d->cur.ymax = v2d->cur.ymin + winy;
/* align */
if (v2d->align) {
/* posx and negx flags are mutually exclusive, so watch out */
if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) {
- v2d->cur.xmax= 0.0f;
- v2d->cur.xmin= -winx*style->panelzoom;
+ v2d->cur.xmax = 0.0f;
+ v2d->cur.xmin = -winx*style->panelzoom;
}
else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) {
- v2d->cur.xmax= winx*style->panelzoom;
- v2d->cur.xmin= 0.0f;
+ v2d->cur.xmax = winx*style->panelzoom;
+ v2d->cur.xmin = 0.0f;
}
/* - posx and negx flags are mutually exclusive, so watch out */
if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) {
- v2d->cur.ymax= 0.0f;
- v2d->cur.ymin= -winy*style->panelzoom;
+ v2d->cur.ymax = 0.0f;
+ v2d->cur.ymin = -winy*style->panelzoom;
}
else if ((v2d->align & V2D_ALIGN_NO_NEG_Y) && !(v2d->align & V2D_ALIGN_NO_POS_Y)) {
- v2d->cur.ymax= winy*style->panelzoom;
- v2d->cur.ymin= 0.0f;
+ v2d->cur.ymax = winy*style->panelzoom;
+ v2d->cur.ymin = 0.0f;
}
}
@@ -1655,13 +1655,13 @@ static int reset_exec(bContext *C, wmOperator *UNUSED(op))
static void VIEW2D_OT_reset(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reset View";
- ot->description= "Reset the view";
- ot->idname= "VIEW2D_OT_reset";
+ ot->name = "Reset View";
+ ot->description = "Reset the view";
+ ot->idname = "VIEW2D_OT_reset";
/* api callbacks */
- ot->exec= reset_exec;
- ot->poll= view2d_poll;
+ ot->exec = reset_exec;
+ ot->poll = view2d_poll;
}
/* ********************************************************* */
@@ -1689,7 +1689,7 @@ void UI_view2d_operatortypes(void)
void UI_view2d_keymap(wmKeyConfig *keyconf)
{
- wmKeyMap *keymap= WM_keymap_find(keyconf, "View2D", 0, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "View2D", 0, 0);
wmKeyMapItem *kmi;
/* scrollers */
@@ -1742,7 +1742,7 @@ void UI_view2d_keymap(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_border", BKEY, KM_PRESS, KM_SHIFT, 0);
/* Alternative keymap for buttons listview */
- keymap= WM_keymap_find(keyconf, "View2D Buttons List", 0, 0);
+ keymap = WM_keymap_find(keyconf, "View2D Buttons List", 0, 0);
WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", LEFTMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", MIDDLEMOUSE, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt
index 9d2229b52f4..de9443d1eb4 100644
--- a/source/blender/editors/mesh/CMakeLists.txt
+++ b/source/blender/editors/mesh/CMakeLists.txt
@@ -38,15 +38,14 @@ set(INC_SYS
)
set(SRC
- bmesh_select.c
- bmesh_selecthistory.c
- bmesh_tools.c
- bmesh_utils.c
editface.c
editmesh_add.c
editmesh_bvh.c
- knifetool.c
- loopcut.c
+ editmesh_knife.c
+ editmesh_loopcut.c
+ editmesh_select.c
+ editmesh_tools.c
+ editmesh_utils.c
mesh_data.c
mesh_ops.c
meshtools.c
diff --git a/source/blender/editors/mesh/bmesh_selecthistory.c b/source/blender/editors/mesh/bmesh_selecthistory.c
deleted file mode 100644
index c912813ac63..00000000000
--- a/source/blender/editors/mesh/bmesh_selecthistory.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2004 Blender Foundation.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/* ********* Selection History ************ */
-
-#include "BKE_tessmesh.h"
-
-
-/* these wrap equivalent bmesh functions. I'm in two minds of it we should
- * just use the bm functions directly; on the one hand, there's no real
- * need (at the moment) to wrap them, but on the other hand having these
- * wrapped avoids a confusing mess of mixing BM_ and EDBM_ namespaces. */
-
-void EDBM_editselection_center(BMEditMesh *em, float *center, BMEditSelection *ese)
-{
- BM_editselection_center(em->bm, center, ese);
-}
-
-void EDBM_editselection_normal(float *normal, BMEditSelection *ese)
-{
- BM_editselection_normal(normal, ese);
-}
-
-/* Calculate a plane that is rightangles to the edge/vert/faces normal
- * also make the plane run along an axis that is related to the geometry,
- * because this is used for the manipulators Y axis. */
-void EDBM_editselection_plane(BMEditMesh *em, float *plane, BMEditSelection *ese)
-{
- BM_editselection_plane(em->bm, plane, ese);
-}
-
-void EDBM_remove_selection(BMEditMesh *em, BMElem *ele)
-{
- BM_select_history_remove(em->bm, ele);
-}
-
-void EDBM_store_selection(BMEditMesh *em, BMElem *ele)
-{
- BM_select_history_store(em->bm, ele);
-}
-
-void EDBM_validate_selections(BMEditMesh *em)
-{
- BM_select_history_validate(em->bm);
-}
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index a7f72481456..efa5ce0395c 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -77,7 +77,7 @@ void paintface_flush_flags(Object *ob)
int totface, totpoly;
int i;
- if(me==NULL || dm==NULL)
+ if (me==NULL || dm==NULL)
return;
/*
@@ -169,20 +169,20 @@ void paintface_hide(Object *ob, const int unselected)
int a;
me= get_mesh(ob);
- if(me==NULL || me->totpoly==0) return;
+ if (me==NULL || me->totpoly==0) return;
mface= me->mpoly;
a= me->totpoly;
- while(a--) {
- if((mface->flag & ME_HIDE) == 0) {
- if(unselected) {
- if( (mface->flag & ME_FACE_SEL)==0) mface->flag |= ME_HIDE;
+ while (a--) {
+ if ((mface->flag & ME_HIDE) == 0) {
+ if (unselected) {
+ if ( (mface->flag & ME_FACE_SEL)==0) mface->flag |= ME_HIDE;
}
else {
- if( (mface->flag & ME_FACE_SEL)) mface->flag |= ME_HIDE;
+ if ( (mface->flag & ME_FACE_SEL)) mface->flag |= ME_HIDE;
}
}
- if(mface->flag & ME_HIDE) mface->flag &= ~ME_FACE_SEL;
+ if (mface->flag & ME_HIDE) mface->flag &= ~ME_FACE_SEL;
mface++;
}
@@ -198,12 +198,12 @@ void paintface_reveal(Object *ob)
int a;
me= get_mesh(ob);
- if(me==NULL || me->totpoly==0) return;
+ if (me==NULL || me->totpoly==0) return;
mface= me->mpoly;
a= me->totpoly;
- while(a--) {
- if(mface->flag & ME_HIDE) {
+ while (a--) {
+ if (mface->flag & ME_HIDE) {
mface->flag |= ME_FACE_SEL;
mface->flag -= ME_HIDE;
}
@@ -239,8 +239,8 @@ static void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int ind
seamhash = BLI_edgehash_new();
linkflag= MEM_callocN(sizeof(char)*me->totpoly, "linkflaguv");
- for(med=me->medge, a=0; a < me->totedge; a++, med++)
- if(med->flag & ME_SEAM)
+ for (med=me->medge, a=0; a < me->totedge; a++, med++)
+ if (med->flag & ME_SEAM)
BLI_edgehash_insert(seamhash, med->v1, med->v2, NULL);
if (mode==0 || mode==1) {
@@ -252,25 +252,25 @@ static void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int ind
else {
/* fill array by selection */
mf= me->mpoly;
- for(a=0; a<me->totpoly; a++, mf++) {
- if(mf->flag & ME_HIDE);
- else if(mf->flag & ME_FACE_SEL) {
+ for (a=0; a<me->totpoly; a++, mf++) {
+ if (mf->flag & ME_HIDE);
+ else if (mf->flag & ME_FACE_SEL) {
hash_add_face(ehash, mf, me->mloop + mf->loopstart);
linkflag[a]= 1;
}
}
}
- while(doit) {
+ while (doit) {
doit= 0;
/* expand selection */
mf= me->mpoly;
- for(a=0; a<me->totpoly; a++, mf++) {
- if(mf->flag & ME_HIDE)
+ for (a=0; a<me->totpoly; a++, mf++) {
+ if (mf->flag & ME_HIDE)
continue;
- if(!linkflag[a]) {
+ if (!linkflag[a]) {
MLoop *mnextl;
mark= 0;
@@ -282,7 +282,7 @@ static void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int ind
mark = 1;
}
- if(mark) {
+ if (mark) {
linkflag[a]= 1;
hash_add_face(ehash, mf, me->mloop + mf->loopstart);
doit= 1;
@@ -295,26 +295,26 @@ static void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int ind
BLI_edgehash_free(ehash, NULL);
BLI_edgehash_free(seamhash, NULL);
- if(mode==0 || mode==2) {
- for(a=0, mf=me->mpoly; a<me->totpoly; a++, mf++)
- if(linkflag[a])
+ if (mode==0 || mode==2) {
+ for (a=0, mf=me->mpoly; a<me->totpoly; a++, mf++)
+ if (linkflag[a])
mf->flag |= ME_FACE_SEL;
else
mf->flag &= ~ME_FACE_SEL;
}
- else if(mode==1) {
- for(a=0, mf=me->mpoly; a<me->totpoly; a++, mf++)
- if(linkflag[a] && (mf->flag & ME_FACE_SEL))
+ else if (mode==1) {
+ for (a=0, mf=me->mpoly; a<me->totpoly; a++, mf++)
+ if (linkflag[a] && (mf->flag & ME_FACE_SEL))
break;
if (a<me->totpoly) {
- for(a=0, mf=me->mpoly; a<me->totpoly; a++, mf++)
- if(linkflag[a])
+ for (a=0, mf=me->mpoly; a<me->totpoly; a++, mf++)
+ if (linkflag[a])
mf->flag &= ~ME_FACE_SEL;
}
else {
- for(a=0, mf=me->mpoly; a<me->totpoly; a++, mf++)
- if(linkflag[a])
+ for (a=0, mf=me->mpoly; a<me->totpoly; a++, mf++)
+ if (linkflag[a])
mf->flag |= ME_FACE_SEL;
}
}
@@ -328,7 +328,7 @@ void paintface_select_linked(bContext *UNUSED(C), Object *ob, int UNUSED(mval[2]
unsigned int index=0;
me = get_mesh(ob);
- if(me==NULL || me->totpoly==0) return;
+ if (me==NULL || me->totpoly==0) return;
if (mode==0 || mode==1) {
// XXX - Causes glitches, not sure why
@@ -350,13 +350,13 @@ void paintface_deselect_all_visible(Object *ob, int action, short flush_flags)
int a;
me= get_mesh(ob);
- if(me==NULL) return;
+ if (me==NULL) return;
- if(action == SEL_INVERT) {
+ if (action == SEL_INVERT) {
mface= me->mpoly;
a= me->totpoly;
- while(a--) {
- if((mface->flag & ME_HIDE) == 0) {
+ while (a--) {
+ if ((mface->flag & ME_HIDE) == 0) {
mface->flag ^= ME_FACE_SEL;
}
mface++;
@@ -368,8 +368,8 @@ void paintface_deselect_all_visible(Object *ob, int action, short flush_flags)
mface= me->mpoly;
a= me->totpoly;
- while(a--) {
- if((mface->flag & ME_HIDE) == 0 && mface->flag & ME_FACE_SEL) {
+ while (a--) {
+ if ((mface->flag & ME_HIDE) == 0 && mface->flag & ME_FACE_SEL) {
action = SEL_DESELECT;
break;
}
@@ -379,8 +379,8 @@ void paintface_deselect_all_visible(Object *ob, int action, short flush_flags)
mface= me->mpoly;
a= me->totpoly;
- while(a--) {
- if((mface->flag & ME_HIDE) == 0) {
+ while (a--) {
+ if ((mface->flag & ME_HIDE) == 0) {
switch (action) {
case SEL_SELECT:
mface->flag |= ME_FACE_SEL;
@@ -397,7 +397,7 @@ void paintface_deselect_all_visible(Object *ob, int action, short flush_flags)
}
}
- if(flush_flags) {
+ if (flush_flags) {
paintface_flush_flags(ob);
}
}
@@ -413,7 +413,7 @@ int paintface_minmax(Object *ob, float *min, float *max)
float vec[3], bmat[3][3];
me= get_mesh(ob);
- if(!me || !me->mtpoly) return ok;
+ if (!me || !me->mtpoly) return ok;
copy_m3_m4(bmat, ob->obmat);
@@ -462,7 +462,7 @@ void seam_mark_clear_tface(Scene *scene, short mode)
int a, b;
me= get_mesh(OBACT);
- if(me==0 || me->totpoly==0) return;
+ if (me==0 || me->totpoly==0) return;
if (mode == 0)
mode = pupmenu("Seams%t|Mark Border Seam %x1|Clear Seam %x2");
@@ -571,7 +571,7 @@ int do_paintface_box_select(ViewContext *vc, rcti *rect, int select, int extend)
me= get_mesh(ob);
- if(me==NULL || me->totpoly==0 || sx*sy <= 0)
+ if (me==NULL || me->totpoly==0 || sx*sy <= 0)
return OPERATOR_CANCELLED;
selar= MEM_callocN(me->totpoly+1, "selar");
@@ -580,8 +580,8 @@ int do_paintface_box_select(ViewContext *vc, rcti *rect, int select, int extend)
paintface_deselect_all_visible(vc->obact, SEL_DESELECT, FALSE);
mface= me->mpoly;
- for(a=1; a<=me->totpoly; a++, mface++) {
- if((mface->flag & ME_HIDE) == 0)
+ for (a=1; a<=me->totpoly; a++, mface++) {
+ if ((mface->flag & ME_HIDE) == 0)
mface->flag &= ~ME_FACE_SEL;
}
}
@@ -591,23 +591,23 @@ int do_paintface_box_select(ViewContext *vc, rcti *rect, int select, int extend)
ibuf = IMB_allocImBuf(sx,sy,32,IB_rect);
rt = ibuf->rect;
glReadPixels(rect->xmin+vc->ar->winrct.xmin, rect->ymin+vc->ar->winrct.ymin, sx, sy, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
- if(ENDIAN_ORDER==B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf);
+ if (ENDIAN_ORDER==B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf);
a= sx*sy;
- while(a--) {
- if(*rt) {
+ while (a--) {
+ if (*rt) {
index= WM_framebuffer_to_index(*rt);
- if(index<=me->totpoly) selar[index]= 1;
+ if (index<=me->totpoly) selar[index]= 1;
}
rt++;
}
mface= me->mpoly;
- for(a=1; a<=me->totpoly; a++, mface++) {
- if(selar[a]) {
- if(mface->flag & ME_HIDE);
+ for (a=1; a<=me->totpoly; a++, mface++) {
+ if (selar[a]) {
+ if (mface->flag & ME_HIDE);
else {
- if(select) mface->flag |= ME_FACE_SEL;
+ if (select) mface->flag |= ME_FACE_SEL;
else mface->flag &= ~ME_FACE_SEL;
}
}
@@ -638,7 +638,7 @@ void paintvert_flush_flags(Object *ob)
int totvert;
int i;
- if(me==NULL || dm==NULL)
+ if (me==NULL || dm==NULL)
return;
index_array = dm->getVertDataArray(dm, CD_ORIGINDEX);
@@ -648,11 +648,11 @@ void paintvert_flush_flags(Object *ob)
dm_mv= dm_mvert;
- if(index_array) {
+ if (index_array) {
int orig_index;
for (i= 0; i<totvert; i++, dm_mv++) {
orig_index= index_array[i];
- if(orig_index != ORIGINDEX_NONE) {
+ if (orig_index != ORIGINDEX_NONE) {
dm_mv->flag= me->mvert[index_array[i]].flag;
}
}
@@ -671,13 +671,13 @@ void paintvert_deselect_all_visible(Object *ob, int action, short flush_flags)
int a;
me= get_mesh(ob);
- if(me==NULL) return;
+ if (me==NULL) return;
- if(action == SEL_INVERT) {
+ if (action == SEL_INVERT) {
mvert= me->mvert;
a= me->totvert;
- while(a--) {
- if((mvert->flag & ME_HIDE) == 0) {
+ while (a--) {
+ if ((mvert->flag & ME_HIDE) == 0) {
mvert->flag ^= SELECT;
}
mvert++;
@@ -689,8 +689,8 @@ void paintvert_deselect_all_visible(Object *ob, int action, short flush_flags)
mvert= me->mvert;
a= me->totvert;
- while(a--) {
- if((mvert->flag & ME_HIDE) == 0 && mvert->flag & SELECT) {
+ while (a--) {
+ if ((mvert->flag & ME_HIDE) == 0 && mvert->flag & SELECT) {
action = SEL_DESELECT;
break;
}
@@ -700,8 +700,8 @@ void paintvert_deselect_all_visible(Object *ob, int action, short flush_flags)
mvert= me->mvert;
a= me->totvert;
- while(a--) {
- if((mvert->flag & ME_HIDE) == 0) {
+ while (a--) {
+ if ((mvert->flag & ME_HIDE) == 0) {
switch (action) {
case SEL_SELECT:
mvert->flag |= SELECT;
@@ -718,7 +718,7 @@ void paintvert_deselect_all_visible(Object *ob, int action, short flush_flags)
}
}
- if(flush_flags) {
+ if (flush_flags) {
paintvert_flush_flags(ob);
}
}
@@ -763,7 +763,7 @@ int ED_mesh_mirrtopo_recalc_check(Mesh *me, const int ob_mode, MirrTopoStore_t *
totedge = me->totedge;
}
- if( (mesh_topo_store->index_lookup==NULL) ||
+ if ( (mesh_topo_store->index_lookup==NULL) ||
(mesh_topo_store->prev_ob_mode != ob_mode) ||
(totvert != mesh_topo_store->prev_vert_tot) ||
(totedge != mesh_topo_store->prev_edge_tot))
@@ -801,7 +801,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
mesh_topo_store->prev_ob_mode = ob_mode;
- if(em) {
+ if (em) {
BM_mesh_elem_index_ensure(em->bm, BM_VERT);
totvert = em->bm->totvert;
@@ -813,7 +813,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
topo_hash = MEM_callocN(totvert * sizeof(MirrTopoHash_t), "TopoMirr");
/* Initialize the vert-edge-user counts used to detect unique topology */
- if(em) {
+ if (em) {
totedge = me->edit_btmesh->bm->totedge;
BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
@@ -824,7 +824,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
else {
totedge = me->totedge;
- for(a=0, medge=me->medge; a < me->totedge; a++, medge++) {
+ for (a=0, medge=me->medge; a < me->totedge; a++, medge++) {
topo_hash[medge->v1]++;
topo_hash[medge->v2]++;
}
@@ -833,17 +833,17 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
topo_hash_prev = MEM_dupallocN(topo_hash);
tot_unique_prev = -1;
- while(1) {
+ while (1) {
/* use the number of edges per vert to give verts unique topology IDs */
- if(em) {
+ if (em) {
BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
topo_hash[BM_elem_index_get(eed->v1)] += topo_hash_prev[BM_elem_index_get(eed->v2)];
topo_hash[BM_elem_index_get(eed->v2)] += topo_hash_prev[BM_elem_index_get(eed->v1)];
}
}
else {
- for(a=0, medge=me->medge; a<me->totedge; a++, medge++) {
+ for (a=0, medge=me->medge; a<me->totedge; a++, medge++) {
/* This can make really big numbers, wrapping around here is fine */
topo_hash[medge->v1] += topo_hash_prev[medge->v2];
topo_hash[medge->v2] += topo_hash_prev[medge->v1];
@@ -855,7 +855,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
qsort(topo_hash_prev, totvert, sizeof(MirrTopoHash_t), mirrtopo_hash_sort);
tot_unique = 1; /* account for skiping the first value */
- for(a=1; a<totvert; a++) {
+ for (a=1; a<totvert; a++) {
if (topo_hash_prev[a-1] != topo_hash_prev[a]) {
tot_unique++;
}
@@ -879,14 +879,14 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
/* since we are looping through verts, initialize these values here too */
index_lookup = MEM_mallocN(totvert * sizeof(*index_lookup), "mesh_topo_lookup");
- if(em) {
+ if (em) {
if (skip_em_vert_array_init == FALSE) {
EDBM_init_index_arrays(em,1, 0, 0);
}
}
- for(a=0; a<totvert; a++) {
+ for (a=0; a<totvert; a++) {
topo_pairs[a].hash = topo_hash[a];
topo_pairs[a].v_index = a;
@@ -901,11 +901,11 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
/* Get the pairs out of the sorted hashes, note, totvert+1 means we can use the previous 2,
* but you cant ever access the last 'a' index of MirrTopoPairs */
- for(a=2; a <= totvert; a++) {
+ for (a=2; a <= totvert; a++) {
/* printf("I %d %ld %d\n", (a-last), MirrTopoPairs[a ].hash, MirrTopoPairs[a ].v_index ); */
if ((a==totvert) || (topo_pairs[a-1].hash != topo_pairs[a].hash)) {
if (a-last==2) {
- if(em) {
+ if (em) {
index_lookup[topo_pairs[a-1].v_index] = (intptr_t)EDBM_get_vert_for_index(em, topo_pairs[a-2].v_index);
index_lookup[topo_pairs[a-2].v_index] = (intptr_t)EDBM_get_vert_for_index(em, topo_pairs[a-1].v_index);
}
@@ -917,7 +917,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
last = a;
}
}
- if(em) {
+ if (em) {
if (skip_em_vert_array_init == FALSE) {
EDBM_free_index_arrays(em);
}
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index 1794e5d6e21..d816d33c9df 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -55,7 +55,7 @@
/* returns standard diameter */
static float new_primitive_matrix(bContext *C, float *loc, float *rot, float primmat[][4])
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
View3D *v3d = CTX_wm_view3d(C);
float mat[3][3], rmat[3][3], cmat[3][3], imat[3][3];
@@ -85,11 +85,11 @@ static void make_prim_init(bContext *C, const char *idname,
float *dia, float mat[][4],
int *state, float *loc, float *rot, unsigned int layer)
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
*state = 0;
- if(obedit==NULL || obedit->type!=OB_MESH) {
- obedit= ED_object_add_type(C, OB_MESH, loc, rot, FALSE, layer);
+ if (obedit == NULL || obedit->type != OB_MESH) {
+ obedit = ED_object_add_type(C, OB_MESH, loc, rot, FALSE, layer);
rename_id((ID *)obedit, idname);
rename_id((ID *)obedit->data, idname);
@@ -98,7 +98,9 @@ static void make_prim_init(bContext *C, const char *idname,
ED_object_enter_editmode(C, EM_DO_UNDO|EM_IGNORE_LAYER); /* rare cases the active layer is messed up */
*state = 1;
}
- else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+ else {
+ DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+ }
*dia *= new_primitive_matrix(C, loc, rot, mat);
}
@@ -158,17 +160,17 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op)
void MESH_OT_primitive_plane_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Plane";
- ot->description= "Construct a filled planar mesh with 4 vertices";
- ot->idname= "MESH_OT_primitive_plane_add";
+ ot->name = "Add Plane";
+ ot->description = "Construct a filled planar mesh with 4 vertices";
+ ot->idname = "MESH_OT_primitive_plane_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_plane_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_plane_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -186,7 +188,7 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op)
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
make_prim_init(C, "Cube", &dia, mat, &state, loc, rot, layer);
- obedit= CTX_data_edit_object(C);
+ obedit = CTX_data_edit_object(C);
me = obedit->data;
em = me->edit_btmesh;
@@ -203,17 +205,17 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op)
void MESH_OT_primitive_cube_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Cube";
- ot->description= "Construct a cube mesh";
- ot->idname= "MESH_OT_primitive_cube_add";
+ ot->name = "Add Cube";
+ ot->description = "Construct a cube mesh";
+ ot->idname = "MESH_OT_primitive_cube_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_cube_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_cube_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -235,7 +237,7 @@ static int add_primitive_circle_exec(bContext *C, wmOperator *op)
unsigned int layer;
cap_end = RNA_enum_get(op->ptr, "fill_type");
- cap_tri = cap_end==2;
+ cap_tri = (cap_end == 2);
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
make_prim_init(C, "Circle", &dia, mat, &state, loc, rot, layer);
@@ -262,17 +264,17 @@ void MESH_OT_primitive_circle_add(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Add Circle";
- ot->description= "Construct a circle mesh";
- ot->idname= "MESH_OT_primitive_circle_add";
+ ot->name = "Add Circle";
+ ot->description = "Construct a circle mesh";
+ ot->idname = "MESH_OT_primitive_circle_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_circle_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_circle_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_int(ot->srna, "vertices", 32, 3, INT_MAX, "Vertices", "", 3, 500);
@@ -294,7 +296,7 @@ static int add_primitive_cylinder_exec(bContext *C, wmOperator *op)
unsigned int layer;
cap_end = RNA_enum_get(op->ptr, "end_fill_type");
- cap_tri = cap_end==2;
+ cap_tri = (cap_end == 2);
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
make_prim_init(C, "Cylinder", &dia, mat, &state, loc, rot, layer);
@@ -325,17 +327,17 @@ void MESH_OT_primitive_cylinder_add(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Add Cylinder";
- ot->description= "Construct a cylinder mesh";
- ot->idname= "MESH_OT_primitive_cylinder_add";
+ ot->name = "Add Cylinder";
+ ot->description = "Construct a cylinder mesh";
+ ot->idname = "MESH_OT_primitive_cylinder_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_cylinder_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_cylinder_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, "Vertices", "", 2, 500);
@@ -359,7 +361,7 @@ static int add_primitive_cone_exec(bContext *C, wmOperator *op)
unsigned int layer;
cap_end = RNA_enum_get(op->ptr, "end_fill_type");
- cap_tri = cap_end==2;
+ cap_tri = (cap_end == 2);
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL);
make_prim_init(C, "Cone", &dia, mat, &state, loc, rot, layer);
@@ -387,17 +389,17 @@ void MESH_OT_primitive_cone_add(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Add Cone";
- ot->description= "Construct a conic mesh";
- ot->idname= "MESH_OT_primitive_cone_add";
+ ot->name = "Add Cone";
+ ot->description = "Construct a conic mesh";
+ ot->idname = "MESH_OT_primitive_cone_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_cone_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_cone_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, "Vertices", "", 2, 500);
@@ -447,17 +449,17 @@ void MESH_OT_primitive_grid_add(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Add Grid";
- ot->description= "Construct a grid mesh";
- ot->idname= "MESH_OT_primitive_grid_add";
+ ot->name = "Add Grid";
+ ot->description = "Construct a grid mesh";
+ ot->idname = "MESH_OT_primitive_grid_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_grid_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_grid_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_int(ot->srna, "x_subdivisions", 10, 3, INT_MAX, "X Subdivisions", "", 3, 1000);
@@ -480,7 +482,7 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, &view_aligned);
if (!view_aligned)
- rot[0] += M_PI/2.0f;
+ rot[0] += M_PI / 2.0f;
make_prim_init(C, "Monkey", &dia, mat, &state, loc, rot, layer);
@@ -499,17 +501,17 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
void MESH_OT_primitive_monkey_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Monkey";
- ot->description= "Construct a Suzanne mesh";
- ot->idname= "MESH_OT_primitive_monkey_add";
+ ot->name = "Add Monkey";
+ ot->description = "Construct a Suzanne mesh";
+ ot->idname = "MESH_OT_primitive_monkey_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_monkey_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_monkey_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -534,7 +536,7 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op)
if (!EDBM_CallAndSelectOpf(em, op, "vertout",
"create_uvsphere segments=%i revolutions=%i diameter=%f mat=%m4",
RNA_int_get(op->ptr, "segments"), RNA_int_get(op->ptr, "ring_count"),
- RNA_float_get(op->ptr,"size"), mat))
+ RNA_float_get(op->ptr, "size"), mat))
{
return OPERATOR_CANCELLED;
}
@@ -549,17 +551,17 @@ void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Add UV Sphere";
- ot->description= "Construct a UV sphere mesh";
- ot->idname= "MESH_OT_primitive_uv_sphere_add";
+ ot->name = "Add UV Sphere";
+ ot->description = "Construct a UV sphere mesh";
+ ot->idname = "MESH_OT_primitive_uv_sphere_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_uvsphere_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_uvsphere_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_int(ot->srna, "segments", 32, 3, INT_MAX, "Segments", "", 3, 500);
@@ -606,17 +608,17 @@ void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Add Ico Sphere";
- ot->description= "Construct an Icosphere mesh";
- ot->idname= "MESH_OT_primitive_ico_sphere_add";
+ ot->name = "Add Ico Sphere";
+ ot->description = "Construct an Icosphere mesh";
+ ot->idname = "MESH_OT_primitive_ico_sphere_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= add_primitive_icosphere_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = add_primitive_icosphere_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_int(ot->srna, "subdivisions", 2, 1, INT_MAX, "Subdivisions", "", 1, 8);
diff --git a/source/blender/editors/mesh/editmesh_bvh.c b/source/blender/editors/mesh/editmesh_bvh.c
index 44d4d554ac8..6571af11af5 100644
--- a/source/blender/editors/mesh/editmesh_bvh.c
+++ b/source/blender/editors/mesh/editmesh_bvh.c
@@ -24,6 +24,11 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
+
+/** \file blender/editors/mesh/editmesh_bvh.c
+ * \ingroup edmesh
+ */
+
#define IN_EDITMESHBVH
@@ -53,7 +58,7 @@ typedef struct BMBVHTree {
float maxdist; //for nearest point search
float uv[2];
- /*stuff for topological vert search*/
+ /* stuff for topological vert search */
BMVert *v, *curv;
GHash *gh;
float curw, curd;
@@ -96,7 +101,7 @@ BMBVHTree *BMBVH_NewBVH(BMEditMesh *em, int flag, Scene *scene, Object *obedit)
tree->scene = scene;
tree->em = em;
tree->bm = em->bm;
- tree->epsilon = FLT_EPSILON*2.0f;
+ tree->epsilon = FLT_EPSILON * 2.0f;
tree->flag = flag;
tree->tree = BLI_bvhtree_new(em->tottri, tree->epsilon, 8, 8);
@@ -106,7 +111,7 @@ BMBVHTree *BMBVH_NewBVH(BMEditMesh *em, int flag, Scene *scene, Object *obedit)
BMVert *v;
void *data[3];
- tree->cos = MEM_callocN(sizeof(float)*3*em->bm->totvert, "bmbvh cos");
+ tree->cos = MEM_callocN(sizeof(float) * 3 * em->bm->totvert, "bmbvh cos");
BM_ITER_INDEX(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL, i) {
BM_elem_index_set(v, i); /* set_inline */
copy_v3_v3(tree->cos[i], v->co);
@@ -115,7 +120,7 @@ BMBVHTree *BMBVH_NewBVH(BMEditMesh *em, int flag, Scene *scene, Object *obedit)
cage = editbmesh_get_derived_cage_and_final(scene, obedit, em, &final, CD_MASK_DERIVEDMESH);
- cagecos = MEM_callocN(sizeof(float)*3*em->bm->totvert, "bmbvh cagecos");
+ cagecos = MEM_callocN(sizeof(float) * 3 * em->bm->totvert, "bmbvh cagecos");
data[0] = em;
data[1] = cagecos;
@@ -126,18 +131,19 @@ BMBVHTree *BMBVH_NewBVH(BMEditMesh *em, int flag, Scene *scene, Object *obedit)
tree->cagecos = cagecos;
- for (i=0; i<em->tottri; i++) {
+ for (i = 0; i < em->tottri; i++) {
if (flag & BMBVH_USE_CAGE) {
copy_v3_v3(cos[0], cagecos[BM_elem_index_get(em->looptris[i][0]->v)]);
copy_v3_v3(cos[1], cagecos[BM_elem_index_get(em->looptris[i][1]->v)]);
copy_v3_v3(cos[2], cagecos[BM_elem_index_get(em->looptris[i][2]->v)]);
- } else {
+ }
+ else {
copy_v3_v3(cos[0], em->looptris[i][0]->v->co);
copy_v3_v3(cos[1], em->looptris[i][1]->v->co);
copy_v3_v3(cos[2], em->looptris[i][2]->v->co);
}
- BLI_bvhtree_insert(tree->tree, i, (float*)cos, 3);
+ BLI_bvhtree_insert(tree->tree, i, (float *)cos, 3);
}
BLI_bvhtree_balance(tree->tree);
@@ -158,14 +164,15 @@ void BMBVH_FreeBVH(BMBVHTree *tree)
MEM_freeN(tree);
}
-/*taken from bvhutils.c*/
+/* taken from bvhutils.c */
static float ray_tri_intersection(const BVHTreeRay *ray, const float UNUSED(m_dist), float *v0,
float *v1, float *v2, float *uv, float UNUSED(e))
{
float dist;
- if(isect_ray_tri_v3((float*)ray->origin, (float*)ray->direction, v0, v1, v2, &dist, uv))
+ if (isect_ray_tri_v3((float *)ray->origin, (float *)ray->direction, v0, v1, v2, &dist, uv)) {
return dist;
+ }
return FLT_MAX;
}
@@ -217,11 +224,13 @@ BMFace *BMBVH_RayCast(BMBVHTree *tree, float *co, float *dir, float *hitout, flo
v2 = tree->em->looptris[hit.index][1]->v;
v3 = tree->em->looptris[hit.index][2]->v;
- for (i=0; i<3; i++) {
- co[i] = v1->co[i] + (v2->co[i] - v1->co[i])*tree->uv[0] + (v3->co[i]-v1->co[i])*tree->uv[1];
+ for (i = 0; i < 3; i++) {
+ co[i] = v1->co[i] + ((v2->co[i] - v1->co[i]) * tree->uv[0]) +
+ ((v3->co[i] - v1->co[i]) * tree->uv[1]);
}
copy_v3_v3(hitout, co);
- } else {
+ }
+ else {
copy_v3_v3(hitout, hit.co);
}
@@ -249,10 +258,10 @@ static void vertsearchcallback(void *userdata, int index, const float *UNUSED(co
maxdist = tree->maxdist;
- for (i=0; i<3; i++) {
+ for (i = 0; i < 3; i++) {
sub_v3_v3v3(v, hit->co, ls[i]->v->co);
- dist = sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);
+ dist = len_v3(v);
if (dist < hit->dist && dist < maxdist) {
copy_v3_v3(hit->co, ls[i]->v->co);
copy_v3_v3(hit->no, ls[i]->v->no);
@@ -267,7 +276,7 @@ BMVert *BMBVH_FindClosestVert(BMBVHTree *tree, float *co, float maxdist)
BVHTreeNearest hit;
copy_v3_v3(hit.co, co);
- hit.dist = maxdist*5;
+ hit.dist = maxdist * 5;
hit.index = -1;
tree->maxdist = maxdist;
@@ -276,14 +285,14 @@ BMVert *BMBVH_FindClosestVert(BMBVHTree *tree, float *co, float maxdist)
if (hit.dist != FLT_MAX && hit.index != -1) {
BMLoop **ls = tree->em->looptris[hit.index];
float dist, curdist = tree->maxdist, v[3];
- int cur=0, i;
+ int cur = 0, i;
maxdist = tree->maxdist;
- for (i=0; i<3; i++) {
+ for (i = 0; i < 3; i++) {
sub_v3_v3v3(v, hit.co, ls[i]->v->co);
- dist = sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);
+ dist = len_v3(v);
if (dist < curdist) {
cur = i;
curdist = dist;
@@ -303,7 +312,7 @@ typedef struct walklist {
float w, r;
int totwalked;
- /*state data*/
+ /* state data */
BMVert *lastv;
BMLoop *curl, *firstl;
BMEdge *cure;
@@ -312,17 +321,19 @@ typedef struct walklist {
/* UNUSED */
#if 0
static short winding(float *v1, float *v2, float *v3)
-/* is v3 to the right of v1-v2 ? With exception: v3==v1 || v3==v2 */
+/* is v3 to the right of (v1 - v2) ? With exception: v3 == v1 || v3 == v2 */
{
double inp;
- //inp= (v2[cox]-v1[cox])*(v1[coy]-v3[coy]) +(v1[coy]-v2[coy])*(v1[cox]-v3[cox]);
- inp= (v2[0]-v1[0])*(v1[1]-v3[1]) +(v1[1]-v2[1])*(v1[0]-v3[0]);
+ //inp = (v2[cox] - v1[cox]) * (v1[coy] - v3[coy]) + (v1[coy] - v2[coy]) * (v1[cox] - v3[cox]);
+ inp = (v2[0] - v1[0]) * (v1[1] - v3[1]) + (v1[1] - v2[1]) * (v1[0] - v3[0]);
- if(inp<0.0) return 0;
- else if(inp==0) {
- if(v1[0]==v3[0] && v1[1]==v3[1]) return 0;
- if(v2[0]==v3[0] && v2[1]==v3[1]) return 0;
+ if (inp < 0.0) {
+ return 0;
+ }
+ else if (inp == 0) {
+ if (v1[0] == v3[0] && v1[1] == v3[1]) return 0;
+ if (v2[0] == v3[0] && v2[1] == v3[1]) return 0;
}
return 1;
}
@@ -366,8 +377,8 @@ int BMBVH_EdgeVisible(BMBVHTree *tree, BMEdge *e, ARegion *ar, View3D *v3d, Obje
return 0;
}
- mval_f[0] = ar->winx/2.0;
- mval_f[1] = ar->winy/2.0;
+ mval_f[0] = ar->winx / 2.0f;
+ mval_f[1] = ar->winy / 2.0f;
ED_view3d_win_to_segment_clip(ar, v3d, mval_f, origin, end);
invert_m4_m4(invmat, obedit->obmat);
@@ -405,7 +416,7 @@ int BMBVH_EdgeVisible(BMBVHTree *tree, BMEdge *e, ARegion *ar, View3D *v3d, Obje
normalize_v3(dir2);
normalize_v3(dir3);
- /*do three samplings: left, middle, right*/
+ /* do three samplings: left, middle, right */
f = edge_ray_cast(tree, co1, dir1, NULL, e);
if (f && !edge_ray_cast(tree, co2, dir2, NULL, e))
return 1;
diff --git a/source/blender/editors/mesh/knifetool.c b/source/blender/editors/mesh/editmesh_knife.c
index e1380e6f1e1..f6367779251 100644
--- a/source/blender/editors/mesh/knifetool.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -19,13 +19,17 @@
* All rights reserved.
*
*
- * Contributor(s): Joseph Eagar, Joshua Leung
+ * Contributor(s): Joseph Eagar, Joshua Leung, Howard Trickey,
+ * Campbell Barton
*
* ***** END GPL LICENSE BLOCK *****
*/
-#define _USE_MATH_DEFINES
+/** \file blender/editors/mesh/editmesh_knife.c
+ * \ingroup edmesh
+ */
+#define _USE_MATH_DEFINES
#include "MEM_guardedalloc.h"
@@ -44,7 +48,6 @@
#include "BIF_gl.h"
#include "BIF_glutil.h" /* for paint cursor */
-
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_view3d.h"
@@ -62,7 +65,6 @@
/* this code here is kindof messy. . .I might need to eventually rework it - joeedh */
-#define MAXGROUP 30
#define KMAXDIST 10 /* max mouse distance from edge before not detecting it */
/* knifetool operator */
@@ -84,7 +86,7 @@ typedef struct KnifeEdge {
BMFace *basef; /* face to restrict face fill to */
ListBase faces;
int draw;
-
+
BMEdge *e, *oe; /* non-NULL if this is an original edge */
} KnifeEdge;
@@ -99,65 +101,72 @@ typedef struct BMEdgeHit {
BMFace *f;
} BMEdgeHit;
+typedef struct KnifePosData {
+ float co[3];
+ float cage[3];
+
+ /* At most one of vert, edge, or bmface should be non-NULL,
+ * saying whether the point is snapped to a vertex, edge, or in a face.
+ * If none are set, this point is in space and is_space should be true. */
+ KnifeVert *vert;
+ KnifeEdge *edge;
+ BMFace *bmface;
+ int is_space;
+
+ int mval[2]; /* mouse screen position */
+} KnifePosData;
+
/* struct for properties used while drawing */
typedef struct knifetool_opdata {
ARegion *ar; /* region that knifetool was activated in */
void *draw_handle; /* for drawing preview loop */
ViewContext vc;
bContext *C;
-
+
Object *ob;
BMEditMesh *em;
-
+
MemArena *arena;
GHash *origvertmap;
GHash *origedgemap;
-
+
GHash *kedgefacemap;
-
+
BMBVHTree *bmbvh;
BLI_mempool *kverts;
BLI_mempool *kedges;
-
+
float vthresh;
float ethresh;
-
- float vertco[3], vertcage[3];
- float prevco[3], prevcage[3];
-
+
/* used for drag-cutting */
BMEdgeHit *linehits;
int totlinehit;
-
- /* if curedge is NULL, attach to curvert;
- * if curvert is NULL, attach to curbmface,
- * otherwise create null vert */
- KnifeEdge *curedge, *prevedge;
- KnifeVert *curvert, *prevvert;
- BMFace *curbmface, *prevbmface;
-
- int totkedge, totkvert, cutnr;
-
+
+ /* Data for mouse-position-derived data (cur) and previous click (prev) */
+ KnifePosData cur, prev;
+
+ int totkedge, totkvert;
+
BLI_mempool *refs;
-
+
float projmat[4][4];
int is_ortho;
int cut_through;
float clipsta, clipend;
-
+
enum {
MODE_IDLE,
MODE_DRAGGING,
MODE_CONNECT,
MODE_PANNING
} mode;
-
+
int snap_midpoints, prevmode, extend;
int ignore_edge_snapping, ignore_vert_snapping;
- int prevmval[2];
-
+
enum {
ANGLE_FREE,
ANGLE_0,
@@ -166,7 +175,6 @@ typedef struct knifetool_opdata {
ANGLE_135
} angle_snapping;
- int is_space, prev_is_space; /*1 if current cut location, vertco, isn't on the mesh */
float (*cagecos)[3];
} knifetool_opdata;
@@ -180,6 +188,17 @@ static void knife_project_v3(knifetool_opdata *kcd, const float co[3], float sco
ED_view3d_project_float_v3(kcd->ar, co, sco, kcd->projmat);
}
+static void knife_pos_data_clear(KnifePosData *kpd)
+{
+ zero_v3(kpd->co);
+ zero_v3(kpd->cage);
+ kpd->vert = NULL;
+ kpd->edge = NULL;
+ kpd->bmface = NULL;
+ kpd->mval[0] = 0;
+ kpd->mval[1] = 0;
+}
+
static ListBase *knife_empty_list(knifetool_opdata *kcd)
{
ListBase *lst;
@@ -258,19 +277,19 @@ static KnifeEdge *get_bm_knife_edge(knifetool_opdata *kcd, BMEdge *e)
if (!kfe) {
BMIter iter;
BMFace *f;
-
+
kfe = new_knife_edge(kcd);
kfe->e = e;
kfe->v1 = get_bm_knife_vert(kcd, e->v1);
kfe->v2 = get_bm_knife_vert(kcd, e->v2);
knife_add_to_vert_edges(kcd, kfe);
-
+
BLI_ghash_insert(kcd->origedgemap, e, kfe);
-
+
BM_ITER(f, &iter, kcd->em->bm, BM_FACES_OF_EDGE, e) {
knife_append_list(kcd, &kfe->faces, f);
-
+
/* ensures the kedges lst for this f is initialized,
* it automatically adds kfe by itself */
knife_get_face_kedges(kcd, f);
@@ -280,33 +299,26 @@ static KnifeEdge *get_bm_knife_edge(knifetool_opdata *kcd, BMEdge *e)
return kfe;
}
+/* User has just clicked for first time or first time after a restart (E key).
+ * Copy the current position data into prev. */
static void knife_start_cut(knifetool_opdata *kcd)
{
- kcd->prevedge = kcd->curedge;
- kcd->prevvert = kcd->curvert;
- kcd->prevbmface = kcd->curbmface;
- kcd->cutnr++;
- kcd->prev_is_space = kcd->is_space;
- kcd->is_space = 0;
- kcd->prevmval[0] = kcd->vc.mval[0];
- kcd->prevmval[1] = kcd->vc.mval[1];
-
- copy_v3_v3(kcd->prevco, kcd->vertco);
- copy_v3_v3(kcd->prevcage, kcd->vertcage);
-
- if (kcd->prevvert == NULL && kcd->prevedge == NULL && is_zero_v3(kcd->prevcage)) {
+ kcd->prev = kcd->cur;
+ kcd->cur.is_space = 0; /*TODO: why do we do this? */
+
+ if (kcd->prev.vert == NULL && kcd->prev.edge == NULL && is_zero_v3(kcd->prev.cage)) {
/* Make prevcage a point on the view ray to mouse closest to a point on model: choose vertex 0 */
float origin[3], ray[3], co[3];
BMVert *v0;
- knife_input_ray_cast(kcd, kcd->vc.mval, origin, ray);
+ knife_input_ray_cast(kcd, kcd->cur.mval, origin, ray);
add_v3_v3v3(co, origin, ray);
v0 = BM_vert_at_index(kcd->em->bm, 0);
if (v0) {
- closest_to_line_v3(kcd->prevcage, v0->co, co, origin);
- copy_v3_v3(kcd->prevco, kcd->prevcage);
- copy_v3_v3(kcd->vertcage, kcd->prevcage);
- copy_v3_v3(kcd->vertco, kcd->prevco);
+ closest_to_line_v3(kcd->prev.cage, v0->co, co, origin);
+ copy_v3_v3(kcd->prev.co, kcd->prev.cage); /*TODO: do we need this? */
+ copy_v3_v3(kcd->cur.cage, kcd->prev.cage);
+ copy_v3_v3(kcd->cur.co, kcd->prev.co);
}
}
}
@@ -320,7 +332,7 @@ static ListBase *knife_get_face_kedges(knifetool_opdata *kcd, BMFace *f)
BMEdge *e;
lst = knife_empty_list(kcd);
-
+
BM_ITER(e, &iter, kcd->em->bm, BM_EDGES_OF_FACE, f) {
knife_append_list(kcd, lst, get_bm_knife_edge(kcd, e));
}
@@ -339,9 +351,9 @@ static void knife_find_basef(knifetool_opdata *kcd, KnifeEdge *kfe)
if (kfe->v1->isface || kfe->v2->isface) {
if (kfe->v2->isface)
- kfe->basef = kcd->curbmface;
- else
- kfe->basef = kcd->prevbmface;
+ kfe->basef = kcd->cur.bmface;
+ else
+ kfe->basef = kcd->prev.bmface;
}
else {
for (r1 = kfe->v1->edges.first; r1 && !kfe->basef; r1 = r1->next) {
@@ -349,12 +361,12 @@ static void knife_find_basef(knifetool_opdata *kcd, KnifeEdge *kfe)
for (r2 = ke1->faces.first; r2 && !kfe->basef; r2 = r2->next) {
for (r3 = kfe->v2->edges.first; r3 && !kfe->basef; r3 = r3->next) {
KnifeEdge *ke2 = r3->ref;
-
+
for (r4 = ke2->faces.first; r4 && !kfe->basef; r4 = r4->next) {
if (r2->ref == r4->ref) {
kfe->basef = r2->ref;
}
- }
+ }
}
}
}
@@ -408,48 +420,50 @@ static KnifeVert *knife_split_edge(knifetool_opdata *kcd, KnifeEdge *kfe, float
return newkfe->v2;
}
+/* Make a single KnifeEdge for cut from kcd->prev to kcd->cur.
+ * and move cur data to prev. */
static void knife_add_single_cut(knifetool_opdata *kcd)
{
KnifeEdge *kfe = new_knife_edge(kcd), *kfe2 = NULL, *kfe3 = NULL;
- if (kcd->prevvert && kcd->prevvert == kcd->curvert)
+ if (kcd->prev.vert && kcd->prev.vert == kcd->cur.vert)
return;
- if (kcd->prevedge && kcd->prevedge == kcd->curedge)
+ if (kcd->prev.edge && kcd->prev.edge == kcd->cur.edge)
return;
kfe->draw = 1;
- if (kcd->prevvert) {
- kfe->v1 = kcd->prevvert;
+ if (kcd->prev.vert) {
+ kfe->v1 = kcd->prev.vert;
}
- else if (kcd->prevedge) {
- kfe->v1 = knife_split_edge(kcd, kcd->prevedge, kcd->prevco, &kfe2);
+ else if (kcd->prev.edge) {
+ kfe->v1 = knife_split_edge(kcd, kcd->prev.edge, kcd->prev.co, &kfe2);
}
else {
- kfe->v1 = new_knife_vert(kcd, kcd->prevco, kcd->prevco);
- kfe->v1->draw = kfe->draw = !kcd->prev_is_space;
- kfe->v1->inspace = kcd->prev_is_space;
- kfe->draw = !kcd->prev_is_space;
+ kfe->v1 = new_knife_vert(kcd, kcd->prev.co, kcd->prev.co);
+ kfe->v1->draw = kfe->draw = !kcd->prev.is_space;
+ kfe->v1->inspace = kcd->prev.is_space;
+ kfe->draw = !kcd->prev.is_space;
kfe->v1->isface = 1;
}
- if (kcd->curvert) {
- kfe->v2 = kcd->curvert;
+ if (kcd->cur.vert) {
+ kfe->v2 = kcd->cur.vert;
}
- else if (kcd->curedge) {
- kfe->v2 = knife_split_edge(kcd, kcd->curedge, kcd->vertco, &kfe3);
- kcd->curvert = kfe->v2;
+ else if (kcd->cur.edge) {
+ kfe->v2 = knife_split_edge(kcd, kcd->cur.edge, kcd->cur.co, &kfe3);
+ kcd->cur.vert = kfe->v2;
}
else {
- kfe->v2 = new_knife_vert(kcd, kcd->vertco, kcd->vertco);
- kfe->v2->draw = !kcd->is_space;
+ kfe->v2 = new_knife_vert(kcd, kcd->cur.co, kcd->cur.co);
+ kfe->v2->draw = !kcd->cur.is_space;
kfe->v2->isface = 1;
- kfe->v2->inspace = kcd->is_space;
-
- if (kcd->is_space)
+ kfe->v2->inspace = kcd->cur.is_space;
+
+ if (kcd->cur.is_space)
kfe->draw = 0;
- kcd->curvert = kfe->v2;
+ kcd->cur.vert = kfe->v2;
}
knife_find_basef(kcd, kfe);
@@ -460,40 +474,32 @@ static void knife_add_single_cut(knifetool_opdata *kcd)
knife_edge_append_face(kcd, kfe, kfe->basef);
/* sanity check to make sure we're in the right edge/face lists */
- if (kcd->curbmface) {
- if (!find_ref(&kfe->faces, kcd->curbmface)) {
- knife_edge_append_face(kcd, kfe, kcd->curbmface);
+ if (kcd->cur.bmface) {
+ if (!find_ref(&kfe->faces, kcd->cur.bmface)) {
+ knife_edge_append_face(kcd, kfe, kcd->cur.bmface);
}
- if (kcd->prevbmface && kcd->prevbmface != kcd->curbmface) {
- if (!find_ref(&kfe->faces, kcd->prevbmface)) {
- knife_edge_append_face(kcd, kfe, kcd->prevbmface);
+ if (kcd->prev.bmface && kcd->prev.bmface != kcd->cur.bmface) {
+ if (!find_ref(&kfe->faces, kcd->prev.bmface)) {
+ knife_edge_append_face(kcd, kfe, kcd->prev.bmface);
}
}
}
/* set up for next cut */
- kcd->prevbmface = kcd->curbmface;
- kcd->prevvert = kcd->curvert;
- kcd->prevedge = kcd->curedge;
- copy_v3_v3(kcd->prevco, kcd->vertco);
- copy_v3_v3(kcd->prevcage, kcd->vertcage);
- kcd->prev_is_space = kcd->is_space;
- kcd->prevmval[0] = kcd->vc.mval[0];
- kcd->prevmval[1] = kcd->vc.mval[1];
+ kcd->prev = kcd->cur;
}
static int verge_linehit(const void *vlh1, const void *vlh2)
{
const BMEdgeHit *lh1 = vlh1, *lh2 = vlh2;
- if (lh1->l < lh2->l) return -1;
- else if (lh1->l > lh2->l) return 1;
+ if (lh1->l < lh2->l) return -1;
+ else if (lh1->l > lh2->l) return 1;
else return 0;
}
-static void knife_add_single_cut_through(knifetool_opdata *kcd,
- KnifeVert *v1, KnifeVert *v2, BMFace *f)
+static void knife_add_single_cut_through(knifetool_opdata *kcd, KnifeVert *v1, KnifeVert *v2, BMFace *f)
{
KnifeEdge *kfenew;
@@ -548,7 +554,7 @@ static void knife_cut_through(knifetool_opdata *kcd)
BMFace *f;
KnifeEdge *kfe, *kfe2, *kfe3;
KnifeVert *v1, *v2, *firstv = NULL, *lastv = NULL;
- ListBase firstfaces = {NULL, NULL}, lastfaces = { NULL, NULL};
+ ListBase firstfaces = {NULL, NULL}, lastfaces = {NULL, NULL};
Ref *r, *r2;
KnifeEdge **splitkfe;
int i, j, found;
@@ -562,32 +568,32 @@ static void knife_cut_through(knifetool_opdata *kcd)
qsort(kcd->linehits, kcd->totlinehit, sizeof(BMEdgeHit), verge_linehit);
splitkfe = MEM_callocN(kcd->totlinehit * sizeof(KnifeEdge *), "knife_cut_through");
- if (kcd->prevvert) {
- if (kcd->prevvert == kcd->curvert)
+ if (kcd->prev.vert) {
+ if (kcd->prev.vert == kcd->cur.vert)
return;
- firstv = kcd->prevvert;
- knife_get_vert_faces(kcd, firstv, kcd->prevbmface, &firstfaces);
+ firstv = kcd->prev.vert;
+ knife_get_vert_faces(kcd, firstv, kcd->prev.bmface, &firstfaces);
}
- else if (kcd->prevedge) {
- if (kcd->prevedge == kcd->curedge)
+ else if (kcd->prev.edge) {
+ if (kcd->prev.edge == kcd->cur.edge)
return;
- firstv = knife_split_edge(kcd, kcd->prevedge, kcd->prevco, &kfe3);
- knife_get_edge_faces(kcd, kcd->prevedge, &firstfaces);
+ firstv = knife_split_edge(kcd, kcd->prev.edge, kcd->prev.co, &kfe3);
+ knife_get_edge_faces(kcd, kcd->prev.edge, &firstfaces);
}
- if (kcd->curvert) {
- lastv = kcd->curvert;
- knife_get_vert_faces(kcd, lastv, kcd->curbmface, &lastfaces);
+ if (kcd->cur.vert) {
+ lastv = kcd->cur.vert;
+ knife_get_vert_faces(kcd, lastv, kcd->cur.bmface, &lastfaces);
}
- else if (kcd->curedge) {
- lastv = knife_split_edge(kcd, kcd->curedge, kcd->vertco, &kfe3);
- knife_get_edge_faces(kcd, kcd->curedge, &lastfaces);
+ else if (kcd->cur.edge) {
+ lastv = knife_split_edge(kcd, kcd->cur.edge, kcd->cur.co, &kfe3);
+ knife_get_edge_faces(kcd, kcd->cur.edge, &lastfaces);
}
if (firstv) {
/* For each face incident to firstv,
* find the first following linehit (if any) sharing that face and connect */
- for (r = firstfaces.first; r; r = r->next ) {
+ for (r = firstfaces.first; r; r = r->next) {
f = r->ref;
found = 0;
for (j = 0, lh2 = kcd->linehits; j < kcd->totlinehit; j++, lh2++) {
@@ -624,8 +630,8 @@ static void knife_cut_through(knifetool_opdata *kcd)
kfe2 = lh2->kfe;
for (r2 = kfe2->faces.first; r2; r2 = r2->next) {
if (r2->ref == f) {
- v1 = splitkfe[i]? kfe->v1 : knife_split_edge(kcd, kfe, lh->hit, &splitkfe[i]);
- v2 = splitkfe[j]? kfe2->v1 : knife_split_edge(kcd, kfe2, lh2->hit, &splitkfe[j]);
+ v1 = splitkfe[i] ? kfe->v1 : knife_split_edge(kcd, kfe, lh->hit, &splitkfe[i]);
+ v2 = splitkfe[j] ? kfe2->v1 : knife_split_edge(kcd, kfe2, lh2->hit, &splitkfe[j]);
knife_add_single_cut_through(kcd, v1, v2, f);
found = 1;
break;
@@ -635,7 +641,7 @@ static void knife_cut_through(knifetool_opdata *kcd)
if (!found && lastv) {
for (r2 = lastfaces.first; r2; r2 = r2->next) {
if (r2->ref == f) {
- v1 = splitkfe[i]? kfe->v1 : knife_split_edge(kcd, kfe, lh->hit, &splitkfe[i]);
+ v1 = splitkfe[i] ? kfe->v1 : knife_split_edge(kcd, kfe, lh->hit, &splitkfe[i]);
knife_add_single_cut_through(kcd, v1, lastv, f);
break;
}
@@ -650,19 +656,15 @@ static void knife_cut_through(knifetool_opdata *kcd)
kcd->totlinehit = 0;
/* set up for next cut */
- kcd->prevbmface = kcd->curbmface;
- kcd->prevvert = kcd->curvert;
- kcd->prevedge = kcd->curedge;
- copy_v3_v3(kcd->prevco, kcd->vertco);
- copy_v3_v3(kcd->prevcage, kcd->vertcage);
- kcd->prev_is_space = kcd->is_space;
- kcd->prevmval[0] = kcd->vc.mval[0];
- kcd->prevmval[1] = kcd->vc.mval[1];
+ kcd->prev = kcd->cur;
}
+/* User has just left-clicked after the first time.
+ * Add all knife cuts implied by line from prev to cur.
+ * If that line crossed edges then kcd->linehits will be non-NULL. */
static void knife_add_cut(knifetool_opdata *kcd)
{
- knifetool_opdata oldkcd = *kcd;
+ KnifePosData savcur = kcd->cur;
if (kcd->cut_through) {
knife_cut_through(kcd);
@@ -686,57 +688,47 @@ static void knife_add_cut(knifetool_opdata *kcd)
else if (lastlh && firstlh) {
if (firstlh->v || lastlh->v) {
KnifeVert *kfv = firstlh->v ? firstlh->v : lastlh->v;
-
- kcd->prevvert = kfv;
- copy_v3_v3(kcd->prevco, firstlh->hit);
- copy_v3_v3(kcd->prevcage, firstlh->cagehit);
- kcd->prevedge = NULL;
- kcd->prevbmface = f;
+
+ kcd->prev.vert = kfv;
+ copy_v3_v3(kcd->prev.co, firstlh->hit);
+ copy_v3_v3(kcd->prev.cage, firstlh->cagehit);
+ kcd->prev.edge = NULL;
+ kcd->prev.bmface = f;
+ /* TODO: should we set prev.in_space = 0 ? */
}
lastlh = firstlh = NULL;
}
- if (len_v3v3(kcd->prevcage, lh->realhit) < FLT_EPSILON * 80)
+ if (len_v3v3(kcd->prev.cage, lh->realhit) < FLT_EPSILON * 80)
continue;
- if (len_v3v3(kcd->vertcage, lh->realhit) < FLT_EPSILON * 80)
+ if (len_v3v3(kcd->cur.cage, lh->realhit) < FLT_EPSILON * 80)
continue;
- if (kcd->prev_is_space) {
- kcd->prev_is_space = 0;
- copy_v3_v3(kcd->prevco, lh->hit);
- copy_v3_v3(kcd->prevcage, lh->cagehit);
- kcd->prevvert = NULL;
- kcd->prevedge = lh->kfe;
- kcd->prevbmface = lh->f;
+ if (kcd->prev.is_space) {
+ kcd->prev.is_space = 0;
+ copy_v3_v3(kcd->prev.co, lh->hit);
+ copy_v3_v3(kcd->prev.cage, lh->cagehit);
+ kcd->prev.vert = NULL;
+ kcd->prev.edge = lh->kfe;
+ kcd->prev.bmface = lh->f;
continue;
- }
+ }
- kcd->is_space = 0;
- kcd->curedge = lh->kfe;
- kcd->curbmface = lh->f;
- kcd->curvert = lh->v;
- copy_v3_v3(kcd->vertco, lh->hit);
- copy_v3_v3(kcd->vertcage, lh->cagehit);
+ kcd->cur.is_space = 0;
+ kcd->cur.edge = lh->kfe;
+ kcd->cur.bmface = lh->f;
+ kcd->cur.vert = lh->v;
+ copy_v3_v3(kcd->cur.co, lh->hit);
+ copy_v3_v3(kcd->cur.cage, lh->cagehit);
knife_add_single_cut(kcd);
}
- if (oldkcd.is_space) {
- kcd->prevbmface = oldkcd.curbmface;
- kcd->prevvert = oldkcd.curvert;
- kcd->prevedge = oldkcd.curedge;
- copy_v3_v3(kcd->prevco, oldkcd.vertco);
- copy_v3_v3(kcd->prevcage, oldkcd.vertcage);
- kcd->prev_is_space = oldkcd.is_space;
+ if (savcur.is_space) {
+ kcd->prev = savcur;
}
else {
- kcd->curbmface = oldkcd.curbmface;
- kcd->curvert = oldkcd.curvert;
- kcd->curedge = oldkcd.curedge;
- kcd->is_space = oldkcd.is_space;
- copy_v3_v3(kcd->vertco, oldkcd.vertco);
- copy_v3_v3(kcd->vertcage, oldkcd.vertcage);
-
+ kcd->cur = savcur;
knife_add_single_cut(kcd);
}
@@ -762,7 +754,7 @@ static void knifetool_draw_angle_snapping(knifetool_opdata *kcd)
/* make u the window coords of prevcage */
view3d_get_transformation(kcd->ar, kcd->vc.rv3d, kcd->ob, &mats);
- gluProject(kcd->prevcage[0], kcd->prevcage[1], kcd->prevcage[2],
+ gluProject(kcd->prev.cage[0], kcd->prev.cage[1], kcd->prev.cage[2],
mats.modelview, mats.projection, mats.viewport,
&u[0], &u[1], &u[2]);
@@ -855,65 +847,65 @@ static void knifetool_draw_angle_snapping(knifetool_opdata *kcd)
static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *arg)
{
knifetool_opdata *kcd = arg;
-
+
glDisable(GL_DEPTH_TEST);
-
+
glPolygonOffset(1.0f, 1.0f);
-
+
glPushMatrix();
glMultMatrixf(kcd->ob->obmat);
-
+
if (kcd->mode == MODE_DRAGGING) {
if (kcd->angle_snapping != ANGLE_FREE)
knifetool_draw_angle_snapping(kcd);
glColor3f(0.1, 0.1, 0.1);
glLineWidth(2.0);
-
+
glBegin(GL_LINES);
- glVertex3fv(kcd->prevcage);
- glVertex3fv(kcd->vertcage);
+ glVertex3fv(kcd->prev.cage);
+ glVertex3fv(kcd->cur.cage);
glEnd();
-
+
glLineWidth(1.0);
}
-
- if (kcd->curedge) {
+
+ if (kcd->cur.edge) {
glColor3f(0.5, 0.3, 0.15);
glLineWidth(2.0);
-
+
glBegin(GL_LINES);
- glVertex3fv(kcd->curedge->v1->cageco);
- glVertex3fv(kcd->curedge->v2->cageco);
+ glVertex3fv(kcd->cur.edge->v1->cageco);
+ glVertex3fv(kcd->cur.edge->v2->cageco);
glEnd();
-
+
glLineWidth(1.0);
}
- else if (kcd->curvert) {
+ else if (kcd->cur.vert) {
glColor3f(0.8, 0.2, 0.1);
glPointSize(11);
-
+
glBegin(GL_POINTS);
- glVertex3fv(kcd->vertcage);
+ glVertex3fv(kcd->cur.cage);
glEnd();
}
-
- if (kcd->curbmface) {
+
+ if (kcd->cur.bmface) {
glColor3f(0.1, 0.8, 0.05);
glPointSize(9);
-
+
glBegin(GL_POINTS);
- glVertex3fv(kcd->vertcage);
+ glVertex3fv(kcd->cur.cage);
glEnd();
}
-
+
if (kcd->totlinehit > 0) {
BMEdgeHit *lh;
int i;
-
+
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-
+
/* draw any snapped verts first */
glColor4f(0.8, 0.2, 0.1, 0.4);
glPointSize(11);
@@ -921,11 +913,11 @@ static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void
lh = kcd->linehits;
for (i = 0; i < kcd->totlinehit; i++, lh++) {
float sv1[3], sv2[3];
-
+
knife_project_v3(kcd, lh->kfe->v1->cageco, sv1);
knife_project_v3(kcd, lh->kfe->v2->cageco, sv2);
knife_project_v3(kcd, lh->cagehit, lh->schit);
-
+
if (len_v2v2(lh->schit, sv1) < kcd->vthresh / 4.0f) {
copy_v3_v3(lh->cagehit, lh->kfe->v1->cageco);
glVertex3fv(lh->cagehit);
@@ -938,7 +930,7 @@ static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void
}
}
glEnd();
-
+
/* now draw the rest */
glColor4f(0.1, 0.8, 0.05, 0.4);
glPointSize(7);
@@ -950,11 +942,11 @@ static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void
glEnd();
glDisable(GL_BLEND);
}
-
+
if (kcd->totkedge > 0) {
BLI_mempool_iter iter;
KnifeEdge *kfe;
-
+
glLineWidth(1.0);
glBegin(GL_LINES);
@@ -962,13 +954,13 @@ static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void
for (kfe = BLI_mempool_iterstep(&iter); kfe; kfe = BLI_mempool_iterstep(&iter)) {
if (!kfe->draw)
continue;
-
+
glColor3f(0.2, 0.2, 0.2);
-
+
glVertex3fv(kfe->v1->cageco);
glVertex3fv(kfe->v2->cageco);
}
-
+
glEnd();
glLineWidth(1.0);
}
@@ -976,20 +968,20 @@ static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void
if (kcd->totkvert > 0) {
BLI_mempool_iter iter;
KnifeVert *kfv;
-
+
glPointSize(5.0);
-
+
glBegin(GL_POINTS);
BLI_mempool_iternew(kcd->kverts, &iter);
for (kfv = BLI_mempool_iterstep(&iter); kfv; kfv = BLI_mempool_iterstep(&iter)) {
if (!kfv->draw)
continue;
-
+
glColor3f(0.6, 0.1, 0.2);
-
+
glVertex3fv(kfv->cageco);
}
-
+
glEnd();
}
@@ -1018,7 +1010,7 @@ static BMEdgeHit *knife_edge_tri_isect(knifetool_opdata *kcd, BMBVHTree *bmtree,
float cos[9], uv[3], lambda;
unsigned int tot = 0;
int i, j;
-
+
/* for comparing distances, error of intersection depends on triangle scale.
* need to scale down before squaring for accurate comparison */
const float depsilon = 50 * FLT_EPSILON * len_v3_tri_side_max(v1, v2, v3);
@@ -1030,37 +1022,37 @@ static BMEdgeHit *knife_edge_tri_isect(knifetool_opdata *kcd, BMBVHTree *bmtree,
BLI_bvhtree_insert(tree2, 0, cos, 3);
BLI_bvhtree_balance(tree2);
-
+
result = results = BLI_bvhtree_overlap(tree, tree2, &tot);
-
+
for (i = 0; i < tot; i++, result++) {
float p[3];
-
+
ls = (BMLoop **)kcd->em->looptris[result->indexA];
-
+
for (j = 0; j < 3; j++) {
BMLoop *l1 = ls[j];
BMFace *hitf;
ListBase *lst = knife_get_face_kedges(kcd, l1->f);
Ref *ref;
-
+
for (ref = lst->first; ref; ref = ref->next) {
KnifeEdge *kfe = ref->ref;
-
- //if (kfe == kcd->curedge || kfe == kcd->prevedge)
+
+ //if (kfe == kcd->cur.edge || kfe == kcd->prev.edge)
// continue;
-
+
if (isect_line_tri_v3(kfe->v1->cageco, kfe->v2->cageco, v1, v2, v3, &lambda, uv)) {
float no[3], view[3], sp[3];
-
+
interp_v3_v3v3(p, kfe->v1->cageco, kfe->v2->cageco, lambda);
-
- if (kcd->curvert && len_squared_v3v3(kcd->curvert->cageco, p) < depsilon_squared)
+
+ if (kcd->cur.vert && len_squared_v3v3(kcd->cur.vert->cageco, p) < depsilon_squared)
continue;
- if (kcd->prevvert && len_squared_v3v3(kcd->prevvert->cageco, p) < depsilon_squared)
+ if (kcd->prev.vert && len_squared_v3v3(kcd->prev.vert->cageco, p) < depsilon_squared)
continue;
- if ( len_squared_v3v3(kcd->prevcage, p) < depsilon_squared ||
- len_squared_v3v3(kcd->vertcage, p) < depsilon_squared)
+ if (len_squared_v3v3(kcd->prev.cage, p) < depsilon_squared ||
+ len_squared_v3v3(kcd->cur.cage, p) < depsilon_squared)
{
continue;
}
@@ -1086,28 +1078,28 @@ static BMEdgeHit *knife_edge_tri_isect(knifetool_opdata *kcd, BMBVHTree *bmtree,
/* ray cast */
hitf = BMBVH_RayCast(bmtree, p, no, NULL, NULL);
}
-
+
/* ok, if visible add the new point */
if (!hitf && !BLI_smallhash_haskey(ehash, (intptr_t)kfe)) {
BMEdgeHit hit;
- if ( len_squared_v3v3(p, kcd->vertco) < depsilon_squared ||
- len_squared_v3v3(p, kcd->prevco) < depsilon_squared)
+ if (len_squared_v3v3(p, kcd->cur.co) < depsilon_squared ||
+ len_squared_v3v3(p, kcd->prev.co) < depsilon_squared)
{
continue;
}
-
+
hit.kfe = kfe;
hit.v = NULL;
-
+
knife_find_basef(kcd, kfe);
hit.f = kfe->basef;
hit.perc = len_v3v3(p, kfe->v1->cageco) / len_v3v3(kfe->v1->cageco, kfe->v2->cageco);
copy_v3_v3(hit.cagehit, p);
-
+
interp_v3_v3v3(p, kfe->v1->co, kfe->v2->co, hit.perc);
copy_v3_v3(hit.realhit, p);
-
+
/* BMESH_TODO: should also snap to vertices */
if (kcd->snap_midpoints) {
float perc = hit.perc;
@@ -1122,7 +1114,7 @@ static BMEdgeHit *knife_edge_tri_isect(knifetool_opdata *kcd, BMBVHTree *bmtree,
else {
perc = 1.0f;
}
-
+
interp_v3_v3v3(hit.hit, kfe->v1->co, kfe->v2->co, perc);
interp_v3_v3v3(hit.cagehit, kfe->v1->cageco, kfe->v2->cageco, perc);
}
@@ -1130,7 +1122,7 @@ static BMEdgeHit *knife_edge_tri_isect(knifetool_opdata *kcd, BMBVHTree *bmtree,
copy_v3_v3(hit.hit, p);
}
knife_project_v3(kcd, hit.cagehit, hit.schit);
-
+
BLI_array_append(edges, hit);
BLI_smallhash_insert(ehash, (intptr_t)kfe, NULL);
}
@@ -1138,13 +1130,13 @@ static BMEdgeHit *knife_edge_tri_isect(knifetool_opdata *kcd, BMBVHTree *bmtree,
}
}
}
-
+
if (results)
MEM_freeN(results);
-
+
BLI_bvhtree_free(tree2);
*count = BLI_array_count(edges);
-
+
return edges;
}
@@ -1163,7 +1155,7 @@ static void knife_find_line_hits(knifetool_opdata *kcd)
SmallHash hash, *ehash = &hash;
float v1[3], v2[3], v3[3], v4[4], s1[3], s2[3];
int i, c1, c2;
-
+
knife_bgl_get_mats(kcd, &mats);
if (kcd->linehits) {
@@ -1172,8 +1164,8 @@ static void knife_find_line_hits(knifetool_opdata *kcd)
kcd->totlinehit = 0;
}
- copy_v3_v3(v1, kcd->prevcage);
- copy_v3_v3(v2, kcd->vertcage);
+ copy_v3_v3(v1, kcd->prev.cage);
+ copy_v3_v3(v2, kcd->cur.cage);
/* project screen line's 3d coordinates back into 2d */
knife_project_v3(kcd, v1, s1);
@@ -1191,6 +1183,16 @@ static void knife_find_line_hits(knifetool_opdata *kcd)
mul_m4_v3(kcd->ob->imat, v3);
mul_m4_v3(kcd->ob->imat, v4);
+ /* numeric error, 'v1' -> 'v2', 'v2' -> 'v4' can end up being ~2000 units apart in otho mode
+ * (from ED_view3d_win_to_segment_clip() above)
+ * this gives precision error in 'knife_edge_tri_isect', rather then solving properly
+ * (which may involve using doubles everywhere!),
+ * limit the distance between these points */
+ if (kcd->is_ortho) {
+ limit_dist_v3(v1, v3, 200.0f);
+ limit_dist_v3(v2, v4, 200.0f);
+ }
+
BLI_smallhash_init(ehash);
/* test two triangles of sceen line's plane */
@@ -1249,33 +1251,32 @@ static void knife_input_ray_cast(knifetool_opdata *kcd, const int mval_i[2],
mul_m3_v3(imat, r_ray);
}
-
static BMFace *knife_find_closest_face(knifetool_opdata *kcd, float co[3], float cageco[3], int *is_space)
{
BMFace *f;
int dist = KMAXDIST;
float origin[3];
float ray[3];
-
+
/* unproject to find view ray */
knife_input_ray_cast(kcd, kcd->vc.mval, origin, ray);
add_v3_v3v3(co, origin, ray);
f = BMBVH_RayCast(kcd->bmbvh, origin, ray, co, cageco);
-
+
if (is_space)
*is_space = !f;
-
+
if (!f) {
/* try to use backbuffer selection method if ray casting failed */
f = EDBM_findnearestface(&kcd->vc, &dist);
-
+
/* cheat for now; just put in the origin instead
* of a true coordinate on the face.
* This just puts a point 1.0f infront of the view. */
add_v3_v3v3(co, origin, ray);
}
-
+
return f;
}
@@ -1286,35 +1287,35 @@ static int knife_sample_screen_density(knifetool_opdata *kcd, float radius)
BMFace *f;
int is_space;
float co[3], cageco[3], sco[3];
-
+
f = knife_find_closest_face(kcd, co, cageco, &is_space);
-
+
if (f && !is_space) {
ListBase *lst;
Ref *ref;
float dis;
int c = 0;
-
+
knife_project_v3(kcd, cageco, sco);
-
+
lst = knife_get_face_kedges(kcd, f);
for (ref = lst->first; ref; ref = ref->next) {
KnifeEdge *kfe = ref->ref;
int i;
-
+
for (i = 0; i < 2; i++) {
KnifeVert *kfv = i ? kfe->v2 : kfe->v1;
-
+
knife_project_v3(kcd, kfv->cageco, kfv->sco);
-
+
dis = len_v2v2(kfv->sco, sco);
if (dis < radius) {
if (kcd->vc.rv3d->rflag & RV3D_CLIPPING) {
float vec[3];
-
+
copy_v3_v3(vec, kfv->cageco);
mul_m4_v3(kcd->vc.obedit->obmat, vec);
-
+
if (ED_view3d_clipping_test(kcd->vc.rv3d, vec, TRUE) == 0) {
c++;
}
@@ -1325,10 +1326,10 @@ static int knife_sample_screen_density(knifetool_opdata *kcd, float radius)
}
}
}
-
+
return c;
}
-
+
return 0;
}
@@ -1337,9 +1338,9 @@ static int knife_sample_screen_density(knifetool_opdata *kcd, float radius)
static float knife_snap_size(knifetool_opdata *kcd, float maxsize)
{
float density = (float)knife_sample_screen_density(kcd, maxsize * 2.0f);
-
+
density = MAX2(density, 1);
-
+
return MIN2(maxsize / (density * 0.5f), maxsize);
}
@@ -1348,32 +1349,32 @@ static KnifeEdge *knife_find_closest_edge(knifetool_opdata *kcd, float p[3], flo
{
BMFace *f;
float co[3], cageco[3], sco[3], maxdist = knife_snap_size(kcd, kcd->ethresh);
-
+
if (kcd->ignore_vert_snapping)
maxdist *= 0.5;
f = knife_find_closest_face(kcd, co, cageco, NULL);
*is_space = !f;
-
+
/* set p to co, in case we don't find anything, means a face cut */
copy_v3_v3(p, co);
copy_v3_v3(cagep, cageco);
-
- kcd->curbmface = f;
-
+
+ kcd->cur.bmface = f;
+
if (f) {
KnifeEdge *cure = NULL;
ListBase *lst;
Ref *ref;
float dis, curdis = FLT_MAX;
-
+
knife_project_v3(kcd, cageco, sco);
-
+
/* look through all edges associated with this face */
lst = knife_get_face_kedges(kcd, f);
for (ref = lst->first; ref; ref = ref->next) {
KnifeEdge *kfe = ref->ref;
-
+
/* project edge vertices into screen space */
knife_project_v3(kcd, kfe->v1->cageco, kfe->v1->sco);
knife_project_v3(kcd, kfe->v2->cageco, kfe->v2->sco);
@@ -1383,12 +1384,12 @@ static KnifeEdge *knife_find_closest_edge(knifetool_opdata *kcd, float p[3], flo
if (kcd->vc.rv3d->rflag & RV3D_CLIPPING) {
float labda = labda_PdistVL2Dfl(sco, kfe->v1->sco, kfe->v2->sco);
float vec[3];
-
+
vec[0] = kfe->v1->cageco[0] + labda * (kfe->v2->cageco[0] - kfe->v1->cageco[0]);
vec[1] = kfe->v1->cageco[1] + labda * (kfe->v2->cageco[1] - kfe->v1->cageco[1]);
vec[2] = kfe->v1->cageco[2] + labda * (kfe->v2->cageco[2] - kfe->v1->cageco[2]);
mul_m4_v3(kcd->vc.obedit->obmat, vec);
-
+
if (ED_view3d_clipping_test(kcd->vc.rv3d, vec, TRUE) == 0) {
cure = kfe;
curdis = dis;
@@ -1400,10 +1401,10 @@ static KnifeEdge *knife_find_closest_edge(knifetool_opdata *kcd, float p[3], flo
}
}
}
-
+
if (fptr)
*fptr = f;
-
+
if (cure && p) {
if (!kcd->ignore_edge_snapping || !(cure->e)) {
if (kcd->snap_midpoints) {
@@ -1412,7 +1413,7 @@ static KnifeEdge *knife_find_closest_edge(knifetool_opdata *kcd, float p[3], flo
}
else {
float d;
-
+
closest_to_line_segment_v3(cagep, cageco, cure->v1->cageco, cure->v2->cageco);
d = len_v3v3(cagep, cure->v1->cageco) / len_v3v3(cure->v1->cageco, cure->v2->cageco);
interp_v3_v3v3(p, cure->v1->co, cure->v2->co, d);
@@ -1422,58 +1423,59 @@ static KnifeEdge *knife_find_closest_edge(knifetool_opdata *kcd, float p[3], flo
return NULL;
}
}
-
+
return cure;
}
-
+
if (fptr)
*fptr = NULL;
-
+
return NULL;
}
/* find a vertex near the mouse cursor, if it exists */
-static KnifeVert *knife_find_closest_vert(knifetool_opdata *kcd, float p[3], float cagep[3], BMFace **fptr, int *is_space)
+static KnifeVert *knife_find_closest_vert(knifetool_opdata *kcd, float p[3], float cagep[3], BMFace **fptr,
+ int *is_space)
{
BMFace *f;
float co[3], cageco[3], sco[3], maxdist = knife_snap_size(kcd, kcd->vthresh);
-
+
if (kcd->ignore_vert_snapping)
maxdist *= 0.5;
-
+
f = knife_find_closest_face(kcd, co, cageco, is_space);
-
+
/* set p to co, in case we don't find anything, means a face cut */
copy_v3_v3(p, co);
copy_v3_v3(cagep, p);
- kcd->curbmface = f;
-
+ kcd->cur.bmface = f;
+
if (f) {
ListBase *lst;
Ref *ref;
KnifeVert *curv = NULL;
float dis, curdis = FLT_MAX;
-
+
knife_project_v3(kcd, cageco, sco);
-
+
lst = knife_get_face_kedges(kcd, f);
for (ref = lst->first; ref; ref = ref->next) {
KnifeEdge *kfe = ref->ref;
int i;
-
+
for (i = 0; i < 2; i++) {
KnifeVert *kfv = i ? kfe->v2 : kfe->v1;
-
+
knife_project_v3(kcd, kfv->cageco, kfv->sco);
-
+
dis = len_v2v2(kfv->sco, sco);
if (dis < curdis && dis < maxdist) {
if (kcd->vc.rv3d->rflag & RV3D_CLIPPING) {
float vec[3];
-
+
copy_v3_v3(vec, kfv->cageco);
mul_m4_v3(kcd->vc.obedit->obmat, vec);
-
+
if (ED_view3d_clipping_test(kcd->vc.rv3d, vec, TRUE) == 0) {
curv = kfv;
curdis = dis;
@@ -1486,29 +1488,29 @@ static KnifeVert *knife_find_closest_vert(knifetool_opdata *kcd, float p[3], flo
}
}
}
-
+
if (!kcd->ignore_vert_snapping || !(curv && curv->v)) {
if (fptr)
*fptr = f;
-
+
if (curv && p) {
copy_v3_v3(p, curv->co);
copy_v3_v3(cagep, curv->cageco);
}
-
+
return curv;
}
else {
if (fptr)
*fptr = f;
-
+
return NULL;
}
}
-
+
if (fptr)
*fptr = NULL;
-
+
return NULL;
}
@@ -1517,30 +1519,30 @@ static void knife_snap_angle(knifetool_opdata *kcd)
int dx, dy;
float w, abs_tan;
- dx = kcd->vc.mval[0] - kcd->prevmval[0];
- dy = kcd->vc.mval[1] - kcd->prevmval[1];
+ dx = kcd->vc.mval[0] - kcd->prev.mval[0];
+ dy = kcd->vc.mval[1] - kcd->prev.mval[1];
if (dx == 0 || dy == 0)
return;
w = (float)dy / (float)dx;
abs_tan = fabsf(w);
- if (abs_tan <= 0.4142f) { /* tan(22.5 degrees) = 0.4142 */
+ if (abs_tan <= 0.4142f) { /* tan(22.5 degrees) = 0.4142 */
kcd->angle_snapping = ANGLE_0;
- kcd->vc.mval[1] = kcd->prevmval[1];
+ kcd->vc.mval[1] = kcd->prev.mval[1];
}
else if (abs_tan < 2.4142f) { /* tan(67.5 degrees) = 2.4142 */
if (w > 0) {
kcd->angle_snapping = ANGLE_45;
- kcd->vc.mval[1] = kcd->prevmval[1] + dx;
+ kcd->vc.mval[1] = kcd->prev.mval[1] + dx;
}
else {
kcd->angle_snapping = ANGLE_135;
- kcd->vc.mval[1] = kcd->prevmval[1] - dx;
+ kcd->vc.mval[1] = kcd->prev.mval[1] - dx;
}
}
else {
kcd->angle_snapping = ANGLE_90;
- kcd->vc.mval[0] = kcd->prevmval[0];
+ kcd->vc.mval[0] = kcd->prev.mval[0];
}
}
@@ -1550,24 +1552,26 @@ static int knife_update_active(knifetool_opdata *kcd)
if (kcd->angle_snapping != ANGLE_FREE && kcd->mode == MODE_DRAGGING)
knife_snap_angle(kcd);
- kcd->curvert = NULL; kcd->curedge = NULL; kcd->curbmface = NULL;
+ knife_pos_data_clear(&kcd->cur);
+ kcd->cur.mval[0] = kcd->vc.mval[0];
+ kcd->cur.mval[1] = kcd->vc.mval[1];
- kcd->curvert = knife_find_closest_vert(kcd, kcd->vertco, kcd->vertcage, &kcd->curbmface, &kcd->is_space);
- if (!kcd->curvert) {
- kcd->curedge = knife_find_closest_edge(kcd, kcd->vertco, kcd->vertcage, &kcd->curbmface, &kcd->is_space);
+ kcd->cur.vert = knife_find_closest_vert(kcd, kcd->cur.co, kcd->cur.cage, &kcd->cur.bmface, &kcd->cur.is_space);
+ if (!kcd->cur.vert) {
+ kcd->cur.edge = knife_find_closest_edge(kcd, kcd->cur.co, kcd->cur.cage, &kcd->cur.bmface, &kcd->cur.is_space);
}
- /* if no hits are found this would normally default to (0,0,0) so instead
+ /* if no hits are found this would normally default to (0, 0, 0) so instead
* get a point at the mouse ray closest to the previous point.
* Note that drawing lines in `free-space` isn't properly supported
- * but theres no guarantee (0,0,0) has any geometry either - campbell */
- if (kcd->curvert == NULL && kcd->curedge == NULL) {
- float origin[3], ray[3], co[3];
+ * but theres no guarantee (0, 0, 0) has any geometry either - campbell */
+ if (kcd->cur.vert == NULL && kcd->cur.edge == NULL) {
+ float origin[3], ray[3], co[3];
- knife_input_ray_cast(kcd, kcd->vc.mval, origin, ray);
- add_v3_v3v3(co, origin, ray);
+ knife_input_ray_cast(kcd, kcd->vc.mval, origin, ray);
+ add_v3_v3v3(co, origin, ray);
- closest_to_line_v3(kcd->vertcage, kcd->prevcage, co, origin);
+ closest_to_line_v3(kcd->cur.cage, kcd->prev.cage, co, origin);
}
if (kcd->mode == MODE_DRAGGING) {
@@ -1595,9 +1599,9 @@ typedef struct facenet_entry {
static void rnd_offset_co(float co[3], float scale)
{
int i;
-
+
for (i = 0; i < 3; i++) {
- co[i] += (BLI_drand()-0.5)*scale;
+ co[i] += (BLI_drand() - 0.5) * scale;
}
}
@@ -1613,62 +1617,62 @@ static void remerge_faces(knifetool_opdata *kcd)
BLI_array_declare(faces);
BMOperator bmop;
int idx;
-
+
BMO_op_initf(bm, &bmop, "beautify_fill faces=%ff constrain_edges=%fe", FACE_NEW, BOUNDARY);
-
+
BMO_op_exec(bm, &bmop);
- BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", FACE_NEW, BM_FACE);
-
+ BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", BM_FACE, FACE_NEW);
+
BMO_op_finish(bm, &bmop);
-
+
BLI_smallhash_init(visit);
BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
BMIter eiter;
BMEdge *e;
BMFace *f2;
-
+
if (!BMO_elem_flag_test(bm, f, FACE_NEW))
continue;
-
+
if (BLI_smallhash_haskey(visit, (intptr_t)f))
continue;
-
+
BLI_array_empty(stack);
BLI_array_empty(faces);
BLI_array_append(stack, f);
BLI_smallhash_insert(visit, (intptr_t)f, NULL);
-
+
do {
f2 = BLI_array_pop(stack);
-
+
BLI_array_append(faces, f2);
-
+
BM_ITER(e, &eiter, bm, BM_EDGES_OF_FACE, f2) {
BMIter fiter;
BMFace *f3;
-
+
if (BMO_elem_flag_test(bm, e, BOUNDARY))
continue;
-
+
BM_ITER(f3, &fiter, bm, BM_FACES_OF_EDGE, e) {
if (!BMO_elem_flag_test(bm, f3, FACE_NEW))
continue;
if (BLI_smallhash_haskey(visit, (intptr_t)f3))
continue;
-
+
BLI_smallhash_insert(visit, (intptr_t)f3, NULL);
BLI_array_append(stack, f3);
}
- }
+ }
} while (BLI_array_count(stack) > 0);
-
+
if (BLI_array_count(faces) > 0) {
idx = BM_elem_index_get(faces[0]);
-
+
f2 = BM_faces_join(bm, faces, BLI_array_count(faces));
if (f2) {
BMO_elem_flag_enable(bm, f2, FACE_NEW);
- BM_elem_index_set(f2, idx); /* set_dirty! */ /* BMESH_TODO, check if this is valid or not */
+ BM_elem_index_set(f2, idx); /* set_dirty! *//* BMESH_TODO, check if this is valid or not */
}
}
}
@@ -1698,7 +1702,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
MemArena *arena = BLI_memarena_new(1 << 16, "knifenet_fill_faces");
SmallHash shash;
int i, j, k = 0, totface = bm->totface;
-
+
BMO_push(bm, NULL);
bmesh_edit_begin(bm, BMO_OP_FLAG_UNTAN_MULTIRES);
@@ -1710,7 +1714,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
i++;
}
bm->elem_index_dirty &= ~BM_FACE;
-
+
BM_ITER(e, &bmiter, bm, BM_EDGES_OF_MESH, NULL) {
BMO_elem_flag_enable(bm, e, BOUNDARY);
}
@@ -1731,9 +1735,9 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
BMO_elem_flag_enable(bm, kfv->v, MARK);
}
-
+
/* we want to only do changed faces. first, go over new edges and add to
- * face net lists.*/
+ * face net lists.*/
i = j = k = 0;
BLI_mempool_iternew(kcd->kedges, &iter);
for (kfe = BLI_mempool_iterstep(&iter); kfe; kfe = BLI_mempool_iterstep(&iter)) {
@@ -1747,9 +1751,9 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
kfe->oe = kfe->e;
continue;
}
-
+
j++;
-
+
if (kfe->e) {
kfe->oe = kfe->e;
@@ -1757,37 +1761,37 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
BMO_elem_flag_disable(bm, kfe->e, BOUNDARY);
kfe->e = NULL;
}
-
+
kfe->e = BM_edge_create(bm, kfe->v1->v, kfe->v2->v, NULL, TRUE);
BMO_elem_flag_enable(bm, kfe->e, BOUNDARY);
-
+
for (ref = kfe->faces.first; ref; ref = ref->next) {
f = ref->ref;
-
+
entry = BLI_memarena_alloc(arena, sizeof(*entry));
entry->kfe = kfe;
BLI_addtail(face_nets + BM_elem_index_get(f), entry);
}
}
-
+
/* go over original edges, and add to faces with new geometry */
BLI_mempool_iternew(kcd->kedges, &iter);
for (kfe = BLI_mempool_iterstep(&iter); kfe; kfe = BLI_mempool_iterstep(&iter)) {
Ref *ref;
-
+
if (!kfe->v1 || !kfe->v2 || kfe->v1->inspace || kfe->v2->inspace)
continue;
if (!(kfe->oe && kfe->v1->v == kfe->oe->v1 && kfe->v2->v == kfe->oe->v2))
continue;
-
+
k++;
-
+
BMO_elem_flag_enable(bm, kfe->e, BOUNDARY);
kfe->oe = kfe->e;
-
+
for (ref = kfe->faces.first; ref; ref = ref->next) {
f = ref->ref;
-
+
if (face_nets[BM_elem_index_get(f)].first) {
entry = BLI_memarena_alloc(arena, sizeof(*entry));
entry->kfe = kfe;
@@ -1795,22 +1799,22 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
}
}
}
-
+
for (i = 0; i < totface; i++) {
SmallHash *hash = &shash;
ScanFillFace *efa;
ScanFillVert *eve, *lasteve;
int j;
float rndscale = FLT_EPSILON * 25;
-
+
f = faces[i];
BLI_smallhash_init(hash);
-
+
if (face_nets[i].first)
BMO_elem_flag_enable(bm, f, DEL);
-
+
BLI_begin_edgefill();
-
+
for (entry = face_nets[i].first; entry; entry = entry->next) {
if (!BLI_smallhash_haskey(hash, (intptr_t)entry->kfe->v1)) {
eve = BLI_addfillvert(entry->kfe->v1->v->co);
@@ -1826,27 +1830,27 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
rnd_offset_co(eve->co, rndscale);
eve->tmp.p = entry->kfe->v2->v;
BLI_smallhash_insert(hash, (intptr_t)entry->kfe->v2, eve);
- }
+ }
}
-
+
for (j = 0, entry = face_nets[i].first; entry; entry = entry->next, j++) {
lasteve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v1);
eve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v2);
-
+
eve->poly_nr++;
lasteve->poly_nr++;
}
-
+
for (j = 0, entry = face_nets[i].first; entry; entry = entry->next, j++) {
lasteve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v1);
eve = BLI_smallhash_lookup(hash, (intptr_t)entry->kfe->v2);
-
+
if (eve->poly_nr > 1 && lasteve->poly_nr > 1) {
ScanFillEdge *eed;
eed = BLI_addfilledge(lasteve, eve);
if (entry->kfe->oe)
- eed->f = FILLBOUNDARY; /* mark as original boundary edge */
-
+ eed->f = FILLBOUNDARY; /* mark as original boundary edge */
+
BMO_elem_flag_disable(bm, entry->kfe->e->v1, DEL);
BMO_elem_flag_disable(bm, entry->kfe->e->v2, DEL);
}
@@ -1857,45 +1861,45 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
BLI_remlink(&fillvertbase, eve);
}
}
-
+
BLI_edgefill(0);
-
+
for (efa = fillfacebase.first; efa; efa = efa->next) {
BMVert *v1 = efa->v3->tmp.p, *v2 = efa->v2->tmp.p, *v3 = efa->v1->tmp.p;
BMFace *f2;
BMLoop *l_iter;
BMVert *verts[3] = {v1, v2, v3};
-
+
if (v1 == v2 || v2 == v3 || v1 == v3)
continue;
if (BM_face_exists(bm, verts, 3, &f2))
continue;
-
+
f2 = BM_face_create_quad_tri(bm,
- v1, v2, v3, NULL,
- NULL, FALSE);
+ v1, v2, v3, NULL,
+ NULL, FALSE);
BMO_elem_flag_enable(bm, f2, FACE_NEW);
-
+
l_iter = BM_FACE_FIRST_LOOP(f2);
do {
BMO_elem_flag_disable(bm, l_iter->e, DEL);
} while ((l_iter = l_iter->next) != BM_FACE_FIRST_LOOP(f2));
-
+
BMO_elem_flag_disable(bm, f2, DEL);
- BM_elem_index_set(f2, i); /* set_dirty! */ /* note, not 100% sure this is dirty? need to check */
+ BM_elem_index_set(f2, i); /* set_dirty! *//* note, not 100% sure this is dirty? need to check */
BM_face_normal_update(bm, f2);
if (dot_v3v3(f->no, f2->no) < 0.0f) {
BM_face_normal_flip(bm, f2);
}
}
-
+
BLI_end_edgefill();
BLI_smallhash_release(hash);
}
bm->elem_index_dirty |= BM_FACE;
-
+
/* interpolate customdata */
BM_ITER(f, &bmiter, bm, BM_FACES_OF_MESH, NULL) {
BMLoop *l1;
@@ -1904,14 +1908,14 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
if (!BMO_elem_flag_test(bm, f, FACE_NEW))
continue;
-
+
f2 = faces[BM_elem_index_get(f)];
if (BM_elem_index_get(f) < 0 || BM_elem_index_get(f) >= totface) {
fprintf(stderr, "%s: face index out of range! (bmesh internal error)\n", __func__);
}
BM_elem_attrs_copy(bm, bm, f2, f);
-
+
BM_ITER(l1, &liter1, bm, BM_LOOPS_OF_FACE, f) {
BM_loop_interp_from_face(bm, l1, f2, TRUE, TRUE);
}
@@ -1930,7 +1934,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
if (faces)
MEM_freeN(faces);
BLI_memarena_free(arena);
-
+
BMO_error_clear(bm); /* remerge_faces sometimes raises errors, so make sure to clear them */
bmesh_edit_end(bm, BMO_OP_FLAG_UNTAN_MULTIRES);
@@ -1940,7 +1944,8 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
#else /* use direct (non-scanfill) method for cuts */
/* assuming v is on line ab, what fraction of the way is v from a to b? */
-static float frac_along(const float a[3], const float b[3], const float v[3]) {
+static float frac_along(const float a[3], const float b[3], const float v[3])
+{
float lab;
lab = len_v3v3(a, b);
@@ -1953,7 +1958,8 @@ static float frac_along(const float a[3], const float b[3], const float v[3]) {
}
/* sort list of kverts by fraction along edge e */
-static void sort_by_frac_along(ListBase *lst, BMEdge *e) {
+static void sort_by_frac_along(ListBase *lst, BMEdge *e)
+{
KnifeVert *vcur, *vprev;
float *v1co, *v2co;
Ref *cur = NULL, *prev = NULL, *next = NULL;
@@ -1985,8 +1991,9 @@ static void sort_by_frac_along(ListBase *lst, BMEdge *e) {
/* The chain so far goes from an instantiated vertex to kfv (some may be reversed).
* If possible, complete the chain to another instantiated vertex and return 1, else return 0.
* The visited hash says which KnifeVert's have already been tried, not including kfv. */
-static int find_chain_search(knifetool_opdata *kcd, KnifeVert *kfv,
- ListBase *fedges, SmallHash *visited, ListBase *chain) {
+static int find_chain_search(knifetool_opdata *kcd, KnifeVert *kfv, ListBase *fedges, SmallHash *visited,
+ ListBase *chain)
+{
Ref *r;
KnifeEdge *kfe;
KnifeVert *kfv_other;
@@ -2016,8 +2023,8 @@ static int find_chain_search(knifetool_opdata *kcd, KnifeVert *kfv,
return FALSE;
}
-static ListBase * find_chain_from_vertex(knifetool_opdata *kcd, KnifeEdge *kfe,
- BMVert *v, ListBase *fedges) {
+static ListBase * find_chain_from_vertex(knifetool_opdata *kcd, KnifeEdge *kfe, BMVert *v, ListBase *fedges)
+{
SmallHash visited_, *visited = &visited_;
ListBase *ans;
int found;
@@ -2046,7 +2053,8 @@ static ListBase * find_chain_from_vertex(knifetool_opdata *kcd, KnifeEdge *kfe,
/* Find a chain in fedges from one instantiated vertex to another.
* Remove the edges in the chain from fedges and return a separate list of the chain. */
-static ListBase * find_chain(knifetool_opdata *kcd, ListBase *fedges) {
+static ListBase * find_chain(knifetool_opdata *kcd, ListBase *fedges)
+{
Ref *r, *ref;
KnifeEdge *kfe;
BMVert *v1, *v2;
@@ -2084,8 +2092,9 @@ static ListBase * find_chain(knifetool_opdata *kcd, ListBase *fedges) {
/* The hole so far goes from kfvfirst to kfv (some may be reversed).
* If possible, complete the hole back to kfvfirst and return 1, else return 0.
* The visited hash says which KnifeVert's have already been tried, not including kfv or kfvfirst. */
-static int find_hole_search(knifetool_opdata *kcd, KnifeVert *kfvfirst, KnifeVert *kfv,
- ListBase *fedges, SmallHash *visited, ListBase *hole) {
+static int find_hole_search(knifetool_opdata *kcd, KnifeVert *kfvfirst, KnifeVert *kfv, ListBase *fedges,
+ SmallHash *visited, ListBase *hole)
+{
Ref *r;
KnifeEdge *kfe, *kfelast;
KnifeVert *kfv_other;
@@ -2099,6 +2108,8 @@ static int find_hole_search(knifetool_opdata *kcd, KnifeVert *kfvfirst, KnifeVer
kfe = r->ref;
if (kfe == kfelast)
continue;
+ if (kfe->v1->v || kfe->v2->v)
+ continue;
kfv_other = NULL;
if (kfe->v1 == kfv)
kfv_other = kfe->v2;
@@ -2116,7 +2127,8 @@ static int find_hole_search(knifetool_opdata *kcd, KnifeVert *kfvfirst, KnifeVer
/* Find a hole (simple cycle with no instantiated vertices).
* Remove the edges in the cycle from fedges and return a separate list of the cycle */
-static ListBase *find_hole(knifetool_opdata *kcd, ListBase *fedges) {
+static ListBase *find_hole(knifetool_opdata *kcd, ListBase *fedges)
+{
ListBase *ans;
Ref *r, *ref;
KnifeEdge *kfe;
@@ -2158,14 +2170,15 @@ static ListBase *find_hole(knifetool_opdata *kcd, ListBase *fedges) {
* If found, return TRUE and make a 'main chain' going across f which uses
* the two diagonals and one part of the hole, and a 'side chain' that
* completes the hole. */
-static int find_hole_chains(knifetool_opdata *kcd, ListBase *hole, BMFace *f,
- ListBase **mainchain, ListBase **sidechain) {
+static int find_hole_chains(knifetool_opdata *kcd, ListBase *hole, BMFace *f, ListBase **mainchain,
+ ListBase **sidechain)
+{
float **fco, **hco;
BMVert **fv;
KnifeVert **hv;
KnifeEdge **he;
Ref *r;
- KnifeVert *kfv;
+ KnifeVert *kfv, *kfvother;
KnifeEdge *kfe;
ListBase *chain;
BMVert *v;
@@ -2190,30 +2203,38 @@ static int find_hole_chains(knifetool_opdata *kcd, ListBase *hole, BMFace *f,
i = 0;
kfv = NULL;
+ kfvother = NULL;
for (r = hole->first; r; r = r->next) {
kfe = r->ref;
he[i] = kfe;
- kfv = (kfv == kfe->v1)? kfe->v2 : kfe->v1;
- hco[i] = BLI_memarena_alloc(kcd->arena, 2*sizeof(float));
+ if (kfvother == NULL) {
+ kfv = kfe->v1;
+ }
+ else {
+ kfv = kfvother;
+ BLI_assert(kfv == kfe->v1 || kfv == kfe->v2);
+ }
+ hco[i] = BLI_memarena_alloc(kcd->arena, 2 * sizeof(float));
hco[i][0] = kfv->co[ax];
hco[i][1] = kfv->co[ay];
hv[i] = kfv;
+ kfvother = (kfe->v1 == kfv) ? kfe->v2 : kfe->v1;
i++;
}
j = 0;
BM_ITER(v, &iter, kcd->em->bm, BM_VERTS_OF_FACE, f) {
- fco[j] = BLI_memarena_alloc(kcd->arena, 2*sizeof(float));
+ fco[j] = BLI_memarena_alloc(kcd->arena, 2 * sizeof(float));
fco[j][0] = v->co[ax];
fco[j][1] = v->co[ay];
fv[j] = v;
j++;
}
- /* For first diagonal (m==0), want shortest length.
- * For second diagonal (m==1), want max separation of index of hole
+ /* For first diagonal (m == 0), want shortest length.
+ * For second diagonal (m == 1), want max separation of index of hole
* vertex from the hole vertex used in the first diagonal, and from there
- * want the one with shortest length. */
+ * want the one with shortest length not to the same vertex as the first diagonal. */
for (m = 0; m < 2; m++) {
besti[m] = -1;
bestj[m] = -1;
@@ -2230,23 +2251,25 @@ static int find_hole_chains(knifetool_opdata *kcd, ListBase *hole, BMFace *f,
bestd = FLT_MAX;
}
for (j = 0; j < nf; j++) {
+ if (m == 1 && j == bestj[0])
+ continue;
d = len_squared_v2v2(hco[i], fco[j]);
if (d > bestd)
continue;
ok = TRUE;
for (k = 0; k < nh && ok; k++) {
- if (k == i || (k+1) % nh == i)
+ if (k == i || (k + 1) % nh == i)
continue;
- if (isect_line_line_v2(hco[i], fco[j], hco[k], hco[(k+1) % nh]))
+ if (isect_line_line_v2(hco[i], fco[j], hco[k], hco[(k + 1) % nh]))
ok = FALSE;
}
if (!ok)
continue;
for (k = 0; k < nf && ok; k++) {
- if (k == j || (k+1) % nf == j)
+ if (k == j || (k + 1) % nf == j)
continue;
- if (isect_line_line_v2(hco[i], fco[j], fco[k], fco[(k+1) % nf]))
+ if (isect_line_line_v2(hco[i], fco[j], fco[k], fco[(k + 1) % nf]))
ok = FALSE;
}
if (ok) {
@@ -2261,12 +2284,13 @@ static int find_hole_chains(knifetool_opdata *kcd, ListBase *hole, BMFace *f,
}
if (besti[0] != -1 && besti[1] != -1) {
+ BLI_assert(besti[0] != besti[1] && bestj[0] != bestj[1]);
kfe = new_knife_edge(kcd);
kfe->v1 = get_bm_knife_vert(kcd, fv[bestj[0]]);
kfe->v2 = hv[besti[0]];
chain = knife_empty_list(kcd);
knife_append_list(kcd, chain, kfe);
- for (i = besti[0]; i != besti[1]; i = (i+1) % nh) {
+ for (i = besti[0]; i != besti[1]; i = (i + 1) % nh) {
knife_append_list(kcd, chain, he[i]);
}
kfe = new_knife_edge(kcd);
@@ -2276,7 +2300,7 @@ static int find_hole_chains(knifetool_opdata *kcd, ListBase *hole, BMFace *f,
*mainchain = chain;
chain = knife_empty_list(kcd);
- for (i = besti[1]; i != besti[0]; i = (i+1) % nh) {
+ for (i = besti[1]; i != besti[0]; i = (i + 1) % nh) {
knife_append_list(kcd, chain, he[i]);
}
*sidechain = chain;
@@ -2288,13 +2312,18 @@ static int find_hole_chains(knifetool_opdata *kcd, ListBase *hole, BMFace *f,
}
}
-static int knife_edge_in_face(knifetool_opdata *kcd, KnifeEdge *kfe, BMFace *f) {
+static int knife_edge_in_face(knifetool_opdata *kcd, KnifeEdge *kfe, BMFace *f)
+{
BMesh *bm = kcd->em->bm;
BMVert *v1, *v2;
- BMLoop *l1, *l2, *l, *loops[2];
+ BMLoop *l1, *l2, *l;
+ float mid[3];
BMIter iter;
int v1inside, v2inside;
+ if (!f)
+ return FALSE;
+
v1 = kfe->v1->v;
v2 = kfe->v2->v;
l1 = NULL;
@@ -2315,24 +2344,25 @@ static int knife_edge_in_face(knifetool_opdata *kcd, KnifeEdge *kfe, BMFace *f)
return TRUE;
if (l1 && l2) {
/* Can have case where v1 and v2 are on shared chain between two faces.
- * BM_face_legal_splits does visibility and self-intersection tests. */
- loops[0] = l1;
- loops[1] = l2;
- BM_face_legal_splits(bm, f, (BMLoop *(*)[2])loops, 1);
- return (loops[0] != NULL);
+ * BM_face_legal_splits does visibility and self-intersection tests,
+ * but it is expensive and maybe a bit buggy, so use a simple
+ * "is the midpoint in the face" test */
+ mid_v3_v3v3(mid, kfe->v1->co, kfe->v2->co);
+ return BM_face_point_inside_test(bm, f, mid);
}
return FALSE;
}
/* Split face f with KnifeEdges on chain. f remains as one side, the face formed is put in *newface.
* The new face will be on the left side of the chain as viewed from the normal-out side of f. */
-static void knife_make_chain_cut(knifetool_opdata *kcd, BMFace *f, ListBase *chain, BMFace **newface) {
+static void knife_make_chain_cut(knifetool_opdata *kcd, BMFace *f, ListBase *chain, BMFace **newface)
+{
BMesh *bm = kcd->em->bm;
KnifeEdge *kfe, *kfelast;
BMVert *v1, *v2;
BMFace *fnew;
Ref *ref;
- KnifeVert *kfv, *kfvprev;
+ KnifeVert *kfv, *kfvprev;
BMLoop *lnew, *l_iter;
int i;
int nco = BLI_countlist(chain) - 1;
@@ -2347,29 +2377,38 @@ static void knife_make_chain_cut(knifetool_opdata *kcd, BMFace *f, ListBase *cha
v2 = kfelast->v2->v ? kfelast->v2->v : kfelast->v1->v;
BLI_assert(v1 != NULL && v2 != NULL);
kfvprev = kfe->v1->v == v1 ? kfe->v1 : kfe->v2;
- for (ref = chain->first, i=0; i < nco && ref != chain->last; ref = ref->next, i++) {
+ for (ref = chain->first, i = 0; i < nco && ref != chain->last; ref = ref->next, i++) {
kfe = ref->ref;
BLI_assert(kfvprev == kfe->v1 || kfvprev == kfe->v2);
- kfv = kfe->v1 == kfvprev? kfe->v2 : kfe->v1;
+ kfv = kfe->v1 == kfvprev ? kfe->v2 : kfe->v1;
copy_v3_v3(cos[i], kfv->co);
kverts[i] = kfv;
kfvprev = kfv;
}
BLI_assert(i == nco);
- fnew = BM_face_split_n(bm, f, v1, v2, cos, nco, &lnew, NULL);
- *newface = fnew;
-
- /* Now go through lnew chain matching up chain kv's and assign real v's to them */
- for (l_iter = lnew->next, i = 0; i < nco; l_iter = l_iter->next, i++) {
- BLI_assert(equals_v3v3(cos[i], l_iter->v->co));
- kverts[i]->v = l_iter->v;
+ lnew = NULL;
+ if (nco == 0) {
+ *newface = BM_face_split(bm, f, v1, v2, &lnew, NULL, TRUE);
+ }
+ else {
+ fnew = BM_face_split_n(bm, f, v1, v2, cos, nco, &lnew, NULL);
+ *newface = fnew;
+
+ if (fnew) {
+ /* Now go through lnew chain matching up chain kv's and assign real v's to them */
+ for (l_iter = lnew->next, i = 0; i < nco; l_iter = l_iter->next, i++) {
+ BLI_assert(equals_v3v3(cos[i], l_iter->v->co));
+ kverts[i]->v = l_iter->v;
+ }
+ }
}
BLI_array_fixedstack_free(cos);
BLI_array_fixedstack_free(kverts);
}
-static void knife_make_face_cuts(knifetool_opdata *kcd, BMFace *f, ListBase *kfedges) {
+static void knife_make_face_cuts(knifetool_opdata *kcd, BMFace *f, ListBase *kfedges)
+{
BMesh *bm = kcd->em->bm;
KnifeEdge *kfe;
BMFace *fnew, *fnew2, *fhole;
@@ -2381,6 +2420,10 @@ static void knife_make_face_cuts(knifetool_opdata *kcd, BMFace *f, ListBase *kfe
oldcount = BLI_countlist(kfedges);
while ((chain = find_chain(kcd, kfedges)) != NULL) {
knife_make_chain_cut(kcd, f, chain, &fnew);
+ if (!fnew) {
+ BLI_assert("!knife failed chain cut");
+ return;
+ }
/* Move kfedges to fnew_kfedges if they are now in fnew.
* The chain edges were removed already */
@@ -2413,6 +2456,10 @@ static void knife_make_face_cuts(knifetool_opdata *kcd, BMFace *f, ListBase *kfe
* from the second last vertex to the second vertex.
*/
knife_make_chain_cut(kcd, f, chain, &fnew);
+ if (!fnew) {
+ BLI_assert(!"knife failed hole cut");
+ return;
+ }
kfe = ((Ref *)sidechain->first)->ref;
if (knife_edge_in_face(kcd, kfe, f)) {
knife_make_chain_cut(kcd, f, sidechain, &fnew2);
@@ -2423,8 +2470,8 @@ static void knife_make_face_cuts(knifetool_opdata *kcd, BMFace *f, ListBase *kfe
fhole = fnew2;
}
else {
- /* shouldn't happen */
- BLI_assert(0);
+ /* shouldn't happen except in funny edge cases */
+ return;
}
BM_face_kill(bm, fhole);
/* Move kfedges to either fnew or fnew2 if appropriate.
@@ -2502,7 +2549,7 @@ static void knife_make_cuts(knifetool_opdata *kcd)
BLI_mempool_iternew(kcd->kverts, &iter);
for (kfv = BLI_mempool_iterstep(&iter); kfv; kfv = BLI_mempool_iterstep(&iter)) {
if (kfv->v)
- continue; /* already have a BMVert */
+ continue; /* already have a BMVert */
for (ref = kfv->edges.first; ref; ref = ref->next) {
kfe = ref->ref;
e = kfe->e;
@@ -2545,15 +2592,15 @@ static void knife_make_cuts(knifetool_opdata *kcd)
static void knifetool_finish(bContext *C, wmOperator *op)
{
knifetool_opdata *kcd = op->customdata;
-
+
#if SCANFILL_CUTS
knifenet_fill_faces(kcd);
#else
knife_make_cuts(kcd);
#endif
-
+
DAG_id_tag_update(kcd->ob->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, kcd->ob->data);
+ WM_event_add_notifier(C, NC_GEOM | ND_DATA, kcd->ob->data);
}
/* copied from paint_image.c */
@@ -2573,29 +2620,29 @@ static int project_knife_view_clip(View3D *v3d, RegionView3D *rv3d, float *clips
static void knife_recalc_projmat(knifetool_opdata *kcd)
{
ARegion *ar = CTX_wm_region(kcd->C);
-
+
if (!ar)
return;
-
+
invert_m4_m4(kcd->ob->imat, kcd->ob->obmat);
ED_view3d_ob_project_mat_get(ar->regiondata, kcd->ob, kcd->projmat);
//mult_m4_m4m4(kcd->projmat, kcd->vc.rv3d->winmat, kcd->vc.rv3d->viewmat);
-
+
kcd->is_ortho = project_knife_view_clip(kcd->vc.v3d, kcd->vc.rv3d,
&kcd->clipsta, &kcd->clipend);
}
/* called when modal loop selection is done... */
-static void knifetool_exit (bContext *UNUSED(C), wmOperator *op)
+static void knifetool_exit(bContext *UNUSED(C), wmOperator *op)
{
knifetool_opdata *kcd = op->customdata;
-
+
if (!kcd)
return;
-
+
/* deactivate the extra drawing stuff in 3D-View */
ED_region_draw_cb_exit(kcd->ar->type, kcd->draw_handle);
-
+
/* free the custom data */
BLI_mempool_destroy(kcd->refs);
BLI_mempool_destroy(kcd->kverts);
@@ -2604,10 +2651,10 @@ static void knifetool_exit (bContext *UNUSED(C), wmOperator *op)
BLI_ghash_free(kcd->origedgemap, NULL, NULL);
BLI_ghash_free(kcd->origvertmap, NULL, NULL);
BLI_ghash_free(kcd->kedgefacemap, NULL, NULL);
-
+
BMBVH_FreeBVH(kcd->bmbvh);
BLI_memarena_free(kcd->arena);
-
+
/* tag for redraw */
ED_region_tag_redraw(kcd->ar);
@@ -2619,14 +2666,13 @@ static void knifetool_exit (bContext *UNUSED(C), wmOperator *op)
op->customdata = NULL;
}
-static void cage_mapped_verts_callback(void *userData, int index, float *co,
- float *UNUSED(no_f), short *UNUSED(no_s))
+static void cage_mapped_verts_callback(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s))
{
void **data = userData;
BMEditMesh *em = data[0];
float (*cagecos)[3] = data[1];
SmallHash *hash = data[2];
-
+
if (index >= 0 && index < em->bm->totvert && !BLI_smallhash_haskey(hash, index)) {
BLI_smallhash_insert(hash, index, NULL);
copy_v3_v3(cagecos[index], co);
@@ -2642,10 +2688,10 @@ static int knifetool_init(bContext *C, wmOperator *op, int UNUSED(do_cut))
DerivedMesh *cage, *final;
SmallHash shash;
void *data[3];
-
+
/* alloc new customdata */
kcd = op->customdata = MEM_callocN(sizeof(knifetool_opdata), "knifetool Modal Op Data");
-
+
/* assign the drawing handle for drawing preview line... */
kcd->ob = obedit;
kcd->ar = CTX_wm_region(C);
@@ -2662,26 +2708,26 @@ static int knifetool_init(bContext *C, wmOperator *op, int UNUSED(do_cut))
data[0] = kcd->em;
data[1] = kcd->cagecos;
data[2] = &shash;
-
+
BLI_smallhash_init(&shash);
cage->foreachMappedVert(cage, cage_mapped_verts_callback, data);
BLI_smallhash_release(&shash);
-
- kcd->bmbvh = BMBVH_NewBVH(kcd->em, BMBVH_USE_CAGE|BMBVH_RETURN_ORIG, scene, obedit);
+
+ kcd->bmbvh = BMBVH_NewBVH(kcd->em, BMBVH_USE_CAGE | BMBVH_RETURN_ORIG, scene, obedit);
kcd->arena = BLI_memarena_new(1 << 15, "knife");
kcd->vthresh = KMAXDIST - 1;
kcd->ethresh = KMAXDIST;
-
+
kcd->extend = 1;
-
+
knife_recalc_projmat(kcd);
-
+
ED_region_tag_redraw(kcd->ar);
-
+
kcd->refs = BLI_mempool_create(sizeof(Ref), 1, 2048, 0);
kcd->kverts = BLI_mempool_create(sizeof(KnifeVert), 1, 512, BLI_MEMPOOL_ALLOW_ITER);
kcd->kedges = BLI_mempool_create(sizeof(KnifeEdge), 1, 512, BLI_MEMPOOL_ALLOW_ITER);
-
+
kcd->origedgemap = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "knife origedgemap");
kcd->origvertmap = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "knife origvertmap");
kcd->kedgefacemap = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "knife origvertmap");
@@ -2689,17 +2735,20 @@ static int knifetool_init(bContext *C, wmOperator *op, int UNUSED(do_cut))
/* cut all the way through the mesh if use_occlude_geometry button not pushed */
kcd->cut_through = !(kcd->vc.v3d->flag & V3D_ZBUF_SELECT);
+ knife_pos_data_clear(&kcd->cur);
+ knife_pos_data_clear(&kcd->prev);
+
return 1;
}
-static int knifetool_cancel (bContext *C, wmOperator *op)
+static int knifetool_cancel(bContext *C, wmOperator *op)
{
/* this is just a wrapper around exit() */
knifetool_exit(C, op);
return OPERATOR_CANCELLED;
}
-static int knifetool_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+static int knifetool_invoke(bContext *C, wmOperator *op, wmEvent *evt)
{
knifetool_opdata *kcd;
@@ -2707,14 +2756,18 @@ static int knifetool_invoke (bContext *C, wmOperator *op, wmEvent *evt)
if (!knifetool_init(C, op, 0))
return OPERATOR_CANCELLED;
-
+
/* add a modal handler for this operator - handles loop selection */
WM_event_add_modal_handler(C, op);
kcd = op->customdata;
kcd->vc.mval[0] = evt->mval[0];
kcd->vc.mval[1] = evt->mval[1];
-
+
+ ED_area_headerprint(CTX_wm_area(C),
+ "LMB: define cut lines, Return or RMB: confirm, E: new cut, Ctrl: midpoint snap, "
+ "Shift: ignore snap, C: angle constrain, Turn off limit selection to visibile: cut through");
+
return OPERATOR_RUNNING_MODAL;
}
@@ -2733,27 +2786,27 @@ enum {
wmKeyMap *knifetool_modal_keymap(wmKeyConfig *keyconf)
{
static EnumPropertyItem modal_items[] = {
- {KNF_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
- {KNF_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
- {KNF_MODAL_MIDPOINT_ON, "SNAP_MIDPOINTS_ON", 0, "Snap To Midpoints On", ""},
- {KNF_MODAL_MIDPOINT_OFF, "SNAP_MIDPOINTS_OFF", 0, "Snap To Midpoints Off", ""},
- {KNF_MODEL_IGNORE_SNAP_ON, "IGNORE_SNAP_ON", 0, "Ignore Snapping On", ""},
- {KNF_MODEL_IGNORE_SNAP_OFF, "IGNORE_SNAP_OFF", 0, "Ignore Snapping Off", ""},
- {KNF_MODAL_ANGLE_SNAP_TOGGLE, "ANGLE_SNAP_TOGGLE", 0, "Toggle Angle Snapping", ""},
- {KNF_MODAL_NEW_CUT, "NEW_CUT", 0, "End Current Cut", ""},
- {KNF_MODAL_ADD_CUT, "ADD_CUT", 0, "Add Cut", ""},
-
- {0, NULL, 0, NULL, NULL}};
-
+ {KNF_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
+ {KNF_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
+ {KNF_MODAL_MIDPOINT_ON, "SNAP_MIDPOINTS_ON", 0, "Snap To Midpoints On", ""},
+ {KNF_MODAL_MIDPOINT_OFF, "SNAP_MIDPOINTS_OFF", 0, "Snap To Midpoints Off", ""},
+ {KNF_MODEL_IGNORE_SNAP_ON, "IGNORE_SNAP_ON", 0, "Ignore Snapping On", ""},
+ {KNF_MODEL_IGNORE_SNAP_OFF, "IGNORE_SNAP_OFF", 0, "Ignore Snapping Off", ""},
+ {KNF_MODAL_ANGLE_SNAP_TOGGLE, "ANGLE_SNAP_TOGGLE", 0, "Toggle Angle Snapping", ""},
+ {KNF_MODAL_NEW_CUT, "NEW_CUT", 0, "End Current Cut", ""},
+ {KNF_MODAL_ADD_CUT, "ADD_CUT", 0, "Add Cut", ""},
+ {0, NULL, 0, NULL, NULL}};
+
wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "Knife Tool Modal Map");
-
+
/* this function is called for each spacetype, only needs to add map once */
- if (keymap) return NULL;
-
+ if (keymap)
+ return NULL;
+
keymap = WM_modalkeymap_add(keyconf, "Knife Tool Modal Map", modal_items);
-
+
/* items for modal map */
- WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, KNF_MODAL_CANCEL);
+ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, KNF_MODAL_CANCEL);
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, KM_ANY, 0, KNF_MODAL_ADD_CUT);
WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_PRESS, KM_ANY, 0, KNF_MODAL_CONFIRM);
WM_modalkeymap_add_item(keymap, RETKEY, KM_PRESS, KM_ANY, 0, KNF_MODAL_CONFIRM);
@@ -2769,51 +2822,54 @@ wmKeyMap *knifetool_modal_keymap(wmKeyConfig *keyconf)
WM_modalkeymap_add_item(keymap, LEFTSHIFTKEY, KM_RELEASE, KM_ANY, 0, KNF_MODEL_IGNORE_SNAP_OFF);
WM_modalkeymap_add_item(keymap, RIGHTSHIFTKEY, KM_PRESS, KM_ANY, 0, KNF_MODEL_IGNORE_SNAP_ON);
WM_modalkeymap_add_item(keymap, RIGHTSHIFTKEY, KM_RELEASE, KM_ANY, 0, KNF_MODEL_IGNORE_SNAP_OFF);
-
+
WM_modalkeymap_add_item(keymap, CKEY, KM_PRESS, 0, 0, KNF_MODAL_ANGLE_SNAP_TOGGLE);
WM_modalkeymap_assign(keymap, "MESH_OT_knifetool");
-
+
return keymap;
}
-static int knifetool_modal (bContext *C, wmOperator *op, wmEvent *event)
+static int knifetool_modal(bContext *C, wmOperator *op, wmEvent *event)
{
Object *obedit;
knifetool_opdata *kcd = op->customdata;
-
+
if (!C) {
return OPERATOR_FINISHED;
}
-
+
obedit = CTX_data_edit_object(C);
if (!obedit || obedit->type != OB_MESH || BMEdit_FromObject(obedit) != kcd->em) {
knifetool_exit(C, op);
+ ED_area_headerprint(CTX_wm_area(C), NULL);
return OPERATOR_FINISHED;
}
view3d_operator_needs_opengl(C);
-
+
if (kcd->mode == MODE_PANNING)
kcd->mode = kcd->prevmode;
-
+
/* handle modal keymap */
if (event->type == EVT_MODAL_MAP) {
switch (event->val) {
case KNF_MODAL_CANCEL:
/* finish */
ED_region_tag_redraw(kcd->ar);
-
+
knifetool_exit(C, op);
-
+ ED_area_headerprint(CTX_wm_area(C), NULL);
+
return OPERATOR_CANCELLED;
case KNF_MODAL_CONFIRM:
/* finish */
ED_region_tag_redraw(kcd->ar);
-
+
knifetool_finish(C, op);
knifetool_exit(C, op);
-
+ ED_area_headerprint(CTX_wm_area(C), NULL);
+
return OPERATOR_FINISHED;
case KNF_MODAL_MIDPOINT_ON:
kcd->snap_midpoints = 1;
@@ -2859,10 +2915,10 @@ static int knifetool_modal (bContext *C, wmOperator *op, wmEvent *event)
knife_start_cut(kcd);
kcd->mode = MODE_DRAGGING;
}
-
+
ED_region_tag_redraw(kcd->ar);
break;
- }
+ }
}
else { /* non-modal-mapped events */
switch (event->type) {
@@ -2878,41 +2934,41 @@ static int knifetool_modal (bContext *C, wmOperator *op, wmEvent *event)
else {
kcd->mode = kcd->prevmode;
}
-
+
ED_region_tag_redraw(kcd->ar);
return OPERATOR_PASS_THROUGH;
-
- case MOUSEMOVE: /* mouse moved somewhere to select another loop */
+
+ case MOUSEMOVE: /* mouse moved somewhere to select another loop */
if (kcd->mode != MODE_PANNING) {
knife_recalc_projmat(kcd);
kcd->vc.mval[0] = event->mval[0];
kcd->vc.mval[1] = event->mval[1];
-
- if (knife_update_active(kcd))
+
+ if (knife_update_active(kcd))
ED_region_tag_redraw(kcd->ar);
}
-
+
break;
}
}
-
+
/* keep going until the user confirms */
return OPERATOR_RUNNING_MODAL;
}
-void MESH_OT_knifetool (wmOperatorType *ot)
+void MESH_OT_knifetool(wmOperatorType *ot)
{
/* description */
ot->name = "Knife Topology Tool";
ot->idname = "MESH_OT_knifetool";
ot->description = "Cut new topology";
-
+
/* callbacks */
ot->invoke = knifetool_invoke;
ot->modal = knifetool_modal;
ot->cancel = knifetool_cancel;
ot->poll = ED_operator_editmesh_view3d;
-
+
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
}
diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 86469ae5461..b409ee16e25 100644
--- a/source/blender/editors/mesh/loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -24,11 +24,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/editors/mesh/loopcut.c
+/** \file blender/editors/mesh/editmesh_loopcut.c
* \ingroup edmesh
*/
-
#include <float.h>
#define _USE_MATH_DEFINES
#include <math.h>
@@ -113,7 +112,7 @@ static void ringsel_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
int i;
if (lcd->totedge > 0) {
- if(v3d && v3d->zbuf)
+ if (v3d && v3d->zbuf)
glDisable(GL_DEPTH_TEST);
glPushMatrix();
@@ -121,20 +120,20 @@ static void ringsel_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
glColor3ub(255, 0, 255);
glBegin(GL_LINES);
- for (i=0; i<lcd->totedge; i++) {
+ for (i = 0; i < lcd->totedge; i++) {
glVertex3fv(lcd->edges[i][0]);
glVertex3fv(lcd->edges[i][1]);
}
glEnd();
glPopMatrix();
- if(v3d && v3d->zbuf)
+ if (v3d && v3d->zbuf)
glEnable(GL_DEPTH_TEST);
}
}
/* given two opposite edges in a face, finds the ordering of their vertices so
- * that cut preview lines won't cross each other*/
+ * that cut preview lines won't cross each other */
static void edgering_find_order(BMEditMesh *em, BMEdge *lasteed, BMEdge *eed,
BMVert *lastv1, BMVert *v[2][2])
{
@@ -144,7 +143,7 @@ static void edgering_find_order(BMEditMesh *em, BMEdge *lasteed, BMEdge *eed,
l = eed->l;
- /*find correct order for v[1]*/
+ /* find correct order for v[1] */
if (!(BM_edge_in_face(l->f, eed) && BM_edge_in_face(l->f, lasteed))) {
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_LOOP, l) {
if (BM_edge_in_face(l->f, eed) && BM_edge_in_face(l->f, lasteed))
@@ -152,7 +151,7 @@ static void edgering_find_order(BMEditMesh *em, BMEdge *lasteed, BMEdge *eed,
}
}
- /*this should never happen*/
+ /* this should never happen */
if (!l) {
v[0][0] = eed->v1;
v[0][1] = eed->v2;
@@ -170,7 +169,8 @@ static void edgering_find_order(BMEditMesh *em, BMEdge *lasteed, BMEdge *eed,
if (l2->v == lastv1) {
v[0][0] = eed->v1;
v[0][1] = eed->v2;
- } else {
+ }
+ else {
v[0][0] = eed->v2;
v[0][1] = eed->v1;
}
@@ -186,7 +186,7 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
float (*edges)[2][3] = NULL;
BLI_array_declare(edges);
float co[2][3];
- int i, tot=0;
+ int i, tot = 0;
memset(v, 0, sizeof(v));
@@ -209,7 +209,7 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
BMW_NIL_LAY);
eed = BMW_begin(&walker, startedge);
- for (; eed; eed=BMW_step(&walker)) {
+ for ( ; eed; eed = BMW_step(&walker)) {
BM_elem_select_set(em->bm, eed, TRUE);
}
BMW_end(&walker);
@@ -223,12 +223,13 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
eed = startedge = BMW_begin(&walker, startedge);
lastv1 = NULL;
- for (lasteed=NULL; eed; eed=BMW_step(&walker)) {
+ for (lasteed = NULL; eed; eed = BMW_step(&walker)) {
if (lasteed) {
if (lastv1) {
v[1][0] = v[0][0];
v[1][1] = v[0][1];
- } else {
+ }
+ else {
v[1][0] = lasteed->v1;
v[1][1] = lasteed->v2;
lastv1 = lasteed->v1;
@@ -237,14 +238,14 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
edgering_find_order(em, lasteed, eed, lastv1, v);
lastv1 = v[0][0];
- for(i=1;i<=previewlines;i++){
- co[0][0] = (v[0][1]->co[0] - v[0][0]->co[0])*(i/((float)previewlines+1))+v[0][0]->co[0];
- co[0][1] = (v[0][1]->co[1] - v[0][0]->co[1])*(i/((float)previewlines+1))+v[0][0]->co[1];
- co[0][2] = (v[0][1]->co[2] - v[0][0]->co[2])*(i/((float)previewlines+1))+v[0][0]->co[2];
+ for (i = 1; i <= previewlines; i++) {
+ co[0][0] = (v[0][1]->co[0] - v[0][0]->co[0]) * (i / ((float)previewlines + 1)) + v[0][0]->co[0];
+ co[0][1] = (v[0][1]->co[1] - v[0][0]->co[1]) * (i / ((float)previewlines + 1)) + v[0][0]->co[1];
+ co[0][2] = (v[0][1]->co[2] - v[0][0]->co[2]) * (i / ((float)previewlines + 1)) + v[0][0]->co[2];
- co[1][0] = (v[1][1]->co[0] - v[1][0]->co[0])*(i/((float)previewlines+1))+v[1][0]->co[0];
- co[1][1] = (v[1][1]->co[1] - v[1][0]->co[1])*(i/((float)previewlines+1))+v[1][0]->co[1];
- co[1][2] = (v[1][1]->co[2] - v[1][0]->co[2])*(i/((float)previewlines+1))+v[1][0]->co[2];
+ co[1][0] = (v[1][1]->co[0] - v[1][0]->co[0]) * (i / ((float)previewlines + 1)) + v[1][0]->co[0];
+ co[1][1] = (v[1][1]->co[1] - v[1][0]->co[1]) * (i / ((float)previewlines + 1)) + v[1][0]->co[1];
+ co[1][2] = (v[1][1]->co[2] - v[1][0]->co[2]) * (i / ((float)previewlines + 1)) + v[1][0]->co[2];
BLI_array_growone(edges);
copy_v3_v3(edges[tot][0], co[0]);
@@ -261,17 +262,17 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
edgering_find_order(em, lasteed, startedge, lastv1, v);
- for(i=1;i<=previewlines;i++){
+ for (i = 1; i <= previewlines; i++) {
if (!v[0][0] || !v[0][1] || !v[1][0] || !v[1][1])
continue;
- co[0][0] = (v[0][1]->co[0] - v[0][0]->co[0])*(i/((float)previewlines+1))+v[0][0]->co[0];
- co[0][1] = (v[0][1]->co[1] - v[0][0]->co[1])*(i/((float)previewlines+1))+v[0][0]->co[1];
- co[0][2] = (v[0][1]->co[2] - v[0][0]->co[2])*(i/((float)previewlines+1))+v[0][0]->co[2];
+ co[0][0] = (v[0][1]->co[0] - v[0][0]->co[0]) * (i / ((float)previewlines + 1)) + v[0][0]->co[0];
+ co[0][1] = (v[0][1]->co[1] - v[0][0]->co[1]) * (i / ((float)previewlines + 1)) + v[0][0]->co[1];
+ co[0][2] = (v[0][1]->co[2] - v[0][0]->co[2]) * (i / ((float)previewlines + 1)) + v[0][0]->co[2];
- co[1][0] = (v[1][1]->co[0] - v[1][0]->co[0])*(i/((float)previewlines+1))+v[1][0]->co[0];
- co[1][1] = (v[1][1]->co[1] - v[1][0]->co[1])*(i/((float)previewlines+1))+v[1][0]->co[1];
- co[1][2] = (v[1][1]->co[2] - v[1][0]->co[2])*(i/((float)previewlines+1))+v[1][0]->co[2];
+ co[1][0] = (v[1][1]->co[0] - v[1][0]->co[0]) * (i / ((float)previewlines + 1)) + v[1][0]->co[0];
+ co[1][1] = (v[1][1]->co[1] - v[1][0]->co[1]) * (i / ((float)previewlines + 1)) + v[1][0]->co[1];
+ co[1][2] = (v[1][1]->co[2] - v[1][0]->co[2]) * (i / ((float)previewlines + 1)) + v[1][0]->co[2];
BLI_array_growone(edges);
copy_v3_v3(edges[tot][0], co[0]);
@@ -299,8 +300,8 @@ static void ringsel_find_edge(tringselOpData *lcd, int cuts)
static void ringsel_finish(bContext *C, wmOperator *op)
{
- tringselOpData *lcd= op->customdata;
- int cuts= RNA_int_get(op->ptr, "number_cuts");
+ tringselOpData *lcd = op->customdata;
+ int cuts = RNA_int_get(op->ptr, "number_cuts");
if (lcd->eed) {
BMEditMesh *em = lcd->em;
@@ -318,7 +319,7 @@ static void ringsel_finish(bContext *C, wmOperator *op)
em->selectmode = SCE_SELECT_EDGE;
else
em->selectmode &= ~SCE_SELECT_FACE;
- CTX_data_tool_settings(C)->selectmode= em->selectmode;
+ CTX_data_tool_settings(C)->selectmode = em->selectmode;
EDBM_selectmode_set(em);
WM_event_add_notifier(C, NC_SCENE|ND_TOOLSETTINGS, CTX_data_scene(C));
@@ -332,9 +333,9 @@ static void ringsel_finish(bContext *C, wmOperator *op)
else {
/* sets as active, useful for other tools */
- if(em->selectmode & SCE_SELECT_VERTEX)
+ if (em->selectmode & SCE_SELECT_VERTEX)
EDBM_store_selection(em, lcd->eed->v1); /* low priority TODO, get vertrex close to mouse */
- if(em->selectmode & SCE_SELECT_EDGE)
+ if (em->selectmode & SCE_SELECT_EDGE)
EDBM_store_selection(em, lcd->eed);
EDBM_selectmode_flush(lcd->em);
@@ -346,7 +347,7 @@ static void ringsel_finish(bContext *C, wmOperator *op)
/* called when modal loop selection is done... */
static void ringsel_exit(bContext *UNUSED(C), wmOperator *op)
{
- tringselOpData *lcd= op->customdata;
+ tringselOpData *lcd = op->customdata;
/* deactivate the extra drawing stuff in 3D-View */
ED_region_draw_cb_exit(lcd->ar->type, lcd->draw_handle);
@@ -358,7 +359,7 @@ static void ringsel_exit(bContext *UNUSED(C), wmOperator *op)
/* free the custom data */
MEM_freeN(lcd);
- op->customdata= NULL;
+ op->customdata = NULL;
}
/* called when modal loop selection gets set up... */
@@ -367,11 +368,11 @@ static int ringsel_init (bContext *C, wmOperator *op, int do_cut)
tringselOpData *lcd;
/* alloc new customdata */
- lcd= op->customdata= MEM_callocN(sizeof(tringselOpData), "ringsel Modal Op Data");
+ lcd = op->customdata = MEM_callocN(sizeof(tringselOpData), "ringsel Modal Op Data");
/* assign the drawing handle for drawing preview line... */
- lcd->ar= CTX_wm_region(C);
- lcd->draw_handle= ED_region_draw_cb_activate(lcd->ar->type, ringsel_draw, lcd, REGION_DRAW_POST_VIEW);
+ lcd->ar = CTX_wm_region(C);
+ lcd->draw_handle = ED_region_draw_cb_activate(lcd->ar->type, ringsel_draw, lcd, REGION_DRAW_POST_VIEW);
lcd->ob = CTX_data_edit_object(C);
lcd->em = BMEdit_FromObject(lcd->ob);
lcd->extend = do_cut ? 0 : RNA_boolean_get(op->ptr, "extend");
@@ -397,12 +398,12 @@ static int ringcut_cancel (bContext *C, wmOperator *op)
static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt)
{
- Object *obedit= CTX_data_edit_object(C);
+ Object *obedit = CTX_data_edit_object(C);
tringselOpData *lcd;
BMEdge *edge;
int dist = 75;
- if(modifiers_isDeformedByLattice(obedit) || modifiers_isDeformedByArmature(obedit))
+ if (modifiers_isDeformedByLattice(obedit) || modifiers_isDeformedByArmature(obedit))
BKE_report(op->reports, RPT_WARNING, "Loop cut doesn't work well on deformed edit mesh display");
view3d_operator_needs_opengl(C);
@@ -429,8 +430,8 @@ static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt)
static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
{
- int cuts= RNA_int_get(op->ptr,"number_cuts");
- tringselOpData *lcd= op->customdata;
+ int cuts = RNA_int_get(op->ptr, "number_cuts");
+ tringselOpData *lcd = op->customdata;
int show_cuts = 0;
view3d_operator_needs_opengl(C);
@@ -476,7 +477,7 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
break;
cuts++;
- RNA_int_set(op->ptr,"number_cuts",cuts);
+ RNA_int_set(op->ptr, "number_cuts", cuts);
ringsel_find_edge(lcd, cuts);
show_cuts = TRUE;
@@ -488,8 +489,8 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
if (event->val == KM_RELEASE)
break;
- cuts=MAX2(cuts-1,1);
- RNA_int_set(op->ptr,"number_cuts",cuts);
+ cuts = MAX2(cuts - 1, 1);
+ RNA_int_set(op->ptr, "number_cuts", cuts);
ringsel_find_edge(lcd, cuts);
show_cuts = TRUE;
@@ -514,15 +515,15 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
}
/* using the keyboard to input the number of cuts */
- if (event->val==KM_PRESS) {
+ if (event->val == KM_PRESS) {
float value;
if (handleNumInput(&lcd->num, event)) {
applyNumInput(&lcd->num, &value);
- cuts= CLAMPIS(value, 1, 130);
+ cuts = CLAMPIS(value, 1, 130);
- RNA_int_set(op->ptr,"number_cuts",cuts);
+ RNA_int_set(op->ptr, "number_cuts", cuts);
ringsel_find_edge(lcd, cuts);
show_cuts = TRUE;
@@ -546,16 +547,16 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
void MESH_OT_edgering_select (wmOperatorType *ot)
{
/* description */
- ot->name= "Edge Ring Select";
- ot->idname= "MESH_OT_edgering_select";
- ot->description= "Select an edge ring";
+ ot->name = "Edge Ring Select";
+ ot->idname = "MESH_OT_edgering_select";
+ ot->description = "Select an edge ring";
/* callbacks */
- ot->invoke= ringsel_invoke;
- ot->poll= ED_operator_editmesh_region_view3d;
+ ot->invoke = ringsel_invoke;
+ ot->poll = ED_operator_editmesh_region_view3d;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection");
}
@@ -564,20 +565,24 @@ void MESH_OT_edgering_select (wmOperatorType *ot)
void MESH_OT_loopcut (wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* description */
- ot->name= "Loop Cut";
- ot->idname= "MESH_OT_loopcut";
- ot->description= "Add a new loop between existing loops";
+ ot->name = "Loop Cut";
+ ot->idname = "MESH_OT_loopcut";
+ ot->description = "Add a new loop between existing loops";
/* callbacks */
- ot->invoke= ringcut_invoke;
- ot->modal= loopcut_modal;
- ot->cancel= ringcut_cancel;
- ot->poll= ED_operator_editmesh_region_view3d;
+ ot->invoke = ringcut_invoke;
+ ot->modal = loopcut_modal;
+ ot->cancel = ringcut_cancel;
+ ot->poll = ED_operator_editmesh_region_view3d;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* properties */
- RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10);
+ prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10);
+ /* avoid re-using last var because it can cause _very_ high poly meshes and annoy users (or worse crash) */
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
diff --git a/source/blender/editors/mesh/bmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 0f402def70b..d0b39dc5cc8 100644
--- a/source/blender/editors/mesh/bmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -25,6 +25,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/editors/mesh/editmesh_select.c
+ * \ingroup edmesh
+ */
+
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
@@ -189,7 +193,7 @@ int EDBM_init_backbuf_border(ViewContext *vc, short xmin, short ymin, short xmax
/* build selection lookup */
selbuf = MEM_callocN(bm_vertoffs + 1, "selbuf");
- a = (xmax - xmin + 1) * (ymax-ymin + 1);
+ a = (xmax - xmin + 1) * (ymax - ymin + 1);
while (a--) {
if (*dr > 0 && *dr <= bm_vertoffs)
selbuf[*dr] = 1;
@@ -227,9 +231,9 @@ int EDBM_mask_init_backbuf_border(ViewContext *vc, int mcords[][2], short tot, s
/* method in use for face selecting too */
if (vc->obedit == NULL) {
- if (paint_facesel_test(vc->obact));
- else if (paint_vertsel_test(vc->obact));
- else return 0;
+ if (!(paint_facesel_test(vc->obact) || paint_vertsel_test(vc->obact))) {
+ return 0;
+ }
}
else if (vc->v3d->drawtype < OB_SOLID || (vc->v3d->flag & V3D_ZBUF_SELECT) == 0) {
return 0;
@@ -289,9 +293,9 @@ int EDBM_init_backbuf_circle(ViewContext *vc, short xs, short ys, short rads)
/* method in use for face selecting too */
if (vc->obedit == NULL) {
- if (paint_facesel_test(vc->obact));
- else if (paint_vertsel_test(vc->obact));
- else return 0;
+ if (!(paint_facesel_test(vc->obact) || paint_vertsel_test(vc->obact))) {
+ return 0;
+ }
}
else if (vc->v3d->drawtype < OB_SOLID || (vc->v3d->flag & V3D_ZBUF_SELECT) == 0) return 0;
@@ -333,7 +337,7 @@ static void findnearestvert__doClosest(void *userData, BMVert *eve, int x, int y
}
if (data->dist > 3) {
- int temp = abs(data->mval[0] - x) + abs(data->mval[1]- y);
+ int temp = abs(data->mval[0] - x) + abs(data->mval[1] - y);
if (BM_elem_flag_test(eve, BM_ELEM_SELECT) == data->select) {
if (data->strict == 1) {
return;
@@ -499,7 +503,7 @@ BMEdge *EDBM_findnearestedge(ViewContext *vc, int *dist)
view3d_validate_backbuf(vc);
- index = view3d_sample_backbuf_rect(vc, vc->mval, 50, bm_solidoffs, bm_wireoffs, &distance,0, NULL, NULL);
+ index = view3d_sample_backbuf_rect(vc, vc->mval, 50, bm_solidoffs, bm_wireoffs, &distance, 0, NULL, NULL);
eed = BM_edge_at_index(vc->em->bm, index - 1);
if (eed && distance < *dist) {
@@ -649,7 +653,7 @@ static int unified_findnearest(ViewContext *vc, BMVert **r_eve, BMEdge **r_eed,
if (em->selectmode & SCE_SELECT_FACE)
*r_efa = EDBM_findnearestface(vc, &dist);
- dist-= 20; /* since edges select lines, we give dots advantage of 20 pix */
+ dist -= 20; /* since edges select lines, we give dots advantage of 20 pix */
if (em->selectmode & SCE_SELECT_EDGE)
*r_eed = EDBM_findnearestedge(vc, &dist);
@@ -701,8 +705,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
/* get the type from RNA */
int type = RNA_enum_get(op->ptr, "type");
-
- float thresh = CTX_data_tool_settings(C)->select_thresh;
+ float thresh = RNA_float_get(op->ptr, "threshold");
/* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */
EDBM_InitOpf(em, &bmop, op, "similarfaces faces=%hf type=%i thresh=%f", BM_ELEM_SELECT, type, thresh);
@@ -714,7 +717,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
EDBM_flag_disable_all(em, BM_ELEM_SELECT);
/* select the output */
- BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_ELEM_SELECT, BM_ALL, TRUE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_ALL, BM_ELEM_SELECT, TRUE);
/* finish the operator */
if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
@@ -742,8 +745,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
/* get the type from RNA */
int type = RNA_enum_get(op->ptr, "type");
-
- float thresh = CTX_data_tool_settings(C)->select_thresh;
+ float thresh = RNA_float_get(op->ptr, "threshold");
/* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */
EDBM_InitOpf(em, &bmop, op, "similaredges edges=%he type=%i thresh=%f", BM_ELEM_SELECT, type, thresh);
@@ -755,7 +757,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
EDBM_flag_disable_all(em, BM_ELEM_SELECT);
/* select the output */
- BMO_slot_buffer_hflag_enable(em->bm, &bmop, "edgeout", BM_ELEM_SELECT, BM_ALL, TRUE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "edgeout", BM_ALL, BM_ELEM_SELECT, TRUE);
EDBM_selectmode_flush(em);
/* finish the operator */
@@ -786,7 +788,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
BMOperator bmop;
/* get the type from RNA */
int type = RNA_enum_get(op->ptr, "type");
- float thresh = CTX_data_tool_settings(C)->select_thresh;
+ float thresh = RNA_float_get(op->ptr, "threshold");
/* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */
EDBM_InitOpf(em, &bmop, op, "similarverts verts=%hv type=%i thresh=%f", BM_ELEM_SELECT, type, thresh);
@@ -798,7 +800,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
EDBM_flag_disable_all(em, BM_ELEM_SELECT);
/* select the output */
- BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ELEM_SELECT, BM_ALL, TRUE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ALL, BM_ELEM_SELECT, TRUE);
/* finish the operator */
if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
@@ -815,16 +817,23 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int select_similar_exec(bContext *C, wmOperator *op)
+static int edbm_select_similar_exec(bContext *C, wmOperator *op)
{
+ ToolSettings *ts = CTX_data_tool_settings(C);
+ PropertyRNA *prop = RNA_struct_find_property(op->ptr, "threshold");
+
int type = RNA_enum_get(op->ptr, "type");
- if (type < 100)
- return similar_vert_select_exec(C, op);
- else if (type < 200)
- return similar_edge_select_exec(C, op);
- else
- return similar_face_select_exec(C, op);
+ if (!RNA_property_is_set(op->ptr, prop)) {
+ RNA_property_float_set(op->ptr, prop, ts->select_thresh);
+ }
+ else {
+ ts->select_thresh = RNA_property_float_get(op->ptr, prop);
+ }
+
+ if (type < 100) return similar_vert_select_exec(C, op);
+ else if (type < 200) return similar_edge_select_exec(C, op);
+ else return similar_face_select_exec(C, op);
}
static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
@@ -872,7 +881,7 @@ void MESH_OT_select_similar(wmOperatorType *ot)
/* api callbacks */
ot->invoke = WM_menu_invoke;
- ot->exec = select_similar_exec;
+ ot->exec = edbm_select_similar_exec;
ot->poll = ED_operator_editmesh;
ot->description = "Select similar vertices, edges or faces by property types";
@@ -882,6 +891,8 @@ void MESH_OT_select_similar(wmOperatorType *ot)
/* properties */
prop = ot->prop = RNA_def_enum(ot->srna, "type", prop_similar_types, SIMVERT_NORMAL, "Type", "");
RNA_def_enum_funcs(prop, select_similar_type_itemf);
+
+ RNA_def_float(ot->srna, "threshold", 0.0, 0.0, 1.0, "Threshold", "", 0.01, 1.0);
}
/* ***************************************************** */
@@ -907,7 +918,7 @@ static void walker_select(BMEditMesh *em, int walkercode, void *start, int selec
BMW_end(&walker);
}
-static int loop_multiselect(bContext *C, wmOperator *op)
+static int edbm_loop_multiselect_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -928,7 +939,7 @@ static int loop_multiselect(bContext *C, wmOperator *op)
}
- edarray = MEM_mallocN(sizeof(BMEdge *)*totedgesel,"edge array");
+ edarray = MEM_mallocN(sizeof(BMEdge *) * totedgesel, "edge array");
edindex = 0;
for (eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
@@ -971,7 +982,7 @@ void MESH_OT_loop_multi_select(wmOperatorType *ot)
ot->idname = "MESH_OT_loop_multi_select";
/* api callbacks */
- ot->exec = loop_multiselect;
+ ot->exec = edbm_loop_multiselect_exec;
ot->poll = ED_operator_editmesh;
ot->description = "Select a loop of connected edges by connection type";
@@ -1057,7 +1068,7 @@ static void mouse_mesh_loop(bContext *C, int mval[2], short extend, short ring)
}
}
-static int mesh_select_loop_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int edbm_select_loop_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
view3d_operator_needs_opengl(C);
@@ -1077,7 +1088,7 @@ void MESH_OT_loop_select(wmOperatorType *ot)
ot->description = "Select a loop";
/* api callbacks */
- ot->invoke = mesh_select_loop_invoke;
+ ot->invoke = edbm_select_loop_invoke;
ot->poll = ED_operator_editmesh_region_view3d;
ot->description = "Select a loop of connected edges";
@@ -1097,7 +1108,7 @@ void MESH_OT_edgering_select(wmOperatorType *ot)
ot->description = "Select an edge ring";
/* callbacks */
- ot->invoke = mesh_select_loop_invoke;
+ ot->invoke = edbm_select_loop_invoke;
ot->poll = ED_operator_editmesh_region_view3d;
/* flags */
@@ -1175,17 +1186,13 @@ static void edgetag_context_set(BMEditMesh *em, Scene *scene, BMEdge *e, int val
case EDGE_MODE_TAG_CREASE:
{
float *crease = CustomData_bmesh_get(&em->bm->edata, e->head.data, CD_CREASE);
-
- if (val) *crease = 1.0f;
- else *crease = 0.0f;
+ *crease = (val) ? 1.0f : 0.0f;
break;
}
case EDGE_MODE_TAG_BEVEL:
{
float *bweight = CustomData_bmesh_get(&em->bm->edata, e->head.data, CD_BWEIGHT);
-
- if (val) *bweight = 1.0f;
- else *bweight = 0.0f;
+ *bweight = (val) ? 1.0f : 0.0f;
break;
}
}
@@ -1424,7 +1431,7 @@ static void mouse_mesh_shortest_path(bContext *C, int mval[2])
}
-static int mesh_shortest_path_select_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
+static int edbm_shortest_path_select_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
view3d_operator_needs_opengl(C);
@@ -1441,7 +1448,7 @@ void MESH_OT_select_shortest_path(wmOperatorType *ot)
ot->idname = "MESH_OT_select_shortest_path";
/* api callbacks */
- ot->invoke = mesh_shortest_path_select_invoke;
+ ot->invoke = edbm_shortest_path_select_invoke;
ot->poll = ED_operator_editmesh;
ot->description = "Select shortest path between two selections";
@@ -1552,7 +1559,7 @@ static void EDBM_strip_selections(BMEditMesh *em)
}
}
-/* when switching select mode, makes sure selection is consistant for editing */
+/* when switching select mode, makes sure selection is consistent for editing */
/* also for paranoia checks to make sure edge or face mode works */
void EDBM_selectmode_set(BMEditMesh *em)
{
@@ -1609,8 +1616,8 @@ void EDBM_convertsel(BMEditMesh *em, short oldmode, short selectmode)
/* select all edges associated with every selected vertex */
eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
for ( ; eed; eed = BM_iter_step(&iter)) {
- if ( (BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) ||
- BM_elem_flag_test(eed->v2, BM_ELEM_SELECT)))
+ if ((BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) ||
+ BM_elem_flag_test(eed->v2, BM_ELEM_SELECT)))
{
BM_elem_select_set(em->bm, eed, TRUE);
}
@@ -1669,6 +1676,13 @@ void EDBM_deselect_by_material(BMEditMesh *em, const short index, const short se
}
}
+void EDBM_select_toggle_all(BMEditMesh *em) /* exported for UV */
+{
+ if (em->bm->totvertsel || em->bm->totedgesel || em->bm->totfacesel)
+ EDBM_flag_disable_all(em, BM_ELEM_SELECT);
+ else
+ EDBM_flag_enable_all(em, BM_ELEM_SELECT);
+}
void EDBM_select_swap(BMEditMesh *em) /* exported for UV */
{
@@ -1746,7 +1760,7 @@ static void linked_limit_default(bContext *C, wmOperator *op)
}
}
-static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
Object *obedit = CTX_data_edit_object(C);
ViewContext vc;
@@ -1845,7 +1859,7 @@ void MESH_OT_select_linked_pick(wmOperatorType *ot)
ot->idname = "MESH_OT_select_linked_pick";
/* api callbacks */
- ot->invoke = select_linked_pick_invoke;
+ ot->invoke = edbm_select_linked_pick_invoke;
ot->poll = ED_operator_editmesh;
ot->description = "(De)select all vertices linked to the edge under the mouse cursor";
@@ -1857,7 +1871,7 @@ void MESH_OT_select_linked_pick(wmOperatorType *ot)
}
-static int select_linked_exec(bContext *C, wmOperator *op)
+static int edbm_select_linked_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1940,7 +1954,7 @@ void MESH_OT_select_linked(wmOperatorType *ot)
ot->idname = "MESH_OT_select_linked";
/* api callbacks */
- ot->exec = select_linked_exec;
+ ot->exec = edbm_select_linked_exec;
ot->poll = ED_operator_editmesh;
ot->description = "Select all vertices linked to the active mesh";
@@ -1952,7 +1966,7 @@ void MESH_OT_select_linked(wmOperatorType *ot)
/* ******************** **************** */
-static int select_more(bContext *C, wmOperator *UNUSED(op))
+static int edbm_select_more_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1971,14 +1985,14 @@ void MESH_OT_select_more(wmOperatorType *ot)
ot->description = "Select more vertices, edges or faces connected to initial selection";
/* api callbacks */
- ot->exec = select_more;
+ ot->exec = edbm_select_more_exec;
ot->poll = ED_operator_editmesh;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int select_less(bContext *C, wmOperator *UNUSED(op))
+static int edbm_select_less_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1997,7 +2011,7 @@ void MESH_OT_select_less(wmOperatorType *ot)
ot->description = "Deselect vertices, edges or faces at the boundary of each selection region";
/* api callbacks */
- ot->exec = select_less;
+ ot->exec = edbm_select_less_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -2090,7 +2104,7 @@ static void deselect_nth_active(BMEditMesh *em, BMVert **r_eve, BMEdge **r_eed,
ese = (BMEditSelection *)em->bm->selected.last;
if (ese) {
- switch(ese->htype) {
+ switch (ese->htype) {
case BM_VERT:
*r_eve = (BMVert *)ese->ele;
return;
@@ -2152,7 +2166,7 @@ static int EM_deselect_nth(BMEditMesh *em, int nth, int offset)
return 0;
}
-static int mesh_select_nth_exec(bContext *C, wmOperator *op)
+static int edbm_select_nth_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -2181,7 +2195,7 @@ void MESH_OT_select_nth(wmOperatorType *ot)
ot->idname = "MESH_OT_select_nth";
/* api callbacks */
- ot->exec = mesh_select_nth_exec;
+ ot->exec = edbm_select_nth_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -2206,11 +2220,12 @@ int EM_view3d_poll(bContext *C)
{
if (ED_operator_editmesh(C) && ED_operator_view3d_active(C))
return 1;
+
return 0;
}
-static int select_sharp_edges_exec(bContext *C, wmOperator *op)
+static int edbm_select_sharp_edges_exec(bContext *C, wmOperator *op)
{
/* Find edges that have exactly two neighboring faces,
* check the angle between those faces, and if angle is
@@ -2257,7 +2272,7 @@ void MESH_OT_edges_select_sharp(wmOperatorType *ot)
ot->idname = "MESH_OT_edges_select_sharp";
/* api callbacks */
- ot->exec = select_sharp_edges_exec;
+ ot->exec = edbm_select_sharp_edges_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -2267,7 +2282,7 @@ void MESH_OT_edges_select_sharp(wmOperatorType *ot)
RNA_def_float(ot->srna, "sharpness", 1.0f, 0.01f, FLT_MAX, "sharpness", "", 1.0f, 180.0f);
}
-static int select_linked_flat_faces_exec(bContext *C, wmOperator *op)
+static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -2338,7 +2353,7 @@ void MESH_OT_faces_select_linked_flat(wmOperatorType *ot)
ot->idname = "MESH_OT_faces_select_linked_flat";
/* api callbacks */
- ot->exec = select_linked_flat_faces_exec;
+ ot->exec = edbm_select_linked_flat_faces_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -2348,7 +2363,7 @@ void MESH_OT_faces_select_linked_flat(wmOperatorType *ot)
RNA_def_float(ot->srna, "sharpness", 1.0f, 0.01f, FLT_MAX, "sharpness", "", 1.0f, 180.0f);
}
-static int select_non_manifold_exec(bContext *C, wmOperator *op)
+static int edbm_select_non_manifold_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -2366,7 +2381,7 @@ static int select_non_manifold_exec(bContext *C, wmOperator *op)
}
BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
- if (!BM_elem_flag_test(v, BM_ELEM_HIDDEN) && !BM_vert_is_manifold(em->bm, v)) {
+ if (!BM_elem_flag_test(v, BM_ELEM_HIDDEN) && !BM_vert_is_manifold(v)) {
BM_elem_select_set(em->bm, v, TRUE);
}
}
@@ -2390,14 +2405,14 @@ void MESH_OT_select_non_manifold(wmOperatorType *ot)
ot->idname = "MESH_OT_select_non_manifold";
/* api callbacks */
- ot->exec = select_non_manifold_exec;
+ ot->exec = edbm_select_non_manifold_exec;
ot->poll = ED_operator_editmesh;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int mesh_select_random_exec(bContext *C, wmOperator *op)
+static int edbm_select_random_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -2405,7 +2420,7 @@ static int mesh_select_random_exec(bContext *C, wmOperator *op)
BMEdge *eed;
BMFace *efa;
BMIter iter;
- float randfac = RNA_float_get(op->ptr, "percent")/100.0f;
+ float randfac = RNA_float_get(op->ptr, "percent") / 100.0f;
BLI_srand(BLI_rand()); /* random seed */
@@ -2450,7 +2465,7 @@ void MESH_OT_select_random(wmOperatorType *ot)
ot->idname = "MESH_OT_select_random";
/* api callbacks */
- ot->exec = mesh_select_random_exec;
+ ot->exec = edbm_select_random_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -2463,7 +2478,7 @@ void MESH_OT_select_random(wmOperatorType *ot)
"Extend Selection", "Extend selection instead of deselecting everything first");
}
-static int select_next_loop(bContext *C, wmOperator *UNUSED(op))
+static int edbm_select_next_loop_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -2505,7 +2520,7 @@ void MESH_OT_select_next_loop(wmOperatorType *ot)
ot->description = "";
/* api callbacks */
- ot->exec = select_next_loop;
+ ot->exec = edbm_select_next_loop_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -2513,7 +2528,7 @@ void MESH_OT_select_next_loop(wmOperatorType *ot)
}
-static int region_to_loop(bContext *C, wmOperator *UNUSED(op))
+static int edbm_region_to_loop_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -2572,7 +2587,7 @@ void MESH_OT_region_to_loop(wmOperatorType *ot)
ot->idname = "MESH_OT_region_to_loop";
/* api callbacks */
- ot->exec = region_to_loop;
+ ot->exec = edbm_region_to_loop_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -2717,7 +2732,7 @@ static int loop_find_regions(BMEditMesh *em, int selbigger)
return count;
}
-static int loop_to_region(bContext *C, wmOperator *op)
+static int edbm_loop_to_region_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -2753,7 +2768,7 @@ void MESH_OT_loop_to_region(wmOperatorType *ot)
ot->idname = "MESH_OT_loop_to_region";
/* api callbacks */
- ot->exec = loop_to_region;
+ ot->exec = edbm_loop_to_region_exec;
ot->poll = ED_operator_editmesh;
/* flags */
diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 4e4a9d5630b..323dae7163b 100644
--- a/source/blender/editors/mesh/bmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -25,6 +25,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/editors/mesh/editmesh_tools.c
+ * \ingroup edmesh
+ */
+
#include "MEM_guardedalloc.h"
#include "DNA_material_types.h"
@@ -63,26 +67,26 @@
#include "mesh_intern.h"
-
+/* allow accumulated normals to form a new direction but don't
+ * accept direct opposite directions else they will cancel each other out */
static void add_normal_aligned(float nor[3], const float add[3])
{
if (dot_v3v3(nor, add) < -0.9999f) {
sub_v3_v3(nor, add);
}
else {
- sub_v3_v3(nor, add);
+ add_v3_v3(nor, add);
}
}
-
-static int subdivide_exec(bContext *C, wmOperator *op)
+static int edbm_subdivide_exec(bContext *C, wmOperator *op)
{
ToolSettings *ts = CTX_data_tool_settings(C);
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
- int cuts = RNA_int_get(op->ptr,"number_cuts");
+ int cuts = RNA_int_get(op->ptr, "number_cuts");
float smooth = 0.292f * RNA_float_get(op->ptr, "smoothness");
- float fractal = RNA_float_get(op->ptr, "fractal")/2.5;
+ float fractal = RNA_float_get(op->ptr, "fractal") / 2.5f;
int flag = 0;
if (smooth != 0.0f)
@@ -120,26 +124,31 @@ static EnumPropertyItem prop_mesh_cornervert_types[] = {
void MESH_OT_subdivide(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name = "Subdivide";
ot->description = "Subdivide selected edges";
ot->idname = "MESH_OT_subdivide";
/* api callbacks */
- ot->exec = subdivide_exec;
+ ot->exec = edbm_subdivide_exec;
ot->poll = ED_operator_editmesh;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10);
+ prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10);
+ /* avoid re-using last var because it can cause _very_ high poly meshes and annoy users (or worse crash) */
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+
/* BMESH_TODO, this currently does nothing, just add to stop UI from erroring out! */
RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, FLT_MAX, "Smoothness", "Smoothness factor (BMESH TODO)", 0.0f, 1.0f);
RNA_def_boolean(ot->srna, "quadtri", 0, "Quad/Tri Mode", "Tries to prevent ngons");
RNA_def_enum(ot->srna, "quadcorner", prop_mesh_cornervert_types, SUBD_STRAIGHT_CUT,
- "Quad Corner Type", "How to subdivide quad corners (anything other then Straight Cut will prevent ngons)");
+ "Quad Corner Type", "How to subdivide quad corners (anything other than Straight Cut will prevent ngons)");
RNA_def_float(ot->srna, "fractal", 0.0f, 0.0f, FLT_MAX, "Fractal", "Fractal randomness factor", 0.0f, 1000.0f);
RNA_def_int(ot->srna, "seed", 0, 0, 10000, "Random Seed", "Seed for the random number generator", 0, 50);
@@ -167,7 +176,7 @@ void EMBM_project_snap_verts(bContext *C, ARegion *ar, Object *obedit, BMEditMes
/* individual face extrude */
/* will use vertex normals for extrusion directions, so *nor is unaffected */
-static short EDBM_Extrude_face_indiv(BMEditMesh *em, wmOperator *op, const char hflag, float *UNUSED(nor))
+static short edbm_extrude_face_indiv(BMEditMesh *em, wmOperator *op, const char hflag, float *UNUSED(nor))
{
BMOIter siter;
BMIter liter;
@@ -199,7 +208,7 @@ static short EDBM_Extrude_face_indiv(BMEditMesh *em, wmOperator *op, const char
}
/* extrudes individual edges */
-static short EDBM_Extrude_edges_indiv(BMEditMesh *em, wmOperator *op, const char hflag, float *UNUSED(nor))
+static short edbm_extrude_edges_indiv(BMEditMesh *em, wmOperator *op, const char hflag, float *UNUSED(nor))
{
BMOperator bmop;
@@ -209,7 +218,7 @@ static short EDBM_Extrude_edges_indiv(BMEditMesh *em, wmOperator *op, const char
EDBM_flag_disable_all(em, BM_ELEM_SELECT);
BMO_op_exec(em->bm, &bmop);
- BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ELEM_SELECT, BM_VERT|BM_EDGE, TRUE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_VERT|BM_EDGE, BM_ELEM_SELECT, TRUE);
if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
return 0;
@@ -219,17 +228,17 @@ static short EDBM_Extrude_edges_indiv(BMEditMesh *em, wmOperator *op, const char
}
/* extrudes individual vertices */
-static short EDBM_Extrude_verts_indiv(BMEditMesh *em, wmOperator *op, const char hflag, float *UNUSED(nor))
+static short edbm_extrude_verts_indiv(BMEditMesh *em, wmOperator *op, const char hflag, float *UNUSED(nor))
{
BMOperator bmop;
EDBM_InitOpf(em, &bmop, op, "extrude_vert_indiv verts=%hv", hflag);
/* deselect original verts */
- BMO_slot_buffer_hflag_disable(em->bm, &bmop, "verts", BM_ELEM_SELECT, BM_VERT, TRUE);
+ BMO_slot_buffer_hflag_disable(em->bm, &bmop, "verts", BM_VERT, BM_ELEM_SELECT, TRUE);
BMO_op_exec(em->bm, &bmop);
- BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ELEM_SELECT, BM_VERT, TRUE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_VERT, BM_ELEM_SELECT, TRUE);
if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
return 0;
@@ -238,7 +247,7 @@ static short EDBM_Extrude_verts_indiv(BMEditMesh *em, wmOperator *op, const char
return 'g'; // g is grab
}
-static short EDBM_Extrude_edge(Object *obedit, BMEditMesh *em, const char hflag, float nor[3])
+static short edbm_extrude_edge(Object *obedit, BMEditMesh *em, const char hflag, float nor[3])
{
BMesh *bm = em->bm;
BMIter iter;
@@ -250,7 +259,7 @@ static short EDBM_Extrude_edge(Object *obedit, BMEditMesh *em, const char hflag,
BMElem *ele;
BMO_op_init(bm, &extop, "extrude_face_region");
- BMO_slot_buffer_from_hflag(bm, &extop, "edgefacein", hflag, BM_VERT|BM_EDGE|BM_FACE);
+ BMO_slot_buffer_from_hflag(bm, &extop, "edgefacein", BM_VERT|BM_EDGE|BM_FACE, hflag);
/* If a mirror modifier with clipping is on, we need to adjust some
* of the cases above to handle edges on the line of symmetry.
@@ -317,7 +326,7 @@ static short EDBM_Extrude_edge(Object *obedit, BMEditMesh *em, const char hflag,
BMO_op_exec(bm, &extop);
- nor[0] = nor[1] = nor[2] = 0.0f;
+ zero_v3(nor);
BMO_ITER(ele, &siter, bm, &extop, "geomout", BM_ALL) {
BM_elem_select_set(bm, ele, TRUE);
@@ -332,11 +341,11 @@ static short EDBM_Extrude_edge(Object *obedit, BMEditMesh *em, const char hflag,
BMO_op_finish(bm, &extop);
- if (nor[0] == 0.0f && nor[1] == 0.0f && nor[2] == 0.0f) return 'g'; // grab
- return 'n'; // normal constraint
-
+ /* grab / normal constraint */
+ return is_zero_v3(nor) ? 'g' : 'n';
}
-static short EDBM_Extrude_vert(Object *obedit, BMEditMesh *em, const char hflag, float *nor)
+
+static short edbm_extrude_vert(Object *obedit, BMEditMesh *em, const char hflag, float nor[3])
{
BMIter iter;
BMEdge *eed;
@@ -364,18 +373,18 @@ static short EDBM_Extrude_vert(Object *obedit, BMEditMesh *em, const char hflag,
}
}
- return EDBM_Extrude_edge(obedit, em, hflag, nor);
+ return edbm_extrude_edge(obedit, em, hflag, nor);
}
-static int extrude_repeat_mesh(bContext *C, wmOperator *op)
+static int edbm_extrude_repeat_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
RegionView3D *rv3d = CTX_wm_region_view3d(C);
- int steps = RNA_int_get(op->ptr,"steps");
+ int steps = RNA_int_get(op->ptr, "steps");
- float offs = RNA_float_get(op->ptr,"offset");
+ float offs = RNA_float_get(op->ptr, "offset");
float dvec[3], tmat[3][3], bmat[3][3], nor[3] = {0.0, 0.0, 0.0};
short a;
@@ -389,7 +398,7 @@ static int extrude_repeat_mesh(bContext *C, wmOperator *op)
mul_m3_v3(tmat, dvec);
for (a = 0; a < steps; a++) {
- EDBM_Extrude_edge(obedit, em, BM_ELEM_SELECT, nor);
+ edbm_extrude_edge(obedit, em, BM_ELEM_SELECT, nor);
//BMO_op_callf(em->bm, "extrude_face_region edgefacein=%hef", BM_ELEM_SELECT);
BMO_op_callf(em->bm, "translate vec=%v verts=%hv", (float *)dvec, BM_ELEM_SELECT);
//extrudeflag(obedit, em, SELECT, nor);
@@ -412,7 +421,7 @@ void MESH_OT_extrude_repeat(wmOperatorType *ot)
ot->idname = "MESH_OT_extrude_repeat";
/* api callbacks */
- ot->exec = extrude_repeat_mesh;
+ ot->exec = edbm_extrude_repeat_exec;
ot->poll = ED_operator_editmesh_view3d;
/* flags */
@@ -424,13 +433,13 @@ void MESH_OT_extrude_repeat(wmOperatorType *ot)
}
/* generic extern called extruder */
-static int EDBM_Extrude_Mesh(Scene *scene, Object *obedit, BMEditMesh *em, wmOperator *op, float *norin)
+static int edbm_extrude_mesh(Scene *scene, Object *obedit, BMEditMesh *em, wmOperator *op, float *norin)
{
short nr, transmode = 0;
float stacknor[3] = {0.0f, 0.0f, 0.0f};
float *nor = norin ? norin : stacknor;
- nor[0] = nor[1] = nor[2] = 0.0f;
+ zero_v3(nor);
if (em->selectmode & SCE_SELECT_VERTEX) {
if (em->bm->totvertsel == 0) nr = 0;
@@ -465,24 +474,24 @@ static int EDBM_Extrude_Mesh(Scene *scene, Object *obedit, BMEditMesh *em, wmOpe
if (nr < 1) return 'g';
- if (nr == 1 && em->selectmode & SCE_SELECT_VERTEX)
- transmode = EDBM_Extrude_vert(obedit, em, BM_ELEM_SELECT, nor);
- else if (nr == 1) transmode = EDBM_Extrude_edge(obedit, em, BM_ELEM_SELECT, nor);
- else if (nr == 4) transmode = EDBM_Extrude_verts_indiv(em, op, BM_ELEM_SELECT, nor);
- else if (nr == 3) transmode = EDBM_Extrude_edges_indiv(em, op, BM_ELEM_SELECT, nor);
- else transmode = EDBM_Extrude_face_indiv(em, op, BM_ELEM_SELECT, nor);
+ if (nr == 1 && (em->selectmode & SCE_SELECT_VERTEX))
+ transmode = edbm_extrude_vert(obedit, em, BM_ELEM_SELECT, nor);
+ else if (nr == 1) transmode = edbm_extrude_edge(obedit, em, BM_ELEM_SELECT, nor);
+ else if (nr == 4) transmode = edbm_extrude_verts_indiv(em, op, BM_ELEM_SELECT, nor);
+ else if (nr == 3) transmode = edbm_extrude_edges_indiv(em, op, BM_ELEM_SELECT, nor);
+ else transmode = edbm_extrude_face_indiv(em, op, BM_ELEM_SELECT, nor);
if (transmode == 0) {
BKE_report(op->reports, RPT_ERROR, "Not a valid selection for extrude");
}
else {
- /* We need to force immediate calculation here because
- * transform may use derived objects (which are now stale).
- *
- * This shouldn't be necessary, derived queries should be
- * automatically building this data if invalid. Or something.
- */
+ /* We need to force immediate calculation here because
+ * transform may use derived objects (which are now stale).
+ *
+ * This shouldn't be necessary, derived queries should be
+ * automatically building this data if invalid. Or something.
+ */
// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
object_handle_update(scene, obedit);
@@ -507,13 +516,13 @@ static int EDBM_Extrude_Mesh(Scene *scene, Object *obedit, BMEditMesh *em, wmOpe
}
/* extrude without transform */
-static int mesh_extrude_region_exec(bContext *C, wmOperator *op)
+static int edbm_extrude_region_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
- EDBM_Extrude_Mesh(scene, obedit, em, op, NULL);
+ edbm_extrude_mesh(scene, obedit, em, op, NULL);
/* This normally happens when pushing undo but modal operators
* like this one don't push undo data until after modal mode is
@@ -534,7 +543,7 @@ void MESH_OT_extrude_region(wmOperatorType *ot)
/* api callbacks */
//ot->invoke = mesh_extrude_region_invoke;
- ot->exec = mesh_extrude_region_exec;
+ ot->exec = edbm_extrude_region_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -543,13 +552,13 @@ void MESH_OT_extrude_region(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
}
-static int mesh_extrude_verts_exec(bContext *C, wmOperator *op)
+static int edbm_extrude_verts_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
float nor[3];
- EDBM_Extrude_verts_indiv(em, op, BM_ELEM_SELECT, nor);
+ edbm_extrude_verts_indiv(em, op, BM_ELEM_SELECT, nor);
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit);
@@ -563,7 +572,7 @@ void MESH_OT_extrude_verts_indiv(wmOperatorType *ot)
ot->idname = "MESH_OT_extrude_verts_indiv";
/* api callbacks */
- ot->exec = mesh_extrude_verts_exec;
+ ot->exec = edbm_extrude_verts_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -573,13 +582,13 @@ void MESH_OT_extrude_verts_indiv(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
}
-static int mesh_extrude_edges_exec(bContext *C, wmOperator *op)
+static int edbm_extrude_edges_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
float nor[3];
- EDBM_Extrude_edges_indiv(em, op, BM_ELEM_SELECT, nor);
+ edbm_extrude_edges_indiv(em, op, BM_ELEM_SELECT, nor);
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit);
@@ -593,7 +602,7 @@ void MESH_OT_extrude_edges_indiv(wmOperatorType *ot)
ot->idname = "MESH_OT_extrude_edges_indiv";
/* api callbacks */
- ot->exec = mesh_extrude_edges_exec;
+ ot->exec = edbm_extrude_edges_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -603,13 +612,13 @@ void MESH_OT_extrude_edges_indiv(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
}
-static int mesh_extrude_faces_exec(bContext *C, wmOperator *op)
+static int edbm_extrude_faces_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
float nor[3];
- EDBM_Extrude_face_indiv(em, op, BM_ELEM_SELECT, nor);
+ edbm_extrude_face_indiv(em, op, BM_ELEM_SELECT, nor);
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit);
@@ -623,7 +632,7 @@ void MESH_OT_extrude_faces_indiv(wmOperatorType *ot)
ot->idname = "MESH_OT_extrude_faces_indiv";
/* api callbacks */
- ot->exec = mesh_extrude_faces_exec;
+ ot->exec = edbm_extrude_faces_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -634,15 +643,7 @@ void MESH_OT_extrude_faces_indiv(wmOperatorType *ot)
/* ******************** (de)select all operator **************** */
-void EDBM_toggle_select_all(BMEditMesh *em) /* exported for UV */
-{
- if (em->bm->totvertsel || em->bm->totedgesel || em->bm->totfacesel)
- EDBM_flag_disable_all(em, BM_ELEM_SELECT);
- else
- EDBM_flag_enable_all(em, BM_ELEM_SELECT);
-}
-
-static int mesh_select_all_exec(bContext *C, wmOperator *op)
+static int edbm_select_all_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -650,7 +651,7 @@ static int mesh_select_all_exec(bContext *C, wmOperator *op)
switch (action) {
case SEL_TOGGLE:
- EDBM_toggle_select_all(em);
+ EDBM_select_toggle_all(em);
break;
case SEL_SELECT:
EDBM_flag_enable_all(em, BM_ELEM_SELECT);
@@ -671,12 +672,12 @@ static int mesh_select_all_exec(bContext *C, wmOperator *op)
void MESH_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Select/Deselect All";
+ ot->name = "(De)select All";
ot->idname = "MESH_OT_select_all";
ot->description = "(De)select all vertices, edges or faces";
/* api callbacks */
- ot->exec = mesh_select_all_exec;
+ ot->exec = edbm_select_all_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -685,7 +686,7 @@ void MESH_OT_select_all(wmOperatorType *ot)
WM_operator_properties_select_all(ot);
}
-static int mesh_faces_select_interior_exec(bContext *C, wmOperator *UNUSED(op))
+static int edbm_faces_select_interior_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -709,7 +710,7 @@ void MESH_OT_select_interior_faces(wmOperatorType *ot)
ot->description = "Select faces where all edges have more than 2 face users";
/* api callbacks */
- ot->exec = mesh_faces_select_interior_exec;
+ ot->exec = edbm_faces_select_interior_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -717,8 +718,7 @@ void MESH_OT_select_interior_faces(wmOperatorType *ot)
}
/* *************** add-click-mesh (extrude) operator ************** */
-/* in trunk see: 'editmesh_add.c' */
-static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event)
+static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
ViewContext vc;
BMVert *v1;
@@ -843,7 +843,7 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event)
EMBM_project_snap_verts(C, vc.ar, vc.obedit, vc.em);
}
- EDBM_Extrude_edge(vc.obedit, vc.em, BM_ELEM_SELECT, nor);
+ edbm_extrude_edge(vc.obedit, vc.em, BM_ELEM_SELECT, nor);
EDBM_CallOpf(vc.em, op, "rotate verts=%hv cent=%v mat=%m3",
BM_ELEM_SELECT, cent, mat);
EDBM_CallOpf(vc.em, op, "translate verts=%hv vec=%v",
@@ -894,7 +894,7 @@ void MESH_OT_dupli_extrude_cursor(wmOperatorType *ot)
ot->idname = "MESH_OT_dupli_extrude_cursor";
/* api callbacks */
- ot->invoke = dupli_extrude_cursor;
+ ot->invoke = edbm_dupli_extrude_cursor_invoke;
ot->description = "Duplicate and extrude selected vertices, edges or faces towards the mouse cursor";
ot->poll = ED_operator_editmesh;
@@ -904,97 +904,50 @@ void MESH_OT_dupli_extrude_cursor(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "rotate_source", 1, "Rotate Source", "Rotate initial selection giving better shape");
}
-static int delete_mesh(bContext *C, Object *obedit, wmOperator *op, int event, Scene *UNUSED(scene))
+/* Note, these values must match delete_mesh() event values */
+static EnumPropertyItem prop_mesh_delete_types[] = {
+ {0, "VERT", 0, "Vertices", ""},
+ {1, "EDGE", 0, "Edges", ""},
+ {2, "FACE", 0, "Faces", ""},
+ {3, "EDGE_FACE", 0, "Edges & Faces", ""},
+ {4, "ONLY_FACE", 0, "Only Faces", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+static int edbm_delete_exec(bContext *C, wmOperator *op)
{
- BMEditMesh *bem = BMEdit_FromObject(obedit);
-
- if (event < 1) return OPERATOR_CANCELLED;
+ Object *obedit = CTX_data_edit_object(C);
+ BMEditMesh *em = BMEdit_FromObject(obedit);
+ int type = RNA_enum_get(op->ptr, "type");
- if (event == 10) {
- //"Erase Vertices";
+ BMEditMesh *bem = BMEdit_FromObject(obedit);
- if (!EDBM_CallOpf(bem, op, "del geom=%hv context=%i", BM_ELEM_SELECT, DEL_VERTS))
+ if (type == 0) {
+ if (!EDBM_CallOpf(bem, op, "del geom=%hv context=%i", BM_ELEM_SELECT, DEL_VERTS)) /* Erase Vertices */
return OPERATOR_CANCELLED;
- }
- else if (event == 11) {
- //"Edge Loop"
- if (!EDBM_CallOpf(bem, op, "dissolve_edge_loop edges=%he", BM_ELEM_SELECT))
- return OPERATOR_CANCELLED;
- }
- else if (event == 7) {
- int use_verts = RNA_boolean_get(op->ptr, "use_verts");
- //"Dissolve"
- if (bem->selectmode & SCE_SELECT_FACE) {
- if (!EDBM_CallOpf(bem, op, "dissolve_faces faces=%hf use_verts=%b", BM_ELEM_SELECT, use_verts))
- return OPERATOR_CANCELLED;
- }
- else if (bem->selectmode & SCE_SELECT_EDGE) {
- if (!EDBM_CallOpf(bem, op, "dissolve_edges edges=%he use_verts=%b", BM_ELEM_SELECT, use_verts))
- return OPERATOR_CANCELLED;
- }
- else if (bem->selectmode & SCE_SELECT_VERTEX) {
- if (!EDBM_CallOpf(bem, op, "dissolve_verts verts=%hv", BM_ELEM_SELECT))
- return OPERATOR_CANCELLED;
- }
}
- else if (event == 4) {
- //Edges and Faces
- if (!EDBM_CallOpf(bem, op, "del geom=%hef context=%i", BM_ELEM_SELECT, DEL_EDGESFACES))
+ else if (type == 1) {
+ if (!EDBM_CallOpf(bem, op, "del geom=%he context=%i", BM_ELEM_SELECT, DEL_EDGES)) /* Erase Edges */
return OPERATOR_CANCELLED;
- }
- else if (event == 1) {
- //"Erase Edges"
- if (!EDBM_CallOpf(bem, op, "del geom=%he context=%i", BM_ELEM_SELECT, DEL_EDGES))
+ }
+ else if (type == 2) {
+ if (!EDBM_CallOpf(bem, op, "del geom=%hf context=%i", BM_ELEM_SELECT, DEL_FACES)) /* Erase Faces */
return OPERATOR_CANCELLED;
}
- else if (event == 2) {
- //"Erase Faces";
- if (!EDBM_CallOpf(bem, op, "del geom=%hf context=%i", BM_ELEM_SELECT, DEL_FACES))
+ else if (type == 3) {
+ if (!EDBM_CallOpf(bem, op, "del geom=%hef context=%i", BM_ELEM_SELECT, DEL_EDGESFACES)) /* Edges and Faces */
return OPERATOR_CANCELLED;
}
- else if (event == 5) {
+ else if (type == 4) {
//"Erase Only Faces";
if (!EDBM_CallOpf(bem, op, "del geom=%hf context=%i",
BM_ELEM_SELECT, DEL_ONLYFACES))
return OPERATOR_CANCELLED;
}
-
- DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- return OPERATOR_FINISHED;
-}
-
-/* Note, these values must match delete_mesh() event values */
-static EnumPropertyItem prop_mesh_delete_types[] = {
- {7, "DISSOLVE", 0, "Dissolve", ""},
- {12, "COLLAPSE", 0, "Collapse", ""},
- {10,"VERT", 0, "Vertices", ""},
- {1, "EDGE", 0, "Edges", ""},
- {2, "FACE", 0, "Faces", ""},
- {11, "EDGE_LOOP", 0, "Edge Loop", ""},
- {4, "EDGE_FACE", 0, "Edges & Faces", ""},
- {5, "ONLY_FACE", 0, "Only Faces", ""},
- {0, NULL, 0, NULL, NULL}
-};
+ EDBM_flag_disable_all(em, BM_ELEM_SELECT);
-static int delete_mesh_exec(bContext *C, wmOperator *op)
-{
- Object *obedit = CTX_data_edit_object(C);
- BMEditMesh *em = BMEdit_FromObject(obedit);
- Scene *scene = CTX_data_scene(C);
- int type = RNA_enum_get(op->ptr, "type");
-
- if (type != 12) {
- if (delete_mesh(C, obedit, op, type, scene) == OPERATOR_CANCELLED)
- return OPERATOR_CANCELLED;
- EDBM_flag_disable_all(em, BM_ELEM_SELECT);
- }
- else {
- if (!EDBM_CallOpf(em, op, "collapse edges=%he", BM_ELEM_SELECT))
- return OPERATOR_CANCELLED;
- DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
- }
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA|ND_SELECT, obedit);
@@ -1010,7 +963,7 @@ void MESH_OT_delete(wmOperatorType *ot)
/* api callbacks */
ot->invoke = WM_menu_invoke;
- ot->exec = delete_mesh_exec;
+ ot->exec = edbm_delete_exec;
ot->poll = ED_operator_editmesh;
@@ -1018,15 +971,68 @@ void MESH_OT_delete(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- ot->prop = RNA_def_enum(ot->srna, "type", prop_mesh_delete_types, 10, "Type", "Method used for deleting mesh data");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_mesh_delete_types, 0, "Type", "Method used for deleting mesh data");
+}
- /* TODO, move dissolve into its own operator so this doesnt confuse non-dissolve options */
- RNA_def_boolean(ot->srna, "use_verts", 0, "Dissolve Verts",
- "When dissolving faces/edges, also dissolve remaining vertices");
+static int edbm_collapse_edge_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit = CTX_data_edit_object(C);
+ BMEditMesh *em = BMEdit_FromObject(obedit);
+
+ if (!EDBM_CallOpf(em, op, "collapse edges=%he", BM_ELEM_SELECT))
+ return OPERATOR_CANCELLED;
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
+
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA|ND_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_edge_collapse(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Edge Collapse";
+ ot->description = "Collapse selected edges";
+ ot->idname = "MESH_OT_edge_collapse";
+
+ /* api callbacks */
+ ot->exec = edbm_collapse_edge_exec;
+ ot->poll = ED_operator_editmesh;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
+static int edbm_collapse_edge_loop_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit = CTX_data_edit_object(C);
+ BMEditMesh *em = BMEdit_FromObject(obedit);
+
+ if (!EDBM_CallOpf(em, op, "dissolve_edge_loop edges=%he", BM_ELEM_SELECT))
+ return OPERATOR_CANCELLED;
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
+
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA|ND_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_edge_collapse_loop(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Edge Collapse Loop";
+ ot->description = "Collapse selected edge loops";
+ ot->idname = "MESH_OT_edge_collapse_loop";
+
+ /* api callbacks */
+ ot->exec = edbm_collapse_edge_loop_exec;
+ ot->poll = ED_operator_editmesh;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+}
-static int addedgeface_mesh_exec(bContext *C, wmOperator *op)
+static int edbm_add_edge_face_exec(bContext *C, wmOperator *op)
{
BMOperator bmop;
Object *obedit = CTX_data_edit_object(C);
@@ -1036,7 +1042,7 @@ static int addedgeface_mesh_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
BMO_op_exec(em->bm, &bmop);
- BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_ELEM_SELECT, BM_FACE, TRUE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_FACE, BM_ELEM_SELECT, TRUE);
if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
return OPERATOR_CANCELLED;
@@ -1056,7 +1062,7 @@ void MESH_OT_edge_face_add(wmOperatorType *ot)
ot->idname = "MESH_OT_edge_face_add";
/* api callbacks */
- ot->exec = addedgeface_mesh_exec;
+ ot->exec = edbm_add_edge_face_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -1065,7 +1071,7 @@ void MESH_OT_edge_face_add(wmOperatorType *ot)
/* ************************* SEAMS AND EDGES **************** */
-static int editbmesh_mark_seam(bContext *C, wmOperator *op)
+static int edbm_mark_seam(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
Mesh *me = ((Mesh *)obedit->data);
@@ -1110,7 +1116,7 @@ void MESH_OT_mark_seam(wmOperatorType *ot)
ot->description = "(un)mark selected edges as a seam";
/* api callbacks */
- ot->exec = editbmesh_mark_seam;
+ ot->exec = edbm_mark_seam;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -1119,7 +1125,7 @@ void MESH_OT_mark_seam(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "clear", 0, "Clear", "");
}
-static int editbmesh_mark_sharp(bContext *C, wmOperator *op)
+static int edbm_mark_sharp(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
Mesh *me = ((Mesh *)obedit->data);
@@ -1166,7 +1172,7 @@ void MESH_OT_mark_sharp(wmOperatorType *ot)
ot->description = "(un)mark selected edges as sharp";
/* api callbacks */
- ot->exec = editbmesh_mark_sharp;
+ ot->exec = edbm_mark_sharp;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -1176,7 +1182,7 @@ void MESH_OT_mark_sharp(wmOperatorType *ot)
}
-static int editbmesh_vert_connect(bContext *C, wmOperator *op)
+static int edbm_vert_connect(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1206,14 +1212,14 @@ void MESH_OT_vert_connect(wmOperatorType *ot)
ot->idname = "MESH_OT_vert_connect";
/* api callbacks */
- ot->exec = editbmesh_vert_connect;
+ ot->exec = edbm_vert_connect;
ot->poll = ED_operator_editmesh;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int editbmesh_edge_split(bContext *C, wmOperator *op)
+static int edbm_edge_split_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1221,13 +1227,13 @@ static int editbmesh_edge_split(bContext *C, wmOperator *op)
BMOperator bmop;
int len = 0;
- if (!EDBM_InitOpf(em, &bmop, op, "edgesplit edges=%he numcuts=%i",
- BM_ELEM_SELECT, RNA_int_get(op->ptr,"number_cuts")))
+ if (!EDBM_InitOpf(em, &bmop, op, "edgesplit edges=%he",
+ BM_ELEM_SELECT))
{
return OPERATOR_CANCELLED;
}
BMO_op_exec(bm, &bmop);
- len = BMO_slot_get(&bmop, "outsplit")->len;
+ len = BMO_slot_get(&bmop, "edgeout")->len;
if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
return OPERATOR_CANCELLED;
}
@@ -1245,18 +1251,16 @@ void MESH_OT_edge_split(wmOperatorType *ot)
ot->idname = "MESH_OT_edge_split";
/* api callbacks */
- ot->exec = editbmesh_edge_split;
+ ot->exec = edbm_edge_split_exec;
ot->poll = ED_operator_editmesh;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_int(ot->srna, "number_cuts", 1, 1, 10, "Number of Cuts", "", 1, INT_MAX);
}
/****************** add duplicate operator ***************/
-static int mesh_duplicate_exec(bContext *C, wmOperator *op)
+static int edbm_duplicate_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(ob);
@@ -1267,7 +1271,7 @@ static int mesh_duplicate_exec(bContext *C, wmOperator *op)
BMO_op_exec(em->bm, &bmop);
EDBM_flag_disable_all(em, BM_ELEM_SELECT);
- BMO_slot_buffer_hflag_enable(em->bm, &bmop, "newout", BM_ELEM_SELECT, BM_ALL, TRUE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "newout", BM_ALL, BM_ELEM_SELECT, TRUE);
if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
return OPERATOR_CANCELLED;
@@ -1279,10 +1283,10 @@ static int mesh_duplicate_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int mesh_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int edbm_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
WM_cursor_wait(1);
- mesh_duplicate_exec(C, op);
+ edbm_duplicate_exec(C, op);
WM_cursor_wait(0);
return OPERATOR_FINISHED;
@@ -1296,8 +1300,8 @@ void MESH_OT_duplicate(wmOperatorType *ot)
ot->idname = "MESH_OT_duplicate";
/* api callbacks */
- ot->invoke = mesh_duplicate_invoke;
- ot->exec = mesh_duplicate_exec;
+ ot->invoke = edbm_duplicate_invoke;
+ ot->exec = edbm_duplicate_exec;
ot->poll = ED_operator_editmesh;
@@ -1305,7 +1309,7 @@ void MESH_OT_duplicate(wmOperatorType *ot)
RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
}
-static int flip_normals(bContext *C, wmOperator *op)
+static int edbm_flip_normals_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1327,7 +1331,7 @@ void MESH_OT_flip_normals(wmOperatorType *ot)
ot->idname = "MESH_OT_flip_normals";
/* api callbacks */
- ot->exec = flip_normals;
+ ot->exec = edbm_flip_normals_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -1340,7 +1344,7 @@ static const EnumPropertyItem direction_items[] = {
{0, NULL, 0, NULL, NULL}};
/* only accepts 1 selected edge, or 2 selected faces */
-static int edge_rotate_selected(bContext *C, wmOperator *op)
+static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1380,8 +1384,15 @@ static int edge_rotate_selected(bContext *C, wmOperator *op)
EDBM_InitOpf(em, &bmop, op, "edgerotate edges=%he ccw=%b", BM_ELEM_TAG, do_ccw);
+ /* avoids leaving old verts selected which can be a problem running multiple times,
+ * since this means the edges become selected around the face which then attempt to rotate */
+ BMO_slot_buffer_hflag_disable(em->bm, &bmop, "edges", BM_EDGE, BM_ELEM_SELECT, TRUE);
+
BMO_op_exec(em->bm, &bmop);
- BMO_slot_buffer_hflag_enable(em->bm, &bmop, "edgeout", BM_ELEM_SELECT, BM_EDGE, TRUE);
+ /* edges may rotate into hidden vertices, if this does _not_ run we get an ilogical state */
+ BMO_slot_buffer_hflag_disable(em->bm, &bmop, "edgeout", BM_EDGE, BM_ELEM_HIDDEN, TRUE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "edgeout", BM_EDGE, BM_ELEM_SELECT, TRUE);
+ EDBM_selectmode_flush(em);
if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
return OPERATOR_CANCELLED;
@@ -1401,7 +1412,7 @@ void MESH_OT_edge_rotate(wmOperatorType *ot)
ot->idname = "MESH_OT_edge_rotate";
/* api callbacks */
- ot->exec = edge_rotate_selected;
+ ot->exec = edbm_edge_rotate_selected_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -1411,40 +1422,8 @@ void MESH_OT_edge_rotate(wmOperatorType *ot)
RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "Direction", "Direction to rotate edge around");
}
-/* swap is 0 or 1, if 1 it hides not selected */
-void EDBM_hide_mesh(BMEditMesh *em, int swap)
-{
- BMIter iter;
- BMElem *ele;
- int itermode;
-
- if (em == NULL) return;
-
- if (em->selectmode & SCE_SELECT_VERTEX)
- itermode = BM_VERTS_OF_MESH;
- else if (em->selectmode & SCE_SELECT_EDGE)
- itermode = BM_EDGES_OF_MESH;
- else
- itermode = BM_FACES_OF_MESH;
-
- BM_ITER(ele, &iter, em->bm, itermode, NULL) {
- if (BM_elem_flag_test(ele, BM_ELEM_SELECT) ^ swap)
- BM_elem_hide_set(em->bm, ele, TRUE);
- }
-
- EDBM_selectmode_flush(em);
-
- /* original hide flushing comment (OUTDATED):
- * hide happens on least dominant select mode, and flushes up, not down! (helps preventing errors in subsurf) */
- /* - vertex hidden, always means edge is hidden too
- * - edge hidden, always means face is hidden too
- * - face hidden, only set face hide
- * - then only flush back down what's absolute hidden
- */
-
-}
-static int hide_mesh_exec(bContext *C, wmOperator *op)
+static int edbm_hide_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1464,7 +1443,7 @@ void MESH_OT_hide(wmOperatorType *ot)
ot->idname = "MESH_OT_hide";
/* api callbacks */
- ot->exec = hide_mesh_exec;
+ ot->exec = edbm_hide_exec;
ot->poll = ED_operator_editmesh;
ot->description = "Hide (un)selected vertices, edges or faces";
@@ -1475,50 +1454,7 @@ void MESH_OT_hide(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
}
-
-void EDBM_reveal_mesh(BMEditMesh *em)
-{
- const char iter_types[3] = {BM_VERTS_OF_MESH,
- BM_EDGES_OF_MESH,
- BM_FACES_OF_MESH};
-
- int sels[3] = {(em->selectmode & SCE_SELECT_VERTEX),
- (em->selectmode & SCE_SELECT_EDGE),
- (em->selectmode & SCE_SELECT_FACE),
- };
-
- BMIter iter;
- BMElem *ele;
- int i;
-
- /* Use tag flag to remember what was hidden before all is revealed.
- * BM_ELEM_HIDDEN --> BM_ELEM_TAG */
- for (i = 0; i < 3; i++) {
- BM_ITER(ele, &iter, em->bm, iter_types[i], NULL) {
- BM_elem_flag_set(ele, BM_ELEM_TAG, BM_elem_flag_test(ele, BM_ELEM_HIDDEN));
- }
- }
-
- /* Reveal everything */
- EDBM_flag_disable_all(em, BM_ELEM_HIDDEN);
-
- /* Select relevant just-revealed elements */
- for (i = 0; i < 3; i++) {
- if (!sels[i]) {
- continue;
- }
-
- BM_ITER(ele, &iter, em->bm, iter_types[i], NULL) {
- if (BM_elem_flag_test(ele, BM_ELEM_TAG)) {
- BM_elem_select_set(em->bm, ele, TRUE);
- }
- }
- }
-
- EDBM_selectmode_flush(em);
-}
-
-static int reveal_mesh_exec(bContext *C, wmOperator *UNUSED(op))
+static int edbm_reveal_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1539,14 +1475,14 @@ void MESH_OT_reveal(wmOperatorType *ot)
ot->description = "Reveal all hidden vertices, edges and faces";
/* api callbacks */
- ot->exec = reveal_mesh_exec;
+ ot->exec = edbm_reveal_exec;
ot->poll = ED_operator_editmesh;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int normals_make_consistent_exec(bContext *C, wmOperator *op)
+static int edbm_normals_make_consistent_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1573,7 +1509,7 @@ void MESH_OT_normals_make_consistent(wmOperatorType *ot)
ot->idname = "MESH_OT_normals_make_consistent";
/* api callbacks */
- ot->exec = normals_make_consistent_exec;
+ ot->exec = edbm_normals_make_consistent_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -1584,7 +1520,7 @@ void MESH_OT_normals_make_consistent(wmOperatorType *ot)
-static int do_smooth_vertex(bContext *C, wmOperator *op)
+static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1618,7 +1554,7 @@ static int do_smooth_vertex(bContext *C, wmOperator *op)
}
}
- repeat = RNA_int_get(op->ptr,"repeat");
+ repeat = RNA_int_get(op->ptr, "repeat");
if (!repeat)
repeat = 1;
@@ -1651,7 +1587,7 @@ void MESH_OT_vertices_smooth(wmOperatorType *ot)
ot->idname = "MESH_OT_vertices_smooth";
/* api callbacks */
- ot->exec = do_smooth_vertex;
+ ot->exec = edbm_do_smooth_vertex_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -1660,81 +1596,6 @@ void MESH_OT_vertices_smooth(wmOperatorType *ot)
RNA_def_int(ot->srna, "repeat", 1, 1, 100, "Number of times to smooth the mesh", "", 1, INT_MAX);
}
-
-static int bm_test_exec(bContext *C, wmOperator *UNUSED(op))
-{
- Object *obedit = CTX_data_edit_object(C);
- ARegion *ar = CTX_wm_region(C);
- View3D *v3d = CTX_wm_view3d(C);
- BMEditMesh *em = BMEdit_FromObject(obedit);
- BMBVHTree *tree = BMBVH_NewBVH(em, 0, NULL, NULL);
- BMIter iter;
- BMEdge *e;
-
- /* hide all back edges */
- BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
- if (!BM_elem_flag_test(e, BM_ELEM_SELECT))
- continue;
-
- if (!BMBVH_EdgeVisible(tree, e, ar, v3d, obedit))
- BM_elem_select_set(em->bm, e, FALSE);
- }
-
- BMBVH_FreeBVH(tree);
-
-#if 0 //uv island walker test
- BMIter iter, liter;
- BMFace *f;
- BMLoop *l, *l2;
- MLoopUV *luv;
- BMWalker walker;
- int i = 0;
-
- BM_ITER(f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, f) {
- luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- }
- }
-
- BMW_init(&walker, em->bm, BMW_UVISLAND, BMW_NIL_LAY);
-
- BM_ITER(f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, f) {
- luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if (luv->flag & MLOOPUV_VERTSEL) {
- l2 = BMW_begin(&walker, l);
- for (; l2; l2 = BMW_step(&walker)) {
- luv = CustomData_bmesh_get(&em->bm->ldata, l2->head.data, CD_MLOOPUV);
- luv->flag |= MLOOPUV_VERTSEL;
- }
- }
- }
- }
-
- BMW_end(&walker);
-#endif
- DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
-
- return OPERATOR_FINISHED;
-}
-
-void MESH_OT_bm_test(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "BMesh Test Operator";
- ot->idname = "MESH_OT_bm_test";
-
- /* api callbacks */
- ot->exec = bm_test_exec;
- ot->poll = ED_operator_editmesh;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
-
- //RNA_def_int(ot->srna, "repeat", 1, 1, 100, "Number of times to smooth the mesh", "", 1, INT_MAX);
-}
-
/********************** Smooth/Solid Operators *************************/
static void mesh_set_smooth_faces(BMEditMesh *em, short smooth)
@@ -1751,7 +1612,7 @@ static void mesh_set_smooth_faces(BMEditMesh *em, short smooth)
}
}
-static int mesh_faces_shade_smooth_exec(bContext *C, wmOperator *UNUSED(op))
+static int edbm_faces_shade_smooth_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1772,14 +1633,14 @@ void MESH_OT_faces_shade_smooth(wmOperatorType *ot)
ot->idname = "MESH_OT_faces_shade_smooth";
/* api callbacks */
- ot->exec = mesh_faces_shade_smooth_exec;
+ ot->exec = edbm_faces_shade_smooth_exec;
ot->poll = ED_operator_editmesh;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int mesh_faces_shade_flat_exec(bContext *C, wmOperator *UNUSED(op))
+static int edbm_faces_shade_flat_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -1800,7 +1661,7 @@ void MESH_OT_faces_shade_flat(wmOperatorType *ot)
ot->idname = "MESH_OT_faces_shade_flat";
/* api callbacks */
- ot->exec = mesh_faces_shade_flat_exec;
+ ot->exec = edbm_faces_shade_flat_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -1810,13 +1671,7 @@ void MESH_OT_faces_shade_flat(wmOperatorType *ot)
/********************** UV/Color Operators *************************/
-
-static const EnumPropertyItem axis_items[] = {
- {OPUVC_AXIS_X, "X", 0, "X", ""},
- {OPUVC_AXIS_Y, "Y", 0, "Y", ""},
- {0, NULL, 0, NULL, NULL}};
-
-static int mesh_rotate_uvs(bContext *C, wmOperator *op)
+static int edbm_rotate_uvs_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(ob);
@@ -1844,7 +1699,7 @@ static int mesh_rotate_uvs(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int mesh_reverse_uvs(bContext *C, wmOperator *op)
+static int edbm_reverse_uvs_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(ob);
@@ -1869,7 +1724,7 @@ static int mesh_reverse_uvs(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int mesh_rotate_colors(bContext *C, wmOperator *op)
+static int edbm_rotate_colors_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(ob);
@@ -1900,7 +1755,7 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op)
}
-static int mesh_reverse_colors(bContext *C, wmOperator *op)
+static int edbm_reverse_colors_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(ob);
@@ -1931,7 +1786,7 @@ void MESH_OT_uvs_rotate(wmOperatorType *ot)
ot->idname = "MESH_OT_uvs_rotate";
/* api callbacks */
- ot->exec = mesh_rotate_uvs;
+ ot->exec = edbm_rotate_uvs_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -1949,7 +1804,7 @@ void MESH_OT_uvs_reverse(wmOperatorType *ot)
ot->idname = "MESH_OT_uvs_reverse";
/* api callbacks */
- ot->exec = mesh_reverse_uvs;
+ ot->exec = edbm_reverse_uvs_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -1966,7 +1821,7 @@ void MESH_OT_colors_rotate(wmOperatorType *ot)
ot->idname = "MESH_OT_colors_rotate";
/* api callbacks */
- ot->exec = mesh_rotate_colors;
+ ot->exec = edbm_rotate_colors_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -1983,7 +1838,7 @@ void MESH_OT_colors_reverse(wmOperatorType *ot)
ot->idname = "MESH_OT_colors_reverse";
/* api callbacks */
- ot->exec = mesh_reverse_colors;
+ ot->exec = edbm_reverse_colors_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -2068,7 +1923,7 @@ static int merge_target(BMEditMesh *em, Scene *scene, View3D *v3d, Object *ob,
return OPERATOR_FINISHED;
}
-static int merge_exec(bContext *C, wmOperator *op)
+static int edbm_merge_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C);
@@ -2076,7 +1931,7 @@ static int merge_exec(bContext *C, wmOperator *op)
BMEditMesh *em = BMEdit_FromObject(obedit);
int status = 0, uvs = RNA_boolean_get(op->ptr, "uvs");
- switch(RNA_enum_get(op->ptr, "type")) {
+ switch (RNA_enum_get(op->ptr, "type")) {
case 3:
status = merge_target(em, scene, v3d, obedit, 0, uvs, op);
break;
@@ -2162,7 +2017,7 @@ void MESH_OT_merge(wmOperatorType *ot)
ot->idname = "MESH_OT_merge";
/* api callbacks */
- ot->exec = merge_exec;
+ ot->exec = edbm_merge_exec;
ot->invoke = WM_menu_invoke;
ot->poll = ED_operator_editmesh;
@@ -2176,7 +2031,7 @@ void MESH_OT_merge(wmOperatorType *ot)
}
-static int removedoublesflag_exec(bContext *C, wmOperator *op)
+static int edbm_remove_doubles_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -2197,7 +2052,7 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- BKE_reportf(op->reports, RPT_INFO, "Removed %d vert%s", count, (count==1)?"ex":"ices");
+ BKE_reportf(op->reports, RPT_INFO, "Removed %d vert%s", count, (count == 1) ? "ex" : "ices");
DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
@@ -2213,7 +2068,7 @@ void MESH_OT_remove_doubles(wmOperatorType *ot)
ot->idname = "MESH_OT_remove_doubles";
/* api callbacks */
- ot->exec = removedoublesflag_exec;
+ ot->exec = edbm_remove_doubles_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -2240,7 +2095,7 @@ typedef struct PathEdge {
-static int select_vertex_path_exec(bContext *C, wmOperator *op)
+static int edbm_select_vertex_path_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(ob);
@@ -2270,7 +2125,7 @@ static int select_vertex_path_exec(bContext *C, wmOperator *op)
/* EDBM_flag_disable_all(em, BM_ELEM_SELECT); */
/* select the output */
- BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ELEM_SELECT, BM_ALL, TRUE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ALL, BM_ELEM_SELECT, TRUE);
/* finish the operator */
if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
@@ -2303,7 +2158,7 @@ void MESH_OT_select_vertex_path(wmOperatorType *ot)
ot->idname = "MESH_OT_select_vertex_path";
/* api callbacks */
- ot->exec = select_vertex_path_exec;
+ ot->exec = edbm_select_vertex_path_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -2326,7 +2181,7 @@ static float mesh_rip_edgedist(ARegion *ar, float mat[][4], float *co1, float *c
}
/* based on mouse cursor position, it defines how is being ripped */
-static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
Object *obedit = CTX_data_edit_object(C);
ARegion *ar = CTX_wm_region(C);
@@ -2568,7 +2423,7 @@ void MESH_OT_rip(wmOperatorType *ot)
ot->idname = "MESH_OT_rip";
/* api callbacks */
- ot->invoke = mesh_rip_invoke;
+ ot->invoke = edbm_rip_invoke;
ot->poll = EM_view3d_poll;
/* flags */
@@ -2617,7 +2472,7 @@ static void shape_propagate(Object *obedit, BMEditMesh *em, wmOperator *op)
}
-static int shape_propagate_to_all_exec(bContext *C, wmOperator *op)
+static int edbm_shape_propagate_to_all_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
Mesh *me = obedit->data;
@@ -2640,7 +2495,7 @@ void MESH_OT_shape_propagate_to_all(wmOperatorType *ot)
ot->idname = "MESH_OT_shape_propagate_to_all";
/* api callbacks */
- ot->exec = shape_propagate_to_all_exec;
+ ot->exec = edbm_shape_propagate_to_all_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -2648,7 +2503,7 @@ void MESH_OT_shape_propagate_to_all(wmOperatorType *ot)
}
/* BMESH_TODO this should be properly encapsulated in a bmop. but later.*/
-static int blend_from_shape_exec(bContext *C, wmOperator *op)
+static int edbm_blend_from_shape_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
Mesh *me = obedit->data;
@@ -2735,7 +2590,7 @@ void MESH_OT_blend_from_shape(wmOperatorType *ot)
ot->idname = "MESH_OT_blend_from_shape";
/* api callbacks */
- ot->exec = blend_from_shape_exec;
+ ot->exec = edbm_blend_from_shape_exec;
ot->invoke = WM_operator_props_popup;
ot->poll = ED_operator_editmesh;
@@ -2750,7 +2605,7 @@ void MESH_OT_blend_from_shape(wmOperatorType *ot)
}
/* BMESH_TODO - some way to select on an arbitrary axis */
-static int select_axis_exec(bContext *C, wmOperator *op)
+static int edbm_select_axis_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -2775,7 +2630,7 @@ static int select_axis_exec(bContext *C, wmOperator *op)
BM_ITER(ev, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
if (!BM_elem_flag_test(ev, BM_ELEM_HIDDEN)) {
- switch(mode) {
+ switch (mode) {
case -1: /* aligned */
if (fabs(ev->co[axis] - value) < limit)
BM_elem_select_set(em->bm, ev, TRUE);
@@ -2819,7 +2674,7 @@ void MESH_OT_select_axis(wmOperatorType *ot)
ot->idname = "MESH_OT_select_axis";
/* api callbacks */
- ot->exec = select_axis_exec;
+ ot->exec = edbm_select_axis_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -2830,7 +2685,7 @@ void MESH_OT_select_axis(wmOperatorType *ot)
RNA_def_enum(ot->srna, "axis", axis_items_xyz, 0, "Axis", "Select the axis to compare each vertex on");
}
-static int solidify_exec(bContext *C, wmOperator *op)
+static int edbm_solidify_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
Mesh *me = obedit->data;
@@ -2847,13 +2702,13 @@ static int solidify_exec(bContext *C, wmOperator *op)
/* deselect only the faces in the region to be solidified (leave wire
* edges and loose verts selected, as there will be no corresponding
* geometry selected below) */
- BMO_slot_buffer_hflag_disable(bm, &bmop, "geom", BM_ELEM_SELECT, BM_FACE, TRUE);
+ BMO_slot_buffer_hflag_disable(bm, &bmop, "geom", BM_FACE, BM_ELEM_SELECT, TRUE);
/* run the solidify operator */
BMO_op_exec(bm, &bmop);
/* select the newly generated faces */
- BMO_slot_buffer_hflag_enable(bm, &bmop, "geomout", BM_ELEM_SELECT, BM_FACE, TRUE);
+ BMO_slot_buffer_hflag_enable(bm, &bmop, "geomout", BM_FACE, BM_ELEM_SELECT, TRUE);
if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
return OPERATOR_CANCELLED;
@@ -2875,7 +2730,7 @@ void MESH_OT_solidify(wmOperatorType *ot)
ot->idname = "MESH_OT_solidify";
/* api callbacks */
- ot->exec = solidify_exec;
+ ot->exec = edbm_solidify_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -2942,7 +2797,7 @@ static float bm_edge_seg_isect(BMEdge *e, CutCurve *c, int len, char mode,
int i;
//threshold = 0.000001; /* tolerance for vertex intersection */
- // XXX threshold = scene->toolsettings->select_thresh / 100;
+ // XXX threshold = scene->toolsettings->select_thresh / 100;
/* Get screen coords of verts */
scr = BLI_ghash_lookup(gh, e->v1);
@@ -2965,7 +2820,7 @@ static float bm_edge_seg_isect(BMEdge *e, CutCurve *c, int len, char mode,
*isected = 0;
- /* check for *exact* vertex intersection first */
+ /* check for _exact_ vertex intersection first */
if (mode != KNIFE_MULTICUT) {
for (i = 0; i < len; i++) {
if (i > 0) {
@@ -3082,12 +2937,12 @@ static float bm_edge_seg_isect(BMEdge *e, CutCurve *c, int len, char mode,
}
lastdist = dist;
}
- return(perc);
+ return perc;
}
#define MAX_CUTS 2048
-static int knife_cut_exec(bContext *C, wmOperator *op)
+static int edbm_knife_cut_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -3118,7 +2973,9 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
RNA_float_get_array(&itemptr, "loc", (float *)&curve[len]);
len++;
- if (len >= MAX_CUTS) break;
+ if (len >= MAX_CUTS) {
+ break;
+ }
}
RNA_END;
@@ -3164,7 +3021,7 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
}
}
- BMO_slot_buffer_from_flag(bm, &bmop, "edges", 1, BM_EDGE);
+ BMO_slot_buffer_from_flag(bm, &bmop, "edges", BM_EDGE, 1);
if (mode == KNIFE_MIDPOINT) numcuts = 1;
BMO_slot_int_set(&bmop, "numcuts", numcuts);
@@ -3199,7 +3056,7 @@ void MESH_OT_knife_cut(wmOperatorType *ot)
ot->invoke = WM_gesture_lines_invoke;
ot->modal = WM_gesture_lines_modal;
- ot->exec = knife_cut_exec;
+ ot->exec = edbm_knife_cut_exec;
ot->poll = EM_view3d_poll;
@@ -3228,7 +3085,7 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO
if (!em)
return OPERATOR_CANCELLED;
- bm_new = BM_mesh_create(obedit, &bm_mesh_allocsize_default);
+ bm_new = BM_mesh_create(&bm_mesh_allocsize_default);
CustomData_copy(&em->bm->vdata, &bm_new->vdata, CD_MASK_BMESH, CD_CALLOC, 0);
CustomData_copy(&em->bm->edata, &bm_new->edata, CD_MASK_BMESH, CD_CALLOC, 0);
CustomData_copy(&em->bm->ldata, &bm_new->ldata, CD_MASK_BMESH, CD_CALLOC, 0);
@@ -3360,7 +3217,7 @@ static int mesh_separate_loose(Main *bmain, Scene *scene, Base *editbase, wmOper
return result;
}
-static int mesh_separate_exec(bContext *C, wmOperator *op)
+static int edbm_separate_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
@@ -3401,7 +3258,7 @@ void MESH_OT_separate(wmOperatorType *ot)
/* api callbacks */
ot->invoke = WM_menu_invoke;
- ot->exec = mesh_separate_exec;
+ ot->exec = edbm_separate_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -3411,7 +3268,7 @@ void MESH_OT_separate(wmOperatorType *ot)
}
-static int fill_mesh_exec(bContext *C, wmOperator *op)
+static int edbm_fill_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -3424,7 +3281,7 @@ static int fill_mesh_exec(bContext *C, wmOperator *op)
BMO_op_exec(em->bm, &bmop);
/* select new geometry */
- BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ELEM_SELECT, BM_FACE|BM_EDGE, TRUE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_FACE|BM_EDGE, BM_ELEM_SELECT, TRUE);
if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
return OPERATOR_CANCELLED;
@@ -3444,14 +3301,14 @@ void MESH_OT_fill(wmOperatorType *ot)
ot->idname = "MESH_OT_fill";
/* api callbacks */
- ot->exec = fill_mesh_exec;
+ ot->exec = edbm_fill_exec;
ot->poll = ED_operator_editmesh;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int beautify_fill_exec(bContext *C, wmOperator *op)
+static int edbm_beautify_fill_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -3472,7 +3329,7 @@ void MESH_OT_beautify_fill(wmOperatorType *ot)
ot->idname = "MESH_OT_beautify_fill";
/* api callbacks */
- ot->exec = beautify_fill_exec;
+ ot->exec = edbm_beautify_fill_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -3481,7 +3338,7 @@ void MESH_OT_beautify_fill(wmOperatorType *ot)
/********************** Quad/Tri Operators *************************/
-static int quads_convert_to_tris_exec(bContext *C, wmOperator *op)
+static int edbm_quads_convert_to_tris_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -3503,7 +3360,7 @@ void MESH_OT_quads_convert_to_tris(wmOperatorType *ot)
ot->idname = "MESH_OT_quads_convert_to_tris";
/* api callbacks */
- ot->exec = quads_convert_to_tris_exec;
+ ot->exec = edbm_quads_convert_to_tris_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -3512,7 +3369,7 @@ void MESH_OT_quads_convert_to_tris(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "use_beauty", 1, "Beauty", "Use best triangulation division (currently quads only)");
}
-static int tris_convert_to_quads_exec(bContext *C, wmOperator *op)
+static int edbm_tris_convert_to_quads_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -3546,7 +3403,7 @@ void MESH_OT_tris_convert_to_quads(wmOperatorType *ot)
ot->idname = "MESH_OT_tris_convert_to_quads";
/* api callbacks */
- ot->exec = tris_convert_to_quads_exec;
+ ot->exec = edbm_tris_convert_to_quads_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -3562,7 +3419,53 @@ void MESH_OT_tris_convert_to_quads(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "materials", 0, "Compare Materials", "");
}
-static int dissolve_limited_exec(bContext *C, wmOperator *op)
+static int edbm_dissolve_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit = CTX_data_edit_object(C);
+ BMEditMesh *em = BMEdit_FromObject(obedit);
+
+ int use_verts = RNA_boolean_get(op->ptr, "use_verts");
+
+ if (em->selectmode & SCE_SELECT_FACE) {
+ if (!EDBM_CallOpf(em, op, "dissolve_faces faces=%hf use_verts=%b", BM_ELEM_SELECT, use_verts))
+ return OPERATOR_CANCELLED;
+ }
+ else if (em->selectmode & SCE_SELECT_EDGE) {
+ if (!EDBM_CallOpf(em, op, "dissolve_edges edges=%he use_verts=%b", BM_ELEM_SELECT, use_verts))
+ return OPERATOR_CANCELLED;
+ }
+ else if (em->selectmode & SCE_SELECT_VERTEX) {
+ if (!EDBM_CallOpf(em, op, "dissolve_verts verts=%hv", BM_ELEM_SELECT))
+ return OPERATOR_CANCELLED;
+ }
+
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
+
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA|ND_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_dissolve(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Dissolve";
+ ot->description = "Dissolve geometry";
+ ot->idname = "MESH_OT_dissolve";
+
+ /* api callbacks */
+ ot->exec = edbm_dissolve_exec;
+ ot->poll = ED_operator_editmesh;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* TODO, move dissolve into its own operator so this doesnt confuse non-dissolve options */
+ RNA_def_boolean(ot->srna, "use_verts", 0, "Dissolve Verts",
+ "When dissolving faces/edges, also dissolve remaining vertices");
+}
+
+static int edbm_dissolve_limited_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -3591,7 +3494,7 @@ void MESH_OT_dissolve_limited(wmOperatorType *ot)
ot->description = "Dissolve selected edges and verts, limited by the angle of surrounding geometry";
/* api callbacks */
- ot->exec = dissolve_limited_exec;
+ ot->exec = edbm_dissolve_limited_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -3602,7 +3505,7 @@ void MESH_OT_dissolve_limited(wmOperatorType *ot)
RNA_def_property_float_default(prop, DEG2RADF(15.0f));
}
-static int split_mesh_exec(bContext *C, wmOperator *op)
+static int edbm_split_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(ob);
@@ -3611,7 +3514,7 @@ static int split_mesh_exec(bContext *C, wmOperator *op)
EDBM_InitOpf(em, &bmop, op, "split geom=%hvef use_only_faces=%b", BM_ELEM_SELECT, FALSE);
BMO_op_exec(em->bm, &bmop);
BM_mesh_elem_flag_disable_all(em->bm, BM_VERT | BM_EDGE | BM_FACE, BM_ELEM_SELECT);
- BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ELEM_SELECT, BM_ALL, TRUE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ALL, BM_ELEM_SELECT, TRUE);
if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
return OPERATOR_CANCELLED;
}
@@ -3633,7 +3536,7 @@ void MESH_OT_split(wmOperatorType *ot)
ot->idname = "MESH_OT_split";
/* api callbacks */
- ot->exec = split_mesh_exec;
+ ot->exec = edbm_split_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -3641,7 +3544,7 @@ void MESH_OT_split(wmOperatorType *ot)
}
-static int spin_mesh_exec(bContext *C, wmOperator *op)
+static int edbm_spin_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
ToolSettings *ts = CTX_data_tool_settings(C);
@@ -3674,7 +3577,7 @@ static int spin_mesh_exec(bContext *C, wmOperator *op)
}
BMO_op_exec(bm, &spinop);
EDBM_flag_disable_all(em, BM_ELEM_SELECT);
- BMO_slot_buffer_hflag_enable(bm, &spinop, "lastout", BM_ELEM_SELECT, BM_ALL, TRUE);
+ BMO_slot_buffer_hflag_enable(bm, &spinop, "lastout", BM_ALL, BM_ELEM_SELECT, TRUE);
if (!EDBM_FinishOp(em, &spinop, op, TRUE)) {
return OPERATOR_CANCELLED;
}
@@ -3686,7 +3589,7 @@ static int spin_mesh_exec(bContext *C, wmOperator *op)
}
/* get center and axis, in global coords */
-static int spin_mesh_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int edbm_spin_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
Scene *scene = CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C);
@@ -3695,7 +3598,7 @@ static int spin_mesh_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
RNA_float_set_array(op->ptr, "center", give_cursor(scene, v3d));
RNA_float_set_array(op->ptr, "axis", rv3d->viewinv[2]);
- return spin_mesh_exec(C, op);
+ return edbm_spin_exec(C, op);
}
void MESH_OT_spin(wmOperatorType *ot)
@@ -3705,8 +3608,8 @@ void MESH_OT_spin(wmOperatorType *ot)
ot->idname = "MESH_OT_spin";
/* api callbacks */
- ot->invoke = spin_mesh_invoke;
- ot->exec = spin_mesh_exec;
+ ot->invoke = edbm_spin_invoke;
+ ot->exec = edbm_spin_exec;
ot->poll = EM_view3d_poll;
/* flags */
@@ -3722,7 +3625,7 @@ void MESH_OT_spin(wmOperatorType *ot)
}
-static int screw_mesh_exec(bContext *C, wmOperator *op)
+static int edbm_screw_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -3800,7 +3703,7 @@ static int screw_mesh_exec(bContext *C, wmOperator *op)
}
BMO_op_exec(bm, &spinop);
EDBM_flag_disable_all(em, BM_ELEM_SELECT);
- BMO_slot_buffer_hflag_enable(bm, &spinop, "lastout", BM_ELEM_SELECT, BM_ALL, TRUE);
+ BMO_slot_buffer_hflag_enable(bm, &spinop, "lastout", BM_ALL, BM_ELEM_SELECT, TRUE);
if (!EDBM_FinishOp(em, &spinop, op, TRUE)) {
return OPERATOR_CANCELLED;
}
@@ -3812,7 +3715,7 @@ static int screw_mesh_exec(bContext *C, wmOperator *op)
}
/* get center and axis, in global coords */
-static int screw_mesh_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int edbm_screw_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
Scene *scene = CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C);
@@ -3821,7 +3724,7 @@ static int screw_mesh_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
RNA_float_set_array(op->ptr, "center", give_cursor(scene, v3d));
RNA_float_set_array(op->ptr, "axis", rv3d->viewinv[1]);
- return screw_mesh_exec(C, op);
+ return edbm_screw_exec(C, op);
}
void MESH_OT_screw(wmOperatorType *ot)
@@ -3831,8 +3734,8 @@ void MESH_OT_screw(wmOperatorType *ot)
ot->idname = "MESH_OT_screw";
/* api callbacks */
- ot->invoke = screw_mesh_invoke;
- ot->exec = screw_mesh_exec;
+ ot->invoke = edbm_screw_invoke;
+ ot->exec = edbm_screw_exec;
ot->poll = EM_view3d_poll;
/* flags */
@@ -3848,7 +3751,7 @@ void MESH_OT_screw(wmOperatorType *ot)
"Axis", "Axis in global view space", -FLT_MAX, FLT_MAX);
}
-static int select_by_number_vertices_exec(bContext *C, wmOperator *op)
+static int edbm_select_by_number_vertices_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -3864,11 +3767,14 @@ static int select_by_number_vertices_exec(bContext *C, wmOperator *op)
if (type == 0 && efa->len < numverts) {
select = 1;
- }else if (type == 1 && efa->len == numverts) {
+ }
+ else if (type == 1 && efa->len == numverts) {
select = 1;
- }else if (type == 2 && efa->len > numverts) {
+ }
+ else if (type == 2 && efa->len > numverts) {
select = 1;
- }else if (type == 3 && efa->len != numverts) {
+ }
+ else if (type == 3 && efa->len != numverts) {
select = 1;
}
@@ -3899,7 +3805,7 @@ void MESH_OT_select_by_number_vertices(wmOperatorType *ot)
ot->idname = "MESH_OT_select_by_number_vertices";
/* api callbacks */
- ot->exec = select_by_number_vertices_exec;
+ ot->exec = edbm_select_by_number_vertices_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -3910,7 +3816,7 @@ void MESH_OT_select_by_number_vertices(wmOperatorType *ot)
RNA_def_enum(ot->srna, "type", type_items, 1, "Type", "Type of comparison to make");
}
-static int select_loose_verts_exec(bContext *C, wmOperator *UNUSED(op))
+static int edbm_select_loose_verts_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -3948,14 +3854,14 @@ void MESH_OT_select_loose_verts(wmOperatorType *ot)
ot->idname = "MESH_OT_select_loose_verts";
/* api callbacks */
- ot->exec = select_loose_verts_exec;
+ ot->exec = edbm_select_loose_verts_exec;
ot->poll = ED_operator_editmesh;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int select_mirror_exec(bContext *C, wmOperator *op)
+static int edbm_select_mirror_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -3976,7 +3882,7 @@ void MESH_OT_select_mirror(wmOperatorType *ot)
ot->idname = "MESH_OT_select_mirror";
/* api callbacks */
- ot->exec = select_mirror_exec;
+ ot->exec = edbm_select_mirror_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -4050,7 +3956,7 @@ static void xsortvert_flag(bContext *UNUSED(C), int UNUSED(flag))
em = vc.em;
amount = em->bm->totvert;
- sortblock = MEM_callocN(sizeof(xvertsort) * amount,"xsort");
+ sortblock = MEM_callocN(sizeof(xvertsort) * amount, "xsort");
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
if (BM_elem_flag_test(eve, BM_ELEM_SELECT))
sortblock[i].v1 = eve;
@@ -4079,7 +3985,7 @@ static void xsortvert_flag(bContext *UNUSED(C), int UNUSED(flag))
}
-static int mesh_vertices_sort_exec(bContext *C, wmOperator *UNUSED(op))
+static int edbm_vertices_sort_exec(bContext *C, wmOperator *UNUSED(op))
{
xsortvert_flag(C, SELECT);
return OPERATOR_FINISHED;
@@ -4093,7 +3999,7 @@ void MESH_OT_vertices_sort(wmOperatorType *ot)
ot->idname = "MESH_OT_vertices_sort";
/* api callbacks */
- ot->exec = mesh_vertices_sort_exec;
+ ot->exec = edbm_vertices_sort_exec;
ot->poll = EM_view3d_poll; /* uses view relative X axis to sort verts */
@@ -4134,7 +4040,7 @@ static int float_sort(const void *v1, const void *v2)
return 0;
}
-static int sort_faces_exec(bContext *C, wmOperator *op)
+static int edbm_sort_faces_exec(bContext *C, wmOperator *op)
{
RegionView3D *rv3d = ED_view3d_context_rv3d(C);
View3D *v3d = CTX_wm_view3d(C);
@@ -4210,7 +4116,7 @@ static int sort_faces_exec(bContext *C, wmOperator *op)
for (i = 0; i < me->totpoly; i++, mp++) {
if (event == 3) {
- face_sort_floats[i] = ((float)mp->mat_nr)*reverse;
+ face_sort_floats[i] = ((float)mp->mat_nr) * reverse;
}
else if (event == 4) {
/* selected first */
@@ -4273,7 +4179,7 @@ void MESH_OT_sort_faces(wmOperatorType *ot)
/* api callbacks */
ot->invoke = WM_menu_invoke;
- ot->exec = sort_faces_exec;
+ ot->exec = edbm_sort_faces_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -4303,7 +4209,7 @@ static void hashvert_flag(EditMesh *em, int flag)
if (amount == 0) return;
/* allocate memory */
- sb = sortblock = (struct xvertsort *)MEM_mallocN(sizeof(struct xvertsort)*amount,"sortremovedoub");
+ sb = sortblock = (struct xvertsort *)MEM_mallocN(sizeof(struct xvertsort) * amount, "sortremovedoub");
eve = em->verts.first;
while (eve) {
if (eve->f & flag) {
@@ -4343,7 +4249,7 @@ static void hashvert_flag(EditMesh *em, int flag)
}
#endif
-static int mesh_vertices_randomize_exec(bContext *C, wmOperator *UNUSED(op))
+static int edbm_vertices_randomize_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -4363,7 +4269,7 @@ void MESH_OT_vertices_randomize(wmOperatorType *ot)
ot->idname = "MESH_OT_vertices_randomize";
/* api callbacks */
- ot->exec = mesh_vertices_randomize_exec;
+ ot->exec = edbm_vertices_randomize_exec;
ot->poll = ED_operator_editmesh;
@@ -4374,7 +4280,7 @@ void MESH_OT_vertices_randomize(wmOperatorType *ot)
/******end of qsort stuff ****/
-static int mesh_noise_exec(bContext *C, wmOperator *op)
+static int edbm_noise_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -4436,7 +4342,7 @@ void MESH_OT_noise(wmOperatorType *ot)
ot->idname = "MESH_OT_noise";
/* api callbacks */
- ot->exec = mesh_noise_exec;
+ ot->exec = edbm_noise_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -4446,14 +4352,14 @@ void MESH_OT_noise(wmOperatorType *ot)
}
/* bevel! yay!!*/
-static int mesh_bevel_exec(bContext *C, wmOperator *op)
+static int edbm_bevel_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
BMIter iter;
BMEdge *eed;
BMOperator bmop;
- float factor = RNA_float_get(op->ptr, "percent"), fac = factor /*, dfac */ /* UNUSED */, df, s;
+ float factor = RNA_float_get(op->ptr, "percent") /*, dfac */ /* UNUSED */, df, s;
int i, recursion = RNA_int_get(op->ptr, "recursion");
const int use_even = RNA_boolean_get(op->ptr, "use_even");
const int use_dist = RNA_boolean_get(op->ptr, "use_dist");
@@ -4490,9 +4396,8 @@ static int mesh_bevel_exec(bContext *C, wmOperator *op)
mul_vn_fl(w, recursion, 1.0f / (float)ftot);
- fac = factor;
for (i = 0; i < recursion; i++) {
- fac = w[recursion - i - 1] * factor;
+ float fac = w[recursion - i - 1] * factor;
if (!EDBM_InitOpf(em, &bmop, op,
"bevel geom=%hev percent=%f lengthlayer=%i use_lengths=%b use_even=%b use_dist=%b",
@@ -4526,7 +4431,7 @@ void MESH_OT_bevel(wmOperatorType *ot)
ot->idname = "MESH_OT_bevel";
/* api callbacks */
- ot->exec = mesh_bevel_exec;
+ ot->exec = edbm_bevel_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -4540,7 +4445,7 @@ void MESH_OT_bevel(wmOperatorType *ot)
}
-static int bridge_edge_loops(bContext *C, wmOperator *op)
+static int edbm_bridge_edge_loops_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -4557,12 +4462,12 @@ static int bridge_edge_loops(bContext *C, wmOperator *op)
void MESH_OT_bridge_edge_loops(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Bridge edge loops";
+ ot->name = "Bridge Two Edge Loops";
ot->description = "Make faces between two edge loops";
ot->idname = "MESH_OT_bridge_edge_loops";
/* api callbacks */
- ot->exec = bridge_edge_loops;
+ ot->exec = edbm_bridge_edge_loops_exec;
ot->poll = ED_operator_editmesh;
/* flags */
@@ -4571,7 +4476,70 @@ void MESH_OT_bridge_edge_loops(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "inside", 0, "Inside", "");
}
-static int mark_freestyle_edge(bContext *C, wmOperator *op)
+
+
+static int edbm_inset_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit = CTX_data_edit_object(C);
+ BMEditMesh *em = BMEdit_FromObject(obedit);
+ BMOperator bmop;
+ const int use_boundary = FALSE; //RNA_boolean_get(op->ptr, "use_boundary");
+ const int use_even_offset = RNA_boolean_get(op->ptr, "use_even_offset");
+ const int use_relative_offset = RNA_boolean_get(op->ptr, "use_relative_offset");
+ const float thickness = RNA_float_get(op->ptr, "thickness");
+ const int use_outset = RNA_boolean_get(op->ptr, "use_outset");
+
+ EDBM_InitOpf(em, &bmop, op,
+ "inset faces=%hf use_boundary=%b use_even_offset=%b use_relative_offset=%b thickness=%f use_outset=%b",
+ BM_ELEM_SELECT, use_boundary, use_even_offset, use_relative_offset, thickness, use_outset);
+
+ BMO_op_exec(em->bm, &bmop);
+
+ /* deselect original verts */
+ EDBM_flag_disable_all(em, BM_ELEM_SELECT);
+
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_FACE, BM_ELEM_SELECT, TRUE);
+
+ if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+ return OPERATOR_CANCELLED;
+ }
+ else {
+ DAG_id_tag_update(obedit->data, 0);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+
+ return OPERATOR_FINISHED;
+ }
+}
+
+void MESH_OT_inset(wmOperatorType *ot)
+{
+ PropertyRNA *prop;
+
+ /* identifiers */
+ ot->name = "Inset Faces";
+ ot->idname = "MESH_OT_inset";
+
+ /* api callbacks */
+ ot->exec = edbm_inset_exec;
+ ot->poll = ED_operator_editmesh;
+ ot->description = "";
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* properties */
+ // RNA_def_boolean(ot->srna, "use_boundary", TRUE, "Boundary", "Inset face boundries");
+ RNA_def_boolean(ot->srna, "use_even_offset", TRUE, "Offset Even", "Scale the offset to give more even thickness");
+ RNA_def_boolean(ot->srna, "use_relative_offset", FALSE, "Offset Relative", "Scale the offset by surrounding geometry");
+
+ prop = RNA_def_float(ot->srna, "thickness", 0.01f, 0.0f, FLT_MAX, "thickness", "", 0.0f, 10.0f);
+ /* use 1 rather then 10 for max else dragging the button moves too far */
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 0.01, 4);
+
+ RNA_def_boolean(ot->srna, "use_outset", FALSE, "Outset", "outset rather then inset");
+}
+
+static int edbm_mark_freestyle_edge(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
Mesh *me = ((Mesh *)obedit->data);
@@ -4609,21 +4577,21 @@ static int mark_freestyle_edge(bContext *C, wmOperator *op)
void MESH_OT_mark_freestyle_edge(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mark Freestyle Edge";
- ot->description= "(un)mark selected edges as Freestyle feature edges";
- ot->idname= "MESH_OT_mark_freestyle_edge";
+ ot->name = "Mark Freestyle Edge";
+ ot->description = "(un)mark selected edges as Freestyle feature edges";
+ ot->idname = "MESH_OT_mark_freestyle_edge";
/* api callbacks */
- ot->exec= mark_freestyle_edge;
- ot->poll= ED_operator_editmesh;
+ ot->exec = edbm_mark_freestyle_edge;
+ ot->poll = ED_operator_editmesh;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "clear", 0, "Clear", "");
}
-static int mark_freestyle_face_exec(bContext *C, wmOperator *op)
+static int edbm_mark_freestyle_face_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
Mesh *me = ((Mesh *)obedit->data);
@@ -4660,16 +4628,17 @@ static int mark_freestyle_face_exec(bContext *C, wmOperator *op)
void MESH_OT_mark_freestyle_face(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mark Freestyle Face";
- ot->description= "(un)mark selected faces for exclusion from Freestyle feature edge detection";
- ot->idname= "MESH_OT_mark_freestyle_face";
+ ot->name = "Mark Freestyle Face";
+ ot->description = "(un)mark selected faces for exclusion from Freestyle feature edge detection";
+ ot->idname = "MESH_OT_mark_freestyle_face";
/* api callbacks */
- ot->exec= mark_freestyle_face_exec;
- ot->poll= ED_operator_editmesh;
+ ot->exec = edbm_mark_freestyle_face_exec;
+ ot->poll = ED_operator_editmesh;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "clear", 0, "Clear", "");
}
+
diff --git a/source/blender/editors/mesh/bmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index bee4d4283f6..bf37dbbea2e 100644
--- a/source/blender/editors/mesh/bmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -25,6 +25,10 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/editors/mesh/editmesh_utils.c
+ * \ingroup edmesh
+ */
+
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
@@ -212,7 +216,7 @@ int EDBM_CallAndSelectOpf(BMEditMesh *em, wmOperator *op, const char *selectslot
BM_mesh_elem_flag_disable_all(em->bm, BM_VERT|BM_EDGE|BM_FACE, BM_ELEM_SELECT);
- BMO_slot_buffer_hflag_enable(em->bm, &bmop, selectslot, BM_ELEM_SELECT, BM_ALL, TRUE);
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, selectslot, BM_ALL, BM_ELEM_SELECT, TRUE);
va_end(list);
return EDBM_FinishOp(em, &bmop, op, TRUE);
@@ -421,8 +425,8 @@ void EDBM_select_more(BMEditMesh *em)
"regionextend geom=%hvef constrict=%b use_faces=%b",
BM_ELEM_SELECT, FALSE, use_faces);
BMO_op_exec(em->bm, &bmop);
- /* dont flush selection in edge/vertex mode */
- BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ELEM_SELECT, BM_ALL, use_faces ? TRUE : FALSE);
+ /* don't flush selection in edge/vertex mode */
+ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ALL, BM_ELEM_SELECT, use_faces ? TRUE : FALSE);
BMO_op_finish(em->bm, &bmop);
EDBM_select_flush(em);
@@ -437,8 +441,8 @@ void EDBM_select_less(BMEditMesh *em)
"regionextend geom=%hvef constrict=%b use_faces=%b",
BM_ELEM_SELECT, TRUE, use_faces);
BMO_op_exec(em->bm, &bmop);
- /* dont flush selection in edge/vertex mode */
- BMO_slot_buffer_hflag_disable(em->bm, &bmop, "geomout", BM_ELEM_SELECT, BM_ALL, use_faces ? TRUE : FALSE);
+ /* don't flush selection in edge/vertex mode */
+ BMO_slot_buffer_hflag_disable(em->bm, &bmop, "geomout", BM_ALL, BM_ELEM_SELECT, use_faces ? TRUE : FALSE);
BMO_op_finish(em->bm, &bmop);
EDBM_selectmode_flush(em);
@@ -514,7 +518,7 @@ static void *editbtMesh_to_undoMesh(void *emv, void *obdata)
Mesh *obme = obdata;
undomesh *um = MEM_callocN(sizeof(undomesh), "undo Mesh");
- BLI_strncpy(um->obname, em->bm->ob->id.name + 2, sizeof(um->obname));
+ BLI_strncpy(um->obname, em->ob->id.name + 2, sizeof(um->obname));
/* make sure shape keys work */
um->me.key = obme->key ? copy_key_nolib(obme->key) : NULL;
@@ -527,6 +531,8 @@ static void *editbtMesh_to_undoMesh(void *emv, void *obdata)
#endif
+ /* BM_mesh_validate(em->bm); */ /* for troubleshooting */
+
BMO_op_callf(em->bm, "bmesh_to_mesh mesh=%p notessellation=%b", &um->me, TRUE);
um->selectmode = em->selectmode;
@@ -546,7 +552,7 @@ static void undoMesh_to_editbtMesh(void *umv, void *emv, void *UNUSED(obdata))
BMEdit_Free(em);
- bm = BM_mesh_create(ob, &bm_mesh_allocsize_default);
+ bm = BM_mesh_create(&bm_mesh_allocsize_default);
BMO_op_callf(bm, "mesh_to_bmesh mesh=%p object=%p set_shapekey=%b", &um->me, ob, FALSE);
em2 = BMEdit_Create(bm, TRUE);
@@ -560,7 +566,7 @@ static void undoMesh_to_editbtMesh(void *umv, void *emv, void *UNUSED(obdata))
static void free_undo(void *umv)
{
- if (((Mesh *)umv)->key) {
+ if (((Mesh *)umv)->key) {
free_key(((Mesh *)umv)->key);
MEM_freeN(((Mesh *)umv)->key);
}
@@ -572,6 +578,13 @@ static void free_undo(void *umv)
/* and this is all the undo system needs to know */
void undo_push_mesh(bContext *C, const char *name)
{
+ /* em->ob gets out of date and crashes on mesh undo,
+ * this is an easy way to ensure its OK
+ * though we could investigate the matter further. */
+ Object *obedit = CTX_data_edit_object(C);
+ BMEditMesh *em = BMEdit_FromObject(obedit);
+ em->ob = obedit;
+
undo_editmode_push(C, name, getEditMesh, free_undo, undoMesh_to_editbtMesh, editbtMesh_to_undoMesh, NULL);
}
@@ -616,8 +629,8 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a
return NULL;
}
- vmap->vert = (UvMapVert **)MEM_callocN(sizeof(*vmap->vert)*totverts, "UvMapVert_pt");
- buf = vmap->buf = (UvMapVert *)MEM_callocN(sizeof(*vmap->buf)*totuv, "UvMapVert");
+ vmap->vert = (UvMapVert **)MEM_callocN(sizeof(*vmap->vert) * totverts, "UvMapVert_pt");
+ buf = vmap->buf = (UvMapVert *)MEM_callocN(sizeof(*vmap->buf) * totuv, "UvMapVert");
if (!vmap->vert || !vmap->buf) {
free_uv_vert_map(vmap);
@@ -741,7 +754,7 @@ UvElementMap *EDBM_make_uv_element_map(BMEditMesh *em, int selected, int do_isla
totverts = em->bm->totvert;
totuv = 0;
- island_number = MEM_mallocN(sizeof(*stack)*em->bm->totface, "uv_island_number_face");
+ island_number = MEM_mallocN(sizeof(*stack) * em->bm->totface, "uv_island_number_face");
if (!island_number) {
return NULL;
}
@@ -841,9 +854,9 @@ UvElementMap *EDBM_make_uv_element_map(BMEditMesh *em, int selected, int do_isla
if (do_islands) {
/* map holds the map from current vmap->buf to the new, sorted map */
- map = MEM_mallocN(sizeof(*map)*totuv, "uvelement_remap");
- stack = MEM_mallocN(sizeof(*stack)*em->bm->totface, "uv_island_face_stack");
- islandbuf = MEM_callocN(sizeof(*islandbuf)*totuv, "uvelement_island_buffer");
+ map = MEM_mallocN(sizeof(*map) * totuv, "uvelement_remap");
+ stack = MEM_mallocN(sizeof(*stack) * em->bm->totface, "uv_island_face_stack");
+ islandbuf = MEM_callocN(sizeof(*islandbuf) * totuv, "uvelement_island_buffer");
/* at this point, every UvElement in vert points to a UvElement sharing the same vertex. Now we should sort uv's in islands. */
for (i = 0; i < totuv; i++) {
@@ -900,7 +913,7 @@ UvElementMap *EDBM_make_uv_element_map(BMEditMesh *em, int selected, int do_isla
element_map->vert[i] = &islandbuf[map[element_map->vert[i] - element_map->buf]];
}
- element_map->islandIndices = MEM_callocN(sizeof(*element_map->islandIndices)*nislands,"UvElementMap_island_indices");
+ element_map->islandIndices = MEM_callocN(sizeof(*element_map->islandIndices) * nislands, "UvElementMap_island_indices");
if (!element_map->islandIndices) {
MEM_freeN(islandbuf);
MEM_freeN(stack);
@@ -1142,3 +1155,119 @@ void EDBM_ApplyMirrorCache(BMEditMesh *em, const int sel_from, const int sel_to)
}
}
}
+
+
+/* swap is 0 or 1, if 1 it hides not selected */
+void EDBM_hide_mesh(BMEditMesh *em, int swap)
+{
+ BMIter iter;
+ BMElem *ele;
+ int itermode;
+
+ if (em == NULL) return;
+
+ if (em->selectmode & SCE_SELECT_VERTEX)
+ itermode = BM_VERTS_OF_MESH;
+ else if (em->selectmode & SCE_SELECT_EDGE)
+ itermode = BM_EDGES_OF_MESH;
+ else
+ itermode = BM_FACES_OF_MESH;
+
+ BM_ITER(ele, &iter, em->bm, itermode, NULL) {
+ if (BM_elem_flag_test(ele, BM_ELEM_SELECT) ^ swap)
+ BM_elem_hide_set(em->bm, ele, TRUE);
+ }
+
+ EDBM_selectmode_flush(em);
+
+ /* original hide flushing comment (OUTDATED):
+ * hide happens on least dominant select mode, and flushes up, not down! (helps preventing errors in subsurf) */
+ /* - vertex hidden, always means edge is hidden too
+ * - edge hidden, always means face is hidden too
+ * - face hidden, only set face hide
+ * - then only flush back down what's absolute hidden
+ */
+}
+
+
+void EDBM_reveal_mesh(BMEditMesh *em)
+{
+ const char iter_types[3] = {BM_VERTS_OF_MESH,
+ BM_EDGES_OF_MESH,
+ BM_FACES_OF_MESH};
+
+ int sels[3] = {(em->selectmode & SCE_SELECT_VERTEX),
+ (em->selectmode & SCE_SELECT_EDGE),
+ (em->selectmode & SCE_SELECT_FACE),
+ };
+
+ BMIter iter;
+ BMElem *ele;
+ int i;
+
+ /* Use tag flag to remember what was hidden before all is revealed.
+ * BM_ELEM_HIDDEN --> BM_ELEM_TAG */
+ for (i = 0; i < 3; i++) {
+ BM_ITER(ele, &iter, em->bm, iter_types[i], NULL) {
+ BM_elem_flag_set(ele, BM_ELEM_TAG, BM_elem_flag_test(ele, BM_ELEM_HIDDEN));
+ }
+ }
+
+ /* Reveal everything */
+ EDBM_flag_disable_all(em, BM_ELEM_HIDDEN);
+
+ /* Select relevant just-revealed elements */
+ for (i = 0; i < 3; i++) {
+ if (!sels[i]) {
+ continue;
+ }
+
+ BM_ITER(ele, &iter, em->bm, iter_types[i], NULL) {
+ if (BM_elem_flag_test(ele, BM_ELEM_TAG)) {
+ BM_elem_select_set(em->bm, ele, TRUE);
+ }
+ }
+ }
+
+ EDBM_selectmode_flush(em);
+}
+
+/* * Selection History ***************************************************** */
+/* these wrap equivalent bmesh functions. I'm in two minds of it we should
+ * just use the bm functions directly; on the one hand, there's no real
+ * need (at the moment) to wrap them, but on the other hand having these
+ * wrapped avoids a confusing mess of mixing BM_ and EDBM_ namespaces. */
+
+void EDBM_editselection_center(BMEditMesh *em, float *center, BMEditSelection *ese)
+{
+ BM_editselection_center(em->bm, center, ese);
+}
+
+void EDBM_editselection_normal(float *normal, BMEditSelection *ese)
+{
+ BM_editselection_normal(normal, ese);
+}
+
+/* Calculate a plane that is rightangles to the edge/vert/faces normal
+ * also make the plane run along an axis that is related to the geometry,
+ * because this is used for the manipulators Y axis. */
+void EDBM_editselection_plane(BMEditMesh *em, float *plane, BMEditSelection *ese)
+{
+ BM_editselection_plane(em->bm, plane, ese);
+}
+
+void EDBM_remove_selection(BMEditMesh *em, BMElem *ele)
+{
+ BM_select_history_remove(em->bm, ele);
+}
+
+void EDBM_store_selection(BMEditMesh *em, BMElem *ele)
+{
+ BM_select_history_store(em->bm, ele);
+}
+
+void EDBM_validate_selections(BMEditMesh *em)
+{
+ BM_select_history_validate(em->bm);
+}
+/* end select history */
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 428406ee3ee..770fd68079a 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -83,13 +83,26 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la
int type= layer->type;
int index;
int i, actindex, rndindex, cloneindex, stencilindex, tot;
-
+
if (layer->type == CD_MLOOPCOL || layer->type == CD_MLOOPUV) {
- data = (me->edit_btmesh)? &me->edit_btmesh->bm->ldata: &me->ldata;
- tot = me->totloop;
- } else {
- data = (me->edit_btmesh)? &me->edit_btmesh->bm->pdata: &me->pdata;
- tot = me->totpoly;
+ if (me->edit_btmesh) {
+ data = &me->edit_btmesh->bm->ldata;
+ tot = me->edit_btmesh->bm->totloop;
+ }
+ else {
+ data = &me->ldata;
+ tot = me->totloop;
+ }
+ }
+ else {
+ if (me->edit_btmesh) {
+ data = &me->edit_btmesh->bm->pdata;
+ tot = me->edit_btmesh->bm->totface;
+ }
+ else {
+ data = &me->pdata;
+ tot = me->totpoly;
+ }
}
index = CustomData_get_layer_index(data, type);
@@ -107,7 +120,7 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la
stencillayerdata = data->layers[CustomData_get_stencil_layer_index(data, type)].data;
CustomData_set_layer_active(data, type, layer - &data->layers[index]);
- if(me->edit_btmesh) {
+ if (me->edit_btmesh) {
BM_data_layer_free(me->edit_btmesh->bm, data, type);
}
else {
@@ -115,7 +128,7 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la
mesh_update_customdata_pointers(me, TRUE);
}
- if(!CustomData_has_layer(data, type) && (type == CD_MLOOPCOL && (ob->mode & OB_MODE_VERTEX_PAINT)))
+ if (!CustomData_has_layer(data, type) && (type == CD_MLOOPCOL && (ob->mode & OB_MODE_VERTEX_PAINT)))
ED_object_toggle_modes(C, OB_MODE_VERTEX_PAINT);
/* reconstruct active layer */
@@ -186,7 +199,7 @@ static void copy_editface_active_customdata(BMEditMesh *em, int type, int index)
EditFace *efa;
int n= CustomData_get_active_layer(&em->fdata, type);
- for(efa= em->faces.first; efa; efa= efa->next) {
+ for (efa= em->faces.first; efa; efa= efa->next) {
void *data= CustomData_em_get_n(&em->fdata, efa->data, type, n);
CustomData_em_set_n(&em->fdata, efa->data, type, index, data);
}
@@ -259,7 +272,8 @@ int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me)
fuvs[2][0] = 1.0;
fuvs[2][1] = 1.0;
- } else if (len == 4) {
+ }
+ else if (len == 4) {
fuvs[0][0] = 0.0;
fuvs[0][1] = 0.0;
@@ -272,7 +286,8 @@ int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me)
fuvs[3][0] = 0.0;
fuvs[3][1] = 1.0;
/*make sure we ignore 2-sided faces*/
- } else if (len > 2) {
+ }
+ else if (len > 2) {
float fac = 0.0f, dfac = 1.0f / (float)len;
dfac *= M_PI*2;
@@ -288,7 +303,7 @@ int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me)
fuvs += len;
}
- /* BMESH_TODO: Copy poly UVs onto CD_MTFACE layer for tesselated faces */
+ /* BMESH_TODO: Copy poly UVs onto CD_MTFACE layer for tessellated faces */
BLI_array_free(uvs);
BLI_array_free(polylengths);
@@ -327,7 +342,7 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s
CustomData_set_layer_name(&em->bm->ldata, CD_MLOOPUV, layernum, name);
CustomData_set_layer_active(&em->bm->ldata, CD_MLOOPUV, layernum);
- if(active_set || layernum == 0) {
+ if (active_set || layernum == 0) {
CustomData_set_layer_active(&em->bm->ldata, CD_MLOOPUV, layernum);
}
}
@@ -340,7 +355,8 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s
CustomData_add_layer_named(&me->pdata, CD_MTEXPOLY, CD_DUPLICATE, me->mtpoly, me->totpoly, name);
CustomData_add_layer_named(&me->ldata, CD_MLOOPUV, CD_DUPLICATE, me->mloopuv, me->totloop, name);
CustomData_add_layer_named(&me->fdata, CD_MTFACE, CD_DUPLICATE, me->mtface, me->totface, name);
- } else {
+ }
+ else {
CustomData_add_layer_named(&me->pdata, CD_MTEXPOLY, CD_DEFAULT, NULL, me->totpoly, name);
CustomData_add_layer_named(&me->ldata, CD_MLOOPUV, CD_DEFAULT, NULL, me->totloop, name);
CustomData_add_layer_named(&me->fdata, CD_MTFACE, CD_DEFAULT, NULL, me->totface, name);
@@ -401,12 +417,12 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes
return -1;
}
- BM_data_layer_add(em->bm, &em->bm->pdata, CD_MLOOPCOL);
+ BM_data_layer_add(em->bm, &em->bm->ldata, CD_MLOOPCOL);
CustomData_set_layer_active(&em->bm->ldata, CD_MLOOPCOL, layernum);
/* copy data from active vertex color layer */
if (layernum) {
- copy_editface_active_customdata(em, CD_MCOL, layernum);
+ copy_editface_active_customdata(em, CD_MLOOPCOL, layernum);
}
if (active_set || layernum == 0) {
@@ -419,16 +435,16 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes
return -1;
}
- if(me->mloopcol) {
+ if (me->mloopcol) {
CustomData_add_layer_named(&me->ldata, CD_MLOOPCOL, CD_DUPLICATE, me->mloopcol, me->totloop, name);
- CustomData_add_layer_named(&me->fdata, CD_MCOL, CD_DUPLICATE, me->mloopcol, me->totface, name);
+ CustomData_add_layer_named(&me->fdata, CD_MCOL, CD_DUPLICATE, me->mcol, me->totface, name);
}
else {
CustomData_add_layer_named(&me->ldata, CD_MLOOPCOL, CD_DEFAULT, NULL, me->totloop, name);
CustomData_add_layer_named(&me->fdata, CD_MCOL, CD_DEFAULT, NULL, me->totface, name);
}
- if(active_set || layernum==0) {
+ if (active_set || layernum==0) {
CustomData_set_layer_active(&me->ldata, CD_MLOOPCOL, layernum);
CustomData_set_layer_active(&me->fdata, CD_MCOL, layernum);
}
@@ -444,13 +460,14 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes
int ED_mesh_color_remove(bContext *C, Object *ob, Mesh *me)
{
+ CustomData *ldata = GET_CD_DATA(me, ldata);
CustomDataLayer *cdl;
int index;
- index= CustomData_get_active_layer_index(&me->ldata, CD_MLOOPCOL);
- cdl= (index == -1)? NULL: &me->ldata.layers[index];
+ index= CustomData_get_active_layer_index(ldata, CD_MLOOPCOL);
+ cdl= (index == -1)? NULL: &ldata->layers[index];
- if(!cdl)
+ if (!cdl)
return 0;
delete_customdata_layer(C, ob, cdl);
@@ -462,13 +479,14 @@ int ED_mesh_color_remove(bContext *C, Object *ob, Mesh *me)
int ED_mesh_color_remove_named(bContext *C, Object *ob, Mesh *me, const char *name)
{
+ CustomData *ldata = GET_CD_DATA(me, ldata);
CustomDataLayer *cdl;
int index;
- index= CustomData_get_named_layer_index(&me->ldata, CD_MLOOPCOL, name);
- cdl= (index == -1)? NULL: &me->ldata.layers[index];
+ index= CustomData_get_named_layer_index(ldata, CD_MLOOPCOL, name);
+ cdl = (index == -1) ? NULL : &ldata->layers[index];
- if(!cdl)
+ if (!cdl)
return 0;
delete_customdata_layer(C, ob, cdl);
@@ -487,12 +505,12 @@ static int layers_poll(bContext *C)
return (ob && !ob->id.lib && ob->type==OB_MESH && data && !data->lib);
}
-static int uv_texture_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int mesh_uv_texture_add_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= ED_object_context(C);
Mesh *me= ob->data;
- if(ED_mesh_uv_texture_add(C, me, NULL, TRUE) == -1)
+ if (ED_mesh_uv_texture_add(C, me, NULL, TRUE) == -1)
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
@@ -501,16 +519,16 @@ static int uv_texture_add_exec(bContext *C, wmOperator *UNUSED(op))
void MESH_OT_uv_texture_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add UV Map";
- ot->description= "Add UV Map";
- ot->idname= "MESH_OT_uv_texture_add";
+ ot->name = "Add UV Map";
+ ot->description = "Add UV Map";
+ ot->idname = "MESH_OT_uv_texture_add";
/* api callbacks */
- ot->poll= layers_poll;
- ot->exec= uv_texture_add_exec;
+ ot->poll = layers_poll;
+ ot->exec = mesh_uv_texture_add_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event)
@@ -526,13 +544,13 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event)
char name[MAX_ID_NAME-2];
/* Check context */
- if(base==NULL || base->object->type!=OB_MESH) {
+ if (base==NULL || base->object->type!=OB_MESH) {
BKE_report(op->reports, RPT_ERROR, "Not an Object or Mesh");
return OPERATOR_CANCELLED;
}
/* check input variables */
- if(RNA_struct_property_is_set(op->ptr, "filepath")) {
+ if (RNA_struct_property_is_set(op->ptr, "filepath")) {
char path[FILE_MAX];
RNA_string_get(op->ptr, "filepath", path);
@@ -543,7 +561,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event)
ima= (Image *)find_id("IM", name);
}
- if(!ima) {
+ if (!ima) {
BKE_report(op->reports, RPT_ERROR, "Not an Image");
return OPERATOR_CANCELLED;
}
@@ -552,16 +570,16 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event)
obedit= base->object;
me= obedit->data;
- if(me->edit_btmesh==NULL) {
+ if (me->edit_btmesh==NULL) {
EDBM_MakeEditBMesh(scene->toolsettings, scene, obedit);
exitmode= 1;
}
- if(me->edit_btmesh==NULL)
+ if (me->edit_btmesh==NULL)
return OPERATOR_CANCELLED;
ED_uvedit_assign_image(bmain, scene, obedit, ima, NULL);
- if(exitmode) {
+ if (exitmode) {
EDBM_LoadEditBMesh(scene, obedit);
EDBM_FreeEditBMesh(me->edit_btmesh);
MEM_freeN(me->edit_btmesh);
@@ -573,7 +591,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
/* dummie drop support; ensure view shows a result :) */
- if(v3d)
+ if (v3d)
v3d->flag2 |= V3D_SOLID_TEX;
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
@@ -584,28 +602,28 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event)
void MESH_OT_drop_named_image(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Assign Image to UV Map";
- ot->description= "Assign Image to active UV Map, or create an UV Map";
- ot->idname= "MESH_OT_drop_named_image";
+ ot->name = "Assign Image to UV Map";
+ ot->description = "Assign Image to active UV Map, or create an UV Map";
+ ot->idname = "MESH_OT_drop_named_image";
/* api callbacks */
- ot->poll= layers_poll;
- ot->invoke= drop_named_image_invoke;
+ ot->poll = layers_poll;
+ ot->invoke = drop_named_image_invoke;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
RNA_def_string(ot->srna, "name", "Image", MAX_ID_NAME-2, "Name", "Image name to assign");
RNA_def_string(ot->srna, "filepath", "Path", FILE_MAX, "Filepath", "Path to image file");
}
-static int uv_texture_remove_exec(bContext *C, wmOperator *UNUSED(op))
+static int mesh_uv_texture_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= ED_object_context(C);
Mesh *me= ob->data;
- if(!ED_mesh_uv_texture_remove(C, ob, me))
+ if (!ED_mesh_uv_texture_remove(C, ob, me))
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
@@ -614,27 +632,27 @@ static int uv_texture_remove_exec(bContext *C, wmOperator *UNUSED(op))
void MESH_OT_uv_texture_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove UV Map";
- ot->description= "Remove UV Map";
- ot->idname= "MESH_OT_uv_texture_remove";
+ ot->name = "Remove UV Map";
+ ot->description = "Remove UV Map";
+ ot->idname = "MESH_OT_uv_texture_remove";
/* api callbacks */
- ot->poll= layers_poll;
- ot->exec= uv_texture_remove_exec;
+ ot->poll = layers_poll;
+ ot->exec = mesh_uv_texture_remove_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/*********************** vertex color operators ************************/
-static int vertex_color_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int mesh_vertex_color_add_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
Object *ob= ED_object_context(C);
Mesh *me= ob->data;
- if(ED_mesh_color_add(C, scene, ob, me, NULL, TRUE) == -1)
+ if (ED_mesh_color_add(C, scene, ob, me, NULL, TRUE) == -1)
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
@@ -643,24 +661,24 @@ static int vertex_color_add_exec(bContext *C, wmOperator *UNUSED(op))
void MESH_OT_vertex_color_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Vertex Color";
- ot->description= "Add vertex color layer";
- ot->idname= "MESH_OT_vertex_color_add";
+ ot->name = "Add Vertex Color";
+ ot->description = "Add vertex color layer";
+ ot->idname = "MESH_OT_vertex_color_add";
/* api callbacks */
- ot->poll= layers_poll;
- ot->exec= vertex_color_add_exec;
+ ot->poll = layers_poll;
+ ot->exec = mesh_vertex_color_add_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int vertex_color_remove_exec(bContext *C, wmOperator *UNUSED(op))
+static int mesh_vertex_color_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= ED_object_context(C);
Mesh *me= ob->data;
- if(!ED_mesh_color_remove(C, ob, me))
+ if (!ED_mesh_color_remove(C, ob, me))
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
@@ -669,21 +687,21 @@ static int vertex_color_remove_exec(bContext *C, wmOperator *UNUSED(op))
void MESH_OT_vertex_color_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Vertex Color";
- ot->description= "Remove vertex color layer";
- ot->idname= "MESH_OT_vertex_color_remove";
+ ot->name = "Remove Vertex Color";
+ ot->description = "Remove vertex color layer";
+ ot->idname = "MESH_OT_vertex_color_remove";
/* api callbacks */
- ot->exec= vertex_color_remove_exec;
- ot->poll= layers_poll;
+ ot->exec = mesh_vertex_color_remove_exec;
+ ot->poll = layers_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/*********************** sticky operators ************************/
-static int sticky_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int mesh_sticky_add_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
View3D *v3d= CTX_wm_view3d(C);
@@ -692,7 +710,7 @@ static int sticky_add_exec(bContext *C, wmOperator *UNUSED(op))
/* why is this commented out? */
#if 0
- if(me->msticky)
+ if (me->msticky)
return OPERATOR_CANCELLED;
#endif
@@ -707,24 +725,24 @@ static int sticky_add_exec(bContext *C, wmOperator *UNUSED(op))
void MESH_OT_sticky_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Sticky";
- ot->description= "Add sticky UV texture layer";
- ot->idname= "MESH_OT_sticky_add";
+ ot->name = "Add Sticky";
+ ot->description = "Add sticky UV texture layer";
+ ot->idname = "MESH_OT_sticky_add";
/* api callbacks */
- ot->poll= layers_poll;
- ot->exec= sticky_add_exec;
+ ot->poll = layers_poll;
+ ot->exec = mesh_sticky_add_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int sticky_remove_exec(bContext *C, wmOperator *UNUSED(op))
+static int mesh_sticky_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= ED_object_context(C);
Mesh *me= ob->data;
- if(!me->msticky)
+ if (!me->msticky)
return OPERATOR_CANCELLED;
CustomData_free_layer_active(&me->vdata, CD_MSTICKY, me->totvert);
@@ -739,16 +757,16 @@ static int sticky_remove_exec(bContext *C, wmOperator *UNUSED(op))
void MESH_OT_sticky_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Sticky";
- ot->description= "Remove sticky UV texture layer";
- ot->idname= "MESH_OT_sticky_remove";
+ ot->name = "Remove Sticky";
+ ot->description = "Remove sticky UV texture layer";
+ ot->idname = "MESH_OT_sticky_remove";
/* api callbacks */
- ot->poll= layers_poll;
- ot->exec= sticky_remove_exec;
+ ot->poll = layers_poll;
+ ot->exec = mesh_sticky_remove_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************** Add Geometry Layers *************************/
@@ -757,22 +775,25 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges, int calc_tessface)
{
int *polyindex = NULL;
float (*face_nors)[3];
+ int tessface_input = FALSE;
- if(mesh->totface > 0 && mesh->totpoly == 0) {
+ if (mesh->totface > 0 && mesh->totpoly == 0) {
convert_mfaces_to_mpolys(mesh);
- /* would only be converting back again, dont bother */
- calc_tessface = FALSE;
+ /* would only be converting back again, don't bother */
+ tessface_input = TRUE;
/* it also happens that converting the faces calculates edges, skip this */
calc_edges = FALSE;
}
- if(calc_edges || (mesh->totpoly && mesh->totedge == 0))
+ if (calc_edges || (mesh->totpoly && mesh->totedge == 0))
BKE_mesh_calc_edges(mesh, calc_edges);
if (calc_tessface) {
- BKE_mesh_tessface_calc(mesh);
+ if (tessface_input == FALSE) {
+ BKE_mesh_tessface_calc(mesh);
+ }
}
else {
/* default state is not to have tessface's so make sure this is the case */
@@ -784,8 +805,8 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges, int calc_tessface)
* calculate normals only for the mvert's. - campbell */
#ifdef USE_BMESH_MPOLY_NORMALS
polyindex = CustomData_get_layer(&mesh->fdata, CD_POLYINDEX);
- /* add a normals layer for tesselated faces, a tessface normal will
- * contain the normal of the poly the face was tesselated from. */
+ /* add a normals layer for tessellated faces, a tessface normal will
+ * contain the normal of the poly the face was tessellated from. */
face_nors = CustomData_add_layer(&mesh->fdata, CD_NORMAL, CD_CALLOC, NULL, mesh->totface);
mesh_calc_normals_mapping_ex(mesh->mvert, mesh->totvert,
@@ -812,14 +833,14 @@ static void mesh_add_verts(Mesh *mesh, int len)
MVert *mvert;
int i, totvert;
- if(len == 0)
+ if (len == 0)
return;
totvert= mesh->totvert + len;
CustomData_copy(&mesh->vdata, &vdata, CD_MASK_MESH, CD_DEFAULT, totvert);
CustomData_copy_data(&mesh->vdata, &vdata, 0, 0, mesh->totvert);
- if(!CustomData_has_layer(&vdata, CD_MVERT))
+ if (!CustomData_has_layer(&vdata, CD_MVERT))
CustomData_add_layer(&vdata, CD_MVERT, CD_CALLOC, NULL, totvert);
CustomData_free(&mesh->vdata, mesh->totvert);
@@ -829,7 +850,7 @@ static void mesh_add_verts(Mesh *mesh, int len)
/* scan the input list and insert the new vertices */
mvert= &mesh->mvert[mesh->totvert];
- for(i=0; i<len; i++, mvert++)
+ for (i=0; i<len; i++, mvert++)
mvert->flag |= SELECT;
/* set final vertex list size */
@@ -841,7 +862,7 @@ void ED_mesh_transform(Mesh *me, float *mat)
int i;
MVert *mvert= me->mvert;
- for(i= 0; i < me->totvert; i++, mvert++)
+ for (i= 0; i < me->totvert; i++, mvert++)
mul_m4_v3((float (*)[4])mat, mvert->co);
mesh_calc_normals_mapping(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL, NULL, 0, NULL, NULL);
@@ -853,7 +874,7 @@ static void mesh_add_edges(Mesh *mesh, int len)
MEdge *medge;
int i, totedge;
- if(len == 0)
+ if (len == 0)
return;
totedge= mesh->totedge+len;
@@ -862,16 +883,16 @@ static void mesh_add_edges(Mesh *mesh, int len)
CustomData_copy(&mesh->edata, &edata, CD_MASK_MESH, CD_DEFAULT, totedge);
CustomData_copy_data(&mesh->edata, &edata, 0, 0, mesh->totedge);
- if(!CustomData_has_layer(&edata, CD_MEDGE))
+ if (!CustomData_has_layer(&edata, CD_MEDGE))
CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge);
CustomData_free(&mesh->edata, mesh->totedge);
mesh->edata= edata;
- mesh_update_customdata_pointers(mesh, FALSE); /* new edges dont change tessellation */
+ mesh_update_customdata_pointers(mesh, FALSE); /* new edges don't change tessellation */
/* set default flags */
medge= &mesh->medge[mesh->totedge];
- for(i=0; i<len; i++, medge++)
+ for (i=0; i<len; i++, medge++)
medge->flag= ME_EDGEDRAW|ME_EDGERENDER|SELECT;
mesh->totedge= totedge;
@@ -883,7 +904,7 @@ static void mesh_add_faces(Mesh *mesh, int len)
MFace *mface;
int i, totface;
- if(len == 0)
+ if (len == 0)
return;
totface= mesh->totface + len; /* new face count */
@@ -892,7 +913,7 @@ static void mesh_add_faces(Mesh *mesh, int len)
CustomData_copy(&mesh->fdata, &fdata, CD_MASK_MESH, CD_DEFAULT, totface);
CustomData_copy_data(&mesh->fdata, &fdata, 0, 0, mesh->totface);
- if(!CustomData_has_layer(&fdata, CD_MFACE))
+ if (!CustomData_has_layer(&fdata, CD_MFACE))
CustomData_add_layer(&fdata, CD_MFACE, CD_CALLOC, NULL, totface);
CustomData_free(&mesh->fdata, mesh->totface);
@@ -901,7 +922,7 @@ static void mesh_add_faces(Mesh *mesh, int len)
/* set default flags */
mface= &mesh->mface[mesh->totface];
- for(i=0; i<len; i++, mface++)
+ for (i=0; i<len; i++, mface++)
mface->flag= ME_FACE_SEL;
mesh->totface= totface;
@@ -912,7 +933,7 @@ static void mesh_add_loops(Mesh *mesh, int len)
CustomData ldata;
int totloop;
- if(len == 0)
+ if (len == 0)
return;
totloop= mesh->totloop + len; /* new face count */
@@ -921,7 +942,7 @@ static void mesh_add_loops(Mesh *mesh, int len)
CustomData_copy(&mesh->ldata, &ldata, CD_MASK_MESH, CD_DEFAULT, totloop);
CustomData_copy_data(&mesh->ldata, &ldata, 0, 0, mesh->totloop);
- if(!CustomData_has_layer(&ldata, CD_MLOOP))
+ if (!CustomData_has_layer(&ldata, CD_MLOOP))
CustomData_add_layer(&ldata, CD_MLOOP, CD_CALLOC, NULL, totloop);
CustomData_free(&mesh->ldata, mesh->totloop);
@@ -937,7 +958,7 @@ static void mesh_add_polys(Mesh *mesh, int len)
MPoly *mpoly;
int i, totpoly;
- if(len == 0)
+ if (len == 0)
return;
totpoly= mesh->totpoly + len; /* new face count */
@@ -946,7 +967,7 @@ static void mesh_add_polys(Mesh *mesh, int len)
CustomData_copy(&mesh->pdata, &pdata, CD_MASK_MESH, CD_DEFAULT, totpoly);
CustomData_copy_data(&mesh->pdata, &pdata, 0, 0, mesh->totpoly);
- if(!CustomData_has_layer(&pdata, CD_MPOLY))
+ if (!CustomData_has_layer(&pdata, CD_MPOLY))
CustomData_add_layer(&pdata, CD_MPOLY, CD_CALLOC, NULL, totpoly);
CustomData_free(&mesh->pdata, mesh->totpoly);
@@ -955,7 +976,7 @@ static void mesh_add_polys(Mesh *mesh, int len)
/* set default flags */
mpoly= &mesh->mpoly[mesh->totpoly];
- for(i=0; i<len; i++, mpoly++)
+ for (i=0; i<len; i++, mpoly++)
mpoly->flag= ME_FACE_SEL;
mesh->totpoly= totpoly;
@@ -965,7 +986,7 @@ static void mesh_remove_verts(Mesh *mesh, int len)
{
int totvert;
- if(len == 0)
+ if (len == 0)
return;
totvert= mesh->totvert - len;
@@ -979,7 +1000,7 @@ static void mesh_remove_edges(Mesh *mesh, int len)
{
int totedge;
- if(len == 0)
+ if (len == 0)
return;
totedge= mesh->totedge - len;
@@ -992,7 +1013,7 @@ static void mesh_remove_faces(Mesh *mesh, int len)
{
int totface;
- if(len == 0)
+ if (len == 0)
return;
totface= mesh->totface - len; /* new face count */
@@ -1004,23 +1025,23 @@ static void mesh_remove_faces(Mesh *mesh, int len)
#if 0
void ED_mesh_geometry_add(Mesh *mesh, ReportList *reports, int verts, int edges, int faces)
{
- if(mesh->edit_btmesh) {
+ if (mesh->edit_btmesh) {
BKE_report(reports, RPT_ERROR, "Can't add geometry in edit mode");
return;
}
- if(verts)
+ if (verts)
mesh_add_verts(mesh, verts);
- if(edges)
+ if (edges)
mesh_add_edges(mesh, edges);
- if(faces)
+ if (faces)
mesh_add_faces(mesh, faces);
}
#endif
void ED_mesh_faces_add(Mesh *mesh, ReportList *reports, int count)
{
- if(mesh->edit_btmesh) {
+ if (mesh->edit_btmesh) {
BKE_report(reports, RPT_ERROR, "Can't add faces in edit mode");
return;
}
@@ -1030,7 +1051,7 @@ void ED_mesh_faces_add(Mesh *mesh, ReportList *reports, int count)
void ED_mesh_edges_add(Mesh *mesh, ReportList *reports, int count)
{
- if(mesh->edit_btmesh) {
+ if (mesh->edit_btmesh) {
BKE_report(reports, RPT_ERROR, "Can't add edges in edit mode");
return;
}
@@ -1040,7 +1061,7 @@ void ED_mesh_edges_add(Mesh *mesh, ReportList *reports, int count)
void ED_mesh_vertices_add(Mesh *mesh, ReportList *reports, int count)
{
- if(mesh->edit_btmesh) {
+ if (mesh->edit_btmesh) {
BKE_report(reports, RPT_ERROR, "Can't add vertices in edit mode");
return;
}
@@ -1050,11 +1071,11 @@ void ED_mesh_vertices_add(Mesh *mesh, ReportList *reports, int count)
void ED_mesh_faces_remove(Mesh *mesh, ReportList *reports, int count)
{
- if(mesh->edit_btmesh) {
+ if (mesh->edit_btmesh) {
BKE_report(reports, RPT_ERROR, "Can't remove faces in edit mode");
return;
}
- else if(count > mesh->totface) {
+ else if (count > mesh->totface) {
BKE_report(reports, RPT_ERROR, "Can't remove more faces than the mesh contains");
return;
}
@@ -1064,11 +1085,11 @@ void ED_mesh_faces_remove(Mesh *mesh, ReportList *reports, int count)
void ED_mesh_edges_remove(Mesh *mesh, ReportList *reports, int count)
{
- if(mesh->edit_btmesh) {
+ if (mesh->edit_btmesh) {
BKE_report(reports, RPT_ERROR, "Can't remove edges in edit mode");
return;
}
- else if(count > mesh->totedge) {
+ else if (count > mesh->totedge) {
BKE_report(reports, RPT_ERROR, "Can't remove more edges than the mesh contains");
return;
}
@@ -1078,11 +1099,11 @@ void ED_mesh_edges_remove(Mesh *mesh, ReportList *reports, int count)
void ED_mesh_vertices_remove(Mesh *mesh, ReportList *reports, int count)
{
- if(mesh->edit_btmesh) {
+ if (mesh->edit_btmesh) {
BKE_report(reports, RPT_ERROR, "Can't remove vertices in edit mode");
return;
}
- else if(count > mesh->totvert) {
+ else if (count > mesh->totvert) {
BKE_report(reports, RPT_ERROR, "Can't remove more vertices than the mesh contains");
return;
}
@@ -1092,7 +1113,7 @@ void ED_mesh_vertices_remove(Mesh *mesh, ReportList *reports, int count)
void ED_mesh_loops_add(Mesh *mesh, ReportList *reports, int count)
{
- if(mesh->edit_btmesh) {
+ if (mesh->edit_btmesh) {
BKE_report(reports, RPT_ERROR, "Can't add loops in edit mode.");
return;
}
@@ -1102,7 +1123,7 @@ void ED_mesh_loops_add(Mesh *mesh, ReportList *reports, int count)
void ED_mesh_polys_add(Mesh *mesh, ReportList *reports, int count)
{
- if(mesh->edit_btmesh) {
+ if (mesh->edit_btmesh) {
BKE_report(reports, RPT_ERROR, "Can't add polys in edit mode.");
return;
}
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index 4d3aec1757e..fe5ab4d554e 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -156,6 +156,7 @@ void MESH_OT_fill(struct wmOperatorType *ot);
void MESH_OT_beautify_fill(struct wmOperatorType *ot);
void MESH_OT_quads_convert_to_tris(struct wmOperatorType *ot);
void MESH_OT_tris_convert_to_quads(struct wmOperatorType *ot);
+void MESH_OT_dissolve(struct wmOperatorType *ot);
void MESH_OT_dissolve_limited(struct wmOperatorType *ot);
void MESH_OT_faces_shade_smooth(struct wmOperatorType *ot);
void MESH_OT_faces_shade_flat(struct wmOperatorType *ot);
@@ -176,6 +177,8 @@ void MESH_OT_colors_rotate(struct wmOperatorType *ot);
void MESH_OT_colors_reverse(struct wmOperatorType *ot);
void MESH_OT_delete(struct wmOperatorType *ot);
+void MESH_OT_edge_collapse(struct wmOperatorType *ot);
+void MESH_OT_edge_collapse_loop(struct wmOperatorType *ot);
void MESH_OT_rip(struct wmOperatorType *ot);
void MESH_OT_shape_propagate_to_all(struct wmOperatorType *ot);
@@ -200,7 +203,6 @@ void MESH_OT_extrude_region(struct wmOperatorType *ot);
void MESH_OT_extrude_verts_indiv(struct wmOperatorType *ot);
void MESH_OT_extrude_edges_indiv(struct wmOperatorType *ot);
void MESH_OT_extrude_faces_indiv(struct wmOperatorType *ot);
-void MESH_OT_bm_test(struct wmOperatorType *ot);
void MESH_OT_edgering_select(struct wmOperatorType *ot);
void MESH_OT_loopcut(struct wmOperatorType *ot);
@@ -209,6 +211,7 @@ void MESH_OT_knifetool(struct wmOperatorType *ot);
void MESH_OT_bevel(struct wmOperatorType *ot);
void MESH_OT_bridge_edge_loops(struct wmOperatorType *ot);
+void MESH_OT_inset(struct wmOperatorType *ot);
/* ******************* mesh_navmesh.c */
void MESH_OT_navmesh_make(struct wmOperatorType *ot);
diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c
index 38d632ffaee..02ef1540cc1 100644
--- a/source/blender/editors/mesh/mesh_navmesh.c
+++ b/source/blender/editors/mesh/mesh_navmesh.c
@@ -37,6 +37,11 @@
#include "DNA_modifier_types.h"
#include "DNA_ID.h"
+#include "BLI_listbase.h"
+#include "BLI_utildefines.h"
+#include "BLI_math_vector.h"
+#include "BLI_linklist.h"
+
#include "BKE_library.h"
#include "BKE_depsgraph.h"
#include "BKE_context.h"
@@ -49,11 +54,6 @@
#include "BKE_report.h"
#include "BKE_tessmesh.h"
-#include "BLI_listbase.h"
-#include "BLI_utildefines.h"
-#include "BLI_math_vector.h"
-#include "BLI_linklist.h"
-
#include "ED_object.h"
#include "ED_mesh.h"
#include "ED_screen.h"
@@ -66,26 +66,26 @@
#include "mesh_intern.h"
#include "recast-capi.h"
-static void createVertsTrisData(bContext *C, LinkNode* obs, int *nverts_r, float **verts_r, int *ntris_r, int **tris_r)
+static void createVertsTrisData(bContext *C, LinkNode *obs, int *nverts_r, float **verts_r, int *ntris_r, int **tris_r)
{
MVert *mvert;
- int nfaces= 0, *tri, i, curnverts, basenverts, curnfaces;
+ int nfaces = 0, *tri, i, curnverts, basenverts, curnfaces;
MFace *mface;
float co[3], wco[3];
Object *ob;
LinkNode *oblink, *dmlink;
DerivedMesh *dm;
- Scene* scene= CTX_data_scene(C);
- LinkNode* dms= NULL;
+ Scene *scene = CTX_data_scene(C);
+ LinkNode *dms = NULL;
int nverts, ntris, *tris;
float *verts;
- nverts= 0;
- ntris= 0;
+ nverts = 0;
+ ntris = 0;
/* calculate number of verts and tris */
- for(oblink= obs; oblink; oblink= oblink->next) {
+ for (oblink = obs; oblink; oblink= oblink->next) {
ob= (Object*) oblink->link;
dm= mesh_create_derived_no_virtual(scene, ob, NULL, CD_MASK_MESH);
BLI_linklist_append(&dms, (void*)dm);
@@ -96,9 +96,9 @@ static void createVertsTrisData(bContext *C, LinkNode* obs, int *nverts_r, float
/* resolve quad faces */
mface= dm->getTessFaceArray(dm);
- for(i= 0; i<nfaces; i++) {
- MFace* mf= &mface[i];
- if(mf->v4)
+ for (i= 0; i<nfaces; i++) {
+ MFace *mf= &mface[i];
+ if (mf->v4)
ntris+=1;
}
}
@@ -109,7 +109,7 @@ static void createVertsTrisData(bContext *C, LinkNode* obs, int *nverts_r, float
basenverts= 0;
tri= tris;
- for(oblink= obs, dmlink= dms; oblink && dmlink;
+ for (oblink= obs, dmlink= dms; oblink && dmlink;
oblink= oblink->next, dmlink= dmlink->next) {
ob= (Object*) oblink->link;
dm= (DerivedMesh*) dmlink->link;
@@ -118,7 +118,7 @@ static void createVertsTrisData(bContext *C, LinkNode* obs, int *nverts_r, float
mvert= dm->getVertArray(dm);
/* copy verts */
- for(i= 0; i<curnverts; i++) {
+ for (i= 0; i<curnverts; i++) {
MVert *v= &mvert[i];
copy_v3_v3(co, v->co);
@@ -133,15 +133,15 @@ static void createVertsTrisData(bContext *C, LinkNode* obs, int *nverts_r, float
curnfaces= dm->getNumTessFaces(dm);
mface= dm->getTessFaceArray(dm);
- for(i= 0; i<curnfaces; i++) {
- MFace* mf= &mface[i];
+ for (i= 0; i<curnfaces; i++) {
+ MFace *mf= &mface[i];
tri[0]= basenverts + mf->v1;
tri[1]= basenverts + mf->v3;
tri[2]= basenverts + mf->v2;
tri += 3;
- if(mf->v4) {
+ if (mf->v4) {
tri[0]= basenverts + mf->v1;
tri[1]= basenverts + mf->v4;
tri[2]= basenverts + mf->v3;
@@ -153,7 +153,7 @@ static void createVertsTrisData(bContext *C, LinkNode* obs, int *nverts_r, float
}
/* release derived mesh */
- for(dmlink= dms; dmlink; dmlink= dmlink->next) {
+ for (dmlink= dms; dmlink; dmlink= dmlink->next) {
dm= (DerivedMesh*) dmlink->link;
dm->release(dm);
}
@@ -172,7 +172,7 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts
float bmin[3], bmax[3];
struct recast_heightfield *solid;
unsigned char *triflags;
- struct recast_compactHeightfield* chf;
+ struct recast_compactHeightfield *chf;
struct recast_contourSet *cset;
int width, height, walkableHeight, walkableClimb, walkableRadius;
int minRegionArea, mergeRegionArea, maxEdgeLen;
@@ -198,7 +198,7 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts
/* Allocate voxel heightfield where we rasterize our input data to */
solid= recast_newHeightfield();
- if(!recast_createHeightfield(solid, width, height, bmin, bmax, recastParams->cellsize, recastParams->cellheight)) {
+ if (!recast_createHeightfield(solid, width, height, bmin, bmax, recastParams->cellsize, recastParams->cellheight)) {
recast_destroyHeightfield(solid);
return 0;
@@ -220,7 +220,7 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts
/* ** Step 4: Partition walkable surface to simple regions ** */
chf= recast_newCompactHeightfield();
- if(!recast_buildCompactHeightfield(walkableHeight, walkableClimb, solid, chf)) {
+ if (!recast_buildCompactHeightfield(walkableHeight, walkableClimb, solid, chf)) {
recast_destroyHeightfield(solid);
recast_destroyCompactHeightfield(chf);
@@ -237,14 +237,14 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts
}
/* Prepare for region partitioning, by calculating distance field along the walkable surface */
- if(!recast_buildDistanceField(chf)) {
+ if (!recast_buildDistanceField(chf)) {
recast_destroyCompactHeightfield(chf);
return 0;
}
/* Partition the walkable surface into simple regions without holes */
- if(!recast_buildRegions(chf, 0, minRegionArea, mergeRegionArea)) {
+ if (!recast_buildRegions(chf, 0, minRegionArea, mergeRegionArea)) {
recast_destroyCompactHeightfield(chf);
return 0;
@@ -254,7 +254,7 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts
/* Create contours */
cset= recast_newContourSet();
- if(!recast_buildContours(chf, recastParams->edgemaxerror, maxEdgeLen, cset)) {
+ if (!recast_buildContours(chf, recastParams->edgemaxerror, maxEdgeLen, cset)) {
recast_destroyCompactHeightfield(chf);
recast_destroyContourSet(cset);
@@ -263,7 +263,7 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts
/* ** Step 6: Build polygons mesh from contours ** */
*pmesh= recast_newPolyMesh();
- if(!recast_buildPolyMesh(cset, recastParams->vertsperpoly, *pmesh)) {
+ if (!recast_buildPolyMesh(cset, recastParams->vertsperpoly, *pmesh)) {
recast_destroyCompactHeightfield(chf);
recast_destroyContourSet(cset);
recast_destroyPolyMesh(*pmesh);
@@ -275,7 +275,7 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts
/* ** Step 7: Create detail mesh which allows to access approximate height on each polygon ** */
*dmesh= recast_newPolyMeshDetail();
- if(!recast_buildPolyMeshDetail(*pmesh, chf, detailSampleDist, detailSampleMaxError, *dmesh)) {
+ if (!recast_buildPolyMeshDetail(*pmesh, chf, detailSampleDist, detailSampleMaxError, *dmesh)) {
recast_destroyCompactHeightfield(chf);
recast_destroyContourSet(cset);
recast_destroyPolyMesh(*pmesh);
@@ -290,15 +290,15 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts
return 1;
}
-static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh, struct recast_polyMeshDetail *dmesh, Base* base)
+static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, struct recast_polyMeshDetail *dmesh, Base *base)
{
float co[3], rot[3];
BMEditMesh *em;
int i,j, k;
- unsigned short* v;
+ unsigned short *v;
int face[3];
Scene *scene= CTX_data_scene(C);
- Object* obedit;
+ Object *obedit;
int createob= base==NULL;
int nverts, nmeshes, nvp;
unsigned short *verts, *polys;
@@ -309,7 +309,7 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
zero_v3(co);
zero_v3(rot);
- if(createob) {
+ if (createob) {
/* create new object */
obedit= ED_object_add_type(C, OB_MESH, co, rot, FALSE, 1);
}
@@ -323,7 +323,7 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
ED_object_enter_editmode(C, EM_DO_UNDO|EM_IGNORE_LAYER);
em = BMEdit_FromObject(obedit);
- if(!createob) {
+ if (!createob) {
/* clear */
EDBM_ClearMesh(em);
}
@@ -333,7 +333,7 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
recast_polyMeshGetBoundbox(pmesh, bmin, NULL);
recast_polyMeshGetCell(pmesh, &cs, &ch);
- for(i= 0; i<nverts; i++) {
+ for (i= 0; i<nverts; i++) {
v= &verts[3*i];
co[0]= bmin[0] + v[0]*cs;
co[1]= bmin[1] + v[1]*ch;
@@ -351,22 +351,22 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
dverts= recast_polyMeshDetailGetVerts(dmesh, NULL);
tris= recast_polyMeshDetailGetTris(dmesh, NULL);
- for(i= 0; i<nmeshes; i++) {
+ for (i= 0; i<nmeshes; i++) {
int uniquevbase= em->bm->totvert;
unsigned int vbase= meshes[4*i+0];
unsigned short ndv= meshes[4*i+1];
unsigned short tribase= meshes[4*i+2];
unsigned short trinum= meshes[4*i+3];
- const unsigned short* p= &polys[i*nvp*2];
+ const unsigned short *p= &polys[i*nvp*2];
int nv= 0;
- for(j= 0; j < nvp; ++j) {
- if(p[j]==0xffff) break;
+ for (j= 0; j < nvp; ++j) {
+ if (p[j]==0xffff) break;
nv++;
}
/* create unique verts */
- for(j= nv; j<ndv; j++) {
+ for (j= nv; j<ndv; j++) {
copy_v3_v3(co, &dverts[3*(vbase + j)]);
SWAP(float, co[1], co[2]);
BM_vert_create(em->bm, co, NULL);
@@ -375,13 +375,13 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
EDBM_init_index_arrays(em, 1, 0, 0);
/* create faces */
- for(j= 0; j<trinum; j++) {
- unsigned char* tri= &tris[4*(tribase+j)];
- BMFace* newFace;
- int* polygonIdx;
+ for (j= 0; j<trinum; j++) {
+ unsigned char *tri= &tris[4*(tribase+j)];
+ BMFace *newFace;
+ int *polygonIdx;
- for(k= 0; k<3; k++) {
- if(tri[k]<nv)
+ for (k= 0; k<3; k++) {
+ if (tri[k]<nv)
face[k] = p[tri[k]]; /* shared vertex */
else
face[k] = uniquevbase+tri[k]-nv; /* unique vertex */
@@ -410,7 +410,7 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
ED_object_exit_editmode(C, EM_FREEDATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
- if(createob) {
+ if (createob) {
obedit->gameflag&= ~OB_COLLISION;
obedit->gameflag|= OB_NAVMESH;
obedit->body_type= OB_BODY_TYPE_NAVMESH;
@@ -422,11 +422,11 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
return obedit;
}
-static int create_navmesh_exec(bContext *C, wmOperator *op)
+static int navmesh_create_exec(bContext *C, wmOperator *op)
{
- Scene* scene= CTX_data_scene(C);
- LinkNode* obs= NULL;
- Base* navmeshBase= NULL;
+ Scene *scene= CTX_data_scene(C);
+ LinkNode *obs= NULL;
+ Base *navmeshBase= NULL;
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
if (base->object->type == OB_MESH) {
@@ -470,15 +470,15 @@ static int create_navmesh_exec(bContext *C, wmOperator *op)
void MESH_OT_navmesh_make(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Create navigation mesh";
- ot->description= "Create navigation mesh for selected objects";
- ot->idname= "MESH_OT_navmesh_make";
+ ot->name = "Create navigation mesh";
+ ot->description = "Create navigation mesh for selected objects";
+ ot->idname = "MESH_OT_navmesh_make";
/* api callbacks */
- ot->exec= create_navmesh_exec;
+ ot->exec = navmesh_create_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int navmesh_face_copy_exec(bContext *C, wmOperator *op)
@@ -489,19 +489,19 @@ static int navmesh_face_copy_exec(bContext *C, wmOperator *op)
/* do work here */
BMFace *efa_act= BM_active_face_get(em->bm, FALSE);
- if(efa_act) {
- if(CustomData_has_layer(&em->bm->pdata, CD_RECAST)) {
+ if (efa_act) {
+ if (CustomData_has_layer(&em->bm->pdata, CD_RECAST)) {
BMFace *efa;
BMIter iter;
int targetPolyIdx= *(int*)CustomData_bmesh_get(&em->bm->pdata, efa_act->head.data, CD_RECAST);
targetPolyIdx= targetPolyIdx>=0? targetPolyIdx : -targetPolyIdx;
- if(targetPolyIdx > 0) {
+ if (targetPolyIdx > 0) {
/* set target poly idx to other selected faces */
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- if(BM_elem_flag_test(efa, BM_ELEM_SELECT) && efa != efa_act) {
- int* recastDataBlock= (int*)CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_RECAST);
- *recastDataBlock= targetPolyIdx;
+ if (BM_elem_flag_test(efa, BM_ELEM_SELECT) && efa != efa_act) {
+ int *recastDataBlock = (int*)CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_RECAST);
+ *recastDataBlock = targetPolyIdx;
}
}
}
@@ -520,16 +520,16 @@ static int navmesh_face_copy_exec(bContext *C, wmOperator *op)
void MESH_OT_navmesh_face_copy(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "NavMesh Copy Face Index";
- ot->description= "Copy the index from the active face";
- ot->idname= "MESH_OT_navmesh_face_copy";
+ ot->name = "NavMesh Copy Face Index";
+ ot->description = "Copy the index from the active face";
+ ot->idname = "MESH_OT_navmesh_face_copy";
/* api callbacks */
- ot->poll= ED_operator_editmesh;
- ot->exec= navmesh_face_copy_exec;
+ ot->poll = ED_operator_editmesh;
+ ot->exec = navmesh_face_copy_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int compare(const void * a, const void * b)
@@ -537,18 +537,18 @@ static int compare(const void * a, const void * b)
return ( *(int*)a - *(int*)b );
}
-static int findFreeNavPolyIndex(BMEditMesh* em)
+static int findFreeNavPolyIndex(BMEditMesh *em)
{
/* construct vector of indices */
- int numfaces= em->bm->totface;
- int* indices= MEM_callocN(sizeof(int)*numfaces, "findFreeNavPolyIndex(indices)");
- BMFace* ef;
+ int numfaces = em->bm->totface;
+ int *indices = MEM_callocN(sizeof(int)*numfaces, "findFreeNavPolyIndex(indices)");
+ BMFace *ef;
BMIter iter;
- int i, idx= em->bm->totface-1, freeIdx= 1;
+ int i, idx = em->bm->totface-1, freeIdx = 1;
/*XXX this originally went last to first, but that isn't possible anymore*/
BM_ITER(ef, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- int polyIdx= *(int*)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST);
+ int polyIdx = *(int*)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST);
indices[idx]= polyIdx;
idx--;
}
@@ -556,11 +556,11 @@ static int findFreeNavPolyIndex(BMEditMesh* em)
qsort(indices, numfaces, sizeof(int), compare);
/* search first free index */
- freeIdx= 1;
- for(i= 0; i<numfaces; i++) {
- if(indices[i]==freeIdx)
+ freeIdx = 1;
+ for (i = 0; i<numfaces; i++) {
+ if (indices[i]==freeIdx)
freeIdx++;
- else if(indices[i]>freeIdx)
+ else if (indices[i]>freeIdx)
break;
}
@@ -576,17 +576,17 @@ static int navmesh_face_add_exec(bContext *C, wmOperator *UNUSED(op))
BMFace *ef;
BMIter iter;
- if(CustomData_has_layer(&em->bm->pdata, CD_RECAST)) {
- int targetPolyIdx= findFreeNavPolyIndex(em);
+ if (CustomData_has_layer(&em->bm->pdata, CD_RECAST)) {
+ int targetPolyIdx = findFreeNavPolyIndex(em);
- if(targetPolyIdx>0) {
+ if (targetPolyIdx>0) {
/* set target poly idx to selected faces */
/*XXX this originally went last to first, but that isn't possible anymore*/
BM_ITER(ef, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- if(BM_elem_flag_test(ef, BM_ELEM_SELECT)) {
- int *recastDataBlock= (int*)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST);
- *recastDataBlock= targetPolyIdx;
+ if (BM_elem_flag_test(ef, BM_ELEM_SELECT)) {
+ int *recastDataBlock = (int*)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST);
+ *recastDataBlock = targetPolyIdx;
}
}
}
@@ -601,23 +601,23 @@ static int navmesh_face_add_exec(bContext *C, wmOperator *UNUSED(op))
void MESH_OT_navmesh_face_add(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "NavMesh New Face Index";
- ot->description= "Add a new index and assign it to selected faces";
- ot->idname= "MESH_OT_navmesh_face_add";
+ ot->name = "NavMesh New Face Index";
+ ot->description = "Add a new index and assign it to selected faces";
+ ot->idname = "MESH_OT_navmesh_face_add";
/* api callbacks */
- ot->poll= ED_operator_editmesh;
- ot->exec= navmesh_face_add_exec;
+ ot->poll = ED_operator_editmesh;
+ ot->exec = navmesh_face_add_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int navmesh_obmode_data_poll(bContext *C)
{
Object *ob = ED_object_active_context(C);
if (ob && (ob->mode == OB_MODE_OBJECT) && (ob->type == OB_MESH)) {
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
return CustomData_has_layer(&me->pdata, CD_RECAST);
}
return FALSE;
@@ -635,7 +635,7 @@ static int navmesh_obmode_poll(bContext *C)
static int navmesh_reset_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = ED_object_active_context(C);
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
CustomData_free_layers(&me->pdata, CD_RECAST, me->totpoly);
@@ -650,22 +650,22 @@ static int navmesh_reset_exec(bContext *C, wmOperator *UNUSED(op))
void MESH_OT_navmesh_reset(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "NavMesh Reset Index Values";
- ot->description= "Assign a new index to every face";
- ot->idname= "MESH_OT_navmesh_reset";
+ ot->name = "NavMesh Reset Index Values";
+ ot->description = "Assign a new index to every face";
+ ot->idname = "MESH_OT_navmesh_reset";
/* api callbacks */
- ot->poll= navmesh_obmode_poll;
- ot->exec= navmesh_reset_exec;
+ ot->poll = navmesh_obmode_poll;
+ ot->exec = navmesh_reset_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int navmesh_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = ED_object_active_context(C);
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
CustomData_free_layers(&me->pdata, CD_RECAST, me->totpoly);
@@ -678,14 +678,14 @@ static int navmesh_clear_exec(bContext *C, wmOperator *UNUSED(op))
void MESH_OT_navmesh_clear(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "NavMesh Clear Data";
- ot->description= "Remove navmesh data from this mesh";
- ot->idname= "MESH_OT_navmesh_clear";
+ ot->name = "NavMesh Clear Data";
+ ot->description = "Remove navmesh data from this mesh";
+ ot->idname = "MESH_OT_navmesh_clear";
/* api callbacks */
- ot->poll= navmesh_obmode_data_poll;
- ot->exec= navmesh_clear_exec;
+ ot->poll = navmesh_obmode_data_poll;
+ ot->exec = navmesh_clear_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index dd5b278b16a..6a0fa0cf7c9 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -114,6 +114,7 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_beautify_fill);
WM_operatortype_append(MESH_OT_quads_convert_to_tris);
WM_operatortype_append(MESH_OT_tris_convert_to_quads);
+ WM_operatortype_append(MESH_OT_dissolve);
WM_operatortype_append(MESH_OT_dissolve_limited);
WM_operatortype_append(MESH_OT_faces_shade_smooth);
WM_operatortype_append(MESH_OT_faces_shade_flat);
@@ -121,6 +122,8 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_mark_freestyle_face);
WM_operatortype_append(MESH_OT_delete);
+ WM_operatortype_append(MESH_OT_edge_collapse);
+ WM_operatortype_append(MESH_OT_edge_collapse_loop);
WM_operatortype_append(MESH_OT_separate);
WM_operatortype_append(MESH_OT_dupli_extrude_cursor);
@@ -161,6 +164,8 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_select_next_loop);
WM_operatortype_append(MESH_OT_bridge_edge_loops);
+ WM_operatortype_append(MESH_OT_inset);
+ WM_operatortype_append(MESH_OT_edge_split);
#ifdef WITH_GAMEENGINE
WM_operatortype_append(MESH_OT_navmesh_make);
@@ -175,7 +180,7 @@ void ED_operatortypes_mesh(void)
static int ED_operator_editmesh_face_select(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- if(obedit && obedit->type==OB_MESH) {
+ if (obedit && obedit->type==OB_MESH) {
BMEditMesh *em = BMEdit_FromObject(obedit);
if (em && em->selectmode & SCE_SELECT_FACE) {
return 1;
@@ -190,51 +195,51 @@ void ED_operatormacros_mesh(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot= WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut and Slide", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut and Slide", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Cut mesh loop and slide it";
WM_operatortype_macro_define(ot, "MESH_OT_loopcut");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_edge_slide");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_edge_slide");
RNA_struct_idprops_unset(otmacro->ptr, "release_confirm");
- ot= WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Duplicate mesh and move";
WM_operatortype_macro_define(ot, "MESH_OT_duplicate");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
- ot= WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Rip polygons and move the result";
WM_operatortype_macro_define(ot, "MESH_OT_rip");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
- ot= WM_operatortype_append_macro("MESH_OT_extrude_region_move", "Extrude Region and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("MESH_OT_extrude_region_move", "Extrude Region and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Extrude region and move result";
- otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude_region");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_region");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
- ot= WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Extrude faces and move result";
- otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude_faces_indiv");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten");
+ otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_faces_indiv");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
- ot= WM_operatortype_append_macro("MESH_OT_extrude_edges_move", "Extrude Only Edges and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("MESH_OT_extrude_edges_move", "Extrude Only Edges and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Extrude edges and move result";
- otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude_edges_indiv");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_edges_indiv");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
- ot= WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", "Extrude Only Vertices and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", "Extrude Only Vertices and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Extrude vertices and move result";
- otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude_verts_indiv");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_verts_indiv");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
}
@@ -246,8 +251,8 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
wmKeyMapItem *kmi;
int i;
- keymap= WM_keymap_find(keyconf, "Mesh", 0, 0);
- keymap->poll= ED_operator_editmesh;
+ keymap = WM_keymap_find(keyconf, "Mesh", 0, 0);
+ keymap->poll = ED_operator_editmesh;
WM_keymap_add_item(keymap, "MESH_OT_loopcut_slide", RKEY, KM_PRESS, KM_CTRL, 0);
@@ -338,8 +343,10 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", ACTIONMOUSE, KM_CLICK, KM_SHIFT|KM_CTRL, 0);
RNA_boolean_set(kmi->ptr, "rotate_source", FALSE);
- WM_keymap_add_item(keymap, "MESH_OT_delete", XKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "MESH_OT_delete", DELKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_mesh_dissolve", DKEY, KM_PRESS, 0, 0);
+
+ WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_mesh_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_mesh_delete", DELKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "MESH_OT_knifetool", KKEY, KM_PRESS, 0, 0);
//RNA_enum_set(WM_keymap_add_item(keymap, "MESH_OT_knife_cut", LEFTMOUSE, KM_PRESS, KM_SHIFT, KKEY)->ptr, "type", 2/*KNIFE_MIDPOINT*/);
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 44d923a009b..7d0172b3c15 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -110,20 +110,20 @@ int join_mesh_exec(bContext *C, wmOperator *op)
MDeformVert *dvert;
CustomData vdata, edata, fdata, ldata, pdata;
- if(scene->obedit) {
+ if (scene->obedit) {
BKE_report(op->reports, RPT_WARNING, "Cant join while in editmode");
return OPERATOR_CANCELLED;
}
/* ob is the object we are adding geometry to */
- if(!ob || ob->type!=OB_MESH) {
+ if (!ob || ob->type!=OB_MESH) {
BKE_report(op->reports, RPT_WARNING, "Active object is not a mesh");
return OPERATOR_CANCELLED;
}
/* count & check */
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- if(base->object->type==OB_MESH) {
+ if (base->object->type==OB_MESH) {
me= base->object->data;
totvert+= me->totvert;
@@ -132,18 +132,18 @@ int join_mesh_exec(bContext *C, wmOperator *op)
totpoly+= me->totpoly;
totmat+= base->object->totcol;
- if(base->object == ob)
+ if (base->object == ob)
ok= 1;
/* check for shapekeys */
- if(me->key)
+ if (me->key)
haskey++;
}
}
CTX_DATA_END;
/* that way the active object is always selected */
- if(ok==0) {
+ if (ok==0) {
BKE_report(op->reports, RPT_WARNING, "Active object is not a selected mesh");
return OPERATOR_CANCELLED;
}
@@ -152,12 +152,12 @@ int join_mesh_exec(bContext *C, wmOperator *op)
me= (Mesh *)ob->data;
key= me->key;
- if(totvert==0 || totvert==me->totvert) {
+ if (totvert==0 || totvert==me->totvert) {
BKE_report(op->reports, RPT_WARNING, "No mesh data to join");
return OPERATOR_CANCELLED;
}
- if(totvert > MESH_MAX_VERTS) {
+ if (totvert > MESH_MAX_VERTS) {
BKE_reportf(op->reports, RPT_WARNING, "Joining results in %d vertices, limit is " STRINGIFY(MESH_MAX_VERTS), totvert);
return OPERATOR_CANCELLED;
}
@@ -168,7 +168,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
totcol= ob->totcol;
/* obact materials in new main array, is nicer start! */
- for(a=0; a<ob->totcol; a++) {
+ for (a=0; a<ob->totcol; a++) {
matar[a]= give_current_material(ob, a+1);
id_us_plus((ID *)matar[a]);
/* increase id->us : will be lowered later */
@@ -179,19 +179,19 @@ int join_mesh_exec(bContext *C, wmOperator *op)
* - if destination mesh didn't have shapekeys, but we encountered some in the meshes we're
* joining, set up a new keyblock and assign to the mesh
*/
- if(key) {
+ if (key) {
/* make a duplicate copy that will only be used here... (must remember to free it!) */
nkey= copy_key(key);
/* for all keys in old block, clear data-arrays */
- for(kb= key->block.first; kb; kb= kb->next) {
- if(kb->data) MEM_freeN(kb->data);
+ for (kb= key->block.first; kb; kb= kb->next) {
+ if (kb->data) MEM_freeN(kb->data);
kb->data= MEM_callocN(sizeof(float)*3*totvert, "join_shapekey");
kb->totelem= totvert;
kb->weights= NULL;
}
}
- else if(haskey) {
+ else if (haskey) {
/* add a new key-block and add to the mesh */
key= me->key= add_key((ID *)me);
key->type = KEY_RELATIVE;
@@ -200,48 +200,48 @@ int join_mesh_exec(bContext *C, wmOperator *op)
/* first pass over objects - copying materials and vertexgroups across */
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
/* only act if a mesh, and not the one we're joining to */
- if((ob!=base->object) && (base->object->type==OB_MESH)) {
+ if ((ob!=base->object) && (base->object->type==OB_MESH)) {
me= base->object->data;
/* Join this object's vertex groups to the base one's */
- for(dg=base->object->defbase.first; dg; dg=dg->next) {
+ for (dg=base->object->defbase.first; dg; dg=dg->next) {
/* See if this group exists in the object (if it doesn't, add it to the end) */
- if(!defgroup_find_name(ob, dg->name)) {
+ if (!defgroup_find_name(ob, dg->name)) {
odg = MEM_callocN(sizeof(bDeformGroup), "join deformGroup");
memcpy(odg, dg, sizeof(bDeformGroup));
BLI_addtail(&ob->defbase, odg);
}
}
- if(ob->defbase.first && ob->actdef==0)
+ if (ob->defbase.first && ob->actdef==0)
ob->actdef=1;
- if(me->totvert) {
+ if (me->totvert) {
/* Add this object's materials to the base one's if they don't exist already (but only if limits not exceeded yet) */
- if(totcol < MAXMAT) {
- for(a=1; a<=base->object->totcol; a++) {
+ if (totcol < MAXMAT) {
+ for (a=1; a<=base->object->totcol; a++) {
ma= give_current_material(base->object, a);
- for(b=0; b<totcol; b++) {
- if(ma == matar[b]) break;
+ for (b=0; b<totcol; b++) {
+ if (ma == matar[b]) break;
}
- if(b==totcol) {
+ if (b==totcol) {
matar[b]= ma;
- if(ma) {
+ if (ma) {
id_us_plus(&ma->id);
}
totcol++;
}
- if(totcol >= MAXMAT)
+ if (totcol >= MAXMAT)
break;
}
}
/* if this mesh has shapekeys, check if destination mesh already has matching entries too */
- if(me->key && key) {
- for(kb= me->key->block.first; kb; kb= kb->next) {
+ if (me->key && key) {
+ for (kb= me->key->block.first; kb; kb= kb->next) {
/* if key doesn't exist in destination mesh, add it */
- if(key_get_named_keyblock(key, kb->name) == NULL) {
+ if (key_get_named_keyblock(key, kb->name) == NULL) {
/* copy this existing one over to the new shapekey block */
kbn= MEM_dupallocN(kb);
kbn->prev= kbn->next= NULL;
@@ -253,7 +253,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
okb= key->block.last;
curpos= (okb) ? okb->pos : -0.1f;
- if(key->type == KEY_RELATIVE)
+ if (key->type == KEY_RELATIVE)
kbn->pos= curpos + 0.1f;
else
kbn->pos= curpos;
@@ -261,12 +261,12 @@ int join_mesh_exec(bContext *C, wmOperator *op)
BLI_addtail(&key->block, kbn);
kbn->adrcode= key->totkey;
key->totkey++;
- if(key->totkey==1) key->refkey= kbn;
+ if (key->totkey==1) key->refkey= kbn;
// XXX 2.5 Animato
#if 0
/* also, copy corresponding ipo-curve to ipo-block if applicable */
- if(me->key->ipo && key->ipo) {
+ if (me->key->ipo && key->ipo) {
// FIXME... this is a luxury item!
puts("FIXME: ignoring IPO's when joining shapekeys on Meshes for now...");
}
@@ -301,10 +301,10 @@ int join_mesh_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
/* only join if this is a mesh */
- if(base->object->type==OB_MESH) {
+ if (base->object->type==OB_MESH) {
me= base->object->data;
- if(me->totvert) {
+ if (me->totvert) {
/* standard data */
CustomData_merge(&me->vdata, &vdata, CD_MASK_MESH, CD_DEFAULT, totvert);
CustomData_copy_data(&me->vdata, &vdata, 0, vertofs, me->totvert);
@@ -313,15 +313,15 @@ int join_mesh_exec(bContext *C, wmOperator *op)
dvert= CustomData_get(&vdata, vertofs, CD_MDEFORMVERT);
/* NB: vertex groups here are new version */
- if(dvert) {
- for(i=0; i<me->totvert; i++) {
- for(j=0; j<dvert[i].totweight; j++) {
+ if (dvert) {
+ for (i=0; i<me->totvert; i++) {
+ for (j=0; j<dvert[i].totweight; j++) {
/* Find the old vertex group */
odg = BLI_findlink(&base->object->defbase, dvert[i].dw[j].def_nr);
- if(odg) {
+ if (odg) {
/* Search for a match in the new object, and set new index */
- for(dg=ob->defbase.first, index=0; dg; dg=dg->next, index++) {
- if(!strcmp(dg->name, odg->name)) {
+ for (dg=ob->defbase.first, index=0; dg; dg=dg->next, index++) {
+ if (!strcmp(dg->name, odg->name)) {
dvert[i].dw[j].def_nr = index;
break;
}
@@ -332,12 +332,12 @@ int join_mesh_exec(bContext *C, wmOperator *op)
}
/* if this is the object we're merging into, no need to do anything */
- if(base->object != ob) {
+ if (base->object != ob) {
/* watch this: switch matmul order really goes wrong */
mult_m4_m4m4(cmat, imat, base->object->obmat);
/* transform vertex coordinates into new space */
- for(a=0, mv=mvert; a < me->totvert; a++, mv++) {
+ for (a=0, mv=mvert; a < me->totvert; a++, mv++) {
mul_m4_v3(cmat, mv->co);
}
@@ -345,18 +345,18 @@ int join_mesh_exec(bContext *C, wmOperator *op)
* - if there's a matching one, copy it across (will need to transform vertices into new space...)
* - otherwise, just copy own coordinates of mesh (no need to transform vertex coordinates into new space)
*/
- if(key) {
+ if (key) {
/* if this mesh has any shapekeys, check first, otherwise just copy coordinates */
- for(kb= key->block.first; kb; kb= kb->next) {
+ for (kb= key->block.first; kb; kb= kb->next) {
/* get pointer to where to write data for this mesh in shapekey's data array */
fp1= ((float *)kb->data) + (vertofs*3);
/* check if this mesh has such a shapekey */
okb= key_get_named_keyblock(me->key, kb->name);
- if(okb) {
+ if (okb) {
/* copy this mesh's shapekey to the destination shapekey (need to transform first) */
fp2= ((float *)(okb->data));
- for(a=0; a < me->totvert; a++, fp1+=3, fp2+=3) {
+ for (a=0; a < me->totvert; a++, fp1+=3, fp2+=3) {
copy_v3_v3(fp1, fp2);
mul_m4_v3(cmat, fp1);
}
@@ -364,7 +364,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
else {
/* copy this mesh's vertex coordinates to the destination shapekey */
mv= mvert;
- for(a=0; a < me->totvert; a++, fp1+=3, mv++) {
+ for (a=0; a < me->totvert; a++, fp1+=3, mv++) {
copy_v3_v3(fp1, mv->co);
}
}
@@ -376,24 +376,24 @@ int join_mesh_exec(bContext *C, wmOperator *op)
* - if it was an 'original', copy the appropriate data from nkey
* - otherwise, copy across plain coordinates (no need to transform coordinates)
*/
- if(key) {
- for(kb= key->block.first; kb; kb= kb->next) {
+ if (key) {
+ for (kb= key->block.first; kb; kb= kb->next) {
/* get pointer to where to write data for this mesh in shapekey's data array */
fp1= ((float *)kb->data) + (vertofs*3);
/* check if this was one of the original shapekeys */
okb= key_get_named_keyblock(nkey, kb->name);
- if(okb) {
+ if (okb) {
/* copy this mesh's shapekey to the destination shapekey */
fp2= ((float *)(okb->data));
- for(a=0; a < me->totvert; a++, fp1+=3, fp2+=3) {
+ for (a=0; a < me->totvert; a++, fp1+=3, fp2+=3) {
copy_v3_v3(fp1, fp2);
}
}
else {
/* copy base-coordinates to the destination shapekey */
mv= mvert;
- for(a=0; a < me->totvert; a++, fp1+=3, mv++) {
+ for (a=0; a < me->totvert; a++, fp1+=3, mv++) {
copy_v3_v3(fp1, mv->co);
}
}
@@ -405,36 +405,36 @@ int join_mesh_exec(bContext *C, wmOperator *op)
mvert+= me->totvert;
}
- if(me->totedge) {
+ if (me->totedge) {
CustomData_merge(&me->edata, &edata, CD_MASK_MESH, CD_DEFAULT, totedge);
CustomData_copy_data(&me->edata, &edata, 0, edgeofs, me->totedge);
- for(a=0; a<me->totedge; a++, medge++) {
+ for (a=0; a<me->totedge; a++, medge++) {
medge->v1+= vertofs;
medge->v2+= vertofs;
}
}
if (me->totloop) {
- if(base->object!=ob)
+ if (base->object!=ob)
multiresModifier_prepare_join(scene, base->object, ob);
CustomData_merge(&me->ldata, &ldata, CD_MASK_MESH, CD_DEFAULT, totloop);
CustomData_copy_data(&me->ldata, &ldata, 0, loopofs, me->totloop);
- for(a=0; a<me->totloop; a++, mloop++) {
+ for (a=0; a<me->totloop; a++, mloop++) {
mloop->v += vertofs;
mloop->e += edgeofs;
}
}
- if(me->totpoly) {
+ if (me->totpoly) {
/* make mapping for materials */
- for(a=1; a<=base->object->totcol; a++) {
+ for (a=1; a<=base->object->totcol; a++) {
ma= give_current_material(base->object, a);
- for(b=0; b<totcol; b++) {
- if(ma == matar[b]) {
+ for (b=0; b<totcol; b++) {
+ if (ma == matar[b]) {
matmap[a-1]= b;
break;
}
@@ -444,7 +444,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
CustomData_merge(&me->pdata, &pdata, CD_MASK_MESH, CD_DEFAULT, totpoly);
CustomData_copy_data(&me->pdata, &pdata, 0, polyofs, me->totpoly);
- for(a=0; a<me->totpoly; a++, mpoly++) {
+ for (a=0; a<me->totpoly; a++, mpoly++) {
mpoly->loopstart += loopofs;
mpoly->mat_nr= matmap ? matmap[(int)mpoly->mat_nr] : 0;
}
@@ -460,7 +460,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
loopofs += me->totloop;
/* free base, now that data is merged */
- if(base->object != ob)
+ if (base->object != ob)
ED_base_object_free_and_unlink(bmain, scene, base);
}
}
@@ -487,21 +487,21 @@ int join_mesh_exec(bContext *C, wmOperator *op)
mesh_update_customdata_pointers(me, TRUE); /* BMESH_TODO, check if this arg can be failse, non urgent - campbell */
/* old material array */
- for(a=1; a<=ob->totcol; a++) {
+ for (a=1; a<=ob->totcol; a++) {
ma= ob->mat[a-1];
- if(ma) ma->id.us--;
+ if (ma) ma->id.us--;
}
- for(a=1; a<=me->totcol; a++) {
+ for (a=1; a<=me->totcol; a++) {
ma= me->mat[a-1];
- if(ma) ma->id.us--;
+ if (ma) ma->id.us--;
}
- if(ob->mat) MEM_freeN(ob->mat);
- if(ob->matbits) MEM_freeN(ob->matbits);
- if(me->mat) MEM_freeN(me->mat);
+ if (ob->mat) MEM_freeN(ob->mat);
+ if (ob->matbits) MEM_freeN(ob->matbits);
+ if (me->mat) MEM_freeN(me->mat);
ob->mat= me->mat= NULL;
ob->matbits= NULL;
- if(totcol) {
+ if (totcol) {
me->mat= matar;
ob->mat= MEM_callocN(sizeof(void *)*totcol, "join obmatar");
ob->matbits= MEM_callocN(sizeof(char)*totcol, "join obmatbits");
@@ -517,11 +517,11 @@ int join_mesh_exec(bContext *C, wmOperator *op)
test_object_materials((ID *)me);
/* free temp copy of destination shapekeys (if applicable) */
- if(nkey) {
+ if (nkey) {
// XXX 2.5 Animato
#if 0
/* free it's ipo too - both are not actually freed from memory yet as ID-blocks */
- if(nkey->ipo) {
+ if (nkey->ipo) {
free_ipo(nkey->ipo);
BLI_remlink(&bmain->ipo, nkey->ipo);
MEM_freeN(nkey->ipo);
@@ -590,7 +590,7 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- if(key == NULL) {
+ if (key == NULL) {
key= me->key= add_key((ID *)me);
key->type= KEY_RELATIVE;
@@ -603,7 +603,7 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
if (base->object == ob) continue;
- if(base->object->type==OB_MESH) {
+ if (base->object->type==OB_MESH) {
selme = (Mesh *)base->object->data;
if (selme->totvert==me->totvert) {
@@ -656,16 +656,16 @@ static int mesh_octree_get_base_offs(float *co, float *offs, float *div)
static void mesh_octree_add_node(MocNode **bt, intptr_t index)
{
- if(*bt==NULL) {
+ if (*bt==NULL) {
*bt= MEM_callocN(sizeof(MocNode), "MocNode");
(*bt)->index[0]= index;
}
else {
int a;
- for(a=0; a<MOC_NODE_RES; a++) {
- if((*bt)->index[a]==index)
+ for (a=0; a<MOC_NODE_RES; a++) {
+ if ((*bt)->index[a]==index)
return;
- else if((*bt)->index[a]==0) {
+ else if ((*bt)->index[a]==0) {
(*bt)->index[a]= index;
return;
}
@@ -676,7 +676,7 @@ static void mesh_octree_add_node(MocNode **bt, intptr_t index)
static void mesh_octree_free_node(MocNode **bt)
{
- if( (*bt)->next ) {
+ if ( (*bt)->next ) {
mesh_octree_free_node(&(*bt)->next);
}
MEM_freeN(*bt);
@@ -739,26 +739,26 @@ static intptr_t mesh_octree_find_index(MocNode **bt, MVert *mvert, float *co)
float *vec;
int a;
- if(*bt==NULL)
+ if (*bt==NULL)
return -1;
- for(a=0; a<MOC_NODE_RES; a++) {
- if((*bt)->index[a]) {
+ for (a=0; a<MOC_NODE_RES; a++) {
+ if ((*bt)->index[a]) {
/* does mesh verts and editmode, code looks potential dangerous, octree should really be filled OK! */
- if(mvert) {
+ if (mvert) {
vec= (mvert+(*bt)->index[a]-1)->co;
- if(compare_v3v3(vec, co, MOC_THRESH))
+ if (compare_v3v3(vec, co, MOC_THRESH))
return (*bt)->index[a]-1;
}
else {
BMVert *eve= (BMVert *)((*bt)->index[a]);
- if(compare_v3v3(eve->co, co, MOC_THRESH))
+ if (compare_v3v3(eve->co, co, MOC_THRESH))
return (*bt)->index[a];
}
}
else return -1;
}
- if( (*bt)->next)
+ if ( (*bt)->next)
return mesh_octree_find_index(&(*bt)->next, mvert, co);
return -1;
@@ -775,21 +775,21 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, float *co, char mode)
{
MocNode **bt;
- if(mode=='u') { /* use table */
- if(MeshOctree.table==NULL)
+ if (mode=='u') { /* use table */
+ if (MeshOctree.table==NULL)
mesh_octree_table(ob, em, NULL, 's');
- if(MeshOctree.table) {
+ if (MeshOctree.table) {
Mesh *me= ob->data;
bt= MeshOctree.table + mesh_octree_get_base_offs(co, MeshOctree.offs, MeshOctree.div);
- if(em)
+ if (em)
return mesh_octree_find_index(bt, NULL, co);
else
return mesh_octree_find_index(bt, me->mvert, co);
}
return -1;
}
- else if(mode=='s') { /* start table */
+ else if (mode=='s') { /* start table */
Mesh *me= ob->data;
float min[3], max[3];
@@ -797,18 +797,19 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, float *co, char mode)
* we are using the undeformed coordinates*/
INIT_MINMAX(min, max);
- if(em && me->edit_btmesh==em) {
+ if (em && me->edit_btmesh==em) {
BMIter iter;
BMVert *eve;
- BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL)
- DO_MINMAX(eve->co, min, max)
+ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+ DO_MINMAX(eve->co, min, max);
+ }
}
else {
MVert *mvert;
int a;
- for(a=0, mvert= me->mvert; a<me->totvert; a++, mvert++)
+ for (a=0, mvert= me->mvert; a<me->totvert; a++, mvert++)
DO_MINMAX(mvert->co, min, max);
}
@@ -824,16 +825,16 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, float *co, char mode)
MeshOctree.div[2]+= 2*MOC_THRESH;
mul_v3_fl(MeshOctree.div, 1.0f/MOC_RES);
- if(MeshOctree.div[0]==0.0f) MeshOctree.div[0]= 1.0f;
- if(MeshOctree.div[1]==0.0f) MeshOctree.div[1]= 1.0f;
- if(MeshOctree.div[2]==0.0f) MeshOctree.div[2]= 1.0f;
+ if (MeshOctree.div[0]==0.0f) MeshOctree.div[0]= 1.0f;
+ if (MeshOctree.div[1]==0.0f) MeshOctree.div[1]= 1.0f;
+ if (MeshOctree.div[2]==0.0f) MeshOctree.div[2]= 1.0f;
- if(MeshOctree.table) /* happens when entering this call without ending it */
+ if (MeshOctree.table) /* happens when entering this call without ending it */
mesh_octree_table(ob, em, co, 'e');
MeshOctree.table= MEM_callocN(MOC_RES*MOC_RES*MOC_RES*sizeof(void *), "sym table");
- if(em && me->edit_btmesh==em) {
+ if (em && me->edit_btmesh==em) {
BMVert *eve;
BMIter iter;
@@ -845,16 +846,16 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, float *co, char mode)
MVert *mvert;
int a;
- for(a=0, mvert= me->mvert; a<me->totvert; a++, mvert++)
+ for (a=0, mvert= me->mvert; a<me->totvert; a++, mvert++)
mesh_octree_add_nodes(MeshOctree.table, mvert->co, MeshOctree.offs, MeshOctree.div, a+1);
}
}
- else if(mode=='e') { /* end table */
- if(MeshOctree.table) {
+ else if (mode=='e') { /* end table */
+ if (MeshOctree.table) {
int a;
- for(a=0, bt=MeshOctree.table; a<MOC_RES*MOC_RES*MOC_RES; a++, bt++) {
- if(*bt) mesh_octree_free_node(bt);
+ for (a=0, bt=MeshOctree.table; a<MOC_RES*MOC_RES*MOC_RES; a++, bt++) {
+ if (*bt) mesh_octree_free_node(bt);
}
MEM_freeN(MeshOctree.table);
MeshOctree.table= NULL;
@@ -870,15 +871,15 @@ MirrTopoStore_t mesh_topo_store= {NULL, -1. -1, -1};
/* note, is supposed return -1 on error, which callers are currently checking for, but is not used so far */
int mesh_mirrtopo_table(Object *ob, char mode)
{
- if(mode=='u') { /* use table */
+ if (mode=='u') { /* use table */
if (ED_mesh_mirrtopo_recalc_check(ob->data, ob->mode, &mesh_topo_store)) {
mesh_mirrtopo_table(ob, 's');
}
}
- else if(mode=='s') { /* start table */
+ else if (mode=='s') { /* start table */
ED_mesh_mirrtopo_init(ob->data, ob->mode, &mesh_topo_store, FALSE);
}
- else if(mode=='e') { /* end table */
+ else if (mode=='e') { /* end table */
ED_mesh_mirrtopo_free(&mesh_topo_store);
}
return 0;
@@ -910,7 +911,8 @@ int mesh_get_x_mirror_vert(Object *ob, int index)
{
if (((Mesh *)ob->data)->editflag & ME_EDIT_MIRROR_TOPO) {
return mesh_get_x_mirror_vert_topo(ob, index);
- } else {
+ }
+ else {
return mesh_get_x_mirror_vert_spacial(ob, index);
}
return 0;
@@ -933,7 +935,7 @@ static BMVert *editbmesh_get_x_mirror_vert_spacial(Object *ob, BMEditMesh *em, f
vec[2]= co[2];
poinval= mesh_octree_table(ob, em, vec, 'u');
- if(poinval != -1)
+ if (poinval != -1)
return (BMVert *)(poinval);
return NULL;
}
@@ -962,7 +964,7 @@ static BMVert *editbmesh_get_x_mirror_vert_topo(Object *ob, struct BMEditMesh *e
poinval= mesh_topo_store.index_lookup[index];
- if(poinval != -1)
+ if (poinval != -1)
return (BMVert *)(poinval);
return NULL;
}
@@ -997,7 +999,8 @@ static float *editmesh_get_mirror_uv(BMEditMesh *em, int axis, float *uv, float
cent_vec[0] = face_cent[0];
cent_vec[1]= -((face_cent[1])-mirrCent[1]) + mirrCent[1];
- } else {
+ }
+ else {
vec[0]= -((uv[0])-mirrCent[0]) + mirrCent[0];
vec[1]= uv[1];
@@ -1038,7 +1041,7 @@ static unsigned int mirror_facehash(const void *ptr)
const MFace *mf= ptr;
int v0, v1;
- if(mf->v4) {
+ if (mf->v4) {
v0= MIN4(mf->v1, mf->v2, mf->v3, mf->v4);
v1= MAX4(mf->v1, mf->v2, mf->v3, mf->v4);
}
@@ -1052,22 +1055,22 @@ static unsigned int mirror_facehash(const void *ptr)
static int mirror_facerotation(MFace *a, MFace *b)
{
- if(b->v4) {
- if(a->v1==b->v1 && a->v2==b->v2 && a->v3==b->v3 && a->v4==b->v4)
+ if (b->v4) {
+ if (a->v1==b->v1 && a->v2==b->v2 && a->v3==b->v3 && a->v4==b->v4)
return 0;
- else if(a->v4==b->v1 && a->v1==b->v2 && a->v2==b->v3 && a->v3==b->v4)
+ else if (a->v4==b->v1 && a->v1==b->v2 && a->v2==b->v3 && a->v3==b->v4)
return 1;
- else if(a->v3==b->v1 && a->v4==b->v2 && a->v1==b->v3 && a->v2==b->v4)
+ else if (a->v3==b->v1 && a->v4==b->v2 && a->v1==b->v3 && a->v2==b->v4)
return 2;
- else if(a->v2==b->v1 && a->v3==b->v2 && a->v4==b->v3 && a->v1==b->v4)
+ else if (a->v2==b->v1 && a->v3==b->v2 && a->v4==b->v3 && a->v1==b->v4)
return 3;
}
else {
- if(a->v1==b->v1 && a->v2==b->v2 && a->v3==b->v3)
+ if (a->v1==b->v1 && a->v2==b->v2 && a->v3==b->v3)
return 0;
- else if(a->v3==b->v1 && a->v1==b->v2 && a->v2==b->v3)
+ else if (a->v3==b->v1 && a->v1==b->v2 && a->v2==b->v3)
return 1;
- else if(a->v2==b->v1 && a->v3==b->v2 && a->v1==b->v3)
+ else if (a->v2==b->v1 && a->v3==b->v2 && a->v1==b->v3)
return 2;
}
@@ -1094,29 +1097,29 @@ int *mesh_get_x_mirror_faces(Object *ob, BMEditMesh *em)
mesh_octree_table(ob, em, NULL, 's');
- for(a=0, mv=mvert; a<me->totvert; a++, mv++)
+ for (a=0, mv=mvert; a<me->totvert; a++, mv++)
mirrorverts[a]= mesh_get_x_mirror_vert(ob, a);
mesh_octree_table(ob, em, NULL, 'e');
fhash= BLI_ghash_new(mirror_facehash, mirror_facecmp, "mirror_facehash gh");
- for(a=0, mf=mface; a<me->totface; a++, mf++)
+ for (a=0, mf=mface; a<me->totface; a++, mf++)
BLI_ghash_insert(fhash, mf, mf);
- for(a=0, mf=mface; a<me->totface; a++, mf++) {
+ for (a=0, mf=mface; a<me->totface; a++, mf++) {
mirrormf.v1= mirrorverts[mf->v3];
mirrormf.v2= mirrorverts[mf->v2];
mirrormf.v3= mirrorverts[mf->v1];
mirrormf.v4= (mf->v4)? mirrorverts[mf->v4]: 0;
/* make sure v4 is not 0 if a quad */
- if(mf->v4 && mirrormf.v4==0) {
+ if (mf->v4 && mirrormf.v4==0) {
SWAP(unsigned int, mirrormf.v1, mirrormf.v3);
SWAP(unsigned int, mirrormf.v2, mirrormf.v4);
}
hashmf= BLI_ghash_lookup(fhash, &mirrormf);
- if(hashmf) {
+ if (hashmf) {
mirrorfaces[a*2]= hashmf - mface;
mirrorfaces[a*2+1]= mirror_facerotation(&mirrormf, hashmf);
}
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index 1287d903020..713009d2a19 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -82,8 +82,8 @@ void make_editMball(Object *obedit)
ml= mb->elems.first;
- while(ml) {
- if(ml->flag & SELECT) mb->lastelem = ml;
+ while (ml) {
+ if (ml->flag & SELECT) mb->lastelem = ml;
ml= ml->next;
}
@@ -106,7 +106,7 @@ MetaElem *add_metaball_primitive(bContext *C, float mat[4][4], int type, int UNU
/* Deselect all existing metaelems */
ml= mball->editelems->first;
- while(ml) {
+ while (ml) {
ml->flag &= ~SELECT;
ml= ml->next;
}
@@ -131,11 +131,11 @@ static int mball_select_all_exec(bContext *C, wmOperator *op)
int action = RNA_enum_get(op->ptr, "action");
ml= mb->editelems->first;
- if(ml) {
+ if (ml) {
if (action == SEL_TOGGLE) {
action = SEL_SELECT;
- while(ml) {
- if(ml->flag & SELECT) {
+ while (ml) {
+ if (ml->flag & SELECT) {
action = SEL_DESELECT;
break;
}
@@ -144,7 +144,7 @@ static int mball_select_all_exec(bContext *C, wmOperator *op)
}
ml= mb->editelems->first;
- while(ml) {
+ while (ml) {
switch (action) {
case SEL_SELECT:
ml->flag |= SELECT;
@@ -167,16 +167,16 @@ static int mball_select_all_exec(bContext *C, wmOperator *op)
void MBALL_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select or Deselect All";
- ot->description= "Change selection of all meta elements";
- ot->idname= "MBALL_OT_select_all";
+ ot->name = "(De)select All";
+ ot->description = "Change selection of all meta elements";
+ ot->idname = "MBALL_OT_select_all";
/* callback functions */
- ot->exec= mball_select_all_exec;
- ot->poll= ED_operator_editmball;
+ ot->exec = mball_select_all_exec;
+ ot->poll = ED_operator_editmball;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -191,15 +191,15 @@ static int select_random_metaelems_exec(bContext *C, wmOperator *op)
MetaElem *ml;
float percent= RNA_float_get(op->ptr, "percent");
- if(percent == 0.0f)
+ if (percent == 0.0f)
return OPERATOR_CANCELLED;
ml= mb->editelems->first;
BLI_srand( BLI_rand() ); /* Random seed */
/* Stupid version of random selection. Should be improved. */
- while(ml) {
- if(BLI_frand() < percent)
+ while (ml) {
+ if (BLI_frand() < percent)
ml->flag |= SELECT;
else
ml->flag &= ~SELECT;
@@ -215,17 +215,17 @@ static int select_random_metaelems_exec(bContext *C, wmOperator *op)
void MBALL_OT_select_random_metaelems(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Random...";
- ot->description= "Randomly select metaelements";
- ot->idname= "MBALL_OT_select_random_metaelems";
+ ot->name = "Random...";
+ ot->description = "Randomly select metaelements";
+ ot->idname = "MBALL_OT_select_random_metaelems";
/* callback functions */
- ot->exec= select_random_metaelems_exec;
- ot->invoke= WM_operator_props_popup;
- ot->poll= ED_operator_editmball;
+ ot->exec = select_random_metaelems_exec;
+ ot->invoke = WM_operator_props_popup;
+ ot->poll = ED_operator_editmball;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "Percentage of metaelems to select randomly", 0.0001f, 1.0f);
@@ -241,9 +241,9 @@ static int duplicate_metaelems_exec(bContext *C, wmOperator *UNUSED(op))
MetaElem *ml, *newml;
ml= mb->editelems->last;
- if(ml) {
- while(ml) {
- if(ml->flag & SELECT) {
+ if (ml) {
+ while (ml) {
+ if (ml->flag & SELECT) {
newml= MEM_dupallocN(ml);
BLI_addtail(mb->editelems, newml);
mb->lastelem= newml;
@@ -274,17 +274,17 @@ static int duplicate_metaelems_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
void MBALL_OT_duplicate_metaelems(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Duplicate Metaelements";
- ot->description= "Delete selected metaelement(s)";
- ot->idname= "MBALL_OT_duplicate_metaelems";
+ ot->name = "Duplicate Metaelements";
+ ot->description = "Delete selected metaelement(s)";
+ ot->idname = "MBALL_OT_duplicate_metaelems";
/* callback functions */
- ot->exec= duplicate_metaelems_exec;
- ot->invoke= duplicate_metaelems_invoke;
- ot->poll= ED_operator_editmball;
+ ot->exec = duplicate_metaelems_exec;
+ ot->invoke = duplicate_metaelems_invoke;
+ ot->poll = ED_operator_editmball;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* to give to transform */
RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
@@ -300,11 +300,11 @@ static int delete_metaelems_exec(bContext *C, wmOperator *UNUSED(op))
MetaElem *ml, *next;
ml= mb->editelems->first;
- if(ml) {
- while(ml) {
+ if (ml) {
+ while (ml) {
next= ml->next;
- if(ml->flag & SELECT) {
- if(mb->lastelem==ml) mb->lastelem= NULL;
+ if (ml->flag & SELECT) {
+ if (mb->lastelem==ml) mb->lastelem= NULL;
BLI_remlink(mb->editelems, ml);
MEM_freeN(ml);
}
@@ -320,16 +320,16 @@ static int delete_metaelems_exec(bContext *C, wmOperator *UNUSED(op))
void MBALL_OT_delete_metaelems(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete";
- ot->description= "Delete selected metaelement(s)";
- ot->idname= "MBALL_OT_delete_metaelems";
+ ot->name = "Delete";
+ ot->description = "Delete selected metaelement(s)";
+ ot->idname = "MBALL_OT_delete_metaelems";
/* callback functions */
- ot->exec= delete_metaelems_exec;
- ot->poll= ED_operator_editmball;
+ ot->exec = delete_metaelems_exec;
+ ot->poll = ED_operator_editmball;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/***************************** Hide operator *****************************/
@@ -344,9 +344,9 @@ static int hide_metaelems_exec(bContext *C, wmOperator *op)
ml= mb->editelems->first;
- if(ml) {
- while(ml) {
- if((ml->flag & SELECT) != invert)
+ if (ml) {
+ while (ml) {
+ if ((ml->flag & SELECT) != invert)
ml->flag |= MB_HIDE;
ml= ml->next;
}
@@ -360,16 +360,16 @@ static int hide_metaelems_exec(bContext *C, wmOperator *op)
void MBALL_OT_hide_metaelems(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Hide";
- ot->description= "Hide (un)selected metaelement(s)";
- ot->idname= "MBALL_OT_hide_metaelems";
+ ot->name = "Hide";
+ ot->description = "Hide (un)selected metaelement(s)";
+ ot->idname = "MBALL_OT_hide_metaelems";
/* callback functions */
- ot->exec= hide_metaelems_exec;
- ot->poll= ED_operator_editmball;
+ ot->exec = hide_metaelems_exec;
+ ot->poll = ED_operator_editmball;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
@@ -386,8 +386,8 @@ static int reveal_metaelems_exec(bContext *C, wmOperator *UNUSED(op))
ml= mb->editelems->first;
- if(ml) {
- while(ml) {
+ if (ml) {
+ while (ml) {
ml->flag &= ~MB_HIDE;
ml= ml->next;
}
@@ -401,16 +401,16 @@ static int reveal_metaelems_exec(bContext *C, wmOperator *UNUSED(op))
void MBALL_OT_reveal_metaelems(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reveal";
- ot->description= "Reveal all hidden metaelements";
- ot->idname= "MBALL_OT_reveal_metaelems";
+ ot->name = "Reveal";
+ ot->description = "Reveal all hidden metaelements";
+ ot->idname = "MBALL_OT_reveal_metaelems";
/* callback functions */
- ot->exec= reveal_metaelems_exec;
- ot->poll= ED_operator_editmball;
+ ot->exec = reveal_metaelems_exec;
+ ot->poll = ED_operator_editmball;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* Select MetaElement with mouse click (user can select radius circle or
@@ -428,49 +428,49 @@ int mouse_mball(bContext *C, const int mval[2], int extend)
view3d_set_viewcontext(C, &vc);
- rect.xmin= mval[0]-12;
- rect.xmax= mval[0]+12;
- rect.ymin= mval[1]-12;
- rect.ymax= mval[1]+12;
+ rect.xmin = mval[0]-12;
+ rect.xmax = mval[0]+12;
+ rect.ymin = mval[1]-12;
+ rect.ymax = mval[1]+12;
hits= view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
/* does startelem exist? */
ml= mb->editelems->first;
- while(ml) {
- if(ml==startelem) break;
+ while (ml) {
+ if (ml==startelem) break;
ml= ml->next;
}
- if(ml==NULL) startelem= mb->editelems->first;
+ if (ml==NULL) startelem= mb->editelems->first;
- if(hits>0) {
+ if (hits>0) {
ml= startelem;
- while(ml) {
- for(a=0; a<hits; a++) {
+ while (ml) {
+ for (a=0; a<hits; a++) {
/* index converted for gl stuff */
- if(ml->selcol1==buffer[ 4 * a + 3 ]) {
+ if (ml->selcol1==buffer[ 4 * a + 3 ]) {
ml->flag |= MB_SCALE_RAD;
act= ml;
}
- if(ml->selcol2==buffer[ 4 * a + 3 ]) {
+ if (ml->selcol2==buffer[ 4 * a + 3 ]) {
ml->flag &= ~MB_SCALE_RAD;
act= ml;
}
}
- if(act) break;
+ if (act) break;
ml= ml->next;
- if(ml==NULL) ml= mb->editelems->first;
- if(ml==startelem) break;
+ if (ml==NULL) ml= mb->editelems->first;
+ if (ml==startelem) break;
}
/* When some metaelem was found, then it is necessary to select or
* deselect it. */
- if(act) {
- if(extend==0) {
+ if (act) {
+ if (extend==0) {
/* Deselect all existing metaelems */
ml= mb->editelems->first;
- while(ml) {
+ while (ml) {
ml->flag &= ~SELECT;
ml= ml->next;
}
@@ -478,7 +478,7 @@ int mouse_mball(bContext *C, const int mval[2], int extend)
act->flag |= SELECT;
}
else {
- if(act->flag & SELECT)
+ if (act->flag & SELECT)
act->flag &= ~SELECT;
else
act->flag |= SELECT;
@@ -502,10 +502,10 @@ static void freeMetaElemlist(ListBase *lb)
{
MetaElem *ml, *next;
- if(lb==NULL) return;
+ if (lb==NULL) return;
ml= lb->first;
- while(ml) {
+ while (ml) {
next= ml->next;
BLI_remlink(lb, ml);
MEM_freeN(ml);
@@ -526,7 +526,7 @@ static void undoMball_to_editMball(void *lbu, void *lbe, void *UNUSED(obe))
/* copy 'undo' MetaElems to 'edit' MetaElems */
ml= lb->first;
- while(ml) {
+ while (ml) {
newml= MEM_dupallocN(ml);
BLI_addtail(editelems, newml);
ml= ml->next;
@@ -546,7 +546,7 @@ static void *editMball_to_undoMball(void *lbe, void *UNUSED(obe))
/* copy contents of current ListBase to the undo ListBase */
ml= editelems->first;
- while(ml) {
+ while (ml) {
newml= MEM_dupallocN(ml);
BLI_addtail(lb, newml);
ml= ml->next;
@@ -566,7 +566,7 @@ static void free_undoMball(void *lbv)
static ListBase *metaball_get_editelems(Object *ob)
{
- if(ob && ob->type==OB_MBALL) {
+ if (ob && ob->type==OB_MBALL) {
struct MetaBall *mb= (struct MetaBall*)ob->data;
return mb->editelems;
}
diff --git a/source/blender/editors/metaball/mball_ops.c b/source/blender/editors/metaball/mball_ops.c
index f689fb049fe..5d019cc49d9 100644
--- a/source/blender/editors/metaball/mball_ops.c
+++ b/source/blender/editors/metaball/mball_ops.c
@@ -59,8 +59,8 @@ void ED_keymap_metaball(wmKeyConfig *keyconf)
wmKeyMap *keymap;
wmKeyMapItem *kmi;
- keymap= WM_keymap_find(keyconf, "Metaball", 0, 0);
- keymap->poll= ED_operator_editmball;
+ keymap = WM_keymap_find(keyconf, "Metaball", 0, 0);
+ keymap->poll = ED_operator_editmball;
WM_keymap_add_item(keymap, "OBJECT_OT_metaball_add", AKEY, KM_PRESS, KM_SHIFT, 0);
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 996dd4ca59f..3717591e412 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -123,7 +123,7 @@ void ED_object_location_from_view(bContext *C, float *loc)
void ED_object_rotation_from_view(bContext *C, float *rot)
{
RegionView3D *rv3d= CTX_wm_region_view3d(C);
- if(rv3d) {
+ if (rv3d) {
float quat[4];
copy_qt_qt(quat, rv3d->viewquat);
quat[0]= -quat[0];
@@ -174,7 +174,7 @@ float ED_object_new_primitive_matrix(bContext *C, Object *obedit, float *loc, fl
invert_m3_m3(imat, mat);
mul_m3_v3(imat, primmat[3]);
- if(v3d) return v3d->grid;
+ if (v3d) return v3d->grid;
return 1.0f;
}
@@ -193,7 +193,7 @@ void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode)
prop = RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view");
RNA_def_property_update_runtime(prop, view_align_update);
- if(do_editmode) {
+ if (do_editmode) {
prop = RNA_def_boolean(ot->srna, "enter_editmode", 0, "Enter Editmode",
"Enter editmode when adding this object");
RNA_def_property_flag(prop, PROP_HIDDEN|PROP_SKIP_SAVE);
@@ -212,23 +212,23 @@ void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode)
static void object_add_generic_invoke_options(bContext *C, wmOperator *op)
{
- if(RNA_struct_find_property(op->ptr, "enter_editmode")) /* optional */
+ if (RNA_struct_find_property(op->ptr, "enter_editmode")) /* optional */
if (!RNA_struct_property_is_set(op->ptr, "enter_editmode"))
RNA_boolean_set(op->ptr, "enter_editmode", U.flag & USER_ADD_EDITMODE);
- if(!RNA_struct_property_is_set(op->ptr, "location")) {
+ if (!RNA_struct_property_is_set(op->ptr, "location")) {
float loc[3];
ED_object_location_from_view(C, loc);
RNA_float_set_array(op->ptr, "location", loc);
}
- if(!RNA_struct_property_is_set(op->ptr, "layers")) {
+ if (!RNA_struct_property_is_set(op->ptr, "layers")) {
View3D *v3d = CTX_wm_view3d(C);
Scene *scene = CTX_data_scene(C);
int a, values[20], layer;
- if(v3d) {
+ if (v3d) {
layer = (v3d->scenelock && !v3d->localvd)? scene->layact: v3d->layact;
}
else {
@@ -257,15 +257,15 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc,
int view_align;
*enter_editmode = FALSE;
- if(RNA_struct_find_property(op->ptr, "enter_editmode") && RNA_boolean_get(op->ptr, "enter_editmode")) {
+ if (RNA_struct_find_property(op->ptr, "enter_editmode") && RNA_boolean_get(op->ptr, "enter_editmode")) {
*enter_editmode = TRUE;
}
- if(RNA_struct_property_is_set(op->ptr, "layers")) {
+ if (RNA_struct_property_is_set(op->ptr, "layers")) {
RNA_boolean_get_array(op->ptr, "layers", layer_values);
*layer= 0;
- for(a=0; a<20; a++) {
- if(layer_values[a])
+ for (a=0; a<20; a++) {
+ if (layer_values[a])
*layer |= (1 << a);
else
*layer &= ~(1 << a);
@@ -279,10 +279,10 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc,
/* in local view we additionally add local view layers,
* not part of operator properties */
- if(v3d && v3d->localvd)
+ if (v3d && v3d->localvd)
*layer |= v3d->lay;
- if(RNA_struct_property_is_set(op->ptr, "rotation"))
+ if (RNA_struct_property_is_set(op->ptr, "rotation"))
view_align = FALSE;
else if (RNA_struct_property_is_set(op->ptr, "view_align"))
view_align = RNA_boolean_get(op->ptr, "view_align");
@@ -303,7 +303,7 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc,
RNA_float_get_array(op->ptr, "location", loc);
- if(*layer == 0) {
+ if (*layer == 0) {
BKE_report(op->reports, RPT_ERROR, "Property 'layer' has no values set");
return 0;
}
@@ -339,7 +339,7 @@ Object *ED_object_add_type(bContext *C, int type, float *loc, float *rot,
ED_render_id_flush_update(bmain, ob->data);
}
- if(enter_editmode)
+ if (enter_editmode)
ED_object_enter_editmode(C, EM_IGNORE_LAYER);
WM_event_add_notifier(C, NC_SCENE|ND_LAYER_CONTENT, scene);
@@ -354,7 +354,7 @@ static int object_add_exec(bContext *C, wmOperator *op)
unsigned int layer;
float loc[3], rot[3];
- if(!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
+ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
ED_object_add_type(C, RNA_enum_get(op->ptr, "type"), loc, rot, enter_editmode, layer);
@@ -365,18 +365,18 @@ static int object_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Object";
+ ot->name = "Add Object";
ot->description = "Add an object to the scene";
- ot->idname= "OBJECT_OT_add";
+ ot->idname = "OBJECT_OT_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= object_add_exec;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = object_add_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", object_type_items, 0, "Type", "");
@@ -411,10 +411,10 @@ static Object *effector_add_type(bContext *C, wmOperator *op, int type)
object_add_generic_invoke_options(C, op);
- if(!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
+ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return NULL;
- if(type==PFIELD_GUIDE) {
+ if (type==PFIELD_GUIDE) {
ob= ED_object_add_type(C, OB_CURVE, loc, rot, FALSE, layer);
rename_id(&ob->id, "CurveGuide");
@@ -423,7 +423,7 @@ static Object *effector_add_type(bContext *C, wmOperator *op, int type)
ED_object_new_primitive_matrix(C, ob, loc, rot, mat);
BLI_addtail(object_editcurve_get(ob), add_nurbs_primitive(C, mat, CU_NURBS|CU_PRIM_PATH, 1));
- if(!enter_editmode)
+ if (!enter_editmode)
ED_object_exit_editmode(C, EM_FREEDATA);
}
else {
@@ -448,7 +448,7 @@ static Object *effector_add_type(bContext *C, wmOperator *op, int type)
/* for object add operator */
static int effector_add_exec(bContext *C, wmOperator *op)
{
- if(effector_add_type(C, op, RNA_enum_get(op->ptr, "type")) == NULL)
+ if (effector_add_type(C, op, RNA_enum_get(op->ptr, "type")) == NULL)
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
@@ -457,20 +457,20 @@ static int effector_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_effector_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Effector";
+ ot->name = "Add Effector";
ot->description = "Add an empty object with a physics effector to the scene";
- ot->idname= "OBJECT_OT_effector_add";
+ ot->idname = "OBJECT_OT_effector_add";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= effector_add_exec;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = effector_add_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
- ot->prop= RNA_def_enum(ot->srna, "type", field_type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", field_type_items, 0, "Type", "");
ED_object_add_generic_props(ot, TRUE);
}
@@ -491,7 +491,7 @@ static int object_camera_add_exec(bContext *C, wmOperator *op)
object_add_generic_invoke_options(C, op);
- if(!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
+ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
ob= ED_object_add_type(C, OB_CAMERA, loc, rot, FALSE, layer);
@@ -512,16 +512,16 @@ void OBJECT_OT_camera_add(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Add Camera";
+ ot->name = "Add Camera";
ot->description = "Add a camera object to the scene";
- ot->idname= "OBJECT_OT_camera_add";
+ ot->idname = "OBJECT_OT_camera_add";
/* api callbacks */
- ot->exec= object_camera_add_exec;
- ot->poll= ED_operator_objectmode;
+ ot->exec = object_camera_add_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
@@ -545,10 +545,10 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op)
object_add_generic_invoke_options(C, op); // XXX these props don't get set right when only exec() is called
- if(!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
+ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
- if(obedit==NULL || obedit->type!=OB_MBALL) {
+ if (obedit==NULL || obedit->type!=OB_MBALL) {
obedit= ED_object_add_type(C, OB_MBALL, loc, rot, TRUE, layer);
newob = 1;
}
@@ -578,7 +578,7 @@ static int object_metaball_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
pup= uiPupMenuBegin(C, op->type->name, ICON_NONE);
layout= uiPupMenuLayout(pup);
- if(!obedit || obedit->type == OB_MBALL)
+ if (!obedit || obedit->type == OB_MBALL)
uiItemsEnumO(layout, op->type->idname, "type");
else
uiItemsEnumO(layout, "OBJECT_OT_metaball_add", "type");
@@ -590,17 +590,17 @@ static int object_metaball_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
void OBJECT_OT_metaball_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Metaball";
- ot->description= "Add an metaball object to the scene";
- ot->idname= "OBJECT_OT_metaball_add";
+ ot->name = "Add Metaball";
+ ot->description = "Add an metaball object to the scene";
+ ot->idname = "OBJECT_OT_metaball_add";
/* api callbacks */
- ot->invoke= object_metaball_add_invoke;
- ot->exec= object_metaball_add_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->invoke = object_metaball_add_invoke;
+ ot->exec = object_metaball_add_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", metaelem_type_items, 0, "Primitive", "");
ED_object_add_generic_props(ot, TRUE);
@@ -614,10 +614,10 @@ static int object_add_text_exec(bContext *C, wmOperator *op)
float loc[3], rot[3];
object_add_generic_invoke_options(C, op); // XXX these props don't get set right when only exec() is called
- if(!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
+ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
- if(obedit && obedit->type==OB_FONT)
+ if (obedit && obedit->type==OB_FONT)
return OPERATOR_CANCELLED;
obedit= ED_object_add_type(C, OB_FONT, loc, rot, enter_editmode, layer);
@@ -630,17 +630,17 @@ static int object_add_text_exec(bContext *C, wmOperator *op)
void OBJECT_OT_text_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Text";
+ ot->name = "Add Text";
ot->description = "Add a text object to the scene";
- ot->idname= "OBJECT_OT_text_add";
+ ot->idname = "OBJECT_OT_text_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= object_add_text_exec;
- ot->poll= ED_operator_objectmode;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = object_add_text_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -655,7 +655,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op)
float loc[3], rot[3];
object_add_generic_invoke_options(C, op); // XXX these props don't get set right when only exec() is called
- if(!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
+ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
if ((obedit==NULL) || (obedit->type != OB_ARMATURE)) {
@@ -665,7 +665,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op)
}
else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
- if(obedit==NULL) {
+ if (obedit==NULL) {
BKE_report(op->reports, RPT_ERROR, "Cannot create editmode armature");
return OPERATOR_CANCELLED;
}
@@ -685,17 +685,17 @@ static int object_armature_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_armature_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Armature";
+ ot->name = "Add Armature";
ot->description = "Add an armature object to the scene";
- ot->idname= "OBJECT_OT_armature_add";
+ ot->idname = "OBJECT_OT_armature_add";
/* api callbacks */
- ot->invoke= ED_object_add_generic_invoke;
- ot->exec= object_armature_add_exec;
- ot->poll= ED_operator_objectmode;
+ ot->invoke = ED_object_add_generic_invoke;
+ ot->exec = object_armature_add_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -723,7 +723,7 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op)
float loc[3], rot[3];
object_add_generic_invoke_options(C, op);
- if(!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
+ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
ob= ED_object_add_type(C, OB_LAMP, loc, rot, FALSE, layer);
@@ -733,7 +733,7 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op)
rename_id(&ob->id, get_lamp_defname(type));
rename_id(&la->id, get_lamp_defname(type));
- if(scene_use_new_shading_nodes(scene)) {
+ if (scene_use_new_shading_nodes(scene)) {
ED_node_shader_default(scene, &la->id);
la->use_nodes= 1;
}
@@ -752,20 +752,20 @@ void OBJECT_OT_lamp_add(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Add Lamp";
+ ot->name = "Add Lamp";
ot->description = "Add a lamp object to the scene";
- ot->idname= "OBJECT_OT_lamp_add";
+ ot->idname = "OBJECT_OT_lamp_add";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_lamp_add_exec;
- ot->poll= ED_operator_objectmode;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = object_lamp_add_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", "");
ED_object_add_generic_props(ot, FALSE);
}
@@ -779,10 +779,10 @@ static int group_instance_add_exec(bContext *C, wmOperator *op)
float loc[3], rot[3];
object_add_generic_invoke_options(C, op);
- if(!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
+ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
- if(group) {
+ 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);
@@ -811,7 +811,7 @@ static int object_speaker_add_exec(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
object_add_generic_invoke_options(C, op);
- if(!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
+ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL))
return OPERATOR_CANCELLED;
ob= ED_object_add_type(C, OB_SPEAKER, loc, rot, FALSE, layer);
@@ -843,16 +843,16 @@ static int object_speaker_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_speaker_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Speaker";
+ ot->name = "Add Speaker";
ot->description = "Add a speaker object to the scene";
- ot->idname= "OBJECT_OT_speaker_add";
+ ot->idname = "OBJECT_OT_speaker_add";
/* api callbacks */
- ot->exec= object_speaker_add_exec;
- ot->poll= ED_operator_objectmode;
+ ot->exec = object_speaker_add_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
ED_object_add_generic_props(ot, TRUE);
}
@@ -863,23 +863,23 @@ void OBJECT_OT_group_instance_add(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Add Group Instance";
+ ot->name = "Add Group Instance";
ot->description = "Add a dupligroup instance";
- ot->idname= "OBJECT_OT_group_instance_add";
+ ot->idname = "OBJECT_OT_group_instance_add";
/* api callbacks */
- ot->invoke= WM_enum_search_invoke;
- ot->exec= group_instance_add_exec;
+ ot->invoke = WM_enum_search_invoke;
+ ot->exec = group_instance_add_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", "");
RNA_def_enum_funcs(prop, RNA_group_itemf);
- ot->prop= prop;
+ ot->prop = prop;
ED_object_add_generic_props(ot, FALSE);
}
@@ -892,7 +892,7 @@ void ED_base_object_free_and_unlink(Main *bmain, Scene *scene, Base *base)
DAG_id_type_tag(bmain, ID_OB);
BLI_remlink(&scene->base, base);
free_libblock_us(&bmain->object, base->object);
- if(scene->basact==base) scene->basact= NULL;
+ if (scene->basact==base) scene->basact= NULL;
MEM_freeN(base);
}
@@ -903,12 +903,12 @@ static int object_delete_exec(bContext *C, wmOperator *op)
const short use_global= RNA_boolean_get(op->ptr, "use_global");
/* int islamp= 0; */ /* UNUSED */
- if(CTX_data_edit_object(C))
+ if (CTX_data_edit_object(C))
return OPERATOR_CANCELLED;
CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
- /* if(base->object->type==OB_LAMP) islamp= 1; */
+ /* if (base->object->type==OB_LAMP) islamp= 1; */
/* deselect object -- it could be used in other scenes */
base->object->flag &= ~SELECT;
@@ -946,17 +946,17 @@ static int object_delete_exec(bContext *C, wmOperator *op)
void OBJECT_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete";
+ ot->name = "Delete";
ot->description = "Delete selected objects";
- ot->idname= "OBJECT_OT_delete";
+ ot->idname = "OBJECT_OT_delete";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= object_delete_exec;
- ot->poll= ED_operator_objectmode;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = object_delete_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "use_global", 0, "Delete Globally", "Remove object from all scenes");
}
@@ -978,18 +978,18 @@ static void copy_object_set_idnew(bContext *C, int dupflag)
CTX_DATA_END;
/* materials */
- if( dupflag & USER_DUP_MAT) {
+ if ( dupflag & USER_DUP_MAT) {
mao= bmain->mat.first;
- while(mao) {
- if(mao->id.newid) {
+ while (mao) {
+ if (mao->id.newid) {
ma= (Material *)mao->id.newid;
- if(dupflag & USER_DUP_TEX) {
- for(a=0; a<MAX_MTEX; a++) {
- if(ma->mtex[a]) {
+ if (dupflag & USER_DUP_TEX) {
+ for (a=0; a<MAX_MTEX; a++) {
+ if (ma->mtex[a]) {
id= (ID *)ma->mtex[a]->tex;
- if(id) {
+ if (id) {
ID_NEW_US(ma->mtex[a]->tex)
else ma->mtex[a]->tex= copy_texture(ma->mtex[a]->tex);
id->us--;
@@ -999,7 +999,7 @@ static void copy_object_set_idnew(bContext *C, int dupflag)
}
#if 0 // XXX old animation system
id= (ID *)ma->ipo;
- if(id) {
+ if (id) {
ID_NEW_US(ma->ipo)
else ma->ipo= copy_ipo(ma->ipo);
id->us--;
@@ -1012,13 +1012,13 @@ static void copy_object_set_idnew(bContext *C, int dupflag)
#if 0 // XXX old animation system
/* lamps */
- if( dupflag & USER_DUP_IPO) {
+ if ( dupflag & USER_DUP_IPO) {
Lamp *la= bmain->lamp.first;
- while(la) {
- if(la->id.newid) {
+ while (la) {
+ if (la->id.newid) {
Lamp *lan= (Lamp *)la->id.newid;
id= (ID *)lan->ipo;
- if(id) {
+ if (id) {
ID_NEW_US(lan->ipo)
else lan->ipo= copy_ipo(lan->ipo);
id->us--;
@@ -1030,12 +1030,12 @@ static void copy_object_set_idnew(bContext *C, int dupflag)
/* ipos */
ipo= bmain->ipo.first;
- while(ipo) {
- if(ipo->id.lib==NULL && ipo->id.newid) {
+ while (ipo) {
+ if (ipo->id.lib==NULL && ipo->id.newid) {
Ipo *ipon= (Ipo *)ipo->id.newid;
IpoCurve *icu;
- for(icu= ipon->curve.first; icu; icu= icu->next) {
- if(icu->driver) {
+ for (icu= ipon->curve.first; icu; icu= icu->next) {
+ if (icu->driver) {
ID_NEW(icu->driver->ob);
}
}
@@ -1059,23 +1059,23 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
DupliObject *dob;
GHash *dupli_gh= NULL, *parent_gh= NULL;
- if(!(base->object->transflag & OB_DUPLI))
+ if (!(base->object->transflag & OB_DUPLI))
return;
lb= object_duplilist(scene, base->object);
- if(use_hierarchy || use_base_parent) {
+ if (use_hierarchy || use_base_parent) {
dupli_gh= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "make_object_duplilist_real dupli_gh");
parent_gh= BLI_ghash_new(BLI_ghashutil_pairhash, BLI_ghashutil_paircmp, "make_object_duplilist_real parent_gh");
}
- for(dob= lb->first; dob; dob= dob->next) {
+ for (dob= lb->first; dob; dob= dob->next) {
Base *basen;
Object *ob= copy_object(dob->ob);
/* font duplis can have a totcol without material, we get them from parent
* should be implemented better...
*/
- if(ob->mat==NULL) ob->totcol= 0;
+ if (ob->mat==NULL) ob->totcol= 0;
basen= MEM_dupallocN(base);
basen->flag &= ~(OB_FROMDUPLI|OB_FROMGROUP);
@@ -1097,14 +1097,14 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
copy_m4_m4(ob->obmat, dob->mat);
object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
- if(dupli_gh)
+ if (dupli_gh)
BLI_ghash_insert(dupli_gh, dob, ob);
- if(parent_gh)
+ if (parent_gh)
BLI_ghash_insert(parent_gh, BLI_ghashutil_pairalloc(dob->ob, dob->index), ob);
}
if (use_hierarchy) {
- for(dob= lb->first; dob; dob= dob->next) {
+ for (dob= lb->first; dob; dob= dob->next) {
/* original parents */
Object *ob_src= dob->ob;
Object *ob_src_par= ob_src->parent;
@@ -1113,7 +1113,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
Object *ob_dst_par= NULL;
/* find parent that was also made real */
- if(ob_src_par) {
+ if (ob_src_par) {
GHashPair *pair = BLI_ghashutil_pairalloc(ob_src_par, dob->index);
ob_dst_par = BLI_ghash_lookup(parent_gh, pair);
BLI_ghashutil_pairfree(pair);
@@ -1151,7 +1151,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
else if (use_base_parent) {
/* since we are ignoring the internal hierarchy - parent all to the
* base object */
- for(dob= lb->first; dob; dob= dob->next) {
+ for (dob= lb->first; dob; dob= dob->next) {
/* original parents */
Object *ob_dst= BLI_ghash_lookup(dupli_gh, dob);
@@ -1167,9 +1167,9 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
}
}
- if(dupli_gh)
+ if (dupli_gh)
BLI_ghash_free(dupli_gh, NULL, NULL);
- if(parent_gh)
+ if (parent_gh)
BLI_ghash_free(parent_gh, BLI_ghashutil_pairfree, NULL);
copy_object_set_idnew(C, 0);
@@ -1209,17 +1209,17 @@ void OBJECT_OT_duplicates_make_real(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Duplicates Real";
+ ot->name = "Make Duplicates Real";
ot->description = "Make dupli objects attached to this object real";
- ot->idname= "OBJECT_OT_duplicates_make_real";
+ ot->idname = "OBJECT_OT_duplicates_make_real";
/* api callbacks */
- ot->exec= object_duplicates_make_real_exec;
+ ot->exec = object_duplicates_make_real_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "use_base_parent", 0, "Parent", "Parent newly created objects to the original duplicator");
RNA_def_boolean(ot->srna, "use_hierarchy", 0, "Keep Hierarchy", "Maintain parent child relationships");
@@ -1234,12 +1234,12 @@ static EnumPropertyItem convert_target_items[]= {
static void curvetomesh(Scene *scene, Object *ob)
{
- if(ob->disp.first == NULL)
+ if (ob->disp.first == NULL)
makeDispListCurveTypes(scene, ob, 0); /* force creation */
nurbs_to_mesh(ob); /* also does users */
- if(ob->type == OB_MESH)
+ if (ob->type == OB_MESH)
object_free_modifiers(ob);
}
@@ -1299,7 +1299,7 @@ static int convert_exec(bContext *C, wmOperator *op)
ob->flag &= ~OB_DONE;
/* flag data thats not been edited (only needed for !keep_original) */
- if(ob->data) {
+ if (ob->data) {
((ID *)ob->data)->flag |= LIB_DOIT;
}
}
@@ -1308,17 +1308,17 @@ static int convert_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
ob= base->object;
- if(ob->flag & OB_DONE || !IS_TAGGED(ob->data)) {
+ if (ob->flag & OB_DONE || !IS_TAGGED(ob->data)) {
if (ob->type != target) {
base->flag &= ~SELECT;
ob->flag &= ~SELECT;
}
/* obdata already modified */
- if(!IS_TAGGED(ob->data)) {
+ if (!IS_TAGGED(ob->data)) {
/* When 2 objects with linked data are selected, converting both
* would keep modifiers on all but the converted object [#26003] */
- if(ob->type == OB_MESH) {
+ if (ob->type == OB_MESH) {
object_free_modifiers(ob); /* after derivedmesh calls! */
}
}
@@ -1336,16 +1336,17 @@ static int convert_exec(bContext *C, wmOperator *op)
/* make a new copy of the mesh */
newob->data= copy_mesh(me);
- } else {
+ }
+ else {
newob = ob;
}
mesh_to_curve(scene, newob);
- if(newob->type==OB_CURVE)
+ if (newob->type==OB_CURVE)
object_free_modifiers(newob); /* after derivedmesh calls! */
}
- else if(ob->type==OB_MESH && ob->modifiers.first) { /* converting a mesh with no modifiers causes a segfault */
+ else if (ob->type==OB_MESH && ob->modifiers.first) { /* converting a mesh with no modifiers causes a segfault */
ob->flag |= OB_DONE;
if (keep_original) {
@@ -1358,7 +1359,8 @@ static int convert_exec(bContext *C, wmOperator *op)
/* make a new copy of the mesh */
newob->data= copy_mesh(me);
- } else {
+ }
+ else {
newob = ob;
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
}
@@ -1377,7 +1379,7 @@ static int convert_exec(bContext *C, wmOperator *op)
dm->release(dm);
object_free_modifiers(newob); /* after derivedmesh calls! */
}
- else if(ob->type==OB_FONT) {
+ else if (ob->type==OB_FONT) {
ob->flag |= OB_DONE;
if (keep_original) {
@@ -1389,7 +1391,8 @@ static int convert_exec(bContext *C, wmOperator *op)
/* make a new copy of the curve */
newob->data= copy_curve(ob->data);
- } else {
+ }
+ else {
newob= ob;
}
@@ -1401,28 +1404,28 @@ static int convert_exec(bContext *C, wmOperator *op)
newob->type= OB_CURVE;
cu->type= OB_CURVE;
- if(cu->vfont) {
+ if (cu->vfont) {
cu->vfont->id.us--;
cu->vfont= NULL;
}
- if(cu->vfontb) {
+ if (cu->vfontb) {
cu->vfontb->id.us--;
cu->vfontb= NULL;
}
- if(cu->vfonti) {
+ if (cu->vfonti) {
cu->vfonti->id.us--;
cu->vfonti= NULL;
}
- if(cu->vfontbi) {
+ if (cu->vfontbi) {
cu->vfontbi->id.us--;
cu->vfontbi= NULL;
}
if (!keep_original) {
/* other users */
- if(cu->id.us>1) {
- for(ob1= bmain->object.first; ob1; ob1=ob1->id.next) {
- if(ob1->data==ob->data) {
+ if (cu->id.us>1) {
+ for (ob1= bmain->object.first; ob1; ob1=ob1->id.next) {
+ if (ob1->data==ob->data) {
ob1->type= OB_CURVE;
ob1->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
}
@@ -1430,20 +1433,20 @@ static int convert_exec(bContext *C, wmOperator *op)
}
}
- for(nu=cu->nurb.first; nu; nu=nu->next)
+ for (nu=cu->nurb.first; nu; nu=nu->next)
nu->charidx= 0;
- if(target == OB_MESH) {
+ if (target == OB_MESH) {
curvetomesh(scene, newob);
/* meshes doesn't use displist */
freedisplist(&newob->disp);
}
}
- else if(ELEM(ob->type, OB_CURVE, OB_SURF)) {
+ else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
ob->flag |= OB_DONE;
- if(target == OB_MESH) {
+ if (target == OB_MESH) {
if (keep_original) {
basen= duplibase_for_convert(scene, base, NULL);
newob= basen->object;
@@ -1453,7 +1456,8 @@ static int convert_exec(bContext *C, wmOperator *op)
/* make a new copy of the curve */
newob->data= copy_curve(ob->data);
- } else {
+ }
+ else {
newob= ob;
/* meshes doesn't use displist */
@@ -1463,7 +1467,7 @@ static int convert_exec(bContext *C, wmOperator *op)
curvetomesh(scene, newob);
}
}
- else if(ob->type==OB_MBALL && target == OB_MESH) {
+ else if (ob->type==OB_MBALL && target == OB_MESH) {
Object *baseob;
base->flag &= ~SELECT;
@@ -1480,7 +1484,7 @@ static int convert_exec(bContext *C, wmOperator *op)
makeDispListMBall(scene, baseob);
}
- if(!(baseob->flag & OB_DONE)) {
+ if (!(baseob->flag & OB_DONE)) {
baseob->flag |= OB_DONE;
basen= duplibase_for_convert(scene, base, baseob);
@@ -1494,9 +1498,9 @@ static int convert_exec(bContext *C, wmOperator *op)
me= newob->data;
me->totcol= mb->totcol;
- if(newob->totcol) {
+ if (newob->totcol) {
me->mat= MEM_dupallocN(mb->mat);
- for(a=0; a<newob->totcol; a++) id_us_plus((ID *)me->mat[a]);
+ for (a=0; a<newob->totcol; a++) id_us_plus((ID *)me->mat[a]);
}
mball_to_mesh(&baseob->disp, newob->data);
@@ -1515,8 +1519,8 @@ static int convert_exec(bContext *C, wmOperator *op)
/* tag obdata if it was been changed */
/* If the original object is active then make this object active */
- if(basen) {
- if(ob == obact) {
+ if (basen) {
+ if (ob == obact) {
/* store new active base to update BASACT */
basact= basen;
}
@@ -1530,8 +1534,8 @@ static int convert_exec(bContext *C, wmOperator *op)
}
/* delete original if needed */
- if(basedel) {
- if(!keep_original)
+ if (basedel) {
+ if (!keep_original)
ED_base_object_free_and_unlink(bmain, scene, basedel);
basedel = NULL;
@@ -1539,7 +1543,7 @@ static int convert_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- if(!keep_original) {
+ if (!keep_original) {
if (mballConverted) {
Base *base= scene->base.first, *tmpbase;
while (base) {
@@ -1564,7 +1568,8 @@ static int convert_exec(bContext *C, wmOperator *op)
/* active base was changed */
ED_base_object_activate(C, basact);
BASACT= basact;
- } else if (BASACT->object->flag & OB_DONE) {
+ }
+ else if (BASACT->object->flag & OB_DONE) {
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, BASACT->object);
WM_event_add_notifier(C, NC_OBJECT|ND_DATA, BASACT->object);
}
@@ -1580,20 +1585,20 @@ static int convert_exec(bContext *C, wmOperator *op)
void OBJECT_OT_convert(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Convert to";
+ ot->name = "Convert to";
ot->description = "Convert selected objects to another type";
- ot->idname= "OBJECT_OT_convert";
+ ot->idname = "OBJECT_OT_convert";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= convert_exec;
- ot->poll= convert_poll;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = convert_exec;
+ ot->poll = convert_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "target", convert_target_items, OB_MESH, "Target", "Type of object to convert to");
+ ot->prop = RNA_def_enum(ot->srna, "target", convert_target_items, OB_MESH, "Target", "Type of object to convert to");
RNA_def_boolean(ot->srna, "keep_original", 0, "Keep Original", "Keep original objects instead of replacing them");
}
@@ -1616,7 +1621,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
int a, didit;
ob= base->object;
- if(ob->mode & OB_MODE_POSE) {
+ if (ob->mode & OB_MODE_POSE) {
; /* nothing? */
}
else {
@@ -1628,42 +1633,42 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
BLI_addhead(&scene->base, basen); /* addhead: prevent eternal loop */
basen->object= obn;
- if(basen->flag & OB_FROMGROUP) {
+ if (basen->flag & OB_FROMGROUP) {
Group *group;
- for(group= bmain->group.first; group; group= group->id.next) {
- if(object_in_group(ob, group))
+ for (group= bmain->group.first; group; group= group->id.next) {
+ if (object_in_group(ob, group))
add_to_group(group, obn, scene, basen);
}
}
/* duplicates using userflags */
- if(dupflag & USER_DUP_ACT) {
+ if (dupflag & USER_DUP_ACT) {
BKE_copy_animdata_id_action(&obn->id);
}
- if(dupflag & USER_DUP_MAT) {
- for(a=0; a<obn->totcol; a++) {
+ if (dupflag & USER_DUP_MAT) {
+ for (a=0; a<obn->totcol; a++) {
id= (ID *)obn->mat[a];
- if(id) {
+ if (id) {
ID_NEW_US(obn->mat[a])
else obn->mat[a]= copy_material(obn->mat[a]);
id->us--;
- if(dupflag & USER_DUP_ACT) {
+ if (dupflag & USER_DUP_ACT) {
BKE_copy_animdata_id_action(&obn->mat[a]->id);
}
}
}
}
- if(dupflag & USER_DUP_PSYS) {
+ if (dupflag & USER_DUP_PSYS) {
ParticleSystem *psys;
- for(psys=obn->particlesystem.first; psys; psys=psys->next) {
+ for (psys=obn->particlesystem.first; psys; psys=psys->next) {
id= (ID*) psys->part;
- if(id) {
+ if (id) {
ID_NEW_US(psys->part)
else psys->part= psys_copy_settings(psys->part);
- if(dupflag & USER_DUP_ACT) {
+ if (dupflag & USER_DUP_ACT) {
BKE_copy_animdata_id_action(&psys->part->id);
}
@@ -1677,12 +1682,12 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
switch(obn->type) {
case OB_MESH:
- if(dupflag & USER_DUP_MESH) {
+ if (dupflag & USER_DUP_MESH) {
ID_NEW_US2( obn->data )
else {
obn->data= copy_mesh(obn->data);
- if(obn->fluidsimSettings) {
+ if (obn->fluidsimSettings) {
obn->fluidsimSettings->orgMesh = (Mesh *)obn->data;
}
@@ -1692,7 +1697,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
}
break;
case OB_CURVE:
- if(dupflag & USER_DUP_CURVE) {
+ if (dupflag & USER_DUP_CURVE) {
ID_NEW_US2(obn->data )
else {
obn->data= copy_curve(obn->data);
@@ -1702,7 +1707,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
}
break;
case OB_SURF:
- if(dupflag & USER_DUP_SURF) {
+ if (dupflag & USER_DUP_SURF) {
ID_NEW_US2( obn->data )
else {
obn->data= copy_curve(obn->data);
@@ -1712,7 +1717,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
}
break;
case OB_FONT:
- if(dupflag & USER_DUP_FONT) {
+ if (dupflag & USER_DUP_FONT) {
ID_NEW_US2( obn->data )
else {
obn->data= copy_curve(obn->data);
@@ -1722,7 +1727,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
}
break;
case OB_MBALL:
- if(dupflag & USER_DUP_MBALL) {
+ if (dupflag & USER_DUP_MBALL) {
ID_NEW_US2(obn->data )
else {
obn->data= copy_mball(obn->data);
@@ -1732,7 +1737,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
}
break;
case OB_LAMP:
- if(dupflag & USER_DUP_LAMP) {
+ if (dupflag & USER_DUP_LAMP) {
ID_NEW_US2(obn->data )
else {
obn->data= copy_lamp(obn->data);
@@ -1744,9 +1749,9 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
case OB_ARMATURE:
obn->recalc |= OB_RECALC_DATA;
- if(obn->pose) obn->pose->flag |= POSE_RECALC;
+ if (obn->pose) obn->pose->flag |= POSE_RECALC;
- if(dupflag & USER_DUP_ARM) {
+ if (dupflag & USER_DUP_ARM) {
ID_NEW_US2(obn->data )
else {
obn->data= copy_armature(obn->data);
@@ -1759,7 +1764,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
break;
case OB_LATTICE:
- if(dupflag!=0) {
+ if (dupflag!=0) {
ID_NEW_US2(obn->data )
else {
obn->data= copy_lattice(obn->data);
@@ -1769,7 +1774,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
}
break;
case OB_CAMERA:
- if(dupflag!=0) {
+ if (dupflag!=0) {
ID_NEW_US2(obn->data )
else {
obn->data= copy_camera(obn->data);
@@ -1779,7 +1784,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
}
break;
case OB_SPEAKER:
- if(dupflag!=0) {
+ if (dupflag!=0) {
ID_NEW_US2(obn->data )
else {
obn->data= copy_speaker(obn->data);
@@ -1792,34 +1797,34 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
}
/* check if obdata is copied */
- if(didit) {
+ if (didit) {
Key *key = ob_get_key(obn);
- if(dupflag & USER_DUP_ACT) {
+ if (dupflag & USER_DUP_ACT) {
bActuator *act;
BKE_copy_animdata_id_action((ID *)obn->data);
- if(key) {
+ if (key) {
BKE_copy_animdata_id_action((ID*)key);
}
/* Update the duplicated action in the action actuators */
for (act = obn->actuators.first; act; act = act->next) {
- if(act->type == ACT_ACTION) {
+ if (act->type == ACT_ACTION) {
bActionActuator* actact = (bActionActuator*) act->data;
- if(ob->adt && actact->act == ob->adt->action) {
+ if (ob->adt && actact->act == ob->adt->action) {
actact->act = obn->adt->action;
}
}
}
}
- if(dupflag & USER_DUP_MAT) {
+ if (dupflag & USER_DUP_MAT) {
matarar= give_matarar(obn);
- if(matarar) {
- for(a=0; a<obn->totcol; a++) {
+ if (matarar) {
+ for (a=0; a<obn->totcol; a++) {
id= (ID *)(*matarar)[a];
- if(id) {
+ if (id) {
ID_NEW_US( (*matarar)[a] )
else (*matarar)[a]= copy_material((*matarar)[a]);
@@ -1886,10 +1891,10 @@ static int duplicate_exec(bContext *C, wmOperator *op)
}
/* new object becomes active */
- if(BASACT==base)
+ if (BASACT==base)
ED_base_object_activate(C, basen);
- if(basen->object->data) {
+ if (basen->object->data) {
DAG_id_tag_update(basen->object->data, 0);
}
}
@@ -1910,16 +1915,16 @@ void OBJECT_OT_duplicate(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Duplicate Objects";
+ ot->name = "Duplicate Objects";
ot->description = "Duplicate selected objects";
- ot->idname= "OBJECT_OT_duplicate";
+ ot->idname = "OBJECT_OT_duplicate";
/* api callbacks */
- ot->exec= duplicate_exec;
- ot->poll= ED_operator_objectmode;
+ ot->exec = duplicate_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* to give to transform */
RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data");
@@ -1943,7 +1948,7 @@ static int add_named_exec(bContext *C, wmOperator *op)
/* find object, create fake base */
RNA_string_get(op->ptr, "name", name);
ob= (Object *)find_id("OB", name);
- if(ob==NULL)
+ if (ob==NULL)
return OPERATOR_CANCELLED;
base= MEM_callocN(sizeof(Base), "duplibase");
@@ -1981,16 +1986,16 @@ static int add_named_exec(bContext *C, wmOperator *op)
void OBJECT_OT_add_named(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Named Object";
+ ot->name = "Add Named Object";
ot->description = "Add named object";
- ot->idname= "OBJECT_OT_add_named";
+ ot->idname = "OBJECT_OT_add_named";
/* api callbacks */
- ot->exec= add_named_exec;
- ot->poll= ED_operator_objectmode;
+ ot->exec = add_named_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data");
RNA_def_string(ot->srna, "name", "Cube", MAX_ID_NAME-2, "Name", "Object name to add");
@@ -2017,20 +2022,20 @@ static int join_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- if(scene->obedit) {
+ if (scene->obedit) {
BKE_report(op->reports, RPT_ERROR, "This data does not support joining in editmode");
return OPERATOR_CANCELLED;
}
- else if(object_data_is_libdata(ob)) {
+ else if (object_data_is_libdata(ob)) {
BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata");
return OPERATOR_CANCELLED;
}
- if(ob->type == OB_MESH)
+ if (ob->type == OB_MESH)
return join_mesh_exec(C, op);
- else if(ELEM(ob->type, OB_CURVE, OB_SURF))
+ else if (ELEM(ob->type, OB_CURVE, OB_SURF))
return join_curve_exec(C, op);
- else if(ob->type == OB_ARMATURE)
+ else if (ob->type == OB_ARMATURE)
return join_armature_exec(C, op);
return OPERATOR_CANCELLED;
@@ -2039,16 +2044,16 @@ static int join_exec(bContext *C, wmOperator *op)
void OBJECT_OT_join(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Join";
+ ot->name = "Join";
ot->description = "Join selected objects into active object";
- ot->idname= "OBJECT_OT_join";
+ ot->idname = "OBJECT_OT_join";
/* api callbacks */
- ot->exec= join_exec;
- ot->poll= join_poll;
+ ot->exec = join_exec;
+ ot->poll = join_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/**************************** Join as Shape Key*************************/
@@ -2070,16 +2075,16 @@ static int join_shapes_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- if(scene->obedit) {
+ if (scene->obedit) {
BKE_report(op->reports, RPT_ERROR, "This data does not support joining in editmode");
return OPERATOR_CANCELLED;
}
- else if(object_data_is_libdata(ob)) {
+ else if (object_data_is_libdata(ob)) {
BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata");
return OPERATOR_CANCELLED;
}
- if(ob->type == OB_MESH)
+ if (ob->type == OB_MESH)
return join_mesh_shapes_exec(C, op);
return OPERATOR_CANCELLED;
@@ -2088,14 +2093,14 @@ static int join_shapes_exec(bContext *C, wmOperator *op)
void OBJECT_OT_join_shapes(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Join as Shapes";
+ ot->name = "Join as Shapes";
ot->description = "Merge selected objects to shapes of active object";
- ot->idname= "OBJECT_OT_join_shapes";
+ ot->idname = "OBJECT_OT_join_shapes";
/* api callbacks */
- ot->exec= join_shapes_exec;
- ot->poll= join_shapes_poll;
+ ot->exec = join_shapes_exec;
+ ot->poll = join_shapes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index b3629abc4e6..deefcfd6989 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -161,10 +161,11 @@ static void multiresbake_get_normal(const MResolvePixelData *data, float norm[],
data->mface[face_num].v3, data->mface[face_num].v4};
const int smoothnormal= (data->mface[face_num].flag & ME_SMOOTH);
- if(!smoothnormal) { /* flat */
- if(data->precomputed_normals) {
+ if (!smoothnormal) { /* flat */
+ if (data->precomputed_normals) {
copy_v3_v3(norm, &data->precomputed_normals[3*face_num]);
- } else {
+ }
+ else {
float nor[3];
float *p0, *p1, *p2;
const int iGetNrVerts= data->mface[face_num].v4!=0 ? 4 : 3;
@@ -173,16 +174,18 @@ static void multiresbake_get_normal(const MResolvePixelData *data, float norm[],
p1= data->mvert[indices[1]].co;
p2= data->mvert[indices[2]].co;
- if(iGetNrVerts==4) {
+ if (iGetNrVerts==4) {
float *p3= data->mvert[indices[3]].co;
normal_quad_v3(nor, p0, p1, p2, p3);
- } else {
+ }
+ else {
normal_tri_v3(nor, p0, p1, p2);
}
copy_v3_v3(norm, nor);
}
- } else {
+ }
+ else {
short *no= data->mvert[indices[vert_index]].no;
normal_short_to_float_v3(norm, no);
@@ -239,7 +242,7 @@ static void flush_pixel(const MResolvePixelData *data, const int x, const int y)
/* this sequence of math is designed specifically as is with great care
* to be compatible with our shader. Please don't change without good reason. */
- for(r= 0; r<3; r++) {
+ for (r= 0; r<3; r++) {
from_tang[0][r]= tang0[r]*u + tang1[r]*v + tang2[r]*w;
from_tang[2][r]= no0[r]*u + no1[r]*v + no2[r]*w;
}
@@ -258,8 +261,8 @@ static void set_rast_triangle(const MBakeRast *bake_rast, const int x, const int
const int w= bake_rast->w;
const int h= bake_rast->h;
- if(x>=0 && x<w && y>=0 && y<h) {
- if((bake_rast->texels[y*w+x])==0) {
+ if (x>=0 && x<w && y>=0 && y<h) {
+ if ((bake_rast->texels[y*w+x])==0) {
flush_pixel(bake_rast->data, x, y);
bake_rast->texels[y*w+x]= FILTER_MASK_USED;
}
@@ -277,29 +280,29 @@ static void rasterize_half(const MBakeRast *bake_rast,
const int h= bake_rast->h;
int y, y0, y1;
- if(y1_in<=0 || y0_in>=h)
+ if (y1_in<=0 || y0_in>=h)
return;
y0= y0_in<0 ? 0 : y0_in;
y1= y1_in>=h ? h : y1_in;
- for(y= y0; y<y1; y++) {
+ for (y= y0; y<y1; y++) {
/*-b(x-x0) + a(y-y0) = 0 */
int iXl, iXr, x;
float x_l= s_stable!=0 ? (s0_s + (((s1_s-s0_s)*(y-t0_s))/(t1_s-t0_s))) : s0_s;
float x_r= l_stable!=0 ? (s0_l + (((s1_l-s0_l)*(y-t0_l))/(t1_l-t0_l))) : s0_l;
- if(is_mid_right!=0)
+ if (is_mid_right!=0)
SWAP(float, x_l, x_r);
iXl= (int)ceilf(x_l);
iXr= (int)ceilf(x_r);
- if(iXr>0 && iXl<w) {
+ if (iXr>0 && iXl<w) {
iXl= iXl<0?0:iXl;
iXr= iXr>=w?w:iXr;
- for(x= iXl; x<iXr; x++)
+ for (x= iXl; x<iXr; x++)
set_rast_triangle(bake_rast, x, y);
}
}
@@ -318,19 +321,20 @@ static void bake_rasterize(const MBakeRast *bake_rast, const float st0_in[2], co
int is_mid_right= 0, ylo, yhi, yhi_beg;
/* skip degenerates */
- if((slo==smi && tlo==tmi) || (slo==shi && tlo==thi) || (smi==shi && tmi==thi))
+ if ((slo==smi && tlo==tmi) || (slo==shi && tlo==thi) || (smi==shi && tmi==thi))
return;
/* sort by T */
- if(tlo>tmi && tlo>thi) {
+ if (tlo>tmi && tlo>thi) {
SWAP(float, shi, slo);
SWAP(float, thi, tlo);
- } else if(tmi>thi) {
+ }
+ else if (tmi>thi) {
SWAP(float, shi, smi);
SWAP(float, thi, tmi);
}
- if(tlo>tmi) {
+ if (tlo>tmi) {
SWAP(float, slo, smi);
SWAP(float, tlo, tmi);
}
@@ -348,7 +352,7 @@ static void bake_rasterize(const MBakeRast *bake_rast, const float st0_in[2], co
static int multiresbake_test_break(MultiresBakeRender *bkr)
{
- if(!bkr->stop) {
+ if (!bkr->stop) {
/* this means baker is executed outside from job system */
return 0;
}
@@ -368,12 +372,12 @@ static void do_multires_bake(MultiresBakeRender *bkr, Image* ima, MPassKnownData
MTFace *mtface= dm->getTessFaceDataArray(dm, CD_MTFACE);
float *pvtangent= NULL;
- if(CustomData_get_layer_index(&dm->faceData, CD_TANGENT) == -1)
+ if (CustomData_get_layer_index(&dm->faceData, CD_TANGENT) == -1)
DM_add_tangent_layer(dm);
pvtangent= DM_get_tessface_data_layer(dm, CD_TANGENT);
- if(tot_face > 0) { /* sanity check */
+ if (tot_face > 0) { /* sanity check */
int f= 0;
MBakeRast bake_rast;
MResolvePixelData data={NULL};
@@ -390,19 +394,19 @@ static void do_multires_bake(MultiresBakeRender *bkr, Image* ima, MPassKnownData
data.lvl= lvl;
data.pass_data= passKnownData;
- if(initBakeData)
+ if (initBakeData)
data.bake_data= initBakeData(bkr, ima);
init_bake_rast(&bake_rast, ibuf, &data, flush_pixel);
- for(f= 0; f<tot_face; f++) {
+ for (f= 0; f<tot_face; f++) {
MTFace *mtfate= &mtface[f];
int verts[3][2], nr_tris, t;
- if(multiresbake_test_break(bkr))
+ if (multiresbake_test_break(bkr))
break;
- if(mtfate->tpage!=ima)
+ if (mtfate->tpage!=ima)
continue;
data.face_index= f;
@@ -418,7 +422,7 @@ static void do_multires_bake(MultiresBakeRender *bkr, Image* ima, MPassKnownData
verts[2][1]=3;
nr_tris= mface[f].v4!=0 ? 2 : 1;
- for(t= 0; t<nr_tris; t++) {
+ for (t= 0; t<nr_tris; t++) {
data.i0 = verts[0][t];
data.i1 = verts[1][t];
data.i2 = verts[2][t];
@@ -428,17 +432,17 @@ static void do_multires_bake(MultiresBakeRender *bkr, Image* ima, MPassKnownData
bkr->baked_faces++;
- if(bkr->do_update)
+ if (bkr->do_update)
*bkr->do_update= 1;
- if(bkr->progress)
+ if (bkr->progress)
*bkr->progress= ((float)bkr->baked_objects + (float)bkr->baked_faces / tot_face) / bkr->tot_obj;
}
- if(applyBakeData)
+ if (applyBakeData)
applyBakeData(data.bake_data);
- if(freeBakeData)
+ if (freeBakeData)
freeBakeData(data.bake_data);
}
}
@@ -486,12 +490,13 @@ static void interp_bilinear_grid(DMGridData *grid, int grid_size, float crn_x, f
u= crn_x-x0;
v= crn_y-y0;
- if(mode == 0) {
+ if (mode == 0) {
copy_v3_v3(data[0], grid[y0 * grid_size + x0].no);
copy_v3_v3(data[1], grid[y0 * grid_size + x1].no);
copy_v3_v3(data[2], grid[y1 * grid_size + x1].no);
copy_v3_v3(data[3], grid[y1 * grid_size + x0].no);
- } else {
+ }
+ else {
copy_v3_v3(data[0], grid[y0 * grid_size + x0].co);
copy_v3_v3(data[1], grid[y0 * grid_size + x1].co);
copy_v3_v3(data[2], grid[y1 * grid_size + x1].co);
@@ -517,10 +522,11 @@ static void get_ccgdm_data(DerivedMesh *lodm, DerivedMesh *hidm, const int *orig
face_side= (grid_size<<1)-1;
- if(lvl==0) {
+ if (lvl==0) {
g_index= grid_offset[face_index];
S= mdisp_rot_face_to_crn(mface.v4 ? 4 : 3, face_side, u*(face_side-1), v*(face_side-1), &crn_x, &crn_y);
- } else {
+ }
+ else {
int side= (1 << (lvl-1)) + 1;
int grid_index= origindex[face_index];
int loc_offs= face_index % (1<<(2*lvl));
@@ -539,10 +545,10 @@ static void get_ccgdm_data(DerivedMesh *lodm, DerivedMesh *hidm, const int *orig
CLAMP(crn_x, 0.0f, grid_size);
CLAMP(crn_y, 0.0f, grid_size);
- if(n != NULL)
+ if (n != NULL)
interp_bilinear_grid(grid_data[g_index + S], grid_size, crn_x, crn_y, 0, n);
- if(co != NULL)
+ if (co != NULL)
interp_bilinear_grid(grid_data[g_index + S], grid_size, crn_x, crn_y, 1, co);
}
@@ -552,12 +558,13 @@ static void interp_bilinear_mface(DerivedMesh *dm, MFace *mface, const float u,
{
float data[4][3];
- if(mode == 0) {
+ if (mode == 0) {
dm->getVertNo(dm, mface->v1, data[0]);
dm->getVertNo(dm, mface->v2, data[1]);
dm->getVertNo(dm, mface->v3, data[2]);
dm->getVertNo(dm, mface->v4, data[3]);
- } else {
+ }
+ else {
dm->getVertCo(dm, mface->v1, data[0]);
dm->getVertCo(dm, mface->v2, data[1]);
dm->getVertCo(dm, mface->v3, data[2]);
@@ -573,11 +580,12 @@ static void interp_barycentric_mface(DerivedMesh *dm, MFace *mface, const float
{
float data[3][3];
- if(mode == 0) {
+ if (mode == 0) {
dm->getVertNo(dm, mface->v1, data[0]);
dm->getVertNo(dm, mface->v2, data[1]);
dm->getVertNo(dm, mface->v3, data[2]);
- } else {
+ }
+ else {
dm->getVertCo(dm, mface->v1, data[0]);
dm->getVertCo(dm, mface->v2, data[1]);
dm->getVertCo(dm, mface->v3, data[2]);
@@ -599,7 +607,7 @@ static void *init_heights_data(MultiresBakeRender *bkr, Image *ima)
height_data->height_max= -FLT_MAX;
height_data->height_min= FLT_MAX;
- if(!bkr->use_lores_mesh) {
+ if (!bkr->use_lores_mesh) {
SubsurfModifierData smd= {{NULL}};
int ss_lvl= bkr->tot_lvl - bkr->lvl;
@@ -608,7 +616,7 @@ static void *init_heights_data(MultiresBakeRender *bkr, Image *ima)
smd.levels= smd.renderLevels= ss_lvl;
smd.flags|= eSubsurfModifierFlag_SubsurfUv;
- if(bkr->simple)
+ if (bkr->simple)
smd.subdivType= ME_SIMPLE_SUBSURF;
height_data->ssdm= subsurf_make_derived_from_derived(bkr->lores_dm, &smd, 0, NULL, 0, 0, 0);
@@ -646,24 +654,25 @@ static void apply_heights_data(void *bake_data)
float height, *heights= height_data->heights;
float min= height_data->height_min, max= height_data->height_max;
- for(x= 0; x<ibuf->x; x++) {
- for(y =0; y<ibuf->y; y++) {
+ for (x= 0; x<ibuf->x; x++) {
+ for (y =0; y<ibuf->y; y++) {
i= ibuf->x*y + x;
- if(((char*)ibuf->userdata)[i] != FILTER_MASK_USED)
+ if (((char*)ibuf->userdata)[i] != FILTER_MASK_USED)
continue;
- if(ibuf->rect_float) {
+ if (ibuf->rect_float) {
float *rrgbf= ibuf->rect_float + i*4;
- if(max-min > 1e-5f) height= (heights[i]-min)/(max-min);
+ if (max-min > 1e-5f) height= (heights[i]-min)/(max-min);
else height= 0;
rrgbf[0]=rrgbf[1]=rrgbf[2]= height;
- } else {
+ }
+ else {
char *rrgb= (char*)ibuf->rect + i*4;
- if(max-min > 1e-5f) height= (heights[i]-min)/(max-min);
+ if (max-min > 1e-5f) height= (heights[i]-min)/(max-min);
else height= 0;
rrgb[0]=rrgb[1]=rrgb[2]= FTOCHAR(height);
@@ -678,7 +687,7 @@ static void free_heights_data(void *bake_data)
{
MHeightBakeData *height_data= (MHeightBakeData*)bake_data;
- if(height_data->ssdm)
+ if (height_data->ssdm)
height_data->ssdm->release(height_data->ssdm);
MEM_freeN(height_data->heights);
@@ -710,10 +719,11 @@ static void apply_heights_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
st1= mtface[face_index].uv[1];
st2= mtface[face_index].uv[2];
- if(mface.v4) {
+ if (mface.v4) {
st3= mtface[face_index].uv[3];
resolve_quad_uv(uv, st, st0, st1, st2, st3);
- } else
+ }
+ else
resolve_tri_uv(uv, st, st0, st1, st2);
CLAMP(uv[0], 0.0f, 1.0f);
@@ -721,15 +731,17 @@ static void apply_heights_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
get_ccgdm_data(lores_dm, hires_dm, height_data->origindex, lvl, face_index, uv[0], uv[1], p1, 0);
- if(height_data->ssdm) {
+ if (height_data->ssdm) {
get_ccgdm_data(lores_dm, height_data->ssdm, height_data->origindex, 0, face_index, uv[0], uv[1], p0, n);
- } else {
+ }
+ else {
lores_dm->getTessFace(lores_dm, face_index, &mface);
- if(mface.v4) {
+ if (mface.v4) {
interp_bilinear_mface(lores_dm, &mface, uv[0], uv[1], 1, p0);
interp_bilinear_mface(lores_dm, &mface, uv[0], uv[1], 0, n);
- } else {
+ }
+ else {
interp_barycentric_mface(lores_dm, &mface, uv[0], uv[1], 1, p0);
interp_barycentric_mface(lores_dm, &mface, uv[0], uv[1], 0, n);
}
@@ -739,15 +751,16 @@ static void apply_heights_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
len= dot_v3v3(n, vec);
height_data->heights[pixel]= len;
- if(len<height_data->height_min) height_data->height_min= len;
- if(len>height_data->height_max) height_data->height_max= len;
+ if (len<height_data->height_min) height_data->height_min= len;
+ if (len>height_data->height_max) height_data->height_max= len;
- if(ibuf->rect_float) {
+ if (ibuf->rect_float) {
float *rrgbf= ibuf->rect_float + pixel*4;
rrgbf[3]= 1.0f;
ibuf->userflags= IB_RECT_INVALID;
- } else {
+ }
+ else {
char *rrgb= (char*)ibuf->rect + pixel*4;
rrgb[3]= 255;
}
@@ -777,10 +790,11 @@ static void apply_tangmat_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
st1= mtface[face_index].uv[1];
st2= mtface[face_index].uv[2];
- if(mface.v4) {
+ if (mface.v4) {
st3= mtface[face_index].uv[3];
resolve_quad_uv(uv, st, st0, st1, st2, st3);
- } else
+ }
+ else
resolve_tri_uv(uv, st, st0, st1, st2);
CLAMP(uv[0], 0.0f, 1.0f);
@@ -793,7 +807,7 @@ static void apply_tangmat_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
mul_v3_fl(vec, 0.5);
add_v3_v3(vec, tmp);
- if(ibuf->rect_float) {
+ if (ibuf->rect_float) {
float *rrgbf= ibuf->rect_float + pixel*4;
rrgbf[0]= vec[0];
rrgbf[1]= vec[1];
@@ -801,7 +815,8 @@ static void apply_tangmat_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
rrgbf[3]= 1.0f;
ibuf->userflags= IB_RECT_INVALID;
- } else {
+ }
+ else {
unsigned char *rrgb= (unsigned char *)ibuf->rect + pixel*4;
rgb_float_to_uchar(rrgb, vec);
rrgb[3]= 255;
@@ -819,12 +834,12 @@ static void count_images(MultiresBakeRender *bkr)
totface= dm->getNumTessFaces(dm);
- for(a= 0; a<totface; a++)
+ for (a= 0; a<totface; a++)
mtface[a].tpage->id.flag&= ~LIB_DOIT;
- for(a= 0; a<totface; a++) {
+ for (a= 0; a<totface; a++) {
Image *ima= mtface[a].tpage;
- if((ima->id.flag&LIB_DOIT)==0) {
+ if ((ima->id.flag&LIB_DOIT)==0) {
LinkData *data= BLI_genericNodeN(ima);
BLI_addtail(&bkr->image, data);
bkr->tot_image++;
@@ -832,7 +847,7 @@ static void count_images(MultiresBakeRender *bkr)
}
}
- for(a= 0; a<totface; a++)
+ for (a= 0; a<totface; a++)
mtface[a].tpage->id.flag&= ~LIB_DOIT;
}
@@ -840,11 +855,11 @@ static void bake_images(MultiresBakeRender *bkr)
{
LinkData *link;
- for(link= bkr->image.first; link; link= link->next) {
+ for (link= bkr->image.first; link; link= link->next) {
Image *ima= (Image*)link->data;
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
- if(ibuf->x>0 && ibuf->y>0) {
+ if (ibuf->x>0 && ibuf->y>0) {
ibuf->userdata= MEM_callocN(ibuf->y*ibuf->x, "MultiresBake imbuf mask");
switch(bkr->mode) {
@@ -866,26 +881,26 @@ static void finish_images(MultiresBakeRender *bkr)
{
LinkData *link;
- for(link= bkr->image.first; link; link= link->next) {
+ for (link= bkr->image.first; link; link= link->next) {
Image *ima= (Image*)link->data;
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
- if(ibuf->x<=0 || ibuf->y<=0)
+ if (ibuf->x<=0 || ibuf->y<=0)
continue;
RE_bake_ibuf_filter(ibuf, (char *)ibuf->userdata, bkr->bake_filter);
ibuf->userflags|= IB_BITMAPDIRTY;
- if(ibuf->rect_float)
+ if (ibuf->rect_float)
ibuf->userflags|= IB_RECT_INVALID;
- if(ibuf->mipmap[0]) {
+ if (ibuf->mipmap[0]) {
ibuf->userflags|= IB_MIPMAP_INVALID;
imb_freemipmapImBuf(ibuf);
}
- if(ibuf->userdata) {
+ if (ibuf->userdata) {
MEM_freeN(ibuf->userdata);
ibuf->userdata= NULL;
}
@@ -910,7 +925,7 @@ static int multiresbake_check(bContext *C, wmOperator *op)
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
ob= base->object;
- if(ob->type != OB_MESH) {
+ if (ob->type != OB_MESH) {
BKE_report(op->reports, RPT_ERROR, "Basking of multires data only works with active object which is a mesh");
ok= 0;
@@ -921,25 +936,26 @@ static int multiresbake_check(bContext *C, wmOperator *op)
mmd= get_multires_modifier(scene, ob, 0);
/* Multi-resolution should be and be last in the stack */
- if(ok && mmd) {
+ if (ok && mmd) {
ModifierData *md;
ok= mmd->totlvl>0;
- for(md = (ModifierData*)mmd->modifier.next; md && ok; md = md->next) {
+ for (md = (ModifierData*)mmd->modifier.next; md && ok; md = md->next) {
if (modifier_isEnabled(scene, md, eModifierMode_Realtime)) {
ok= 0;
}
}
- } else ok= 0;
+ }
+ else ok= 0;
- if(!ok) {
+ if (!ok) {
BKE_report(op->reports, RPT_ERROR, "Multires data baking requires multi-resolution object");
break;
}
- if(!me->mtpoly) {
+ if (!me->mtpoly) {
BKE_report(op->reports, RPT_ERROR, "Mesh should be unwrapped before multires data baking");
ok= 0;
@@ -949,7 +965,7 @@ static int multiresbake_check(bContext *C, wmOperator *op)
while (ok && a--) {
Image *ima = me->mtpoly[a].tpage;
- if(!ima) {
+ if (!ima) {
BKE_report(op->reports, RPT_ERROR, "You should have active texture to use multires baker");
ok= 0;
@@ -957,25 +973,26 @@ static int multiresbake_check(bContext *C, wmOperator *op)
else {
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
- if(!ibuf) {
+ if (!ibuf) {
BKE_report(op->reports, RPT_ERROR, "Baking should happend to image with image buffer");
ok= 0;
- } else {
- if(ibuf->rect==NULL && ibuf->rect_float==NULL)
+ }
+ else {
+ if (ibuf->rect==NULL && ibuf->rect_float==NULL)
ok= 0;
- if(ibuf->rect_float && !(ibuf->channels==0 || ibuf->channels==4))
+ if (ibuf->rect_float && !(ibuf->channels==0 || ibuf->channels==4))
ok= 0;
- if(!ok)
+ if (!ok)
BKE_report(op->reports, RPT_ERROR, "Baking to unsupported image type");
}
}
}
}
- if(!ok)
+ if (!ok)
break;
}
CTX_DATA_END;
@@ -991,17 +1008,18 @@ static DerivedMesh *multiresbake_create_loresdm(Scene *scene, Object *ob, int *l
*lvl= mmd->lvl;
- if(*lvl==0) {
+ if (*lvl==0) {
DerivedMesh *tmp_dm= CDDM_from_mesh(me, ob);
dm= CDDM_copy(tmp_dm);
tmp_dm->release(tmp_dm);
- } else {
+ }
+ else {
MultiresModifierData tmp_mmd= *mmd;
DerivedMesh *cddm= CDDM_from_mesh(me, ob);
tmp_mmd.lvl= *lvl;
tmp_mmd.sculptlvl= *lvl;
- dm= multires_dm_create_from_derived(&tmp_mmd, 1, cddm, ob, 0, 0);
+ dm= multires_dm_create_from_derived(&tmp_mmd, 1, cddm, ob, 0);
cddm->release(cddm);
}
@@ -1021,7 +1039,7 @@ static DerivedMesh *multiresbake_create_hiresdm(Scene *scene, Object *ob, int *l
tmp_mmd.lvl= mmd->totlvl;
tmp_mmd.sculptlvl= mmd->totlvl;
- dm= multires_dm_create_from_derived(&tmp_mmd, 1, cddm, ob, 0, 0);
+ dm= multires_dm_create_from_derived(&tmp_mmd, 1, cddm, ob, 0);
cddm->release(cddm);
return dm;
@@ -1033,13 +1051,13 @@ static void clear_images(MTFace *mtface, int totface)
const float vec_alpha[4]= {0.0f, 0.0f, 0.0f, 0.0f};
const float vec_solid[4]= {0.0f, 0.0f, 0.0f, 1.0f};
- for(a= 0; a<totface; a++)
+ for (a= 0; a<totface; a++)
mtface[a].tpage->id.flag&= ~LIB_DOIT;
- for(a= 0; a<totface; a++) {
+ for (a= 0; a<totface; a++) {
Image *ima= mtface[a].tpage;
- if((ima->id.flag&LIB_DOIT)==0) {
+ if ((ima->id.flag&LIB_DOIT)==0) {
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
IMB_rectfill(ibuf, (ibuf->planes == R_IMF_PLANES_RGBA) ? vec_alpha : vec_solid);
@@ -1047,7 +1065,7 @@ static void clear_images(MTFace *mtface, int totface)
}
}
- for(a= 0; a<totface; a++)
+ for (a= 0; a<totface; a++)
mtface[a].tpage->id.flag&= ~LIB_DOIT;
}
@@ -1057,10 +1075,10 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
int objects_baked= 0;
- if(!multiresbake_check(C, op))
+ if (!multiresbake_check(C, op))
return OPERATOR_CANCELLED;
- if(scene->r.bake_flag&R_BAKE_CLEAR) { /* clear images */
+ if (scene->r.bake_flag&R_BAKE_CLEAR) { /* clear images */
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
Mesh *me;
@@ -1087,7 +1105,7 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
/* create low-resolution DM (to bake to) and hi-resolution DM (to bake from) */
bkr.lores_dm= multiresbake_create_loresdm(scene, ob, &bkr.lvl);
- if(!bkr.lores_dm)
+ if (!bkr.lores_dm)
continue;
bkr.hires_dm= multiresbake_create_hiresdm(scene, ob, &bkr.tot_lvl, &bkr.simple);
@@ -1103,7 +1121,7 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- if(!objects_baked)
+ if (!objects_baked)
BKE_report(op->reports, RPT_ERROR, "No objects found to bake from");
return OPERATOR_FINISHED;
@@ -1130,7 +1148,7 @@ static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj)
multires_force_update(ob);
lores_dm = multiresbake_create_loresdm(scene, ob, &lvl);
- if(!lores_dm)
+ if (!lores_dm)
continue;
data= MEM_callocN(sizeof(MultiresBakerJobData), "multiresBaker derivedMesh_data");
@@ -1151,8 +1169,8 @@ static void multiresbake_startjob(void *bkv, short *stop, short *do_update, floa
tot_obj= BLI_countlist(&bkj->data);
- if(bkj->bake_clear) { /* clear images */
- for(data= bkj->data.first; data; data= data->next) {
+ if (bkj->bake_clear) { /* clear images */
+ for (data= bkj->data.first; data; data= data->next) {
DerivedMesh *dm= data->lores_dm;
MTFace *mtface= CustomData_get_layer(&dm->faceData, CD_MTFACE);
@@ -1160,7 +1178,7 @@ static void multiresbake_startjob(void *bkv, short *stop, short *do_update, floa
}
}
- for(data= bkj->data.first; data; data= data->next) {
+ for (data= bkj->data.first; data; data= data->next) {
MultiresBakeRender bkr= {0};
/* copy data stored in job descriptor */
@@ -1214,13 +1232,13 @@ static int multiresbake_image_exec(bContext *C, wmOperator *op)
MultiresBakeJob *bkr;
wmJob *steve;
- if(!multiresbake_check(C, op))
+ if (!multiresbake_check(C, op))
return OPERATOR_CANCELLED;
bkr= MEM_callocN(sizeof(MultiresBakeJob), "MultiresBakeJob data");
init_multiresbake_job(C, bkr);
- if(!bkr->data.first) {
+ if (!bkr->data.first) {
BKE_report(op->reports, RPT_ERROR, "No objects found to bake from");
return OPERATOR_CANCELLED;
}
@@ -1278,10 +1296,10 @@ static int test_bake_internal(bContext *C, ReportList *reports)
{
Scene *scene= CTX_data_scene(C);
- if((scene->r.bake_flag & R_BAKE_TO_ACTIVE) && CTX_data_active_object(C)==NULL) {
+ if ((scene->r.bake_flag & R_BAKE_TO_ACTIVE) && CTX_data_active_object(C)==NULL) {
BKE_report(reports, RPT_ERROR, "No active object");
}
- else if(scene->r.bake_mode==RE_BAKE_AO && scene->world==NULL) {
+ else if (scene->r.bake_mode==RE_BAKE_AO && scene->world==NULL) {
BKE_report(reports, RPT_ERROR, "No world set up");
}
else {
@@ -1304,12 +1322,12 @@ static void init_bake_internal(BakeRender *bkr, bContext *C)
bkr->actob= (scene->r.bake_flag & R_BAKE_TO_ACTIVE) ? OBACT : NULL;
bkr->re= RE_NewRender("_Bake View_");
- if(scene->r.bake_mode==RE_BAKE_AO) {
+ if (scene->r.bake_mode==RE_BAKE_AO) {
/* If raytracing or AO is disabled, switch it on temporarily for baking. */
bkr->prev_wo_amb_occ = (scene->world->mode & WO_AMB_OCC) != 0;
scene->world->mode |= WO_AMB_OCC;
}
- if(scene->r.bake_mode==RE_BAKE_AO || bkr->actob) {
+ if (scene->r.bake_mode==RE_BAKE_AO || bkr->actob) {
bkr->prev_r_raytrace = (scene->r.mode & R_RAYTRACE) != 0;
scene->r.mode |= R_RAYTRACE;
}
@@ -1320,22 +1338,22 @@ static void finish_bake_internal(BakeRender *bkr)
RE_Database_Free(bkr->re);
/* restore raytrace and AO */
- if(bkr->scene->r.bake_mode==RE_BAKE_AO)
- if(bkr->prev_wo_amb_occ == 0)
+ if (bkr->scene->r.bake_mode==RE_BAKE_AO)
+ if (bkr->prev_wo_amb_occ == 0)
bkr->scene->world->mode &= ~WO_AMB_OCC;
- if(bkr->scene->r.bake_mode==RE_BAKE_AO || bkr->actob)
- if(bkr->prev_r_raytrace == 0)
+ if (bkr->scene->r.bake_mode==RE_BAKE_AO || bkr->actob)
+ if (bkr->prev_r_raytrace == 0)
bkr->scene->r.mode &= ~R_RAYTRACE;
- if(bkr->result==BAKE_RESULT_OK) {
+ if (bkr->result==BAKE_RESULT_OK) {
Image *ima;
/* force OpenGL reload and mipmap recalc */
- for(ima= G.main->image.first; ima; ima= ima->id.next) {
- if(ima->ok==IMA_OK_LOADED) {
+ for (ima= G.main->image.first; ima; ima= ima->id.next) {
+ if (ima->ok==IMA_OK_LOADED) {
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
- if(ibuf) {
- if(ibuf->userflags & IB_BITMAPDIRTY) {
+ if (ibuf) {
+ if (ibuf->userflags & IB_BITMAPDIRTY) {
GPU_free_image(ima);
imb_freemipmapImBuf(ibuf);
}
@@ -1384,9 +1402,9 @@ static void bake_update(void *bkv)
{
BakeRender *bkr= bkv;
- if(bkr->sa && bkr->sa->spacetype==SPACE_IMAGE) { /* in case the user changed while baking */
+ if (bkr->sa && bkr->sa->spacetype==SPACE_IMAGE) { /* in case the user changed while baking */
SpaceImage *sima= bkr->sa->spacedata.first;
- if(sima)
+ if (sima)
sima->image= RE_bake_shade_get_image();
}
}
@@ -1396,9 +1414,9 @@ static void bake_freejob(void *bkv)
BakeRender *bkr= bkv;
finish_bake_internal(bkr);
- if(bkr->result==BAKE_RESULT_NO_OBJECTS)
+ if (bkr->result==BAKE_RESULT_NO_OBJECTS)
BKE_report(bkr->reports, RPT_ERROR, "No objects or images found to bake to");
- else if(bkr->result==BAKE_RESULT_FEEDBACK_LOOP)
+ else if (bkr->result==BAKE_RESULT_FEEDBACK_LOOP)
BKE_report(bkr->reports, RPT_WARNING, "Feedback loop detected");
MEM_freeN(bkr);
@@ -1409,7 +1427,7 @@ static void bake_freejob(void *bkv)
static int objects_bake_render_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
/* no running blender, remove handler and pass through */
- if(0==WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C)))
+ if (0==WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C)))
return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
/* running render */
@@ -1434,14 +1452,15 @@ static int objects_bake_render_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
Scene *scene= CTX_data_scene(C);
int result= OPERATOR_CANCELLED;
- if(is_multires_bake(scene)) {
+ if (is_multires_bake(scene)) {
result= multiresbake_image_exec(C, op);
- } else {
+ }
+ else {
/* only one render job at a time */
- if(WM_jobs_test(CTX_wm_manager(C), scene))
+ if (WM_jobs_test(CTX_wm_manager(C), scene))
return OPERATOR_CANCELLED;
- if(test_bake_internal(C, op->reports)==0) {
+ if (test_bake_internal(C, op->reports)==0) {
return OPERATOR_CANCELLED;
}
else {
@@ -1483,10 +1502,11 @@ static int bake_image_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
int result= OPERATOR_CANCELLED;
- if(is_multires_bake(scene)) {
+ if (is_multires_bake(scene)) {
result= multiresbake_image_exec_locked(C, op);
- } else {
- if(test_bake_internal(C, op->reports)==0) {
+ }
+ else {
+ if (test_bake_internal(C, op->reports)==0) {
return OPERATOR_CANCELLED;
}
else {
@@ -1506,9 +1526,9 @@ static int bake_image_exec(bContext *C, wmOperator *op)
bkr.ready= 0;
BLI_insert_thread(&threads, &bkr);
- while(bkr.ready==0) {
+ while (bkr.ready==0) {
PIL_sleep_ms(50);
- if(bkr.ready)
+ if (bkr.ready)
break;
/* used to redraw in 2.4x but this is just for exec in 2.5 */
@@ -1517,9 +1537,9 @@ static int bake_image_exec(bContext *C, wmOperator *op)
}
BLI_end_threads(&threads);
- if(bkr.result==BAKE_RESULT_NO_OBJECTS)
+ if (bkr.result==BAKE_RESULT_NO_OBJECTS)
BKE_report(op->reports, RPT_ERROR, "No valid images found to bake to");
- else if(bkr.result==BAKE_RESULT_FEEDBACK_LOOP)
+ else if (bkr.result==BAKE_RESULT_FEEDBACK_LOOP)
BKE_report(op->reports, RPT_ERROR, "Feedback loop detected");
finish_bake_internal(&bkr);
@@ -1536,12 +1556,12 @@ static int bake_image_exec(bContext *C, wmOperator *op)
void OBJECT_OT_bake_image(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Bake";
- ot->description= "Bake image textures of selected objects";
- ot->idname= "OBJECT_OT_bake_image";
+ ot->name = "Bake";
+ ot->description = "Bake image textures of selected objects";
+ ot->idname = "OBJECT_OT_bake_image";
/* api callbacks */
- ot->exec= bake_image_exec;
- ot->invoke= objects_bake_render_invoke;
- ot->modal= objects_bake_render_modal;
+ ot->exec = bake_image_exec;
+ ot->invoke = objects_bake_render_invoke;
+ ot->modal = objects_bake_render_modal;
}
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 774eec0e0a8..5b2aaf30897 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -142,6 +142,7 @@ bConstraint *get_active_constraint (Object *ob)
}
/* -------------- Constraint Management (Add New, Remove, Rename) -------------------- */
+#ifdef WITH_PYTHON
/* ------------- PyConstraints ------------------ */
/* this callback sets the text-file to be used for selected menu item */
@@ -160,7 +161,6 @@ static void validate_pyconstraint_cb (void *arg1, void *arg2)
data->text = text;
}
-#ifdef WITH_PYTHON
/* this returns a string for the list of usable pyconstraint script names */
static char *buildmenu_pyconstraints (Text *con_text, int *pyconindex)
{
@@ -405,17 +405,17 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
else if (curcon->type == CONSTRAINT_TYPE_FOLLOWTRACK) {
bFollowTrackConstraint *data = curcon->data;
- if((data->flag&CAMERASOLVER_ACTIVECLIP)==0) {
- if(data->clip != NULL && data->track[0]) {
+ if ((data->flag&CAMERASOLVER_ACTIVECLIP)==0) {
+ if (data->clip != NULL && data->track[0]) {
MovieTracking *tracking= &data->clip->tracking;
MovieTrackingObject *tracking_object;
- if(data->object[0])
+ if (data->object[0])
tracking_object= BKE_tracking_named_object(tracking, data->object);
else
tracking_object= BKE_tracking_get_camera_object(tracking);
- if(!tracking_object) {
+ if (!tracking_object) {
curcon->flag |= CONSTRAINT_DISABLE;
}
else {
@@ -429,13 +429,13 @@ static void test_constraints (Object *owner, bPoseChannel *pchan)
else if (curcon->type == CONSTRAINT_TYPE_CAMERASOLVER) {
bCameraSolverConstraint *data = curcon->data;
- if((data->flag&CAMERASOLVER_ACTIVECLIP)==0 && data->clip == NULL)
+ if ((data->flag&CAMERASOLVER_ACTIVECLIP)==0 && data->clip == NULL)
curcon->flag |= CONSTRAINT_DISABLE;
}
else if (curcon->type == CONSTRAINT_TYPE_OBJECTSOLVER) {
bObjectSolverConstraint *data = curcon->data;
- if((data->flag&CAMERASOLVER_ACTIVECLIP)==0 && data->clip == NULL)
+ if ((data->flag&CAMERASOLVER_ACTIVECLIP)==0 && data->clip == NULL)
curcon->flag |= CONSTRAINT_DISABLE;
}
@@ -644,16 +644,16 @@ static int stretchto_reset_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e
void CONSTRAINT_OT_stretchto_reset (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reset Original Length";
- ot->idname= "CONSTRAINT_OT_stretchto_reset";
- ot->description= "Reset original length of bone for Stretch To Constraint";
+ ot->name = "Reset Original Length";
+ ot->idname = "CONSTRAINT_OT_stretchto_reset";
+ ot->description = "Reset original length of bone for Stretch To Constraint";
- ot->exec= stretchto_reset_exec;
- ot->invoke= stretchto_reset_invoke;
- ot->poll= edit_constraint_poll;
+ ot->exec = stretchto_reset_exec;
+ ot->invoke = stretchto_reset_invoke;
+ ot->poll = edit_constraint_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_constraint_properties(ot);
}
@@ -687,16 +687,16 @@ static int limitdistance_reset_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
void CONSTRAINT_OT_limitdistance_reset (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reset Distance";
- ot->idname= "CONSTRAINT_OT_limitdistance_reset";
- ot->description= "Reset limiting distance for Limit Distance Constraint";
+ ot->name = "Reset Distance";
+ ot->idname = "CONSTRAINT_OT_limitdistance_reset";
+ ot->description = "Reset limiting distance for Limit Distance Constraint";
- ot->exec= limitdistance_reset_exec;
- ot->invoke= limitdistance_reset_invoke;
- ot->poll= edit_constraint_poll;
+ ot->exec = limitdistance_reset_exec;
+ ot->invoke = limitdistance_reset_invoke;
+ ot->poll = edit_constraint_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_constraint_properties(ot);
}
@@ -813,16 +813,16 @@ static int childof_set_inverse_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
void CONSTRAINT_OT_childof_set_inverse (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Inverse";
- ot->idname= "CONSTRAINT_OT_childof_set_inverse";
- ot->description= "Set inverse correction for ChildOf constraint";
+ ot->name = "Set Inverse";
+ ot->idname = "CONSTRAINT_OT_childof_set_inverse";
+ ot->description = "Set inverse correction for ChildOf constraint";
- ot->exec= childof_set_inverse_exec;
- ot->invoke= childof_set_inverse_invoke;
- ot->poll= edit_constraint_poll;
+ ot->exec = childof_set_inverse_exec;
+ ot->invoke = childof_set_inverse_invoke;
+ ot->poll = edit_constraint_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_constraint_properties(ot);
}
@@ -833,7 +833,7 @@ static int childof_clear_inverse_exec (bContext *C, wmOperator *op)
bConstraint *con = edit_constraint_property_get(op, ob, CONSTRAINT_TYPE_CHILDOF);
bChildOfConstraint *data= (con) ? (bChildOfConstraint *)con->data : NULL;
- if(data==NULL) {
+ if (data==NULL) {
BKE_report(op->reports, RPT_ERROR, "Childof constraint not found");
return OPERATOR_CANCELLED;
}
@@ -857,16 +857,16 @@ static int childof_clear_inverse_invoke(bContext *C, wmOperator *op, wmEvent *UN
void CONSTRAINT_OT_childof_clear_inverse (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Inverse";
- ot->idname= "CONSTRAINT_OT_childof_clear_inverse";
- ot->description= "Clear inverse correction for ChildOf constraint";
+ ot->name = "Clear Inverse";
+ ot->idname = "CONSTRAINT_OT_childof_clear_inverse";
+ ot->description = "Clear inverse correction for ChildOf constraint";
- ot->exec= childof_clear_inverse_exec;
- ot->invoke= childof_clear_inverse_invoke;
- ot->poll= edit_constraint_poll;
+ ot->exec = childof_clear_inverse_exec;
+ ot->invoke = childof_clear_inverse_invoke;
+ ot->poll = edit_constraint_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_constraint_properties(ot);
}
@@ -904,16 +904,16 @@ static int objectsolver_set_inverse_invoke(bContext *C, wmOperator *op, wmEvent
void CONSTRAINT_OT_objectsolver_set_inverse (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Inverse";
- ot->idname= "CONSTRAINT_OT_objectsolver_set_inverse";
- ot->description= "Set inverse correction for ObjectSolver constraint";
+ ot->name = "Set Inverse";
+ ot->idname = "CONSTRAINT_OT_objectsolver_set_inverse";
+ ot->description = "Set inverse correction for ObjectSolver constraint";
- ot->exec= objectsolver_set_inverse_exec;
- ot->invoke= objectsolver_set_inverse_invoke;
- ot->poll= edit_constraint_poll;
+ ot->exec = objectsolver_set_inverse_exec;
+ ot->invoke = objectsolver_set_inverse_invoke;
+ ot->poll = edit_constraint_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_constraint_properties(ot);
}
@@ -923,7 +923,7 @@ static int objectsolver_clear_inverse_exec (bContext *C, wmOperator *op)
bConstraint *con = edit_constraint_property_get(op, ob, CONSTRAINT_TYPE_OBJECTSOLVER);
bObjectSolverConstraint *data= (con) ? (bObjectSolverConstraint *)con->data : NULL;
- if(data==NULL) {
+ if (data==NULL) {
BKE_report(op->reports, RPT_ERROR, "Childof constraint not found");
return OPERATOR_CANCELLED;
}
@@ -947,16 +947,16 @@ static int objectsolver_clear_inverse_invoke(bContext *C, wmOperator *op, wmEven
void CONSTRAINT_OT_objectsolver_clear_inverse (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Inverse";
- ot->idname= "CONSTRAINT_OT_objectsolver_clear_inverse";
- ot->description= "Clear inverse correction for ObjectSolver constraint";
+ ot->name = "Clear Inverse";
+ ot->idname = "CONSTRAINT_OT_objectsolver_clear_inverse";
+ ot->description = "Clear inverse correction for ObjectSolver constraint";
- ot->exec= objectsolver_clear_inverse_exec;
- ot->invoke= objectsolver_clear_inverse_invoke;
- ot->poll= edit_constraint_poll;
+ ot->exec = objectsolver_clear_inverse_exec;
+ ot->invoke = objectsolver_clear_inverse_invoke;
+ ot->poll = edit_constraint_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_constraint_properties(ot);
}
@@ -977,11 +977,11 @@ void ED_object_constraint_set_active(Object *ob, bConstraint *con)
void ED_object_constraint_update(Object *ob)
{
- if(ob->pose) update_pose_constraint_flags(ob->pose);
+ if (ob->pose) update_pose_constraint_flags(ob->pose);
object_test_constraints(ob);
- if(ob->type==OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
+ if (ob->type==OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
else DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
@@ -989,7 +989,7 @@ void ED_object_constraint_dependency_update(Main *bmain, Scene *scene, Object *o
{
ED_object_constraint_update(ob);
- if(ob->pose) ob->pose->flag |= POSE_RECALC; // checks & sorts pose channels
+ if (ob->pose) ob->pose->flag |= POSE_RECALC; // checks & sorts pose channels
DAG_scene_sort(bmain, scene);
}
@@ -1015,7 +1015,7 @@ static int constraint_delete_exec (bContext *C, wmOperator *UNUSED(op))
ED_object_constraint_update(ob); /* needed to set the flags on posebones correctly */
/* ITASC needs to be rebuilt once a constraint is removed [#26920] */
- if(is_ik) {
+ if (is_ik) {
BIK_clear_data(ob->pose);
}
@@ -1033,16 +1033,16 @@ static int constraint_delete_exec (bContext *C, wmOperator *UNUSED(op))
void CONSTRAINT_OT_delete (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Constraint";
- ot->idname= "CONSTRAINT_OT_delete";
- ot->description= "Remove constraint from constraint stack";
+ ot->name = "Delete Constraint";
+ ot->idname = "CONSTRAINT_OT_delete";
+ ot->description = "Remove constraint from constraint stack";
/* callbacks */
- ot->exec= constraint_delete_exec;
- ot->poll= constraint_poll;
+ ot->exec = constraint_delete_exec;
+ ot->poll = constraint_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int constraint_move_down_exec (bContext *C, wmOperator *op)
@@ -1078,17 +1078,17 @@ static int constraint_move_down_invoke(bContext *C, wmOperator *op, wmEvent *UNU
void CONSTRAINT_OT_move_down (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Constraint Down";
- ot->idname= "CONSTRAINT_OT_move_down";
- ot->description= "Move constraint down in constraint stack";
+ ot->name = "Move Constraint Down";
+ ot->idname = "CONSTRAINT_OT_move_down";
+ ot->description = "Move constraint down in constraint stack";
/* callbacks */
- ot->exec= constraint_move_down_exec;
- ot->invoke= constraint_move_down_invoke;
- ot->poll= edit_constraint_poll;
+ ot->exec = constraint_move_down_exec;
+ ot->invoke = constraint_move_down_invoke;
+ ot->poll = edit_constraint_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_constraint_properties(ot);
}
@@ -1125,17 +1125,17 @@ static int constraint_move_up_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE
void CONSTRAINT_OT_move_up (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Constraint Up";
- ot->idname= "CONSTRAINT_OT_move_up";
- ot->description= "Move constraint up in constraint stack";
+ ot->name = "Move Constraint Up";
+ ot->idname = "CONSTRAINT_OT_move_up";
+ ot->description = "Move constraint up in constraint stack";
/* callbacks */
- ot->exec= constraint_move_up_exec;
- ot->invoke= constraint_move_up_invoke;
- ot->poll= edit_constraint_poll;
+ ot->exec = constraint_move_up_exec;
+ ot->invoke = constraint_move_up_invoke;
+ ot->poll = edit_constraint_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_constraint_properties(ot);
}
@@ -1160,7 +1160,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
/* force depsgraph to get recalculated since relationships removed */
DAG_scene_sort(bmain, scene); /* sort order of objects */
- /* note, calling BIK_clear_data() isnt needed here */
+ /* note, calling BIK_clear_data() isn't needed here */
/* do updates */
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -1173,12 +1173,12 @@ void POSE_OT_constraints_clear(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Clear Pose Constraints";
- ot->idname= "POSE_OT_constraints_clear";
- ot->description= "Clear all the constraints for the selected bones";
+ ot->idname = "POSE_OT_constraints_clear";
+ ot->description = "Clear all the constraints for the selected bones";
/* callbacks */
- ot->exec= pose_constraints_clear_exec;
- ot->poll= ED_operator_posemode; // XXX - do we want to ensure there are selected bones too?
+ ot->exec = pose_constraints_clear_exec;
+ ot->poll = ED_operator_posemode; // XXX - do we want to ensure there are selected bones too?
}
@@ -1208,12 +1208,12 @@ void OBJECT_OT_constraints_clear(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Clear Object Constraints";
- ot->idname= "OBJECT_OT_constraints_clear";
- ot->description= "Clear all the constraints for the active Object only";
+ ot->idname = "OBJECT_OT_constraints_clear";
+ ot->description = "Clear all the constraints for the active Object only";
/* callbacks */
- ot->exec= object_constraints_clear_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = object_constraints_clear_exec;
+ ot->poll = ED_operator_object_active_editable;
}
/************************ copy all constraints operators *********************/
@@ -1253,16 +1253,16 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op)
void POSE_OT_constraints_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Constraints to Selected";
- ot->idname= "POSE_OT_constraints_copy";
+ ot->name = "Copy Constraints to Selected";
+ ot->idname = "POSE_OT_constraints_copy";
ot->description = "Copy constraints to other selected bones";
/* api callbacks */
- ot->exec= pose_constraint_copy_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_constraint_copy_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op))
@@ -1294,16 +1294,16 @@ static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_constraints_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Constraints to Selected";
- ot->idname= "OBJECT_OT_constraints_copy";
+ ot->name = "Copy Constraints to Selected";
+ ot->idname = "OBJECT_OT_constraints_copy";
ot->description = "Copy constraints to other selected objects";
/* api callbacks */
- ot->exec= object_constraint_copy_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = object_constraint_copy_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ add constraint operators *********************/
@@ -1609,77 +1609,77 @@ static int pose_constraint_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_constraint_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Constraint";
+ ot->name = "Add Constraint";
ot->description = "Add a constraint to the active object";
- ot->idname= "OBJECT_OT_constraint_add";
+ ot->idname = "OBJECT_OT_constraint_add";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_constraint_add_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = object_constraint_add_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", "");
}
void OBJECT_OT_constraint_add_with_targets(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Constraint (with Targets)";
+ ot->name = "Add Constraint (with Targets)";
ot->description = "Add a constraint to the active object, with target (where applicable) set to the selected Objects/Bones";
- ot->idname= "OBJECT_OT_constraint_add_with_targets";
+ ot->idname = "OBJECT_OT_constraint_add_with_targets";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_constraint_add_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = object_constraint_add_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", "");
}
void POSE_OT_constraint_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Constraint";
+ ot->name = "Add Constraint";
ot->description = "Add a constraint to the active bone";
- ot->idname= "POSE_OT_constraint_add";
+ ot->idname = "POSE_OT_constraint_add";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= pose_constraint_add_exec;
- ot->poll= ED_operator_posemode;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = pose_constraint_add_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", "");
}
void POSE_OT_constraint_add_with_targets(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Constraint (with Targets)";
+ ot->name = "Add Constraint (with Targets)";
ot->description = "Add a constraint to the active bone, with target (where applicable) set to the selected Objects/Bones";
- ot->idname= "POSE_OT_constraint_add_with_targets";
+ ot->idname = "POSE_OT_constraint_add_with_targets";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= pose_constraint_add_exec;
- ot->poll= ED_operator_posemode;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = pose_constraint_add_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", constraint_type_items, 0, "Type", "");
}
/************************ IK Constraint operators *********************/
@@ -1752,17 +1752,17 @@ static int pose_ik_add_exec(bContext *C, wmOperator *op)
void POSE_OT_ik_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add IK to Bone";
- ot->description= "Add IK Constraint to the active Bone";
- ot->idname= "POSE_OT_ik_add";
+ ot->name = "Add IK to Bone";
+ ot->description = "Add IK Constraint to the active Bone";
+ ot->idname = "POSE_OT_ik_add";
/* api callbacks */
- ot->invoke= pose_ik_add_invoke;
- ot->exec= pose_ik_add_exec;
- ot->poll= ED_operator_posemode;
+ ot->invoke = pose_ik_add_invoke;
+ ot->exec = pose_ik_add_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "with_targets", 1, "With Targets", "Assign IK Constraint with targets derived from the select bones/objects");
@@ -1803,15 +1803,15 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op))
void POSE_OT_ik_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove IK";
- ot->description= "Remove all IK Constraints from selected bones";
- ot->idname= "POSE_OT_ik_clear";
+ ot->name = "Remove IK";
+ ot->description = "Remove all IK Constraints from selected bones";
+ ot->idname = "POSE_OT_ik_clear";
/* api callbacks */
- ot->exec= pose_ik_clear_exec;
- ot->poll= ED_operator_posemode;
+ ot->exec = pose_ik_clear_exec;
+ ot->poll = ED_operator_posemode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index e456e6f0796..09625e30eaf 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -121,7 +121,7 @@ Object *ED_object_context(bContext *C)
Object *ED_object_active_context(bContext *C)
{
Object *ob= NULL;
- if(C) {
+ if (C) {
ob= ED_object_context(C);
if (!ob) ob= CTX_data_active_object(C);
}
@@ -140,8 +140,8 @@ static int object_hide_view_clear_exec(bContext *C, wmOperator *UNUSED(op))
int changed = 0;
/* XXX need a context loop to handle such cases */
- for(base = FIRSTBASE; base; base=base->next) {
- if((base->lay & v3d->lay) && base->object->restrictflag & OB_RESTRICT_VIEW) {
+ for (base = FIRSTBASE; base; base=base->next) {
+ if ((base->lay & v3d->lay) && base->object->restrictflag & OB_RESTRICT_VIEW) {
base->flag |= SELECT;
base->object->flag = base->flag;
base->object->restrictflag &= ~OB_RESTRICT_VIEW;
@@ -161,16 +161,16 @@ void OBJECT_OT_hide_view_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Restrict View";
+ ot->name = "Clear Restrict View";
ot->description = "Reveal the object by setting the hide flag";
- ot->idname= "OBJECT_OT_hide_view_clear";
+ ot->idname = "OBJECT_OT_hide_view_clear";
/* api callbacks */
- ot->exec= object_hide_view_clear_exec;
- ot->poll= ED_operator_view3d_active;
+ ot->exec = object_hide_view_clear_exec;
+ ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int object_hide_view_set_exec(bContext *C, wmOperator *op)
@@ -181,7 +181,7 @@ static int object_hide_view_set_exec(bContext *C, wmOperator *op)
const int unselected= RNA_boolean_get(op->ptr, "unselected");
CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if(!unselected) {
+ if (!unselected) {
if (base->flag & SELECT) {
base->flag &= ~SELECT;
base->object->flag = base->flag;
@@ -215,16 +215,16 @@ static int object_hide_view_set_exec(bContext *C, wmOperator *op)
void OBJECT_OT_hide_view_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Restrict View";
+ ot->name = "Set Restrict View";
ot->description = "Hide the object by setting the hide flag";
- ot->idname= "OBJECT_OT_hide_view_set";
+ ot->idname = "OBJECT_OT_hide_view_set";
/* api callbacks */
- ot->exec= object_hide_view_set_exec;
- ot->poll= ED_operator_view3d_active;
+ ot->exec = object_hide_view_set_exec;
+ ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects");
@@ -237,14 +237,14 @@ static int object_hide_render_clear_exec(bContext *C, wmOperator *UNUSED(op))
/* XXX need a context loop to handle such cases */
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob->restrictflag & OB_RESTRICT_RENDER) {
+ if (ob->restrictflag & OB_RESTRICT_RENDER) {
ob->restrictflag &= ~OB_RESTRICT_RENDER;
changed= 1;
}
}
CTX_DATA_END;
- if(changed)
+ if (changed)
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_OUTLINER, NULL);
return OPERATOR_FINISHED;
@@ -254,16 +254,16 @@ void OBJECT_OT_hide_render_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Restrict Render";
+ ot->name = "Clear Restrict Render";
ot->description = "Reveal the render object by setting the hide render flag";
- ot->idname= "OBJECT_OT_hide_render_clear";
+ ot->idname = "OBJECT_OT_hide_render_clear";
/* api callbacks */
- ot->exec= object_hide_render_clear_exec;
- ot->poll= ED_operator_view3d_active;
+ ot->exec = object_hide_render_clear_exec;
+ ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int object_hide_render_set_exec(bContext *C, wmOperator *op)
@@ -271,7 +271,7 @@ static int object_hide_render_set_exec(bContext *C, wmOperator *op)
const int unselected= RNA_boolean_get(op->ptr, "unselected");
CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if(!unselected) {
+ if (!unselected) {
if (base->flag & SELECT) {
base->object->restrictflag |= OB_RESTRICT_RENDER;
}
@@ -290,16 +290,16 @@ static int object_hide_render_set_exec(bContext *C, wmOperator *op)
void OBJECT_OT_hide_render_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Restrict Render";
+ ot->name = "Set Restrict Render";
ot->description = "Hide the render object by setting the hide render flag";
- ot->idname= "OBJECT_OT_hide_render_set";
+ ot->idname = "OBJECT_OT_hide_render_set";
/* api callbacks */
- ot->exec= object_hide_render_set_exec;
- ot->poll= ED_operator_view3d_active;
+ ot->exec = object_hide_render_set_exec;
+ ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects");
}
@@ -314,55 +314,55 @@ void ED_object_exit_editmode(bContext *C, int flag)
Object *obedit= CTX_data_edit_object(C);
int freedata = flag & EM_FREEDATA;
- if(obedit==NULL) return;
+ if (obedit==NULL) return;
- if(flag & EM_WAITCURSOR) waitcursor(1);
- if(obedit->type==OB_MESH) {
+ if (flag & EM_WAITCURSOR) waitcursor(1);
+ if (obedit->type==OB_MESH) {
Mesh *me= obedit->data;
-// if(EM_texFaceCheck())
+// if (EM_texFaceCheck())
- if(me->edit_btmesh->bm->totvert>MESH_MAX_VERTS) {
+ if (me->edit_btmesh->bm->totvert>MESH_MAX_VERTS) {
error("Too many vertices");
return;
}
EDBM_LoadEditBMesh(scene, obedit);
- if(freedata) {
+ if (freedata) {
EDBM_FreeEditBMesh(me->edit_btmesh);
MEM_freeN(me->edit_btmesh);
me->edit_btmesh= NULL;
}
- if(obedit->restore_mode & OB_MODE_WEIGHT_PAINT) {
+ if (obedit->restore_mode & OB_MODE_WEIGHT_PAINT) {
mesh_octree_table(NULL, NULL, NULL, 'e');
mesh_mirrtopo_table(NULL, 'e');
}
}
else if (obedit->type==OB_ARMATURE) {
ED_armature_from_edit(obedit);
- if(freedata)
+ if (freedata)
ED_armature_edit_free(obedit);
}
- else if(ELEM(obedit->type, OB_CURVE, OB_SURF)) {
+ else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
load_editNurb(obedit);
- if(freedata) free_editNurb(obedit);
+ if (freedata) free_editNurb(obedit);
}
- else if(obedit->type==OB_FONT && freedata) {
+ else if (obedit->type==OB_FONT && freedata) {
load_editText(obedit);
- if(freedata) free_editText(obedit);
+ if (freedata) free_editText(obedit);
}
- else if(obedit->type==OB_LATTICE) {
+ else if (obedit->type==OB_LATTICE) {
load_editLatt(obedit);
- if(freedata) free_editLatt(obedit);
+ if (freedata) free_editLatt(obedit);
}
- else if(obedit->type==OB_MBALL) {
+ else if (obedit->type==OB_MBALL) {
load_editMball(obedit);
- if(freedata) free_editMball(obedit);
+ if (freedata) free_editMball(obedit);
}
/* freedata only 0 now on file saves and render */
- if(freedata) {
+ if (freedata) {
ListBase pidlist;
PTCacheID *pid;
@@ -371,8 +371,8 @@ void ED_object_exit_editmode(bContext *C, int flag)
/* flag object caches as outdated */
BKE_ptcache_ids_from_object(&pidlist, obedit, NULL, 0);
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pid->type != PTCACHE_TYPE_PARTICLES) /* particles don't need reset on geometry change */
+ for (pid=pidlist.first; pid; pid=pid->next) {
+ if (pid->type != PTCACHE_TYPE_PARTICLES) /* particles don't need reset on geometry change */
pid->cache->flag |= PTCACHE_OUTDATED;
}
BLI_freelistN(&pidlist);
@@ -382,10 +382,10 @@ void ED_object_exit_editmode(bContext *C, int flag)
/* also flush ob recalc, doesn't take much overhead, but used for particles */
DAG_id_tag_update(&obedit->id, OB_RECALC_OB|OB_RECALC_DATA);
- if(flag & EM_DO_UNDO)
+ if (flag & EM_DO_UNDO)
ED_undo_push(C, "Editmode");
- if(flag & EM_WAITCURSOR) waitcursor(0);
+ if (flag & EM_WAITCURSOR) waitcursor(0);
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene);
@@ -403,17 +403,17 @@ void ED_object_enter_editmode(bContext *C, int flag)
View3D *v3d= NULL;
int ok= 0;
- if(scene->id.lib) return;
+ if (scene->id.lib) return;
- if(sa && sa->spacetype==SPACE_VIEW3D)
+ if (sa && sa->spacetype==SPACE_VIEW3D)
v3d= sa->spacedata.first;
- if((flag & EM_IGNORE_LAYER)==0) {
+ if ((flag & EM_IGNORE_LAYER)==0) {
base= CTX_data_active_base(C); /* active layer checked here for view3d */
- if(base==NULL) return;
- else if(v3d && (base->lay & v3d->lay)==0) return;
- else if(!v3d && (base->lay & scene->lay)==0) return;
+ if (base==NULL) return;
+ else if (v3d && (base->lay & v3d->lay)==0) return;
+ else if (!v3d && (base->lay & scene->lay)==0) return;
}
else {
base= scene->basact;
@@ -428,18 +428,18 @@ void ED_object_enter_editmode(bContext *C, int flag)
return;
}
- if(flag & EM_WAITCURSOR) waitcursor(1);
+ if (flag & EM_WAITCURSOR) waitcursor(1);
ob->restore_mode = ob->mode;
/* note, when switching scenes the object can have editmode data but
* not be scene->obedit: bug 22954, this avoids calling self eternally */
- if((ob->restore_mode & OB_MODE_EDIT)==0)
+ if ((ob->restore_mode & OB_MODE_EDIT)==0)
ED_object_toggle_modes(C, ob->mode);
ob->mode= OB_MODE_EDIT;
- if(ob->type==OB_MESH) {
+ if (ob->type==OB_MESH) {
ok= 1;
scene->obedit= ob; // context sees this
@@ -458,7 +458,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
* object_data_is_libdata that prevent the bugfix #6614, so
* i add this little hack here.
*/
- if(arm->id.lib) {
+ if (arm->id.lib) {
error_libdata();
return;
}
@@ -470,28 +470,28 @@ void ED_object_enter_editmode(bContext *C, int flag)
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_ARMATURE, scene);
}
- else if(ob->type==OB_FONT) {
+ else if (ob->type==OB_FONT) {
scene->obedit= ob; // XXX for context
ok= 1;
make_editText(ob);
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_TEXT, scene);
}
- else if(ob->type==OB_MBALL) {
+ else if (ob->type==OB_MBALL) {
scene->obedit= ob; // XXX for context
ok= 1;
make_editMball(ob);
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_MBALL, scene);
}
- else if(ob->type==OB_LATTICE) {
+ else if (ob->type==OB_LATTICE) {
scene->obedit= ob; // XXX for context
ok= 1;
make_editLatt(ob);
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_LATTICE, scene);
}
- else if(ob->type==OB_SURF || ob->type==OB_CURVE) {
+ else if (ob->type==OB_SURF || ob->type==OB_CURVE) {
ok= 1;
scene->obedit= ob; // XXX for context
make_editNurb(ob);
@@ -499,7 +499,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_CURVE, scene);
}
- if(ok) {
+ if (ok) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else {
@@ -508,15 +508,15 @@ void ED_object_enter_editmode(bContext *C, int flag)
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene);
}
- if(flag & EM_DO_UNDO) ED_undo_push(C, "Enter Editmode");
- if(flag & EM_WAITCURSOR) waitcursor(0);
+ if (flag & EM_DO_UNDO) ED_undo_push(C, "Enter Editmode");
+ if (flag & EM_WAITCURSOR) waitcursor(0);
}
static int editmode_toggle_exec(bContext *C, wmOperator *UNUSED(op))
{
ToolSettings *toolsettings = CTX_data_tool_settings(C);
- if(!CTX_data_edit_object(C))
+ if (!CTX_data_edit_object(C))
ED_object_enter_editmode(C, EM_WAITCURSOR);
else
ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* had EM_DO_UNDO but op flag calls undo too [#24685] */
@@ -531,7 +531,7 @@ static int editmode_toggle_poll(bContext *C)
Object *ob = CTX_data_active_object(C);
/* covers proxies too */
- if(ELEM(NULL, ob, ob->data) || ((ID *)ob->data)->lib)
+ if (ELEM(NULL, ob, ob->data) || ((ID *)ob->data)->lib)
return 0;
if (ob->restrictflag & OB_RESTRICT_VIEW)
@@ -547,17 +547,17 @@ void OBJECT_OT_editmode_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Editmode";
+ ot->name = "Toggle Editmode";
ot->description = "Toggle object's editmode";
- ot->idname= "OBJECT_OT_editmode_toggle";
+ ot->idname = "OBJECT_OT_editmode_toggle";
/* api callbacks */
- ot->exec= editmode_toggle_exec;
+ ot->exec = editmode_toggle_exec;
- ot->poll= editmode_toggle_poll;
+ ot->poll = editmode_toggle_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* *************************** */
@@ -566,12 +566,12 @@ static int posemode_exec(bContext *C, wmOperator *UNUSED(op))
{
Base *base= CTX_data_active_base(C);
- if(base->object->type==OB_ARMATURE) {
- if(base->object==CTX_data_edit_object(C)) {
+ if (base->object->type==OB_ARMATURE) {
+ if (base->object==CTX_data_edit_object(C)) {
ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO);
ED_armature_enter_posemode(C, base);
}
- else if(base->object->mode & OB_MODE_POSE)
+ else if (base->object->mode & OB_MODE_POSE)
ED_armature_exit_posemode(C, base);
else
ED_armature_enter_posemode(C, base);
@@ -585,16 +585,16 @@ static int posemode_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_posemode_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Pose Mode";
- ot->idname= "OBJECT_OT_posemode_toggle";
- ot->description= "Enable or disable posing/selecting bones";
+ ot->name = "Toggle Pose Mode";
+ ot->idname = "OBJECT_OT_posemode_toggle";
+ ot->description = "Enable or disable posing/selecting bones";
/* api callbacks */
- ot->exec= posemode_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = posemode_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flag */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static void copymenu_properties(Scene *scene, View3D *v3d, Object *ob)
@@ -606,7 +606,7 @@ static void copymenu_properties(Scene *scene, View3D *v3d, Object *ob)
char *str;
prop= ob->prop.first;
- while(prop) {
+ while (prop) {
tot++;
prop= prop->next;
}
@@ -620,7 +620,7 @@ static void copymenu_properties(Scene *scene, View3D *v3d, Object *ob)
tot= 0;
prop= ob->prop.first;
- while(prop) {
+ while (prop) {
tot++;
strcat(str, "|");
strcat(str, prop->name);
@@ -630,23 +630,25 @@ static void copymenu_properties(Scene *scene, View3D *v3d, Object *ob)
nr= pupmenu(str);
if ( nr==1 || nr==2 ) {
- for(base= FIRSTBASE; base; base= base->next) {
- if((base != BASACT) &&(TESTBASELIB(v3d, base))) {
+ for (base= FIRSTBASE; base; base= base->next) {
+ if ((base != BASACT) &&(TESTBASELIB(v3d, base))) {
if (nr==1) { /* replace */
copy_properties( &base->object->prop, &ob->prop );
- } else {
- for(prop = ob->prop.first; prop; prop= prop->next ) {
+ }
+ else {
+ for (prop = ob->prop.first; prop; prop= prop->next ) {
set_ob_property(base->object, prop);
}
}
}
}
- } else if(nr>0) {
+ }
+ else if (nr>0) {
prop = BLI_findlink(&ob->prop, nr-4); /* account for first 3 menu items & menu index starting at 1*/
- if(prop) {
- for(base= FIRSTBASE; base; base= base->next) {
- if((base != BASACT) &&(TESTBASELIB(v3d, base))) {
+ if (prop) {
+ for (base= FIRSTBASE; base; base= base->next) {
+ if ((base != BASACT) &&(TESTBASELIB(v3d, base))) {
set_ob_property(base->object, prop);
}
}
@@ -661,9 +663,9 @@ static void copymenu_logicbricks(Scene *scene, View3D *v3d, Object *ob)
//XXX no longer used - to be removed - replaced by logicbricks_copy_exec
Base *base;
- for(base= FIRSTBASE; base; base= base->next) {
- if(base->object != ob) {
- if(TESTBASELIB(v3d, base)) {
+ for (base= FIRSTBASE; base; base= base->next) {
+ if (base->object != ob) {
+ if (TESTBASELIB(v3d, base)) {
/* first: free all logic */
free_sensors(&base->object->sensors);
@@ -697,7 +699,7 @@ static void copy_texture_space(Object *to, Object *ob)
float *poin1= NULL, *poin2= NULL;
short texflag= 0;
- if(ob->type==OB_MESH) {
+ if (ob->type==OB_MESH) {
texflag= ((Mesh *)ob->data)->texflag;
poin2= ((Mesh *)ob->data)->loc;
}
@@ -705,14 +707,14 @@ static void copy_texture_space(Object *to, Object *ob)
texflag= ((Curve *)ob->data)->texflag;
poin2= ((Curve *)ob->data)->loc;
}
- else if(ob->type==OB_MBALL) {
+ else if (ob->type==OB_MBALL) {
texflag= ((MetaBall *)ob->data)->texflag;
poin2= ((MetaBall *)ob->data)->loc;
}
else
return;
- if(to->type==OB_MESH) {
+ if (to->type==OB_MESH) {
((Mesh *)to->data)->texflag= texflag;
poin1= ((Mesh *)to->data)->loc;
}
@@ -720,7 +722,7 @@ static void copy_texture_space(Object *to, Object *ob)
((Curve *)to->data)->texflag= texflag;
poin1= ((Curve *)to->data)->loc;
}
- else if(to->type==OB_MBALL) {
+ else if (to->type==OB_MBALL) {
((MetaBall *)to->data)->texflag= texflag;
poin1= ((MetaBall *)to->data)->loc;
}
@@ -729,7 +731,7 @@ static void copy_texture_space(Object *to, Object *ob)
memcpy(poin1, poin2, 9*sizeof(float)); /* this was noted in DNA_mesh, curve, mball */
- if(to->type==OB_MESH) {
+ if (to->type==OB_MESH) {
/* pass */
}
else if (to->type == OB_MBALL) {
@@ -750,58 +752,58 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
Nurb *nu;
int do_scene_sort= 0;
- if(scene->id.lib) return;
+ if (scene->id.lib) return;
- if(!(ob=OBACT)) return;
+ if (!(ob=OBACT)) return;
- if(scene->obedit) { // XXX get from context
+ if (scene->obedit) { // XXX get from context
/* obedit_copymenu(); */
return;
}
- if(event==9) {
+ if (event==9) {
copymenu_properties(scene, v3d, ob);
return;
}
- else if(event==10) {
+ else if (event==10) {
copymenu_logicbricks(scene, v3d, ob);
return;
}
- else if(event==24) {
+ else if (event==24) {
/* moved to object_link_modifiers */
/* copymenu_modifiers(bmain, scene, v3d, ob); */
return;
}
- for(base= FIRSTBASE; base; base= base->next) {
- if(base != BASACT) {
- if(TESTBASELIB(v3d, base)) {
+ for (base= FIRSTBASE; base; base= base->next) {
+ if (base != BASACT) {
+ if (TESTBASELIB(v3d, base)) {
base->object->recalc |= OB_RECALC_OB;
- if(event==1) { /* loc */
+ if (event==1) { /* loc */
copy_v3_v3(base->object->loc, ob->loc);
copy_v3_v3(base->object->dloc, ob->dloc);
}
- else if(event==2) { /* rot */
+ else if (event==2) { /* rot */
copy_v3_v3(base->object->rot, ob->rot);
copy_v3_v3(base->object->drot, ob->drot);
copy_qt_qt(base->object->quat, ob->quat);
copy_qt_qt(base->object->dquat, ob->dquat);
}
- else if(event==3) { /* size */
+ else if (event==3) { /* size */
copy_v3_v3(base->object->size, ob->size);
copy_v3_v3(base->object->dscale, ob->dscale);
}
- else if(event==4) { /* drawtype */
+ else if (event==4) { /* drawtype */
base->object->dt= ob->dt;
base->object->dtx= ob->dtx;
base->object->empty_drawtype= ob->empty_drawtype;
base->object->empty_drawsize= ob->empty_drawsize;
}
- else if(event==5) { /* time offs */
+ else if (event==5) { /* time offs */
base->object->sf= ob->sf;
}
- else if(event==6) { /* dupli */
+ else if (event==6) { /* dupli */
base->object->dupon= ob->dupon;
base->object->dupoff= ob->dupoff;
base->object->dupsta= ob->dupsta;
@@ -811,17 +813,17 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
base->object->transflag |= (ob->transflag & OB_DUPLI);
base->object->dup_group= ob->dup_group;
- if(ob->dup_group)
+ if (ob->dup_group)
id_lib_extern(&ob->dup_group->id);
}
- else if(event==7) { /* mass */
+ else if (event==7) { /* mass */
base->object->mass= ob->mass;
}
- else if(event==8) { /* damping */
+ else if (event==8) { /* damping */
base->object->damping= ob->damping;
base->object->rdamping= ob->rdamping;
}
- else if(event==11) { /* all physical attributes */
+ else if (event==11) { /* all physical attributes */
base->object->gameflag = ob->gameflag;
base->object->inertia = ob->inertia;
base->object->formfactor = ob->formfactor;
@@ -836,12 +838,12 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
base->object->bsoft= copy_bulletsoftbody(ob->bsoft);
}
- else if(event==17) { /* tex space */
+ else if (event==17) { /* tex space */
copy_texture_space(base->object, ob);
}
- else if(event==18) { /* font settings */
+ else if (event==18) { /* font settings */
- if(base->object->type==ob->type) {
+ if (base->object->type==ob->type) {
cu= ob->data;
cu1= base->object->data;
@@ -856,16 +858,16 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
cu1->wordspace= cu->wordspace;
cu1->ulpos= cu->ulpos;
cu1->ulheight= cu->ulheight;
- if(cu1->vfont) cu1->vfont->id.us--;
+ if (cu1->vfont) cu1->vfont->id.us--;
cu1->vfont= cu->vfont;
id_us_plus((ID *)cu1->vfont);
- if(cu1->vfontb) cu1->vfontb->id.us--;
+ if (cu1->vfontb) cu1->vfontb->id.us--;
cu1->vfontb= cu->vfontb;
id_us_plus((ID *)cu1->vfontb);
- if(cu1->vfonti) cu1->vfonti->id.us--;
+ if (cu1->vfonti) cu1->vfonti->id.us--;
cu1->vfonti= cu->vfonti;
id_us_plus((ID *)cu1->vfonti);
- if(cu1->vfontbi) cu1->vfontbi->id.us--;
+ if (cu1->vfontbi) cu1->vfontbi->id.us--;
cu1->vfontbi= cu->vfontbi;
id_us_plus((ID *)cu1->vfontbi);
@@ -877,9 +879,9 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
base->object->recalc |= OB_RECALC_DATA;
}
}
- else if(event==19) { /* bevel settings */
+ else if (event==19) { /* bevel settings */
- if(ELEM(base->object->type, OB_CURVE, OB_FONT)) {
+ if (ELEM(base->object->type, OB_CURVE, OB_FONT)) {
cu= ob->data;
cu1= base->object->data;
@@ -893,9 +895,9 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
base->object->recalc |= OB_RECALC_DATA;
}
}
- else if(event==25) { /* curve resolution */
+ else if (event==25) { /* curve resolution */
- if(ELEM(base->object->type, OB_CURVE, OB_FONT)) {
+ if (ELEM(base->object->type, OB_CURVE, OB_FONT)) {
cu= ob->data;
cu1= base->object->data;
@@ -904,7 +906,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
nu= cu1->nurb.first;
- while(nu) {
+ while (nu) {
nu->resolu= cu1->resolu;
nu= nu->next;
}
@@ -912,7 +914,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
base->object->recalc |= OB_RECALC_DATA;
}
}
- else if(event==21) {
+ else if (event==21) {
if (base->object->type==OB_MESH) {
ModifierData *md = modifiers_findByType(ob, eModifierType_Subsurf);
@@ -929,15 +931,15 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
}
}
}
- else if(event==22) {
+ else if (event==22) {
/* Copy the constraint channels over */
copy_constraints(&base->object->constraints, &ob->constraints, TRUE);
do_scene_sort= 1;
}
- else if(event==23) {
+ else if (event==23) {
base->object->softflag= ob->softflag;
- if(base->object->soft) sbFree(base->object->soft);
+ if (base->object->soft) sbFree(base->object->soft);
base->object->soft= copy_softbody(ob->soft);
@@ -945,47 +947,47 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
BLI_addhead(&base->object->modifiers, modifier_new(eModifierType_Softbody));
}
}
- else if(event==26) {
+ else if (event==26) {
#if 0 // XXX old animation system
copy_nlastrips(&base->object->nlastrips, &ob->nlastrips);
#endif // XXX old animation system
}
- else if(event==27) { /* autosmooth */
+ else if (event==27) { /* autosmooth */
if (base->object->type==OB_MESH) {
Mesh *me= ob->data;
Mesh *cme= base->object->data;
cme->smoothresh= me->smoothresh;
- if(me->flag & ME_AUTOSMOOTH)
+ if (me->flag & ME_AUTOSMOOTH)
cme->flag |= ME_AUTOSMOOTH;
else
cme->flag &= ~ME_AUTOSMOOTH;
}
}
- else if(event==28) { /* UV orco */
- if(ELEM(base->object->type, OB_CURVE, OB_SURF)) {
+ else if (event==28) { /* UV orco */
+ if (ELEM(base->object->type, OB_CURVE, OB_SURF)) {
cu= ob->data;
cu1= base->object->data;
- if(cu->flag & CU_UV_ORCO)
+ if (cu->flag & CU_UV_ORCO)
cu1->flag |= CU_UV_ORCO;
else
cu1->flag &= ~CU_UV_ORCO;
}
}
- else if(event==29) { /* protected bits */
+ else if (event==29) { /* protected bits */
base->object->protectflag= ob->protectflag;
}
- else if(event==30) { /* index object */
+ else if (event==30) { /* index object */
base->object->index= ob->index;
}
- else if(event==31) { /* object color */
+ else if (event==31) { /* object color */
copy_v4_v4(base->object->col, ob->col);
}
}
}
}
- if(do_scene_sort)
+ if (do_scene_sort)
DAG_scene_sort(bmain, scene);
DAG_ids_flush_update(bmain, 0);
@@ -997,7 +999,7 @@ static void UNUSED_FUNCTION(copy_attr_menu)(Main *bmain, Scene *scene, View3D *v
short event;
char str[512];
- if(!(ob=OBACT)) return;
+ if (!(ob=OBACT)) return;
if (scene->obedit) { // XXX get from context
// if (ob->type == OB_MESH)
@@ -1023,27 +1025,27 @@ static void UNUSED_FUNCTION(copy_attr_menu)(Main *bmain, Scene *scene, View3D *v
// strcat(str, "|Texture Space%x17");
// }
- if(ob->type == OB_FONT) strcat(str, "|Font Settings%x18|Bevel Settings%x19");
- if(ob->type == OB_CURVE) strcat(str, "|Bevel Settings%x19|UV Orco%x28");
+ if (ob->type == OB_FONT) strcat(str, "|Font Settings%x18|Bevel Settings%x19");
+ if (ob->type == OB_CURVE) strcat(str, "|Bevel Settings%x19|UV Orco%x28");
- if((ob->type == OB_FONT) || (ob->type == OB_CURVE)) {
+ if ((ob->type == OB_FONT) || (ob->type == OB_CURVE)) {
strcat(str, "|Curve Resolution%x25");
}
- if(ob->type==OB_MESH) {
+ if (ob->type==OB_MESH) {
strcat(str, "|Subsurf Settings%x21|AutoSmooth%x27");
}
- if(ob->soft) strcat(str, "|Soft Body Settings%x23");
+ if (ob->soft) strcat(str, "|Soft Body Settings%x23");
strcat(str, "|Pass Index%x30");
- if(ob->type==OB_MESH || ob->type==OB_CURVE || ob->type==OB_LATTICE || ob->type==OB_SURF) {
+ if (ob->type==OB_MESH || ob->type==OB_CURVE || ob->type==OB_LATTICE || ob->type==OB_SURF) {
strcat(str, "|Modifiers ...%x24");
}
event= pupmenu(str);
- if(event<= 0) return;
+ if (event<= 0) return;
copy_attr(bmain, scene, v3d, event);
}
@@ -1054,10 +1056,10 @@ static int forcefield_toggle_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = CTX_data_active_object(C);
- if(ob->pd == NULL)
+ if (ob->pd == NULL)
ob->pd = object_add_collision_fields(PFIELD_FORCE);
- if(ob->pd->forcefield == 0)
+ if (ob->pd->forcefield == 0)
ob->pd->forcefield = PFIELD_FORCE;
else
ob->pd->forcefield = 0;
@@ -1071,16 +1073,16 @@ void OBJECT_OT_forcefield_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Force Field";
+ ot->name = "Toggle Force Field";
ot->description = "Toggle object's force field";
- ot->idname= "OBJECT_OT_forcefield_toggle";
+ ot->idname = "OBJECT_OT_forcefield_toggle";
/* api callbacks */
- ot->exec= forcefield_toggle_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = forcefield_toggle_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ********************************************** */
@@ -1137,16 +1139,16 @@ static int object_calculate_paths_exec (bContext *C, wmOperator *op)
void OBJECT_OT_paths_calculate (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Calculate Object Paths";
- ot->idname= "OBJECT_OT_paths_calculate";
- ot->description= "Calculate paths for the selected bones";
+ ot->name = "Calculate Object Paths";
+ ot->idname = "OBJECT_OT_paths_calculate";
+ ot->description = "Calculate paths for the selected bones";
/* api callbacks */
- ot->exec= object_calculate_paths_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = object_calculate_paths_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* --------- */
@@ -1181,13 +1183,13 @@ static int object_clear_paths_exec (bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_paths_clear (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Object Paths";
- ot->idname= "OBJECT_OT_paths_clear";
- ot->description= "Clear path caches for selected bones";
+ ot->name = "Clear Object Paths";
+ ot->idname = "OBJECT_OT_paths_clear";
+ ot->description = "Clear path caches for selected bones";
/* api callbacks */
- ot->exec= object_clear_paths_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = object_clear_paths_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1205,7 +1207,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob->type==OB_MESH) {
+ if (ob->type==OB_MESH) {
mesh_set_smooth_flag(ob, !clear);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -1216,8 +1218,8 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
else if ELEM(ob->type, OB_SURF, OB_CURVE) {
cu= ob->data;
- for(nu=cu->nurb.first; nu; nu=nu->next) {
- if(!clear) nu->flag |= ME_SMOOTH;
+ for (nu=cu->nurb.first; nu; nu=nu->next) {
+ if (!clear) nu->flag |= ME_SMOOTH;
else nu->flag &= ~ME_SMOOTH;
}
@@ -1240,31 +1242,31 @@ static int shade_poll(bContext *C)
void OBJECT_OT_shade_flat(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Shade Flat";
- ot->description= "Display faces 'flat'";
- ot->idname= "OBJECT_OT_shade_flat";
+ ot->name = "Shade Flat";
+ ot->description = "Display faces 'flat'";
+ ot->idname = "OBJECT_OT_shade_flat";
/* api callbacks */
- ot->poll= shade_poll;
- ot->exec= shade_smooth_exec;
+ ot->poll = shade_poll;
+ ot->exec = shade_smooth_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
void OBJECT_OT_shade_smooth(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Shade Smooth";
- ot->description= "Display faces 'smooth' (using vertex normals)";
- ot->idname= "OBJECT_OT_shade_smooth";
+ ot->name = "Shade Smooth";
+ ot->description = "Display faces 'smooth' (using vertex normals)";
+ ot->idname = "OBJECT_OT_shade_smooth";
/* api callbacks */
- ot->poll= shade_poll;
- ot->exec= shade_smooth_exec;
+ ot->poll = shade_poll;
+ ot->exec = shade_smooth_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ********************** */
@@ -1279,31 +1281,31 @@ static void UNUSED_FUNCTION(image_aspect)(Scene *scene, View3D *v3d)
float x, y, space;
int a, b, done;
- if(scene->obedit) return; // XXX get from context
- if(scene->id.lib) return;
+ if (scene->obedit) return; // XXX get from context
+ if (scene->id.lib) return;
- for(base= FIRSTBASE; base; base= base->next) {
- if(TESTBASELIB(v3d, base)) {
+ for (base= FIRSTBASE; base; base= base->next) {
+ if (TESTBASELIB(v3d, base)) {
ob= base->object;
done= 0;
- for(a=1; a<=ob->totcol; a++) {
+ for (a=1; a<=ob->totcol; a++) {
ma= give_current_material(ob, a);
- if(ma) {
- for(b=0; b<MAX_MTEX; b++) {
- if(ma->mtex[b] && ma->mtex[b]->tex) {
+ if (ma) {
+ for (b=0; b<MAX_MTEX; b++) {
+ if (ma->mtex[b] && ma->mtex[b]->tex) {
tex= ma->mtex[b]->tex;
- if(tex->type==TEX_IMAGE && tex->ima) {
+ if (tex->type==TEX_IMAGE && tex->ima) {
ImBuf *ibuf= BKE_image_get_ibuf(tex->ima, NULL);
/* texturespace */
space= 1.0;
- if(ob->type==OB_MESH) {
+ if (ob->type==OB_MESH) {
float size[3];
mesh_get_texspace(ob->data, NULL, NULL, size);
space= size[0]/size[1];
}
- else if(ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF)) {
+ else if (ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF)) {
Curve *cu= ob->data;
space= cu->size[0]/cu->size[1];
}
@@ -1311,17 +1313,17 @@ static void UNUSED_FUNCTION(image_aspect)(Scene *scene, View3D *v3d)
x= ibuf->x/space;
y= ibuf->y;
- if(x>y) ob->size[0]= ob->size[1]*x/y;
+ if (x>y) ob->size[0]= ob->size[1]*x/y;
else ob->size[1]= ob->size[0]*y/x;
done= 1;
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
}
- if(done) break;
+ if (done) break;
}
}
- if(done) break;
+ if (done) break;
}
}
}
@@ -1336,12 +1338,12 @@ static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED(
Object *ob;
int totitem= 0;
- if(!C) /* needed for docs */
+ if (!C) /* needed for docs */
return object_mode_items;
ob = CTX_data_active_object(C);
- while(ob && input->identifier) {
- if((input->value == OB_MODE_EDIT && ((ob->type == OB_MESH) || (ob->type == OB_ARMATURE) ||
+ while (ob && input->identifier) {
+ if ((input->value == OB_MODE_EDIT && ((ob->type == OB_MESH) || (ob->type == OB_ARMATURE) ||
(ob->type == OB_CURVE) || (ob->type == OB_SURF) ||
(ob->type == OB_FONT) || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) ||
(input->value == OB_MODE_POSE && (ob->type == OB_ARMATURE)) ||
@@ -1362,19 +1364,19 @@ static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED(
static const char *object_mode_op_string(int mode)
{
- if(mode & OB_MODE_EDIT)
+ if (mode & OB_MODE_EDIT)
return "OBJECT_OT_editmode_toggle";
- if(mode == OB_MODE_SCULPT)
+ if (mode == OB_MODE_SCULPT)
return "SCULPT_OT_sculptmode_toggle";
- if(mode == OB_MODE_VERTEX_PAINT)
+ if (mode == OB_MODE_VERTEX_PAINT)
return "PAINT_OT_vertex_paint_toggle";
- if(mode == OB_MODE_WEIGHT_PAINT)
+ if (mode == OB_MODE_WEIGHT_PAINT)
return "PAINT_OT_weight_paint_toggle";
- if(mode == OB_MODE_TEXTURE_PAINT)
+ if (mode == OB_MODE_TEXTURE_PAINT)
return "PAINT_OT_texture_paint_toggle";
- if(mode == OB_MODE_PARTICLE_EDIT)
+ if (mode == OB_MODE_PARTICLE_EDIT)
return "PARTICLE_OT_particle_edit_toggle";
- if(mode == OB_MODE_POSE)
+ if (mode == OB_MODE_POSE)
return "OBJECT_OT_posemode_toggle";
return NULL;
}
@@ -1385,27 +1387,27 @@ static int object_mode_set_compat(bContext *UNUSED(C), wmOperator *op, Object *o
{
ObjectMode mode = RNA_enum_get(op->ptr, "mode");
- if(ob) {
- if(mode == OB_MODE_OBJECT)
+ if (ob) {
+ if (mode == OB_MODE_OBJECT)
return 1;
switch(ob->type) {
case OB_MESH:
- if(mode & (OB_MODE_EDIT|OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT|OB_MODE_PARTICLE_EDIT))
+ if (mode & (OB_MODE_EDIT|OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT|OB_MODE_PARTICLE_EDIT))
return 1;
return 0;
case OB_CURVE:
case OB_SURF:
case OB_FONT:
case OB_MBALL:
- if(mode & (OB_MODE_EDIT))
+ if (mode & (OB_MODE_EDIT))
return 1;
return 0;
case OB_LATTICE:
- if(mode & (OB_MODE_EDIT|OB_MODE_WEIGHT_PAINT))
+ if (mode & (OB_MODE_EDIT|OB_MODE_WEIGHT_PAINT))
return 1;
case OB_ARMATURE:
- if(mode & (OB_MODE_EDIT|OB_MODE_POSE))
+ if (mode & (OB_MODE_EDIT|OB_MODE_POSE))
return 1;
}
}
@@ -1420,23 +1422,23 @@ static int object_mode_set_exec(bContext *C, wmOperator *op)
ObjectMode restore_mode = (ob) ? ob->mode : OB_MODE_OBJECT;
int toggle = RNA_boolean_get(op->ptr, "toggle");
- if(!ob || !object_mode_set_compat(C, op, ob))
+ if (!ob || !object_mode_set_compat(C, op, ob))
return OPERATOR_PASS_THROUGH;
/* Exit current mode if it's not the mode we're setting */
- if(ob->mode != OB_MODE_OBJECT && ob->mode != mode)
+ if (ob->mode != OB_MODE_OBJECT && ob->mode != mode)
WM_operator_name_call(C, object_mode_op_string(ob->mode), WM_OP_EXEC_REGION_WIN, NULL);
- if(mode != OB_MODE_OBJECT) {
+ if (mode != OB_MODE_OBJECT) {
/* Enter new mode */
- if(ob->mode != mode || toggle)
+ if (ob->mode != mode || toggle)
WM_operator_name_call(C, object_mode_op_string(mode), WM_OP_EXEC_REGION_WIN, NULL);
- if(toggle) {
- if(ob->mode == mode)
+ if (toggle) {
+ if (ob->mode == mode)
/* For toggling, store old mode so we know what to go back to */
ob->restore_mode = restore_mode;
- else if(ob->restore_mode != OB_MODE_OBJECT && ob->restore_mode != mode) {
+ else if (ob->restore_mode != OB_MODE_OBJECT && ob->restore_mode != mode) {
WM_operator_name_call(C, object_mode_op_string(ob->restore_mode), WM_OP_EXEC_REGION_WIN, NULL);
}
}
@@ -1450,17 +1452,17 @@ void OBJECT_OT_mode_set(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Set Object Mode";
+ ot->name = "Set Object Mode";
ot->description = "Sets the object interaction mode";
- ot->idname= "OBJECT_OT_mode_set";
+ ot->idname = "OBJECT_OT_mode_set";
/* api callbacks */
- ot->exec= object_mode_set_exec;
+ ot->exec = object_mode_set_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= 0; /* no register/undo here, leave it to operators being called */
+ ot->flag = 0; /* no register/undo here, leave it to operators being called */
prop= RNA_def_enum(ot->srna, "mode", object_mode_items, OB_MODE_OBJECT, "Mode", "");
RNA_def_enum_funcs(prop, object_mode_set_itemsf);
@@ -1472,19 +1474,19 @@ void OBJECT_OT_mode_set(wmOperatorType *ot)
void ED_object_toggle_modes(bContext *C, int mode)
{
- if(mode & OB_MODE_SCULPT)
+ if (mode & OB_MODE_SCULPT)
WM_operator_name_call(C, "SCULPT_OT_sculptmode_toggle", WM_OP_EXEC_REGION_WIN, NULL);
- if(mode & OB_MODE_VERTEX_PAINT)
+ if (mode & OB_MODE_VERTEX_PAINT)
WM_operator_name_call(C, "PAINT_OT_vertex_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL);
- if(mode & OB_MODE_WEIGHT_PAINT)
+ if (mode & OB_MODE_WEIGHT_PAINT)
WM_operator_name_call(C, "PAINT_OT_weight_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL);
- if(mode & OB_MODE_TEXTURE_PAINT)
+ if (mode & OB_MODE_TEXTURE_PAINT)
WM_operator_name_call(C, "PAINT_OT_texture_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL);
- if(mode & OB_MODE_PARTICLE_EDIT)
+ if (mode & OB_MODE_PARTICLE_EDIT)
WM_operator_name_call(C, "PARTICLE_OT_particle_edit_toggle", WM_OP_EXEC_REGION_WIN, NULL);
- if(mode & OB_MODE_POSE)
+ if (mode & OB_MODE_POSE)
WM_operator_name_call(C, "OBJECT_OT_posemode_toggle", WM_OP_EXEC_REGION_WIN, NULL);
- if(mode & OB_MODE_EDIT)
+ if (mode & OB_MODE_EDIT)
WM_operator_name_call(C, "OBJECT_OT_editmode_toggle", WM_OP_EXEC_REGION_WIN, NULL);
}
@@ -1515,16 +1517,16 @@ static int game_property_new(bContext *C, wmOperator *op)
void OBJECT_OT_game_property_new(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "New Game Property";
- ot->description= "Create a new property available to the game engine";
- ot->idname= "OBJECT_OT_game_property_new";
+ ot->name = "New Game Property";
+ ot->description = "Create a new property available to the game engine";
+ ot->idname = "OBJECT_OT_game_property_new";
/* api callbacks */
- ot->exec= game_property_new;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = game_property_new;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", gameproperty_type_items, GPROP_FLOAT, "Type", "Type of game property to add");
RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the game property to add");
@@ -1536,12 +1538,12 @@ static int game_property_remove(bContext *C, wmOperator *op)
bProperty *prop;
int index= RNA_int_get(op->ptr, "index");
- if(!ob)
+ if (!ob)
return OPERATOR_CANCELLED;
prop= BLI_findlink(&ob->prop, index);
- if(prop) {
+ if (prop) {
BLI_remlink(&ob->prop, prop);
free_property(prop);
@@ -1556,16 +1558,16 @@ static int game_property_remove(bContext *C, wmOperator *op)
void OBJECT_OT_game_property_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Game Property";
- ot->description= "Remove game property";
- ot->idname= "OBJECT_OT_game_property_remove";
+ ot->name = "Remove Game Property";
+ ot->description = "Remove game property";
+ ot->idname = "OBJECT_OT_game_property_remove";
/* api callbacks */
- ot->exec= game_property_remove;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = game_property_remove;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "Property index to remove ", 0, INT_MAX);
}
@@ -1591,10 +1593,10 @@ static EnumPropertyItem *gameprops_itemf(bContext *C, PointerRNA *UNUSED(ptr), P
bProperty *prop;
int a, totitem= 0;
- if(!ob)
+ if (!ob)
return gameprops_items;
- for(a=1, prop= ob->prop.first; prop; prop=prop->next, a++) {
+ for (a=1, prop= ob->prop.first; prop; prop=prop->next, a++) {
tmp.value= a;
tmp.identifier= prop->name;
tmp.name= prop->name;
@@ -1614,10 +1616,10 @@ static int game_property_copy_exec(bContext *C, wmOperator *op)
int type = RNA_enum_get(op->ptr, "operation");
int propid= RNA_enum_get(op->ptr, "property");
- if(propid > 0) { /* copy */
+ if (propid > 0) { /* copy */
prop = BLI_findlink(&ob->prop, propid-1);
- if(prop) {
+ if (prop) {
CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
if (ob != ob_iter)
set_ob_property(ob_iter, prop);
@@ -1633,7 +1635,7 @@ static int game_property_copy_exec(bContext *C, wmOperator *op)
/* merge - the default when calling with no argument */
else
- for(prop = ob->prop.first; prop; prop= prop->next)
+ for (prop = ob->prop.first; prop; prop= prop->next)
set_ob_property(ob_iter, prop);
}
}
@@ -1647,20 +1649,20 @@ void OBJECT_OT_game_property_copy(wmOperatorType *ot)
{
PropertyRNA *prop;
/* identifiers */
- ot->name= "Copy Game Property";
- ot->idname= "OBJECT_OT_game_property_copy";
+ ot->name = "Copy Game Property";
+ ot->idname = "OBJECT_OT_game_property_copy";
/* api callbacks */
- ot->exec= game_property_copy_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = game_property_copy_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "operation", game_properties_copy_operations, 3, "Operation", "");
prop=RNA_def_enum(ot->srna, "property", gameprops_items, 0, "Property", "Properties to copy");
RNA_def_enum_funcs(prop, gameprops_itemf);
- ot->prop=prop;
+ ot->prop = prop;
}
static int game_property_clear_exec(bContext *C, wmOperator *UNUSED(op))
@@ -1676,15 +1678,15 @@ static int game_property_clear_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_game_property_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Game Property";
- ot->idname= "OBJECT_OT_game_property_clear";
+ ot->name = "Clear Game Property";
+ ot->idname = "OBJECT_OT_game_property_clear";
/* api callbacks */
- ot->exec= game_property_clear_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = game_property_clear_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ Copy Logic Bricks ***********************/
@@ -1694,7 +1696,7 @@ static int logicbricks_copy_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob=ED_object_active_context(C);
CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
- if(ob != ob_iter) {
+ if (ob != ob_iter) {
/* first: free all logic */
free_sensors(&ob_iter->sensors);
unlink_controllers(&ob_iter->controllers);
@@ -1717,7 +1719,7 @@ static int logicbricks_copy_exec(bContext *C, wmOperator *UNUSED(op))
ob_iter->state= ob->state;
ob_iter->init_state= ob->init_state;
- if(ob_iter->totcol==ob->totcol) {
+ if (ob_iter->totcol==ob->totcol) {
ob_iter->actcol= ob->actcol;
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob_iter);
}
@@ -1733,16 +1735,16 @@ static int logicbricks_copy_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_logic_bricks_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Logic Bricks to Selected";
+ ot->name = "Copy Logic Bricks to Selected";
ot->description = "Copy logic bricks to other selected objects";
- ot->idname= "OBJECT_OT_logic_bricks_copy";
+ ot->idname = "OBJECT_OT_logic_bricks_copy";
/* api callbacks */
- ot->exec= logicbricks_copy_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = logicbricks_copy_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int game_physics_copy_exec(bContext *C, wmOperator *UNUSED(op))
@@ -1750,7 +1752,7 @@ static int game_physics_copy_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob=ED_object_active_context(C);
CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
- if(ob != ob_iter) {
+ if (ob != ob_iter) {
ob_iter->gameflag = ob->gameflag;
ob_iter->gameflag2 = ob->gameflag2;
ob_iter->inertia = ob->inertia;
@@ -1767,7 +1769,7 @@ static int game_physics_copy_exec(bContext *C, wmOperator *UNUSED(op))
ob_iter->collision_boundtype = ob->collision_boundtype;
ob_iter->margin = ob->margin;
ob_iter->bsoft = copy_bulletsoftbody(ob->bsoft);
- if(ob->restrictflag & OB_RESTRICT_RENDER)
+ if (ob->restrictflag & OB_RESTRICT_RENDER)
ob_iter->restrictflag |= OB_RESTRICT_RENDER;
else
ob_iter->restrictflag &= ~OB_RESTRICT_RENDER;
@@ -1781,14 +1783,14 @@ static int game_physics_copy_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_game_physics_copy(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Game Physics Properties to Selected";
+ ot->name = "Copy Game Physics Properties to Selected";
ot->description = "Copy game physics properties to other selected objects";
- ot->idname= "OBJECT_OT_game_physics_copy";
+ ot->idname = "OBJECT_OT_game_physics_copy";
/* api callbacks */
- ot->exec= game_physics_copy_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = game_physics_copy_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index d5dfbda8696..34410b87e79 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -67,13 +67,13 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
Group *group;
int ok = 0;
- if(!ob) return OPERATOR_CANCELLED;
+ if (!ob) return OPERATOR_CANCELLED;
/* linking to same group requires its own loop so we can avoid
* looking up the active objects groups each time */
- for(group= bmain->group.first; group; group=group->id.next) {
- if(object_in_group(ob, group)) {
+ for (group= bmain->group.first; group; group=group->id.next) {
+ if (object_in_group(ob, group)) {
/* Assign groups to selected objects */
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
add_to_group(group, base->object, scene, base);
@@ -83,7 +83,7 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
}
}
- if(!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
+ if (!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
DAG_scene_sort(bmain, scene);
WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
@@ -94,16 +94,16 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
void GROUP_OT_objects_add_active(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Selected To Active Group";
+ ot->name = "Add Selected To Active Group";
ot->description = "Add the object to an object group that contains the active object";
- ot->idname= "GROUP_OT_objects_add_active";
+ ot->idname = "GROUP_OT_objects_add_active";
/* api callbacks */
- ot->exec= objects_add_active_exec;
- ot->poll= ED_operator_objectmode;
+ ot->exec = objects_add_active_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int objects_remove_active_exec(bContext *C, wmOperator *op)
@@ -114,13 +114,13 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
Group *group;
int ok = 0;
- if(!ob) return OPERATOR_CANCELLED;
+ if (!ob) return OPERATOR_CANCELLED;
/* linking to same group requires its own loop so we can avoid
* looking up the active objects groups each time */
- for(group= bmain->group.first; group; group=group->id.next) {
- if(object_in_group(ob, group)) {
+ for (group= bmain->group.first; group; group=group->id.next) {
+ if (object_in_group(ob, group)) {
/* Assign groups to selected objects */
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
rem_from_group(group, base->object, scene, base);
@@ -130,7 +130,7 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
}
}
- if(!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
+ if (!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
DAG_scene_sort(bmain, scene);
WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
@@ -141,16 +141,16 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
void GROUP_OT_objects_remove_active(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Selected From Active Group";
+ ot->name = "Remove Selected From Active Group";
ot->description = "Remove the object from an object group that contains the active object";
- ot->idname= "GROUP_OT_objects_remove_active";
+ ot->idname = "GROUP_OT_objects_remove_active";
/* api callbacks */
- ot->exec= objects_remove_active_exec;
- ot->poll= ED_operator_objectmode;
+ ot->exec = objects_remove_active_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int group_objects_remove_exec(bContext *C, wmOperator *UNUSED(op))
@@ -161,7 +161,7 @@ static int group_objects_remove_exec(bContext *C, wmOperator *UNUSED(op))
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
group = NULL;
- while((group = find_group(base->object, group)))
+ while ((group = find_group(base->object, group)))
rem_from_group(group, base->object, scene, base);
}
CTX_DATA_END;
@@ -175,16 +175,16 @@ static int group_objects_remove_exec(bContext *C, wmOperator *UNUSED(op))
void GROUP_OT_objects_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove From Groups";
+ ot->name = "Remove From Groups";
ot->description = "Remove selected objects from all groups";
- ot->idname= "GROUP_OT_objects_remove";
+ ot->idname = "GROUP_OT_objects_remove";
/* api callbacks */
- ot->exec= group_objects_remove_exec;
- ot->poll= ED_operator_objectmode;
+ ot->exec = group_objects_remove_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int group_create_exec(bContext *C, wmOperator *op)
@@ -212,16 +212,16 @@ static int group_create_exec(bContext *C, wmOperator *op)
void GROUP_OT_create(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Create New Group";
+ ot->name = "Create New Group";
ot->description = "Create an object group from selected objects";
- ot->idname= "GROUP_OT_create";
+ ot->idname = "GROUP_OT_create";
/* api callbacks */
- ot->exec= group_create_exec;
- ot->poll= ED_operator_objectmode;
+ ot->exec = group_create_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_string(ot->srna, "name", "Group", MAX_ID_NAME-2, "Name", "Name of the new group");
}
@@ -234,7 +234,7 @@ static int group_add_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= ED_object_context(C);
Group *group;
- if(ob == NULL)
+ if (ob == NULL)
return OPERATOR_CANCELLED;
group= add_group("Group");
@@ -248,15 +248,15 @@ static int group_add_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_group_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add to Group";
- ot->idname= "OBJECT_OT_group_add";
+ ot->name = "Add to Group";
+ ot->idname = "OBJECT_OT_group_add";
ot->description = "Add an object to a new group";
/* api callbacks */
- ot->exec= group_add_exec;
+ ot->exec = group_add_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int group_link_exec(bContext *C, wmOperator *op)
@@ -265,7 +265,7 @@ static int group_link_exec(bContext *C, wmOperator *op)
Object *ob= ED_object_context(C);
Group *group= BLI_findlink(&CTX_data_main(C)->group, RNA_enum_get(op->ptr, "group"));
- if(ELEM(NULL, ob, group))
+ if (ELEM(NULL, ob, group))
return OPERATOR_CANCELLED;
add_to_group(group, ob, scene, NULL);
@@ -280,21 +280,21 @@ void OBJECT_OT_group_link(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Link to Group";
- ot->idname= "OBJECT_OT_group_link";
+ ot->name = "Link to Group";
+ ot->idname = "OBJECT_OT_group_link";
ot->description = "Add an object to an existing group";
/* api callbacks */
- ot->exec= group_link_exec;
- ot->invoke= WM_enum_search_invoke;
+ ot->exec = group_link_exec;
+ ot->invoke = WM_enum_search_invoke;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", "");
RNA_def_enum_funcs(prop, RNA_group_local_itemf);
- ot->prop= prop;
+ ot->prop = prop;
}
static int group_remove_exec(bContext *C, wmOperator *UNUSED(op))
@@ -303,7 +303,7 @@ static int group_remove_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= ED_object_context(C);
Group *group= CTX_data_pointer_get_type(C, "group", &RNA_Group).data;
- if(!ob || !group)
+ if (!ob || !group)
return OPERATOR_CANCELLED;
rem_from_group(group, ob, scene, NULL); /* base will be used if found */
@@ -316,13 +316,13 @@ static int group_remove_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_group_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Group";
- ot->idname= "OBJECT_OT_group_remove";
+ ot->name = "Remove Group";
+ ot->idname = "OBJECT_OT_group_remove";
/* api callbacks */
- ot->exec= group_remove_exec;
+ ot->exec = group_remove_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index eb128ad3025..7bb2be8e248 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -79,9 +79,9 @@ static int return_editmesh_indexar(BMEditMesh *em, int *tot, int **indexar, floa
int *index, nr, totvert=0;
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
- if(BM_elem_flag_test(eve, BM_ELEM_SELECT)) totvert++;
+ if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) totvert++;
}
- if(totvert==0) return 0;
+ if (totvert==0) return 0;
*indexar= index= MEM_mallocN(4*totvert, "hook indexar");
*tot= totvert;
@@ -89,7 +89,7 @@ static int return_editmesh_indexar(BMEditMesh *em, int *tot, int **indexar, floa
zero_v3(cent);
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
- if(BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
+ if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
*index= nr; index++;
add_v3_v3(cent, eve->co);
}
@@ -105,7 +105,7 @@ static int return_editmesh_vgroup(Object *obedit, BMEditMesh *em, char *name, fl
{
zero_v3(cent);
- if(obedit->actdef) {
+ if (obedit->actdef) {
const int defgrp_index= obedit->actdef-1;
int totvert=0;
@@ -117,14 +117,14 @@ static int return_editmesh_vgroup(Object *obedit, BMEditMesh *em, char *name, fl
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
dvert= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
- if(dvert) {
- if(defvert_find_weight(dvert, defgrp_index) > 0.0f) {
+ if (dvert) {
+ if (defvert_find_weight(dvert, defgrp_index) > 0.0f) {
add_v3_v3(cent, eve->co);
totvert++;
}
}
}
- if(totvert) {
+ if (totvert) {
bDeformGroup *dg = BLI_findlink(&obedit->defbase, defgrp_index);
BLI_strncpy(name, dg->name, sizeof(dg->name));
mul_v3_fl(cent, 1.0f/(float)totvert);
@@ -147,9 +147,9 @@ static void select_editbmesh_hook(Object *ob, HookModifierData *hmd)
return;
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
- if(nr==hmd->indexar[index]) {
+ if (nr==hmd->indexar[index]) {
BM_elem_select_set(em->bm, eve, TRUE);
- if(index < hmd->totindex-1) index++;
+ if (index < hmd->totindex-1) index++;
}
nr++;
@@ -166,25 +166,25 @@ static int return_editlattice_indexar(Lattice *editlatt, int *tot, int **indexar
/* count */
a= editlatt->pntsu*editlatt->pntsv*editlatt->pntsw;
bp= editlatt->def;
- while(a--) {
- if(bp->f1 & SELECT) {
- if(bp->hide==0) totvert++;
+ while (a--) {
+ if (bp->f1 & SELECT) {
+ if (bp->hide==0) totvert++;
}
bp++;
}
- if(totvert==0) return 0;
+ if (totvert==0) return 0;
*indexar= index= MEM_mallocN(4*totvert, "hook indexar");
*tot= totvert;
nr= 0;
- cent[0]= cent[1]= cent[2]= 0.0;
+ zero_v3(cent);
a= editlatt->pntsu*editlatt->pntsv*editlatt->pntsw;
bp= editlatt->def;
- while(a--) {
- if(bp->f1 & SELECT) {
- if(bp->hide==0) {
+ while (a--) {
+ if (bp->f1 & SELECT) {
+ if (bp->hide==0) {
*index= nr; index++;
add_v3_v3(cent, bp->vec);
}
@@ -208,10 +208,10 @@ static void select_editlattice_hook(Object *obedit, HookModifierData *hmd)
/* count */
a= editlt->pntsu*editlt->pntsv*editlt->pntsw;
bp= editlt->def;
- while(a--) {
- if(hmd->indexar[index]==nr) {
+ while (a--) {
+ if (hmd->indexar[index]==nr) {
bp->f1 |= SELECT;
- if(index < hmd->totindex-1) index++;
+ if (index < hmd->totindex-1) index++;
}
nr++;
bp++;
@@ -226,49 +226,49 @@ static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, flo
BezTriple *bezt;
int *index, a, nr, totvert=0;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
- if(bezt->f1 & SELECT) totvert++;
- if(bezt->f2 & SELECT) totvert++;
- if(bezt->f3 & SELECT) totvert++;
+ while (a--) {
+ if (bezt->f1 & SELECT) totvert++;
+ if (bezt->f2 & SELECT) totvert++;
+ if (bezt->f3 & SELECT) totvert++;
bezt++;
}
}
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
- if(bp->f1 & SELECT) totvert++;
+ while (a--) {
+ if (bp->f1 & SELECT) totvert++;
bp++;
}
}
}
- if(totvert==0) return 0;
+ if (totvert==0) return 0;
*indexar= index= MEM_mallocN(4*totvert, "hook indexar");
*tot= totvert;
nr= 0;
- cent[0]= cent[1]= cent[2]= 0.0;
+ zero_v3(cent);
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
- if(bezt->f1 & SELECT) {
+ while (a--) {
+ if (bezt->f1 & SELECT) {
*index= nr; index++;
add_v3_v3(cent, bezt->vec[0]);
}
nr++;
- if(bezt->f2 & SELECT) {
+ if (bezt->f2 & SELECT) {
*index= nr; index++;
add_v3_v3(cent, bezt->vec[1]);
}
nr++;
- if(bezt->f3 & SELECT) {
+ if (bezt->f3 & SELECT) {
*index= nr; index++;
add_v3_v3(cent, bezt->vec[2]);
}
@@ -279,8 +279,8 @@ static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, flo
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
- if(bp->f1 & SELECT) {
+ while (a--) {
+ if (bp->f1 & SELECT) {
*index= nr; index++;
add_v3_v3(cent, bp->vec);
}
@@ -314,9 +314,10 @@ static int object_hook_index_array(Scene *scene, Object *obedit, int *tot, int *
em = me->edit_btmesh;
/* check selected vertices first */
- if( return_editmesh_indexar(em, tot, indexar, cent_r)) {
+ if ( return_editmesh_indexar(em, tot, indexar, cent_r)) {
return 1;
- } else {
+ }
+ else {
int ret = return_editmesh_vgroup(obedit, em, name, cent_r);
return ret;
}
@@ -342,24 +343,24 @@ static void select_editcurve_hook(Object *obedit, HookModifierData *hmd)
BezTriple *bezt;
int index=0, a, nr=0;
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu= editnurb->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
- if(nr == hmd->indexar[index]) {
+ while (a--) {
+ if (nr == hmd->indexar[index]) {
bezt->f1 |= SELECT;
- if(index<hmd->totindex-1) index++;
+ if (index<hmd->totindex-1) index++;
}
nr++;
- if(nr == hmd->indexar[index]) {
+ if (nr == hmd->indexar[index]) {
bezt->f2 |= SELECT;
- if(index<hmd->totindex-1) index++;
+ if (index<hmd->totindex-1) index++;
}
nr++;
- if(nr == hmd->indexar[index]) {
+ if (nr == hmd->indexar[index]) {
bezt->f3 |= SELECT;
- if(index<hmd->totindex-1) index++;
+ if (index<hmd->totindex-1) index++;
}
nr++;
@@ -369,10 +370,10 @@ static void select_editcurve_hook(Object *obedit, HookModifierData *hmd)
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
- if(nr == hmd->indexar[index]) {
+ while (a--) {
+ if (nr == hmd->indexar[index]) {
bp->f1 |= SELECT;
- if(index<hmd->totindex-1) index++;
+ if (index<hmd->totindex-1) index++;
}
nr++;
bp++;
@@ -386,10 +387,10 @@ static void object_hook_select(Object *ob, HookModifierData *hmd)
if (hmd->indexar == NULL)
return;
- if(ob->type==OB_MESH) select_editbmesh_hook(ob, hmd);
- else if(ob->type==OB_LATTICE) select_editlattice_hook(ob, hmd);
- else if(ob->type==OB_CURVE) select_editcurve_hook(ob, hmd);
- else if(ob->type==OB_SURF) select_editcurve_hook(ob, hmd);
+ if (ob->type==OB_MESH) select_editbmesh_hook(ob, hmd);
+ else if (ob->type==OB_LATTICE) select_editlattice_hook(ob, hmd);
+ else if (ob->type==OB_CURVE) select_editcurve_hook(ob, hmd);
+ else if (ob->type==OB_SURF) select_editcurve_hook(ob, hmd);
}
/* special poll operators for hook operators */
@@ -505,16 +506,16 @@ static int object_add_hook_selob_exec(bContext *C, wmOperator *op)
void OBJECT_OT_hook_add_selobj(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Hook to Selected Object";
- ot->description= "Hook selected vertices to the first selected Object";
- ot->idname= "OBJECT_OT_hook_add_selob";
+ ot->name = "Hook to Selected Object";
+ ot->description = "Hook selected vertices to the first selected Object";
+ ot->idname = "OBJECT_OT_hook_add_selob";
/* api callbacks */
- ot->exec= object_add_hook_selob_exec;
- ot->poll= hook_op_edit_poll;
+ ot->exec = object_add_hook_selob_exec;
+ ot->poll = hook_op_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int object_add_hook_newob_exec(bContext *C, wmOperator *UNUSED(op))
@@ -533,16 +534,16 @@ static int object_add_hook_newob_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_hook_add_newobj(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Hook to New Object";
- ot->description= "Hook selected vertices to the first selected Object";
- ot->idname= "OBJECT_OT_hook_add_newob";
+ ot->name = "Hook to New Object";
+ ot->description = "Hook selected vertices to the first selected Object";
+ ot->idname = "OBJECT_OT_hook_add_newob";
/* api callbacks */
- ot->exec= object_add_hook_newob_exec;
- ot->poll= hook_op_edit_poll;
+ ot->exec = object_add_hook_newob_exec;
+ ot->poll = hook_op_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int object_hook_remove_exec(bContext *C, wmOperator *op)
@@ -578,10 +579,10 @@ static EnumPropertyItem *hook_mod_itemf(bContext *C, PointerRNA *UNUSED(ptr), Pr
ModifierData *md = NULL;
int a, totitem= 0;
- if(!ob)
+ if (!ob)
return DummyRNA_NULL_items;
- for(a=0, md=ob->modifiers.first; md; md= md->next, a++) {
+ for (a=0, md=ob->modifiers.first; md; md= md->next, a++) {
if (md->type==eModifierType_Hook) {
tmp.value= a;
tmp.icon = ICON_HOOK;
@@ -602,24 +603,24 @@ void OBJECT_OT_hook_remove(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Remove Hook";
- ot->idname= "OBJECT_OT_hook_remove";
- ot->description= "Remove a hook from the active object";
+ ot->name = "Remove Hook";
+ ot->idname = "OBJECT_OT_hook_remove";
+ ot->description = "Remove a hook from the active object";
/* api callbacks */
- ot->exec= object_hook_remove_exec;
- ot->invoke= WM_menu_invoke;
- ot->poll= hook_op_edit_poll;
+ ot->exec = object_hook_remove_exec;
+ ot->invoke = WM_menu_invoke;
+ ot->poll = hook_op_edit_poll;
/* flags */
/* this operator removes modifier which isn't stored in local undo stack,
* so redoing it from redo panel gives totally weird results */
- ot->flag= /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
+ ot->flag = /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to remove");
RNA_def_enum_funcs(prop, hook_mod_itemf);
- ot->prop= prop;
+ ot->prop = prop;
}
static int object_hook_reset_exec(bContext *C, wmOperator *op)
@@ -643,10 +644,10 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op)
}
/* reset functionality */
- if(hmd->object) {
+ if (hmd->object) {
bPoseChannel *pchan= get_pose_channel(hmd->object->pose, hmd->subtarget);
- if(hmd->subtarget[0] && pchan) {
+ if (hmd->subtarget[0] && pchan) {
float imat[4][4], mat[4][4];
/* calculate the world-space matrix for the pose-channel target first, then carry on as usual */
@@ -672,16 +673,16 @@ void OBJECT_OT_hook_reset(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Reset Hook";
- ot->description= "Recalculate and clear offset transformation";
- ot->idname= "OBJECT_OT_hook_reset";
+ ot->name = "Reset Hook";
+ ot->description = "Recalculate and clear offset transformation";
+ ot->idname = "OBJECT_OT_hook_reset";
/* callbacks */
- ot->exec= object_hook_reset_exec;
- ot->poll= hook_op_edit_poll;
+ ot->exec = object_hook_reset_exec;
+ ot->poll = hook_op_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to assign to");
@@ -728,16 +729,16 @@ void OBJECT_OT_hook_recenter(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Recenter Hook";
- ot->description= "Set hook center to cursor position";
- ot->idname= "OBJECT_OT_hook_recenter";
+ ot->name = "Recenter Hook";
+ ot->description = "Set hook center to cursor position";
+ ot->idname = "OBJECT_OT_hook_recenter";
/* callbacks */
- ot->exec= object_hook_recenter_exec;
- ot->poll= hook_op_edit_poll;
+ ot->exec = object_hook_recenter_exec;
+ ot->poll = hook_op_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to assign to");
@@ -770,11 +771,11 @@ static int object_hook_assign_exec(bContext *C, wmOperator *op)
/* assign functionality */
- if(!object_hook_index_array(scene, ob, &tot, &indexar, name, cent)) {
+ if (!object_hook_index_array(scene, ob, &tot, &indexar, name, cent)) {
BKE_report(op->reports, RPT_WARNING, "Requires selected vertices or active vertex group");
return OPERATOR_CANCELLED;
}
- if(hmd->indexar)
+ if (hmd->indexar)
MEM_freeN(hmd->indexar);
copy_v3_v3(hmd->cent, cent);
@@ -792,18 +793,18 @@ void OBJECT_OT_hook_assign(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Assign to Hook";
- ot->description= "Assign the selected vertices to a hook";
- ot->idname= "OBJECT_OT_hook_assign";
+ ot->name = "Assign to Hook";
+ ot->description = "Assign the selected vertices to a hook";
+ ot->idname = "OBJECT_OT_hook_assign";
/* callbacks */
- ot->exec= object_hook_assign_exec;
- ot->poll= hook_op_edit_poll;
+ ot->exec = object_hook_assign_exec;
+ ot->poll = hook_op_edit_poll;
/* flags */
/* this operator changes data stored in modifier which doesn't get pushed to undo stack,
* so redoing it from redo panel gives totally weird results */
- ot->flag= /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
+ ot->flag = /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to assign to");
@@ -843,16 +844,16 @@ void OBJECT_OT_hook_select(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Select Hook";
- ot->description= "Select affected vertices on mesh";
- ot->idname= "OBJECT_OT_hook_select";
+ ot->name = "Select Hook";
+ ot->description = "Select affected vertices on mesh";
+ ot->idname = "OBJECT_OT_hook_select";
/* callbacks */
- ot->exec= object_hook_select_exec;
- ot->poll= hook_op_edit_poll;
+ ot->exec = object_hook_select_exec;
+ ot->poll = hook_op_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "modifier", DummyRNA_NULL_items, 0, "Modifier", "Modifier number to remove");
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index 9f3bc9bbf37..4ba62541c60 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -70,12 +70,12 @@ void free_editLatt(Object *ob)
{
Lattice *lt= ob->data;
- if(lt->editlatt) {
+ if (lt->editlatt) {
Lattice *editlt= lt->editlatt->latt;
- if(editlt->def)
+ if (editlt->def)
MEM_freeN(editlt->def);
- if(editlt->dvert)
+ if (editlt->dvert)
free_dverts(editlt->dvert, editlt->pntsu*editlt->pntsv*editlt->pntsw);
MEM_freeN(editlt);
@@ -93,20 +93,20 @@ void make_editLatt(Object *obedit)
free_editLatt(obedit);
actkey= ob_get_keyblock(obedit);
- if(actkey)
+ if (actkey)
key_to_latt(actkey, lt);
lt->editlatt= MEM_callocN(sizeof(EditLatt), "editlatt");
lt->editlatt->latt= MEM_dupallocN(lt);
lt->editlatt->latt->def= MEM_dupallocN(lt->def);
- if(lt->dvert) {
+ if (lt->dvert) {
int tot= lt->pntsu*lt->pntsv*lt->pntsw;
lt->editlatt->latt->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert");
copy_dverts(lt->editlatt->latt->dvert, lt->dvert, tot);
}
- if(lt->key) lt->editlatt->shapenr= obedit->shapenr;
+ if (lt->key) lt->editlatt->shapenr= obedit->shapenr;
}
void load_editLatt(Object *obedit)
@@ -120,19 +120,19 @@ void load_editLatt(Object *obedit)
lt= obedit->data;
editlt= lt->editlatt->latt;
- if(lt->editlatt->shapenr) {
+ if (lt->editlatt->shapenr) {
actkey= BLI_findlink(&lt->key->block, lt->editlatt->shapenr-1);
/* active key: vertices */
tot= editlt->pntsu*editlt->pntsv*editlt->pntsw;
- if(actkey->data) MEM_freeN(actkey->data);
+ if (actkey->data) MEM_freeN(actkey->data);
fp=actkey->data= MEM_callocN(lt->key->elemsize*tot, "actkey->data");
actkey->totelem= tot;
bp= editlt->def;
- while(tot--) {
+ while (tot--) {
copy_v3_v3(fp, bp->vec);
fp+= 3;
bp++;
@@ -154,12 +154,12 @@ void load_editLatt(Object *obedit)
lt->typew= editlt->typew;
}
- if(lt->dvert) {
+ if (lt->dvert) {
free_dverts(lt->dvert, lt->pntsu*lt->pntsv*lt->pntsw);
lt->dvert= NULL;
}
- if(editlt->dvert) {
+ if (editlt->dvert) {
tot= lt->pntsu*lt->pntsv*lt->pntsw;
lt->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert");
@@ -179,8 +179,8 @@ void ED_setflagsLatt(Object *obedit, int flag)
a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
- while(a--) {
- if(bp->hide==0) {
+ while (a--) {
+ if (bp->hide==0) {
bp->f1= flag;
}
bp++;
@@ -201,9 +201,9 @@ static int lattice_select_all_exec(bContext *C, wmOperator *op)
bp= lt->editlatt->latt->def;
a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
- while(a--) {
- if(bp->hide==0) {
- if(bp->f1) {
+ while (a--) {
+ if (bp->hide==0) {
+ if (bp->f1) {
action = SEL_DESELECT;
break;
}
@@ -223,8 +223,8 @@ static int lattice_select_all_exec(bContext *C, wmOperator *op)
bp= lt->editlatt->latt->def;
a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
- while(a--) {
- if(bp->hide==0) {
+ while (a--) {
+ if (bp->hide==0) {
bp->f1 ^= 1;
}
bp++;
@@ -240,16 +240,16 @@ static int lattice_select_all_exec(bContext *C, wmOperator *op)
void LATTICE_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select or Deselect All";
- ot->description= "Change selection of all UVW control points";
- ot->idname= "LATTICE_OT_select_all";
+ ot->name = "(De)select All";
+ ot->description = "Change selection of all UVW control points";
+ ot->idname = "LATTICE_OT_select_all";
/* api callbacks */
- ot->exec= lattice_select_all_exec;
- ot->poll= ED_operator_editlattice;
+ ot->exec = lattice_select_all_exec;
+ ot->poll = ED_operator_editlattice;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -258,7 +258,7 @@ static int make_regular_poll(bContext *C)
{
Object *ob;
- if(ED_operator_editlattice(C)) return 1;
+ if (ED_operator_editlattice(C)) return 1;
ob= CTX_data_active_object(C);
return (ob && ob->type==OB_LATTICE);
@@ -269,7 +269,7 @@ static int make_regular_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= CTX_data_edit_object(C);
Lattice *lt;
- if(ob) {
+ if (ob) {
lt= ob->data;
resizelattice(lt->editlatt->latt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
}
@@ -288,16 +288,16 @@ static int make_regular_exec(bContext *C, wmOperator *UNUSED(op))
void LATTICE_OT_make_regular(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Regular";
- ot->description= "Set UVW control points a uniform distance apart";
- ot->idname= "LATTICE_OT_make_regular";
+ ot->name = "Make Regular";
+ ot->description = "Set UVW control points a uniform distance apart";
+ ot->idname = "LATTICE_OT_make_regular";
/* api callbacks */
- ot->exec= make_regular_exec;
- ot->poll= make_regular_poll;
+ ot->exec = make_regular_exec;
+ ot->poll = make_regular_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/****************************** Mouse Selection *************************/
@@ -307,10 +307,10 @@ static void findnearestLattvert__doClosest(void *userData, BPoint *bp, int x, in
struct { BPoint *bp; short dist, select; int mval[2]; } *data = userData;
float temp = abs(data->mval[0]-x) + abs(data->mval[1]-y);
- if((bp->f1 & SELECT)==data->select)
+ if ((bp->f1 & SELECT)==data->select)
temp += 5;
- if(temp<data->dist) {
+ if (temp<data->dist) {
data->dist = temp;
data->bp = bp;
@@ -343,8 +343,8 @@ int mouse_lattice(bContext *C, const int mval[2], int extend)
view3d_set_viewcontext(C, &vc);
bp= findnearestLattvert(&vc, mval, 1);
- if(bp) {
- if(extend==0) {
+ if (bp) {
+ if (extend==0) {
ED_setflagsLatt(vc.obedit, 0);
bp->f1 |= SELECT;
}
@@ -392,7 +392,7 @@ static void free_undoLatt(void *data)
{
UndoLattice *ult= (UndoLattice*)data;
- if(ult->def) MEM_freeN(ult->def);
+ if (ult->def) MEM_freeN(ult->def);
MEM_freeN(ult);
}
@@ -410,7 +410,7 @@ static void *get_editlatt(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- if(obedit && obedit->type==OB_LATTICE) {
+ if (obedit && obedit->type==OB_LATTICE) {
Lattice *lt= obedit->data;
return lt->editlatt;
}
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index de9e3db25b8..cd2fa4f93b6 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -91,19 +91,19 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc
ModifierTypeInfo *mti = modifierType_getInfo(type);
/* only geometry objects should be able to get modifiers [#25291] */
- if(!ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_LATTICE)) {
+ if (!ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_LATTICE)) {
BKE_reportf(reports, RPT_WARNING, "Modifiers cannot be added to Object '%s'", ob->id.name+2);
return NULL;
}
- if(mti->flags&eModifierTypeFlag_Single) {
- if(modifiers_findByType(ob, type)) {
+ if (mti->flags&eModifierTypeFlag_Single) {
+ if (modifiers_findByType(ob, type)) {
BKE_report(reports, RPT_WARNING, "Only one modifier of this type allowed");
return NULL;
}
}
- if(type == eModifierType_ParticleSystem) {
+ if (type == eModifierType_ParticleSystem) {
/* don't need to worry about the new modifier's name, since that is set to the number
* of particle systems which shouldn't have too many duplicates
*/
@@ -113,10 +113,10 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc
/* get new modifier data to add */
new_md= modifier_new(type);
- if(mti->flags&eModifierTypeFlag_RequiresOriginalData) {
+ if (mti->flags&eModifierTypeFlag_RequiresOriginalData) {
md = ob->modifiers.first;
- while(md && modifierType_getInfo(md->type)->type==eModifierTypeType_OnlyDeform)
+ while (md && modifierType_getInfo(md->type)->type==eModifierTypeType_OnlyDeform)
md = md->next;
BLI_insertlinkbefore(&ob->modifiers, md, new_md);
@@ -124,7 +124,7 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc
else
BLI_addtail(&ob->modifiers, new_md);
- if(name)
+ if (name)
BLI_strncpy(new_md->name, name, sizeof(new_md->name));
/* make sure modifier data has unique name */
@@ -132,22 +132,22 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc
modifier_unique_name(&ob->modifiers, new_md);
/* special cases */
- if(type == eModifierType_Softbody) {
- if(!ob->soft) {
+ if (type == eModifierType_Softbody) {
+ if (!ob->soft) {
ob->soft= sbNew(scene);
ob->softflag |= OB_SB_GOAL|OB_SB_EDGES;
}
}
- else if(type == eModifierType_Collision) {
- if(!ob->pd)
+ else if (type == eModifierType_Collision) {
+ if (!ob->pd)
ob->pd= object_add_collision_fields(0);
ob->pd->deflect= 1;
DAG_scene_sort(bmain, scene);
}
- else if(type == eModifierType_Surface)
+ else if (type == eModifierType_Surface)
DAG_scene_sort(bmain, scene);
- else if(type == eModifierType_Multires)
+ else if (type == eModifierType_Multires)
/* set totlvl from existing MDISPS layer if object already had it */
multiresModifier_set_levels_from_disps((MultiresModifierData *)new_md, ob);
}
@@ -164,70 +164,60 @@ static int object_modifier_remove(Object *ob, ModifierData *md, int *sort_depsgr
/* It seems on rapid delete it is possible to
* get called twice on same modifier, so make
* sure it is in list. */
- for(obmd=ob->modifiers.first; obmd; obmd=obmd->next)
- if(obmd==md)
+ for (obmd=ob->modifiers.first; obmd; obmd=obmd->next)
+ if (obmd==md)
break;
- if(!obmd)
+ if (!obmd)
return 0;
/* special cases */
- if(md->type == eModifierType_ParticleSystem) {
+ if (md->type == eModifierType_ParticleSystem) {
ParticleSystemModifierData *psmd=(ParticleSystemModifierData*)md;
BLI_remlink(&ob->particlesystem, psmd->psys);
psys_free(ob, psmd->psys);
psmd->psys= NULL;
}
- else if(md->type == eModifierType_Softbody) {
- if(ob->soft) {
+ else if (md->type == eModifierType_Softbody) {
+ if (ob->soft) {
sbFree(ob->soft);
ob->soft= NULL;
ob->softflag= 0;
}
}
- else if(md->type == eModifierType_Collision) {
- if(ob->pd)
+ else if (md->type == eModifierType_Collision) {
+ if (ob->pd)
ob->pd->deflect= 0;
*sort_depsgraph = 1;
}
- else if(md->type == eModifierType_Surface) {
- if(ob->pd && ob->pd->shape == PFIELD_SHAPE_SURFACE)
+ else if (md->type == eModifierType_Surface) {
+ if (ob->pd && ob->pd->shape == PFIELD_SHAPE_SURFACE)
ob->pd->shape = PFIELD_SHAPE_PLANE;
*sort_depsgraph = 1;
}
- else if(md->type == eModifierType_Smoke) {
+ else if (md->type == eModifierType_Smoke) {
ob->dt = OB_TEXTURE;
}
- else if(md->type == eModifierType_Multires) {
+ else if (md->type == eModifierType_Multires) {
int ok= 1;
- Mesh *me= ob->data;
ModifierData *tmpmd;
- /* ensure MDISPS CustomData layer is't used by another multires modifiers */
- for(tmpmd= ob->modifiers.first; tmpmd; tmpmd= tmpmd->next)
- if(tmpmd!=md && tmpmd->type == eModifierType_Multires) {
+ /* ensure MDISPS CustomData layer isn't used by another multires modifiers */
+ for (tmpmd= ob->modifiers.first; tmpmd; tmpmd= tmpmd->next)
+ if (tmpmd!=md && tmpmd->type == eModifierType_Multires) {
ok= 0;
break;
}
- if(ok) {
- if(me->edit_btmesh) {
- BMEditMesh *em= me->edit_btmesh;
- /* CustomData_external_remove is used here only to mark layer as non-external
- * for further free-ing, so zero element count looks safer than em->totface */
- CustomData_external_remove(&em->bm->ldata, &me->id, CD_MDISPS, 0);
- BM_data_layer_free(em->bm, &em->bm->ldata, CD_MDISPS);
- } else {
- CustomData_external_remove(&me->ldata, &me->id, CD_MDISPS, me->totloop);
- CustomData_free_layer_active(&me->ldata, CD_MDISPS, me->totloop);
- }
+ if (ok) {
+ multires_customdata_delete(ob->data);
}
}
- if(ELEM(md->type, eModifierType_Softbody, eModifierType_Cloth) &&
+ if (ELEM(md->type, eModifierType_Softbody, eModifierType_Cloth) &&
ob->particlesystem.first == NULL) {
ob->mode &= ~OB_MODE_PARTICLE_EDIT;
}
@@ -245,7 +235,7 @@ int ED_object_modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Ob
ok= object_modifier_remove(ob, md, &sort_depsgraph);
- if(!ok) {
+ if (!ok) {
BKE_reportf(reports, RPT_ERROR, "Modifier '%s' not in object '%s'", ob->id.name, md->name);
return 0;
}
@@ -253,7 +243,7 @@ int ED_object_modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Ob
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* sorting has to be done after the update so that dynamic systems can react properly */
- if(sort_depsgraph)
+ if (sort_depsgraph)
DAG_scene_sort(bmain, scene);
return 1;
@@ -264,10 +254,10 @@ void ED_object_modifier_clear(Main *bmain, Scene *scene, Object *ob)
ModifierData *md = ob->modifiers.first;
int sort_depsgraph = 0;
- if(!md)
+ if (!md)
return;
- while(md) {
+ while (md) {
ModifierData *next_md;
next_md= md->next;
@@ -280,19 +270,19 @@ void ED_object_modifier_clear(Main *bmain, Scene *scene, Object *ob)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* sorting has to be done after the update so that dynamic systems can react properly */
- if(sort_depsgraph)
+ if (sort_depsgraph)
DAG_scene_sort(bmain, scene);
}
int ED_object_modifier_move_up(ReportList *reports, Object *ob, ModifierData *md)
{
- if(md->prev) {
+ if (md->prev) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- if(mti->type!=eModifierTypeType_OnlyDeform) {
+ if (mti->type!=eModifierTypeType_OnlyDeform) {
ModifierTypeInfo *nmti = modifierType_getInfo(md->prev->type);
- if(nmti->flags&eModifierTypeFlag_RequiresOriginalData) {
+ if (nmti->flags&eModifierTypeFlag_RequiresOriginalData) {
BKE_report(reports, RPT_WARNING, "Cannot move above a modifier requiring original data");
return 0;
}
@@ -307,13 +297,13 @@ int ED_object_modifier_move_up(ReportList *reports, Object *ob, ModifierData *md
int ED_object_modifier_move_down(ReportList *reports, Object *ob, ModifierData *md)
{
- if(md->next) {
+ if (md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- if(mti->flags&eModifierTypeFlag_RequiresOriginalData) {
+ if (mti->flags&eModifierTypeFlag_RequiresOriginalData) {
ModifierTypeInfo *nmti = modifierType_getInfo(md->next->type);
- if(nmti->type!=eModifierTypeType_OnlyDeform) {
+ if (nmti->type!=eModifierTypeType_OnlyDeform) {
BKE_report(reports, RPT_WARNING, "Cannot move beyond a non-deforming modifier");
return 0;
}
@@ -339,43 +329,43 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene *
int totvert=0, totedge=0, cvert=0;
int totpart=0, totchild=0;
- if(md->type != eModifierType_ParticleSystem) return 0;
- if(ob && ob->mode & OB_MODE_PARTICLE_EDIT) return 0;
+ if (md->type != eModifierType_ParticleSystem) return 0;
+ if (ob && ob->mode & OB_MODE_PARTICLE_EDIT) return 0;
psys=((ParticleSystemModifierData *)md)->psys;
part= psys->part;
- if(part->ren_as != PART_DRAW_PATH || psys->pathcache == NULL)
+ if (part->ren_as != PART_DRAW_PATH || psys->pathcache == NULL)
return 0;
totpart= psys->totcached;
totchild= psys->totchildcache;
- if(totchild && (part->draw&PART_DRAW_PARENT)==0)
+ if (totchild && (part->draw&PART_DRAW_PARENT)==0)
totpart= 0;
/* count */
cache= psys->pathcache;
- for(a=0; a<totpart; a++) {
+ for (a=0; a<totpart; a++) {
key= cache[a];
- if(key->steps > 0) {
+ if (key->steps > 0) {
totvert+= key->steps+1;
totedge+= key->steps;
}
}
cache= psys->childcache;
- for(a=0; a<totchild; a++) {
+ for (a=0; a<totchild; a++) {
key= cache[a];
- if(key->steps > 0) {
+ if (key->steps > 0) {
totvert+= key->steps+1;
totedge+= key->steps;
}
}
- if(totvert==0) return 0;
+ if (totvert==0) return 0;
/* add new mesh */
obn= add_object(scene, OB_MESH);
@@ -393,12 +383,12 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene *
/* copy coordinates */
cache= psys->pathcache;
- for(a=0; a<totpart; a++) {
+ for (a=0; a<totpart; a++) {
key= cache[a];
kmax= key->steps;
- for(k=0; k<=kmax; k++,key++,cvert++,mvert++) {
+ for (k=0; k<=kmax; k++,key++,cvert++,mvert++) {
copy_v3_v3(mvert->co,key->co);
- if(k) {
+ if (k) {
medge->v1= cvert-1;
medge->v2= cvert;
medge->flag= ME_EDGEDRAW|ME_EDGERENDER|ME_LOOSEEDGE;
@@ -412,12 +402,12 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene *
}
cache=psys->childcache;
- for(a=0; a<totchild; a++) {
+ for (a=0; a<totchild; a++) {
key=cache[a];
kmax=key->steps;
- for(k=0; k<=kmax; k++,key++,cvert++,mvert++) {
+ for (k=0; k<=kmax; k++,key++,cvert++,mvert++) {
copy_v3_v3(mvert->co,key->co);
- if(k) {
+ if (k) {
medge->v1=cvert-1;
medge->v2=cvert;
medge->flag= ME_EDGEDRAW|ME_EDGERENDER|ME_LOOSEEDGE;
@@ -463,7 +453,7 @@ static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, M
Key *key=me->key;
KeyBlock *kb;
- if(!modifier_sameTopology(md) || mti->type == eModifierTypeType_NonGeometrical) {
+ if (!modifier_sameTopology(md) || mti->type == eModifierTypeType_NonGeometrical) {
BKE_report(reports, RPT_ERROR, "Only deforming modifiers can be applied to Shapes");
return 0;
}
@@ -474,7 +464,7 @@ static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, M
return 0;
}
- if(key == NULL) {
+ if (key == NULL) {
key= me->key= add_key((ID *)me);
key->type= KEY_RELATIVE;
/* if that was the first key block added, then it was the basis.
@@ -511,21 +501,22 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
Mesh *me = ob->data;
MultiresModifierData *mmd= find_multires_modifier_before(scene, md);
- if(me->key && mti->type != eModifierTypeType_NonGeometrical) {
+ if (me->key && mti->type != eModifierTypeType_NonGeometrical) {
BKE_report(reports, RPT_ERROR, "Modifier cannot be applied to Mesh with Shape Keys");
return 0;
}
/* Multires: ensure that recent sculpting is applied */
- if(md->type == eModifierType_Multires)
+ if (md->type == eModifierType_Multires)
multires_force_update(ob);
if (mmd && mmd->totlvl && mti->type==eModifierTypeType_OnlyDeform) {
- if(!multiresModifier_reshapeFromDeformMod (scene, mmd, ob, md)) {
+ if (!multiresModifier_reshapeFromDeformMod (scene, mmd, ob, md)) {
BKE_report(reports, RPT_ERROR, "Multires modifier returned error, skipping apply");
return 0;
}
- } else {
+ }
+ else {
dm = mesh_create_derived_for_modifier(scene, ob, md, 1);
if (!dm) {
BKE_report(reports, RPT_ERROR, "Modifier returned error, skipping apply");
@@ -536,10 +527,8 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
dm->release(dm);
- if(md->type == eModifierType_Multires) {
- CustomData_external_remove(&me->ldata, &me->id, CD_MDISPS, me->totloop);
- CustomData_free_layer_active(&me->ldata, CD_MDISPS, me->totloop);
- }
+ if (md->type == eModifierType_Multires)
+ multires_customdata_delete(me);
}
}
else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
@@ -553,7 +542,7 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
}
cu = ob->data;
- BKE_report(reports, RPT_INFO, "Applied modifier only changed CV points, not tesselated/bevel vertices");
+ BKE_report(reports, RPT_INFO, "Applied modifier only changed CV points, not tessellated/bevel vertices");
vertexCos = curve_getVertexCos(cu, &cu->nurb, &numVerts);
mti->deformVerts(md, ob, NULL, vertexCos, numVerts, 0, 0);
@@ -569,13 +558,13 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
}
/* lattice modifier can be applied to particle system too */
- if(ob->particlesystem.first) {
+ if (ob->particlesystem.first) {
ParticleSystem *psys = ob->particlesystem.first;
- for(; psys; psys=psys->next) {
+ for (; psys; psys=psys->next) {
- if(psys->part->type != PART_HAIR)
+ if (psys->part->type != PART_HAIR)
continue;
psys_apply_hair_lattice(scene, ob, psys);
@@ -592,7 +581,8 @@ int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, Modi
if (scene->obedit) {
BKE_report(reports, RPT_ERROR, "Modifiers cannot be applied in editmode");
return 0;
- } else if (((ID*) ob->data)->us>1) {
+ }
+ else if (((ID*) ob->data)->us>1) {
BKE_report(reports, RPT_ERROR, "Modifiers cannot be applied to multi-user data");
return 0;
}
@@ -609,7 +599,8 @@ int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, Modi
md->mode= prev_mode;
return 0;
}
- } else {
+ }
+ else {
if (!modifier_apply_obdata(reports, scene, ob, md)) {
md->mode= prev_mode;
return 0;
@@ -643,7 +634,7 @@ static int modifier_add_exec(bContext *C, wmOperator *op)
Object *ob = ED_object_active_context(C);
int type= RNA_enum_get(op->ptr, "type");
- if(!ED_object_modifier_add(op->reports, bmain, scene, ob, NULL, type))
+ if (!ED_object_modifier_add(op->reports, bmain, scene, ob, NULL, type))
return OPERATOR_CANCELLED;
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
@@ -658,20 +649,19 @@ static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *UNUSED(ptr)
ModifierTypeInfo *mti;
int totitem= 0, a;
- if(!ob)
+ if (!ob)
return modifier_type_items;
- for(a=0; modifier_type_items[a].identifier; a++) {
+ for (a=0; modifier_type_items[a].identifier; a++) {
md_item= &modifier_type_items[a];
- if(md_item->identifier[0]) {
+ if (md_item->identifier[0]) {
mti= modifierType_getInfo(md_item->value);
- if(mti->flags & eModifierTypeFlag_NoUserAdd)
+ if (mti->flags & eModifierTypeFlag_NoUserAdd)
continue;
- if(!((mti->flags & eModifierTypeFlag_AcceptsCVs) ||
- (ob->type==OB_MESH && (mti->flags & eModifierTypeFlag_AcceptsMesh))))
+ if (!object_support_modifier_type(ob, md_item->value))
continue;
}
else {
@@ -681,7 +671,7 @@ static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *UNUSED(ptr)
continue;
}
- if(group_item) {
+ if (group_item) {
RNA_enum_item_add(&item, &totitem, group_item);
group_item= NULL;
}
@@ -700,22 +690,22 @@ void OBJECT_OT_modifier_add(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Add Modifier";
+ ot->name = "Add Modifier";
ot->description = "Add a modifier to the active object";
- ot->idname= "OBJECT_OT_modifier_add";
+ ot->idname = "OBJECT_OT_modifier_add";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= modifier_add_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = modifier_add_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "type", modifier_type_items, eModifierType_Subsurf, "Type", "");
RNA_def_enum_funcs(prop, modifier_add_itemf);
- ot->prop= prop;
+ ot->prop = prop;
}
/************************ generic functions for operators using mod names and data context *********************/
@@ -783,15 +773,15 @@ static int modifier_remove_exec(bContext *C, wmOperator *op)
ModifierData *md = edit_modifier_property_get(op, ob, 0);
int mode_orig = ob ? ob->mode : 0;
- if(!ob || !md || !ED_object_modifier_remove(op->reports, bmain, scene, ob, md))
+ if (!ob || !md || !ED_object_modifier_remove(op->reports, bmain, scene, ob, md))
return OPERATOR_CANCELLED;
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
/* if cloth/softbody was removed, particle mode could be cleared */
- if(mode_orig & OB_MODE_PARTICLE_EDIT)
- if((ob->mode & OB_MODE_PARTICLE_EDIT)==0)
- if(scene->basact && scene->basact->object==ob)
+ if (mode_orig & OB_MODE_PARTICLE_EDIT)
+ if ((ob->mode & OB_MODE_PARTICLE_EDIT)==0)
+ if (scene->basact && scene->basact->object==ob)
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL);
return OPERATOR_FINISHED;
@@ -807,16 +797,16 @@ static int modifier_remove_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e
void OBJECT_OT_modifier_remove(wmOperatorType *ot)
{
- ot->name= "Remove Modifier";
- ot->description= "Remove a modifier from the active object";
- ot->idname= "OBJECT_OT_modifier_remove";
+ ot->name = "Remove Modifier";
+ ot->description = "Remove a modifier from the active object";
+ ot->idname = "OBJECT_OT_modifier_remove";
- ot->invoke= modifier_remove_invoke;
- ot->exec= modifier_remove_exec;
- ot->poll= edit_modifier_poll;
+ ot->invoke = modifier_remove_invoke;
+ ot->exec = modifier_remove_exec;
+ ot->poll = edit_modifier_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -827,7 +817,7 @@ static int modifier_move_up_exec(bContext *C, wmOperator *op)
Object *ob = ED_object_active_context(C);
ModifierData *md = edit_modifier_property_get(op, ob, 0);
- if(!ob || !md || !ED_object_modifier_move_up(op->reports, ob, md))
+ if (!ob || !md || !ED_object_modifier_move_up(op->reports, ob, md))
return OPERATOR_CANCELLED;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -846,16 +836,16 @@ static int modifier_move_up_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(
void OBJECT_OT_modifier_move_up(wmOperatorType *ot)
{
- ot->name= "Move Up Modifier";
- ot->description= "Move modifier up in the stack";
- ot->idname= "OBJECT_OT_modifier_move_up";
+ ot->name = "Move Up Modifier";
+ ot->description = "Move modifier up in the stack";
+ ot->idname = "OBJECT_OT_modifier_move_up";
- ot->invoke= modifier_move_up_invoke;
- ot->exec= modifier_move_up_exec;
- ot->poll= edit_modifier_poll;
+ ot->invoke = modifier_move_up_invoke;
+ ot->exec = modifier_move_up_exec;
+ ot->poll = edit_modifier_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -866,7 +856,7 @@ static int modifier_move_down_exec(bContext *C, wmOperator *op)
Object *ob = ED_object_active_context(C);
ModifierData *md = edit_modifier_property_get(op, ob, 0);
- if(!ob || !md || !ED_object_modifier_move_down(op->reports, ob, md))
+ if (!ob || !md || !ED_object_modifier_move_down(op->reports, ob, md))
return OPERATOR_CANCELLED;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -885,16 +875,16 @@ static int modifier_move_down_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE
void OBJECT_OT_modifier_move_down(wmOperatorType *ot)
{
- ot->name= "Move Down Modifier";
- ot->description= "Move modifier down in the stack";
- ot->idname= "OBJECT_OT_modifier_move_down";
+ ot->name = "Move Down Modifier";
+ ot->description = "Move modifier down in the stack";
+ ot->idname = "OBJECT_OT_modifier_move_down";
- ot->invoke= modifier_move_down_invoke;
- ot->exec= modifier_move_down_exec;
- ot->poll= edit_modifier_poll;
+ ot->invoke = modifier_move_down_invoke;
+ ot->exec = modifier_move_down_exec;
+ ot->poll = edit_modifier_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -907,7 +897,7 @@ static int modifier_apply_exec(bContext *C, wmOperator *op)
ModifierData *md = edit_modifier_property_get(op, ob, 0);
int apply_as= RNA_enum_get(op->ptr, "apply_as");
- if(!ob || !md || !ED_object_modifier_apply(op->reports, scene, ob, md, apply_as)) {
+ if (!ob || !md || !ED_object_modifier_apply(op->reports, scene, ob, md, apply_as)) {
return OPERATOR_CANCELLED;
}
@@ -932,16 +922,16 @@ static EnumPropertyItem modifier_apply_as_items[] = {
void OBJECT_OT_modifier_apply(wmOperatorType *ot)
{
- ot->name= "Apply Modifier";
- ot->description= "Apply modifier and remove from the stack";
- ot->idname= "OBJECT_OT_modifier_apply";
+ ot->name = "Apply Modifier";
+ ot->description = "Apply modifier and remove from the stack";
+ ot->idname = "OBJECT_OT_modifier_apply";
- ot->invoke= modifier_apply_invoke;
- ot->exec= modifier_apply_exec;
- ot->poll= edit_modifier_poll;
+ ot->invoke = modifier_apply_invoke;
+ ot->exec = modifier_apply_exec;
+ ot->poll = edit_modifier_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "apply_as", modifier_apply_as_items, MODIFIER_APPLY_DATA, "Apply as", "How to apply the modifier to the geometry");
edit_modifier_properties(ot);
@@ -956,7 +946,7 @@ static int modifier_convert_exec(bContext *C, wmOperator *op)
Object *ob = ED_object_active_context(C);
ModifierData *md = edit_modifier_property_get(op, ob, 0);
- if(!ob || !md || !ED_object_modifier_convert(op->reports, bmain, scene, ob, md))
+ if (!ob || !md || !ED_object_modifier_convert(op->reports, bmain, scene, ob, md))
return OPERATOR_CANCELLED;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -975,16 +965,16 @@ static int modifier_convert_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(
void OBJECT_OT_modifier_convert(wmOperatorType *ot)
{
- ot->name= "Convert Modifier";
- ot->description= "Convert particles to a mesh object";
- ot->idname= "OBJECT_OT_modifier_convert";
+ ot->name = "Convert Modifier";
+ ot->description = "Convert particles to a mesh object";
+ ot->idname = "OBJECT_OT_modifier_convert";
- ot->invoke= modifier_convert_invoke;
- ot->exec= modifier_convert_exec;
- ot->poll= edit_modifier_poll;
+ ot->invoke = modifier_convert_invoke;
+ ot->exec = modifier_convert_exec;
+ ot->poll = edit_modifier_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -995,7 +985,7 @@ static int modifier_copy_exec(bContext *C, wmOperator *op)
Object *ob = ED_object_active_context(C);
ModifierData *md = edit_modifier_property_get(op, ob, 0);
- if(!ob || !md || !ED_object_modifier_copy(op->reports, ob, md))
+ if (!ob || !md || !ED_object_modifier_copy(op->reports, ob, md))
return OPERATOR_CANCELLED;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -1014,16 +1004,16 @@ static int modifier_copy_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
void OBJECT_OT_modifier_copy(wmOperatorType *ot)
{
- ot->name= "Copy Modifier";
- ot->description= "Duplicate modifier at the same position in the stack";
- ot->idname= "OBJECT_OT_modifier_copy";
+ ot->name = "Copy Modifier";
+ ot->description = "Duplicate modifier at the same position in the stack";
+ ot->idname = "OBJECT_OT_modifier_copy";
- ot->invoke= modifier_copy_invoke;
- ot->exec= modifier_copy_exec;
- ot->poll= edit_modifier_poll;
+ ot->invoke = modifier_copy_invoke;
+ ot->exec = modifier_copy_exec;
+ ot->poll = edit_modifier_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1059,16 +1049,16 @@ static int multires_higher_levels_delete_invoke(bContext *C, wmOperator *op, wmE
void OBJECT_OT_multires_higher_levels_delete(wmOperatorType *ot)
{
- ot->name= "Delete Higher Levels";
- ot->description= "Deletes the higher resolution mesh, potential loss of detail";
- ot->idname= "OBJECT_OT_multires_higher_levels_delete";
+ ot->name = "Delete Higher Levels";
+ ot->description = "Deletes the higher resolution mesh, potential loss of detail";
+ ot->idname = "OBJECT_OT_multires_higher_levels_delete";
- ot->poll= multires_poll;
- ot->invoke= multires_higher_levels_delete_invoke;
- ot->exec= multires_higher_levels_delete_exec;
+ ot->poll = multires_poll;
+ ot->invoke = multires_higher_levels_delete_invoke;
+ ot->exec = multires_higher_levels_delete_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1100,16 +1090,16 @@ static int multires_subdivide_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE
void OBJECT_OT_multires_subdivide(wmOperatorType *ot)
{
- ot->name= "Multires Subdivide";
- ot->description= "Add a new level of subdivision";
- ot->idname= "OBJECT_OT_multires_subdivide";
+ ot->name = "Multires Subdivide";
+ ot->description = "Add a new level of subdivision";
+ ot->idname = "OBJECT_OT_multires_subdivide";
- ot->poll= multires_poll;
- ot->invoke= multires_subdivide_invoke;
- ot->exec= multires_subdivide_exec;
+ ot->poll = multires_poll;
+ ot->invoke = multires_subdivide_invoke;
+ ot->exec = multires_subdivide_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1124,25 +1114,25 @@ static int multires_reshape_exec(bContext *C, wmOperator *op)
if (!mmd)
return OPERATOR_CANCELLED;
- if(mmd->lvl==0) {
+ if (mmd->lvl==0) {
BKE_report(op->reports, RPT_ERROR, "Reshape can work only with higher levels of subdivisions");
return OPERATOR_CANCELLED;
}
CTX_DATA_BEGIN(C, Object*, selob, selected_editable_objects) {
- if(selob->type == OB_MESH && selob != ob) {
+ if (selob->type == OB_MESH && selob != ob) {
secondob= selob;
break;
}
}
CTX_DATA_END;
- if(!secondob) {
+ if (!secondob) {
BKE_report(op->reports, RPT_ERROR, "Second selected mesh object require to copy shape from");
return OPERATOR_CANCELLED;
}
- if(!multiresModifier_reshape(scene, mmd, ob, secondob)) {
+ if (!multiresModifier_reshape(scene, mmd, ob, secondob)) {
BKE_report(op->reports, RPT_ERROR, "Objects do not have the same number of vertices");
return OPERATOR_CANCELLED;
}
@@ -1163,16 +1153,16 @@ static int multires_reshape_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(
void OBJECT_OT_multires_reshape(wmOperatorType *ot)
{
- ot->name= "Multires Reshape";
- ot->description= "Copy vertex coordinates from other object";
- ot->idname= "OBJECT_OT_multires_reshape";
+ ot->name = "Multires Reshape";
+ ot->description = "Copy vertex coordinates from other object";
+ ot->idname = "OBJECT_OT_multires_reshape";
- ot->poll= multires_poll;
- ot->invoke= multires_reshape_invoke;
- ot->exec= multires_reshape_exec;
+ ot->poll = multires_poll;
+ ot->invoke = multires_reshape_invoke;
+ ot->exec = multires_reshape_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1187,15 +1177,15 @@ static int multires_external_save_exec(bContext *C, wmOperator *op)
char path[FILE_MAX];
int relative= RNA_boolean_get(op->ptr, "relative_path");
- if(!me)
+ if (!me)
return OPERATOR_CANCELLED;
- if(CustomData_external_test(&me->ldata, CD_MDISPS))
+ if (CustomData_external_test(&me->ldata, CD_MDISPS))
return OPERATOR_CANCELLED;
RNA_string_get(op->ptr, "filepath", path);
- if(relative)
+ if (relative)
BLI_path_rel(path, G.main->name);
CustomData_external_add(&me->ldata, &me->id, CD_MDISPS, me->totloop, path);
@@ -1219,10 +1209,10 @@ static int multires_external_save_invoke(bContext *C, wmOperator *op, wmEvent *U
if (!mmd)
return OPERATOR_CANCELLED;
- if(CustomData_external_test(&me->ldata, CD_MDISPS))
+ if (CustomData_external_test(&me->ldata, CD_MDISPS))
return OPERATOR_CANCELLED;
- if(RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath"))
return multires_external_save_exec(C, op);
op->customdata= me;
@@ -1237,17 +1227,17 @@ static int multires_external_save_invoke(bContext *C, wmOperator *op, wmEvent *U
void OBJECT_OT_multires_external_save(wmOperatorType *ot)
{
- ot->name= "Multires Save External";
- ot->description= "Save displacements to an external file";
- ot->idname= "OBJECT_OT_multires_external_save";
+ ot->name = "Multires Save External";
+ ot->description = "Save displacements to an external file";
+ ot->idname = "OBJECT_OT_multires_external_save";
- // XXX modifier no longer in context after file browser .. ot->poll= multires_poll;
- ot->exec= multires_external_save_exec;
- ot->invoke= multires_external_save_invoke;
- ot->poll= multires_poll;
+ // XXX modifier no longer in context after file browser .. ot->poll = multires_poll;
+ ot->exec = multires_external_save_exec;
+ ot->invoke = multires_external_save_invoke;
+ ot->poll = multires_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_filesel(ot, FOLDERFILE|BTXFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
edit_modifier_properties(ot);
@@ -1260,7 +1250,7 @@ static int multires_external_pack_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob = ED_object_active_context(C);
Mesh *me= ob->data;
- if(!CustomData_external_test(&me->ldata, CD_MDISPS))
+ if (!CustomData_external_test(&me->ldata, CD_MDISPS))
return OPERATOR_CANCELLED;
// XXX don't remove..
@@ -1271,15 +1261,15 @@ static int multires_external_pack_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_multires_external_pack(wmOperatorType *ot)
{
- ot->name= "Multires Pack External";
- ot->description= "Pack displacements from an external file";
- ot->idname= "OBJECT_OT_multires_external_pack";
+ ot->name = "Multires Pack External";
+ ot->description = "Pack displacements from an external file";
+ ot->idname = "OBJECT_OT_multires_external_pack";
- ot->poll= multires_poll;
- ot->exec= multires_external_pack_exec;
+ ot->poll = multires_poll;
+ ot->exec = multires_external_pack_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************* multires apply base ***********************/
@@ -1310,16 +1300,16 @@ static int multires_base_apply_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
void OBJECT_OT_multires_base_apply(wmOperatorType *ot)
{
- ot->name= "Multires Apply Base";
- ot->description= "Modify the base mesh to conform to the displaced mesh";
- ot->idname= "OBJECT_OT_multires_base_apply";
+ ot->name = "Multires Apply Base";
+ ot->description = "Modify the base mesh to conform to the displaced mesh";
+ ot->idname = "OBJECT_OT_multires_base_apply";
- ot->poll= multires_poll;
- ot->invoke= multires_base_apply_invoke;
- ot->exec= multires_base_apply_exec;
+ ot->poll = multires_poll;
+ ot->invoke = multires_base_apply_invoke;
+ ot->exec = multires_base_apply_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1340,15 +1330,15 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op)
if (!mmd)
return OPERATOR_CANCELLED;
- if(mmd->bindcagecos) {
+ if (mmd->bindcagecos) {
MEM_freeN(mmd->bindcagecos);
- if(mmd->dyngrid) MEM_freeN(mmd->dyngrid);
- if(mmd->dyninfluences) MEM_freeN(mmd->dyninfluences);
- if(mmd->bindinfluences) MEM_freeN(mmd->bindinfluences);
- if(mmd->bindoffsets) MEM_freeN(mmd->bindoffsets);
- if(mmd->dynverts) MEM_freeN(mmd->dynverts);
- if(mmd->bindweights) MEM_freeN(mmd->bindweights); /* deprecated */
- if(mmd->bindcos) MEM_freeN(mmd->bindcos); /* deprecated */
+ if (mmd->dyngrid) MEM_freeN(mmd->dyngrid);
+ if (mmd->dyninfluences) MEM_freeN(mmd->dyninfluences);
+ if (mmd->bindinfluences) MEM_freeN(mmd->bindinfluences);
+ if (mmd->bindoffsets) MEM_freeN(mmd->bindoffsets);
+ if (mmd->dynverts) MEM_freeN(mmd->dynverts);
+ if (mmd->bindweights) MEM_freeN(mmd->bindweights); /* deprecated */
+ if (mmd->bindcos) MEM_freeN(mmd->bindcos); /* deprecated */
mmd->bindcagecos= NULL;
mmd->dyngrid= NULL;
@@ -1372,17 +1362,17 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op)
mmd->bindfunc= mesh_deform_bind;
mmd->modifier.mode |= eModifierMode_Realtime;
- if(ob->type == OB_MESH) {
+ if (ob->type == OB_MESH) {
dm= mesh_create_derived_view(scene, ob, 0);
dm->release(dm);
}
- else if(ob->type == OB_LATTICE) {
+ else if (ob->type == OB_LATTICE) {
lattice_calc_modifiers(scene, ob);
}
- else if(ob->type==OB_MBALL) {
+ else if (ob->type==OB_MBALL) {
makeDispListMBall(scene, ob);
}
- else if(ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
+ else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
makeDispListCurveTypes(scene, ob, 0);
}
@@ -1404,17 +1394,17 @@ static int meshdeform_bind_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e
void OBJECT_OT_meshdeform_bind(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mesh Deform Bind";
+ ot->name = "Mesh Deform Bind";
ot->description = "Bind mesh to cage in mesh deform modifier";
- ot->idname= "OBJECT_OT_meshdeform_bind";
+ ot->idname = "OBJECT_OT_meshdeform_bind";
/* api callbacks */
- ot->poll= meshdeform_poll;
- ot->invoke= meshdeform_bind_invoke;
- ot->exec= meshdeform_bind_exec;
+ ot->poll = meshdeform_poll;
+ ot->invoke = meshdeform_bind_invoke;
+ ot->exec = meshdeform_bind_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1452,16 +1442,16 @@ static int explode_refresh_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e
void OBJECT_OT_explode_refresh(wmOperatorType *ot)
{
- ot->name= "Explode Refresh";
- ot->description= "Refresh data in the Explode modifier";
- ot->idname= "OBJECT_OT_explode_refresh";
+ ot->name = "Explode Refresh";
+ ot->description = "Refresh data in the Explode modifier";
+ ot->idname = "OBJECT_OT_explode_refresh";
- ot->poll= explode_poll;
- ot->invoke= explode_refresh_invoke;
- ot->exec= explode_refresh_exec;
+ ot->poll = explode_poll;
+ ot->invoke = explode_refresh_invoke;
+ ot->exec = explode_refresh_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_modifier_properties(ot);
}
@@ -1667,16 +1657,16 @@ static int ocean_bake_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
void OBJECT_OT_ocean_bake(wmOperatorType *ot)
{
- ot->name= "Bake Ocean";
- ot->description= "Bake an image sequence of ocean data";
- ot->idname= "OBJECT_OT_ocean_bake";
+ ot->name = "Bake Ocean";
+ ot->description = "Bake an image sequence of ocean data";
+ ot->idname = "OBJECT_OT_ocean_bake";
- ot->poll= ocean_bake_poll;
- ot->invoke= ocean_bake_invoke;
- ot->exec= ocean_bake_exec;
+ ot->poll = ocean_bake_poll;
+ ot->invoke = ocean_bake_invoke;
+ ot->exec = ocean_bake_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_modifier_properties(ot);
RNA_def_boolean(ot->srna, "free", FALSE, "Free", "Free the bake, rather than generating it");
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 2b6707de42b..12387f36ca4 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -221,27 +221,27 @@ void ED_operatormacros_object(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate Objects", OPTYPE_UNDO|OPTYPE_REGISTER);
- if(ot) {
+ ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate Objects", OPTYPE_UNDO|OPTYPE_REGISTER);
+ if (ot) {
ot->description = "Duplicate selected objects and move them";
WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", PROP_EDIT_OFF);
}
/* grr, should be able to pass options on... */
- ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", "Duplicate Linked", OPTYPE_UNDO|OPTYPE_REGISTER);
- if(ot) {
+ ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", "Duplicate Linked", OPTYPE_UNDO|OPTYPE_REGISTER);
+ if (ot) {
ot->description = "Duplicate selected objects and move them";
- otmacro= WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
+ otmacro = WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
RNA_boolean_set(otmacro->ptr, "linked", TRUE);
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", PROP_EDIT_OFF);
}
/* XXX */
- ot= WM_operatortype_append_macro("OBJECT_OT_add_named_cursor", "Add named object at cursor", OPTYPE_UNDO|OPTYPE_REGISTER);
- if(ot) {
+ ot = WM_operatortype_append_macro("OBJECT_OT_add_named_cursor", "Add named object at cursor", OPTYPE_UNDO|OPTYPE_REGISTER);
+ if (ot) {
ot->description = "Add named object at cursor";
RNA_def_string(ot->srna, "name", "Cube", MAX_ID_NAME-2, "Name", "Object name to add");
@@ -263,7 +263,7 @@ void ED_keymap_object(wmKeyConfig *keyconf)
int i;
/* Objects, Regardless of Mode -------------------------------------------------- */
- keymap= WM_keymap_find(keyconf, "Object Non-modal", 0, 0);
+ keymap = WM_keymap_find(keyconf, "Object Non-modal", 0, 0);
/* Note: this keymap works disregarding mode */
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, 0, 0);
@@ -286,8 +286,8 @@ void ED_keymap_object(wmKeyConfig *keyconf)
/* Object Mode ---------------------------------------------------------------- */
/* Note: this keymap gets disabled in non-objectmode, */
- keymap= WM_keymap_find(keyconf, "Object Mode", 0, 0);
- keymap->poll= object_mode_poll;
+ keymap = WM_keymap_find(keyconf, "Object Mode", 0, 0);
+ keymap->poll = object_mode_poll;
/* object mode supports PET now */
ED_object_generic_keymap(keyconf, keymap, 1);
@@ -391,7 +391,7 @@ void ED_keymap_object(wmKeyConfig *keyconf)
WM_keymap_add_menu(keymap, "VIEW3D_MT_object_specials", WKEY, KM_PRESS, 0, 0);
- for(i=0; i<=5; i++) {
+ for (i=0; i<=5; i++) {
kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", ZEROKEY+i, KM_PRESS, KM_CTRL, 0);
RNA_int_set(kmi->ptr, "level", i);
}
@@ -400,11 +400,14 @@ void ED_keymap_object(wmKeyConfig *keyconf)
/* ################################ LATTICE ################################### */
/* ############################################################################ */
- keymap= WM_keymap_find(keyconf, "Lattice", 0, 0);
- keymap->poll= ED_operator_editlattice;
+ keymap = WM_keymap_find(keyconf, "Lattice", 0, 0);
+ keymap->poll = ED_operator_editlattice;
+
+ kmi = WM_keymap_add_item(keymap, "LATTICE_OT_select_all", AKEY, KM_PRESS, 0, 0);
+ RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
+ kmi = WM_keymap_add_item(keymap, "LATTICE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
+ RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
- WM_keymap_add_item(keymap, "LATTICE_OT_select_all", AKEY, KM_PRESS, 0, 0);
-
WM_keymap_add_item(keymap, "OBJECT_OT_vertex_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
/* menus */
@@ -418,7 +421,7 @@ void ED_object_generic_keymap(struct wmKeyConfig *UNUSED(keyconf), struct wmKeyM
wmKeyMapItem *kmi;
/* used by mesh, curve & lattice only */
- if(do_pet) {
+ if (do_pet) {
/* context ops */
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_enum", OKEY, KM_PRESS, KM_SHIFT, 0);
RNA_string_set(kmi->ptr, "data_path", "tool_settings.proportional_edit_falloff");
@@ -429,7 +432,8 @@ void ED_object_generic_keymap(struct wmKeyConfig *UNUSED(keyconf), struct wmKeyM
kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", OKEY, KM_PRESS, 0, 0);
RNA_string_set(kmi->ptr, "data_path", "tool_settings.use_proportional_edit_objects");
- } else { // Edit mode
+ }
+ else { // Edit mode
kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", OKEY, KM_PRESS, 0, 0);
RNA_string_set(kmi->ptr, "data_path", "tool_settings.proportional_edit");
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index a388e465a21..341ba368729 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -124,7 +124,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
/* we need 1 to 3 selected vertices */
- if(obedit->type==OB_MESH) {
+ if (obedit->type==OB_MESH) {
Mesh *me= obedit->data;
BMEditMesh *em;
@@ -139,31 +139,31 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
- if(v1==0) v1= nr;
- else if(v2==0) v2= nr;
- else if(v3==0) v3= nr;
- else if(v4==0) v4= nr;
+ if (v1==0) v1= nr;
+ else if (v2==0) v2= nr;
+ else if (v3==0) v3= nr;
+ else if (v4==0) v4= nr;
else break;
}
nr++;
}
}
- else if(ELEM(obedit->type, OB_SURF, OB_CURVE)) {
+ else if (ELEM(obedit->type, OB_SURF, OB_CURVE)) {
ListBase *editnurb= object_editcurve_get(obedit);
cu= obedit->data;
nu= editnurb->first;
- while(nu) {
- if(nu->type == CU_BEZIER) {
+ while (nu) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
- if(BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
- if(v1==0) v1= nr;
- else if(v2==0) v2= nr;
- else if(v3==0) v3= nr;
- else if(v4==0) v4= nr;
+ while (a--) {
+ if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
+ if (v1==0) v1= nr;
+ else if (v2==0) v2= nr;
+ else if (v3==0) v3= nr;
+ else if (v4==0) v4= nr;
else break;
}
nr++;
@@ -173,12 +173,12 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
- if(bp->f1 & SELECT) {
- if(v1==0) v1= nr;
- else if(v2==0) v2= nr;
- else if(v3==0) v3= nr;
- else if(v4==0) v4= nr;
+ while (a--) {
+ if (bp->f1 & SELECT) {
+ if (v1==0) v1= nr;
+ else if (v2==0) v2= nr;
+ else if (v3==0) v3= nr;
+ else if (v4==0) v4= nr;
else break;
}
nr++;
@@ -188,17 +188,17 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
nu= nu->next;
}
}
- else if(obedit->type==OB_LATTICE) {
+ else if (obedit->type==OB_LATTICE) {
Lattice *lt= obedit->data;
a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
bp= lt->editlatt->latt->def;
- while(a--) {
- if(bp->f1 & SELECT) {
- if(v1==0) v1= nr;
- else if(v2==0) v2= nr;
- else if(v3==0) v3= nr;
- else if(v4==0) v4= nr;
+ while (a--) {
+ if (bp->f1 & SELECT) {
+ if (v1==0) v1= nr;
+ else if (v2==0) v2= nr;
+ else if (v3==0) v3= nr;
+ else if (v4==0) v4= nr;
else break;
}
nr++;
@@ -206,28 +206,28 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
}
}
- if(v4 || !((v1 && v2==0 && v3==0) || (v1 && v2 && v3)) ) {
+ if (v4 || !((v1 && v2==0 && v3==0) || (v1 && v2 && v3)) ) {
BKE_report(op->reports, RPT_ERROR, "Select either 1 or 3 vertices to parent to");
return OPERATOR_CANCELLED;
}
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob != obedit) {
+ if (ob != obedit) {
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
par= obedit->parent;
- while(par) {
- if(par==ob) break;
+ while (par) {
+ if (par==ob) break;
par= par->parent;
}
- if(par) {
+ if (par) {
BKE_report(op->reports, RPT_ERROR, "Loop in parents");
}
else {
Object workob;
ob->parent= BASACT->object;
- if(v3) {
+ if (v3) {
ob->partype= PARVERT3;
ob->par1= v1-1;
ob->par2= v2-1;
@@ -260,17 +260,17 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_parent_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Vertex Parent";
+ ot->name = "Make Vertex Parent";
ot->description = "Parent selected objects to the selected vertices";
- ot->idname= "OBJECT_OT_vertex_parent_set";
+ ot->idname = "OBJECT_OT_vertex_parent_set";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->poll= vertex_parent_set_poll;
- ot->exec= vertex_parent_set_exec;
+ ot->invoke = WM_operator_confirm;
+ ot->poll = vertex_parent_set_poll;
+ ot->exec = vertex_parent_set_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** Make Proxy Operator *************************/
@@ -375,7 +375,7 @@ static EnumPropertyItem *proxy_group_object_itemf(bContext *C, PointerRNA *UNUSE
Object *ob= ED_object_active_context(C);
GroupObject *go;
- if(!ob || !ob->dup_group)
+ if (!ob || !ob->dup_group)
return DummyRNA_DEFAULT_items;
/* find the object to affect */
@@ -396,22 +396,22 @@ void OBJECT_OT_proxy_make (wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Make Proxy";
- ot->idname= "OBJECT_OT_proxy_make";
- ot->description= "Add empty object to become local replacement data of a library-linked object";
+ ot->name = "Make Proxy";
+ ot->idname = "OBJECT_OT_proxy_make";
+ ot->description = "Add empty object to become local replacement data of a library-linked object";
/* callbacks */
- ot->invoke= make_proxy_invoke;
- ot->exec= make_proxy_exec;
- ot->poll= ED_operator_object_active;
+ ot->invoke = make_proxy_invoke;
+ ot->exec = make_proxy_exec;
+ ot->poll = ED_operator_object_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "object", DummyRNA_DEFAULT_items, 0, "Proxy Object", "Name of lib-linked/grouped object to make a proxy for"); /* XXX, relies on hard coded ID at the moment */
RNA_def_enum_funcs(prop, proxy_group_object_itemf);
- ot->prop= prop;
+ ot->prop = prop;
}
/********************** Clear Parent Operator ******************* */
@@ -430,17 +430,17 @@ void ED_object_parent_clear(bContext *C, int type)
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
{
- if(ob->parent == NULL)
+ if (ob->parent == NULL)
continue;
- if(type == 0) {
+ if (type == 0) {
ob->parent= NULL;
}
- else if(type == 1) {
+ else if (type == 1) {
ob->parent= NULL;
object_apply_mat4(ob, ob->obmat, TRUE, FALSE);
}
- else if(type == 2)
+ else if (type == 2)
unit_m4(ob->parentinv);
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
@@ -464,20 +464,20 @@ static int parent_clear_exec(bContext *C, wmOperator *op)
void OBJECT_OT_parent_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Parent";
+ ot->name = "Clear Parent";
ot->description = "Clear the object's parenting";
- ot->idname= "OBJECT_OT_parent_clear";
+ ot->idname = "OBJECT_OT_parent_clear";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= parent_clear_exec;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = parent_clear_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
- ot->prop= RNA_def_enum(ot->srna, "type", prop_clear_parent_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_clear_parent_types, 0, "Type", "");
}
/* ******************** Make Parent Operator *********************** */
@@ -524,20 +524,20 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
par->recalc |= OB_RECALC_OB;
/* preconditions */
- if(partype==PAR_FOLLOW || partype==PAR_PATH_CONST) {
- if(par->type!=OB_CURVE)
+ if (partype==PAR_FOLLOW || partype==PAR_PATH_CONST) {
+ if (par->type!=OB_CURVE)
return 0;
else {
Curve *cu= par->data;
- if((cu->flag & CU_PATH)==0) {
+ if ((cu->flag & CU_PATH)==0) {
cu->flag |= CU_PATH|CU_FOLLOW;
makeDispListCurveTypes(scene, par, 0); /* force creation of path data */
}
else cu->flag |= CU_FOLLOW;
/* if follow, add F-Curve for ctime (i.e. "eval_time") so that path-follow works */
- if(partype == PAR_FOLLOW) {
+ if (partype == PAR_FOLLOW) {
/* get or create F-Curve */
bAction *act = verify_adt_action(&cu->id, 1);
FCurve *fcu = verify_fcurve(act, NULL, "eval_time", 0, 1);
@@ -548,14 +548,14 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
}
/* fall back on regular parenting now (for follow only) */
- if(partype == PAR_FOLLOW)
+ if (partype == PAR_FOLLOW)
partype= PAR_OBJECT;
}
}
- else if(partype==PAR_BONE) {
+ else if (partype==PAR_BONE) {
pchan= get_active_posechannel(par);
- if(pchan==NULL) {
+ if (pchan==NULL) {
BKE_report(reports, RPT_ERROR, "No active Bone");
return 0;
}
@@ -620,7 +620,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
ob->partype= PAROBJECT; /* note, dna define, not operator property */
/* constraint */
- if(partype == PAR_PATH_CONST) {
+ if (partype == PAR_PATH_CONST) {
bConstraint *con;
bFollowPathConstraint *data;
float cmat[4][4], vec[3];
@@ -637,12 +637,12 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
ob->loc[1] = vec[1];
ob->loc[2] = vec[2];
}
- else if(pararm && ob->type==OB_MESH && par->type == OB_ARMATURE) {
- if(partype == PAR_ARMATURE_NAME)
+ 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, 0);
- else if(partype == PAR_ARMATURE_ENVELOPE)
+ else if (partype == PAR_ARMATURE_ENVELOPE)
create_vgroups_from_armature(reports, scene, ob, par, ARM_GROUPS_ENVELOPE, 0);
- else if(partype == PAR_ARMATURE_AUTO) {
+ else if (partype == PAR_ARMATURE_AUTO) {
WM_cursor_wait(1);
create_vgroups_from_armature(reports, scene, ob, par, ARM_GROUPS_AUTO, 0);
WM_cursor_wait(0);
@@ -705,19 +705,19 @@ static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSE
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_OBJECT);
/* ob becomes parent, make the associated menus */
- if(ob->type==OB_ARMATURE) {
+ if (ob->type==OB_ARMATURE) {
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_ARMATURE);
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_ARMATURE_NAME);
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_ARMATURE_ENVELOPE);
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_ARMATURE_AUTO);
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_BONE);
}
- else if(ob->type==OB_CURVE) {
+ else if (ob->type==OB_CURVE) {
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_CURVE);
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_FOLLOW);
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_PATH_CONST);
}
- else if(ob->type == OB_LATTICE) {
+ else if (ob->type == OB_LATTICE) {
uiItemEnumO(layout, "OBJECT_OT_parent_set", NULL, 0, "type", PAR_LATTICE);
}
@@ -730,18 +730,18 @@ static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSE
void OBJECT_OT_parent_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Parent";
+ ot->name = "Make Parent";
ot->description = "Set the object's parenting";
- ot->idname= "OBJECT_OT_parent_set";
+ ot->idname = "OBJECT_OT_parent_set";
/* api callbacks */
- ot->invoke= parent_set_invoke;
- ot->exec= parent_set_exec;
+ ot->invoke = parent_set_invoke;
+ ot->exec = parent_set_exec;
- ot->poll= ED_operator_object_active;
+ ot->poll = ED_operator_object_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", prop_make_parent_types, 0, "Type", "");
}
@@ -787,17 +787,17 @@ static int parent_noinv_set_exec(bContext *C, wmOperator *op)
void OBJECT_OT_parent_no_inverse_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Parent without Inverse";
+ ot->name = "Make Parent without Inverse";
ot->description = "Set the object's parenting without setting the inverse parent correction";
- ot->idname= "OBJECT_OT_parent_no_inverse_set";
+ ot->idname = "OBJECT_OT_parent_no_inverse_set";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= parent_noinv_set_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = parent_noinv_set_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ Clear Slow Parent Operator *********************/
@@ -808,8 +808,8 @@ static int object_slow_parent_clear_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene= CTX_data_scene(C);
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob->parent) {
- if(ob->partype & PARSLOW) {
+ if (ob->parent) {
+ if (ob->partype & PARSLOW) {
ob->partype -= PARSLOW;
where_is_object(scene, ob);
ob->partype |= PARSLOW;
@@ -829,17 +829,17 @@ void OBJECT_OT_slow_parent_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Slow Parent";
+ ot->name = "Clear Slow Parent";
ot->description = "Clear the object's slow parent";
- ot->idname= "OBJECT_OT_slow_parent_clear";
+ ot->idname = "OBJECT_OT_slow_parent_clear";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= object_slow_parent_clear_exec;
- ot->poll= ED_operator_view3d_active;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = object_slow_parent_clear_exec;
+ ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** Make Slow Parent Operator *********************/
@@ -850,7 +850,7 @@ static int object_slow_parent_set_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene= CTX_data_scene(C);
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob->parent)
+ if (ob->parent)
ob->partype |= PARSLOW;
ob->recalc |= OB_RECALC_OB;
@@ -868,17 +868,17 @@ void OBJECT_OT_slow_parent_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Slow Parent";
+ ot->name = "Set Slow Parent";
ot->description = "Set the object's slow parent";
- ot->idname= "OBJECT_OT_slow_parent_set";
+ ot->idname = "OBJECT_OT_slow_parent_set";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= object_slow_parent_set_exec;
- ot->poll= ED_operator_view3d_active;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = object_slow_parent_set_exec;
+ ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Clear Track Operator ******************* */
@@ -896,7 +896,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
int type= RNA_enum_get(op->ptr, "type");
- if(CTX_data_edit_object(C)) {
+ if (CTX_data_edit_object(C)) {
BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed in EditMode");
return OPERATOR_CANCELLED;
}
@@ -914,7 +914,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op)
remove_constraint(&ob->constraints, con);
}
- if(type == 1)
+ if (type == 1)
object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
}
CTX_DATA_END;
@@ -929,20 +929,20 @@ static int object_track_clear_exec(bContext *C, wmOperator *op)
void OBJECT_OT_track_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear track";
+ ot->name = "Clear track";
ot->description = "Clear tracking constraint or flag from object";
- ot->idname= "OBJECT_OT_track_clear";
+ ot->idname = "OBJECT_OT_track_clear";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_track_clear_exec;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = object_track_clear_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
- ot->prop= RNA_def_enum(ot->srna, "type", prop_clear_track_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_clear_track_types, 0, "Type", "");
}
/************************** Make Track Operator *****************************/
@@ -962,12 +962,12 @@ static int track_set_exec(bContext *C, wmOperator *op)
int type= RNA_enum_get(op->ptr, "type");
- if(type == 1) {
+ if (type == 1) {
bConstraint *con;
bDampTrackConstraint *data;
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob!=obact) {
+ if (ob!=obact) {
con = add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_DAMPTRACK);
data = con->data;
@@ -981,12 +981,12 @@ static int track_set_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
}
- else if(type == 2) {
+ else if (type == 2) {
bConstraint *con;
bTrackToConstraint *data;
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob!=obact) {
+ if (ob!=obact) {
con = add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_TRACKTO);
data = con->data;
@@ -1002,12 +1002,12 @@ static int track_set_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
}
- else if(type == 3) {
+ else if (type == 3) {
bConstraint *con;
bLockTrackConstraint *data;
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob!=obact) {
+ if (ob!=obact) {
con = add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_LOCKTRACK);
data = con->data;
@@ -1034,21 +1034,21 @@ static int track_set_exec(bContext *C, wmOperator *op)
void OBJECT_OT_track_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Track";
+ ot->name = "Make Track";
ot->description = "Make the object track another object, either by constraint or old way or locked track";
- ot->idname= "OBJECT_OT_track_set";
+ ot->idname = "OBJECT_OT_track_set";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= track_set_exec;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = track_set_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_make_track_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_make_track_types, 0, "Type", "");
}
/************************** Move to Layer Operator *****************************/
@@ -1058,14 +1058,14 @@ static unsigned int move_to_layer_init(bContext *C, wmOperator *op)
int values[20], a;
unsigned int lay= 0;
- if(!RNA_struct_property_is_set(op->ptr, "layers")) {
+ if (!RNA_struct_property_is_set(op->ptr, "layers")) {
/* note: layers are set in bases, library objects work for this */
CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
lay |= base->lay;
}
CTX_DATA_END;
- for(a=0; a<20; a++)
+ for (a=0; a<20; a++)
values[a]= (lay & (1<<a));
RNA_boolean_set_array(op->ptr, "layers", values);
@@ -1073,8 +1073,8 @@ static unsigned int move_to_layer_init(bContext *C, wmOperator *op)
else {
RNA_boolean_get_array(op->ptr, "layers", values);
- for(a=0; a<20; a++)
- if(values[a])
+ for (a=0; a<20; a++)
+ if (values[a])
lay |= (1 << a);
}
@@ -1084,7 +1084,7 @@ static unsigned int move_to_layer_init(bContext *C, wmOperator *op)
static int move_to_layer_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
View3D *v3d= CTX_wm_view3d(C);
- if(v3d && v3d->localvd) {
+ if (v3d && v3d->localvd) {
return WM_operator_confirm_message(C, op, "Move from localview");
}
else {
@@ -1104,9 +1104,9 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
lay= move_to_layer_init(C, op);
lay &= 0xFFFFFF;
- if(lay==0) return OPERATOR_CANCELLED;
+ if (lay==0) return OPERATOR_CANCELLED;
- if(v3d && v3d->localvd) {
+ if (v3d && v3d->localvd) {
/* now we can move out of localview. */
/* note: layers are set in bases, library objects work for this */
CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
@@ -1115,7 +1115,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) islamp= 1; */
+ /* if (base->object->type==OB_LAMP) islamp= 1; */
}
CTX_DATA_END;
}
@@ -1127,7 +1127,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) islamp= 1; */
+ /* if (base->object->type==OB_LAMP) islamp= 1; */
}
CTX_DATA_END;
}
@@ -1145,17 +1145,17 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
void OBJECT_OT_move_to_layer(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move to Layer";
+ ot->name = "Move to Layer";
ot->description = "Move the object to different layers";
- ot->idname= "OBJECT_OT_move_to_layer";
+ ot->idname = "OBJECT_OT_move_to_layer";
/* api callbacks */
- ot->invoke= move_to_layer_invoke;
- ot->exec= move_to_layer_exec;
- ot->poll= ED_operator_objectmode;
+ ot->invoke = move_to_layer_invoke;
+ ot->exec = move_to_layer_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean_layer_member(ot->srna, "layers", 20, NULL, "Layer", "");
@@ -1169,11 +1169,11 @@ static void link_to_scene(Main *UNUSED(bmain), unsigned short UNUSED(nr))
Scene *sce= (Scene*) BLI_findlink(&bmain->scene, G.curscreen->scenenr-1);
Base *base, *nbase;
- if(sce==0) return;
- if(sce->id.lib) return;
+ if (sce==0) return;
+ if (sce->id.lib) return;
- for(base= FIRSTBASE; base; base= base->next) {
- if(TESTBASE(v3d, base)) {
+ for (base= FIRSTBASE; base; base= base->next) {
+ if (TESTBASE(v3d, base)) {
nbase= MEM_mallocN( sizeof(Base), "newbase");
*nbase= *base;
@@ -1189,24 +1189,24 @@ static int make_links_scene_exec(bContext *C, wmOperator *op)
Main *bmain= CTX_data_main(C);
Scene *scene_to= BLI_findlink(&CTX_data_main(C)->scene, RNA_enum_get(op->ptr, "scene"));
- if(scene_to==NULL) {
+ if (scene_to==NULL) {
BKE_report(op->reports, RPT_ERROR, "Scene not found");
return OPERATOR_CANCELLED;
}
- if(scene_to == CTX_data_scene(C)) {
+ if (scene_to == CTX_data_scene(C)) {
BKE_report(op->reports, RPT_ERROR, "Can't link objects into the same scene");
return OPERATOR_CANCELLED;
}
- if(scene_to->id.lib) {
+ if (scene_to->id.lib) {
BKE_report(op->reports, RPT_ERROR, "Can't link objects into a linked scene");
return OPERATOR_CANCELLED;
}
CTX_DATA_BEGIN(C, Base*, base, selected_bases)
{
- if(!object_in_scene(base->object, scene_to)) {
+ if (!object_in_scene(base->object, scene_to)) {
Base *nbase= MEM_mallocN( sizeof(Base), "newbase");
*nbase= *base;
BLI_addhead( &(scene_to->base), nbase);
@@ -1266,7 +1266,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
ob= ED_object_active_context(C);
CTX_DATA_BEGIN(C, Object*, obt, selected_editable_objects) {
- if(ob != obt) {
+ if (ob != obt) {
if (allow_make_links_data(event, ob, obt)) {
switch(event) {
case MAKE_LINKS_OBDATA: /* obdata */
@@ -1284,7 +1284,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
break;
case MAKE_LINKS_MATERIALS:
/* new approach, using functions from kernel */
- for(a=0; a<ob->totcol; a++) {
+ for (a=0; a<ob->totcol; a++) {
Material *ma= give_current_material(ob, a+1);
assign_material(obt, ma, a+1); /* also works with ma==NULL */
}
@@ -1295,7 +1295,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
break;
case MAKE_LINKS_DUPLIGROUP:
obt->dup_group= ob->dup_group;
- if(obt->dup_group) {
+ if (obt->dup_group) {
id_lib_extern(&obt->dup_group->id);
obt->transflag |= OB_DUPLIGROUP;
}
@@ -1323,22 +1323,22 @@ void OBJECT_OT_make_links_scene(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Link Objects to Scene";
+ ot->name = "Link Objects to Scene";
ot->description = "Link selection to another scene";
- ot->idname= "OBJECT_OT_make_links_scene";
+ ot->idname = "OBJECT_OT_make_links_scene";
/* api callbacks */
- ot->invoke= WM_enum_search_invoke;
- ot->exec= make_links_scene_exec;
+ ot->invoke = WM_enum_search_invoke;
+ ot->exec = make_links_scene_exec;
/* better not run the poll check */
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", "");
RNA_def_enum_funcs(prop, RNA_scene_local_itemf);
- ot->prop= prop;
+ ot->prop = prop;
}
void OBJECT_OT_make_links_data(wmOperatorType *ot)
@@ -1352,19 +1352,19 @@ void OBJECT_OT_make_links_data(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Link Data";
+ ot->name = "Link Data";
ot->description = "Make links from the active object to other selected objects";
- ot->idname= "OBJECT_OT_make_links_data";
+ ot->idname = "OBJECT_OT_make_links_data";
/* api callbacks */
- ot->exec= make_links_data_exec;
- ot->poll= ED_operator_object_active;
+ ot->exec = make_links_data_exec;
+ ot->poll = ED_operator_object_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", make_links_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", make_links_items, 0, "Type", "");
}
@@ -1378,7 +1378,7 @@ static void single_object_users(Scene *scene, View3D *v3d, int flag)
clear_sca_new_poins(); /* sensor/contr/act */
/* duplicate (must set newid) */
- for(base= FIRSTBASE; base; base= base->next) {
+ for (base= FIRSTBASE; base; base= base->next) {
ob= base->object;
/* newid may still have some trash from Outliner tree building,
@@ -1386,8 +1386,8 @@ static void single_object_users(Scene *scene, View3D *v3d, int flag)
*/
ob->id.newid = NULL;
- if( (base->flag & flag)==flag ) {
- if(ob->id.lib==NULL && ob->id.us>1) {
+ if ( (base->flag & flag)==flag ) {
+ if (ob->id.lib==NULL && ob->id.us>1) {
/* base gets copy of object */
obn= copy_object(ob);
base->object= obn;
@@ -1397,10 +1397,10 @@ static void single_object_users(Scene *scene, View3D *v3d, int flag)
}
ID_NEW(scene->camera);
- if(v3d) ID_NEW(v3d->camera);
+ if (v3d) ID_NEW(v3d->camera);
/* object pointers */
- for(base= FIRSTBASE; base; base= base->next) {
+ for (base= FIRSTBASE; base; base= base->next) {
object_relink(base->object);
}
@@ -1413,8 +1413,8 @@ void ED_object_single_user(Scene *scene, Object *ob)
{
Base *base;
- for(base= FIRSTBASE; base; base= base->next) {
- if(base->object == ob) base->flag |= OB_DONE;
+ for (base= FIRSTBASE; base; base= base->next) {
+ if (base->object == ob) base->flag |= OB_DONE;
else base->flag &= ~OB_DONE;
}
@@ -1426,15 +1426,15 @@ static void new_id_matar(Material **matar, int totcol)
ID *id;
int a;
- for(a=0; a<totcol; a++) {
+ for (a=0; a<totcol; a++) {
id= (ID *)matar[a];
- if(id && id->lib == NULL) {
- if(id->newid) {
+ if (id && id->lib == NULL) {
+ if (id->newid) {
matar[a]= (Material *)id->newid;
id_us_plus(id->newid);
id->us--;
}
- else if(id->us>1) {
+ else if (id->us>1) {
matar[a]= copy_material(matar[a]);
id->us--;
id->newid= (ID *)matar[a];
@@ -1454,12 +1454,12 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
ID *id;
int a;
- for(base= FIRSTBASE; base; base= base->next) {
+ for (base= FIRSTBASE; base; base= base->next) {
ob= base->object;
- if(ob->id.lib==NULL && (base->flag & flag)==flag ) {
+ if (ob->id.lib==NULL && (base->flag & flag)==flag ) {
id= ob->data;
- if(id && id->us>1 && id->lib==NULL) {
+ if (id && id->us>1 && id->lib==NULL) {
ob->recalc= OB_RECALC_DATA;
BKE_copy_animdata_id_action(id);
@@ -1467,8 +1467,8 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
switch(ob->type) {
case OB_LAMP:
ob->data= la= copy_lamp(ob->data);
- for(a=0; a<MAX_MTEX; a++) {
- if(la->mtex[a]) {
+ for (a=0; a<MAX_MTEX; a++) {
+ if (la->mtex[a]) {
ID_NEW(la->mtex[a]->object);
}
}
@@ -1518,7 +1518,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
}
me= bmain->mesh.first;
- while(me) {
+ while (me) {
ID_NEW(me->texcomesh);
me= me->id.next;
}
@@ -1529,9 +1529,9 @@ static void single_object_action_users(Scene *scene, int flag)
Object *ob;
Base *base;
- for(base= FIRSTBASE; base; base= base->next) {
+ for (base= FIRSTBASE; base; base= base->next) {
ob= base->object;
- if(ob->id.lib==NULL && (flag==0 || (base->flag & SELECT)) ) {
+ if (ob->id.lib==NULL && (flag==0 || (base->flag & SELECT)) ) {
ob->recalc= OB_RECALC_DATA;
BKE_copy_animdata_id_action(&ob->id);
}
@@ -1546,26 +1546,26 @@ static void single_mat_users(Scene *scene, int flag, int do_textures)
Tex *tex;
int a, b;
- for(base= FIRSTBASE; base; base= base->next) {
+ for (base= FIRSTBASE; base; base= base->next) {
ob= base->object;
- if(ob->id.lib==NULL && (flag==0 || (base->flag & SELECT)) ) {
+ if (ob->id.lib==NULL && (flag==0 || (base->flag & SELECT)) ) {
- for(a=1; a<=ob->totcol; a++) {
+ for (a=1; a<=ob->totcol; a++) {
ma= give_current_material(ob, a);
- if(ma) {
+ if (ma) {
/* do not test for LIB_NEW: this functions guaranteed delivers single_users! */
- if(ma->id.us>1) {
+ if (ma->id.us>1) {
man= copy_material(ma);
BKE_copy_animdata_id_action(&man->id);
man->id.us= 0;
assign_material(ob, man, a);
- if(do_textures) {
- for(b=0; b<MAX_MTEX; b++) {
- if(ma->mtex[b] && (tex= ma->mtex[b]->tex)) {
- if(tex->id.us>1) {
+ if (do_textures) {
+ for (b=0; b<MAX_MTEX; b++) {
+ if (ma->mtex[b] && (tex= ma->mtex[b]->tex)) {
+ if (tex->id.us>1) {
tex->id.us--;
tex= copy_texture(tex);
BKE_copy_animdata_id_action(&tex->id);
@@ -1586,14 +1586,14 @@ static void do_single_tex_user(Tex **from)
Tex *tex, *texn;
tex= *from;
- if(tex==NULL) return;
+ if (tex==NULL) return;
- if(tex->id.newid) {
+ if (tex->id.newid) {
*from= (Tex *)tex->id.newid;
id_us_plus(tex->id.newid);
tex->id.us--;
}
- else if(tex->id.us>1) {
+ else if (tex->id.us>1) {
texn= copy_texture(tex);
BKE_copy_animdata_id_action(&texn->id);
tex->id.newid= (ID *)texn;
@@ -1610,30 +1610,30 @@ static void single_tex_users_expand(Main *bmain)
World *wo;
int b;
- for(ma= bmain->mat.first; ma; ma=ma->id.next) {
- if(ma->id.flag & LIB_NEW) {
- for(b=0; b<MAX_MTEX; b++) {
- if(ma->mtex[b] && ma->mtex[b]->tex) {
+ for (ma= bmain->mat.first; ma; ma=ma->id.next) {
+ if (ma->id.flag & LIB_NEW) {
+ for (b=0; b<MAX_MTEX; b++) {
+ if (ma->mtex[b] && ma->mtex[b]->tex) {
do_single_tex_user( &(ma->mtex[b]->tex) );
}
}
}
}
- for(la= bmain->lamp.first; la; la=la->id.next) {
- if(la->id.flag & LIB_NEW) {
- for(b=0; b<MAX_MTEX; b++) {
- if(la->mtex[b] && la->mtex[b]->tex) {
+ for (la= bmain->lamp.first; la; la=la->id.next) {
+ if (la->id.flag & LIB_NEW) {
+ for (b=0; b<MAX_MTEX; b++) {
+ if (la->mtex[b] && la->mtex[b]->tex) {
do_single_tex_user( &(la->mtex[b]->tex) );
}
}
}
}
- for(wo= bmain->world.first; wo; wo=wo->id.next) {
- if(wo->id.flag & LIB_NEW) {
- for(b=0; b<MAX_MTEX; b++) {
- if(wo->mtex[b] && wo->mtex[b]->tex) {
+ for (wo= bmain->world.first; wo; wo=wo->id.next) {
+ if (wo->id.flag & LIB_NEW) {
+ for (b=0; b<MAX_MTEX; b++) {
+ if (wo->mtex[b] && wo->mtex[b]->tex) {
do_single_tex_user( &(wo->mtex[b]->tex) );
}
}
@@ -1651,27 +1651,27 @@ static void single_mat_users_expand(Main *bmain)
Material *ma;
int a;
- for(ob=bmain->object.first; ob; ob=ob->id.next)
- if(ob->id.flag & LIB_NEW)
+ for (ob=bmain->object.first; ob; ob=ob->id.next)
+ if (ob->id.flag & LIB_NEW)
new_id_matar(ob->mat, ob->totcol);
- for(me=bmain->mesh.first; me; me=me->id.next)
- if(me->id.flag & LIB_NEW)
+ for (me=bmain->mesh.first; me; me=me->id.next)
+ if (me->id.flag & LIB_NEW)
new_id_matar(me->mat, me->totcol);
- for(cu=bmain->curve.first; cu; cu=cu->id.next)
- if(cu->id.flag & LIB_NEW)
+ for (cu=bmain->curve.first; cu; cu=cu->id.next)
+ if (cu->id.flag & LIB_NEW)
new_id_matar(cu->mat, cu->totcol);
- for(mb=bmain->mball.first; mb; mb=mb->id.next)
- if(mb->id.flag & LIB_NEW)
+ for (mb=bmain->mball.first; mb; mb=mb->id.next)
+ if (mb->id.flag & LIB_NEW)
new_id_matar(mb->mat, mb->totcol);
/* material imats */
- for(ma=bmain->mat.first; ma; ma=ma->id.next)
- if(ma->id.flag & LIB_NEW)
- for(a=0; a<MAX_MTEX; a++)
- if(ma->mtex[a])
+ for (ma=bmain->mat.first; ma; ma=ma->id.next)
+ if (ma->id.flag & LIB_NEW)
+ for (a=0; a<MAX_MTEX; a++)
+ if (ma->mtex[a])
ID_NEW(ma->mtex[a]->object);
}
@@ -1680,7 +1680,7 @@ void ED_object_single_users(Main *bmain, Scene *scene, int full)
{
single_object_users(scene, NULL, 0);
- if(full) {
+ if (full) {
single_obdata_users(bmain, scene, 0);
single_object_action_users(scene, 0);
single_mat_users_expand(bmain);
@@ -1700,12 +1700,12 @@ static void make_local_makelocalmaterial(Material *ma)
id_make_local(&ma->id, 0);
- for(b=0; b<MAX_MTEX; b++)
- if(ma->mtex[b] && ma->mtex[b]->tex)
+ for (b=0; b<MAX_MTEX; b++)
+ if (ma->mtex[b] && ma->mtex[b]->tex)
id_make_local(&ma->mtex[b]->tex->id, 0);
adt= BKE_animdata_from_id(&ma->id);
- if(adt) BKE_animdata_make_local(adt);
+ if (adt) BKE_animdata_make_local(adt);
/* nodetree? XXX */
}
@@ -1720,7 +1720,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
ID *id;
int a, b, mode= RNA_enum_get(op->ptr, "type");
- if(mode==3) {
+ if (mode==3) {
BKE_library_make_local(bmain, NULL, 0); /* NULL is all libs */
WM_event_add_notifier(C, NC_WINDOW, NULL);
return OPERATOR_FINISHED;
@@ -1729,14 +1729,14 @@ static int make_local_exec(bContext *C, wmOperator *op)
clear_id_newpoins();
CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
- if(ob->id.lib)
+ if (ob->id.lib)
id_make_local(&ob->id, 0);
}
CTX_DATA_END;
/* maybe object pointers */
CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
- if(ob->id.lib==NULL) {
+ if (ob->id.lib==NULL) {
ID_NEW(ob->parent);
}
}
@@ -1745,51 +1745,51 @@ static int make_local_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
id= ob->data;
- if(id && mode>1) {
+ if (id && mode>1) {
id_make_local(id, 0);
adt= BKE_animdata_from_id(id);
- if(adt) BKE_animdata_make_local(adt);
+ if (adt) BKE_animdata_make_local(adt);
/* tag indirect data direct */
matarar= (Material ***)give_matarar(ob);
- if(matarar) {
- for(a=0; a<ob->totcol; a++) {
+ if (matarar) {
+ for (a=0; a<ob->totcol; a++) {
ma= (*matarar)[a];
- if(ma)
+ if (ma)
id_lib_extern(&ma->id);
}
}
}
- for(psys=ob->particlesystem.first; psys; psys=psys->next)
+ for (psys=ob->particlesystem.first; psys; psys=psys->next)
id_make_local(&psys->part->id, 0);
adt= BKE_animdata_from_id(&ob->id);
- if(adt) BKE_animdata_make_local(adt);
+ if (adt) BKE_animdata_make_local(adt);
}
CTX_DATA_END;
- if(mode>1) {
+ if (mode>1) {
CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
- if(ob->type==OB_LAMP) {
+ if (ob->type==OB_LAMP) {
la= ob->data;
- for(b=0; b<MAX_MTEX; b++)
- if(la->mtex[b] && la->mtex[b]->tex)
+ for (b=0; b<MAX_MTEX; b++)
+ if (la->mtex[b] && la->mtex[b]->tex)
id_make_local(&la->mtex[b]->tex->id, 0);
}
else {
- for(a=0; a<ob->totcol; a++) {
+ for (a=0; a<ob->totcol; a++) {
ma= ob->mat[a];
- if(ma)
+ if (ma)
make_local_makelocalmaterial(ma);
}
matarar= (Material ***)give_matarar(ob);
- if(matarar) {
- for(a=0; a<ob->totcol; a++) {
+ if (matarar) {
+ for (a=0; a<ob->totcol; a++) {
ma= (*matarar)[a];
- if(ma)
+ if (ma)
make_local_makelocalmaterial(ma);
}
}
@@ -1812,20 +1812,20 @@ void OBJECT_OT_make_local(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Make Local";
+ ot->name = "Make Local";
ot->description = "Make library linked datablocks local to this file";
- ot->idname= "OBJECT_OT_make_local";
+ ot->idname = "OBJECT_OT_make_local";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= make_local_exec;
- ot->poll= ED_operator_objectmode;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = make_local_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "");
}
static int make_single_user_exec(bContext *C, wmOperator *op)
@@ -1835,20 +1835,20 @@ static int make_single_user_exec(bContext *C, wmOperator *op)
View3D *v3d= CTX_wm_view3d(C); /* ok if this is NULL */
int flag= RNA_enum_get(op->ptr, "type"); /* 0==ALL, SELECTED==selected objecs */
- if(RNA_boolean_get(op->ptr, "object"))
+ if (RNA_boolean_get(op->ptr, "object"))
single_object_users(scene, v3d, flag);
- if(RNA_boolean_get(op->ptr, "obdata"))
+ if (RNA_boolean_get(op->ptr, "obdata"))
single_obdata_users(bmain, scene, flag);
- if(RNA_boolean_get(op->ptr, "material"))
+ if (RNA_boolean_get(op->ptr, "material"))
single_mat_users(scene, flag, RNA_boolean_get(op->ptr, "texture"));
#if 0 /* can't do this separate from materials */
- if(RNA_boolean_get(op->ptr, "texture"))
+ if (RNA_boolean_get(op->ptr, "texture"))
single_mat_users(scene, flag, TRUE);
#endif
- if(RNA_boolean_get(op->ptr, "animation"))
+ if (RNA_boolean_get(op->ptr, "animation"))
single_object_action_users(scene, flag);
clear_id_newpoins();
@@ -1865,20 +1865,20 @@ void OBJECT_OT_make_single_user(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Make Single User";
+ ot->name = "Make Single User";
ot->description = "Make linked data local to each object";
- ot->idname= "OBJECT_OT_make_single_user";
+ ot->idname = "OBJECT_OT_make_single_user";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= make_single_user_exec;
- ot->poll= ED_operator_objectmode;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = make_single_user_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", type_items, SELECT, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", type_items, SELECT, "Type", "");
RNA_def_boolean(ot->srna, "object", 0, "Object", "Make single user objects");
RNA_def_boolean(ot->srna, "obdata", 0, "Object Data", "Make single user object data");
@@ -1896,7 +1896,7 @@ static int drop_named_material_invoke(bContext *C, wmOperator *op, wmEvent *even
RNA_string_get(op->ptr, "name", name);
ma= (Material *)find_id("MA", name);
- if(base==NULL || ma==NULL)
+ if (base==NULL || ma==NULL)
return OPERATOR_CANCELLED;
assign_material(base->object, ma, 1);
@@ -1913,16 +1913,16 @@ void OBJECT_OT_drop_named_material(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Drop Named Material on Object";
+ ot->name = "Drop Named Material on Object";
ot->description = "";
- ot->idname= "OBJECT_OT_drop_named_material";
+ ot->idname = "OBJECT_OT_drop_named_material";
/* api callbacks */
- ot->invoke= drop_named_material_invoke;
- ot->poll= ED_operator_objectmode;
+ ot->invoke = drop_named_material_invoke;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
RNA_def_string(ot->srna, "name", "Material", MAX_ID_NAME-2, "Name", "Material name to assign");
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 9e11146db70..53726d70cf9 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -107,7 +107,7 @@ void ED_base_object_activate(bContext *C, Base *base)
/* sets scene->basact */
BASACT= base;
- if(base) {
+ if (base) {
/* XXX old signals, remember to handle notifiers now! */
// select_actionchannel_by_name(base->object->action, "Object", 1);
@@ -126,9 +126,9 @@ static int objects_selectable_poll(bContext *C)
* still allowed then for inspection of scene */
Object *obact= CTX_data_active_object(C);
- if(CTX_data_edit_object(C))
+ if (CTX_data_edit_object(C))
return 0;
- if(obact && obact->mode)
+ if (obact && obact->mode)
return 0;
return 1;
@@ -151,7 +151,7 @@ static int object_select_by_type_exec(bContext *C, wmOperator *op)
}
CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if(base->object->type==obtype) {
+ if (base->object->type==obtype) {
ED_base_object_select(base, BA_SELECT);
}
}
@@ -165,21 +165,21 @@ static int object_select_by_type_exec(bContext *C, wmOperator *op)
void OBJECT_OT_select_by_type(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select By Type";
+ ot->name = "Select By Type";
ot->description = "Select all visible objects that are of a type";
- ot->idname= "OBJECT_OT_select_by_type";
+ ot->idname = "OBJECT_OT_select_by_type";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_select_by_type_exec;
- ot->poll= objects_selectable_poll;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = object_select_by_type_exec;
+ ot->poll = objects_selectable_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
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", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", object_type_items, 1, "Type", "");
}
/*********************** Selection by Links *********************/
@@ -225,67 +225,67 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
}
ob= OBACT;
- if(ob==NULL){
+ if (ob==NULL) {
BKE_report(op->reports, RPT_ERROR, "No Active Object");
return OPERATOR_CANCELLED;
}
- if(nr==1) {
+ if (nr==1) {
// XXX old animation system
//ipo= ob->ipo;
//if(ipo==0) return OPERATOR_CANCELLED;
return OPERATOR_CANCELLED;
}
- else if(nr==2) {
- if(ob->data==NULL) return OPERATOR_CANCELLED;
+ else if (nr==2) {
+ if (ob->data==NULL) return OPERATOR_CANCELLED;
obdata= ob->data;
}
- else if(nr==3 || nr==4) {
+ else if (nr==3 || nr==4) {
mat= give_current_material(ob, ob->actcol);
- if(mat==NULL) return OPERATOR_CANCELLED;
- if(nr==4) {
- if(mat->mtex[ (int)mat->texact ]) tex= mat->mtex[ (int)mat->texact ]->tex;
- if(tex==NULL) return OPERATOR_CANCELLED;
+ if (mat==NULL) return OPERATOR_CANCELLED;
+ if (nr==4) {
+ if (mat->mtex[ (int)mat->texact ]) tex= mat->mtex[ (int)mat->texact ]->tex;
+ if (tex==NULL) return OPERATOR_CANCELLED;
}
}
- else if(nr==5) {
- if(ob->dup_group==NULL) return OPERATOR_CANCELLED;
+ else if (nr==5) {
+ if (ob->dup_group==NULL) return OPERATOR_CANCELLED;
}
- else if(nr==6) {
- if(ob->particlesystem.first==NULL) return OPERATOR_CANCELLED;
+ else if (nr==6) {
+ if (ob->particlesystem.first==NULL) return OPERATOR_CANCELLED;
}
- else if(nr==7) {
+ else if (nr==7) {
/* do nothing */
}
- else if(nr==8) {
- if(ob->data==NULL) return OPERATOR_CANCELLED;
+ else if (nr==8) {
+ if (ob->data==NULL) return OPERATOR_CANCELLED;
}
else
return OPERATOR_CANCELLED;
CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if(nr==1) {
+ if (nr==1) {
// XXX old animation system
//if(base->object->ipo==ipo) base->flag |= SELECT;
//changed = 1;
}
- else if(nr==2) {
- if(base->object->data==obdata) base->flag |= SELECT;
+ else if (nr==2) {
+ if (base->object->data==obdata) base->flag |= SELECT;
changed = 1;
}
- else if(nr==3 || nr==4) {
+ else if (nr==3 || nr==4) {
ob= base->object;
- for(a=1; a<=ob->totcol; a++) {
+ for (a=1; a<=ob->totcol; a++) {
mat1= give_current_material(ob, a);
- if(nr==3) {
- if(mat1==mat) base->flag |= SELECT;
+ if (nr==3) {
+ if (mat1==mat) base->flag |= SELECT;
changed = 1;
}
- else if(mat1 && nr==4) {
- for(b=0; b<MAX_MTEX; b++) {
- if(mat1->mtex[b]) {
- if(tex==mat1->mtex[b]->tex) {
+ else if (mat1 && nr==4) {
+ for (b=0; b<MAX_MTEX; b++) {
+ if (mat1->mtex[b]) {
+ if (tex==mat1->mtex[b]->tex) {
base->flag |= SELECT;
changed = 1;
break;
@@ -295,19 +295,19 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
}
}
}
- else if(nr==5) {
- if(base->object->dup_group==ob->dup_group) {
+ else if (nr==5) {
+ if (base->object->dup_group==ob->dup_group) {
base->flag |= SELECT;
changed = 1;
}
}
- else if(nr==6) {
+ else if (nr==6) {
/* loop through other, then actives particles*/
ParticleSystem *psys;
ParticleSystem *psys_act;
- for(psys=base->object->particlesystem.first; psys; psys=psys->next) {
- for(psys_act=ob->particlesystem.first; psys_act; psys_act=psys_act->next) {
+ for (psys=base->object->particlesystem.first; psys; psys=psys->next) {
+ for (psys_act=ob->particlesystem.first; psys_act; psys_act=psys_act->next) {
if (psys->part == psys_act->part) {
base->flag |= SELECT;
changed = 1;
@@ -320,14 +320,14 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
}
}
}
- else if(nr==7) {
- if(ob->id.lib == base->object->id.lib) {
+ else if (nr==7) {
+ if (ob->id.lib == base->object->id.lib) {
base->flag |= SELECT;
changed= 1;
}
}
- else if(nr==8) {
- if(base->object->data && ((ID *)ob->data)->lib == ((ID *)base->object->data)->lib) {
+ else if (nr==8) {
+ if (base->object->data && ((ID *)ob->data)->lib == ((ID *)base->object->data)->lib) {
base->flag |= SELECT;
changed= 1;
}
@@ -347,21 +347,21 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
void OBJECT_OT_select_linked(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Linked";
+ ot->name = "Select Linked";
ot->description = "Select all visible objects that are linked";
- ot->idname= "OBJECT_OT_select_linked";
+ ot->idname = "OBJECT_OT_select_linked";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_select_linked_exec;
- ot->poll= objects_selectable_poll;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = object_select_linked_exec;
+ ot->poll = objects_selectable_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
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", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_select_linked_types, 0, "Type", "");
}
/*********************** Selected Grouped ********************/
@@ -414,7 +414,7 @@ static short select_grouped_parent(bContext *C) /* Makes parent active and de-se
baspar= object_in_scene(basact->object->parent, scene);
/* can be NULL if parent in other scene */
- if(baspar && BASE_SELECTABLE(v3d, baspar)) {
+ if (baspar && BASE_SELECTABLE(v3d, baspar)) {
ED_base_object_select(basact, BA_DESELECT);
ED_base_object_select(baspar, BA_SELECT);
ED_base_object_activate(C, baspar);
@@ -569,7 +569,7 @@ static short objects_share_gameprop(Object *a, Object *b)
bProperty *prop;
/*make a copy of all its properties*/
- for( prop= a->prop.first; prop; prop = prop->next ) {
+ for ( prop= a->prop.first; prop; prop = prop->next ) {
if ( get_ob_property(b, prop->name) )
return 1;
}
@@ -644,23 +644,23 @@ static int object_select_grouped_exec(bContext *C, wmOperator *op)
}
ob= OBACT;
- if(ob==NULL) {
+ if (ob==NULL) {
BKE_report(op->reports, RPT_ERROR, "No Active Object");
return OPERATOR_CANCELLED;
}
- if(nr==1) changed |= select_grouped_children(C, ob, 1);
- else if(nr==2) changed |= select_grouped_children(C, ob, 0);
- else if(nr==3) changed |= select_grouped_parent(C);
- else if(nr==4) changed |= select_grouped_siblings(C, ob);
- else if(nr==5) changed |= select_grouped_type(C, ob);
- else if(nr==6) changed |= select_grouped_layer(C, ob);
- else if(nr==7) changed |= select_grouped_group(C, ob);
- else if(nr==8) changed |= select_grouped_object_hooks(C, ob);
- else if(nr==9) changed |= select_grouped_index_object(C, ob);
- else if(nr==10) changed |= select_grouped_color(C, ob);
- else if(nr==11) changed |= select_grouped_gameprops(C, ob);
- else if(nr==12) changed |= select_grouped_keyingset(C, ob);
+ if (nr==1) changed |= select_grouped_children(C, ob, 1);
+ else if (nr==2) changed |= select_grouped_children(C, ob, 0);
+ else if (nr==3) changed |= select_grouped_parent(C);
+ else if (nr==4) changed |= select_grouped_siblings(C, ob);
+ else if (nr==5) changed |= select_grouped_type(C, ob);
+ else if (nr==6) changed |= select_grouped_layer(C, ob);
+ else if (nr==7) changed |= select_grouped_group(C, ob);
+ else if (nr==8) changed |= select_grouped_object_hooks(C, ob);
+ else if (nr==9) changed |= select_grouped_index_object(C, ob);
+ else if (nr==10) changed |= select_grouped_color(C, ob);
+ else if (nr==11) changed |= select_grouped_gameprops(C, ob);
+ else if (nr==12) changed |= select_grouped_keyingset(C, ob);
if (changed) {
WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
@@ -673,21 +673,21 @@ static int object_select_grouped_exec(bContext *C, wmOperator *op)
void OBJECT_OT_select_grouped(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Grouped";
+ ot->name = "Select Grouped";
ot->description = "Select all visible objects grouped by various properties";
- ot->idname= "OBJECT_OT_select_grouped";
+ ot->idname = "OBJECT_OT_select_grouped";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_select_grouped_exec;
- ot->poll= objects_selectable_poll;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = object_select_grouped_exec;
+ ot->poll = objects_selectable_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
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", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", "");
}
/************************* Select by Layer **********************/
@@ -708,7 +708,7 @@ static int object_select_by_layer_exec(bContext *C, wmOperator *op)
}
CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if(base->lay == (1<< (layernum -1)))
+ if (base->lay == (1<< (layernum -1)))
ED_base_object_select(base, BA_SELECT);
}
CTX_DATA_END;
@@ -722,17 +722,17 @@ static int object_select_by_layer_exec(bContext *C, wmOperator *op)
void OBJECT_OT_select_by_layer(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select by Layer";
+ ot->name = "Select by Layer";
ot->description = "Select all visible objects on a layer";
- ot->idname= "OBJECT_OT_select_by_layer";
+ ot->idname = "OBJECT_OT_select_by_layer";
/* api callbacks */
/*ot->invoke = XXX - need a int grid popup*/
- ot->exec= object_select_by_layer_exec;
- ot->poll= objects_selectable_poll;
+ ot->exec = object_select_by_layer_exec;
+ ot->poll = objects_selectable_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
@@ -770,7 +770,8 @@ static int object_select_all_exec(bContext *C, wmOperator *op)
case SEL_INVERT:
if (base->flag & SELECT) {
ED_base_object_select(base, BA_DESELECT);
- } else {
+ }
+ else {
ED_base_object_select(base, BA_SELECT);
}
break;
@@ -787,16 +788,16 @@ void OBJECT_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select or Deselect All";
+ ot->name = "(De)select All";
ot->description = "Change selection of all visible objects in scene";
- ot->idname= "OBJECT_OT_select_all";
+ ot->idname = "OBJECT_OT_select_all";
/* api callbacks */
- ot->exec= object_select_all_exec;
- ot->poll= objects_selectable_poll;
+ ot->exec = object_select_all_exec;
+ ot->poll = objects_selectable_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -836,16 +837,16 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Same Group";
+ ot->name = "Select Same Group";
ot->description = "Select object in the same group";
- ot->idname= "OBJECT_OT_select_same_group";
+ ot->idname = "OBJECT_OT_select_same_group";
/* api callbacks */
- ot->exec= object_select_same_group_exec;
- ot->poll= objects_selectable_poll;
+ ot->exec = object_select_same_group_exec;
+ ot->poll = objects_selectable_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_string(ot->srna, "group", "", MAX_ID_NAME, "Group", "Name of the group to select");
}
@@ -863,12 +864,12 @@ static int object_select_mirror_exec(bContext *C, wmOperator *op)
flip_side_name(tmpname, primbase->object->id.name+2, TRUE);
- if(strcmp(tmpname, primbase->object->id.name+2)!=0) { /* names differ */
+ if (strcmp(tmpname, primbase->object->id.name+2)!=0) { /* names differ */
Object *ob= (Object *)find_id("OB", tmpname);
- if(ob) {
+ if (ob) {
Base *secbase= object_in_scene(ob, scene);
- if(secbase) {
+ if (secbase) {
ED_base_object_select(secbase, BA_SELECT);
}
}
@@ -889,16 +890,16 @@ void OBJECT_OT_select_mirror(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Mirror";
+ ot->name = "Select Mirror";
ot->description = "Select the Mirror objects of the selected object eg. L.sword -> R.sword";
- ot->idname= "OBJECT_OT_select_mirror";
+ ot->idname = "OBJECT_OT_select_mirror";
/* api callbacks */
- ot->exec= object_select_mirror_exec;
- ot->poll= objects_selectable_poll;
+ ot->exec = object_select_mirror_exec;
+ ot->poll = objects_selectable_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first");
}
@@ -936,17 +937,17 @@ static int object_select_random_exec(bContext *C, wmOperator *op)
void OBJECT_OT_select_random(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Random";
+ ot->name = "Select Random";
ot->description = "Set select on random visible objects";
- ot->idname= "OBJECT_OT_select_random";
+ ot->idname = "OBJECT_OT_select_random";
/* api callbacks */
- /*ot->invoke= object_select_random_invoke XXX - need a number popup ;*/
+ /*ot->invoke = object_select_random_invoke XXX - need a number popup ;*/
ot->exec = object_select_random_exec;
- ot->poll= objects_selectable_poll;
+ ot->poll = objects_selectable_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of objects to select randomly", 0.f, 100.0f);
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index b186f788bbf..959bda22263 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -76,7 +76,7 @@
static void ED_object_shape_key_add(bContext *C, Scene *scene, Object *ob, int from_mix)
{
- if(object_insert_shape_key(scene, ob, NULL, from_mix)) {
+ if (object_insert_shape_key(scene, ob, NULL, from_mix)) {
Key *key= ob_get_key(ob);
ob->shapenr= BLI_countlist(&key->block);
@@ -94,22 +94,22 @@ static int ED_object_shape_key_remove(bContext *C, Object *ob)
//IpoCurve *icu;
key= ob_get_key(ob);
- if(key==NULL)
+ if (key==NULL)
return 0;
kb= BLI_findlink(&key->block, ob->shapenr-1);
- if(kb) {
- for(rkb= key->block.first; rkb; rkb= rkb->next)
- if(rkb->relative == ob->shapenr-1)
+ if (kb) {
+ for (rkb= key->block.first; rkb; rkb= rkb->next)
+ if (rkb->relative == ob->shapenr-1)
rkb->relative= 0;
BLI_remlink(&key->block, kb);
key->totkey--;
- if(key->refkey== kb) {
+ if (key->refkey== kb) {
key->refkey= key->block.first;
- if(key->refkey) {
+ if (key->refkey) {
/* apply new basis key on original data */
switch(ob->type) {
case OB_MESH:
@@ -126,36 +126,36 @@ static int ED_object_shape_key_remove(bContext *C, Object *ob)
}
}
- if(kb->data) MEM_freeN(kb->data);
+ if (kb->data) MEM_freeN(kb->data);
MEM_freeN(kb);
- for(kb= key->block.first; kb; kb= kb->next)
- if(kb->adrcode>=ob->shapenr)
+ for (kb= key->block.first; kb; kb= kb->next)
+ if (kb->adrcode>=ob->shapenr)
kb->adrcode--;
#if 0 // XXX old animation system
- if(key->ipo) {
+ if (key->ipo) {
- for(icu= key->ipo->curve.first; icu; icu= icu->next) {
- if(icu->adrcode==ob->shapenr-1) {
+ for (icu= key->ipo->curve.first; icu; icu= icu->next) {
+ if (icu->adrcode==ob->shapenr-1) {
BLI_remlink(&key->ipo->curve, icu);
free_ipo_curve(icu);
break;
}
}
- for(icu= key->ipo->curve.first; icu; icu= icu->next)
- if(icu->adrcode>=ob->shapenr)
+ for (icu= key->ipo->curve.first; icu; icu= icu->next)
+ if (icu->adrcode>=ob->shapenr)
icu->adrcode--;
}
#endif // XXX old animation system
- if(ob->shapenr>1) ob->shapenr--;
+ if (ob->shapenr>1) ob->shapenr--;
}
- if(key->totkey==0) {
- if(GS(key->from->name)==ID_ME) ((Mesh *)key->from)->key= NULL;
- else if(GS(key->from->name)==ID_CU) ((Curve *)key->from)->key= NULL;
- else if(GS(key->from->name)==ID_LT) ((Lattice *)key->from)->key= NULL;
+ if (key->totkey==0) {
+ if (GS(key->from->name)==ID_ME) ((Mesh *)key->from)->key= NULL;
+ else if (GS(key->from->name)==ID_CU) ((Curve *)key->from)->key= NULL;
+ else if (GS(key->from->name)==ID_LT) ((Lattice *)key->from)->key= NULL;
free_libblock_us(&(bmain->key), key);
}
@@ -172,33 +172,33 @@ static int object_shape_key_mirror(bContext *C, Object *ob)
Key *key;
key= ob_get_key(ob);
- if(key==NULL)
+ if (key==NULL)
return 0;
kb= BLI_findlink(&key->block, ob->shapenr-1);
- if(kb) {
+ if (kb) {
int i1, i2;
float *fp1, *fp2;
float tvec[3];
char *tag_elem= MEM_callocN(sizeof(char) * kb->totelem, "shape_key_mirror");
- if(ob->type==OB_MESH) {
+ if (ob->type==OB_MESH) {
Mesh *me= ob->data;
MVert *mv;
mesh_octree_table(ob, NULL, NULL, 's');
- for(i1=0, mv=me->mvert; i1<me->totvert; i1++, mv++) {
+ for (i1=0, mv=me->mvert; i1<me->totvert; i1++, mv++) {
i2= mesh_get_x_mirror_vert(ob, i1);
- if(i2==i1) {
+ if (i2==i1) {
fp1= ((float *)kb->data) + i1*3;
fp1[0] = -fp1[0];
tag_elem[i1]= 1;
}
- else if(i2 != -1) {
- if(tag_elem[i1]==0 && tag_elem[i2]==0) {
+ else if (i2 != -1) {
+ if (tag_elem[i1]==0 && tag_elem[i2]==0) {
fp1= ((float *)kb->data) + i1*3;
fp2= ((float *)kb->data) + i2*3;
@@ -224,17 +224,17 @@ static int object_shape_key_mirror(bContext *C, Object *ob)
/* half but found up odd value */
const int pntsu_half = (lt->pntsu / 2) + (lt->pntsu % 2);
- /* currently editmode isnt supported by mesh so
+ /* currently editmode isn't supported by mesh so
* ignore here for now too */
- /* if(lt->editlatt) lt= lt->editlatt->latt; */
+ /* if (lt->editlatt) lt= lt->editlatt->latt; */
- for(w=0; w<lt->pntsw; w++) {
- for(v=0; v<lt->pntsv; v++) {
- for(u=0; u<pntsu_half; u++) {
+ for (w=0; w<lt->pntsw; w++) {
+ for (v=0; v<lt->pntsv; v++) {
+ for (u=0; u<pntsu_half; u++) {
int u_inv= (lt->pntsu - 1) - u;
float tvec[3];
- if(u == u_inv) {
+ if (u == u_inv) {
i1= LT_INDEX(lt, u, v, w);
fp1= ((float *)kb->data) + i1*3;
fp1[0]= -fp1[0];
@@ -296,16 +296,16 @@ static int shape_key_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_shape_key_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Shape Key";
- ot->idname= "OBJECT_OT_shape_key_add";
- ot->description= "Add shape key to the object";
+ ot->name = "Add Shape Key";
+ ot->idname = "OBJECT_OT_shape_key_add";
+ ot->description = "Add shape key to the object";
/* api callbacks */
- ot->poll= shape_key_mode_poll;
- ot->exec= shape_key_add_exec;
+ ot->poll = shape_key_mode_poll;
+ ot->exec = shape_key_add_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "from_mix", 1, "From Mix", "Create the new shape key from the existing mix of keys");
@@ -315,7 +315,7 @@ static int shape_key_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= ED_object_context(C);
- if(!ED_object_shape_key_remove(C, ob))
+ if (!ED_object_shape_key_remove(C, ob))
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
@@ -324,16 +324,16 @@ static int shape_key_remove_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_shape_key_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Shape Key";
- ot->idname= "OBJECT_OT_shape_key_remove";
- ot->description= "Remove shape key from the object";
+ ot->name = "Remove Shape Key";
+ ot->idname = "OBJECT_OT_shape_key_remove";
+ ot->description = "Remove shape key from the object";
/* api callbacks */
- ot->poll= shape_key_mode_poll;
- ot->exec= shape_key_remove_exec;
+ ot->poll = shape_key_mode_poll;
+ ot->exec = shape_key_remove_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int shape_key_clear_exec(bContext *C, wmOperator *UNUSED(op))
@@ -342,10 +342,10 @@ static int shape_key_clear_exec(bContext *C, wmOperator *UNUSED(op))
Key *key= ob_get_key(ob);
KeyBlock *kb= ob_get_keyblock(ob);
- if(!key || !kb)
+ if (!key || !kb)
return OPERATOR_CANCELLED;
- for(kb=key->block.first; kb; kb=kb->next)
+ for (kb=key->block.first; kb; kb=kb->next)
kb->curval= 0.0f;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -357,23 +357,23 @@ static int shape_key_clear_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_shape_key_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Shape Keys";
- ot->description= "Clear weights for all shape keys";
- ot->idname= "OBJECT_OT_shape_key_clear";
+ ot->name = "Clear Shape Keys";
+ ot->description = "Clear weights for all shape keys";
+ ot->idname = "OBJECT_OT_shape_key_clear";
/* api callbacks */
- ot->poll= shape_key_poll;
- ot->exec= shape_key_clear_exec;
+ ot->poll = shape_key_poll;
+ ot->exec = shape_key_clear_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int shape_key_mirror_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= ED_object_context(C);
- if(!object_shape_key_mirror(C, ob))
+ if (!object_shape_key_mirror(C, ob))
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
@@ -382,15 +382,15 @@ static int shape_key_mirror_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_shape_key_mirror(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mirror Shape Key";
- ot->idname= "OBJECT_OT_shape_key_mirror";
+ ot->name = "Mirror Shape Key";
+ ot->idname = "OBJECT_OT_shape_key_mirror";
/* api callbacks */
- ot->poll= shape_key_mode_poll;
- ot->exec= shape_key_mirror_exec;
+ ot->poll = shape_key_mode_poll;
+ ot->exec = shape_key_mirror_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -401,26 +401,26 @@ static int shape_key_move_exec(bContext *C, wmOperator *op)
int type= RNA_enum_get(op->ptr, "type");
Key *key= ob_get_key(ob);
- if(key) {
+ if (key) {
KeyBlock *kb, *kb_other;
int shapenr_act= ob->shapenr-1;
int shapenr_swap= shapenr_act + type;
kb= BLI_findlink(&key->block, shapenr_act);
- if((type==-1 && kb->prev==NULL) || (type==1 && kb->next==NULL)) {
+ if ((type==-1 && kb->prev==NULL) || (type==1 && kb->next==NULL)) {
return OPERATOR_CANCELLED;
}
- for(kb_other= key->block.first; kb_other; kb_other= kb_other->next) {
- if(kb_other->relative == shapenr_act) {
+ for (kb_other= key->block.first; kb_other; kb_other= kb_other->next) {
+ if (kb_other->relative == shapenr_act) {
kb_other->relative += type;
}
- else if(kb_other->relative == shapenr_swap) {
+ else if (kb_other->relative == shapenr_swap) {
kb_other->relative -= type;
}
}
- if(type==-1) {
+ if (type==-1) {
/* move back */
kb_other= kb->prev;
BLI_remlink(&key->block, kb);
@@ -451,15 +451,15 @@ void OBJECT_OT_shape_key_move(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Move Shape Key";
- ot->idname= "OBJECT_OT_shape_key_move";
+ ot->name = "Move Shape Key";
+ ot->idname = "OBJECT_OT_shape_key_move";
/* api callbacks */
- ot->poll= shape_key_mode_poll;
- ot->exec= shape_key_move_exec;
+ ot->poll = shape_key_mode_poll;
+ ot->exec = shape_key_move_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", slot_move, 0, "Type", "");
}
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index d66f16b0adb..8200bbef2ee 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -40,6 +40,7 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_group_types.h"
+#include "DNA_lattice_types.h"
#include "BLI_math.h"
#include "BLI_listbase.h"
@@ -259,16 +260,16 @@ static int object_location_clear_exec(bContext *C, wmOperator *op)
void OBJECT_OT_location_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Location";
+ ot->name = "Clear Location";
ot->description = "Clear the object's location";
- ot->idname= "OBJECT_OT_location_clear";
+ ot->idname = "OBJECT_OT_location_clear";
/* api callbacks */
- ot->exec= object_location_clear_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->exec = object_location_clear_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int object_rotation_clear_exec(bContext *C, wmOperator *op)
@@ -279,16 +280,16 @@ static int object_rotation_clear_exec(bContext *C, wmOperator *op)
void OBJECT_OT_rotation_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Rotation";
+ ot->name = "Clear Rotation";
ot->description = "Clear the object's rotation";
- ot->idname= "OBJECT_OT_rotation_clear";
+ ot->idname = "OBJECT_OT_rotation_clear";
/* api callbacks */
- ot->exec= object_rotation_clear_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->exec = object_rotation_clear_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int object_scale_clear_exec(bContext *C, wmOperator *op)
@@ -299,16 +300,16 @@ static int object_scale_clear_exec(bContext *C, wmOperator *op)
void OBJECT_OT_scale_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Scale";
+ ot->name = "Clear Scale";
ot->description = "Clear the object's scale";
- ot->idname= "OBJECT_OT_scale_clear";
+ ot->idname = "OBJECT_OT_scale_clear";
/* api callbacks */
- ot->exec= object_scale_clear_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->exec = object_scale_clear_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* --------------- */
@@ -345,16 +346,16 @@ static int object_origin_clear_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_origin_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Origin";
+ ot->name = "Clear Origin";
ot->description = "Clear the object's origin";
- ot->idname= "OBJECT_OT_origin_clear";
+ ot->idname = "OBJECT_OT_origin_clear";
/* api callbacks */
- ot->exec= object_origin_clear_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->exec = object_origin_clear_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/*************************** Apply Transformation ****************************/
@@ -367,8 +368,8 @@ static void ignore_parent_tx(Main *bmain, Scene *scene, Object *ob )
Object *ob_child;
/* 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) {
+ for (ob_child=bmain->object.first; ob_child; ob_child=ob_child->id.next) {
+ if (ob_child->parent == ob) {
object_apply_mat4(ob_child, ob_child->obmat, TRUE, FALSE);
what_does_parent(scene, ob_child, &workob);
invert_m4_m4(ob_child->parentinv, workob.obmat);
@@ -386,33 +387,39 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
/* first check if we can execute */
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob->type==OB_MESH) {
- if(ID_REAL_USERS(ob->data) > 1) {
+ if (ob->type==OB_MESH) {
+ if (ID_REAL_USERS(ob->data) > 1) {
BKE_report(reports, RPT_ERROR, "Can't apply to a multi user mesh, doing nothing");
return OPERATOR_CANCELLED;
}
}
- else if(ob->type==OB_ARMATURE) {
- if(ID_REAL_USERS(ob->data) > 1) {
+ else if (ob->type==OB_ARMATURE) {
+ if (ID_REAL_USERS(ob->data) > 1) {
BKE_report(reports, RPT_ERROR, "Can't apply to a multi user armature, doing nothing");
return OPERATOR_CANCELLED;
}
}
- else if(ELEM(ob->type, OB_CURVE, OB_SURF)) {
+ else if (ob->type == OB_LATTICE) {
+ if (ID_REAL_USERS(ob->data) > 1) {
+ BKE_report(reports, RPT_ERROR, "Can't apply to a multi user lattice, doing nothing");
+ return OPERATOR_CANCELLED;
+ }
+ }
+ else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
Curve *cu;
- if(ID_REAL_USERS(ob->data) > 1) {
+ if (ID_REAL_USERS(ob->data) > 1) {
BKE_report(reports, RPT_ERROR, "Can't apply to a multi user curve, doing nothing");
return OPERATOR_CANCELLED;
}
cu= ob->data;
- if(!(cu->flag & CU_3D) && (apply_rot || apply_loc)) {
+ if (!(cu->flag & CU_3D) && (apply_rot || apply_loc)) {
BKE_report(reports, RPT_ERROR, "Neither rotation nor location could be applied to a 2d curve, doing nothing");
return OPERATOR_CANCELLED;
}
- if(cu->key) {
+ if (cu->key) {
BKE_report(reports, RPT_ERROR, "Can't apply to a curve with vertex keys, doing nothing");
return OPERATOR_CANCELLED;
}
@@ -424,11 +431,11 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
/* calculate rotation/scale matrix */
- if(apply_scale && apply_rot)
+ if (apply_scale && apply_rot)
object_to_mat3(ob, rsmat);
- else if(apply_scale)
+ else if (apply_scale)
object_scale_to_mat3(ob, rsmat);
- else if(apply_rot) {
+ else if (apply_rot) {
float tmat[3][3], timat[3][3];
/* simple rotation matrix */
@@ -446,10 +453,10 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
copy_m4_m3(mat, rsmat);
/* calculate translation */
- if(apply_loc) {
+ if (apply_loc) {
copy_v3_v3(mat[3], ob->loc);
- if(!(apply_scale && apply_rot)) {
+ if (!(apply_scale && apply_rot)) {
/* correct for scale and rotation that is still applied */
object_to_mat3(ob, obmat);
invert_m3_m3(iobmat, obmat);
@@ -459,7 +466,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
}
/* apply to object data */
- if(ob->type==OB_MESH) {
+ if (ob->type==OB_MESH) {
Mesh *me= ob->data;
MVert *mvert;
@@ -467,16 +474,16 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
/* adjust data */
mvert= me->mvert;
- for(a=0; a<me->totvert; a++, mvert++)
+ for (a=0; a<me->totvert; a++, mvert++)
mul_m4_v3(mat, mvert->co);
- if(me->key) {
+ if (me->key) {
KeyBlock *kb;
- for(kb=me->key->block.first; kb; kb=kb->next) {
+ for (kb=me->key->block.first; kb; kb=kb->next) {
float *fp= kb->data;
- for(a=0; a<kb->totelem; a++, fp+=3)
+ for (a=0; a<kb->totelem; a++, fp+=3)
mul_m4_v3(mat, fp);
}
}
@@ -487,7 +494,17 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
else if (ob->type==OB_ARMATURE) {
ED_armature_apply_transform(ob, mat);
}
- else if(ELEM(ob->type, OB_CURVE, OB_SURF)) {
+ else if (ob->type == OB_LATTICE) {
+ Lattice *lt = ob->data;
+ BPoint *bp = lt->def;
+ int a = lt->pntsu * lt->pntsv * lt->pntsw;
+
+ while (a--) {
+ mul_m4_v3(mat, bp->vec);
+ bp++;
+ }
+ }
+ else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
Curve *cu= ob->data;
Nurb *nu;
@@ -496,10 +513,10 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
scale = mat3_to_scale(rsmat);
- for(nu=cu->nurb.first; nu; nu=nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu=cu->nurb.first; nu; nu=nu->next) {
+ if (nu->type == CU_BEZIER) {
a= nu->pntsu;
- for(bezt= nu->bezt; a--; bezt++) {
+ for (bezt= nu->bezt; a--; bezt++) {
mul_m4_v3(mat, bezt->vec[0]);
mul_m4_v3(mat, bezt->vec[1]);
mul_m4_v3(mat, bezt->vec[2]);
@@ -509,7 +526,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
}
else {
a= nu->pntsu*nu->pntsv;
- for(bp= nu->bp; a--; bp++)
+ for (bp= nu->bp; a--; bp++)
mul_m4_v3(mat, bp->vec);
}
}
@@ -517,18 +534,18 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
else
continue;
- if(apply_loc)
+ if (apply_loc)
zero_v3(ob->loc);
- if(apply_scale)
+ if (apply_scale)
ob->size[0]= ob->size[1]= ob->size[2]= 1.0f;
- if(apply_rot) {
+ if (apply_rot) {
zero_v3(ob->rot);
unit_qt(ob->quat);
unit_axis_angle(ob->rotAxis, &ob->rotAngle);
}
where_is_object(scene, ob);
- if(ob->type==OB_ARMATURE) {
+ if (ob->type==OB_ARMATURE) {
where_is_pose(scene, ob); /* needed for bone parents */
}
@@ -540,7 +557,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
}
CTX_DATA_END;
- if(!change)
+ if (!change)
return OPERATOR_CANCELLED;
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
@@ -564,7 +581,7 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
}
CTX_DATA_END;
- if(!change)
+ if (!change)
return OPERATOR_CANCELLED;
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
@@ -574,16 +591,16 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_visual_transform_apply(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Apply Visual Transform";
+ ot->name = "Apply Visual Transform";
ot->description = "Apply the object's visual transformation to its data";
- ot->idname= "OBJECT_OT_visual_transform_apply";
+ ot->idname = "OBJECT_OT_visual_transform_apply";
/* api callbacks */
- ot->exec= visual_transform_apply_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->exec = visual_transform_apply_exec;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int object_transform_apply_exec(bContext *C, wmOperator *op)
@@ -592,7 +609,7 @@ static int object_transform_apply_exec(bContext *C, wmOperator *op)
const int rot= RNA_boolean_get(op->ptr, "rotation");
const int sca= RNA_boolean_get(op->ptr, "scale");
- if(loc || rot || sca) {
+ if (loc || rot || sca) {
return apply_objects_internal(C, op->reports, loc, rot, sca);
}
else {
@@ -603,16 +620,16 @@ static int object_transform_apply_exec(bContext *C, wmOperator *op)
void OBJECT_OT_transform_apply(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Apply Object Transform";
+ ot->name = "Apply Object Transform";
ot->description = "Apply the object's transformation to its data";
- ot->idname= "OBJECT_OT_transform_apply";
+ ot->idname = "OBJECT_OT_transform_apply";
/* api callbacks */
- ot->exec= object_transform_apply_exec;
- ot->poll= ED_operator_objectmode;
+ ot->exec = object_transform_apply_exec;
+ ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "location", 0, "Location", "");
RNA_def_boolean(ot->srna, "rotation", 0, "Rotation", "");
@@ -645,32 +662,33 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
else {
- /* get the view settings if 'around' isnt set and the view is available */
+ /* get the view settings if 'around' isn't set and the view is available */
View3D *v3d= CTX_wm_view3d(C);
copy_v3_v3(cursor, give_cursor(scene, v3d));
- if(v3d && !RNA_struct_property_is_set(op->ptr, "center"))
+ if (v3d && !RNA_struct_property_is_set(op->ptr, "center"))
around= v3d->around;
}
zero_v3(cent);
- if(obedit) {
+ if (obedit) {
INIT_MINMAX(min, max);
- if(obedit->type==OB_MESH) {
+ if (obedit->type==OB_MESH) {
Mesh *me= obedit->data;
BMEditMesh *em = me->edit_btmesh;
BMVert *eve;
BMIter iter;
int total = 0;
- if(centermode == ORIGIN_TO_CURSOR) {
+ if (centermode == ORIGIN_TO_CURSOR) {
copy_v3_v3(cent, cursor);
invert_m4_m4(obedit->imat, obedit->obmat);
mul_m4_v3(obedit->imat, cent);
- } else {
+ }
+ else {
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
- if(around==V3D_CENTROID) {
+ if (around==V3D_CENTROID) {
total++;
add_v3_v3(cent, eve->co);
mul_v3_fl(cent, 1.0f/(float)total);
@@ -699,31 +717,31 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
for (tob= bmain->object.first; tob; tob= tob->id.next) {
- if(tob->data)
+ if (tob->data)
((ID *)tob->data)->flag &= ~LIB_DOIT;
- if(tob->dup_group)
+ if (tob->dup_group)
((ID *)tob->dup_group)->flag &= ~LIB_DOIT;
}
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if((ob->flag & OB_DONE)==0) {
+ if ((ob->flag & OB_DONE)==0) {
int do_inverse_offset = FALSE;
ob->flag |= OB_DONE;
- if(centermode == ORIGIN_TO_CURSOR) {
+ if (centermode == ORIGIN_TO_CURSOR) {
copy_v3_v3(cent, cursor);
invert_m4_m4(ob->imat, ob->obmat);
mul_m4_v3(ob->imat, cent);
}
- if(ob->data == NULL) {
+ if (ob->data == NULL) {
/* special support for dupligroups */
- if((ob->transflag & OB_DUPLIGROUP) && ob->dup_group && (ob->dup_group->id.flag & LIB_DOIT)==0) {
- if(ob->dup_group->id.lib) {
+ if ((ob->transflag & OB_DUPLIGROUP) && ob->dup_group && (ob->dup_group->id.flag & LIB_DOIT)==0) {
+ if (ob->dup_group->id.lib) {
tot_lib_error++;
}
else {
- if(centermode == ORIGIN_TO_CURSOR) { /* done */ }
+ if (centermode == ORIGIN_TO_CURSOR) { /* done */ }
else {
/* only bounds support */
INIT_MINMAX(min, max);
@@ -745,11 +763,11 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
tot_lib_error++;
}
- if(obedit==NULL && ob->type==OB_MESH) {
+ if (obedit==NULL && ob->type==OB_MESH) {
Mesh *me= ob->data;
- if(centermode == ORIGIN_TO_CURSOR) { /* done */ }
- else if(around==V3D_CENTROID) { mesh_center_median(me, cent); }
+ if (centermode == ORIGIN_TO_CURSOR) { /* done */ }
+ else if (around==V3D_CENTROID) { mesh_center_median(me, cent); }
else { mesh_center_bounds(me, cent); }
negate_v3_v3(cent_neg, cent);
@@ -762,12 +780,12 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
Curve *cu= ob->data;
- if(centermode == ORIGIN_TO_CURSOR) { /* done */ }
- else if(around==V3D_CENTROID) { curve_center_median(cu, cent); }
+ if (centermode == ORIGIN_TO_CURSOR) { /* done */ }
+ else if (around==V3D_CENTROID) { curve_center_median(cu, cent); }
else { curve_center_bounds(cu, cent); }
/* don't allow Z change if curve is 2D */
- if((ob->type == OB_CURVE) && !(cu->flag & CU_3D))
+ if ((ob->type == OB_CURVE) && !(cu->flag & CU_3D))
cent[2] = 0.0;
negate_v3_v3(cent_neg, cent);
@@ -777,23 +795,23 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
cu->id.flag |= LIB_DOIT;
do_inverse_offset= TRUE;
- if(obedit) {
+ if (obedit) {
if (centermode == GEOMETRY_TO_ORIGIN) {
DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
}
break;
}
}
- else if(ob->type==OB_FONT) {
+ else if (ob->type==OB_FONT) {
/* get from bb */
Curve *cu= ob->data;
- if(cu->bb==NULL && (centermode != ORIGIN_TO_CURSOR)) {
+ if (cu->bb==NULL && (centermode != ORIGIN_TO_CURSOR)) {
/* do nothing*/
}
else {
- if(centermode == ORIGIN_TO_CURSOR) {
+ if (centermode == ORIGIN_TO_CURSOR) {
/* done */
}
else {
@@ -811,10 +829,10 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
do_inverse_offset= TRUE;
}
}
- else if(ob->type==OB_ARMATURE) {
+ else if (ob->type==OB_ARMATURE) {
bArmature *arm = ob->data;
- if(ID_REAL_USERS(arm) > 1) {
+ if (ID_REAL_USERS(arm) > 1) {
#if 0
BKE_report(op->reports, RPT_ERROR, "Can't apply to a multi user armature");
return;
@@ -836,15 +854,15 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
ignore_parent_tx(bmain, scene, ob);
- if(obedit)
+ if (obedit)
break;
}
}
else if (ob->type == OB_MBALL) {
MetaBall *mb = ob->data;
- if(centermode == ORIGIN_TO_CURSOR) { /* done */ }
- else if(around==V3D_CENTROID) { BKE_metaball_center_median(mb, cent); }
+ if (centermode == ORIGIN_TO_CURSOR) { /* done */ }
+ else if (around==V3D_CENTROID) { BKE_metaball_center_median(mb, cent); }
else { BKE_metaball_center_bounds(mb, cent); }
negate_v3_v3(cent_neg, cent);
@@ -854,7 +872,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
mb->id.flag |= LIB_DOIT;
do_inverse_offset= TRUE;
- if(obedit) {
+ if (obedit) {
if (centermode == GEOMETRY_TO_ORIGIN) {
DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
}
@@ -863,7 +881,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
}
/* offset other selected objects */
- if(do_inverse_offset && (centermode != GEOMETRY_TO_ORIGIN)) {
+ if (do_inverse_offset && (centermode != GEOMETRY_TO_ORIGIN)) {
/* was the object data modified
* note: the functions above must set 'cent' */
copy_v3_v3(centn, cent);
@@ -871,7 +889,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
add_v3_v3(ob->loc, centn);
where_is_object(scene, ob);
- if(ob->type==OB_ARMATURE) {
+ if (ob->type==OB_ARMATURE) {
where_is_pose(scene, ob); /* needed for bone parents */
}
@@ -879,7 +897,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
/* other users? */
CTX_DATA_BEGIN(C, Object*, ob_other, selected_editable_objects) {
- if( (ob_other->flag & OB_DONE)==0 &&
+ if ( (ob_other->flag & OB_DONE)==0 &&
( (ob->data && (ob->data == ob_other->data)) ||
(ob->dup_group==ob_other->dup_group && (ob->transflag|ob_other->transflag) & OB_DUPLIGROUP) )
) {
@@ -891,7 +909,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
add_v3_v3(ob_other->loc, centn);
where_is_object(scene, ob_other);
- if(ob_other->type==OB_ARMATURE) {
+ if (ob_other->type==OB_ARMATURE) {
where_is_pose(scene, ob_other); /* needed for bone parents */
}
ignore_parent_tx(bmain, scene, ob_other);
@@ -904,7 +922,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
for (tob= bmain->object.first; tob; tob= tob->id.next)
- if(tob->data && (((ID *)tob->data)->flag & LIB_DOIT))
+ if (tob->data && (((ID *)tob->data)->flag & LIB_DOIT))
DAG_id_tag_update(&tob->id, OB_RECALC_OB|OB_RECALC_DATA);
if (tot_change) {
@@ -940,20 +958,20 @@ void OBJECT_OT_origin_set(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Set Origin";
+ ot->name = "Set Origin";
ot->description = "Set the object's origin, by either moving the data, or set to center of data, or use 3d cursor";
- ot->idname= "OBJECT_OT_origin_set";
+ ot->idname = "OBJECT_OT_origin_set";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_origin_set_exec;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = object_origin_set_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
- ot->prop= RNA_def_enum(ot->srna, "type", prop_set_center_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_set_center_types, 0, "Type", "");
RNA_def_enum(ot->srna, "center", prop_set_bounds_types, V3D_CENTROID, "Center", "");
}
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 7328cbb2e7a..cc8f91e4558 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -91,9 +91,9 @@ static Lattice *vgroup_edit_lattice(Object *ob)
int ED_vgroup_object_is_edit_mode(Object *ob)
{
- if(ob->type == OB_MESH)
+ if (ob->type == OB_MESH)
return (BMEdit_FromObject(ob) != NULL);
- else if(ob->type == OB_LATTICE)
+ else if (ob->type == OB_LATTICE)
return (((Lattice*)ob->data)->editlatt != NULL);
return 0;
@@ -103,7 +103,7 @@ bDeformGroup *ED_vgroup_add_name(Object *ob, const char *name)
{
bDeformGroup *defgroup;
- if(!ob || !OB_TYPE_SUPPORT_VGROUP(ob->type))
+ if (!ob || !OB_TYPE_SUPPORT_VGROUP(ob->type))
return NULL;
defgroup = MEM_callocN(sizeof(bDeformGroup), "add deformGroup");
@@ -136,7 +136,7 @@ void ED_vgroup_delete(Object *ob, bDeformGroup *defgroup)
if (dg == NULL)
return;
- if(ED_vgroup_object_is_edit_mode(ob))
+ if (ED_vgroup_object_is_edit_mode(ob))
vgroup_delete_edit_mode(ob, dg);
else
vgroup_delete_object_mode(ob, dg);
@@ -150,7 +150,7 @@ void ED_vgroup_clear(Object *ob)
while (dg) {
bDeformGroup *next_dg= dg->next;
- if(edit_mode)
+ if (edit_mode)
vgroup_delete_edit_mode(ob, dg);
else
vgroup_delete_object_mode(ob, dg);
@@ -163,12 +163,12 @@ int ED_vgroup_data_create(ID *id)
{
/* create deform verts */
- if(GS(id->name)==ID_ME) {
+ if (GS(id->name)==ID_ME) {
Mesh *me= (Mesh *)id;
me->dvert= CustomData_add_layer(&me->vdata, CD_MDEFORMVERT, CD_CALLOC, NULL, me->totvert);
return TRUE;
}
- else if(GS(id->name)==ID_LT) {
+ else if (GS(id->name)==ID_LT) {
Lattice *lt= (Lattice *)id;
lt->dvert= MEM_callocN(sizeof(MDeformVert)*lt->pntsu*lt->pntsv*lt->pntsw, "lattice deformVert");
return TRUE;
@@ -183,13 +183,13 @@ static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_to
*dvert_tot = 0;
*dvert_arr = NULL;
- if(id) {
+ if (id) {
switch(GS(id->name)) {
case ID_ME:
{
Mesh *me = (Mesh *)id;
- if(me->edit_btmesh) {
+ if (me->edit_btmesh) {
BMEditMesh *em = me->edit_btmesh;
BMIter iter;
BMVert *eve;
@@ -221,7 +221,7 @@ static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_to
return 1;
}
- else if(me->dvert) {
+ else if (me->dvert) {
MVert *mvert= me->mvert;
MDeformVert *dvert= me->dvert;
int i;
@@ -254,7 +254,7 @@ static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_to
Lattice *lt= (Lattice *)id;
lt= (lt->editlatt)? lt->editlatt->latt: lt;
- if(lt->dvert) {
+ if (lt->dvert) {
BPoint *def= lt->def;
*dvert_tot= lt->pntsu*lt->pntsv*lt->pntsw;
*dvert_arr= MEM_mallocN(sizeof(void*)*(*dvert_tot), "vgroup parray from me");
@@ -286,7 +286,7 @@ static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_to
/* returns true if the id type supports weights */
int ED_vgroup_give_array(ID *id, MDeformVert **dvert_arr, int *dvert_tot)
{
- if(id) {
+ if (id) {
switch(GS(id->name)) {
case ID_ME:
{
@@ -326,16 +326,16 @@ int ED_vgroup_copy_array(Object *ob, Object *ob_from)
ED_vgroup_give_parray(ob_from->data, &dvert_array_from, &dvert_tot_from, FALSE);
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, FALSE);
- if((dvert_array == NULL) && (dvert_array_from != NULL) && ED_vgroup_data_create(ob->data)) {
+ if ((dvert_array == NULL) && (dvert_array_from != NULL) && ED_vgroup_data_create(ob->data)) {
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, FALSE);
new_vgroup= TRUE;
}
- if(ob==ob_from || dvert_tot==0 || (dvert_tot != dvert_tot_from) || dvert_array_from==NULL || dvert_array==NULL) {
+ if (ob==ob_from || dvert_tot==0 || (dvert_tot != dvert_tot_from) || dvert_array_from==NULL || dvert_array==NULL) {
if (dvert_array) MEM_freeN(dvert_array);
if (dvert_array_from) MEM_freeN(dvert_array_from);
- if(new_vgroup == TRUE) {
+ if (new_vgroup == TRUE) {
/* free the newly added vgroup since it wasn't compatible */
vgroup_delete_all(ob);
}
@@ -347,11 +347,11 @@ int ED_vgroup_copy_array(Object *ob, Object *ob_from)
BLI_duplicatelist(&ob->defbase, &ob_from->defbase);
ob->actdef= ob_from->actdef;
- if(defbase_tot_from < defbase_tot) {
+ if (defbase_tot_from < defbase_tot) {
/* correct vgroup indices because the number of vgroups is being reduced. */
int *remap= MEM_mallocN(sizeof(int) * (defbase_tot + 1), __func__);
- for(i=0; i<=defbase_tot_from; i++) remap[i]= i;
- for(; i<=defbase_tot; i++) remap[i]= 0; /* can't use these, so disable */
+ for (i=0; i<=defbase_tot_from; i++) remap[i]= i;
+ for (; i<=defbase_tot; i++) remap[i]= 0; /* can't use these, so disable */
vgroup_remap_update_users(ob, remap);
MEM_freeN(remap);
@@ -360,13 +360,13 @@ int ED_vgroup_copy_array(Object *ob, Object *ob_from)
dvf= dvert_array_from;
dv= dvert_array;
- for(i=0; i<dvert_tot; i++, dvf++, dv++) {
- if((*dv)->dw)
+ for (i=0; i<dvert_tot; i++, dvf++, dv++) {
+ if ((*dv)->dw)
MEM_freeN((*dv)->dw);
*(*dv)= *(*dvf);
- if((*dv)->dw)
+ if ((*dv)->dw)
(*dv)->dw= MEM_dupallocN((*dv)->dw);
}
@@ -392,7 +392,7 @@ static void ED_vgroup_nr_vert_add(Object *ob,
/* get the vert */
ED_vgroup_give_array(ob->data, &dvert, &tot);
- if(dvert==NULL)
+ if (dvert==NULL)
return;
/* check that vertnum is valid before trying to get the relevant dvert */
@@ -418,7 +418,7 @@ static void ED_vgroup_nr_vert_add(Object *ob,
break;
case WEIGHT_ADD:
dw->weight += weight;
- if(dw->weight >= 1.0f)
+ if (dw->weight >= 1.0f)
dw->weight = 1.0f;
break;
case WEIGHT_SUBTRACT:
@@ -426,7 +426,7 @@ static void ED_vgroup_nr_vert_add(Object *ob,
/* if the weight is zero or less then
* remove the vert from the deform group
*/
- if(dw->weight <= 0.0f) {
+ if (dw->weight <= 0.0f) {
defvert_remove_group(dv, dw);
}
break;
@@ -471,11 +471,11 @@ void ED_vgroup_vert_add(Object *ob, bDeformGroup *dg, int vertnum, float weight,
/* get the deform group number, exit if
* it can't be found
*/
- if(def_nr < 0) return;
+ if (def_nr < 0) return;
/* if there's no deform verts then create some,
*/
- if(ED_vgroup_give_array(ob->data, &dv, &tot) && dv==NULL)
+ if (ED_vgroup_give_array(ob->data, &dv, &tot) && dv==NULL)
ED_vgroup_data_create(ob->data);
/* call another function to do the work
@@ -493,7 +493,7 @@ void ED_vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
/* TODO, this is slow in a loop, better pass def_nr directly, but leave for later... - campbell */
const int def_nr= BLI_findindex(&ob->defbase, dg);
- if(def_nr != -1) {
+ if (def_nr != -1) {
MDeformVert *dvert= NULL;
int tot;
@@ -502,7 +502,7 @@ void ED_vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
*/
ED_vgroup_give_array(ob->data, &dvert, &tot);
- if(dvert) {
+ if (dvert) {
MDeformVert *dv= &dvert[vertnum];
MDeformWeight *dw;
@@ -519,28 +519,28 @@ static float get_vert_def_nr(Object *ob, const int def_nr, const int vertnum)
Mesh *me;
/* get the deform vertices corresponding to the vertnum */
- if(ob->type==OB_MESH) {
+ if (ob->type==OB_MESH) {
me= ob->data;
- if(me->edit_btmesh) {
+ if (me->edit_btmesh) {
eve= BM_vert_at_index(me->edit_btmesh->bm, vertnum);
- if(!eve) {
+ if (!eve) {
return 0.0f;
}
dv= CustomData_bmesh_get(&me->edit_btmesh->bm->vdata, eve->head.data, CD_MDEFORMVERT);
}
else {
- if(vertnum >= me->totvert) {
+ if (vertnum >= me->totvert) {
return 0.0f;
}
dv = &me->dvert[vertnum];
}
}
- else if(ob->type==OB_LATTICE) {
+ else if (ob->type==OB_LATTICE) {
Lattice *lt= vgroup_edit_lattice(ob);
- if(lt->dvert) {
- if(vertnum >= lt->pntsu*lt->pntsv*lt->pntsw) {
+ if (lt->dvert) {
+ if (vertnum >= lt->pntsu*lt->pntsv*lt->pntsw) {
return 0.0f;
}
dv = &lt->dvert[vertnum];
@@ -561,7 +561,7 @@ float ED_vgroup_vert_weight(Object *ob, bDeformGroup *dg, int vertnum)
{
const int def_nr= BLI_findindex(&ob->defbase, dg);
- if(def_nr == -1) {
+ if (def_nr == -1) {
return -1;
}
@@ -585,7 +585,7 @@ static void vgroup_select_verts(Object *ob, int select)
return;
}
- if(ob->type == OB_MESH) {
+ if (ob->type == OB_MESH) {
Mesh *me= ob->data;
if (me->edit_btmesh) {
@@ -603,7 +603,7 @@ static void vgroup_select_verts(Object *ob, int select)
}
/* this has to be called, because this function operates on vertices only */
- if(select) EDBM_select_flush(em); // vertices to edges/faces
+ if (select) EDBM_select_flush(em); // vertices to edges/faces
else EDBM_deselect_flush(em);
}
else {
@@ -628,17 +628,17 @@ static void vgroup_select_verts(Object *ob, int select)
}
}
}
- else if(ob->type == OB_LATTICE) {
+ else if (ob->type == OB_LATTICE) {
Lattice *lt= vgroup_edit_lattice(ob);
- if(lt->dvert) {
+ if (lt->dvert) {
BPoint *bp;
int a, tot;
dv= lt->dvert;
tot= lt->pntsu*lt->pntsv*lt->pntsw;
- for(a=0, bp= lt->def; a<tot; a++, bp++, dv++) {
+ for (a=0, bp= lt->def; a<tot; a++, bp++, dv++) {
if (defvert_find_index(dv, def_nr)) {
if (select) bp->f1 |= SELECT;
else bp->f1 &= ~SELECT;
@@ -657,10 +657,10 @@ static void vgroup_duplicate(Object *ob)
int i, idg, icdg, dvert_tot=0;
dg = BLI_findlink(&ob->defbase, (ob->actdef-1));
- if(!dg)
+ if (!dg)
return;
- if(!strstr(dg->name, "_copy")) {
+ if (!strstr(dg->name, "_copy")) {
BLI_snprintf(name, sizeof(name), "%s_copy", dg->name);
}
else {
@@ -681,10 +681,10 @@ static void vgroup_duplicate(Object *ob)
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, FALSE);
if (dvert_array) {
- for(i = 0; i < dvert_tot; i++) {
+ for (i = 0; i < dvert_tot; i++) {
MDeformVert *dv= dvert_array[i];
dw_org = defvert_find_index(dv, idg);
- if(dw_org) {
+ if (dw_org) {
/* defvert_verify_index re-allocs org so need to store the weight first */
dw_cpy = defvert_verify_index(dv, icdg);
dw_cpy->weight = dw_org->weight;
@@ -713,7 +713,7 @@ static void vgroup_normalize(Object *ob)
if (dvert_array) {
float weight_max = 0.0f;
- for(i = 0; i < dvert_tot; i++) {
+ for (i = 0; i < dvert_tot; i++) {
/* in case its not selected */
if (!(dv = dvert_array[i])) {
@@ -721,13 +721,13 @@ static void vgroup_normalize(Object *ob)
}
dw = defvert_find_index(dv, def_nr);
- if(dw) {
+ if (dw) {
weight_max = MAX2(dw->weight, weight_max);
}
}
- if(weight_max > 0.0f) {
- for(i = 0; i < dvert_tot; i++) {
+ if (weight_max > 0.0f) {
+ for (i = 0; i < dvert_tot; i++) {
/* in case its not selected */
if (!(dv = dvert_array[i])) {
@@ -735,7 +735,7 @@ static void vgroup_normalize(Object *ob)
}
dw = defvert_find_index(dv, def_nr);
- if(dw) {
+ if (dw) {
dw->weight /= weight_max;
/* in case of division errors with very low weights */
@@ -762,21 +762,21 @@ static int* getSurroundingVerts(Mesh *me, int vert, int *count)
BLI_array_declare(verts);
BLI_array_reserve(verts, 8);
- while(i--) {
+ while (i--) {
int j = mp->totloop;
int first_l = mp->totloop - 1;
MLoop *ml = &me->mloop[mp->loopstart];
- while(j--) {
+ while (j--) {
/* XXX This assume a vert can only be once in a poly, even though
* it seems logical to me, not totally sure of that. */
if (ml->v == vert) {
int a, b, k;
- if(j == first_l) {
+ if (j == first_l) {
/* We are on the first corner. */
a = ml[1].v;
b = ml[j].v;
}
- else if(!j) {
+ else if (!j) {
/* We are on the last corner. */
a = (ml-1)->v;
b = me->mloop[mp->loopstart].v;
@@ -789,15 +789,15 @@ static int* getSurroundingVerts(Mesh *me, int vert, int *count)
/* Append a and b verts to array, if not yet present. */
k = BLI_array_count(verts);
/* XXX Maybe a == b is enough? */
- while(k-- && !(a == b && a == -1)) {
- if(verts[k] == a)
+ while (k-- && !(a == b && a == -1)) {
+ if (verts[k] == a)
a = -1;
- else if(verts[k] == b)
+ else if (verts[k] == b)
b = -1;
}
- if(a != -1)
+ if (a != -1)
BLI_array_append(verts, a);
- if(b != -1)
+ if (b != -1)
BLI_array_append(verts, b);
/* Vert found in this poly, we can go to next one! */
@@ -820,7 +820,7 @@ static void getSingleCoordinate(MVert *points, int count, float coord[3])
{
int i;
zero_v3(coord);
- for(i = 0; i < count; i++) {
+ for (i = 0; i < count; i++) {
add_v3_v3(coord, points[i].co);
}
mul_v3_fl(coord, 1.0f/count);
@@ -853,12 +853,12 @@ static void getVerticalAndHorizontalChange(const float norm[3], float d, const f
// I need the derived mesh to be forgotten so the positions are recalculated with weight changes (see dm_deform_recalc)
static void dm_deform_clear(DerivedMesh *dm, Object *ob)
{
- if(ob->derivedDeform && (ob->derivedDeform)==dm) {
+ if (ob->derivedDeform && (ob->derivedDeform)==dm) {
ob->derivedDeform->needsFree = 1;
ob->derivedDeform->release(ob->derivedDeform);
ob->derivedDeform = NULL;
}
- else if(dm) {
+ else if (dm) {
dm->needsFree = 1;
dm->release(dm);
}
@@ -911,56 +911,59 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
copy_v3_v3(oldPos, m.co);
distToStart = dot_v3v3(norm, oldPos) + d;
- if(distToBe == originalDistToBe) {
+ if (distToBe == originalDistToBe) {
distToBe += distToStart - distToStart*strength;
}
- for(i = 0; i < totweight; i++) {
+ for (i = 0; i < totweight; i++) {
dwIndices[i] = i;
dw = (dvert->dw+i);
vc = hc = 0;
- if(!dw->weight) {
+ if (!dw->weight) {
changes[i][0] = 0;
changes[i][1] = 0;
dists[i] = distToStart;
continue;
}
- for(k = 0; k < 2; k++) {
- if(dm) {
+ for (k = 0; k < 2; k++) {
+ if (dm) {
dm_deform_clear(dm, ob); dm = NULL;
}
oldw = dw->weight;
- if(k) {
+ if (k) {
dw->weight *= 1+cp;
- } else {
+ }
+ else {
dw->weight /= 1+cp;
}
- if(dw->weight == oldw) {
+ if (dw->weight == oldw) {
changes[i][0] = 0;
changes[i][1] = 0;
dists[i] = distToStart;
break;
}
- if(dw->weight > 1) {
+ if (dw->weight > 1) {
dw->weight = 1;
}
dm = dm_deform_recalc(scene, ob);
dm->getVert(dm, index, &m);
getVerticalAndHorizontalChange(norm, d, coord, oldPos, distToStart, m.co, changes, dists, i);
dw->weight = oldw;
- if(!k) {
+ if (!k) {
vc = changes[i][0];
hc = changes[i][1];
dist = dists[i];
- } else {
- if(fabs(dist - distToBe) < fabs(dists[i] - distToBe)) {
+ }
+ else {
+ if (fabs(dist - distToBe) < fabs(dists[i] - distToBe)) {
upDown[i] = 0;
changes[i][0] = vc;
changes[i][1] = hc;
dists[i] = dist;
- } else {
+ }
+ else {
upDown[i] = 1;
}
- if(fabs(dists[i] - distToBe) > fabs(distToStart - distToBe)) {
+ if (fabs(dists[i] - distToBe) > fabs(distToStart - distToBe)) {
changes[i][0] = 0;
changes[i][1] = 0;
dists[i] = distToStart;
@@ -969,19 +972,19 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
}
}
// sort the changes by the vertical change
- for(k = 0; k < totweight; k++) {
+ for (k = 0; k < totweight; k++) {
float tf;
int ti;
bestIndex = k;
- for(i = k+1; i < totweight; i++) {
+ for (i = k+1; i < totweight; i++) {
dist = dists[i];
- if(fabs(dist) > fabs(dists[i])) {
+ if (fabs(dist) > fabs(dists[i])) {
bestIndex = i;
}
}
// switch with k
- if(bestIndex != k) {
+ if (bestIndex != k) {
ti = upDown[k];
upDown[k] = upDown[bestIndex];
upDown[bestIndex] = ti;
@@ -1005,18 +1008,18 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
}
bestIndex = -1;
// find the best change with an acceptable horizontal change
- for(i = 0; i < totweight; i++) {
- if(fabs(changes[i][0]) > fabs(changes[i][1]*2.0f)) {
+ for (i = 0; i < totweight; i++) {
+ if (fabs(changes[i][0]) > fabs(changes[i][1]*2.0f)) {
bestIndex = i;
break;
}
}
- if(bestIndex != -1) {
+ if (bestIndex != -1) {
wasChange = TRUE;
// it is a good place to stop if it tries to move the opposite direction
// (relative to the plane) of last time
- if(lastIndex != -1) {
- if(wasUp != upDown[bestIndex]) {
+ if (lastIndex != -1) {
+ if (wasUp != upDown[bestIndex]) {
wasChange = FALSE;
}
}
@@ -1024,22 +1027,23 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
wasUp = upDown[bestIndex];
dw = (dvert->dw+dwIndices[bestIndex]);
oldw = dw->weight;
- if(upDown[bestIndex]) {
+ if (upDown[bestIndex]) {
dw->weight *= 1+cp;
- } else {
+ }
+ else {
dw->weight /= 1+cp;
}
- if(dw->weight > 1) {
+ if (dw->weight > 1) {
dw->weight = 1;
}
- if(oldw == dw->weight) {
+ if (oldw == dw->weight) {
wasChange = FALSE;
}
- if(dm) {
+ if (dm) {
dm_deform_clear(dm, ob); dm = NULL;
}
}
- } while(wasChange && (distToStart-distToBe)/fabsf(distToStart-distToBe) ==
+ } while (wasChange && (distToStart-distToBe)/fabsf(distToStart-distToBe) ==
(dists[bestIndex]-distToBe)/fabsf(dists[bestIndex]-distToBe));
MEM_freeN(upDown);
MEM_freeN(changes);
@@ -1056,24 +1060,24 @@ static void vgroup_fix(Scene *scene, Object *ob, float distToBe, float strength,
Mesh *me = ob->data;
MVert *mvert = me->mvert;
int *verts = NULL;
- if(!(me->editflag & ME_EDIT_VERT_SEL))
+ if (!(me->editflag & ME_EDIT_VERT_SEL))
return;
- for(i = 0; i < me->totvert && mvert; i++, mvert++) {
- if(mvert->flag & SELECT) {
+ for (i = 0; i < me->totvert && mvert; i++, mvert++) {
+ if (mvert->flag & SELECT) {
int count=0;
- if((verts = getSurroundingVerts(me, i, &count))) {
+ if ((verts = getSurroundingVerts(me, i, &count))) {
MVert m;
MVert *p = MEM_callocN(sizeof(MVert)*(count), "deformedPoints");
int k;
DerivedMesh *dm = mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
k = count;
- while(k--) {
+ while (k--) {
dm->getVert(dm, verts[k], &m);
p[k] = m;
}
- if(count >= 3) {
+ if (count >= 3) {
float d /*, dist */ /* UNUSED */, mag;
float coord[3];
float norm[3];
@@ -1081,7 +1085,7 @@ static void vgroup_fix(Scene *scene, Object *ob, float distToBe, float strength,
dm->getVert(dm, i, &m);
sub_v3_v3v3(norm, m.co, coord);
mag= normalize_v3(norm);
- if(mag) { /* zeros fix */
+ if (mag) { /* zeros fix */
d = -dot_v3v3(norm, coord);
/* dist = (dot_v3v3(norm, m.co) + d); */ /* UNUSED */
moveCloserToDistanceFromPlane(scene, ob, me, i, norm, coord, d, distToBe, strength, cp);
@@ -1111,7 +1115,7 @@ static void vgroup_levels(Object *ob, float offset, float gain)
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
if (dvert_array) {
- for(i = 0; i < dvert_tot; i++) {
+ for (i = 0; i < dvert_tot; i++) {
/* in case its not selected */
if (!(dv = dvert_array[i])) {
@@ -1119,7 +1123,7 @@ static void vgroup_levels(Object *ob, float offset, float gain)
}
dw = defvert_find_index(dv, def_nr);
- if(dw) {
+ if (dw) {
dw->weight = gain * (dw->weight + offset);
CLAMP(dw->weight, 0.0f, 1.0f);
@@ -1146,9 +1150,9 @@ static void vgroup_normalize_all(Object *ob, int lock_active)
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
if (dvert_array) {
- if(lock_active) {
+ if (lock_active) {
- for(i = 0; i < dvert_tot; i++) {
+ for (i = 0; i < dvert_tot; i++) {
/* in case its not selected */
if (!(dv = dvert_array[i])) {
continue;
@@ -1158,7 +1162,7 @@ static void vgroup_normalize_all(Object *ob, int lock_active)
}
}
else {
- for(i = 0; i < dvert_tot; i++) {
+ for (i = 0; i < dvert_tot; i++) {
/* in case its not selected */
if (!(dv = dvert_array[i])) {
@@ -1178,17 +1182,17 @@ static void vgroup_lock_all(Object *ob, int action)
{
bDeformGroup *dg;
- if(action == SEL_TOGGLE) {
+ if (action == SEL_TOGGLE) {
action= SEL_SELECT;
- for(dg= ob->defbase.first; dg; dg= dg->next) {
- if(dg->flag & DG_LOCK_WEIGHT) {
+ for (dg= ob->defbase.first; dg; dg= dg->next) {
+ if (dg->flag & DG_LOCK_WEIGHT) {
action= SEL_DESELECT;
break;
}
}
}
- for(dg= ob->defbase.first; dg; dg= dg->next) {
+ for (dg= ob->defbase.first; dg; dg= dg->next) {
switch(action) {
case SEL_SELECT:
dg->flag |= DG_LOCK_WEIGHT;
@@ -1218,7 +1222,7 @@ static void vgroup_invert(Object *ob, const short auto_assign, const short auto_
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot, use_vert_sel);
if (dvert_array) {
- for(i = 0; i < dvert_tot; i++) {
+ for (i = 0; i < dvert_tot; i++) {
/* in case its not selected */
if (!(dv = dvert_array[i])) {
@@ -1232,10 +1236,10 @@ static void vgroup_invert(Object *ob, const short auto_assign, const short auto_
dw= defvert_find_index(dv, def_nr);
}
- if(dw) {
+ if (dw) {
dw->weight = 1.0f - dw->weight;
- if(auto_remove && dw->weight <= 0.0f) {
+ if (auto_remove && dw->weight <= 0.0f) {
defvert_remove_group(dv, dw);
}
}
@@ -1280,9 +1284,9 @@ static void vgroup_blend(Object *ob)
sel1= BM_elem_flag_test(eed->v1, BM_ELEM_SELECT);
sel2= BM_elem_flag_test(eed->v2, BM_ELEM_SELECT);
- if(sel1 != sel2) {
+ if (sel1 != sel2) {
/* i1 is always the selected one */
- if(sel1==TRUE && sel2==FALSE) {
+ if (sel1==TRUE && sel2==FALSE) {
i1= BM_elem_index_get(eed->v1);
i2= BM_elem_index_get(eed->v2);
eve= eed->v2;
@@ -1308,7 +1312,7 @@ static void vgroup_blend(Object *ob)
dw = defvert_find_index(dvert, def_nr);
- if(dw) {
+ if (dw) {
vg_weights[i1] += dw->weight;
}
}
@@ -1316,9 +1320,9 @@ static void vgroup_blend(Object *ob)
i= 0;
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
- if(BM_elem_flag_test(eve, BM_ELEM_SELECT) && vg_users[i] > 0) {
+ if (BM_elem_flag_test(eve, BM_ELEM_SELECT) && vg_users[i] > 0) {
/* TODO, we may want object mode blending */
- if(em) dvert= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
+ if (em) dvert= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
else dvert= dvert_array+i;
dw= defvert_verify_index(dvert, def_nr);
@@ -1351,7 +1355,7 @@ static void vgroup_clean(Object *ob, const float epsilon, int keep_single)
if (dvert_array) {
/* only the active group */
- for(i = 0; i < dvert_tot; i++) {
+ for (i = 0; i < dvert_tot; i++) {
/* in case its not selected */
if (!(dv = dvert_array[i])) {
@@ -1362,7 +1366,7 @@ static void vgroup_clean(Object *ob, const float epsilon, int keep_single)
if (dw) {
if (dw->weight <= epsilon) {
- if(keep_single==FALSE || dv->totweight > 1) {
+ if (keep_single==FALSE || dv->totweight > 1) {
defvert_remove_group(dv, dw); /* dw can be NULL */
}
}
@@ -1385,7 +1389,7 @@ static void vgroup_clean_all(Object *ob, const float epsilon, const int keep_sin
MDeformVert *dv;
MDeformWeight *dw;
- for(i = 0; i < dvert_tot; i++) {
+ for (i = 0; i < dvert_tot; i++) {
int j;
/* in case its not selected */
@@ -1395,14 +1399,14 @@ static void vgroup_clean_all(Object *ob, const float epsilon, const int keep_sin
j= dv->totweight;
- while(j--) {
+ while (j--) {
- if(keep_single && dv->totweight == 1)
+ if (keep_single && dv->totweight == 1)
break;
dw= dv->dw + j;
- if(dw->weight <= epsilon) {
+ if (dw->weight <= epsilon) {
defvert_remove_group(dv, dw);
}
}
@@ -1421,9 +1425,9 @@ static void dvert_mirror_op(MDeformVert *dvert, MDeformVert *dvert_mirr,
{
BLI_assert(sel || sel_mirr);
- if(sel_mirr && sel) {
+ if (sel_mirr && sel) {
/* swap */
- if(mirror_weights) {
+ if (mirror_weights) {
if (all_vgroups) {
SWAP(MDeformVert, *dvert, *dvert_mirr);
}
@@ -1442,18 +1446,18 @@ static void dvert_mirror_op(MDeformVert *dvert, MDeformVert *dvert_mirr,
}
}
- if(flip_vgroups) {
+ if (flip_vgroups) {
defvert_flip(dvert, flip_map, flip_map_len);
defvert_flip(dvert_mirr, flip_map, flip_map_len);
}
}
else {
/* dvert should always be the target, only swaps pointer */
- if(sel_mirr) {
+ if (sel_mirr) {
SWAP(MDeformVert *, dvert, dvert_mirr);
}
- if(mirror_weights) {
+ if (mirror_weights) {
if (all_vgroups) {
defvert_copy(dvert, dvert_mirr);
}
@@ -1463,7 +1467,7 @@ static void dvert_mirror_op(MDeformVert *dvert, MDeformVert *dvert_mirr,
}
/* flip map already modified for 'all_vgroups' */
- if(flip_vgroups) {
+ if (flip_vgroups) {
defvert_flip(dvert, flip_map, flip_map_len);
}
}
@@ -1512,14 +1516,14 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
}
/* only the active group */
- if(ob->type == OB_MESH) {
+ if (ob->type == OB_MESH) {
Mesh *me= ob->data;
BMEditMesh *em = me->edit_btmesh;
if (em) {
BMIter iter;
- if(!CustomData_has_layer(&em->bm->vdata, CD_MDEFORMVERT)) {
+ if (!CustomData_has_layer(&em->bm->vdata, CD_MDEFORMVERT)) {
goto cleanup;
}
@@ -1527,14 +1531,14 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
/* Go through the list of editverts and assign them */
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
- if((eve_mirr= EDBM_GetMirrorVert(em, eve))) {
+ if ((eve_mirr= EDBM_GetMirrorVert(em, eve))) {
sel= BM_elem_flag_test(eve, BM_ELEM_SELECT);
sel_mirr= BM_elem_flag_test(eve_mirr, BM_ELEM_SELECT);
- if((sel || sel_mirr) && (eve != eve_mirr)) {
+ if ((sel || sel_mirr) && (eve != eve_mirr)) {
dvert= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
dvert_mirr= CustomData_bmesh_get(&em->bm->vdata, eve_mirr->head.data, CD_MDEFORMVERT);
- if(dvert && dvert_mirr) {
+ if (dvert && dvert_mirr) {
VGROUP_MIRR_OP;
}
}
@@ -1561,11 +1565,11 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
}
/* tag verts we have used */
- for(vidx= 0, mv= me->mvert; vidx < me->totvert; vidx++, mv++) {
+ for (vidx= 0, mv= me->mvert; vidx < me->totvert; vidx++, mv++) {
mv->flag &= ~ME_VERT_TMP_TAG;
}
- for(vidx= 0, mv= me->mvert; vidx < me->totvert; vidx++, mv++) {
+ for (vidx= 0, mv= me->mvert; vidx < me->totvert; vidx++, mv++) {
if ( ((mv->flag & ME_VERT_TMP_TAG) == 0) &&
((vidx_mirr= mesh_get_x_mirror_vert(ob, vidx)) != -1) &&
(vidx != vidx_mirr) &&
@@ -1597,7 +1601,7 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
int pntsu_half;
/* half but found up odd value */
- if(lt->pntsu == 1 || lt->dvert == NULL) {
+ if (lt->pntsu == 1 || lt->dvert == NULL) {
goto cleanup;
}
@@ -1606,11 +1610,11 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
* ok in this case */
pntsu_half= lt->pntsu / 2;
- for(w=0; w<lt->pntsw; w++) {
- for(v=0; v<lt->pntsv; v++) {
- for(u=0; u<pntsu_half; u++) {
+ for (w=0; w<lt->pntsw; w++) {
+ for (v=0; v<lt->pntsv; v++) {
+ for (u=0; u<pntsu_half; u++) {
int u_inv= (lt->pntsu - 1) - u;
- if(u != u_inv) {
+ if (u != u_inv) {
BPoint *bp, *bp_mirr;
i1= LT_INDEX(lt, u, v, w);
@@ -1622,7 +1626,7 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
sel= bp->f1 & SELECT;
sel_mirr= bp_mirr->f1 & SELECT;
- if(sel || sel_mirr) {
+ if (sel || sel_mirr) {
dvert= &lt->dvert[i1];
dvert_mirr= &lt->dvert[i2];
@@ -1653,19 +1657,19 @@ static void vgroup_remap_update_users(Object *ob, int *map)
/* these cases don't use names to refer to vertex groups, so when
* they get deleted the numbers get out of sync, this corrects that */
- if(ob->soft)
+ if (ob->soft)
ob->soft->vertgroup= map[ob->soft->vertgroup];
- for(md=ob->modifiers.first; md; md=md->next) {
- if(md->type == eModifierType_Explode) {
+ for (md=ob->modifiers.first; md; md=md->next) {
+ if (md->type == eModifierType_Explode) {
emd= (ExplodeModifierData*)md;
emd->vgroup= map[emd->vgroup];
}
- else if(md->type == eModifierType_Cloth) {
+ else if (md->type == eModifierType_Cloth) {
clmd= (ClothModifierData*)md;
clsim= clmd->sim_parms;
- if(clsim) {
+ if (clsim) {
clsim->vgroup_mass= map[clsim->vgroup_mass];
clsim->vgroup_bend= map[clsim->vgroup_bend];
clsim->vgroup_struct= map[clsim->vgroup_struct];
@@ -1673,8 +1677,8 @@ static void vgroup_remap_update_users(Object *ob, int *map)
}
}
- for(psys=ob->particlesystem.first; psys; psys=psys->next) {
- for(a=0; a<PSYS_TOT_VG; a++)
+ for (psys=ob->particlesystem.first; psys; psys=psys->next) {
+ for (a=0; a<PSYS_TOT_VG; a++)
psys->vgroup[a]= map[psys->vgroup[a]];
}
}
@@ -1686,8 +1690,8 @@ static void vgroup_delete_update_users(Object *ob, int id)
int *map= MEM_mallocN(sizeof(int) * defbase_tot, "vgroup del");
map[id]= map[0]= 0;
- for(i=1; i<id; i++) map[i]=i;
- for(i=id+1; i<defbase_tot; i++) map[i]=i-1;
+ for (i=1; i<id; i++) map[i]=i;
+ for (i=id+1; i<defbase_tot; i++) map[i]=i-1;
vgroup_remap_update_users(ob, map);
MEM_freeN(map);
@@ -1704,18 +1708,18 @@ static void vgroup_delete_object_mode(Object *ob, bDeformGroup *dg)
ED_vgroup_give_array(ob->data, &dvert_array, &dvert_tot);
- if(dvert_array) {
+ if (dvert_array) {
int i, j;
MDeformVert *dv;
- for(i= 0, dv= dvert_array; i < dvert_tot; i++, dv++) {
+ for (i= 0, dv= dvert_array; i < dvert_tot; i++, dv++) {
MDeformWeight *dw;
dw= defvert_find_index(dv, def_nr);
defvert_remove_group(dv, dw); /* dw can be NULL */
/* inline, make into a function if anything else needs to do this */
- for(j = 0; j < dv->totweight; j++) {
- if(dv->dw[j].def_nr > def_nr) {
+ for (j = 0; j < dv->totweight; j++) {
+ if (dv->dw[j].def_nr > def_nr) {
dv->dw[j].def_nr--;
}
}
@@ -1729,9 +1733,9 @@ static void vgroup_delete_object_mode(Object *ob, bDeformGroup *dg)
BLI_freelinkN(&ob->defbase, dg);
/* Update the active deform index if necessary */
- if(ob->actdef > def_nr)
+ if (ob->actdef > def_nr)
ob->actdef--;
- if(ob->actdef < 1 && ob->defbase.first)
+ if (ob->actdef < 1 && ob->defbase.first)
ob->actdef= 1;
}
@@ -1743,7 +1747,7 @@ static void vgroup_active_remove_verts(Object *ob, const int allverts, bDeformGr
MDeformVert *dv;
const int def_nr= BLI_findindex(&ob->defbase, dg);
- if(ob->type == OB_MESH) {
+ if (ob->type == OB_MESH) {
Mesh *me= ob->data;
if (me->edit_btmesh) {
@@ -1754,7 +1758,7 @@ static void vgroup_active_remove_verts(Object *ob, const int allverts, bDeformGr
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
dv= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
- if(dv && dv->dw && (allverts || BM_elem_flag_test(eve, BM_ELEM_SELECT))) {
+ if (dv && dv->dw && (allverts || BM_elem_flag_test(eve, BM_ELEM_SELECT))) {
MDeformWeight *dw = defvert_find_index(dv, def_nr);
defvert_remove_group(dv, dw); /* dw can be NULL */
}
@@ -1782,15 +1786,15 @@ static void vgroup_active_remove_verts(Object *ob, const int allverts, bDeformGr
}
}
}
- else if(ob->type == OB_LATTICE) {
+ else if (ob->type == OB_LATTICE) {
Lattice *lt= vgroup_edit_lattice(ob);
- if(lt->dvert) {
+ if (lt->dvert) {
BPoint *bp;
int i, tot= lt->pntsu*lt->pntsv*lt->pntsw;
- for(i=0, bp= lt->def; i<tot; i++, bp++) {
- if(allverts || (bp->f1 & SELECT)) {
+ for (i=0, bp= lt->def; i<tot; i++, bp++) {
+ if (allverts || (bp->f1 & SELECT)) {
MDeformWeight *dw;
dv= &lt->dvert[i];
@@ -1814,7 +1818,7 @@ static void vgroup_delete_edit_mode(Object *ob, bDeformGroup *dg)
vgroup_active_remove_verts(ob, TRUE, dg);
/* Make sure that any verts with higher indices are adjusted accordingly */
- if(ob->type==OB_MESH) {
+ if (ob->type==OB_MESH) {
Mesh *me= ob->data;
BMEditMesh *em = me->edit_btmesh;
BMIter iter;
@@ -1824,23 +1828,23 @@ static void vgroup_delete_edit_mode(Object *ob, bDeformGroup *dg)
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
dvert= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
- if(dvert)
- for(i=0; i<dvert->totweight; i++)
- if(dvert->dw[i].def_nr > dg_index)
+ if (dvert)
+ for (i=0; i<dvert->totweight; i++)
+ if (dvert->dw[i].def_nr > dg_index)
dvert->dw[i].def_nr--;
}
}
- else if(ob->type==OB_LATTICE) {
+ else if (ob->type==OB_LATTICE) {
Lattice *lt= vgroup_edit_lattice(ob);
BPoint *bp;
MDeformVert *dvert= lt->dvert;
int a, tot;
- if(dvert) {
+ if (dvert) {
tot= lt->pntsu*lt->pntsv*lt->pntsw;
- for(a=0, bp= lt->def; a<tot; a++, bp++, dvert++) {
- for(i=0; i<dvert->totweight; i++){
- if(dvert->dw[i].def_nr > dg_index)
+ for (a=0, bp= lt->def; a<tot; a++, bp++, dvert++) {
+ for (i=0; i<dvert->totweight; i++) {
+ if (dvert->dw[i].def_nr > dg_index)
dvert->dw[i].def_nr--;
}
}
@@ -1853,21 +1857,21 @@ static void vgroup_delete_edit_mode(Object *ob, bDeformGroup *dg)
BLI_freelinkN (&ob->defbase, dg);
/* Update the active deform index if necessary */
- if(ob->actdef > dg_index)
+ if (ob->actdef > dg_index)
ob->actdef--;
- if(ob->actdef < 1 && ob->defbase.first)
+ if (ob->actdef < 1 && ob->defbase.first)
ob->actdef= 1;
/* remove all dverts */
- if(ob->defbase.first == NULL) {
- if(ob->type==OB_MESH) {
+ if (ob->defbase.first == NULL) {
+ if (ob->type==OB_MESH) {
Mesh *me= ob->data;
CustomData_free_layer_active(&me->vdata, CD_MDEFORMVERT, me->totvert);
me->dvert= NULL;
}
- else if(ob->type==OB_LATTICE) {
+ else if (ob->type==OB_LATTICE) {
Lattice *lt= vgroup_edit_lattice(ob);
- if(lt->dvert) {
+ if (lt->dvert) {
MEM_freeN(lt->dvert);
lt->dvert= NULL;
}
@@ -1877,9 +1881,9 @@ static void vgroup_delete_edit_mode(Object *ob, bDeformGroup *dg)
static int vgroup_object_in_edit_mode(Object *ob)
{
- if(ob->type == OB_MESH)
+ if (ob->type == OB_MESH)
return (BMEdit_FromObject(ob) != NULL);
- else if(ob->type == OB_LATTICE)
+ else if (ob->type == OB_LATTICE)
return (((Lattice*)ob->data)->editlatt != NULL);
return 0;
@@ -1900,10 +1904,10 @@ static int vgroup_object_in_wpaint_vert_select(Object *ob)
static void vgroup_delete(Object *ob)
{
bDeformGroup *dg = BLI_findlink(&ob->defbase, ob->actdef-1);
- if(!dg)
+ if (!dg)
return;
- if(vgroup_object_in_edit_mode(ob))
+ if (vgroup_object_in_edit_mode(ob))
vgroup_delete_edit_mode(ob, dg);
else
vgroup_delete_object_mode(ob, dg);
@@ -1912,14 +1916,14 @@ static void vgroup_delete(Object *ob)
static void vgroup_delete_all(Object *ob)
{
/* Remove all DVerts */
- if(ob->type==OB_MESH) {
+ if (ob->type==OB_MESH) {
Mesh *me= ob->data;
CustomData_free_layer_active(&me->vdata, CD_MDEFORMVERT, me->totvert);
me->dvert= NULL;
}
- else if(ob->type==OB_LATTICE) {
+ else if (ob->type==OB_LATTICE) {
Lattice *lt= vgroup_edit_lattice(ob);
- if(lt->dvert) {
+ if (lt->dvert) {
MEM_freeN(lt->dvert);
lt->dvert= NULL;
}
@@ -1938,10 +1942,10 @@ static void vgroup_assign_verts(Object *ob, const float weight)
MDeformVert *dv;
const int def_nr= ob->actdef-1;
- if(!BLI_findlink(&ob->defbase, def_nr))
+ if (!BLI_findlink(&ob->defbase, def_nr))
return;
- if(ob->type == OB_MESH) {
+ if (ob->type == OB_MESH) {
Mesh *me= ob->data;
if (me->edit_btmesh) {
@@ -1949,7 +1953,7 @@ static void vgroup_assign_verts(Object *ob, const float weight)
BMIter iter;
BMVert *eve;
- if(!CustomData_has_layer(&em->bm->vdata, CD_MDEFORMVERT))
+ if (!CustomData_has_layer(&em->bm->vdata, CD_MDEFORMVERT))
BM_data_layer_add(em->bm, &em->bm->vdata, CD_MDEFORMVERT);
/* Go through the list of editverts and assign them */
@@ -1987,19 +1991,19 @@ static void vgroup_assign_verts(Object *ob, const float weight)
}
}
}
- else if(ob->type == OB_LATTICE) {
+ else if (ob->type == OB_LATTICE) {
Lattice *lt= vgroup_edit_lattice(ob);
BPoint *bp;
int a, tot;
- if(lt->dvert==NULL)
+ if (lt->dvert==NULL)
ED_vgroup_data_create(&lt->id);
dv= lt->dvert;
tot= lt->pntsu*lt->pntsv*lt->pntsw;
- for(a=0, bp= lt->def; a<tot; a++, bp++, dv++) {
- if(bp->f1 & SELECT) {
+ for (a=0, bp= lt->def; a<tot; a++, bp++, dv++) {
+ if (bp->f1 & SELECT) {
MDeformWeight *dw;
dw= defvert_verify_index(dv, def_nr);
@@ -2020,7 +2024,7 @@ static void vgroup_remove_verts(Object *ob, int allverts)
* active group index
*/
bDeformGroup *dg;
- for(dg= ob->defbase.first; dg; dg= dg->next) {
+ for (dg= ob->defbase.first; dg; dg= dg->next) {
vgroup_active_remove_verts(ob, allverts, dg);
}
}
@@ -2039,7 +2043,7 @@ static int vertex_group_poll_edit(bContext *C)
Object *ob= ED_object_context(C);
ID *data= (ob)? ob->data: NULL;
- if(!(ob && !ob->id.lib && data && !data->lib))
+ if (!(ob && !ob->id.lib && data && !data->lib))
return 0;
return vgroup_object_in_edit_mode(ob);
@@ -2051,7 +2055,7 @@ static int vertex_group_poll_edit_or_wpaint_vert_select(bContext *C)
Object *ob= ED_object_context(C);
ID *data= (ob)? ob->data: NULL;
- if(!(ob && !ob->id.lib && data && !data->lib))
+ if (!(ob && !ob->id.lib && data && !data->lib))
return 0;
return ( vgroup_object_in_edit_mode(ob) ||
@@ -2073,22 +2077,22 @@ static int vertex_group_add_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_vertex_group_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_add";
+ ot->name = "Add Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_add";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_add_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_add_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int vertex_group_remove_exec(bContext *C, wmOperator *op)
{
Object *ob= ED_object_context(C);
- if(RNA_boolean_get(op->ptr, "all"))
+ if (RNA_boolean_get(op->ptr, "all"))
vgroup_delete_all(ob);
else
vgroup_delete(ob);
@@ -2103,18 +2107,18 @@ static int vertex_group_remove_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_remove";
+ ot->name = "Remove Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_remove";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_remove_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_remove_exec;
/* flags */
/* redo operator will fail in this case because vertex groups aren't stored
* in local edit mode stack and toggling "all" property will lead to
* all groups deleted without way to restore them (see [#29527], sergey) */
- ot->flag= /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
+ ot->flag = /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups");
@@ -2125,7 +2129,7 @@ static int vertex_group_assign_exec(bContext *C, wmOperator *op)
ToolSettings *ts= CTX_data_tool_settings(C);
Object *ob= ED_object_context(C);
- if(RNA_boolean_get(op->ptr, "new"))
+ if (RNA_boolean_get(op->ptr, "new"))
ED_vgroup_add(ob);
vgroup_assign_verts(ob, ts->vgroup_weight);
@@ -2138,18 +2142,18 @@ static int vertex_group_assign_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Assign Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_assign";
+ ot->name = "Assign Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_assign";
/* api callbacks */
- ot->poll= vertex_group_poll_edit_or_wpaint_vert_select;
- ot->exec= vertex_group_assign_exec;
+ ot->poll = vertex_group_poll_edit_or_wpaint_vert_select;
+ ot->exec = vertex_group_assign_exec;
/* flags */
/* redo operator will fail in this case because vertex group assignment
* isn't stored in local edit mode stack and toggling "new" property will
* lead to creating plenty of new vertex groups (see [#29527], sergey) */
- ot->flag= /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
+ ot->flag = /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "new", 0, "New", "Assign vertex to new vertex group");
@@ -2159,12 +2163,12 @@ static int vertex_group_remove_from_exec(bContext *C, wmOperator *op)
{
Object *ob= ED_object_context(C);
- if(RNA_boolean_get(op->ptr, "all"))
+ if (RNA_boolean_get(op->ptr, "all"))
vgroup_remove_verts(ob, 0);
else {
bDeformGroup *dg= BLI_findlink(&ob->defbase, ob->actdef - 1);
- if(dg == NULL) {
+ if (dg == NULL) {
return OPERATOR_CANCELLED;
}
@@ -2180,18 +2184,18 @@ static int vertex_group_remove_from_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove from Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_remove_from";
+ ot->name = "Remove from Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_remove_from";
/* api callbacks */
- ot->poll= vertex_group_poll_edit_or_wpaint_vert_select;
- ot->exec= vertex_group_remove_from_exec;
+ ot->poll = vertex_group_poll_edit_or_wpaint_vert_select;
+ ot->exec = vertex_group_remove_from_exec;
/* flags */
/* redo operator will fail in this case because vertex groups assignment
* isn't stored in local edit mode stack and toggling "all" property will lead to
* removing vertices from all groups (see [#29527], sergey) */
- ot->flag= /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
+ ot->flag = /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups");
@@ -2201,7 +2205,7 @@ static int vertex_group_select_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= ED_object_context(C);
- if(!ob || ob->id.lib)
+ if (!ob || ob->id.lib)
return OPERATOR_CANCELLED;
vgroup_select_verts(ob, 1);
@@ -2213,15 +2217,15 @@ static int vertex_group_select_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_vertex_group_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_select";
+ ot->name = "Select Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_select";
/* api callbacks */
- ot->poll= vertex_group_poll_edit_or_wpaint_vert_select;
- ot->exec= vertex_group_select_exec;
+ ot->poll = vertex_group_poll_edit_or_wpaint_vert_select;
+ ot->exec = vertex_group_select_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int vertex_group_deselect_exec(bContext *C, wmOperator *UNUSED(op))
@@ -2237,15 +2241,15 @@ static int vertex_group_deselect_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_vertex_group_deselect(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Deselect Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_deselect";
+ ot->name = "Deselect Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_deselect";
/* api callbacks */
- ot->poll= vertex_group_poll_edit_or_wpaint_vert_select;
- ot->exec= vertex_group_deselect_exec;
+ ot->poll = vertex_group_poll_edit_or_wpaint_vert_select;
+ ot->exec = vertex_group_deselect_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int vertex_group_copy_exec(bContext *C, wmOperator *UNUSED(op))
@@ -2263,15 +2267,15 @@ static int vertex_group_copy_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_vertex_group_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_copy";
+ ot->name = "Copy Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_copy";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_copy_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_copy_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int vertex_group_levels_exec(bContext *C, wmOperator *op)
@@ -2293,15 +2297,15 @@ static int vertex_group_levels_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_levels(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Vertex Group Levels";
- ot->idname= "OBJECT_OT_vertex_group_levels";
+ ot->name = "Vertex Group Levels";
+ ot->idname = "OBJECT_OT_vertex_group_levels";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_levels_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_levels_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_float(ot->srna, "offset", 0.f, -1.0, 1.0, "Offset", "Value to add to weights", -1.0f, 1.f);
RNA_def_float(ot->srna, "gain", 1.f, 0.f, FLT_MAX, "Gain", "Value to multiply weights by", 0.0f, 10.f);
@@ -2323,15 +2327,15 @@ static int vertex_group_normalize_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_vertex_group_normalize(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Normalize Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_normalize";
+ ot->name = "Normalize Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_normalize";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_normalize_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_normalize_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int vertex_group_normalize_all_exec(bContext *C, wmOperator *op)
@@ -2351,15 +2355,15 @@ static int vertex_group_normalize_all_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Normalize All Vertex Groups";
- ot->idname= "OBJECT_OT_vertex_group_normalize_all";
+ ot->name = "Normalize All Vertex Groups";
+ ot->idname = "OBJECT_OT_vertex_group_normalize_all";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_normalize_all_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_normalize_all_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "lock_active", TRUE, "Lock Active",
"Keep the values of the active group while normalizing others");
@@ -2375,14 +2379,14 @@ static int vertex_group_fix_exec(bContext *C, wmOperator *op)
float cp= RNA_float_get(op->ptr, "accuracy");
ModifierData *md= ob->modifiers.first;
- while(md) {
- if(md->type == eModifierType_Mirror && (md->mode&eModifierMode_Realtime)) {
+ while (md) {
+ if (md->type == eModifierType_Mirror && (md->mode&eModifierMode_Realtime)) {
break;
}
md = md->next;
}
- if(md && md->type == eModifierType_Mirror) {
+ if (md && md->type == eModifierType_Mirror) {
BKE_report(op->reports, RPT_ERROR_INVALID_CONTEXT, "This operator does not support an active mirror modifier");
return OPERATOR_CANCELLED;
}
@@ -2398,17 +2402,17 @@ static int vertex_group_fix_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_fix(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Fix Vertex Group Deform";
- ot->idname= "OBJECT_OT_vertex_group_fix";
- ot->description= "Modify the position of selected vertices by changing only their respective "
+ ot->name = "Fix Vertex Group Deform";
+ ot->idname = "OBJECT_OT_vertex_group_fix";
+ ot->description = "Modify the position of selected vertices by changing only their respective "
"groups' weights (this tool may be slow for many vertices)";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_fix_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_fix_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_float(ot->srna, "dist", 0.0f, -FLT_MAX, FLT_MAX, "Distance", "The distance to move to", -10.0f, 10.0f);
RNA_def_float(ot->srna, "strength", 1.f, -2.0f, FLT_MAX, "Strength",
"The distance moved can be changed by this multiplier", -2.0f, 2.0f);
@@ -2431,15 +2435,15 @@ static int vertex_group_lock_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_lock(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Change the Lock On Vertex Groups";
- ot->idname= "OBJECT_OT_vertex_group_lock";
+ ot->name = "Change the Lock On Vertex Groups";
+ ot->idname = "OBJECT_OT_vertex_group_lock";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_lock_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_lock_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -2461,15 +2465,15 @@ static int vertex_group_invert_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_invert(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Invert Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_invert";
+ ot->name = "Invert Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_invert";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_invert_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_invert_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "auto_assign", TRUE, "Add Weights",
"Add verts from groups that have zero weight before inverting");
@@ -2494,16 +2498,16 @@ static int vertex_group_blend_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_vertex_group_blend(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Blend Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_blend";
- ot->description= "";
+ ot->name = "Blend Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_blend";
+ ot->description = "";
/* api callbacks */
- ot->poll= vertex_group_poll_edit; /* TODO - add object mode support */
- ot->exec= vertex_group_blend_exec;
+ ot->poll = vertex_group_poll_edit; /* TODO - add object mode support */
+ ot->exec = vertex_group_blend_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -2515,7 +2519,7 @@ static int vertex_group_clean_exec(bContext *C, wmOperator *op)
int all_groups= RNA_boolean_get(op->ptr,"all_groups");
int keep_single= RNA_boolean_get(op->ptr,"keep_single");
- if(all_groups) vgroup_clean_all(ob, limit, keep_single);
+ if (all_groups) vgroup_clean_all(ob, limit, keep_single);
else vgroup_clean(ob, limit, keep_single);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -2528,16 +2532,16 @@ static int vertex_group_clean_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_clean(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clean Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_clean";
- ot->description= "Remove Vertex Group assignments which aren't required";
+ ot->name = "Clean Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_clean";
+ ot->description = "Remove Vertex Group assignments which aren't required";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_clean_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_clean_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, 1.0, "Limit", "Remove weights under this limit", 0.001f, 0.99f);
RNA_def_boolean(ot->srna, "all_groups", FALSE, "All Groups", "Clean all vertex groups");
@@ -2565,17 +2569,17 @@ static int vertex_group_mirror_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_mirror(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mirror Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_mirror";
- ot->description= "Mirror all vertex groups, flip weights and/or names, editing only selected vertices, "
+ ot->name = "Mirror Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_mirror";
+ ot->description = "Mirror all vertex groups, flip weights and/or names, editing only selected vertices, "
"flipping when both sides are selected otherwise copy from unselected";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_mirror_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_mirror_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "mirror_weights", TRUE, "Mirror Weights", "Mirror weights");
@@ -2591,9 +2595,9 @@ static int vertex_group_copy_to_linked_exec(bContext *C, wmOperator *UNUSED(op))
Base *base;
int retval= OPERATOR_CANCELLED;
- for(base=scene->base.first; base; base= base->next) {
- if(base->object->type==ob->type) {
- if(base->object!=ob && base->object->data==ob->data) {
+ for (base=scene->base.first; base; base= base->next) {
+ if (base->object->type==ob->type) {
+ if (base->object!=ob && base->object->data==ob->data) {
BLI_freelistN(&base->object->defbase);
BLI_duplicatelist(&base->object->defbase, &ob->defbase);
base->object->actdef= ob->actdef;
@@ -2613,16 +2617,16 @@ static int vertex_group_copy_to_linked_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_vertex_group_copy_to_linked(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Vertex Groups to Linked";
- ot->idname= "OBJECT_OT_vertex_group_copy_to_linked";
- ot->description= "Copy Vertex Groups to all users of the same Geometry data";
+ ot->name = "Copy Vertex Groups to Linked";
+ ot->idname = "OBJECT_OT_vertex_group_copy_to_linked";
+ ot->description = "Copy Vertex Groups to all users of the same Geometry data";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_copy_to_linked_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_copy_to_linked_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int vertex_group_copy_to_selected_exec(bContext *C, wmOperator *op)
@@ -2633,14 +2637,14 @@ static int vertex_group_copy_to_selected_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
{
- if(obact != ob) {
- if(ED_vgroup_copy_array(ob, obact)) change++;
+ if (obact != ob) {
+ if (ED_vgroup_copy_array(ob, obact)) change++;
else fail++;
}
}
CTX_DATA_END;
- if((change == 0 && fail == 0) || fail) {
+ if ((change == 0 && fail == 0) || fail) {
BKE_reportf(op->reports, RPT_ERROR,
"Copy to VGroups to Selected warning done %d, failed %d, object data must have matching indices",
change, fail);
@@ -2653,16 +2657,16 @@ static int vertex_group_copy_to_selected_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_copy_to_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Vertex Group to Selected";
- ot->idname= "OBJECT_OT_vertex_group_copy_to_selected";
- ot->description= "Copy Vertex Groups to other selected objects with matching indices";
+ ot->name = "Copy Vertex Group to Selected";
+ ot->idname = "OBJECT_OT_vertex_group_copy_to_selected";
+ ot->description = "Copy Vertex Groups to other selected objects with matching indices";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_copy_to_selected_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_copy_to_selected_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static EnumPropertyItem vgroup_items[]= {
@@ -2690,10 +2694,10 @@ static EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *UNUSED(ptr), Prop
bDeformGroup *def;
int a, totitem= 0;
- if(!ob)
+ if (!ob)
return vgroup_items;
- for(a=0, def=ob->defbase.first; def; def=def->next, a++) {
+ for (a=0, def=ob->defbase.first; def; def=def->next, a++) {
tmp.value= a;
tmp.icon= ICON_GROUP_VERTEX;
tmp.identifier= def->name;
@@ -2712,22 +2716,22 @@ void OBJECT_OT_vertex_group_set_active(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Set Active Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_set_active";
- ot->description= "Set the active vertex group";
+ ot->name = "Set Active Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_set_active";
+ ot->description = "Set the active vertex group";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= set_active_group_exec;
- ot->invoke= WM_menu_invoke;
+ ot->poll = vertex_group_poll;
+ ot->exec = set_active_group_exec;
+ ot->invoke = WM_menu_invoke;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "group", vgroup_items, 0, "Group", "Vertex group to set as active");
RNA_def_enum_funcs(prop, vgroup_itemf);
- ot->prop= prop;
+ ot->prop = prop;
}
/* creates the name_array parameter for vgroup_do_remap, call this before fiddling
@@ -2740,7 +2744,7 @@ static char *vgroup_init_remap(Object *ob)
char *name;
name= name_array;
- for(def = ob->defbase.first; def; def=def->next) {
+ for (def = ob->defbase.first; def; def=def->next) {
BLI_strncpy(name, def->name, MAX_VGROUP_NAME);
name += MAX_VGROUP_NAME;
}
@@ -2762,28 +2766,28 @@ static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op)
int i;
name= name_array;
- for(def= ob->defbase.first, i=0; def; def=def->next, i++){
+ for (def= ob->defbase.first, i=0; def; def=def->next, i++) {
sort_map[i]= BLI_findstringindex(&ob->defbase, name, offsetof(bDeformGroup, name));
name += MAX_VGROUP_NAME;
BLI_assert(sort_map[i] != -1);
}
- if(ob->mode == OB_MODE_EDIT) {
- if(ob->type==OB_MESH) {
+ if (ob->mode == OB_MODE_EDIT) {
+ if (ob->type==OB_MESH) {
BMEditMesh *em = BMEdit_FromObject(ob);
BMIter iter;
BMVert *eve;
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
dvert= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
- if(dvert && dvert->totweight){
+ if (dvert && dvert->totweight) {
defvert_remap(dvert, sort_map, defbase_tot);
}
}
}
else {
- BKE_report(op->reports, RPT_ERROR, "Editmode lattice isnt supported yet");
+ BKE_report(op->reports, RPT_ERROR, "Editmode lattice isn't supported yet");
MEM_freeN(sort_map_update);
return OPERATOR_CANCELLED;
}
@@ -2794,15 +2798,15 @@ static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op)
ED_vgroup_give_array(ob->data, &dvert, &dvert_tot);
/*create as necessary*/
- while(dvert && dvert_tot--) {
- if(dvert->totweight)
+ while (dvert && dvert_tot--) {
+ if (dvert->totweight)
defvert_remap(dvert, sort_map, defbase_tot);
dvert++;
}
}
/* update users */
- for(i=0; i<defbase_tot; i++)
+ for (i=0; i<defbase_tot; i++)
sort_map[i]++;
sort_map_update[0]= 0;
@@ -2851,16 +2855,16 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_sort(wmOperatorType *ot)
{
- ot->name= "Sort Vertex Groups";
- ot->idname= "OBJECT_OT_vertex_group_sort";
- ot->description= "Sorts vertex groups alphabetically";
+ ot->name = "Sort Vertex Groups";
+ ot->idname = "OBJECT_OT_vertex_group_sort";
+ ot->description = "Sorts vertex groups alphabetically";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_sort_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vertex_group_sort_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int vgroup_move_exec(bContext *C, wmOperator *op)
@@ -2882,7 +2886,8 @@ static int vgroup_move_exec(bContext *C, wmOperator *op)
BLI_remlink(&ob->defbase, def);
BLI_insertlinkbefore(&ob->defbase, prev, def);
- } else { /*down*/
+ }
+ else { /*down*/
void *next = def->next;
BLI_remlink(&ob->defbase, def);
@@ -2910,15 +2915,15 @@ void OBJECT_OT_vertex_group_move(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Move Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_move";
+ ot->name = "Move Vertex Group";
+ ot->idname = "OBJECT_OT_vertex_group_move";
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vgroup_move_exec;
+ ot->poll = vertex_group_poll;
+ ot->exec = vgroup_move_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "direction", vgroup_slot_move, 0, "Direction", "Direction to move, UP or DOWN");
}
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c
index abb596e450f..417cddb74fe 100644
--- a/source/blender/editors/physics/dynamicpaint_ops.c
+++ b/source/blender/editors/physics/dynamicpaint_ops.c
@@ -73,7 +73,7 @@ static int surface_slot_add_exec(bContext *C, wmOperator *UNUSED(op))
/* set preview for this surface only and set active */
canvas->active_sur = 0;
- for(surface=surface->prev; surface; surface=surface->prev) {
+ for (surface=surface->prev; surface; surface=surface->prev) {
surface->flags &= ~MOD_DPAINT_PREVIEW;
canvas->active_sur++;
}
@@ -85,16 +85,16 @@ static int surface_slot_add_exec(bContext *C, wmOperator *UNUSED(op))
void DPAINT_OT_surface_slot_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Surface Slot";
- ot->idname= "DPAINT_OT_surface_slot_add";
- ot->description="Add a new Dynamic Paint surface slot";
+ ot->name = "Add Surface Slot";
+ ot->idname = "DPAINT_OT_surface_slot_add";
+ ot->description = "Add a new Dynamic Paint surface slot";
/* api callbacks */
- ot->exec= surface_slot_add_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = surface_slot_add_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int surface_slot_remove_exec(bContext *C, wmOperator *UNUSED(op))
@@ -113,8 +113,8 @@ static int surface_slot_remove_exec(bContext *C, wmOperator *UNUSED(op))
surface = canvas->surfaces.first;
/* find active surface and remove it */
- for(; surface; surface=surface->next) {
- if(id == canvas->active_sur) {
+ for (; surface; surface=surface->next) {
+ if (id == canvas->active_sur) {
canvas->active_sur -= 1;
dynamicPaint_freeSurface(surface);
break;
@@ -133,16 +133,16 @@ static int surface_slot_remove_exec(bContext *C, wmOperator *UNUSED(op))
void DPAINT_OT_surface_slot_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Surface Slot";
- ot->idname= "DPAINT_OT_surface_slot_remove";
- ot->description="Remove the selected surface slot";
+ ot->name = "Remove Surface Slot";
+ ot->idname = "DPAINT_OT_surface_slot_remove";
+ ot->description = "Remove the selected surface slot";
/* api callbacks */
- ot->exec= surface_slot_remove_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = surface_slot_remove_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int type_toggle_exec(bContext *C, wmOperator *op)
@@ -181,20 +181,20 @@ void DPAINT_OT_type_toggle(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Toggle Type Active";
- ot->idname= "DPAINT_OT_type_toggle";
+ ot->name = "Toggle Type Active";
+ ot->idname = "DPAINT_OT_type_toggle";
ot->description = "Toggle whether given type is active or not";
/* api callbacks */
- ot->exec= type_toggle_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = type_toggle_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
prop= RNA_def_enum(ot->srna, "type", prop_dynamicpaint_type_items, MOD_DYNAMICPAINT_TYPE_CANVAS, "Type", "");
- ot->prop= prop;
+ ot->prop = prop;
}
static int output_toggle_exec(bContext *C, wmOperator *op)
@@ -249,19 +249,19 @@ void DPAINT_OT_output_toggle(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Toggle Output Layer";
- ot->idname= "DPAINT_OT_output_toggle";
+ ot->name = "Toggle Output Layer";
+ ot->idname = "DPAINT_OT_output_toggle";
ot->description = "Add or remove Dynamic Paint output data layer";
/* api callbacks */
- ot->exec= output_toggle_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = output_toggle_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "output", prop_output_toggle_types, 0, "Output Toggle", "");
+ ot->prop = RNA_def_enum(ot->srna, "output", prop_output_toggle_types, 0, "Output Toggle", "");
}
@@ -408,7 +408,7 @@ static int dynamicPaint_initBake(struct bContext *C, struct wmOperator *op)
static int dynamicpaint_bake_exec(bContext *C, wmOperator *op)
{
/* Bake dynamic paint */
- if(!dynamicPaint_initBake(C, op)) {
+ if (!dynamicPaint_initBake(C, op)) {
return OPERATOR_CANCELLED;}
return OPERATOR_FINISHED;
@@ -417,11 +417,11 @@ static int dynamicpaint_bake_exec(bContext *C, wmOperator *op)
void DPAINT_OT_bake(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Dynamic Paint Bake";
- ot->description= "Bake dynamic paint image sequence surface";
- ot->idname= "DPAINT_OT_bake";
+ ot->name = "Dynamic Paint Bake";
+ ot->description = "Bake dynamic paint image sequence surface";
+ ot->idname = "DPAINT_OT_bake";
/* api callbacks */
- ot->exec= dynamicpaint_bake_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = dynamicpaint_bake_exec;
+ ot->poll = ED_operator_object_active_editable;
}
diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c
index 54bd19164e0..7a7c16b23ff 100644
--- a/source/blender/editors/physics/particle_boids.c
+++ b/source/blender/editors/physics/particle_boids.c
@@ -65,7 +65,7 @@ static int rule_add_exec(bContext *C, wmOperator *op)
BoidRule *rule;
BoidState *state;
- if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
+ if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
return OPERATOR_CANCELLED;
part = psys->part;
@@ -73,7 +73,7 @@ static int rule_add_exec(bContext *C, wmOperator *op)
state = boid_get_current_state(part->boids);
- for(rule=state->rules.first; rule; rule=rule->next)
+ for (rule=state->rules.first; rule; rule=rule->next)
rule->flag &= ~BOIDRULE_CURRENT;
rule = boid_new_rule(type);
@@ -90,18 +90,18 @@ static int rule_add_exec(bContext *C, wmOperator *op)
void BOID_OT_rule_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Boid Rule";
+ ot->name = "Add Boid Rule";
ot->description = "Add a boid rule to the current boid state";
- ot->idname= "BOID_OT_rule_add";
+ ot->idname = "BOID_OT_rule_add";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= rule_add_exec;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = rule_add_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
- ot->prop= RNA_def_enum(ot->srna, "type", boidrule_type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", boidrule_type_items, 0, "Type", "");
}
static int rule_del_exec(bContext *C, wmOperator *UNUSED(op))
{
@@ -113,14 +113,14 @@ static int rule_del_exec(bContext *C, wmOperator *UNUSED(op))
BoidRule *rule;
BoidState *state;
- if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
+ if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
return OPERATOR_CANCELLED;
state = boid_get_current_state(psys->part->boids);
- for(rule=state->rules.first; rule; rule=rule->next) {
- if(rule->flag & BOIDRULE_CURRENT) {
+ for (rule=state->rules.first; rule; rule=rule->next) {
+ if (rule->flag & BOIDRULE_CURRENT) {
BLI_remlink(&state->rules, rule);
MEM_freeN(rule);
break;
@@ -129,7 +129,7 @@ static int rule_del_exec(bContext *C, wmOperator *UNUSED(op))
}
rule = state->rules.first;
- if(rule)
+ if (rule)
rule->flag |= BOIDRULE_CURRENT;
DAG_scene_sort(bmain, scene);
@@ -143,14 +143,14 @@ static int rule_del_exec(bContext *C, wmOperator *UNUSED(op))
void BOID_OT_rule_del(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Boid Rule";
- ot->idname= "BOID_OT_rule_del";
+ ot->name = "Remove Boid Rule";
+ ot->idname = "BOID_OT_rule_del";
/* api callbacks */
- ot->exec= rule_del_exec;
+ ot->exec = rule_del_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ move up/down boid rule operators *********************/
@@ -162,12 +162,12 @@ static int rule_move_up_exec(bContext *C, wmOperator *UNUSED(op))
BoidRule *rule;
BoidState *state;
- if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
+ if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
return OPERATOR_CANCELLED;
state = boid_get_current_state(psys->part->boids);
- for(rule = state->rules.first; rule; rule=rule->next) {
- if(rule->flag & BOIDRULE_CURRENT && rule->prev) {
+ for (rule = state->rules.first; rule; rule=rule->next) {
+ if (rule->flag & BOIDRULE_CURRENT && rule->prev) {
BLI_remlink(&state->rules, rule);
BLI_insertlink(&state->rules, rule->prev->prev, rule);
@@ -182,14 +182,14 @@ static int rule_move_up_exec(bContext *C, wmOperator *UNUSED(op))
void BOID_OT_rule_move_up(wmOperatorType *ot)
{
- ot->name= "Move Up Boid Rule";
- ot->description= "Move boid rule up in the list";
- ot->idname= "BOID_OT_rule_move_up";
+ ot->name = "Move Up Boid Rule";
+ ot->description = "Move boid rule up in the list";
+ ot->idname = "BOID_OT_rule_move_up";
- ot->exec= rule_move_up_exec;
+ ot->exec = rule_move_up_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int rule_move_down_exec(bContext *C, wmOperator *UNUSED(op))
@@ -200,12 +200,12 @@ static int rule_move_down_exec(bContext *C, wmOperator *UNUSED(op))
BoidRule *rule;
BoidState *state;
- if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
+ if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
return OPERATOR_CANCELLED;
state = boid_get_current_state(psys->part->boids);
- for(rule = state->rules.first; rule; rule=rule->next) {
- if(rule->flag & BOIDRULE_CURRENT && rule->next) {
+ for (rule = state->rules.first; rule; rule=rule->next) {
+ if (rule->flag & BOIDRULE_CURRENT && rule->next) {
BLI_remlink(&state->rules, rule);
BLI_insertlink(&state->rules, rule->next, rule);
@@ -220,14 +220,14 @@ static int rule_move_down_exec(bContext *C, wmOperator *UNUSED(op))
void BOID_OT_rule_move_down(wmOperatorType *ot)
{
- ot->name= "Move Down Boid Rule";
- ot->description= "Move boid rule down in the list";
- ot->idname= "BOID_OT_rule_move_down";
+ ot->name = "Move Down Boid Rule";
+ ot->description = "Move boid rule down in the list";
+ ot->idname = "BOID_OT_rule_move_down";
- ot->exec= rule_move_down_exec;
+ ot->exec = rule_move_down_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -240,12 +240,12 @@ static int state_add_exec(bContext *C, wmOperator *UNUSED(op))
ParticleSettings *part;
BoidState *state;
- if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
+ if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
return OPERATOR_CANCELLED;
part = psys->part;
- for(state=part->boids->states.first; state; state=state->next)
+ for (state=part->boids->states.first; state; state=state->next)
state->flag &= ~BOIDSTATE_CURRENT;
state = boid_new_state(part->boids);
@@ -261,15 +261,15 @@ static int state_add_exec(bContext *C, wmOperator *UNUSED(op))
void BOID_OT_state_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Boid State";
+ ot->name = "Add Boid State";
ot->description = "Add a boid state to the particle system";
- ot->idname= "BOID_OT_state_add";
+ ot->idname = "BOID_OT_state_add";
/* api callbacks */
- ot->exec= state_add_exec;
+ ot->exec = state_add_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int state_del_exec(bContext *C, wmOperator *UNUSED(op))
{
@@ -281,13 +281,13 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op))
ParticleSettings *part;
BoidState *state;
- if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
+ if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
return OPERATOR_CANCELLED;
part = psys->part;
- for(state=part->boids->states.first; state; state=state->next) {
- if(state->flag & BOIDSTATE_CURRENT) {
+ for (state=part->boids->states.first; state; state=state->next) {
+ if (state->flag & BOIDSTATE_CURRENT) {
BLI_remlink(&part->boids->states, state);
MEM_freeN(state);
break;
@@ -296,7 +296,7 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op))
}
/* there must be at least one state */
- if(!part->boids->states.first) {
+ if (!part->boids->states.first) {
state = boid_new_state(part->boids);
BLI_addtail(&part->boids->states, state);
}
@@ -316,14 +316,14 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op))
void BOID_OT_state_del(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Boid State";
- ot->idname= "BOID_OT_state_del";
+ ot->name = "Remove Boid State";
+ ot->idname = "BOID_OT_state_del";
/* api callbacks */
- ot->exec= state_del_exec;
+ ot->exec = state_del_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ move up/down boid state operators *********************/
@@ -335,13 +335,13 @@ static int state_move_up_exec(bContext *C, wmOperator *UNUSED(op))
BoidSettings *boids;
BoidState *state;
- if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
+ if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
return OPERATOR_CANCELLED;
boids = psys->part->boids;
- for(state = boids->states.first; state; state=state->next) {
- if(state->flag & BOIDSTATE_CURRENT && state->prev) {
+ for (state = boids->states.first; state; state=state->next) {
+ if (state->flag & BOIDSTATE_CURRENT && state->prev) {
BLI_remlink(&boids->states, state);
BLI_insertlink(&boids->states, state->prev->prev, state);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
@@ -354,14 +354,14 @@ static int state_move_up_exec(bContext *C, wmOperator *UNUSED(op))
void BOID_OT_state_move_up(wmOperatorType *ot)
{
- ot->name= "Move Up Boid State";
- ot->description= "Move boid state up in the list";
- ot->idname= "BOID_OT_state_move_up";
+ ot->name = "Move Up Boid State";
+ ot->description = "Move boid state up in the list";
+ ot->idname = "BOID_OT_state_move_up";
- ot->exec= state_move_up_exec;
+ ot->exec = state_move_up_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int state_move_down_exec(bContext *C, wmOperator *UNUSED(op))
@@ -371,13 +371,13 @@ static int state_move_down_exec(bContext *C, wmOperator *UNUSED(op))
BoidSettings *boids;
BoidState *state;
- if(!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
+ if (!psys || !psys->part || psys->part->phystype != PART_PHYS_BOIDS)
return OPERATOR_CANCELLED;
boids = psys->part->boids;
- for(state = boids->states.first; state; state=state->next) {
- if(state->flag & BOIDSTATE_CURRENT && state->next) {
+ for (state = boids->states.first; state; state=state->next) {
+ if (state->flag & BOIDSTATE_CURRENT && state->next) {
BLI_remlink(&boids->states, state);
BLI_insertlink(&boids->states, state->next, state);
DAG_id_tag_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
@@ -390,13 +390,13 @@ static int state_move_down_exec(bContext *C, wmOperator *UNUSED(op))
void BOID_OT_state_move_down(wmOperatorType *ot)
{
- ot->name= "Move Down Boid State";
- ot->description= "Move boid state down in the list";
- ot->idname= "BOID_OT_state_move_down";
+ ot->name = "Move Down Boid State";
+ ot->description = "Move boid state down in the list";
+ ot->idname = "BOID_OT_state_move_down";
- ot->exec= state_move_down_exec;
+ ot->exec = state_move_down_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index e08139e9a78..bf3a9fff4e2 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -89,16 +89,16 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys);
#define KEY_K PTCacheEditKey *key; int k
#define POINT_P PTCacheEditPoint *point; int p
-#define LOOP_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++)
-#define LOOP_VISIBLE_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(!(point->flag & PEP_HIDE))
-#define LOOP_SELECTED_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point_is_selected(point))
-#define LOOP_UNSELECTED_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(!point_is_selected(point))
-#define LOOP_EDITED_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point->flag & PEP_EDIT_RECALC)
-#define LOOP_TAGGED_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point->flag & PEP_TAG)
-#define LOOP_KEYS for(k=0, key=point->keys; k<point->totkey; k++, key++)
-#define LOOP_VISIBLE_KEYS for(k=0, key=point->keys; k<point->totkey; k++, key++) if(!(key->flag & PEK_HIDE))
-#define LOOP_SELECTED_KEYS for(k=0, key=point->keys; k<point->totkey; k++, key++) if((key->flag & PEK_SELECT) && !(key->flag & PEK_HIDE))
-#define LOOP_TAGGED_KEYS for(k=0, key=point->keys; k<point->totkey; k++, key++) if(key->flag & PEK_TAG)
+#define LOOP_POINTS for (p=0, point=edit->points; p<edit->totpoint; p++, point++)
+#define LOOP_VISIBLE_POINTS for (p=0, point=edit->points; p<edit->totpoint; p++, point++) if (!(point->flag & PEP_HIDE))
+#define LOOP_SELECTED_POINTS for (p=0, point=edit->points; p<edit->totpoint; p++, point++) if (point_is_selected(point))
+#define LOOP_UNSELECTED_POINTS for (p=0, point=edit->points; p<edit->totpoint; p++, point++) if (!point_is_selected(point))
+#define LOOP_EDITED_POINTS for (p=0, point=edit->points; p<edit->totpoint; p++, point++) if (point->flag & PEP_EDIT_RECALC)
+#define LOOP_TAGGED_POINTS for (p=0, point=edit->points; p<edit->totpoint; p++, point++) if (point->flag & PEP_TAG)
+#define LOOP_KEYS for (k=0, key=point->keys; k<point->totkey; k++, key++)
+#define LOOP_VISIBLE_KEYS for (k=0, key=point->keys; k<point->totkey; k++, key++) if (!(key->flag & PEK_HIDE))
+#define LOOP_SELECTED_KEYS for (k=0, key=point->keys; k<point->totkey; k++, key++) if ((key->flag & PEK_SELECT) && !(key->flag & PEK_HIDE))
+#define LOOP_TAGGED_KEYS for (k=0, key=point->keys; k<point->totkey; k++, key++) if (key->flag & PEK_TAG)
#define KEY_WCO (key->flag & PEK_USE_WCO ? key->world_co : key->co)
@@ -109,7 +109,7 @@ int PE_poll(bContext *C)
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- if(!scene || !ob || !(ob->mode & OB_MODE_PARTICLE_EDIT))
+ if (!scene || !ob || !(ob->mode & OB_MODE_PARTICLE_EDIT))
return 0;
return (PE_get_current(scene, ob) != NULL);
@@ -121,7 +121,7 @@ int PE_hair_poll(bContext *C)
Object *ob= CTX_data_active_object(C);
PTCacheEdit *edit;
- if(!scene || !ob || !(ob->mode & OB_MODE_PARTICLE_EDIT))
+ if (!scene || !ob || !(ob->mode & OB_MODE_PARTICLE_EDIT))
return 0;
edit= PE_get_current(scene, ob);
@@ -139,28 +139,28 @@ void PE_free_ptcache_edit(PTCacheEdit *edit)
{
POINT_P;
- if(edit==0) return;
+ if (edit==0) return;
PTCacheUndo_clear(edit);
- if(edit->points) {
+ if (edit->points) {
LOOP_POINTS {
- if(point->keys)
+ if (point->keys)
MEM_freeN(point->keys);
}
MEM_freeN(edit->points);
}
- if(edit->mirror_cache)
+ if (edit->mirror_cache)
MEM_freeN(edit->mirror_cache);
- if(edit->emitter_cosnos) {
+ if (edit->emitter_cosnos) {
MEM_freeN(edit->emitter_cosnos);
edit->emitter_cosnos= 0;
}
- if(edit->emitter_field) {
+ if (edit->emitter_field) {
BLI_kdtree_free(edit->emitter_field);
edit->emitter_field= 0;
}
@@ -176,9 +176,9 @@ void PE_free_ptcache_edit(PTCacheEdit *edit)
int PE_start_edit(PTCacheEdit *edit)
{
- if(edit) {
+ if (edit) {
edit->edited = 1;
- if(edit->psys)
+ if (edit->psys)
edit->psys->flag |= PSYS_EDITED;
return 1;
}
@@ -202,7 +202,7 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create)
ListBase pidlist;
PTCacheID *pid;
- if(pset==NULL || ob==NULL)
+ if (pset==NULL || ob==NULL)
return NULL;
pset->scene = scene;
@@ -211,7 +211,7 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create)
BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
/* in the case of only one editable thing, set pset->edittype accordingly */
- if(pidlist.first && pidlist.first == pidlist.last) {
+ if (pidlist.first && pidlist.first == pidlist.last) {
pid = pidlist.first;
switch(pid->type) {
case PTCACHE_TYPE_PARTICLES:
@@ -226,25 +226,25 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create)
}
}
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pset->edittype == PE_TYPE_PARTICLES && pid->type == PTCACHE_TYPE_PARTICLES) {
+ for (pid=pidlist.first; pid; pid=pid->next) {
+ if (pset->edittype == PE_TYPE_PARTICLES && pid->type == PTCACHE_TYPE_PARTICLES) {
ParticleSystem *psys = pid->calldata;
- if(psys->flag & PSYS_CURRENT) {
- if(psys->part && psys->part->type == PART_HAIR) {
- if(psys->flag & PSYS_HAIR_DYNAMICS && psys->pointcache->flag & PTCACHE_BAKED) {
- if(create && !psys->pointcache->edit)
+ if (psys->flag & PSYS_CURRENT) {
+ if (psys->part && psys->part->type == PART_HAIR) {
+ if (psys->flag & PSYS_HAIR_DYNAMICS && psys->pointcache->flag & PTCACHE_BAKED) {
+ if (create && !psys->pointcache->edit)
PE_create_particle_edit(scene, ob, pid->cache, NULL);
edit = pid->cache->edit;
}
else {
- if(create && !psys->edit && psys->flag & PSYS_HAIR_DONE)
+ if (create && !psys->edit && psys->flag & PSYS_HAIR_DONE)
PE_create_particle_edit(scene, ob, NULL, psys);
edit = psys->edit;
}
}
else {
- if(create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
+ if (create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
PE_create_particle_edit(scene, ob, pid->cache, psys);
edit = pid->cache->edit;
}
@@ -272,7 +272,7 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create)
}
}
- if(edit)
+ if (edit)
edit->pid = *pid;
BLI_freelistN(&pidlist);
@@ -292,7 +292,7 @@ PTCacheEdit *PE_create_current(Scene *scene, Object *ob)
void PE_current_changed(Scene *scene, Object *ob)
{
- if(ob->mode == OB_MODE_PARTICLE_EDIT)
+ if (ob->mode == OB_MODE_PARTICLE_EDIT)
PE_create_current(scene, ob);
}
@@ -302,10 +302,10 @@ void PE_hide_keys_time(Scene *scene, PTCacheEdit *edit, float cfra)
POINT_P; KEY_K;
- if(pset->flag & PE_FADE_TIME && pset->selectmode==SCE_SELECT_POINT) {
+ if (pset->flag & PE_FADE_TIME && pset->selectmode==SCE_SELECT_POINT) {
LOOP_POINTS {
LOOP_KEYS {
- if(fabs(cfra-*key->time) < pset->fade_frames)
+ if (fabs(cfra-*key->time) < pset->fade_frames)
key->flag &= ~PEK_HIDE;
else {
key->flag |= PEK_HIDE;
@@ -325,7 +325,7 @@ void PE_hide_keys_time(Scene *scene, PTCacheEdit *edit, float cfra)
static int pe_x_mirror(Object *ob)
{
- if(ob->type == OB_MESH)
+ if (ob->type == OB_MESH)
return (((Mesh*)ob->data)->editflag & ME_EDIT_MIRROR_X);
return 0;
@@ -380,8 +380,8 @@ static void PE_set_view3d_data(bContext *C, PEData *data)
/* note, the object argument means the modelview matrix does not account for the objects matrix, use viewmat rather than (obmat * viewmat) */
view3d_get_transformation(data->vc.ar, data->vc.rv3d, NULL, &data->mats);
- if((data->vc.v3d->drawtype>OB_WIRE) && (data->vc.v3d->flag & V3D_ZBUF_SELECT)) {
- if(data->vc.v3d->flag & V3D_INVALID_BACKBUF) {
+ if ((data->vc.v3d->drawtype>OB_WIRE) && (data->vc.v3d->flag & V3D_ZBUF_SELECT)) {
+ if (data->vc.v3d->flag & V3D_INVALID_BACKBUF) {
/* needed or else the draw matrix can be incorrect */
view3d_operator_needs_opengl(C);
@@ -404,12 +404,12 @@ static int key_test_depth(PEData *data, const float co[3])
short wco[3], x,y;
/* nothing to do */
- if((v3d->drawtype<=OB_WIRE) || (v3d->flag & V3D_ZBUF_SELECT)==0)
+ if ((v3d->drawtype<=OB_WIRE) || (v3d->flag & V3D_ZBUF_SELECT)==0)
return 1;
project_short(data->vc.ar, co, wco);
- if(wco[0] == IS_CLIPPED)
+ if (wco[0] == IS_CLIPPED)
return 0;
gluProject(co[0],co[1],co[2], data->mats.modelview, data->mats.projection,
@@ -434,7 +434,7 @@ static int key_test_depth(PEData *data, const float co[3])
}
#endif
- if((float)uz - 0.00001f > depth)
+ if ((float)uz - 0.00001f > depth)
return 0;
else
return 1;
@@ -447,18 +447,18 @@ static int key_inside_circle(PEData *data, float rad, const float co[3], float *
project_int(data->vc.ar, co, sco);
- if(sco[0] == IS_CLIPPED)
+ if (sco[0] == IS_CLIPPED)
return 0;
dx= data->mval[0] - sco[0];
dy= data->mval[1] - sco[1];
dist= sqrt(dx*dx + dy*dy);
- if(dist > rad)
+ if (dist > rad)
return 0;
- if(key_test_depth(data, co)) {
- if(distance)
+ if (key_test_depth(data, co)) {
+ if (distance)
*distance=dist;
return 1;
@@ -473,10 +473,10 @@ static int key_inside_rect(PEData *data, const float co[3])
project_int(data->vc.ar, co,sco);
- if(sco[0] == IS_CLIPPED)
+ if (sco[0] == IS_CLIPPED)
return 0;
- if(sco[0] > data->rect->xmin && sco[0] < data->rect->xmax &&
+ if (sco[0] > data->rect->xmin && sco[0] < data->rect->xmax &&
sco[1] > data->rect->ymin && sco[1] < data->rect->ymax)
return key_test_depth(data, co);
@@ -485,7 +485,7 @@ static int key_inside_rect(PEData *data, const float co[3])
static int key_inside_test(PEData *data, const float co[3])
{
- if(data->mval)
+ if (data->mval)
return key_inside_circle(data, data->rad, co, NULL);
else
return key_inside_rect(data, co);
@@ -495,7 +495,7 @@ static int point_is_selected(PTCacheEditPoint *point)
{
KEY_K;
- if(point->flag & PEP_HIDE)
+ if (point->flag & PEP_HIDE)
return 0;
LOOP_SELECTED_KEYS {
@@ -520,43 +520,43 @@ static void for_mouse_hit_keys(PEData *data, ForKeyFunc func, int nearest)
float dist= data->rad;
/* in path select mode we have no keys */
- if(pset->selectmode==SCE_SELECT_PATH)
+ if (pset->selectmode==SCE_SELECT_PATH)
return;
nearest_point= -1;
nearest_key= -1;
LOOP_VISIBLE_POINTS {
- if(pset->selectmode == SCE_SELECT_END) {
+ if (pset->selectmode == SCE_SELECT_END) {
/* only do end keys */
key= point->keys + point->totkey-1;
- if(nearest) {
- if(key_inside_circle(data, dist, KEY_WCO, &dist)) {
+ if (nearest) {
+ if (key_inside_circle(data, dist, KEY_WCO, &dist)) {
nearest_point= p;
nearest_key= point->totkey-1;
}
}
- else if(key_inside_test(data, KEY_WCO))
+ else if (key_inside_test(data, KEY_WCO))
func(data, p, point->totkey-1);
}
else {
/* do all keys */
LOOP_VISIBLE_KEYS {
- if(nearest) {
- if(key_inside_circle(data, dist, KEY_WCO, &dist)) {
+ if (nearest) {
+ if (key_inside_circle(data, dist, KEY_WCO, &dist)) {
nearest_point= p;
nearest_key= k;
}
}
- else if(key_inside_test(data, KEY_WCO))
+ else if (key_inside_test(data, KEY_WCO))
func(data, p, k);
}
}
}
/* do nearest only */
- if(nearest && nearest_point > -1)
+ if (nearest && nearest_point > -1)
func(data, nearest_point, nearest_key);
}
@@ -567,23 +567,23 @@ static void foreach_mouse_hit_point(PEData *data, ForPointFunc func, int selecte
POINT_P; KEY_K;
/* all is selected in path mode */
- if(pset->selectmode==SCE_SELECT_PATH)
+ if (pset->selectmode==SCE_SELECT_PATH)
selected=0;
LOOP_VISIBLE_POINTS {
- if(pset->selectmode==SCE_SELECT_END) {
+ if (pset->selectmode==SCE_SELECT_END) {
/* only do end keys */
key= point->keys + point->totkey - 1;
- if(selected==0 || key->flag & PEK_SELECT)
- if(key_inside_circle(data, data->rad, KEY_WCO, &data->dist))
+ if (selected==0 || key->flag & PEK_SELECT)
+ if (key_inside_circle(data, data->rad, KEY_WCO, &data->dist))
func(data, p);
}
else {
/* do all keys */
LOOP_VISIBLE_KEYS {
- if(selected==0 || key->flag & PEK_SELECT) {
- if(key_inside_circle(data, data->rad, KEY_WCO, &data->dist)) {
+ if (selected==0 || key->flag & PEK_SELECT) {
+ if (key_inside_circle(data, data->rad, KEY_WCO, &data->dist)) {
func(data, p);
break;
}
@@ -602,21 +602,21 @@ static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected
POINT_P; KEY_K;
float mat[4][4]= MAT4_UNITY, imat[4][4]= MAT4_UNITY;
- if(edit->psys)
+ if (edit->psys)
psmd= psys_get_modifier(data->ob, edit->psys);
/* all is selected in path mode */
- if(pset->selectmode==SCE_SELECT_PATH)
+ if (pset->selectmode==SCE_SELECT_PATH)
selected= 0;
LOOP_VISIBLE_POINTS {
- if(pset->selectmode==SCE_SELECT_END) {
+ if (pset->selectmode==SCE_SELECT_END) {
/* only do end keys */
key= point->keys + point->totkey-1;
- if(selected==0 || key->flag & PEK_SELECT) {
- if(key_inside_circle(data, data->rad, KEY_WCO, &data->dist)) {
- if(edit->psys && !(edit->psys->flag & PSYS_GLOBAL_HAIR)) {
+ if (selected==0 || key->flag & PEK_SELECT) {
+ if (key_inside_circle(data, data->rad, KEY_WCO, &data->dist)) {
+ if (edit->psys && !(edit->psys->flag & PSYS_GLOBAL_HAIR)) {
psys_mat_hair_to_global(data->ob, psmd->dm, psys->part->from, psys->particles + p, mat);
invert_m4_m4(imat,mat);
}
@@ -628,9 +628,9 @@ static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected
else {
/* do all keys */
LOOP_VISIBLE_KEYS {
- if(selected==0 || key->flag & PEK_SELECT) {
- if(key_inside_circle(data, data->rad, KEY_WCO, &data->dist)) {
- if(edit->psys && !(edit->psys->flag & PSYS_GLOBAL_HAIR)) {
+ if (selected==0 || key->flag & PEK_SELECT) {
+ if (key_inside_circle(data, data->rad, KEY_WCO, &data->dist)) {
+ if (edit->psys && !(edit->psys->flag & PSYS_GLOBAL_HAIR)) {
psys_mat_hair_to_global(data->ob, psmd->dm, psys->part->from, psys->particles + p, mat);
invert_m4_m4(imat,mat);
}
@@ -682,14 +682,14 @@ static int count_selected_keys(Scene *scene, PTCacheEdit *edit)
int sel= 0;
LOOP_VISIBLE_POINTS {
- if(pset->selectmode==SCE_SELECT_POINT) {
+ if (pset->selectmode==SCE_SELECT_POINT) {
LOOP_SELECTED_KEYS {
sel++;
}
}
- else if(pset->selectmode==SCE_SELECT_END) {
+ else if (pset->selectmode==SCE_SELECT_END) {
key = point->keys + point->totkey - 1;
- if(key->flag & PEK_SELECT)
+ if (key->flag & PEK_SELECT)
sel++;
}
}
@@ -716,7 +716,7 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys)
psmd= psys_get_modifier(ob, psys);
totpart= psys->totpart;
- if(!psmd->dm)
+ if (!psmd->dm)
return;
tree= BLI_kdtree_new(totpart);
@@ -733,7 +733,7 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys)
BLI_kdtree_balance(tree);
/* lookup particles and set in mirror cache */
- if(!edit->mirror_cache)
+ if (!edit->mirror_cache)
edit->mirror_cache= MEM_callocN(sizeof(int)*totpart, "PE mirror cache");
LOOP_PARTICLES {
@@ -746,7 +746,7 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys)
index= BLI_kdtree_find_nearest(tree, co, NULL, &nearest);
/* this needs a custom threshold still, duplicated for editmode mirror */
- if(index != -1 && index != p && (nearest.dist <= 0.0002f))
+ if (index != -1 && index != p && (nearest.dist <= 0.0002f))
edit->mirror_cache[p]= index;
else
edit->mirror_cache[p]= -1;
@@ -754,9 +754,9 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys)
/* make sure mirrors are in two directions */
LOOP_PARTICLES {
- if(edit->mirror_cache[p]) {
+ if (edit->mirror_cache[p]) {
index= edit->mirror_cache[p];
- if(edit->mirror_cache[index] != p)
+ if (edit->mirror_cache[index] != p)
edit->mirror_cache[p]= -1;
}
}
@@ -777,15 +777,15 @@ static void PE_mirror_particle(Object *ob, DerivedMesh *dm, ParticleSystem *psys
i= pa - psys->particles;
/* find mirrored particle if needed */
- if(!mpa) {
- if(!edit->mirror_cache)
+ if (!mpa) {
+ if (!edit->mirror_cache)
PE_update_mirror_cache(ob, psys);
- if(!edit->mirror_cache)
+ if (!edit->mirror_cache)
return; /* something went wrong! */
mi= edit->mirror_cache[i];
- if(mi == -1)
+ if (mi == -1)
return;
mpa= psys->particles + mi;
}
@@ -796,9 +796,9 @@ static void PE_mirror_particle(Object *ob, DerivedMesh *dm, ParticleSystem *psys
mpoint = edit->points + mi;
/* make sure they have the same amount of keys */
- if(pa->totkey != mpa->totkey) {
- if(mpa->hair) MEM_freeN(mpa->hair);
- if(mpoint->keys) MEM_freeN(mpoint->keys);
+ if (pa->totkey != mpa->totkey) {
+ if (mpa->hair) MEM_freeN(mpa->hair);
+ if (mpoint->keys) MEM_freeN(mpoint->keys);
mpa->hair= MEM_dupallocN(pa->hair);
mpa->totkey= pa->totkey;
@@ -807,7 +807,7 @@ static void PE_mirror_particle(Object *ob, DerivedMesh *dm, ParticleSystem *psys
mhkey= mpa->hair;
mkey= mpoint->keys;
- for(k=0; k<mpa->totkey; k++, mkey++, mhkey++) {
+ for (k=0; k<mpa->totkey; k++, mkey++, mhkey++) {
mkey->co= mhkey->co;
mkey->time= &mhkey->time;
mkey->flag &= ~PEK_SELECT;
@@ -823,21 +823,21 @@ static void PE_mirror_particle(Object *ob, DerivedMesh *dm, ParticleSystem *psys
mhkey=mpa->hair;
key= point->keys;
mkey= mpoint->keys;
- for(k=0; k<pa->totkey; k++, hkey++, mhkey++, key++, mkey++) {
+ for (k=0; k<pa->totkey; k++, hkey++, mhkey++, key++, mkey++) {
copy_v3_v3(mhkey->co, hkey->co);
mul_m4_v3(mat, mhkey->co);
mhkey->co[0]= -mhkey->co[0];
mul_m4_v3(immat, mhkey->co);
- if(key->flag & PEK_TAG)
+ if (key->flag & PEK_TAG)
mkey->flag |= PEK_TAG;
mkey->length = key->length;
}
- if(point->flag & PEP_TAG)
+ if (point->flag & PEP_TAG)
mpoint->flag |= PEP_TAG;
- if(point->flag & PEP_EDIT_RECALC)
+ if (point->flag & PEP_EDIT_RECALC)
mpoint->flag |= PEP_EDIT_RECALC;
}
@@ -847,35 +847,35 @@ static void PE_apply_mirror(Object *ob, ParticleSystem *psys)
ParticleSystemModifierData *psmd;
POINT_P;
- if(!psys)
+ if (!psys)
return;
edit= psys->edit;
psmd= psys_get_modifier(ob, psys);
- if(!psmd->dm)
+ if (!psmd->dm)
return;
- if(!edit->mirror_cache)
+ if (!edit->mirror_cache)
PE_update_mirror_cache(ob, psys);
- if(!edit->mirror_cache)
+ if (!edit->mirror_cache)
return; /* something went wrong */
/* we delay settings the PARS_EDIT_RECALC for mirrored particles
* to avoid doing mirror twice */
LOOP_POINTS {
- if(point->flag & PEP_EDIT_RECALC) {
+ if (point->flag & PEP_EDIT_RECALC) {
PE_mirror_particle(ob, psmd->dm, psys, psys->particles + p, NULL);
- if(edit->mirror_cache[p] != -1)
+ if (edit->mirror_cache[p] != -1)
edit->points[edit->mirror_cache[p]].flag &= ~PEP_EDIT_RECALC;
}
}
LOOP_POINTS {
- if(point->flag & PEP_EDIT_RECALC)
- if(edit->mirror_cache[p] != -1)
+ if (point->flag & PEP_EDIT_RECALC)
+ if (edit->mirror_cache[p] != -1)
edit->points[edit->mirror_cache[p]].flag |= PEP_EDIT_RECALC;
}
}
@@ -894,13 +894,13 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit)
float *vec, *nor, dvec[3], dot, dist_1st=0.0f;
float hairimat[4][4], hairmat[4][4];
- if(edit==NULL || edit->psys==NULL || (pset->flag & PE_DEFLECT_EMITTER)==0 || (edit->psys->flag & PSYS_GLOBAL_HAIR))
+ if (edit==NULL || edit->psys==NULL || (pset->flag & PE_DEFLECT_EMITTER)==0 || (edit->psys->flag & PSYS_GLOBAL_HAIR))
return;
psys = edit->psys;
psmd = psys_get_modifier(ob,psys);
- if(!psmd->dm)
+ if (!psmd->dm)
return;
LOOP_EDITED_POINTS {
@@ -911,7 +911,7 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit)
}
LOOP_KEYS {
- if(k==0) {
+ if (k==0) {
dist_1st = len_v3v3((key+1)->co, key->co);
dist_1st *= 0.75f * pset->emitterdist;
}
@@ -926,8 +926,8 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit)
dot=dot_v3v3(dvec,nor);
copy_v3_v3(dvec,nor);
- if(dot>0.0f) {
- if(dot<dist_1st) {
+ if (dot>0.0f) {
+ if (dot<dist_1st) {
normalize_v3(dvec);
mul_v3_fl(dvec,dist_1st-dot);
add_v3_v3(key->co, dvec);
@@ -938,7 +938,7 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit)
mul_v3_fl(dvec,dist_1st-dot);
add_v3_v3(key->co, dvec);
}
- if(k==1)
+ if (k==1)
dist_1st*=1.3333f;
}
}
@@ -958,15 +958,15 @@ static void PE_apply_lengths(Scene *scene, PTCacheEdit *edit)
POINT_P; KEY_K;
float dv1[3];
- if(edit==0 || (pset->flag & PE_KEEP_LENGTHS)==0)
+ if (edit==0 || (pset->flag & PE_KEEP_LENGTHS)==0)
return;
- if(edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR)
+ if (edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR)
return;
LOOP_EDITED_POINTS {
LOOP_KEYS {
- if(k) {
+ if (k) {
sub_v3_v3v3(dv1, key->co, (key - 1)->co);
normalize_v3(dv1);
mul_v3_fl(dv1, (key - 1)->length);
@@ -987,17 +987,17 @@ static void pe_iterate_lengths(Scene *scene, PTCacheEdit *edit)
float dv1[3]= {0.0f, 0.0f, 0.0f};
float dv2[3]= {0.0f, 0.0f, 0.0f};
- if(edit==0 || (pset->flag & PE_KEEP_LENGTHS)==0)
+ if (edit==0 || (pset->flag & PE_KEEP_LENGTHS)==0)
return;
- if(edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR)
+ if (edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR)
return;
LOOP_EDITED_POINTS {
- for(j=1; j<point->totkey; j++) {
+ for (j=1; j<point->totkey; j++) {
float mul= 1.0f / (float)point->totkey;
- if(pset->flag & PE_LOCK_FIRST) {
+ if (pset->flag & PE_LOCK_FIRST) {
key= point->keys + 1;
k= 1;
dv1[0]= dv1[1]= dv1[2]= 0.0;
@@ -1008,20 +1008,20 @@ static void pe_iterate_lengths(Scene *scene, PTCacheEdit *edit)
dv0[0]= dv0[1]= dv0[2]= 0.0;
}
- for(; k<point->totkey; k++, key++) {
- if(k) {
+ for (; k<point->totkey; k++, key++) {
+ if (k) {
sub_v3_v3v3(dv0, (key - 1)->co, key->co);
tlen= normalize_v3(dv0);
mul_v3_fl(dv0, (mul * (tlen - (key - 1)->length)));
}
- if(k < point->totkey - 1) {
+ if (k < point->totkey - 1) {
sub_v3_v3v3(dv2, (key + 1)->co, key->co);
tlen= normalize_v3(dv2);
mul_v3_fl(dv2, mul * (tlen - key->length));
}
- if(k) {
+ if (k) {
add_v3_v3((key-1)->co, dv1);
}
@@ -1035,12 +1035,12 @@ static void recalc_lengths(PTCacheEdit *edit)
{
POINT_P; KEY_K;
- if(edit==0)
+ if (edit==0)
return;
LOOP_EDITED_POINTS {
key= point->keys;
- for(k=0; k<point->totkey-1; k++, key++) {
+ for (k=0; k<point->totkey-1; k++, key++) {
key->length= len_v3v3(key->co, (key + 1)->co);
}
}
@@ -1054,10 +1054,10 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys)
float *vec, *nor;
int i, totface /*, totvert*/;
- if(!dm)
+ if (!dm)
return;
- if(edit->emitter_cosnos)
+ if (edit->emitter_cosnos)
MEM_freeN(edit->emitter_cosnos);
BLI_kdtree_free(edit->emitter_field);
@@ -1072,7 +1072,7 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys)
vec=edit->emitter_cosnos;
nor=vec+3;
- for(i=0; i<totface; i++, vec+=6, nor+=6) {
+ for (i=0; i<totface; i++, vec+=6, nor+=6) {
MFace *mface=dm->getTessFaceData(dm,i,CD_MFACE);
MVert *mvert;
@@ -1088,7 +1088,7 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys)
add_v3_v3v3(vec,vec,mvert->co);
VECADD(nor,nor,mvert->no);
- if(mface->v4) {
+ if (mface->v4) {
mvert=dm->getVertData(dm,mface->v4,CD_MVERT);
add_v3_v3v3(vec,vec,mvert->co);
VECADD(nor,nor,mvert->no);
@@ -1113,13 +1113,13 @@ static void PE_update_selection(Scene *scene, Object *ob, int useflag)
POINT_P; KEY_K;
/* flag all particles to be updated if not using flag */
- if(!useflag)
+ if (!useflag)
LOOP_POINTS
point->flag |= PEP_EDIT_RECALC;
/* flush edit key flag to hair key flag to preserve selection
* on save */
- if(edit->psys) LOOP_POINTS {
+ if (edit->psys) LOOP_POINTS {
hkey = edit->psys->particles[p].hair;
LOOP_KEYS {
hkey->editflag= key->flag;
@@ -1142,16 +1142,16 @@ static void update_world_cos(Object *ob, PTCacheEdit *edit)
POINT_P; KEY_K;
float hairmat[4][4];
- if(psys==0 || psys->edit==0 || psmd->dm==NULL)
+ if (psys==0 || psys->edit==0 || psmd->dm==NULL)
return;
LOOP_POINTS {
- if(!(psys->flag & PSYS_GLOBAL_HAIR))
+ if (!(psys->flag & PSYS_GLOBAL_HAIR))
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, psys->particles+p, hairmat);
LOOP_KEYS {
copy_v3_v3(key->world_co,key->co);
- if(!(psys->flag & PSYS_GLOBAL_HAIR))
+ if (!(psys->flag & PSYS_GLOBAL_HAIR))
mul_m4_v3(hairmat, key->world_co);
}
}
@@ -1163,37 +1163,37 @@ static void update_velocities(PTCacheEdit *edit)
POINT_P; KEY_K;
/* hair doesn't use velocities */
- if(edit->psys || !edit->points || !edit->points->keys->vel)
+ if (edit->psys || !edit->points || !edit->points->keys->vel)
return;
frs_sec = edit->pid.flag & PTCACHE_VEL_PER_SEC ? 25.0f : 1.0f;
LOOP_EDITED_POINTS {
LOOP_KEYS {
- if(k==0) {
+ if (k==0) {
dfra = *(key+1)->time - *key->time;
- if(dfra <= 0.0f)
+ if (dfra <= 0.0f)
continue;
sub_v3_v3v3(key->vel, (key+1)->co, key->co);
- if(point->totkey>2) {
+ if (point->totkey>2) {
sub_v3_v3v3(vec1, (key+1)->co, (key+2)->co);
project_v3_v3v3(vec2, vec1, key->vel);
sub_v3_v3v3(vec2, vec1, vec2);
madd_v3_v3fl(key->vel, vec2, 0.5f);
}
}
- else if(k==point->totkey-1) {
+ else if (k==point->totkey-1) {
dfra = *key->time - *(key-1)->time;
- if(dfra <= 0.0f)
+ if (dfra <= 0.0f)
continue;
sub_v3_v3v3(key->vel, key->co, (key-1)->co);
- if(point->totkey>2) {
+ if (point->totkey>2) {
sub_v3_v3v3(vec1, (key-2)->co, (key-1)->co);
project_v3_v3v3(vec2, vec1, key->vel);
sub_v3_v3v3(vec2, vec1, vec2);
@@ -1203,7 +1203,7 @@ static void update_velocities(PTCacheEdit *edit)
else {
dfra = *(key+1)->time - *(key-1)->time;
- if(dfra <= 0.0f)
+ if (dfra <= 0.0f)
continue;
sub_v3_v3v3(key->vel, (key+1)->co, (key-1)->co);
@@ -1221,11 +1221,11 @@ void PE_update_object(Scene *scene, Object *ob, int useflag)
PTCacheEdit *edit = PE_get_current(scene, ob);
POINT_P;
- if(!edit)
+ if (!edit)
return;
/* flag all particles to be updated if not using flag */
- if(!useflag)
+ if (!useflag)
LOOP_POINTS {
point->flag |= PEP_EDIT_RECALC;
}
@@ -1234,11 +1234,11 @@ void PE_update_object(Scene *scene, Object *ob, int useflag)
pe_iterate_lengths(scene, edit);
pe_deflect_emitter(scene, ob, edit);
PE_apply_lengths(scene, edit);
- if(pe_x_mirror(ob))
+ if (pe_x_mirror(ob))
PE_apply_mirror(ob,edit->psys);
- if(edit->psys)
+ if (edit->psys)
update_world_cos(ob, edit);
- if(pset->flag & PE_AUTO_VELOCITY)
+ if (pset->flag & PE_AUTO_VELOCITY)
update_velocities(edit);
PE_hide_keys_time(scene, edit, CFRA);
@@ -1250,7 +1250,7 @@ void PE_update_object(Scene *scene, Object *ob, int useflag)
point->flag &= ~PEP_EDIT_RECALC;
}
- if(edit->psys)
+ if (edit->psys)
edit->psys->flag &= ~PSYS_HAIR_UPDATED;
}
@@ -1266,7 +1266,7 @@ static void select_key(PEData *data, int point_index, int key_index)
PTCacheEditPoint *point = edit->points + point_index;
PTCacheEditKey *key = point->keys + key_index;
- if(data->select)
+ if (data->select)
key->flag |= PEK_SELECT;
else
key->flag &= ~PEK_SELECT;
@@ -1281,7 +1281,7 @@ static void select_keys(PEData *data, int point_index, int UNUSED(key_index))
KEY_K;
LOOP_KEYS {
- if(data->select)
+ if (data->select)
key->flag |= PEK_SELECT;
else
key->flag &= ~PEK_SELECT;
@@ -1342,7 +1342,8 @@ static int pe_select_all_exec(bContext *C, wmOperator *op)
if ((key->flag & PEK_SELECT) == 0) {
key->flag |= PEK_SELECT;
point->flag |= PEP_EDIT_RECALC;
- } else {
+ }
+ else {
key->flag &= ~PEK_SELECT;
point->flag |= PEP_EDIT_RECALC;
}
@@ -1360,15 +1361,15 @@ static int pe_select_all_exec(bContext *C, wmOperator *op)
void PARTICLE_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Selection of all particles";
- ot->idname= "PARTICLE_OT_select_all";
+ ot->name = "(De)select All";
+ ot->idname = "PARTICLE_OT_select_all";
/* api callbacks */
- ot->exec= pe_select_all_exec;
- ot->poll= PE_poll;
+ ot->exec = pe_select_all_exec;
+ ot->poll = PE_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -1383,10 +1384,10 @@ int PE_mouse_particles(bContext *C, const int mval[2], int extend)
PTCacheEdit *edit= PE_get_current(scene, ob);
POINT_P; KEY_K;
- if(!PE_start_edit(edit))
+ if (!PE_start_edit(edit))
return OPERATOR_CANCELLED;
- if(!extend) {
+ if (!extend) {
LOOP_VISIBLE_POINTS {
LOOP_SELECTED_KEYS {
key->flag &= ~PEK_SELECT;
@@ -1434,15 +1435,15 @@ static int select_roots_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_select_roots(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Roots";
- ot->idname= "PARTICLE_OT_select_roots";
+ ot->name = "Select Roots";
+ ot->idname = "PARTICLE_OT_select_roots";
/* api callbacks */
- ot->exec= select_roots_exec;
- ot->poll= PE_poll;
+ ot->exec = select_roots_exec;
+ ot->poll = PE_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ select last operator ************************/
@@ -1474,15 +1475,15 @@ static int select_tips_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_select_tips(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Tips";
- ot->idname= "PARTICLE_OT_select_tips";
+ ot->name = "Select Tips";
+ ot->idname = "PARTICLE_OT_select_tips";
/* api callbacks */
- ot->exec= select_tips_exec;
- ot->poll= PE_poll;
+ ot->exec = select_tips_exec;
+ ot->poll = PE_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ select linked operator ************************/
@@ -1518,16 +1519,16 @@ static int select_linked_invoke(bContext *C, wmOperator *op, wmEvent *event)
void PARTICLE_OT_select_linked(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Linked";
- ot->idname= "PARTICLE_OT_select_linked";
+ ot->name = "Select Linked";
+ ot->idname = "PARTICLE_OT_select_linked";
/* api callbacks */
- ot->exec= select_linked_exec;
- ot->invoke= select_linked_invoke;
- ot->poll= PE_poll_view3d;
+ ot->exec = select_linked_exec;
+ ot->invoke = select_linked_invoke;
+ ot->poll = PE_poll_view3d;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked keys rather than selecting them");
@@ -1554,7 +1555,7 @@ int PE_border_select(bContext *C, rcti *rect, int select, int extend)
PTCacheEdit *edit= PE_get_current(scene, ob);
PEData data;
- if(!PE_start_edit(edit))
+ if (!PE_start_edit(edit))
return OPERATOR_CANCELLED;
if (extend == 0 && select)
@@ -1581,7 +1582,7 @@ int PE_circle_select(bContext *C, int selecting, const int mval[2], float rad)
PTCacheEdit *edit= PE_get_current(scene, ob);
PEData data;
- if(!PE_start_edit(edit))
+ if (!PE_start_edit(edit))
return OPERATOR_FINISHED;
PE_set_view3d_data(C, &data);
@@ -1614,7 +1615,7 @@ int PE_lasso_select(bContext *C, int mcords[][2], short moves, short extend, sho
PEData data;
- if(!PE_start_edit(edit))
+ if (!PE_start_edit(edit))
return OPERATOR_CANCELLED;
if (extend == 0 && select)
@@ -1624,38 +1625,38 @@ int PE_lasso_select(bContext *C, int mcords[][2], short moves, short extend, sho
PE_set_view3d_data(C, &data);
LOOP_VISIBLE_POINTS {
- if(edit->psys && !(psys->flag & PSYS_GLOBAL_HAIR))
+ if (edit->psys && !(psys->flag & PSYS_GLOBAL_HAIR))
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, psys->particles + p, mat);
- if(pset->selectmode==SCE_SELECT_POINT) {
+ if (pset->selectmode==SCE_SELECT_POINT) {
LOOP_KEYS {
copy_v3_v3(co, key->co);
mul_m4_v3(mat, co);
project_int(ar, co, vertco);
- if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1]) && key_test_depth(&data, co)) {
- if(select && !(key->flag & PEK_SELECT)) {
+ if ((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1]) && key_test_depth(&data, co)) {
+ if (select && !(key->flag & PEK_SELECT)) {
key->flag |= PEK_SELECT;
point->flag |= PEP_EDIT_RECALC;
}
- else if(key->flag & PEK_SELECT) {
+ else if (key->flag & PEK_SELECT) {
key->flag &= ~PEK_SELECT;
point->flag |= PEP_EDIT_RECALC;
}
}
}
}
- else if(pset->selectmode==SCE_SELECT_END) {
+ else if (pset->selectmode==SCE_SELECT_END) {
key= point->keys + point->totkey - 1;
copy_v3_v3(co, key->co);
mul_m4_v3(mat, co);
project_int(ar, co,vertco);
- if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1]) && key_test_depth(&data, co)) {
- if(select && !(key->flag & PEK_SELECT)) {
+ if ((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1]) && key_test_depth(&data, co)) {
+ if (select && !(key->flag & PEK_SELECT)) {
key->flag |= PEK_SELECT;
point->flag |= PEP_EDIT_RECALC;
}
- else if(key->flag & PEK_SELECT) {
+ else if (key->flag & PEK_SELECT) {
key->flag &= ~PEK_SELECT;
point->flag |= PEP_EDIT_RECALC;
}
@@ -1678,7 +1679,7 @@ static int hide_exec(bContext *C, wmOperator *op)
PTCacheEdit *edit= PE_get_current(scene, ob);
POINT_P; KEY_K;
- if(RNA_enum_get(op->ptr, "unselected")) {
+ if (RNA_enum_get(op->ptr, "unselected")) {
LOOP_UNSELECTED_POINTS {
point->flag |= PEP_HIDE;
point->flag |= PEP_EDIT_RECALC;
@@ -1706,15 +1707,15 @@ static int hide_exec(bContext *C, wmOperator *op)
void PARTICLE_OT_hide(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Hide Selected";
- ot->idname= "PARTICLE_OT_hide";
+ ot->name = "Hide Selected";
+ ot->idname = "PARTICLE_OT_hide";
/* api callbacks */
- ot->exec= hide_exec;
- ot->poll= PE_poll;
+ ot->exec = hide_exec;
+ ot->poll = PE_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
@@ -1730,7 +1731,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
POINT_P; KEY_K;
LOOP_POINTS {
- if(point->flag & PEP_HIDE) {
+ if (point->flag & PEP_HIDE) {
point->flag &= ~PEP_HIDE;
point->flag |= PEP_EDIT_RECALC;
@@ -1748,15 +1749,15 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_reveal(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reveal";
- ot->idname= "PARTICLE_OT_reveal";
+ ot->name = "Reveal";
+ ot->idname = "PARTICLE_OT_reveal";
/* api callbacks */
- ot->exec= reveal_exec;
- ot->poll= PE_poll;
+ ot->exec = reveal_exec;
+ ot->poll = PE_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ select less operator ************************/
@@ -1768,22 +1769,22 @@ static void select_less_keys(PEData *data, int point_index)
KEY_K;
LOOP_SELECTED_KEYS {
- if(k==0) {
- if(((key+1)->flag&PEK_SELECT)==0)
+ if (k==0) {
+ if (((key+1)->flag&PEK_SELECT)==0)
key->flag |= PEK_TAG;
}
- else if(k==point->totkey-1) {
- if(((key-1)->flag&PEK_SELECT)==0)
+ else if (k==point->totkey-1) {
+ if (((key-1)->flag&PEK_SELECT)==0)
key->flag |= PEK_TAG;
}
else {
- if((((key-1)->flag & (key+1)->flag) & PEK_SELECT)==0)
+ if ((((key-1)->flag & (key+1)->flag) & PEK_SELECT)==0)
key->flag |= PEK_TAG;
}
}
LOOP_KEYS {
- if(key->flag&PEK_TAG) {
+ if (key->flag&PEK_TAG) {
key->flag &= ~(PEK_TAG|PEK_SELECT);
point->flag |= PEP_EDIT_RECALC; /* redraw selection only */
}
@@ -1806,15 +1807,15 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_select_less(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Less";
- ot->idname= "PARTICLE_OT_select_less";
+ ot->name = "Select Less";
+ ot->idname = "PARTICLE_OT_select_less";
/* api callbacks */
- ot->exec= select_less_exec;
- ot->poll= PE_poll;
+ ot->exec = select_less_exec;
+ ot->poll = PE_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ select more operator ************************/
@@ -1826,24 +1827,24 @@ static void select_more_keys(PEData *data, int point_index)
KEY_K;
LOOP_KEYS {
- if(key->flag & PEK_SELECT) continue;
+ if (key->flag & PEK_SELECT) continue;
- if(k==0) {
- if((key+1)->flag&PEK_SELECT)
+ if (k==0) {
+ if ((key+1)->flag&PEK_SELECT)
key->flag |= PEK_TAG;
}
- else if(k==point->totkey-1) {
- if((key-1)->flag&PEK_SELECT)
+ else if (k==point->totkey-1) {
+ if ((key-1)->flag&PEK_SELECT)
key->flag |= PEK_TAG;
}
else {
- if(((key-1)->flag | (key+1)->flag) & PEK_SELECT)
+ if (((key-1)->flag | (key+1)->flag) & PEK_SELECT)
key->flag |= PEK_TAG;
}
}
LOOP_KEYS {
- if(key->flag&PEK_TAG) {
+ if (key->flag&PEK_TAG) {
key->flag &= ~PEK_TAG;
key->flag |= PEK_SELECT;
point->flag |= PEP_EDIT_RECALC; /* redraw selection only */
@@ -1867,15 +1868,15 @@ static int select_more_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_select_more(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select More";
- ot->idname= "PARTICLE_OT_select_more";
+ ot->name = "Select More";
+ ot->idname = "PARTICLE_OT_select_more";
/* api callbacks */
- ot->exec= select_more_exec;
- ot->poll= PE_poll;
+ ot->exec = select_more_exec;
+ ot->poll = PE_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ rekey operator ************************/
@@ -1911,7 +1912,7 @@ static void rekey_particle(PEData *data, int pa_index)
dval= (end - sta) / (float)(data->totrekey - 1);
/* interpolate new keys from old ones */
- for(k=1,key++; k<data->totrekey-1; k++,key++) {
+ for (k=1,key++; k<data->totrekey-1; k++,key++) {
state.time= (float)k / (float)(data->totrekey-1);
psys_get_particle_on_path(&sim, pa_index, &state, 0);
copy_v3_v3(key->co, state.co);
@@ -1919,22 +1920,22 @@ static void rekey_particle(PEData *data, int pa_index)
}
/* replace keys */
- if(pa->hair)
+ if (pa->hair)
MEM_freeN(pa->hair);
pa->hair= new_keys;
point->totkey=pa->totkey=data->totrekey;
- if(point->keys)
+ if (point->keys)
MEM_freeN(point->keys);
ekey= point->keys= MEM_callocN(pa->totkey * sizeof(PTCacheEditKey),"Hair re-key edit keys");
- for(k=0, key=pa->hair; k<pa->totkey; k++, key++, ekey++) {
+ for (k=0, key=pa->hair; k<pa->totkey; k++, key++, ekey++) {
ekey->co= key->co;
ekey->time= &key->time;
ekey->flag |= PEK_SELECT;
- if(!(psys->flag & PSYS_GLOBAL_HAIR))
+ if (!(psys->flag & PSYS_GLOBAL_HAIR))
ekey->flag |= PEK_USE_WCO;
}
@@ -1963,16 +1964,16 @@ static int rekey_exec(bContext *C, wmOperator *op)
void PARTICLE_OT_rekey(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Rekey";
- ot->idname= "PARTICLE_OT_rekey";
+ ot->name = "Rekey";
+ ot->idname = "PARTICLE_OT_rekey";
/* api callbacks */
- ot->exec= rekey_exec;
- ot->invoke= WM_operator_props_popup;
- ot->poll= PE_poll;
+ ot->exec = rekey_exec;
+ ot->invoke = WM_operator_props_popup;
+ ot->poll = PE_hair_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "keys", 2, 2, INT_MAX, "Number of Keys", "", 2, 100);
@@ -1989,7 +1990,7 @@ static void rekey_particle_to_time(Scene *scene, Object *ob, int pa_index, float
PTCacheEditKey *ekey;
int k;
- if(!edit || !edit->psys) return;
+ if (!edit || !edit->psys) return;
psys = edit->psys;
@@ -2004,19 +2005,19 @@ static void rekey_particle_to_time(Scene *scene, Object *ob, int pa_index, float
key= new_keys= MEM_dupallocN(pa->hair);
/* interpolate new keys from old ones (roots stay the same) */
- for(k=1, key++; k < pa->totkey; k++, key++) {
+ for (k=1, key++; k < pa->totkey; k++, key++) {
state.time= path_time * (float)k / (float)(pa->totkey-1);
psys_get_particle_on_path(&sim, pa_index, &state, 0);
copy_v3_v3(key->co, state.co);
}
/* replace hair keys */
- if(pa->hair)
+ if (pa->hair)
MEM_freeN(pa->hair);
pa->hair= new_keys;
/* update edit pointers */
- for(k=0, key=pa->hair, ekey=edit->points[pa_index].keys; k<pa->totkey; k++, key++, ekey++) {
+ for (k=0, key=pa->hair, ekey=edit->points[pa_index].keys; k<pa->totkey; k++, key++, ekey++) {
ekey->co= key->co;
ekey->time= &key->time;
}
@@ -2035,7 +2036,7 @@ static int remove_tagged_particles(Object *ob, ParticleSystem *psys, int mirror)
ParticleSystemModifierData *psmd;
int i, new_totpart= psys->totpart, removed= 0;
- if(mirror) {
+ if (mirror) {
/* mirror tags */
psmd= psys_get_modifier(ob, psys);
@@ -2049,16 +2050,16 @@ static int remove_tagged_particles(Object *ob, ParticleSystem *psys, int mirror)
removed++;
}
- if(new_totpart != psys->totpart) {
- if(new_totpart) {
+ if (new_totpart != psys->totpart) {
+ if (new_totpart) {
npa= new_pars= MEM_callocN(new_totpart * sizeof(ParticleData), "ParticleData array");
npoint= new_points= MEM_callocN(new_totpart * sizeof(PTCacheEditPoint), "PTCacheEditKey array");
- if(ELEM(NULL, new_pars, new_points)) {
+ if (ELEM(NULL, new_pars, new_points)) {
/* allocation error! */
- if(new_pars)
+ if (new_pars)
MEM_freeN(new_pars);
- if(new_points)
+ if (new_points)
MEM_freeN(new_points);
return 0;
}
@@ -2066,11 +2067,11 @@ static int remove_tagged_particles(Object *ob, ParticleSystem *psys, int mirror)
pa= psys->particles;
point= edit->points;
- for(i=0; i<psys->totpart; i++, pa++, point++) {
- if(point->flag & PEP_TAG) {
- if(point->keys)
+ for (i=0; i<psys->totpart; i++, pa++, point++) {
+ if (point->flag & PEP_TAG) {
+ if (point->keys)
MEM_freeN(point->keys);
- if(pa->hair)
+ if (pa->hair)
MEM_freeN(pa->hair);
}
else {
@@ -2081,18 +2082,18 @@ static int remove_tagged_particles(Object *ob, ParticleSystem *psys, int mirror)
}
}
- if(psys->particles) MEM_freeN(psys->particles);
+ if (psys->particles) MEM_freeN(psys->particles);
psys->particles= new_pars;
- if(edit->points) MEM_freeN(edit->points);
+ if (edit->points) MEM_freeN(edit->points);
edit->points= new_points;
- if(edit->mirror_cache) {
+ if (edit->mirror_cache) {
MEM_freeN(edit->mirror_cache);
edit->mirror_cache= NULL;
}
- if(psys->child) {
+ if (psys->child) {
MEM_freeN(psys->child);
psys->child= NULL;
psys->totchild=0;
@@ -2114,7 +2115,7 @@ static void remove_tagged_keys(Object *ob, ParticleSystem *psys)
ParticleSystemModifierData *psmd;
short new_totkey;
- if(pe_x_mirror(ob)) {
+ if (pe_x_mirror(ob)) {
/* mirror key tags */
psmd= psys_get_modifier(ob, psys);
@@ -2132,7 +2133,7 @@ static void remove_tagged_keys(Object *ob, ParticleSystem *psys)
new_totkey--;
}
/* we can't have elements with less than two keys*/
- if(new_totkey < 2)
+ if (new_totkey < 2)
point->flag |= PEP_TAG;
}
remove_tagged_particles(ob, psys, pe_x_mirror(ob));
@@ -2145,18 +2146,18 @@ static void remove_tagged_keys(Object *ob, ParticleSystem *psys)
new_totkey--;
}
- if(new_totkey != pa->totkey) {
+ if (new_totkey != pa->totkey) {
nhkey= new_hkeys= MEM_callocN(new_totkey*sizeof(HairKey), "HairKeys");
nkey= new_keys= MEM_callocN(new_totkey*sizeof(PTCacheEditKey), "particle edit keys");
hkey= pa->hair;
LOOP_KEYS {
- while(key->flag & PEK_TAG && hkey < pa->hair + pa->totkey) {
+ while (key->flag & PEK_TAG && hkey < pa->hair + pa->totkey) {
key++;
hkey++;
}
- if(hkey < pa->hair + pa->totkey) {
+ if (hkey < pa->hair + pa->totkey) {
copy_v3_v3(nhkey->co, hkey->co);
nhkey->editflag = hkey->editflag;
nhkey->time= hkey->time;
@@ -2175,10 +2176,10 @@ static void remove_tagged_keys(Object *ob, ParticleSystem *psys)
hkey++;
}
- if(pa->hair)
+ if (pa->hair)
MEM_freeN(pa->hair);
- if(point->keys)
+ if (point->keys)
MEM_freeN(point->keys);
pa->hair= new_hkeys;
@@ -2214,12 +2215,12 @@ static void subdivide_particle(PEData *data, int pa_index)
sim.ob= data->ob;
sim.psys= edit->psys;
- for(k=0, ekey=point->keys; k<pa->totkey-1; k++,ekey++) {
- if(ekey->flag&PEK_SELECT && (ekey+1)->flag&PEK_SELECT)
+ for (k=0, ekey=point->keys; k<pa->totkey-1; k++,ekey++) {
+ if (ekey->flag&PEK_SELECT && (ekey+1)->flag&PEK_SELECT)
totnewkey++;
}
- if(totnewkey==0) return;
+ if (totnewkey==0) return;
pa->flag |= PARS_REKEY;
@@ -2229,7 +2230,7 @@ static void subdivide_particle(PEData *data, int pa_index)
key = pa->hair;
endtime= key[pa->totkey-1].time;
- for(k=0, ekey=point->keys; k<pa->totkey-1; k++, key++, ekey++) {
+ for (k=0, ekey=point->keys; k<pa->totkey-1; k++, key++, ekey++) {
memcpy(nkey,key,sizeof(HairKey));
memcpy(nekey,ekey,sizeof(PTCacheEditKey));
@@ -2240,7 +2241,7 @@ static void subdivide_particle(PEData *data, int pa_index)
nkey++;
nekey++;
- if(ekey->flag & PEK_SELECT && (ekey+1)->flag & PEK_SELECT) {
+ if (ekey->flag & PEK_SELECT && (ekey+1)->flag & PEK_SELECT) {
nkey->time= (key->time + (key+1)->time)*0.5f;
state.time= (endtime != 0.0f)? nkey->time/endtime: 0.0f;
psys_get_particle_on_path(&sim, pa_index, &state, 0);
@@ -2249,7 +2250,7 @@ static void subdivide_particle(PEData *data, int pa_index)
nekey->co= nkey->co;
nekey->time= &nkey->time;
nekey->flag |= PEK_SELECT;
- if(!(psys->flag & PSYS_GLOBAL_HAIR))
+ if (!(psys->flag & PSYS_GLOBAL_HAIR))
nekey->flag |= PEK_USE_WCO;
nekey++;
@@ -2263,11 +2264,11 @@ static void subdivide_particle(PEData *data, int pa_index)
nekey->co= nkey->co;
nekey->time= &nkey->time;
- if(pa->hair)
+ if (pa->hair)
MEM_freeN(pa->hair);
pa->hair= new_keys;
- if(point->keys)
+ if (point->keys)
MEM_freeN(point->keys);
point->keys= new_ekeys;
@@ -2293,15 +2294,15 @@ static int subdivide_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_subdivide(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Subdivide";
- ot->idname= "PARTICLE_OT_subdivide";
+ ot->name = "Subdivide";
+ ot->idname = "PARTICLE_OT_subdivide";
/* api callbacks */
- ot->exec= subdivide_exec;
- ot->poll= PE_poll;
+ ot->exec = subdivide_exec;
+ ot->poll = PE_hair_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ remove doubles opertor *********************/
@@ -2319,7 +2320,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
float mat[4][4], co[3], threshold= RNA_float_get(op->ptr, "threshold");
int n, totn, removed, totremoved;
- if(psys->flag & PSYS_GLOBAL_HAIR)
+ if (psys->flag & PSYS_GLOBAL_HAIR)
return OPERATOR_CANCELLED;
edit= psys->edit;
@@ -2349,10 +2350,10 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
totn= BLI_kdtree_find_n_nearest(tree,10,co,NULL,nearest);
- for(n=0; n<totn; n++) {
+ for (n=0; n<totn; n++) {
/* this needs a custom threshold still */
- if(nearest[n].index > p && nearest[n].dist < threshold) {
- if(!(point->flag & PEP_TAG)) {
+ if (nearest[n].index > p && nearest[n].dist < threshold) {
+ if (!(point->flag & PEP_TAG)) {
point->flag |= PEP_TAG;
removed++;
}
@@ -2365,9 +2366,9 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
/* remove tagged particles - don't do mirror here! */
remove_tagged_particles(ob, psys, 0);
totremoved += removed;
- } while(removed);
+ } while (removed);
- if(totremoved == 0)
+ if (totremoved == 0)
return OPERATOR_CANCELLED;
BKE_reportf(op->reports, RPT_INFO, "Remove %d double particles", totremoved);
@@ -2381,15 +2382,15 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
void PARTICLE_OT_remove_doubles(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Doubles";
- ot->idname= "PARTICLE_OT_remove_doubles";
+ ot->name = "Remove Doubles";
+ ot->idname = "PARTICLE_OT_remove_doubles";
/* api callbacks */
- ot->exec= remove_doubles_exec;
- ot->poll= PE_poll;
+ ot->exec = remove_doubles_exec;
+ ot->poll = PE_hair_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_float(ot->srna, "threshold", 0.0002f, 0.0f, FLT_MAX, "Threshold", "Threshold distance withing which particles are removed", 0.00001f, 0.1f);
@@ -2431,15 +2432,15 @@ static int weight_set_exec(bContext *C, wmOperator *op)
void PARTICLE_OT_weight_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Weight Set";
- ot->idname= "PARTICLE_OT_weight_set";
+ ot->name = "Weight Set";
+ ot->idname = "PARTICLE_OT_weight_set";
/* api callbacks */
- ot->exec= weight_set_exec;
- ot->poll= PE_poll;
+ ot->exec = weight_set_exec;
+ ot->poll = PE_hair_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_float(ot->srna, "factor", 1, 0, 1, "Factor", "", 0, 1);
}
@@ -2451,12 +2452,12 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata)
ParticleEditSettings *pset= PE_settings(CTX_data_scene(C));
ParticleBrushData *brush;
- if(pset->brushtype < 0)
+ if (pset->brushtype < 0)
return;
brush= &pset->brush[pset->brushtype];
- if(brush) {
+ if (brush) {
glPushMatrix();
glTranslatef((float)x, (float)y, 0.0f);
@@ -2476,11 +2477,11 @@ static void toggle_particle_cursor(bContext *C, int enable)
{
ParticleEditSettings *pset= PE_settings(CTX_data_scene(C));
- if(pset->paintcursor && !enable) {
+ if (pset->paintcursor && !enable) {
WM_paint_cursor_end(CTX_wm_manager(C), pset->paintcursor);
pset->paintcursor = NULL;
}
- else if(enable)
+ else if (enable)
pset->paintcursor= WM_paint_cursor_activate(CTX_wm_manager(C), PE_poll_view3d, brush_drawcursor, NULL);
}
@@ -2514,12 +2515,12 @@ static int delete_exec(bContext *C, wmOperator *op)
PE_set_data(C, &data);
- if(type == DEL_KEY) {
+ if (type == DEL_KEY) {
foreach_selected_key(&data, set_delete_particle_key);
remove_tagged_keys(data.ob, data.edit->psys);
recalc_lengths(data.edit);
}
- else if(type == DEL_PARTICLE) {
+ else if (type == DEL_PARTICLE) {
foreach_selected_point(&data, set_delete_particle);
remove_tagged_particles(data.ob, data.edit->psys, pe_x_mirror(data.ob));
recalc_lengths(data.edit);
@@ -2534,19 +2535,19 @@ static int delete_exec(bContext *C, wmOperator *op)
void PARTICLE_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete";
- ot->idname= "PARTICLE_OT_delete";
+ ot->name = "Delete";
+ ot->idname = "PARTICLE_OT_delete";
/* api callbacks */
- ot->exec= delete_exec;
- ot->invoke= WM_menu_invoke;
- ot->poll= PE_hair_poll;
+ ot->exec = delete_exec;
+ ot->invoke = WM_menu_invoke;
+ ot->poll = PE_hair_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", delete_type_items, DEL_PARTICLE, "Type", "Delete a full particle or only keys");
+ ot->prop = RNA_def_enum(ot->srna, "type", delete_type_items, DEL_PARTICLE, "Type", "Delete a full particle or only keys");
}
/*************************** mirror operator **************************/
@@ -2564,25 +2565,25 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
int *mirrorfaces = NULL;
int rotation, totpart, newtotpart;
- if(psys->flag & PSYS_GLOBAL_HAIR)
+ if (psys->flag & PSYS_GLOBAL_HAIR)
return;
psmd= psys_get_modifier(ob, psys);
- if(!psmd->dm)
+ if (!psmd->dm)
return;
mirrorfaces= mesh_get_x_mirror_faces(ob, NULL);
- if(!edit->mirror_cache)
+ if (!edit->mirror_cache)
PE_update_mirror_cache(ob, psys);
totpart= psys->totpart;
newtotpart= psys->totpart;
LOOP_VISIBLE_POINTS {
pa = psys->particles + p;
- if(!tagged) {
- if(point_is_selected(point)) {
- if(edit->mirror_cache[p] != -1) {
+ if (!tagged) {
+ if (point_is_selected(point)) {
+ if (edit->mirror_cache[p] != -1) {
/* already has a mirror, don't need to duplicate */
PE_mirror_particle(ob, psmd->dm, psys, pa, NULL);
continue;
@@ -2592,28 +2593,28 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
}
}
- if((point->flag & PEP_TAG) && mirrorfaces[pa->num*2] != -1)
+ if ((point->flag & PEP_TAG) && mirrorfaces[pa->num*2] != -1)
newtotpart++;
}
- if(newtotpart != psys->totpart) {
+ if (newtotpart != psys->totpart) {
/* allocate new arrays and copy existing */
new_pars= MEM_callocN(newtotpart*sizeof(ParticleData), "ParticleData new");
new_points= MEM_callocN(newtotpart*sizeof(PTCacheEditPoint), "PTCacheEditPoint new");
- if(psys->particles) {
+ if (psys->particles) {
memcpy(new_pars, psys->particles, totpart*sizeof(ParticleData));
MEM_freeN(psys->particles);
}
psys->particles= new_pars;
- if(edit->points) {
+ if (edit->points) {
memcpy(new_points, edit->points, totpart*sizeof(PTCacheEditPoint));
MEM_freeN(edit->points);
}
edit->points= new_points;
- if(edit->mirror_cache) {
+ if (edit->mirror_cache) {
MEM_freeN(edit->mirror_cache);
edit->mirror_cache= NULL;
}
@@ -2624,19 +2625,19 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
newpa= psys->particles + totpart;
newpoint= edit->points + totpart;
- for(p=0, point=edit->points; p<totpart; p++, point++) {
+ for (p=0, point=edit->points; p<totpart; p++, point++) {
pa = psys->particles + p;
- if(point->flag & PEP_HIDE)
+ if (point->flag & PEP_HIDE)
continue;
- if(!(point->flag & PEP_TAG) || mirrorfaces[pa->num*2] == -1)
+ if (!(point->flag & PEP_TAG) || mirrorfaces[pa->num*2] == -1)
continue;
/* duplicate */
*newpa= *pa;
*newpoint= *point;
- if(pa->hair) newpa->hair= MEM_dupallocN(pa->hair);
- if(point->keys) newpoint->keys= MEM_dupallocN(point->keys);
+ if (pa->hair) newpa->hair= MEM_dupallocN(pa->hair);
+ if (point->keys) newpoint->keys= MEM_dupallocN(point->keys);
/* rotate weights according to vertex index rotation */
rotation= mirrorfaces[pa->num*2+1];
@@ -2644,11 +2645,13 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
newpa->fuv[1]= pa->fuv[1];
newpa->fuv[2]= pa->fuv[0];
newpa->fuv[3]= pa->fuv[3];
- while(rotation-- > 0)
- if(me->mface[pa->num].v4)
- SHIFT4(float, newpa->fuv[0], newpa->fuv[1], newpa->fuv[2], newpa->fuv[3])
- else
- SHIFT3(float, newpa->fuv[0], newpa->fuv[1], newpa->fuv[2])
+ while (rotation-- > 0)
+ if (me->mface[pa->num].v4) {
+ SHIFT4(float, newpa->fuv[0], newpa->fuv[1], newpa->fuv[2], newpa->fuv[3]);
+ }
+ else {
+ SHIFT3(float, newpa->fuv[0], newpa->fuv[1], newpa->fuv[2]);
+ }
/* assign face inddex */
newpa->num= mirrorfaces[pa->num*2];
@@ -2656,7 +2659,7 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
/* update edit key pointers */
key= newpoint->keys;
- for(k=0, hkey=newpa->hair; k<newpa->totkey; k++, hkey++, key++) {
+ for (k=0, hkey=newpa->hair; k<newpa->totkey; k++, hkey++, key++) {
key->co= hkey->co;
key->time= &hkey->time;
}
@@ -2694,15 +2697,15 @@ static int mirror_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_mirror(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mirror";
- ot->idname= "PARTICLE_OT_mirror";
+ ot->name = "Mirror";
+ ot->idname = "PARTICLE_OT_mirror";
/* api callbacks */
- ot->exec= mirror_exec;
- ot->poll= PE_poll;
+ ot->exec = mirror_exec;
+ ot->poll = PE_hair_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************* brush edit callbacks ********************/
@@ -2712,7 +2715,7 @@ static void brush_comb(PEData *data, float UNUSED(mat[][4]), float imat[][4], in
ParticleEditSettings *pset= PE_settings(data->scene);
float cvec[3], fac;
- if(pset->flag & PE_LOCK_FIRST && key_index == 0) return;
+ if (pset->flag & PE_LOCK_FIRST && key_index == 0) return;
fac= (float)pow((double)(1.0f - data->dist / data->rad), (double)data->combfac);
@@ -2737,10 +2740,10 @@ static void brush_cut(PEData *data, int pa_index)
int vertco[2];
/* blunt scissors */
- if(BLI_frand() > data->cutfac) return;
+ if (BLI_frand() > data->cutfac) return;
/* don't cut hidden */
- if(edit->points[pa_index].flag & PEP_HIDE)
+ if (edit->points[pa_index].flag & PEP_HIDE)
return;
rad2= data->rad * data->rad;
@@ -2758,16 +2761,16 @@ static void brush_cut(PEData *data, int pa_index)
xo1= x1 - o1;
/* check if root is inside circle */
- if(xo0*xo0 + xo1*xo1 < rad2 && key_test_depth(data, key->co)) {
+ if (xo0*xo0 + xo1*xo1 < rad2 && key_test_depth(data, key->co)) {
cut_time= -1.0f;
cut= 1;
}
else {
/* calculate path time closest to root that was inside the circle */
- for(k=1, key++; k<=keys; k++, key++) {
+ for (k=1, key++; k<=keys; k++, key++) {
project_int_noclip(ar, key->co, vertco);
- if(key_test_depth(data, key->co) == 0) {
+ if (key_test_depth(data, key->co) == 0) {
x0= (float)vertco[0];
x1= (float)vertco[1];
@@ -2785,15 +2788,15 @@ static void brush_cut(PEData *data, int pa_index)
d= dv * rad2 - d*d;
- if(d > 0.0f) {
+ if (d > 0.0f) {
d= sqrt(d);
cut_time= -(v0*xo0 + v1*xo1 + d);
- if(cut_time > 0.0f) {
+ if (cut_time > 0.0f) {
cut_time /= dv;
- if(cut_time < 1.0f) {
+ if (cut_time < 1.0f) {
cut_time += (float)(k-1);
cut_time /= (float)keys;
cut= 1;
@@ -2810,8 +2813,8 @@ static void brush_cut(PEData *data, int pa_index)
}
}
- if(cut) {
- if(cut_time < 0.0f) {
+ if (cut) {
+ if (cut_time < 0.0f) {
edit->points[pa_index].flag |= PEP_TAG;
}
else {
@@ -2829,7 +2832,7 @@ static void brush_length(PEData *data, int point_index)
float dvec[3],pvec[3] = {0.0f, 0.0f, 0.0f};
LOOP_KEYS {
- if(k==0) {
+ if (k==0) {
copy_v3_v3(pvec,key->co);
}
else {
@@ -2861,7 +2864,7 @@ static void brush_puff(PEData *data, int point_index)
puff_volume = brush->flag & PE_BRUSH_DATA_PUFF_VOLUME;
}
- if(psys && !(psys->flag & PSYS_GLOBAL_HAIR)) {
+ if (psys && !(psys->flag & PSYS_GLOBAL_HAIR)) {
psys_mat_hair_to_global(data->ob, data->dm, psys->part->from, psys->particles + point_index, mat);
invert_m4_m4(imat,mat);
}
@@ -2871,14 +2874,14 @@ static void brush_puff(PEData *data, int point_index)
}
LOOP_KEYS {
- if(k==0) {
+ if (k==0) {
/* find root coordinate and normal on emitter */
copy_v3_v3(co, key->co);
mul_m4_v3(mat, co);
mul_v3_m4v3(kco, data->ob->imat, co); /* use 'kco' as the object space version of worldspace 'co', ob->imat is set before calling */
point_index= BLI_kdtree_find_nearest(edit->emitter_field, kco, NULL, NULL);
- if(point_index == -1) return;
+ if (point_index == -1) return;
copy_v3_v3(rootco, co);
copy_v3_v3(nor, &edit->emitter_cosnos[point_index*6+3]);
@@ -2889,7 +2892,7 @@ static void brush_puff(PEData *data, int point_index)
fac= (float)pow((double)(1.0f - data->dist / data->rad), (double)data->pufffac);
fac *= 0.025f;
- if(data->invert)
+ if (data->invert)
fac= -fac;
}
else {
@@ -2899,7 +2902,7 @@ static void brush_puff(PEData *data, int point_index)
copy_v3_v3(co, key->co);
mul_m4_v3(mat, co);
length += len_v3v3(lastco, co);
- if((data->select==0 || (key->flag & PEK_SELECT)) && !(key->flag & PEK_HIDE)) {
+ if ((data->select==0 || (key->flag & PEK_SELECT)) && !(key->flag & PEK_HIDE)) {
madd_v3_v3v3fl(kco, rootco, nor, length);
/* blend between the current and straight position */
@@ -2911,7 +2914,7 @@ static void brush_puff(PEData *data, int point_index)
mul_v3_m4v3(key->co, imat, co);
- if(puff_volume) {
+ if (puff_volume) {
/* accumulate the total distance moved to apply to unselected
* keys that come after */
ofs[0] += key->co[0] - dco[0];
@@ -2922,13 +2925,13 @@ static void brush_puff(PEData *data, int point_index)
}
else {
- if(puff_volume) {
+ if (puff_volume) {
#if 0
/* this is simple but looks bad, adds annoying kinks */
add_v3_v3(key->co, ofs);
#else
/* translate (not rotate) the rest of the hair if its not selected */
- if(ofs[0] || ofs[1] || ofs[2]) {
+ if (ofs[0] || ofs[1] || ofs[2]) {
#if 0 /* kindof works but looks worse then whats below */
/* Move the unselected point on a vector based on the
@@ -2953,7 +2956,7 @@ static void brush_puff(PEData *data, int point_index)
mul_v3_m4v3(kco, data->ob->imat, oco); /* use 'kco' as the object space version of worldspace 'co', ob->imat is set before calling */
point_index= BLI_kdtree_find_nearest(edit->emitter_field, kco, NULL, NULL);
- if(point_index != -1) {
+ if (point_index != -1) {
copy_v3_v3(onor, &edit->emitter_cosnos[point_index*6+3]);
mul_mat3_m4_v3(data->ob->obmat, onor); /* normal into worldspace */
mul_mat3_m4_v3(imat, onor); /* worldspace into particle space */
@@ -2971,7 +2974,7 @@ static void brush_puff(PEData *data, int point_index)
}
}
- if(change)
+ if (change)
point->flag |= PEP_EDIT_RECALC;
}
@@ -2979,7 +2982,7 @@ static void brush_puff(PEData *data, int point_index)
static void brush_weight(PEData *data, float UNUSED(mat[][4]), float UNUSED(imat[][4]), int point_index, int key_index, PTCacheEditKey *UNUSED(key))
{
/* roots have full weight allways */
- if(key_index) {
+ if (key_index) {
PTCacheEdit *edit = data->edit;
ParticleSystem *psys = edit->psys;
@@ -2992,7 +2995,7 @@ static void brush_weight(PEData *data, float UNUSED(mat[][4]), float UNUSED(imat
static void brush_smooth_get(PEData *data, float mat[][4], float UNUSED(imat[][4]), int UNUSED(point_index), int key_index, PTCacheEditKey *key)
{
- if(key_index) {
+ if (key_index) {
float dvec[3];
sub_v3_v3v3(dvec,key->co,(key-1)->co);
@@ -3006,7 +3009,7 @@ static void brush_smooth_do(PEData *data, float UNUSED(mat[][4]), float imat[][4
{
float vec[3], dvec[3];
- if(key_index) {
+ if (key_index) {
copy_v3_v3(vec, data->vec);
mul_mat3_m4_v3(imat,vec);
@@ -3052,16 +3055,16 @@ static int particle_intersect_dm(Scene *scene, Object *ob, DerivedMesh *dm,
float cur_d, cur_uv[2], v1[3], v2[3], v3[3], v4[3], min[3], max[3], p_min[3],p_max[3];
float cur_ipoint[3];
- if(dm == NULL){
+ if (dm == NULL) {
psys_disable_all(ob);
dm=mesh_get_derived_final(scene, ob, 0);
- if(dm == NULL)
+ if (dm == NULL)
dm=mesh_get_derived_deform(scene, ob, 0);
psys_enable_all(ob);
- if(dm == NULL)
+ if (dm == NULL)
return 0;
}
@@ -3069,12 +3072,12 @@ static int particle_intersect_dm(Scene *scene, Object *ob, DerivedMesh *dm,
DM_ensure_tessface(dm);
- if(pa_minmax==0){
+ if (pa_minmax==0) {
INIT_MINMAX(p_min,p_max);
DO_MINMAX(co1,p_min,p_max);
DO_MINMAX(co2,p_min,p_max);
}
- else{
+ else {
copy_v3_v3(p_min,pa_minmax);
copy_v3_v3(p_max,pa_minmax+3);
}
@@ -3084,51 +3087,51 @@ static int particle_intersect_dm(Scene *scene, Object *ob, DerivedMesh *dm,
mvert=dm->getVertDataArray(dm,CD_MVERT);
/* lets intersect the faces */
- for(i=0; i<totface; i++,mface++){
- if(vert_cos){
+ for (i=0; i<totface; i++,mface++) {
+ if (vert_cos) {
copy_v3_v3(v1,vert_cos+3*mface->v1);
copy_v3_v3(v2,vert_cos+3*mface->v2);
copy_v3_v3(v3,vert_cos+3*mface->v3);
- if(mface->v4)
+ if (mface->v4)
copy_v3_v3(v4,vert_cos+3*mface->v4);
}
- else{
+ else {
copy_v3_v3(v1,mvert[mface->v1].co);
copy_v3_v3(v2,mvert[mface->v2].co);
copy_v3_v3(v3,mvert[mface->v3].co);
- if(mface->v4)
+ if (mface->v4)
copy_v3_v3(v4,mvert[mface->v4].co);
}
- if(face_minmax==0){
+ if (face_minmax==0) {
INIT_MINMAX(min,max);
DO_MINMAX(v1,min,max);
DO_MINMAX(v2,min,max);
DO_MINMAX(v3,min,max);
- if(mface->v4)
- DO_MINMAX(v4,min,max)
- if(isect_aabb_aabb_v3(min,max,p_min,p_max)==0)
+ if (mface->v4)
+ DO_MINMAX(v4, min, max);
+ if (isect_aabb_aabb_v3(min,max,p_min,p_max)==0)
continue;
}
- else{
+ else {
copy_v3_v3(min, face_minmax+6*i);
copy_v3_v3(max, face_minmax+6*i+3);
- if(isect_aabb_aabb_v3(min,max,p_min,p_max)==0)
+ if (isect_aabb_aabb_v3(min,max,p_min,p_max)==0)
continue;
}
- if(radius>0.0f){
- if(isect_sweeping_sphere_tri_v3(co1, co2, radius, v2, v3, v1, &cur_d, cur_ipoint)){
- if(cur_d<*min_d){
+ if (radius>0.0f) {
+ if (isect_sweeping_sphere_tri_v3(co1, co2, radius, v2, v3, v1, &cur_d, cur_ipoint)) {
+ if (cur_d<*min_d) {
*min_d=cur_d;
copy_v3_v3(ipoint,cur_ipoint);
*min_face=i;
intersect=1;
}
}
- if(mface->v4){
- if(isect_sweeping_sphere_tri_v3(co1, co2, radius, v4, v1, v3, &cur_d, cur_ipoint)){
- if(cur_d<*min_d){
+ if (mface->v4) {
+ if (isect_sweeping_sphere_tri_v3(co1, co2, radius, v4, v1, v3, &cur_d, cur_ipoint)) {
+ if (cur_d<*min_d) {
*min_d=cur_d;
copy_v3_v3(ipoint,cur_ipoint);
*min_face=i;
@@ -3137,23 +3140,23 @@ static int particle_intersect_dm(Scene *scene, Object *ob, DerivedMesh *dm,
}
}
}
- else{
- if(isect_line_tri_v3(co1, co2, v1, v2, v3, &cur_d, cur_uv)){
- if(cur_d<*min_d){
+ else {
+ if (isect_line_tri_v3(co1, co2, v1, v2, v3, &cur_d, cur_uv)) {
+ if (cur_d<*min_d) {
*min_d=cur_d;
min_w[0]= 1.0f - cur_uv[0] - cur_uv[1];
min_w[1]= cur_uv[0];
min_w[2]= cur_uv[1];
min_w[3]= 0.0f;
- if(mface->v4)
+ if (mface->v4)
intersect_dm_quad_weights(v1, v2, v3, v4, min_w);
*min_face=i;
intersect=1;
}
}
- if(mface->v4){
- if(isect_line_tri_v3(co1, co2, v1, v3, v4, &cur_d, cur_uv)){
- if(cur_d<*min_d){
+ if (mface->v4) {
+ if (isect_line_tri_v3(co1, co2, v1, v3, v4, &cur_d, cur_uv)) {
+ if (cur_d<*min_d) {
*min_d=cur_d;
min_w[0]= 1.0f - cur_uv[0] - cur_uv[1];
min_w[1]= 0.0f;
@@ -3190,7 +3193,7 @@ static int brush_add(PEData *data, short number)
DerivedMesh *dm=0;
invert_m4_m4(imat,ob->obmat);
- if(psys->flag & PSYS_GLOBAL_HAIR)
+ if (psys->flag & PSYS_GLOBAL_HAIR)
return 0;
BLI_srandom(psys->seed+data->mval[0]+data->mval[1]);
@@ -3203,15 +3206,15 @@ static int brush_add(PEData *data, short number)
timestep= psys_get_timestep(&sim);
/* painting onto the deformed mesh, could be an option? */
- if(psmd->dm->deformedOnly)
+ if (psmd->dm->deformedOnly)
dm= psmd->dm;
else
dm= mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
- for(i=0; i<number; i++) {
- if(number>1) {
+ for (i=0; i<number; i++) {
+ if (number>1) {
dmx=dmy=size;
- while(dmx*dmx+dmy*dmy>size2) {
+ while (dmx*dmx+dmy*dmy>size2) {
dmx=(short)((2.0f*BLI_frand()-1.0f)*size);
dmy=(short)((2.0f*BLI_frand()-1.0f)*size);
}
@@ -3226,12 +3229,12 @@ static int brush_add(PEData *data, short number)
min_d=2.0;
/* warning, returns the derived mesh face */
- if(particle_intersect_dm(scene, ob,dm,0,co1,co2,&min_d,&add_pars[n].num,add_pars[n].fuv,0,0,0,0)) {
+ if (particle_intersect_dm(scene, ob,dm,0,co1,co2,&min_d,&add_pars[n].num,add_pars[n].fuv,0,0,0,0)) {
add_pars[n].num_dmcache= psys_particle_dm_face_lookup(ob,psmd->dm,add_pars[n].num,add_pars[n].fuv,NULL);
n++;
}
}
- if(n) {
+ if (n) {
int newtotpart=totpart+n;
float hairmat[4][4], cur_co[3];
KDTree *tree=0;
@@ -3245,22 +3248,22 @@ static int brush_add(PEData *data, short number)
memcpy(new_points, edit->points, totpart * sizeof(PTCacheEditPoint));
/* change old arrays to new ones */
- if(psys->particles) MEM_freeN(psys->particles);
+ if (psys->particles) MEM_freeN(psys->particles);
psys->particles= new_pars;
- if(edit->points) MEM_freeN(edit->points);
+ if (edit->points) MEM_freeN(edit->points);
edit->points= new_points;
- if(edit->mirror_cache) {
+ if (edit->mirror_cache) {
MEM_freeN(edit->mirror_cache);
edit->mirror_cache= NULL;
}
/* create tree for interpolation */
- if(pset->flag & PE_INTERPOLATE_ADDED && psys->totpart) {
+ if (pset->flag & PE_INTERPOLATE_ADDED && psys->totpart) {
tree=BLI_kdtree_new(psys->totpart);
- for(i=0, pa=psys->particles; i<totpart; i++, pa++) {
+ for (i=0, pa=psys->particles; i<totpart; i++, pa++) {
psys_particle_on_dm(psmd->dm,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,cur_co,0,0,0,0,0);
BLI_kdtree_insert(tree, i, cur_co, NULL);
}
@@ -3274,17 +3277,17 @@ static int brush_add(PEData *data, short number)
pa= psys->particles + totpart;
point= edit->points + totpart;
- for(i=totpart; i<newtotpart; i++, pa++, point++) {
+ for (i=totpart; i<newtotpart; i++, pa++, point++) {
memcpy(pa, add_pars + i - totpart, sizeof(ParticleData));
pa->hair= MEM_callocN(pset->totaddkey * sizeof(HairKey), "BakeKey key add");
key= point->keys= MEM_callocN(pset->totaddkey * sizeof(PTCacheEditKey), "PTCacheEditKey add");
point->totkey= pa->totkey= pset->totaddkey;
- for(k=0, hkey=pa->hair; k<pa->totkey; k++, hkey++, key++) {
+ for (k=0, hkey=pa->hair; k<pa->totkey; k++, hkey++, key++) {
key->co= hkey->co;
key->time= &hkey->time;
- if(!(psys->flag & PSYS_GLOBAL_HAIR))
+ if (!(psys->flag & PSYS_GLOBAL_HAIR))
key->flag |= PEK_USE_WCO;
}
@@ -3292,12 +3295,12 @@ static int brush_add(PEData *data, short number)
initialize_particle(&sim, pa,i);
reset_particle(&sim, pa, 0.0, 1.0);
point->flag |= PEP_EDIT_RECALC;
- if(pe_x_mirror(ob))
+ if (pe_x_mirror(ob))
point->flag |= PEP_TAG; /* signal for duplicate */
framestep= pa->lifetime/(float)(pset->totaddkey-1);
- if(tree) {
+ if (tree) {
ParticleData *ppa;
HairKey *thkey;
ParticleKey key3[3];
@@ -3310,20 +3313,20 @@ static int brush_add(PEData *data, short number)
maxd= ptn[maxw-1].dist;
- for(w=0; w<maxw; w++) {
+ for (w=0; w<maxw; w++) {
weight[w]= (float)pow(2.0, (double)(-6.0f * ptn[w].dist / maxd));
totw += weight[w];
}
- for(;w<3; w++) {
+ for (;w<3; w++) {
weight[w]= 0.0f;
}
- for(w=0; w<maxw; w++)
+ for (w=0; w<maxw; w++)
weight[w] /= totw;
ppa= psys->particles+ptn[0].index;
- for(k=0; k<pset->totaddkey; k++) {
+ for (k=0; k<pset->totaddkey; k++) {
thkey= (HairKey*)pa->hair + k;
thkey->time= pa->time + k * framestep;
@@ -3334,13 +3337,13 @@ static int brush_add(PEData *data, short number)
/* TODO: interpolatint the weight would be nicer */
thkey->weight= (ppa->hair+MIN2(k, ppa->totkey-1))->weight;
- if(maxw>1) {
+ if (maxw>1) {
key3[1].time= key3[0].time;
psys_get_particle_on_path(&sim, ptn[1].index, &key3[1], 0);
mul_v3_fl(key3[1].co, weight[1]);
add_v3_v3(key3[0].co, key3[1].co);
- if(maxw>2) {
+ if (maxw>2) {
key3[2].time= key3[0].time;
psys_get_particle_on_path(&sim, ptn[2].index, &key3[2], 0);
mul_v3_fl(key3[2].co, weight[2]);
@@ -3348,7 +3351,7 @@ static int brush_add(PEData *data, short number)
}
}
- if(k==0)
+ if (k==0)
sub_v3_v3v3(co1, pa->state.co, key3[0].co);
add_v3_v3v3(thkey->co, key3[0].co, co1);
@@ -3357,26 +3360,26 @@ static int brush_add(PEData *data, short number)
}
}
else {
- for(k=0, hkey=pa->hair; k<pset->totaddkey; k++, hkey++) {
+ for (k=0, hkey=pa->hair; k<pset->totaddkey; k++, hkey++) {
madd_v3_v3v3fl(hkey->co, pa->state.co, pa->state.vel, k * framestep * timestep);
hkey->time += k * framestep;
hkey->weight = 1.f - (float)k/(float)(pset->totaddkey-1);
}
}
- for(k=0, hkey=pa->hair; k<pset->totaddkey; k++, hkey++) {
+ for (k=0, hkey=pa->hair; k<pset->totaddkey; k++, hkey++) {
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
invert_m4_m4(imat,hairmat);
mul_m4_v3(imat, hkey->co);
}
}
- if(tree)
+ if (tree)
BLI_kdtree_free(tree);
}
- if(add_pars)
+ if (add_pars)
MEM_freeN(add_pars);
- if(!psmd->dm->deformedOnly)
+ if (!psmd->dm->deformedOnly)
dm->release(dm);
return n;
@@ -3405,7 +3408,7 @@ static int brush_edit_init(bContext *C, wmOperator *op)
ARegion *ar= CTX_wm_region(C);
BrushEdit *bedit;
- if(pset->brushtype < 0)
+ if (pset->brushtype < 0)
return 0;
initgrabz(ar->regiondata, ob->obmat[3][0], ob->obmat[3][1], ob->obmat[3][2]);
@@ -3440,7 +3443,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
float dx, dy, dmax;
int lock_root = pset->flag & PE_LOCK_FIRST;
- if(!PE_start_edit(edit))
+ if (!PE_start_edit(edit))
return;
RNA_float_get_array(itemptr, "mouse", mousef);
@@ -3448,7 +3451,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
mouse[1] = mousef[1];
flip= RNA_boolean_get(itemptr, "pen_flip");
- if(bedit->first) {
+ if (bedit->first) {
bedit->lastmouse[0]= mouse[0];
bedit->lastmouse[1]= mouse[1];
}
@@ -3461,10 +3464,10 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
/* disable locking temporatily for disconnected hair */
- if(edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR)
+ if (edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR)
pset->flag &= ~PE_LOCK_FIRST;
- if(((pset->brushtype == PE_BRUSH_ADD) ?
+ if (((pset->brushtype == PE_BRUSH_ADD) ?
(sqrt(dx * dx + dy * dy) > pset->brush[PE_BRUSH_ADD].step) : (dx != 0 || dy != 0))
|| bedit->first) {
PEData data= bedit->data;
@@ -3478,7 +3481,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
dx /= (float)tot_steps;
dy /= (float)tot_steps;
- for(step = 1; step<=tot_steps; step++) {
+ for (step = 1; step<=tot_steps; step++) {
mval[0] = bedit->lastmouse[0] + step*dx;
mval[1] = bedit->lastmouse[1] + step*dy;
@@ -3490,7 +3493,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
data.rad= (float)brush->size;
data.combfac= (brush->strength - 0.5f) * 2.0f;
- if(data.combfac < 0.0f)
+ if (data.combfac < 0.0f)
data.combfac= 1.0f - 9.0f * data.combfac;
else
data.combfac= 1.0f - data.combfac;
@@ -3507,18 +3510,18 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
}
case PE_BRUSH_CUT:
{
- if(edit->psys && edit->pathcache) {
+ if (edit->psys && edit->pathcache) {
data.mval= mval;
data.rad= (float)brush->size;
data.cutfac= brush->strength;
- if(selected)
+ if (selected)
foreach_selected_point(&data, brush_cut);
else
foreach_point(&data, brush_cut);
removed= remove_tagged_particles(ob, edit->psys, pe_x_mirror(ob));
- if(pset->flag & PE_KEEP_LENGTHS)
+ if (pset->flag & PE_KEEP_LENGTHS)
recalc_lengths(edit);
}
else
@@ -3533,27 +3536,27 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
data.rad= (float)brush->size;
data.growfac= brush->strength / 50.0f;
- if(brush->invert ^ flip)
+ if (brush->invert ^ flip)
data.growfac= 1.0f - data.growfac;
else
data.growfac= 1.0f + data.growfac;
foreach_mouse_hit_point(&data, brush_length, selected);
- if(pset->flag & PE_KEEP_LENGTHS)
+ if (pset->flag & PE_KEEP_LENGTHS)
recalc_lengths(edit);
break;
}
case PE_BRUSH_PUFF:
{
- if(edit->psys) {
+ if (edit->psys) {
data.dm= psmd->dm;
data.mval= mval;
data.rad= (float)brush->size;
data.select= selected;
data.pufffac= (brush->strength - 0.5f) * 2.0f;
- if(data.pufffac < 0.0f)
+ if (data.pufffac < 0.0f)
data.pufffac= 1.0f - 9.0f * data.pufffac;
else
data.pufffac= 1.0f - data.pufffac;
@@ -3567,12 +3570,12 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
}
case PE_BRUSH_ADD:
{
- if(edit->psys && edit->psys->part->from==PART_FROM_FACE) {
+ if (edit->psys && edit->psys->part->from==PART_FROM_FACE) {
data.mval= mval;
added= brush_add(&data, brush->count);
- if(pset->flag & PE_KEEP_LENGTHS)
+ if (pset->flag & PE_KEEP_LENGTHS)
recalc_lengths(edit);
}
else
@@ -3593,7 +3596,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
foreach_mouse_hit_key(&data, brush_smooth_get, selected);
- if(data.tot) {
+ if (data.tot) {
mul_v3_fl(data.vec, 1.0f / (float)data.tot);
foreach_mouse_hit_key(&data, brush_smooth_do, selected);
}
@@ -3602,7 +3605,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
}
case PE_BRUSH_WEIGHT:
{
- if(edit->psys) {
+ if (edit->psys) {
data.dm= psmd->dm;
data.mval= mval;
data.rad= (float)brush->size;
@@ -3615,11 +3618,11 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
break;
}
}
- if((pset->flag & PE_KEEP_LENGTHS)==0)
+ if ((pset->flag & PE_KEEP_LENGTHS)==0)
recalc_lengths(edit);
- if(ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_CUT) && (added || removed)) {
- if(pset->brushtype == PE_BRUSH_ADD && pe_x_mirror(ob))
+ if (ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_CUT) && (added || removed)) {
+ if (pset->brushtype == PE_BRUSH_ADD && pe_x_mirror(ob))
PE_mirror_x(scene, ob, 1);
update_world_cos(ob,edit);
@@ -3655,7 +3658,7 @@ static void brush_edit_exit(wmOperator *op)
static int brush_edit_exec(bContext *C, wmOperator *op)
{
- if(!brush_edit_init(C, op))
+ if (!brush_edit_init(C, op))
return OPERATOR_CANCELLED;
RNA_BEGIN(op->ptr, itemptr, "stroke") {
@@ -3687,7 +3690,7 @@ static void brush_edit_apply_event(bContext *C, wmOperator *op, wmEvent *event)
static int brush_edit_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(!brush_edit_init(C, op))
+ if (!brush_edit_init(C, op))
return OPERATOR_CANCELLED;
brush_edit_apply_event(C, op, event);
@@ -3723,18 +3726,18 @@ static int brush_edit_cancel(bContext *UNUSED(C), wmOperator *op)
void PARTICLE_OT_brush_edit(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Brush Edit";
- ot->idname= "PARTICLE_OT_brush_edit";
+ ot->name = "Brush Edit";
+ ot->idname = "PARTICLE_OT_brush_edit";
/* api callbacks */
- ot->exec= brush_edit_exec;
- ot->invoke= brush_edit_invoke;
- ot->modal= brush_edit_modal;
- ot->cancel= brush_edit_cancel;
- ot->poll= PE_poll_view3d;
+ ot->exec = brush_edit_exec;
+ ot->invoke = brush_edit_invoke;
+ ot->modal = brush_edit_modal;
+ ot->cancel = brush_edit_cancel;
+ ot->poll = PE_poll_view3d;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* properties */
RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
@@ -3747,16 +3750,16 @@ static void free_PTCacheUndo(PTCacheUndo *undo)
PTCacheEditPoint *point;
int i;
- for(i=0, point=undo->points; i<undo->totpoint; i++, point++) {
- if(undo->particles && (undo->particles + i)->hair)
+ for (i=0, point=undo->points; i<undo->totpoint; i++, point++) {
+ if (undo->particles && (undo->particles + i)->hair)
MEM_freeN((undo->particles + i)->hair);
- if(point->keys)
+ if (point->keys)
MEM_freeN(point->keys);
}
- if(undo->points)
+ if (undo->points)
MEM_freeN(undo->points);
- if(undo->particles)
+ if (undo->particles)
MEM_freeN(undo->particles);
BKE_ptcache_free_mem(&undo->mem_cache);
@@ -3769,12 +3772,12 @@ static void make_PTCacheUndo(PTCacheEdit *edit, PTCacheUndo *undo)
undo->totpoint= edit->totpoint;
- if(edit->psys) {
+ if (edit->psys) {
ParticleData *pa;
pa= undo->particles= MEM_dupallocN(edit->psys->particles);
- for(i=0; i<edit->totpoint; i++, pa++)
+ for (i=0; i<edit->totpoint; i++, pa++)
pa->hair= MEM_dupallocN(pa->hair);
undo->psys_flag = edit->psys->flag;
@@ -3785,8 +3788,8 @@ static void make_PTCacheUndo(PTCacheEdit *edit, PTCacheUndo *undo)
BLI_duplicatelist(&undo->mem_cache, &edit->pid.cache->mem_cache);
pm = undo->mem_cache.first;
- for(; pm; pm=pm->next) {
- for(i=0; i<BPHYS_TOT_DATA; i++)
+ for (; pm; pm=pm->next) {
+ for (i=0; i<BPHYS_TOT_DATA; i++)
pm->data[i] = MEM_dupallocN(pm->data[i]);
}
}
@@ -3794,7 +3797,7 @@ static void make_PTCacheUndo(PTCacheEdit *edit, PTCacheUndo *undo)
point= undo->points = MEM_dupallocN(edit->points);
undo->totpoint = edit->totpoint;
- for(i=0; i<edit->totpoint; i++, point++) {
+ for (i=0; i<edit->totpoint; i++, point++) {
point->keys= MEM_dupallocN(point->keys);
/* no need to update edit key->co & key->time pointers here */
}
@@ -3808,17 +3811,17 @@ static void get_PTCacheUndo(PTCacheEdit *edit, PTCacheUndo *undo)
POINT_P; KEY_K;
LOOP_POINTS {
- if(psys && psys->particles[p].hair)
+ if (psys && psys->particles[p].hair)
MEM_freeN(psys->particles[p].hair);
- if(point->keys)
+ if (point->keys)
MEM_freeN(point->keys);
}
- if(psys && psys->particles)
+ if (psys && psys->particles)
MEM_freeN(psys->particles);
- if(edit->points)
+ if (edit->points)
MEM_freeN(edit->points);
- if(edit->mirror_cache) {
+ if (edit->mirror_cache) {
MEM_freeN(edit->mirror_cache);
edit->mirror_cache= NULL;
}
@@ -3830,7 +3833,7 @@ static void get_PTCacheUndo(PTCacheEdit *edit, PTCacheUndo *undo)
point->keys= MEM_dupallocN(point->keys);
}
- if(psys) {
+ if (psys) {
psys->particles= MEM_dupallocN(undo->particles);
psys->totpart= undo->totpoint;
@@ -3858,15 +3861,15 @@ static void get_PTCacheUndo(PTCacheEdit *edit, PTCacheUndo *undo)
pm = edit->pid.cache->mem_cache.first;
- for(; pm; pm=pm->next) {
- for(i=0; i<BPHYS_TOT_DATA; i++)
+ for (; pm; pm=pm->next) {
+ for (i=0; i<BPHYS_TOT_DATA; i++)
pm->data[i] = MEM_dupallocN(pm->data[i]);
BKE_ptcache_mem_pointers_init(pm);
LOOP_POINTS {
LOOP_KEYS {
- if((int)key->ftime == (int)pm->frame) {
+ if ((int)key->ftime == (int)pm->frame) {
key->co = pm->cur[BPHYS_DATA_LOCATION];
key->vel = pm->cur[BPHYS_DATA_VELOCITY];
key->rot = pm->cur[BPHYS_DATA_ROTATION];
@@ -3885,10 +3888,10 @@ void PE_undo_push(Scene *scene, const char *str)
PTCacheUndo *undo;
int nr;
- if(!edit) return;
+ if (!edit) return;
/* remove all undos after (also when curundo==NULL) */
- while(edit->undo.last != edit->curundo) {
+ while (edit->undo.last != edit->curundo) {
undo= edit->undo.last;
BLI_remlink(&edit->undo, undo);
free_PTCacheUndo(undo);
@@ -3903,13 +3906,13 @@ void PE_undo_push(Scene *scene, const char *str)
/* and limit amount to the maximum */
nr= 0;
undo= edit->undo.last;
- while(undo) {
+ while (undo) {
nr++;
- if(nr==U.undosteps) break;
+ if (nr==U.undosteps) break;
undo= undo->prev;
}
- if(undo) {
- while(edit->undo.first!=undo) {
+ if (undo) {
+ while (edit->undo.first!=undo) {
PTCacheUndo *first= edit->undo.first;
BLI_remlink(&edit->undo, first);
free_PTCacheUndo(first);
@@ -3925,16 +3928,16 @@ void PE_undo_step(Scene *scene, int step)
{
PTCacheEdit *edit= PE_get_current(scene, OBACT);
- if(!edit) return;
+ if (!edit) return;
- if(step==0) {
+ if (step==0) {
get_PTCacheUndo(edit,edit->curundo);
}
- else if(step==1) {
+ else if (step==1) {
- if(edit->curundo==NULL || edit->curundo->prev==NULL);
+ if (edit->curundo==NULL || edit->curundo->prev==NULL);
else {
- if(G.f & G_DEBUG) printf("undo %s\n", edit->curundo->name);
+ if (G.f & G_DEBUG) printf("undo %s\n", edit->curundo->name);
edit->curundo= edit->curundo->prev;
get_PTCacheUndo(edit, edit->curundo);
}
@@ -3942,11 +3945,11 @@ void PE_undo_step(Scene *scene, int step)
else {
/* curundo has to remain current situation! */
- if(edit->curundo==NULL || edit->curundo->next==NULL);
+ if (edit->curundo==NULL || edit->curundo->next==NULL);
else {
get_PTCacheUndo(edit, edit->curundo->next);
edit->curundo= edit->curundo->next;
- if(G.f & G_DEBUG) printf("redo %s\n", edit->curundo->name);
+ if (G.f & G_DEBUG) printf("redo %s\n", edit->curundo->name);
}
}
@@ -3957,7 +3960,7 @@ int PE_undo_valid(Scene *scene)
{
PTCacheEdit *edit= PE_get_current(scene, OBACT);
- if(edit) {
+ if (edit) {
return (edit->undo.last != edit->undo.first);
}
return 0;
@@ -3967,10 +3970,10 @@ static void PTCacheUndo_clear(PTCacheEdit *edit)
{
PTCacheUndo *undo;
- if(edit==NULL) return;
+ if (edit==NULL) return;
undo= edit->undo.first;
- while(undo) {
+ while (undo) {
free_PTCacheUndo(undo);
undo= undo->next;
}
@@ -3994,8 +3997,8 @@ void PE_undo_number(Scene *scene, int nr)
PTCacheUndo *undo;
int a=0;
- for(undo= edit->undo.first; undo; undo= undo->next, a++) {
- if(a==nr) break;
+ for (undo= edit->undo.first; undo; undo= undo->next, a++) {
+ if (a==nr) break;
}
edit->curundo= undo;
PE_undo_step(scene, 0);
@@ -4009,12 +4012,12 @@ const char *PE_undo_get_name(Scene *scene, int nr, int *active)
PTCacheEdit *edit= PE_get_current(scene, OBACT);
PTCacheUndo *undo;
- if(active) *active= 0;
+ if (active) *active= 0;
- if(edit) {
+ if (edit) {
undo= BLI_findlink(&edit->undo, nr);
- if(undo) {
- if(active && undo==edit->curundo)
+ if (undo) {
+ if (active && undo==edit->curundo)
*active= 1;
return undo->name;
}
@@ -4034,15 +4037,15 @@ int PE_minmax(Scene *scene, float min[3], float max[3])
float co[3], mat[4][4];
int ok= 0;
- if(!edit) return ok;
+ if (!edit) return ok;
- if((psys = edit->psys))
+ if ((psys = edit->psys))
psmd= psys_get_modifier(ob, psys);
else
unit_m4(mat);
LOOP_VISIBLE_POINTS {
- if(psys)
+ if (psys)
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, psys->particles+p, mat);
LOOP_SELECTED_KEYS {
@@ -4053,7 +4056,7 @@ int PE_minmax(Scene *scene, float min[3], float max[3])
}
}
- if(!ok) {
+ if (!ok) {
minmax_object(ob, min, max);
ok= 1;
}
@@ -4074,23 +4077,23 @@ static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache,
int totpoint;
/* no psmd->dm happens in case particle system modifier is not enabled */
- if(!(psys && psmd && psmd->dm) && !cache)
+ if (!(psys && psmd && psmd->dm) && !cache)
return;
- if(cache && cache->flag & PTCACHE_DISK_CACHE)
+ if (cache && cache->flag & PTCACHE_DISK_CACHE)
return;
- if(psys == NULL && cache->mem_cache.first == NULL)
+ if (psys == NULL && cache->mem_cache.first == NULL)
return;
- if(!edit) {
+ if (!edit) {
totpoint = psys ? psys->totpart : (int)((PTCacheMem*)cache->mem_cache.first)->totpoint;
edit= MEM_callocN(sizeof(PTCacheEdit), "PE_create_particle_edit");
edit->points=MEM_callocN(totpoint*sizeof(PTCacheEditPoint),"PTCacheEditPoints");
edit->totpoint = totpoint;
- if(psys && !cache) {
+ if (psys && !cache) {
psys->edit= edit;
edit->psys = psys;
@@ -4110,7 +4113,7 @@ static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache,
key->co= hkey->co;
key->time= &hkey->time;
key->flag= hkey->editflag;
- if(!(psys->flag & PSYS_GLOBAL_HAIR)) {
+ if (!(psys->flag & PSYS_GLOBAL_HAIR)) {
key->flag |= PEK_USE_WCO;
hkey->editflag |= PEK_USE_WCO;
}
@@ -4129,15 +4132,15 @@ static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache,
cache->free_edit= PE_free_ptcache_edit;
edit->psys = NULL;
- for(pm=cache->mem_cache.first; pm; pm=pm->next)
+ for (pm=cache->mem_cache.first; pm; pm=pm->next)
totframe++;
- for(pm=cache->mem_cache.first; pm; pm=pm->next) {
+ for (pm=cache->mem_cache.first; pm; pm=pm->next) {
LOOP_POINTS {
- if(BKE_ptcache_mem_pointers_seek(p, pm) == 0)
+ if (BKE_ptcache_mem_pointers_seek(p, pm) == 0)
continue;
- if(!point->totkey) {
+ if (!point->totkey) {
key = point->keys = MEM_callocN(totframe*sizeof(PTCacheEditKey),"ParticleEditKeys");
point->flag |= PEP_EDIT_RECALC;
}
@@ -4161,7 +4164,7 @@ static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache,
UI_GetThemeColor3ubv(TH_WIRE, edit->nosel_col);
recalc_lengths(edit);
- if(psys && !cache)
+ if (psys && !cache)
recalc_emitter_field(ob, psys);
PE_update_object(scene, ob, 1);
@@ -4175,7 +4178,7 @@ static int particle_edit_toggle_poll(bContext *C)
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- if(!scene || !ob || ob->id.lib)
+ if (!scene || !ob || ob->id.lib)
return 0;
return (ob->particlesystem.first || modifiers_findByType(ob, eModifierType_Cloth) || modifiers_findByType(ob, eModifierType_Softbody));
@@ -4186,14 +4189,14 @@ static int particle_edit_toggle_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- if(!(ob->mode & OB_MODE_PARTICLE_EDIT)) {
+ if (!(ob->mode & OB_MODE_PARTICLE_EDIT)) {
PTCacheEdit *edit;
ob->mode |= OB_MODE_PARTICLE_EDIT;
edit= PE_create_current(scene, ob);
/* mesh may have changed since last entering editmode.
* note, this may have run before if the edit data was just created, so could avoid this and speed up a little */
- if(edit && edit->psys)
+ if (edit && edit->psys)
recalc_emitter_field(ob, edit->psys);
toggle_particle_cursor(C, 1);
@@ -4213,15 +4216,15 @@ static int particle_edit_toggle_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_particle_edit_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Particle Edit Toggle";
- ot->idname= "PARTICLE_OT_particle_edit_toggle";
+ ot->name = "Particle Edit Toggle";
+ ot->idname = "PARTICLE_OT_particle_edit_toggle";
/* api callbacks */
- ot->exec= particle_edit_toggle_exec;
- ot->poll= particle_edit_toggle_poll;
+ ot->exec = particle_edit_toggle_exec;
+ ot->poll = particle_edit_toggle_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -4232,8 +4235,8 @@ static int clear_edited_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= CTX_data_active_object(C);
ParticleSystem *psys = psys_get_current(ob);
- if(psys->edit) {
- if(psys->edit->edited || 1) { // XXX okee("Lose changes done in particle mode?"))
+ if (psys->edit) {
+ if (psys->edit->edited || 1) { // XXX okee("Lose changes done in particle mode?"))
PE_free_ptcache_edit(psys->edit);
psys->edit = NULL;
@@ -4262,14 +4265,14 @@ static int clear_edited_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_edited_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Edited";
- ot->idname= "PARTICLE_OT_edited_clear";
+ ot->name = "Clear Edited";
+ ot->idname = "PARTICLE_OT_edited_clear";
/* api callbacks */
- ot->exec= clear_edited_exec;
- ot->poll= particle_edit_toggle_poll;
+ ot->exec = clear_edited_exec;
+ ot->poll = particle_edit_toggle_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index da3f7e1f7c1..1e71cf61817 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -70,7 +70,7 @@ static int particle_system_add_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= ED_object_context(C);
Scene *scene = CTX_data_scene(C);
- if(!scene || !ob)
+ if (!scene || !ob)
return OPERATOR_CANCELLED;
object_add_particle_system(scene, ob, NULL);
@@ -84,16 +84,16 @@ static int particle_system_add_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_particle_system_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Particle System Slot";
- ot->idname= "OBJECT_OT_particle_system_add";
- ot->description="Add a particle system";
+ ot->name = "Add Particle System Slot";
+ ot->idname = "OBJECT_OT_particle_system_add";
+ ot->description = "Add a particle system";
/* api callbacks */
- ot->poll= ED_operator_object_active_editable;
- ot->exec= particle_system_add_exec;
+ ot->poll = ED_operator_object_active_editable;
+ ot->exec = particle_system_add_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int particle_system_remove_exec(bContext *C, wmOperator *UNUSED(op))
@@ -101,7 +101,7 @@ static int particle_system_remove_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= ED_object_context(C);
Scene *scene = CTX_data_scene(C);
int mode_orig = ob->mode;
- if(!scene || !ob)
+ if (!scene || !ob)
return OPERATOR_CANCELLED;
object_remove_particle_system(scene, ob);
@@ -109,9 +109,9 @@ static int particle_system_remove_exec(bContext *C, wmOperator *UNUSED(op))
/* possible this isn't the active object
* object_remove_particle_system() clears the mode on the last psys
* */
- if(mode_orig & OB_MODE_PARTICLE_EDIT)
- if((ob->mode & OB_MODE_PARTICLE_EDIT)==0)
- if(scene->basact && scene->basact->object==ob)
+ if (mode_orig & OB_MODE_PARTICLE_EDIT)
+ if ((ob->mode & OB_MODE_PARTICLE_EDIT)==0)
+ if (scene->basact && scene->basact->object==ob)
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL);
WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
@@ -123,16 +123,16 @@ static int particle_system_remove_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_particle_system_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Particle System Slot";
- ot->idname= "OBJECT_OT_particle_system_remove";
- ot->description="Remove the selected particle system";
+ ot->name = "Remove Particle System Slot";
+ ot->idname = "OBJECT_OT_particle_system_remove";
+ ot->description = "Remove the selected particle system";
/* api callbacks */
- ot->poll= ED_operator_object_active_editable;
- ot->exec= particle_system_remove_exec;
+ ot->poll = ED_operator_object_active_editable;
+ ot->exec = particle_system_remove_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** new particle settings operator *********************/
@@ -157,14 +157,14 @@ static int new_particle_settings_exec(bContext *C, wmOperator *UNUSED(op))
psys = ptr.data;
/* add or copy particle setting */
- if(psys->part)
+ if (psys->part)
part= psys_copy_settings(psys->part);
else
part= psys_new_settings("ParticleSettings", bmain);
ob= ptr.id.data;
- if(psys->part)
+ if (psys->part)
psys->part->id.us--;
psys->part = part;
@@ -182,16 +182,16 @@ static int new_particle_settings_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_new(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "New Particle Settings";
- ot->idname= "PARTICLE_OT_new";
- ot->description="Add new particle settings";
+ ot->name = "New Particle Settings";
+ ot->idname = "PARTICLE_OT_new";
+ ot->description = "Add new particle settings";
/* api callbacks */
- ot->exec= new_particle_settings_exec;
- ot->poll= psys_poll;
+ ot->exec = new_particle_settings_exec;
+ ot->poll = psys_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** keyed particle target operators *********************/
@@ -206,11 +206,11 @@ static int new_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
ParticleTarget *pt;
- if(!psys)
+ if (!psys)
return OPERATOR_CANCELLED;
pt = psys->targets.first;
- for(; pt; pt=pt->next)
+ for (; pt; pt=pt->next)
pt->flag &= ~PTARGET_CURRENT;
pt = MEM_callocN(sizeof(ParticleTarget), "keyed particle target");
@@ -231,15 +231,15 @@ static int new_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_new_target(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "New Particle Target";
- ot->idname= "PARTICLE_OT_new_target";
- ot->description="Add a new particle target";
+ ot->name = "New Particle Target";
+ ot->idname = "PARTICLE_OT_new_target";
+ ot->description = "Add a new particle target";
/* api callbacks */
- ot->exec= new_particle_target_exec;
+ ot->exec = new_particle_target_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int remove_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
@@ -252,12 +252,12 @@ static int remove_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
ParticleTarget *pt;
- if(!psys)
+ if (!psys)
return OPERATOR_CANCELLED;
pt = psys->targets.first;
- for(; pt; pt=pt->next) {
- if(pt->flag & PTARGET_CURRENT) {
+ for (; pt; pt=pt->next) {
+ if (pt->flag & PTARGET_CURRENT) {
BLI_remlink(&psys->targets, pt);
MEM_freeN(pt);
break;
@@ -266,7 +266,7 @@ static int remove_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
}
pt = psys->targets.last;
- if(pt)
+ if (pt)
pt->flag |= PTARGET_CURRENT;
DAG_scene_sort(bmain, scene);
@@ -280,15 +280,15 @@ static int remove_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_target_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Particle Target";
- ot->idname= "PARTICLE_OT_target_remove";
- ot->description="Remove the selected particle target";
+ ot->name = "Remove Particle Target";
+ ot->idname = "PARTICLE_OT_target_remove";
+ ot->description = "Remove the selected particle target";
/* api callbacks */
- ot->exec= remove_particle_target_exec;
+ ot->exec = remove_particle_target_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ move up particle target operator *********************/
@@ -300,12 +300,12 @@ static int target_move_up_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob = ptr.id.data;
ParticleTarget *pt;
- if(!psys)
+ if (!psys)
return OPERATOR_CANCELLED;
pt = psys->targets.first;
- for(; pt; pt=pt->next) {
- if(pt->flag & PTARGET_CURRENT && pt->prev) {
+ for (; pt; pt=pt->next) {
+ if (pt->flag & PTARGET_CURRENT && pt->prev) {
BLI_remlink(&psys->targets, pt);
BLI_insertlink(&psys->targets, pt->prev->prev, pt);
@@ -320,14 +320,14 @@ static int target_move_up_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_target_move_up(wmOperatorType *ot)
{
- ot->name= "Move Up Target";
- ot->idname= "PARTICLE_OT_target_move_up";
- ot->description= "Move particle target up in the list";
+ ot->name = "Move Up Target";
+ ot->idname = "PARTICLE_OT_target_move_up";
+ ot->description = "Move particle target up in the list";
- ot->exec= target_move_up_exec;
+ ot->exec = target_move_up_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ move down particle target operator *********************/
@@ -339,11 +339,11 @@ static int target_move_down_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob = ptr.id.data;
ParticleTarget *pt;
- if(!psys)
+ if (!psys)
return OPERATOR_CANCELLED;
pt = psys->targets.first;
- for(; pt; pt=pt->next) {
- if(pt->flag & PTARGET_CURRENT && pt->next) {
+ for (; pt; pt=pt->next) {
+ if (pt->flag & PTARGET_CURRENT && pt->next) {
BLI_remlink(&psys->targets, pt);
BLI_insertlink(&psys->targets, pt->next, pt);
@@ -358,14 +358,14 @@ static int target_move_down_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_target_move_down(wmOperatorType *ot)
{
- ot->name= "Move Down Target";
- ot->idname= "PARTICLE_OT_target_move_down";
- ot->description= "Move particle target down in the list";
+ ot->name = "Move Down Target";
+ ot->idname = "PARTICLE_OT_target_move_down";
+ ot->description = "Move particle target down in the list";
- ot->exec= target_move_down_exec;
+ ot->exec = target_move_down_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ move up particle dupliweight operator *********************/
@@ -377,12 +377,12 @@ static int dupliob_move_up_exec(bContext *C, wmOperator *UNUSED(op))
ParticleSettings *part;
ParticleDupliWeight *dw;
- if(!psys)
+ if (!psys)
return OPERATOR_CANCELLED;
part = psys->part;
- for(dw=part->dupliweights.first; dw; dw=dw->next) {
- if(dw->flag & PART_DUPLIW_CURRENT && dw->prev) {
+ for (dw=part->dupliweights.first; dw; dw=dw->next) {
+ if (dw->flag & PART_DUPLIW_CURRENT && dw->prev) {
BLI_remlink(&part->dupliweights, dw);
BLI_insertlink(&part->dupliweights, dw->prev->prev, dw);
@@ -396,14 +396,14 @@ static int dupliob_move_up_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_dupliob_move_up(wmOperatorType *ot)
{
- ot->name= "Move Up Dupli Object";
- ot->idname= "PARTICLE_OT_dupliob_move_up";
- ot->description= "Move dupli object up in the list";
+ ot->name = "Move Up Dupli Object";
+ ot->idname = "PARTICLE_OT_dupliob_move_up";
+ ot->description = "Move dupli object up in the list";
- ot->exec= dupliob_move_up_exec;
+ ot->exec = dupliob_move_up_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** particle dupliweight operators *********************/
@@ -415,11 +415,11 @@ static int copy_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
ParticleSettings *part;
ParticleDupliWeight *dw;
- if(!psys)
+ if (!psys)
return OPERATOR_CANCELLED;
part = psys->part;
- for(dw=part->dupliweights.first; dw; dw=dw->next) {
- if(dw->flag & PART_DUPLIW_CURRENT) {
+ for (dw=part->dupliweights.first; dw; dw=dw->next) {
+ if (dw->flag & PART_DUPLIW_CURRENT) {
dw->flag &= ~PART_DUPLIW_CURRENT;
dw = MEM_dupallocN(dw);
dw->flag |= PART_DUPLIW_CURRENT;
@@ -436,15 +436,15 @@ static int copy_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_dupliob_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Particle Dupliob";
- ot->idname= "PARTICLE_OT_dupliob_copy";
- ot->description="Duplicate the current dupliobject";
+ ot->name = "Copy Particle Dupliob";
+ ot->idname = "PARTICLE_OT_dupliob_copy";
+ ot->description = "Duplicate the current dupliobject";
/* api callbacks */
- ot->exec= copy_particle_dupliob_exec;
+ ot->exec = copy_particle_dupliob_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int remove_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
@@ -454,12 +454,12 @@ static int remove_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
ParticleSettings *part;
ParticleDupliWeight *dw;
- if(!psys)
+ if (!psys)
return OPERATOR_CANCELLED;
part = psys->part;
- for(dw=part->dupliweights.first; dw; dw=dw->next) {
- if(dw->flag & PART_DUPLIW_CURRENT) {
+ for (dw=part->dupliweights.first; dw; dw=dw->next) {
+ if (dw->flag & PART_DUPLIW_CURRENT) {
BLI_remlink(&part->dupliweights, dw);
MEM_freeN(dw);
break;
@@ -468,7 +468,7 @@ static int remove_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
}
dw = part->dupliweights.last;
- if(dw)
+ if (dw)
dw->flag |= PART_DUPLIW_CURRENT;
WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL);
@@ -479,15 +479,15 @@ static int remove_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_dupliob_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Particle Dupliobject";
- ot->idname= "PARTICLE_OT_dupliob_remove";
- ot->description="Remove the selected dupliobject";
+ ot->name = "Remove Particle Dupliobject";
+ ot->idname = "PARTICLE_OT_dupliob_remove";
+ ot->description = "Remove the selected dupliobject";
/* api callbacks */
- ot->exec= remove_particle_dupliob_exec;
+ ot->exec = remove_particle_dupliob_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ move down particle dupliweight operator *********************/
@@ -499,12 +499,12 @@ static int dupliob_move_down_exec(bContext *C, wmOperator *UNUSED(op))
ParticleSettings *part;
ParticleDupliWeight *dw;
- if(!psys)
+ if (!psys)
return OPERATOR_CANCELLED;
part = psys->part;
- for(dw=part->dupliweights.first; dw; dw=dw->next) {
- if(dw->flag & PART_DUPLIW_CURRENT && dw->next) {
+ for (dw=part->dupliweights.first; dw; dw=dw->next) {
+ if (dw->flag & PART_DUPLIW_CURRENT && dw->next) {
BLI_remlink(&part->dupliweights, dw);
BLI_insertlink(&part->dupliweights, dw->next, dw);
@@ -518,14 +518,14 @@ static int dupliob_move_down_exec(bContext *C, wmOperator *UNUSED(op))
void PARTICLE_OT_dupliob_move_down(wmOperatorType *ot)
{
- ot->name= "Move Down Dupli Object";
- ot->idname= "PARTICLE_OT_dupliob_move_down";
- ot->description= "Move dupli object down in the list";
+ ot->name = "Move Down Dupli Object";
+ ot->idname = "PARTICLE_OT_dupliob_move_down";
+ ot->description = "Move dupli object down in the list";
- ot->exec= dupliob_move_down_exec;
+ ot->exec = dupliob_move_down_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ connect/disconnect hair operators *********************/
@@ -542,27 +542,27 @@ static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
int i, k;
float hairmat[4][4];
- if(!ob || !psys || psys->flag & PSYS_GLOBAL_HAIR)
+ if (!ob || !psys || psys->flag & PSYS_GLOBAL_HAIR)
return;
- if(!psys->part || psys->part->type != PART_HAIR)
+ if (!psys->part || psys->part->type != PART_HAIR)
return;
edit = psys->edit;
point= edit ? edit->points : NULL;
- for(i=0, pa=psys->particles; i<psys->totpart; i++,pa++) {
- if(point) {
+ for (i=0, pa=psys->particles; i<psys->totpart; i++,pa++) {
+ if (point) {
ekey = point->keys;
point++;
}
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
- for(k=0,key=pa->hair; k<pa->totkey; k++,key++) {
+ for (k=0,key=pa->hair; k<pa->totkey; k++,key++) {
mul_m4_v3(hairmat,key->co);
- if(ekey) {
+ if (ekey) {
ekey->flag &= ~PEK_USE_WCO;
ekey++;
}
@@ -573,7 +573,7 @@ static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
psys->flag |= PSYS_GLOBAL_HAIR;
- if(ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_PUFF))
+ if (ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_PUFF))
pset->brushtype = PE_BRUSH_NONE;
PE_update_object(scene, ob, 0);
@@ -587,11 +587,11 @@ static int disconnect_hair_exec(bContext *C, wmOperator *op)
ParticleSystem *psys= NULL;
int all = RNA_boolean_get(op->ptr, "all");
- if(!ob)
+ if (!ob)
return OPERATOR_CANCELLED;
- if(all) {
- for(psys=ob->particlesystem.first; psys; psys=psys->next) {
+ if (all) {
+ for (psys=ob->particlesystem.first; psys; psys=psys->next) {
disconnect_hair(scene, ob, psys);
}
}
@@ -608,14 +608,14 @@ static int disconnect_hair_exec(bContext *C, wmOperator *op)
void PARTICLE_OT_disconnect_hair(wmOperatorType *ot)
{
- ot->name= "Disconnect Hair";
- ot->description= "Disconnect hair from the emitter mesh";
- ot->idname= "PARTICLE_OT_disconnect_hair";
+ ot->name = "Disconnect Hair";
+ ot->description = "Disconnect hair from the emitter mesh";
+ ot->idname = "PARTICLE_OT_disconnect_hair";
- ot->exec= disconnect_hair_exec;
+ ot->exec = disconnect_hair_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "all", 0, "All hair", "Disconnect all hair systems from the emitter mesh");
}
@@ -637,13 +637,13 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
float hairmat[4][4], imat[4][4];
float v[4][3], vec[3];
- if(!psys || !psys->part || psys->part->type != PART_HAIR)
+ if (!psys || !psys->part || psys->part->type != PART_HAIR)
return;
edit= psys->edit;
point= edit ? edit->points : NULL;
- if(psmd->dm->deformedOnly)
+ if (psmd->dm->deformedOnly)
/* we don't want to mess up psmd->dm when converting to global coordinates below */
dm= CDDM_copy(psmd->dm);
else
@@ -661,7 +661,7 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
bvhtree_from_mesh_faces(&bvhtree, dm, 0.0, 2, 6);
- for(i=0, pa= psys->particles; i<psys->totpart; i++,pa++) {
+ for (i=0, pa= psys->particles; i<psys->totpart; i++,pa++) {
key = pa->hair;
nearest.index = -1;
@@ -669,7 +669,7 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
BLI_bvhtree_find_nearest(bvhtree.tree, key->co, &nearest, bvhtree.nearest_callback, &bvhtree);
- if(nearest.index == -1) {
+ if (nearest.index == -1) {
if (G.f & G_DEBUG)
printf("No nearest point found for hair root!");
continue;
@@ -680,7 +680,7 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
copy_v3_v3(v[0], CDDM_get_vert(dm,mface->v1)->co);
copy_v3_v3(v[1], CDDM_get_vert(dm,mface->v2)->co);
copy_v3_v3(v[2], CDDM_get_vert(dm,mface->v3)->co);
- if(mface->v4) {
+ if (mface->v4) {
copy_v3_v3(v[3], CDDM_get_vert(dm,mface->v4)->co);
interp_weights_poly_v3( pa->fuv,v, 4, nearest.co);
}
@@ -695,16 +695,16 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
sub_v3_v3v3(vec, nearest.co, key->co);
- if(point) {
+ if (point) {
ekey = point->keys;
point++;
}
- for(k=0,key=pa->hair; k<pa->totkey; k++,key++) {
+ for (k=0,key=pa->hair; k<pa->totkey; k++,key++) {
add_v3_v3(key->co, vec);
mul_m4_v3(imat,key->co);
- if(ekey) {
+ if (ekey) {
ekey->flag |= PEK_USE_WCO;
ekey++;
}
@@ -729,11 +729,11 @@ static int connect_hair_exec(bContext *C, wmOperator *op)
ParticleSystem *psys= NULL;
int all = RNA_boolean_get(op->ptr, "all");
- if(!ob)
+ if (!ob)
return OPERATOR_CANCELLED;
- if(all) {
- for(psys=ob->particlesystem.first; psys; psys=psys->next) {
+ if (all) {
+ for (psys=ob->particlesystem.first; psys; psys=psys->next) {
connect_hair(scene, ob, psys);
}
}
@@ -750,14 +750,14 @@ static int connect_hair_exec(bContext *C, wmOperator *op)
void PARTICLE_OT_connect_hair(wmOperatorType *ot)
{
- ot->name= "Connect Hair";
- ot->description= "Connect hair to the emitter mesh";
- ot->idname= "PARTICLE_OT_connect_hair";
+ ot->name = "Connect Hair";
+ ot->description = "Connect hair to the emitter mesh";
+ ot->idname = "PARTICLE_OT_connect_hair";
- ot->exec= connect_hair_exec;
+ ot->exec = connect_hair_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "all", 0, "All hair", "Connect all hair systems to the emitter mesh");
}
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 96a59ee4542..23765b03d35 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -129,7 +129,8 @@ static void get_fluid_gravity(float *gravity, Scene *scene, FluidsimSettings *fs
{
if (scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY) {
copy_v3_v3(gravity, scene->physics_settings.gravity);
- } else {
+ }
+ else {
copy_v3_v3(gravity, fss->grav);
}
}
@@ -138,7 +139,8 @@ static float get_fluid_size_m(Scene *scene, Object *domainob, FluidsimSettings *
{
if (!scene->unit.system) {
return fss->realsize;
- } else {
+ }
+ else {
float dim[3];
float longest_axis;
@@ -212,20 +214,22 @@ static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char
int i,j;
int channelSize = paramsize;
- if(entries==3) {
+ if (entries==3) {
elbeemSimplifyChannelVec3( channel, &channelSize);
- } else if(entries==1) {
+ }
+ else if (entries==1) {
elbeemSimplifyChannelFloat( channel, &channelSize);
- } else {
+ }
+ else {
// invalid, cant happen?
}
fprintf(file, " CHANNEL %s = \n", str);
- for(i=0; i<channelSize;i++) {
+ for (i=0; i<channelSize;i++) {
fprintf(file," ");
- for(j=0;j<=entries;j++) { // also print time value
+ for (j=0;j<=entries;j++) { // also print time value
fprintf(file," %f ", channel[i*(entries+1)+j] );
- if(j==entries-1){ fprintf(file," "); }
+ if (j==entries-1) { fprintf(file," "); }
}
fprintf(file," \n");
}
@@ -298,7 +302,7 @@ static void set_vertex_channel(float *channel, float time, struct Scene *scene,
}
/* fill frame of channel with vertex locations */
- for(j=0; j < (3*numVerts); j++) {
+ for (j=0; j < (3*numVerts); j++) {
channel[i*framesize + j] = verts[j];
}
channel[i*framesize + framesize-1] = time;
@@ -468,7 +472,7 @@ static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), Fluid
/* init euler rotation values and convert to elbeem format */
/* get the rotation from ob->obmat rather than ob->rot to account for parent animations */
- if(i) {
+ if (i) {
copy_v3_v3(old_rot, fobj->Rotation + 4*(i-1));
mul_v3_fl(old_rot, -M_PI/180.f);
}
@@ -538,16 +542,16 @@ static void export_fluid_objects(ListBase *fobjects, Scene *scene, int length)
fsmesh.channelScale = fobj->Scale;
fsmesh.channelActive = fobj->Active;
- if( ELEM(fsmesh.type, OB_FLUIDSIM_FLUID, OB_FLUIDSIM_INFLOW)) {
+ if ( ELEM(fsmesh.type, OB_FLUIDSIM_FLUID, OB_FLUIDSIM_INFLOW)) {
fsmesh.channelInitialVel = fobj->InitialVelocity;
fsmesh.localInivelCoords = ((fluidmd->fss->typeFlags & OB_FSINFLOW_LOCALCOORD)?1:0);
}
- if(fluidmd->fss->typeFlags & OB_FSBND_NOSLIP)
+ if (fluidmd->fss->typeFlags & OB_FSBND_NOSLIP)
fsmesh.obstacleType = FLUIDSIM_OBSTACLE_NOSLIP;
- else if(fluidmd->fss->typeFlags & OB_FSBND_PARTSLIP)
+ else if (fluidmd->fss->typeFlags & OB_FSBND_PARTSLIP)
fsmesh.obstacleType = FLUIDSIM_OBSTACLE_PARTSLIP;
- else if(fluidmd->fss->typeFlags & OB_FSBND_FREESLIP)
+ else if (fluidmd->fss->typeFlags & OB_FSBND_FREESLIP)
fsmesh.obstacleType = FLUIDSIM_OBSTACLE_FREESLIP;
fsmesh.obstaclePartslip = fluidmd->fss->partSlipValue;
@@ -578,7 +582,7 @@ static void export_fluid_objects(ListBase *fobjects, Scene *scene, int length)
}
/* animated meshes */
- if(deform) {
+ if (deform) {
fsmesh.channelSizeVertices = length;
fsmesh.channelVertices = fobj->VertexCache;
@@ -590,8 +594,8 @@ static void export_fluid_objects(ListBase *fobjects, Scene *scene, int length)
elbeemAddMesh(&fsmesh);
- if(verts) MEM_freeN(verts);
- if(tris) MEM_freeN(tris);
+ if (verts) MEM_freeN(verts);
+ if (tris) MEM_freeN(tris);
}
}
@@ -602,7 +606,7 @@ static int fluid_validate_scene(ReportList *reports, Scene *scene, Object *fsDom
int channelObjCount = 0;
int fluidInputCount = 0;
- for(base=scene->base.first; base; base= base->next)
+ for (base=scene->base.first; base; base= base->next)
{
Object *ob = base->object;
FluidsimModifierData *fluidmdtmp = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim);
@@ -610,7 +614,7 @@ static int fluid_validate_scene(ReportList *reports, Scene *scene, Object *fsDom
/* only find objects with fluid modifiers */
if (!fluidmdtmp || ob->type != OB_MESH) continue;
- if(fluidmdtmp->fss->type == OB_FLUIDSIM_DOMAIN) {
+ if (fluidmdtmp->fss->type == OB_FLUIDSIM_DOMAIN) {
/* if no initial domain object given, find another potential domain */
if (!fsDomain) {
newdomain = ob;
@@ -654,6 +658,7 @@ static int fluid_validate_scene(ReportList *reports, Scene *scene, Object *fsDom
#define FLUID_SUFFIX_CONFIG "fluidsim.cfg"
+#define FLUID_SUFFIX_CONFIG_TMP (FLUID_SUFFIX_CONFIG ".tmp")
#define FLUID_SUFFIX_SURFACE "fluidsurface"
static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetFile, char *debugStrBuffer)
@@ -663,7 +668,7 @@ static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetF
FILE *fileCfg;
int dirExist = 0;
char newSurfdataPath[FILE_MAX]; // modified output settings
- const char *suffixConfig = FLUID_SUFFIX_CONFIG;
+ const char *suffixConfigTmp = FLUID_SUFFIX_CONFIG_TMP;
int outStringsChanged = 0;
// prepare names...
@@ -673,9 +678,8 @@ static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetF
BLI_strncpy(newSurfdataPath, domainSettings->surfdataPath, FILE_MAXDIR); /* if 0'd out below, this value is never used! */
BLI_path_abs(targetDir, relbase); // fixed #frame-no
- BLI_join_dirfile(targetFile, FILE_MAX, targetDir, suffixConfig);
- /* .tmp: dont overwrite/delete original file */
- strncat(targetFile, ".tmp", FILE_MAX);
+ /* .tmp: don't overwrite/delete original file */
+ BLI_join_dirfile(targetFile, FILE_MAX, targetDir, suffixConfigTmp);
// make sure all directories exist
// as the bobjs use the same dir, this only needs to be checked
@@ -684,14 +688,14 @@ static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetF
// check selected directory
// simply try to open cfg file for writing to test validity of settings
- fileCfg = fopen(targetFile, "w");
- if(fileCfg) {
+ fileCfg = BLI_fopen(targetFile, "w");
+ if (fileCfg) {
dirExist = 1; fclose(fileCfg);
// remove cfg dummy from directory test
BLI_delete(targetFile, 0,0);
}
- if(targetDir[0] == '\0' || (!dirExist)) {
+ if (targetDir[0] == '\0' || (!dirExist)) {
char blendDir[FILE_MAX];
char blendFile[FILE_MAX];
@@ -709,7 +713,7 @@ static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetF
// check if modified output dir is ok
#if 0
- if(outStringsChanged) {
+ if (outStringsChanged) {
char dispmsg[FILE_MAX+256];
int selection=0;
BLI_strncpy(dispmsg,"Output settings set to: '", sizeof(dispmsg));
@@ -718,7 +722,7 @@ static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetF
// ask user if thats what he/she wants...
selection = pupmenu(dispmsg);
- if(selection<1) return 0; // 0 from menu, or -1 aborted
+ if (selection<1) return 0; // 0 from menu, or -1 aborted
BLI_strncpy(targetDir, newSurfdataPath, sizeof(targetDir));
strncpy(domainSettings->surfdataPath, newSurfdataPath, FILE_MAXDIR);
BLI_path_abs(targetDir, G.main->name); // fixed #frame-no
@@ -751,7 +755,7 @@ static int fluidbake_breakjob(void *customdata)
{
FluidBakeJob *fb= (FluidBakeJob *)customdata;
- if(fb->stop && *(fb->stop))
+ if (fb->stop && *(fb->stop))
return 1;
/* this is not nice yet, need to make the jobs list template better
@@ -865,7 +869,7 @@ static void fluidsim_delete_until_lastframe(FluidsimSettings *fss, const char *r
BLI_delete(targetFileVel, 0, 0);
BLI_delete(previewFile, 0, 0);
}
- } while(exists);
+ } while (exists);
return;
}
@@ -881,7 +885,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
int gridlevels = 0;
const char *relbase= modifier_path_relbase(fsDomain);
const char *strEnvName = "BLENDER_ELBEEMDEBUG"; // from blendercall.cpp
- const char *suffixConfig = FLUID_SUFFIX_CONFIG;
+ const char *suffixConfigTmp = FLUID_SUFFIX_CONFIG_TMP;
const char *suffixSurface = FLUID_SUFFIX_SURFACE;
char targetDir[FILE_MAX]; // store & modify output settings
@@ -904,7 +908,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
fb= MEM_callocN(sizeof(FluidBakeJob), "fluid bake job");
- if(getenv(strEnvName)) {
+ if (getenv(strEnvName)) {
int dlevel = atoi(getenv(strEnvName));
elbeemSetDebugLevel(dlevel);
BLI_snprintf(debugStrBuffer, sizeof(debugStrBuffer),"fluidsimBake::msg: Debug messages activated due to envvar '%s'\n",strEnvName);
@@ -913,7 +917,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
/* make sure it corresponds to startFrame setting (old: noFrames = scene->r.efra - scene->r.sfra +1) */;
noFrames = scene->r.efra - 0;
- if(noFrames<=0) {
+ if (noFrames<=0) {
BKE_report(reports, RPT_ERROR, "No frames to export - check your animation range settings");
fluidbake_free_data(channels, fobjects, fsset, fb);
return 0;
@@ -943,7 +947,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
fluidsim_delete_until_lastframe(domainSettings, relbase);
/* rough check of settings... */
- if(domainSettings->previewresxyz > domainSettings->resolutionxyz) {
+ if (domainSettings->previewresxyz > domainSettings->resolutionxyz) {
BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"fluidsimBake::warning - Preview (%d) >= Resolution (%d)... setting equal.\n", domainSettings->previewresxyz , domainSettings->resolutionxyz);
elbeemDebugOut(debugStrBuffer);
domainSettings->previewresxyz = domainSettings->resolutionxyz;
@@ -952,16 +956,19 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
// this should do as an approximation, with in/outflow
// doing this more accurate would be overkill
// perhaps add manual setting?
- if(domainSettings->maxRefine <0) {
- if(domainSettings->resolutionxyz>128) {
+ if (domainSettings->maxRefine <0) {
+ if (domainSettings->resolutionxyz>128) {
gridlevels = 2;
- } else
- if(domainSettings->resolutionxyz>64) {
+ }
+ else
+ if (domainSettings->resolutionxyz>64) {
gridlevels = 1;
- } else {
+ }
+ else {
gridlevels = 0;
}
- } else {
+ }
+ else {
gridlevels = domainSettings->maxRefine;
}
BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"fluidsimBake::msg: Baking %s, refine: %d\n", fsDomain->id.name , gridlevels );
@@ -983,7 +990,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
/* ******** init domain object's matrix ******** */
copy_m4_m4(domainMat, fsDomain->obmat);
- if(!invert_m4_m4(invDomMat, domainMat)) {
+ if (!invert_m4_m4(invDomMat, domainMat)) {
BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"fluidsimBake::error - Invalid obj matrix?\n");
elbeemDebugOut(debugStrBuffer);
BKE_report(reports, RPT_ERROR, "Invalid object matrix");
@@ -993,12 +1000,11 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
}
/* ******** start writing / exporting ******** */
- // use .tmp, dont overwrite/delete original file
- BLI_join_dirfile(targetFile, sizeof(targetFile), targetDir, suffixConfig);
- strncat(targetFile, ".tmp", sizeof(targetFile));
+ // use .tmp, don't overwrite/delete original file
+ BLI_join_dirfile(targetFile, sizeof(targetFile), targetDir, suffixConfigTmp);
// make sure these directories exist as well
- if(outStringsChanged) {
+ if (outStringsChanged) {
BLI_make_existing_file(targetFile);
}
@@ -1052,7 +1058,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
fsset->domainobsPartslip = domainSettings->partSlipValue;
/* use domainobsType also for surface generation flag (bit: >=64) */
- if(domainSettings->typeFlags & OB_FSSG_NOOBS)
+ if (domainSettings->typeFlags & OB_FSSG_NOOBS)
fsset->mFsSurfGenSetting = FLUIDSIM_FSSG_NOOBS;
else
fsset->mFsSurfGenSetting = 0; // "normal" mode
@@ -1061,8 +1067,8 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
// init blender domain transform matrix
{ int j;
- for(i=0; i<4; i++) {
- for(j=0; j<4; j++) {
+ for (i=0; i<4; i++) {
+ for (j=0; j<4; j++) {
fsset->surfaceTrafo[i*4+j] = invDomMat[j][i];
}
} }
@@ -1077,7 +1083,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
/* custom data for fluid bake job */
fb->settings = fsset;
- if(do_job) {
+ if (do_job) {
wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Fluid Simulation", WM_JOB_PROGRESS);
/* setup job */
@@ -1140,10 +1146,10 @@ static int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object
static int fluid_bake_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
/* only one bake job at a time */
- if(WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C)))
+ if (WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C)))
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;
@@ -1151,7 +1157,7 @@ static int fluid_bake_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
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;
@@ -1160,13 +1166,13 @@ static int fluid_bake_exec(bContext *C, wmOperator *op)
void FLUID_OT_bake(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Fluid Simulation Bake";
- ot->description= "Bake fluid simulation";
- ot->idname= "FLUID_OT_bake";
+ ot->name = "Fluid Simulation Bake";
+ ot->description = "Bake fluid simulation";
+ ot->idname = "FLUID_OT_bake";
/* api callbacks */
- ot->invoke= fluid_bake_invoke;
- ot->exec= fluid_bake_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->invoke = fluid_bake_invoke;
+ ot->exec = fluid_bake_exec;
+ ot->poll = ED_operator_object_active_editable;
}
diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c
index 473ed50b5e2..272e13e2a62 100644
--- a/source/blender/editors/physics/physics_ops.c
+++ b/source/blender/editors/physics/physics_ops.c
@@ -93,8 +93,8 @@ static void keymap_particle(wmKeyConfig *keyconf)
wmKeyMapItem *kmi;
wmKeyMap *keymap;
- keymap= WM_keymap_find(keyconf, "Particle", 0, 0);
- keymap->poll= PE_poll;
+ keymap = WM_keymap_find(keyconf, "Particle", 0, 0);
+ keymap->poll = PE_poll;
kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_select_all", AKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
@@ -187,7 +187,7 @@ static void operatortypes_dynamicpaint(void)
//static void keymap_pointcache(wmWindowManager *wm)
//{
-// wmKeyMap *keymap= WM_keymap_find(wm, "Pointcache", 0, 0);
+// wmKeyMap *keymap = WM_keymap_find(wm, "Pointcache", 0, 0);
//
// WM_keymap_add_item(keymap, "PHYSICS_OT_bake_all", AKEY, KM_PRESS, 0, 0);
// WM_keymap_add_item(keymap, "PHYSICS_OT_free_all", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index 62e0e5e201d..6573647aaee 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -67,7 +67,7 @@ static int ptcache_bake_all_poll(bContext *C)
{
Scene *scene= CTX_data_scene(C);
- if(!scene)
+ if (!scene)
return 0;
return 1;
@@ -114,7 +114,8 @@ static int ptcache_bake_all_exec(bContext *C, wmOperator *op)
baker.progressbar = (void (*)(void *, int))WM_timecursor;
baker.progressend = (void (*)(void *))WM_cursor_restore;
baker.progresscontext = win;
- } else {
+ }
+ else {
baker.progressbar = bake_console_progress;
baker.progressend = bake_console_progress_end;
baker.progresscontext = NULL;
@@ -134,10 +135,10 @@ static int ptcache_free_bake_all_exec(bContext *C, wmOperator *UNUSED(op))
PTCacheID *pid;
ListBase pidlist;
- for(base=scene->base.first; base; base= base->next) {
+ for (base=scene->base.first; base; base= base->next) {
BKE_ptcache_ids_from_object(&pidlist, base->object, scene, MAX_DUPLI_RECUR);
- for(pid=pidlist.first; pid; pid=pid->next) {
+ for (pid=pidlist.first; pid; pid=pid->next) {
pid->cache->flag &= ~PTCACHE_BAKED;
}
@@ -154,31 +155,31 @@ static int ptcache_free_bake_all_exec(bContext *C, wmOperator *UNUSED(op))
void PTCACHE_OT_bake_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Bake All Physics";
- ot->description= "Bake all physics";
- ot->idname= "PTCACHE_OT_bake_all";
+ ot->name = "Bake All Physics";
+ ot->description = "Bake all physics";
+ ot->idname = "PTCACHE_OT_bake_all";
/* api callbacks */
- ot->exec= ptcache_bake_all_exec;
- ot->poll= ptcache_bake_all_poll;
+ ot->exec = ptcache_bake_all_exec;
+ ot->poll = ptcache_bake_all_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "bake", 1, "Bake", "");
}
void PTCACHE_OT_free_bake_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Free All Physics Bakes";
- ot->idname= "PTCACHE_OT_free_bake_all";
+ ot->name = "Free All Physics Bakes";
+ ot->idname = "PTCACHE_OT_free_bake_all";
/* api callbacks */
- ot->exec= ptcache_free_bake_all_exec;
- ot->poll= ptcache_bake_all_poll;
+ ot->exec = ptcache_free_bake_all_exec;
+ ot->poll = ptcache_bake_all_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int ptcache_bake_exec(bContext *C, wmOperator *op)
{
@@ -194,8 +195,8 @@ static int ptcache_bake_exec(bContext *C, wmOperator *op)
BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR);
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pid->cache == cache)
+ for (pid=pidlist.first; pid; pid=pid->next) {
+ if (pid->cache == cache)
break;
}
@@ -216,7 +217,8 @@ static int ptcache_bake_exec(bContext *C, wmOperator *op)
baker.progressbar = (void (*)(void *, int))WM_timecursor;
baker.progressend = (void (*)(void *))WM_cursor_restore;
baker.progresscontext = win;
- } else {
+ }
+ else {
printf("\n"); /* empty first line before console reports */
baker.progressbar = bake_console_progress;
baker.progressend = bake_console_progress_end;
@@ -238,8 +240,8 @@ static int ptcache_free_bake_exec(bContext *C, wmOperator *UNUSED(op))
PointCache *cache= ptr.data;
Object *ob= ptr.id.data;
- if(cache->edit) {
- if(!cache->edit->edited || 1) {// XXX okee("Lose changes done in particle mode?")) {
+ if (cache->edit) {
+ if (!cache->edit->edited || 1) {// XXX okee("Lose changes done in particle mode?")) {
PE_free_ptcache_edit(cache->edit);
cache->edit = NULL;
cache->flag &= ~PTCACHE_BAKED;
@@ -267,46 +269,46 @@ static int ptcache_bake_from_cache_exec(bContext *C, wmOperator *UNUSED(op))
void PTCACHE_OT_bake(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Bake Physics";
- ot->description= "Bake physics";
- ot->idname= "PTCACHE_OT_bake";
+ ot->name = "Bake Physics";
+ ot->description = "Bake physics";
+ ot->idname = "PTCACHE_OT_bake";
/* api callbacks */
- ot->exec= ptcache_bake_exec;
- ot->poll= ptcache_poll;
+ ot->exec = ptcache_bake_exec;
+ ot->poll = ptcache_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "bake", 0, "Bake", "");
}
void PTCACHE_OT_free_bake(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Free Physics Bake";
- ot->description= "Free physics bake";
- ot->idname= "PTCACHE_OT_free_bake";
+ ot->name = "Free Physics Bake";
+ ot->description = "Free physics bake";
+ ot->idname = "PTCACHE_OT_free_bake";
/* api callbacks */
- ot->exec= ptcache_free_bake_exec;
- ot->poll= ptcache_poll;
+ ot->exec = ptcache_free_bake_exec;
+ ot->poll = ptcache_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
void PTCACHE_OT_bake_from_cache(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Bake From Cache";
- ot->description= "Bake from cache";
- ot->idname= "PTCACHE_OT_bake_from_cache";
+ ot->name = "Bake From Cache";
+ ot->description = "Bake from cache";
+ ot->idname = "PTCACHE_OT_bake_from_cache";
/* api callbacks */
- ot->exec= ptcache_bake_from_cache_exec;
- ot->poll= ptcache_poll;
+ ot->exec = ptcache_bake_from_cache_exec;
+ ot->poll = ptcache_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int ptcache_add_new_exec(bContext *C, wmOperator *UNUSED(op))
@@ -320,8 +322,8 @@ static int ptcache_add_new_exec(bContext *C, wmOperator *UNUSED(op))
BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR);
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pid->cache == cache) {
+ for (pid=pidlist.first; pid; pid=pid->next) {
+ if (pid->cache == cache) {
PointCache *cache = BKE_ptcache_add(pid->ptcaches);
cache->step = pid->default_step;
*(pid->cache_ptr) = cache;
@@ -347,9 +349,9 @@ static int ptcache_remove_exec(bContext *C, wmOperator *UNUSED(op))
BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR);
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pid->cache == cache) {
- if(pid->ptcaches->first == pid->ptcaches->last)
+ for (pid=pidlist.first; pid; pid=pid->next) {
+ if (pid->cache == cache) {
+ if (pid->ptcaches->first == pid->ptcaches->last)
continue; /* don't delete last cache */
BLI_remlink(pid->ptcaches, pid->cache);
@@ -369,29 +371,29 @@ static int ptcache_remove_exec(bContext *C, wmOperator *UNUSED(op))
void PTCACHE_OT_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add New Cache";
- ot->description= "Add new cache";
- ot->idname= "PTCACHE_OT_add";
+ ot->name = "Add New Cache";
+ ot->description = "Add new cache";
+ ot->idname = "PTCACHE_OT_add";
/* api callbacks */
- ot->exec= ptcache_add_new_exec;
- ot->poll= ptcache_poll; // ptcache_bake_all_poll;
+ ot->exec = ptcache_add_new_exec;
+ ot->poll = ptcache_poll; // ptcache_bake_all_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
void PTCACHE_OT_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Current Cache";
- ot->description= "Delete current cache";
- ot->idname= "PTCACHE_OT_remove";
+ ot->name = "Delete Current Cache";
+ ot->description = "Delete current cache";
+ ot->idname = "PTCACHE_OT_remove";
/* api callbacks */
- ot->exec= ptcache_remove_exec;
- ot->poll= ptcache_poll;
+ ot->exec = ptcache_remove_exec;
+ ot->poll = ptcache_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 4fbc5085b2d..465a2e37269 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -82,22 +82,22 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat
unsigned char *rectc;
/* if renrect argument, we only refresh scanlines */
- if(renrect) {
+ if (renrect) {
/* if ymax==recty, rendering of layer is ready, we should not draw, other things happen... */
- if(rr->renlay==NULL || renrect->ymax>=rr->recty)
+ if (rr->renlay==NULL || renrect->ymax>=rr->recty)
return;
/* xmin here is first subrect x coord, xmax defines subrect width */
xmin = renrect->xmin + rr->crop;
xmax = renrect->xmax - xmin + rr->crop;
- if(xmax<2)
+ if (xmax<2)
return;
ymin= renrect->ymin + rr->crop;
ymax= renrect->ymax - ymin + rr->crop;
- if(ymax<2)
+ if (ymax<2)
return;
- renrect->ymin= renrect->ymax;
+ renrect->ymin = renrect->ymax;
}
else {
@@ -108,37 +108,37 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat
/* xmin ymin is in tile coords. transform to ibuf */
rxmin= rr->tilerect.xmin + xmin;
- if(rxmin >= ibuf->x) return;
+ if (rxmin >= ibuf->x) return;
rymin= rr->tilerect.ymin + ymin;
- if(rymin >= ibuf->y) return;
+ if (rymin >= ibuf->y) return;
- if(rxmin + xmax > ibuf->x)
+ if (rxmin + xmax > ibuf->x)
xmax= ibuf->x - rxmin;
- if(rymin + ymax > ibuf->y)
+ if (rymin + ymax > ibuf->y)
ymax= ibuf->y - rymin;
- if(xmax < 1 || ymax < 1) return;
+ if (xmax < 1 || ymax < 1) return;
/* find current float rect for display, first case is after composite... still weak */
- if(rr->rectf)
+ if (rr->rectf)
rectf= rr->rectf;
else {
- if(rr->rect32)
+ if (rr->rect32)
return;
else {
- if(rr->renlay==NULL || rr->renlay->rectf==NULL) return;
+ if (rr->renlay==NULL || rr->renlay->rectf==NULL) return;
rectf= rr->renlay->rectf;
}
}
- if(rectf==NULL) return;
+ if (rectf==NULL) return;
- if(ibuf->rect==NULL)
+ if (ibuf->rect==NULL)
imb_addrectImBuf(ibuf);
rectf+= 4*(rr->rectx*ymin + xmin);
rectc= (unsigned char*)(ibuf->rect + ibuf->x*rymin + rxmin);
- if(scene && (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT)) {
+ if (scene && (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT)) {
profile_from= IB_PROFILE_LINEAR_RGB;
predivide= (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT_PREDIVIDE);
}
@@ -160,7 +160,7 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat
static void screen_render_scene_layer_set(wmOperator *op, Main *mainp, Scene **scene, SceneRenderLayer **srl)
{
/* single layer re-render */
- if(RNA_struct_property_is_set(op->ptr, "scene")) {
+ if (RNA_struct_property_is_set(op->ptr, "scene")) {
Scene *scn;
char scene_name[MAX_ID_NAME-2];
@@ -176,7 +176,7 @@ static void screen_render_scene_layer_set(wmOperator *op, Main *mainp, Scene **s
}
}
- if(RNA_struct_property_is_set(op->ptr, "layer")) {
+ if (RNA_struct_property_is_set(op->ptr, "layer")) {
SceneRenderLayer *rl;
char rl_name[RE_MAXNAME];
@@ -205,7 +205,7 @@ static int screen_render_exec(bContext *C, wmOperator *op)
/* custom scene and single layer re-render */
screen_render_scene_layer_set(op, mainp, &scene, &srl);
- if(!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) {
+ if (!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) {
BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected");
return OPERATOR_CANCELLED;
}
@@ -228,7 +228,7 @@ static int screen_render_exec(bContext *C, wmOperator *op)
RE_SetReports(re, op->reports);
- if(is_animation)
+ if (is_animation)
RE_BlenderAnim(re, mainp, scene, camera_override, lay, scene->r.sfra, scene->r.efra, scene->r.frame_step);
else
RE_BlenderFrame(re, mainp, scene, srl, camera_override, lay, scene->r.cfra, is_write_still);
@@ -283,40 +283,40 @@ static void make_renderinfo_string(RenderStats *rs, Scene *scene, char *str)
mmap_used_memory= (mmap_in_use)/(1024.0*1024.0);
megs_peak_memory = (peak_memory)/(1024.0*1024.0);
- if(scene->lay & 0xFF000000)
+ if (scene->lay & 0xFF000000)
spos+= sprintf(spos, "Localview | ");
- else if(scene->r.scemode & R_SINGLE_LAYER)
+ else if (scene->r.scemode & R_SINGLE_LAYER)
spos+= sprintf(spos, "Single Layer | ");
- if(rs->statstr) {
+ if (rs->statstr) {
spos+= sprintf(spos, "%s ", rs->statstr);
}
else {
spos+= sprintf(spos, "Fra:%d ", (scene->r.cfra));
- if(rs->totvert) spos+= sprintf(spos, "Ve:%d ", rs->totvert);
- if(rs->totface) spos+= sprintf(spos, "Fa:%d ", rs->totface);
- if(rs->tothalo) spos+= sprintf(spos, "Ha:%d ", rs->tothalo);
- if(rs->totstrand) spos+= sprintf(spos, "St:%d ", rs->totstrand);
- if(rs->totlamp) spos+= sprintf(spos, "La:%d ", rs->totlamp);
+ if (rs->totvert) spos+= sprintf(spos, "Ve:%d ", rs->totvert);
+ if (rs->totface) spos+= sprintf(spos, "Fa:%d ", rs->totface);
+ if (rs->tothalo) spos+= sprintf(spos, "Ha:%d ", rs->tothalo);
+ if (rs->totstrand) spos+= sprintf(spos, "St:%d ", rs->totstrand);
+ if (rs->totlamp) spos+= sprintf(spos, "La:%d ", rs->totlamp);
spos+= sprintf(spos, "Mem:%.2fM (%.2fM, peak %.2fM) ", megs_used_memory, mmap_used_memory, megs_peak_memory);
- if(rs->curfield)
+ if (rs->curfield)
spos+= sprintf(spos, "Field %d ", rs->curfield);
- if(rs->curblur)
+ if (rs->curblur)
spos+= sprintf(spos, "Blur %d ", rs->curblur);
}
BLI_timestr(rs->lastframetime, info_time_str);
spos+= sprintf(spos, "Time:%s ", info_time_str);
- if(rs->curfsa)
+ if (rs->curfsa)
spos+= sprintf(spos, "| Full Sample %d ", rs->curfsa);
- if(rs->infostr && rs->infostr[0])
+ if (rs->infostr && rs->infostr[0])
spos+= sprintf(spos, "| %s ", rs->infostr);
/* very weak... but 512 characters is quite safe */
- if(spos >= str+IMA_MAX_RENDER_TEXT)
+ if (spos >= str+IMA_MAX_RENDER_TEXT)
if (G.f & G_DEBUG)
printf("WARNING! renderwin text beyond limit \n");
@@ -329,9 +329,9 @@ static void image_renderinfo_cb(void *rjv, RenderStats *rs)
rr= RE_AcquireResultRead(rj->re);
- if(rr) {
+ if (rr) {
/* malloc OK here, stats_draw is not in tile threads */
- if(rr->text==NULL)
+ if (rr->text==NULL)
rr->text= MEM_callocN(IMA_MAX_RENDER_TEXT, "rendertext");
make_renderinfo_string(rs, rj->scene, rr->text);
@@ -348,7 +348,7 @@ static void render_progress_update(void *rjv, float progress)
{
RenderJob *rj= rjv;
- if(rj->progress && *rj->progress != progress) {
+ if (rj->progress && *rj->progress != progress) {
*rj->progress = progress;
/* make jobs timer to send notifier */
@@ -364,11 +364,11 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec
void *lock;
/* only update if we are displaying the slot being rendered */
- if(ima->render_slot != ima->last_render_slot)
+ if (ima->render_slot != ima->last_render_slot)
return;
ibuf= BKE_image_acquire_ibuf(ima, &rj->iuser, &lock);
- if(ibuf) {
+ if (ibuf) {
image_buffer_rect_update(rj->scene, rr, ibuf, renrect);
/* make jobs timer to send notifier */
@@ -387,7 +387,7 @@ static void render_startjob(void *rjv, short *stop, short *do_update, float *pro
RE_SetReports(rj->re, rj->reports);
- if(rj->anim)
+ if (rj->anim)
RE_BlenderAnim(rj->re, rj->main, rj->scene, rj->camera_override, rj->lay, rj->scene->r.sfra, rj->scene->r.efra, rj->scene->r.frame_step);
else
RE_BlenderFrame(rj->re, rj->main, rj->scene, rj->srl, rj->camera_override, rj->lay, rj->scene->r.cfra, rj->write_still);
@@ -403,11 +403,11 @@ static void render_endjob(void *rjv)
* would be re-assigned. assign dummy callbacks to avoid referencing freed renderjobs bug [#24508] */
RE_InitRenderCB(rj->re);
- if(rj->main != G.main)
+ if (rj->main != G.main)
free_main(rj->main);
/* else the frame will not update for the original value */
- if(!(rj->scene->r.scemode & R_NO_FRAME_UPDATE))
+ if (!(rj->scene->r.scemode & R_NO_FRAME_UPDATE))
ED_update_for_newframe(G.main, rj->scene, rj->win->screen, 1);
/* XXX above function sets all tags in nodes */
@@ -416,7 +416,7 @@ static void render_endjob(void *rjv)
/* potentially set by caller */
rj->scene->r.scemode &= ~R_NO_FRAME_UPDATE;
- if(rj->srl) {
+ if (rj->srl) {
nodeUpdateID(rj->scene->nodetree, &rj->scene->id);
WM_main_add_notifier(NC_NODE|NA_EDITED, rj->scene);
}
@@ -431,9 +431,9 @@ static int render_breakjob(void *rjv)
{
RenderJob *rj= rjv;
- if(G.afbreek)
+ if (G.afbreek)
return 1;
- if(rj->stop && *(rj->stop))
+ if (rj->stop && *(rj->stop))
return 1;
return 0;
}
@@ -450,7 +450,7 @@ static void render_drawlock(void *UNUSED(rjv), int lock)
static int screen_render_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
/* no running blender, remove handler and pass through */
- if(0==WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C))) {
+ if (0==WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C))) {
return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
}
@@ -483,14 +483,14 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
const char *name;
/* only one render job at a time */
- if(WM_jobs_test(CTX_wm_manager(C), scene))
+ if (WM_jobs_test(CTX_wm_manager(C), scene))
return OPERATOR_CANCELLED;
- if(!RE_is_rendering_allowed(scene, camera_override, op->reports)) {
+ if (!RE_is_rendering_allowed(scene, camera_override, op->reports)) {
return OPERATOR_CANCELLED;
}
- if(!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) {
+ if (!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) {
BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected");
return OPERATOR_CANCELLED;
}
@@ -499,7 +499,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
WM_jobs_stop_all(CTX_wm_manager(C));
/* get main */
- if(G.rt == 101) {
+ if (G.rt == 101) {
/* thread-safety experiment, copy main from the undo buffer */
mainp= BKE_undo_get_main(&scene);
}
@@ -537,7 +537,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* custom scene and single layer re-render */
screen_render_scene_layer_set(op, mainp, &scene, &srl);
- if(RNA_struct_property_is_set(op->ptr, "layer"))
+ if (RNA_struct_property_is_set(op->ptr, "layer"))
jobflag |= WM_JOB_SUSPEND;
/* job custom data */
@@ -555,7 +555,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
rj->reports= op->reports;
/* setup job */
- if(RE_seq_render_active(scene, &scene->r)) name= "Sequence Render";
+ if (RE_seq_render_active(scene, &scene->r)) name= "Sequence Render";
else name= "Render";
steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, name, jobflag);
@@ -600,16 +600,16 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
void RENDER_OT_render(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Render";
- ot->description= "Render active scene";
- ot->idname= "RENDER_OT_render";
+ ot->name = "Render";
+ ot->description = "Render active scene";
+ ot->idname = "RENDER_OT_render";
/* api callbacks */
- ot->invoke= screen_render_invoke;
- ot->modal= screen_render_modal;
- ot->exec= screen_render_exec;
+ ot->invoke = screen_render_invoke;
+ ot->modal = screen_render_modal;
+ ot->exec = screen_render_exec;
- /*ot->poll= ED_operator_screenactive;*/ /* this isnt needed, causes failer in background mode */
+ /*ot->poll = ED_operator_screenactive;*/ /* this isn't needed, causes failer in background mode */
RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files from the animation range of this scene");
RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save rendered the image to the output path (used only when animation is disabled)");
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 79832e2a9d1..26996893ae5 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -104,7 +104,7 @@ typedef struct OGLRender {
/* added because v3d is not always valid */
static unsigned int screen_opengl_layers(OGLRender *oglrender)
{
- if(oglrender->v3d) {
+ if (oglrender->v3d) {
return oglrender->scene->lay | oglrender->v3d->lay;
}
else {
@@ -129,11 +129,11 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
rr= RE_AcquireResultRead(oglrender->re);
- if(view_context) {
+ if (view_context) {
GPU_offscreen_bind(oglrender->ofs); /* bind */
/* render 3d view */
- if(rv3d->persp==RV3D_CAMOB && v3d->camera) {
+ if (rv3d->persp==RV3D_CAMOB && v3d->camera) {
/*int is_ortho= scene->r.mode & R_ORTHO;*/
camera= v3d->camera;
RE_GetCameraWindow(oglrender->re, camera, scene->r.cfra, winmat);
@@ -144,11 +144,11 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
float clipsta, clipend;
int is_ortho= ED_view3d_viewplane_get(v3d, rv3d, sizex, sizey, &viewplane, &clipsta, &clipend);
- if(is_ortho) orthographic_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, -clipend, clipend);
+ if (is_ortho) orthographic_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, -clipend, clipend);
else perspective_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, clipsta, clipend);
}
- if((scene->r.mode & R_OSA) == 0) {
+ if ((scene->r.mode & R_OSA) == 0) {
ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat, TRUE);
GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, rr->rectf);
}
@@ -167,7 +167,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, accum_buffer);
/* skip the first sample */
- for(j=1; j < scene->r.osa; j++) {
+ for (j=1; j < scene->r.osa; j++) {
copy_m4_m4(winmat_jitter, winmat);
window_translate_m4(winmat_jitter, rv3d->persmat,
(jit_ofs[j][0] * 2.0f) / sizex,
@@ -192,7 +192,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
ImBuf *ibuf_view= ED_view3d_draw_offscreen_imbuf_simple(scene, scene->camera, oglrender->sizex, oglrender->sizey, IB_rectfloat, OB_SOLID, TRUE, err_out);
camera= scene->camera;
- if(ibuf_view) {
+ if (ibuf_view) {
memcpy(rr->rectf, ibuf_view->rect_float, sizeof(float) * 4 * oglrender->sizex * oglrender->sizey);
IMB_freeImBuf(ibuf_view);
}
@@ -203,7 +203,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
/* rr->rectf is now filled with image data */
- if((scene->r.stamp & R_STAMP_ALL) && (scene->r.stamp & R_STAMP_DRAW))
+ if ((scene->r.stamp & R_STAMP_ALL) && (scene->r.stamp & R_STAMP_DRAW))
BKE_stamp_buf(scene, camera, NULL, rr->rectf, rr->rectx, rr->recty, 4);
/* note on color management:
@@ -214,7 +214,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
* sRGB again, and so that e.g. openexr saving also saves the correct linear
* float buffer. */
- if(oglrender->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) {
+ if (oglrender->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) {
int predivide= 0; /* no alpha */
IMB_buffer_float_from_float(rr->rectf, rr->rectf,
@@ -227,20 +227,20 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
/* update byte from float buffer */
ibuf= BKE_image_acquire_ibuf(oglrender->ima, &oglrender->iuser, &lock);
- if(ibuf) {
+ if (ibuf) {
image_buffer_rect_update(scene, rr, ibuf, NULL);
- if(oglrender->write_still) {
+ if (oglrender->write_still) {
char name[FILE_MAX];
int ok;
- if(scene->r.im_format.planes == R_IMF_CHAN_DEPTH_8) {
+ if (scene->r.im_format.planes == R_IMF_CHAN_DEPTH_8) {
IMB_color_to_bw(ibuf);
}
BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, scene->r.im_format.imtype, scene->r.scemode & R_EXTENSION, FALSE);
ok= BKE_write_ibuf_as(ibuf, name, &scene->r.im_format, TRUE); /* no need to stamp here */
- if(ok) printf("OpenGL Render written to '%s'\n", name);
+ if (ok) printf("OpenGL Render written to '%s'\n", name);
else printf("OpenGL Render failed to write '%s'\n", name);
}
}
@@ -263,28 +263,28 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op)
const short is_write_still= RNA_boolean_get(op->ptr, "write_still");
char err_out[256]= "unknown";
- if(G.background) {
+ if (G.background) {
BKE_report(op->reports, RPT_ERROR, "Can't use OpenGL render in background mode (no opengl context)");
return 0;
}
/* ensure we have a 3d view */
- if(!ED_view3d_context_activate(C)) {
+ if (!ED_view3d_context_activate(C)) {
RNA_boolean_set(op->ptr, "view_context", FALSE);
is_view_context = 0;
}
/* only one render job at a time */
- if(WM_jobs_test(CTX_wm_manager(C), scene))
+ if (WM_jobs_test(CTX_wm_manager(C), scene))
return 0;
- if(!is_view_context && scene->camera==NULL) {
+ if (!is_view_context && scene->camera==NULL) {
BKE_report(op->reports, RPT_ERROR, "Scene has no camera");
return 0;
}
- if(!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) {
+ if (!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) {
BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected");
return 0;
}
@@ -302,7 +302,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op)
/* corrects render size with actual size, not every card supports non-power-of-two dimensions */
ofs= GPU_offscreen_create(sizex, sizey, err_out);
- if(!ofs) {
+ if (!ofs) {
BKE_reportf(op->reports, RPT_ERROR, "Failed to create OpenGL offscreen buffer, %s", err_out);
return 0;
}
@@ -326,7 +326,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op)
oglrender->prevsa= prevsa;
oglrender->prevar= prevar;
- if(is_view_context) {
+ if (is_view_context) {
ED_view3d_context_user_region(C, &oglrender->v3d, &oglrender->ar); /* so quad view renders camera */
oglrender->rv3d= oglrender->ar->regiondata;
@@ -355,7 +355,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op)
RE_InitState(oglrender->re, NULL, &scene->r, NULL, sizex, sizey, NULL);
rr= RE_AcquireResultWrite(oglrender->re);
- if(rr->rectf==NULL)
+ if (rr->rectf==NULL)
rr->rectf= MEM_callocN(sizeof(float)*4*sizex*sizey, "screen_opengl_render_init rect");
RE_ReleaseResult(oglrender->re);
@@ -367,12 +367,12 @@ static void screen_opengl_render_end(bContext *C, OGLRender *oglrender)
Main *bmain= CTX_data_main(C);
Scene *scene= oglrender->scene;
- if(oglrender->mh) {
- if(BKE_imtype_is_movie(scene->r.im_format.imtype))
+ if (oglrender->mh) {
+ if (BKE_imtype_is_movie(scene->r.im_format.imtype))
oglrender->mh->end_movie();
}
- if(oglrender->timer) { /* exec will not have a timer */
+ if (oglrender->timer) { /* exec will not have a timer */
scene->r.cfra= oglrender->cfrao;
scene_update_for_newframe(bmain, scene, screen_opengl_layers(oglrender));
@@ -413,8 +413,8 @@ static int screen_opengl_render_anim_initialize(bContext *C, wmOperator *op)
oglrender->reports= op->reports;
oglrender->mh= BKE_get_movie_handle(scene->r.im_format.imtype);
- if(BKE_imtype_is_movie(scene->r.im_format.imtype)) {
- if(!oglrender->mh->start_movie(scene, &scene->r, oglrender->sizex, oglrender->sizey, oglrender->reports)) {
+ if (BKE_imtype_is_movie(scene->r.im_format.imtype)) {
+ if (!oglrender->mh->start_movie(scene, &scene->r, oglrender->sizex, oglrender->sizey, oglrender->reports)) {
screen_opengl_render_end(C, oglrender);
return 0;
}
@@ -439,14 +439,14 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
Object *camera= NULL;
/* update animated image textures for gpu, etc,
- * call before scene_update_for_newframe so modifiers with textuers dont lag 1 frame */
+ * call before scene_update_for_newframe so modifiers with textuers don't lag 1 frame */
ED_image_update_frame(bmain, scene->r.cfra);
/* go to next frame */
- while(CFRA<oglrender->nfra) {
+ while (CFRA<oglrender->nfra) {
unsigned int lay= screen_opengl_layers(oglrender);
- if(lay & 0xFF000000)
+ if (lay & 0xFF000000)
lay &= 0xFF000000;
scene_update_for_newframe(bmain, scene, lay);
@@ -455,11 +455,11 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
scene_update_for_newframe(bmain, scene, screen_opengl_layers(oglrender));
- if(view_context) {
- if(oglrender->rv3d->persp==RV3D_CAMOB && oglrender->v3d->camera && oglrender->v3d->scenelock) {
+ if (view_context) {
+ if (oglrender->rv3d->persp==RV3D_CAMOB && oglrender->v3d->camera && oglrender->v3d->scenelock) {
/* since scene_update_for_newframe() is used rather
* then ED_update_for_newframe() the camera needs to be set */
- if(scene_camera_switch_update(scene)) {
+ if (scene_camera_switch_update(scene)) {
oglrender->v3d->camera= scene->camera;
}
@@ -478,10 +478,10 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
/* save to disk */
ibuf= BKE_image_acquire_ibuf(oglrender->ima, &oglrender->iuser, &lock);
- if(ibuf) {
+ if (ibuf) {
/* color -> greyscale */
/* editing directly would alter the render view */
- if(scene->r.im_format.planes == R_IMF_PLANES_BW) {
+ if (scene->r.im_format.planes == R_IMF_PLANES_BW) {
ImBuf *ibuf_bw= IMB_dupImBuf(ibuf);
IMB_color_to_bw(ibuf_bw);
// IMB_freeImBuf(ibuf); /* owned by the image */
@@ -497,10 +497,10 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
ibuf= ibuf_cpy;
}
- if(BKE_imtype_is_movie(scene->r.im_format.imtype)) {
+ if (BKE_imtype_is_movie(scene->r.im_format.imtype)) {
ok= oglrender->mh->append_movie(&scene->r, SFRA, CFRA, (int*)ibuf->rect,
oglrender->sizex, oglrender->sizey, oglrender->reports);
- if(ok) {
+ if (ok) {
printf("Append frame %d", scene->r.cfra);
BKE_reportf(op->reports, RPT_INFO, "Appended frame: %d", scene->r.cfra);
}
@@ -509,7 +509,7 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, scene->r.im_format.imtype, scene->r.scemode & R_EXTENSION, TRUE);
ok= BKE_write_ibuf_stamp(scene, camera, ibuf, name, &scene->r.im_format);
- if(ok==0) {
+ if (ok==0) {
printf("Write error: cannot save %s\n", name);
BKE_reportf(op->reports, RPT_ERROR, "Write error: cannot save %s", name);
}
@@ -533,7 +533,7 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
scene->r.cfra++;
/* stop at the end or on error */
- if(scene->r.cfra > PEFRA || !ok) {
+ if (scene->r.cfra > PEFRA || !ok) {
screen_opengl_render_end(C, op->customdata);
return 0;
}
@@ -555,7 +555,7 @@ static int screen_opengl_render_modal(bContext *C, wmOperator *op, wmEvent *even
return OPERATOR_FINISHED;
case TIMER:
/* render frame? */
- if(oglrender->timer == event->customdata)
+ if (oglrender->timer == event->customdata)
break;
default:
/* nothing to do */
@@ -565,7 +565,7 @@ static int screen_opengl_render_modal(bContext *C, wmOperator *op, wmEvent *even
/* run first because screen_opengl_render_anim_step can free oglrender */
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, oglrender->scene);
- if(anim == 0) {
+ if (anim == 0) {
screen_opengl_render_apply(op->customdata);
screen_opengl_render_end(C, op->customdata);
return OPERATOR_FINISHED;
@@ -574,7 +574,7 @@ static int screen_opengl_render_modal(bContext *C, wmOperator *op, wmEvent *even
ret= screen_opengl_render_anim_step(C, op);
/* stop at the end or on error */
- if(ret == 0) {
+ if (ret == 0) {
return OPERATOR_FINISHED;
}
@@ -586,11 +586,11 @@ static int screen_opengl_render_invoke(bContext *C, wmOperator *op, wmEvent *eve
OGLRender *oglrender;
int anim= RNA_boolean_get(op->ptr, "animation");
- if(!screen_opengl_render_init(C, op))
+ if (!screen_opengl_render_init(C, op))
return OPERATOR_CANCELLED;
- if(anim) {
- if(!screen_opengl_render_anim_initialize(C, op))
+ if (anim) {
+ if (!screen_opengl_render_anim_initialize(C, op))
return OPERATOR_CANCELLED;
}
@@ -608,10 +608,10 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op)
{
const short is_animation= RNA_boolean_get(op->ptr, "animation");
- if(!screen_opengl_render_init(C, op))
+ if (!screen_opengl_render_init(C, op))
return OPERATOR_CANCELLED;
- if(!is_animation) { /* same as invoke */
+ if (!is_animation) { /* same as invoke */
/* render image */
screen_opengl_render_apply(op->customdata);
screen_opengl_render_end(C, op->customdata);
@@ -621,10 +621,10 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op)
else {
int ret= 1;
- if(!screen_opengl_render_anim_initialize(C, op))
+ if (!screen_opengl_render_anim_initialize(C, op))
return OPERATOR_CANCELLED;
- while(ret) {
+ while (ret) {
ret= screen_opengl_render_anim_step(C, op);
}
}
@@ -639,17 +639,17 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op)
void RENDER_OT_opengl(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "OpenGL Render";
- ot->description= "OpenGL render active viewport";
- ot->idname= "RENDER_OT_opengl";
+ ot->name = "OpenGL Render";
+ ot->description = "OpenGL render active viewport";
+ ot->idname = "RENDER_OT_opengl";
/* api callbacks */
- ot->invoke= screen_opengl_render_invoke;
- ot->exec= screen_opengl_render_exec; /* blocking */
- ot->modal= screen_opengl_render_modal;
- ot->cancel= screen_opengl_render_cancel;
+ ot->invoke = screen_opengl_render_invoke;
+ ot->exec = screen_opengl_render_exec; /* blocking */
+ ot->modal = screen_opengl_render_modal;
+ ot->cancel = screen_opengl_render_cancel;
- ot->poll= ED_operator_screenactive;
+ ot->poll = ED_operator_screenactive;
RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files from the animation range of this scene");
RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save rendered the image to the output path (used only when animation is disabled)");
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index f0ef7c633cb..9ba961302f1 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -202,29 +202,29 @@ void ED_preview_init_dbase(void)
void ED_preview_free_dbase(void)
{
- if(pr_main)
+ if (pr_main)
free_main(pr_main);
}
static int preview_mat_has_sss(Material *mat, bNodeTree *ntree)
{
- if(mat) {
- if(mat->sss_flag & MA_DIFF_SSS)
+ if (mat) {
+ if (mat->sss_flag & MA_DIFF_SSS)
return 1;
- if(mat->nodetree)
- if( preview_mat_has_sss(NULL, mat->nodetree))
+ if (mat->nodetree)
+ if ( preview_mat_has_sss(NULL, mat->nodetree))
return 1;
}
- else if(ntree) {
+ else if (ntree) {
bNode *node;
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->type==NODE_GROUP && node->id) {
- if( preview_mat_has_sss(NULL, (bNodeTree *)node->id))
+ for (node= ntree->nodes.first; node; node= node->next) {
+ if (node->type==NODE_GROUP && node->id) {
+ if ( preview_mat_has_sss(NULL, (bNodeTree *)node->id))
return 1;
}
- else if(node->id && ELEM(node->type, SH_NODE_MATERIAL, SH_NODE_MATERIAL_EXT)) {
+ else if (node->id && ELEM(node->type, SH_NODE_MATERIAL, SH_NODE_MATERIAL_EXT)) {
mat= (Material *)node->id;
- if(mat->sss_flag & MA_DIFF_SSS)
+ if (mat->sss_flag & MA_DIFF_SSS)
return 1;
}
}
@@ -239,17 +239,17 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
Scene *sce;
Base *base;
- if(pr_main==NULL) return NULL;
+ if (pr_main==NULL) return NULL;
sce= pr_main->scene.first;
- if(sce) {
+ if (sce) {
/* this flag tells render to not execute depsgraph or ipos etc */
sce->r.scemode |= R_PREVIEWBUTS;
/* set world always back, is used now */
sce->world= pr_main->world.first;
/* now: exposure copy */
- if(scene->world) {
+ if (scene->world) {
sce->world->exp= scene->world->exp;
sce->world->range= scene->world->range;
}
@@ -257,16 +257,16 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
sce->r.color_mgt_flag = scene->r.color_mgt_flag;
/* prevent overhead for small renders and icons (32) */
- if(id && sp->sizex < 40)
+ if (id && sp->sizex < 40)
sce->r.xparts= sce->r.yparts= 1;
else
sce->r.xparts= sce->r.yparts= 4;
/* exception: don't color manage texture previews or icons */
- if((id && sp->pr_method==PR_ICON_RENDER) || id_type == ID_TE)
+ if ((id && sp->pr_method==PR_ICON_RENDER) || id_type == ID_TE)
sce->r.color_mgt_flag &= ~R_COLOR_MANAGEMENT;
- if((id && sp->pr_method==PR_ICON_RENDER) && id_type != ID_WO)
+ if ((id && sp->pr_method==PR_ICON_RENDER) && id_type != ID_WO)
sce->r.alphamode= R_ALPHAPREMUL;
else
sce->r.alphamode= R_ADDSKY;
@@ -274,10 +274,10 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
sce->r.cfra= scene->r.cfra;
BLI_strncpy(sce->r.engine, scene->r.engine, sizeof(sce->r.engine));
- if(id_type==ID_MA) {
+ if (id_type==ID_MA) {
Material *mat= NULL, *origmat= (Material *)id;
- if(origmat) {
+ if (origmat) {
/* work on a copy */
mat= localize_material(origmat);
sp->matcopy= mat;
@@ -287,27 +287,27 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
end_render_material(mat);
/* un-useful option */
- if(sp->pr_method==PR_ICON_RENDER)
+ if (sp->pr_method==PR_ICON_RENDER)
mat->shade_flag &= ~MA_OBCOLOR;
/* turn on raytracing if needed */
- if(mat->mode_l & MA_RAYMIRROR)
+ if (mat->mode_l & MA_RAYMIRROR)
sce->r.mode |= R_RAYTRACE;
- if(mat->material_type == MA_TYPE_VOLUME)
+ if (mat->material_type == MA_TYPE_VOLUME)
sce->r.mode |= R_RAYTRACE;
- if((mat->mode_l & MA_RAYTRANSP) && (mat->mode_l & MA_TRANSP))
+ if ((mat->mode_l & MA_RAYTRANSP) && (mat->mode_l & MA_TRANSP))
sce->r.mode |= R_RAYTRACE;
- if(preview_mat_has_sss(mat, NULL))
+ if (preview_mat_has_sss(mat, NULL))
sce->r.mode |= R_SSS;
/* turn off fake shadows if needed */
/* this only works in a specific case where the preview.blend contains
* an object starting with 'c' which has a material linked to it (not the obdata)
* and that material has a fake shadow texture in the active texture slot */
- for(base= sce->base.first; base; base= base->next) {
- if(base->object->id.name[2]=='c') {
+ for (base= sce->base.first; base; base= base->next) {
+ if (base->object->id.name[2]=='c') {
Material *shadmat= give_current_material(base->object, base->object->actcol);
- if(shadmat) {
+ if (shadmat) {
if (mat->mode & MA_SHADBUF) shadmat->septex = 0;
else shadmat->septex |= 1;
}
@@ -316,11 +316,11 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
/* turn off bounce lights for volume,
* doesn't make much visual difference and slows it down too */
- if(mat->material_type == MA_TYPE_VOLUME) {
- for(base= sce->base.first; base; base= base->next) {
- if(base->object->type == OB_LAMP) {
+ if (mat->material_type == MA_TYPE_VOLUME) {
+ for (base= sce->base.first; base; base= base->next) {
+ if (base->object->type == OB_LAMP) {
/* if doesn't match 'Lamp.002' --> main key light */
- if( strcmp(base->object->id.name+2, "Lamp.002") != 0 ) {
+ if ( strcmp(base->object->id.name+2, "Lamp.002") != 0 ) {
base->object->restrictflag |= OB_RESTRICT_RENDER;
}
}
@@ -328,7 +328,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
}
- if(sp->pr_method==PR_ICON_RENDER) {
+ if (sp->pr_method==PR_ICON_RENDER) {
if (mat->material_type == MA_TYPE_HALO) {
sce->lay= 1<<MA_FLAT;
}
@@ -338,7 +338,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
}
else {
sce->lay= 1<<mat->pr_type;
- if(mat->nodetree && sp->pr_method==PR_NODE_RENDER) {
+ if (mat->nodetree && sp->pr_method==PR_NODE_RENDER) {
/* two previews, they get copied by wmJob */
ntreeInitPreview(mat->nodetree, sp->sizex, sp->sizey);
ntreeInitPreview(origmat->nodetree, sp->sizex, sp->sizey);
@@ -350,45 +350,46 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
}
- for(base= sce->base.first; base; base= base->next) {
- if(base->object->id.name[2]=='p') {
+ for (base= sce->base.first; base; base= base->next) {
+ if (base->object->id.name[2]=='p') {
/* copy over object color, in case material uses it */
copy_v4_v4(base->object->col, sp->col);
- if(OB_TYPE_SUPPORT_MATERIAL(base->object->type)) {
+ if (OB_TYPE_SUPPORT_MATERIAL(base->object->type)) {
/* don't use assign_material, it changed mat->id.us, which shows in the UI */
Material ***matar= give_matarar(base->object);
int actcol= MAX2(base->object->actcol > 0, 1) - 1;
- if(matar && actcol < base->object->totcol)
+ if (matar && actcol < base->object->totcol)
(*matar)[actcol]= mat;
- } else if (base->object->type == OB_LAMP) {
+ }
+ else if (base->object->type == OB_LAMP) {
base->object->restrictflag &= ~OB_RESTRICT_RENDER;
}
}
}
}
- else if(id_type==ID_TE) {
+ else if (id_type==ID_TE) {
Tex *tex= NULL, *origtex= (Tex *)id;
- if(origtex) {
+ if (origtex) {
tex= localize_texture(origtex);
sp->texcopy= tex;
BLI_addtail(&pr_main->tex, tex);
}
sce->lay= 1<<MA_TEXTURE;
- for(base= sce->base.first; base; base= base->next) {
- if(base->object->id.name[2]=='t') {
+ for (base= sce->base.first; base; base= base->next) {
+ if (base->object->id.name[2]=='t') {
Material *mat= give_current_material(base->object, base->object->actcol);
- if(mat && mat->mtex[0]) {
+ if (mat && mat->mtex[0]) {
mat->mtex[0]->tex= tex;
- if(tex && sp->slot)
+ if (tex && sp->slot)
mat->mtex[0]->which_output = sp->slot->which_output;
/* show alpha in this case */
- if(tex==NULL || (tex->flag & TEX_PRV_ALPHA)) {
+ if (tex==NULL || (tex->flag & TEX_PRV_ALPHA)) {
mat->mtex[0]->mapto |= MAP_ALPHA;
mat->alpha= 0.0f;
}
@@ -400,23 +401,23 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
}
}
- if(tex && tex->nodetree && sp->pr_method==PR_NODE_RENDER) {
+ if (tex && tex->nodetree && sp->pr_method==PR_NODE_RENDER) {
/* two previews, they get copied by wmJob */
ntreeInitPreview(origtex->nodetree, sp->sizex, sp->sizey);
ntreeInitPreview(tex->nodetree, sp->sizex, sp->sizey);
}
}
- else if(id_type==ID_LA) {
+ else if (id_type==ID_LA) {
Lamp *la= NULL, *origla= (Lamp *)id;
/* work on a copy */
- if(origla) {
+ if (origla) {
la= localize_lamp(origla);
sp->lampcopy= la;
BLI_addtail(&pr_main->lamp, la);
}
- if(la && la->type==LA_SUN && (la->sun_effect_type & LA_SUN_EFFECT_SKY)) {
+ if (la && la->type==LA_SUN && (la->sun_effect_type & LA_SUN_EFFECT_SKY)) {
sce->lay= 1<<MA_ATMOS;
sce->world= scene->world;
sce->camera= (Object *)BLI_findstring(&pr_main->object, "CameraAtmo", offsetof(ID, name)+2);
@@ -428,23 +429,23 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
}
sce->r.mode &= ~R_SHADOW;
- for(base= sce->base.first; base; base= base->next) {
- if(base->object->id.name[2]=='p') {
- if(base->object->type==OB_LAMP)
+ for (base= sce->base.first; base; base= base->next) {
+ if (base->object->id.name[2]=='p') {
+ if (base->object->type==OB_LAMP)
base->object->data= la;
}
}
- if(la && la->nodetree && sp->pr_method==PR_NODE_RENDER) {
+ if (la && la->nodetree && sp->pr_method==PR_NODE_RENDER) {
/* two previews, they get copied by wmJob */
ntreeInitPreview(origla->nodetree, sp->sizex, sp->sizey);
ntreeInitPreview(la->nodetree, sp->sizex, sp->sizey);
}
}
- else if(id_type==ID_WO) {
+ else if (id_type==ID_WO) {
World *wrld= NULL, *origwrld= (World *)id;
- if(origwrld) {
+ if (origwrld) {
wrld= localize_world(origwrld);
sp->worldcopy= wrld;
BLI_addtail(&pr_main->world, wrld);
@@ -453,7 +454,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
sce->lay= 1<<MA_SKY;
sce->world= wrld;
- if(wrld && wrld->nodetree && sp->pr_method==PR_NODE_RENDER) {
+ if (wrld && wrld->nodetree && sp->pr_method==PR_NODE_RENDER) {
/* two previews, they get copied by wmJob */
ntreeInitPreview(wrld->nodetree, sp->sizex, sp->sizey);
ntreeInitPreview(origwrld->nodetree, sp->sizex, sp->sizey);
@@ -484,11 +485,11 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
}
}
- if(!split || first) sprintf(name, "Preview %p", (void *)sa);
+ if (!split || first) sprintf(name, "Preview %p", (void *)sa);
else sprintf(name, "SecondPreview %p", (void *)sa);
- if(split) {
- if(first) {
+ if (split) {
+ if (first) {
offx= 0;
newx= newx/2;
}
@@ -501,14 +502,14 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
re= RE_GetRender(name);
RE_AcquireResultImage(re, &rres);
- if(rres.rectf) {
+ if (rres.rectf) {
- if(ABS(rres.rectx-newx)<2 && ABS(rres.recty-newy)<2) {
+ if (ABS(rres.rectx-newx)<2 && ABS(rres.recty-newy)<2) {
- newrect->xmax= MAX2(newrect->xmax, rect->xmin + rres.rectx + offx);
- newrect->ymax= MAX2(newrect->ymax, rect->ymin + rres.recty);
+ newrect->xmax = MAX2(newrect->xmax, rect->xmin + rres.rectx + offx);
+ newrect->ymax = MAX2(newrect->ymax, rect->ymin + rres.recty);
- if(rres.rectx && rres.recty) {
+ if (rres.rectx && rres.recty) {
/* temporary conversion to byte for drawing */
float fx= rect->xmin + offx;
float fy= rect->ymin;
@@ -538,7 +539,7 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, rcti *rect)
{
- if(idp) {
+ if (idp) {
ScrArea *sa= CTX_wm_area(C);
Scene *sce = CTX_data_scene(C);
ID *id = (ID *)idp;
@@ -549,28 +550,28 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r
int ok;
int newx= rect->xmax-rect->xmin, newy= rect->ymax-rect->ymin;
- newrect.xmin= rect->xmin;
- newrect.xmax= rect->xmin;
- newrect.ymin= rect->ymin;
- newrect.ymax= rect->ymin;
+ newrect.xmin = rect->xmin;
+ newrect.xmax = rect->xmin;
+ newrect.ymin = rect->ymin;
+ newrect.ymax = rect->ymin;
- if(parent) {
+ if (parent) {
ok = ed_preview_draw_rect(sa, sce, id, 1, 1, rect, &newrect);
ok &= ed_preview_draw_rect(sa, sce, parent, 1, 0, rect, &newrect);
}
else
ok = ed_preview_draw_rect(sa, sce, id, 0, 0, rect, &newrect);
- if(ok)
+ if (ok)
*rect= newrect;
/* check for spacetype... */
- if(sbuts->spacetype==SPACE_BUTS && sbuts->preview) {
+ if (sbuts->spacetype==SPACE_BUTS && sbuts->preview) {
sbuts->preview= 0;
ok= 0;
}
- if(ok==0) {
+ if (ok==0) {
ED_preview_shader_job(C, sa, id, parent, slot, newx, newy, PR_BUTS_RENDER);
}
}
@@ -599,30 +600,30 @@ static void shader_preview_updatejob(void *spv)
{
ShaderPreview *sp= spv;
- if(sp->id) {
- if(sp->pr_method==PR_NODE_RENDER) {
- if( GS(sp->id->name) == ID_MA) {
+ if (sp->id) {
+ if (sp->pr_method==PR_NODE_RENDER) {
+ if ( GS(sp->id->name) == ID_MA) {
Material *mat= (Material *)sp->id;
- if(sp->matcopy && mat->nodetree && sp->matcopy->nodetree)
+ if (sp->matcopy && mat->nodetree && sp->matcopy->nodetree)
ntreeLocalSync(sp->matcopy->nodetree, mat->nodetree);
}
- else if( GS(sp->id->name) == ID_TE) {
+ else if ( GS(sp->id->name) == ID_TE) {
Tex *tex= (Tex *)sp->id;
- if(sp->texcopy && tex->nodetree && sp->texcopy->nodetree)
+ if (sp->texcopy && tex->nodetree && sp->texcopy->nodetree)
ntreeLocalSync(sp->texcopy->nodetree, tex->nodetree);
}
- else if( GS(sp->id->name) == ID_WO) {
+ else if ( GS(sp->id->name) == ID_WO) {
World *wrld= (World *)sp->id;
- if(sp->worldcopy && wrld->nodetree && sp->worldcopy->nodetree)
+ if (sp->worldcopy && wrld->nodetree && sp->worldcopy->nodetree)
ntreeLocalSync(sp->worldcopy->nodetree, wrld->nodetree);
}
- else if( GS(sp->id->name) == ID_LA) {
+ else if ( GS(sp->id->name) == ID_LA) {
Lamp *la= (Lamp *)sp->id;
- if(sp->lampcopy && la->nodetree && sp->lampcopy->nodetree)
+ if (sp->lampcopy && la->nodetree && sp->lampcopy->nodetree)
ntreeLocalSync(sp->lampcopy->nodetree, la->nodetree);
}
}
@@ -640,27 +641,27 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
/* get the stuff from the builtin preview dbase */
sce= preview_prepare_scene(sp->scene, id, idtype, sp); // XXX sizex
- if(sce==NULL) return;
+ if (sce==NULL) return;
- if(!split || first) sprintf(name, "Preview %p", sp->owner);
+ if (!split || first) sprintf(name, "Preview %p", sp->owner);
else sprintf(name, "SecondPreview %p", sp->owner);
re= RE_GetRender(name);
/* full refreshed render from first tile */
- if(re==NULL)
+ if (re==NULL)
re= RE_NewRender(name);
/* sce->r gets copied in RE_InitState! */
sce->r.scemode &= ~(R_MATNODE_PREVIEW|R_TEXNODE_PREVIEW);
sce->r.scemode &= ~R_NO_IMAGE_LOAD;
- if(sp->pr_method==PR_ICON_RENDER) {
+ if (sp->pr_method==PR_ICON_RENDER) {
sce->r.scemode |= R_NO_IMAGE_LOAD;
sce->r.mode |= R_OSA;
}
- else if(sp->pr_method==PR_NODE_RENDER) {
- if(idtype == ID_MA) sce->r.scemode |= R_MATNODE_PREVIEW;
- else if(idtype == ID_TE) sce->r.scemode |= R_TEXNODE_PREVIEW;
+ else if (sp->pr_method==PR_NODE_RENDER) {
+ if (idtype == ID_MA) sce->r.scemode |= R_MATNODE_PREVIEW;
+ else if (idtype == ID_TE) sce->r.scemode |= R_TEXNODE_PREVIEW;
sce->r.mode &= ~R_OSA;
}
else { /* PR_BUTS_RENDER */
@@ -668,8 +669,8 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
}
/* in case of split preview, use border render */
- if(split) {
- if(first) sizex= sp->sizex/2;
+ if (split) {
+ if (first) sizex= sp->sizex/2;
else sizex= sp->sizex - sp->sizex/2;
}
else sizex= sp->sizex;
@@ -680,7 +681,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
sce->r.size= 100;
/* callbacs are cleared on GetRender() */
- if(ELEM(sp->pr_method, PR_BUTS_RENDER, PR_NODE_RENDER)) {
+ if (ELEM(sp->pr_method, PR_BUTS_RENDER, PR_NODE_RENDER)) {
RE_display_draw_cb(re, sp, shader_preview_draw);
}
/* set this for all previews, default is react to G.afbreek still */
@@ -688,7 +689,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
/* lens adjust */
oldlens= ((Camera *)sce->camera->data)->lens;
- if(sizex > sp->sizey)
+ if (sizex > sp->sizey)
((Camera *)sce->camera->data)->lens *= (float)sp->sizey/(float)sizex;
/* entire cycle for render engine */
@@ -697,10 +698,10 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
((Camera *)sce->camera->data)->lens= oldlens;
/* handle results */
- if(sp->pr_method==PR_ICON_RENDER) {
+ if (sp->pr_method==PR_ICON_RENDER) {
// char *rct= (char *)(sp->pr_rect + 32*16 + 16);
- if(sp->pr_rect)
+ if (sp->pr_rect)
RE_ResultGet32(re, sp->pr_rect);
}
else {
@@ -714,9 +715,9 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
preview_prepare_scene(sp->scene, NULL, GS(id->name), sp);
/* XXX bad exception, end-exec is not being called in render, because it uses local main */
-// if(idtype == ID_TE) {
+// if (idtype == ID_TE) {
// Tex *tex= (Tex *)id;
-// if(tex->use_nodes && tex->nodetree)
+// if (tex->use_nodes && tex->nodetree)
// ntreeEndExecTree(tex->nodetree);
// }
@@ -730,7 +731,7 @@ static void shader_preview_startjob(void *customdata, short *stop, short *do_upd
sp->stop= stop;
sp->do_update= do_update;
- if(sp->parent) {
+ if (sp->parent) {
shader_preview_render(sp, sp->id, 1, 1);
shader_preview_render(sp, sp->parent, 1, 0);
}
@@ -744,7 +745,7 @@ static void shader_preview_free(void *customdata)
{
ShaderPreview *sp= customdata;
- if(sp->matcopy) {
+ if (sp->matcopy) {
struct IDProperty *properties;
int a;
@@ -755,9 +756,9 @@ static void shader_preview_free(void *customdata)
BLI_remlink(&pr_main->mat, sp->matcopy);
/* free_material decrements texture, prevent this. hack alert! */
- for(a=0; a<MAX_MTEX; a++) {
+ for (a=0; a<MAX_MTEX; a++) {
MTex *mtex= sp->matcopy->mtex[a];
- if(mtex && mtex->tex) mtex->tex= NULL;
+ if (mtex && mtex->tex) mtex->tex= NULL;
}
free_material(sp->matcopy);
@@ -769,7 +770,7 @@ static void shader_preview_free(void *customdata)
}
MEM_freeN(sp->matcopy);
}
- if(sp->texcopy) {
+ if (sp->texcopy) {
struct IDProperty *properties;
/* node previews */
shader_preview_updatejob(sp);
@@ -785,7 +786,7 @@ static void shader_preview_free(void *customdata)
}
MEM_freeN(sp->texcopy);
}
- if(sp->worldcopy) {
+ if (sp->worldcopy) {
struct IDProperty *properties;
/* node previews */
shader_preview_updatejob(sp);
@@ -801,7 +802,7 @@ static void shader_preview_free(void *customdata)
}
MEM_freeN(sp->worldcopy);
}
- if(sp->lampcopy) {
+ if (sp->lampcopy) {
struct IDProperty *properties;
/* node previews */
shader_preview_updatejob(sp);
@@ -831,7 +832,7 @@ static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned
short ex, ey, dx, dy;
/* paranoia test */
- if(ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL))
+ if (ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL))
return;
/* waste of cpu cyles... but the imbuf API has no other way to scale fast (ton) */
@@ -858,14 +859,14 @@ static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned
IMB_scalefastImBuf(ima, ex, ey);
/* if needed, convert to 32 bits */
- if(ima->rect==NULL)
+ if (ima->rect==NULL)
IMB_rect_from_float(ima);
srect = ima->rect;
drect = rect;
drect+= dy*w+dx;
- for (;ey > 0; ey--){
+ for (;ey > 0; ey--) {
memcpy(drect,srect, ex * sizeof(int));
drect += w;
srect += ima->x;
@@ -878,7 +879,7 @@ static void set_alpha(char *cp, int sizex, int sizey, char alpha)
{
int a, size= sizex*sizey;
- for(a=0; a<size; a++, cp+=4)
+ for (a=0; a<size; a++, cp+=4)
cp[3]= alpha;
}
@@ -888,13 +889,13 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat
ID *id= sp->id;
short idtype= GS(id->name);
- if(idtype == ID_IM) {
+ if (idtype == ID_IM) {
Image *ima= (Image*)id;
ImBuf *ibuf= NULL;
ImageUser iuser= {NULL};
/* ima->ok is zero when Image cannot load */
- if(ima==NULL || ima->ok==0)
+ if (ima==NULL || ima->ok==0)
return;
/* setup dummy image user */
@@ -905,21 +906,21 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat
* already there. Very expensive for large images. Need to find a way to
* only get existing ibuf */
ibuf = BKE_image_get_ibuf(ima, &iuser);
- if(ibuf==NULL || ibuf->rect==NULL)
+ if (ibuf==NULL || ibuf->rect==NULL)
return;
icon_copy_rect(ibuf, sp->sizex, sp->sizey, sp->pr_rect);
*do_update= 1;
}
- else if(idtype == ID_BR) {
+ else if (idtype == ID_BR) {
Brush *br= (Brush*)id;
br->icon_imbuf= get_brush_icon(br);
memset(sp->pr_rect, 0x888888, sp->sizex*sp->sizey*sizeof(unsigned int));
- if(!(br->icon_imbuf) || !(br->icon_imbuf->rect))
+ if (!(br->icon_imbuf) || !(br->icon_imbuf->rect))
return;
icon_copy_rect(br->icon_imbuf, sp->sizex, sp->sizey, sp->pr_rect);
@@ -932,13 +933,13 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat
/* world is rendered with alpha=0, so it wasn't displayed
* this could be render option for sky to, for later */
- if(idtype == ID_WO) {
+ if (idtype == ID_WO) {
set_alpha((char*)sp->pr_rect, sp->sizex, sp->sizey, 255);
}
- else if(idtype == ID_MA) {
+ else if (idtype == ID_MA) {
Material* ma = (Material*)id;
- if(ma->material_type == MA_TYPE_HALO)
+ if (ma->material_type == MA_TYPE_HALO)
set_alpha((char*)sp->pr_rect, sp->sizex, sp->sizey, 255);
}
}
@@ -951,7 +952,7 @@ static void common_preview_startjob(void *customdata, short *stop, short *do_upd
{
ShaderPreview *sp= customdata;
- if(sp->pr_method == PR_ICON_RENDER)
+ if (sp->pr_method == PR_ICON_RENDER)
icon_preview_startjob(customdata, stop, do_update);
else
shader_preview_startjob(customdata, stop, do_update);
@@ -1069,7 +1070,7 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, M
sp->id = id;
sp->parent= parent;
sp->slot= slot;
- if(ob && ob->totcol) copy_v4_v4(sp->col, ob->col);
+ if (ob && ob->totcol) copy_v4_v4(sp->col, ob->col);
else sp->col[0]= sp->col[1]= sp->col[2]= sp->col[3]= 1.0f;
/* setup job */
@@ -1083,7 +1084,7 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, M
void ED_preview_kill_jobs(const struct bContext *C)
{
wmWindowManager *wm= CTX_wm_manager(C);
- if(wm)
+ if (wm)
WM_jobs_kill(wm, NULL, common_preview_startjob);
}
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 7d7063b621c..59886038db6 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -99,7 +99,7 @@ static int material_slot_add_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= ED_object_context(C);
- if(!ob)
+ if (!ob)
return OPERATOR_CANCELLED;
object_add_material_slot(ob);
@@ -112,27 +112,27 @@ static int material_slot_add_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_material_slot_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Material Slot";
- ot->idname= "OBJECT_OT_material_slot_add";
- ot->description="Add a new material slot";
+ ot->name = "Add Material Slot";
+ ot->idname = "OBJECT_OT_material_slot_add";
+ ot->description = "Add a new material slot";
/* api callbacks */
- ot->exec= material_slot_add_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = material_slot_add_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int material_slot_remove_exec(bContext *C, wmOperator *op)
{
Object *ob= ED_object_context(C);
- if(!ob)
+ if (!ob)
return OPERATOR_CANCELLED;
/* Removing material slots in edit mode screws things up, see bug #21822.*/
- if(ob == CTX_data_edit_object(C)) {
+ if (ob == CTX_data_edit_object(C)) {
BKE_report(op->reports, RPT_ERROR, "Unable to remove material slot in edit mode");
return OPERATOR_CANCELLED;
}
@@ -148,54 +148,54 @@ static int material_slot_remove_exec(bContext *C, wmOperator *op)
void OBJECT_OT_material_slot_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Material Slot";
- ot->idname= "OBJECT_OT_material_slot_remove";
- ot->description="Remove the selected material slot";
+ ot->name = "Remove Material Slot";
+ ot->idname = "OBJECT_OT_material_slot_remove";
+ ot->description = "Remove the selected material slot";
/* api callbacks */
- ot->exec= material_slot_remove_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = material_slot_remove_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= ED_object_context(C);
- if(!ob)
+ if (!ob)
return OPERATOR_CANCELLED;
- if(ob && ob->actcol>0) {
- if(ob->type == OB_MESH) {
+ if (ob && ob->actcol>0) {
+ if (ob->type == OB_MESH) {
BMEditMesh *em = BMEdit_FromObject(ob);
BMFace *efa;
BMIter iter;
- if(em) {
+ if (em) {
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- if(BM_elem_flag_test(efa, BM_ELEM_SELECT))
+ if (BM_elem_flag_test(efa, BM_ELEM_SELECT))
efa->mat_nr= ob->actcol-1;
}
}
}
- else if(ELEM(ob->type, OB_CURVE, OB_SURF)) {
+ else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
Nurb *nu;
ListBase *nurbs= curve_editnurbs((Curve*)ob->data);
- if(nurbs) {
- for(nu= nurbs->first; nu; nu= nu->next)
- if(isNurbsel(nu))
+ if (nurbs) {
+ for (nu= nurbs->first; nu; nu= nu->next)
+ if (isNurbsel(nu))
nu->mat_nr= nu->charidx= ob->actcol-1;
}
}
- else if(ob->type == OB_FONT) {
+ else if (ob->type == OB_FONT) {
EditFont *ef= ((Curve*)ob->data)->editfont;
int i, selstart, selend;
- if(ef && BKE_font_getselection(ob, &selstart, &selend)) {
- for(i=selstart; i<=selend; i++)
+ if (ef && BKE_font_getselection(ob, &selstart, &selend)) {
+ for (i=selstart; i<=selend; i++)
ef->textbufinfo[i].mat_nr = ob->actcol;
}
}
@@ -210,29 +210,29 @@ static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_material_slot_assign(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Assign Material Slot";
- ot->idname= "OBJECT_OT_material_slot_assign";
- ot->description="Assign the material in the selected material slot to the selected vertices";
+ ot->name = "Assign Material Slot";
+ ot->idname = "OBJECT_OT_material_slot_assign";
+ ot->description = "Assign the material in the selected material slot to the selected vertices";
/* api callbacks */
- ot->exec= material_slot_assign_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->exec = material_slot_assign_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int material_slot_de_select(bContext *C, int select)
{
Object *ob = ED_object_context(C);
- if(!ob)
+ if (!ob)
return OPERATOR_CANCELLED;
- if(ob->type == OB_MESH) {
+ if (ob->type == OB_MESH) {
BMEditMesh *em = BMEdit_FromObject(ob);
- if(em) {
+ if (em) {
EDBM_deselect_by_material(em, ob->actcol-1, select);
}
}
@@ -243,15 +243,15 @@ static int material_slot_de_select(bContext *C, int select)
BezTriple *bezt;
int a;
- if(nurbs) {
- for(nu= nurbs->first; nu; nu=nu->next) {
- if(nu->mat_nr==ob->actcol-1) {
- if(nu->bezt) {
+ if (nurbs) {
+ for (nu= nurbs->first; nu; nu=nu->next) {
+ if (nu->mat_nr==ob->actcol-1) {
+ if (nu->bezt) {
a= nu->pntsu;
bezt= nu->bezt;
- while(a--) {
- if(bezt->hide==0) {
- if(select) {
+ while (a--) {
+ if (bezt->hide==0) {
+ if (select) {
bezt->f1 |= SELECT;
bezt->f2 |= SELECT;
bezt->f3 |= SELECT;
@@ -265,12 +265,12 @@ static int material_slot_de_select(bContext *C, int select)
bezt++;
}
}
- else if(nu->bp) {
+ else if (nu->bp) {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
- while(a--) {
- if(bp->hide==0) {
- if(select) bp->f1 |= SELECT;
+ while (a--) {
+ if (bp->hide==0) {
+ if (select) bp->f1 |= SELECT;
else bp->f1 &= ~SELECT;
}
bp++;
@@ -294,15 +294,15 @@ static int material_slot_select_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_material_slot_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Material Slot";
- ot->idname= "OBJECT_OT_material_slot_select";
- ot->description="Select vertices assigned to the selected material slot";
+ ot->name = "Select Material Slot";
+ ot->idname = "OBJECT_OT_material_slot_select";
+ ot->description = "Select vertices assigned to the selected material slot";
/* api callbacks */
- ot->exec= material_slot_select_exec;
+ ot->exec = material_slot_select_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int material_slot_deselect_exec(bContext *C, wmOperator *UNUSED(op))
@@ -313,15 +313,15 @@ static int material_slot_deselect_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_material_slot_deselect(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Deselect Material Slot";
- ot->idname= "OBJECT_OT_material_slot_deselect";
- ot->description="Deselect vertices assigned to the selected material slot";
+ ot->name = "Deselect Material Slot";
+ ot->idname = "OBJECT_OT_material_slot_deselect";
+ ot->description = "Deselect vertices assigned to the selected material slot";
/* api callbacks */
- ot->exec= material_slot_deselect_exec;
+ ot->exec = material_slot_deselect_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -330,15 +330,15 @@ static int material_slot_copy_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= ED_object_context(C);
Material ***matar;
- if(!ob || !(matar= give_matarar(ob)))
+ if (!ob || !(matar= give_matarar(ob)))
return OPERATOR_CANCELLED;
CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
- if(ob != ob_iter && give_matarar(ob_iter)) {
+ if (ob != ob_iter && give_matarar(ob_iter)) {
if (ob->data != ob_iter->data)
assign_matarar(ob_iter, matar, ob->totcol);
- if(ob_iter->totcol==ob->totcol) {
+ if (ob_iter->totcol==ob->totcol) {
ob_iter->actcol= ob->actcol;
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob_iter);
}
@@ -353,15 +353,15 @@ static int material_slot_copy_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_material_slot_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Material to Others";
- ot->idname= "OBJECT_OT_material_slot_copy";
- ot->description="Copies materials to other selected objects";
+ ot->name = "Copy Material to Others";
+ ot->idname = "OBJECT_OT_material_slot_copy";
+ ot->description = "Copies materials to other selected objects";
/* api callbacks */
- ot->exec= material_slot_copy_exec;
+ ot->exec = material_slot_copy_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** new material operator *********************/
@@ -374,13 +374,13 @@ static int new_material_exec(bContext *C, wmOperator *UNUSED(op))
PropertyRNA *prop;
/* add or copy material */
- if(ma) {
+ if (ma) {
ma= copy_material(ma);
}
else {
ma= add_material("Material");
- if(scene_use_new_shading_nodes(scene)) {
+ if (scene_use_new_shading_nodes(scene)) {
ED_node_shader_default(scene, &ma->id);
ma->use_nodes= 1;
}
@@ -389,7 +389,7 @@ static int new_material_exec(bContext *C, wmOperator *UNUSED(op))
/* hook into UI */
uiIDContextProperty(C, &ptr, &prop);
- if(prop) {
+ if (prop) {
/* when creating new ID blocks, use is already 1, but RNA
* pointer se also increases user, so this compensates it */
ma->id.us--;
@@ -407,15 +407,15 @@ static int new_material_exec(bContext *C, wmOperator *UNUSED(op))
void MATERIAL_OT_new(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "New Material";
- ot->idname= "MATERIAL_OT_new";
- ot->description="Add a new material";
+ ot->name = "New Material";
+ ot->idname = "MATERIAL_OT_new";
+ ot->description = "Add a new material";
/* api callbacks */
- ot->exec= new_material_exec;
+ ot->exec = new_material_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** new texture operator *********************/
@@ -427,7 +427,7 @@ static int new_texture_exec(bContext *C, wmOperator *UNUSED(op))
PropertyRNA *prop;
/* add or copy texture */
- if(tex)
+ if (tex)
tex= copy_texture(tex);
else
tex= add_texture("Texture");
@@ -435,7 +435,7 @@ static int new_texture_exec(bContext *C, wmOperator *UNUSED(op))
/* hook into UI */
uiIDContextProperty(C, &ptr, &prop);
- if(prop) {
+ if (prop) {
/* when creating new ID blocks, use is already 1, but RNA
* pointer se also increases user, so this compensates it */
tex->id.us--;
@@ -453,15 +453,15 @@ static int new_texture_exec(bContext *C, wmOperator *UNUSED(op))
void TEXTURE_OT_new(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "New Texture";
- ot->idname= "TEXTURE_OT_new";
- ot->description="Add a new texture";
+ ot->name = "New Texture";
+ ot->idname = "TEXTURE_OT_new";
+ ot->description = "Add a new texture";
/* api callbacks */
- ot->exec= new_texture_exec;
+ ot->exec = new_texture_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** new world operator *********************/
@@ -474,13 +474,13 @@ static int new_world_exec(bContext *C, wmOperator *UNUSED(op))
PropertyRNA *prop;
/* add or copy world */
- if(wo) {
+ if (wo) {
wo= copy_world(wo);
}
else {
wo= add_world("World");
- if(scene_use_new_shading_nodes(scene)) {
+ if (scene_use_new_shading_nodes(scene)) {
ED_node_shader_default(scene, &wo->id);
wo->use_nodes= 1;
}
@@ -489,7 +489,7 @@ static int new_world_exec(bContext *C, wmOperator *UNUSED(op))
/* hook into UI */
uiIDContextProperty(C, &ptr, &prop);
- if(prop) {
+ if (prop) {
/* when creating new ID blocks, use is already 1, but RNA
* pointer se also increases user, so this compensates it */
wo->id.us--;
@@ -507,15 +507,15 @@ static int new_world_exec(bContext *C, wmOperator *UNUSED(op))
void WORLD_OT_new(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "New World";
- ot->idname= "WORLD_OT_new";
- ot->description= "Add a new world";
+ ot->name = "New World";
+ ot->idname = "WORLD_OT_new";
+ ot->description = "Add a new world";
/* api callbacks */
- ot->exec= new_world_exec;
+ ot->exec = new_world_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** render layer operators *********************/
@@ -535,15 +535,15 @@ static int render_layer_add_exec(bContext *C, wmOperator *UNUSED(op))
void SCENE_OT_render_layer_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Render Layer";
- ot->idname= "SCENE_OT_render_layer_add";
- ot->description="Add a render layer";
+ ot->name = "Add Render Layer";
+ ot->idname = "SCENE_OT_render_layer_add";
+ ot->description = "Add a render layer";
/* api callbacks */
- ot->exec= render_layer_add_exec;
+ ot->exec = render_layer_add_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op))
@@ -551,7 +551,7 @@ static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *rl = BLI_findlink(&scene->r.layers, scene->r.actlay);
- if(!scene_remove_render_layer(CTX_data_main(C), scene, rl))
+ if (!scene_remove_render_layer(CTX_data_main(C), scene, rl))
return OPERATOR_CANCELLED;
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
@@ -562,15 +562,15 @@ static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op))
void SCENE_OT_render_layer_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Render Layer";
- ot->idname= "SCENE_OT_render_layer_remove";
- ot->description="Remove the selected render layer";
+ ot->name = "Remove Render Layer";
+ ot->idname = "SCENE_OT_render_layer_remove";
+ ot->description = "Remove the selected render layer";
/* api callbacks */
- ot->exec= render_layer_remove_exec;
+ ot->exec = render_layer_remove_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int freestyle_module_add_exec(bContext *C, wmOperator *UNUSED(op))
@@ -1137,7 +1137,7 @@ static int texture_slot_move(bContext *C, wmOperator *op)
{
ID *id= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data;
- if(id) {
+ if (id) {
MTex **mtex_ar, *mtexswap;
short act;
int type= RNA_enum_get(op->ptr, "type");
@@ -1145,8 +1145,8 @@ static int texture_slot_move(bContext *C, wmOperator *op)
give_active_mtex(id, &mtex_ar, &act);
- if(type == -1) { /* Up */
- if(act > 0) {
+ if (type == -1) { /* Up */
+ if (act > 0) {
mtexswap = mtex_ar[act];
mtex_ar[act] = mtex_ar[act-1];
mtex_ar[act-1] = mtexswap;
@@ -1155,7 +1155,7 @@ static int texture_slot_move(bContext *C, wmOperator *op)
BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act-1, 0);
BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0);
- if(GS(id->name)==ID_MA) {
+ if (GS(id->name)==ID_MA) {
Material *ma= (Material *)id;
int mtexuse = ma->septex & (1<<act);
ma->septex &= ~(1<<act);
@@ -1168,7 +1168,7 @@ static int texture_slot_move(bContext *C, wmOperator *op)
}
}
else { /* Down */
- if(act < MAX_MTEX-1) {
+ if (act < MAX_MTEX-1) {
mtexswap = mtex_ar[act];
mtex_ar[act] = mtex_ar[act+1];
mtex_ar[act+1] = mtexswap;
@@ -1177,7 +1177,7 @@ static int texture_slot_move(bContext *C, wmOperator *op)
BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act+1, 0);
BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0);
- if(GS(id->name)==ID_MA) {
+ if (GS(id->name)==ID_MA) {
Material *ma= (Material *)id;
int mtexuse = ma->septex & (1<<act);
ma->septex &= ~(1<<act);
@@ -1206,15 +1206,15 @@ void TEXTURE_OT_slot_move(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Move Texture Slot";
- ot->idname= "TEXTURE_OT_slot_move";
- ot->description="Move texture slots up and down";
+ ot->name = "Move Texture Slot";
+ ot->idname = "TEXTURE_OT_slot_move";
+ ot->description = "Move texture slots up and down";
/* api callbacks */
- ot->exec= texture_slot_move;
+ ot->exec = texture_slot_move;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", slot_move, 0, "Type", "");
}
@@ -1250,7 +1250,7 @@ static int envmap_save_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "filepath", path);
- if(scene->r.scemode & R_EXTENSION) {
+ if (scene->r.scemode & R_EXTENSION) {
BKE_add_image_extension(path, imtype);
}
@@ -1269,7 +1269,7 @@ static int envmap_save_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event
{
//Scene *scene= CTX_data_scene(C);
- if(RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath"))
return envmap_save_exec(C, op);
//RNA_enum_set(op->ptr, "file_type", scene->r.im_format.imtype);
@@ -1297,17 +1297,17 @@ void TEXTURE_OT_envmap_save(wmOperatorType *ot)
{
PropertyRNA *prop;
/* identifiers */
- ot->name= "Save Environment Map";
- ot->idname= "TEXTURE_OT_envmap_save";
- ot->description="Save the current generated Environment map to an image file";
+ ot->name = "Save Environment Map";
+ ot->idname = "TEXTURE_OT_envmap_save";
+ ot->description = "Save the current generated Environment map to an image file";
/* api callbacks */
- ot->exec= envmap_save_exec;
- ot->invoke= envmap_save_invoke;
- ot->poll= envmap_save_poll;
+ ot->exec = envmap_save_exec;
+ ot->invoke = envmap_save_invoke;
+ ot->poll = envmap_save_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER; /* no undo since this doesnt modify the env-map */
+ ot->flag = OPTYPE_REGISTER; /* no undo since this doesnt modify the env-map */
/* properties */
prop= RNA_def_float_array(ot->srna, "layout", 12, default_envmap_layout, 0.0f, 0.0f, "File layout", "Flat array describing the X,Y position of each cube face in the output image, where 1 is the size of a face - order is [+Z -Z +Y -X -Y +X] (use -1 to skip a face)", 0.0f, 0.0f);
@@ -1344,16 +1344,16 @@ static int envmap_clear_poll(bContext *C)
void TEXTURE_OT_envmap_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Environment Map";
- ot->idname= "TEXTURE_OT_envmap_clear";
- ot->description="Discard the environment map and free it from memory";
+ ot->name = "Clear Environment Map";
+ ot->idname = "TEXTURE_OT_envmap_clear";
+ ot->description = "Discard the environment map and free it from memory";
/* api callbacks */
- ot->exec= envmap_clear_exec;
- ot->poll= envmap_clear_poll;
+ ot->exec = envmap_clear_exec;
+ ot->poll = envmap_clear_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int envmap_clear_all_exec(bContext *C, wmOperator *UNUSED(op))
@@ -1373,16 +1373,16 @@ static int envmap_clear_all_exec(bContext *C, wmOperator *UNUSED(op))
void TEXTURE_OT_envmap_clear_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear All Environment Maps";
- ot->idname= "TEXTURE_OT_envmap_clear_all";
- ot->description="Discard all environment maps in the .blend file and free them from memory";
+ ot->name = "Clear All Environment Maps";
+ ot->idname = "TEXTURE_OT_envmap_clear_all";
+ ot->description = "Discard all environment maps in the .blend file and free them from memory";
/* api callbacks */
- ot->exec= envmap_clear_all_exec;
- ot->poll= envmap_clear_poll;
+ ot->exec = envmap_clear_all_exec;
+ ot->poll = envmap_clear_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** material operators *********************/
@@ -1392,7 +1392,7 @@ static int copy_material_exec(bContext *C, wmOperator *UNUSED(op))
{
Material *ma= CTX_data_pointer_get_type(C, "material", &RNA_Material).data;
- if(ma==NULL)
+ if (ma==NULL)
return OPERATOR_CANCELLED;
copy_matcopybuf(ma);
@@ -1403,22 +1403,22 @@ static int copy_material_exec(bContext *C, wmOperator *UNUSED(op))
void MATERIAL_OT_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Material";
- ot->idname= "MATERIAL_OT_copy";
- ot->description="Copy the material settings and nodes";
+ ot->name = "Copy Material";
+ ot->idname = "MATERIAL_OT_copy";
+ ot->description = "Copy the material settings and nodes";
/* api callbacks */
- ot->exec= copy_material_exec;
+ ot->exec = copy_material_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER; /* no undo needed since no changes are made to the material */
+ ot->flag = OPTYPE_REGISTER; /* no undo needed since no changes are made to the material */
}
static int paste_material_exec(bContext *C, wmOperator *UNUSED(op))
{
Material *ma= CTX_data_pointer_get_type(C, "material", &RNA_Material).data;
- if(ma==NULL)
+ if (ma==NULL)
return OPERATOR_CANCELLED;
paste_matcopybuf(ma);
@@ -1431,15 +1431,15 @@ static int paste_material_exec(bContext *C, wmOperator *UNUSED(op))
void MATERIAL_OT_paste(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Paste Material";
- ot->idname= "MATERIAL_OT_paste";
- ot->description="Paste the material settings and nodes";
+ ot->name = "Paste Material";
+ ot->idname = "MATERIAL_OT_paste";
+ ot->description = "Paste the material settings and nodes";
/* api callbacks */
- ot->exec= paste_material_exec;
+ ot->exec = paste_material_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1472,7 +1472,7 @@ static void copy_mtex_copybuf(ID *id)
break;
}
- if(mtex && *mtex) {
+ if (mtex && *mtex) {
memcpy(&mtexcopybuf, *mtex, sizeof(MTex));
mtexcopied= 1;
}
@@ -1485,7 +1485,7 @@ static void paste_mtex_copybuf(ID *id)
{
MTex **mtex= NULL;
- if(mtexcopied == 0 || mtexcopybuf.tex==NULL)
+ if (mtexcopied == 0 || mtexcopybuf.tex==NULL)
return;
switch(GS(id->name)) {
@@ -1508,11 +1508,11 @@ static void paste_mtex_copybuf(ID *id)
return;
}
- if(mtex) {
- if(*mtex==NULL) {
+ if (mtex) {
+ if (*mtex==NULL) {
*mtex= MEM_mallocN(sizeof(MTex), "mtex copy");
}
- else if((*mtex)->tex) {
+ else if ((*mtex)->tex) {
(*mtex)->tex->id.us--;
}
@@ -1527,7 +1527,7 @@ static int copy_mtex_exec(bContext *C, wmOperator *UNUSED(op))
{
ID *id= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data;
- if(id==NULL) {
+ if (id==NULL) {
/* copying empty slot */
ED_render_clear_mtex_copybuf();
return OPERATOR_CANCELLED;
@@ -1548,23 +1548,23 @@ static int copy_mtex_poll(bContext *C)
void TEXTURE_OT_slot_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Texture Slot Settings";
- ot->idname= "TEXTURE_OT_slot_copy";
- ot->description="Copy the material texture settings and nodes";
+ ot->name = "Copy Texture Slot Settings";
+ ot->idname = "TEXTURE_OT_slot_copy";
+ ot->description = "Copy the material texture settings and nodes";
/* api callbacks */
- ot->exec= copy_mtex_exec;
- ot->poll= copy_mtex_poll;
+ ot->exec = copy_mtex_exec;
+ ot->poll = copy_mtex_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER; /* no undo needed since no changes are made to the mtex */
+ ot->flag = OPTYPE_REGISTER; /* no undo needed since no changes are made to the mtex */
}
static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op))
{
ID *id= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data;
- if(id==NULL) {
+ if (id==NULL) {
Material *ma= CTX_data_pointer_get_type(C, "material", &RNA_Material).data;
Lamp *la= CTX_data_pointer_get_type(C, "lamp", &RNA_Lamp).data;
World *wo= CTX_data_pointer_get_type(C, "world", &RNA_World).data;
@@ -1593,14 +1593,14 @@ static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op))
void TEXTURE_OT_slot_paste(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Paste Texture Slot Settings";
- ot->idname= "TEXTURE_OT_slot_paste";
- ot->description="Copy the texture settings and nodes";
+ ot->name = "Paste Texture Slot Settings";
+ ot->idname = "TEXTURE_OT_slot_paste";
+ ot->description = "Copy the texture settings and nodes";
/* api callbacks */
- ot->exec= paste_mtex_exec;
+ ot->exec = paste_mtex_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 4483d7d8ba1..72b29c56811 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -77,7 +77,7 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated)
/* don't do this render engine update if we're updating the scene from
* other threads doing e.g. rendering or baking jobs */
- if(!BLI_thread_is_main())
+ if (!BLI_thread_is_main())
return;
C= CTX_create();
@@ -86,22 +86,22 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated)
CTX_wm_manager_set(C, bmain->wm.first);
- for(sc=bmain->screen.first; sc; sc=sc->id.next) {
- for(sa=sc->areabase.first; sa; sa=sa->next) {
- if(sa->spacetype != SPACE_VIEW3D)
+ for (sc=bmain->screen.first; sc; sc=sc->id.next) {
+ for (sa=sc->areabase.first; sa; sa=sa->next) {
+ if (sa->spacetype != SPACE_VIEW3D)
continue;
- for(ar=sa->regionbase.first; ar; ar=ar->next) {
+ for (ar=sa->regionbase.first; ar; ar=ar->next) {
RegionView3D *rv3d;
RenderEngine *engine;
- if(ar->regiontype != RGN_TYPE_WINDOW)
+ if (ar->regiontype != RGN_TYPE_WINDOW)
continue;
rv3d= ar->regiondata;
engine= rv3d->render_engine;
- if(engine && (updated || (engine->flag & RE_ENGINE_DO_UPDATE))) {
+ if (engine && (updated || (engine->flag & RE_ENGINE_DO_UPDATE))) {
CTX_wm_screen_set(C, sc);
CTX_wm_area_set(C, sa);
CTX_wm_region_set(C, ar);
@@ -123,20 +123,20 @@ void ED_render_engine_changed(Main *bmain)
ScrArea *sa;
ARegion *ar;
- for(sc=bmain->screen.first; sc; sc=sc->id.next) {
- for(sa=sc->areabase.first; sa; sa=sa->next) {
- if(sa->spacetype != SPACE_VIEW3D)
+ for (sc=bmain->screen.first; sc; sc=sc->id.next) {
+ for (sa=sc->areabase.first; sa; sa=sa->next) {
+ if (sa->spacetype != SPACE_VIEW3D)
continue;
- for(ar=sa->regionbase.first; ar; ar=ar->next) {
+ for (ar=sa->regionbase.first; ar; ar=ar->next) {
RegionView3D *rv3d;
- if(ar->regiontype != RGN_TYPE_WINDOW)
+ if (ar->regiontype != RGN_TYPE_WINDOW)
continue;
rv3d= ar->regiondata;
- if(rv3d->render_engine) {
+ if (rv3d->render_engine) {
RE_engine_free(rv3d->render_engine);
rv3d->render_engine= NULL;
}
@@ -154,11 +154,11 @@ static int mtex_use_tex(MTex **mtex, int tot, Tex *tex)
{
int a;
- if(!mtex)
+ if (!mtex)
return 0;
- for(a=0; a<tot; a++)
- if(mtex[a] && mtex[a]->tex == tex)
+ for (a=0; a<tot; a++)
+ if (mtex[a] && mtex[a]->tex == tex)
return 1;
return 0;
@@ -168,17 +168,17 @@ static int nodes_use_tex(bNodeTree *ntree, Tex *tex)
{
bNode *node;
- for(node=ntree->nodes.first; node; node= node->next) {
- if(node->id) {
- if(node->id == (ID*)tex) {
+ for (node=ntree->nodes.first; node; node= node->next) {
+ if (node->id) {
+ if (node->id == (ID*)tex) {
return 1;
}
- else if(GS(node->id->name) == ID_MA) {
- if(mtex_use_tex(((Material*)node->id)->mtex, MAX_MTEX, tex))
+ else if (GS(node->id->name) == ID_MA) {
+ if (mtex_use_tex(((Material*)node->id)->mtex, MAX_MTEX, tex))
return 1;
}
- else if(node->type==NODE_GROUP) {
- if(nodes_use_tex((bNodeTree *)node->id, tex))
+ else if (node->type==NODE_GROUP) {
+ if (nodes_use_tex((bNodeTree *)node->id, tex))
return 1;
}
}
@@ -191,13 +191,13 @@ static int nodes_use_material(bNodeTree *ntree, Material *ma)
{
bNode *node;
- for(node=ntree->nodes.first; node; node= node->next) {
- if(node->id) {
- if(node->id == (ID*)ma) {
+ for (node=ntree->nodes.first; node; node= node->next) {
+ if (node->id) {
+ if (node->id == (ID*)ma) {
return 1;
}
- else if(node->type==NODE_GROUP) {
- if(nodes_use_material((bNodeTree *)node->id, ma))
+ else if (node->type==NODE_GROUP) {
+ if (nodes_use_material((bNodeTree *)node->id, ma))
return 1;
}
}
@@ -214,17 +214,17 @@ static void material_changed(Main *bmain, Material *ma)
BKE_icon_changed(BKE_icon_getid(&ma->id));
/* glsl */
- if(ma->gpumaterial.first)
+ if (ma->gpumaterial.first)
GPU_material_free(ma);
/* find node materials using this */
- for(parent=bmain->mat.first; parent; parent=parent->id.next) {
- if(parent->use_nodes && parent->nodetree && nodes_use_material(parent->nodetree, ma));
+ for (parent=bmain->mat.first; parent; parent=parent->id.next) {
+ if (parent->use_nodes && parent->nodetree && nodes_use_material(parent->nodetree, ma));
else continue;
BKE_icon_changed(BKE_icon_getid(&parent->id));
- if(parent->gpumaterial.first)
+ if (parent->gpumaterial.first)
GPU_material_free(parent);
}
}
@@ -241,40 +241,40 @@ static void texture_changed(Main *bmain, Tex *tex)
BKE_icon_changed(BKE_icon_getid(&tex->id));
/* find materials */
- for(ma=bmain->mat.first; ma; ma=ma->id.next) {
- if(mtex_use_tex(ma->mtex, MAX_MTEX, tex));
- else if(ma->use_nodes && ma->nodetree && nodes_use_tex(ma->nodetree, tex));
+ for (ma=bmain->mat.first; ma; ma=ma->id.next) {
+ if (mtex_use_tex(ma->mtex, MAX_MTEX, tex));
+ else if (ma->use_nodes && ma->nodetree && nodes_use_tex(ma->nodetree, tex));
else continue;
BKE_icon_changed(BKE_icon_getid(&ma->id));
- if(ma->gpumaterial.first)
+ if (ma->gpumaterial.first)
GPU_material_free(ma);
}
/* find lamps */
- for(la=bmain->lamp.first; la; la=la->id.next) {
- if(mtex_use_tex(la->mtex, MAX_MTEX, tex));
- else if(la->nodetree && nodes_use_tex(la->nodetree, tex));
+ for (la=bmain->lamp.first; la; la=la->id.next) {
+ if (mtex_use_tex(la->mtex, MAX_MTEX, tex));
+ else if (la->nodetree && nodes_use_tex(la->nodetree, tex));
else continue;
BKE_icon_changed(BKE_icon_getid(&la->id));
}
/* find worlds */
- for(wo=bmain->world.first; wo; wo=wo->id.next) {
- if(mtex_use_tex(wo->mtex, MAX_MTEX, tex));
- else if(wo->nodetree && nodes_use_tex(wo->nodetree, tex));
+ for (wo=bmain->world.first; wo; wo=wo->id.next) {
+ if (mtex_use_tex(wo->mtex, MAX_MTEX, tex));
+ else if (wo->nodetree && nodes_use_tex(wo->nodetree, tex));
else continue;
BKE_icon_changed(BKE_icon_getid(&wo->id));
}
/* find compositing nodes */
- for(scene=bmain->scene.first; scene; scene=scene->id.next) {
- if(scene->use_nodes && scene->nodetree) {
- for(node=scene->nodetree->nodes.first; node; node=node->next) {
- if(node->id == &tex->id)
+ for (scene=bmain->scene.first; scene; scene=scene->id.next) {
+ if (scene->use_nodes && scene->nodetree) {
+ for (node=scene->nodetree->nodes.first; node; node=node->next) {
+ if (node->id == &tex->id)
ED_node_changed_update(&scene->id, node);
}
}
@@ -290,12 +290,12 @@ static void lamp_changed(Main *bmain, Lamp *la)
BKE_icon_changed(BKE_icon_getid(&la->id));
/* glsl */
- for(ob=bmain->object.first; ob; ob=ob->id.next)
- if(ob->data == la && ob->gpulamp.first)
+ for (ob=bmain->object.first; ob; ob=ob->id.next)
+ if (ob->data == la && ob->gpulamp.first)
GPU_lamp_free(ob);
- for(ma=bmain->mat.first; ma; ma=ma->id.next)
- if(ma->gpumaterial.first)
+ for (ma=bmain->mat.first; ma; ma=ma->id.next)
+ if (ma->gpumaterial.first)
GPU_material_free(ma);
}
@@ -307,8 +307,8 @@ static void world_changed(Main *bmain, World *wo)
BKE_icon_changed(BKE_icon_getid(&wo->id));
/* glsl */
- for(ma=bmain->mat.first; ma; ma=ma->id.next)
- if(ma->gpumaterial.first)
+ for (ma=bmain->mat.first; ma; ma=ma->id.next)
+ if (ma->gpumaterial.first)
GPU_material_free(ma);
}
@@ -320,8 +320,8 @@ static void image_changed(Main *bmain, Image *ima)
BKE_icon_changed(BKE_icon_getid(&ima->id));
/* textures */
- for(tex=bmain->tex.first; tex; tex=tex->id.next)
- if(tex->ima == ima)
+ for (tex=bmain->tex.first; tex; tex=tex->id.next)
+ if (tex->ima == ima)
texture_changed(bmain, tex);
}
@@ -331,12 +331,12 @@ static void scene_changed(Main *bmain, Scene *UNUSED(scene))
Material *ma;
/* glsl */
- for(ob=bmain->object.first; ob; ob=ob->id.next)
- if(ob->gpulamp.first)
+ for (ob=bmain->object.first; ob; ob=ob->id.next)
+ if (ob->gpulamp.first)
GPU_lamp_free(ob);
- for(ma=bmain->mat.first; ma; ma=ma->id.next)
- if(ma->gpumaterial.first)
+ for (ma=bmain->mat.first; ma; ma=ma->id.next)
+ if (ma->gpumaterial.first)
GPU_material_free(ma);
}
diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c
index 8850bef286d..31b53fcabe1 100644
--- a/source/blender/editors/render/render_view.c
+++ b/source/blender/editors/render/render_view.c
@@ -66,16 +66,16 @@ static ScrArea *biggest_non_image_area(bContext *C)
int size, maxsize= 0, bwmaxsize= 0;
short foundwin= 0;
- for(sa= sc->areabase.first; sa; sa= sa->next) {
- if(sa->winx > 30 && sa->winy > 30) {
+ for (sa= sc->areabase.first; sa; sa= sa->next) {
+ if (sa->winx > 30 && sa->winy > 30) {
size= sa->winx*sa->winy;
- if(sa->spacetype == SPACE_BUTS) {
- if(foundwin == 0 && size > bwmaxsize) {
+ if (sa->spacetype == SPACE_BUTS) {
+ if (foundwin == 0 && size > bwmaxsize) {
bwmaxsize= size;
big= sa;
}
}
- else if(sa->spacetype != SPACE_IMAGE && size > maxsize) {
+ else if (sa->spacetype != SPACE_IMAGE && size > maxsize) {
maxsize= size;
big= sa;
foundwin= 1;
@@ -93,15 +93,15 @@ static ScrArea *find_area_showing_r_result(bContext *C, wmWindow **win)
SpaceImage *sima;
/* find an imagewindow showing render result */
- for(*win=wm->windows.first; *win; *win= (*win)->next) {
- for(sa= (*win)->screen->areabase.first; sa; sa= sa->next) {
- if(sa->spacetype==SPACE_IMAGE) {
+ for (*win=wm->windows.first; *win; *win= (*win)->next) {
+ for (sa= (*win)->screen->areabase.first; sa; sa= sa->next) {
+ if (sa->spacetype==SPACE_IMAGE) {
sima= sa->spacedata.first;
- if(sima->image && sima->image->type==IMA_TYPE_R_RESULT)
+ if (sima->image && sima->image->type==IMA_TYPE_R_RESULT)
break;
}
}
- if(sa)
+ if (sa)
break;
}
@@ -115,10 +115,10 @@ static ScrArea *find_area_image_empty(bContext *C)
SpaceImage *sima;
/* find an imagewindow showing render result */
- for(sa=sc->areabase.first; sa; sa= sa->next) {
- if(sa->spacetype==SPACE_IMAGE) {
+ for (sa=sc->areabase.first; sa; sa= sa->next) {
+ if (sa->spacetype==SPACE_IMAGE) {
sima= sa->spacedata.first;
- if(!sima->image)
+ if (!sima->image)
break;
}
}
@@ -137,10 +137,10 @@ void render_view_open(bContext *C, int mx, int my)
SpaceImage *sima;
int area_was_image=0;
- if(scene->r.displaymode==R_OUTPUT_NONE)
+ if (scene->r.displaymode==R_OUTPUT_NONE)
return;
- if(scene->r.displaymode==R_OUTPUT_WINDOW) {
+ if (scene->r.displaymode==R_OUTPUT_WINDOW) {
rcti rect;
int sizex, sizey;
@@ -148,21 +148,21 @@ void render_view_open(bContext *C, int mx, int my)
sizey= 40 + (scene->r.ysch*scene->r.size)/100;
/* arbitrary... miniature image window views don't make much sense */
- if(sizex < 320) sizex= 320;
- if(sizey < 256) sizey= 256;
+ if (sizex < 320) sizex= 320;
+ if (sizey < 256) sizey= 256;
/* XXX some magic to calculate postition */
- rect.xmin= mx + win->posx - sizex/2;
- rect.ymin= my + win->posy - sizey/2;
- rect.xmax= rect.xmin + sizex;
- rect.ymax= rect.ymin + sizey;
+ rect.xmin = mx + win->posx - sizex/2;
+ rect.ymin = my + win->posy - sizey/2;
+ rect.xmax = rect.xmin + sizex;
+ rect.ymax = rect.ymin + sizey;
/* changes context! */
WM_window_open_temp(C, &rect, WM_WINDOW_RENDER);
sa= CTX_wm_area(C);
}
- else if(scene->r.displaymode==R_OUTPUT_SCREEN) {
+ else if (scene->r.displaymode==R_OUTPUT_SCREEN) {
if (CTX_wm_area(C) && CTX_wm_area(C)->spacetype == SPACE_IMAGE)
area_was_image = 1;
@@ -170,19 +170,19 @@ void render_view_open(bContext *C, int mx, int my)
sa= ED_screen_full_newspace(C, CTX_wm_area(C), SPACE_IMAGE);
}
- if(!sa) {
+ if (!sa) {
sa= find_area_showing_r_result(C, &win);
- if(sa==NULL)
+ if (sa==NULL)
sa= find_area_image_empty(C);
/* if area found in other window, we make that one show in front */
- if(win && win!=CTX_wm_window(C))
+ if (win && win!=CTX_wm_window(C))
wm_window_raise(win);
- if(sa==NULL) {
+ if (sa==NULL) {
/* find largest open non-image area */
sa= biggest_non_image_area(C);
- if(sa) {
+ if (sa) {
ED_area_newspace(C, sa, SPACE_IMAGE);
sima= sa->spacedata.first;
@@ -192,7 +192,7 @@ void render_view_open(bContext *C, int mx, int my)
else {
/* use any area of decent size */
sa= BKE_screen_find_big_area(CTX_wm_screen(C), -1, 0);
- if(sa->spacetype!=SPACE_IMAGE) {
+ if (sa->spacetype!=SPACE_IMAGE) {
// XXX newspace(sa, SPACE_IMAGE);
sima= sa->spacedata.first;
@@ -210,7 +210,7 @@ void render_view_open(bContext *C, int mx, int my)
/* if we're rendering to full screen, set appropriate hints on image editor
* so it can restore properly on pressing esc */
- if(sa->full) {
+ if (sa->full) {
sima->flag |= SI_FULLWINDOW;
/* Tell the image editor to revert to previous space in space list on close
@@ -234,15 +234,15 @@ static int render_view_cancel_exec(bContext *C, wmOperator *UNUSED(op))
SpaceImage *sima= sa->spacedata.first;
/* test if we have a temp screen in front */
- if(CTX_wm_window(C)->screen->temp) {
+ if (CTX_wm_window(C)->screen->temp) {
wm_window_lower(CTX_wm_window(C));
return OPERATOR_FINISHED;
}
/* determine if render already shows */
- else if(sima->flag & SI_PREVSPACE) {
+ else if (sima->flag & SI_PREVSPACE) {
sima->flag &= ~SI_PREVSPACE;
- if(sima->flag & SI_FULLWINDOW) {
+ if (sima->flag & SI_FULLWINDOW) {
sima->flag &= ~SI_FULLWINDOW;
ED_screen_full_prevspace(C, sa);
}
@@ -251,7 +251,7 @@ static int render_view_cancel_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
- else if(sima->flag & SI_FULLWINDOW) {
+ else if (sima->flag & SI_FULLWINDOW) {
sima->flag &= ~SI_FULLWINDOW;
ED_screen_full_toggle(C, win, sa);
return OPERATOR_FINISHED;
@@ -263,13 +263,13 @@ static int render_view_cancel_exec(bContext *C, wmOperator *UNUSED(op))
void RENDER_OT_view_cancel(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Cancel Render View";
- ot->description= "Cancel show render view";
- ot->idname= "RENDER_OT_view_cancel";
+ ot->name = "Cancel Render View";
+ ot->description = "Cancel show render view";
+ ot->idname = "RENDER_OT_view_cancel";
/* api callbacks */
- ot->exec= render_view_cancel_exec;
- ot->poll= ED_operator_image_active;
+ ot->exec = render_view_cancel_exec;
+ ot->poll = ED_operator_image_active;
}
/************************* show render viewer *****************/
@@ -279,7 +279,7 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
wmWindow *wincur = CTX_wm_window(C);
/* test if we have currently a temp screen active */
- if(wincur->screen->temp) {
+ if (wincur->screen->temp) {
wm_window_lower(wincur);
}
else {
@@ -287,30 +287,30 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
ScrArea *sa= find_area_showing_r_result(C, &winshow);
/* is there another window showing result? */
- for(win= CTX_wm_manager(C)->windows.first; win; win= win->next) {
- if(win->screen->temp || (win==winshow && winshow!=wincur)) {
+ for (win= CTX_wm_manager(C)->windows.first; win; win= win->next) {
+ if (win->screen->temp || (win==winshow && winshow!=wincur)) {
wm_window_raise(win);
return OPERATOR_FINISHED;
}
}
/* determine if render already shows */
- if(sa) {
+ if (sa) {
/* but don't close it when rendering */
- if(!G.rendering) {
+ if (!G.rendering) {
SpaceImage *sima= sa->spacedata.first;
- if(sima->flag & SI_PREVSPACE) {
+ if (sima->flag & SI_PREVSPACE) {
sima->flag &= ~SI_PREVSPACE;
- if(sima->flag & SI_FULLWINDOW) {
+ if (sima->flag & SI_FULLWINDOW) {
sima->flag &= ~SI_FULLWINDOW;
ED_screen_full_prevspace(C, sa);
}
- else if(sima->next) {
+ else if (sima->next) {
/* workaround for case of double prevspace, render window
* with a file browser on top of it (same as in ED_area_prevspace) */
- if(sima->next->spacetype == SPACE_FILE && sima->next->next)
+ if (sima->next->spacetype == SPACE_FILE && sima->next->next)
ED_area_newspace(C, sa, sima->next->next->spacetype);
else
ED_area_newspace(C, sa, sima->next->spacetype);
@@ -330,12 +330,12 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
void RENDER_OT_view_show(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Show/Hide Render View";
- ot->description= "Toggle show render view";
- ot->idname= "RENDER_OT_view_show";
+ ot->name = "Show/Hide Render View";
+ ot->description = "Toggle show render view";
+ ot->idname = "RENDER_OT_view_show";
/* api callbacks */
- ot->invoke= render_view_show_invoke;
- ot->poll= ED_operator_screenactive;
+ ot->invoke = render_view_show_invoke;
+ ot->poll = ED_operator_screenactive;
}
diff --git a/source/blender/editors/screen/CMakeLists.txt b/source/blender/editors/screen/CMakeLists.txt
index 79a805cfa6e..33373354aa4 100644
--- a/source/blender/editors/screen/CMakeLists.txt
+++ b/source/blender/editors/screen/CMakeLists.txt
@@ -47,4 +47,8 @@ set(SRC
screen_intern.h
)
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_screen "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/screen/SConscript b/source/blender/editors/screen/SConscript
index ade26a0b80f..038a86328a3 100644
--- a/source/blender/editors/screen/SConscript
+++ b/source/blender/editors/screen/SConscript
@@ -8,7 +8,7 @@ incs += ' ../../blenloader ../../windowmanager ../../makesrna ../../gpu'
incs += ' ../../render/extern/include ../../bmesh'
incs += ' #/intern/guardedalloc #/extern/glew/include'
-defs = ''
+defs = []
if env['OURPLATFORM'] == 'linux':
cflags='-pthread'
@@ -17,4 +17,7 @@ if env['OURPLATFORM'] == 'linux':
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
env.BlenderLib ( 'bf_editors_screen', sources, Split(incs), Split(defs), libtype=['core'], priority=[105] )
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 57b65ad5223..8f429321fbb 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -74,10 +74,10 @@ static void region_draw_emboss(ARegion *ar, rcti *scirct)
rcti rect;
/* translate scissor rect to region space */
- rect.xmin= scirct->xmin - ar->winrct.xmin;
- rect.ymin= scirct->ymin - ar->winrct.ymin;
- rect.xmax= scirct->xmax - ar->winrct.xmin;
- rect.ymax= scirct->ymax - ar->winrct.ymin;
+ rect.xmin = scirct->xmin - ar->winrct.xmin;
+ rect.ymin = scirct->ymin - ar->winrct.ymin;
+ rect.xmax = scirct->xmax - ar->winrct.xmin;
+ rect.ymax = scirct->ymax - ar->winrct.ymin;
/* set transp line */
glEnable( GL_BLEND );
@@ -117,7 +117,7 @@ void ED_region_do_listen(ARegion *ar, wmNotifier *note)
/* generic notes first */
switch(note->category) {
case NC_WM:
- if(note->data==ND_FILEREAD)
+ if (note->data==ND_FILEREAD)
ED_region_tag_redraw(ar);
break;
case NC_WINDOW:
@@ -125,7 +125,7 @@ void ED_region_do_listen(ARegion *ar, wmNotifier *note)
break;
}
- if(ar->type && ar->type->listener)
+ if (ar->type && ar->type->listener)
ar->type->listener(ar, note);
}
@@ -133,7 +133,7 @@ void ED_region_do_listen(ARegion *ar, wmNotifier *note)
void ED_area_do_listen(ScrArea *sa, wmNotifier *note)
{
/* no generic notes? */
- if(sa->type && sa->type->listener) {
+ if (sa->type && sa->type->listener) {
sa->type->listener(sa, note);
}
}
@@ -142,7 +142,7 @@ void ED_area_do_listen(ScrArea *sa, wmNotifier *note)
void ED_area_do_refresh(bContext *C, ScrArea *sa)
{
/* no generic notes? */
- if(sa->type && sa->type->refresh) {
+ if (sa->type && sa->type->refresh) {
sa->type->refresh(C, sa);
}
sa->do_refresh= 0;
@@ -154,14 +154,14 @@ void ED_area_overdraw_flush(ScrArea *sa, ARegion *ar)
{
AZone *az;
- for(az= sa->actionzones.first; az; az= az->next) {
+ for (az= sa->actionzones.first; az; az= az->next) {
int xs, ys;
xs= (az->x1+az->x2)/2;
ys= (az->y1+az->y2)/2;
/* test if inside */
- if(BLI_in_rcti(&ar->winrct, xs, ys)) {
+ if (BLI_in_rcti(&ar->winrct, xs, ys)) {
az->do_draw= 1;
}
}
@@ -360,22 +360,23 @@ void ED_area_overdraw(bContext *C)
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
- for(sa= screen->areabase.first; sa; sa= sa->next) {
+ for (sa= screen->areabase.first; sa; sa= sa->next) {
AZone *az;
- for(az= sa->actionzones.first; az; az= az->next) {
- if(az->do_draw) {
- if(az->type==AZONE_AREA) {
+ for (az= sa->actionzones.first; az; az= az->next) {
+ if (az->do_draw) {
+ if (az->type==AZONE_AREA) {
area_draw_azone(az->x1, az->y1, az->x2, az->y2);
- } else if(az->type==AZONE_REGION) {
+ }
+ else if (az->type==AZONE_REGION) {
- if(az->ar) {
+ if (az->ar) {
/* only display tab or icons when the region is hidden */
if (az->ar->flag & (RGN_FLAG_HIDDEN|RGN_FLAG_TOO_SMALL)) {
- if(G.rt==3)
+ if (G.rt==3)
region_draw_azone_icon(az);
- else if(G.rt==2)
+ else if (G.rt==2)
region_draw_azone_tria(az);
- else if(G.rt==1)
+ else if (G.rt==1)
region_draw_azone_tab(az);
else
region_draw_azone_tab_plus(az);
@@ -396,20 +397,20 @@ void region_scissor_winrct(ARegion *ar, rcti *winrct)
{
*winrct= ar->winrct;
- if(ELEM(ar->alignment, RGN_OVERLAP_LEFT, RGN_OVERLAP_RIGHT))
+ if (ELEM(ar->alignment, RGN_OVERLAP_LEFT, RGN_OVERLAP_RIGHT))
return;
- while(ar->prev) {
+ while (ar->prev) {
ar= ar->prev;
- if(BLI_isect_rcti(winrct, &ar->winrct, NULL)) {
- if(ar->flag & RGN_FLAG_HIDDEN);
- else if(ar->alignment & RGN_SPLIT_PREV);
- else if(ar->alignment==RGN_OVERLAP_LEFT) {
- winrct->xmin= ar->winrct.xmax + 1;
+ if (BLI_isect_rcti(winrct, &ar->winrct, NULL)) {
+ if (ar->flag & RGN_FLAG_HIDDEN);
+ else if (ar->alignment & RGN_SPLIT_PREV);
+ else if (ar->alignment==RGN_OVERLAP_LEFT) {
+ winrct->xmin = ar->winrct.xmax + 1;
}
- else if(ar->alignment==RGN_OVERLAP_RIGHT) {
- winrct->xmax= ar->winrct.xmin - 1;
+ else if (ar->alignment==RGN_OVERLAP_RIGHT) {
+ winrct->xmax = ar->winrct.xmin - 1;
}
else break;
}
@@ -447,21 +448,21 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
rcti winrct;
/* see BKE_spacedata_draw_locks() */
- if(at->do_lock)
+ if (at->do_lock)
return;
/* checks other overlapping regions */
region_scissor_winrct(ar, &winrct);
/* if no partial draw rect set, full rect */
- if(ar->drawrct.xmin == ar->drawrct.xmax)
+ if (ar->drawrct.xmin == ar->drawrct.xmax)
ar->drawrct= winrct;
else {
/* extra clip for safety */
- ar->drawrct.xmin= MAX2(winrct.xmin, ar->drawrct.xmin);
- ar->drawrct.ymin= MAX2(winrct.ymin, ar->drawrct.ymin);
- ar->drawrct.xmax= MIN2(winrct.xmax, ar->drawrct.xmax);
- ar->drawrct.ymax= MIN2(winrct.ymax, ar->drawrct.ymax);
+ ar->drawrct.xmin = MAX2(winrct.xmin, ar->drawrct.xmin);
+ ar->drawrct.ymin = MAX2(winrct.ymin, ar->drawrct.ymin);
+ ar->drawrct.xmax = MIN2(winrct.xmax, ar->drawrct.xmax);
+ ar->drawrct.ymax = MIN2(winrct.ymax, ar->drawrct.ymax);
}
/* note; this sets state, so we can use wmOrtho and friends */
@@ -470,14 +471,14 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
UI_SetTheme(sa?sa->spacetype:0, ar->type?ar->type->regionid:0);
/* optional header info instead? */
- if(ar->headerstr) {
+ if (ar->headerstr) {
UI_ThemeClearColor(TH_HEADER);
glClear(GL_COLOR_BUFFER_BIT);
UI_ThemeColor(TH_TEXT);
BLF_draw_default(20, 8, 0.0f, ar->headerstr, BLF_DRAW_STR_DUMMY_MAX);
}
- else if(at->draw) {
+ else if (at->draw) {
at->draw(C, ar);
}
@@ -491,7 +492,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
uiFreeInactiveBlocks(C, &ar->uiblocks);
- if(sa)
+ if (sa)
region_draw_emboss(ar, &winrct);
}
@@ -502,7 +503,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
void ED_region_tag_redraw(ARegion *ar)
{
- if(ar) {
+ if (ar) {
/* zero region means full region redraw */
ar->do_draw= RGN_DRAW;
memset(&ar->drawrct, 0, sizeof(ar->drawrct));
@@ -511,24 +512,24 @@ void ED_region_tag_redraw(ARegion *ar)
void ED_region_tag_redraw_overlay(ARegion *ar)
{
- if(ar)
+ if (ar)
ar->do_draw_overlay= RGN_DRAW;
}
void ED_region_tag_redraw_partial(ARegion *ar, rcti *rct)
{
- if(ar) {
- if(!ar->do_draw) {
+ if (ar) {
+ if (!ar->do_draw) {
/* no redraw set yet, set partial region */
ar->do_draw= RGN_DRAW_PARTIAL;
ar->drawrct= *rct;
}
- else if(ar->drawrct.xmin != ar->drawrct.xmax) {
+ else if (ar->drawrct.xmin != ar->drawrct.xmax) {
/* partial redraw already set, expand region */
- ar->drawrct.xmin= MIN2(ar->drawrct.xmin, rct->xmin);
- ar->drawrct.ymin= MIN2(ar->drawrct.ymin, rct->ymin);
- ar->drawrct.xmax= MAX2(ar->drawrct.xmax, rct->xmax);
- ar->drawrct.ymax= MAX2(ar->drawrct.ymax, rct->ymax);
+ ar->drawrct.xmin = MIN2(ar->drawrct.xmin, rct->xmin);
+ ar->drawrct.ymin = MIN2(ar->drawrct.ymin, rct->ymin);
+ ar->drawrct.xmax = MAX2(ar->drawrct.xmax, rct->xmax);
+ ar->drawrct.ymax = MAX2(ar->drawrct.ymax, rct->ymax);
}
}
}
@@ -537,8 +538,8 @@ void ED_area_tag_redraw(ScrArea *sa)
{
ARegion *ar;
- if(sa)
- for(ar= sa->regionbase.first; ar; ar= ar->next)
+ if (sa)
+ for (ar= sa->regionbase.first; ar; ar= ar->next)
ED_region_tag_redraw(ar);
}
@@ -546,9 +547,9 @@ void ED_area_tag_redraw_regiontype(ScrArea *sa, int regiontype)
{
ARegion *ar;
- if(sa) {
- for(ar= sa->regionbase.first; ar; ar= ar->next) {
- if(ar->regiontype == regiontype) {
+ if (sa) {
+ for (ar= sa->regionbase.first; ar; ar= ar->next) {
+ if (ar->regiontype == regiontype) {
ED_region_tag_redraw(ar);
}
}
@@ -557,7 +558,7 @@ void ED_area_tag_redraw_regiontype(ScrArea *sa, int regiontype)
void ED_area_tag_refresh(ScrArea *sa)
{
- if(sa)
+ if (sa)
sa->do_refresh= 1;
}
@@ -569,17 +570,17 @@ void ED_area_headerprint(ScrArea *sa, const char *str)
ARegion *ar;
/* happens when running transform operators in backround mode */
- if(sa == NULL)
+ if (sa == NULL)
return;
- for(ar= sa->regionbase.first; ar; ar= ar->next) {
- if(ar->regiontype==RGN_TYPE_HEADER) {
- if(str) {
- if(ar->headerstr==NULL)
+ for (ar= sa->regionbase.first; ar; ar= ar->next) {
+ if (ar->regiontype==RGN_TYPE_HEADER) {
+ if (str) {
+ if (ar->headerstr==NULL)
ar->headerstr= MEM_mallocN(256, "headerprint");
BLI_strncpy(ar->headerstr, str, 256);
}
- else if(ar->headerstr) {
+ else if (ar->headerstr) {
MEM_freeN(ar->headerstr);
ar->headerstr= NULL;
}
@@ -660,8 +661,8 @@ static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar)
/* count how many actionzones with along same edge are available.
* This allows for adding more action zones in the future without
* having to worry about correct offset */
- for(azt= sa->actionzones.first; azt; azt= azt->next) {
- if(azt->edge == az->edge) tot++;
+ for (azt= sa->actionzones.first; azt; azt= azt->next) {
+ if (azt->edge == az->edge) tot++;
}
switch(az->edge) {
@@ -694,14 +695,14 @@ static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar)
BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2);
/* if more azones on 1 spot, set offset */
- for(azt= sa->actionzones.first; azt; azt= azt->next) {
- if(az!=azt) {
- if( ABS(az->x1-azt->x1) < 2 && ABS(az->y1-azt->y1) < 2) {
- if(az->edge==AE_TOP_TO_BOTTOMRIGHT || az->edge==AE_BOTTOM_TO_TOPLEFT) {
+ for (azt= sa->actionzones.first; azt; azt= azt->next) {
+ if (az!=azt) {
+ if ( ABS(az->x1-azt->x1) < 2 && ABS(az->y1-azt->y1) < 2) {
+ if (az->edge==AE_TOP_TO_BOTTOMRIGHT || az->edge==AE_BOTTOM_TO_TOPLEFT) {
az->x1+= AZONESPOT;
az->x2+= AZONESPOT;
}
- else{
+ else {
az->y1-= AZONESPOT;
az->y2-= AZONESPOT;
}
@@ -720,13 +721,13 @@ static void region_azone_tab_plus(ScrArea *sa, AZone *az, ARegion *ar)
AZone *azt;
int tot= 0, add;
- for(azt= sa->actionzones.first; azt; azt= azt->next) {
- if(azt->edge == az->edge) tot++;
+ for (azt= sa->actionzones.first; azt; azt= azt->next) {
+ if (azt->edge == az->edge) tot++;
}
switch(az->edge) {
case AE_TOP_TO_BOTTOMRIGHT:
- if(ar->winrct.ymax == sa->totrct.ymin) add= 1; else add= 0;
+ if (ar->winrct.ymax == sa->totrct.ymin) add= 1; else add= 0;
az->x1= ar->winrct.xmax - 2.5*AZONEPAD_TAB_PLUSW;
az->y1= ar->winrct.ymax - add;
az->x2= ar->winrct.xmax - 1.5*AZONEPAD_TAB_PLUSW;
@@ -765,13 +766,13 @@ static void region_azone_tab(ScrArea *sa, AZone *az, ARegion *ar)
AZone *azt;
int tot= 0, add;
- for(azt= sa->actionzones.first; azt; azt= azt->next) {
- if(azt->edge == az->edge) tot++;
+ for (azt= sa->actionzones.first; azt; azt= azt->next) {
+ if (azt->edge == az->edge) tot++;
}
switch(az->edge) {
case AE_TOP_TO_BOTTOMRIGHT:
- if(ar->winrct.ymax == sa->totrct.ymin) add= 1; else add= 0;
+ if (ar->winrct.ymax == sa->totrct.ymin) add= 1; else add= 0;
az->x1= ar->winrct.xmax - 2*AZONEPAD_TABW;
az->y1= ar->winrct.ymax - add;
az->x2= ar->winrct.xmax - AZONEPAD_TABW;
@@ -810,13 +811,13 @@ static void region_azone_tria(ScrArea *sa, AZone *az, ARegion *ar)
AZone *azt;
int tot= 0, add;
- for(azt= sa->actionzones.first; azt; azt= azt->next) {
- if(azt->edge == az->edge) tot++;
+ for (azt= sa->actionzones.first; azt; azt= azt->next) {
+ if (azt->edge == az->edge) tot++;
}
switch(az->edge) {
case AE_TOP_TO_BOTTOMRIGHT:
- if(ar->winrct.ymax == sa->totrct.ymin) add= 1; else add= 0;
+ if (ar->winrct.ymax == sa->totrct.ymin) add= 1; else add= 0;
az->x1= ar->winrct.xmax - 2*AZONEPAD_TRIAW;
az->y1= ar->winrct.ymax - add;
az->x2= ar->winrct.xmax - AZONEPAD_TRIAW;
@@ -857,15 +858,16 @@ static void region_azone_initialize(ScrArea *sa, ARegion *ar, AZEdge edge)
az->edge= edge;
if (ar->flag & (RGN_FLAG_HIDDEN|RGN_FLAG_TOO_SMALL)) {
- if(G.rt==3)
+ if (G.rt==3)
region_azone_icon(sa, az, ar);
- else if(G.rt==2)
+ else if (G.rt==2)
region_azone_tria(sa, az, ar);
- else if(G.rt==1)
+ else if (G.rt==1)
region_azone_tab(sa, az, ar);
else
region_azone_tab_plus(sa, az, ar);
- } else {
+ }
+ else {
region_azone_edge(az, ar);
}
@@ -878,20 +880,20 @@ static void region_azone_add(ScrArea *sa, ARegion *ar, int alignment)
{
/* edge code (t b l r) is along which area edge azone will be drawn */
- if(alignment==RGN_ALIGN_TOP)
+ if (alignment==RGN_ALIGN_TOP)
region_azone_initialize(sa, ar, AE_BOTTOM_TO_TOPLEFT);
- else if(alignment==RGN_ALIGN_BOTTOM)
+ else if (alignment==RGN_ALIGN_BOTTOM)
region_azone_initialize(sa, ar, AE_TOP_TO_BOTTOMRIGHT);
- else if(ELEM(alignment, RGN_ALIGN_RIGHT, RGN_OVERLAP_RIGHT))
+ else if (ELEM(alignment, RGN_ALIGN_RIGHT, RGN_OVERLAP_RIGHT))
region_azone_initialize(sa, ar, AE_LEFT_TO_TOPRIGHT);
- else if(ELEM(alignment, RGN_ALIGN_LEFT, RGN_OVERLAP_LEFT))
+ else if (ELEM(alignment, RGN_ALIGN_LEFT, RGN_OVERLAP_LEFT))
region_azone_initialize(sa, ar, AE_RIGHT_TO_TOPLEFT);
}
/* dir is direction to check, not the splitting edge direction! */
static int rct_fits(rcti *rect, char dir, int size)
{
- if(dir=='h') {
+ if (dir=='h') {
return rect->xmax-rect->xmin - size;
}
else { // 'v'
@@ -905,15 +907,15 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
int prefsizex, prefsizey;
int alignment;
- if(ar==NULL)
+ if (ar==NULL)
return;
/* no returns in function, winrct gets set in the end again */
BLI_init_rcti(&ar->winrct, 0, 0, 0, 0);
/* for test; allow split of previously defined region */
- if(ar->alignment & RGN_SPLIT_PREV)
- if(ar->prev)
+ if (ar->alignment & RGN_SPLIT_PREV)
+ if (ar->prev)
remainder= &ar->prev->winrct;
alignment = ar->alignment & ~RGN_SPLIT_PREV;
@@ -921,118 +923,118 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
/* clear state flags first */
ar->flag &= ~RGN_FLAG_TOO_SMALL;
/* user errors */
- if(ar->next==NULL && alignment!=RGN_ALIGN_QSPLIT)
+ if (ar->next==NULL && alignment!=RGN_ALIGN_QSPLIT)
alignment= RGN_ALIGN_NONE;
/* prefsize, for header we stick to exception */
prefsizex= ar->sizex?ar->sizex:ar->type->prefsizex;
- if(ar->regiontype==RGN_TYPE_HEADER)
+ if (ar->regiontype==RGN_TYPE_HEADER)
prefsizey= ar->type->prefsizey;
- else if(ar->regiontype==RGN_TYPE_UI && sa->spacetype == SPACE_FILE) {
+ else if (ar->regiontype==RGN_TYPE_UI && sa->spacetype == SPACE_FILE) {
prefsizey= UI_UNIT_Y * 2 + (UI_UNIT_Y/2);
}
else
prefsizey= ar->sizey?ar->sizey:ar->type->prefsizey;
/* hidden is user flag */
- if(ar->flag & RGN_FLAG_HIDDEN);
+ if (ar->flag & RGN_FLAG_HIDDEN);
/* XXX floating area region, not handled yet here */
- else if(alignment == RGN_ALIGN_FLOAT);
+ else if (alignment == RGN_ALIGN_FLOAT);
/* remainder is too small for any usage */
- else if( rct_fits(remainder, 'v', 1)<0 || rct_fits(remainder, 'h', 1) < 0 ) {
+ else if ( rct_fits(remainder, 'v', 1)<0 || rct_fits(remainder, 'h', 1) < 0 ) {
ar->flag |= RGN_FLAG_TOO_SMALL;
}
- else if(alignment==RGN_ALIGN_NONE) {
+ else if (alignment==RGN_ALIGN_NONE) {
/* typically last region */
ar->winrct= *remainder;
BLI_init_rcti(remainder, 0, 0, 0, 0);
}
- else if(alignment==RGN_ALIGN_TOP || alignment==RGN_ALIGN_BOTTOM) {
+ else if (alignment==RGN_ALIGN_TOP || alignment==RGN_ALIGN_BOTTOM) {
- if( rct_fits(remainder, 'v', prefsizey) < 0 ) {
+ if ( rct_fits(remainder, 'v', prefsizey) < 0 ) {
ar->flag |= RGN_FLAG_TOO_SMALL;
}
else {
int fac= rct_fits(remainder, 'v', prefsizey);
- if(fac < 0 )
+ if (fac < 0 )
prefsizey += fac;
ar->winrct= *remainder;
- if(alignment==RGN_ALIGN_TOP) {
- ar->winrct.ymin= ar->winrct.ymax - prefsizey + 1;
- remainder->ymax= ar->winrct.ymin - 1;
+ if (alignment==RGN_ALIGN_TOP) {
+ ar->winrct.ymin = ar->winrct.ymax - prefsizey + 1;
+ remainder->ymax = ar->winrct.ymin - 1;
}
else {
- ar->winrct.ymax= ar->winrct.ymin + prefsizey - 1;
- remainder->ymin= ar->winrct.ymax + 1;
+ ar->winrct.ymax = ar->winrct.ymin + prefsizey - 1;
+ remainder->ymin = ar->winrct.ymax + 1;
}
}
}
- else if( ELEM4(alignment, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RGN_OVERLAP_LEFT, RGN_OVERLAP_RIGHT)) {
+ else if ( ELEM4(alignment, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RGN_OVERLAP_LEFT, RGN_OVERLAP_RIGHT)) {
- if( rct_fits(remainder, 'h', prefsizex) < 0 ) {
+ if ( rct_fits(remainder, 'h', prefsizex) < 0 ) {
ar->flag |= RGN_FLAG_TOO_SMALL;
}
else {
int fac= rct_fits(remainder, 'h', prefsizex);
- if(fac < 0 )
+ if (fac < 0 )
prefsizex += fac;
ar->winrct= *remainder;
- if(ELEM(alignment, RGN_ALIGN_RIGHT, RGN_OVERLAP_RIGHT)) {
- ar->winrct.xmin= ar->winrct.xmax - prefsizex + 1;
- if(alignment==RGN_ALIGN_RIGHT)
- remainder->xmax= ar->winrct.xmin - 1;
+ if (ELEM(alignment, RGN_ALIGN_RIGHT, RGN_OVERLAP_RIGHT)) {
+ ar->winrct.xmin = ar->winrct.xmax - prefsizex + 1;
+ if (alignment==RGN_ALIGN_RIGHT)
+ remainder->xmax = ar->winrct.xmin - 1;
}
else {
- ar->winrct.xmax= ar->winrct.xmin + prefsizex - 1;
- if(alignment==RGN_ALIGN_LEFT)
- remainder->xmin= ar->winrct.xmax + 1;
+ ar->winrct.xmax = ar->winrct.xmin + prefsizex - 1;
+ if (alignment==RGN_ALIGN_LEFT)
+ remainder->xmin = ar->winrct.xmax + 1;
}
}
}
- else if(alignment==RGN_ALIGN_VSPLIT || alignment==RGN_ALIGN_HSPLIT) {
+ else if (alignment==RGN_ALIGN_VSPLIT || alignment==RGN_ALIGN_HSPLIT) {
/* percentage subdiv*/
ar->winrct= *remainder;
- if(alignment==RGN_ALIGN_HSPLIT) {
- if( rct_fits(remainder, 'h', prefsizex) > 4) {
- ar->winrct.xmax= (remainder->xmin+remainder->xmax)/2;
- remainder->xmin= ar->winrct.xmax+1;
+ if (alignment==RGN_ALIGN_HSPLIT) {
+ if ( rct_fits(remainder, 'h', prefsizex) > 4) {
+ ar->winrct.xmax = (remainder->xmin+remainder->xmax)/2;
+ remainder->xmin = ar->winrct.xmax+1;
}
else {
BLI_init_rcti(remainder, 0, 0, 0, 0);
}
}
else {
- if( rct_fits(remainder, 'v', prefsizey) > 4) {
- ar->winrct.ymax= (remainder->ymin+remainder->ymax)/2;
- remainder->ymin= ar->winrct.ymax+1;
+ if ( rct_fits(remainder, 'v', prefsizey) > 4) {
+ ar->winrct.ymax = (remainder->ymin+remainder->ymax)/2;
+ remainder->ymin = ar->winrct.ymax+1;
}
else {
BLI_init_rcti(remainder, 0, 0, 0, 0);
}
}
}
- else if(alignment==RGN_ALIGN_QSPLIT) {
+ else if (alignment==RGN_ALIGN_QSPLIT) {
ar->winrct= *remainder;
/* test if there's still 4 regions left */
- if(quad==0) {
+ if (quad==0) {
ARegion *artest= ar->next;
int count= 1;
- while(artest) {
+ while (artest) {
artest->alignment= RGN_ALIGN_QSPLIT;
artest= artest->next;
count++;
}
- if(count!=4) {
+ if (count!=4) {
/* let's stop adding regions */
BLI_init_rcti(remainder, 0, 0, 0, 0);
if (G.f & G_DEBUG)
@@ -1040,16 +1042,16 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
}
else quad= 1;
}
- if(quad) {
- if(quad==1) { /* left bottom */
+ if (quad) {
+ if (quad==1) { /* left bottom */
ar->winrct.xmax = (remainder->xmin + remainder->xmax)/2;
ar->winrct.ymax = (remainder->ymin + remainder->ymax)/2;
}
- else if(quad==2) { /* left top */
+ else if (quad==2) { /* left top */
ar->winrct.xmax = (remainder->xmin + remainder->xmax)/2;
ar->winrct.ymin = 1 + (remainder->ymin + remainder->ymax)/2;
}
- else if(quad==3) { /* right bottom */
+ else if (quad==3) { /* right bottom */
ar->winrct.xmin = 1 + (remainder->xmin + remainder->xmax)/2;
ar->winrct.ymax = (remainder->ymin + remainder->ymax)/2;
}
@@ -1068,24 +1070,24 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
ar->winy= ar->winrct.ymax - ar->winrct.ymin + 1;
/* set winrect for azones */
- if(ar->flag & (RGN_FLAG_HIDDEN|RGN_FLAG_TOO_SMALL)) {
+ if (ar->flag & (RGN_FLAG_HIDDEN|RGN_FLAG_TOO_SMALL)) {
ar->winrct= *remainder;
- if(alignment==RGN_ALIGN_TOP)
- ar->winrct.ymin= ar->winrct.ymax;
- else if(alignment==RGN_ALIGN_BOTTOM)
- ar->winrct.ymax= ar->winrct.ymin;
- else if(ELEM(alignment, RGN_ALIGN_RIGHT, RGN_OVERLAP_RIGHT))
- ar->winrct.xmin= ar->winrct.xmax;
- else if(ELEM(alignment, RGN_ALIGN_LEFT, RGN_OVERLAP_LEFT))
- ar->winrct.xmax= ar->winrct.xmin;
+ if (alignment==RGN_ALIGN_TOP)
+ ar->winrct.ymin = ar->winrct.ymax;
+ else if (alignment==RGN_ALIGN_BOTTOM)
+ ar->winrct.ymax = ar->winrct.ymin;
+ else if (ELEM(alignment, RGN_ALIGN_RIGHT, RGN_OVERLAP_RIGHT))
+ ar->winrct.xmin = ar->winrct.xmax;
+ else if (ELEM(alignment, RGN_ALIGN_LEFT, RGN_OVERLAP_LEFT))
+ ar->winrct.xmax = ar->winrct.xmin;
else /* prevent winrct to be valid */
- ar->winrct.xmax= ar->winrct.xmin;
+ ar->winrct.xmax = ar->winrct.xmin;
}
/* restore prev-split exception */
- if(ar->alignment & RGN_SPLIT_PREV) {
- if(ar->prev) {
+ if (ar->alignment & RGN_SPLIT_PREV) {
+ if (ar->prev) {
remainder= remainder_prev;
ar->prev->winx= ar->prev->winrct.xmax - ar->prev->winrct.xmin + 1;
ar->prev->winy= ar->prev->winrct.ymax - ar->prev->winrct.ymin + 1;
@@ -1093,7 +1095,7 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
}
/* in end, add azones, where appropriate */
- if(ar->regiontype == RGN_TYPE_HEADER && ar->winy + 6 > sa->winy) {
+ if (ar->regiontype == RGN_TYPE_HEADER && ar->winy + 6 > sa->winy) {
/* The logic for this is: when the header takes up the full area,
* disallow hiding it to view the main window.
*
@@ -1113,15 +1115,15 @@ static void area_calc_totrct(ScrArea *sa, int sizex, int sizey)
{
short rt= 0; // CLAMPIS(G.rt, 0, 16);
- if(sa->v1->vec.x>0) sa->totrct.xmin= sa->v1->vec.x+1+rt;
- else sa->totrct.xmin= sa->v1->vec.x;
- if(sa->v4->vec.x<sizex-1) sa->totrct.xmax= sa->v4->vec.x-1-rt;
- else sa->totrct.xmax= sa->v4->vec.x;
+ if (sa->v1->vec.x>0) sa->totrct.xmin = sa->v1->vec.x+1+rt;
+ else sa->totrct.xmin = sa->v1->vec.x;
+ if (sa->v4->vec.x<sizex-1) sa->totrct.xmax = sa->v4->vec.x-1-rt;
+ else sa->totrct.xmax = sa->v4->vec.x;
- if(sa->v1->vec.y>0) sa->totrct.ymin= sa->v1->vec.y+1+rt;
- else sa->totrct.ymin= sa->v1->vec.y;
- if(sa->v2->vec.y<sizey-1) sa->totrct.ymax= sa->v2->vec.y-1-rt;
- else sa->totrct.ymax= sa->v2->vec.y;
+ if (sa->v1->vec.y>0) sa->totrct.ymin = sa->v1->vec.y+1+rt;
+ else sa->totrct.ymin = sa->v1->vec.y;
+ if (sa->v2->vec.y<sizey-1) sa->totrct.ymax = sa->v2->vec.y-1-rt;
+ else sa->totrct.ymax = sa->v2->vec.y;
/* for speedup */
sa->winx= sa->totrct.xmax-sa->totrct.xmin+1;
@@ -1132,12 +1134,12 @@ static void area_calc_totrct(ScrArea *sa, int sizex, int sizey)
/* used for area initialize below */
static void region_subwindow(wmWindow *win, ARegion *ar)
{
- if(ar->flag & (RGN_FLAG_HIDDEN|RGN_FLAG_TOO_SMALL)) {
- if(ar->swinid)
+ if (ar->flag & (RGN_FLAG_HIDDEN|RGN_FLAG_TOO_SMALL)) {
+ if (ar->swinid)
wm_subwindow_close(win, ar->swinid);
ar->swinid= 0;
}
- else if(ar->swinid==0)
+ else if (ar->swinid==0)
ar->swinid= wm_subwindow_open(win, &ar->winrct);
else
wm_subwindow_position(win, ar->swinid, &ar->winrct);
@@ -1148,49 +1150,49 @@ static void ed_default_handlers(wmWindowManager *wm, ScrArea *sa, ListBase *hand
/* note, add-handler checks if it already exists */
// XXX it would be good to have boundbox checks for some of these...
- if(flag & ED_KEYMAP_UI) {
+ if (flag & ED_KEYMAP_UI) {
/* user interface widgets */
UI_add_region_handlers(handlers);
}
- if(flag & ED_KEYMAP_VIEW2D) {
+ if (flag & ED_KEYMAP_VIEW2D) {
/* 2d-viewport handling+manipulation */
- wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "View2D", 0, 0);
+ wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "View2D", 0, 0);
WM_event_add_keymap_handler(handlers, keymap);
}
- if(flag & ED_KEYMAP_MARKERS) {
+ if (flag & ED_KEYMAP_MARKERS) {
/* time-markers */
- wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Markers", 0, 0);
+ wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "Markers", 0, 0);
/* time space only has this keymap, the others get a boundbox restricted map */
- if(sa->spacetype!=SPACE_TIME) {
+ if (sa->spacetype!=SPACE_TIME) {
ARegion *ar;
static rcti rect= {0, 10000, 0, 30}; /* same local check for all areas */
ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
- if(ar) {
+ if (ar) {
WM_event_add_keymap_handler_bb(handlers, keymap, &rect, &ar->winrct);
}
}
else
WM_event_add_keymap_handler(handlers, keymap);
}
- if(flag & ED_KEYMAP_ANIMATION) {
+ if (flag & ED_KEYMAP_ANIMATION) {
/* frame changing and timeline operators (for time spaces) */
- wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Animation", 0, 0);
+ wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "Animation", 0, 0);
WM_event_add_keymap_handler(handlers, keymap);
}
- if(flag & ED_KEYMAP_FRAMES) {
+ if (flag & ED_KEYMAP_FRAMES) {
/* frame changing/jumping (for all spaces) */
- wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Frames", 0, 0);
+ wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "Frames", 0, 0);
WM_event_add_keymap_handler(handlers, keymap);
}
- if(flag & ED_KEYMAP_GPENCIL) {
+ if (flag & ED_KEYMAP_GPENCIL) {
/* grease pencil */
- wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Grease Pencil", 0, 0);
+ wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "Grease Pencil", 0, 0);
WM_event_add_keymap_handler(handlers, keymap);
}
- if(flag & ED_KEYMAP_HEADER) {
+ if (flag & ED_KEYMAP_HEADER) {
/* standard keymap for headers regions */
- wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Header", 0, 0);
+ wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "Header", 0, 0);
WM_event_add_keymap_handler(handlers, keymap);
}
}
@@ -1205,12 +1207,12 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa)
/* set typedefinitions */
sa->type= BKE_spacetype_from_id(sa->spacetype);
- if(sa->type==NULL) {
+ if (sa->type==NULL) {
sa->butspacetype= sa->spacetype= SPACE_VIEW3D;
sa->type= BKE_spacetype_from_id(sa->spacetype);
}
- for(ar= sa->regionbase.first; ar; ar= ar->next)
+ for (ar= sa->regionbase.first; ar; ar= ar->next)
ar->type= BKE_regiontype_from_id(sa->type, ar->regiontype);
/* area sizes */
@@ -1226,18 +1228,18 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa)
/* default area handlers */
ed_default_handlers(wm, sa, &sa->handlers, sa->type->keymapflag);
/* checks spacedata, adds own handlers */
- if(sa->type->init)
+ if (sa->type->init)
sa->type->init(wm, sa);
/* region windows, default and own handlers */
- for(ar= sa->regionbase.first; ar; ar= ar->next) {
+ for (ar= sa->regionbase.first; ar; ar= ar->next) {
region_subwindow(win, ar);
- if(ar->swinid) {
+ if (ar->swinid) {
/* default region handlers */
ed_default_handlers(wm, sa, &ar->handlers, ar->type->keymapflag);
/* own handlers */
- if(ar->type->init)
+ if (ar->type->init)
ar->type->init(wm, ar);
}
else {
@@ -1246,7 +1248,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa)
}
/* rechecks 2d matrix for header on dpi changing, do not do for other regions, it resets view && blocks view2d operator polls (ton) */
- if(ar->regiontype==RGN_TYPE_HEADER)
+ if (ar->regiontype==RGN_TYPE_HEADER)
ar->v2d.flag &= ~V2D_IS_INITIALISED;
}
}
@@ -1273,7 +1275,7 @@ void ED_region_toggle_hidden(bContext *C, ARegion *ar)
ar->flag ^= RGN_FLAG_HIDDEN;
- if(ar->flag & RGN_FLAG_HIDDEN)
+ if (ar->flag & RGN_FLAG_HIDDEN)
WM_event_remove_handlers(C, &ar->handlers);
ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
@@ -1292,10 +1294,10 @@ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
sa1->spacetype= sa2->spacetype;
sa1->butspacetype= sa2->butspacetype;
- if(swap_space == 1) {
+ if (swap_space == 1) {
SWAP(ListBase, sa1->spacedata, sa2->spacedata);
/* exception: ensure preview is reset */
-// if(sa1->spacetype==SPACE_VIEW3D)
+// if (sa1->spacetype==SPACE_VIEW3D)
// XXX BIF_view3d_previewrender_free(sa1->spacedata.first);
}
else if (swap_space == 2) {
@@ -1309,19 +1311,19 @@ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
/* Note; SPACE_EMPTY is possible on new screens */
/* regions */
- if(swap_space == 1) {
+ if (swap_space == 1) {
SWAP(ListBase, sa1->regionbase, sa2->regionbase);
}
else {
- if(swap_space<2) {
+ if (swap_space<2) {
st= BKE_spacetype_from_id(spacetype);
- for(ar= sa1->regionbase.first; ar; ar= ar->next)
+ for (ar= sa1->regionbase.first; ar; ar= ar->next)
BKE_area_region_free(st, ar);
BLI_freelistN(&sa1->regionbase);
}
st= BKE_spacetype_from_id(sa2->spacetype);
- for(ar= sa2->regionbase.first; ar; ar= ar->next) {
+ for (ar= sa2->regionbase.first; ar; ar= ar->next) {
ARegion *newar= BKE_area_region_copy(st, ar);
BLI_addtail(&sa1->regionbase, newar);
}
@@ -1357,7 +1359,7 @@ void ED_area_swapspace(bContext *C, ScrArea *sa1, ScrArea *sa2)
void ED_area_newspace(bContext *C, ScrArea *sa, int type)
{
- if(sa->spacetype != type) {
+ if (sa->spacetype != type) {
SpaceType *st;
SpaceLink *slold;
SpaceLink *sl;
@@ -1373,14 +1375,14 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type)
/* check previously stored space */
for (sl= sa->spacedata.first; sl; sl= sl->next)
- if(sl->spacetype==type)
+ if (sl->spacetype==type)
break;
/* old spacedata... happened during work on 2.50, remove */
- if(sl && sl->regionbase.first==NULL) {
+ if (sl && sl->regionbase.first==NULL) {
st->free(sl);
BLI_freelinkN(&sa->spacedata, sl);
- if(slold == sl) {
+ if (slold == sl) {
slold= NULL;
}
sl= NULL;
@@ -1399,12 +1401,12 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type)
}
else {
/* new space */
- if(st) {
+ if (st) {
sl= st->new(C);
BLI_addhead(&sa->spacedata, sl);
/* swap regions */
- if(slold)
+ if (slold)
slold->regionbase= sa->regionbase;
sa->regionbase= sl->regionbase;
sl->regionbase.first= sl->regionbase.last= NULL;
@@ -1430,10 +1432,10 @@ void ED_area_prevspace(bContext *C, ScrArea *sa)
{
SpaceLink *sl = (sa) ? sa->spacedata.first : CTX_wm_space_data(C);
- if(sl->next) {
+ if (sl->next) {
/* workaround for case of double prevspace, render window
* with a file browser on top of it */
- if(sl->next->spacetype == SPACE_FILE && sl->next->next)
+ if (sl->next->spacetype == SPACE_FILE && sl->next->next)
ED_area_newspace(C, sa, sl->next->next->spacetype);
else
ED_area_newspace(C, sa, sl->next->spacetype);
@@ -1505,7 +1507,7 @@ int ED_area_header_switchbutton(const bContext *C, uiBlock *block, int yco)
uiBut *but;
int xco= 8;
- but= uiDefIconTextButC(block, ICONTEXTROW, 0, ICON_VIEW3D,
+ but = uiDefIconTextButC(block, ICONTEXTROW, 0, ICON_VIEW3D,
editortype_pup(), xco, yco, UI_UNIT_X+10, UI_UNIT_Y,
&(sa->butspacetype), 1.0, SPACEICONMAX, 0, 0,
TIP_("Displays current editor type. Click for menu of available types"));
@@ -1527,14 +1529,14 @@ int ED_area_header_standardbuttons(const bContext *C, uiBlock *block, int yco)
uiBlockSetEmboss(block, UI_EMBOSSN);
if (sa->flag & HEADER_NO_PULLDOWN) {
- but= uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0,
+ but = uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0,
ICON_DISCLOSURE_TRI_RIGHT,
xco,yco,UI_UNIT_X,UI_UNIT_Y-2,
&(sa->flag), 0, 0, 0, 0,
"Show pulldown menus");
}
else {
- but= uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0,
+ but = uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0,
ICON_DISCLOSURE_TRI_DOWN,
xco,yco,UI_UNIT_X,UI_UNIT_Y-2,
&(sa->flag), 0, 0, 0, 0,
@@ -1561,10 +1563,10 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
View2DScrollers *scrollers;
int x, y, xco, yco, w, em, triangle, open, newcontext= 0;
- if(contextnr >= 0)
+ if (contextnr >= 0)
newcontext= UI_view2d_tab_set(v2d, contextnr);
- if(vertical) {
+ if (vertical) {
w= v2d->cur.xmax - v2d->cur.xmin;
em= (ar->type->prefsizex)? UI_UNIT_Y/2: UI_UNIT_Y;
}
@@ -1579,21 +1581,21 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
/* set view2d view matrix for scrolling (without scrollers) */
UI_view2d_view_ortho(v2d);
- for(pt= ar->type->paneltypes.first; pt; pt= pt->next) {
+ for (pt= ar->type->paneltypes.first; pt; pt= pt->next) {
/* verify context */
- if(context)
- if(pt->context[0] && strcmp(context, pt->context) != 0)
+ if (context)
+ if (pt->context[0] && strcmp(context, pt->context) != 0)
continue;
/* draw panel */
- if(pt->draw && (!pt->poll || pt->poll(C, pt))) {
+ if (pt->draw && (!pt->poll || pt->poll(C, pt))) {
block= uiBeginBlock(C, ar, pt->idname, UI_EMBOSS);
panel= uiBeginPanel(sa, ar, block, pt, &open);
/* bad fixed values */
triangle= (int)(UI_UNIT_Y * 1.1f);
- if(pt->draw_header && !(pt->flag & PNL_NO_HEADER) && (open || vertical)) {
+ if (pt->draw_header && !(pt->flag & PNL_NO_HEADER) && (open || vertical)) {
/* for enabled buttons */
panel->layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER,
triangle, UI_UNIT_Y+style->panelspace+2, UI_UNIT_Y, 1, style);
@@ -1608,7 +1610,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
panel->labelofs= 0;
}
- if(open) {
+ if (open) {
short panelContext;
/* panel context can either be toolbar region or normal panels region */
@@ -1645,7 +1647,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
glClear(GL_COLOR_BUFFER_BIT);
/* before setting the view */
- if(vertical) {
+ if (vertical) {
/* only allow scrolling in vertical direction */
v2d->keepofs |= V2D_LOCKOFS_X|V2D_KEEPOFS_Y;
v2d->keepofs &= ~(V2D_LOCKOFS_Y|V2D_KEEPOFS_X);
@@ -1653,7 +1655,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
v2d->scroll &= ~V2D_SCROLL_VERTICAL_HIDE;
// don't jump back when panels close or hide
- if(!newcontext)
+ if (!newcontext)
y= MAX2(-y, -v2d->cur.ymin);
else
y= -y;
@@ -1669,7 +1671,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
v2d->scroll &= ~V2D_SCROLL_HORIZONTAL_HIDE;
// don't jump back when panels close or hide
- if(!newcontext)
+ if (!newcontext)
x= MAX2(x, v2d->cur.xmax);
y= -y;
}
@@ -1703,13 +1705,13 @@ void ED_region_panels_init(wmWindowManager *wm, ARegion *ar)
ar->v2d.scroll &= ~V2D_SCROLL_VERTICAL_HIDE;
ar->v2d.keepzoom |= V2D_KEEPZOOM;
- // correctly initialised User-Prefs?
- if(!(ar->v2d.align & V2D_ALIGN_NO_POS_Y))
+ // correctly initialized User-Prefs?
+ if (!(ar->v2d.align & V2D_ALIGN_NO_POS_Y))
ar->v2d.flag &= ~V2D_IS_INITIALISED;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_PANELS_UI, ar->winx, ar->winy);
- keymap= WM_keymap_find(wm->defaultconf, "View2D Buttons List", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "View2D Buttons List", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -1734,25 +1736,25 @@ void ED_region_header(const bContext *C, ARegion *ar)
yco= headery-4;
/* draw all headers types */
- for(ht= ar->type->headertypes.first; ht; ht= ht->next) {
+ for (ht= ar->type->headertypes.first; ht; ht= ht->next) {
block= uiBeginBlock(C, ar, ht->idname, UI_EMBOSS);
layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER, xco, yco, UI_UNIT_Y, 1, style);
- if(ht->draw) {
+ if (ht->draw) {
header.type= ht;
header.layout= layout;
ht->draw(C, &header);
/* for view2d */
xco= uiLayoutGetWidth(layout);
- if(xco > maxco)
+ if (xco > maxco)
maxco= xco;
}
uiBlockLayoutResolve(block, &xco, &yco);
/* for view2d */
- if(xco > maxco)
+ if (xco > maxco)
maxco= xco;
uiEndBlock(C, block);
@@ -1788,17 +1790,17 @@ void ED_region_info_draw(ARegion *ar, const char *text, int block, float alpha)
/* background box */
rect= ar->winrct;
- rect.xmin= 0;
- rect.ymin= ar->winrct.ymax - ar->winrct.ymin - header_height;
+ rect.xmin = 0;
+ rect.ymin = ar->winrct.ymax - ar->winrct.ymin - header_height;
- if(block) {
- rect.xmax= ar->winrct.xmax - ar->winrct.xmin;
+ if (block) {
+ rect.xmax = ar->winrct.xmax - ar->winrct.xmin;
}
else {
- rect.xmax= rect.xmin + BLF_width(fontid, text) + 24;
+ rect.xmax = rect.xmin + BLF_width(fontid, text) + 24;
}
- rect.ymax= ar->winrct.ymax - ar->winrct.ymin;
+ rect.ymax = ar->winrct.ymax - ar->winrct.ymin;
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 2608e9e3482..28fe8caf34b 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -150,7 +150,7 @@ void fdrawbezier(float vec[4][3])
glBegin(GL_LINE_STRIP);
while (spline_step < 1.000001f) {
#if 0
- if(do_shaded)
+ if (do_shaded)
UI_ThemeColorBlend(th_col1, th_col2, spline_step);
#endif
glEvalCoord1f(spline_step);
@@ -261,7 +261,7 @@ void sdrawbox(short x1, short y1, short x2, short y2)
void setlinestyle(int nr)
{
- if(nr==0) {
+ if (nr==0) {
glDisable(GL_LINE_STIPPLE);
}
else {
@@ -284,7 +284,7 @@ void set_inverted_drawing(int enable)
void sdrawXORline(int x0, int y0, int x1, int y1)
{
- if(x0==x1 && y0==y1) return;
+ if (x0==x1 && y0==y1) return;
set_inverted_drawing(1);
@@ -306,7 +306,7 @@ void sdrawXORline4(int nr, int x0, int y0, int x1, int y1)
set_inverted_drawing(1);
glBegin(GL_LINES);
- if(nr== -1) { /* flush */
+ if (nr== -1) { /* flush */
for (nr=0; nr<4; nr++) {
if (flags[nr]) {
glVertex2sv(old[nr][0]);
@@ -314,9 +314,10 @@ void sdrawXORline4(int nr, int x0, int y0, int x1, int y1)
flags[nr]= 0;
}
}
- } else {
- if(nr>=0 && nr<4) {
- if(flags[nr]) {
+ }
+ else {
+ if (nr>=0 && nr<4) {
+ if (flags[nr]) {
glVertex2sv(old[nr][0]);
glVertex2sv(old[nr][1]);
}
@@ -339,7 +340,7 @@ void sdrawXORline4(int nr, int x0, int y0, int x1, int y1)
void fdrawXORellipse(float xofs, float yofs, float hw, float hh)
{
- if(hw==0) return;
+ if (hw==0) return;
set_inverted_drawing(1);
@@ -502,28 +503,28 @@ void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format,
float rast_y= y+subpart_y*offset_y*yzoom;
/* check if we already got these because we always get 2 more when doing seamless*/
- if(subpart_w<=seamless || subpart_h<=seamless)
+ if (subpart_w<=seamless || subpart_h<=seamless)
continue;
- if(format==GL_FLOAT) {
+ if (format==GL_FLOAT) {
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, subpart_w, subpart_h, GL_RGBA, GL_FLOAT, &f_rect[subpart_y*offset_y*img_w*4 + subpart_x*offset_x*4]);
/* add an extra border of pixels so linear looks ok at edges of full image. */
- if(subpart_w<tex_w)
+ if (subpart_w<tex_w)
glTexSubImage2D(GL_TEXTURE_2D, 0, subpart_w, 0, 1, subpart_h, GL_RGBA, GL_FLOAT, &f_rect[subpart_y*offset_y*img_w*4 + (subpart_x*offset_x+subpart_w-1)*4]);
- if(subpart_h<tex_h)
+ if (subpart_h<tex_h)
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, subpart_h, subpart_w, 1, GL_RGBA, GL_FLOAT, &f_rect[(subpart_y*offset_y+subpart_h-1)*img_w*4 + subpart_x*offset_x*4]);
- if(subpart_w<tex_w && subpart_h<tex_h)
+ if (subpart_w<tex_w && subpart_h<tex_h)
glTexSubImage2D(GL_TEXTURE_2D, 0, subpart_w, subpart_h, 1, 1, GL_RGBA, GL_FLOAT, &f_rect[(subpart_y*offset_y+subpart_h-1)*img_w*4 + (subpart_x*offset_x+subpart_w-1)*4]);
}
else {
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, subpart_w, subpart_h, GL_RGBA, GL_UNSIGNED_BYTE, &uc_rect[subpart_y*offset_y*img_w*4 + subpart_x*offset_x*4]);
- if(subpart_w<tex_w)
+ if (subpart_w<tex_w)
glTexSubImage2D(GL_TEXTURE_2D, 0, subpart_w, 0, 1, subpart_h, GL_RGBA, GL_UNSIGNED_BYTE, &uc_rect[subpart_y*offset_y*img_w*4 + (subpart_x*offset_x+subpart_w-1)*4]);
- if(subpart_h<tex_h)
+ if (subpart_h<tex_h)
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, subpart_h, subpart_w, 1, GL_RGBA, GL_UNSIGNED_BYTE, &uc_rect[(subpart_y*offset_y+subpart_h-1)*img_w*4 + subpart_x*offset_x*4]);
- if(subpart_w<tex_w && subpart_h<tex_h)
+ if (subpart_w<tex_w && subpart_h<tex_h)
glTexSubImage2D(GL_TEXTURE_2D, 0, subpart_w, subpart_h, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &uc_rect[(subpart_y*offset_y+subpart_h-1)*img_w*4 + (subpart_x*offset_x+subpart_w-1)*4]);
}
@@ -608,27 +609,28 @@ void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int fo
/* Don't use safe RasterPos (slower) if we can avoid it. */
if (rast_x>=0 && rast_y>=0) {
glRasterPos2f(rast_x, rast_y);
- } else {
+ }
+ else {
glaRasterPosSafe2f(rast_x, rast_y, 0, 0);
}
glPixelStorei(GL_UNPACK_ROW_LENGTH, row_w);
- if(format==GL_LUMINANCE || format==GL_RED) {
- if(type==GL_FLOAT) {
+ if (format==GL_LUMINANCE || format==GL_RED) {
+ if (type==GL_FLOAT) {
float *f_rect= (float *)rect;
glDrawPixels(draw_w, draw_h, format, type, f_rect + (off_y*row_w + off_x));
}
- else if(type==GL_INT || type==GL_UNSIGNED_INT) {
+ else if (type==GL_INT || type==GL_UNSIGNED_INT) {
int *i_rect= (int *)rect;
glDrawPixels(draw_w, draw_h, format, type, i_rect + (off_y*row_w + off_x));
}
}
else { /* RGBA */
- if(type==GL_FLOAT) {
+ if (type==GL_FLOAT) {
float *f_rect= (float *)rect;
glDrawPixels(draw_w, draw_h, format, type, f_rect + (off_y*row_w + off_x)*4);
}
- else if(type==GL_UNSIGNED_BYTE) {
+ else if (type==GL_UNSIGNED_BYTE) {
unsigned char *uc_rect= (unsigned char *) rect;
glDrawPixels(draw_w, draw_h, format, type, uc_rect + (off_y*row_w + off_x)*4);
}
@@ -709,11 +711,12 @@ gla2DDrawInfo *glaBegin2DDraw(rcti *screen_rect, rctf *world_rect)
di->screen_rect= *screen_rect;
if (world_rect) {
di->world_rect= *world_rect;
- } else {
- di->world_rect.xmin= di->screen_rect.xmin;
- di->world_rect.ymin= di->screen_rect.ymin;
- di->world_rect.xmax= di->screen_rect.xmax;
- di->world_rect.ymax= di->screen_rect.ymax;
+ }
+ else {
+ di->world_rect.xmin = di->screen_rect.xmin;
+ di->world_rect.ymin = di->screen_rect.ymin;
+ di->world_rect.xmax = di->screen_rect.xmax;
+ di->world_rect.ymax = di->screen_rect.ymax;
}
sc_w= (di->screen_rect.xmax-di->screen_rect.xmin);
@@ -765,13 +768,13 @@ void bglBegin(int mode)
{
curmode= mode;
- if(mode==GL_POINTS) {
+ if (mode==GL_POINTS) {
float value[4];
glGetFloatv(GL_POINT_SIZE_RANGE, value);
- if(value[1] < 2.0f) {
+ if (value[1] < 2.0f) {
glGetFloatv(GL_POINT_SIZE, value);
pointhack= floor(value[0] + 0.5f);
- if(pointhack>4) pointhack= 4;
+ if (pointhack>4) pointhack= 4;
}
else glBegin(mode);
}
@@ -782,10 +785,10 @@ int bglPointHack(void)
float value[4];
int pointhack_px;
glGetFloatv(GL_POINT_SIZE_RANGE, value);
- if(value[1] < 2.0f) {
+ if (value[1] < 2.0f) {
glGetFloatv(GL_POINT_SIZE, value);
pointhack_px= floorf(value[0]+0.5f);
- if(pointhack_px>4) pointhack_px= 4;
+ if (pointhack_px>4) pointhack_px= 4;
return pointhack_px;
}
return 0;
@@ -795,7 +798,7 @@ void bglVertex3fv(const float vec[3])
{
switch(curmode) {
case GL_POINTS:
- if(pointhack) {
+ if (pointhack) {
glRasterPos3fv(vec);
glBitmap(pointhack, pointhack, (float)pointhack/2.0f, (float)pointhack/2.0f, 0.0, 0.0, Squaredot);
}
@@ -808,7 +811,7 @@ void bglVertex3f(float x, float y, float z)
{
switch(curmode) {
case GL_POINTS:
- if(pointhack) {
+ if (pointhack) {
glRasterPos3f(x, y, z);
glBitmap(pointhack, pointhack, (float)pointhack/2.0f, (float)pointhack/2.0f, 0.0, 0.0, Squaredot);
}
@@ -821,7 +824,7 @@ void bglVertex2fv(const float vec[2])
{
switch(curmode) {
case GL_POINTS:
- if(pointhack) {
+ if (pointhack) {
glRasterPos2fv(vec);
glBitmap(pointhack, pointhack, (float)pointhack/2, pointhack/2, 0.0, 0.0, Squaredot);
}
@@ -833,7 +836,7 @@ void bglVertex2fv(const float vec[2])
void bglEnd(void)
{
- if(pointhack) pointhack= 0;
+ if (pointhack) pointhack= 0;
else glEnd();
}
@@ -849,10 +852,10 @@ void bgl_get_mats(bglMats *mats)
/* Very strange code here - it seems that certain bad values in the
* modelview matrix can cause gluUnProject to give bad results. */
- if(mats->modelview[0] < badvalue &&
+ if (mats->modelview[0] < badvalue &&
mats->modelview[0] > -badvalue)
mats->modelview[0]= 0;
- if(mats->modelview[5] < badvalue &&
+ if (mats->modelview[5] < badvalue &&
mats->modelview[5] > -badvalue)
mats->modelview[5]= 0;
@@ -868,7 +871,7 @@ void bglPolygonOffset(float viewdist, float dist)
{
static float winmat[16], offset=0.0;
- if(dist != 0.0f) {
+ if (dist != 0.0f) {
float offs;
// glEnable(GL_POLYGON_OFFSET_FILL);
@@ -880,7 +883,7 @@ void bglPolygonOffset(float viewdist, float dist)
/* dist is from camera to center point */
- if(winmat[15]>0.5f) offs= 0.00001f*dist*viewdist; // ortho tweaking
+ if (winmat[15]>0.5f) offs= 0.00001f*dist*viewdist; // ortho tweaking
else offs= 0.0005f*dist; // should be clipping value or so...
winmat[14]-= offs;
@@ -903,7 +906,7 @@ void bglFlush(void)
{
glFlush();
#ifdef __APPLE__
-// if(GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_MAC, GPU_DRIVER_OFFICIAL))
+// if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_MAC, GPU_DRIVER_OFFICIAL))
// XXX myswapbuffers(); //hack to get mac intel graphics to show frontbuffer
#endif
}
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index 9e2a2f54e0b..9e044068468 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -87,20 +87,20 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
base= BASACT;
#endif
- if(CTX_data_dir(member)) {
+ if (CTX_data_dir(member)) {
CTX_data_dir_set(result, screen_context_dir);
return 1;
}
- else if(CTX_data_equals(member, "scene")) {
+ else if (CTX_data_equals(member, "scene")) {
CTX_data_id_pointer_set(result, &scene->id);
return 1;
}
- else if(CTX_data_equals(member, "visible_objects") || CTX_data_equals(member, "visible_bases")) {
+ else if (CTX_data_equals(member, "visible_objects") || CTX_data_equals(member, "visible_bases")) {
int visible_objects= CTX_data_equals(member, "visible_objects");
- for(base=scene->base.first; base; base=base->next) {
- if(((base->object->restrictflag & OB_RESTRICT_VIEW) == 0) && (base->lay & scene->lay)) {
- if(visible_objects)
+ for (base=scene->base.first; base; base=base->next) {
+ if (((base->object->restrictflag & OB_RESTRICT_VIEW) == 0) && (base->lay & scene->lay)) {
+ if (visible_objects)
CTX_data_id_list_add(result, &base->object->id);
else
CTX_data_list_add(result, &scene->id, &RNA_ObjectBase, base);
@@ -109,13 +109,13 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
return 1;
}
- else if(CTX_data_equals(member, "selectable_objects") || CTX_data_equals(member, "selectable_bases")) {
+ else if (CTX_data_equals(member, "selectable_objects") || CTX_data_equals(member, "selectable_bases")) {
int selectable_objects= CTX_data_equals(member, "selectable_objects");
- for(base=scene->base.first; base; base=base->next) {
- if(base->lay & lay) {
- if((base->object->restrictflag & OB_RESTRICT_VIEW)==0 && (base->object->restrictflag & OB_RESTRICT_SELECT)==0) {
- if(selectable_objects)
+ for (base=scene->base.first; base; base=base->next) {
+ if (base->lay & lay) {
+ if ((base->object->restrictflag & OB_RESTRICT_VIEW)==0 && (base->object->restrictflag & OB_RESTRICT_SELECT)==0) {
+ if (selectable_objects)
CTX_data_id_list_add(result, &base->object->id);
else
CTX_data_list_add(result, &scene->id, &RNA_ObjectBase, base);
@@ -125,12 +125,12 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
return 1;
}
- else if(CTX_data_equals(member, "selected_objects") || CTX_data_equals(member, "selected_bases")) {
+ else if (CTX_data_equals(member, "selected_objects") || CTX_data_equals(member, "selected_bases")) {
int selected_objects= CTX_data_equals(member, "selected_objects");
- for(base=scene->base.first; base; base=base->next) {
- if((base->flag & SELECT) && (base->lay & scene->lay)) {
- if(selected_objects)
+ for (base=scene->base.first; base; base=base->next) {
+ if ((base->flag & SELECT) && (base->lay & scene->lay)) {
+ if (selected_objects)
CTX_data_id_list_add(result, &base->object->id);
else
CTX_data_list_add(result, &scene->id, &RNA_ObjectBase, base);
@@ -139,14 +139,14 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
return 1;
}
- else if(CTX_data_equals(member, "selected_editable_objects") || CTX_data_equals(member, "selected_editable_bases")) {
+ else if (CTX_data_equals(member, "selected_editable_objects") || CTX_data_equals(member, "selected_editable_bases")) {
int selected_editable_objects= CTX_data_equals(member, "selected_editable_objects");
- for(base=scene->base.first; base; base=base->next) {
- if((base->flag & SELECT) && (base->lay & scene->lay)) {
- if((base->object->restrictflag & OB_RESTRICT_VIEW)==0) {
- if(0==object_is_libdata(base->object)) {
- if(selected_editable_objects)
+ for (base=scene->base.first; base; base=base->next) {
+ if ((base->flag & SELECT) && (base->lay & scene->lay)) {
+ if ((base->object->restrictflag & OB_RESTRICT_VIEW)==0) {
+ if (0==object_is_libdata(base->object)) {
+ if (selected_editable_objects)
CTX_data_id_list_add(result, &base->object->id);
else
CTX_data_list_add(result, &scene->id, &RNA_ObjectBase, base);
@@ -157,7 +157,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
return 1;
}
- else if(CTX_data_equals(member, "visible_bones") || CTX_data_equals(member, "editable_bones")) {
+ else if (CTX_data_equals(member, "visible_bones") || CTX_data_equals(member, "editable_bones")) {
bArmature *arm= (obedit && obedit->type == OB_ARMATURE) ? obedit->data : NULL;
EditBone *ebone, *flipbone=NULL;
int editable_bones= CTX_data_equals(member, "editable_bones");
@@ -199,7 +199,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
}
- else if(CTX_data_equals(member, "selected_bones") || CTX_data_equals(member, "selected_editable_bones")) {
+ else if (CTX_data_equals(member, "selected_bones") || CTX_data_equals(member, "selected_editable_bones")) {
bArmature *arm= (obedit && obedit->type == OB_ARMATURE) ? obedit->data : NULL;
EditBone *ebone, *flipbone=NULL;
int selected_editable_bones= CTX_data_equals(member, "selected_editable_bones");
@@ -241,7 +241,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
}
- else if(CTX_data_equals(member, "visible_pose_bones")) {
+ else if (CTX_data_equals(member, "visible_pose_bones")) {
Object *obpose= object_pose_armature_get(obact);
bArmature *arm= (obpose) ? obpose->data : NULL;
bPoseChannel *pchan;
@@ -257,7 +257,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
}
- else if(CTX_data_equals(member, "selected_pose_bones")) {
+ else if (CTX_data_equals(member, "selected_pose_bones")) {
Object *obpose= object_pose_armature_get(obact);
bArmature *arm= (obpose) ? obpose->data : NULL;
bPoseChannel *pchan;
@@ -274,24 +274,24 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
}
- else if(CTX_data_equals(member, "active_bone")) {
- if(obact && obact->type == OB_ARMATURE) {
+ else if (CTX_data_equals(member, "active_bone")) {
+ if (obact && obact->type == OB_ARMATURE) {
bArmature *arm= obact->data;
- if(arm->edbo) {
- if(arm->act_edbone) {
+ if (arm->edbo) {
+ if (arm->act_edbone) {
CTX_data_pointer_set(result, &arm->id, &RNA_EditBone, arm->act_edbone);
return 1;
}
}
else {
- if(arm->act_bone) {
+ if (arm->act_bone) {
CTX_data_pointer_set(result, &arm->id, &RNA_Bone, arm->act_bone);
return 1;
}
}
}
}
- else if(CTX_data_equals(member, "active_pose_bone")) {
+ else if (CTX_data_equals(member, "active_pose_bone")) {
bPoseChannel *pchan;
Object *obpose= object_pose_armature_get(obact);
@@ -301,64 +301,64 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
}
- else if(CTX_data_equals(member, "active_base")) {
- if(base)
+ else if (CTX_data_equals(member, "active_base")) {
+ if (base)
CTX_data_pointer_set(result, &scene->id, &RNA_ObjectBase, base);
return 1;
}
- else if(CTX_data_equals(member, "active_object")) {
- if(obact)
+ else if (CTX_data_equals(member, "active_object")) {
+ if (obact)
CTX_data_id_pointer_set(result, &obact->id);
return 1;
}
- else if(CTX_data_equals(member, "object")) {
- if(obact)
+ else if (CTX_data_equals(member, "object")) {
+ if (obact)
CTX_data_id_pointer_set(result, &obact->id);
return 1;
}
- else if(CTX_data_equals(member, "edit_object")) {
+ else if (CTX_data_equals(member, "edit_object")) {
/* convenience for now, 1 object per scene in editmode */
- if(obedit)
+ if (obedit)
CTX_data_id_pointer_set(result, &obedit->id);
return 1;
}
- else if(CTX_data_equals(member, "sculpt_object")) {
- if(obact && (obact->mode & OB_MODE_SCULPT))
+ else if (CTX_data_equals(member, "sculpt_object")) {
+ if (obact && (obact->mode & OB_MODE_SCULPT))
CTX_data_id_pointer_set(result, &obact->id);
return 1;
}
- else if(CTX_data_equals(member, "vertex_paint_object")) {
- if(obact && (obact->mode & OB_MODE_VERTEX_PAINT))
+ else if (CTX_data_equals(member, "vertex_paint_object")) {
+ if (obact && (obact->mode & OB_MODE_VERTEX_PAINT))
CTX_data_id_pointer_set(result, &obact->id);
return 1;
}
- else if(CTX_data_equals(member, "weight_paint_object")) {
- if(obact && (obact->mode & OB_MODE_WEIGHT_PAINT))
+ else if (CTX_data_equals(member, "weight_paint_object")) {
+ if (obact && (obact->mode & OB_MODE_WEIGHT_PAINT))
CTX_data_id_pointer_set(result, &obact->id);
return 1;
}
- else if(CTX_data_equals(member, "image_paint_object")) {
- if(obact && (obact->mode & OB_MODE_TEXTURE_PAINT))
+ else if (CTX_data_equals(member, "image_paint_object")) {
+ if (obact && (obact->mode & OB_MODE_TEXTURE_PAINT))
CTX_data_id_pointer_set(result, &obact->id);
return 1;
}
- else if(CTX_data_equals(member, "particle_edit_object")) {
- if(obact && (obact->mode & OB_MODE_PARTICLE_EDIT))
+ else if (CTX_data_equals(member, "particle_edit_object")) {
+ if (obact && (obact->mode & OB_MODE_PARTICLE_EDIT))
CTX_data_id_pointer_set(result, &obact->id);
return 1;
}
- else if(CTX_data_equals(member, "sequences")) {
+ else if (CTX_data_equals(member, "sequences")) {
Editing *ed= seq_give_editing(scene, FALSE);
- if(ed) {
+ if (ed) {
Sequence *seq;
for (seq= ed->seqbasep->first; seq; seq= seq->next) {
CTX_data_list_add(result, &scene->id, &RNA_Sequence, seq);
@@ -367,9 +367,9 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
}
- else if(CTX_data_equals(member, "selected_sequences")) {
+ else if (CTX_data_equals(member, "selected_sequences")) {
Editing *ed= seq_give_editing(scene, FALSE);
- if(ed) {
+ if (ed) {
Sequence *seq;
for (seq= ed->seqbasep->first; seq; seq= seq->next) {
if (seq->flag & SELECT) {
@@ -380,9 +380,9 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
}
- else if(CTX_data_equals(member, "selected_editable_sequences")) {
+ else if (CTX_data_equals(member, "selected_editable_sequences")) {
Editing *ed= seq_give_editing(scene, FALSE);
- if(ed) {
+ if (ed) {
Sequence *seq;
for (seq= ed->seqbasep->first; seq; seq= seq->next) {
if (seq->flag & SELECT && !(seq->flag & SEQ_LOCK)) {
@@ -393,11 +393,11 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
}
- else if(CTX_data_equals(member, "active_operator")) {
+ else if (CTX_data_equals(member, "active_operator")) {
wmOperator *op= NULL;
SpaceFile *sfile= CTX_wm_space_file(C);
- if(sfile) {
+ if (sfile) {
op= sfile->op;
}
else if ((op= uiContextActiveOperator(C))) {
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 6288f39367e..9deb64ef60a 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -111,7 +111,7 @@ ScrEdge *screen_findedge(bScreen *sc, ScrVert *v1, ScrVert *v2)
sortscrvert(&v1, &v2);
for (se= sc->edgebase.first; se; se= se->next)
- if(se->v1==v1 && se->v2==v2)
+ if (se->v1==v1 && se->v2==v2)
return se;
return NULL;
@@ -124,12 +124,12 @@ void removedouble_scrverts(bScreen *sc)
ScrArea *sa;
verg= sc->vertbase.first;
- while(verg) {
- if(verg->newv==NULL) { /* !!! */
+ while (verg) {
+ if (verg->newv==NULL) { /* !!! */
v1= verg->next;
- while(v1) {
- if(v1->newv==NULL) { /* !?! */
- if(v1->vec.x==verg->vec.x && v1->vec.y==verg->vec.y) {
+ while (v1) {
+ if (v1->newv==NULL) { /* !?! */
+ if (v1->vec.x==verg->vec.x && v1->vec.y==verg->vec.y) {
/* printf("doublevert\n"); */
v1->newv= verg;
}
@@ -142,27 +142,27 @@ void removedouble_scrverts(bScreen *sc)
/* replace pointers in edges and faces */
se= sc->edgebase.first;
- while(se) {
- if(se->v1->newv) se->v1= se->v1->newv;
- if(se->v2->newv) se->v2= se->v2->newv;
+ while (se) {
+ if (se->v1->newv) se->v1= se->v1->newv;
+ if (se->v2->newv) se->v2= se->v2->newv;
/* edges changed: so.... */
sortscrvert(&(se->v1), &(se->v2));
se= se->next;
}
sa= sc->areabase.first;
- while(sa) {
- if(sa->v1->newv) sa->v1= sa->v1->newv;
- if(sa->v2->newv) sa->v2= sa->v2->newv;
- if(sa->v3->newv) sa->v3= sa->v3->newv;
- if(sa->v4->newv) sa->v4= sa->v4->newv;
+ while (sa) {
+ if (sa->v1->newv) sa->v1= sa->v1->newv;
+ if (sa->v2->newv) sa->v2= sa->v2->newv;
+ if (sa->v3->newv) sa->v3= sa->v3->newv;
+ if (sa->v4->newv) sa->v4= sa->v4->newv;
sa= sa->next;
}
/* remove */
verg= sc->vertbase.first;
- while(verg) {
+ while (verg) {
v1= verg->next;
- if(verg->newv) {
+ if (verg->newv) {
BLI_remlink(&sc->vertbase, verg);
MEM_freeN(verg);
}
@@ -179,16 +179,16 @@ void removenotused_scrverts(bScreen *sc)
/* we assume edges are ok */
se= sc->edgebase.first;
- while(se) {
+ while (se) {
se->v1->flag= 1;
se->v2->flag= 1;
se= se->next;
}
sv= sc->vertbase.first;
- while(sv) {
+ while (sv) {
svn= sv->next;
- if(sv->flag==0) {
+ if (sv->flag==0) {
BLI_remlink(&sc->vertbase, sv);
MEM_freeN(sv);
}
@@ -203,11 +203,11 @@ void removedouble_scredges(bScreen *sc)
/* compare */
verg= sc->edgebase.first;
- while(verg) {
+ while (verg) {
se= verg->next;
- while(se) {
+ while (se) {
sn= se->next;
- if(verg->v1==se->v1 && verg->v2==se->v2) {
+ if (verg->v1==se->v1 && verg->v2==se->v2) {
BLI_remlink(&sc->edgebase, se);
MEM_freeN(se);
}
@@ -225,26 +225,26 @@ void removenotused_scredges(bScreen *sc)
/* sets flags when edge is used in area */
sa= sc->areabase.first;
- while(sa) {
+ while (sa) {
se= screen_findedge(sc, sa->v1, sa->v2);
- if(se==NULL) printf("error: area %d edge 1 doesn't exist\n", a);
+ if (se==NULL) printf("error: area %d edge 1 doesn't exist\n", a);
else se->flag= 1;
se= screen_findedge(sc, sa->v2, sa->v3);
- if(se==NULL) printf("error: area %d edge 2 doesn't exist\n", a);
+ if (se==NULL) printf("error: area %d edge 2 doesn't exist\n", a);
else se->flag= 1;
se= screen_findedge(sc, sa->v3, sa->v4);
- if(se==NULL) printf("error: area %d edge 3 doesn't exist\n", a);
+ if (se==NULL) printf("error: area %d edge 3 doesn't exist\n", a);
else se->flag= 1;
se= screen_findedge(sc, sa->v4, sa->v1);
- if(se==NULL) printf("error: area %d edge 4 doesn't exist\n", a);
+ if (se==NULL) printf("error: area %d edge 4 doesn't exist\n", a);
else se->flag= 1;
sa= sa->next;
a++;
}
se= sc->edgebase.first;
- while(se) {
+ while (se) {
sen= se->next;
- if(se->flag==0) {
+ if (se->flag==0) {
BLI_remlink(&sc->edgebase, se);
MEM_freeN(se);
}
@@ -320,18 +320,18 @@ static short testsplitpoint(ScrArea *sa, char dir, float fac)
short x, y;
// area big enough?
- if(dir=='v' && (sa->v4->vec.x- sa->v1->vec.x <= 2*AREAMINX)) return 0;
- if(dir=='h' && (sa->v2->vec.y- sa->v1->vec.y <= 2*AREAMINY)) return 0;
+ if (dir=='v' && (sa->v4->vec.x- sa->v1->vec.x <= 2*AREAMINX)) return 0;
+ if (dir=='h' && (sa->v2->vec.y- sa->v1->vec.y <= 2*AREAMINY)) return 0;
// to be sure
CLAMP(fac, 0.0f, 1.0f);
- if(dir=='h') {
+ if (dir=='h') {
y= sa->v1->vec.y+ fac*(sa->v2->vec.y- sa->v1->vec.y);
- if(y- sa->v1->vec.y < AREAMINY)
+ if (y- sa->v1->vec.y < AREAMINY)
y= sa->v1->vec.y+ AREAMINY;
- else if(sa->v2->vec.y- y < AREAMINY)
+ else if (sa->v2->vec.y- y < AREAMINY)
y= sa->v2->vec.y- AREAMINY;
else y-= (y % AREAGRID);
@@ -340,9 +340,9 @@ static short testsplitpoint(ScrArea *sa, char dir, float fac)
else {
x= sa->v1->vec.x+ fac*(sa->v4->vec.x- sa->v1->vec.x);
- if(x- sa->v1->vec.x < AREAMINX)
+ if (x- sa->v1->vec.x < AREAMINX)
x= sa->v1->vec.x+ AREAMINX;
- else if(sa->v4->vec.x- x < AREAMINX)
+ else if (sa->v4->vec.x- x < AREAMINX)
x= sa->v4->vec.x- AREAMINX;
else x-= (x % AREAGRID);
@@ -356,12 +356,12 @@ ScrArea *area_split(bScreen *sc, ScrArea *sa, char dir, float fac, int merge)
ScrVert *sv1, *sv2;
short split;
- if(sa==NULL) return NULL;
+ if (sa==NULL) return NULL;
split= testsplitpoint(sa, dir, fac);
- if(split==0) return NULL;
+ if (split==0) return NULL;
- if(dir=='h') {
+ if (dir=='h') {
/* new vertices */
sv1= screen_addvert(sc, sa->v1->vec.x, split);
sv2= screen_addvert(sc, sa->v4->vec.x, split);
@@ -404,7 +404,7 @@ ScrArea *area_split(bScreen *sc, ScrArea *sa, char dir, float fac, int merge)
}
/* remove double vertices en edges */
- if(merge)
+ if (merge)
removedouble_scrverts(sc);
removedouble_scredges(sc);
removenotused_scredges(sc);
@@ -456,18 +456,18 @@ static void screen_copy(bScreen *to, bScreen *from)
to->regionbase.first= to->regionbase.last= NULL;
s2= to->vertbase.first;
- for(s1= from->vertbase.first; s1; s1= s1->next, s2= s2->next) {
+ for (s1= from->vertbase.first; s1; s1= s1->next, s2= s2->next) {
s1->newv= s2;
}
- for(se= to->edgebase.first; se; se= se->next) {
+ for (se= to->edgebase.first; se; se= se->next) {
se->v1= se->v1->newv;
se->v2= se->v2->newv;
sortscrvert(&(se->v1), &(se->v2));
}
saf= from->areabase.first;
- for(sa= to->areabase.first; sa; sa= sa->next, saf= saf->next) {
+ for (sa= to->areabase.first; sa; sa= sa->next, saf= saf->next) {
sa->v1= sa->v1->newv;
sa->v2= sa->v2->newv;
sa->v3= sa->v3->newv;
@@ -482,7 +482,7 @@ static void screen_copy(bScreen *to, bScreen *from)
}
/* put at zero (needed?) */
- for(s1= from->vertbase.first; s1; s1= s1->next)
+ for (s1= from->vertbase.first; s1; s1= s1->next)
s1->newv= NULL;
}
@@ -496,7 +496,7 @@ int area_getorientation(ScrArea *sa, ScrArea *sb)
ScrVert *sav1, *sav2, *sav3, *sav4;
ScrVert *sbv1, *sbv2, *sbv3, *sbv4;
- if(sa==NULL || sb==NULL) return -1;
+ if (sa==NULL || sb==NULL) return -1;
sav1= sa->v1;
sav2= sa->v2;
@@ -507,16 +507,16 @@ int area_getorientation(ScrArea *sa, ScrArea *sb)
sbv3= sb->v3;
sbv4= sb->v4;
- if(sav1==sbv4 && sav2==sbv3) { /* sa to right of sb = W */
+ if (sav1==sbv4 && sav2==sbv3) { /* sa to right of sb = W */
return 0;
}
- else if(sav2==sbv1 && sav3==sbv4) { /* sa to bottom of sb = N */
+ else if (sav2==sbv1 && sav3==sbv4) { /* sa to bottom of sb = N */
return 1;
}
- else if(sav3==sbv2 && sav4==sbv1) { /* sa to left of sb = E */
+ else if (sav3==sbv2 && sav4==sbv1) { /* sa to left of sb = E */
return 2;
}
- else if(sav1==sbv2 && sav4==sbv3) { /* sa on top of sb = S*/
+ else if (sav1==sbv2 && sav4==sbv3) { /* sa on top of sb = S*/
return 3;
}
@@ -539,25 +539,25 @@ int screen_area_join(bContext *C, bScreen* scr, ScrArea *sa1, ScrArea *sa2)
return 0;
}
- if(dir == 0) {
+ if (dir == 0) {
sa1->v1= sa2->v1;
sa1->v2= sa2->v2;
screen_addedge(scr, sa1->v2, sa1->v3);
screen_addedge(scr, sa1->v1, sa1->v4);
}
- else if(dir == 1) {
+ else if (dir == 1) {
sa1->v2= sa2->v2;
sa1->v3= sa2->v3;
screen_addedge(scr, sa1->v1, sa1->v2);
screen_addedge(scr, sa1->v3, sa1->v4);
}
- else if(dir == 2) {
+ else if (dir == 2) {
sa1->v3= sa2->v3;
sa1->v4= sa2->v4;
screen_addedge(scr, sa1->v2, sa1->v3);
screen_addedge(scr, sa1->v1, sa1->v4);
}
- else if(dir == 3) {
+ else if (dir == 3) {
sa1->v1= sa2->v1;
sa1->v4= sa2->v4;
screen_addedge(scr, sa1->v1, sa1->v2);
@@ -581,11 +581,11 @@ void select_connected_scredge(bScreen *sc, ScrEdge *edge)
/* select connected, only in the right direction */
/* 'dir' is the direction of EDGE */
- if(edge->v1->vec.x==edge->v2->vec.x) dir= 'v';
+ if (edge->v1->vec.x==edge->v2->vec.x) dir= 'v';
else dir= 'h';
sv= sc->vertbase.first;
- while(sv) {
+ while (sv) {
sv->flag = 0;
sv= sv->next;
}
@@ -594,16 +594,16 @@ void select_connected_scredge(bScreen *sc, ScrEdge *edge)
edge->v2->flag= 1;
oneselected= 1;
- while(oneselected) {
+ while (oneselected) {
se= sc->edgebase.first;
oneselected= 0;
- while(se) {
- if(se->v1->flag + se->v2->flag==1) {
- if(dir=='h') if(se->v1->vec.y==se->v2->vec.y) {
+ while (se) {
+ if (se->v1->flag + se->v2->flag==1) {
+ if (dir=='h') if (se->v1->vec.y==se->v2->vec.y) {
se->v1->flag= se->v2->flag= 1;
oneselected= 1;
}
- if(dir=='v') if(se->v1->vec.x==se->v2->vec.x) {
+ if (dir=='v') if (se->v1->vec.x==se->v2->vec.x) {
se->v1->flag= se->v2->flag= 1;
oneselected= 1;
}
@@ -625,7 +625,7 @@ static void screen_test_scale(bScreen *sc, int winsizex, int winsizey)
min[0]= min[1]= 10000.0f;
max[0]= max[1]= 0.0f;
- for(sv= sc->vertbase.first; sv; sv= sv->next) {
+ for (sv= sc->vertbase.first; sv; sv= sv->next) {
min[0]= MIN2(min[0], sv->vec.x);
min[1]= MIN2(min[1], sv->vec.y);
max[0]= MAX2(max[0], sv->vec.x);
@@ -633,7 +633,7 @@ static void screen_test_scale(bScreen *sc, int winsizex, int winsizey)
}
/* always make 0.0 left under */
- for(sv= sc->vertbase.first; sv; sv= sv->next) {
+ for (sv= sc->vertbase.first; sv; sv= sv->next) {
sv->vec.x -= min[0];
sv->vec.y -= min[1];
}
@@ -641,14 +641,14 @@ static void screen_test_scale(bScreen *sc, int winsizex, int winsizey)
sizex= max[0]-min[0];
sizey= max[1]-min[1];
- if(sizex!= winsizex || sizey!= winsizey) {
+ if (sizex!= winsizex || sizey!= winsizey) {
facx= winsizex;
facx/= (float)sizex;
facy= winsizey;
facy/= (float)sizey;
/* make sure it fits! */
- for(sv= sc->vertbase.first; sv; sv= sv->next) {
+ for (sv= sc->vertbase.first; sv; sv= sv->next) {
/* FIXME, this re-sizing logic is no good when re-sizing the window + redrawing [#24428]
* need some way to store these as floats internally and re-apply from there. */
tempf= ((float)sv->vec.x)*facx;
@@ -671,13 +671,13 @@ static void screen_test_scale(bScreen *sc, int winsizex, int winsizey)
/* ton: removed option now, it needs Context... */
/* make each window at least ED_area_headersize() high */
- for(sa= sc->areabase.first; sa; sa= sa->next) {
+ for (sa= sc->areabase.first; sa; sa= sa->next) {
int headery= ED_area_headersize()+1;
- if(sa->v1->vec.y+headery > sa->v2->vec.y) {
+ if (sa->v1->vec.y+headery > sa->v2->vec.y) {
/* lower edge */
ScrEdge *se= screen_findedge(sc, sa->v4, sa->v1);
- if(se && sa->v1!=sa->v2 ) {
+ if (se && sa->v1!=sa->v2 ) {
int yval;
select_connected_scredge(sc, se);
@@ -685,10 +685,10 @@ static void screen_test_scale(bScreen *sc, int winsizex, int winsizey)
/* all selected vertices get the right offset */
yval= sa->v2->vec.y-headery;
sv= sc->vertbase.first;
- while(sv) {
+ while (sv) {
/* if is a collapsed area */
- if(sv!=sa->v2 && sv!=sa->v3) {
- if(sv->flag) sv->vec.y= yval;
+ if (sv!=sa->v2 && sv!=sa->v3) {
+ if (sv->flag) sv->vec.y= yval;
}
sv= sv->next;
}
@@ -714,7 +714,7 @@ static void draw_horizontal_join_shape(ScrArea *sa, char dir)
float width = sa->v3->vec.x - sa->v1->vec.x;
float height = sa->v3->vec.y - sa->v1->vec.y;
- if(height<width) {
+ if (height<width) {
h = height/8;
w = height/4;
}
@@ -753,10 +753,10 @@ static void draw_horizontal_join_shape(ScrArea *sa, char dir)
points[9].x = sa->v4->vec.x;
points[9].y = sa->v4->vec.y + height/2 + h;
- if(dir=='l') {
+ if (dir=='l') {
/* when direction is left, then we flip direction of arrow */
float cx = sa->v1->vec.x + width;
- for(i=0;i<10;i++) {
+ for (i=0;i<10;i++) {
points[i].x -= cx;
points[i].x = -points[i].x;
points[i].x += sa->v1->vec.x;
@@ -764,11 +764,11 @@ static void draw_horizontal_join_shape(ScrArea *sa, char dir)
}
glBegin(GL_POLYGON);
- for(i=0;i<5;i++)
+ for (i=0;i<5;i++)
glVertex2f(points[i].x, points[i].y);
glEnd();
glBegin(GL_POLYGON);
- for(i=4;i<8;i++)
+ for (i=4;i<8;i++)
glVertex2f(points[i].x, points[i].y);
glVertex2f(points[0].x, points[0].y);
glEnd();
@@ -786,7 +786,7 @@ static void draw_vertical_join_shape(ScrArea *sa, char dir)
float width = sa->v3->vec.x - sa->v1->vec.x;
float height = sa->v3->vec.y - sa->v1->vec.y;
- if(height<width) {
+ if (height<width) {
h = height/4;
w = height/8;
}
@@ -825,10 +825,10 @@ static void draw_vertical_join_shape(ScrArea *sa, char dir)
points[9].x = sa->v1->vec.x + width/2 + w;
points[9].y = sa->v1->vec.y;
- if(dir=='u') {
+ if (dir=='u') {
/* when direction is up, then we flip direction of arrow */
float cy = sa->v1->vec.y + height;
- for(i=0;i<10;i++) {
+ for (i=0;i<10;i++) {
points[i].y -= cy;
points[i].y = -points[i].y;
points[i].y += sa->v1->vec.y;
@@ -836,11 +836,11 @@ static void draw_vertical_join_shape(ScrArea *sa, char dir)
}
glBegin(GL_POLYGON);
- for(i=0;i<5;i++)
+ for (i=0;i<5;i++)
glVertex2f(points[i].x, points[i].y);
glEnd();
glBegin(GL_POLYGON);
- for(i=4;i<8;i++)
+ for (i=4;i<8;i++)
glVertex2f(points[i].x, points[i].y);
glVertex2f(points[0].x, points[0].y);
glEnd();
@@ -852,7 +852,7 @@ static void draw_vertical_join_shape(ScrArea *sa, char dir)
/* draw join shape due to direction of joining */
static void draw_join_shape(ScrArea *sa, char dir)
{
- if(dir=='u' || dir=='d')
+ if (dir=='u' || dir=='d')
draw_vertical_join_shape(sa, dir);
else
draw_horizontal_join_shape(sa, dir);
@@ -883,19 +883,19 @@ static void scrarea_draw_shape_light(ScrArea *sa, char UNUSED(dir))
static void drawscredge_area_draw(int sizex, int sizey, short x1, short y1, short x2, short y2, short a)
{
/* right border area */
- if(x2<sizex-1)
+ if (x2<sizex-1)
sdrawline(x2+a, y1, x2+a, y2);
/* left border area */
- if(x1>0) /* otherwise it draws the emboss of window over */
+ if (x1>0) /* otherwise it draws the emboss of window over */
sdrawline(x1+a, y1, x1+a, y2);
/* top border area */
- if(y2<sizey-1)
+ if (y2<sizey-1)
sdrawline(x1, y2+a, x2, y2+a);
/* bottom border area */
- if(y1>0)
+ if (y1>0)
sdrawline(x1, y1+a, x2, y1+a);
}
@@ -911,10 +911,10 @@ static void drawscredge_area(ScrArea *sa, int sizex, int sizey, int center)
rt= 0; // CLAMPIS(G.rt, 0, 16);
- if(center==0) {
+ if (center==0) {
cpack(0x505050);
- for(a=-rt; a<=rt; a++)
- if(a!=0)
+ for (a=-rt; a<=rt; a++)
+ if (a!=0)
drawscredge_area_draw(sizex, sizey, x1, y1, x2, y2, a);
}
else {
@@ -929,7 +929,7 @@ bScreen *ED_screen_duplicate(wmWindow *win, bScreen *sc)
{
bScreen *newsc;
- if(sc->full != SCREENNORMAL) return NULL; /* XXX handle this case! */
+ if (sc->full != SCREENNORMAL) return NULL; /* XXX handle this case! */
/* make new empty screen: */
newsc= ED_screen_add(win, sc->scene, sc->id.name+2);
@@ -944,11 +944,11 @@ static void region_cursor_set(wmWindow *win, int swinid)
{
ScrArea *sa= win->screen->areabase.first;
- for(;sa; sa= sa->next) {
+ for (;sa; sa= sa->next) {
ARegion *ar= sa->regionbase.first;
- for(;ar; ar= ar->next) {
- if(ar->swinid == swinid) {
- if(ar->type && ar->type->cursor)
+ for (;ar; ar= ar->next) {
+ if (ar->swinid == swinid) {
+ if (ar->type && ar->type->cursor)
ar->type->cursor(win, sa, ar);
else
WM_cursor_set(win, CURSOR_STD);
@@ -965,20 +965,20 @@ void ED_screen_do_listen(bContext *C, wmNotifier *note)
/* generic notes */
switch(note->category) {
case NC_WM:
- if(note->data==ND_FILEREAD)
+ if (note->data==ND_FILEREAD)
win->screen->do_draw= 1;
break;
case NC_WINDOW:
win->screen->do_draw= 1;
break;
case NC_SCREEN:
- if(note->data==ND_SUBWINACTIVE)
+ if (note->data==ND_SUBWINACTIVE)
uiFreeActiveButtons(C, win->screen);
- if(note->action==NA_EDITED)
+ if (note->action==NA_EDITED)
win->screen->do_draw= win->screen->do_refresh= 1;
break;
case NC_SCENE:
- if(note->data==ND_MODE)
+ if (note->data==ND_MODE)
region_cursor_set(win, note->swinid);
break;
}
@@ -996,13 +996,13 @@ void ED_screen_draw(wmWindow *win)
wmSubWindowSet(win, win->screen->mainwin);
- for(sa= win->screen->areabase.first; sa; sa= sa->next) {
+ for (sa= win->screen->areabase.first; sa; sa= sa->next) {
if (sa->flag & AREA_FLAG_DRAWJOINFROM) sa1 = sa;
if (sa->flag & AREA_FLAG_DRAWJOINTO) sa2 = sa;
if (sa->flag & (AREA_FLAG_DRAWSPLIT_H|AREA_FLAG_DRAWSPLIT_V)) sa3 = sa;
drawscredge_area(sa, win->sizex, win->sizey, 0);
}
- for(sa= win->screen->areabase.first; sa; sa= sa->next)
+ for (sa= win->screen->areabase.first; sa; sa= sa->next)
drawscredge_area(sa, win->sizex, win->sizey, 1);
/* blended join arrow */
@@ -1033,11 +1033,11 @@ void ED_screen_draw(wmWindow *win)
}
/* splitpoint */
- if(sa3) {
+ if (sa3) {
glEnable(GL_BLEND);
glColor4ub(255, 255, 255, 100);
- if(sa3->flag & AREA_FLAG_DRAWSPLIT_H) {
+ if (sa3->flag & AREA_FLAG_DRAWSPLIT_H) {
sdrawline(sa3->totrct.xmin, win->eventstate->y, sa3->totrct.xmax, win->eventstate->y);
glColor4ub(0, 0, 0, 100);
sdrawline(sa3->totrct.xmin, win->eventstate->y+1, sa3->totrct.xmax, win->eventstate->y+1);
@@ -1060,9 +1060,9 @@ static void screen_refresh_headersizes(void)
const ListBase *lb= BKE_spacetypes_list();
SpaceType *st;
- for(st= lb->first; st; st= st->next) {
+ for (st= lb->first; st; st= st->next) {
ARegionType *art= BKE_regiontype_from_id(st, RGN_TYPE_HEADER);
- if(art) art->prefsizey= ED_area_headersize();
+ if (art) art->prefsizey= ED_area_headersize();
}
}
@@ -1075,14 +1075,14 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
ScrArea *sa;
rcti winrct;
- winrct.xmin= 0;
- winrct.xmax= win->sizex-1;
- winrct.ymin= 0;
- winrct.ymax= win->sizey-1;
+ winrct.xmin = 0;
+ winrct.xmax = win->sizex-1;
+ winrct.ymin = 0;
+ winrct.ymax = win->sizey-1;
screen_test_scale(win->screen, win->sizex, win->sizey);
- if(win->screen->mainwin==0)
+ if (win->screen->mainwin==0)
win->screen->mainwin= wm_subwindow_open(win, &winrct);
else
wm_subwindow_position(win, win->screen->mainwin, &winrct);
@@ -1090,18 +1090,18 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
/* header size depends on DPI, let's verify */
screen_refresh_headersizes();
- for(sa= win->screen->areabase.first; sa; sa= sa->next) {
+ for (sa= win->screen->areabase.first; sa; sa= sa->next) {
/* set spacetype and region callbacks, calls init() */
/* sets subwindows for regions, adds handlers */
ED_area_initialize(wm, win, sa);
}
/* wake up animtimer */
- if(win->screen->animtimer)
+ if (win->screen->animtimer)
WM_event_timer_sleep(wm, win, win->screen->animtimer, 0);
}
- if(G.f & G_DEBUG) printf("set screen\n");
+ if (G.f & G_DEBUG) printf("set screen\n");
win->screen->do_refresh= 0;
win->screen->context= ed_screen_context;
@@ -1112,9 +1112,9 @@ void ED_screens_initialize(wmWindowManager *wm)
{
wmWindow *win;
- for(win= wm->windows.first; win; win= win->next) {
+ for (win= wm->windows.first; win; win= win->next) {
- if(win->screen==NULL)
+ if (win->screen==NULL)
win->screen= G.main->screen.first;
ED_screen_refresh(wm, win);
@@ -1130,11 +1130,11 @@ void ED_region_exit(bContext *C, ARegion *ar)
CTX_wm_region_set(C, ar);
WM_event_remove_handlers(C, &ar->handlers);
- if(ar->swinid)
+ if (ar->swinid)
wm_subwindow_close(CTX_wm_window(C), ar->swinid);
ar->swinid= 0;
- if(ar->headerstr)
+ if (ar->headerstr)
MEM_freeN(ar->headerstr);
ar->headerstr= NULL;
@@ -1148,13 +1148,13 @@ void ED_area_exit(bContext *C, ScrArea *sa)
if (sa->spacetype == SPACE_FILE) {
SpaceLink *sl= sa->spacedata.first;
- if(sl && sl->spacetype == SPACE_FILE) {
+ if (sl && sl->spacetype == SPACE_FILE) {
ED_fileselect_exit(C, (SpaceFile *)sl);
}
}
CTX_wm_area_set(C, sa);
- for(ar= sa->regionbase.first; ar; ar= ar->next)
+ for (ar= sa->regionbase.first; ar; ar= ar->next)
ED_region_exit(C, ar);
WM_event_remove_handlers(C, &sa->handlers);
@@ -1170,19 +1170,19 @@ void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen)
CTX_wm_window_set(C, window);
- if(screen->animtimer)
+ if (screen->animtimer)
WM_event_remove_timer(wm, window, screen->animtimer);
screen->animtimer= NULL;
- if(screen->mainwin)
+ if (screen->mainwin)
wm_subwindow_close(window, screen->mainwin);
screen->mainwin= 0;
screen->subwinactive= 0;
- for(ar= screen->regionbase.first; ar; ar= ar->next)
+ for (ar= screen->regionbase.first; ar; ar= ar->next)
ED_region_exit(C, ar);
- for(sa= screen->areabase.first; sa; sa= sa->next)
+ for (sa= screen->areabase.first; sa; sa= sa->next)
ED_area_exit(C, sa);
/* mark it available for use for other windows */
@@ -1191,7 +1191,8 @@ void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen)
if (prevwin->screen->temp == 0) {
/* use previous window if possible */
CTX_wm_window_set(C, prevwin);
- } else {
+ }
+ else {
/* none otherwise */
CTX_wm_window_set(C, NULL);
}
@@ -1206,15 +1207,15 @@ static void screen_cursor_set(wmWindow *win, wmEvent *event)
AZone *az= NULL;
ScrArea *sa;
- for(sa= win->screen->areabase.first; sa; sa= sa->next)
- if((az=is_in_area_actionzone(sa, event->x, event->y)))
+ for (sa= win->screen->areabase.first; sa; sa= sa->next)
+ if ((az=is_in_area_actionzone(sa, event->x, event->y)))
break;
- if(sa) {
- if(az->type==AZONE_AREA)
+ if (sa) {
+ if (az->type==AZONE_AREA)
WM_cursor_set(win, CURSOR_EDIT);
- else if(az->type==AZONE_REGION) {
- if(az->edge == AE_LEFT_TO_TOPRIGHT || az->edge == AE_RIGHT_TO_TOPLEFT)
+ else if (az->type==AZONE_REGION) {
+ if (az->edge == AE_LEFT_TO_TOPRIGHT || az->edge == AE_RIGHT_TO_TOPLEFT)
WM_cursor_set(win, CURSOR_X_MOVE);
else
WM_cursor_set(win, CURSOR_Y_MOVE);
@@ -1224,7 +1225,7 @@ static void screen_cursor_set(wmWindow *win, wmEvent *event)
ScrEdge *actedge= screen_find_active_scredge(win->screen, event->x, event->y);
if (actedge) {
- if(scredge_is_horizontal(actedge))
+ if (scredge_is_horizontal(actedge))
WM_cursor_set(win, CURSOR_Y_MOVE);
else
WM_cursor_set(win, CURSOR_X_MOVE);
@@ -1241,21 +1242,21 @@ void ED_screen_set_subwinactive(bContext *C, wmEvent *event)
{
wmWindow *win= CTX_wm_window(C);
- if(win->screen) {
+ if (win->screen) {
bScreen *scr= win->screen;
ScrArea *sa;
ARegion *ar;
int oldswin= scr->subwinactive;
- for(sa= scr->areabase.first; sa; sa= sa->next) {
- if(event->x > sa->totrct.xmin && event->x < sa->totrct.xmax)
- if(event->y > sa->totrct.ymin && event->y < sa->totrct.ymax)
- if(NULL==is_in_area_actionzone(sa, event->x, event->y))
+ for (sa= scr->areabase.first; sa; sa= sa->next) {
+ if (event->x > sa->totrct.xmin && event->x < sa->totrct.xmax)
+ if (event->y > sa->totrct.ymin && event->y < sa->totrct.ymax)
+ if (NULL==is_in_area_actionzone(sa, event->x, event->y))
break;
}
- if(sa) {
- for(ar= sa->regionbase.first; ar; ar= ar->next) {
- if(BLI_in_rcti(&ar->winrct, event->x, event->y))
+ if (sa) {
+ for (ar= sa->regionbase.first; ar; ar= ar->next) {
+ if (BLI_in_rcti(&ar->winrct, event->x, event->y))
scr->subwinactive= ar->swinid;
}
}
@@ -1263,28 +1264,28 @@ void ED_screen_set_subwinactive(bContext *C, wmEvent *event)
scr->subwinactive= scr->mainwin;
/* check for redraw headers */
- if(oldswin!=scr->subwinactive) {
+ if (oldswin!=scr->subwinactive) {
- for(sa= scr->areabase.first; sa; sa= sa->next) {
+ for (sa= scr->areabase.first; sa; sa= sa->next) {
int do_draw= 0;
- for(ar= sa->regionbase.first; ar; ar= ar->next)
- if(ar->swinid==oldswin || ar->swinid==scr->subwinactive)
+ for (ar= sa->regionbase.first; ar; ar= ar->next)
+ if (ar->swinid==oldswin || ar->swinid==scr->subwinactive)
do_draw= 1;
- if(do_draw) {
- for(ar= sa->regionbase.first; ar; ar= ar->next)
- if(ar->regiontype==RGN_TYPE_HEADER)
+ if (do_draw) {
+ for (ar= sa->regionbase.first; ar; ar= ar->next)
+ if (ar->regiontype==RGN_TYPE_HEADER)
ED_region_tag_redraw(ar);
}
}
}
/* cursors, for time being set always on edges, otherwise aregion doesnt switch */
- if(scr->subwinactive==scr->mainwin) {
+ if (scr->subwinactive==scr->mainwin) {
screen_cursor_set(win, event);
}
- else if(oldswin!=scr->subwinactive) {
+ else if (oldswin!=scr->subwinactive) {
region_cursor_set(win, scr->subwinactive);
WM_event_add_notifier(C, NC_SCREEN|ND_SUBWINACTIVE, scr);
}
@@ -1297,15 +1298,15 @@ int ED_screen_area_active(const bContext *C)
bScreen *sc= CTX_wm_screen(C);
ScrArea *sa= CTX_wm_area(C);
- if(win && sc && sa) {
+ if (win && sc && sa) {
AZone *az= is_in_area_actionzone(sa, win->eventstate->x, win->eventstate->y);
ARegion *ar;
if (az && az->type == AZONE_REGION)
return 1;
- for(ar= sa->regionbase.first; ar; ar= ar->next)
- if(ar->swinid == sc->subwinactive)
+ for (ar= sa->regionbase.first; ar; ar= ar->next)
+ if (ar->swinid == sc->subwinactive)
return 1;
}
return 0;
@@ -1321,21 +1322,21 @@ void ED_screen_set(bContext *C, bScreen *sc)
ID *id;
/* validate screen, it's called with notifier reference */
- for(id= CTX_data_main(C)->screen.first; id; id= id->next)
- if(sc == (bScreen *)id)
+ for (id= CTX_data_main(C)->screen.first; id; id= id->next)
+ if (sc == (bScreen *)id)
break;
- if(id==NULL)
+ if (id==NULL)
return;
/* check for valid winid */
- if(sc->winid!=0 && sc->winid!=win->winid)
+ if (sc->winid!=0 && sc->winid!=win->winid)
return;
- if(sc->full) { /* find associated full */
+ if (sc->full) { /* find associated full */
bScreen *sc1;
- for(sc1= CTX_data_main(C)->screen.first; sc1; sc1= sc1->id.next) {
+ for (sc1= CTX_data_main(C)->screen.first; sc1; sc1= sc1->id.next) {
ScrArea *sa= sc1->areabase.first;
- if(sa->full==sc) {
+ if (sa->full==sc) {
sc= sc1;
break;
}
@@ -1347,13 +1348,13 @@ void ED_screen_set(bContext *C, bScreen *sc)
ScrArea *sa;
/* remove handlers referencing areas in old screen */
- for(sa = oldscreen->areabase.first; sa; sa = sa->next) {
+ for (sa = oldscreen->areabase.first; sa; sa = sa->next) {
WM_event_remove_area_handler(&win->modalhandlers, sa);
}
/* we put timer to sleep, so screen_exit has to think there's no timer */
oldscreen->animtimer= NULL;
- if(wt)
+ if (wt)
WM_event_timer_sleep(wm, win, wt, 1);
ED_screen_exit(C, win, oldscreen);
@@ -1378,8 +1379,8 @@ static int ed_screen_used(wmWindowManager *wm, bScreen *sc)
{
wmWindow *win;
- for(win=wm->windows.first; win; win=win->next)
- if(win->screen == sc)
+ for (win=wm->windows.first; win; win=win->next)
+ if (win->screen == sc)
return 1;
return 0;
@@ -1404,22 +1405,22 @@ void ED_screen_delete(bContext *C, bScreen *sc)
* long as we are able to find a screen that is unused, we
* can safely assume ours is not in use anywhere an delete it */
- for(newsc= sc->id.prev; newsc; newsc=newsc->id.prev)
- if(!ed_screen_used(wm, newsc))
+ for (newsc= sc->id.prev; newsc; newsc=newsc->id.prev)
+ if (!ed_screen_used(wm, newsc))
break;
- if(!newsc) {
- for(newsc= sc->id.next; newsc; newsc=newsc->id.next)
- if(!ed_screen_used(wm, newsc))
+ if (!newsc) {
+ for (newsc= sc->id.next; newsc; newsc=newsc->id.next)
+ if (!ed_screen_used(wm, newsc))
break;
}
- if(!newsc)
+ if (!newsc)
return;
ED_screen_set(C, newsc);
- if(delete && win->screen != sc)
+ if (delete && win->screen != sc)
free_libblock(&bmain->screen, sc);
}
@@ -1429,19 +1430,19 @@ void ED_screen_set_scene(bContext *C, bScreen *screen, Scene *scene)
Main *bmain= CTX_data_main(C);
bScreen *sc;
- if(screen == NULL)
+ if (screen == NULL)
return;
- if(ed_screen_used(CTX_wm_manager(C), screen))
+ if (ed_screen_used(CTX_wm_manager(C), screen))
ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO);
- for(sc= CTX_data_main(C)->screen.first; sc; sc= sc->id.next) {
- if((U.flag & USER_SCENEGLOBAL) || sc==screen) {
+ for (sc= CTX_data_main(C)->screen.first; sc; sc= sc->id.next) {
+ if ((U.flag & USER_SCENEGLOBAL) || sc==screen) {
- if(scene != sc->scene) {
+ if (scene != sc->scene) {
/* all areas endlocalview */
// XXX ScrArea *sa= sc->areabase.first;
- // while(sa) {
+ // while (sa) {
// endlocalview(sa);
// sa= sa->next;
// }
@@ -1454,13 +1455,13 @@ void ED_screen_set_scene(bContext *C, bScreen *screen, Scene *scene)
// copy_view3d_lock(0); /* space.c */
/* are there cameras in the views that are not in the scene? */
- for(sc= CTX_data_main(C)->screen.first; sc; sc= sc->id.next) {
- if( (U.flag & USER_SCENEGLOBAL) || sc==screen) {
+ for (sc= CTX_data_main(C)->screen.first; sc; sc= sc->id.next) {
+ if ( (U.flag & USER_SCENEGLOBAL) || sc==screen) {
ScrArea *sa= sc->areabase.first;
- while(sa) {
+ while (sa) {
SpaceLink *sl= sa->spacedata.first;
- while(sl) {
- if(sl->spacetype==SPACE_VIEW3D) {
+ while (sl) {
+ if (sl->spacetype==SPACE_VIEW3D) {
View3D *v3d= (View3D*) sl;
BKE_screen_view3d_sync(v3d, scene);
@@ -1470,11 +1471,11 @@ void ED_screen_set_scene(bContext *C, bScreen *screen, Scene *scene)
// XXX if (sc==curscreen) handle_view3d_lock();
if (!v3d->camera) {
ARegion *ar;
- for(ar=v3d->regionbase.first; ar; ar= ar->next) {
- if(ar->regiontype == RGN_TYPE_WINDOW) {
+ for (ar=v3d->regionbase.first; ar; ar= ar->next) {
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
RegionView3D *rv3d= ar->regiondata;
- if(rv3d->persp==RV3D_CAMOB)
+ if (rv3d->persp==RV3D_CAMOB)
rv3d->persp= RV3D_PERSP;
}
}
@@ -1505,9 +1506,9 @@ void ED_screen_delete_scene(bContext *C, Scene *scene)
Main *bmain= CTX_data_main(C);
Scene *newscene;
- if(scene->id.prev)
+ if (scene->id.prev)
newscene= scene->id.prev;
- else if(scene->id.next)
+ else if (scene->id.next)
newscene= scene->id.next;
else
return;
@@ -1523,11 +1524,11 @@ ScrArea *ED_screen_full_newspace(bContext *C, ScrArea *sa, int type)
bScreen *screen= CTX_wm_screen(C);
ScrArea *newsa= NULL;
- if(!sa || sa->full==NULL) {
+ if (!sa || sa->full==NULL) {
newsa= ED_screen_full_toggle(C, win, sa);
}
- if(!newsa) {
+ if (!newsa) {
if (sa->full) {
/* if this has been called from the temporary info header generated in
* temp fullscreen layouts, find the correct fullscreen area to change
@@ -1536,8 +1537,10 @@ ScrArea *ED_screen_full_newspace(bContext *C, ScrArea *sa, int type)
if (!(sa->flag & AREA_TEMP_INFO))
break;
}
- } else
- newsa= sa;
+ }
+ else {
+ newsa = sa;
+ }
}
ED_area_newspace(C, newsa, type);
@@ -1551,7 +1554,7 @@ void ED_screen_full_prevspace(bContext *C, ScrArea *sa)
ED_area_prevspace(C, sa);
- if(sa->full)
+ if (sa->full)
ED_screen_full_toggle(C, win, sa);
}
@@ -1584,10 +1587,13 @@ void ED_screen_full_restore(bContext *C, ScrArea *sa)
sima->flag &= ~SI_FULLWINDOW;
ED_screen_full_prevspace(C, sa);
}
- } else if (sl->spacetype == SPACE_FILE) {
+ }
+ else if (sl->spacetype == SPACE_FILE) {
ED_screen_full_prevspace(C, sa);
- } else
+ }
+ else {
ED_screen_full_toggle(C, win, sa);
+ }
}
/* otherwise just tile the area again */
else {
@@ -1601,18 +1607,18 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa)
bScreen *sc, *oldscreen;
ARegion *ar;
- if(sa) {
+ if (sa) {
/* ensure we don't have a button active anymore, can crash when
* switching screens with tooltip open because region and tooltip
* are no longer in the same screen */
- for(ar=sa->regionbase.first; ar; ar=ar->next)
+ for (ar=sa->regionbase.first; ar; ar=ar->next)
uiFreeBlocks(C, &ar->uiblocks);
/* prevent hanging header prints */
ED_area_headerprint(sa, NULL);
}
- if(sa && sa->full) {
+ if (sa && sa->full) {
ScrArea *old;
/*short fulltype;*/ /*UNUSED*/
@@ -1625,9 +1631,9 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa)
/* removed: SCREENAUTOPLAY exception here */
/* find old area */
- for(old= sc->areabase.first; old; old= old->next)
- if(old->full) break;
- if(old==NULL) {
+ for (old= sc->areabase.first; old; old= old->next)
+ if (old->full) break;
+ if (old==NULL) {
if (G.f & G_DEBUG)
printf("something wrong in areafullscreen\n");
return NULL;
@@ -1656,7 +1662,7 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa)
/* nothing wrong with having only 1 area, as far as I can see...
* is there only 1 area? */
#if 0
- if(oldscreen->areabase.first==oldscreen->areabase.last)
+ if (oldscreen->areabase.first==oldscreen->areabase.last)
return NULL;
#endif
@@ -1675,7 +1681,7 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa)
/* use random area when we have no active one, e.g. when the
* mouse is outside of the window and we open a file browser */
- if(!sa)
+ if (!sa)
sa= oldscreen->areabase.first;
/* copy area */
@@ -1732,11 +1738,11 @@ void ED_screen_animation_timer(bContext *C, int redraws, int refresh, int sync,
wmWindow *win= CTX_wm_window(C);
Scene *scene= CTX_data_scene(C);
- if(screen->animtimer)
+ if (screen->animtimer)
WM_event_remove_timer(wm, win, screen->animtimer);
screen->animtimer= NULL;
- if(enable) {
+ if (enable) {
ScreenAnimData *sad= MEM_callocN(sizeof(ScreenAnimData), "ScreenAnimData");
screen->animtimer= WM_event_add_timer(wm, win, TIMER0, (1.0/FPS));
@@ -1744,7 +1750,7 @@ void ED_screen_animation_timer(bContext *C, int redraws, int refresh, int sync,
sad->ar= CTX_wm_region(C);
/* if startframe is larger than current frame, we put currentframe on startframe.
* note: first frame then is not drawn! (ton) */
- if(scene->r.sfra > scene->r.cfra) {
+ if (scene->r.sfra > scene->r.cfra) {
sad->sfra= scene->r.cfra;
scene->r.cfra= scene->r.sfra;
}
@@ -1769,12 +1775,12 @@ static ARegion *time_top_left_3dwindow(bScreen *screen)
ScrArea *sa;
int min= 10000;
- for(sa= screen->areabase.first; sa; sa= sa->next) {
- if(sa->spacetype==SPACE_VIEW3D) {
+ for (sa= screen->areabase.first; sa; sa= sa->next) {
+ if (sa->spacetype==SPACE_VIEW3D) {
ARegion *ar;
- for(ar= sa->regionbase.first; ar; ar= ar->next) {
- if(ar->regiontype==RGN_TYPE_WINDOW) {
- if(ar->winrct.xmin - ar->winrct.ymin < min) {
+ for (ar= sa->regionbase.first; ar; ar= ar->next) {
+ if (ar->regiontype==RGN_TYPE_WINDOW) {
+ if (ar->winrct.xmin - ar->winrct.ymin < min) {
aret= ar;
min= ar->winrct.xmin - ar->winrct.ymin;
}
@@ -1788,14 +1794,14 @@ static ARegion *time_top_left_3dwindow(bScreen *screen)
void ED_screen_animation_timer_update(bScreen *screen, int redraws, int refresh)
{
- if(screen && screen->animtimer) {
+ if (screen && screen->animtimer) {
wmTimer *wt= screen->animtimer;
ScreenAnimData *sad= wt->customdata;
sad->redraws= redraws;
sad->refresh= refresh;
sad->ar= NULL;
- if(redraws & TIME_REGION)
+ if (redraws & TIME_REGION)
sad->ar= time_top_left_3dwindow(screen);
}
}
@@ -1806,11 +1812,11 @@ void ED_update_for_newframe(Main *bmain, Scene *scene, bScreen *screen, int UNUS
{
#ifdef DURIAN_CAMERA_SWITCH
void *camera= scene_camera_switch_find(scene);
- if(camera && scene->camera != camera) {
+ if (camera && scene->camera != camera) {
bScreen *sc;
scene->camera= camera;
/* are there cameras in the views that are not in the scene? */
- for(sc= bmain->screen.first; sc; sc= sc->id.next) {
+ for (sc= bmain->screen.first; sc; sc= sc->id.next) {
BKE_screen_view3d_scene_sync(sc);
}
}
@@ -1819,7 +1825,7 @@ void ED_update_for_newframe(Main *bmain, Scene *scene, bScreen *screen, int UNUS
//extern void audiostream_scrub(unsigned int frame); /* seqaudio.c */
/* update animated image textures for gpu, etc,
- * call before scene_update_for_newframe so modifiers with textuers dont lag 1 frame */
+ * call before scene_update_for_newframe so modifiers with textuers don't lag 1 frame */
ED_image_update_frame(bmain, scene->r.cfra);
ED_clip_update_frame(bmain, scene->r.cfra);
@@ -1838,15 +1844,15 @@ void ED_update_for_newframe(Main *bmain, Scene *scene, bScreen *screen, int UNUS
//BIF_image_update_frame();
/* composite */
- if(scene->use_nodes && scene->nodetree)
+ if (scene->use_nodes && scene->nodetree)
ntreeCompositTagAnimated(scene->nodetree);
/* update animated texture nodes */
{
Tex *tex;
- for(tex= bmain->tex.first; tex; tex= tex->id.next)
- if( tex->use_nodes && tex->nodetree ) {
- ntreeTexTagAnimated( tex->nodetree );
+ for (tex= bmain->tex.first; tex; tex= tex->id.next)
+ if (tex->use_nodes && tex->nodetree) {
+ ntreeTexTagAnimated(tex->nodetree);
}
}
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index b1d718f08b5..d6a74cc19ce 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -89,42 +89,42 @@
int ED_operator_regionactive(bContext *C)
{
- if(CTX_wm_window(C)==NULL) return 0;
- if(CTX_wm_screen(C)==NULL) return 0;
- if(CTX_wm_region(C)==NULL) return 0;
+ if (CTX_wm_window(C)==NULL) return 0;
+ if (CTX_wm_screen(C)==NULL) return 0;
+ if (CTX_wm_region(C)==NULL) return 0;
return 1;
}
int ED_operator_areaactive(bContext *C)
{
- if(CTX_wm_window(C)==NULL) return 0;
- if(CTX_wm_screen(C)==NULL) return 0;
- if(CTX_wm_area(C)==NULL) return 0;
+ if (CTX_wm_window(C)==NULL) return 0;
+ if (CTX_wm_screen(C)==NULL) return 0;
+ if (CTX_wm_area(C)==NULL) return 0;
return 1;
}
int ED_operator_screenactive(bContext *C)
{
- if(CTX_wm_window(C)==NULL) return 0;
- if(CTX_wm_screen(C)==NULL) return 0;
+ if (CTX_wm_window(C)==NULL) return 0;
+ if (CTX_wm_screen(C)==NULL) return 0;
return 1;
}
/* XXX added this to prevent anim state to change during renders */
static int ED_operator_screenactive_norender(bContext *C)
{
- if(G.rendering) return 0;
- if(CTX_wm_window(C)==NULL) return 0;
- if(CTX_wm_screen(C)==NULL) return 0;
+ if (G.rendering) return 0;
+ if (CTX_wm_window(C)==NULL) return 0;
+ if (CTX_wm_screen(C)==NULL) return 0;
return 1;
}
static int screen_active_editable(bContext *C)
{
- if(ED_operator_screenactive(C)) {
+ if (ED_operator_screenactive(C)) {
/* no full window splitting allowed */
- if(CTX_wm_screen(C)->full != SCREENNORMAL)
+ if (CTX_wm_screen(C)->full != SCREENNORMAL)
return 0;
return 1;
}
@@ -134,8 +134,8 @@ static int screen_active_editable(bContext *C)
/* when mouse is over area-edge */
int ED_operator_screen_mainwinactive(bContext *C)
{
- if(CTX_wm_window(C)==NULL) return 0;
- if(CTX_wm_screen(C)==NULL) return 0;
+ if (CTX_wm_window(C)==NULL) return 0;
+ if (CTX_wm_screen(C)==NULL) return 0;
if (CTX_wm_screen(C)->subwinactive!=CTX_wm_screen(C)->mainwin) return 0;
return 1;
}
@@ -143,7 +143,7 @@ int ED_operator_screen_mainwinactive(bContext *C)
int ED_operator_scene_editable(bContext *C)
{
Scene *scene= CTX_data_scene(C);
- if(scene && scene->id.lib==NULL)
+ if (scene && scene->id.lib==NULL)
return 1;
return 0;
}
@@ -153,13 +153,13 @@ int ED_operator_objectmode(bContext *C)
Scene *scene= CTX_data_scene(C);
Object *obact= CTX_data_active_object(C);
- if(scene==NULL || scene->id.lib)
+ if (scene==NULL || scene->id.lib)
return 0;
- if( CTX_data_edit_object(C) )
+ if ( CTX_data_edit_object(C) )
return 0;
/* add a check for ob->mode too? */
- if(obact && obact->mode)
+ if (obact && obact->mode)
return 0;
return 1;
@@ -168,7 +168,7 @@ int ED_operator_objectmode(bContext *C)
static int ed_spacetype_test(bContext *C, int type)
{
- if(ED_operator_areaactive(C)) {
+ if (ED_operator_areaactive(C)) {
SpaceLink *sl= (SpaceLink *)CTX_wm_space_data(C);
return sl && (sl->spacetype == type);
}
@@ -182,7 +182,7 @@ int ED_operator_view3d_active(bContext *C)
int ED_operator_region_view3d_active(bContext *C)
{
- if(CTX_wm_region_view3d(C))
+ if (CTX_wm_region_view3d(C))
return TRUE;
CTX_wm_operator_poll_msg_set(C, "expected a view3d region");
@@ -192,7 +192,7 @@ int ED_operator_region_view3d_active(bContext *C)
/* generic for any view2d which uses anim_ops */
int ED_operator_animview_active(bContext *C)
{
- if(ED_operator_areaactive(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;
@@ -214,10 +214,10 @@ int ED_operator_outliner_active(bContext *C)
int ED_operator_outliner_active_no_editobject(bContext *C)
{
- if(ed_spacetype_test(C, SPACE_OUTLINER)) {
+ if (ed_spacetype_test(C, SPACE_OUTLINER)) {
Object *ob = ED_object_active_context(C);
Object *obedit= CTX_data_edit_object(C);
- if(ob && ob == obedit)
+ if (ob && ob == obedit)
return 0;
else
return 1;
@@ -244,7 +244,7 @@ int ED_operator_node_active(bContext *C)
{
SpaceNode *snode= CTX_wm_space_node(C);
- if(snode && snode->edittree)
+ if (snode && snode->edittree)
return 1;
return 0;
@@ -314,7 +314,7 @@ int ED_operator_object_active_editable_font(bContext *C)
int ED_operator_editmesh(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- if(obedit && obedit->type==OB_MESH)
+ if (obedit && obedit->type==OB_MESH)
return NULL != BMEdit_FromObject(obedit);
return 0;
}
@@ -326,7 +326,7 @@ int ED_operator_editmesh_view3d(bContext *C)
int ED_operator_editmesh_region_view3d(bContext *C)
{
- if(ED_operator_editmesh(C) && CTX_wm_region_view3d(C))
+ if (ED_operator_editmesh(C) && CTX_wm_region_view3d(C))
return 1;
CTX_wm_operator_poll_msg_set(C, "expected a view3d region & editmesh");
@@ -336,7 +336,7 @@ int ED_operator_editmesh_region_view3d(bContext *C)
int ED_operator_editarmature(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- if(obedit && obedit->type==OB_ARMATURE)
+ if (obedit && obedit->type==OB_ARMATURE)
return NULL != ((bArmature *)obedit->data)->edbo;
return 0;
}
@@ -347,8 +347,8 @@ int ED_operator_posemode(bContext *C)
if (obact && !(obact->mode & OB_MODE_EDIT)) {
Object *obpose;
- if((obpose= object_pose_armature_get(obact))) {
- if((obact == obpose) || (obact->mode & OB_MODE_WEIGHT_PAINT)) {
+ if ((obpose= object_pose_armature_get(obact))) {
+ if ((obact == obpose) || (obact->mode & OB_MODE_WEIGHT_PAINT)) {
return 1;
}
}
@@ -370,11 +370,11 @@ int ED_operator_uvmap(bContext *C)
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = NULL;
- if(obedit && obedit->type == OB_MESH) {
+ if (obedit && obedit->type == OB_MESH) {
em = BMEdit_FromObject(obedit);
}
- if(em && (em->bm->totface)) {
+ if (em && (em->bm->totface)) {
return TRUE;
}
@@ -384,14 +384,14 @@ int ED_operator_uvmap(bContext *C)
int ED_operator_editsurfcurve(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- if(obedit && ELEM(obedit->type, OB_CURVE, OB_SURF))
+ if (obedit && ELEM(obedit->type, OB_CURVE, OB_SURF))
return NULL != ((Curve *)obedit->data)->editnurb;
return 0;
}
int ED_operator_editsurfcurve_region_view3d(bContext *C)
{
- if(ED_operator_editsurfcurve(C) && CTX_wm_region_view3d(C))
+ if (ED_operator_editsurfcurve(C) && CTX_wm_region_view3d(C))
return 1;
CTX_wm_operator_poll_msg_set(C, "expected a view3d region & editcurve");
@@ -401,7 +401,7 @@ int ED_operator_editsurfcurve_region_view3d(bContext *C)
int ED_operator_editcurve(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- if(obedit && obedit->type==OB_CURVE)
+ if (obedit && obedit->type==OB_CURVE)
return NULL != ((Curve *)obedit->data)->editnurb;
return 0;
}
@@ -409,7 +409,7 @@ int ED_operator_editcurve(bContext *C)
int ED_operator_editcurve_3d(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- if(obedit && obedit->type==OB_CURVE) {
+ if (obedit && obedit->type==OB_CURVE) {
Curve *cu= (Curve *)obedit->data;
return (cu->flag&CU_3D) && (NULL != cu->editnurb);
@@ -420,7 +420,7 @@ int ED_operator_editcurve_3d(bContext *C)
int ED_operator_editsurf(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- if(obedit && obedit->type==OB_SURF)
+ if (obedit && obedit->type==OB_SURF)
return NULL != ((Curve *)obedit->data)->editnurb;
return 0;
}
@@ -428,7 +428,7 @@ int ED_operator_editsurf(bContext *C)
int ED_operator_editfont(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- if(obedit && obedit->type==OB_FONT)
+ if (obedit && obedit->type==OB_FONT)
return NULL != ((Curve *)obedit->data)->editfont;
return 0;
}
@@ -436,7 +436,7 @@ int ED_operator_editfont(bContext *C)
int ED_operator_editlattice(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- if(obedit && obedit->type==OB_LATTICE)
+ if (obedit && obedit->type==OB_LATTICE)
return NULL != ((Lattice *)obedit->data)->editlatt;
return 0;
}
@@ -444,7 +444,7 @@ int ED_operator_editlattice(bContext *C)
int ED_operator_editmball(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
- if(obedit && obedit->type==OB_MBALL)
+ if (obedit && obedit->type==OB_MBALL)
return NULL != ((MetaBall *)obedit->data)->editelems;
return 0;
}
@@ -484,8 +484,8 @@ static ScrArea *screen_areahascursor(bScreen *scr, int x, int y)
{
ScrArea *sa= NULL;
sa= scr->areabase.first;
- while(sa) {
- if(BLI_in_rcti(&sa->totrct, x, y)) break;
+ while (sa) {
+ if (BLI_in_rcti(&sa->totrct, x, y)) break;
sa= sa->next;
}
@@ -498,13 +498,13 @@ static int actionzone_area_poll(bContext *C)
wmWindow *win= CTX_wm_window(C);
ScrArea *sa= CTX_wm_area(C);
- if(sa && win) {
+ if (sa && win) {
AZone *az;
int x= win->eventstate->x;
int y= win->eventstate->y;
- for(az= sa->actionzones.first; az; az= az->next)
- if(BLI_in_rcti(&az->rect, x, y))
+ for (az= sa->actionzones.first; az; az= az->next)
+ if (BLI_in_rcti(&az->rect, x, y))
return 1;
}
return 0;
@@ -514,16 +514,16 @@ AZone *is_in_area_actionzone(ScrArea *sa, int x, int y)
{
AZone *az= NULL;
- for(az= sa->actionzones.first; az; az= az->next) {
- if(BLI_in_rcti(&az->rect, x, y)) {
- if(az->type == AZONE_AREA) {
+ for (az= sa->actionzones.first; az; az= az->next) {
+ if (BLI_in_rcti(&az->rect, x, y)) {
+ if (az->type == AZONE_AREA) {
/* no triangle intersect but a hotspot circle based on corner */
int radius= (x-az->x1)*(x-az->x1) + (y-az->y1)*(y-az->y1);
- if(radius <= AZONESPOT*AZONESPOT)
+ if (radius <= AZONESPOT*AZONESPOT)
break;
}
- else if(az->type == AZONE_REGION) {
+ else if (az->type == AZONE_REGION) {
break;
}
}
@@ -535,7 +535,7 @@ AZone *is_in_area_actionzone(ScrArea *sa, int x, int y)
static void actionzone_exit(wmOperator *op)
{
- if(op->customdata)
+ if (op->customdata)
MEM_freeN(op->customdata);
op->customdata= NULL;
}
@@ -550,7 +550,7 @@ static void actionzone_apply(bContext *C, wmOperator *op, int type)
sad->modifier= RNA_int_get(op->ptr, "modifier");
event= *(win->eventstate); /* XXX huh huh? make api call */
- if(type==AZONE_AREA)
+ if (type==AZONE_AREA)
event.type= EVT_ACTIONZONE_AREA;
else
event.type= EVT_ACTIONZONE_REGION;
@@ -567,7 +567,7 @@ static int actionzone_invoke(bContext *C, wmOperator *op, wmEvent *event)
sActionzoneData *sad;
/* quick escape */
- if(az==NULL)
+ if (az==NULL)
return OPERATOR_PASS_THROUGH;
/* ok we do the actionzone */
@@ -577,7 +577,7 @@ static int actionzone_invoke(bContext *C, wmOperator *op, wmEvent *event)
sad->x= event->x; sad->y= event->y;
/* region azone directly reacts on mouse clicks */
- if(sad->az->type==AZONE_REGION) {
+ if (sad->az->type==AZONE_REGION) {
actionzone_apply(C, op, AZONE_REGION);
actionzone_exit(op);
return OPERATOR_FINISHED;
@@ -603,17 +603,17 @@ static int actionzone_modal(bContext *C, wmOperator *op, wmEvent *event)
deltax= (event->x - sad->x);
deltay= (event->y - sad->y);
- if(deltay > ABS(deltax))
+ if (deltay > ABS(deltax))
sad->gesture_dir= 'n';
- else if(deltax > ABS(deltay))
+ else if (deltax > ABS(deltay))
sad->gesture_dir= 'e';
- else if(deltay < -ABS(deltax))
+ else if (deltay < -ABS(deltax))
sad->gesture_dir= 's';
else
sad->gesture_dir= 'w';
/* gesture is large enough? */
- if(ABS(deltax) > mindelta || ABS(deltay) > mindelta) {
+ if (ABS(deltax) > mindelta || ABS(deltay) > mindelta) {
/* second area, for join */
sad->sa2= screen_areahascursor(CTX_wm_screen(C), event->x, event->y);
@@ -646,16 +646,16 @@ static int actionzone_cancel(bContext *UNUSED(C), wmOperator *op)
static void SCREEN_OT_actionzone(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Handle area action zones";
- ot->description= "Handle area action zones for mouse actions/gestures";
- ot->idname= "SCREEN_OT_actionzone";
+ ot->name = "Handle area action zones";
+ ot->description = "Handle area action zones for mouse actions/gestures";
+ ot->idname = "SCREEN_OT_actionzone";
- ot->invoke= actionzone_invoke;
- ot->modal= actionzone_modal;
- ot->poll= actionzone_area_poll;
- ot->cancel= actionzone_cancel;
+ ot->invoke = actionzone_invoke;
+ ot->modal = actionzone_modal;
+ ot->poll = actionzone_area_poll;
+ ot->cancel = actionzone_cancel;
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
RNA_def_int(ot->srna, "modifier", 0, 0, 2, "Modifier", "Modifier state", 0, 2);
}
@@ -691,7 +691,7 @@ static int area_swap_init(wmOperator *op, wmEvent *event)
sAreaSwapData *sd= NULL;
sActionzoneData *sad= event->customdata;
- if(sad==NULL || sad->sa1==NULL)
+ if (sad==NULL || sad->sa1==NULL)
return 0;
sd= MEM_callocN(sizeof(sAreaSwapData), "sAreaSwapData");
@@ -706,7 +706,7 @@ static int area_swap_init(wmOperator *op, wmEvent *event)
static void area_swap_exit(bContext *C, wmOperator *op)
{
WM_cursor_restore(CTX_wm_window(C));
- if(op->customdata)
+ if (op->customdata)
MEM_freeN(op->customdata);
op->customdata= NULL;
}
@@ -720,7 +720,7 @@ static int area_swap_cancel(bContext *C, wmOperator *op)
static int area_swap_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(!area_swap_init(op, event))
+ if (!area_swap_init(op, event))
return OPERATOR_PASS_THROUGH;
/* add modal handler */
@@ -741,8 +741,8 @@ static int area_swap_modal(bContext *C, wmOperator *op, wmEvent *event)
sad->sa2= screen_areahascursor(CTX_wm_screen(C), event->x, event->y);
break;
case LEFTMOUSE: /* release LMB */
- if(event->val==KM_RELEASE) {
- if(!sad->sa2 || sad->sa1 == sad->sa2) {
+ if (event->val==KM_RELEASE) {
+ if (!sad->sa2 || sad->sa1 == sad->sa2) {
return area_swap_cancel(C, op);
}
@@ -768,16 +768,16 @@ static int area_swap_modal(bContext *C, wmOperator *op, wmEvent *event)
static void SCREEN_OT_area_swap(wmOperatorType *ot)
{
- ot->name= "Swap areas";
- ot->description= "Swap selected areas screen positions";
- ot->idname= "SCREEN_OT_area_swap";
+ ot->name = "Swap areas";
+ ot->description = "Swap selected areas screen positions";
+ ot->idname = "SCREEN_OT_area_swap";
- ot->invoke= area_swap_invoke;
- ot->modal= area_swap_modal;
- ot->poll= ED_operator_areaactive;
- ot->cancel= area_swap_cancel;
+ ot->invoke = area_swap_invoke;
+ ot->modal = area_swap_modal;
+ ot->poll = ED_operator_areaactive;
+ ot->cancel = area_swap_cancel;
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
}
/* *********** Duplicate area as new window operator ****************** */
@@ -795,18 +795,18 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event)
sa= CTX_wm_area(C);
/* XXX hrmf! */
- if(event->type==EVT_ACTIONZONE_AREA) {
+ if (event->type==EVT_ACTIONZONE_AREA) {
sActionzoneData *sad= event->customdata;
- if(sad==NULL)
+ if (sad==NULL)
return OPERATOR_PASS_THROUGH;
sa= sad->sa1;
}
/* poll() checks area context, but we don't accept full-area windows */
- if(sc->full != SCREENNORMAL) {
- if(event->type==EVT_ACTIONZONE_AREA)
+ if (sc->full != SCREENNORMAL) {
+ if (event->type==EVT_ACTIONZONE_AREA)
actionzone_exit(op);
return OPERATOR_CANCELLED;
}
@@ -828,7 +828,7 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* screen, areas init */
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
- if(event->type==EVT_ACTIONZONE_AREA)
+ if (event->type==EVT_ACTIONZONE_AREA)
actionzone_exit(op);
return OPERATOR_FINISHED;
@@ -836,12 +836,12 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event)
static void SCREEN_OT_area_dupli(wmOperatorType *ot)
{
- ot->name= "Duplicate Area into New Window";
- ot->description= "Duplicate selected area into new window";
- ot->idname= "SCREEN_OT_area_dupli";
+ ot->name = "Duplicate Area into New Window";
+ ot->description = "Duplicate selected area into new window";
+ ot->idname = "SCREEN_OT_area_dupli";
- ot->invoke= area_dupli_invoke;
- ot->poll= ED_operator_areaactive;
+ ot->invoke = area_dupli_invoke;
+ ot->poll = ED_operator_areaactive;
}
@@ -889,23 +889,23 @@ static void area_move_set_limits(bScreen *sc, int dir, int *bigger, int *smaller
/* we check all areas and test for free space with MINSIZE */
*bigger= *smaller= 100000;
- for(sa= sc->areabase.first; sa; sa= sa->next) {
- if(dir=='h') {
+ for (sa= sc->areabase.first; sa; sa= sa->next) {
+ if (dir=='h') {
int y1= sa->v2->vec.y - sa->v1->vec.y-areaminy;
/* if top or down edge selected, test height */
- if(sa->v1->flag && sa->v4->flag)
+ if (sa->v1->flag && sa->v4->flag)
*bigger= MIN2(*bigger, y1);
- else if(sa->v2->flag && sa->v3->flag)
+ else if (sa->v2->flag && sa->v3->flag)
*smaller= MIN2(*smaller, y1);
}
else {
int x1= sa->v4->vec.x - sa->v1->vec.x-AREAMINX;
/* if left or right edge selected, test width */
- if(sa->v1->flag && sa->v2->flag)
+ if (sa->v1->flag && sa->v2->flag)
*bigger= MIN2(*bigger, x1);
- else if(sa->v3->flag && sa->v4->flag)
+ else if (sa->v3->flag && sa->v4->flag)
*smaller= MIN2(*smaller, x1);
}
}
@@ -926,13 +926,13 @@ static int area_move_init (bContext *C, wmOperator *op)
/* setup */
actedge= screen_find_active_scredge(sc, x, y);
- if(actedge==NULL) return 0;
+ if (actedge==NULL) return 0;
md= MEM_callocN(sizeof(sAreaMoveData), "sAreaMoveData");
op->customdata= md;
md->dir= scredge_is_horizontal(actedge)?'h':'v';
- if(md->dir=='h') md->origval= actedge->v1->vec.y;
+ if (md->dir=='h') md->origval= actedge->v1->vec.y;
else md->origval= actedge->v1->vec.x;
select_connected_scredge(sc, actedge);
@@ -957,25 +957,25 @@ static void area_move_apply_do(bContext *C, int origval, int delta, int dir, int
for (v1= sc->vertbase.first; v1; v1= v1->next) {
if (v1->flag) {
/* that way a nice AREAGRID */
- if((dir=='v') && v1->vec.x>0 && v1->vec.x<win->sizex-1) {
+ if ((dir=='v') && v1->vec.x>0 && v1->vec.x<win->sizex-1) {
v1->vec.x= origval + delta;
- if(delta != bigger && delta != -smaller) v1->vec.x-= (v1->vec.x % AREAGRID);
+ if (delta != bigger && delta != -smaller) v1->vec.x-= (v1->vec.x % AREAGRID);
}
- if((dir=='h') && v1->vec.y>0 && v1->vec.y<win->sizey-1) {
+ if ((dir=='h') && v1->vec.y>0 && v1->vec.y<win->sizey-1) {
v1->vec.y= origval + delta;
v1->vec.y+= AREAGRID-1;
v1->vec.y-= (v1->vec.y % AREAGRID);
/* prevent too small top header */
- if(v1->vec.y > win->sizey-areaminy)
+ if (v1->vec.y > win->sizey-areaminy)
v1->vec.y= win->sizey-areaminy;
}
}
}
- for(sa= sc->areabase.first; sa; sa= sa->next) {
- if(sa->v1->flag || sa->v2->flag || sa->v3->flag || sa->v4->flag)
+ for (sa= sc->areabase.first; sa; sa= sa->next) {
+ if (sa->v1->flag || sa->v2->flag || sa->v3->flag || sa->v4->flag)
ED_area_tag_redraw(sa);
}
@@ -993,7 +993,7 @@ static void area_move_apply(bContext *C, wmOperator *op)
static void area_move_exit(bContext *C, wmOperator *op)
{
- if(op->customdata)
+ if (op->customdata)
MEM_freeN(op->customdata);
op->customdata= NULL;
@@ -1004,7 +1004,7 @@ static void area_move_exit(bContext *C, wmOperator *op)
static int area_move_exec(bContext *C, wmOperator *op)
{
- if(!area_move_init(C, op))
+ if (!area_move_init(C, op))
return OPERATOR_CANCELLED;
area_move_apply(C, op);
@@ -1019,7 +1019,7 @@ static int area_move_invoke(bContext *C, wmOperator *op, wmEvent *event)
RNA_int_set(op->ptr, "x", event->x);
RNA_int_set(op->ptr, "y", event->y);
- if(!area_move_init(C, op))
+ if (!area_move_init(C, op))
return OPERATOR_PASS_THROUGH;
/* add temp handler */
@@ -1052,7 +1052,7 @@ static int area_move_modal(bContext *C, wmOperator *op, wmEvent *event)
y= RNA_int_get(op->ptr, "y");
delta= (md->dir == 'v')? event->x - x: event->y - y;
- if(md->step) delta= delta - (delta % md->step);
+ if (md->step) delta= delta - (delta % md->step);
RNA_int_set(op->ptr, "delta", delta);
area_move_apply(C, op);
@@ -1083,17 +1083,17 @@ static int area_move_modal(bContext *C, wmOperator *op, wmEvent *event)
static void SCREEN_OT_area_move(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move area edges";
- ot->description= "Move selected area edges";
- ot->idname= "SCREEN_OT_area_move";
+ ot->name = "Move area edges";
+ ot->description = "Move selected area edges";
+ ot->idname = "SCREEN_OT_area_move";
- ot->exec= area_move_exec;
- ot->invoke= area_move_invoke;
- ot->cancel= area_move_cancel;
- ot->modal= area_move_modal;
- ot->poll= ED_operator_screen_mainwinactive; /* when mouse is over area-edge */
+ ot->exec = area_move_exec;
+ ot->invoke = area_move_invoke;
+ ot->cancel = area_move_cancel;
+ ot->modal = area_move_modal;
+ ot->poll = ED_operator_screen_mainwinactive; /* when mouse is over area-edge */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
/* rna */
RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
@@ -1166,10 +1166,10 @@ static int area_split_menu_init(bContext *C, wmOperator *op)
sd->sarea= CTX_wm_area(C);
- if(sd->sarea) {
+ if (sd->sarea) {
int dir= RNA_enum_get(op->ptr, "direction");
- if(dir=='h')
+ if (dir=='h')
sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_H;
else
sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_V;
@@ -1186,14 +1186,14 @@ static int area_split_init(bContext *C, wmOperator *op)
int dir;
/* required context */
- if(sa==NULL) return 0;
+ if (sa==NULL) return 0;
/* required properties */
dir= RNA_enum_get(op->ptr, "direction");
/* minimal size */
- if(dir=='v' && sa->winx < 2*AREAMINX) return 0;
- if(dir=='h' && sa->winy < 2*areaminy) return 0;
+ if (dir=='v' && sa->winx < 2*AREAMINX) return 0;
+ if (dir=='h' && sa->winy < 2*areaminy) return 0;
/* custom data */
sd= (sAreaSplitData*)MEM_callocN(sizeof (sAreaSplitData), "op_area_split");
@@ -1219,16 +1219,16 @@ static ScrEdge *area_findsharededge(bScreen *screen, ScrArea *sa, ScrArea *sb)
ScrVert *sbv3= sb->v3;
ScrVert *sbv4= sb->v4;
- if(sav1==sbv4 && sav2==sbv3) { /* sa to right of sb = W */
+ if (sav1==sbv4 && sav2==sbv3) { /* sa to right of sb = W */
return screen_findedge(screen, sav1, sav2);
}
- else if(sav2==sbv1 && sav3==sbv4) { /* sa to bottom of sb = N */
+ else if (sav2==sbv1 && sav3==sbv4) { /* sa to bottom of sb = N */
return screen_findedge(screen, sav2, sav3);
}
- else if(sav3==sbv2 && sav4==sbv1) { /* sa to left of sb = E */
+ else if (sav3==sbv2 && sav4==sbv1) { /* sa to left of sb = E */
return screen_findedge(screen, sav3, sav4);
}
- else if(sav1==sbv2 && sav4==sbv3) { /* sa on top of sb = S*/
+ else if (sav1==sbv2 && sav4==sbv3) { /* sa on top of sb = S*/
return screen_findedge(screen, sav1, sav4);
}
@@ -1249,19 +1249,19 @@ static int area_split_apply(bContext *C, wmOperator *op)
sd->narea= area_split(sc, sd->sarea, dir, fac, 0); /* 0 = no merge */
- if(sd->narea) {
+ if (sd->narea) {
ScrVert *sv;
sd->nedge= area_findsharededge(sc, sd->sarea, sd->narea);
/* select newly created edge, prepare for moving edge */
- for(sv= sc->vertbase.first; sv; sv= sv->next)
+ for (sv= sc->vertbase.first; sv; sv= sv->next)
sv->flag = 0;
sd->nedge->v1->flag= 1;
sd->nedge->v2->flag= 1;
- if(dir=='h') sd->origval= sd->nedge->v1->vec.y;
+ if (dir=='h') sd->origval= sd->nedge->v1->vec.y;
else sd->origval= sd->nedge->v1->vec.x;
ED_area_tag_redraw(sd->sarea);
@@ -1279,10 +1279,10 @@ static void area_split_exit(bContext *C, wmOperator *op)
{
if (op->customdata) {
sAreaSplitData *sd= (sAreaSplitData *)op->customdata;
- if(sd->sarea) ED_area_tag_redraw(sd->sarea);
- if(sd->narea) ED_area_tag_redraw(sd->narea);
+ if (sd->sarea) ED_area_tag_redraw(sd->sarea);
+ if (sd->narea) ED_area_tag_redraw(sd->narea);
- if(sd->sarea)
+ if (sd->sarea)
sd->sarea->flag &= ~(AREA_FLAG_DRAWSPLIT_H|AREA_FLAG_DRAWSPLIT_V);
MEM_freeN(op->customdata);
@@ -1305,26 +1305,26 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event)
int dir;
/* no full window splitting allowed */
- if(CTX_wm_screen(C)->full != SCREENNORMAL)
+ if (CTX_wm_screen(C)->full != SCREENNORMAL)
return OPERATOR_CANCELLED;
- if(event->type==EVT_ACTIONZONE_AREA) {
+ if (event->type==EVT_ACTIONZONE_AREA) {
sActionzoneData *sad= event->customdata;
- if(sad->modifier>0) {
+ if (sad->modifier>0) {
return OPERATOR_PASS_THROUGH;
}
/* verify *sad itself */
- if(sad==NULL || sad->sa1==NULL || sad->az==NULL)
+ if (sad==NULL || sad->sa1==NULL || sad->az==NULL)
return OPERATOR_PASS_THROUGH;
/* is this our *sad? if areas not equal it should be passed on */
- if(CTX_wm_area(C)!=sad->sa1 || sad->sa1!=sad->sa2)
+ if (CTX_wm_area(C)!=sad->sa1 || sad->sa1!=sad->sa2)
return OPERATOR_PASS_THROUGH;
/* prepare operator state vars */
- if(sad->gesture_dir=='n' || sad->gesture_dir=='s') {
+ if (sad->gesture_dir=='n' || sad->gesture_dir=='s') {
dir= 'h';
RNA_float_set(op->ptr, "factor", ((float)(event->x - sad->sa1->v1->vec.x)) / (float)sad->sa1->winx);
}
@@ -1335,7 +1335,7 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event)
RNA_enum_set(op->ptr, "direction", dir);
/* general init, also non-UI case, adds customdata, sets area and defaults */
- if(!area_split_init(C, op))
+ if (!area_split_init(C, op))
return OPERATOR_PASS_THROUGH;
}
@@ -1344,18 +1344,18 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event)
int x, y;
/* retrieve initial mouse coord, so we can find the active edge */
- if(RNA_struct_property_is_set(op->ptr, "mouse_x"))
+ if (RNA_struct_property_is_set(op->ptr, "mouse_x"))
x= RNA_int_get(op->ptr, "mouse_x");
else
x= event->x;
- if(RNA_struct_property_is_set(op->ptr, "mouse_y"))
+ if (RNA_struct_property_is_set(op->ptr, "mouse_y"))
y= RNA_int_get(op->ptr, "mouse_y");
else
y= event->x;
actedge= screen_find_active_scredge(CTX_wm_screen(C), x, y);
- if(actedge==NULL)
+ if (actedge==NULL)
return OPERATOR_CANCELLED;
dir= scredge_is_horizontal(actedge)?'v':'h';
@@ -1363,7 +1363,7 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event)
RNA_enum_set(op->ptr, "direction", dir);
/* special case, adds customdata, sets defaults */
- if(!area_split_menu_init(C, op))
+ if (!area_split_menu_init(C, op))
return OPERATOR_CANCELLED;
}
@@ -1373,10 +1373,10 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event)
sd->x= event->x;
sd->y= event->y;
- if(event->type==EVT_ACTIONZONE_AREA) {
+ if (event->type==EVT_ACTIONZONE_AREA) {
/* do the split */
- if(area_split_apply(C, op)) {
+ if (area_split_apply(C, op)) {
area_move_set_limits(CTX_wm_screen(C), dir, &sd->bigger, &sd->smaller);
/* add temp handler for edge move or cancel */
@@ -1401,7 +1401,7 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int area_split_exec(bContext *C, wmOperator *op)
{
- if(!area_split_init(C, op))
+ if (!area_split_init(C, op))
return OPERATOR_CANCELLED;
area_split_apply(C, op);
@@ -1415,7 +1415,7 @@ static int area_split_cancel(bContext *C, wmOperator *op)
{
sAreaSplitData *sd= (sAreaSplitData *)op->customdata;
- if(sd->previewmode) {
+ if (sd->previewmode) {
}
else {
if (screen_area_join(C, CTX_wm_screen(C), sd->sarea, sd->narea)) {
@@ -1443,16 +1443,16 @@ static int area_split_modal(bContext *C, wmOperator *op, wmEvent *event)
dir= RNA_enum_get(op->ptr, "direction");
sd->delta= (dir == 'v')? event->x - sd->origval: event->y - sd->origval;
- if(sd->previewmode==0)
+ if (sd->previewmode==0)
area_move_apply_do(C, sd->origval, sd->delta, dir, sd->bigger, sd->smaller);
else {
- if(sd->sarea) {
+ if (sd->sarea) {
sd->sarea->flag &= ~(AREA_FLAG_DRAWSPLIT_H|AREA_FLAG_DRAWSPLIT_V);
ED_area_tag_redraw(sd->sarea);
}
sd->sarea= screen_areahascursor(CTX_wm_screen(C), event->x, event->y); /* area context not set */
- if(sd->sarea) {
+ if (sd->sarea) {
ED_area_tag_redraw(sd->sarea);
if (dir=='v') {
sd->origsize= sd->sarea->winx;
@@ -1476,13 +1476,13 @@ static int area_split_modal(bContext *C, wmOperator *op, wmEvent *event)
break;
case LEFTMOUSE:
- if(sd->previewmode) {
+ if (sd->previewmode) {
area_split_apply(C, op);
area_split_exit(C, op);
return OPERATOR_FINISHED;
}
else {
- if(event->val==KM_RELEASE) { /* mouse up */
+ if (event->val==KM_RELEASE) { /* mouse up */
area_split_exit(C, op);
return OPERATOR_FINISHED;
}
@@ -1491,23 +1491,23 @@ static int area_split_modal(bContext *C, wmOperator *op, wmEvent *event)
case MIDDLEMOUSE:
case TABKEY:
- if (sd->previewmode==0){
+ if (sd->previewmode==0) {
}
- else{
+ else {
dir = RNA_enum_get(op->ptr, "direction");
- if(event->val==KM_PRESS){
- if (sd->sarea){
+ if (event->val==KM_PRESS) {
+ if (sd->sarea) {
sd->sarea->flag &= ~(AREA_FLAG_DRAWSPLIT_H|AREA_FLAG_DRAWSPLIT_V);
ED_area_tag_redraw(sd->sarea);
- if (dir=='v'){
+ if (dir=='v') {
RNA_enum_set(op->ptr, "direction", 'h');
sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_H;
WM_cursor_set(CTX_wm_window(C),CURSOR_X_MOVE);
}
- else{
+ else {
RNA_enum_set(op->ptr, "direction", 'v');
sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_V;
@@ -1535,16 +1535,16 @@ static EnumPropertyItem prop_direction_items[] = {
static void SCREEN_OT_area_split(wmOperatorType *ot)
{
ot->name = "Split area";
- ot->description= "Split selected area into new windows";
+ ot->description = "Split selected area into new windows";
ot->idname = "SCREEN_OT_area_split";
- ot->exec= area_split_exec;
- ot->invoke= area_split_invoke;
- ot->modal= area_split_modal;
- ot->cancel= area_split_cancel;
+ ot->exec = area_split_exec;
+ ot->invoke = area_split_invoke;
+ ot->modal = area_split_modal;
+ ot->cancel = area_split_cancel;
- ot->poll= screen_active_editable;
- ot->flag= OPTYPE_BLOCKING;
+ ot->poll = screen_active_editable;
+ ot->flag = OPTYPE_BLOCKING;
/* rna */
RNA_def_enum(ot->srna, "direction", prop_direction_items, 'h', "Direction", "");
@@ -1574,9 +1574,10 @@ static int area_max_regionsize(ScrArea *sa, ARegion *scalear, AZEdge edge)
ARegion *ar;
int dist;
- if(edge==AE_RIGHT_TO_TOPLEFT || edge==AE_LEFT_TO_TOPRIGHT) {
+ if (edge==AE_RIGHT_TO_TOPLEFT || edge==AE_LEFT_TO_TOPRIGHT) {
dist = sa->totrct.xmax - sa->totrct.xmin;
- } else { /* AE_BOTTOM_TO_TOPLEFT, AE_TOP_TO_BOTTOMRIGHT */
+ }
+ else { /* AE_BOTTOM_TO_TOPLEFT, AE_TOP_TO_BOTTOMRIGHT */
dist = sa->totrct.ymax - sa->totrct.ymin;
}
@@ -1611,14 +1612,14 @@ static int region_scale_invoke(bContext *C, wmOperator *op, wmEvent *event)
sActionzoneData *sad= event->customdata;
AZone *az;
- if(event->type!=EVT_ACTIONZONE_REGION) {
+ if (event->type!=EVT_ACTIONZONE_REGION) {
BKE_report(op->reports, RPT_ERROR, "Can only scale region size from an action zone");
return OPERATOR_CANCELLED;
}
az = sad->az;
- if(az->ar) {
+ if (az->ar) {
RegionMoveData *rmd= MEM_callocN(sizeof(RegionMoveData), "RegionMoveData");
int maxsize;
@@ -1633,15 +1634,16 @@ static int region_scale_invoke(bContext *C, wmOperator *op, wmEvent *event)
rmd->maxsize = area_max_regionsize(rmd->sa, rmd->ar, rmd->edge);
/* if not set we do now, otherwise it uses type */
- if(rmd->ar->sizex==0)
+ if (rmd->ar->sizex==0)
rmd->ar->sizex= rmd->ar->type->prefsizex;
- if(rmd->ar->sizey==0)
+ if (rmd->ar->sizey==0)
rmd->ar->sizey= rmd->ar->type->prefsizey;
/* now copy to regionmovedata */
- if(rmd->edge==AE_LEFT_TO_TOPRIGHT || rmd->edge==AE_RIGHT_TO_TOPLEFT) {
+ if (rmd->edge==AE_LEFT_TO_TOPRIGHT || rmd->edge==AE_RIGHT_TO_TOPLEFT) {
rmd->origval= rmd->ar->sizex;
- } else {
+ }
+ else {
rmd->origval= rmd->ar->sizey;
}
@@ -1666,11 +1668,11 @@ static int region_scale_get_maxsize(RegionMoveData *rmd)
{
int maxsize= 0;
- if(rmd->edge==AE_LEFT_TO_TOPRIGHT || rmd->edge==AE_RIGHT_TO_TOPLEFT) {
+ if (rmd->edge==AE_LEFT_TO_TOPRIGHT || rmd->edge==AE_RIGHT_TO_TOPLEFT) {
return rmd->sa->winx - UI_UNIT_X;
}
- if(rmd->ar->regiontype == RGN_TYPE_TOOL_PROPS) {
+ if (rmd->ar->regiontype == RGN_TYPE_TOOL_PROPS) {
/* this calculation seems overly verbose
* can someone explain why this method is necessary? - campbell */
maxsize = rmd->maxsize - ((rmd->sa->headertype==HEADERTOP)?UI_UNIT_Y*2:UI_UNIT_Y) - (UI_UNIT_Y/4);
@@ -1681,18 +1683,18 @@ static int region_scale_get_maxsize(RegionMoveData *rmd)
static void region_scale_validate_size(RegionMoveData *rmd)
{
- if((rmd->ar->flag & RGN_FLAG_HIDDEN)==0) {
+ if ((rmd->ar->flag & RGN_FLAG_HIDDEN)==0) {
short *size, maxsize= -1;
- if(rmd->edge==AE_LEFT_TO_TOPRIGHT || rmd->edge==AE_RIGHT_TO_TOPLEFT)
+ if (rmd->edge==AE_LEFT_TO_TOPRIGHT || rmd->edge==AE_RIGHT_TO_TOPLEFT)
size= &rmd->ar->sizex;
else
size= &rmd->ar->sizey;
maxsize= region_scale_get_maxsize(rmd);
- if(*size > maxsize && maxsize > 0)
+ if (*size > maxsize && maxsize > 0)
*size= maxsize;
}
}
@@ -1712,25 +1714,25 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
switch(event->type) {
case MOUSEMOVE:
- if(rmd->edge==AE_LEFT_TO_TOPRIGHT || rmd->edge==AE_RIGHT_TO_TOPLEFT) {
+ if (rmd->edge==AE_LEFT_TO_TOPRIGHT || rmd->edge==AE_RIGHT_TO_TOPLEFT) {
delta= event->x - rmd->origx;
- if(rmd->edge==AE_LEFT_TO_TOPRIGHT) delta= -delta;
+ if (rmd->edge==AE_LEFT_TO_TOPRIGHT) delta= -delta;
rmd->ar->sizex= rmd->origval + delta;
CLAMP(rmd->ar->sizex, 0, rmd->maxsize);
- if(rmd->ar->sizex < UI_UNIT_X) {
+ if (rmd->ar->sizex < UI_UNIT_X) {
rmd->ar->sizex= rmd->origval;
- if(!(rmd->ar->flag & RGN_FLAG_HIDDEN))
+ if (!(rmd->ar->flag & RGN_FLAG_HIDDEN))
region_scale_toggle_hidden(C, rmd);
}
- else if(rmd->ar->flag & RGN_FLAG_HIDDEN)
+ else if (rmd->ar->flag & RGN_FLAG_HIDDEN)
region_scale_toggle_hidden(C, rmd);
}
else {
int maxsize= region_scale_get_maxsize(rmd);
delta= event->y - rmd->origy;
- if(rmd->edge==AE_BOTTOM_TO_TOPLEFT) delta= -delta;
+ if (rmd->edge==AE_BOTTOM_TO_TOPLEFT) delta= -delta;
rmd->ar->sizey= rmd->origval + delta;
CLAMP(rmd->ar->sizey, 0, rmd->maxsize);
@@ -1738,14 +1740,14 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
/* note, 'UI_UNIT_Y/4' means you need to drag the header almost
* all the way down for it to become hidden, this is done
* otherwise its too easy to do this by accident */
- if(rmd->ar->sizey < UI_UNIT_Y/4) {
+ if (rmd->ar->sizey < UI_UNIT_Y/4) {
rmd->ar->sizey= rmd->origval;
- if(!(rmd->ar->flag & RGN_FLAG_HIDDEN))
+ if (!(rmd->ar->flag & RGN_FLAG_HIDDEN))
region_scale_toggle_hidden(C, rmd);
}
- else if(maxsize > 0 && (rmd->ar->sizey > maxsize))
+ else if (maxsize > 0 && (rmd->ar->sizey > maxsize))
rmd->ar->sizey= maxsize;
- else if(rmd->ar->flag & RGN_FLAG_HIDDEN)
+ else if (rmd->ar->flag & RGN_FLAG_HIDDEN)
region_scale_toggle_hidden(C, rmd);
}
ED_area_tag_redraw(rmd->sa);
@@ -1754,13 +1756,13 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
break;
case LEFTMOUSE:
- if(event->val==KM_RELEASE) {
+ if (event->val==KM_RELEASE) {
- if(ABS(event->x - rmd->origx) < 2 && ABS(event->y - rmd->origy) < 2) {
- if(rmd->ar->flag & RGN_FLAG_HIDDEN) {
+ if (ABS(event->x - rmd->origx) < 2 && ABS(event->y - rmd->origy) < 2) {
+ if (rmd->ar->flag & RGN_FLAG_HIDDEN) {
region_scale_toggle_hidden(C, rmd);
}
- else if(rmd->ar->flag & RGN_FLAG_TOO_SMALL) {
+ else if (rmd->ar->flag & RGN_FLAG_TOO_SMALL) {
region_scale_validate_size(rmd);
}
@@ -1792,17 +1794,17 @@ static int region_scale_cancel(bContext *UNUSED(C), wmOperator *op)
static void SCREEN_OT_region_scale(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Scale Region Size";
- ot->description= "Scale selected area";
- ot->idname= "SCREEN_OT_region_scale";
+ ot->name = "Scale Region Size";
+ ot->description = "Scale selected area";
+ ot->idname = "SCREEN_OT_region_scale";
- ot->invoke= region_scale_invoke;
- ot->modal= region_scale_modal;
- ot->cancel= region_scale_cancel;
+ ot->invoke = region_scale_invoke;
+ ot->modal = region_scale_modal;
+ ot->cancel = region_scale_cancel;
- ot->poll= ED_operator_areaactive;
+ ot->poll = ED_operator_areaactive;
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
}
@@ -1833,10 +1835,10 @@ static void SCREEN_OT_frame_offset(wmOperatorType *ot)
ot->name = "Frame Offset";
ot->idname = "SCREEN_OT_frame_offset";
- ot->exec= frame_offset_exec;
+ ot->exec = frame_offset_exec;
- ot->poll= ED_operator_screenactive_norender;
- ot->flag= 0;
+ ot->poll = ED_operator_screenactive_norender;
+ ot->flag = 0;
/* rna */
RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX);
@@ -1854,7 +1856,7 @@ static int frame_jump_exec(bContext *C, wmOperator *op)
* first/last frame not to be actually shown (bad since for example physics
* simulations aren't reset properly).
*/
- if(animtimer) {
+ if (animtimer) {
ScreenAnimData *sad = animtimer->customdata;
sad->flag |= ANIMPLAY_FLAG_USE_NEXT_FRAME;
@@ -1881,13 +1883,13 @@ static int frame_jump_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_frame_jump(wmOperatorType *ot)
{
ot->name = "Jump to Endpoint";
- ot->description= "Jump to first/last frame in frame range";
+ ot->description = "Jump to first/last frame in frame range";
ot->idname = "SCREEN_OT_frame_jump";
- ot->exec= frame_jump_exec;
+ ot->exec = frame_jump_exec;
- ot->poll= ED_operator_screenactive_norender;
- ot->flag= OPTYPE_UNDO;
+ ot->poll = ED_operator_screenactive_norender;
+ ot->flag = OPTYPE_UNDO;
/* rna */
RNA_def_boolean(ot->srna, "end", 0, "Last Frame", "Jump to the last frame of the frame range");
@@ -1964,13 +1966,13 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_keyframe_jump(wmOperatorType *ot)
{
ot->name = "Jump to Keyframe";
- ot->description= "Jump to previous/next keyframe";
+ ot->description = "Jump to previous/next keyframe";
ot->idname = "SCREEN_OT_keyframe_jump";
- ot->exec= keyframe_jump_exec;
+ ot->exec = keyframe_jump_exec;
- ot->poll= ED_operator_screenactive_norender;
- ot->flag= OPTYPE_UNDO;
+ ot->poll = ED_operator_screenactive_norender;
+ ot->flag = OPTYPE_UNDO;
/* rna */
RNA_def_boolean(ot->srna, "next", 1, "Next Keyframe", "");
@@ -1990,22 +1992,22 @@ static int screen_set_exec(bContext *C, wmOperator *op)
int delta= RNA_int_get(op->ptr, "delta");
/* temp screens are for userpref or render display */
- if(screen->temp)
+ if (screen->temp)
return OPERATOR_CANCELLED;
- if(delta==1) {
- while(tot--) {
+ if (delta==1) {
+ while (tot--) {
screen= screen->id.next;
- if(screen==NULL) screen= CTX_data_main(C)->screen.first;
- if(screen->winid==0 && screen->full==0 && screen != screen_prev)
+ if (screen==NULL) screen= CTX_data_main(C)->screen.first;
+ if (screen->winid==0 && screen->full==0 && screen != screen_prev)
break;
}
}
- else if(delta== -1) {
- while(tot--) {
+ else if (delta== -1) {
+ while (tot--) {
screen= screen->id.prev;
- if(screen==NULL) screen= CTX_data_main(C)->screen.last;
- if(screen->winid==0 && screen->full==0 && screen != screen_prev)
+ if (screen==NULL) screen= CTX_data_main(C)->screen.last;
+ if (screen->winid==0 && screen->full==0 && screen != screen_prev)
break;
}
}
@@ -2013,9 +2015,9 @@ static int screen_set_exec(bContext *C, wmOperator *op)
screen= NULL;
}
- if(screen && screen_prev != screen) {
+ if (screen && screen_prev != screen) {
/* return to previous state before switching screens */
- if(sa && sa->full) {
+ if (sa && sa->full) {
ED_screen_full_restore(C, sa); /* may free 'screen_prev' */
}
@@ -2028,11 +2030,11 @@ static int screen_set_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_screen_set(wmOperatorType *ot)
{
ot->name = "Set Screen";
- ot->description= "Cycle through available screens";
+ ot->description = "Cycle through available screens";
ot->idname = "SCREEN_OT_screen_set";
- ot->exec= screen_set_exec;
- ot->poll= ED_operator_screenactive;
+ ot->exec = screen_set_exec;
+ ot->poll = ED_operator_screenactive;
/* rna */
RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX);
@@ -2053,7 +2055,7 @@ static int screen_full_area_exec(bContext *C, wmOperator *UNUSED(op))
if (sa->full) break;
}
- if(sa==NULL) sa= CTX_wm_area(C);
+ if (sa==NULL) sa= CTX_wm_area(C);
ED_screen_full_toggle(C, CTX_wm_window(C), sa);
return OPERATOR_FINISHED;
@@ -2062,12 +2064,12 @@ static int screen_full_area_exec(bContext *C, wmOperator *UNUSED(op))
static void SCREEN_OT_screen_full_area(wmOperatorType *ot)
{
ot->name = "Toggle Full Screen";
- ot->description= "Toggle display selected area as fullscreen";
+ ot->description = "Toggle display selected area as fullscreen";
ot->idname = "SCREEN_OT_screen_full_area";
- ot->exec= screen_full_area_exec;
- ot->poll= ED_operator_areaactive;
- ot->flag= 0;
+ ot->exec = screen_full_area_exec;
+ ot->poll = ED_operator_areaactive;
+ ot->flag = 0;
}
@@ -2130,15 +2132,15 @@ static int area_join_init(bContext *C, wmOperator *op)
sa1 = screen_areahascursor(CTX_wm_screen(C), x1, y1);
sa2 = screen_areahascursor(CTX_wm_screen(C), x2, y2);
- if(sa1==NULL || sa2==NULL || sa1==sa2)
+ if (sa1==NULL || sa2==NULL || sa1==sa2)
return 0;
/* do areas share an edge? */
- if(sa1->v1==sa2->v1 || sa1->v1==sa2->v2 || sa1->v1==sa2->v3 || sa1->v1==sa2->v4) shared++;
- if(sa1->v2==sa2->v1 || sa1->v2==sa2->v2 || sa1->v2==sa2->v3 || sa1->v2==sa2->v4) shared++;
- if(sa1->v3==sa2->v1 || sa1->v3==sa2->v2 || sa1->v3==sa2->v3 || sa1->v3==sa2->v4) shared++;
- if(sa1->v4==sa2->v1 || sa1->v4==sa2->v2 || sa1->v4==sa2->v3 || sa1->v4==sa2->v4) shared++;
- if(shared!=2) {
+ if (sa1->v1==sa2->v1 || sa1->v1==sa2->v2 || sa1->v1==sa2->v3 || sa1->v1==sa2->v4) shared++;
+ if (sa1->v2==sa2->v1 || sa1->v2==sa2->v2 || sa1->v2==sa2->v3 || sa1->v2==sa2->v4) shared++;
+ if (sa1->v3==sa2->v1 || sa1->v3==sa2->v2 || sa1->v3==sa2->v3 || sa1->v3==sa2->v4) shared++;
+ if (sa1->v4==sa2->v1 || sa1->v4==sa2->v2 || sa1->v4==sa2->v3 || sa1->v4==sa2->v4) shared++;
+ if (shared!=2) {
printf("areas don't share edge\n");
return 0;
}
@@ -2161,7 +2163,7 @@ static int area_join_apply(bContext *C, wmOperator *op)
sAreaJoinData *jd = (sAreaJoinData *)op->customdata;
if (!jd) return 0;
- if(!screen_area_join(C, CTX_wm_screen(C), jd->sa1, jd->sa2)){
+ if (!screen_area_join(C, CTX_wm_screen(C), jd->sa1, jd->sa2)) {
return 0;
}
if (CTX_wm_area(C) == jd->sa2) {
@@ -2188,7 +2190,7 @@ static void area_join_exit(bContext *C, wmOperator *op)
static int area_join_exec(bContext *C, wmOperator *op)
{
- if(!area_join_init(C, op))
+ if (!area_join_init(C, op))
return OPERATOR_CANCELLED;
area_join_apply(C, op);
@@ -2201,19 +2203,19 @@ static int area_join_exec(bContext *C, wmOperator *op)
static int area_join_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(event->type==EVT_ACTIONZONE_AREA) {
+ if (event->type==EVT_ACTIONZONE_AREA) {
sActionzoneData *sad= event->customdata;
- if(sad->modifier>0) {
+ if (sad->modifier>0) {
return OPERATOR_PASS_THROUGH;
}
/* verify *sad itself */
- if(sad==NULL || sad->sa1==NULL || sad->sa2==NULL)
+ if (sad==NULL || sad->sa1==NULL || sad->sa2==NULL)
return OPERATOR_PASS_THROUGH;
/* is this our *sad? if areas equal it should be passed on */
- if(sad->sa1==sad->sa2)
+ if (sad->sa1==sad->sa2)
return OPERATOR_PASS_THROUGH;
/* prepare operator state vars */
@@ -2224,7 +2226,7 @@ static int area_join_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
- if(!area_join_init(C, op))
+ if (!area_join_init(C, op))
return OPERATOR_PASS_THROUGH;
/* add temp handler */
@@ -2325,7 +2327,7 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event)
}
break;
case LEFTMOUSE:
- if(event->val==KM_RELEASE) {
+ if (event->val==KM_RELEASE) {
ED_area_tag_redraw(jd->sa1);
ED_area_tag_redraw(jd->sa2);
@@ -2348,18 +2350,18 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event)
static void SCREEN_OT_area_join(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Join area";
- ot->description= "Join selected areas into new window";
- ot->idname= "SCREEN_OT_area_join";
+ ot->name = "Join area";
+ ot->description = "Join selected areas into new window";
+ ot->idname = "SCREEN_OT_area_join";
/* api callbacks */
- ot->exec= area_join_exec;
- ot->invoke= area_join_invoke;
- ot->modal= area_join_modal;
- ot->poll= screen_active_editable;
- ot->cancel= area_join_cancel;
+ ot->exec = area_join_exec;
+ ot->invoke = area_join_invoke;
+ ot->modal = area_join_modal;
+ ot->poll = screen_active_editable;
+ ot->cancel = area_join_cancel;
- ot->flag= OPTYPE_BLOCKING|OPTYPE_INTERNAL;
+ ot->flag = OPTYPE_BLOCKING|OPTYPE_INTERNAL;
/* rna */
RNA_def_int(ot->srna, "min_x", -100, INT_MIN, INT_MAX, "X 1", "", INT_MIN, INT_MAX);
@@ -2377,7 +2379,7 @@ static int screen_area_options_invoke(bContext *C, wmOperator *op, wmEvent *even
PointerRNA ptr1, ptr2;
ScrEdge *actedge= screen_find_active_scredge(CTX_wm_screen(C), event->x, event->y);
- if(actedge==NULL) return OPERATOR_CANCELLED;
+ if (actedge==NULL) return OPERATOR_CANCELLED;
pup= uiPupMenuBegin(C, op->type->name, ICON_NONE);
layout= uiPupMenuLayout(pup);
@@ -2407,14 +2409,14 @@ static int screen_area_options_invoke(bContext *C, wmOperator *op, wmEvent *even
static void SCREEN_OT_area_options(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Area Options";
- ot->description= "Operations for splitting and merging";
- ot->idname= "SCREEN_OT_area_options";
+ ot->name = "Area Options";
+ ot->description = "Operations for splitting and merging";
+ ot->idname = "SCREEN_OT_area_options";
/* api callbacks */
- ot->invoke= screen_area_options_invoke;
+ ot->invoke = screen_area_options_invoke;
- ot->poll= ED_operator_screen_mainwinactive;
+ ot->poll = ED_operator_screen_mainwinactive;
}
@@ -2428,9 +2430,9 @@ static int spacedata_cleanup(bContext *C, wmOperator *op)
ScrArea *sa;
int tot= 0;
- for(screen= bmain->screen.first; screen; screen= screen->id.next) {
- for(sa= screen->areabase.first; sa; sa= sa->next) {
- if(sa->spacedata.first != sa->spacedata.last) {
+ for (screen= bmain->screen.first; screen; screen= screen->id.next) {
+ for (sa= screen->areabase.first; sa; sa= sa->next) {
+ if (sa->spacedata.first != sa->spacedata.last) {
SpaceLink *sl= sa->spacedata.first;
BLI_remlink(&sa->spacedata, sl);
@@ -2448,13 +2450,13 @@ static int spacedata_cleanup(bContext *C, wmOperator *op)
static void SCREEN_OT_spacedata_cleanup(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clean-up space-data";
- ot->description= "Remove unused settings for invisible editors";
- ot->idname= "SCREEN_OT_spacedata_cleanup";
+ ot->name = "Clean-up space-data";
+ ot->description = "Remove unused settings for invisible editors";
+ ot->idname = "SCREEN_OT_spacedata_cleanup";
/* api callbacks */
- ot->exec= spacedata_cleanup;
- ot->poll= WM_operator_winactive;
+ ot->exec = spacedata_cleanup;
+ ot->poll = WM_operator_winactive;
}
@@ -2464,7 +2466,7 @@ static int repeat_last_exec(bContext *C, wmOperator *UNUSED(op))
{
wmOperator *lastop= CTX_wm_manager(C)->operators.last;
- if(lastop)
+ if (lastop)
WM_operator_repeat(C, lastop);
return OPERATOR_CANCELLED;
@@ -2473,14 +2475,14 @@ static int repeat_last_exec(bContext *C, wmOperator *UNUSED(op))
static void SCREEN_OT_repeat_last(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Repeat Last";
- ot->description= "Repeat last action";
- ot->idname= "SCREEN_OT_repeat_last";
+ ot->name = "Repeat Last";
+ ot->description = "Repeat last action";
+ ot->idname = "SCREEN_OT_repeat_last";
/* api callbacks */
- ot->exec= repeat_last_exec;
+ ot->exec = repeat_last_exec;
- ot->poll= ED_operator_screenactive;
+ ot->poll = ED_operator_screenactive;
}
@@ -2493,7 +2495,7 @@ static int repeat_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev
int items, i;
items= BLI_countlist(&wm->operators);
- if(items==0)
+ if (items==0)
return OPERATOR_CANCELLED;
pup= uiPupMenuBegin(C, op->type->name, ICON_NONE);
@@ -2512,7 +2514,7 @@ static int repeat_history_exec(bContext *C, wmOperator *op)
wmWindowManager *wm= CTX_wm_manager(C);
op= BLI_findlink(&wm->operators, RNA_int_get(op->ptr, "index"));
- if(op) {
+ if (op) {
/* let's put it as last operator in list */
BLI_remlink(&wm->operators, op);
BLI_addtail(&wm->operators, op);
@@ -2526,15 +2528,15 @@ static int repeat_history_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_repeat_history(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Repeat History";
- ot->description= "Display menu for previous actions performed";
- ot->idname= "SCREEN_OT_repeat_history";
+ ot->name = "Repeat History";
+ ot->description = "Display menu for previous actions performed";
+ ot->idname = "SCREEN_OT_repeat_history";
/* api callbacks */
- ot->invoke= repeat_history_invoke;
- ot->exec= repeat_history_exec;
+ ot->invoke = repeat_history_invoke;
+ ot->exec = repeat_history_exec;
- ot->poll= ED_operator_screenactive;
+ ot->poll = ED_operator_screenactive;
RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "", 0, 1000);
}
@@ -2545,7 +2547,7 @@ static int redo_last_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED
{
wmOperator *lastop= WM_operator_last_redo(C);
- if(lastop)
+ if (lastop)
WM_operator_redo_popup(C, lastop);
return OPERATOR_CANCELLED;
@@ -2554,14 +2556,14 @@ static int redo_last_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED
static void SCREEN_OT_redo_last(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Redo Last";
- ot->description= "Display menu for last action performed";
- ot->idname= "SCREEN_OT_redo_last";
+ ot->name = "Redo Last";
+ ot->description = "Display menu for last action performed";
+ ot->idname = "SCREEN_OT_redo_last";
/* api callbacks */
- ot->invoke= redo_last_invoke;
+ ot->invoke = redo_last_invoke;
- ot->poll= ED_operator_screenactive;
+ ot->poll = ED_operator_screenactive;
}
/* ************** region four-split operator ***************************** */
@@ -2572,24 +2574,24 @@ static int region_quadview_exec(bContext *C, wmOperator *op)
ARegion *ar= CTX_wm_region(C);
/* some rules... */
- if(ar->regiontype!=RGN_TYPE_WINDOW)
+ if (ar->regiontype!=RGN_TYPE_WINDOW)
BKE_report(op->reports, RPT_ERROR, "Only window region can be 4-splitted");
- else if(ar->alignment==RGN_ALIGN_QSPLIT) {
+ else if (ar->alignment==RGN_ALIGN_QSPLIT) {
ScrArea *sa= CTX_wm_area(C);
ARegion *arn;
/* keep current region */
ar->alignment= 0;
- if(sa->spacetype==SPACE_VIEW3D) {
+ if (sa->spacetype==SPACE_VIEW3D) {
RegionView3D *rv3d= ar->regiondata;
rv3d->viewlock= 0;
rv3d->rflag &= ~RV3D_CLIPPING;
}
- for(ar= sa->regionbase.first; ar; ar= arn) {
+ for (ar= sa->regionbase.first; ar; ar= arn) {
arn= ar->next;
- if(ar->alignment==RGN_ALIGN_QSPLIT) {
+ if (ar->alignment==RGN_ALIGN_QSPLIT) {
ED_region_exit(C, ar);
BKE_area_region_free(sa->type, ar);
BLI_remlink(&sa->regionbase, ar);
@@ -2599,7 +2601,7 @@ static int region_quadview_exec(bContext *C, wmOperator *op)
ED_area_tag_redraw(sa);
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
}
- else if(ar->next)
+ else if (ar->next)
BKE_report(op->reports, RPT_ERROR, "Only last region can be 4-splitted");
else {
ScrArea *sa= CTX_wm_area(C);
@@ -2608,13 +2610,13 @@ static int region_quadview_exec(bContext *C, wmOperator *op)
ar->alignment= RGN_ALIGN_QSPLIT;
- for(count=0; count<3; count++) {
+ for (count=0; count<3; count++) {
newar= BKE_area_region_copy(sa->type, ar);
BLI_addtail(&sa->regionbase, newar);
}
/* lock views and set them */
- if(sa->spacetype==SPACE_VIEW3D) {
+ if (sa->spacetype==SPACE_VIEW3D) {
/* run ED_view3d_lock() so the correct 'rv3d->viewquat' is set,
* otherwise when restoring rv3d->localvd the 'viewquat' won't
* match the 'view', set on entering localview See: [#26315],
@@ -2657,15 +2659,15 @@ static int region_quadview_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_region_quadview(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Quad View";
- ot->description= "Split selected area into camera, front, right & top views";
- ot->idname= "SCREEN_OT_region_quadview";
+ ot->name = "Toggle Quad View";
+ ot->description = "Split selected area into camera, front, right & top views";
+ ot->idname = "SCREEN_OT_region_quadview";
/* api callbacks */
- // ot->invoke= WM_operator_confirm;
- ot->exec= region_quadview_exec;
- ot->poll= ED_operator_region_view3d_active;
- ot->flag= 0;
+ // ot->invoke = WM_operator_confirm;
+ ot->exec = region_quadview_exec;
+ ot->poll = ED_operator_region_view3d_active;
+ ot->flag = 0;
}
@@ -2680,13 +2682,13 @@ static int region_flip_exec(bContext *C, wmOperator *UNUSED(op))
if (!ar)
return OPERATOR_CANCELLED;
- if(ar->alignment==RGN_ALIGN_TOP)
+ if (ar->alignment==RGN_ALIGN_TOP)
ar->alignment= RGN_ALIGN_BOTTOM;
- else if(ar->alignment==RGN_ALIGN_BOTTOM)
+ else if (ar->alignment==RGN_ALIGN_BOTTOM)
ar->alignment= RGN_ALIGN_TOP;
- else if(ar->alignment==RGN_ALIGN_LEFT)
+ else if (ar->alignment==RGN_ALIGN_LEFT)
ar->alignment= RGN_ALIGN_RIGHT;
- else if(ar->alignment==RGN_ALIGN_RIGHT)
+ else if (ar->alignment==RGN_ALIGN_RIGHT)
ar->alignment= RGN_ALIGN_LEFT;
ED_area_tag_redraw(CTX_wm_area(C));
@@ -2699,13 +2701,13 @@ static int region_flip_exec(bContext *C, wmOperator *UNUSED(op))
static void SCREEN_OT_region_flip(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Flip Region";
- ot->idname= "SCREEN_OT_region_flip";
+ ot->name = "Flip Region";
+ ot->idname = "SCREEN_OT_region_flip";
/* api callbacks */
- ot->exec= region_flip_exec;
- ot->poll= ED_operator_areaactive;
- ot->flag= 0;
+ ot->exec = region_flip_exec;
+ ot->poll = ED_operator_areaactive;
+ ot->flag = 0;
}
/* ************** header flip operator ***************************** */
@@ -2718,23 +2720,23 @@ static int header_flip_exec(bContext *C, wmOperator *UNUSED(op))
/* find the header region
* - try context first, but upon failing, search all regions in area...
*/
- if((ar == NULL) || (ar->regiontype != RGN_TYPE_HEADER)) {
+ if ((ar == NULL) || (ar->regiontype != RGN_TYPE_HEADER)) {
ScrArea *sa= CTX_wm_area(C);
ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
/* don't do anything if no region */
- if(ar == NULL)
+ if (ar == NULL)
return OPERATOR_CANCELLED;
}
/* copied from SCREEN_OT_region_flip */
- if(ar->alignment==RGN_ALIGN_TOP)
+ if (ar->alignment==RGN_ALIGN_TOP)
ar->alignment= RGN_ALIGN_BOTTOM;
- else if(ar->alignment==RGN_ALIGN_BOTTOM)
+ else if (ar->alignment==RGN_ALIGN_BOTTOM)
ar->alignment= RGN_ALIGN_TOP;
- else if(ar->alignment==RGN_ALIGN_LEFT)
+ else if (ar->alignment==RGN_ALIGN_LEFT)
ar->alignment= RGN_ALIGN_RIGHT;
- else if(ar->alignment==RGN_ALIGN_RIGHT)
+ else if (ar->alignment==RGN_ALIGN_RIGHT)
ar->alignment= RGN_ALIGN_LEFT;
ED_area_tag_redraw(CTX_wm_area(C));
@@ -2748,14 +2750,14 @@ static int header_flip_exec(bContext *C, wmOperator *UNUSED(op))
static void SCREEN_OT_header_flip(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Flip Header Region";
- ot->idname= "SCREEN_OT_header_flip";
+ ot->name = "Flip Header Region";
+ ot->idname = "SCREEN_OT_header_flip";
/* api callbacks */
- ot->exec= header_flip_exec;
+ ot->exec = header_flip_exec;
- ot->poll= ED_operator_areaactive;
- ot->flag= 0;
+ ot->poll = ED_operator_areaactive;
+ ot->flag = 0;
}
/* ************** header tools operator ***************************** */
@@ -2794,12 +2796,12 @@ static int header_toolbox_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *U
static void SCREEN_OT_header_toolbox(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Header Toolbox";
- ot->description="Display header region toolbox";
- ot->idname= "SCREEN_OT_header_toolbox";
+ ot->name = "Header Toolbox";
+ ot->description = "Display header region toolbox";
+ ot->idname = "SCREEN_OT_header_toolbox";
/* api callbacks */
- ot->invoke= header_toolbox_invoke;
+ ot->invoke = header_toolbox_invoke;
}
/* ****************** anim player, with timer ***************** */
@@ -2818,49 +2820,49 @@ static int match_area_with_refresh(int spacetype, int refresh)
static int match_region_with_redraws(int spacetype, int regiontype, int redraws)
{
- if(regiontype==RGN_TYPE_WINDOW) {
+ if (regiontype==RGN_TYPE_WINDOW) {
switch (spacetype) {
case SPACE_VIEW3D:
- if(redraws & TIME_ALL_3D_WIN)
+ if (redraws & TIME_ALL_3D_WIN)
return 1;
break;
case SPACE_IPO:
case SPACE_ACTION:
case SPACE_NLA:
- if(redraws & TIME_ALL_ANIM_WIN)
+ if (redraws & TIME_ALL_ANIM_WIN)
return 1;
break;
case SPACE_TIME:
/* if only 1 window or 3d windows, we do timeline too */
- if(redraws & (TIME_ALL_ANIM_WIN|TIME_REGION|TIME_ALL_3D_WIN))
+ if (redraws & (TIME_ALL_ANIM_WIN|TIME_REGION|TIME_ALL_3D_WIN))
return 1;
break;
case SPACE_BUTS:
- if(redraws & TIME_ALL_BUTS_WIN)
+ if (redraws & TIME_ALL_BUTS_WIN)
return 1;
break;
case SPACE_SEQ:
- if(redraws & (TIME_SEQ|TIME_ALL_ANIM_WIN))
+ if (redraws & (TIME_SEQ|TIME_ALL_ANIM_WIN))
return 1;
break;
case SPACE_NODE:
- if(redraws & (TIME_NODES))
+ if (redraws & (TIME_NODES))
return 1;
break;
case SPACE_IMAGE:
- if(redraws & TIME_ALL_IMAGE_WIN)
+ if (redraws & TIME_ALL_IMAGE_WIN)
return 1;
break;
case SPACE_CLIP:
- if(redraws & TIME_CLIPS)
+ if (redraws & TIME_CLIPS)
return 1;
break;
}
}
- else if(regiontype==RGN_TYPE_UI) {
- if(spacetype==SPACE_CLIP) {
+ else if (regiontype==RGN_TYPE_UI) {
+ if (spacetype==SPACE_CLIP) {
/* Track Preview button is on Properties Editor in SpaceClip,
* and it's very common case when users want it be refreshing
* during playback, so asking people to enable special option
@@ -2869,17 +2871,17 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws)
return 1;
}
- if(redraws & TIME_ALL_BUTS_WIN)
+ if (redraws & TIME_ALL_BUTS_WIN)
return 1;
}
- else if(regiontype==RGN_TYPE_HEADER) {
- if(spacetype==SPACE_TIME)
+ else if (regiontype==RGN_TYPE_HEADER) {
+ if (spacetype==SPACE_TIME)
return 1;
}
else if (regiontype==RGN_TYPE_PREVIEW) {
switch (spacetype) {
case SPACE_SEQ:
- if(redraws & (TIME_SEQ|TIME_ALL_ANIM_WIN))
+ if (redraws & (TIME_SEQ|TIME_ALL_ANIM_WIN))
return 1;
break;
case SPACE_CLIP:
@@ -2893,7 +2895,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
{
bScreen *screen= CTX_wm_screen(C);
- if(screen->animtimer && screen->animtimer==event->customdata) {
+ if (screen->animtimer && screen->animtimer==event->customdata) {
Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
wmTimer *wt= screen->animtimer;
@@ -2915,13 +2917,12 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
}
else {
if (sync) {
- int step = floor(wt->duration * FPS);
+ int step = floor((wt->duration - sad->last_duration) * FPS);
/* skip frames */
if (sad->flag & ANIMPLAY_FLAG_REVERSE)
scene->r.cfra -= step;
else
scene->r.cfra += step;
- wt->duration -= ((double)step)/FPS;
}
else {
/* one frame +/- */
@@ -2932,6 +2933,8 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
}
}
+ sad->last_duration = wt->duration;
+
/* reset 'jumped' flag before checking if we need to jump... */
sad->flag &= ~ANIMPLAY_FLAG_JUMPED;
@@ -2967,7 +2970,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
}
/* next frame overriden by user action (pressed jump to first/last frame) */
- if(sad->flag & ANIMPLAY_FLAG_USE_NEXT_FRAME) {
+ if (sad->flag & ANIMPLAY_FLAG_USE_NEXT_FRAME) {
scene->r.cfra = sad->nextfra;
sad->flag &= ~ANIMPLAY_FLAG_USE_NEXT_FRAME;
sad->flag |= ANIMPLAY_FLAG_JUMPED;
@@ -3013,14 +3016,14 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
static void SCREEN_OT_animation_step(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Animation Step";
- ot->description= "Step through animation by position";
- ot->idname= "SCREEN_OT_animation_step";
+ ot->name = "Animation Step";
+ ot->description = "Step through animation by position";
+ ot->idname = "SCREEN_OT_animation_step";
/* api callbacks */
- ot->invoke= screen_animation_step;
+ ot->invoke = screen_animation_step;
- ot->poll= ED_operator_screenactive_norender;
+ ot->poll = ED_operator_screenactive_norender;
}
@@ -3070,14 +3073,14 @@ static int screen_animation_play_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_animation_play(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Play Animation";
- ot->description= "Play animation";
- ot->idname= "SCREEN_OT_animation_play";
+ ot->name = "Play Animation";
+ ot->description = "Play animation";
+ ot->idname = "SCREEN_OT_animation_play";
/* api callbacks */
- ot->exec= screen_animation_play_exec;
+ ot->exec = screen_animation_play_exec;
- ot->poll= ED_operator_screenactive_norender;
+ ot->poll = ED_operator_screenactive_norender;
RNA_def_boolean(ot->srna, "reverse", 0, "Play in Reverse", "Animation is played backwards");
RNA_def_boolean(ot->srna, "sync", 0, "Sync", "Drop frames to maintain framerate");
@@ -3088,7 +3091,7 @@ static int screen_animation_cancel_exec(bContext *C, wmOperator *op)
bScreen *screen= CTX_wm_screen(C);
if (screen->animtimer) {
- if(RNA_boolean_get(op->ptr, "restore_frame")) {
+ if (RNA_boolean_get(op->ptr, "restore_frame")) {
ScreenAnimData *sad= screen->animtimer->customdata;
Scene *scene= CTX_data_scene(C);
@@ -3110,14 +3113,14 @@ static int screen_animation_cancel_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_animation_cancel(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Cancel Animation";
- ot->description= "Cancel animation, returning to the original frame";
- ot->idname= "SCREEN_OT_animation_cancel";
+ ot->name = "Cancel Animation";
+ ot->description = "Cancel animation, returning to the original frame";
+ ot->idname = "SCREEN_OT_animation_cancel";
/* api callbacks */
- ot->exec= screen_animation_cancel_exec;
+ ot->exec = screen_animation_cancel_exec;
- ot->poll= ED_operator_screenactive;
+ ot->poll = ED_operator_screenactive;
RNA_def_boolean(ot->srna, "restore_frame", TRUE, "Restore Frame", "Restore the frame when animation was initialized");
}
@@ -3147,9 +3150,9 @@ static int border_select_do(bContext *C, wmOperator *op)
{
int event_type= RNA_int_get(op->ptr, "event_type");
- if(event_type==LEFTMOUSE)
+ if (event_type==LEFTMOUSE)
printf("border select do select\n");
- else if(event_type==RIGHTMOUSE)
+ else if (event_type==RIGHTMOUSE)
printf("border select deselect\n");
else
printf("border select do something\n");
@@ -3160,16 +3163,16 @@ static int border_select_do(bContext *C, wmOperator *op)
static void SCREEN_OT_border_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border select";
- ot->idname= "SCREEN_OT_border_select";
+ ot->name = "Border select";
+ ot->idname = "SCREEN_OT_border_select";
/* api callbacks */
- ot->exec= border_select_do;
- ot->invoke= WM_border_select_invoke;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->exec = border_select_do;
+ ot->invoke = WM_border_select_invoke;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= ED_operator_areaactive;
+ ot->poll = ED_operator_areaactive;
/* rna */
RNA_def_int(ot->srna, "event_type", 0, INT_MIN, INT_MAX, "Event Type", "", INT_MIN, INT_MAX);
@@ -3206,13 +3209,13 @@ static int fullscreen_back_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_back_to_previous(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Back to Previous Screen";
- ot->description= "Revert back to the original screen layout, before fullscreen area overlay";
- ot->idname= "SCREEN_OT_back_to_previous";
+ ot->name = "Back to Previous Screen";
+ ot->description = "Revert back to the original screen layout, before fullscreen area overlay";
+ ot->idname = "SCREEN_OT_back_to_previous";
/* api callbacks */
- ot->exec= fullscreen_back_exec;
- ot->poll= ED_operator_screenactive;
+ ot->exec = fullscreen_back_exec;
+ ot->poll = ED_operator_screenactive;
}
/* *********** show user pref window ****** */
@@ -3226,10 +3229,10 @@ static int userpref_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *ev
sizey= 480;
/* some magic to calculate postition */
- rect.xmin= event->x + CTX_wm_window(C)->posx - sizex/2;
- rect.ymin= event->y + CTX_wm_window(C)->posy - sizey/2;
- rect.xmax= rect.xmin + sizex;
- rect.ymax= rect.ymin + sizey;
+ rect.xmin = event->x + CTX_wm_window(C)->posx - sizex/2;
+ rect.ymin = event->y + CTX_wm_window(C)->posy - sizey/2;
+ rect.xmax = rect.xmin + sizex;
+ rect.ymax = rect.ymin + sizey;
/* changes context! */
WM_window_open_temp(C, &rect, WM_WINDOW_USERPREFS);
@@ -3241,13 +3244,13 @@ static int userpref_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *ev
static void SCREEN_OT_userpref_show(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Show/Hide User Preferences";
- ot->description= "Show/hide user preferences";
- ot->idname= "SCREEN_OT_userpref_show";
+ ot->name = "Show/Hide User Preferences";
+ ot->description = "Show/hide user preferences";
+ ot->idname = "SCREEN_OT_userpref_show";
/* api callbacks */
- ot->invoke= userpref_show_invoke;
- ot->poll= ED_operator_screenactive;
+ ot->invoke = userpref_show_invoke;
+ ot->poll = ED_operator_screenactive;
}
/********************* new screen operator *********************/
@@ -3266,16 +3269,16 @@ static int screen_new_exec(bContext *C, wmOperator *UNUSED(op))
static void SCREEN_OT_new(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "New Screen";
- ot->description= "Add a new screen";
- ot->idname= "SCREEN_OT_new";
+ ot->name = "New Screen";
+ ot->description = "Add a new screen";
+ ot->idname = "SCREEN_OT_new";
/* api callbacks */
- ot->exec= screen_new_exec;
- ot->poll= WM_operator_winactive;
+ ot->exec = screen_new_exec;
+ ot->poll = WM_operator_winactive;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************* delete screen operator *********************/
@@ -3292,15 +3295,15 @@ static int screen_delete_exec(bContext *C, wmOperator *UNUSED(op))
static void SCREEN_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Screen"; //was scene
- ot->description= "Delete active screen";
- ot->idname= "SCREEN_OT_delete";
+ ot->name = "Delete Screen"; //was scene
+ ot->description = "Delete active screen";
+ ot->idname = "SCREEN_OT_delete";
/* api callbacks */
- ot->exec= screen_delete_exec;
+ ot->exec = screen_delete_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************* new scene operator *********************/
@@ -3311,17 +3314,17 @@ static int scene_new_exec(bContext *C, wmOperator *op)
Main *bmain= CTX_data_main(C);
int type= RNA_enum_get(op->ptr, "type");
- if(type == SCE_COPY_NEW) {
+ if (type == SCE_COPY_NEW) {
newscene= add_scene("Scene");
}
else { /* different kinds of copying */
newscene= copy_scene(scene, type);
/* these can't be handled in blenkernel curently, so do them here */
- if(type == SCE_COPY_LINK_DATA) {
+ if (type == SCE_COPY_LINK_DATA) {
ED_object_single_users(bmain, newscene, 0);
}
- else if(type == SCE_COPY_FULL) {
+ else if (type == SCE_COPY_FULL) {
ED_object_single_users(bmain, newscene, 1);
}
}
@@ -3344,19 +3347,19 @@ static void SCENE_OT_new(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "New Scene";
- ot->description= "Add new scene by type";
- ot->idname= "SCENE_OT_new";
+ ot->name = "New Scene";
+ ot->description = "Add new scene by type";
+ ot->idname = "SCENE_OT_new";
/* api callbacks */
- ot->exec= scene_new_exec;
- ot->invoke= WM_menu_invoke;
+ ot->exec = scene_new_exec;
+ ot->invoke = WM_menu_invoke;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "");
}
/********************* delete scene operator *********************/
@@ -3367,7 +3370,7 @@ static int scene_delete_exec(bContext *C, wmOperator *UNUSED(op))
ED_screen_delete_scene(C, scene);
- if(G.f & G_DEBUG)
+ if (G.f & G_DEBUG)
printf("scene delete %p\n", scene);
WM_event_add_notifier(C, NC_SCENE|NA_REMOVED, scene);
@@ -3378,15 +3381,15 @@ static int scene_delete_exec(bContext *C, wmOperator *UNUSED(op))
static void SCENE_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Scene";
- ot->description= "Delete active scene";
- ot->idname= "SCENE_OT_delete";
+ ot->name = "Delete Scene";
+ ot->description = "Delete active scene";
+ ot->idname = "SCENE_OT_delete";
/* api callbacks */
- ot->exec= scene_delete_exec;
+ ot->exec = scene_delete_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* **************** Assigning operatortypes to global list, adding handlers **************** */
@@ -3471,8 +3474,8 @@ static void keymap_modal_set(wmKeyConfig *keyconf)
static int open_file_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))
{
- if(drag->type==WM_DRAG_PATH) {
- if(drag->icon==ICON_FILE_BLEND)
+ if (drag->type==WM_DRAG_PATH) {
+ if (drag->icon==ICON_FILE_BLEND)
return 1;
}
return 0;
@@ -3494,7 +3497,7 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
wmKeyMapItem *kmi;
/* Screen Editing ------------------------------------------------ */
- keymap= WM_keymap_find(keyconf, "Screen Editing", 0, 0);
+ keymap = WM_keymap_find(keyconf, "Screen Editing", 0, 0);
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_actionzone", LEFTMOUSE, KM_PRESS, 0, 0)->ptr, "modifier", 0);
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_actionzone", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "modifier", 1);
@@ -3513,12 +3516,12 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
/* Header Editing ------------------------------------------------ */
- keymap= WM_keymap_find(keyconf, "Header", 0, 0);
+ keymap = WM_keymap_find(keyconf, "Header", 0, 0);
WM_keymap_add_item(keymap, "SCREEN_OT_header_toolbox", RIGHTMOUSE, KM_PRESS, 0, 0);
/* Screen General ------------------------------------------------ */
- keymap= WM_keymap_find(keyconf, "Screen", 0, 0);
+ keymap = WM_keymap_find(keyconf, "Screen", 0, 0);
/* standard timers */
WM_keymap_add_item(keymap, "SCREEN_OT_animation_step", TIMER0, KM_ANY, KM_ANY, 0);
@@ -3572,7 +3575,7 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
/* Anim Playback ------------------------------------------------ */
- keymap= WM_keymap_find(keyconf, "Frames", 0, 0);
+ keymap = WM_keymap_find(keyconf, "Frames", 0, 0);
/* frame offsets */
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", UPARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "delta", 10);
@@ -3588,10 +3591,15 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
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);
- WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", UPARROWKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", DOWNARROWKEY, KM_PRESS, 0, 0)->ptr, "next", FALSE);
+ kmi = WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", UPARROWKEY, KM_PRESS, 0, 0);
+ 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);
- WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", MEDIALAST, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", MEDIALAST, KM_PRESS, 0, 0);
+ 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);
@@ -3605,7 +3613,7 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
/* Alternative keys for animation and sequencer playing */
#if 0 // XXX: disabled for restoring later... bad implementation
- keymap= WM_keymap_find(keyconf, "Frames", 0, 0);
+ 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);
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index deeb3061ad5..e12e6b0ef82 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -106,14 +106,14 @@ static int screenshot_data_create(bContext *C, wmOperator *op)
dumprect= screenshot(C, &dumpsx, &dumpsy);
- if(dumprect) {
+ if (dumprect) {
ScreenshotData *scd= MEM_callocN(sizeof(ScreenshotData), "screenshot");
ScrArea *sa= CTX_wm_area(C);
scd->dumpsx= dumpsx;
scd->dumpsy= dumpsy;
scd->dumprect= dumprect;
- if(sa)
+ if (sa)
scd->crop= sa->totrct;
op->customdata= scd;
@@ -129,8 +129,8 @@ static void screenshot_data_free(wmOperator *op)
{
ScreenshotData *scd= op->customdata;
- if(scd) {
- if(scd->dumprect)
+ if (scd) {
+ if (scd->dumprect)
MEM_freeN(scd->dumprect);
MEM_freeN(scd);
op->customdata= NULL;
@@ -143,8 +143,8 @@ static void screenshot_crop(ImBuf *ibuf, rcti crop)
unsigned int *from= ibuf->rect + crop.ymin*ibuf->x + crop.xmin;
int y, cropw= crop.xmax - crop.xmin, croph = crop.ymax - crop.ymin;
- if(cropw > 0 && croph > 0) {
- for(y=0; y<croph; y++, to+=cropw, from+=ibuf->x)
+ if (cropw > 0 && croph > 0) {
+ for (y=0; y<croph; y++, to+=cropw, from+=ibuf->x)
memmove(to, from, sizeof(unsigned int)*cropw);
ibuf->x= cropw;
@@ -156,14 +156,14 @@ static int screenshot_exec(bContext *C, wmOperator *op)
{
ScreenshotData *scd= op->customdata;
- if(scd == NULL) {
+ if (scd == NULL) {
/* when running exec directly */
screenshot_data_create(C, op);
scd= op->customdata;
}
- if(scd) {
- if(scd->dumprect) {
+ if (scd) {
+ if (scd->dumprect) {
Scene *scene= CTX_data_scene(C);
ImBuf *ibuf;
char path[FILE_MAX];
@@ -174,15 +174,15 @@ static int screenshot_exec(bContext *C, wmOperator *op)
BLI_path_abs(path, G.main->name);
/* BKE_add_image_extension() checks for if extension was already set */
- if(scene->r.scemode & R_EXTENSION)
- if(strlen(path)<FILE_MAX-5)
+ if (scene->r.scemode & R_EXTENSION)
+ if (strlen(path)<FILE_MAX-5)
BKE_add_image_extension(path, scene->r.im_format.imtype);
ibuf= IMB_allocImBuf(scd->dumpsx, scd->dumpsy, 24, 0);
ibuf->rect= scd->dumprect;
/* crop to show only single editor */
- if(!RNA_boolean_get(op->ptr, "full"))
+ if (!RNA_boolean_get(op->ptr, "full"))
screenshot_crop(ibuf, scd->crop);
BKE_write_ibuf(ibuf, path, &scene->r.im_format);
@@ -197,8 +197,8 @@ static int screenshot_exec(bContext *C, wmOperator *op)
static int screenshot_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
- if(screenshot_data_create(C, op)) {
- if(RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (screenshot_data_create(C, op)) {
+ if (RNA_struct_property_is_set(op->ptr, "filepath"))
return screenshot_exec(C, op);
RNA_string_set(op->ptr, "filepath", G.ima);
@@ -218,15 +218,15 @@ static int screenshot_cancel(bContext *UNUSED(C), wmOperator *op)
void SCREEN_OT_screenshot(wmOperatorType *ot)
{
- ot->name= "Save Screenshot"; /* weak: opname starting with 'save' makes filewindow give save-over */
- ot->idname= "SCREEN_OT_screenshot";
+ ot->name = "Save Screenshot"; /* weak: opname starting with 'save' makes filewindow give save-over */
+ ot->idname = "SCREEN_OT_screenshot";
- ot->invoke= screenshot_invoke;
- ot->exec= screenshot_exec;
- ot->poll= WM_operator_winactive;
- ot->cancel= screenshot_cancel;
+ ot->invoke = screenshot_invoke;
+ ot->exec = screenshot_exec;
+ ot->poll = WM_operator_winactive;
+ ot->cancel = screenshot_cancel;
- ot->flag= 0;
+ ot->flag = 0;
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
RNA_def_boolean(ot->srna, "full", 1, "Full Screen", "");
@@ -249,7 +249,7 @@ static void screenshot_freejob(void *sjv)
{
ScreenshotJob *sj= sjv;
- if(sj->dumprect)
+ if (sj->dumprect)
MEM_freeN(sj->dumprect);
MEM_freeN(sj);
@@ -262,7 +262,7 @@ static void screenshot_updatejob(void *sjv)
ScreenshotJob *sj= sjv;
unsigned int *dumprect;
- if(sj->dumprect==NULL) {
+ if (sj->dumprect==NULL) {
dumprect= MEM_mallocN(sizeof(int) * sj->dumpsx * sj->dumpsy, "dumprect");
glReadPixels(sj->x, sj->y, sj->dumpsx, sj->dumpsy, GL_RGBA, GL_UNSIGNED_BYTE, dumprect);
glFinish();
@@ -283,8 +283,8 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
rd.frs_sec= U.scrcastfps;
rd.frs_sec_base= 1.0f;
- if(BKE_imtype_is_movie(rd.im_format.imtype)) {
- if(!mh->start_movie(sj->scene, &rd, sj->dumpsx, sj->dumpsy, &sj->reports)) {
+ if (BKE_imtype_is_movie(rd.im_format.imtype)) {
+ if (!mh->start_movie(sj->scene, &rd, sj->dumpsx, sj->dumpsy, &sj->reports)) {
printf("screencast job stopped\n");
return;
}
@@ -297,18 +297,20 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
*do_update= 1; // wait for opengl rect
- while(*stop==0) {
+ while (*stop==0) {
- if(sj->dumprect) {
+ if (sj->dumprect) {
- if(mh) {
- if(mh->append_movie(&rd, rd.sfra, rd.cfra, (int *)sj->dumprect,
+ if (mh) {
+ if (mh->append_movie(&rd, rd.sfra, rd.cfra, (int *)sj->dumprect,
sj->dumpsx, sj->dumpsy, &sj->reports))
{
BKE_reportf(&sj->reports, RPT_INFO, "Appended frame: %d", rd.cfra);
printf("Appended frame %d\n", rd.cfra);
- } else
+ }
+ else {
break;
+ }
}
else {
ImBuf *ibuf= IMB_allocImBuf(sj->dumpsx, sj->dumpsy, rd.im_format.planes, 0);
@@ -320,7 +322,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
ibuf->rect= sj->dumprect;
ok= BKE_write_ibuf(ibuf, name, &rd.im_format);
- if(ok==0) {
+ if (ok==0) {
printf("Write error: cannot save %s\n", name);
BKE_reportf(&sj->reports, RPT_INFO, "Write error: cannot save %s\n", name);
break;
@@ -346,7 +348,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
PIL_sleep_ms(U.scrcastwait);
}
- if(mh)
+ if (mh)
mh->end_movie();
BKE_report(&sj->reports, RPT_INFO, "Screencast job stopped");
@@ -359,7 +361,7 @@ static int screencast_exec(bContext *C, wmOperator *op)
ScreenshotJob *sj= MEM_callocN(sizeof(ScreenshotJob), "screenshot job");
/* setup sj */
- if(RNA_boolean_get(op->ptr, "full")) {
+ if (RNA_boolean_get(op->ptr, "full")) {
wmWindow *win= CTX_wm_window(C);
sj->x= 0;
sj->y= 0;
@@ -392,14 +394,14 @@ static int screencast_exec(bContext *C, wmOperator *op)
void SCREEN_OT_screencast(wmOperatorType *ot)
{
- ot->name= "Make Screencast";
- ot->idname= "SCREEN_OT_screencast";
+ ot->name = "Make Screencast";
+ ot->idname = "SCREEN_OT_screencast";
- ot->invoke= WM_operator_confirm;
- ot->exec= screencast_exec;
- ot->poll= WM_operator_winactive;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = screencast_exec;
+ ot->poll = WM_operator_winactive;
- ot->flag= 0;
+ ot->flag = 0;
RNA_def_property(ot->srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_boolean(ot->srna, "full", 1, "Full Screen", "");
diff --git a/source/blender/editors/sculpt_paint/CMakeLists.txt b/source/blender/editors/sculpt_paint/CMakeLists.txt
index 8a6a236d10f..cf8179b4d0e 100644
--- a/source/blender/editors/sculpt_paint/CMakeLists.txt
+++ b/source/blender/editors/sculpt_paint/CMakeLists.txt
@@ -40,6 +40,7 @@ set(INC_SYS
set(SRC
paint_cursor.c
+ paint_hide.c
paint_image.c
paint_ops.c
paint_stroke.c
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index ea1e3eb47af..be50b842914 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -341,7 +341,7 @@ static int sculpt_get_brush_geometry(bContext* C, ViewContext *vc,
window[0] = x + vc->ar->winrct.xmin;
window[1] = y + vc->ar->winrct.ymin;
- if(vc->obact->sculpt && vc->obact->sculpt->pbvh &&
+ if (vc->obact->sculpt && vc->obact->sculpt->pbvh &&
sculpt_stroke_get_location(C, location, window)) {
*pixel_radius =
project_brush_radius(vc,
@@ -375,7 +375,7 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush,
rctf quad;
/* check for overlay mode */
- if(!(brush->flag & BRUSH_TEXTURE_OVERLAY) ||
+ if (!(brush->flag & BRUSH_TEXTURE_OVERLAY) ||
!(ELEM(brush->mtex.brush_map_mode, MTEX_MAP_MODE_FIXED, MTEX_MAP_MODE_TILED)))
return;
@@ -392,7 +392,7 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush,
GL_VIEWPORT_BIT|
GL_TEXTURE_BIT);
- if(load_tex(sd, brush, vc)) {
+ if (load_tex(sd, brush, vc)) {
glEnable(GL_BLEND);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
@@ -403,7 +403,7 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush,
glPushMatrix();
glLoadIdentity();
- if(brush->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED) {
+ if (brush->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED) {
/* brush rotation */
glTranslatef(0.5, 0.5, 0);
glRotatef((double)RAD2DEGF((brush->flag & BRUSH_RAKE) ?
@@ -412,13 +412,13 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush,
glTranslatef(-0.5f, -0.5f, 0);
/* scale based on tablet pressure */
- if(sd->draw_pressure && brush_use_size_pressure(vc->scene, brush)) {
+ if (sd->draw_pressure && brush_use_size_pressure(vc->scene, brush)) {
glTranslatef(0.5f, 0.5f, 0);
glScalef(1.0f/sd->pressure_value, 1.0f/sd->pressure_value, 1);
glTranslatef(-0.5f, -0.5f, 0);
}
- if(sd->draw_anchored) {
+ if (sd->draw_anchored) {
const float *aim = sd->anchored_initial_mouse;
const rcti *win = &vc->ar->winrct;
quad.xmin = aim[0]-sd->anchored_size - win->xmin;
@@ -473,12 +473,12 @@ static void paint_cursor_on_hit(Sculpt *sd, Brush *brush, ViewContext *vc,
float unprojected_radius, projected_radius;
/* update the brush's cached 3D radius */
- if(!brush_use_locked_size(vc->scene, brush)) {
+ if (!brush_use_locked_size(vc->scene, brush)) {
/* get 2D brush radius */
- if(sd->draw_anchored)
+ if (sd->draw_anchored)
projected_radius = sd->anchored_size;
else {
- if(brush->flag & BRUSH_ANCHORED)
+ if (brush->flag & BRUSH_ANCHORED)
projected_radius = 8;
else
projected_radius = brush_size(vc->scene, brush);
@@ -489,7 +489,7 @@ static void paint_cursor_on_hit(Sculpt *sd, Brush *brush, ViewContext *vc,
projected_radius);
/* scale 3D brush radius by pressure */
- if(sd->draw_pressure && brush_use_size_pressure(vc->scene, brush))
+ if (sd->draw_pressure && brush_use_size_pressure(vc->scene, brush))
unprojected_radius *= sd->pressure_value;
/* set cached value in either Brush or UnifiedPaintSettings */
@@ -515,7 +515,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
final_radius = brush_size(scene, brush);
/* check that brush drawing is enabled */
- if(!(paint->flags & PAINT_SHOW_BRUSH))
+ if (!(paint->flags & PAINT_SHOW_BRUSH))
return;
/* can't use stroke vc here because this will be called during
@@ -524,7 +524,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
/* TODO: as sculpt and other paint modes are unified, this
* special mode of drawing will go away */
- if(vc.obact->sculpt) {
+ if (vc.obact->sculpt) {
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
float location[3];
int pixel_radius, hit;
@@ -541,7 +541,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
const float dx = sd->last_x - x;
const float dy = sd->last_y - y;
- if(dx*dx + dy*dy >= r*r) {
+ if (dx*dx + dy*dy >= r*r) {
sd->last_angle = atan2(dx, dy);
sd->last_x = u*sd->last_x + v*x;
@@ -555,13 +555,13 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
/* draw overlay */
paint_draw_alpha_overlay(sd, brush, &vc, x, y);
- if(brush_use_locked_size(scene, brush))
+ if (brush_use_locked_size(scene, brush))
brush_set_size(scene, brush, pixel_radius);
/* check if brush is subtracting, use different color then */
/* TODO: no way currently to know state of pen flip or
* invert key modifier without starting a stroke */
- if((!(brush->flag & BRUSH_INVERTED) ^
+ if ((!(brush->flag & BRUSH_INVERTED) ^
!(brush->flag & BRUSH_DIR_IN)) &&
ELEM5(brush->sculpt_tool, SCULPT_TOOL_DRAW,
SCULPT_TOOL_INFLATE, SCULPT_TOOL_CLAY,
@@ -569,10 +569,10 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
outline_col = brush->sub_col;
/* only do if brush is over the mesh */
- if(hit)
+ if (hit)
paint_cursor_on_hit(sd, brush, &vc, location);
- if(sd->draw_anchored) {
+ if (sd->draw_anchored) {
final_radius = sd->anchored_size;
translation[0] = sd->anchored_initial_mouse[0] - vc.ar->winrct.xmin;
translation[1] = sd->anchored_initial_mouse[1] - vc.ar->winrct.ymin;
@@ -602,6 +602,6 @@ void paint_cursor_start(bContext *C, int (*poll)(bContext *C))
{
Paint *p = paint_get_active(CTX_data_scene(C));
- if(p && !p->paint_cursor)
+ if (p && !p->paint_cursor)
p->paint_cursor = WM_paint_cursor_activate(CTX_wm_manager(C), poll, paint_draw_cursor, NULL);
}
diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c
new file mode 100644
index 00000000000..fcf7d2eba68
--- /dev/null
+++ b/source/blender/editors/sculpt_paint/paint_hide.c
@@ -0,0 +1,392 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2010 by Nicholas Bishop
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ * Implements the PBVH node hiding operator
+ *
+ */
+
+/** \file blender/editors/sculpt_paint/paint_hide.c
+ * \ingroup edsculpt
+ */
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_bitmap.h"
+#include "BLI_listbase.h"
+#include "BLI_math_vector.h"
+#include "BLI_pbvh.h"
+#include "BLI_utildefines.h"
+
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
+
+#include "BKE_context.h"
+#include "BKE_DerivedMesh.h"
+#include "BKE_mesh.h"
+#include "BKE_multires.h"
+#include "BKE_paint.h"
+#include "BKE_subsurf.h"
+
+#include "BIF_glutil.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "ED_screen.h"
+#include "ED_view3d.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "paint_intern.h"
+#include "sculpt_intern.h" /* for undo push */
+
+#include <assert.h>
+
+static int planes_contain_v3(float (*planes)[4], int totplane, const float p[3])
+{
+ int i;
+
+ for (i = 0; i < totplane; i++) {
+ if (dot_v3v3(planes[i], p) + planes[i][3] > 0)
+ return 0;
+ }
+
+ return 1;
+}
+
+/* return true if the element should be hidden/shown */
+static int is_effected(PartialVisArea area,
+ float planes[4][4],
+ const float co[3])
+{
+ if (area == PARTIALVIS_ALL)
+ return 1;
+ else {
+ int inside = planes_contain_v3(planes, 4, co);
+ return ((inside && area == PARTIALVIS_INSIDE) ||
+ (!inside && area == PARTIALVIS_OUTSIDE));
+ }
+}
+
+static void partialvis_update_mesh(Object *ob,
+ PBVH *pbvh,
+ PBVHNode *node,
+ PartialVisAction action,
+ PartialVisArea area,
+ float planes[4][4])
+{
+ MVert *mvert;
+ int *vert_indices;
+ int any_changed = 0, any_visible = 0, totvert, i;
+
+ BLI_pbvh_node_num_verts(pbvh, node, NULL, &totvert);
+ BLI_pbvh_node_get_verts(pbvh, node, &vert_indices, &mvert);
+
+ sculpt_undo_push_node(ob, node, SCULPT_UNDO_HIDDEN);
+
+ for (i = 0; i < totvert; i++) {
+ MVert *v = &mvert[vert_indices[i]];
+
+ /* hide vertex if in the hide volume */
+ if (is_effected(area, planes, v->co)) {
+ if (action == PARTIALVIS_HIDE)
+ v->flag |= ME_HIDE;
+ else
+ v->flag &= ~ME_HIDE;
+ any_changed = 1;
+ }
+
+ if (!(v->flag & ME_HIDE))
+ any_visible = 1;
+ }
+
+ if (any_changed) {
+ BLI_pbvh_node_mark_rebuild_draw(node);
+ BLI_pbvh_node_fully_hidden_set(node, !any_visible);
+ }
+}
+
+/* Hide or show elements in multires grids with a special GridFlags
+ customdata layer. */
+static void partialvis_update_grids(Object *ob,
+ PBVH *pbvh,
+ PBVHNode *node,
+ PartialVisAction action,
+ PartialVisArea area,
+ float planes[4][4])
+{
+ DMGridData **grids;
+ BLI_bitmap *grid_hidden;
+ int any_visible = 0;
+ int *grid_indices, gridsize, totgrid, any_changed, i;
+
+ /* get PBVH data */
+ BLI_pbvh_node_get_grids(pbvh, node,
+ &grid_indices, &totgrid, NULL, &gridsize,
+ &grids, NULL);
+ grid_hidden = BLI_pbvh_grid_hidden(pbvh);
+
+ sculpt_undo_push_node(ob, node, SCULPT_UNDO_HIDDEN);
+
+ any_changed = 0;
+ for (i = 0; i < totgrid; i++) {
+ int any_hidden = 0;
+ int g = grid_indices[i], x, y;
+ BLI_bitmap gh = grid_hidden[g];
+
+ if (!gh) {
+ switch(action) {
+ case PARTIALVIS_HIDE:
+ /* create grid flags data */
+ gh = grid_hidden[g] = BLI_BITMAP_NEW(gridsize * gridsize,
+ "partialvis_update_grids");
+ break;
+ case PARTIALVIS_SHOW:
+ /* entire grid is visible, nothing to show */
+ continue;
+ }
+ }
+ else if (action == PARTIALVIS_SHOW && area == PARTIALVIS_ALL) {
+ /* special case if we're showing all, just free the
+ grid */
+ MEM_freeN(gh);
+ grid_hidden[g] = NULL;
+ any_changed = 1;
+ any_visible = 1;
+ continue;
+ }
+
+ for (y = 0; y < gridsize; y++) {
+ for (x = 0; x < gridsize; x++) {
+ const float *co = grids[g][y * gridsize + x].co;
+
+ /* skip grid element if not in the effected area */
+ if (is_effected(area, planes, co)) {
+ /* set or clear the hide flag */
+ BLI_BITMAP_MODIFY(gh, y * gridsize + x,
+ action == PARTIALVIS_HIDE);
+
+ any_changed = 1;
+ }
+
+ /* keep track of whether any elements are still hidden */
+ if (BLI_BITMAP_GET(gh, y * gridsize + x))
+ any_hidden = 1;
+ else
+ any_visible = 1;
+ }
+ }
+
+ /* if everything in the grid is now visible, free the grid
+ flags */
+ if (!any_hidden) {
+ MEM_freeN(gh);
+ grid_hidden[g] = NULL;
+ }
+ }
+
+ /* mark updates if anything was hidden/shown */
+ if (any_changed) {
+ BLI_pbvh_node_mark_rebuild_draw(node);
+ BLI_pbvh_node_fully_hidden_set(node, !any_visible);
+ multires_mark_as_modified(ob, MULTIRES_HIDDEN_MODIFIED);
+ }
+}
+
+static void rect_from_props(rcti *rect, PointerRNA *ptr)
+{
+ rect->xmin = RNA_int_get(ptr, "xmin");
+ rect->ymin = RNA_int_get(ptr, "ymin");
+ rect->xmax = RNA_int_get(ptr, "xmax");
+ rect->ymax = RNA_int_get(ptr, "ymax");
+}
+
+static void clip_planes_from_rect(bContext *C,
+ float clip_planes[4][4],
+ const rcti *rect)
+{
+ ViewContext vc;
+ BoundBox bb;
+ bglMats mats= {{0}};
+
+ view3d_operator_needs_opengl(C);
+ view3d_set_viewcontext(C, &vc);
+ view3d_get_transformation(vc.ar, vc.rv3d, vc.obact, &mats);
+ ED_view3d_calc_clipping(&bb, clip_planes, &mats, rect);
+ mul_m4_fl(clip_planes, -1.0f);
+}
+
+/* If mode is inside, get all PBVH nodes that lie at least partially
+ inside the clip_planes volume. If mode is outside, get all nodes
+ that lie at least partially outside the volume. If showing all, get
+ all nodes. */
+static void get_pbvh_nodes(PBVH *pbvh,
+ PBVHNode ***nodes,
+ int *totnode,
+ float clip_planes[4][4],
+ PartialVisArea mode)
+{
+ BLI_pbvh_SearchCallback cb;
+
+ /* select search callback */
+ switch(mode) {
+ case PARTIALVIS_INSIDE:
+ cb = BLI_pbvh_node_planes_contain_AABB;
+ break;
+ case PARTIALVIS_OUTSIDE:
+ cb = BLI_pbvh_node_planes_exclude_AABB;
+ break;
+ case PARTIALVIS_ALL:
+ cb = NULL;
+ }
+
+ BLI_pbvh_search_gather(pbvh, cb, clip_planes, nodes, totnode);
+}
+
+static int hide_show_exec(bContext *C, wmOperator *op)
+{
+ ARegion *ar = CTX_wm_region(C);
+ Object *ob = CTX_data_active_object(C);
+ Mesh *me = ob->data;
+ PartialVisAction action;
+ PartialVisArea area;
+ PBVH *pbvh;
+ PBVHNode **nodes;
+ DerivedMesh *dm;
+ PBVHType pbvh_type;
+ float clip_planes[4][4];
+ rcti rect;
+ int totnode, i;
+
+ /* read operator properties */
+ action = RNA_enum_get(op->ptr, "action");
+ area = RNA_enum_get(op->ptr, "area");
+ rect_from_props(&rect, op->ptr);
+
+ clip_planes_from_rect(C, clip_planes, &rect);
+
+ dm = mesh_get_derived_final(CTX_data_scene(C), ob, CD_MASK_BAREMESH);
+ pbvh = dm->getPBVH(ob, dm);
+ ob->sculpt->pbvh = pbvh;
+
+ get_pbvh_nodes(pbvh, &nodes, &totnode, clip_planes, area);
+ pbvh_type = BLI_pbvh_type(pbvh);
+
+ /* start undo */
+ switch(action) {
+ case PARTIALVIS_HIDE:
+ sculpt_undo_push_begin("Hide area");
+ break;
+ case PARTIALVIS_SHOW:
+ sculpt_undo_push_begin("Show area");
+ break;
+ }
+
+ for (i = 0; i < totnode; i++) {
+ switch(pbvh_type) {
+ case PBVH_FACES:
+ partialvis_update_mesh(ob, pbvh, nodes[i], action, area, clip_planes);
+ break;
+ case PBVH_GRIDS:
+ partialvis_update_grids(ob, pbvh, nodes[i], action, area, clip_planes);
+ break;
+ }
+ }
+
+ if (nodes)
+ MEM_freeN(nodes);
+
+ /* end undo */
+ sculpt_undo_push_end();
+
+ /* ensure that edges and faces get hidden as well (not used by
+ sculpt but it looks wrong when entering editmode otherwise) */
+ if (pbvh_type == PBVH_FACES) {
+ mesh_flush_hidden_from_verts(me->mvert, me->mloop,
+ me->medge, me->totedge,
+ me->mpoly, me->totpoly);
+ }
+
+ ED_region_tag_redraw(ar);
+
+ return OPERATOR_FINISHED;
+}
+
+static int hide_show_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ PartialVisArea area = RNA_enum_get(op->ptr, "area");
+
+ if (area != PARTIALVIS_ALL)
+ return WM_border_select_invoke(C, op, event);
+ else
+ return op->type->exec(C, op);
+}
+
+void PAINT_OT_hide_show(struct wmOperatorType *ot)
+{
+ static EnumPropertyItem action_items[] = {
+ {PARTIALVIS_HIDE, "HIDE", 0, "Hide", "Hide vertices"},
+ {PARTIALVIS_SHOW, "SHOW", 0, "Show", "Show vertices"},
+ {0}};
+
+ static EnumPropertyItem area_items[] = {
+ {PARTIALVIS_OUTSIDE, "OUTSIDE", 0, "Outside",
+ "Hide or show vertices outside the selection"},
+ {PARTIALVIS_INSIDE, "INSIDE", 0, "Inside",
+ "Hide or show vertices inside the selection"},
+ {PARTIALVIS_ALL, "ALL", 0, "All",
+ "Hide or show all vertices"},
+ {0}};
+
+ /* identifiers */
+ ot->name = "Hide/Show";
+ ot->idname = "PAINT_OT_hide_show";
+
+ /* api callbacks */
+ ot->invoke = hide_show_invoke;
+ ot->modal = WM_border_select_modal;
+ ot->exec = hide_show_exec;
+ /* sculpt-only for now */
+ ot->poll = sculpt_mode_poll;
+
+ ot->flag = OPTYPE_REGISTER;
+
+ /* rna */
+ RNA_def_enum(ot->srna, "action", action_items, PARTIALVIS_HIDE,
+ "Action", "Whether to hide or show vertices");
+ RNA_def_enum(ot->srna, "area", area_items, PARTIALVIS_INSIDE,
+ "Area", "Which vertices to hide or show");
+
+ RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX);
+}
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index f8a9516c97e..40b04437cdf 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -403,13 +403,14 @@ static void undo_copy_tile(UndoImageTile *tile, ImBuf *tmpibuf, ImBuf *ibuf, int
IMB_rectcpy(tmpibuf, ibuf, 0, 0, tile->x*IMAPAINT_TILE_SIZE,
tile->y*IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE);
- if(ibuf->rect_float) {
+ if (ibuf->rect_float) {
SWAP(void*, tmpibuf->rect_float, tile->rect);
- } else {
+ }
+ else {
SWAP(void*, tmpibuf->rect, tile->rect);
}
- if(restore)
+ if (restore)
IMB_rectcpy(ibuf, tmpibuf, tile->x*IMAPAINT_TILE_SIZE,
tile->y*IMAPAINT_TILE_SIZE, 0, 0, IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE);
}
@@ -421,10 +422,10 @@ static void *image_undo_push_tile(Image *ima, ImBuf *ibuf, ImBuf **tmpibuf, int
int allocsize;
short use_float = ibuf->rect_float ? 1 : 0;
- for(tile=lb->first; tile; tile=tile->next)
- if(tile->x == x_tile && tile->y == y_tile && ima->gen_type == tile->gen_type && ima->source == tile->source)
- if(tile->use_float == use_float)
- if(strcmp(tile->idname, ima->id.name)==0 && strcmp(tile->ibufname, ibuf->name)==0)
+ for (tile=lb->first; tile; tile=tile->next)
+ if (tile->x == x_tile && tile->y == y_tile && ima->gen_type == tile->gen_type && ima->source == tile->source)
+ if (tile->use_float == use_float)
+ if (strcmp(tile->idname, ima->id.name)==0 && strcmp(tile->ibufname, ibuf->name)==0)
return tile->rect;
if (*tmpibuf==NULL)
@@ -463,11 +464,11 @@ static void image_undo_restore(bContext *C, ListBase *lb)
tmpibuf= IMB_allocImBuf(IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, 32,
IB_rectfloat|IB_rect);
- for(tile=lb->first; tile; tile=tile->next) {
+ for (tile=lb->first; tile; tile=tile->next) {
short use_float;
/* find image based on name, pointer becomes invalid with global undo */
- if(ima && strcmp(tile->idname, ima->id.name)==0) {
+ if (ima && strcmp(tile->idname, ima->id.name)==0) {
/* ima is valid */
}
else {
@@ -476,7 +477,7 @@ static void image_undo_restore(bContext *C, ListBase *lb)
ibuf= BKE_image_get_ibuf(ima, NULL);
- if(ima && ibuf && strcmp(tile->ibufname, ibuf->name)!=0) {
+ if (ima && ibuf && strcmp(tile->ibufname, ibuf->name)!=0) {
/* current ImBuf filename was changed, probably current frame
* was changed when paiting on image sequence, rather than storing
* full image user (which isn't so obvious, btw) try to find ImBuf with
@@ -499,9 +500,9 @@ static void image_undo_restore(bContext *C, ListBase *lb)
undo_copy_tile(tile, tmpibuf, ibuf, 1);
GPU_free_image(ima); /* force OpenGL reload */
- if(ibuf->rect_float)
+ if (ibuf->rect_float)
ibuf->userflags |= IB_RECT_INVALID; /* force recreate of char rect */
- if(ibuf->mipmap[0])
+ if (ibuf->mipmap[0])
ibuf->userflags |= IB_MIPMAP_INVALID; /* force mipmap recreatiom */
}
@@ -513,7 +514,7 @@ static void image_undo_free(ListBase *lb)
{
UndoImageTile *tile;
- for(tile=lb->first; tile; tile=tile->next)
+ for (tile=lb->first; tile; tile=tile->next)
MEM_freeN(tile->rect);
}
@@ -523,7 +524,7 @@ static Image *imapaint_face_image(const ImagePaintState *s, int face_index)
{
Image *ima;
- if(scene_use_new_shading_nodes(s->scene)) {
+ if (scene_use_new_shading_nodes(s->scene)) {
MFace *mf = s->me->mface+face_index;
ED_object_get_active_image(s->ob, mf->mat_nr, &ima, NULL, NULL);
}
@@ -539,7 +540,7 @@ static Image *project_paint_face_image(const ProjPaintState *ps, MTFace *dm_mtfa
{
Image *ima;
- if(ps->do_new_shading_nodes) { /* cached scene_use_new_shading_nodes result */
+ if (ps->do_new_shading_nodes) { /* cached scene_use_new_shading_nodes result */
MFace *mf = ps->dm_mface+face_index;
ED_object_get_active_image(ps->ob, mf->mat_nr, &ima, NULL, NULL);
}
@@ -815,7 +816,7 @@ static int project_paint_PickColor(const ProjPaintState *ps, float pt[2], float
static int project_paint_occlude_ptv(float pt[3], float v1[4], float v2[4], float v3[4], float w[3], int is_ortho)
{
/* if all are behind us, return false */
- if(v1[2] > pt[2] && v2[2] > pt[2] && v3[2] > pt[2])
+ if (v1[2] > pt[2] && v2[2] > pt[2] && v3[2] > pt[2])
return 0;
/* do a 2D point in try intersection */
@@ -825,7 +826,7 @@ static int project_paint_occlude_ptv(float pt[3], float v1[4], float v2[4], floa
/* From here on we know there IS an intersection */
/* if ALL of the verts are infront of us then we know it intersects ? */
- if(v1[2] < pt[2] && v2[2] < pt[2] && v3[2] < pt[2]) {
+ if (v1[2] < pt[2] && v2[2] < pt[2] && v3[2] < pt[2]) {
return 1;
}
else {
@@ -889,14 +890,14 @@ static int project_bucket_point_occluded(const ProjPaintState *ps, LinkNode *buc
if (orig_face != face_index) {
mf = ps->dm_mface + face_index;
- if(do_clip)
+ if (do_clip)
isect_ret = project_paint_occlude_ptv_clip(ps, mf, pixelScreenCo, ps->screenCoords[mf->v1], ps->screenCoords[mf->v2], ps->screenCoords[mf->v3], 0);
else
isect_ret = project_paint_occlude_ptv(pixelScreenCo, ps->screenCoords[mf->v1], ps->screenCoords[mf->v2], ps->screenCoords[mf->v3], w, ps->is_ortho);
- /* Note, if isect_ret==-1 then we dont want to test the other side of the quad */
+ /* Note, if isect_ret==-1 then we don't want to test the other side of the quad */
if (isect_ret==0 && mf->v4) {
- if(do_clip)
+ if (do_clip)
isect_ret = project_paint_occlude_ptv_clip(ps, mf, pixelScreenCo, ps->screenCoords[mf->v1], ps->screenCoords[mf->v3], ps->screenCoords[mf->v4], 1);
else
isect_ret = project_paint_occlude_ptv(pixelScreenCo, ps->screenCoords[mf->v1], ps->screenCoords[mf->v3], ps->screenCoords[mf->v4], w, ps->is_ortho);
@@ -1352,7 +1353,7 @@ static void project_face_pixel(const MTFace *tf_other, ImBuf *ibuf_other, const
}
-/* run this outside project_paint_uvpixel_init since pixels with mask 0 dont need init */
+/* run this outside project_paint_uvpixel_init since pixels with mask 0 don't need init */
static float project_paint_uvpixel_mask(
const ProjPaintState *ps,
const int face_index,
@@ -1392,7 +1393,8 @@ static float project_paint_uvpixel_mask(
else {
return 0.0f;
}
- } else {
+ }
+ else {
mask = 1.0f;
}
@@ -1452,7 +1454,7 @@ static float project_paint_uvpixel_mask(
}
// This only works when the opacity dosnt change while painting, stylus pressure messes with this
- // so dont use it.
+ // so don't use it.
// if (ps->is_airbrush==0) mask *= brush_alpha(ps->brush);
return mask;
@@ -1506,7 +1508,7 @@ static ProjPixel *project_paint_uvpixel_init(
projPixel->origColor.uint = projPixel->newColor.uint = *projPixel->pixel.uint_pt;
}
- /* screenspace unclamped, we could keep its z and w values but dont need them at the moment */
+ /* screenspace unclamped, we could keep its z and w values but don't need them at the moment */
copy_v2_v2(projPixel->projCoSS, pixelScreenCo);
projPixel->x_px = x_px;
@@ -1745,7 +1747,7 @@ static int line_clip_rect2f(
/* scale the quad & tri about its center
* scaling by PROJ_FACE_SCALE_SEAM (0.99x) is used for getting fake UV pixel coords that are on the
- * edge of the face but slightly inside it occlusion tests dont return hits on adjacent faces */
+ * edge of the face but slightly inside it occlusion tests don't return hits on adjacent faces */
#ifndef PROJ_DEBUG_NOSEAMBLEED
static void scale_quad(float insetCos[4][3], float *origCos[4], const float inset)
{
@@ -1984,7 +1986,7 @@ static void project_bucket_clip_face(
inside_bucket_flag |= BLI_in_rctf(bucket_bounds, v3coSS[0], v3coSS[1]) << 2;
if (inside_bucket_flag == ISECT_ALL3) {
- /* all screenspace points are inside the bucket bounding box, this means we dont need to clip and can simply return the UVs */
+ /* all screenspace points are inside the bucket bounding box, this means we don't need to clip and can simply return the UVs */
if (flip) { /* facing the back? */
copy_v2_v2(bucket_bounds_uv[0], uv3co);
copy_v2_v2(bucket_bounds_uv[1], uv2co);
@@ -2095,7 +2097,7 @@ static void project_bucket_clip_face(
/* now we have all points we need, collect their angles and sort them clockwise */
- for(i=0; i<(*tot); i++) {
+ for (i=0; i<(*tot); i++) {
cent[0] += isectVCosSS[i][0];
cent[1] += isectVCosSS[i][1];
}
@@ -2108,7 +2110,7 @@ static void project_bucket_clip_face(
#if 0 /* uses a few more cycles then the above loop */
- for(i=0; i<(*tot); i++) {
+ for (i=0; i<(*tot); i++) {
isectVCosSS[i][2] = angle_2d_clockwise(up, cent, isectVCosSS[i]);
}
#endif
@@ -2116,7 +2118,7 @@ static void project_bucket_clip_face(
v1_clipSS[0] = cent[0]; /* Abuse this var for the loop below */
v1_clipSS[1] = cent[1] + 1.0f;
- for(i=0; i<(*tot); i++) {
+ for (i=0; i<(*tot); i++) {
v2_clipSS[0] = isectVCosSS[i][0] - cent[0];
v2_clipSS[1] = isectVCosSS[i][1] - cent[1];
isectVCosSS[i][2] = atan2f(v1_clipSS[0]*v2_clipSS[1] - v1_clipSS[1]*v2_clipSS[0], v1_clipSS[0]*v2_clipSS[0]+v1_clipSS[1]*v2_clipSS[1]);
@@ -2141,12 +2143,12 @@ static void project_bucket_clip_face(
doubles = TRUE;
while (doubles==TRUE) {
doubles = FALSE;
- for(i=1; i<(*tot); i++) {
+ for (i=1; i<(*tot); i++) {
if (fabsf(isectVCosSS[i-1][0]-isectVCosSS[i][0]) < PROJ_GEOM_TOLERANCE &&
fabsf(isectVCosSS[i-1][1]-isectVCosSS[i][1]) < PROJ_GEOM_TOLERANCE)
{
int j;
- for(j=i+1; j<(*tot); j++) {
+ for (j=i+1; j<(*tot); j++) {
isectVCosSS[j-1][0] = isectVCosSS[j][0];
isectVCosSS[j-1][1] = isectVCosSS[j][1];
}
@@ -2165,13 +2167,13 @@ static void project_bucket_clip_face(
if (is_ortho) {
- for(i=0; i<(*tot); i++) {
+ for (i=0; i<(*tot); i++) {
barycentric_weights_v2(v1coSS, v2coSS, v3coSS, isectVCosSS[i], w);
interp_v2_v2v2v2(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w);
}
}
else {
- for(i=0; i<(*tot); i++) {
+ for (i=0; i<(*tot); i++) {
barycentric_weights_v2_persp(v1coSS, v2coSS, v3coSS, isectVCosSS[i], w);
interp_v2_v2v2v2(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w);
}
@@ -2405,12 +2407,12 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
if (pixel_bounds_array(uv_clip, &bounds_px, ibuf->x, ibuf->y, uv_clip_tot)) {
- if(clamp_u) {
+ if (clamp_u) {
CLAMP(bounds_px.xmin, 0, ibuf->x);
CLAMP(bounds_px.xmax, 0, ibuf->x);
}
- if(clamp_v) {
+ if (clamp_v) {
CLAMP(bounds_px.ymin, 0, ibuf->y);
CLAMP(bounds_px.ymax, 0, ibuf->y);
}
@@ -2429,7 +2431,7 @@ 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 && IsectPoly2Df(uv, uv_clip, uv_clip_tot)) ||
+ if ( (do_backfacecull && IsectPoly2Df(uv, uv_clip, uv_clip_tot)) ||
(do_backfacecull==0 && IsectPoly2Df_twoside(uv, uv_clip, uv_clip_tot))) {
has_x_isect = has_isect = 1;
@@ -2438,7 +2440,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
else screen_px_from_persp(uv, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, pixelScreenCo, w);
/* a pity we need to get the worldspace pixel location here */
- if(do_clip) {
+ if (do_clip) {
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 (ED_view3d_clipping_test(ps->rv3d, wco, TRUE)) {
continue; /* Watch out that no code below this needs to run */
@@ -2479,7 +2481,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
#endif
}
}
- } while(side--);
+ } while (side--);
@@ -2641,7 +2643,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
else {
barycentric_weights_v2(tf_uv_pxoffset[0], tf_uv_pxoffset[1], tf_uv_pxoffset[2], uv_close, w);
}
-#else /* this is buggy with quads, dont use for now */
+#else /* this is buggy with quads, don't use for now */
/* Cheat, we know where we are along the edge so work out the weights from that */
fac = fac1 + (fac * (fac2-fac1));
@@ -2659,7 +2661,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) {
+ if (do_clip) {
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);
@@ -2852,7 +2854,7 @@ static int project_bucket_face_isect(ProjPaintState *ps, int bucket_x, int bucke
return 0;
}
-/* Add faces to the bucket but dont initialize its pixels
+/* Add faces to the bucket but don't initialize its pixels
* TODO - when painting occluded, sort the faces on their min-Z and only add faces that faces that are not occluded */
static void project_paint_delayed_face_init(ProjPaintState *ps, const MFace *mf, const int face_index)
{
@@ -2952,7 +2954,7 @@ static void project_paint_begin(ProjPaintState *ps)
/* ---- end defines ---- */
- if(ps->source==PROJ_SRC_VIEW)
+ if (ps->source==PROJ_SRC_VIEW)
ED_view3d_clipping_local(ps->rv3d, ps->ob->obmat); /* faster clipping lookups */
/* paint onto the derived mesh */
@@ -2963,7 +2965,7 @@ static void project_paint_begin(ProjPaintState *ps)
ps->dm = mesh_create_derived_render(ps->scene, ps->ob, ps->scene->customdata_mask | CD_MASK_MTFACE);
ps->dm_release= TRUE;
}
- else if(ps->ob->derivedFinal && CustomData_has_layer( &ps->ob->derivedFinal->faceData, CD_MTFACE)) {
+ else if (ps->ob->derivedFinal && CustomData_has_layer( &ps->ob->derivedFinal->faceData, CD_MTFACE)) {
ps->dm = ps->ob->derivedFinal;
ps->dm_release= FALSE;
}
@@ -2974,7 +2976,7 @@ static void project_paint_begin(ProjPaintState *ps)
if ( !CustomData_has_layer( &ps->dm->faceData, CD_MTFACE) ) {
- if(ps->dm_release)
+ if (ps->dm_release)
ps->dm->release(ps->dm);
ps->dm = NULL;
@@ -3019,7 +3021,7 @@ static void project_paint_begin(ProjPaintState *ps)
}
/* when using subsurf or multires, mface arrays are thrown away, we need to keep a copy */
- if(ps->dm->type != DM_TYPE_CDDM) {
+ if (ps->dm->type != DM_TYPE_CDDM) {
ps->dm_mvert= MEM_dupallocN(ps->dm_mvert);
ps->dm_mface= MEM_dupallocN(ps->dm_mface);
/* looks like these are ok for now.*/
@@ -3040,7 +3042,7 @@ static void project_paint_begin(ProjPaintState *ps)
invert_m4_m4(ps->ob->imat, ps->ob->obmat);
- if(ps->source==PROJ_SRC_VIEW) {
+ if (ps->source==PROJ_SRC_VIEW) {
/* normal drawing */
ps->winx= ps->ar->winx;
ps->winy= ps->ar->winy;
@@ -3126,7 +3128,7 @@ static void project_paint_begin(ProjPaintState *ps)
projScreenCo= *ps->screenCoords;
if (ps->is_ortho) {
- for(a=0, mv=ps->dm_mvert; a < ps->dm_totvert; a++, mv++, projScreenCo+=4) {
+ for (a=0, mv=ps->dm_mvert; a < ps->dm_totvert; a++, mv++, projScreenCo+=4) {
mul_v3_m4v3(projScreenCo, ps->projectMat, mv->co);
/* screen space, not clamped */
@@ -3136,7 +3138,7 @@ static void project_paint_begin(ProjPaintState *ps)
}
}
else {
- for(a=0, mv=ps->dm_mvert; a < ps->dm_totvert; a++, mv++, projScreenCo+=4) {
+ for (a=0, mv=ps->dm_mvert; a < ps->dm_totvert; a++, mv++, projScreenCo+=4) {
copy_v3_v3(projScreenCo, mv->co);
projScreenCo[3] = 1.0f;
@@ -3169,7 +3171,7 @@ static void project_paint_begin(ProjPaintState *ps)
ps->screenMax[1] += projMargin;
ps->screenMin[1] -= projMargin;
- if(ps->source==PROJ_SRC_VIEW) {
+ if (ps->source==PROJ_SRC_VIEW) {
#ifdef PROJ_DEBUG_WINCLIP
CLAMP(ps->screenMin[0], (float)(-diameter), (float)(ps->winx + diameter));
CLAMP(ps->screenMax[0], (float)(-diameter), (float)(ps->winx + diameter));
@@ -3235,7 +3237,7 @@ static void project_paint_begin(ProjPaintState *ps)
ps->vertFlags = MEM_callocN(sizeof(char) * ps->dm_totvert, "paint-vertFlags");
- for(a=0, mv=ps->dm_mvert; a < ps->dm_totvert; a++, mv++) {
+ for (a=0, mv=ps->dm_mvert; a < ps->dm_totvert; a++, mv++) {
normal_short_to_float_v3(no, mv->no);
if (ps->is_ortho) {
@@ -3254,7 +3256,7 @@ static void project_paint_begin(ProjPaintState *ps)
}
- for(face_index = 0, tf = ps->dm_mtface, mf = ps->dm_mface; face_index < ps->dm_totface; mf++, tf++, face_index++) {
+ for (face_index = 0, tf = ps->dm_mtface, mf = ps->dm_mface; face_index < ps->dm_totface; mf++, tf++, face_index++) {
#ifndef PROJ_DEBUG_NOSEAMBLEED
/* add face user if we have bleed enabled, set the UV seam flags later */
@@ -3400,7 +3402,7 @@ static void project_paint_end(ProjPaintState *ps)
int a;
/* build undo data from original pixel colors */
- if(U.uiflag & USER_GLOBALUNDO) {
+ if (U.uiflag & USER_GLOBALUNDO) {
ProjPixel *projPixel;
ImBuf *tmpibuf = NULL, *tmpibuf_float = NULL;
LinkNode *pixel_node;
@@ -3419,7 +3421,7 @@ static void project_paint_end(ProjPaintState *ps)
int last_image_index = -1;
int last_tile_width=0;
- for(a=0, last_projIma=ps->projImages; a < ps->image_tot; a++, last_projIma++) {
+ for (a=0, last_projIma=ps->projImages; a < ps->image_tot; a++, last_projIma++) {
int size = sizeof(void **) * IMAPAINT_TILE_NUMBER(last_projIma->ibuf->x) * IMAPAINT_TILE_NUMBER(last_projIma->ibuf->y);
last_projIma->undoRect = (void **) BLI_memarena_alloc(arena, size);
memset(last_projIma->undoRect, 0, size);
@@ -3428,7 +3430,7 @@ static void project_paint_end(ProjPaintState *ps)
for (bucket_index = 0; bucket_index < bucket_tot; bucket_index++) {
/* loop through all pixels */
- for(pixel_node= ps->bucketRect[bucket_index]; pixel_node; pixel_node= pixel_node->next) {
+ for (pixel_node= ps->bucketRect[bucket_index]; pixel_node; pixel_node= pixel_node->next) {
/* ok we have a pixel, was it modified? */
projPixel = (ProjPixel *)pixel_node->link;
@@ -3506,18 +3508,18 @@ static void project_paint_end(ProjPaintState *ps)
}
/* copy for subsurf/multires, so throw away */
- if(ps->dm->type != DM_TYPE_CDDM) {
- if(ps->dm_mvert) MEM_freeN(ps->dm_mvert);
- if(ps->dm_mface) MEM_freeN(ps->dm_mface);
- /* looks like these dont need copying */
+ if (ps->dm->type != DM_TYPE_CDDM) {
+ if (ps->dm_mvert) MEM_freeN(ps->dm_mvert);
+ if (ps->dm_mface) MEM_freeN(ps->dm_mface);
+ /* looks like these don't need copying */
#if 0
- if(ps->dm_mtface) MEM_freeN(ps->dm_mtface);
- if(ps->dm_mtface_clone) MEM_freeN(ps->dm_mtface_clone);
- if(ps->dm_mtface_stencil) MEM_freeN(ps->dm_mtface_stencil);
+ if (ps->dm_mtface) MEM_freeN(ps->dm_mtface);
+ if (ps->dm_mtface_clone) MEM_freeN(ps->dm_mtface_clone);
+ if (ps->dm_mtface_stencil) MEM_freeN(ps->dm_mtface_stencil);
#endif
}
- if(ps->dm_release)
+ if (ps->dm_release)
ps->dm->release(ps->dm);
}
@@ -3589,11 +3591,11 @@ static int project_image_refresh_tagged(ProjPaintState *ps)
/* run this per painting onto each mouse location */
static int project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2])
{
- if(ps->source==PROJ_SRC_VIEW) {
+ if (ps->source==PROJ_SRC_VIEW) {
float min_brush[2], max_brush[2];
const float radius = (float)brush_size(ps->scene, ps->brush);
- /* so we dont have a bucket bounds that is way too small to paint into */
+ /* so we don't have a bucket bounds that is way too small to paint into */
// if (radius < 1.0f) radius = 1.0f; // this doesn't work yet :/
min_brush[0] = mval_f[0] - radius;
@@ -3791,17 +3793,17 @@ static void do_projectpaint_draw_f(ProjPaintState *ps, ProjPixel *projPixel, flo
{
if (ps->is_texbrush) {
/* rgba already holds a texture result here from higher level function */
- if(use_color_correction){
+ if (use_color_correction) {
float rgba_br[3];
srgb_to_linearrgb_v3_v3(rgba_br, ps->brush->rgb);
mul_v3_v3(rgba, rgba_br);
}
- else{
+ else {
mul_v3_v3(rgba, ps->brush->rgb);
}
}
else {
- if(use_color_correction){
+ if (use_color_correction) {
srgb_to_linearrgb_v3_v3(rgba, ps->brush->rgb);
}
else {
@@ -3879,7 +3881,7 @@ static void *do_projectpaint_thread(void *ph_v)
project_bucket_init(ps, thread_index, bucket_index, &bucket_bounds);
}
- if(ps->source != PROJ_SRC_VIEW) {
+ if (ps->source != PROJ_SRC_VIEW) {
/* Re-Projection, simple, no brushes! */
@@ -3887,7 +3889,7 @@ static void *do_projectpaint_thread(void *ph_v)
projPixel = (ProjPixel *)node->link;
bicubic_interpolation_color(ps->reproject_ibuf, projPixel->newColor.ch, NULL, projPixel->projCoSS[0], projPixel->projCoSS[1]);
- if(projPixel->newColor.ch[3]) {
+ if (projPixel->newColor.ch[3]) {
mask = ((float)projPixel->mask)/65535.0f;
blend_color_mix_accum(projPixel->pixel.ch_pt, projPixel->origColor.ch, projPixel->newColor.ch, (int)(mask*projPixel->newColor.ch[3]));
@@ -3914,7 +3916,8 @@ static void *do_projectpaint_thread(void *ph_v)
/* note, for clone and smear, we only use the alpha, could be a special function */
brush_sample_tex(ps->scene, ps->brush, projPixel->projCoSS, rgba, thread_index);
alpha = rgba[3];
- } else {
+ }
+ else {
alpha = 1.0f;
}
@@ -3964,12 +3967,12 @@ static void *do_projectpaint_thread(void *ph_v)
case PAINT_TOOL_CLONE:
if (is_floatbuf) {
if (((ProjPixelClone *)projPixel)->clonepx.f[3]) {
- do_projectpaint_clone_f(ps, projPixel, alpha, mask); /* rgba isnt used for cloning, only alpha */
+ do_projectpaint_clone_f(ps, projPixel, alpha, mask); /* rgba isn't used for cloning, only alpha */
}
}
else {
if (((ProjPixelClone*)projPixel)->clonepx.ch[3]) {
- do_projectpaint_clone(ps, projPixel, alpha, mask); /* rgba isnt used for cloning, only alpha */
+ do_projectpaint_clone(ps, projPixel, alpha, mask); /* rgba isn't used for cloning, only alpha */
}
}
break;
@@ -3986,7 +3989,7 @@ static void *do_projectpaint_thread(void *ph_v)
}
}
- if(lock_alpha) {
+ if (lock_alpha) {
if (is_floatbuf) projPixel->pixel.f_pt[3]= projPixel->origColor.f[3];
else projPixel->pixel.ch_pt[3]= projPixel->origColor.ch[3];
}
@@ -4035,7 +4038,7 @@ static int project_paint_op(void *state, ImBuf *UNUSED(ibufb), const float lastp
BLI_init_threads(&threads, do_projectpaint_thread, ps->thread_tot);
/* get the threads running */
- for(a=0; a < ps->thread_tot; a++) {
+ for (a=0; a < ps->thread_tot; a++) {
/* set defaults in handles */
//memset(&handles[a], 0, sizeof(BakeShade));
@@ -4068,9 +4071,9 @@ static int project_paint_op(void *state, ImBuf *UNUSED(ibufb), const float lastp
/* move threaded bounds back into ps->projectPartialRedraws */
- for(i=0; i < ps->image_tot; i++) {
+ for (i=0; i < ps->image_tot; i++) {
int touch = 0;
- for(a=0; a < ps->thread_tot; a++) {
+ for (a=0; a < ps->thread_tot; a++) {
touch |= partial_redraw_array_merge(ps->projImages[i].partRedrawRect, handles[a].projImages[i].partRedrawRect, PROJ_BOUNDBOX_SQUARED);
}
@@ -4112,7 +4115,7 @@ static int project_paint_stroke(ProjPaintState *ps, BrushPainter *painter, const
redraw= project_paint_sub_stroke(ps, painter, prevmval_i, mval_i, time, pressure);
- if(project_image_refresh_tagged(ps))
+ if (project_image_refresh_tagged(ps))
return redraw;
return 0;
@@ -4166,14 +4169,14 @@ static void imapaint_dirty_region(Image *ima, ImBuf *ibuf, int x, int y, int w,
static void imapaint_image_update(SpaceImage *sima, Image *image, ImBuf *ibuf, short texpaint)
{
- if(ibuf->rect_float)
+ if (ibuf->rect_float)
ibuf->userflags |= IB_RECT_INVALID; /* force recreate of char rect */
- if(ibuf->mipmap[0])
+ if (ibuf->mipmap[0])
ibuf->userflags |= IB_MIPMAP_INVALID;
/* todo: should set_tpage create ->rect? */
- if(texpaint || (sima && sima->lock)) {
+ if (texpaint || (sima && sima->lock)) {
int w = imapaintpartial.x2 - imapaintpartial.x1;
int h = imapaintpartial.y2 - imapaintpartial.y1;
/* Testing with partial update in uv editor too */
@@ -4197,7 +4200,8 @@ static void imapaint_ibuf_get_set_rgb(ImBuf *ibuf, int x, int y, short torus, sh
if (set) {
IMAPAINT_FLOAT_RGB_COPY(rrgbf, rgb);
- } else {
+ }
+ else {
IMAPAINT_FLOAT_RGB_COPY(rgb, rrgbf);
}
}
@@ -4206,7 +4210,8 @@ static void imapaint_ibuf_get_set_rgb(ImBuf *ibuf, int x, int y, short torus, sh
if (set) {
IMAPAINT_FLOAT_RGB_TO_CHAR(rrgb, rgb)
- } else {
+ }
+ else {
IMAPAINT_CHAR_RGB_TO_FLOAT(rgb, rrgb)
}
}
@@ -4340,7 +4345,7 @@ static void imapaint_lift_smear(ImBuf *ibuf, ImBuf *ibufb, int *pos)
imapaint_set_region(region, 0, 0, pos[0], pos[1], ibufb->x, ibufb->y);
tot= imapaint_torus_split_region(region, ibufb, ibuf);
- for(a=0; a<tot; a++)
+ for (a=0; a<tot; a++)
IMB_rectblend(ibufb, ibuf, region[a].destx, region[a].desty,
region[a].srcx, region[a].srcy,
region[a].width, region[a].height, IMB_BLEND_COPY_RGB);
@@ -4385,17 +4390,17 @@ static int imapaint_paint_op(void *state, ImBuf *ibufb, const float lastpos[2],
imapaint_convert_brushco(ibufb, pos, bpos);
/* lift from canvas */
- if(s->tool == PAINT_TOOL_SOFTEN) {
+ if (s->tool == PAINT_TOOL_SOFTEN) {
imapaint_lift_soften(s->canvas, ibufb, bpos, torus);
}
- else if(s->tool == PAINT_TOOL_SMEAR) {
+ else if (s->tool == PAINT_TOOL_SMEAR) {
if (lastpos[0]==pos[0] && lastpos[1]==pos[1])
return 0;
imapaint_convert_brushco(ibufb, lastpos, blastpos);
imapaint_lift_smear(s->canvas, ibufb, blastpos);
}
- else if(s->tool == PAINT_TOOL_CLONE && s->clonecanvas) {
+ else if (s->tool == PAINT_TOOL_CLONE && s->clonecanvas) {
liftpos[0]= pos[0] - offset[0]*s->canvas->x;
liftpos[1]= pos[1] - offset[1]*s->canvas->y;
@@ -4405,7 +4410,7 @@ static int imapaint_paint_op(void *state, ImBuf *ibufb, const float lastpos[2],
frombuf= (clonebuf)? clonebuf: ibufb;
- if(torus) {
+ if (torus) {
imapaint_set_region(region, bpos[0], bpos[1], 0, 0, frombuf->x, frombuf->y);
tot= imapaint_torus_split_region(region, s->canvas, frombuf);
}
@@ -4415,7 +4420,7 @@ static int imapaint_paint_op(void *state, ImBuf *ibufb, const float lastpos[2],
}
/* blend into canvas */
- for(a=0; a<tot; a++) {
+ for (a=0; a<tot; a++) {
imapaint_dirty_region(s->image, s->canvas,
region[a].destx, region[a].desty,
region[a].width, region[a].height);
@@ -4426,7 +4431,7 @@ static int imapaint_paint_op(void *state, ImBuf *ibufb, const float lastpos[2],
region[a].width, region[a].height, blend);
}
- if(clonebuf) IMB_freeImBuf(clonebuf);
+ if (clonebuf) IMB_freeImBuf(clonebuf);
return 1;
}
@@ -4453,35 +4458,35 @@ static int imapaint_canvas_set(ImagePaintState *s, Image *ima)
ImBuf *ibuf= BKE_image_get_ibuf(ima, s->sima? &s->sima->iuser: NULL);
/* verify that we can paint and set canvas */
- if(ima==NULL) {
+ if (ima==NULL) {
return 0;
}
- else if(ima->packedfile && ima->rr) {
+ else if (ima->packedfile && ima->rr) {
s->warnpackedfile = ima->id.name + 2;
return 0;
}
- else if(ibuf && ibuf->channels!=4) {
+ else if (ibuf && ibuf->channels!=4) {
s->warnmultifile = ima->id.name + 2;
return 0;
}
- else if(!ibuf || !(ibuf->rect || ibuf->rect_float))
+ else if (!ibuf || !(ibuf->rect || ibuf->rect_float))
return 0;
s->image= ima;
s->canvas= ibuf;
/* set clone canvas */
- if(s->tool == PAINT_TOOL_CLONE) {
+ if (s->tool == PAINT_TOOL_CLONE) {
ima= s->brush->clone.image;
ibuf= BKE_image_get_ibuf(ima, s->sima? &s->sima->iuser: NULL);
- if(!ima || !ibuf || !(ibuf->rect || ibuf->rect_float))
+ if (!ima || !ibuf || !(ibuf->rect || ibuf->rect_float))
return 0;
s->clonecanvas= ibuf;
/* temporarily add float rect for cloning */
- if(s->canvas->rect_float && !s->clonecanvas->rect_float) {
+ if (s->canvas->rect_float && !s->clonecanvas->rect_float) {
int profile = IB_PROFILE_NONE;
/* Don't want to color manage, but don't disturb existing profiles */
@@ -4492,7 +4497,7 @@ static int imapaint_canvas_set(ImagePaintState *s, Image *ima)
SWAP(int, s->clonecanvas->profile, profile);
}
- else if(!s->canvas->rect_float && !s->clonecanvas->rect)
+ else if (!s->canvas->rect_float && !s->clonecanvas->rect)
IMB_rect_from_float(s->clonecanvas);
}
@@ -4510,7 +4515,7 @@ static int imapaint_paint_sub_stroke(ImagePaintState *s, BrushPainter *painter,
ImBuf *ibuf= BKE_image_get_ibuf(image, s->sima? &s->sima->iuser: NULL);
float pos[2];
- if(!ibuf)
+ if (!ibuf)
return 0;
pos[0] = uv[0]*ibuf->x;
@@ -4543,7 +4548,7 @@ static int imapaint_paint_stroke(ViewContext *vc, ImagePaintState *s, BrushPaint
newimage = imapaint_face_image(s, newfaceindex);
ibuf= BKE_image_get_ibuf(newimage, s->sima? &s->sima->iuser: NULL);
- if(ibuf && ibuf->rect)
+ if (ibuf && ibuf->rect)
imapaint_pick_uv(s->scene, s->ob, newfaceindex, mval, newuv);
else {
newimage = NULL;
@@ -4621,7 +4626,7 @@ static Brush *uv_sculpt_brush(bContext *C)
Scene *scene= CTX_data_scene(C);
ToolSettings *settings= scene->toolsettings;
- if(!settings->uvsculpt)
+ if (!settings->uvsculpt)
return NULL;
return paint_brush(&settings->uvsculpt->paint);
}
@@ -4630,19 +4635,19 @@ static int image_paint_poll(bContext *C)
{
Object *obact = CTX_data_active_object(C);
- if(!image_paint_brush(C))
+ if (!image_paint_brush(C))
return 0;
- if((obact && obact->mode & OB_MODE_TEXTURE_PAINT) && CTX_wm_region_view3d(C)) {
+ if ((obact && obact->mode & OB_MODE_TEXTURE_PAINT) && CTX_wm_region_view3d(C)) {
return 1;
}
else {
SpaceImage *sima= CTX_wm_space_image(C);
- if(sima) {
+ if (sima) {
ARegion *ar= CTX_wm_region(C);
- if((sima->flag & SI_DRAWTOOL) && ar->regiontype==RGN_TYPE_WINDOW)
+ if ((sima->flag & SI_DRAWTOOL) && ar->regiontype==RGN_TYPE_WINDOW)
return 1;
}
}
@@ -4659,15 +4664,15 @@ static int uv_sculpt_brush_poll(bContext *C)
Scene *scene = CTX_data_scene(C);
ToolSettings *toolsettings = scene->toolsettings;
- if(!uv_sculpt_brush(C) || !obedit || obedit->type != OB_MESH)
+ if (!uv_sculpt_brush(C) || !obedit || obedit->type != OB_MESH)
return 0;
em = BMEdit_FromObject(obedit);
ret = EDBM_texFaceCheck(em);
- if(ret && sima) {
+ if (ret && sima) {
ARegion *ar= CTX_wm_region(C);
- if((toolsettings->use_uv_sculpt) && ar->regiontype==RGN_TYPE_WINDOW)
+ if ((toolsettings->use_uv_sculpt) && ar->regiontype==RGN_TYPE_WINDOW)
return 1;
}
@@ -4676,7 +4681,7 @@ static int uv_sculpt_brush_poll(bContext *C)
static int image_paint_3d_poll(bContext *C)
{
- if(CTX_wm_region_view3d(C))
+ if (CTX_wm_region_view3d(C))
return image_paint_poll(C);
return 0;
@@ -4686,9 +4691,9 @@ static int image_paint_2d_clone_poll(bContext *C)
{
Brush *brush= image_paint_brush(C);
- if(!CTX_wm_region_view3d(C) && image_paint_poll(C))
- if(brush && (brush->imagepaint_tool == PAINT_TOOL_CLONE))
- if(brush->clone.image)
+ if (!CTX_wm_region_view3d(C) && image_paint_poll(C))
+ if (brush && (brush->imagepaint_tool == PAINT_TOOL_CLONE))
+ if (brush->clone.image)
return 1;
return 0;
@@ -4711,7 +4716,7 @@ typedef struct PaintOperation {
int first;
int prevmouse[2];
- float prev_pressure; /* need this since we dont get tablet events for pressure change */
+ float prev_pressure; /* need this since we don't get tablet events for pressure change */
int orig_brush_size;
double starttime;
@@ -4723,15 +4728,15 @@ typedef struct PaintOperation {
static void paint_redraw(bContext *C, ImagePaintState *s, int final)
{
- if(final) {
- if(s->image)
+ if (final) {
+ if (s->image)
GPU_free_image(s->image);
/* compositor listener deals with updating */
WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, s->image);
}
else {
- if(!s->sima || !s->sima->lock)
+ if (!s->sima || !s->sima->lock)
ED_region_tag_redraw(CTX_wm_region(C));
else
WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, s->image);
@@ -4779,7 +4784,7 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps)
ps->seam_bleed_px = settings->imapaint.seam_bleed; /* pixel num to bleed */
#endif
- if(ps->do_mask_normal) {
+ if (ps->do_mask_normal) {
ps->normal_angle_inner = settings->imapaint.normal_angle;
ps->normal_angle = (ps->normal_angle_inner + 90.0f) * 0.5f;
}
@@ -4791,16 +4796,16 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps)
ps->normal_angle *= (float)(M_PI_2 / 90);
ps->normal_angle_range = ps->normal_angle - ps->normal_angle_inner;
- if(ps->normal_angle_range <= 0.0f)
+ if (ps->normal_angle_range <= 0.0f)
ps->do_mask_normal = 0; /* no need to do blending */
}
static void paint_brush_init_tex(Brush *brush)
{
/* init mtex nodes */
- if(brush) {
+ if (brush) {
MTex *mtex= &brush->mtex;
- if(mtex->tex && mtex->tex->nodetree)
+ if (mtex->tex && mtex->tex->nodetree)
ntreeTexBeginExecTree(mtex->tex->nodetree, 1); /* has internal flag to detect it only does it once */
}
@@ -4818,16 +4823,16 @@ static int texture_paint_init(bContext *C, wmOperator *op)
/* XXX: Soften tool does not support projection painting atm, so just disable
* projection for this brush */
- if(brush->imagepaint_tool == PAINT_TOOL_SOFTEN) {
+ if (brush->imagepaint_tool == PAINT_TOOL_SOFTEN) {
settings->imapaint.flag |= IMAGEPAINT_PROJECT_DISABLE;
pop->restore_projection = 1;
}
/* initialize from context */
- if(CTX_wm_region_view3d(C)) {
+ if (CTX_wm_region_view3d(C)) {
pop->mode= PAINT_MODE_3D;
- if(!(settings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE))
+ if (!(settings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE))
pop->mode= PAINT_MODE_3D_PROJECT;
else
view3d_set_viewcontext(C, &pop->vc);
@@ -4842,12 +4847,12 @@ static int texture_paint_init(bContext *C, wmOperator *op)
pop->s.brush = brush;
pop->s.tool = brush->imagepaint_tool;
- if(pop->mode == PAINT_MODE_3D && (pop->s.tool == PAINT_TOOL_CLONE))
+ if (pop->mode == PAINT_MODE_3D && (pop->s.tool == PAINT_TOOL_CLONE))
pop->s.tool = PAINT_TOOL_DRAW;
pop->s.blend = brush->blend;
pop->orig_brush_size= brush_size(scene, brush);
- if(pop->mode != PAINT_MODE_2D) {
+ if (pop->mode != PAINT_MODE_2D) {
pop->s.ob = OBACT;
pop->s.me = get_mesh(pop->s.ob);
if (!pop->s.me) return 0;
@@ -4855,10 +4860,10 @@ static int texture_paint_init(bContext *C, wmOperator *op)
else {
pop->s.image = pop->s.sima->image;
- if(!imapaint_canvas_set(&pop->s, pop->s.image)) {
- if(pop->s.warnmultifile)
+ if (!imapaint_canvas_set(&pop->s, pop->s.image)) {
+ if (pop->s.warnmultifile)
BKE_report(op->reports, RPT_WARNING, "Image requires 4 color channels to paint");
- if(pop->s.warnpackedfile)
+ if (pop->s.warnpackedfile)
BKE_report(op->reports, RPT_WARNING, "Packed MultiLayer files cannot be painted");
return 0;
@@ -4868,7 +4873,7 @@ static int texture_paint_init(bContext *C, wmOperator *op)
paint_brush_init_tex(pop->s.brush);
/* note, if we have no UVs on the derived mesh, then we must return here */
- if(pop->mode == PAINT_MODE_3D_PROJECT) {
+ if (pop->mode == PAINT_MODE_3D_PROJECT) {
/* initialize all data from the context */
project_state_init(C, OBACT, &pop->ps);
@@ -4880,14 +4885,14 @@ static int texture_paint_init(bContext *C, wmOperator *op)
if (pop->ps.ob==NULL || !(pop->ps.ob->lay & pop->ps.v3d->lay))
return 0;
- /* Dont allow brush size below 2 */
+ /* Don't allow brush size below 2 */
if (brush_size(scene, brush) < 2)
brush_set_size(scene, brush, 2);
/* allocate and initialize spacial data structures */
project_paint_begin(&pop->ps);
- if(pop->ps.dm==NULL)
+ if (pop->ps.dm==NULL)
return 0;
}
@@ -4914,13 +4919,13 @@ static void paint_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
time= RNA_float_get(itemptr, "time");
pressure= RNA_float_get(itemptr, "pressure");
- if(pop->first)
+ if (pop->first)
project_paint_begin_clone(&pop->ps, mouse);
- if(pop->mode == PAINT_MODE_3D)
+ if (pop->mode == PAINT_MODE_3D)
view3d_operator_needs_opengl(C);
- if(pop->mode == PAINT_MODE_3D_PROJECT) {
+ if (pop->mode == PAINT_MODE_3D_PROJECT) {
redraw= project_paint_stroke(&pop->ps, pop->painter, pop->prevmouse, mouse, time, pressure);
pop->prevmouse[0]= mouse[0];
pop->prevmouse[1]= mouse[1];
@@ -4932,7 +4937,7 @@ static void paint_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
pop->prevmouse[1]= mouse[1];
}
- if(redraw)
+ if (redraw)
paint_redraw(C, &pop->s, 0);
pop->first= 0;
@@ -4940,9 +4945,9 @@ static void paint_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
static void paint_brush_exit_tex(Brush *brush)
{
- if(brush) {
+ if (brush) {
MTex *mtex= &brush->mtex;
- if(mtex->tex && mtex->tex->nodetree)
+ if (mtex->tex && mtex->tex->nodetree)
ntreeTexEndExecTree(mtex->tex->nodetree->execdata, 1);
}
}
@@ -4953,10 +4958,10 @@ static void paint_exit(bContext *C, wmOperator *op)
ToolSettings *settings= scene->toolsettings;
PaintOperation *pop= op->customdata;
- if(pop->timer)
+ if (pop->timer)
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), pop->timer);
- if(pop->restore_projection)
+ if (pop->restore_projection)
settings->imapaint.flag &= ~IMAGEPAINT_PROJECT_DISABLE;
paint_brush_exit_tex(pop->s.brush);
@@ -4965,7 +4970,7 @@ static void paint_exit(bContext *C, wmOperator *op)
imapaint_canvas_free(&pop->s);
brush_painter_free(pop->painter);
- if(pop->mode == PAINT_MODE_3D_PROJECT) {
+ if (pop->mode == PAINT_MODE_3D_PROJECT) {
brush_set_size(scene, pop->ps.brush, pop->orig_brush_size);
paint_brush_exit_tex(pop->ps.brush);
@@ -4975,9 +4980,9 @@ static void paint_exit(bContext *C, wmOperator *op)
paint_redraw(C, &pop->s, 1);
undo_paint_push_end(UNDO_PAINT_IMAGE);
- if(pop->s.warnmultifile)
+ if (pop->s.warnmultifile)
BKE_reportf(op->reports, RPT_WARNING, "Image requires 4 color channels to paint: %s", pop->s.warnmultifile);
- if(pop->s.warnpackedfile)
+ if (pop->s.warnpackedfile)
BKE_reportf(op->reports, RPT_WARNING, "Packed MultiLayer files cannot be painted: %s", pop->s.warnpackedfile);
MEM_freeN(pop);
@@ -4985,7 +4990,7 @@ static void paint_exit(bContext *C, wmOperator *op)
static int paint_exec(bContext *C, wmOperator *op)
{
- if(!texture_paint_init(C, op)) {
+ if (!texture_paint_init(C, op)) {
MEM_freeN(op->customdata);
return OPERATOR_CANCELLED;
}
@@ -5015,19 +5020,19 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
tablet= 0;
pop->s.blend= pop->s.brush->blend;
- if(event->custom == EVT_DATA_TABLET) {
+ if (event->custom == EVT_DATA_TABLET) {
wmtab= event->customdata;
tablet= (wmtab->Active != EVT_TABLET_NONE);
pressure= wmtab->Pressure;
- if(wmtab->Active == EVT_TABLET_ERASER)
+ if (wmtab->Active == EVT_TABLET_ERASER)
pop->s.blend= IMB_BLEND_ERASE_ALPHA;
}
else { /* otherwise airbrush becomes 1.0 pressure instantly */
pressure= pop->prev_pressure ? pop->prev_pressure : 1.0f;
}
- if(pop->first) {
+ if (pop->first) {
pop->prevmouse[0]= event->mval[0];
pop->prevmouse[1]= event->mval[1];
pop->starttime= time;
@@ -5064,7 +5069,7 @@ static int paint_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
PaintOperation *pop;
- if(!texture_paint_init(C, op)) {
+ if (!texture_paint_init(C, op)) {
MEM_freeN(op->customdata);
return OPERATOR_CANCELLED;
}
@@ -5074,7 +5079,7 @@ static int paint_invoke(bContext *C, wmOperator *op, wmEvent *event)
pop= op->customdata;
WM_event_add_modal_handler(C, op);
- if(pop->s.brush->flag & BRUSH_AIRBRUSH)
+ if (pop->s.brush->flag & BRUSH_AIRBRUSH)
pop->timer= WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.01f);
return OPERATOR_RUNNING_MODAL;
@@ -5095,7 +5100,7 @@ static int paint_modal(bContext *C, wmOperator *op, wmEvent *event)
paint_apply_event(C, op, event);
break;
case TIMER:
- if(event->customdata == pop->timer)
+ if (event->customdata == pop->timer)
paint_apply_event(C, op, event);
break;
}
@@ -5113,18 +5118,18 @@ static int paint_cancel(bContext *C, wmOperator *op)
void PAINT_OT_image_paint(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Image Paint";
- ot->idname= "PAINT_OT_image_paint";
+ ot->name = "Image Paint";
+ ot->idname = "PAINT_OT_image_paint";
/* api callbacks */
- ot->exec= paint_exec;
- ot->invoke= paint_invoke;
- ot->modal= paint_modal;
- ot->cancel= paint_cancel;
- ot->poll= image_paint_poll;
+ ot->exec = paint_exec;
+ ot->invoke = paint_invoke;
+ ot->modal = paint_modal;
+ ot->cancel = paint_cancel;
+ ot->poll = image_paint_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* properties */
RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
@@ -5134,7 +5139,7 @@ int get_imapaint_zoom(bContext *C, float *zoomx, float *zoomy)
{
RegionView3D *rv3d= CTX_wm_region_view3d(C);
- if(!rv3d) {
+ if (!rv3d) {
SpaceImage *sima= CTX_wm_space_image(C);
ARegion *ar= CTX_wm_region(C);
@@ -5160,17 +5165,19 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata)
Paint *paint= paint_get_active(scene);
Brush *brush= paint_brush(paint);
- if(paint && brush && paint->flags & PAINT_SHOW_BRUSH) {
+ if (paint && brush && paint->flags & PAINT_SHOW_BRUSH) {
ToolSettings *ts;
float zoomx, zoomy;
const float size= (float)brush_size(scene, brush);
- const short use_zoom= get_imapaint_zoom(C, &zoomx, &zoomy);
+ short use_zoom;
float pixel_size;
float alpha= 0.5f;
ts = scene->toolsettings;
+ use_zoom= get_imapaint_zoom(C, &zoomx, &zoomy)
+ && !(ts->use_uv_sculpt && (scene->basact->object->mode == OB_MODE_EDIT));
- if(use_zoom && !ts->use_uv_sculpt){
+ if (use_zoom) {
pixel_size = MAX2(size * zoomx, size * zoomy);
}
else {
@@ -5178,7 +5185,7 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata)
}
/* fade out the brush (cheap trick to work around brush interfearing with sampling [#])*/
- if(pixel_size < PX_SIZE_FADE_MIN) {
+ if (pixel_size < PX_SIZE_FADE_MIN) {
return;
}
else if (pixel_size < PX_SIZE_FADE_MAX) {
@@ -5190,7 +5197,7 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata)
glTranslatef((float)x, (float)y, 0.0f);
/* No need to scale for uv sculpting, on the contrary it might be useful to keep unscaled */
- if(use_zoom && !ts->use_uv_sculpt)
+ if (use_zoom)
glScalef(zoomx, zoomy, 1.0f);
glColor4f(brush->add_col[0], brush->add_col[1], brush->add_col[2], alpha);
@@ -5212,11 +5219,11 @@ static void toggle_paint_cursor(bContext *C, int enable)
Scene *scene = CTX_data_scene(C);
ToolSettings *settings= scene->toolsettings;
- if(settings->imapaint.paintcursor && !enable) {
+ if (settings->imapaint.paintcursor && !enable) {
WM_paint_cursor_end(wm, settings->imapaint.paintcursor);
settings->imapaint.paintcursor = NULL;
}
- else if(enable)
+ else if (enable)
settings->imapaint.paintcursor= WM_paint_cursor_activate(wm, image_paint_poll, brush_drawcursor, NULL);
}
@@ -5229,7 +5236,7 @@ void ED_space_image_paint_update(wmWindowManager *wm, ToolSettings *settings)
{
ImagePaintSettings *imapaint = &settings->imapaint;
- if(!imapaint->paintcursor) {
+ if (!imapaint->paintcursor) {
imapaint->paintcursor =
WM_paint_cursor_activate(wm, image_paint_poll,
brush_drawcursor, NULL);
@@ -5239,8 +5246,8 @@ void ED_space_image_paint_update(wmWindowManager *wm, ToolSettings *settings)
void ED_space_image_uv_sculpt_update(wmWindowManager *wm, ToolSettings *settings)
{
- if(settings->use_uv_sculpt) {
- if(!settings->uvsculpt) {
+ if (settings->use_uv_sculpt) {
+ if (!settings->uvsculpt) {
settings->uvsculpt = MEM_callocN(sizeof(*settings->uvsculpt), "UV Smooth paint");
settings->uv_sculpt_tool = UV_SCULPT_TOOL_GRAB;
settings->uv_sculpt_settings = UV_SCULPT_LOCK_BORDERS | UV_SCULPT_ALL_ISLANDS;
@@ -5253,7 +5260,7 @@ void ED_space_image_uv_sculpt_update(wmWindowManager *wm, ToolSettings *settings
brush_drawcursor, NULL);
}
else {
- if(settings->uvsculpt)
+ if (settings->uvsculpt)
settings->uvsculpt->paint.flags &= ~PAINT_SHOW_BRUSH;
}
}
@@ -5338,18 +5345,18 @@ static int grab_clone_cancel(bContext *UNUSED(C), wmOperator *op)
void PAINT_OT_grab_clone(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Grab Clone";
- ot->idname= "PAINT_OT_grab_clone";
+ ot->name = "Grab Clone";
+ ot->idname = "PAINT_OT_grab_clone";
/* api callbacks */
- ot->exec= grab_clone_exec;
- ot->invoke= grab_clone_invoke;
- ot->modal= grab_clone_modal;
- ot->cancel= grab_clone_cancel;
- ot->poll= image_paint_2d_clone_poll;
+ ot->exec = grab_clone_exec;
+ ot->invoke = grab_clone_invoke;
+ ot->modal = grab_clone_modal;
+ ot->cancel = grab_clone_cancel;
+ ot->poll = image_paint_2d_clone_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* properties */
RNA_def_float_vector(ot->srna, "delta", 2, NULL, -FLT_MAX, FLT_MAX, "Delta", "Delta offset of clone image in 0.0..1.0 coordinates", -1.0f, 1.0f);
@@ -5400,12 +5407,12 @@ static int sample_color_modal(bContext *C, wmOperator *op, wmEvent *event)
/* same as image_paint_poll but fail when face mask mode is enabled */
static int image_paint_sample_color_poll(bContext *C)
{
- if(image_paint_poll(C)) {
- if(CTX_wm_view3d(C)) {
+ if (image_paint_poll(C)) {
+ if (CTX_wm_view3d(C)) {
Object *obact = CTX_data_active_object(C);
if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) {
Mesh *me= get_mesh(obact);
- if(me) {
+ if (me) {
return !(me->editflag & ME_EDIT_PAINT_MASK);
}
}
@@ -5420,17 +5427,17 @@ static int image_paint_sample_color_poll(bContext *C)
void PAINT_OT_sample_color(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Sample Color";
- ot->idname= "PAINT_OT_sample_color";
+ ot->name = "Sample Color";
+ ot->idname = "PAINT_OT_sample_color";
/* api callbacks */
- ot->exec= sample_color_exec;
- ot->invoke= sample_color_invoke;
- ot->modal= sample_color_modal;
- ot->poll= image_paint_sample_color_poll;
+ ot->exec = sample_color_exec;
+ ot->invoke = sample_color_invoke;
+ ot->modal = sample_color_modal;
+ ot->poll = image_paint_sample_color_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "Cursor location in region coordinates", 0, 16384);
@@ -5460,7 +5467,7 @@ static int set_clone_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event)
view3d_operator_needs_opengl(C);
- if(!ED_view3d_autodist(scene, ar, v3d, event->mval, location))
+ if (!ED_view3d_autodist(scene, ar, v3d, event->mval, location))
return OPERATOR_CANCELLED;
RNA_float_set_array(op->ptr, "location", location);
@@ -5471,16 +5478,16 @@ static int set_clone_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event)
void PAINT_OT_clone_cursor_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Clone Cursor";
- ot->idname= "PAINT_OT_clone_cursor_set";
+ ot->name = "Set Clone Cursor";
+ ot->idname = "PAINT_OT_clone_cursor_set";
/* api callbacks */
- ot->exec= set_clone_cursor_exec;
- ot->invoke= set_clone_cursor_invoke;
- ot->poll= image_paint_3d_poll;
+ ot->exec = set_clone_cursor_exec;
+ ot->invoke = set_clone_cursor_invoke;
+ ot->poll = image_paint_3d_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_float_vector(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in world space coordinates", -10000.0f, 10000.0f);
@@ -5490,9 +5497,9 @@ void PAINT_OT_clone_cursor_set(wmOperatorType *ot)
static int texture_paint_toggle_poll(bContext *C)
{
- if(CTX_data_edit_object(C))
+ if (CTX_data_edit_object(C))
return 0;
- if(CTX_data_active_object(C)==NULL)
+ if (CTX_data_active_object(C)==NULL)
return 0;
return 1;
@@ -5504,7 +5511,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
Object *ob= CTX_data_active_object(C);
Mesh *me= NULL;
- if(ob==NULL)
+ if (ob==NULL)
return OPERATOR_CANCELLED;
if (object_data_is_libdata(ob)) {
@@ -5514,15 +5521,15 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
me= get_mesh(ob);
- if(!(ob->mode & OB_MODE_TEXTURE_PAINT) && !me) {
+ if (!(ob->mode & OB_MODE_TEXTURE_PAINT) && !me) {
BKE_report(op->reports, RPT_ERROR, "Can only enter texture paint mode for mesh objects");
return OPERATOR_CANCELLED;
}
- if(ob->mode & OB_MODE_TEXTURE_PAINT) {
+ if (ob->mode & OB_MODE_TEXTURE_PAINT) {
ob->mode &= ~OB_MODE_TEXTURE_PAINT;
- if(U.glreslimit != 0)
+ if (U.glreslimit != 0)
GPU_free_images();
GPU_paint_set_mipmap(1);
@@ -5531,13 +5538,13 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
else {
ob->mode |= OB_MODE_TEXTURE_PAINT;
- if(me->mtface==NULL)
+ if (me->mtface==NULL)
me->mtface= CustomData_add_layer(&me->fdata, CD_MTFACE, CD_DEFAULT,
NULL, me->totface);
paint_init(&scene->toolsettings->imapaint.paint, PAINT_CURSOR_TEXTURE_PAINT);
- if(U.glreslimit != 0)
+ if (U.glreslimit != 0)
GPU_free_images();
GPU_paint_set_mipmap(0);
@@ -5553,21 +5560,21 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
void PAINT_OT_texture_paint_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Texture Paint Toggle";
- ot->idname= "PAINT_OT_texture_paint_toggle";
+ ot->name = "Texture Paint Toggle";
+ ot->idname = "PAINT_OT_texture_paint_toggle";
/* api callbacks */
- ot->exec= texture_paint_toggle_exec;
- ot->poll= texture_paint_toggle_poll;
+ ot->exec = texture_paint_toggle_exec;
+ ot->poll = texture_paint_toggle_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int texture_paint_poll(bContext *C)
{
- if(texture_paint_toggle_poll(C))
- if(CTX_data_active_object(C)->mode & OB_MODE_TEXTURE_PAINT)
+ if (texture_paint_toggle_poll(C))
+ if (CTX_data_active_object(C)->mode & OB_MODE_TEXTURE_PAINT)
return 1;
return 0;
@@ -5609,12 +5616,12 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
project_state_init(C, OBACT, &ps);
- if(ps.ob==NULL || ps.ob->type != OB_MESH) {
+ if (ps.ob==NULL || ps.ob->type != OB_MESH) {
BKE_report(op->reports, RPT_ERROR, "No active mesh object");
return OPERATOR_CANCELLED;
}
- if(image==NULL) {
+ if (image==NULL) {
BKE_report(op->reports, RPT_ERROR, "Image could not be found");
return OPERATOR_CANCELLED;
}
@@ -5622,31 +5629,31 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
ps.reproject_image= image;
ps.reproject_ibuf= BKE_image_get_ibuf(image, NULL);
- if(ps.reproject_ibuf==NULL || ps.reproject_ibuf->rect==NULL) {
+ if (ps.reproject_ibuf==NULL || ps.reproject_ibuf->rect==NULL) {
BKE_report(op->reports, RPT_ERROR, "Image data could not be found");
return OPERATOR_CANCELLED;
}
idgroup= IDP_GetProperties(&image->id, 0);
- if(idgroup) {
+ if (idgroup) {
view_data= IDP_GetPropertyTypeFromGroup(idgroup, PROJ_VIEW_DATA_ID, IDP_ARRAY);
/* type check to make sure its ok */
- if(view_data->len != PROJ_VIEW_DATA_SIZE || view_data->subtype != IDP_FLOAT) {
+ if (view_data->len != PROJ_VIEW_DATA_SIZE || view_data->subtype != IDP_FLOAT) {
BKE_report(op->reports, RPT_ERROR, "Image project data invalid");
return OPERATOR_CANCELLED;
}
}
- if(view_data) {
+ if (view_data) {
/* image has stored view projection info */
ps.source= PROJ_SRC_IMAGE_VIEW;
}
else {
ps.source= PROJ_SRC_IMAGE_CAM;
- if(scene->camera==NULL) {
+ if (scene->camera==NULL) {
BKE_report(op->reports, RPT_ERROR, "No active camera set");
return OPERATOR_CANCELLED;
}
@@ -5668,7 +5675,7 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
/* allocate and initialize spacial data structures */
project_paint_begin(&ps);
- if(ps.dm==NULL) {
+ if (ps.dm==NULL) {
brush_set_size(scene, ps.brush, orig_brush_size);
return OPERATOR_CANCELLED;
}
@@ -5703,20 +5710,20 @@ void PAINT_OT_project_image(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Project Image";
- ot->idname= "PAINT_OT_project_image";
- ot->description= "Project an edited render from the active camera back onto the object";
+ ot->name = "Project Image";
+ ot->idname = "PAINT_OT_project_image";
+ ot->description = "Project an edited render from the active camera back onto the object";
/* api callbacks */
- ot->invoke= WM_enum_search_invoke;
- ot->exec= texture_paint_camera_project_exec;
+ ot->invoke = WM_enum_search_invoke;
+ ot->exec = texture_paint_camera_project_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
prop= RNA_def_enum(ot->srna, "image", DummyRNA_NULL_items, 0, "Image", "");
RNA_def_enum_funcs(prop, RNA_image_itemf);
- ot->prop= prop;
+ ot->prop = prop;
}
static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op)
@@ -5736,11 +5743,11 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op)
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize);
- if(w > maxsize) w= maxsize;
- if(h > maxsize) h= maxsize;
+ 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, err_out);
- if(!ibuf) {
+ if (!ibuf) {
/* Mostly happens when OpenGL offscreen buffer was failed to create, */
/* but could be other reasons. Should be handled in the future. nazgul */
BKE_reportf(op->reports, RPT_ERROR, "Failed to create OpenGL offscreen buffer: %s", err_out);
@@ -5749,7 +5756,7 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op)
image= BKE_add_image_imbuf(ibuf);
- if(image) {
+ if (image) {
/* now for the trickyness. store the view projection here!
* re-projection will reuse this */
View3D *v3d= CTX_wm_view3d(C);
@@ -5782,16 +5789,16 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op)
void PAINT_OT_image_from_view(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Image from View";
- ot->idname= "PAINT_OT_image_from_view";
- ot->description= "Make an image from the current 3D view for re-projection";
+ ot->name = "Image from View";
+ ot->idname = "PAINT_OT_image_from_view";
+ ot->description = "Make an image from the current 3D view for re-projection";
/* api callbacks */
- ot->exec= texture_paint_image_from_view_exec;
- ot->poll= ED_operator_region_view3d_active;
+ ot->exec = texture_paint_image_from_view_exec;
+ ot->poll = ED_operator_region_view3d_active;
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
RNA_def_string_file_name(ot->srna, "filepath", "", FILE_MAX, "File Path", "Name of the file");
}
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index bae433bdb55..eb9dbe6eba1 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -168,5 +168,19 @@ struct ListBase *undo_paint_push_get_list(int type);
void undo_paint_push_count_alloc(int type, int size);
void undo_paint_push_end(int type);
-#endif /* __PAINT_INTERN_H__ */
+/* paint_hide.c */
+
+typedef enum {
+ PARTIALVIS_HIDE,
+ PARTIALVIS_SHOW
+} PartialVisAction;
+
+typedef enum {
+ PARTIALVIS_INSIDE,
+ PARTIALVIS_OUTSIDE,
+ PARTIALVIS_ALL
+} PartialVisArea;
+void PAINT_OT_hide_show(struct wmOperatorType *ot);
+
+#endif /* __PAINT_INTERN_H__ */
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 757f501d296..046a3b374ba 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -75,15 +75,15 @@ static int brush_add_exec(bContext *C, wmOperator *UNUSED(op))
static void BRUSH_OT_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Brush";
- ot->description= "Add brush by mode type";
- ot->idname= "BRUSH_OT_add";
+ ot->name = "Add Brush";
+ ot->description = "Add brush by mode type";
+ ot->idname = "BRUSH_OT_add";
/* api callbacks */
- ot->exec= brush_add_exec;
+ ot->exec = brush_add_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -131,15 +131,15 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op)
static void BRUSH_OT_scale_size(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Scale Sculpt/Paint Brush Size";
- ot->description= "Change brush size by a scalar";
- ot->idname= "BRUSH_OT_scale_size";
+ ot->name = "Scale Sculpt/Paint Brush Size";
+ ot->description = "Change brush size by a scalar";
+ ot->idname = "BRUSH_OT_scale_size";
/* api callbacks */
- ot->exec= brush_scale_size_exec;
+ ot->exec = brush_scale_size_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_float(ot->srna, "scalar", 1, 0, 2, "Scalar", "Factor to scale brush size by", 0, 2);
}
@@ -158,15 +158,15 @@ static int vertex_color_set_exec(bContext *C, wmOperator *UNUSED(op))
static void PAINT_OT_vertex_color_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Vertex Colors";
- ot->idname= "PAINT_OT_vertex_color_set";
+ ot->name = "Set Vertex Colors";
+ ot->idname = "PAINT_OT_vertex_color_set";
/* api callbacks */
- ot->exec= vertex_color_set_exec;
- ot->poll= vertex_paint_mode_poll;
+ ot->exec = vertex_color_set_exec;
+ ot->poll = vertex_paint_mode_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op))
@@ -175,9 +175,9 @@ static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op))
struct Brush *brush = paint_brush(paint);
Object *ob = CTX_data_active_object(C);
- if(!ob) return OPERATOR_CANCELLED;
+ if (!ob) return OPERATOR_CANCELLED;
- if(ob->mode & OB_MODE_SCULPT)
+ if (ob->mode & OB_MODE_SCULPT)
brush_reset_sculpt(brush);
/* TODO: other modes */
@@ -187,15 +187,20 @@ static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op))
static void BRUSH_OT_reset(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reset Brush";
- ot->description= "Return brush to defaults based on current tool";
- ot->idname= "BRUSH_OT_reset";
+ ot->name = "Reset Brush";
+ ot->description = "Return brush to defaults based on current tool";
+ ot->idname = "BRUSH_OT_reset";
/* api callbacks */
- ot->exec= brush_reset_exec;
+ ot->exec = brush_reset_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int brush_tool(const Brush *brush, size_t tool_offset)
+{
+ return *(((char *)brush) + tool_offset);
}
/* generic functions for setting the active brush based on the tool */
@@ -203,24 +208,21 @@ static Brush *brush_tool_cycle(Main *bmain, Brush *brush_orig, const int tool, c
{
struct Brush *brush;
- if(!brush_orig && !(brush_orig= bmain->brush.first)) {
+ if (!brush_orig && !(brush_orig= bmain->brush.first)) {
return NULL;
}
/* get the next brush with the active tool */
- for( brush= brush_orig->id.next ? brush_orig->id.next : bmain->brush.first;
- brush != brush_orig;
- brush= brush->id.next ? brush->id.next : bmain->brush.first)
- {
- if( (brush->ob_mode & ob_mode) &&
- (*(((char *)brush) + tool_offset) == tool)
- ) {
+ for (brush= brush_orig->id.next ? brush_orig->id.next : bmain->brush.first;
+ brush != brush_orig;
+ brush= brush->id.next ? brush->id.next : bmain->brush.first) {
+ if ((brush->ob_mode & ob_mode) &&
+ (brush_tool(brush, tool_offset) == tool)) {
return brush;
}
}
return NULL;
-
}
static int brush_generic_tool_set(Main *bmain, Paint *paint, const int tool, const size_t tool_offset, const int ob_mode)
@@ -229,7 +231,7 @@ static int brush_generic_tool_set(Main *bmain, Paint *paint, const int tool, con
brush= brush_tool_cycle(bmain, brush_orig, tool, tool_offset, ob_mode);
- if(brush) {
+ if (brush) {
paint_brush_set(paint, brush);
WM_main_add_notifier(NC_BRUSH|NA_EDITED, brush);
return OPERATOR_FINISHED;
@@ -239,107 +241,113 @@ static int brush_generic_tool_set(Main *bmain, Paint *paint, const int tool, con
}
}
-static int brush_sculpt_tool_set_exec(bContext *C, wmOperator *op)
-{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
-
- return brush_generic_tool_set(bmain, &scene->toolsettings->sculpt->paint, RNA_enum_get(op->ptr, "tool"), offsetof(Brush, sculpt_tool), OB_MODE_SCULPT);
-}
-
-static void BRUSH_OT_sculpt_tool_set(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Sculpt Tool Set";
- ot->description= "Set the sculpt tool";
- ot->idname= "BRUSH_OT_sculpt_tool_set";
-
- /* api callbacks */
- ot->exec= brush_sculpt_tool_set_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* props */
- ot->prop= RNA_def_enum(ot->srna, "tool", brush_sculpt_tool_items, 0, "Tool", "");
-}
+/* used in the PAINT_OT_brush_select operator */
+#define OB_MODE_ACTIVE 0
-static int brush_vertex_tool_set_exec(bContext *C, wmOperator *op)
+static int brush_select_exec(bContext *C, wmOperator *op)
{
Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
-
- return brush_generic_tool_set(bmain, &scene->toolsettings->vpaint->paint, RNA_enum_get(op->ptr, "tool"), offsetof(Brush, vertexpaint_tool), OB_MODE_VERTEX_PAINT);
-}
-
-static void BRUSH_OT_vertex_tool_set(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Vertex Paint Tool Set";
- ot->description= "Set the vertex paint tool";
- ot->idname= "BRUSH_OT_vertex_tool_set";
-
- /* api callbacks */
- ot->exec= brush_vertex_tool_set_exec;
+ ToolSettings *toolsettings= CTX_data_tool_settings(C);
+ Paint *paint= NULL;
+ int tool, paint_mode= RNA_enum_get(op->ptr, "paint_mode");
+ size_t tool_offset;
+
+ if (paint_mode == OB_MODE_ACTIVE) {
+ /* select current paint mode */
+ paint_mode = CTX_data_active_object(C)->mode &
+ (OB_MODE_SCULPT|
+ OB_MODE_VERTEX_PAINT|
+ OB_MODE_WEIGHT_PAINT|
+ OB_MODE_TEXTURE_PAINT);
+ }
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ switch(paint_mode) {
+ case OB_MODE_SCULPT:
+ paint= &toolsettings->sculpt->paint;
+ tool_offset= offsetof(Brush, sculpt_tool);
+ tool= RNA_enum_get(op->ptr, "sculpt_tool");
+ break;
+ case OB_MODE_VERTEX_PAINT:
+ paint= &toolsettings->vpaint->paint;
+ tool_offset= offsetof(Brush, vertexpaint_tool);
+ tool= RNA_enum_get(op->ptr, "vertex_paint_tool");
+ break;
+ case OB_MODE_WEIGHT_PAINT:
+ paint= &toolsettings->wpaint->paint;
+ /* vertexpaint_tool is used for weight paint mode */
+ tool_offset= offsetof(Brush, vertexpaint_tool);
+ tool= RNA_enum_get(op->ptr, "weight_paint_tool");
+ break;
+ case OB_MODE_TEXTURE_PAINT:
+ paint= &toolsettings->imapaint.paint;
+ tool_offset= offsetof(Brush, imagepaint_tool);
+ tool= RNA_enum_get(op->ptr, "texture_paint_tool");
+ break;
+ default:
+ /* invalid paint mode */
+ return OPERATOR_CANCELLED;
+ }
- /* props */
- ot->prop= RNA_def_enum(ot->srna, "tool", brush_vertex_tool_items, 0, "Tool", "");
+ return brush_generic_tool_set(bmain, paint, tool, tool_offset, paint_mode);
}
-static int brush_weight_tool_set_exec(bContext *C, wmOperator *op)
+static void PAINT_OT_brush_select(wmOperatorType *ot)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- /* vertexpaint_tool is used for weight paint mode */
- return brush_generic_tool_set(bmain, &scene->toolsettings->wpaint->paint, RNA_enum_get(op->ptr, "tool"), offsetof(Brush, vertexpaint_tool), OB_MODE_WEIGHT_PAINT);
-}
+ static EnumPropertyItem paint_mode_items[] = {
+ {OB_MODE_ACTIVE, "ACTIVE", 0, "Current", "Set brush for active paint mode"},
+ {OB_MODE_SCULPT, "SCULPT", ICON_SCULPTMODE_HLT, "Sculpt", ""},
+ {OB_MODE_VERTEX_PAINT, "VERTEX_PAINT", ICON_VPAINT_HLT, "Vertex Paint", ""},
+ {OB_MODE_WEIGHT_PAINT, "WEIGHT_PAINT", ICON_WPAINT_HLT, "Weight Paint", ""},
+ {OB_MODE_TEXTURE_PAINT, "TEXTURE_PAINT", ICON_TPAINT_HLT, "Texture Paint", ""},
+ {0, NULL, 0, NULL, NULL}};
-static void BRUSH_OT_weight_tool_set(wmOperatorType *ot)
-{
/* identifiers */
- ot->name= "Weight Paint Tool Set";
- ot->description= "Set the weight paint tool";
- ot->idname= "BRUSH_OT_weight_tool_set";
+ ot->name = "Brush Select";
+ ot->description = "Select a paint mode's brush by tool type";
+ ot->idname = "PAINT_OT_brush_select";
/* api callbacks */
- ot->exec= brush_weight_tool_set_exec;
+ ot->exec = brush_select_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- ot->prop= RNA_def_enum(ot->srna, "tool", brush_vertex_tool_items, 0, "Tool", "");
+ RNA_def_enum(ot->srna, "paint_mode", paint_mode_items, OB_MODE_ACTIVE, "Paint Mode", "");
+ RNA_def_enum(ot->srna, "sculpt_tool", brush_sculpt_tool_items, 0, "Sculpt Tool", "");
+ RNA_def_enum(ot->srna, "vertex_paint_tool", brush_vertex_tool_items, 0, "Vertex Paint Tool", "");
+ RNA_def_enum(ot->srna, "weight_paint_tool", brush_vertex_tool_items, 0, "Weight Paint Tool", "");
+ RNA_def_enum(ot->srna, "texture_paint_tool", brush_image_tool_items, 0, "Texture Paint Tool", "");
}
-static int brush_image_tool_set_exec(bContext *C, wmOperator *op)
+static wmKeyMapItem *keymap_brush_select(wmKeyMap *keymap, int paint_mode,
+ int tool, int keymap_type,
+ int keymap_modifier)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
-
- return brush_generic_tool_set(bmain, &scene->toolsettings->imapaint.paint, RNA_enum_get(op->ptr, "tool"), offsetof(Brush, imagepaint_tool), OB_MODE_TEXTURE_PAINT);
-}
-
-static void BRUSH_OT_image_tool_set(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Image Paint Tool Set";
- ot->description= "Set the image tool";
- ot->idname= "BRUSH_OT_image_tool_set";
-
- /* api callbacks */
- ot->exec= brush_image_tool_set_exec;
+ wmKeyMapItem *kmi;
+ kmi = WM_keymap_add_item(keymap, "PAINT_OT_brush_select",
+ keymap_type, KM_PRESS, keymap_modifier, 0);
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ RNA_enum_set(kmi->ptr, "paint_mode", paint_mode);
+
+ switch(paint_mode) {
+ case OB_MODE_SCULPT:
+ RNA_enum_set(kmi->ptr, "sculpt_tool", tool);
+ break;
+ case OB_MODE_VERTEX_PAINT:
+ RNA_enum_set(kmi->ptr, "vertex_paint_tool", tool);
+ break;
+ case OB_MODE_WEIGHT_PAINT:
+ RNA_enum_set(kmi->ptr, "weight_paint_tool", tool);
+ break;
+ case OB_MODE_TEXTURE_PAINT:
+ RNA_enum_set(kmi->ptr, "texture_paint_tool", tool);
+ break;
+ }
- /* props */
- ot->prop= RNA_def_enum(ot->srna, "tool", brush_image_tool_items, 0, "Tool", "");
+ return kmi;
}
-
static int brush_uv_sculpt_tool_set_exec(bContext *C, wmOperator *op)
{
Brush *brush;
@@ -384,10 +392,7 @@ void ED_operatortypes_paint(void)
WM_operatortype_append(BRUSH_OT_reset);
/* note, particle uses a different system, can be added with existing operators in wm.py */
- WM_operatortype_append(BRUSH_OT_sculpt_tool_set);
- WM_operatortype_append(BRUSH_OT_vertex_tool_set);
- WM_operatortype_append(BRUSH_OT_weight_tool_set);
- WM_operatortype_append(BRUSH_OT_image_tool_set);
+ WM_operatortype_append(PAINT_OT_brush_select);
WM_operatortype_append(BRUSH_OT_uv_sculpt_tool_set);
/* image */
@@ -426,6 +431,9 @@ void ED_operatortypes_paint(void)
WM_operatortype_append(PAINT_OT_face_select_inverse);
WM_operatortype_append(PAINT_OT_face_select_hide);
WM_operatortype_append(PAINT_OT_face_select_reveal);
+
+ /* partial visibility */
+ WM_operatortype_append(PAINT_OT_hide_show);
}
@@ -435,7 +443,7 @@ static void ed_keymap_paint_brush_switch(wmKeyMap *keymap, const char *mode)
int i;
/* index 0-9 (zero key is tenth), shift key for index 10-19 */
for (i = 0; i < 20; i++) {
- kmi= WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set",
+ kmi = WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set",
ZEROKEY + ((i + 1) % 10), KM_PRESS, i < 10 ? 0 : KM_SHIFT, 0);
RNA_string_set(kmi->ptr, "mode", mode);
RNA_int_set(kmi->ptr, "index", i);
@@ -446,10 +454,10 @@ static void ed_keymap_paint_brush_size(wmKeyMap *keymap, const char *UNUSED(path
{
wmKeyMapItem *kmi;
- kmi= WM_keymap_add_item(keymap, "BRUSH_OT_scale_size", LEFTBRACKETKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "BRUSH_OT_scale_size", LEFTBRACKETKEY, KM_PRESS, 0, 0);
RNA_float_set(kmi->ptr, "scalar", 0.9);
- kmi= WM_keymap_add_item(keymap, "BRUSH_OT_scale_size", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "BRUSH_OT_scale_size", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
RNA_float_set(kmi->ptr, "scalar", 10.0/9.0); // 1.1111....
}
@@ -479,7 +487,7 @@ static void set_brush_rc_props(PointerRNA *ptr, const char *paint,
brush_path = BLI_sprintfN("tool_settings.%s.brush", paint);
set_brush_rc_path(ptr, brush_path, "data_path_primary", prop);
- if(secondary_prop) {
+ if (secondary_prop) {
set_brush_rc_path(ptr, ups_path, "use_secondary", secondary_prop);
set_brush_rc_path(ptr, ups_path, "data_path_secondary", prop);
}
@@ -491,11 +499,11 @@ static void set_brush_rc_props(PointerRNA *ptr, const char *paint,
set_brush_rc_path(ptr, brush_path, "rotation_path", "texture_slot.angle");
RNA_string_set(ptr, "image_id", brush_path);
- if(flags & RC_COLOR)
+ if (flags & RC_COLOR)
set_brush_rc_path(ptr, brush_path, "fill_color_path", "color");
else
RNA_string_set(ptr, "fill_color_path", "");
- if(flags & RC_ZOOM)
+ if (flags & RC_ZOOM)
RNA_string_set(ptr, "zoom_path", "space_data.zoom");
else
RNA_string_set(ptr, "zoom_path", "");
@@ -514,12 +522,28 @@ static void ed_keymap_paint_brush_radial_control(wmKeyMap *keymap, const char *p
kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0);
set_brush_rc_props(kmi->ptr, paint, "strength", "use_unified_strength", flags);
- if(flags & RC_ROTATION) {
+ if (flags & RC_ROTATION) {
kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_CTRL, 0);
set_brush_rc_props(kmi->ptr, paint, "texture_slot.angle", NULL, flags);
}
}
+void paint_partial_visibility_keys(wmKeyMap *keymap)
+{
+ wmKeyMapItem *kmi;
+
+ /* Partial visiblity */
+ kmi = WM_keymap_add_item(keymap, "PAINT_OT_hide_show", HKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_enum_set(kmi->ptr, "action", PARTIALVIS_SHOW);
+ RNA_enum_set(kmi->ptr, "area", PARTIALVIS_INSIDE);
+ kmi = WM_keymap_add_item(keymap, "PAINT_OT_hide_show", HKEY, KM_PRESS, 0, 0);
+ RNA_enum_set(kmi->ptr, "action", PARTIALVIS_HIDE);
+ RNA_enum_set(kmi->ptr, "area", PARTIALVIS_INSIDE);
+ kmi = WM_keymap_add_item(keymap, "PAINT_OT_hide_show", HKEY, KM_PRESS, KM_ALT, 0);
+ RNA_enum_set(kmi->ptr, "action", PARTIALVIS_SHOW);
+ RNA_enum_set(kmi->ptr, "area", PARTIALVIS_ALL);
+}
+
void ED_keymap_paint(wmKeyConfig *keyconf)
{
wmKeyMap *keymap;
@@ -527,22 +551,25 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
int i;
/* Sculpt mode */
- keymap= WM_keymap_find(keyconf, "Sculpt", 0, 0);
- keymap->poll= sculpt_poll;
+ keymap = WM_keymap_find(keyconf, "Sculpt", 0, 0);
+ keymap->poll = sculpt_poll;
RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, 0, 0)->ptr, "mode", BRUSH_STROKE_NORMAL);
RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "mode", BRUSH_STROKE_INVERT);
RNA_enum_set(WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", BRUSH_STROKE_SMOOTH);
- for(i=0; i<=5; i++)
+ /* Partial visibility, sculpt-only for now */
+ paint_partial_visibility_keys(keymap);
+
+ for (i=0; i<=5; i++)
RNA_int_set(WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", ZEROKEY+i, KM_PRESS, KM_CTRL, 0)->ptr, "level", i);
/* multires switch */
- kmi= WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEUPKEY, KM_PRESS, 0, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEDOWNKEY, KM_PRESS, 0, 0);
+ 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);
@@ -550,15 +577,15 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
ed_keymap_paint_brush_size(keymap, "tool_settings.sculpt.brush.size");
ed_keymap_paint_brush_radial_control(keymap, "sculpt", RC_ROTATION);
- RNA_enum_set(WM_keymap_add_item(keymap, "BRUSH_OT_sculpt_tool_set", DKEY, KM_PRESS, 0, 0)->ptr, "tool", SCULPT_TOOL_DRAW);
- RNA_enum_set(WM_keymap_add_item(keymap, "BRUSH_OT_sculpt_tool_set", SKEY, KM_PRESS, 0, 0)->ptr, "tool", SCULPT_TOOL_SMOOTH);
- RNA_enum_set(WM_keymap_add_item(keymap, "BRUSH_OT_sculpt_tool_set", PKEY, KM_PRESS, 0, 0)->ptr, "tool", SCULPT_TOOL_PINCH);
- RNA_enum_set(WM_keymap_add_item(keymap, "BRUSH_OT_sculpt_tool_set", IKEY, KM_PRESS, 0, 0)->ptr, "tool", SCULPT_TOOL_INFLATE);
- RNA_enum_set(WM_keymap_add_item(keymap, "BRUSH_OT_sculpt_tool_set", GKEY, KM_PRESS, 0, 0)->ptr, "tool", SCULPT_TOOL_GRAB);
- RNA_enum_set(WM_keymap_add_item(keymap, "BRUSH_OT_sculpt_tool_set", LKEY, KM_PRESS, 0, 0)->ptr, "tool", SCULPT_TOOL_LAYER);
- RNA_enum_set(WM_keymap_add_item(keymap, "BRUSH_OT_sculpt_tool_set", TKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "tool", SCULPT_TOOL_FLATTEN); /* was just TKEY in 2.4x */
- RNA_enum_set(WM_keymap_add_item(keymap, "BRUSH_OT_sculpt_tool_set", CKEY, KM_PRESS, 0, 0)->ptr, "tool", SCULPT_TOOL_CLAY);
- RNA_enum_set(WM_keymap_add_item(keymap, "BRUSH_OT_sculpt_tool_set", CKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "tool", SCULPT_TOOL_CREASE);
+ keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_DRAW, DKEY, 0);
+ keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_SMOOTH, SKEY, 0);
+ keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_PINCH, PKEY, 0);
+ keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_INFLATE, IKEY, 0);
+ keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_GRAB, GKEY, 0);
+ keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_LAYER, LKEY, 0);
+ keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_FLATTEN, TKEY, KM_SHIFT);
+ keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_CLAY, CKEY, 0);
+ keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_CREASE, CKEY, KM_SHIFT);
/* */
kmi = WM_keymap_add_item(keymap, "WM_OT_context_menu_enum", AKEY, KM_PRESS, 0, 0);
@@ -571,8 +598,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
RNA_string_set(kmi->ptr, "data_path", "tool_settings.sculpt.brush.texture_angle_source_random");
/* Vertex Paint mode */
- keymap= WM_keymap_find(keyconf, "Vertex Paint", 0, 0);
- keymap->poll= vertex_paint_mode_poll;
+ keymap = WM_keymap_find(keyconf, "Vertex Paint", 0, 0);
+ keymap->poll = vertex_paint_mode_poll;
WM_keymap_verify_item(keymap, "PAINT_OT_vertex_paint", LEFTMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0);
@@ -588,8 +615,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
RNA_string_set(kmi->ptr, "data_path", "vertex_paint_object.data.use_paint_mask");
/* Weight Paint mode */
- keymap= WM_keymap_find(keyconf, "Weight Paint", 0, 0);
- keymap->poll= weight_paint_mode_poll;
+ keymap = WM_keymap_find(keyconf, "Weight Paint", 0, 0);
+ keymap->poll = weight_paint_mode_poll;
WM_keymap_verify_item(keymap, "PAINT_OT_weight_paint", LEFTMOUSE, KM_PRESS, 0, 0);
@@ -615,8 +642,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
/*Weight paint's Vertex Selection Mode */
- keymap= WM_keymap_find(keyconf, "Weight Paint Vertex Selection", 0, 0);
- keymap->poll= vert_paint_poll;
+ keymap = WM_keymap_find(keyconf, "Weight Paint Vertex Selection", 0, 0);
+ keymap->poll = vert_paint_poll;
WM_keymap_add_item(keymap, "PAINT_OT_vert_select_all", AKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "PAINT_OT_vert_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0);
@@ -627,8 +654,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "VIEW3D_OT_select_circle", CKEY, KM_PRESS, 0, 0);
/* Image/Texture Paint mode */
- keymap= WM_keymap_find(keyconf, "Image Paint", 0, 0);
- keymap->poll= image_texture_paint_poll;
+ keymap = WM_keymap_find(keyconf, "Image Paint", 0, 0);
+ keymap->poll = image_texture_paint_poll;
WM_keymap_add_item(keymap, "PAINT_OT_image_paint", LEFTMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "PAINT_OT_grab_clone", RIGHTMOUSE, KM_PRESS, 0, 0);
@@ -643,8 +670,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
RNA_string_set(kmi->ptr, "data_path", "image_paint_object.data.use_paint_mask");
/* face-mask mode */
- keymap= WM_keymap_find(keyconf, "Face Mask", 0, 0);
- keymap->poll= facemask_paint_poll;
+ keymap = WM_keymap_find(keyconf, "Face Mask", 0, 0);
+ keymap->poll = facemask_paint_poll;
WM_keymap_add_item(keymap, "PAINT_OT_face_select_all", AKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "PAINT_OT_face_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
@@ -657,8 +684,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "PAINT_OT_face_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "PAINT_OT_face_select_linked_pick", LKEY, KM_PRESS, 0, 0);
- keymap= WM_keymap_find(keyconf, "UV Sculpt", 0, 0);
- keymap->poll= uv_sculpt_poll;
+ keymap = WM_keymap_find(keyconf, "UV Sculpt", 0, 0);
+ keymap->poll = uv_sculpt_poll;
kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", QKEY, KM_PRESS, 0, 0);
RNA_string_set(kmi->ptr, "data_path", "tool_settings.use_uv_sculpt");
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index d306abef9d0..28fee887cd8 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -95,7 +95,7 @@ static void paint_draw_smooth_stroke(bContext *C, int x, int y, void *customdata
glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
- if(stroke && brush && (brush->flag & BRUSH_SMOOTH_STROKE)) {
+ if (stroke && brush && (brush->flag & BRUSH_SMOOTH_STROKE)) {
ARegion *ar = CTX_wm_region(C);
sdrawline(x, y, (int)stroke->last_mouse_position[0] - ar->winrct.xmin,
(int)stroke->last_mouse_position[1] - ar->winrct.ymin);
@@ -112,14 +112,14 @@ static float event_tablet_data(wmEvent *event, int *pen_flip)
int erasor = 0;
float pressure = 1;
- if(event->custom == EVT_DATA_TABLET) {
+ if (event->custom == EVT_DATA_TABLET) {
wmTabletData *wmtab= event->customdata;
erasor = (wmtab->Active == EVT_TABLET_ERASER);
pressure = (wmtab->Active != EVT_TABLET_NONE) ? wmtab->Pressure : 1;
}
- if(pen_flip)
+ if (pen_flip)
(*pen_flip) = erasor;
return pressure;
@@ -143,7 +143,7 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, wmEvent *ev
/* TODO: as sculpt and other paint modes are unified, this
* separation will go away */
- if(stroke->vc.obact->sculpt) {
+ if (stroke->vc.obact->sculpt) {
float delta[2];
brush_jitter_pos(scene, brush, mouse_in, mouse);
@@ -151,7 +151,7 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, wmEvent *ev
/* XXX: meh, this is round about because
* brush_jitter_pos isn't written in the best way to
* be reused here */
- if(brush->flag & BRUSH_JITTER_PRESSURE) {
+ if (brush->flag & BRUSH_JITTER_PRESSURE) {
sub_v2_v2v2(delta, mouse, mouse_in);
mul_v2_fl(delta, pressure);
add_v2_v2v2(mouse, mouse_in, delta);
@@ -162,7 +162,7 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, wmEvent *ev
}
/* TODO: can remove the if statement once all modes have this */
- if(stroke->get_location)
+ if (stroke->get_location)
stroke->get_location(C, location, mouse);
else
zero_v3(location);
@@ -197,7 +197,7 @@ static int paint_smooth_stroke(PaintStroke *stroke, float output[2], wmEvent *ev
/* If the mouse is moving within the radius of the last move,
* don't update the mouse position. This allows sharp turns. */
- if(dx*dx + dy*dy < stroke->brush->smooth_stroke_radius * stroke->brush->smooth_stroke_radius)
+ if (dx*dx + dy*dy < stroke->brush->smooth_stroke_radius * stroke->brush->smooth_stroke_radius)
return 0;
output[0] = event->x * v + stroke->last_mouse_position[0] * u;
@@ -214,7 +214,7 @@ static int paint_space_stroke(bContext *C, wmOperator *op, wmEvent *event, const
PaintStroke *stroke = op->customdata;
int cnt = 0;
- if(paint_space_stroke_enabled(stroke->brush)) {
+ if (paint_space_stroke_enabled(stroke->brush)) {
float mouse[2];
float vec[2];
float length, scale;
@@ -224,24 +224,24 @@ static int paint_space_stroke(bContext *C, wmOperator *op, wmEvent *event, const
length = len_v2(vec);
- if(length > FLT_EPSILON) {
+ if (length > FLT_EPSILON) {
const Scene *scene = CTX_data_scene(C);
int steps;
int i;
float pressure= 1.0f;
/* XXX mysterious :) what has 'use size' do with this here... if you don't check for it, pressure fails */
- if(brush_use_size_pressure(scene, stroke->brush))
+ if (brush_use_size_pressure(scene, stroke->brush))
pressure = event_tablet_data(event, NULL);
- if(pressure > FLT_EPSILON) {
+ if (pressure > FLT_EPSILON) {
scale = (brush_size(scene, stroke->brush)*pressure*stroke->brush->spacing/50.0f) / length;
- if(scale > FLT_EPSILON) {
+ if (scale > FLT_EPSILON) {
mul_v2_fl(vec, scale);
steps = (int)(1.0f / scale);
- for(i = 0; i < steps; ++i, ++cnt) {
+ for (i = 0; i < steps; ++i, ++cnt) {
add_v2_v2(mouse, vec);
paint_brush_stroke_add_step(C, op, event, mouse);
}
@@ -302,16 +302,16 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
if (event->type == NDOF_MOTION)
return OPERATOR_PASS_THROUGH;
- if(!stroke->stroke_started) {
+ if (!stroke->stroke_started) {
stroke->last_mouse_position[0] = event->x;
stroke->last_mouse_position[1] = event->y;
stroke->stroke_started = stroke->test_start(C, op, event);
- if(stroke->stroke_started) {
+ if (stroke->stroke_started) {
stroke->smooth_stroke_cursor =
WM_paint_cursor_activate(CTX_wm_manager(C), paint_poll, paint_draw_smooth_stroke, stroke);
- if(stroke->brush->flag & BRUSH_AIRBRUSH)
+ if (stroke->brush->flag & BRUSH_AIRBRUSH)
stroke->timer = WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, stroke->brush->rate);
}
@@ -319,26 +319,26 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
//ED_region_tag_redraw(ar);
}
- if(event->type == stroke->event_type && event->val == KM_RELEASE) {
+ if (event->type == stroke->event_type && event->val == KM_RELEASE) {
/* exit stroke, free data */
- if(stroke->smooth_stroke_cursor)
+ if (stroke->smooth_stroke_cursor)
WM_paint_cursor_end(CTX_wm_manager(C), stroke->smooth_stroke_cursor);
- if(stroke->timer)
+ if (stroke->timer)
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), stroke->timer);
stroke->done(C, stroke);
MEM_freeN(stroke);
return OPERATOR_FINISHED;
}
- else if( (first) ||
+ else if ( (first) ||
(ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) ||
(event->type == TIMER && (event->customdata == stroke->timer)) )
{
- if(stroke->stroke_started) {
- if(paint_smooth_stroke(stroke, mouse, event)) {
- if(paint_space_stroke_enabled(stroke->brush)) {
- if(!paint_space_stroke(C, op, event, mouse)) {
+ if (stroke->stroke_started) {
+ if (paint_smooth_stroke(stroke, mouse, event)) {
+ if (paint_space_stroke_enabled(stroke->brush)) {
+ if (!paint_space_stroke(C, op, event, mouse)) {
//ED_region_tag_redraw(ar);
}
}
@@ -354,7 +354,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
/* we want the stroke to have the first daub at the start location
* instead of waiting till we have moved the space distance */
- if(first &&
+ if (first &&
stroke->stroke_started &&
paint_space_stroke_enabled(stroke->brush) &&
!(stroke->brush->flag & BRUSH_ANCHORED) &&
@@ -371,7 +371,7 @@ int paint_stroke_exec(bContext *C, wmOperator *op)
PaintStroke *stroke = op->customdata;
/* only when executed for the first time */
- if(stroke->stroke_started == 0) {
+ if (stroke->stroke_started == 0) {
/* XXX stroke->last_mouse_position is unset, this may cause problems */
stroke->test_start(C, op, NULL);
stroke->stroke_started= 1;
@@ -394,7 +394,7 @@ int paint_stroke_cancel(bContext *C, wmOperator *op)
{
PaintStroke *stroke = op->customdata;
- if(stroke->done)
+ if (stroke->done)
stroke->done(C, stroke);
MEM_freeN(stroke);
diff --git a/source/blender/editors/sculpt_paint/paint_undo.c b/source/blender/editors/sculpt_paint/paint_undo.c
index b00910195ff..8406c8b20af 100644
--- a/source/blender/editors/sculpt_paint/paint_undo.c
+++ b/source/blender/editors/sculpt_paint/paint_undo.c
@@ -71,13 +71,13 @@ static UndoStack MeshUndoStack = {UNDO_PAINT_MESH, {NULL, NULL}, NULL};
static void undo_restore(bContext *C, UndoStack *UNUSED(stack), UndoElem *uel)
{
- if(uel && uel->restore)
+ if (uel && uel->restore)
uel->restore(C, &uel->elems);
}
static void undo_elem_free(UndoStack *UNUSED(stack), UndoElem *uel)
{
- if(uel && uel->free) {
+ if (uel && uel->free) {
uel->free(&uel->elems);
BLI_freelistN(&uel->elems);
}
@@ -93,7 +93,7 @@ static void undo_stack_push_begin(UndoStack *stack, const char *name, UndoRestor
* know how much memory the undo used to remove old undo elements */
/* remove all undos after (also when stack->current==NULL) */
- while(stack->elems.last != stack->current) {
+ while (stack->elems.last != stack->current) {
uel= stack->elems.last;
undo_elem_free(stack, uel);
BLI_freelinkN(&stack->elems, uel);
@@ -111,13 +111,13 @@ static void undo_stack_push_begin(UndoStack *stack, const char *name, UndoRestor
/* limit amount to the maximum amount*/
nr= 0;
uel= stack->elems.last;
- while(uel) {
+ while (uel) {
nr++;
- if(nr==U.undosteps) break;
+ if (nr==U.undosteps) break;
uel= uel->prev;
}
- if(uel) {
- while(stack->elems.first!=uel) {
+ if (uel) {
+ while (stack->elems.first!=uel) {
UndoElem *first= stack->elems.first;
undo_elem_free(stack, first);
BLI_freelinkN(&stack->elems, first);
@@ -130,20 +130,20 @@ static void undo_stack_push_end(UndoStack *stack)
UndoElem *uel;
uintptr_t totmem, maxmem;
- if(U.undomemory != 0) {
+ if (U.undomemory != 0) {
/* limit to maximum memory (afterwards, we can't know in advance) */
totmem= 0;
maxmem= ((uintptr_t)U.undomemory)*1024*1024;
uel= stack->elems.last;
- while(uel) {
+ while (uel) {
totmem+= uel->undosize;
- if(totmem>maxmem) break;
+ if (totmem>maxmem) break;
uel= uel->prev;
}
- if(uel) {
- while(stack->elems.first!=uel) {
+ if (uel) {
+ while (stack->elems.first!=uel) {
UndoElem *first= stack->elems.first;
undo_elem_free(stack, first);
BLI_freelinkN(&stack->elems, first);
@@ -156,25 +156,25 @@ static int undo_stack_step(bContext *C, UndoStack *stack, int step, const char *
{
UndoElem *undo;
- if(step==1) {
- if(stack->current==NULL);
+ if (step==1) {
+ if (stack->current==NULL);
else {
- if(!name || strcmp(stack->current->name, name) == 0) {
- if(G.f & G_DEBUG) printf("undo %s\n", stack->current->name);
+ if (!name || strcmp(stack->current->name, name) == 0) {
+ if (G.f & G_DEBUG) printf("undo %s\n", stack->current->name);
undo_restore(C, stack, stack->current);
stack->current= stack->current->prev;
return 1;
}
}
}
- else if(step==-1) {
- if((stack->current!=NULL && stack->current->next==NULL) || stack->elems.first==NULL);
+ else if (step==-1) {
+ if ((stack->current!=NULL && stack->current->next==NULL) || stack->elems.first==NULL);
else {
- if(!name || strcmp(stack->current->name, name) == 0) {
+ if (!name || strcmp(stack->current->name, name) == 0) {
undo= (stack->current && stack->current->next)? stack->current->next: stack->elems.first;
undo_restore(C, stack, undo);
stack->current= undo;
- if(G.f & G_DEBUG) printf("redo %s\n", undo->name);
+ if (G.f & G_DEBUG) printf("redo %s\n", undo->name);
return 1;
}
}
@@ -187,7 +187,7 @@ static void undo_stack_free(UndoStack *stack)
{
UndoElem *uel;
- for(uel=stack->elems.first; uel; uel=uel->next)
+ for (uel=stack->elems.first; uel; uel=uel->next)
undo_elem_free(stack, uel);
BLI_freelistN(&stack->elems);
@@ -198,20 +198,20 @@ static void undo_stack_free(UndoStack *stack)
void undo_paint_push_begin(int type, const char *name, UndoRestoreCb restore, UndoFreeCb free)
{
- if(type == UNDO_PAINT_IMAGE)
+ if (type == UNDO_PAINT_IMAGE)
undo_stack_push_begin(&ImageUndoStack, name, restore, free);
- else if(type == UNDO_PAINT_MESH)
+ else if (type == UNDO_PAINT_MESH)
undo_stack_push_begin(&MeshUndoStack, name, restore, free);
}
ListBase *undo_paint_push_get_list(int type)
{
- if(type == UNDO_PAINT_IMAGE) {
- if(ImageUndoStack.current)
+ if (type == UNDO_PAINT_IMAGE) {
+ if (ImageUndoStack.current)
return &ImageUndoStack.current->elems;
}
- else if(type == UNDO_PAINT_MESH) {
- if(MeshUndoStack.current)
+ else if (type == UNDO_PAINT_MESH) {
+ if (MeshUndoStack.current)
return &MeshUndoStack.current->elems;
}
@@ -220,25 +220,25 @@ ListBase *undo_paint_push_get_list(int type)
void undo_paint_push_count_alloc(int type, int size)
{
- if(type == UNDO_PAINT_IMAGE)
+ if (type == UNDO_PAINT_IMAGE)
ImageUndoStack.current->undosize += size;
- else if(type == UNDO_PAINT_MESH)
+ else if (type == UNDO_PAINT_MESH)
MeshUndoStack.current->undosize += size;
}
void undo_paint_push_end(int type)
{
- if(type == UNDO_PAINT_IMAGE)
+ if (type == UNDO_PAINT_IMAGE)
undo_stack_push_end(&ImageUndoStack);
- else if(type == UNDO_PAINT_MESH)
+ else if (type == UNDO_PAINT_MESH)
undo_stack_push_end(&MeshUndoStack);
}
int ED_undo_paint_step(bContext *C, int type, int step, const char *name)
{
- if(type == UNDO_PAINT_IMAGE)
+ if (type == UNDO_PAINT_IMAGE)
return undo_stack_step(C, &ImageUndoStack, step, name);
- else if(type == UNDO_PAINT_MESH)
+ else if (type == UNDO_PAINT_MESH)
return undo_stack_step(C, &MeshUndoStack, step, name);
return 0;
@@ -248,16 +248,16 @@ int ED_undo_paint_valid(int type, const char *name)
{
UndoStack *stack;
- if(type == UNDO_PAINT_IMAGE)
+ if (type == UNDO_PAINT_IMAGE)
stack= &ImageUndoStack;
- else if(type == UNDO_PAINT_MESH)
+ else if (type == UNDO_PAINT_MESH)
stack= &MeshUndoStack;
else
return 0;
- if(stack->current==NULL);
+ if (stack->current==NULL);
else {
- if(name && strcmp(stack->current->name, name) == 0)
+ if (name && strcmp(stack->current->name, name) == 0)
return 1;
else
return stack->elems.first != stack->elems.last;
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index dcd7554b7b8..8cdacea9bd7 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -84,14 +84,14 @@ int paint_convert_bb_to_rect(rcti *rect,
rect->xmax = rect->ymax = INT_MIN;
/* return zero if the bounding box has non-positive volume */
- if(bb_min[0] > bb_max[0] || bb_min[1] > bb_max[1] || bb_min[2] > bb_max[2])
+ if (bb_min[0] > bb_max[0] || bb_min[1] > bb_max[1] || bb_min[2] > bb_max[2])
return 0;
ED_view3d_ob_project_mat_get(rv3d, ob, projection_mat);
- for(i = 0; i < 2; ++i) {
- for(j = 0; j < 2; ++j) {
- for(k = 0; k < 2; ++k) {
+ for (i = 0; i < 2; ++i) {
+ for (j = 0; j < 2; ++j) {
+ for (k = 0; k < 2; ++k) {
float vec[3], proj[2];
vec[0] = i ? bb_min[0] : bb_max[0];
vec[1] = j ? bb_min[1] : bb_max[1];
@@ -229,7 +229,7 @@ static void imapaint_tri_weights(Object *ob,
h[1]= (co[1] - view[1])*2.0f/view[3] - 1;
h[2]= 1.0f;
- /* solve for(w1,w2,w3)/perspdiv in:
+ /* solve for (w1,w2,w3)/perspdiv in:
* h * perspdiv = Project * Model * (w1 * v1 + w2 * v2 + w3 * v3) */
wmat[0][0]= pv1[0]; wmat[1][0]= pv2[0]; wmat[2][0]= pv3[0];
@@ -243,7 +243,7 @@ static void imapaint_tri_weights(Object *ob,
/* w is still divided by perspdiv, make it sum to one */
divw= w[0] + w[1] + w[2];
- if(divw != 0.0f) {
+ if (divw != 0.0f) {
mul_v3_fl(w, 1.0f/divw);
}
}
@@ -263,16 +263,16 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, const in
uv[0] = uv[1] = 0.0;
/* test all faces in the derivedmesh with the original index of the picked face */
- for(a = 0; a < numfaces; a++) {
+ for (a = 0; a < numfaces; a++) {
findex= index ? index[a]: a;
- if(findex == faceindex) {
+ if (findex == faceindex) {
dm->getTessFace(dm, a, &mf);
dm->getVert(dm, mf.v1, &mv[0]);
dm->getVert(dm, mf.v2, &mv[1]);
dm->getVert(dm, mf.v3, &mv[2]);
- if(mf.v4)
+ if (mf.v4)
dm->getVert(dm, mf.v4, &mv[3]);
tf= &tface[a];
@@ -280,12 +280,12 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, const in
p[0]= xy[0];
p[1]= xy[1];
- if(mf.v4) {
+ if (mf.v4) {
/* the triangle with the largest absolute values is the one
* with the most negative weights */
imapaint_tri_weights(ob, mv[0].co, mv[1].co, mv[3].co, p, w);
absw= fabs(w[0]) + fabs(w[1]) + fabs(w[2]);
- if(absw < minabsw) {
+ if (absw < minabsw) {
uv[0]= tf->uv[0][0]*w[0] + tf->uv[1][0]*w[1] + tf->uv[3][0]*w[2];
uv[1]= tf->uv[0][1]*w[0] + tf->uv[1][1]*w[1] + tf->uv[3][1]*w[2];
minabsw = absw;
@@ -293,7 +293,7 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, const in
imapaint_tri_weights(ob, mv[1].co, mv[2].co, mv[3].co, p, w);
absw= fabs(w[0]) + fabs(w[1]) + fabs(w[2]);
- if(absw < minabsw) {
+ if (absw < minabsw) {
uv[0]= tf->uv[1][0]*w[0] + tf->uv[2][0]*w[1] + tf->uv[3][0]*w[2];
uv[1]= tf->uv[1][1]*w[0] + tf->uv[2][1]*w[1] + tf->uv[3][1]*w[2];
minabsw = absw;
@@ -302,7 +302,7 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, const in
else {
imapaint_tri_weights(ob, mv[0].co, mv[1].co, mv[2].co, p, w);
absw= fabs(w[0]) + fabs(w[1]) + fabs(w[2]);
- if(absw < minabsw) {
+ if (absw < minabsw) {
uv[0]= tf->uv[0][0]*w[0] + tf->uv[1][0]*w[1] + tf->uv[2][0]*w[2];
uv[1]= tf->uv[0][1]*w[0] + tf->uv[1][1]*w[1] + tf->uv[2][1]*w[2];
minabsw = absw;
@@ -317,13 +317,13 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, const in
///* returns 0 if not found, otherwise 1 */
int imapaint_pick_face(ViewContext *vc, Mesh *me, const int mval[2], unsigned int *index)
{
- if(!me || me->totface==0)
+ if (!me || me->totface==0)
return 0;
/* sample only on the exact position */
*index = view3d_sample_backbuf(vc, mval[0], mval[1]);
- if((*index)<=0 || (*index)>(unsigned int)me->totface)
+ if ((*index)<=0 || (*index)>(unsigned int)me->totface)
return 0;
(*index)--;
@@ -347,7 +347,7 @@ void paint_sample_color(Scene *scene, ARegion *ar, int x, int y) /* frontbuf */
cp = (char *)&col;
- if(br) {
+ if (br) {
br->rgb[0]= cp[0]/255.0f;
br->rgb[1]= cp[1]/255.0f;
br->rgb[2]= cp[2]/255.0f;
@@ -380,14 +380,14 @@ void BRUSH_OT_curve_preset(wmOperatorType *ot)
{CURVE_PRESET_ROOT, "ROOT", 0, "Root", ""},
{0, NULL, 0, NULL, NULL}};
- ot->name= "Preset";
- ot->description= "Set brush shape";
- ot->idname= "BRUSH_OT_curve_preset";
+ ot->name = "Preset";
+ ot->description = "Set brush shape";
+ ot->idname = "BRUSH_OT_curve_preset";
- ot->exec= brush_curve_preset_exec;
- ot->poll= brush_curve_preset_poll;
+ ot->exec = brush_curve_preset_exec;
+ ot->poll = brush_curve_preset_poll;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "shape", prop_shape_items, CURVE_PRESET_SMOOTH, "Mode", "");
}
@@ -403,14 +403,14 @@ static int paint_select_linked_exec(bContext *C, wmOperator *UNUSED(op))
void PAINT_OT_face_select_linked(wmOperatorType *ot)
{
- ot->name= "Select Linked";
- ot->description= "Select linked faces";
- ot->idname= "PAINT_OT_face_select_linked";
+ ot->name = "Select Linked";
+ ot->description = "Select linked faces";
+ ot->idname = "PAINT_OT_face_select_linked";
- ot->exec= paint_select_linked_exec;
- ot->poll= facemask_paint_poll;
+ ot->exec = paint_select_linked_exec;
+ ot->poll = facemask_paint_poll;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int paint_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event)
@@ -423,14 +423,14 @@ static int paint_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent
void PAINT_OT_face_select_linked_pick(wmOperatorType *ot)
{
- ot->name= "Select Linked Pick";
- ot->description= "Select linked faces";
- ot->idname= "PAINT_OT_face_select_linked_pick";
+ ot->name = "Select Linked Pick";
+ ot->description = "Select linked faces";
+ ot->idname = "PAINT_OT_face_select_linked_pick";
- ot->invoke= paint_select_linked_pick_invoke;
- ot->poll= facemask_paint_poll;
+ ot->invoke = paint_select_linked_pick_invoke;
+ ot->poll = facemask_paint_poll;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the existing selection");
}
@@ -447,14 +447,14 @@ static int face_select_all_exec(bContext *C, wmOperator *op)
void PAINT_OT_face_select_all(wmOperatorType *ot)
{
- ot->name= "Face Selection";
- ot->description= "Change selection for all faces";
- ot->idname= "PAINT_OT_face_select_all";
+ ot->name = "Face Selection";
+ ot->description = "Change selection for all faces";
+ ot->idname = "PAINT_OT_face_select_all";
- ot->exec= face_select_all_exec;
- ot->poll= facemask_paint_poll;
+ ot->exec = face_select_all_exec;
+ ot->poll = facemask_paint_poll;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -471,14 +471,14 @@ static int vert_select_all_exec(bContext *C, wmOperator *op)
void PAINT_OT_vert_select_all(wmOperatorType *ot)
{
- ot->name= "Vertex Selection";
- ot->description= "Change selection for all vertices";
- ot->idname= "PAINT_OT_vert_select_all";
+ ot->name = "Vertex Selection";
+ ot->description = "Change selection for all vertices";
+ ot->idname = "PAINT_OT_vert_select_all";
- ot->exec= vert_select_all_exec;
- ot->poll= vert_paint_poll;
+ ot->exec = vert_select_all_exec;
+ ot->poll = vert_paint_poll;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -493,14 +493,14 @@ static int vert_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
void PAINT_OT_vert_select_inverse(wmOperatorType *ot)
{
- ot->name= "Vertex Select Invert";
- ot->description= "Invert selection of vertices";
- ot->idname= "PAINT_OT_vert_select_inverse";
+ ot->name = "Vertex Select Invert";
+ ot->description = "Invert selection of vertices";
+ ot->idname = "PAINT_OT_vert_select_inverse";
- ot->exec= vert_select_inverse_exec;
- ot->poll= vert_paint_poll;
+ ot->exec = vert_select_inverse_exec;
+ ot->poll = vert_paint_poll;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int face_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
{
@@ -513,14 +513,14 @@ static int face_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
void PAINT_OT_face_select_inverse(wmOperatorType *ot)
{
- ot->name= "Face Select Invert";
- ot->description= "Invert selection of faces";
- ot->idname= "PAINT_OT_face_select_inverse";
+ ot->name = "Face Select Invert";
+ ot->description = "Invert selection of faces";
+ ot->idname = "PAINT_OT_face_select_inverse";
- ot->exec= face_select_inverse_exec;
- ot->poll= facemask_paint_poll;
+ ot->exec = face_select_inverse_exec;
+ ot->poll = facemask_paint_poll;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int face_select_hide_exec(bContext *C, wmOperator *op)
@@ -534,14 +534,14 @@ static int face_select_hide_exec(bContext *C, wmOperator *op)
void PAINT_OT_face_select_hide(wmOperatorType *ot)
{
- ot->name= "Face Select Hide";
- ot->description= "Hide selected faces";
- ot->idname= "PAINT_OT_face_select_hide";
+ ot->name = "Face Select Hide";
+ ot->description = "Hide selected faces";
+ ot->idname = "PAINT_OT_face_select_hide";
- ot->exec= face_select_hide_exec;
- ot->poll= facemask_paint_poll;
+ ot->exec = face_select_hide_exec;
+ ot->poll = facemask_paint_poll;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects");
}
@@ -556,14 +556,14 @@ static int face_select_reveal_exec(bContext *C, wmOperator *UNUSED(op))
void PAINT_OT_face_select_reveal(wmOperatorType *ot)
{
- ot->name= "Face Select Reveal";
- ot->description= "Reveal hidden faces";
- ot->idname= "PAINT_OT_face_select_reveal";
+ ot->name = "Face Select Reveal";
+ ot->description = "Reveal hidden faces";
+ ot->idname = "PAINT_OT_face_select_reveal";
- ot->exec= face_select_reveal_exec;
- ot->poll= facemask_paint_poll;
+ ot->exec = face_select_reveal_exec;
+ ot->poll = facemask_paint_poll;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects");
}
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index dcd89a52a80..54f4d0c1a26 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -103,7 +103,7 @@ static int vertex_paint_use_fast_update_check(Object *ob)
}
/* if the polygons from the mesh and the 'derivedFinal' match
- * we can assume that no modifiers are applied and that its worth adding tesselated faces
+ * we can assume that no modifiers are applied and that its worth adding tessellated faces
* so 'vertex_paint_use_fast_update_check()' returns TRUE */
static int vertex_paint_use_tessface_check(Object *ob)
{
@@ -129,12 +129,12 @@ int vertex_paint_mode_poll(bContext *C)
int vertex_paint_poll(bContext *C)
{
- if(vertex_paint_mode_poll(C) &&
+ if (vertex_paint_mode_poll(C) &&
paint_brush(&CTX_data_tool_settings(C)->vpaint->paint)) {
- ScrArea *sa= CTX_wm_area(C);
- if(sa->spacetype==SPACE_VIEW3D) {
- ARegion *ar= CTX_wm_region(C);
- if(ar->regiontype==RGN_TYPE_WINDOW)
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa->spacetype == SPACE_VIEW3D) {
+ ARegion *ar = CTX_wm_region(C);
+ if (ar->regiontype == RGN_TYPE_WINDOW)
return 1;
}
}
@@ -150,17 +150,17 @@ int weight_paint_mode_poll(bContext *C)
int weight_paint_poll(bContext *C)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
ScrArea *sa;
- if( (ob != NULL) &&
- (ob->mode & OB_MODE_WEIGHT_PAINT) &&
- (paint_brush(&CTX_data_tool_settings(C)->wpaint->paint) != NULL) &&
- (sa= CTX_wm_area(C)) &&
- (sa->spacetype == SPACE_VIEW3D)
- ) {
- ARegion *ar= CTX_wm_region(C);
- if(ar->regiontype==RGN_TYPE_WINDOW) {
+ if ((ob != NULL) &&
+ (ob->mode & OB_MODE_WEIGHT_PAINT) &&
+ (paint_brush(&CTX_data_tool_settings(C)->wpaint->paint) != NULL) &&
+ (sa = CTX_wm_area(C)) &&
+ (sa->spacetype == SPACE_VIEW3D))
+ {
+ ARegion *ar = CTX_wm_region(C);
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
return 1;
}
}
@@ -169,54 +169,28 @@ int weight_paint_poll(bContext *C)
static VPaint *new_vpaint(int wpaint)
{
- VPaint *vp= MEM_callocN(sizeof(VPaint), "VPaint");
+ VPaint *vp = MEM_callocN(sizeof(VPaint), "VPaint");
- vp->flag= VP_AREA+VP_SPRAY;
+ vp->flag = VP_AREA + VP_SPRAY;
- if(wpaint)
- vp->flag= VP_AREA;
+ if (wpaint)
+ vp->flag = VP_AREA;
return vp;
}
static int *get_indexarray(Mesh *me)
{
- return MEM_mallocN(sizeof(int)*(me->totpoly+1), "vertexpaint");
-}
-
-
-/* in contradiction to cpack drawing colors, the MCOL colors (vpaint colors) are per byte!
- * so not endian sensitive. Mcol = ABGR!!! so be cautious with cpack calls */
-
-static unsigned int rgba_to_mcol(float r, float g, float b, float a)
-{
- int ir, ig, ib, ia;
- unsigned int col;
- char *cp;
-
- ir= floor(255.0f * r);
- if(ir<0) ir= 0; else if(ir>255) ir= 255;
- ig= floor(255.0f * g);
- if(ig<0) ig= 0; else if(ig>255) ig= 255;
- ib= floor(255.0f * b);
- if(ib<0) ib= 0; else if(ib>255) ib= 255;
- ia= floor(255.0f * a);
- if(ia<0) ia= 0; else if(ia>255) ia= 255;
-
- cp= (char *)&col;
- cp[0]= ia;
- cp[1]= ib;
- cp[2]= ig;
- cp[3]= ir;
-
- return col;
-
+ return MEM_mallocN(sizeof(int) * (me->totpoly + 1), "vertexpaint");
}
unsigned int vpaint_get_current_col(VPaint *vp)
{
Brush *brush = paint_brush(&vp->paint);
- return rgba_to_mcol(brush->rgb[0], brush->rgb[1], brush->rgb[2], 1.0f);
+ unsigned char col[4];
+ rgb_float_to_uchar(col, brush->rgb);
+ col[3] = 255; /* alpha isn't used, could even be removed to speedup paint a little */
+ return *(unsigned int *)col;
}
static void do_shared_vertex_tesscol(Mesh *me)
@@ -229,57 +203,57 @@ static void do_shared_vertex_tesscol(Mesh *me)
short *scolmain, *scol;
char *mcol;
- if(me->mcol==NULL || me->totvert==0 || me->totface==0) return;
-
- scolmain= MEM_callocN(4*sizeof(short)*me->totvert, "colmain");
-
- tface= me->mtface;
- mface= me->mface;
- mcol= (char *)me->mcol;
- for(a=me->totface; a>0; a--, mface++, mcol+=16) {
- if((tface && tface->mode & TF_SHAREDCOL) || (me->editflag & ME_EDIT_PAINT_MASK)==0) {
- scol= scolmain+4*mface->v1;
- scol[0]++; scol[1]+= mcol[1]; scol[2]+= mcol[2]; scol[3]+= mcol[3];
- scol= scolmain+4*mface->v2;
- scol[0]++; scol[1]+= mcol[5]; scol[2]+= mcol[6]; scol[3]+= mcol[7];
- scol= scolmain+4*mface->v3;
- scol[0]++; scol[1]+= mcol[9]; scol[2]+= mcol[10]; scol[3]+= mcol[11];
- if(mface->v4) {
- scol= scolmain+4*mface->v4;
- scol[0]++; scol[1]+= mcol[13]; scol[2]+= mcol[14]; scol[3]+= mcol[15];
+ if (me->mcol == NULL || me->totvert == 0 || me->totface == 0) return;
+
+ scolmain = MEM_callocN(4 * sizeof(short) * me->totvert, "colmain");
+
+ tface = me->mtface;
+ mface = me->mface;
+ mcol = (char *)me->mcol;
+ for (a = me->totface; a > 0; a--, mface++, mcol += 16) {
+ if ((tface && tface->mode & TF_SHAREDCOL) || (me->editflag & ME_EDIT_PAINT_MASK) == 0) {
+ scol = scolmain + 4 * mface->v1;
+ scol[0]++; scol[1] += mcol[1]; scol[2] += mcol[2]; scol[3] += mcol[3];
+ scol = scolmain + 4 * mface->v2;
+ scol[0]++; scol[1] += mcol[5]; scol[2] += mcol[6]; scol[3] += mcol[7];
+ scol = scolmain + 4 * mface->v3;
+ scol[0]++; scol[1] += mcol[9]; scol[2] += mcol[10]; scol[3] += mcol[11];
+ if (mface->v4) {
+ scol = scolmain + 4 * mface->v4;
+ scol[0]++; scol[1] += mcol[13]; scol[2] += mcol[14]; scol[3] += mcol[15];
}
}
- if(tface) tface++;
- }
-
- a= me->totvert;
- scol= scolmain;
- while(a--) {
- if(scol[0]>1) {
- scol[1]/= scol[0];
- scol[2]/= scol[0];
- scol[3]/= scol[0];
- }
- scol+= 4;
- }
-
- tface= me->mtface;
- mface= me->mface;
- mcol= (char *)me->mcol;
- for(a=me->totface; a>0; a--, mface++, mcol+=16) {
- if((tface && tface->mode & TF_SHAREDCOL) || (me->editflag & ME_EDIT_PAINT_MASK)==0) {
- scol= scolmain+4*mface->v1;
- mcol[1]= scol[1]; mcol[2]= scol[2]; mcol[3]= scol[3];
- scol= scolmain+4*mface->v2;
- mcol[5]= scol[1]; mcol[6]= scol[2]; mcol[7]= scol[3];
- scol= scolmain+4*mface->v3;
- mcol[9]= scol[1]; mcol[10]= scol[2]; mcol[11]= scol[3];
- if(mface->v4) {
- scol= scolmain+4*mface->v4;
- mcol[13]= scol[1]; mcol[14]= scol[2]; mcol[15]= scol[3];
+ if (tface) tface++;
+ }
+
+ a = me->totvert;
+ scol = scolmain;
+ while (a--) {
+ if (scol[0] > 1) {
+ scol[1] /= scol[0];
+ scol[2] /= scol[0];
+ scol[3] /= scol[0];
+ }
+ scol += 4;
+ }
+
+ tface = me->mtface;
+ mface = me->mface;
+ mcol = (char *)me->mcol;
+ for (a = me->totface; a > 0; a--, mface++, mcol += 16) {
+ if ((tface && tface->mode & TF_SHAREDCOL) || (me->editflag & ME_EDIT_PAINT_MASK) == 0) {
+ scol = scolmain + 4 * mface->v1;
+ mcol[1] = scol[1]; mcol[2] = scol[2]; mcol[3] = scol[3];
+ scol = scolmain + 4 * mface->v2;
+ mcol[5] = scol[1]; mcol[6] = scol[2]; mcol[7] = scol[3];
+ scol = scolmain + 4 * mface->v3;
+ mcol[9] = scol[1]; mcol[10] = scol[2]; mcol[11] = scol[3];
+ if (mface->v4) {
+ scol = scolmain + 4 * mface->v4;
+ mcol[13] = scol[1]; mcol[14] = scol[2]; mcol[15] = scol[3];
}
}
- if(tface) tface++;
+ if (tface) tface++;
}
MEM_freeN(scolmain);
@@ -297,17 +271,17 @@ void do_shared_vertexcol(Mesh *me, int do_tessface)
/* if no mloopcol: do not do */
/* if mtexpoly: only the involved faces, otherwise all */
- if(me->mloopcol==0 || me->totvert==0 || me->totpoly==0) return;
+ if (me->mloopcol == 0 || me->totvert == 0 || me->totpoly == 0) return;
- scol = MEM_callocN(sizeof(float)*me->totvert*5, "scol");
+ scol = MEM_callocN(sizeof(float) * me->totvert * 5, "scol");
- for (i=0; i<me->totloop; i++, ml++, lcol++) {
+ for (i = 0; i < me->totloop; i++, ml++, lcol++) {
if (i >= mp->loopstart + mp->totloop) {
mp++;
if (mtp) mtp++;
}
- if (!(mtp && (mtp->mode & TF_SHAREDCOL)) && (me->editflag & ME_EDIT_PAINT_MASK)!=0)
+ if (!(mtp && (mtp->mode & TF_SHAREDCOL)) && (me->editflag & ME_EDIT_PAINT_MASK) != 0)
continue;
scol[ml->v][0] += lcol->r;
@@ -319,7 +293,7 @@ void do_shared_vertexcol(Mesh *me, int do_tessface)
}
if (has_shared) {
- for (i=0; i<me->totvert; i++) {
+ for (i = 0; i < me->totvert; i++) {
if (!scol[i][4]) continue;
scol[i][0] /= scol[i][4];
@@ -330,7 +304,7 @@ void do_shared_vertexcol(Mesh *me, int do_tessface)
ml = me->mloop;
lcol = me->mloopcol;
- for (i=0; i<me->totloop; i++, ml++, lcol++) {
+ for (i = 0; i < me->totloop; i++, ml++, lcol++) {
if (!scol[ml->v][4]) continue;
lcol->r = scol[ml->v][0];
@@ -350,14 +324,14 @@ void do_shared_vertexcol(Mesh *me, int do_tessface)
static void make_vertexcol(Object *ob) /* single ob */
{
Mesh *me;
- if(!ob || ob->id.lib) return;
- me= get_mesh(ob);
- if(me==NULL) return;
- if(me->edit_btmesh) return;
+ if (!ob || ob->id.lib) return;
+ me = get_mesh(ob);
+ if (me == NULL) return;
+ if (me->edit_btmesh) return;
/* copies from shadedisplist to mcol */
if (!me->mloopcol) {
- if(!me->mcol) {
+ if (!me->mcol) {
CustomData_add_layer(&me->fdata, CD_MCOL, CD_DEFAULT, NULL, me->totface);
}
if (!me->mloopcol) {
@@ -371,10 +345,10 @@ static void make_vertexcol(Object *ob) /* single ob */
if (!me->mcol || !me->mface) {
/* should always be true */
if (me->mcol) {
- memset(me->mcol, 255, 4*sizeof(MCol)*me->totface);
+ memset(me->mcol, 255, 4 * sizeof(MCol) * me->totface);
}
- /* create tessfaces because they will be used for drawing & fast updates*/
+ /* create tessfaces because they will be used for drawing & fast updates */
BKE_mesh_tessface_calc(me); /* does own call to update pointers */
}
}
@@ -396,31 +370,31 @@ static void make_vertexcol(Object *ob) /* single ob */
/* mirror_vgroup is set to -1 when invalid */
static int wpaint_mirror_vgroup_ensure(Object *ob, const int vgroup_active)
{
- bDeformGroup *defgroup= BLI_findlink(&ob->defbase, vgroup_active);
+ bDeformGroup *defgroup = BLI_findlink(&ob->defbase, vgroup_active);
- if(defgroup) {
+ if (defgroup) {
bDeformGroup *curdef;
int mirrdef;
char name[MAXBONENAME];
flip_side_name(name, defgroup->name, FALSE);
- if(strcmp(name, defgroup->name) != 0) {
- for (curdef= ob->defbase.first, mirrdef= 0; curdef; curdef=curdef->next, mirrdef++) {
+ if (strcmp(name, defgroup->name) != 0) {
+ for (curdef = ob->defbase.first, mirrdef = 0; curdef; curdef = curdef->next, mirrdef++) {
if (!strcmp(curdef->name, name)) {
break;
}
}
- if(curdef==NULL) {
- int olddef= ob->actdef; /* tsk, ED_vgroup_add sets the active defgroup */
- curdef= ED_vgroup_add_name(ob, name);
- ob->actdef= olddef;
+ if (curdef == NULL) {
+ int olddef = ob->actdef; /* tsk, ED_vgroup_add sets the active defgroup */
+ curdef = ED_vgroup_add_name(ob, name);
+ ob->actdef = olddef;
}
/* curdef should never be NULL unless this is
* a lamp and ED_vgroup_add_name fails */
- if(curdef) {
+ if (curdef) {
return mirrdef;
}
}
@@ -431,16 +405,16 @@ static int wpaint_mirror_vgroup_ensure(Object *ob, const int vgroup_active)
static void copy_vpaint_prev(VPaint *vp, unsigned int *lcol, int tot)
{
- if(vp->vpaint_prev) {
+ if (vp->vpaint_prev) {
MEM_freeN(vp->vpaint_prev);
- vp->vpaint_prev= NULL;
+ vp->vpaint_prev = NULL;
}
- vp->tot= tot;
+ vp->tot = tot;
- if(lcol==NULL || tot==0) return;
+ if (lcol == NULL || tot == 0) return;
- vp->vpaint_prev= MEM_mallocN(sizeof(int)*tot, "vpaint_prev");
- memcpy(vp->vpaint_prev, lcol, sizeof(int)*tot);
+ vp->vpaint_prev = MEM_mallocN(sizeof(int) * tot, "vpaint_prev");
+ memcpy(vp->vpaint_prev, lcol, sizeof(int) * tot);
}
@@ -448,12 +422,12 @@ static void copy_wpaint_prev (VPaint *wp, MDeformVert *dverts, int dcount)
{
if (wp->wpaint_prev) {
free_dverts(wp->wpaint_prev, wp->tot);
- wp->wpaint_prev= NULL;
+ wp->wpaint_prev = NULL;
}
- if(dverts && dcount) {
+ if (dverts && dcount) {
- wp->wpaint_prev = MEM_mallocN (sizeof(MDeformVert)*dcount, "wpaint prev");
+ wp->wpaint_prev = MEM_mallocN (sizeof(MDeformVert) * dcount, "wpaint prev");
wp->tot = dcount;
copy_dverts (wp->wpaint_prev, dverts, dcount);
}
@@ -467,24 +441,23 @@ void vpaint_fill(Object *ob, unsigned int paintcol)
MLoopCol *lcol;
int i, j, selected;
- me= get_mesh(ob);
- if(me==NULL || me->totpoly==0) return;
+ me = get_mesh(ob);
+ if (me == NULL || me->totpoly == 0) return;
- if(!me->mloopcol) make_vertexcol(ob);
- if(!me->mloopcol) return; /* possible we can't make mcol's */
+ if (!me->mloopcol) make_vertexcol(ob);
+ if (!me->mloopcol) return; /* possible we can't make mcol's */
- selected= (me->editflag & ME_EDIT_PAINT_MASK);
+ selected = (me->editflag & ME_EDIT_PAINT_MASK);
mp = me->mpoly;
- lcol = me->mloopcol;
- for (i=0; i<me->totpoly; i++, mp++) {
+ for (i = 0; i < me->totpoly; i++, mp++) {
if (!(!selected || mp->flag & ME_FACE_SEL))
continue;
lcol = me->mloopcol + mp->loopstart;
- for (j=0; j<mp->totloop; j++, lcol++) {
- *(int*)lcol = paintcol;
+ for (j = 0; j < mp->totloop; j++, lcol++) {
+ *(int *)lcol = paintcol;
}
}
@@ -498,73 +471,74 @@ void vpaint_fill(Object *ob, unsigned int paintcol)
/* fills in the selected faces with the current weight and vertex group */
void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
{
- Mesh *me= ob->data;
+ Mesh *me = ob->data;
MPoly *mf;
MDeformWeight *dw, *dw_prev;
- int vgroup_active, vgroup_mirror= -1;
+ int vgroup_active, vgroup_mirror = -1;
unsigned int index;
/* mutually exclusive, could be made into a */
- const short paint_selmode= ME_EDIT_PAINT_SEL_MODE(me);
+ const short paint_selmode = ME_EDIT_PAINT_SEL_MODE(me);
- if(me->totpoly==0 || me->dvert==NULL || !me->mpoly) return;
+ if (me->totpoly == 0 || me->dvert == NULL || !me->mpoly) return;
vgroup_active = ob->actdef - 1;
/* if mirror painting, find the other group */
- if(me->editflag & ME_EDIT_MIRROR_X) {
- vgroup_mirror= wpaint_mirror_vgroup_ensure(ob, vgroup_active);
+ if (me->editflag & ME_EDIT_MIRROR_X) {
+ vgroup_mirror = wpaint_mirror_vgroup_ensure(ob, vgroup_active);
}
copy_wpaint_prev(wp, me->dvert, me->totvert);
- for(index=0, mf= me->mpoly; index < me->totpoly; index++, mf++) {
- unsigned int fidx= mf->totloop - 1;
+ for (index = 0, mf = me->mpoly; index < me->totpoly; index++, mf++) {
+ unsigned int fidx = mf->totloop - 1;
if ((paint_selmode == SCE_SELECT_FACE) && !(mf->flag & ME_FACE_SEL)) {
continue;
}
do {
- unsigned int vidx= me->mloop[mf->loopstart + fidx].v;
+ unsigned int vidx = me->mloop[mf->loopstart + fidx].v;
- if(!me->dvert[vidx].flag) {
- if((paint_selmode == SCE_SELECT_VERTEX) && !(me->mvert[vidx].flag & SELECT)) {
+ if (!me->dvert[vidx].flag) {
+ if ((paint_selmode == SCE_SELECT_VERTEX) && !(me->mvert[vidx].flag & SELECT)) {
continue;
}
- dw= defvert_verify_index(&me->dvert[vidx], vgroup_active);
- if(dw) {
- dw_prev= defvert_verify_index(wp->wpaint_prev+vidx, vgroup_active);
- dw_prev->weight= dw->weight; /* set the undo weight */
- dw->weight= paintweight;
+ dw = defvert_verify_index(&me->dvert[vidx], vgroup_active);
+ if (dw) {
+ dw_prev = defvert_verify_index(wp->wpaint_prev + vidx, vgroup_active);
+ dw_prev->weight = dw->weight; /* set the undo weight */
+ dw->weight = paintweight;
- if(me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */
- int j= mesh_get_x_mirror_vert(ob, vidx);
- if(j>=0) {
+ if (me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */
+ int j = mesh_get_x_mirror_vert(ob, vidx);
+ if (j >= 0) {
/* copy, not paint again */
- if(vgroup_mirror != -1) {
- dw= defvert_verify_index(me->dvert+j, vgroup_mirror);
- dw_prev= defvert_verify_index(wp->wpaint_prev+j, vgroup_mirror);
- } else {
- dw= defvert_verify_index(me->dvert+j, vgroup_active);
- dw_prev= defvert_verify_index(wp->wpaint_prev+j, vgroup_active);
+ if (vgroup_mirror != -1) {
+ dw = defvert_verify_index(me->dvert + j, vgroup_mirror);
+ dw_prev = defvert_verify_index(wp->wpaint_prev + j, vgroup_mirror);
}
- dw_prev->weight= dw->weight; /* set the undo weight */
- dw->weight= paintweight;
+ else {
+ dw = defvert_verify_index(me->dvert + j, vgroup_active);
+ dw_prev = defvert_verify_index(wp->wpaint_prev + j, vgroup_active);
+ }
+ dw_prev->weight = dw->weight; /* set the undo weight */
+ dw->weight = paintweight;
}
}
}
- me->dvert[vidx].flag= 1;
+ me->dvert[vidx].flag = 1;
}
} while (fidx--);
}
{
- MDeformVert *dv= me->dvert;
- for(index= me->totvert; index != 0; index--, dv++) {
- dv->flag= 0;
+ MDeformVert *dv = me->dvert;
+ for (index = me->totvert; index != 0; index--, dv++) {
+ dv->flag = 0;
}
}
@@ -577,190 +551,210 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
#if 0
void vpaint_dogamma(Scene *scene)
{
- VPaint *vp= scene->toolsettings->vpaint;
+ VPaint *vp = scene->toolsettings->vpaint;
Mesh *me;
Object *ob;
float igam, fac;
int a, temp;
unsigned char *cp, gamtab[256];
- ob= OBACT;
- me= get_mesh(ob);
+ ob = OBACT;
+ me = get_mesh(ob);
- if(!(ob->mode & OB_MODE_VERTEX_PAINT)) return;
- if(me==0 || me->mcol==0 || me->totface==0) return;
+ if (!(ob->mode & OB_MODE_VERTEX_PAINT)) return;
+ if (me == 0 || me->mcol == 0 || me->totface == 0) return;
- igam= 1.0/vp->gamma;
- for(a=0; a<256; a++) {
+ igam = 1.0 / vp->gamma;
+ for (a = 0; a < 256; a++) {
- fac= ((float)a)/255.0;
- fac= vp->mul*pow( fac, igam);
+ fac = ((float)a) / 255.0;
+ fac = vp->mul * pow( fac, igam);
- temp= 255.9*fac;
+ temp = 255.9 * fac;
- if(temp<=0) gamtab[a]= 0;
- else if(temp>=255) gamtab[a]= 255;
- else gamtab[a]= temp;
+ if (temp <= 0) gamtab[a] = 0;
+ else if (temp >= 255) gamtab[a] = 255;
+ else gamtab[a] = temp;
}
- a= 4*me->totface;
- cp= (unsigned char *)me->mcol;
- while(a--) {
+ a = 4 * me->totface;
+ cp = (unsigned char *)me->mcol;
+ while (a--) {
- cp[1]= gamtab[ cp[1] ];
- cp[2]= gamtab[ cp[2] ];
- cp[3]= gamtab[ cp[3] ];
+ cp[1] = gamtab[ cp[1] ];
+ cp[2] = gamtab[ cp[2] ];
+ cp[3] = gamtab[ cp[3] ];
- cp+= 4;
+ cp += 4;
}
}
#endif
-BM_INLINE unsigned int mcol_blend(unsigned int col1, unsigned int col2, int fac)
+BLI_INLINE unsigned int mcol_blend(unsigned int col1, unsigned int col2, int fac)
{
- char *cp1, *cp2, *cp;
+ unsigned char *cp1, *cp2, *cp;
int mfac;
- unsigned int col=0;
-
- if(fac==0) return col1;
- if(fac>=255) return col2;
+ unsigned int col = 0;
+
+ if (fac == 0) {
+ return col1;
+ }
+
+ if (fac >= 255) {
+ return col2;
+ }
+
+ mfac = 255 - fac;
+
+ cp1 = (unsigned char *)&col1;
+ cp2 = (unsigned char *)&col2;
+ cp = (unsigned char *)&col;
+
+ cp[0] = (mfac * cp1[0] + fac * cp2[0]) / 255;
+ cp[1] = (mfac * cp1[1] + fac * cp2[1]) / 255;
+ cp[2] = (mfac * cp1[2] + fac * cp2[2]) / 255;
+ cp[3] = 255;
- mfac= 255-fac;
-
- cp1= (char *)&col1;
- cp2= (char *)&col2;
- cp= (char *)&col;
-
- cp[0]= 255;
- cp[1]= (mfac*cp1[1]+fac*cp2[1])/255;
- cp[2]= (mfac*cp1[2]+fac*cp2[2])/255;
- cp[3]= (mfac*cp1[3]+fac*cp2[3])/255;
-
return col;
}
-BM_INLINE unsigned int mcol_add(unsigned int col1, unsigned int col2, int fac)
+BLI_INLINE unsigned int mcol_add(unsigned int col1, unsigned int col2, int fac)
{
- char *cp1, *cp2, *cp;
+ unsigned char *cp1, *cp2, *cp;
int temp;
- unsigned int col=0;
-
- if(fac==0) return col1;
-
- cp1= (char *)&col1;
- cp2= (char *)&col2;
- cp= (char *)&col;
-
- cp[0]= 255;
- temp= cp1[1] + ((fac*cp2[1])/255);
- if(temp>254) cp[1]= 255; else cp[1]= temp;
- temp= cp1[2] + ((fac*cp2[2])/255);
- if(temp>254) cp[2]= 255; else cp[2]= temp;
- temp= cp1[3] + ((fac*cp2[3])/255);
- if(temp>254) cp[3]= 255; else cp[3]= temp;
+ unsigned int col = 0;
+
+ if (fac == 0) {
+ return col1;
+ }
+
+ cp1 = (unsigned char *)&col1;
+ cp2 = (unsigned char *)&col2;
+ cp = (unsigned char *)&col;
+
+ temp = cp1[0] + ((fac * cp2[0]) / 255);
+ cp[0] = (temp > 254) ? 255 : temp;
+ temp = cp1[1] + ((fac * cp2[1]) / 255);
+ cp[1] = (temp > 254) ? 255 : temp;
+ temp = cp1[2] + ((fac * cp2[2]) / 255);
+ cp[2] = (temp > 254) ? 255 : temp;
+ cp[3] = 255;
return col;
}
-BM_INLINE unsigned int mcol_sub(unsigned int col1, unsigned int col2, int fac)
+BLI_INLINE unsigned int mcol_sub(unsigned int col1, unsigned int col2, int fac)
{
- char *cp1, *cp2, *cp;
+ unsigned char *cp1, *cp2, *cp;
int temp;
- unsigned int col=0;
-
- if(fac==0) return col1;
-
- cp1= (char *)&col1;
- cp2= (char *)&col2;
- cp= (char *)&col;
-
- cp[0]= 255;
- temp= cp1[1] - ((fac*cp2[1])/255);
- if(temp<0) cp[1]= 0; else cp[1]= temp;
- temp= cp1[2] - ((fac*cp2[2])/255);
- if(temp<0) cp[2]= 0; else cp[2]= temp;
- temp= cp1[3] - ((fac*cp2[3])/255);
- if(temp<0) cp[3]= 0; else cp[3]= temp;
-
+ unsigned int col = 0;
+
+ if (fac == 0) {
+ return col1;
+ }
+
+ cp1 = (unsigned char *)&col1;
+ cp2 = (unsigned char *)&col2;
+ cp = (unsigned char *)&col;
+
+ temp = cp1[0] - ((fac * cp2[0]) / 255);
+ cp1[0] = (temp < 0) ? 0 : temp;
+ temp = cp1[1] - ((fac * cp2[1]) / 255);
+ cp1[1] = (temp < 0) ? 0 : temp;
+ temp = cp1[2] - ((fac * cp2[2]) / 255);
+ cp1[2] = (temp < 0) ? 0 : temp;
+ cp[3] = 255;
+
return col;
}
-BM_INLINE unsigned int mcol_mul(unsigned int col1, unsigned int col2, int fac)
+BLI_INLINE unsigned int mcol_mul(unsigned int col1, unsigned int col2, int fac)
{
- char *cp1, *cp2, *cp;
+ unsigned char *cp1, *cp2, *cp;
int mfac;
- unsigned int col=0;
-
- if(fac==0) return col1;
+ unsigned int col = 0;
+
+ if (fac == 0) {
+ return col1;
+ }
+
+ mfac = 255 - fac;
+
+ cp1 = (unsigned char *)&col1;
+ cp2 = (unsigned char *)&col2;
+ cp = (unsigned char *)&col;
- mfac= 255-fac;
-
- cp1= (char *)&col1;
- cp2= (char *)&col2;
- cp= (char *)&col;
-
/* first mul, then blend the fac */
- cp[0]= 255;
- cp[1]= (mfac*cp1[1] + fac*((cp2[1]*cp1[1])/255) )/255;
- cp[2]= (mfac*cp1[2] + fac*((cp2[2]*cp1[2])/255) )/255;
- cp[3]= (mfac*cp1[3] + fac*((cp2[3]*cp1[3])/255) )/255;
+ cp[0] = (mfac * cp1[0] + fac * ((cp2[0] * cp1[0]) / 255)) / 255;
+ cp[1] = (mfac * cp1[1] + fac * ((cp2[1] * cp1[1]) / 255)) / 255;
+ cp[2] = (mfac * cp1[2] + fac * ((cp2[2] * cp1[2]) / 255)) / 255;
+ cp[3] = 255;
-
return col;
}
-BM_INLINE unsigned int mcol_lighten(unsigned int col1, unsigned int col2, int fac)
+BLI_INLINE unsigned int mcol_lighten(unsigned int col1, unsigned int col2, int fac)
{
- char *cp1, *cp2, *cp;
+ unsigned char *cp1, *cp2, *cp;
int mfac;
- unsigned int col=0;
-
- if(fac==0) return col1;
- if(fac>=255) return col2;
+ unsigned int col = 0;
- mfac= 255-fac;
-
- cp1= (char *)&col1;
- cp2= (char *)&col2;
- cp= (char *)&col;
-
- /* See if are lighter, if so mix, else dont do anything.
+ if (fac == 0) {
+ return col1;
+ }
+ else if (fac >= 255) {
+ return col2;
+ }
+
+ mfac = 255 - fac;
+
+ cp1 = (unsigned char *)&col1;
+ cp2 = (unsigned char *)&col2;
+ cp = (unsigned char *)&col;
+
+ /* See if are lighter, if so mix, else don't do anything.
* if the paint col is darker then the original, then ignore */
- if (cp1[1]+cp1[2]+cp1[3] > cp2[1]+cp2[2]+cp2[3])
+ if (rgb_to_grayscale_byte(cp1) > rgb_to_grayscale_byte(cp2)) {
return col1;
-
- cp[0]= 255;
- cp[1]= (mfac*cp1[1]+fac*cp2[1])/255;
- cp[2]= (mfac*cp1[2]+fac*cp2[2])/255;
- cp[3]= (mfac*cp1[3]+fac*cp2[3])/255;
-
+ }
+
+ cp[0] = (mfac * cp1[0] + fac * cp2[0]) / 255;
+ cp[1] = (mfac * cp1[1] + fac * cp2[1]) / 255;
+ cp[2] = (mfac * cp1[2] + fac * cp2[2]) / 255;
+ cp[3] = 255;
+
return col;
}
-BM_INLINE unsigned int mcol_darken(unsigned int col1, unsigned int col2, int fac)
+BLI_INLINE unsigned int mcol_darken(unsigned int col1, unsigned int col2, int fac)
{
- char *cp1, *cp2, *cp;
+ unsigned char *cp1, *cp2, *cp;
int mfac;
- unsigned int col=0;
-
- if(fac==0) return col1;
- if(fac>=255) return col2;
+ unsigned int col = 0;
- mfac= 255-fac;
-
- cp1= (char *)&col1;
- cp2= (char *)&col2;
- cp= (char *)&col;
-
- /* See if were darker, if so mix, else dont do anything.
+ if (fac == 0) {
+ return col1;
+ }
+ else if (fac >= 255) {
+ return col2;
+ }
+
+ mfac = 255 - fac;
+
+ cp1 = (unsigned char *)&col1;
+ cp2 = (unsigned char *)&col2;
+ cp = (unsigned char *)&col;
+
+ /* See if were darker, if so mix, else don't do anything.
* if the paint col is brighter then the original, then ignore */
- if (cp1[1]+cp1[2]+cp1[3] < cp2[1]+cp2[2]+cp2[3])
+ if (rgb_to_grayscale_byte(cp1) < rgb_to_grayscale_byte(cp2)) {
return col1;
-
- cp[0]= 255;
- cp[1]= (mfac*cp1[1]+fac*cp2[1])/255;
- cp[2]= (mfac*cp1[2]+fac*cp2[2])/255;
- cp[3]= (mfac*cp1[3]+fac*cp2[3])/255;
+ }
+
+ cp[0] = (mfac * cp1[0] + fac * cp2[0]) / 255;
+ cp[1] = (mfac * cp1[1] + fac * cp2[1]) / 255;
+ cp[2] = (mfac * cp1[2] + fac * cp2[2]) / 255;
+ cp[3] = 255;
return col;
}
@@ -794,24 +788,24 @@ static unsigned int vpaint_blend(VPaint *vp, unsigned int col, unsigned int colo
col = vpaint_blend_tool(tool, col, paintcol, alpha_i);
/* if no spray, clip color adding with colorig & orig alpha */
- if((vp->flag & VP_SPRAY)==0) {
+ if ((vp->flag & VP_SPRAY) == 0) {
unsigned int testcol, a;
char *cp, *ct, *co;
testcol = vpaint_blend_tool(tool, colorig, paintcol, brush_alpha_value_i);
- cp= (char *)&col;
- ct= (char *)&testcol;
- co= (char *)&colorig;
+ cp = (char *)&col;
+ ct = (char *)&testcol;
+ co = (char *)&colorig;
- for(a=0; a<4; a++) {
- if( ct[a]<co[a] ) {
- if( cp[a]<ct[a] ) cp[a]= ct[a];
- else if( cp[a]>co[a] ) cp[a]= co[a];
+ for (a = 0; a < 4; a++) {
+ if ( ct[a] < co[a] ) {
+ if ( cp[a] < ct[a] ) cp[a] = ct[a];
+ else if ( cp[a] > co[a] ) cp[a] = co[a];
}
else {
- if( cp[a]<co[a] ) cp[a]= co[a];
- else if( cp[a]>ct[a] ) cp[a]= ct[a];
+ if ( cp[a] < co[a] ) cp[a] = co[a];
+ else if ( cp[a] > ct[a] ) cp[a] = ct[a];
}
}
}
@@ -823,32 +817,32 @@ static unsigned int vpaint_blend(VPaint *vp, unsigned int col, unsigned int colo
static int sample_backbuf_area(ViewContext *vc, int *indexar, int totface, int x, int y, float size)
{
struct ImBuf *ibuf;
- int a, tot=0, index;
+ int a, tot = 0, index;
/* brecht: disabled this because it obviously fails for
* brushes with size > 64, why is this here? */
- /*if(size>64.0) size= 64.0;*/
+ /*if(size > 64.0) size = 64.0;*/
- ibuf= view3d_read_backbuf(vc, x-size, y-size, x+size, y+size);
- if(ibuf) {
- unsigned int *rt= ibuf->rect;
+ ibuf = view3d_read_backbuf(vc, x - size, y - size, x + size, y + size);
+ if (ibuf) {
+ unsigned int *rt = ibuf->rect;
- memset(indexar, 0, sizeof(int)*(totface+1));
+ memset(indexar, 0, sizeof(int) * (totface + 1));
- size= ibuf->x*ibuf->y;
- while(size--) {
+ size = ibuf->x * ibuf->y;
+ while (size--) {
- if(*rt) {
- index= WM_framebuffer_to_index(*rt);
- if(index>0 && index<=totface)
+ if (*rt) {
+ index = WM_framebuffer_to_index(*rt);
+ if (index > 0 && index <= totface)
indexar[index] = 1;
}
rt++;
}
- for(a=1; a<=totface; a++) {
- if(indexar[a]) indexar[tot++]= a;
+ for (a = 1; a <= totface; a++) {
+ if (indexar[a]) indexar[tot++] = a;
}
IMB_freeImBuf(ibuf);
@@ -867,7 +861,7 @@ static float calc_vp_strength_dl(VPaint *vp, ViewContext *vc, const float *vert_
project_float_noclip(vc->ar, vert_nor, vertco);
sub_v2_v2v2(delta, mval, vertco);
- dist_squared= dot_v2v2(delta, delta); /* len squared */
+ dist_squared = dot_v2v2(delta, delta); /* len squared */
if (dist_squared > brush_size_pressure * brush_size_pressure) {
return 0.0f;
}
@@ -885,11 +879,11 @@ static float calc_vp_alpha_dl(VPaint *vp, ViewContext *vc,
float strength = calc_vp_strength_dl(vp, vc, vert_nor, mval, brush_size_pressure);
if (strength > 0.0f) {
- float alpha= brush_alpha_pressure * strength;
+ float alpha = brush_alpha_pressure * strength;
- if(vp->flag & VP_NORMALS) {
+ if (vp->flag & VP_NORMALS) {
float dvec[3];
- const float *no= vert_nor + 3;
+ const float *no = vert_nor + 3;
/* transpose ! */
dvec[2] = dot_v3v3(vpimat[2], no);
@@ -911,27 +905,27 @@ static float calc_vp_alpha_dl(VPaint *vp, ViewContext *vc,
}
-BM_INLINE float wval_blend(const float weight, const float paintval, const float alpha)
+BLI_INLINE float wval_blend(const float weight, const float paintval, const float alpha)
{
return (paintval * alpha) + (weight * (1.0f - alpha));
}
-BM_INLINE float wval_add(const float weight, const float paintval, const float alpha)
+BLI_INLINE float wval_add(const float weight, const float paintval, const float alpha)
{
return weight + (paintval * alpha);
}
-BM_INLINE float wval_sub(const float weight, const float paintval, const float alpha)
+BLI_INLINE float wval_sub(const float weight, const float paintval, const float alpha)
{
return weight - (paintval * alpha);
}
-BM_INLINE float wval_mul(const float weight, const float paintval, const float alpha)
+BLI_INLINE float wval_mul(const float weight, const float paintval, const float alpha)
{ /* first mul, then blend the fac */
return ((1.0f - alpha) + (alpha * paintval)) * weight;
}
-BM_INLINE float wval_lighten(const float weight, const float paintval, const float alpha)
+BLI_INLINE float wval_lighten(const float weight, const float paintval, const float alpha)
{
return (weight < paintval) ? wval_blend(weight, paintval, alpha) : weight;
}
-BM_INLINE float wval_darken(const float weight, const float paintval, const float alpha)
+BLI_INLINE float wval_darken(const float weight, const float paintval, const float alpha)
{
return (weight > paintval) ? wval_blend(weight, paintval, alpha) : weight;
}
@@ -972,32 +966,32 @@ static float wpaint_blend(VPaint *wp, float weight, float weight_prev,
case PAINT_BLEND_MIX:
paintval = 1.f - paintval; break;
case PAINT_BLEND_ADD:
- tool= PAINT_BLEND_SUB; break;
+ tool = PAINT_BLEND_SUB; break;
case PAINT_BLEND_SUB:
- tool= PAINT_BLEND_ADD; break;
+ tool = PAINT_BLEND_ADD; break;
case PAINT_BLEND_LIGHTEN:
- tool= PAINT_BLEND_DARKEN; break;
+ tool = PAINT_BLEND_DARKEN; break;
case PAINT_BLEND_DARKEN:
- tool= PAINT_BLEND_LIGHTEN; break;
+ tool = PAINT_BLEND_LIGHTEN; break;
}
}
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);
if (testw < weight_prev) {
- if(weight < testw) weight = testw;
- else if(weight > weight_prev) weight = weight_prev;
+ if (weight < testw) weight = testw;
+ else if (weight > weight_prev) weight = weight_prev;
}
else {
if (weight > testw) weight = testw;
@@ -1018,59 +1012,59 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
ViewContext vc;
Mesh *me;
- short change= FALSE;
+ short change = FALSE;
view3d_set_viewcontext(C, &vc);
- me= get_mesh(vc.obact);
+ me = get_mesh(vc.obact);
if (me && me->dvert && vc.v3d && vc.rv3d) {
int index;
view3d_operator_needs_opengl(C);
- index= view3d_sample_backbuf(&vc, event->mval[0], event->mval[1]);
+ index = view3d_sample_backbuf(&vc, event->mval[0], event->mval[1]);
- if(index && index<=me->totpoly) {
- DerivedMesh *dm= mesh_get_derived_final(vc.scene, vc.obact, CD_MASK_BAREMESH);
+ if (index && index <= me->totpoly) {
+ DerivedMesh *dm = mesh_get_derived_final(vc.scene, vc.obact, CD_MASK_BAREMESH);
- if(dm->getVertCo==NULL) {
+ if (dm->getVertCo == NULL) {
BKE_report(op->reports, RPT_WARNING, "The modifier used does not support deformed locations");
}
else {
- MPoly *mf= ((MPoly *)me->mpoly) + index-1;
- const int vgroup_active= vc.obact->actdef - 1;
- ToolSettings *ts= vc.scene->toolsettings;
+ MPoly *mf = ((MPoly *)me->mpoly) + index - 1;
+ const int vgroup_active = vc.obact->actdef - 1;
+ ToolSettings *ts = vc.scene->toolsettings;
float mval_f[2];
- int v_idx_best= -1;
+ int v_idx_best = -1;
int fidx;
- float len_best= FLT_MAX;
+ float len_best = FLT_MAX;
- mval_f[0]= (float)event->mval[0];
- mval_f[1]= (float)event->mval[1];
+ mval_f[0] = (float)event->mval[0];
+ mval_f[1] = (float)event->mval[1];
- fidx= mf->totloop - 1;
+ fidx = mf->totloop - 1;
do {
float co[3], sco[3], len;
- const int v_idx= me->mloop[mf->loopstart + fidx].v;
+ const int v_idx = me->mloop[mf->loopstart + fidx].v;
dm->getVertCo(dm, v_idx, co);
project_float_noclip(vc.ar, co, sco);
- len= len_squared_v2v2(mval_f, sco);
- if(len < len_best) {
- len_best= len;
- v_idx_best= v_idx;
+ len = len_squared_v2v2(mval_f, sco);
+ if (len < len_best) {
+ len_best = len;
+ v_idx_best = v_idx;
}
} while (fidx--);
- if(v_idx_best != -1) { /* should always be valid */
- ts->vgroup_weight= defvert_find_weight(&me->dvert[v_idx_best], vgroup_active);
- change= TRUE;
+ if (v_idx_best != -1) { /* should always be valid */
+ ts->vgroup_weight = defvert_find_weight(&me->dvert[v_idx_best], vgroup_active);
+ change = TRUE;
}
}
dm->release(dm);
}
}
- if(change) {
+ if (change) {
/* not really correct since the brush didnt change, but redraws the toolbar */
WM_main_add_notifier(NC_BRUSH|NA_EDITED, NULL); /* ts->wpaint->paint.brush */
@@ -1084,74 +1078,74 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
void PAINT_OT_weight_sample(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Weight Paint Sample Weight";
- ot->idname= "PAINT_OT_weight_sample";
+ ot->name = "Weight Paint Sample Weight";
+ ot->idname = "PAINT_OT_weight_sample";
/* api callbacks */
- ot->invoke= weight_sample_invoke;
- ot->poll= weight_paint_mode_poll;
+ ot->invoke = weight_sample_invoke;
+ ot->poll = weight_paint_mode_poll;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
}
/* samples cursor location, and gives menu with vertex groups to activate */
static EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
if (C) {
- wmWindow *win= CTX_wm_window(C);
- if(win && win->eventstate) {
+ wmWindow *win = CTX_wm_window(C);
+ if (win && win->eventstate) {
ViewContext vc;
Mesh *me;
view3d_set_viewcontext(C, &vc);
- me= get_mesh(vc.obact);
+ me = get_mesh(vc.obact);
if (me && me->dvert && vc.v3d && vc.rv3d) {
int index;
view3d_operator_needs_opengl(C);
- index= view3d_sample_backbuf(&vc, win->eventstate->x - vc.ar->winrct.xmin, win->eventstate->y - vc.ar->winrct.ymin);
+ index = view3d_sample_backbuf(&vc, win->eventstate->x - vc.ar->winrct.xmin, win->eventstate->y - vc.ar->winrct.ymin);
- if(index && index<=me->totpoly) {
- const int defbase_tot= BLI_countlist(&vc.obact->defbase);
- if(defbase_tot) {
- MPoly *mf= ((MPoly *)me->mpoly) + index-1;
- unsigned int fidx= mf->totloop - 1;
- int *groups= MEM_callocN(defbase_tot*sizeof(int), "groups");
- int found= FALSE;
+ if (index && index <= me->totpoly) {
+ const int defbase_tot = BLI_countlist(&vc.obact->defbase);
+ if (defbase_tot) {
+ MPoly *mf = ((MPoly *)me->mpoly) + index - 1;
+ unsigned int fidx = mf->totloop - 1;
+ int *groups = MEM_callocN(defbase_tot * sizeof(int), "groups");
+ int found = FALSE;
do {
- MDeformVert *dvert= me->dvert + me->mloop[mf->loopstart + fidx].v;
- int i= dvert->totweight;
+ MDeformVert *dvert = me->dvert + me->mloop[mf->loopstart + fidx].v;
+ int i = dvert->totweight;
MDeformWeight *dw;
- for(dw= dvert->dw; i > 0; dw++, i--) {
+ 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;
}
}
} while (fidx--);
- if(found==FALSE) {
+ if (found == FALSE) {
MEM_freeN(groups);
}
else {
- EnumPropertyItem *item= NULL, item_tmp= {0};
- int totitem= 0;
- int i= 0;
+ EnumPropertyItem *item = NULL, item_tmp = {0};
+ int totitem = 0;
+ int i = 0;
bDeformGroup *dg;
- for(dg= vc.obact->defbase.first; dg && i<defbase_tot; i++, dg= dg->next) {
- if(groups[i]) {
- item_tmp.identifier= item_tmp.name= dg->name;
- item_tmp.value= i;
+ for (dg = vc.obact->defbase.first; dg && i < defbase_tot; i++, dg = dg->next) {
+ if (groups[i]) {
+ item_tmp.identifier = item_tmp.name = dg->name;
+ item_tmp.value = i;
RNA_enum_item_add(&item, &totitem, &item_tmp);
}
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
MEM_freeN(groups);
return item;
@@ -1167,12 +1161,12 @@ static EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C, PointerRNA
static int weight_sample_group_exec(bContext *C, wmOperator *op)
{
- int type= RNA_enum_get(op->ptr, "group");
+ int type = RNA_enum_get(op->ptr, "group");
ViewContext vc;
view3d_set_viewcontext(C, &vc);
BLI_assert(type + 1 >= 0);
- vc.obact->actdef= type + 1;
+ vc.obact->actdef = type + 1;
DAG_id_tag_update(&vc.obact->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, vc.obact);
@@ -1182,33 +1176,33 @@ static int weight_sample_group_exec(bContext *C, wmOperator *op)
/* TODO, we could make this a menu into OBJECT_OT_vertex_group_set_active rather than its own operator */
void PAINT_OT_weight_sample_group(wmOperatorType *ot)
{
- PropertyRNA *prop= NULL;
+ PropertyRNA *prop = NULL;
/* identifiers */
- ot->name= "Weight Paint Sample Group";
- ot->idname= "PAINT_OT_weight_sample_group";
+ ot->name = "Weight Paint Sample Group";
+ ot->idname = "PAINT_OT_weight_sample_group";
/* api callbacks */
- ot->exec= weight_sample_group_exec;
- ot->invoke= WM_menu_invoke;
- ot->poll= weight_paint_mode_poll;
+ ot->exec = weight_sample_group_exec;
+ ot->invoke = WM_menu_invoke;
+ ot->poll = weight_paint_mode_poll;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* keyingset to use (dynamic enum) */
- prop= RNA_def_enum(ot->srna, "group", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
+ prop = RNA_def_enum(ot->srna, "group", DummyRNA_DEFAULT_items, 0, "Keying Set", "The Keying Set to use");
RNA_def_enum_funcs(prop, weight_paint_sample_enum_itemf);
- ot->prop= prop;
+ ot->prop = prop;
}
static void do_weight_paint_normalize_all(MDeformVert *dvert, const int defbase_tot, const char *vgroup_validmap)
{
- float sum= 0.0f, fac;
- unsigned int i, tot=0;
+ float sum = 0.0f, fac;
+ unsigned int i, tot = 0;
MDeformWeight *dw;
- for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) {
+ for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
if (dw->def_nr < defbase_tot && vgroup_validmap[dw->def_nr]) {
tot++;
sum += dw->weight;
@@ -1220,9 +1214,9 @@ static void do_weight_paint_normalize_all(MDeformVert *dvert, const int defbase_
}
if (sum != 0.0f) {
- fac= 1.0f / sum;
+ fac = 1.0f / sum;
- for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) {
+ for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
if (dw->def_nr < defbase_tot && vgroup_validmap[dw->def_nr]) {
dw->weight *= fac;
}
@@ -1232,7 +1226,7 @@ static void do_weight_paint_normalize_all(MDeformVert *dvert, const int defbase_
/* hrmf, not a factor in this case */
fac = 1.0f / tot;
- for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) {
+ for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
if (dw->def_nr < defbase_tot && vgroup_validmap[dw->def_nr]) {
dw->weight = fac;
}
@@ -1247,12 +1241,12 @@ static void do_weight_paint_normalize_all(MDeformVert *dvert, const int defbase_
static void do_weight_paint_normalize_all_active(MDeformVert *dvert, const int defbase_tot, const char *vgroup_validmap,
const int vgroup_active)
{
- float sum= 0.0f, fac;
- unsigned int i, tot=0;
+ float sum = 0.0f, fac;
+ unsigned int i, tot = 0;
MDeformWeight *dw;
float act_weight = 0.0f;
- for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) {
+ for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
if (dw->def_nr < defbase_tot && vgroup_validmap[dw->def_nr]) {
if (dw->def_nr != vgroup_active) {
sum += dw->weight;
@@ -1271,7 +1265,7 @@ static void do_weight_paint_normalize_all_active(MDeformVert *dvert, const int d
if (sum != 0.0f) {
fac = (1.0f / sum) * (1.0f - act_weight);
- for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) {
+ for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
if (dw->def_nr < defbase_tot && vgroup_validmap[dw->def_nr]) {
if (dw->def_nr != vgroup_active) {
dw->weight *= fac;
@@ -1291,7 +1285,7 @@ static void do_weight_paint_normalize_all_active(MDeformVert *dvert, const int d
/* paranoid but possibly with float error */
CLAMP(fac, 0.0f, 1.0f);
- for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) {
+ for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) {
if (dw->def_nr < defbase_tot && vgroup_validmap[dw->def_nr]) {
if (dw->def_nr != vgroup_active) {
dw->weight = fac;
@@ -1310,7 +1304,7 @@ static char has_locked_group(MDeformVert *dvert, const int defbase_tot,
int i;
MDeformWeight *dw;
- for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) {
+ 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;
@@ -1323,15 +1317,15 @@ static char has_locked_group(MDeformVert *dvert, const int defbase_tot,
* gen_lck_flags gets the status of "flag" for each bDeformGroup
*in ob->defbase and returns an array containing them
*/
-static char *gen_lock_flags(Object* ob, int defbase_tot)
+static char *gen_lock_flags(Object *ob, int defbase_tot)
{
char is_locked = FALSE;
int i;
//int defbase_tot = BLI_countlist(&ob->defbase);
- char *lock_flags = MEM_mallocN(defbase_tot*sizeof(char), "defflags");
+ char *lock_flags = MEM_mallocN(defbase_tot * sizeof(char), "defflags");
bDeformGroup *defgroup;
- for(i = 0, defgroup = ob->defbase.first; i < defbase_tot && defgroup; defgroup = defgroup->next, i++) {
+ for (i = 0, defgroup = ob->defbase.first; i < defbase_tot && defgroup; defgroup = defgroup->next, i++) {
lock_flags[i] = ((defgroup->flag & DG_LOCK_WEIGHT) != 0);
is_locked |= lock_flags[i];
}
@@ -1346,8 +1340,8 @@ static char *gen_lock_flags(Object* ob, int defbase_tot)
static int has_locked_group_selected(int defbase_tot, const char *defbase_sel, const char *lock_flags)
{
int i;
- for(i = 0; i < defbase_tot; i++) {
- if(defbase_sel[i] && lock_flags[i]) {
+ for (i = 0; i < defbase_tot; i++) {
+ if (defbase_sel[i] && lock_flags[i]) {
return TRUE;
}
}
@@ -1359,11 +1353,11 @@ static int has_locked_group_selected(int defbase_tot, const char *defbase_sel, c
static int has_unselected_unlocked_bone_group(int defbase_tot, char *defbase_sel, int selected, char *lock_flags, char *vgroup_validmap)
{
int i;
- if(defbase_tot == selected) {
+ if (defbase_tot == selected) {
return FALSE;
}
- for(i = 0; i < defbase_tot; i++) {
- if(vgroup_validmap[i] && !defbase_sel[i] && !lock_flags[i]) {
+ for (i = 0; i < defbase_tot; i++) {
+ if (vgroup_validmap[i] && !defbase_sel[i] && !lock_flags[i]) {
return TRUE;
}
}
@@ -1378,30 +1372,30 @@ static void multipaint_selection(MDeformVert *dvert, const int defbase_tot, floa
MDeformWeight *dw;
float val;
/* make sure they are all at most 1 after the change */
- for(i = 0; i < defbase_tot; i++) {
- if(defbase_sel[i]) {
+ for (i = 0; i < defbase_tot; i++) {
+ if (defbase_sel[i]) {
dw = defvert_find_index(dvert, i);
- if(dw && dw->weight) {
+ if (dw && dw->weight) {
val = dw->weight * change;
- if(val > 1) {
+ if (val > 1) {
/* TODO: when the change is reduced, you need to recheck
* the earlier values to make sure they are not 0
* (precision error) */
- change = 1.0f/dw->weight;
+ change = 1.0f / dw->weight;
}
/* the value should never reach zero while multi-painting if it
* was nonzero beforehand */
- if(val <= 0) {
+ if (val <= 0) {
return;
}
}
}
}
/* apply the valid change */
- for(i = 0; i < defbase_tot; i++) {
- if(defbase_sel[i]) {
+ for (i = 0; i < defbase_tot; i++) {
+ if (defbase_sel[i]) {
dw = defvert_find_index(dvert, i);
- if(dw && dw->weight) {
+ if (dw && dw->weight) {
dw->weight = dw->weight * change;
}
}
@@ -1425,25 +1419,25 @@ static float redistribute_change(MDeformVert *ndv, const int defbase_tot,
/* assume there is no change until you see one */
was_change = FALSE;
/* change each group by the same amount each time */
- change = totchange/total_valid;
- for(i = 0; i < ndv->totweight && total_valid && totchange; i++) {
- ndw = (ndv->dw+i);
+ change = totchange / total_valid;
+ for (i = 0; i < ndv->totweight && total_valid && totchange; i++) {
+ ndw = (ndv->dw + i);
/* ignore anything outside the value range */
if (ndw->def_nr < defbase_tot) {
/* change only the groups with a valid status */
- if(change_status[ndw->def_nr] == change_me) {
+ 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) {
- totchange -= 1-ndw->weight;
- ndw->weight = 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 */
change_status[ndw->def_nr] = changeto;
total_valid--;
}
- else if(ndw->weight + change < 0) { /* check the lower bound */
+ else if (ndw->weight + change < 0) { /* check the lower bound */
totchange -= ndw->weight;
ndw->weight = 0;
change_status[ndw->def_nr] = changeto;
@@ -1454,7 +1448,7 @@ static float redistribute_change(MDeformVert *ndv, const int defbase_tot,
ndw->weight += change;
}
/* see if there was a change */
- if(oldval != ndw->weight) {
+ if (oldval != ndw->weight) {
was_change = TRUE;
}
}
@@ -1462,7 +1456,7 @@ static float redistribute_change(MDeformVert *ndv, const int defbase_tot,
}
/* don't go again if there was no change, if there is no valid group,
* or there is no change left */
- } while(was_change && total_valid && totchange);
+ } while (was_change && total_valid && totchange);
/* left overs */
return totchange;
}
@@ -1489,17 +1483,17 @@ static void enforce_locks(MDeformVert *odv, MDeformVert *ndv,
char *change_status;
- if(!lock_flags || !has_locked_group(ndv, defbase_tot, vgroup_validmap, lock_flags)) {
+ if (!lock_flags || !has_locked_group(ndv, defbase_tot, vgroup_validmap, lock_flags)) {
return;
}
/* record if a group was changed, unlocked and not changed, or locked */
- change_status = MEM_callocN(sizeof(char)*defbase_tot, "unlocked_unchanged");
+ change_status = MEM_callocN(sizeof(char) * defbase_tot, "unlocked_unchanged");
- for(i = 0; i < defbase_tot; i++) {
+ for (i = 0; i < defbase_tot; i++) {
ndw = defvert_find_index(ndv, i);
odw = defvert_find_index(odv, i);
/* the weights are zero, so we can assume a lot */
- if(!ndw || !odw) {
+ if (!ndw || !odw) {
if (!lock_flags[i] && vgroup_validmap[i]) {
defvert_verify_index(odv, i);
defvert_verify_index(ndv, i);
@@ -1509,10 +1503,10 @@ static void enforce_locks(MDeformVert *odv, MDeformVert *ndv,
continue;
}
/* locked groups should not be changed */
- if(lock_flags[i]) {
+ if (lock_flags[i]) {
ndw->weight = odw->weight;
}
- else if(ndw->weight != odw->weight) { /* changed groups are handled here */
+ else if (ndw->weight != odw->weight) { /* changed groups are handled here */
totchange += ndw->weight - odw->weight;
changed_sum += ndw->weight;
change_status[i] = 2; /* was altered already */
@@ -1525,26 +1519,26 @@ static void enforce_locks(MDeformVert *odv, MDeformVert *ndv,
}
}
/* if there was any change, redistribute it */
- if(total_changed) {
+ if (total_changed) {
/* auto normalize will allow weights to temporarily go above 1 in redistribution */
- if(vgroup_validmap && total_changed < 0 && total_valid) {
+ if (vgroup_validmap && total_changed < 0 && total_valid) {
totchange_allowed = total_valid;
}
- /* the way you modify the unlocked+unchanged groups is different depending
+ /* the way you modify the unlocked + unchanged groups is different depending
* on whether or not you are painting the weight(s) up or down */
- if(totchange < 0) {
+ if (totchange < 0) {
totchange_allowed = total_valid - totchange_allowed;
}
else {
totchange_allowed *= -1;
}
/* there needs to be change allowed, or you should not bother */
- if(totchange_allowed) {
+ if (totchange_allowed) {
left_over = 0;
- if(fabsf(totchange_allowed) < fabsf(totchange)) {
+ if (fabsf(totchange_allowed) < fabsf(totchange)) {
/* this amount goes back onto the changed, unlocked weights */
left_over = fabsf(fabsf(totchange) - fabsf(totchange_allowed));
- if(totchange > 0) {
+ if (totchange > 0) {
left_over *= -1;
}
}
@@ -1555,9 +1549,9 @@ static void enforce_locks(MDeformVert *odv, MDeformVert *ndv,
/* move the weight evenly between the allowed groups, move excess back onto the used groups based on the change */
totchange_allowed = redistribute_change(ndv, defbase_tot, change_status, 1, -1, totchange_allowed, total_valid, do_auto_normalize);
left_over += totchange_allowed;
- if(left_over) {
+ if (left_over) {
/* more than one nonzero weights were changed with the same ratio with multipaint, so keep them changed that way! */
- if(total_changed > 1 && do_multipaint) {
+ if (total_changed > 1 && do_multipaint) {
float undo_change = get_mp_change(ndv, defbase_tot, defbase_sel, left_over);
multipaint_selection(ndv, defbase_tot, undo_change, defbase_sel);
}
@@ -1570,11 +1564,11 @@ static void enforce_locks(MDeformVert *odv, MDeformVert *ndv,
else {
/* reset the weights */
unsigned int i;
- MDeformWeight *dw_old= odv->dw;
- MDeformWeight *dw_new= ndv->dw;
+ MDeformWeight *dw_old = odv->dw;
+ MDeformWeight *dw_new = ndv->dw;
- for (i= odv->totweight; i != 0; i--, dw_old++, dw_new++) {
- dw_new->weight= dw_old->weight;
+ for (i = odv->totweight; i != 0; i--, dw_old++, dw_new++) {
+ dw_new->weight = dw_old->weight;
}
}
}
@@ -1587,17 +1581,17 @@ static float get_mp_change(MDeformVert *odv, const int defbase_tot, const char *
{
float selwsum = 0.0f;
unsigned int i;
- MDeformWeight *dw= odv->dw;
+ MDeformWeight *dw = odv->dw;
- for (i= odv->totweight; i != 0; i--, dw++) {
+ for (i = odv->totweight; i != 0; i--, dw++) {
if (dw->def_nr < defbase_tot) {
- if(defbase_sel[dw->def_nr]) {
+ if (defbase_sel[dw->def_nr]) {
selwsum += dw->weight;
}
}
}
- if(selwsum && selwsum+brush_change > 0) {
- return (selwsum+brush_change)/selwsum;
+ if (selwsum && selwsum + brush_change > 0) {
+ return (selwsum + brush_change) / selwsum;
}
return 0.0f;
}
@@ -1606,11 +1600,11 @@ static float get_mp_change(MDeformVert *odv, const int defbase_tot, const char *
* it assumes you already have the correct pointer index */
static void defvert_reset_to_prev(MDeformVert *dv_prev, MDeformVert *dv)
{
- MDeformWeight *dw= dv->dw;
+ MDeformWeight *dw = dv->dw;
MDeformWeight *dw_prev;
unsigned int i;
- for (i= dv->totweight; i != 0; i--, dw++) {
- dw_prev= defvert_find_index(dv_prev, dw->def_nr);
+ for (i = dv->totweight; i != 0; i--, dw++) {
+ dw_prev = defvert_find_index(dv_prev, dw->def_nr);
/* if there was no w when there is a d, then the old weight was 0 */
dw->weight = dw_prev ? dw_prev->weight : 0.0f;
}
@@ -1618,9 +1612,9 @@ static void defvert_reset_to_prev(MDeformVert *dv_prev, MDeformVert *dv)
static void clamp_weights(MDeformVert *dvert)
{
- MDeformWeight *dw= dvert->dw;
+ MDeformWeight *dw = dvert->dw;
unsigned int i;
- for (i= dvert->totweight; i != 0; i--, dw++) {
+ for (i = dvert->totweight; i != 0; i--, dw++) {
CLAMP(dw->weight, 0.0f, 1.0f);
}
}
@@ -1667,10 +1661,10 @@ static int apply_mp_locks_normalize(Mesh *me, const WeightPaintInfo *wpi,
float change, float oldChange,
float oldw, float neww)
{
- MDeformVert *dv= &me->dvert[index];
- MDeformVert dv_test= {NULL};
+ MDeformVert *dv = &me->dvert[index];
+ MDeformVert dv_test = {NULL};
- dv_test.dw= MEM_dupallocN(dv->dw);
+ dv_test.dw = MEM_dupallocN(dv->dw);
dv_test.flag = dv->flag;
dv_test.totweight = dv->totweight;
/* do not multi-paint if a locked group is selected or the active group is locked
@@ -1679,8 +1673,8 @@ static int apply_mp_locks_normalize(Mesh *me, const WeightPaintInfo *wpi,
((wpi->lock_flags[dw->def_nr] == FALSE) && /* def_nr range has to be checked for by caller */
has_locked_group_selected(wpi->defbase_tot, wpi->defbase_sel, wpi->lock_flags) == FALSE))
{
- if(wpi->do_multipaint && wpi->defbase_tot_sel > 1) {
- if(change && change!=1) {
+ if (wpi->do_multipaint && wpi->defbase_tot_sel > 1) {
+ if (change && change != 1) {
multipaint_selection(dv, wpi->defbase_tot, change, wpi->defbase_sel);
}
}
@@ -1697,16 +1691,16 @@ static int apply_mp_locks_normalize(Mesh *me, const WeightPaintInfo *wpi,
do_weight_paint_normalize_all(dv, wpi->defbase_tot, wpi->vgroup_validmap);
}
- if(oldChange && wpi->do_multipaint && wpi->defbase_tot_sel > 1) {
- if(tdw->weight != oldw) {
- if(neww > oldw) {
- if(tdw->weight <= oldw) {
+ if (oldChange && wpi->do_multipaint && wpi->defbase_tot_sel > 1) {
+ if (tdw->weight != oldw) {
+ if (neww > oldw) {
+ if (tdw->weight <= oldw) {
MEM_freeN(dv_test.dw);
return TRUE;
}
}
else {
- if(tdw->weight >= oldw) {
+ if (tdw->weight >= oldw) {
MEM_freeN(dv_test.dw);
return TRUE;
}
@@ -1722,8 +1716,8 @@ static int apply_mp_locks_normalize(Mesh *me, const WeightPaintInfo *wpi,
static int get_first_selected_nonzero_weight(MDeformVert *dvert, const int defbase_tot, const char *defbase_sel)
{
int i;
- MDeformWeight *dw= dvert->dw;
- for(i=0; i< dvert->totweight; i++, dw++) {
+ MDeformWeight *dw = dvert->dw;
+ for (i = 0; i < dvert->totweight; i++, dw++) {
if (dw->def_nr < defbase_tot) {
if (defbase_sel[dw->def_nr] && dw->weight > 0.0f) {
return i;
@@ -1743,8 +1737,8 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert
const unsigned int index, float alpha, float paintweight
)
{
- Mesh *me= ob->data;
- MDeformVert *dv= &me->dvert[index];
+ Mesh *me = ob->data;
+ MDeformVert *dv = &me->dvert[index];
MDeformWeight *dw, *dw_prev;
@@ -1757,16 +1751,16 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert
const short do_multipaint_totsel = (wpi->do_multipaint && wpi->defbase_tot_sel > 1);
- if(wp->flag & VP_ONLYVGROUP) {
- dw= defvert_find_index(dv, wpi->vgroup_active);
- dw_prev= defvert_find_index(wp->wpaint_prev+index, wpi->vgroup_active);
+ if (wp->flag & VP_ONLYVGROUP) {
+ dw = defvert_find_index(dv, wpi->vgroup_active);
+ dw_prev = defvert_find_index(wp->wpaint_prev + index, wpi->vgroup_active);
}
else {
- dw= defvert_verify_index(dv, wpi->vgroup_active);
- dw_prev= defvert_verify_index(wp->wpaint_prev+index, wpi->vgroup_active);
+ dw = defvert_verify_index(dv, wpi->vgroup_active);
+ dw_prev = defvert_verify_index(wp->wpaint_prev + index, wpi->vgroup_active);
}
- if(dw==NULL || dw_prev==NULL) {
+ if (dw == NULL || dw_prev == NULL) {
return;
}
@@ -1836,7 +1830,7 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert
* can give wrong results [#26193], least confusing if normalize is done last */
/* apply mirror */
- if(index_mirr != -1) {
+ if (index_mirr != -1) {
/* copy, not paint again */
dw_mirr->weight = dw->weight;
}
@@ -1887,12 +1881,12 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert
/* use locks and/or multipaint */
float oldw;
float neww;
- float testw=0;
+ float testw = 0;
float change = 0;
float oldChange = 0;
int i;
MDeformWeight *tdw = NULL, *tdw_prev;
- MDeformVert dv_copy= {NULL};
+ MDeformVert dv_copy = {NULL};
oldw = dw->weight;
neww = wpaint_blend(wp, dw->weight, dw_prev->weight, alpha, paintweight,
@@ -1900,16 +1894,16 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert
/* setup multi-paint */
if (do_multipaint_totsel) {
- dv_copy.dw= MEM_dupallocN(dv->dw);
+ dv_copy.dw = MEM_dupallocN(dv->dw);
dv_copy.flag = dv->flag;
dv_copy.totweight = dv->totweight;
tdw = dw;
tdw_prev = dw_prev;
change = get_mp_change(&wp->wpaint_prev[index], wpi->defbase_tot, wpi->defbase_sel, neww - oldw);
- if(change) {
- if(!tdw->weight) {
+ if (change) {
+ if (!tdw->weight) {
i = get_first_selected_nonzero_weight(dv, wpi->defbase_tot, wpi->defbase_sel);
- if(i>=0) {
+ if (i >= 0) {
tdw = &(dv->dw[i]);
tdw_prev = defvert_verify_index(&wp->wpaint_prev[index], tdw->def_nr);
}
@@ -1917,14 +1911,14 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert
change = 0;
}
}
- if(change && tdw_prev->weight && tdw_prev->weight * change) {
- if(tdw->weight != tdw_prev->weight) {
- oldChange = tdw->weight/tdw_prev->weight;
- testw = tdw_prev->weight*change;
- if( testw > tdw_prev->weight ) {
- if(change > oldChange) {
+ if (change && tdw_prev->weight && tdw_prev->weight * change) {
+ if (tdw->weight != tdw_prev->weight) {
+ oldChange = tdw->weight / tdw_prev->weight;
+ testw = tdw_prev->weight * change;
+ if ( testw > tdw_prev->weight ) {
+ if (change > oldChange) {
/* reset the weights and use the new change */
- defvert_reset_to_prev(wp->wpaint_prev+index, dv);
+ defvert_reset_to_prev(wp->wpaint_prev + index, dv);
}
else {
/* the old change was more significant, so set
@@ -1933,8 +1927,8 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert
}
}
else {
- if(change < oldChange) {
- defvert_reset_to_prev(wp->wpaint_prev+index, dv);
+ if (change < oldChange) {
+ defvert_reset_to_prev(wp->wpaint_prev + index, dv);
}
else {
change = 0;
@@ -1948,12 +1942,12 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert
}
}
- if(apply_mp_locks_normalize(me, wpi, index, dw, tdw, change, oldChange, oldw, neww)) {
+ if (apply_mp_locks_normalize(me, wpi, index, dw, tdw, change, oldChange, oldw, neww)) {
defvert_reset_to_prev(&dv_copy, dv);
change = 0;
oldChange = 0;
}
- if(dv_copy.dw) {
+ if (dv_copy.dw) {
MEM_freeN(dv_copy.dw);
}
#if 0
@@ -1966,7 +1960,7 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert
#endif
/* x mirror painting */
- if(index_mirr != -1) {
+ if (index_mirr != -1) {
/* copy, not paint again */
/* dw_mirr->weight = dw->weight; */ /* TODO, explain the logic in not assigning weight! - campbell */
@@ -1980,15 +1974,15 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert
static int set_wpaint(bContext *C, wmOperator *UNUSED(op)) /* toggle */
{
- Object *ob= CTX_data_active_object(C);
- Scene *scene= CTX_data_scene(C);
- VPaint *wp= scene->toolsettings->wpaint;
+ Object *ob = CTX_data_active_object(C);
+ Scene *scene = CTX_data_scene(C);
+ VPaint *wp = scene->toolsettings->wpaint;
Mesh *me;
- me= get_mesh(ob);
- if(ob->id.lib || me==NULL) return OPERATOR_PASS_THROUGH;
+ me = get_mesh(ob);
+ if (ob->id.lib || me == NULL) return OPERATOR_PASS_THROUGH;
- if(ob->mode & OB_MODE_WEIGHT_PAINT) ob->mode &= ~OB_MODE_WEIGHT_PAINT;
+ if (ob->mode & OB_MODE_WEIGHT_PAINT) ob->mode &= ~OB_MODE_WEIGHT_PAINT;
else ob->mode |= OB_MODE_WEIGHT_PAINT;
@@ -1999,11 +1993,11 @@ static int set_wpaint(bContext *C, wmOperator *UNUSED(op)) /* toggle */
*/
DAG_id_tag_update(&me->id, 0);
- if(ob->mode & OB_MODE_WEIGHT_PAINT) {
+ if (ob->mode & OB_MODE_WEIGHT_PAINT) {
Object *par;
- if(wp==NULL)
- wp= scene->toolsettings->wpaint= new_vpaint(1);
+ if (wp == NULL)
+ wp = scene->toolsettings->wpaint = new_vpaint(1);
paint_init(&wp->paint, PAINT_CURSOR_WEIGHT_PAINT);
paint_cursor_start(C, weight_paint_poll);
@@ -2011,11 +2005,11 @@ static int set_wpaint(bContext *C, wmOperator *UNUSED(op)) /* toggle */
mesh_octree_table(ob, NULL, NULL, 's');
/* verify if active weight group is also active bone */
- par= modifiers_isDeformedByArmature(ob);
- if(par && (par->mode & OB_MODE_POSE)) {
- bArmature *arm= par->data;
+ par = modifiers_isDeformedByArmature(ob);
+ if (par && (par->mode & OB_MODE_POSE)) {
+ bArmature *arm = par->data;
- if(arm->act_bone)
+ if (arm->act_bone)
ED_vgroup_select_by_name(ob, arm->act_bone->name);
}
}
@@ -2032,12 +2026,12 @@ static int set_wpaint(bContext *C, wmOperator *UNUSED(op)) /* toggle */
/* for switching to/from mode */
static int paint_poll_test(bContext *C)
{
- Object *ob= CTX_data_active_object(C);
- if(CTX_data_edit_object(C))
+ Object *ob = CTX_data_active_object(C);
+ if (CTX_data_edit_object(C))
return 0;
- if(CTX_data_active_object(C)==NULL)
+ if (CTX_data_active_object(C) == NULL)
return 0;
- if(!ob->data || ((ID *)ob->data)->lib)
+ if (!ob->data || ((ID *)ob->data)->lib)
return 0;
return 1;
}
@@ -2046,15 +2040,15 @@ void PAINT_OT_weight_paint_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Weight Paint Mode";
- ot->idname= "PAINT_OT_weight_paint_toggle";
+ ot->name = "Weight Paint Mode";
+ ot->idname = "PAINT_OT_weight_paint_toggle";
/* api callbacks */
- ot->exec= set_wpaint;
- ot->poll= paint_poll_test;
+ ot->exec = set_wpaint;
+ ot->poll = paint_poll_test;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -2068,8 +2062,8 @@ struct WPaintData {
float *vertexcosnos;
float wpimat[3][3];
- /*variables for auto normalize*/
- const char *vgroup_validmap; /*stores if vgroups tie to deforming bones or not*/
+ /* variables for auto normalize */
+ const char *vgroup_validmap; /* stores if vgroups tie to deforming bones or not */
const char *lock_flags;
int defbase_tot;
};
@@ -2080,32 +2074,32 @@ static char *wpaint_make_validmap(Object *ob)
ModifierData *md;
char *vgroup_validmap;
GHash *gh;
- int i, step1=1;
+ int i, step1 = 1;
- if(ob->defbase.first == NULL) {
+ if (ob->defbase.first == NULL) {
return NULL;
}
- gh= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "wpaint_make_validmap gh");
+ gh = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "wpaint_make_validmap gh");
- /*add all names to a hash table*/
- for (dg=ob->defbase.first; dg; dg=dg->next) {
+ /* add all names to a hash table */
+ for (dg = ob->defbase.first; dg; dg = dg->next) {
BLI_ghash_insert(gh, dg->name, NULL);
}
- /*now loop through the armature modifiers and identify deform bones*/
- for (md = ob->modifiers.first; md; md= !md->next && step1 ? (step1=0), modifiers_getVirtualModifierList(ob) : md->next) {
+ /* now loop through the armature modifiers and identify deform bones */
+ for (md = ob->modifiers.first; md; md = !md->next && step1 ? (step1 = 0), modifiers_getVirtualModifierList(ob) : md->next) {
if (!(md->mode & (eModifierMode_Realtime|eModifierMode_Virtual)))
continue;
if (md->type == eModifierType_Armature) {
- ArmatureModifierData *amd= (ArmatureModifierData*) md;
+ ArmatureModifierData *amd = (ArmatureModifierData *) md;
- if(amd->object && amd->object->pose) {
- bPose *pose= amd->object->pose;
+ if (amd->object && amd->object->pose) {
+ bPose *pose = amd->object->pose;
bPoseChannel *chan;
- for (chan=pose->chanbase.first; chan; chan=chan->next) {
+ for (chan = pose->chanbase.first; chan; chan = chan->next) {
if (chan->bone->flag & BONE_NO_DEFORM)
continue;
@@ -2118,11 +2112,11 @@ static char *wpaint_make_validmap(Object *ob)
}
}
- vgroup_validmap= MEM_mallocN(BLI_ghash_size(gh), "wpaint valid map");
+ vgroup_validmap = MEM_mallocN(BLI_ghash_size(gh), "wpaint valid map");
- /*add all names to a hash table*/
- for (dg=ob->defbase.first, i=0; dg; dg=dg->next, i++) {
- vgroup_validmap[i]= (BLI_ghash_lookup(gh, dg->name) != NULL);
+ /* add all names to a hash table */
+ for (dg = ob->defbase.first, i = 0; dg; dg = dg->next, i++) {
+ vgroup_validmap[i] = (BLI_ghash_lookup(gh, dg->name) != NULL);
}
BLI_assert(i == BLI_ghash_size(gh));
@@ -2134,23 +2128,23 @@ static char *wpaint_make_validmap(Object *ob)
static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
struct PaintStroke *stroke = op->customdata;
- ToolSettings *ts= scene->toolsettings;
- VPaint *wp= ts->wpaint;
- Object *ob= CTX_data_active_object(C);
+ ToolSettings *ts = scene->toolsettings;
+ VPaint *wp = ts->wpaint;
+ Object *ob = CTX_data_active_object(C);
struct WPaintData *wpd;
Mesh *me;
bDeformGroup *dg;
float mat[4][4], imat[4][4];
- if(scene->obedit) {
+ if (scene->obedit) {
return FALSE;
}
- me= get_mesh(ob);
- if(me==NULL || me->totpoly==0) return OPERATOR_PASS_THROUGH;
+ me = get_mesh(ob);
+ if (me == NULL || me->totpoly == 0) return OPERATOR_PASS_THROUGH;
/* if nothing was added yet, we make dverts and a vertex deform group */
if (!me->dvert) {
@@ -2161,30 +2155,30 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
/* this happens on a Bone select, when no vgroup existed yet */
if (ob->actdef <= 0) {
Object *modob;
- if((modob = modifiers_isDeformedByArmature(ob))) {
- Bone *actbone= ((bArmature *)modob->data)->act_bone;
- if(actbone) {
- bPoseChannel *pchan= get_pose_channel(modob->pose, actbone->name);
-
- if(pchan) {
- bDeformGroup *dg= defgroup_find_name(ob, pchan->name);
- if(dg==NULL) {
- dg= ED_vgroup_add_name(ob, pchan->name); /* sets actdef */
+ if ((modob = modifiers_isDeformedByArmature(ob))) {
+ Bone *actbone = ((bArmature *)modob->data)->act_bone;
+ if (actbone) {
+ bPoseChannel *pchan = get_pose_channel(modob->pose, actbone->name);
+
+ if (pchan) {
+ bDeformGroup *dg = defgroup_find_name(ob, pchan->name);
+ if (dg == NULL) {
+ dg = ED_vgroup_add_name(ob, pchan->name); /* sets actdef */
}
else {
int actdef = 1 + BLI_findindex(&ob->defbase, dg);
BLI_assert(actdef >= 0);
- ob->actdef= actdef;
+ ob->actdef = actdef;
}
}
}
}
}
- if(ob->defbase.first==NULL) {
+ if (ob->defbase.first == NULL) {
ED_vgroup_add(ob);
}
- /* ensure we dont try paint onto an invalid group */
+ /* 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;
@@ -2192,7 +2186,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
/* check if we are attempting to paint onto a locked vertex group,
* and other options disallow it from doing anything useful */
- dg = BLI_findlink(&ob->defbase, (ob->actdef-1));
+ 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;
@@ -2200,7 +2194,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
/* ALLOCATIONS! no return after this line */
/* make mode data storage */
- wpd= MEM_callocN(sizeof(struct WPaintData), "WPaintData");
+ wpd = MEM_callocN(sizeof(struct WPaintData), "WPaintData");
paint_stroke_set_mode_data(stroke, wpd);
view3d_set_viewcontext(C, &wpd->vc);
@@ -2208,7 +2202,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
wpd->vgroup_mirror = -1;
/* set up auto-normalize, and generate map for detecting which
- * vgroups affect deform bones*/
+ * vgroups affect deform bones */
wpd->defbase_tot = BLI_countlist(&ob->defbase);
wpd->lock_flags = gen_lock_flags(ob, wpd->defbase_tot);
if (ts->auto_normalize || ts->multipaint || wpd->lock_flags) {
@@ -2216,8 +2210,8 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
}
/* painting on subsurfs should give correct points too, this returns me->totvert amount */
- wpd->vertexcosnos= mesh_get_mapped_verts_nors(scene, ob);
- wpd->indexar= get_indexarray(me);
+ wpd->vertexcosnos = mesh_get_mapped_verts_nors(scene, ob);
+ wpd->indexar = get_indexarray(me);
copy_wpaint_prev(wp, me->dvert, me->totvert);
/* imat for normals */
@@ -2226,7 +2220,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
copy_m3_m4(wpd->wpimat, imat);
/* if mirror painting, find the other group */
- if(me->editflag & ME_EDIT_MIRROR_X) {
+ if (me->editflag & ME_EDIT_MIRROR_X) {
wpd->vgroup_mirror = wpaint_mirror_vgroup_ensure(ob, wpd->vgroup_active);
}
@@ -2235,11 +2229,11 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr)
{
- Scene *scene= CTX_data_scene(C);
- ToolSettings *ts= CTX_data_tool_settings(C);
- VPaint *wp= ts->wpaint;
+ Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
+ VPaint *wp = ts->wpaint;
Brush *brush = paint_brush(&wp->paint);
- struct WPaintData *wpd= paint_stroke_mode_data(stroke);
+ struct WPaintData *wpd = paint_stroke_mode_data(stroke);
ViewContext *vc;
Object *ob;
Mesh *me;
@@ -2258,7 +2252,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
const float brush_alpha_value = brush_alpha(scene, brush);
const float brush_alpha_pressure = brush_alpha_value * (brush_use_alpha_pressure(scene, brush) ? pressure : 1.0f);
- /* intentionally dont initialize as NULL, make sure we initialize all members below */
+ /* intentionally don't initialize as NULL, make sure we initialize all members below */
WeightPaintInfo wpi;
/* cannot paint if there is no stroke data */
@@ -2269,10 +2263,10 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
return;
}
- vc= &wpd->vc;
- ob= vc->obact;
- me= ob->data;
- indexar= wpd->indexar;
+ vc = &wpd->vc;
+ ob = vc->obact;
+ me = ob->data;
+ indexar = wpd->indexar;
view3d_operator_needs_opengl(C);
@@ -2280,93 +2274,93 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
mult_m4_m4m4(mat, vc->rv3d->persmat, ob->obmat);
RNA_float_get_array(itemptr, "mouse", mval);
- mval[0]-= vc->ar->winrct.xmin;
- mval[1]-= vc->ar->winrct.ymin;
+ mval[0] -= vc->ar->winrct.xmin;
+ mval[1] -= vc->ar->winrct.ymin;
/* *** setup WeightPaintInfo - pass onto do_weight_paint_vertex *** */
- wpi.defbase_tot= wpd->defbase_tot;
- defbase_sel= MEM_mallocN(wpi.defbase_tot*sizeof(char), "wpi.defbase_sel");
- wpi.defbase_tot_sel= get_selected_defgroups(ob, defbase_sel, wpi.defbase_tot);
- wpi.defbase_sel= defbase_sel; /* so we can stay const */
- if(wpi.defbase_tot_sel == 0 && ob->actdef > 0) wpi.defbase_tot_sel = 1;
-
- wpi.defbase_tot_unsel= wpi.defbase_tot - wpi.defbase_tot_sel;
- wpi.vgroup_active= wpd->vgroup_active;
- wpi.vgroup_mirror= wpd->vgroup_mirror;
- wpi.lock_flags= wpd->lock_flags;
- wpi.vgroup_validmap= wpd->vgroup_validmap;
- wpi.do_flip= RNA_boolean_get(itemptr, "pen_flip");
- wpi.do_multipaint= (ts->multipaint != 0);
- wpi.do_auto_normalize= ((ts->auto_normalize != 0) && (wpi.vgroup_validmap != NULL));
- wpi.brush_alpha_value= brush_alpha_value;
+ wpi.defbase_tot = wpd->defbase_tot;
+ defbase_sel = MEM_mallocN(wpi.defbase_tot * sizeof(char), "wpi.defbase_sel");
+ wpi.defbase_tot_sel = get_selected_defgroups(ob, defbase_sel, wpi.defbase_tot);
+ wpi.defbase_sel = defbase_sel; /* so we can stay const */
+ if (wpi.defbase_tot_sel == 0 && ob->actdef > 0) wpi.defbase_tot_sel = 1;
+
+ wpi.defbase_tot_unsel = wpi.defbase_tot - wpi.defbase_tot_sel;
+ wpi.vgroup_active = wpd->vgroup_active;
+ wpi.vgroup_mirror = wpd->vgroup_mirror;
+ wpi.lock_flags = wpd->lock_flags;
+ wpi.vgroup_validmap = wpd->vgroup_validmap;
+ wpi.do_flip = RNA_boolean_get(itemptr, "pen_flip");
+ wpi.do_multipaint = (ts->multipaint != 0);
+ wpi.do_auto_normalize = ((ts->auto_normalize != 0) && (wpi.vgroup_validmap != NULL));
+ wpi.brush_alpha_value = brush_alpha_value;
/* *** done setting up WeightPaintInfo *** */
swap_m4m4(wpd->vc.rv3d->persmat, mat);
- use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0;
+ use_vert_sel = (me->editflag & ME_EDIT_VERT_SEL) != 0;
/* which faces are involved */
- if(wp->flag & VP_AREA) {
+ if (wp->flag & VP_AREA) {
/* Ugly hack, to avoid drawing vertex index when getting the face index buffer - campbell */
me->editflag &= ~ME_EDIT_VERT_SEL;
- totindex= sample_backbuf_area(vc, indexar, me->totpoly, mval[0], mval[1], brush_size_pressure);
+ totindex = sample_backbuf_area(vc, indexar, me->totpoly, mval[0], mval[1], brush_size_pressure);
me->editflag |= use_vert_sel ? ME_EDIT_VERT_SEL : 0;
}
else {
- indexar[0]= view3d_sample_backbuf(vc, mval[0], mval[1]);
- if(indexar[0]) totindex= 1;
- else totindex= 0;
+ indexar[0] = view3d_sample_backbuf(vc, mval[0], mval[1]);
+ if (indexar[0]) totindex = 1;
+ else totindex = 0;
}
- if(wp->flag & VP_COLINDEX) {
- for(index=0; index<totindex; index++) {
- if(indexar[index] && indexar[index]<=me->totpoly) {
- MPoly *mpoly= ((MPoly *)me->mpoly) + (indexar[index]-1);
+ if (wp->flag & VP_COLINDEX) {
+ for (index = 0; index < totindex; index++) {
+ if (indexar[index] && indexar[index] <= me->totpoly) {
+ MPoly *mpoly = ((MPoly *)me->mpoly) + (indexar[index] - 1);
- if(mpoly->mat_nr!=ob->actcol-1) {
- indexar[index]= 0;
+ if (mpoly->mat_nr != ob->actcol - 1) {
+ indexar[index] = 0;
}
}
}
}
- if((me->editflag & ME_EDIT_PAINT_MASK) && me->mpoly) {
- for(index=0; index<totindex; index++) {
- if(indexar[index] && indexar[index]<=me->totpoly) {
- MPoly *mpoly= ((MPoly *)me->mpoly) + (indexar[index]-1);
+ if ((me->editflag & ME_EDIT_PAINT_MASK) && me->mpoly) {
+ for (index = 0; index < totindex; index++) {
+ if (indexar[index] && indexar[index] <= me->totpoly) {
+ MPoly *mpoly = ((MPoly *)me->mpoly) + (indexar[index] - 1);
- if((mpoly->flag & ME_FACE_SEL)==0) {
- indexar[index]= 0;
+ if ((mpoly->flag & ME_FACE_SEL) == 0) {
+ indexar[index] = 0;
}
- }
+ }
}
}
-
+
/* make sure each vertex gets treated only once */
/* and calculate filter weight */
- totw= 0.0f;
+ totw = 0.0f;
if (brush->vertexpaint_tool == PAINT_BLEND_BLUR)
- paintweight= 0.0f;
+ paintweight = 0.0f;
else
- paintweight= ts->vgroup_weight;
+ paintweight = ts->vgroup_weight;
- for(index=0; index<totindex; index++) {
- if(indexar[index] && indexar[index]<=me->totpoly) {
- MPoly *mpoly= me->mpoly + (indexar[index]-1);
+ for (index = 0; index < totindex; index++) {
+ if (indexar[index] && indexar[index] <= me->totpoly) {
+ MPoly *mpoly = me->mpoly + (indexar[index] - 1);
MLoop *ml = me->mloop + mpoly->loopstart;
int i;
- if(use_vert_sel) {
- for (i=0; i<mpoly->totloop; i++, ml++) {
+ if (use_vert_sel) {
+ for (i = 0; i < mpoly->totloop; i++, ml++) {
me->dvert[ml->v].flag = (me->mvert[ml->v].flag & SELECT);
}
}
else {
- for (i=0; i<mpoly->totloop; i++, ml++) {
+ for (i = 0; i < mpoly->totloop; i++, ml++) {
me->dvert[ml->v].flag = 1;
}
}
@@ -2374,15 +2368,15 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
if (brush->vertexpaint_tool == PAINT_BLEND_BLUR) {
MDeformWeight *dw, *(*dw_func)(MDeformVert *, const int);
- if(wp->flag & VP_ONLYVGROUP)
- dw_func= (MDeformWeight *(*)(MDeformVert *, const int))defvert_find_index;
+ if (wp->flag & VP_ONLYVGROUP)
+ dw_func = (MDeformWeight *(*)(MDeformVert *, const int))defvert_find_index;
else
- dw_func= defvert_verify_index;
+ dw_func = defvert_verify_index;
ml = me->mloop + mpoly->loopstart;
- for (i=0; i<mpoly->totloop; i++, ml++) {
- unsigned int vidx= ml->v;
- const float fac = calc_vp_strength_dl(wp, vc, wpd->vertexcosnos+6*vidx, mval, brush_size_pressure);
+ for (i = 0; i < mpoly->totloop; i++, ml++) {
+ unsigned int vidx = ml->v;
+ const float fac = calc_vp_strength_dl(wp, vc, wpd->vertexcosnos + 6 * vidx, mval, brush_size_pressure);
if (fac > 0.0f) {
dw = dw_func(&me->dvert[vidx], wpi.vgroup_active);
paintweight += dw ? (dw->weight * fac) : 0.0f;
@@ -2397,23 +2391,23 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
paintweight /= totw;
}
- for(index=0; index<totindex; index++) {
+ for (index = 0; index < totindex; index++) {
- if(indexar[index] && indexar[index]<=me->totpoly) {
- MPoly *mpoly= me->mpoly + (indexar[index]-1);
- MLoop *ml=me->mloop+mpoly->loopstart;
+ if (indexar[index] && indexar[index] <= me->totpoly) {
+ MPoly *mpoly = me->mpoly + (indexar[index] - 1);
+ MLoop *ml = me->mloop + mpoly->loopstart;
int i;
- for (i=0; i<mpoly->totloop; i++, ml++) {
- unsigned int vidx= ml->v;
+ for (i = 0; i < mpoly->totloop; i++, ml++) {
+ unsigned int vidx = ml->v;
if (me->dvert[vidx].flag) {
- alpha= calc_vp_alpha_dl(wp, vc, wpd->wpimat, wpd->vertexcosnos+6*vidx,
+ alpha = calc_vp_alpha_dl(wp, vc, wpd->wpimat, wpd->vertexcosnos + 6 * vidx,
mval, brush_size_pressure, brush_alpha_pressure);
- if(alpha) {
+ if (alpha) {
do_weight_paint_vertex(wp, ob, &wpi, vidx, alpha, paintweight);
}
- me->dvert[vidx].flag= 0;
+ me->dvert[vidx].flag = 0;
}
}
}
@@ -2422,7 +2416,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
/* *** free wpi members */
MEM_freeN((void *)wpi.defbase_sel);
- /* *** dont freeing wpi members */
+ /* *** don't freeing wpi members */
swap_m4m4(vc->rv3d->persmat, mat);
@@ -2433,18 +2427,18 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
static void wpaint_stroke_done(bContext *C, struct PaintStroke *stroke)
{
- ToolSettings *ts= CTX_data_tool_settings(C);
- Object *ob= CTX_data_active_object(C);
- struct WPaintData *wpd= paint_stroke_mode_data(stroke);
+ ToolSettings *ts = CTX_data_tool_settings(C);
+ Object *ob = CTX_data_active_object(C);
+ struct WPaintData *wpd = paint_stroke_mode_data(stroke);
- if(wpd) {
- if(wpd->vertexcosnos)
+ if (wpd) {
+ if (wpd->vertexcosnos)
MEM_freeN(wpd->vertexcosnos);
MEM_freeN(wpd->indexar);
if (wpd->vgroup_validmap)
MEM_freeN((void *)wpd->vgroup_validmap);
- if(wpd->lock_flags)
+ if (wpd->lock_flags)
MEM_freeN((void *)wpd->lock_flags);
MEM_freeN(wpd);
@@ -2454,13 +2448,13 @@ static void wpaint_stroke_done(bContext *C, struct PaintStroke *stroke)
copy_wpaint_prev(ts->wpaint, NULL, 0);
/* and particles too */
- if(ob->particlesystem.first) {
+ if (ob->particlesystem.first) {
ParticleSystem *psys;
int i;
- for(psys= ob->particlesystem.first; psys; psys= psys->next) {
- for(i=0; i<PSYS_TOT_VG; i++) {
- if(psys->vgroup[i]==ob->actdef) {
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
+ for (i = 0; i < PSYS_TOT_VG; i++) {
+ if (psys->vgroup[i] == ob->actdef) {
psys->recalc |= PSYS_RECALC_RESET;
break;
}
@@ -2498,25 +2492,25 @@ void PAINT_OT_weight_paint(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Weight Paint";
- ot->idname= "PAINT_OT_weight_paint";
+ ot->name = "Weight Paint";
+ ot->idname = "PAINT_OT_weight_paint";
/* api callbacks */
- ot->invoke= wpaint_invoke;
- ot->modal= paint_stroke_modal;
- /* ot->exec= vpaint_exec; <-- needs stroke property */
- ot->poll= weight_paint_poll;
- ot->cancel= wpaint_cancel;
+ ot->invoke = wpaint_invoke;
+ ot->modal = paint_stroke_modal;
+ /* ot->exec = vpaint_exec; <-- needs stroke property */
+ ot->poll = weight_paint_poll;
+ ot->cancel = wpaint_cancel;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
}
static int weight_paint_set_exec(bContext *C, wmOperator *UNUSED(op))
{
- struct Scene *scene= CTX_data_scene(C);
+ struct Scene *scene = CTX_data_scene(C);
Object *obact = CTX_data_active_object(C);
wpaint_fill(scene->toolsettings->wpaint, obact, scene->toolsettings->vgroup_weight);
@@ -2527,15 +2521,15 @@ static int weight_paint_set_exec(bContext *C, wmOperator *UNUSED(op))
void PAINT_OT_weight_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Weight";
- ot->idname= "PAINT_OT_weight_set";
+ ot->name = "Set Weight";
+ ot->idname = "PAINT_OT_weight_set";
/* api callbacks */
- ot->exec= weight_paint_set_exec;
- ot->poll= mask_paint_poll; /* it was facemask_paint_poll */
+ ot->exec = weight_paint_set_exec;
+ ot->poll = mask_paint_poll; /* it was facemask_paint_poll */
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************ set / clear vertex paint mode ********** */
@@ -2543,22 +2537,24 @@ void PAINT_OT_weight_set(wmOperatorType *ot)
static int set_vpaint(bContext *C, wmOperator *op) /* toggle */
{
- Object *ob= CTX_data_active_object(C);
- Scene *scene= CTX_data_scene(C);
- VPaint *vp= scene->toolsettings->vpaint;
+ Object *ob = CTX_data_active_object(C);
+ Scene *scene = CTX_data_scene(C);
+ VPaint *vp = scene->toolsettings->vpaint;
Mesh *me;
- me= get_mesh(ob);
+ me = get_mesh(ob);
- if(me==NULL || object_data_is_libdata(ob)) {
+ if (me == NULL || object_data_is_libdata(ob)) {
ob->mode &= ~OB_MODE_VERTEX_PAINT;
return OPERATOR_PASS_THROUGH;
}
- if(me && me->mloopcol==NULL) make_vertexcol(ob);
+ if (me && me->mloopcol == NULL) {
+ make_vertexcol(ob);
+ }
/* toggle: end vpaint */
- if(ob->mode & OB_MODE_VERTEX_PAINT) {
+ if (ob->mode & OB_MODE_VERTEX_PAINT) {
ob->mode &= ~OB_MODE_VERTEX_PAINT;
}
@@ -2568,8 +2564,8 @@ static int set_vpaint(bContext *C, wmOperator *op) /* toggle */
if (ob->mode & OB_MODE_WEIGHT_PAINT)
set_wpaint(C, op);
- if(vp==NULL)
- vp= scene->toolsettings->vpaint= new_vpaint(0);
+ if (vp == NULL)
+ vp = scene->toolsettings->vpaint = new_vpaint(0);
paint_cursor_start(C, vertex_paint_poll);
@@ -2589,15 +2585,15 @@ void PAINT_OT_vertex_paint_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Vertex Paint Mode";
- ot->idname= "PAINT_OT_vertex_paint_toggle";
+ ot->name = "Vertex Paint Mode";
+ ot->idname = "PAINT_OT_vertex_paint_toggle";
/* api callbacks */
- ot->exec= set_vpaint;
- ot->poll= paint_poll_test;
+ ot->exec = set_vpaint;
+ ot->poll = paint_poll_test;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -2638,7 +2634,7 @@ typedef struct VPaintData {
* otherwise we need to refresh the modifier stack */
int use_fast_update;
- /*mpoly -> mface mapping*/
+ /* mpoly -> mface mapping */
MemArena *polyfacemap_arena;
ListBase *polyfacemap;
} VPaintData;
@@ -2650,10 +2646,10 @@ static void vpaint_build_poly_facemap(struct VPaintData *vd, Mesh *me)
int *origIndex;
int i;
- vd->polyfacemap_arena = BLI_memarena_new(1<<13, "vpaint tmp");
+ vd->polyfacemap_arena = BLI_memarena_new(1 << 13, "vpaint tmp");
BLI_memarena_use_calloc(vd->polyfacemap_arena);
- vd->polyfacemap = BLI_memarena_alloc(vd->polyfacemap_arena, sizeof(ListBase)*me->totpoly);
+ vd->polyfacemap = BLI_memarena_alloc(vd->polyfacemap_arena, sizeof(ListBase) * me->totpoly);
origIndex = CustomData_get_layer(&me->fdata, CD_POLYINDEX);
mf = me->mface;
@@ -2661,7 +2657,7 @@ static void vpaint_build_poly_facemap(struct VPaintData *vd, Mesh *me)
if (!origIndex)
return;
- for (i=0; i<me->totface; i++, mf++, origIndex++) {
+ for (i = 0; i < me->totface; i++, mf++, origIndex++) {
if (*origIndex == ORIGINDEX_NONE)
continue;
@@ -2674,32 +2670,32 @@ static void vpaint_build_poly_facemap(struct VPaintData *vd, Mesh *me)
static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, wmEvent *UNUSED(event))
{
- ToolSettings *ts= CTX_data_tool_settings(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
struct PaintStroke *stroke = op->customdata;
- VPaint *vp= ts->vpaint;
+ VPaint *vp = ts->vpaint;
struct VPaintData *vpd;
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
Mesh *me;
float mat[4][4], imat[4][4];
/* context checks could be a poll() */
- me= get_mesh(ob);
- if(me==NULL || me->totpoly==0)
+ me = get_mesh(ob);
+ if (me == NULL || me->totpoly == 0)
return OPERATOR_PASS_THROUGH;
- if(me->mloopcol==NULL)
+ if (me->mloopcol == NULL)
make_vertexcol(ob);
- if(me->mloopcol==NULL)
+ if (me->mloopcol == NULL)
return OPERATOR_CANCELLED;
/* make mode data storage */
- vpd= MEM_callocN(sizeof(struct VPaintData), "VPaintData");
+ vpd = MEM_callocN(sizeof(struct VPaintData), "VPaintData");
paint_stroke_set_mode_data(stroke, vpd);
view3d_set_viewcontext(C, &vpd->vc);
- vpd->vertexcosnos= mesh_get_mapped_verts_nors(vpd->vc.scene, ob);
- vpd->indexar= get_indexarray(me);
- vpd->paintcol= vpaint_get_current_col(vp);
+ vpd->vertexcosnos = mesh_get_mapped_verts_nors(vpd->vc.scene, ob);
+ vpd->indexar = get_indexarray(me);
+ vpd->paintcol = vpaint_get_current_col(vp);
/* are we painting onto a modified mesh?,
@@ -2732,36 +2728,36 @@ static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob,
ViewContext *vc = &vpd->vc;
Brush *brush = paint_brush(&vp->paint);
Mesh *me = get_mesh(ob);
- MFace *mface= &me->mface[index];
- unsigned int *mcol= ((unsigned int*)me->mcol) + 4*index;
- unsigned int *mcolorig= ((unsigned int*)vp->vpaint_prev) + 4*index;
+ MFace *mface = &me->mface[index];
+ unsigned int *mcol = ((unsigned int *)me->mcol) + 4 * index;
+ unsigned int *mcolorig = ((unsigned int *)vp->vpaint_prev) + 4 * index;
float alpha;
int i;
int brush_alpha_pressure_i;
- if((vp->flag & VP_COLINDEX && mface->mat_nr!=ob->actcol-1) ||
+ if ((vp->flag & VP_COLINDEX && mface->mat_nr != ob->actcol - 1) ||
((me->editflag & ME_EDIT_PAINT_MASK) && !(mface->flag & ME_FACE_SEL)))
return;
if (brush->vertexpaint_tool == PAINT_BLEND_BLUR) {
- unsigned int fcol1= mcol_blend( mcol[0], mcol[1], 128);
- if(mface->v4) {
- unsigned int fcol2= mcol_blend( mcol[2], mcol[3], 128);
- vpd->paintcol= mcol_blend( fcol1, fcol2, 128);
+ unsigned int fcol1 = mcol_blend( mcol[0], mcol[1], 128);
+ if (mface->v4) {
+ unsigned int fcol2 = mcol_blend( mcol[2], mcol[3], 128);
+ vpd->paintcol = mcol_blend( fcol1, fcol2, 128);
}
else {
- vpd->paintcol= mcol_blend( mcol[2], fcol1, 170);
+ vpd->paintcol = mcol_blend( mcol[2], fcol1, 170);
}
}
- brush_alpha_pressure_i = (int)(brush_alpha_pressure*255.0f);
+ brush_alpha_pressure_i = (int)(brush_alpha_pressure * 255.0f);
- for(i = 0; i < (mface->v4 ? 4 : 3); ++i) {
- alpha = calc_vp_alpha_dl(vp, vc, vpd->vpimat, vpd->vertexcosnos+6*(&mface->v1)[i],
+ for (i = 0; i < (mface->v4 ? 4 : 3); ++i) {
+ alpha = calc_vp_alpha_dl(vp, vc, vpd->vpimat, vpd->vertexcosnos + 6 * (&mface->v1)[i],
mval, brush_size_pressure, brush_alpha_pressure);
if (alpha) {
- const int alpha_i = (int)(alpha*255.0f);
+ const int alpha_i = (int)(alpha * 255.0f);
mcol[i] = vpaint_blend(vp, mcol[i], mcolorig[i], vpd->paintcol, alpha_i, brush_alpha_pressure_i);
}
}
@@ -2779,25 +2775,25 @@ static void vpaint_paint_poly(VPaint *vp, VPaintData *vpd, Object *ob,
ViewContext *vc = &vpd->vc;
Brush *brush = paint_brush(&vp->paint);
Mesh *me = get_mesh(ob);
- MPoly *mpoly= &me->mpoly[index];
+ MPoly *mpoly = &me->mpoly[index];
MFace *mf;
MCol *mc;
MLoop *ml;
MLoopCol *mlc;
polyfacemap_e *e;
- unsigned int *lcol = ((unsigned int*)me->mloopcol) + mpoly->loopstart;
- unsigned int *lcolorig = ((unsigned int*)vp->vpaint_prev) + mpoly->loopstart;
+ unsigned int *lcol = ((unsigned int *)me->mloopcol) + mpoly->loopstart;
+ unsigned int *lcolorig = ((unsigned int *)vp->vpaint_prev) + mpoly->loopstart;
float alpha;
int i, j;
- int brush_alpha_pressure_i = (int)(brush_alpha_pressure*255.0f);
+ int brush_alpha_pressure_i = (int)(brush_alpha_pressure * 255.0f);
- if(brush->vertexpaint_tool == PAINT_BLEND_BLUR) {
+ if (brush->vertexpaint_tool == PAINT_BLEND_BLUR) {
unsigned int blend[4] = {0};
unsigned int tcol;
char *col;
- for (j=0; j<mpoly->totloop; j++) {
+ for (j = 0; j < mpoly->totloop; j++) {
col = (char *)(lcol + j);
blend[0] += col[0];
blend[1] += col[1];
@@ -2819,12 +2815,12 @@ static void vpaint_paint_poly(VPaint *vp, VPaintData *vpd, Object *ob,
}
ml = me->mloop + mpoly->loopstart;
- for (i=0; i<mpoly->totloop; i++, ml++) {
- alpha= calc_vp_alpha_dl(vp, vc, vpd->vpimat,
- vpd->vertexcosnos+6*ml->v, mval,
- brush_size_pressure, brush_alpha_pressure);
- if(alpha > 0.0f) {
- const int alpha_i = (int)(alpha*255.0f);
+ for (i = 0; i < mpoly->totloop; i++, ml++) {
+ alpha = calc_vp_alpha_dl(vp, vc, vpd->vpimat,
+ vpd->vertexcosnos + 6 * ml->v, mval,
+ brush_size_pressure, brush_alpha_pressure);
+ if (alpha > 0.0f) {
+ const int alpha_i = (int)(alpha * 255.0f);
lcol[i] = vpaint_blend(vp, lcol[i], lcolorig[i], vpd->paintcol, alpha_i, brush_alpha_pressure_i);
}
}
@@ -2840,19 +2836,19 @@ static void vpaint_paint_poly(VPaint *vp, VPaintData *vpd, Object *ob,
* rather then regenerating the tessellation altogether */
for (e = vpd->polyfacemap[index].first; e; e = e->next) {
mf = me->mface + e->facenr;
- mc = me->mcol + e->facenr*4;
+ mc = me->mcol + e->facenr * 4;
ml = me->mloop + mpoly->loopstart;
mlc = me->mloopcol + mpoly->loopstart;
- for (j=0; j<mpoly->totloop; j++, ml++, mlc++) {
+ for (j = 0; j < mpoly->totloop; j++, ml++, mlc++) {
if (ml->v == mf->v1)
CPYCOL(mc, mlc);
else if (ml->v == mf->v2)
- CPYCOL(mc+1, mlc);
+ CPYCOL(mc + 1, mlc);
else if (ml->v == mf->v3)
- CPYCOL(mc+2, mlc);
+ CPYCOL(mc + 2, mlc);
else if (mf->v4 && ml->v == mf->v4)
- CPYCOL(mc+3, mlc);
+ CPYCOL(mc + 3, mlc);
}
}
@@ -2863,16 +2859,16 @@ static void vpaint_paint_poly(VPaint *vp, VPaintData *vpd, Object *ob,
static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr)
{
- Scene *scene= CTX_data_scene(C);
- ToolSettings *ts= CTX_data_tool_settings(C);
+ Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = CTX_data_tool_settings(C);
struct VPaintData *vpd = paint_stroke_mode_data(stroke);
- VPaint *vp= ts->vpaint;
+ VPaint *vp = ts->vpaint;
Brush *brush = paint_brush(&vp->paint);
- ViewContext *vc= &vpd->vc;
- Object *ob= vc->obact;
- Mesh *me= ob->data;
+ ViewContext *vc = &vpd->vc;
+ Object *ob = vc->obact;
+ Mesh *me = ob->data;
float mat[4][4];
- int *indexar= vpd->indexar;
+ int *indexar = vpd->indexar;
int totindex, index, flip;
float mval[2];
@@ -2890,40 +2886,40 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
/* load projection matrix */
mult_m4_m4m4(mat, vc->rv3d->persmat, ob->obmat);
- mval[0]-= vc->ar->winrct.xmin;
- mval[1]-= vc->ar->winrct.ymin;
+ mval[0] -= vc->ar->winrct.xmin;
+ mval[1] -= vc->ar->winrct.ymin;
/* which faces are involved */
- if(vp->flag & VP_AREA) {
- totindex= sample_backbuf_area(vc, indexar, me->totpoly, mval[0], mval[1], brush_size_pressure);
+ if (vp->flag & VP_AREA) {
+ totindex = sample_backbuf_area(vc, indexar, me->totpoly, mval[0], mval[1], brush_size_pressure);
}
else {
- indexar[0]= view3d_sample_backbuf(vc, mval[0], mval[1]);
- if(indexar[0]) totindex= 1;
- else totindex= 0;
+ indexar[0] = view3d_sample_backbuf(vc, mval[0], mval[1]);
+ if (indexar[0]) totindex = 1;
+ else totindex = 0;
}
- if(vp->flag & VP_COLINDEX) {
- for(index=0; index<totindex; index++) {
- if(indexar[index] && indexar[index]<=me->totpoly) {
- MPoly *mpoly= ((MPoly *)me->mpoly) + (indexar[index]-1);
+ if (vp->flag & VP_COLINDEX) {
+ for (index = 0; index < totindex; index++) {
+ if (indexar[index] && indexar[index] <= me->totpoly) {
+ MPoly *mpoly = ((MPoly *)me->mpoly) + (indexar[index] - 1);
- if(mpoly->mat_nr!=ob->actcol-1) {
- indexar[index]= 0;
+ if (mpoly->mat_nr != ob->actcol - 1) {
+ indexar[index] = 0;
}
}
}
}
- if((me->editflag & ME_EDIT_PAINT_MASK) && me->mpoly) {
- for(index=0; index<totindex; index++) {
- if(indexar[index] && indexar[index]<=me->totpoly) {
- MPoly *mpoly= ((MPoly *)me->mpoly) + (indexar[index]-1);
+ if ((me->editflag & ME_EDIT_PAINT_MASK) && me->mpoly) {
+ for (index = 0; index < totindex; index++) {
+ if (indexar[index] && indexar[index] <= me->totpoly) {
+ MPoly *mpoly = ((MPoly *)me->mpoly) + (indexar[index] - 1);
- if((mpoly->flag & ME_FACE_SEL)==0)
- indexar[index]= 0;
+ if ((mpoly->flag & ME_FACE_SEL) == 0)
+ indexar[index] = 0;
}
}
}
@@ -2931,17 +2927,17 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
swap_m4m4(vc->rv3d->persmat, mat);
- for(index=0; index<totindex; index++) {
+ for (index = 0; index < totindex; index++) {
- if(indexar[index] && indexar[index]<=me->totpoly) {
- vpaint_paint_poly(vp, vpd, ob, indexar[index]-1, mval, brush_size_pressure, brush_alpha_pressure, flip);
+ if (indexar[index] && indexar[index] <= me->totpoly) {
+ vpaint_paint_poly(vp, vpd, ob, indexar[index] - 1, mval, brush_size_pressure, brush_alpha_pressure, flip);
}
}
swap_m4m4(vc->rv3d->persmat, mat);
/* was disabled because it is slow, but necessary for blur */
- if(brush->vertexpaint_tool == PAINT_BLEND_BLUR) {
+ if (brush->vertexpaint_tool == PAINT_BLEND_BLUR) {
int do_tessface = vpd->use_fast_update;
do_shared_vertexcol(me, do_tessface);
}
@@ -2957,10 +2953,10 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
static void vpaint_stroke_done(bContext *C, struct PaintStroke *stroke)
{
- ToolSettings *ts= CTX_data_tool_settings(C);
- struct VPaintData *vpd= paint_stroke_mode_data(stroke);
+ ToolSettings *ts = CTX_data_tool_settings(C);
+ struct VPaintData *vpd = paint_stroke_mode_data(stroke);
- if(vpd->vertexcosnos)
+ if (vpd->vertexcosnos)
MEM_freeN(vpd->vertexcosnos);
MEM_freeN(vpd->indexar);
@@ -2999,18 +2995,18 @@ static int vpaint_cancel(bContext *C, wmOperator *op)
void PAINT_OT_vertex_paint(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Vertex Paint";
- ot->idname= "PAINT_OT_vertex_paint";
+ ot->name = "Vertex Paint";
+ ot->idname = "PAINT_OT_vertex_paint";
/* api callbacks */
- ot->invoke= vpaint_invoke;
- ot->modal= paint_stroke_modal;
- /* ot->exec= vpaint_exec; <-- needs stroke property */
- ot->poll= vertex_paint_poll;
- ot->cancel= vpaint_cancel;
+ ot->invoke = vpaint_invoke;
+ ot->modal = paint_stroke_modal;
+ /* ot->exec = vpaint_exec; <-- needs stroke property */
+ ot->poll = vertex_paint_poll;
+ ot->cancel = vpaint_cancel;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
}
@@ -3019,18 +3015,18 @@ void PAINT_OT_vertex_paint(wmOperatorType *ot)
static int weight_from_bones_poll(bContext *C)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob = CTX_data_active_object(C);
return (ob && (ob->mode & OB_MODE_WEIGHT_PAINT) && modifiers_isDeformedByArmature(ob));
}
static int weight_from_bones_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
- Object *armob= modifiers_isDeformedByArmature(ob);
- Mesh *me= ob->data;
- int type= RNA_enum_get(op->ptr, "type");
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = CTX_data_active_object(C);
+ Object *armob = modifiers_isDeformedByArmature(ob);
+ Mesh *me = ob->data;
+ int type = RNA_enum_get(op->ptr, "type");
create_vgroups_from_armature(op->reports, scene, ob, armob, type, (me->editflag & ME_EDIT_MIRROR_X));
@@ -3042,24 +3038,23 @@ static int weight_from_bones_exec(bContext *C, wmOperator *op)
void PAINT_OT_weight_from_bones(wmOperatorType *ot)
{
- static EnumPropertyItem type_items[]= {
+ static EnumPropertyItem type_items[] = {
{ARM_GROUPS_AUTO, "AUTOMATIC", 0, "Automatic", "Automatic weights froms bones"},
{ARM_GROUPS_ENVELOPE, "ENVELOPES", 0, "From Envelopes", "Weights from envelopes with user defined radius"},
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Weight from Bones";
- ot->idname= "PAINT_OT_weight_from_bones";
+ ot->name = "Weight from Bones";
+ ot->idname = "PAINT_OT_weight_from_bones";
/* api callbacks */
- ot->exec= weight_from_bones_exec;
- ot->invoke= WM_menu_invoke;
- ot->poll= weight_from_bones_poll;
+ ot->exec = weight_from_bones_exec;
+ ot->invoke = WM_menu_invoke;
+ ot->poll = weight_from_bones_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Method to use for assigning weights");
+ ot->prop = RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Method to use for assigning weights");
}
-
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index c7b27742969..e91f26fc9ba 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -64,6 +64,7 @@
#include "BKE_report.h"
#include "BKE_lattice.h" /* for armature_deform_verts */
#include "BKE_node.h"
+#include "BKE_subsurf.h"
#include "BIF_glutil.h"
@@ -96,7 +97,7 @@ void ED_sculpt_force_update(bContext *C)
{
Object *ob= CTX_data_active_object(C);
- if(ob && (ob->mode & OB_MODE_SCULPT))
+ if (ob && (ob->mode & OB_MODE_SCULPT))
multires_force_update(ob);
}
@@ -107,19 +108,19 @@ struct MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob)
Mesh *me= (Mesh*)ob->data;
ModifierData *md;
- if(!CustomData_get_layer(&me->ldata, CD_MDISPS)) {
+ if (!CustomData_get_layer(&me->ldata, CD_MDISPS)) {
/* multires can't work without displacement layer */
return NULL;
}
- for(md= modifiers_getVirtualModifierList(ob); md; md= md->next) {
- if(md->type == eModifierType_Multires) {
+ for (md= modifiers_getVirtualModifierList(ob); md; md= md->next) {
+ if (md->type == eModifierType_Multires) {
MultiresModifierData *mmd= (MultiresModifierData*)md;
- if(!modifier_isEnabled(scene, md, eModifierMode_Realtime))
+ if (!modifier_isEnabled(scene, md, eModifierMode_Realtime))
continue;
- if(mmd->sculptlvl > 0) return mmd;
+ if (mmd->sculptlvl > 0) return mmd;
else return NULL;
}
}
@@ -135,8 +136,8 @@ static int sculpt_has_active_modifiers(Scene *scene, Object *ob)
md= modifiers_getVirtualModifierList(ob);
/* exception for shape keys because we can edit those */
- for(; md; md= md->next) {
- if(modifier_isEnabled(scene, md, eModifierMode_Realtime))
+ for (; md; md= md->next) {
+ if (modifier_isEnabled(scene, md, eModifierMode_Realtime))
return 1;
}
@@ -150,22 +151,22 @@ static int sculpt_modifiers_active(Scene *scene, Sculpt *sd, Object *ob)
Mesh *me= (Mesh*)ob->data;
MultiresModifierData *mmd= sculpt_multires_active(scene, ob);
- if(mmd) return 0;
+ if (mmd) return 0;
/* non-locked shape keys could be handled in the same way as deformed mesh */
- if((ob->shapeflag&OB_SHAPE_LOCK)==0 && me->key && ob->shapenr)
+ if ((ob->shapeflag&OB_SHAPE_LOCK)==0 && me->key && ob->shapenr)
return 1;
md= modifiers_getVirtualModifierList(ob);
/* exception for shape keys because we can edit those */
- for(; md; md= md->next) {
+ for (; md; md= md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- if(!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue;
- if(md->type==eModifierType_ShapeKey) continue;
+ if (!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue;
+ if (md->type==eModifierType_ShapeKey) continue;
- if(mti->type==eModifierTypeType_OnlyDeform) return 1;
- else if((sd->flags & SCULPT_ONLY_DEFORM)==0) return 1;
+ if (mti->type==eModifierTypeType_OnlyDeform) return 1;
+ else if ((sd->flags & SCULPT_ONLY_DEFORM)==0) return 1;
}
return 0;
@@ -193,7 +194,6 @@ typedef struct StrokeCache {
/* Variants */
float radius;
float radius_squared;
- //float traced_location[3];
float true_location[3];
float location[3];
@@ -254,13 +254,13 @@ static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d,
PBVH *pbvh= ob->sculpt->pbvh;
float bb_min[3], bb_max[3];
- if(!pbvh)
+ if (!pbvh)
return 0;
BLI_pbvh_redraw_BB(pbvh, bb_min, bb_max);
/* convert 3D bounding box to screen space */
- if(!paint_convert_bb_to_rect(rect,
+ if (!paint_convert_bb_to_rect(rect,
bb_min,
bb_max,
ar,
@@ -276,8 +276,8 @@ static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d,
* optimized PBVH draw function and 3d view redraw (if not -- some
* mesh parts could disappear from screen (sergey) */
ss = ob->sculpt;
- if(ss->cache) {
- if(!BLI_rcti_is_empty(&ss->cache->previous_r))
+ if (ss->cache) {
+ if (!BLI_rcti_is_empty(&ss->cache->previous_r))
BLI_union_rcti(rect, &ss->cache->previous_r);
}
@@ -295,7 +295,7 @@ void sculpt_get_redraw_planes(float planes[4][4], ARegion *ar,
paint_calc_redraw_planes(planes, ar, rv3d, ob, &rect);
/* clear redraw flag from nodes */
- if(pbvh)
+ if (pbvh)
BLI_pbvh_update(pbvh, PBVH_UpdateRedraw, NULL);
}
@@ -318,7 +318,7 @@ static int sculpt_brush_test(SculptBrushTest *test, float co[3])
{
float distsq = len_squared_v3v3(co, test->location);
- if(distsq <= test->radius_squared) {
+ if (distsq <= test->radius_squared) {
test->dist = sqrt(distsq);
return 1;
}
@@ -331,7 +331,7 @@ static int sculpt_brush_test_sq(SculptBrushTest *test, float co[3])
{
float distsq = len_squared_v3v3(co, test->location);
- if(distsq <= test->radius_squared) {
+ if (distsq <= test->radius_squared) {
test->dist = distsq;
return 1;
}
@@ -347,8 +347,7 @@ static int sculpt_brush_test_fast(SculptBrushTest *test, float co[3])
static int sculpt_brush_test_cube(SculptBrushTest *test, float co[3], float local[4][4])
{
- static const float side = 0.70710678118654752440084436210485; // sqrt(.5);
-
+ float side = M_SQRT1_2;
float local_co[3];
mul_v3_m4v3(local_co, local, co);
@@ -358,7 +357,11 @@ static int sculpt_brush_test_cube(SculptBrushTest *test, float co[3], float loca
local_co[2] = fabs(local_co[2]);
if (local_co[0] <= side && local_co[1] <= side && local_co[2] <= side) {
- test->dist = MAX3(local_co[0], local_co[1], local_co[2]) / side;
+ float p = 4;
+
+ test->dist = ((powf(local_co[0], p) +
+ powf(local_co[1], p) +
+ powf(local_co[2], p)) / pow(side, p));
return 1;
}
@@ -448,7 +451,7 @@ static float integrate_overlap(Brush* br)
float max;
max= 0;
- for(i= 0; i < m; i++) {
+ for (i= 0; i < m; i++) {
float overlap= overlapped_curve(br, i*g);
if (overlap > max)
@@ -461,15 +464,15 @@ static float integrate_overlap(Brush* br)
/* Uses symm to selectively flip any axis of a coordinate. */
static void flip_coord(float out[3], float in[3], const char symm)
{
- if(symm & SCULPT_SYMM_X)
+ if (symm & SCULPT_SYMM_X)
out[0]= -in[0];
else
out[0]= in[0];
- if(symm & SCULPT_SYMM_Y)
+ if (symm & SCULPT_SYMM_Y)
out[1]= -in[1];
else
out[1]= in[1];
- if(symm & SCULPT_SYMM_Z)
+ if (symm & SCULPT_SYMM_Z)
out[2]= -in[2];
else
out[2]= in[2];
@@ -480,16 +483,16 @@ static float calc_overlap(StrokeCache *cache, const char symm, const char axis,
float mirror[3];
float distsq;
- //flip_coord(mirror, cache->traced_location, symm);
+ /* flip_coord(mirror, cache->traced_location, symm); */
flip_coord(mirror, cache->true_location, symm);
- if(axis != 0) {
+ if (axis != 0) {
float mat[4][4]= MAT4_UNITY;
rotate_m4(mat, axis, angle);
mul_m4_v3(mat, mirror);
}
- //distsq = len_squared_v3v3(mirror, cache->traced_location);
+ /* distsq = len_squared_v3v3(mirror, cache->traced_location); */
distsq = len_squared_v3v3(mirror, cache->true_location);
if (distsq <= 4.0f*(cache->radius_squared))
@@ -504,7 +507,7 @@ static float calc_radial_symmetry_feather(Sculpt *sd, StrokeCache *cache, const
float overlap;
overlap = 0;
- for(i = 1; i < sd->radial_symm[axis-'X']; ++i) {
+ for (i = 1; i < sd->radial_symm[axis-'X']; ++i) {
const float angle = 2*M_PI*i/sd->radial_symm[axis-'X'];
overlap += calc_overlap(cache, symm, axis, angle);
}
@@ -521,7 +524,7 @@ static float calc_symmetry_feather(Sculpt *sd, StrokeCache* cache)
overlap = 0;
for (i = 0; i <= symm; i++) {
- if(i == 0 || (symm & i && (symm != 5 || i != 3) && (symm != 6 || (i != 3 && i != 5)))) {
+ if (i == 0 || (symm & i && (symm != 5 || i != 3) && (symm != 6 || (i != 3 && i != 5)))) {
overlap += calc_overlap(cache, i, 0, 0);
@@ -562,9 +565,9 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather)
(brush->spacing < 100)) ? 1.0f/accum : 1;
float flip = dir * invert * pen_flip;
- switch(brush->sculpt_tool){
+ switch(brush->sculpt_tool) {
case SCULPT_TOOL_CLAY:
- case SCULPT_TOOL_CLAY_TUBES:
+ case SCULPT_TOOL_CLAY_STRIPS:
case SCULPT_TOOL_DRAW:
case SCULPT_TOOL_LAYER:
return alpha * flip * pressure * overlap * feather;
@@ -635,10 +638,10 @@ static float tex_strength(SculptSession *ss, Brush *br, float point[3],
MTex *mtex = &br->mtex;
float avg= 1;
- if(!mtex->tex) {
+ if (!mtex->tex) {
avg= 1;
}
- else if(mtex->brush_map_mode == MTEX_MAP_MODE_3D) {
+ else if (mtex->brush_map_mode == MTEX_MAP_MODE_3D) {
float jnk;
/* Get strength by feeding the vertex
@@ -646,7 +649,7 @@ static float tex_strength(SculptSession *ss, Brush *br, float point[3],
externtex(mtex, point, &avg,
&jnk, &jnk, &jnk, &jnk, 0);
}
- else if(ss->texcache) {
+ else if (ss->texcache) {
float rotation = -mtex->rot;
float symm_point[3], point_2d[2];
float x, y;
@@ -665,13 +668,14 @@ static float tex_strength(SculptSession *ss, Brush *br, float point[3],
ED_view3d_project_float_v2(ss->cache->vc->ar, symm_point, point_2d, ss->cache->projection_mat);
/* if fixed mode, keep coordinates relative to mouse */
- if(mtex->brush_map_mode == MTEX_MAP_MODE_FIXED) {
+ if (mtex->brush_map_mode == MTEX_MAP_MODE_FIXED) {
rotation += ss->cache->special_rotation;
point_2d[0] -= ss->cache->tex_mouse[0];
point_2d[1] -= ss->cache->tex_mouse[1];
- radius = ss->cache->pixel_radius; // use pressure adjusted size for fixed mode
+ /* use pressure adjusted size for fixed mode */
+ radius = ss->cache->pixel_radius;
x = point_2d[0] + ss->cache->vc->ar->winrct.xmin;
y = point_2d[1] + ss->cache->vc->ar->winrct.ymin;
@@ -679,7 +683,8 @@ static float tex_strength(SculptSession *ss, Brush *br, float point[3],
else /* else (mtex->brush_map_mode == MTEX_MAP_MODE_TILED) */
/* leave the coordinates relative to the screen */
{
- radius = brush_size(ss->cache->vc->scene, br); // use unadjusted size for tiled mode
+ /* use unadjusted size for tiled mode */
+ radius = brush_size(ss->cache->vc->scene, br);
x = point_2d[0];
y = point_2d[1];
@@ -741,15 +746,15 @@ static int sculpt_search_sphere_cb(PBVHNode *node, void *data_v)
float t[3], bb_min[3], bb_max[3];
int i;
- if(data->original)
+ if (data->original)
BLI_pbvh_node_get_original_BB(node, bb_min, bb_max);
else
BLI_pbvh_node_get_BB(node, bb_min, bb_max);
- for(i = 0; i < 3; ++i) {
- if(bb_min[i] > center[i])
+ for (i = 0; i < 3; ++i) {
+ if (bb_min[i] > center[i])
nearest[i] = bb_min[i];
- else if(bb_max[i] < center[i])
+ else if (bb_max[i] < center[i])
nearest[i] = bb_max[i];
else
nearest[i] = center[i];
@@ -765,11 +770,11 @@ static void sculpt_clip(Sculpt *sd, SculptSession *ss, float *co, const float va
{
int i;
- for(i=0; i<3; ++i) {
- if(sd->flags & (SCULPT_LOCK_X << i))
+ for (i=0; i<3; ++i) {
+ if (sd->flags & (SCULPT_LOCK_X << i))
continue;
- if((ss->cache->flag & (CLIP_X << i)) && (fabsf(co[i]) <= ss->cache->clip_tolerance[i]))
+ if ((ss->cache->flag & (CLIP_X << i)) && (fabsf(co[i]) <= ss->cache->clip_tolerance[i]))
co[i]= 0.0f;
else
co[i]= val[i];
@@ -778,9 +783,10 @@ static void sculpt_clip(Sculpt *sd, SculptSession *ss, float *co, const float va
static void add_norm_if(float view_vec[3], float out[3], float out_flip[3], float fno[3])
{
- if((dot_v3v3(view_vec, fno)) > 0) {
+ if ((dot_v3v3(view_vec, fno)) > 0) {
add_v3_v3(out, fno);
- } else {
+ }
+ else {
add_v3_v3(out_flip, fno); /* out_flip is used when out is {0,0,0} */
}
}
@@ -797,19 +803,19 @@ static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nod
zero_v3(an);
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n=0; n<totnode; n++) {
+ for (n=0; n<totnode; n++) {
PBVHVertexIter vd;
SculptBrushTest test;
SculptUndoNode *unode;
float private_an[3] = {0.0f, 0.0f, 0.0f};
float private_out_flip[3] = {0.0f, 0.0f, 0.0f};
- unode = sculpt_undo_push_node(ob, nodes[n]);
+ unode = sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS);
sculpt_brush_test_init(ss, &test);
- if(ss->cache->original) {
+ if (ss->cache->original) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test_fast(&test, unode->co[vd.i])) {
+ if (sculpt_brush_test_fast(&test, unode->co[vd.i])) {
float fno[3];
normal_short_to_float_v3(fno, unode->no[vd.i]);
@@ -820,8 +826,8 @@ static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nod
}
else {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test_fast(&test, vd.co)) {
- if(vd.no) {
+ if (sculpt_brush_test_fast(&test, vd.co)) {
+ if (vd.no) {
float fno[3];
normal_short_to_float_v3(fno, vd.no);
@@ -903,28 +909,27 @@ static void calc_sculpt_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **n
* polygon.) */
static void neighbor_average(SculptSession *ss, float avg[3], unsigned vert)
{
- const int ncount = BLI_countlist(&ss->pmap[vert]);
+ const MeshElemMap *vert_map = &ss->pmap[vert];
const MVert *mvert = ss->mvert;
float (*deform_co)[3] = ss->deform_cos;
zero_v3(avg);
/* Don't modify corner vertices */
- if(ncount != 1) {
- IndexNode *node;
- int total = 0;
+ if (vert_map->count > 1) {
+ int i, total = 0;
- for(node = ss->pmap[vert].first; node; node = node->next) {
- const MPoly *p= &ss->mpoly[node->index];
+ for (i = 0; i < vert_map->count; i++) {
+ const MPoly *p= &ss->mpoly[vert_map->indices[i]];
unsigned f_adj_v[3];
- if(poly_get_adj_loops_from_vert(f_adj_v, p, ss->mloop, vert) != -1) {
- int i;
+ if (poly_get_adj_loops_from_vert(f_adj_v, p, ss->mloop, vert) != -1) {
+ int j;
- for (i = 0; i < 3; i++) {
- if (ncount != 2 || BLI_countlist(&ss->pmap[f_adj_v[i]]) <= 2) {
- add_v3_v3(avg, deform_co ? deform_co[f_adj_v[i]] :
- mvert[f_adj_v[i]].co);
+ for (j = 0; j < 3; j++) {
+ if (vert_map->count != 2 || ss->pmap[f_adj_v[j]].count <= 2) {
+ add_v3_v3(avg, deform_co ? deform_co[f_adj_v[j]] :
+ mvert[f_adj_v[j]].co);
total++;
}
@@ -932,7 +937,7 @@ static void neighbor_average(SculptSession *ss, float avg[3], unsigned vert)
}
}
- if(total > 0) {
+ if (total > 0) {
mul_v3_fl(avg, 1.0f / total);
return;
}
@@ -952,7 +957,7 @@ static void do_mesh_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *node,
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test(&test, vd.co)) {
+ if (sculpt_brush_test(&test, vd.co)) {
const float fade = bstrength*tex_strength(ss, brush, vd.co, test.dist,
ss->cache->view_normal, vd.no, vd.fno);
float avg[3], val[3];
@@ -965,7 +970,7 @@ static void do_mesh_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *node,
sculpt_clip(sd, ss, vd.co, val);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -995,7 +1000,7 @@ static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *no
tmprow= MEM_mallocN(sizeof(float)*3*gridsize, "tmprow");
}
- for(i = 0; i < totgrid; ++i) {
+ for (i = 0; i < totgrid; ++i) {
data = griddata[grid_indices[i]];
adj = &gridadj[grid_indices[i]];
@@ -1024,29 +1029,29 @@ static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *no
}
/* blend with existing coordinates */
- for(y = 0; y < gridsize; ++y) {
- for(x = 0; x < gridsize; ++x) {
+ for (y = 0; y < gridsize; ++y) {
+ for (x = 0; x < gridsize; ++x) {
float *co;
float *fno;
int index;
- if(x == 0 && adj->index[0] == -1)
+ if (x == 0 && adj->index[0] == -1)
continue;
- if(x == gridsize - 1 && adj->index[2] == -1)
+ if (x == gridsize - 1 && adj->index[2] == -1)
continue;
- if(y == 0 && adj->index[3] == -1)
+ if (y == 0 && adj->index[3] == -1)
continue;
- if(y == gridsize - 1 && adj->index[1] == -1)
+ if (y == gridsize - 1 && adj->index[1] == -1)
continue;
index = x + y*gridsize;
co= data[index].co;
fno= data[index].no;
- if(sculpt_brush_test(&test, co)) {
+ if (sculpt_brush_test(&test, co)) {
const float fade = bstrength*tex_strength(ss, brush, co, test.dist,
ss->cache->view_normal, NULL, fno);
float *avg, val[3];
@@ -1056,10 +1061,10 @@ static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *no
n = 1/16.0f;
- if(x == 0 || x == gridsize - 1)
+ if (x == 0 || x == gridsize - 1)
n *= 2;
- if(y == 0 || y == gridsize - 1)
+ if (y == 0 || y == gridsize - 1)
n *= 2;
mul_v3_fl(avg, n);
@@ -1095,17 +1100,17 @@ static void smooth(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float
count = (int)(bstrength*max_iterations);
last = max_iterations*(bstrength - count*fract);
- for(iteration = 0; iteration <= count; ++iteration) {
+ for (iteration = 0; iteration <= count; ++iteration) {
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n=0; n<totnode; n++) {
- if(ss->multires) {
+ for (n=0; n<totnode; n++) {
+ if (ss->multires) {
do_multires_smooth_brush(sd, ss, nodes[n], iteration != count ? 1.0f : last);
}
- else if(ss->pmap)
+ else if (ss->pmap)
do_mesh_smooth_brush(sd, ss, nodes[n], iteration != count ? 1.0f : last);
}
- if(ss->multires)
+ if (ss->multires)
multires_stitch_grids(ob);
}
}
@@ -1133,7 +1138,7 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
/* threaded loop over nodes */
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n=0; n<totnode; n++) {
+ for (n=0; n<totnode; n++) {
PBVHVertexIter vd;
SculptBrushTest test;
float (*proxy)[3];
@@ -1150,7 +1155,7 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
mul_v3_v3fl(proxy[vd.i], offset, fade);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -1177,7 +1182,7 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
/* we divide out the squared alpha and multiply by the squared crease to give us the pinch strength */
- if(brush_alpha(scene, brush) > 0.0f)
+ if (brush_alpha(scene, brush) > 0.0f)
crease_correction = brush->crease_pinch_factor*brush->crease_pinch_factor/(brush_alpha(scene, brush)*brush_alpha(scene, brush));
else
crease_correction = brush->crease_pinch_factor*brush->crease_pinch_factor;
@@ -1185,11 +1190,11 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
/* we always want crease to pinch or blob to relax even when draw is negative */
flippedbstrength = (bstrength < 0) ? -crease_correction*bstrength : crease_correction*bstrength;
- if(brush->sculpt_tool == SCULPT_TOOL_BLOB) flippedbstrength *= -1.0f;
+ if (brush->sculpt_tool == SCULPT_TOOL_BLOB) flippedbstrength *= -1.0f;
/* threaded loop over nodes */
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n=0; n<totnode; n++) {
+ for (n=0; n<totnode; n++) {
PBVHVertexIter vd;
SculptBrushTest test;
float (*proxy)[3];
@@ -1199,7 +1204,7 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test(&test, vd.co)) {
+ if (sculpt_brush_test(&test, vd.co)) {
/* offset vertex */
const float fade = tex_strength(ss, brush, vd.co, test.dist,
area_normal, vd.no, vd.fno);
@@ -1208,7 +1213,6 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
/* first we pinch */
sub_v3_v3v3(val1, test.location, vd.co);
- //mul_v3_v3(val1, ss->cache->scale);
mul_v3_fl(val1, fade*flippedbstrength);
/* then we draw */
@@ -1216,7 +1220,7 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
add_v3_v3v3(proxy[vd.i], val1, val2);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -1232,7 +1236,7 @@ static void do_pinch_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
int n;
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n=0; n<totnode; n++) {
+ for (n=0; n<totnode; n++) {
PBVHVertexIter vd;
SculptBrushTest test;
float (*proxy)[3];
@@ -1242,7 +1246,7 @@ static void do_pinch_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test(&test, vd.co)) {
+ if (sculpt_brush_test(&test, vd.co)) {
float fade = bstrength*tex_strength(ss, brush, vd.co, test.dist,
ss->cache->view_normal, vd.no, vd.fno);
float val[3];
@@ -1250,7 +1254,7 @@ static void do_pinch_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
sub_v3_v3v3(val, test.location, vd.co);
mul_v3_v3fl(proxy[vd.i], val, fade);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -1286,7 +1290,7 @@ static void do_grab_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
}
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n=0; n<totnode; n++) {
+ for (n=0; n<totnode; n++) {
PBVHVertexIter vd;
SculptUndoNode* unode;
SculptBrushTest test;
@@ -1294,7 +1298,7 @@ static void do_grab_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
short (*origno)[3];
float (*proxy)[3];
- unode= sculpt_undo_push_node(ob, nodes[n]);
+ unode= sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS);
origco= unode->co;
origno= unode->no;
@@ -1303,13 +1307,13 @@ static void do_grab_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test(&test, origco[vd.i])) {
+ if (sculpt_brush_test(&test, origco[vd.i])) {
const float fade = bstrength*tex_strength(ss, brush, origco[vd.i], test.dist,
an, origno[vd.i], NULL);
mul_v3_v3fl(proxy[vd.i], grab_delta, fade);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -1335,7 +1339,7 @@ static void do_nudge_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
cross_v3_v3v3(cono, tmp, an);
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n = 0; n < totnode; n++) {
+ for (n = 0; n < totnode; n++) {
PBVHVertexIter vd;
SculptBrushTest test;
float (*proxy)[3];
@@ -1345,13 +1349,13 @@ static void do_nudge_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test(&test, vd.co)) {
+ if (sculpt_brush_test(&test, vd.co)) {
const float fade = bstrength*tex_strength(ss, brush, vd.co, test.dist,
an, vd.no, vd.fno);
mul_v3_v3fl(proxy[vd.i], cono, fade);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -1385,7 +1389,7 @@ static void do_snake_hook_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
}
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n = 0; n < totnode; n++) {
+ for (n = 0; n < totnode; n++) {
PBVHVertexIter vd;
SculptBrushTest test;
float (*proxy)[3];
@@ -1395,13 +1399,13 @@ static void do_snake_hook_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test(&test, vd.co)) {
+ if (sculpt_brush_test(&test, vd.co)) {
const float fade = bstrength*tex_strength(ss, brush, vd.co, test.dist,
an, vd.no, vd.fno);
mul_v3_v3fl(proxy[vd.i], grab_delta, fade);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -1427,7 +1431,7 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
cross_v3_v3v3(cono, tmp, an);
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n = 0; n < totnode; n++) {
+ for (n = 0; n < totnode; n++) {
PBVHVertexIter vd;
SculptUndoNode* unode;
SculptBrushTest test;
@@ -1435,7 +1439,7 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
short (*origno)[3];
float (*proxy)[3];
- unode= sculpt_undo_push_node(ob, nodes[n]);
+ unode= sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS);
origco= unode->co;
origno= unode->no;
@@ -1444,13 +1448,13 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test(&test, origco[vd.i])) {
+ if (sculpt_brush_test(&test, origco[vd.i])) {
const float fade = bstrength*tex_strength(ss, brush, origco[vd.i], test.dist,
an, origno[vd.i], NULL);
mul_v3_v3fl(proxy[vd.i], cono, fade);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -1481,7 +1485,7 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
mul_serie_m4(m, lmat, rot, ilmat, NULL, NULL, NULL, NULL, NULL);
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n=0; n<totnode; n++) {
+ for (n=0; n<totnode; n++) {
PBVHVertexIter vd;
SculptUndoNode* unode;
SculptBrushTest test;
@@ -1489,7 +1493,7 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
short (*origno)[3];
float (*proxy)[3];
- unode= sculpt_undo_push_node(ob, nodes[n]);
+ unode= sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS);
origco= unode->co;
origno= unode->no;
@@ -1498,7 +1502,7 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test(&test, origco[vd.i])) {
+ if (sculpt_brush_test(&test, origco[vd.i])) {
const float fade = bstrength*tex_strength(ss, brush, origco[vd.i], test.dist,
an, origno[vd.i], NULL);
@@ -1506,7 +1510,7 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
sub_v3_v3(proxy[vd.i], origco[vd.i]);
mul_v3_fl(proxy[vd.i], fade);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -1523,7 +1527,7 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
float lim= brush->height;
int n;
- if(bstrength < 0)
+ if (bstrength < 0)
lim = -lim;
calc_sculpt_normal(sd, ob, area_normal, nodes, totnode);
@@ -1531,16 +1535,15 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
mul_v3_v3v3(offset, ss->cache->scale, area_normal);
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n=0; n<totnode; n++) {
+ for (n=0; n<totnode; n++) {
PBVHVertexIter vd;
SculptBrushTest test;
SculptUndoNode *unode;
float (*origco)[3], *layer_disp;
- //float (*proxy)[3]; // XXX layer brush needs conversion to proxy but its more complicated
-
- //proxy= BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co;
+ /* XXX: layer brush needs conversion to proxy but its more complicated */
+ /* proxy= BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; */
- unode= sculpt_undo_push_node(ob, nodes[n]);
+ unode= sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS);
origco=unode->co;
if (!unode->layer_disp) {
#pragma omp critical
@@ -1552,7 +1555,7 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test(&test, origco[vd.i])) {
+ if (sculpt_brush_test(&test, origco[vd.i])) {
const float fade = bstrength*tex_strength(ss, brush, vd.co, test.dist,
area_normal, vd.no, vd.fno);
float *disp= &layer_disp[vd.i];
@@ -1561,12 +1564,12 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
*disp+= fade;
/* Don't let the displacement go past the limit */
- if((lim < 0 && *disp < lim) || (lim >= 0 && *disp > lim))
+ if ((lim < 0 && *disp < lim) || (lim >= 0 && *disp > lim))
*disp = lim;
mul_v3_v3fl(val, offset, *disp);
- if(ss->layer_co && (brush->flag & BRUSH_PERSISTENT)) {
+ if (ss->layer_co && (brush->flag & BRUSH_PERSISTENT)) {
int index= vd.vert_indices[vd.i];
/* persistent base */
@@ -1578,7 +1581,7 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
sculpt_clip(sd, ss, vd.co, val);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -1594,7 +1597,7 @@ static void do_inflate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno
int n;
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n=0; n<totnode; n++) {
+ for (n=0; n<totnode; n++) {
PBVHVertexIter vd;
SculptBrushTest test;
float (*proxy)[3];
@@ -1604,18 +1607,18 @@ static void do_inflate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test(&test, vd.co)) {
+ if (sculpt_brush_test(&test, vd.co)) {
const float fade = bstrength*tex_strength(ss, brush, vd.co, test.dist,
ss->cache->view_normal, vd.no, vd.fno);
float val[3];
- if(vd.fno) copy_v3_v3(val, vd.fno);
+ if (vd.fno) copy_v3_v3(val, vd.fno);
else normal_short_to_float_v3(val, vd.no);
mul_v3_fl(val, fade * ss->cache->radius);
mul_v3_v3v3(proxy[vd.i], val, ss->cache->scale);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -1635,19 +1638,19 @@ static void calc_flatten_center(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
zero_v3(fc);
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n=0; n<totnode; n++) {
+ for (n=0; n<totnode; n++) {
PBVHVertexIter vd;
SculptBrushTest test;
SculptUndoNode *unode;
float private_fc[3] = {0.0f, 0.0f, 0.0f};
int private_count = 0;
- unode = sculpt_undo_push_node(ob, nodes[n]);
+ unode = sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS);
sculpt_brush_test_init(ss, &test);
- if(ss->cache->original) {
+ if (ss->cache->original) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test_fast(&test, unode->co[vd.i])) {
+ if (sculpt_brush_test_fast(&test, unode->co[vd.i])) {
add_v3_v3(private_fc, unode->co[vd.i]);
private_count++;
}
@@ -1656,7 +1659,7 @@ static void calc_flatten_center(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
}
else {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test_fast(&test, vd.co)) {
+ if (sculpt_brush_test_fast(&test, vd.co)) {
add_v3_v3(private_fc, vd.co);
private_count++;
}
@@ -1683,22 +1686,22 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob,
SculptSession *ss = ob->sculpt;
int n;
- // an
+ /* for area normal */
float out_flip[3] = {0.0f, 0.0f, 0.0f};
- // fc
+ /* for flatten center */
float count = 0;
(void)sd; /* unused w/o openmp */
- // an
+ /* for area normal */
zero_v3(an);
- // fc
+ /* for flatten center */
zero_v3(fc);
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n=0; n<totnode; n++) {
+ for (n=0; n<totnode; n++) {
PBVHVertexIter vd;
SculptBrushTest test;
SculptUndoNode *unode;
@@ -1707,19 +1710,19 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob,
float private_fc[3] = {0.0f, 0.0f, 0.0f};
int private_count = 0;
- unode = sculpt_undo_push_node(ob, nodes[n]);
+ unode = sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS);
sculpt_brush_test_init(ss, &test);
- if(ss->cache->original) {
+ if (ss->cache->original) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test_fast(&test, unode->co[vd.i])) {
- // an
+ if (sculpt_brush_test_fast(&test, unode->co[vd.i])) {
+ /* for area normal */
float fno[3];
normal_short_to_float_v3(fno, unode->no[vd.i]);
add_norm_if(ss->cache->view_normal, private_an, private_out_flip, fno);
- // fc
+ /* for flatten center */
add_v3_v3(private_fc, unode->co[vd.i]);
private_count++;
}
@@ -1728,9 +1731,9 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob,
}
else {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test_fast(&test, vd.co)) {
- // an
- if(vd.no) {
+ if (sculpt_brush_test_fast(&test, vd.co)) {
+ /* for area normal */
+ if (vd.no) {
float fno[3];
normal_short_to_float_v3(fno, vd.no);
@@ -1740,7 +1743,7 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob,
add_norm_if(ss->cache->view_normal, private_an, private_out_flip, vd.fno);
}
- // fc
+ /* for flatten center */
add_v3_v3(private_fc, vd.co);
private_count++;
}
@@ -1750,23 +1753,23 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob,
#pragma omp critical
{
- // an
+ /* for area normal */
add_v3_v3(an, private_an);
add_v3_v3(out_flip, private_out_flip);
- // fc
+ /* for flatten center */
add_v3_v3(fc, private_fc);
count += private_count;
}
}
- // an
+ /* for area normal */
if (is_zero_v3(an))
copy_v3_v3(an, out_flip);
normalize_v3(an);
- // fc
+ /* for flatten center */
if (count != 0) {
mul_v3_fl(fc, 1.0f / count);
}
@@ -1814,34 +1817,34 @@ static void calc_sculpt_plane(Sculpt *sd, Object *ob, PBVHNode **nodes, int totn
break;
}
- // fc
+ /* for flatten center */
/* flatten center has not been calculated yet if we are not using the area normal */
if (brush->sculpt_plane != SCULPT_DISP_DIR_AREA)
calc_flatten_center(sd, ob, nodes, totnode, fc);
- // an
+ /* for area normal */
copy_v3_v3(ss->cache->last_area_normal, an);
- // fc
+ /* for flatten center */
copy_v3_v3(ss->cache->last_center, fc);
}
else {
- // an
+ /* for area normal */
copy_v3_v3(an, ss->cache->last_area_normal);
- // fc
+ /* for flatten center */
copy_v3_v3(fc, ss->cache->last_center);
- // an
+ /* for area normal */
flip_coord(an, an, ss->cache->mirror_symmetry_pass);
- // fc
+ /* for flatten center */
flip_coord(fc, fc, ss->cache->mirror_symmetry_pass);
- // an
+ /* for area normal */
mul_m4_v3(ss->cache->symm_rot_mat, an);
- // fc
+ /* for flatten center */
mul_m4_v3(ss->cache->symm_rot_mat, fc);
}
}
@@ -1921,7 +1924,7 @@ static void do_flatten_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno
add_v3_v3(fc, temp);
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n = 0; n < totnode; n++) {
+ for (n = 0; n < totnode; n++) {
PBVHVertexIter vd;
SculptBrushTest test;
float (*proxy)[3];
@@ -1945,7 +1948,7 @@ static void do_flatten_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno
mul_v3_v3fl(proxy[vd.i], val, fade);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -1965,13 +1968,12 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
float displace;
- float an[3]; // area normal
- float fc[3]; // flatten center
+ float an[3];
+ float fc[3];
int n;
float temp[3];
- //float p[3];
int flip;
@@ -1990,7 +1992,7 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
mul_v3_fl(temp, displace);
add_v3_v3(fc, temp);
- //add_v3_v3v3(p, ss->cache->location, an);
+ /* add_v3_v3v3(p, ss->cache->location, an); */
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
for (n = 0; n < totnode; n++) {
@@ -2005,7 +2007,6 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
if (sculpt_brush_test_sq(&test, vd.co)) {
if (plane_point_side_flip(vd.co, an, fc, flip)) {
- //if (sculpt_brush_test_cyl(&test, vd.co, ss->cache->location, p)) {
float intr[3];
float val[3];
@@ -2020,7 +2021,7 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
mul_v3_v3fl(proxy[vd.i], val, fade);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -2030,7 +2031,7 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
}
}
-static void do_clay_tubes_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
+static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
{
SculptSession *ss = ob->sculpt;
Brush *brush = paint_brush(&sd->paint);
@@ -2041,9 +2042,9 @@ static void do_clay_tubes_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
float displace;
- float sn[3]; // sculpt normal
- float an[3]; // area normal
- float fc[3]; // flatten center
+ float sn[3];
+ float an[3];
+ float fc[3];
int n;
@@ -2061,8 +2062,9 @@ static void do_clay_tubes_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
else
copy_v3_v3(an, sn);
+ /* delay the first daub because grab delta is not setup */
if (ss->cache->first_time)
- return; // delay the first daub because grab delta is not setup
+ return;
flip = bstrength < 0;
@@ -2077,11 +2079,18 @@ static void do_clay_tubes_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
mul_v3_fl(temp, displace);
add_v3_v3(fc, temp);
- cross_v3_v3v3(mat[0], an, ss->cache->grab_delta_symmetry); mat[0][3] = 0;
- cross_v3_v3v3(mat[1], an, mat[0]); mat[1][3] = 0;
- copy_v3_v3(mat[2], an); mat[2][3] = 0;
- copy_v3_v3(mat[3], ss->cache->location); mat[3][3] = 1;
+ /* init mat */
+ cross_v3_v3v3(mat[0], an, ss->cache->grab_delta_symmetry);
+ mat[0][3] = 0;
+ cross_v3_v3v3(mat[1], an, mat[0]);
+ mat[1][3] = 0;
+ copy_v3_v3(mat[2], an);
+ mat[2][3] = 0;
+ copy_v3_v3(mat[3], ss->cache->location);
+ mat[3][3] = 1;
normalize_m4(mat);
+
+ /* scale mat */
scale_m4_fl(scale, ss->cache->radius);
mult_m4_m4m4(tmat, mat, scale);
invert_m4_m4(mat, tmat);
@@ -2113,7 +2122,7 @@ static void do_clay_tubes_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
mul_v3_v3fl(proxy[vd.i], val, fade);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -2176,7 +2185,7 @@ static void do_fill_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
mul_v3_v3fl(proxy[vd.i], val, fade);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -2239,7 +2248,7 @@ static void do_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
mul_v3_v3fl(proxy[vd.i], val, fade);
- if(vd.mvert)
+ if (vd.mvert)
vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -2259,7 +2268,7 @@ void sculpt_vertcos_to_key(Object *ob, KeyBlock *kb, float (*vertCos)[3])
/* for relative keys editing of base should update other keys */
if (me->key->type == KEY_RELATIVE)
for (currkey = me->key->block.first; currkey; currkey= currkey->next)
- if(ob->shapenr-1 == currkey->relative) {
+ if (ob->shapenr-1 == currkey->relative) {
is_basis= 1;
break;
}
@@ -2318,12 +2327,12 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush)
if (totnode) {
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
for (n= 0; n < totnode; n++) {
- sculpt_undo_push_node(ob, nodes[n]);
+ sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS);
BLI_pbvh_node_mark_update(nodes[n]);
}
/* Apply one type of brush action */
- switch(brush->sculpt_tool){
+ switch(brush->sculpt_tool) {
case SCULPT_TOOL_DRAW:
do_draw_brush(sd, ob, nodes, totnode);
break;
@@ -2366,8 +2375,8 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush)
case SCULPT_TOOL_CLAY:
do_clay_brush(sd, ob, nodes, totnode);
break;
- case SCULPT_TOOL_CLAY_TUBES:
- do_clay_tubes_brush(sd, ob, nodes, totnode);
+ case SCULPT_TOOL_CLAY_STRIPS:
+ do_clay_strips_brush(sd, ob, nodes, totnode);
break;
case SCULPT_TOOL_FILL:
do_fill_brush(sd, ob, nodes, totnode);
@@ -2405,7 +2414,7 @@ static void sculpt_flush_pbvhvert_deform(Object *ob, PBVHVertexIter *vd)
copy_v3_v3(ss->deform_cos[index], vd->co);
copy_v3_v3(ss->orig_cos[index], newco);
- if(!ss->kb)
+ if (!ss->kb)
copy_v3_v3(me->mvert[index].co, newco);
}
@@ -2418,7 +2427,7 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob)
BLI_pbvh_gather_proxies(ss->pbvh, &nodes, &totnode);
- if(!ELEM(brush->sculpt_tool, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_LAYER)) {
+ if (!ELEM(brush->sculpt_tool, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_LAYER)) {
/* these brushes start from original coordinates */
const int use_orco = (ELEM3(brush->sculpt_tool, SCULPT_TOOL_GRAB,
SCULPT_TOOL_ROTATE, SCULPT_TOOL_THUMB));
@@ -2430,8 +2439,8 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob)
int proxy_count;
float (*orco)[3];
- if(use_orco)
- orco= sculpt_undo_push_node(ob, nodes[n])->co;
+ if (use_orco)
+ orco= sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS)->co;
BLI_pbvh_node_get_proxies(nodes[n], &proxies, &proxy_count);
@@ -2439,7 +2448,7 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob)
float val[3];
int p;
- if(use_orco)
+ if (use_orco)
copy_v3_v3(val, orco[vd.i]);
else
copy_v3_v3(val, vd.co);
@@ -2449,7 +2458,7 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob)
sculpt_clip(sd, ss, vd.co, val);
- if(ss->modifiers_active)
+ if (ss->modifiers_active)
sculpt_flush_pbvhvert_deform(ob, &vd);
}
BLI_pbvh_vertex_iter_end;
@@ -2470,13 +2479,13 @@ static void sculpt_update_keyblock(Object *ob)
/* Keyblock update happens after hadning deformation caused by modifiers,
* so ss->orig_cos would be updated with new stroke */
- if(ss->orig_cos) vertCos = ss->orig_cos;
+ if (ss->orig_cos) vertCos = ss->orig_cos;
else vertCos = BLI_pbvh_get_vertCos(ss->pbvh);
if (vertCos) {
sculpt_vertcos_to_key(ob, ss->kb, vertCos);
- if(vertCos != ss->orig_cos)
+ if (vertCos != ss->orig_cos)
MEM_freeN(vertCos);
}
}
@@ -2487,7 +2496,7 @@ static void sculpt_flush_stroke_deform(Sculpt *sd, Object *ob)
SculptSession *ss = ob->sculpt;
Brush *brush= paint_brush(&sd->paint);
- if(ELEM(brush->sculpt_tool, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_LAYER)) {
+ if (ELEM(brush->sculpt_tool, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_LAYER)) {
/* this brushes aren't using proxies, so sculpt_combine_proxies() wouldn't
* propagate needed deformation to original base */
@@ -2496,7 +2505,7 @@ static void sculpt_flush_stroke_deform(Sculpt *sd, Object *ob)
PBVHNode** nodes;
float (*vertCos)[3]= NULL;
- if(ss->kb)
+ if (ss->kb)
vertCos= MEM_callocN(sizeof(*vertCos)*me->totvert, "flushStrokeDeofrm keyVerts");
BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode);
@@ -2508,7 +2517,7 @@ static void sculpt_flush_stroke_deform(Sculpt *sd, Object *ob)
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
sculpt_flush_pbvhvert_deform(ob, &vd);
- if(vertCos) {
+ if (vertCos) {
int index= vd.vert_indices[vd.i];
copy_v3_v3(vertCos[index], ss->orig_cos[index]);
}
@@ -2516,7 +2525,7 @@ static void sculpt_flush_stroke_deform(Sculpt *sd, Object *ob)
BLI_pbvh_vertex_iter_end;
}
- if(vertCos) {
+ if (vertCos) {
sculpt_vertcos_to_key(ob, ss->kb, vertCos);
MEM_freeN(vertCos);
}
@@ -2527,27 +2536,12 @@ static void sculpt_flush_stroke_deform(Sculpt *sd, Object *ob)
* Note, then if sculpting happens on locked key, normals should be re-calculated
* after applying coords from keyblock on base mesh */
mesh_calc_normals(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL);
- } else if (ss->kb)
+ }
+ else if (ss->kb) {
sculpt_update_keyblock(ob);
+ }
}
-//static int max_overlap_count(Sculpt *sd)
-//{
-// int count[3];
-// int i, j;
-//
-// for (i= 0; i < 3; i++) {
-// count[i] = sd->radial_symm[i];
-//
-// for (j= 0; j < 3; j++) {
-// if (i != j && sd->flags & (SCULPT_SYMM_X<<i))
-// count[i] *= 2;
-// }
-// }
-//
-// return MAX3(count[0], count[1], count[2]);
-//}
-
/* Flip all the editdata across the axis/axes specified by symm. Used to
* calculate multiple modifications to the mesh when symmetry is enabled. */
static void calc_brushdata_symm(Sculpt *sd, StrokeCache *cache, const char symm,
@@ -2560,22 +2554,22 @@ static void calc_brushdata_symm(Sculpt *sd, StrokeCache *cache, const char symm,
flip_coord(cache->grab_delta_symmetry, cache->grab_delta, symm);
flip_coord(cache->view_normal, cache->true_view_normal, symm);
- // XXX This reduces the length of the grab delta if it approaches the line of symmetry
- // XXX However, a different approach appears to be needed
- //if (sd->flags & SCULPT_SYMMETRY_FEATHER) {
- // float frac = 1.0f/max_overlap_count(sd);
- // float reduce = (feather-frac)/(1-frac);
+ /* XXX This reduces the length of the grab delta if it approaches the line of symmetry
+ XXX However, a different approach appears to be needed
+ if (sd->flags & SCULPT_SYMMETRY_FEATHER) {
+ float frac = 1.0f/max_overlap_count(sd);
+ float reduce = (feather-frac)/(1-frac);
- // printf("feather: %f frac: %f reduce: %f\n", feather, frac, reduce);
+ printf("feather: %f frac: %f reduce: %f\n", feather, frac, reduce);
- // if (frac < 1)
- // mul_v3_fl(cache->grab_delta_symmetry, reduce);
- //}
+ if (frac < 1)
+ mul_v3_fl(cache->grab_delta_symmetry, reduce);
+ } */
unit_m4(cache->symm_rot_mat);
unit_m4(cache->symm_rot_mat_inv);
- if(axis) { /* expects XYZ */
+ if (axis) { /* expects XYZ */
rotate_m4(cache->symm_rot_mat, axis, angle);
rotate_m4(cache->symm_rot_mat_inv, axis, -angle);
}
@@ -2591,7 +2585,7 @@ static void do_radial_symmetry(Sculpt *sd, Object *ob, Brush *brush,
SculptSession *ss = ob->sculpt;
int i;
- for(i = 1; i < sd->radial_symm[axis-'X']; ++i) {
+ for (i = 1; i < sd->radial_symm[axis-'X']; ++i) {
const float angle = 2*M_PI*i/sd->radial_symm[axis-'X'];
ss->cache->radial_symmetry_pass= i;
calc_brushdata_symm(sd, ss->cache, symm, axis, angle, feather);
@@ -2608,7 +2602,7 @@ static void sculpt_fix_noise_tear(Sculpt *sd, Object *ob)
Brush *brush = paint_brush(&sd->paint);
MTex *mtex = &brush->mtex;
- if(ss->multires && mtex->tex && mtex->tex->type == TEX_NOISE)
+ if (ss->multires && mtex->tex && mtex->tex->type == TEX_NOISE)
multires_stitch_grids(ob);
}
@@ -2627,8 +2621,8 @@ static void do_symmetrical_brush_actions(Sculpt *sd, Object *ob)
cache->symmetry= symm;
/* symm is a bit combination of XYZ - 1 is mirror X; 2 is Y; 3 is XY; 4 is Z; 5 is XZ; 6 is YZ; 7 is XYZ */
- for(i = 0; i <= symm; ++i) {
- if(i == 0 || (symm & i && (symm != 5 || i != 3) && (symm != 6 || (i != 3 && i != 5)))) {
+ for (i = 0; i <= symm; ++i) {
+ if (i == 0 || (symm & i && (symm != 5 || i != 3) && (symm != 6 || (i != 3 && i != 5)))) {
cache->mirror_symmetry_pass= i;
cache->radial_symmetry_pass= 0;
@@ -2657,14 +2651,14 @@ static void sculpt_update_tex(const Scene *scene, Sculpt *sd, SculptSession *ss)
Brush *brush = paint_brush(&sd->paint);
const int radius= brush_size(scene, brush);
- if(ss->texcache) {
+ if (ss->texcache) {
MEM_freeN(ss->texcache);
ss->texcache= NULL;
}
/* Need to allocate a bigger buffer for bigger brush size */
ss->texcache_side = 2*radius;
- if(!ss->texcache || ss->texcache_side > ss->texcache_actual) {
+ if (!ss->texcache || ss->texcache_side > ss->texcache_actual) {
ss->texcache = brush_gen_texture_cache(brush, radius);
ss->texcache_actual = ss->texcache_side;
}
@@ -2678,10 +2672,10 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_
ss->modifiers_active= sculpt_modifiers_active(scene, sd, ob);
- if(!mmd) ss->kb= ob_get_keyblock(ob);
+ if (!mmd) ss->kb= ob_get_keyblock(ob);
else ss->kb= NULL;
- if(mmd) {
+ if (mmd) {
ss->multires = mmd;
ss->totvert = dm->getNumVerts(dm);
ss->totpoly = dm->getNumPolys(dm);
@@ -2707,22 +2701,23 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_
ss->pbvh = dm->getPBVH(ob, dm);
ss->pmap = (need_pmap && dm->getPolyMap)? dm->getPolyMap(ob, dm): NULL;
- if(ss->modifiers_active) {
- if(!ss->orig_cos) {
+ if (ss->modifiers_active) {
+ if (!ss->orig_cos) {
int a;
free_sculptsession_deformMats(ss);
- if(ss->kb) ss->orig_cos = key_to_vertcos(ob, ss->kb);
+ if (ss->kb) ss->orig_cos = key_to_vertcos(ob, ss->kb);
else ss->orig_cos = mesh_getVertexCos(ob->data, NULL);
crazyspace_build_sculpt(scene, ob, &ss->deform_imats, &ss->deform_cos);
BLI_pbvh_apply_vertCos(ss->pbvh, ss->deform_cos);
- for(a = 0; a < ((Mesh*)ob->data)->totvert; ++a)
+ for (a = 0; a < ((Mesh*)ob->data)->totvert; ++a)
invert_m3(ss->deform_imats[a]);
}
- } else free_sculptsession_deformMats(ss);
+ }
+ else free_sculptsession_deformMats(ss);
/* if pbvh is deformed, key block is already applied to it */
if (ss->kb && !BLI_pbvh_isDeformed(ss->pbvh)) {
@@ -2736,7 +2731,7 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_
}
}
-static int sculpt_mode_poll(bContext *C)
+int sculpt_mode_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
return ob && ob->mode & OB_MODE_SCULPT;
@@ -2776,8 +2771,8 @@ static const char *sculpt_tool_name(Sculpt *sd)
return "Flatten Brush"; break;
case SCULPT_TOOL_CLAY:
return "Clay Brush"; break;
- case SCULPT_TOOL_CLAY_TUBES:
- return "Clay Tubes Brush"; break;
+ case SCULPT_TOOL_CLAY_STRIPS:
+ return "Clay Strips Brush"; break;
case SCULPT_TOOL_FILL:
return "Fill Brush"; break;
case SCULPT_TOOL_SCRAPE:
@@ -2793,7 +2788,7 @@ static const char *sculpt_tool_name(Sculpt *sd)
static void sculpt_cache_free(StrokeCache *cache)
{
- if(cache->face_norms)
+ if (cache->face_norms)
MEM_freeN(cache->face_norms);
MEM_freeN(cache);
}
@@ -2804,20 +2799,20 @@ static void sculpt_init_mirror_clipping(Object *ob, SculptSession *ss)
ModifierData *md;
int i;
- for(md= ob->modifiers.first; md; md= md->next) {
- if(md->type==eModifierType_Mirror &&
+ for (md= ob->modifiers.first; md; md= md->next) {
+ if (md->type==eModifierType_Mirror &&
(md->mode & eModifierMode_Realtime)) {
MirrorModifierData *mmd = (MirrorModifierData*)md;
- if(mmd->flag & MOD_MIR_CLIPPING) {
+ if (mmd->flag & MOD_MIR_CLIPPING) {
/* check each axis for mirroring */
- for(i = 0; i < 3; ++i) {
- if(mmd->flag & (MOD_MIR_AXIS_X << i)) {
+ for (i = 0; i < 3; ++i) {
+ if (mmd->flag & (MOD_MIR_AXIS_X << i)) {
/* enable sculpt clipping */
ss->cache->flag |= CLIP_X << i;
/* update the clip tolerance */
- if(mmd->tolerance >
+ if (mmd->tolerance >
ss->cache->clip_tolerance[i])
ss->cache->clip_tolerance[i] =
mmd->tolerance;
@@ -2867,7 +2862,7 @@ static void sculpt_update_cache_invariants(bContext* C, Sculpt *sd, SculptSessio
/* not very nice, but with current events system implementation
* we can't handle brush appearance inversion hotkey separately (sergey) */
- if(cache->invert) brush->flag |= BRUSH_INVERTED;
+ if (cache->invert) brush->flag |= BRUSH_INVERTED;
else brush->flag &= ~BRUSH_INVERTED;
/* Alt-Smooth */
@@ -2878,7 +2873,7 @@ static void sculpt_update_cache_invariants(bContext* C, Sculpt *sd, SculptSessio
BLI_strncpy(cache->saved_active_brush_name, brush->id.name+2, sizeof(cache->saved_active_brush_name));
br= (Brush *)find_id("BR", "Smooth");
- if(br) {
+ if (br) {
paint_brush_set(p, br);
brush = br;
}
@@ -2898,16 +2893,16 @@ static void sculpt_update_cache_invariants(bContext* C, Sculpt *sd, SculptSessio
ED_view3d_global_to_vector(cache->vc->rv3d, cache->vc->rv3d->twmat[3], cache->true_view_normal);
/* Initialize layer brush displacements and persistent coords */
- if(brush->sculpt_tool == SCULPT_TOOL_LAYER) {
+ if (brush->sculpt_tool == SCULPT_TOOL_LAYER) {
/* not supported yet for multires */
- if(!ss->multires && !ss->layer_co && (brush->flag & BRUSH_PERSISTENT)) {
- if(!ss->layer_co)
+ if (!ss->multires && !ss->layer_co && (brush->flag & BRUSH_PERSISTENT)) {
+ if (!ss->layer_co)
ss->layer_co= MEM_mallocN(sizeof(float) * 3 * ss->totvert,
"sculpt mesh vertices copy");
- if(ss->deform_cos) memcpy(ss->layer_co, ss->deform_cos, ss->totvert);
+ if (ss->deform_cos) memcpy(ss->layer_co, ss->deform_cos, ss->totvert);
else {
- for(i = 0; i < ss->totvert; ++i) {
+ for (i = 0; i < ss->totvert; ++i) {
copy_v3_v3(ss->layer_co[i], ss->mvert[i].co);
}
}
@@ -2915,27 +2910,25 @@ static void sculpt_update_cache_invariants(bContext* C, Sculpt *sd, SculptSessio
}
/* Make copies of the mesh vertex locations and normals for some tools */
- if(brush->flag & BRUSH_ANCHORED) {
- if(ss->face_normals) {
+ if (brush->flag & BRUSH_ANCHORED) {
+ if (ss->face_normals) {
float *fn = ss->face_normals;
cache->face_norms= MEM_mallocN(sizeof(float) * 3 * ss->totpoly, "Sculpt face norms");
- for(i = 0; i < ss->totpoly; ++i, fn += 3)
+ for (i = 0; i < ss->totpoly; ++i, fn += 3)
copy_v3_v3(cache->face_norms[i], fn);
}
cache->original = 1;
}
- if(ELEM8(brush->sculpt_tool,
+ if (ELEM8(brush->sculpt_tool,
SCULPT_TOOL_DRAW, SCULPT_TOOL_CREASE, SCULPT_TOOL_BLOB,
SCULPT_TOOL_LAYER, SCULPT_TOOL_INFLATE, SCULPT_TOOL_CLAY,
- SCULPT_TOOL_CLAY_TUBES, SCULPT_TOOL_ROTATE))
- if(!(brush->flag & BRUSH_ACCUMULATE))
+ SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_ROTATE))
+ if (!(brush->flag & BRUSH_ACCUMULATE))
cache->original = 1;
cache->special_rotation = (brush->flag & BRUSH_RAKE) ? sd->last_angle : 0;
- //cache->last_rake[0] = sd->last_x;
- //cache->last_rake[1] = sd->last_y;
cache->first_time= 1;
@@ -2946,29 +2939,33 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush)
{
SculptSession *ss = ob->sculpt;
StrokeCache *cache = ss->cache;
+ float mouse[2] = {
+ cache->mouse[0] - cache->vc->ar->winrct.xmin,
+ cache->mouse[1] - cache->vc->ar->winrct.ymin
+ };
int tool = brush->sculpt_tool;
- if(ELEM5(tool,
+ if (ELEM5(tool,
SCULPT_TOOL_GRAB, SCULPT_TOOL_NUDGE,
- SCULPT_TOOL_CLAY_TUBES, SCULPT_TOOL_SNAKE_HOOK,
+ SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_SNAKE_HOOK,
SCULPT_TOOL_THUMB)) {
float grab_location[3], imat[4][4], delta[3], loc[3];
- if(cache->first_time) {
+ if (cache->first_time) {
copy_v3_v3(cache->orig_grab_location,
cache->true_location);
}
- else if(tool == SCULPT_TOOL_SNAKE_HOOK)
+ else if (tool == SCULPT_TOOL_SNAKE_HOOK)
add_v3_v3(cache->true_location, cache->grab_delta);
/* compute 3d coordinate at same z from original location + mouse */
mul_v3_m4v3(loc, ob->obmat, cache->orig_grab_location);
initgrabz(cache->vc->rv3d, loc[0], loc[1], loc[2]);
- ED_view3d_win_to_delta(cache->vc->ar, cache->mouse, grab_location);
+ ED_view3d_win_to_3d(cache->vc->ar, loc, mouse, grab_location);
/* compute delta to move verts by */
- if(!cache->first_time) {
+ if (!cache->first_time) {
switch(tool) {
case SCULPT_TOOL_GRAB:
case SCULPT_TOOL_THUMB:
@@ -2977,14 +2974,19 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush)
mul_mat3_m4_v3(imat, delta);
add_v3_v3(cache->grab_delta, delta);
break;
- case SCULPT_TOOL_CLAY_TUBES:
+ case SCULPT_TOOL_CLAY_STRIPS:
case SCULPT_TOOL_NUDGE:
- sub_v3_v3v3(cache->grab_delta, grab_location, cache->old_grab_location);
- invert_m4_m4(imat, ob->obmat);
- mul_mat3_m4_v3(imat, cache->grab_delta);
- break;
case SCULPT_TOOL_SNAKE_HOOK:
- sub_v3_v3v3(cache->grab_delta, grab_location, cache->old_grab_location);
+ if (brush->flag & BRUSH_ANCHORED) {
+ float orig[3];
+ mul_v3_m4v3(orig, ob->obmat, cache->orig_grab_location);
+ sub_v3_v3v3(cache->grab_delta, grab_location, orig);
+ }
+ else {
+ sub_v3_v3v3(cache->grab_delta, grab_location,
+ cache->old_grab_location);
+ }
+
invert_m4_m4(imat, ob->obmat);
mul_mat3_m4_v3(imat, cache->grab_delta);
break;
@@ -2996,12 +2998,12 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush)
copy_v3_v3(cache->old_grab_location, grab_location);
- if(tool == SCULPT_TOOL_GRAB)
+ if (tool == SCULPT_TOOL_GRAB)
copy_v3_v3(sd->anchored_location, cache->true_location);
- else if(tool == SCULPT_TOOL_THUMB)
+ else if (tool == SCULPT_TOOL_THUMB)
copy_v3_v3(sd->anchored_location, cache->orig_grab_location);
- if(ELEM(tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_THUMB)) {
+ if (ELEM(tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_THUMB)) {
/* location stays the same for finding vertices in brush radius */
copy_v3_v3(cache->true_location, cache->orig_grab_location);
@@ -3024,7 +3026,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
int dx, dy;
- //RNA_float_get_array(ptr, "location", cache->traced_location);
+ /* RNA_float_get_array(ptr, "location", cache->traced_location); */
if (cache->first_time ||
!((brush->flag & BRUSH_ANCHORED)||
@@ -3043,7 +3045,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
* brush coord/pressure/etc.
* It's more an events design issue, which doesn't split coordinate/pressure/angle
* changing events. We should avoid this after events system re-design */
- if(paint_space_stroke_enabled(brush) || cache->first_time)
+ if (paint_space_stroke_enabled(brush) || cache->first_time)
cache->pressure = RNA_float_get(ptr, "pressure");
/* Truly temporary data that isn't stored in properties */
@@ -3054,7 +3056,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
cache->previous_pixel_radius = cache->pixel_radius;
cache->pixel_radius = brush_size(scene, brush);
- if(cache->first_time) {
+ if (cache->first_time) {
if (!brush_use_locked_size(scene, brush)) {
cache->initial_radius= paint_calc_object_space_radius(cache->vc, cache->true_location, brush_size(scene, brush));
brush_set_unprojected_radius(scene, brush, cache->initial_radius);
@@ -3064,7 +3066,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
}
}
- if(brush_use_size_pressure(scene, brush)) {
+ if (brush_use_size_pressure(scene, brush)) {
cache->pixel_radius *= cache->pressure;
cache->radius= cache->initial_radius * cache->pressure;
}
@@ -3073,7 +3075,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
cache->radius_squared = cache->radius*cache->radius;
- if(!(brush->flag & BRUSH_ANCHORED ||
+ if (!(brush->flag & BRUSH_ANCHORED ||
ELEM4(brush->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_SNAKE_HOOK,
SCULPT_TOOL_THUMB, SCULPT_TOOL_ROTATE))) {
copy_v2_v2(cache->tex_mouse, cache->mouse);
@@ -3086,7 +3088,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
}
}
- if(brush->flag & BRUSH_ANCHORED) {
+ if (brush->flag & BRUSH_ANCHORED) {
int hit = 0;
dx = cache->mouse[0] - cache->initial_mouse[0];
@@ -3126,7 +3128,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
sd->draw_anchored = 1;
}
- else if(brush->flag & BRUSH_RAKE) {
+ else if (brush->flag & BRUSH_RAKE) {
const float u = 0.5f;
const float v = 1 - u;
const float r = 20;
@@ -3147,7 +3149,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
sculpt_update_brush_delta(sd, ob, brush);
- if(brush->sculpt_tool == SCULPT_TOOL_ROTATE) {
+ if (brush->sculpt_tool == SCULPT_TOOL_ROTATE) {
dx = cache->mouse[0] - cache->initial_mouse[0];
dy = cache->mouse[1] - cache->initial_mouse[1];
@@ -3166,7 +3168,7 @@ static void sculpt_stroke_modifiers_check(bContext *C, Object *ob)
{
SculptSession *ss = ob->sculpt;
- if(ss->modifiers_active) {
+ if (ss->modifiers_active) {
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
Brush *brush = paint_brush(&sd->paint);
@@ -3188,7 +3190,7 @@ static void sculpt_raycast_cb(PBVHNode *node, void *data_v, float* tmin)
SculptRaycastData *srd = data_v;
float (*origco)[3]= NULL;
- if(srd->original && srd->ss->cache) {
+ if (srd->original && srd->ss->cache) {
/* intersect with coordinates from before we started stroke */
SculptUndoNode *unode= sculpt_undo_get_node(node);
origco= (unode)? unode->co: NULL;
@@ -3258,7 +3260,7 @@ static void sculpt_brush_init_tex(const Scene *scene, Sculpt *sd, SculptSession
MTex *mtex= &brush->mtex;
/* init mtex nodes */
- if(mtex->tex && mtex->tex->nodetree)
+ if (mtex->tex && mtex->tex->nodetree)
ntreeTexBeginExecTree(mtex->tex->nodetree, 1); /* has internal flag to detect it only does it once */
/* TODO: Shouldn't really have to do this at the start of every
@@ -3293,7 +3295,7 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss)
Brush *brush = paint_brush(&sd->paint);
/* Restore the mesh before continuing with anchored stroke */
- if((brush->flag & BRUSH_ANCHORED) ||
+ if ((brush->flag & BRUSH_ANCHORED) ||
(brush->sculpt_tool == SCULPT_TOOL_GRAB &&
brush_use_size_pressure(ss->cache->vc->scene, brush)) ||
(brush->flag & BRUSH_RESTORE_MESH))
@@ -3307,19 +3309,19 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss)
BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode);
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
- for(n=0; n<totnode; n++) {
+ for (n=0; n<totnode; n++) {
SculptUndoNode *unode;
unode= sculpt_undo_get_node(nodes[n]);
- if(unode) {
+ if (unode) {
PBVHVertexIter vd;
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
copy_v3_v3(vd.co, unode->co[vd.i]);
- if(vd.no) copy_v3_v3_short(vd.no, unode->no[vd.i]);
+ if (vd.no) copy_v3_v3_short(vd.no, unode->no[vd.i]);
else normal_short_to_float_v3(vd.fno, unode->no[vd.i]);
- if(vd.mvert) vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
+ if (vd.mvert) vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
}
BLI_pbvh_vertex_iter_end;
@@ -3327,13 +3329,13 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss)
}
}
- if(ss->face_normals) {
+ if (ss->face_normals) {
float *fn = ss->face_normals;
- for(i = 0; i < ss->totpoly; ++i, fn += 3)
+ for (i = 0; i < ss->totpoly; ++i, fn += 3)
copy_v3_v3(fn, cache->face_norms[i]);
}
- if(nodes)
+ if (nodes)
MEM_freeN(nodes);
}
}
@@ -3345,12 +3347,12 @@ static void sculpt_flush_update(bContext *C)
ARegion *ar = CTX_wm_region(C);
MultiresModifierData *mmd = ss->multires;
- if(mmd)
- multires_mark_as_modified(ob);
- if(ob->derivedFinal) /* VBO no longer valid */
+ if (mmd)
+ multires_mark_as_modified(ob, MULTIRES_COORDS_MODIFIED);
+ if (ob->derivedFinal) /* VBO no longer valid */
GPU_drawobject_free(ob->derivedFinal);
- if(ss->modifiers_active) {
+ if (ss->modifiers_active) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
ED_region_tag_redraw(ar);
}
@@ -3390,7 +3392,7 @@ static int sculpt_stroke_test_start(bContext *C, struct wmOperator *op,
{
/* Don't start the stroke until mouse goes over the mesh.
* note: event will only be null when re-executing the saved stroke. */
- if(event==NULL || over_mesh(C, op, event->x, event->y)) {
+ if (event==NULL || over_mesh(C, op, event->x, event->y)) {
Object *ob = CTX_data_active_object(C);
SculptSession *ss = ob->sculpt;
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
@@ -3440,7 +3442,7 @@ static void sculpt_brush_exit_tex(Sculpt *sd)
Brush *brush= paint_brush(&sd->paint);
MTex *mtex= &brush->mtex;
- if(mtex->tex && mtex->tex->nodetree)
+ if (mtex->tex && mtex->tex->nodetree)
ntreeTexEndExecTree(mtex->tex->nodetree->execdata, 1);
}
@@ -3450,13 +3452,13 @@ static void sculpt_stroke_done(bContext *C, struct PaintStroke *UNUSED(stroke))
SculptSession *ss = ob->sculpt;
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
- // reset values used to draw brush after completing the stroke
+ /* reset values used to draw brush after completing the stroke */
sd->draw_anchored= 0;
sd->draw_pressure= 0;
sd->special_rotation= 0;
/* Finished */
- if(ss->cache) {
+ if (ss->cache) {
Brush *brush= paint_brush(&sd->paint);
brush->flag &= ~BRUSH_INVERTED;
@@ -3466,7 +3468,7 @@ static void sculpt_stroke_done(bContext *C, struct PaintStroke *UNUSED(stroke))
if (ss->cache->alt_smooth) {
Paint *p= &sd->paint;
brush= (Brush *)find_id("BR", ss->cache->saved_active_brush_name);
- if(brush) {
+ if (brush) {
paint_brush_set(p, brush);
}
}
@@ -3481,12 +3483,12 @@ static void sculpt_stroke_done(bContext *C, struct PaintStroke *UNUSED(stroke))
/* optimization: if there is locked key and active modifiers present in */
/* the stack, keyblock is updating at each step. otherwise we could update */
/* keyblock only when stroke is finished */
- if(ss->kb && !ss->modifiers_active) sculpt_update_keyblock(ob);
+ if (ss->kb && !ss->modifiers_active) sculpt_update_keyblock(ob);
ss->partial_redraw = 0;
/* try to avoid calling this, only for e.g. linked duplicates now */
- if(((Mesh*)ob->data)->id.us > 1)
+ if (((Mesh*)ob->data)->id.us > 1)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
@@ -3500,7 +3502,7 @@ static int sculpt_brush_stroke_invoke(bContext *C, wmOperator *op, wmEvent *even
struct PaintStroke *stroke;
int ignore_background_click;
- if(!sculpt_brush_stroke_init(C, op))
+ if (!sculpt_brush_stroke_init(C, op))
return OPERATOR_CANCELLED;
stroke = paint_stroke_new(C, sculpt_stroke_get_location,
@@ -3514,7 +3516,7 @@ static int sculpt_brush_stroke_invoke(bContext *C, wmOperator *op, wmEvent *even
ignore_background_click = RNA_boolean_get(op->ptr,
"ignore_background_click");
- if(ignore_background_click && !over_mesh(C, op, event->x, event->y)) {
+ if (ignore_background_click && !over_mesh(C, op, event->x, event->y)) {
paint_stroke_free(stroke);
return OPERATOR_PASS_THROUGH;
}
@@ -3529,7 +3531,7 @@ static int sculpt_brush_stroke_invoke(bContext *C, wmOperator *op, wmEvent *even
static int sculpt_brush_stroke_exec(bContext *C, wmOperator *op)
{
- if(!sculpt_brush_stroke_init(C, op))
+ if (!sculpt_brush_stroke_init(C, op))
return OPERATOR_CANCELLED;
op->customdata = paint_stroke_new(C, sculpt_stroke_get_location, sculpt_stroke_test_start,
@@ -3549,7 +3551,7 @@ static int sculpt_brush_stroke_cancel(bContext *C, wmOperator *op)
paint_stroke_cancel(C, op);
- if(ss->cache) {
+ if (ss->cache) {
sculpt_cache_free(ss->cache);
ss->cache = NULL;
}
@@ -3569,18 +3571,18 @@ static void SCULPT_OT_brush_stroke(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Sculpt Mode";
- ot->idname= "SCULPT_OT_brush_stroke";
+ ot->name = "Sculpt Mode";
+ ot->idname = "SCULPT_OT_brush_stroke";
/* api callbacks */
- ot->invoke= sculpt_brush_stroke_invoke;
- ot->modal= paint_stroke_modal;
- ot->exec= sculpt_brush_stroke_exec;
- ot->poll= sculpt_poll;
- ot->cancel= sculpt_brush_stroke_cancel;
+ ot->invoke = sculpt_brush_stroke_invoke;
+ ot->modal = paint_stroke_modal;
+ ot->exec = sculpt_brush_stroke_exec;
+ ot->poll = sculpt_poll;
+ ot->cancel = sculpt_brush_stroke_cancel;
/* flags (sculpt does own undo? (ton) */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
/* properties */
@@ -3602,8 +3604,8 @@ static int sculpt_set_persistent_base(bContext *C, wmOperator *UNUSED(op))
{
SculptSession *ss = CTX_data_active_object(C)->sculpt;
- if(ss) {
- if(ss->layer_co)
+ if (ss) {
+ if (ss->layer_co)
MEM_freeN(ss->layer_co);
ss->layer_co = NULL;
}
@@ -3614,14 +3616,14 @@ static int sculpt_set_persistent_base(bContext *C, wmOperator *UNUSED(op))
static void SCULPT_OT_set_persistent_base(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Persistent Base";
- ot->idname= "SCULPT_OT_set_persistent_base";
+ ot->name = "Set Persistent Base";
+ ot->idname = "SCULPT_OT_set_persistent_base";
/* api callbacks */
- ot->exec= sculpt_set_persistent_base;
- ot->poll= sculpt_mode_poll;
+ ot->exec = sculpt_set_persistent_base;
+ ot->poll = sculpt_mode_poll;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/**** Toggle operator for turning sculpt mode on or off ****/
@@ -3646,11 +3648,11 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *UNUSED(op))
/* if object has got active modifiers, it's dm could be different in sculpt mode */
flush_recalc |= sculpt_has_active_modifiers(scene, ob);
- if(ob->mode & OB_MODE_SCULPT) {
- if(mmd)
+ if (ob->mode & OB_MODE_SCULPT) {
+ if (mmd)
multires_force_update(ob);
- if(flush_recalc)
+ if (flush_recalc)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* Leave sculptmode */
@@ -3662,11 +3664,11 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *UNUSED(op))
/* Enter sculptmode */
ob->mode |= OB_MODE_SCULPT;
- if(flush_recalc)
+ if (flush_recalc)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* Create persistent sculpt mode data */
- if(!ts->sculpt) {
+ if (!ts->sculpt) {
ts->sculpt = MEM_callocN(sizeof(Sculpt), "sculpt mode data");
/* Turn on X plane mirror symmetry by default */
@@ -3674,7 +3676,7 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *UNUSED(op))
}
/* Create sculpt mode session data */
- if(ob->sculpt)
+ if (ob->sculpt)
free_sculptsession(ob);
sculpt_init_session(scene, ob);
@@ -3692,14 +3694,14 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *UNUSED(op))
static void SCULPT_OT_sculptmode_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Sculpt Mode";
- ot->idname= "SCULPT_OT_sculptmode_toggle";
+ ot->name = "Sculpt Mode";
+ ot->idname = "SCULPT_OT_sculptmode_toggle";
/* api callbacks */
- ot->exec= sculpt_toggle_mode;
- ot->poll= ED_operator_object_active_editable_mesh;
+ ot->exec = sculpt_toggle_mode;
+ ot->poll = ED_operator_object_active_editable_mesh;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
void ED_operatortypes_sculpt(void)
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index 8ece42b7d2f..8ccf55ec4fb 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -37,6 +37,7 @@
#include "DNA_vec_types.h"
#include "DNA_key_types.h"
+#include "BLI_bitmap.h"
#include "BLI_pbvh.h"
struct bContext;
@@ -54,6 +55,7 @@ struct MultiresModifierData *sculpt_multires_active(struct Scene *scene, struct
void sculpt(Sculpt *sd);
+int sculpt_mode_poll(struct bContext *C);
int sculpt_poll(struct bContext *C);
void sculpt_update_mesh_elements(struct Scene *scene, struct Sculpt *sd, struct Object *ob, int need_pmap);
@@ -65,9 +67,16 @@ int sculpt_stroke_get_location(bContext *C, float out[3], float mouse[2]);
/* Undo */
+typedef enum {
+ SCULPT_UNDO_COORDS,
+ SCULPT_UNDO_HIDDEN
+} SculptUndoType;
+
typedef struct SculptUndoNode {
struct SculptUndoNode *next, *prev;
+ SculptUndoType type;
+
char idname[MAX_ID_NAME]; /* name instead of pointer*/
void *node; /* only during push, not valid afterwards! */
@@ -79,12 +88,14 @@ typedef struct SculptUndoNode {
/* non-multires */
int maxvert; /* to verify if totvert it still the same */
int *index; /* to restore into right location */
+ BLI_bitmap vert_hidden;
/* multires */
int maxgrid; /* same for grid */
int gridsize; /* same for grid */
int totgrid; /* to restore into right location */
int *grids; /* to restore into right location */
+ BLI_bitmap *grid_hidden;
/* layer brush */
float *layer_disp;
@@ -93,7 +104,7 @@ typedef struct SculptUndoNode {
char shapeName[sizeof(((KeyBlock *)0))->name];
} SculptUndoNode;
-SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node);
+SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType type);
SculptUndoNode *sculpt_undo_get_node(PBVHNode *node);
void sculpt_undo_push_begin(const char *name);
void sculpt_undo_push_end(void);
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 84b8b5a8bce..73fa546b357 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -55,6 +55,7 @@
#include "BKE_paint.h"
#include "BKE_key.h"
#include "BKE_mesh.h"
+#include "BKE_subsurf.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -67,17 +68,23 @@
/************************** Undo *************************/
-static void update_cb(PBVHNode *node, void *UNUSED(unused))
+static void update_cb(PBVHNode *node, void *rebuild)
{
BLI_pbvh_node_mark_update(node);
+ if (*((int*)rebuild))
+ BLI_pbvh_node_mark_rebuild_draw(node);
+ BLI_pbvh_node_fully_hidden_set(node, 0);
}
static void sculpt_undo_restore_deformed(SculptSession *ss, SculptUndoNode *unode, int uindex, int oindex, float coord[3])
{
- if(unode->orig_co) {
+ if (unode->orig_co) {
swap_v3_v3(coord, unode->orig_co[uindex]);
copy_v3_v3(unode->co[uindex], ss->deform_cos[oindex]);
- } else swap_v3_v3(coord, unode->co[uindex]);
+ }
+ else {
+ swap_v3_v3(coord, unode->co[uindex]);
+ }
}
static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNode *unode)
@@ -89,7 +96,7 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo
MVert *mvert;
int *index, i, j;
- if(unode->maxvert) {
+ if (unode->maxvert) {
/* regular mesh restore */
if (ss->kb && strcmp(ss->kb->name, unode->shapeName)) {
@@ -103,7 +110,8 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo
sculpt_update_mesh_elements(scene, sd, ob, 0);
WM_event_add_notifier(C, NC_OBJECT|ND_DATA, ob);
- } else {
+ }
+ else {
/* key has been removed -- skip this undo node */
return 0;
}
@@ -116,10 +124,10 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo
float (*vertCos)[3];
vertCos= key_to_vertcos(ob, ss->kb);
- for(i=0; i<unode->totvert; i++) {
- if(ss->modifiers_active) sculpt_undo_restore_deformed(ss, unode, i, index[i], vertCos[index[i]]);
+ for (i=0; i<unode->totvert; i++) {
+ if (ss->modifiers_active) sculpt_undo_restore_deformed(ss, unode, i, index[i], vertCos[index[i]]);
else {
- if(unode->orig_co) swap_v3_v3(vertCos[index[i]], unode->orig_co[i]);
+ if (unode->orig_co) swap_v3_v3(vertCos[index[i]], unode->orig_co[i]);
else swap_v3_v3(vertCos[index[i]], unode->co[i]);
}
}
@@ -132,18 +140,19 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo
BLI_pbvh_apply_vertCos(ss->pbvh, vertCos);
MEM_freeN(vertCos);
- } else {
- for(i=0; i<unode->totvert; i++) {
- if(ss->modifiers_active) sculpt_undo_restore_deformed(ss, unode, i, index[i], mvert[index[i]].co);
+ }
+ else {
+ for (i=0; i<unode->totvert; i++) {
+ if (ss->modifiers_active) sculpt_undo_restore_deformed(ss, unode, i, index[i], mvert[index[i]].co);
else {
- if(unode->orig_co) swap_v3_v3(mvert[index[i]].co, unode->orig_co[i]);
+ if (unode->orig_co) swap_v3_v3(mvert[index[i]].co, unode->orig_co[i]);
else swap_v3_v3(mvert[index[i]].co, unode->co[i]);
}
mvert[index[i]].flag |= ME_VERT_PBVH_UPDATE;
}
}
}
- else if(unode->maxgrid && dm->getGridData) {
+ else if (unode->maxgrid && dm->getGridData) {
/* multires restore */
DMGridData **grids, *grid;
float (*co)[3];
@@ -153,10 +162,10 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo
gridsize= dm->getGridSize(dm);
co = unode->co;
- for(j=0; j<unode->totgrid; j++) {
+ for (j=0; j<unode->totgrid; j++) {
grid= grids[unode->grids[j]];
- for(i=0; i<gridsize*gridsize; i++, co++)
+ for (i=0; i<gridsize*gridsize; i++, co++)
swap_v3_v3(grid[i].co, co[0]);
}
}
@@ -164,6 +173,44 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo
return 1;
}
+static int sculpt_undo_restore_hidden(bContext *C, DerivedMesh *dm,
+ SculptUndoNode *unode)
+{
+ Object *ob = CTX_data_active_object(C);
+ SculptSession *ss = ob->sculpt;
+ int i;
+
+ if (unode->maxvert) {
+ MVert *mvert= ss->mvert;
+
+ for (i=0; i<unode->totvert; i++) {
+ MVert *v = &mvert[unode->index[i]];
+ int uval= BLI_BITMAP_GET(unode->vert_hidden, i);
+
+ BLI_BITMAP_MODIFY(unode->vert_hidden, i,
+ v->flag & ME_HIDE);
+ if (uval)
+ v->flag |= ME_HIDE;
+ else
+ v->flag &= ~ME_HIDE;
+
+ v->flag |= ME_VERT_PBVH_UPDATE;
+ }
+ }
+ else if (unode->maxgrid && dm->getGridData) {
+ BLI_bitmap *grid_hidden = dm->getGridHidden(dm);
+
+ for (i=0; i<unode->totgrid; i++) {
+ SWAP(BLI_bitmap,
+ unode->grid_hidden[i],
+ grid_hidden[unode->grids[i]]);
+
+ }
+ }
+
+ return 1;
+}
+
static void sculpt_undo_restore(bContext *C, ListBase *lb)
{
Scene *scene = CTX_data_scene(C);
@@ -173,22 +220,22 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
SculptSession *ss = ob->sculpt;
SculptUndoNode *unode;
MultiresModifierData *mmd;
- int update= 0;
+ int update= 0, rebuild= 1;
sculpt_update_mesh_elements(scene, sd, ob, 0);
- for(unode=lb->first; unode; unode=unode->next) {
- if(!(strcmp(unode->idname, ob->id.name)==0))
+ for (unode=lb->first; unode; unode=unode->next) {
+ if (!(strcmp(unode->idname, ob->id.name)==0))
continue;
/* check if undo data matches current data well enough to
* continue */
- if(unode->maxvert) {
- if(ss->totvert != unode->maxvert)
+ if (unode->maxvert) {
+ if (ss->totvert != unode->maxvert)
continue;
}
- else if(unode->maxgrid && dm->getGridData) {
- if((dm->getNumGrids(dm) != unode->maxgrid) ||
+ else if (unode->maxgrid && dm->getGridData) {
+ if ((dm->getNumGrids(dm) != unode->maxgrid) ||
(dm->getGridSize(dm) != unode->gridsize))
continue;
}
@@ -196,24 +243,36 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
continue;
}
- if(sculpt_undo_restore_coords(C, dm, unode))
- update= 1;
+ switch(unode->type) {
+ case SCULPT_UNDO_COORDS:
+ if (sculpt_undo_restore_coords(C, dm, unode))
+ update= 1;
+ break;
+ case SCULPT_UNDO_HIDDEN:
+ if (sculpt_undo_restore_hidden(C, dm, unode))
+ rebuild= 1;
+ break;
+ }
}
- if(update) {
+ if (update || rebuild) {
int tag_update= 0;
/* we update all nodes still, should be more clever, but also
* needs to work correct when exiting/entering sculpt mode and
* the nodes get recreated, though in that case it could do all */
- BLI_pbvh_search_callback(ss->pbvh, NULL, NULL, update_cb, NULL);
+ BLI_pbvh_search_callback(ss->pbvh, NULL, NULL, update_cb, &rebuild);
BLI_pbvh_update(ss->pbvh, PBVH_UpdateBB|PBVH_UpdateOriginalBB|PBVH_UpdateRedraw, NULL);
- if((mmd=sculpt_multires_active(scene, ob)))
- multires_mark_as_modified(ob);
+ if ((mmd=sculpt_multires_active(scene, ob))) {
+ if (rebuild)
+ multires_mark_as_modified(ob, MULTIRES_HIDDEN_MODIFIED);
+ else
+ multires_mark_as_modified(ob, MULTIRES_COORDS_MODIFIED);
+ }
tag_update= ((Mesh*)ob->data)->id.us > 1;
- if(ss->modifiers_active) {
+ if (ss->modifiers_active) {
Mesh *mesh= ob->data;
mesh_calc_normals_mapping(mesh->mvert, mesh->totvert, mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly, NULL, NULL, 0, NULL, NULL);
@@ -221,7 +280,7 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
tag_update|= 1;
}
- if(tag_update)
+ if (tag_update)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* for non-PBVH drawing, need to recreate VBOs */
@@ -232,20 +291,30 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
static void sculpt_undo_free(ListBase *lb)
{
SculptUndoNode *unode;
+ int i;
- for(unode=lb->first; unode; unode=unode->next) {
- if(unode->co)
+ for (unode=lb->first; unode; unode=unode->next) {
+ if (unode->co)
MEM_freeN(unode->co);
- if(unode->no)
+ if (unode->no)
MEM_freeN(unode->no);
- if(unode->index)
+ if (unode->index)
MEM_freeN(unode->index);
- if(unode->grids)
+ if (unode->grids)
MEM_freeN(unode->grids);
- if(unode->layer_disp)
+ if (unode->layer_disp)
MEM_freeN(unode->layer_disp);
- if(unode->orig_co)
+ if (unode->orig_co)
MEM_freeN(unode->orig_co);
+ if (unode->vert_hidden)
+ MEM_freeN(unode->vert_hidden);
+ if (unode->grid_hidden) {
+ for (i=0; i<unode->totgrid; i++) {
+ if (unode->grid_hidden[i])
+ MEM_freeN(unode->grid_hidden[i]);
+ }
+ MEM_freeN(unode->grid_hidden);
+ }
}
}
@@ -254,17 +323,41 @@ SculptUndoNode *sculpt_undo_get_node(PBVHNode *node)
ListBase *lb= undo_paint_push_get_list(UNDO_PAINT_MESH);
SculptUndoNode *unode;
- if(!lb)
+ if (!lb)
return NULL;
- for(unode=lb->first; unode; unode=unode->next)
- if(unode->node == node)
+ for (unode=lb->first; unode; unode=unode->next)
+ if (unode->node == node)
return unode;
return NULL;
}
-SculptUndoNode *sculpt_undo_alloc_node(Object *ob, PBVHNode *node)
+static void sculpt_undo_alloc_and_store_hidden(PBVH *pbvh,
+ SculptUndoNode *unode)
+{
+ PBVHNode *node= unode->node;
+ BLI_bitmap *grid_hidden;
+ int i, *grid_indices, totgrid;
+
+ grid_hidden= BLI_pbvh_grid_hidden(pbvh);
+
+ BLI_pbvh_node_get_grids(pbvh, node, &grid_indices, &totgrid,
+ NULL, NULL, NULL, NULL);
+
+ unode->grid_hidden= MEM_mapallocN(sizeof(BLI_bitmap) * totgrid,
+ "unode->grid_hidden");
+
+ for (i = 0; i < totgrid; i++) {
+ if (grid_hidden[grid_indices[i]])
+ unode->grid_hidden[i] = MEM_dupallocN(grid_hidden[grid_indices[i]]);
+ else
+ unode->grid_hidden[i] = NULL;
+ }
+}
+
+static SculptUndoNode *sculpt_undo_alloc_node(Object *ob, PBVHNode *node,
+ SculptUndoType type)
{
ListBase *lb= undo_paint_push_get_list(UNDO_PAINT_MESH);
SculptUndoNode *unode;
@@ -273,6 +366,7 @@ SculptUndoNode *sculpt_undo_alloc_node(Object *ob, PBVHNode *node)
unode= MEM_callocN(sizeof(SculptUndoNode), "SculptUndoNode");
BLI_strncpy(unode->idname, ob->id.name, sizeof(unode->idname));
+ unode->type= type;
unode->node= node;
BLI_pbvh_node_num_verts(ss->pbvh, node, &totvert, &allvert);
@@ -280,13 +374,28 @@ SculptUndoNode *sculpt_undo_alloc_node(Object *ob, PBVHNode *node)
&maxgrid, &gridsize, NULL, NULL);
unode->totvert= totvert;
+
/* we will use this while sculpting, is mapalloc slow to access then? */
- unode->co= MEM_mapallocN(sizeof(float)*3*allvert, "SculptUndoNode.co");
- unode->no= MEM_mapallocN(sizeof(short)*3*allvert, "SculptUndoNode.no");
- undo_paint_push_count_alloc(UNDO_PAINT_MESH, (sizeof(float)*3 + sizeof(short)*3 + sizeof(int))*allvert);
+
+ /* general TODO, fix count_alloc */
+ switch(type) {
+ case SCULPT_UNDO_COORDS:
+ unode->co= MEM_mapallocN(sizeof(float)*3*allvert, "SculptUndoNode.co");
+ unode->no= MEM_mapallocN(sizeof(short)*3*allvert, "SculptUndoNode.no");
+ undo_paint_push_count_alloc(UNDO_PAINT_MESH, (sizeof(float)*3 + sizeof(short)*3 + sizeof(int))*allvert);
+ break;
+ case SCULPT_UNDO_HIDDEN:
+ if (maxgrid)
+ sculpt_undo_alloc_and_store_hidden(ss->pbvh, unode);
+ else
+ unode->vert_hidden= BLI_BITMAP_NEW(allvert, "SculptUndoNode.vert_hidden");
+
+ break;
+ }
+
BLI_addtail(lb, unode);
- if(maxgrid) {
+ if (maxgrid) {
/* multires */
unode->maxgrid= maxgrid;
unode->totgrid= totgrid;
@@ -299,13 +408,52 @@ SculptUndoNode *sculpt_undo_alloc_node(Object *ob, PBVHNode *node)
unode->index= MEM_mapallocN(sizeof(int)*allvert, "SculptUndoNode.index");
}
- if(ss->modifiers_active)
+ if (ss->modifiers_active)
unode->orig_co= MEM_callocN(allvert*sizeof(*unode->orig_co), "undoSculpt orig_cos");
return unode;
}
-SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node)
+static void sculpt_undo_store_coords(Object *ob, SculptUndoNode *unode)
+{
+ SculptSession *ss = ob->sculpt;
+ PBVHVertexIter vd;
+
+ BLI_pbvh_vertex_iter_begin(ss->pbvh, unode->node, vd, PBVH_ITER_ALL) {
+ copy_v3_v3(unode->co[vd.i], vd.co);
+ if (vd.no) copy_v3_v3_short(unode->no[vd.i], vd.no);
+ else normal_float_to_short_v3(unode->no[vd.i], vd.fno);
+
+ if (ss->modifiers_active)
+ copy_v3_v3(unode->orig_co[vd.i], ss->orig_cos[unode->index[vd.i]]);
+ }
+ BLI_pbvh_vertex_iter_end;
+}
+
+static void sculpt_undo_store_hidden(Object *ob, SculptUndoNode *unode)
+{
+ PBVH *pbvh= ob->sculpt->pbvh;
+ PBVHNode *node= unode->node;
+
+ if (unode->grids) {
+ /* already stored during allocation */
+ }
+ else {
+ MVert *mvert;
+ int *vert_indices, allvert;
+ int i;
+
+ BLI_pbvh_node_num_verts(pbvh, node, NULL, &allvert);
+ BLI_pbvh_node_get_verts(pbvh, node, &vert_indices, &mvert);
+ for (i = 0; i < allvert; i++) {
+ BLI_BITMAP_MODIFY(unode->vert_hidden, i,
+ mvert[vert_indices[i]].flag & ME_HIDE);
+ }
+ }
+}
+
+SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node,
+ SculptUndoType type)
{
SculptSession *ss = ob->sculpt;
SculptUndoNode *unode;
@@ -313,40 +461,40 @@ SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node)
/* list is manipulated by multiple threads, so we lock */
BLI_lock_thread(LOCK_CUSTOM1);
- if((unode= sculpt_undo_get_node(node))) {
+ if ((unode= sculpt_undo_get_node(node))) {
BLI_unlock_thread(LOCK_CUSTOM1);
return unode;
}
- unode= sculpt_undo_alloc_node(ob, node);
-
+ unode= sculpt_undo_alloc_node(ob, node, type);
+
BLI_unlock_thread(LOCK_CUSTOM1);
/* copy threaded, hopefully this is the performance critical part */
- {
- PBVHVertexIter vd;
-
- BLI_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_ALL) {
- copy_v3_v3(unode->co[vd.i], vd.co);
- if(vd.no) copy_v3_v3_short(unode->no[vd.i], vd.no);
- else normal_float_to_short_v3(unode->no[vd.i], vd.fno);
- if(vd.vert_indices) unode->index[vd.i]= vd.vert_indices[vd.i];
-
- if(ss->modifiers_active)
- copy_v3_v3(unode->orig_co[vd.i], ss->orig_cos[unode->index[vd.i]]);
- }
- BLI_pbvh_vertex_iter_end;
+ switch(type) {
+ case SCULPT_UNDO_COORDS:
+ sculpt_undo_store_coords(ob, unode);
+ break;
+ case SCULPT_UNDO_HIDDEN:
+ sculpt_undo_store_hidden(ob, unode);
+ break;
}
- if(unode->grids) {
+ if (unode->grids) {
int totgrid, *grids;
BLI_pbvh_node_get_grids(ss->pbvh, node, &grids, &totgrid,
NULL, NULL, NULL, NULL);
memcpy(unode->grids, grids, sizeof(int)*totgrid);
}
+ else {
+ int *vert_indices, allvert;
+ BLI_pbvh_node_num_verts(ss->pbvh, node, NULL, &allvert);
+ BLI_pbvh_node_get_verts(ss->pbvh, node, &vert_indices, NULL);
+ memcpy(unode->index, vert_indices, sizeof(int)*unode->totvert);
+ }
/* store active shape key */
- if(ss->kb) BLI_strncpy(unode->shapeName, ss->kb->name, sizeof(ss->kb->name));
+ if (ss->kb) BLI_strncpy(unode->shapeName, ss->kb->name, sizeof(ss->kb->name));
else unode->shapeName[0]= '\0';
return unode;
@@ -364,13 +512,13 @@ void sculpt_undo_push_end(void)
SculptUndoNode *unode;
/* we don't need normals in the undo stack */
- for(unode=lb->first; unode; unode=unode->next) {
- if(unode->no) {
+ for (unode=lb->first; unode; unode=unode->next) {
+ if (unode->no) {
MEM_freeN(unode->no);
unode->no= NULL;
}
- if(unode->layer_disp) {
+ if (unode->layer_disp) {
MEM_freeN(unode->layer_disp);
unode->layer_disp= NULL;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index 72e9f861aa9..240a8feeb88 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -372,7 +372,8 @@ static void uv_sculpt_stroke_apply(bContext *C, wmOperator *op, wmEvent *event,
unsigned int method = toolsettings->uv_relax_method;
if (method == UV_SCULPT_TOOL_RELAX_HC) {
HC_relaxation_iteration_uv(em, sculptdata, co, alpha, radius, aspectRatio);
- }else{
+ }
+ else {
laplacian_relaxation_iteration_uv(em, sculptdata, co, alpha, radius, aspectRatio);
}
}
@@ -501,13 +502,16 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent
/* We will need island information */
if (ts->uv_flag & UV_SYNC_SELECTION) {
data->elementMap = EDBM_make_uv_element_map(em, 0, 1);
- }else{
+ }
+ else {
data->elementMap = EDBM_make_uv_element_map(em, 1, 1);
}
- }else {
+ }
+ else {
if (ts->uv_flag & UV_SYNC_SELECTION) {
data->elementMap = EDBM_make_uv_element_map(em, 0, 0);
- }else{
+ }
+ else {
data->elementMap = EDBM_make_uv_element_map(em, 1, 0);
}
}
@@ -610,7 +614,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent
edges[counter].uv1 = offset1;
edges[counter].uv2 = offset2;
}
- else{
+ else {
edges[counter].uv1 = offset2;
edges[counter].uv2 = offset1;
}
@@ -619,7 +623,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent
char *flag = BLI_ghash_lookup(edgeHash, &edges[counter]);
*flag = 1;
}
- else{
+ else {
/* Hack mentioned */
BLI_ghash_insert(edgeHash, &edges[counter], &edges[counter].flag);
}
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index 8f6a01dc6cd..f7598045f81 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -105,11 +105,11 @@ static int sound_open_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "filepath", path);
sound = sound_new_file(bmain, path);
- if(!op->customdata)
+ if (!op->customdata)
sound_open_init(C, op);
if (sound==NULL || sound->playback_handle == NULL) {
- if(op->customdata) MEM_freeN(op->customdata);
+ if (op->customdata) MEM_freeN(op->customdata);
BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
return OPERATOR_CANCELLED;
}
@@ -118,12 +118,12 @@ static int sound_open_exec(bContext *C, wmOperator *op)
if (info.specs.channels == AUD_CHANNELS_INVALID) {
sound_delete(bmain, sound);
- if(op->customdata) MEM_freeN(op->customdata);
+ if (op->customdata) MEM_freeN(op->customdata);
BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
return OPERATOR_CANCELLED;
}
- if(RNA_boolean_get(op->ptr, "mono")) {
+ if (RNA_boolean_get(op->ptr, "mono")) {
sound->flags |= SOUND_FLAGS_MONO;
sound_load(bmain, sound);
}
@@ -135,7 +135,7 @@ static int sound_open_exec(bContext *C, wmOperator *op)
/* hook into UI */
pprop= op->customdata;
- if(pprop->prop) {
+ if (pprop->prop) {
/* when creating new ID blocks, use is already 1, but RNA
* pointer se also increases user, so this compensates it */
sound->id.us--;
@@ -145,7 +145,7 @@ static int sound_open_exec(bContext *C, wmOperator *op)
RNA_property_update(C, &pprop->ptr, pprop->prop);
}
- if(op->customdata) MEM_freeN(op->customdata);
+ if (op->customdata) MEM_freeN(op->customdata);
return OPERATOR_FINISHED;
}
@@ -162,7 +162,7 @@ static int sound_open_exec(bContext *UNUSED(C), wmOperator *op)
static int sound_open_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath"))
return sound_open_exec(C, op);
sound_open_init(C, op);
@@ -173,17 +173,17 @@ static int sound_open_invoke(bContext *C, wmOperator *op, wmEvent *event)
static void SOUND_OT_open(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Open Sound";
- ot->description= "Load a sound file";
- ot->idname= "SOUND_OT_open";
+ ot->name = "Open Sound";
+ ot->description = "Load a sound file";
+ ot->idname = "SOUND_OT_open";
/* api callbacks */
- ot->exec= sound_open_exec;
- ot->invoke= sound_open_invoke;
- ot->cancel= sound_open_cancel;
+ ot->exec = sound_open_exec;
+ ot->invoke = sound_open_invoke;
+ ot->cancel = sound_open_cancel;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
@@ -194,17 +194,17 @@ static void SOUND_OT_open(wmOperatorType *ot)
static void SOUND_OT_open_mono(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Open Sound Mono";
- ot->description= "Load a sound file as mono";
- ot->idname= "SOUND_OT_open_mono";
+ ot->name = "Open Sound Mono";
+ ot->description = "Load a sound file as mono";
+ ot->idname = "SOUND_OT_open_mono";
/* api callbacks */
- ot->exec= sound_open_exec;
- ot->invoke= sound_open_invoke;
- ot->cancel= sound_open_cancel;
+ ot->exec = sound_open_exec;
+ ot->invoke = sound_open_invoke;
+ ot->cancel = sound_open_cancel;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
@@ -223,19 +223,19 @@ static int sound_update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op)
SEQ_BEGIN(scene->ed, seq) {
fcu = id_data_find_fcurve(&scene->id, seq, &RNA_Sequence, "volume", 0, &driven);
- if(fcu || driven)
+ if (fcu || driven)
seq->flag |= SEQ_AUDIO_VOLUME_ANIMATED;
else
seq->flag &= ~SEQ_AUDIO_VOLUME_ANIMATED;
fcu = id_data_find_fcurve(&scene->id, seq, &RNA_Sequence, "pitch", 0, &driven);
- if(fcu || driven)
+ if (fcu || driven)
seq->flag |= SEQ_AUDIO_PITCH_ANIMATED;
else
seq->flag &= ~SEQ_AUDIO_PITCH_ANIMATED;
fcu = id_data_find_fcurve(&scene->id, seq, &RNA_Sequence, "pan", 0, &driven);
- if(fcu || driven)
+ if (fcu || driven)
seq->flag |= SEQ_AUDIO_PAN_ANIMATED;
else
seq->flag &= ~SEQ_AUDIO_PAN_ANIMATED;
@@ -243,7 +243,7 @@ static int sound_update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op)
SEQ_END
fcu = id_data_find_fcurve(&scene->id, scene, &RNA_Scene, "audio_volume", 0, &driven);
- if(fcu || driven)
+ if (fcu || driven)
scene->audio.flag |= AUDIO_VOLUME_ANIMATED;
else
scene->audio.flag &= ~AUDIO_VOLUME_ANIMATED;
@@ -261,15 +261,15 @@ static void SOUND_OT_update_animation_flags(wmOperatorType *ot)
*/
/* identifiers */
- ot->name= "Update animation";
- ot->description= "Update animation flags";
- ot->idname= "SOUND_OT_update_animation_flags";
+ ot->name = "Update animation";
+ ot->description = "Update animation flags";
+ ot->idname = "SOUND_OT_update_animation_flags";
/* api callbacks */
- ot->exec= sound_update_animation_flags_exec;
+ ot->exec = sound_update_animation_flags_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
}
/* ******************************************************* */
@@ -283,7 +283,7 @@ static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op))
sound_update_animation_flags_exec(C, NULL);
- for(cfra = scene->r.sfra > 0 ? scene->r.sfra - 1 : 0; cfra <= scene->r.efra + 1; cfra++)
+ for (cfra = scene->r.sfra > 0 ? scene->r.sfra - 1 : 0; cfra <= scene->r.efra + 1; cfra++)
{
scene->r.cfra = cfra;
scene_update_for_newframe(bmain, scene, scene->lay);
@@ -298,15 +298,15 @@ static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op))
static void SOUND_OT_bake_animation(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Update animation cache";
- ot->description= "Update the audio animation cache";
- ot->idname= "SOUND_OT_bake_animation";
+ ot->name = "Update animation cache";
+ ot->description = "Update the audio animation cache";
+ ot->idname = "SOUND_OT_bake_animation";
/* api callbacks */
- ot->exec= sound_bake_animation_exec;
+ ot->exec = sound_bake_animation_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
}
@@ -358,7 +358,7 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op)
static int sound_mixdown_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath"))
return sound_mixdown_exec(C, op);
return WM_operator_filesel(C, op, event);
@@ -571,19 +571,19 @@ static void SOUND_OT_mixdown(wmOperatorType *ot)
#endif // WITH_AUDASPACE
/* identifiers */
- ot->name= "Mixdown";
- ot->description= "Mixes the scene's audio to a sound file";
- ot->idname= "SOUND_OT_mixdown";
+ ot->name = "Mixdown";
+ ot->description = "Mixes the scene's audio to a sound file";
+ ot->idname = "SOUND_OT_mixdown";
/* api callbacks */
- ot->exec= sound_mixdown_exec;
- ot->invoke= sound_mixdown_invoke;
+ ot->exec = sound_mixdown_exec;
+ ot->invoke = sound_mixdown_invoke;
#ifdef WITH_AUDASPACE
- ot->ui= sound_mixdown_draw;
+ ot->ui = sound_mixdown_draw;
#endif
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
@@ -602,7 +602,7 @@ static int sound_poll(bContext *C)
{
Editing* ed = CTX_data_scene(C)->ed;
- if(!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
+ if (!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
return 0;
return 1;
@@ -615,12 +615,12 @@ static int sound_pack_exec(bContext *C, wmOperator *op)
Editing* ed = CTX_data_scene(C)->ed;
bSound* sound;
- if(!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
+ if (!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
return OPERATOR_CANCELLED;
sound = ed->act_seq->sound;
- if(!sound || sound->packedfile)
+ if (!sound || sound->packedfile)
return OPERATOR_CANCELLED;
sound->packedfile= newPackedFile(op->reports, sound->name, ID_BLEND_PATH(bmain, &sound->id));
@@ -632,16 +632,16 @@ static int sound_pack_exec(bContext *C, wmOperator *op)
static void SOUND_OT_pack(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Pack Sound";
- ot->description= "Pack the sound into the current blend file";
- ot->idname= "SOUND_OT_pack";
+ ot->name = "Pack Sound";
+ ot->description = "Pack the sound into the current blend file";
+ ot->idname = "SOUND_OT_pack";
/* api callbacks */
- ot->exec= sound_pack_exec;
- ot->poll= sound_poll;
+ ot->exec = sound_pack_exec;
+ ot->poll = sound_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************* unpack operator *********************/
@@ -658,10 +658,10 @@ static int sound_unpack_exec(bContext *C, wmOperator *op)
sound = BLI_findstring(&CTX_data_main(C)->sound, sndname, offsetof(ID, name) + 2);
}
- if(!sound || !sound->packedfile)
+ if (!sound || !sound->packedfile)
return OPERATOR_CANCELLED;
- if(G.fileflags & G_AUTOPACK)
+ if (G.fileflags & G_AUTOPACK)
BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save");
unpackSound(CTX_data_main(C), op->reports, sound, method);
@@ -674,18 +674,18 @@ static int sound_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
Editing* ed = CTX_data_scene(C)->ed;
bSound* sound;
- if(RNA_struct_property_is_set(op->ptr, "id"))
+ if (RNA_struct_property_is_set(op->ptr, "id"))
return sound_unpack_exec(C, op);
- if(!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
+ if (!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
return OPERATOR_CANCELLED;
sound = ed->act_seq->sound;
- if(!sound || !sound->packedfile)
+ if (!sound || !sound->packedfile)
return OPERATOR_CANCELLED;
- if(G.fileflags & G_AUTOPACK)
+ if (G.fileflags & G_AUTOPACK)
BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save");
unpack_menu(C, "SOUND_OT_unpack", sound->id.name+2, sound->name, "sounds", sound->packedfile);
@@ -696,17 +696,17 @@ static int sound_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
static void SOUND_OT_unpack(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Unpack Sound";
- ot->description= "Unpack the sound to the samples filename";
- ot->idname= "SOUND_OT_unpack";
+ ot->name = "Unpack Sound";
+ ot->description = "Unpack the sound to the samples filename";
+ ot->idname = "SOUND_OT_unpack";
/* api callbacks */
- ot->exec= sound_unpack_exec;
- ot->invoke= sound_unpack_invoke;
- ot->poll= sound_poll;
+ ot->exec = sound_unpack_exec;
+ ot->invoke = sound_unpack_invoke;
+ ot->poll = sound_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack");
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index f29dba4c568..024a9ffb57d 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -93,7 +93,7 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar)
/* don't use totrect set, as the width stays the same
* (NOTE: this is ok here, the configuration is pretty straightforward)
*/
- v2d->tot.ymin= (float)(-height);
+ v2d->tot.ymin = (float)(-height);
}
/* need to do a view-sync here, so that the keys area doesn't jump around (it must copy this) */
UI_view2d_sync(NULL, ac->sa, v2d, V2D_LOCK_COPY);
@@ -209,7 +209,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
/* don't use totrect set, as the width stays the same
* (NOTE: this is ok here, the configuration is pretty straightforward)
*/
- v2d->tot.ymin= (float)(-height);
+ v2d->tot.ymin = (float)(-height);
/* first backdrop strips */
y= (float)(-ACHANNEL_HEIGHT);
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index a044651652e..b8c310f8477 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -124,17 +124,17 @@ static int act_new_exec(bContext *C, wmOperator *UNUSED(op))
void ACTION_OT_new (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "New Action";
- ot->idname= "ACTION_OT_new";
- ot->description= "Create new action";
+ ot->name = "New Action";
+ ot->idname = "ACTION_OT_new";
+ ot->description = "Create new action";
/* api callbacks */
- ot->exec= act_new_exec;
+ ot->exec = act_new_exec;
// NOTE: this is used in the NLA too...
- //ot->poll= ED_operator_action_active;
+ //ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************************************************************************** */
@@ -207,16 +207,16 @@ static int act_markers_make_local_exec (bContext *C, wmOperator *UNUSED(op))
void ACTION_OT_markers_make_local (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Markers Local";
- ot->idname= "ACTION_OT_markers_make_local";
- ot->description= "Move selected scene markers to the active Action as local 'pose' markers";
+ ot->name = "Make Markers Local";
+ ot->idname = "ACTION_OT_markers_make_local";
+ ot->description = "Move selected scene markers to the active Action as local 'pose' markers";
/* callbacks */
ot->exec = act_markers_make_local_exec;
ot->poll = act_markers_make_local_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************************************************************************** */
@@ -322,16 +322,16 @@ static int actkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op))
void ACTION_OT_previewrange_set (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Auto-Set Preview Range";
- ot->idname= "ACTION_OT_previewrange_set";
- ot->description= "Set Preview Range based on extents of selected Keyframes";
+ ot->name = "Auto-Set Preview Range";
+ ot->idname = "ACTION_OT_previewrange_set";
+ ot->description = "Set Preview Range based on extents of selected Keyframes";
/* api callbacks */
- ot->exec= actkeys_previewrange_exec;
- ot->poll= ED_operator_action_active;
+ ot->exec = actkeys_previewrange_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ****************** View-All Operator ****************** */
@@ -355,8 +355,8 @@ static int actkeys_viewall(bContext *C, const short onlySel)
v2d->cur.xmax += extra;
/* set vertical range */
- v2d->cur.ymax= 0.0f;
- v2d->cur.ymin= (float)-(v2d->mask.ymax - v2d->mask.ymin);
+ v2d->cur.ymax = 0.0f;
+ v2d->cur.ymin = (float)-(v2d->mask.ymax - v2d->mask.ymin);
/* do View2D syncing */
UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY);
@@ -384,31 +384,31 @@ static int actkeys_viewsel_exec(bContext *C, wmOperator *UNUSED(op))
void ACTION_OT_view_all (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View All";
- ot->idname= "ACTION_OT_view_all";
- ot->description= "Reset viewable area to show full keyframe range";
+ ot->name = "View All";
+ ot->idname = "ACTION_OT_view_all";
+ ot->description = "Reset viewable area to show full keyframe range";
/* api callbacks */
- ot->exec= actkeys_viewall_exec;
- ot->poll= ED_operator_action_active;
+ ot->exec = actkeys_viewall_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
void ACTION_OT_view_selected (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Selected";
- ot->idname= "ACTION_OT_view_selected";
- ot->description= "Reset viewable area to show selected keyframes range";
+ ot->name = "View Selected";
+ ot->idname = "ACTION_OT_view_selected";
+ ot->description = "Reset viewable area to show selected keyframes range";
/* api callbacks */
- ot->exec= actkeys_viewsel_exec;
- ot->poll= ED_operator_action_active;
+ ot->exec = actkeys_viewsel_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************************************************************************** */
@@ -487,16 +487,16 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op)
void ACTION_OT_copy (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Keyframes";
- ot->idname= "ACTION_OT_copy";
- ot->description= "Copy selected keyframes to the copy/paste buffer";
+ ot->name = "Copy Keyframes";
+ ot->idname = "ACTION_OT_copy";
+ ot->description = "Copy selected keyframes to the copy/paste buffer";
/* api callbacks */
- ot->exec= actkeys_copy_exec;
- ot->poll= ED_operator_action_active;
+ ot->exec = actkeys_copy_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int actkeys_paste_exec(bContext *C, wmOperator *op)
@@ -538,17 +538,17 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
void ACTION_OT_paste (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Paste Keyframes";
- ot->idname= "ACTION_OT_paste";
- ot->description= "Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame";
+ ot->name = "Paste Keyframes";
+ ot->idname = "ACTION_OT_paste";
+ ot->description = "Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame";
/* api callbacks */
-// ot->invoke= WM_operator_props_popup; // better wait for action redo panel
- ot->exec= actkeys_paste_exec;
- ot->poll= ED_operator_action_active;
+// ot->invoke = WM_operator_props_popup; // better wait for action redo panel
+ ot->exec = actkeys_paste_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, "Offset", "Paste time offset of keys");
@@ -639,20 +639,20 @@ static int actkeys_insertkey_exec(bContext *C, wmOperator *op)
void ACTION_OT_keyframe_insert (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Insert Keyframes";
- ot->idname= "ACTION_OT_keyframe_insert";
- ot->description= "Insert keyframes for the specified channels";
+ ot->name = "Insert Keyframes";
+ ot->idname = "ACTION_OT_keyframe_insert";
+ ot->description = "Insert keyframes for the specified channels";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= actkeys_insertkey_exec;
- ot->poll= ED_operator_action_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = actkeys_insertkey_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_actkeys_insertkey_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_actkeys_insertkey_types, 0, "Type", "");
}
/* ******************** Duplicate Keyframes Operator ************************* */
@@ -715,17 +715,17 @@ static int actkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED
void ACTION_OT_duplicate (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Duplicate Keyframes";
- ot->idname= "ACTION_OT_duplicate";
- ot->description= "Make a copy of all selected keyframes";
+ ot->name = "Duplicate Keyframes";
+ ot->idname = "ACTION_OT_duplicate";
+ ot->description = "Make a copy of all selected keyframes";
/* api callbacks */
- ot->invoke= actkeys_duplicate_invoke;
- ot->exec= actkeys_duplicate_exec;
- ot->poll= ED_operator_action_active;
+ ot->invoke = actkeys_duplicate_invoke;
+ ot->exec = actkeys_duplicate_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Delete Keyframes Operator ************************* */
@@ -790,17 +790,17 @@ static int actkeys_delete_exec(bContext *C, wmOperator *UNUSED(op))
void ACTION_OT_delete (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Keyframes";
- ot->idname= "ACTION_OT_delete";
- ot->description= "Remove all selected keyframes";
+ ot->name = "Delete Keyframes";
+ ot->idname = "ACTION_OT_delete";
+ ot->description = "Remove all selected keyframes";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= actkeys_delete_exec;
- ot->poll= ED_operator_action_active;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = actkeys_delete_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Clean Keyframes Operator ************************* */
@@ -854,20 +854,20 @@ static int actkeys_clean_exec(bContext *C, wmOperator *op)
void ACTION_OT_clean (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clean Keyframes";
- ot->idname= "ACTION_OT_clean";
- ot->description= "Simplify F-Curves by removing closely spaced keyframes";
+ ot->name = "Clean Keyframes";
+ ot->idname = "ACTION_OT_clean";
+ ot->description = "Simplify F-Curves by removing closely spaced keyframes";
/* api callbacks */
- //ot->invoke= // XXX we need that number popup for this!
- ot->exec= actkeys_clean_exec;
- ot->poll= ED_operator_action_active;
+ //ot->invoke = // XXX we need that number popup for this!
+ ot->exec = actkeys_clean_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 1000.0f);
+ ot->prop = RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 1000.0f);
}
/* ******************** Sample Keyframes Operator *********************** */
@@ -918,16 +918,16 @@ static int actkeys_sample_exec(bContext *C, wmOperator *UNUSED(op))
void ACTION_OT_sample (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Sample Keyframes";
- ot->idname= "ACTION_OT_sample";
- ot->description= "Add keyframes on every frame between the selected keyframes";
+ ot->name = "Sample Keyframes";
+ ot->idname = "ACTION_OT_sample";
+ ot->description = "Add keyframes on every frame between the selected keyframes";
/* api callbacks */
- ot->exec= actkeys_sample_exec;
- ot->poll= ED_operator_action_active;
+ ot->exec = actkeys_sample_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************************************************************************** */
@@ -1028,20 +1028,20 @@ static int actkeys_expo_exec(bContext *C, wmOperator *op)
void ACTION_OT_extrapolation_type (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Keyframe Extrapolation";
- ot->idname= "ACTION_OT_extrapolation_type";
- ot->description= "Set extrapolation mode for selected F-Curves";
+ ot->name = "Set Keyframe Extrapolation";
+ ot->idname = "ACTION_OT_extrapolation_type";
+ ot->description = "Set extrapolation mode for selected F-Curves";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= actkeys_expo_exec;
- ot->poll= ED_operator_action_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = actkeys_expo_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_actkeys_expo_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_actkeys_expo_types, 0, "Type", "");
}
/* ******************** Set Interpolation-Type Operator *********************** */
@@ -1099,20 +1099,20 @@ static int actkeys_ipo_exec(bContext *C, wmOperator *op)
void ACTION_OT_interpolation_type (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Keyframe Interpolation";
- ot->idname= "ACTION_OT_interpolation_type";
- ot->description= "Set interpolation mode for the F-Curve segments starting from the selected keyframes";
+ ot->name = "Set Keyframe Interpolation";
+ ot->idname = "ACTION_OT_interpolation_type";
+ ot->description = "Set interpolation mode for the F-Curve segments starting from the selected keyframes";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= actkeys_ipo_exec;
- ot->poll= ED_operator_action_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = actkeys_ipo_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", "");
}
/* ******************** Set Handle-Type Operator *********************** */
@@ -1179,20 +1179,20 @@ static int actkeys_handletype_exec(bContext *C, wmOperator *op)
void ACTION_OT_handle_type (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Keyframe Handle Type";
- ot->idname= "ACTION_OT_handle_type";
- ot->description= "Set type of handle for selected keyframes";
+ ot->name = "Set Keyframe Handle Type";
+ ot->idname = "ACTION_OT_handle_type";
+ ot->description = "Set type of handle for selected keyframes";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= actkeys_handletype_exec;
- ot->poll= ED_operator_action_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = actkeys_handletype_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", keyframe_handle_type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", keyframe_handle_type_items, 0, "Type", "");
}
/* ******************** Set Keyframe-Type Operator *********************** */
@@ -1250,20 +1250,20 @@ static int actkeys_keytype_exec(bContext *C, wmOperator *op)
void ACTION_OT_keyframe_type (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Keyframe Type";
- ot->idname= "ACTION_OT_keyframe_type";
- ot->description= "Set type of keyframe for the selected keyframes";
+ ot->name = "Set Keyframe Type";
+ ot->idname = "ACTION_OT_keyframe_type";
+ ot->description = "Set type of keyframe for the selected keyframes";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= actkeys_keytype_exec;
- ot->poll= ED_operator_action_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = actkeys_keytype_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", beztriple_keyframe_type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", beztriple_keyframe_type_items, 0, "Type", "");
}
/* ************************************************************************** */
@@ -1318,16 +1318,16 @@ static int actkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
void ACTION_OT_frame_jump (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Jump to Frame";
- ot->idname= "ACTION_OT_frame_jump";
- ot->description= "Set the current frame to the average frame of the selected keyframes";
+ ot->name = "Jump to Frame";
+ ot->idname = "ACTION_OT_frame_jump";
+ ot->description = "Set the current frame to the average frame of the selected keyframes";
/* api callbacks */
- ot->exec= actkeys_framejump_exec;
- ot->poll= ED_operator_action_active;
+ ot->exec = actkeys_framejump_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Snap Keyframes Operator *********************** */
@@ -1418,20 +1418,20 @@ static int actkeys_snap_exec(bContext *C, wmOperator *op)
void ACTION_OT_snap (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap Keys";
- ot->idname= "ACTION_OT_snap";
- ot->description= "Snap selected keyframes to the times specified";
+ ot->name = "Snap Keys";
+ ot->idname = "ACTION_OT_snap";
+ ot->description = "Snap selected keyframes to the times specified";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= actkeys_snap_exec;
- ot->poll= ED_operator_action_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = actkeys_snap_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_actkeys_snap_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_actkeys_snap_types, 0, "Type", "");
}
/* ******************** Mirror Keyframes Operator *********************** */
@@ -1532,20 +1532,20 @@ static int actkeys_mirror_exec(bContext *C, wmOperator *op)
void ACTION_OT_mirror (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mirror Keys";
- ot->idname= "ACTION_OT_mirror";
- ot->description= "Flip selected keyframes over the selected mirror line";
+ ot->name = "Mirror Keys";
+ ot->idname = "ACTION_OT_mirror";
+ ot->description = "Flip selected keyframes over the selected mirror line";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= actkeys_mirror_exec;
- ot->poll= ED_operator_action_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = actkeys_mirror_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_actkeys_mirror_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_actkeys_mirror_types, 0, "Type", "");
}
/* ************************************************************************** */
diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c
index d4e44dee9c3..f502a97967f 100644
--- a/source/blender/editors/space_action/action_ops.c
+++ b/source/blender/editors/space_action/action_ops.c
@@ -93,11 +93,11 @@ void ED_operatormacros_action(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot= WM_operatortype_append_macro("ACTION_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("ACTION_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
if (ot) {
- ot->description= "Make a copy of all selected keyframes and move them";
+ ot->description = "Make a copy of all selected keyframes and move them";
WM_operatortype_macro_define(ot, "ACTION_OT_duplicate");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
}
@@ -114,13 +114,13 @@ static void action_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
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);
- kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+ 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);
@@ -128,14 +128,14 @@ static void action_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
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);
+ 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_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST);
- kmi= WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
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);
+ kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
RNA_boolean_set(kmi->ptr, "extend", FALSE);
RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_RIGHT);
@@ -225,7 +225,7 @@ void action_keymap(wmKeyConfig *keyconf)
*/
/* keyframes */
- keymap= WM_keymap_find(keyconf, "Dopesheet", SPACE_ACTION, 0);
+ keymap = WM_keymap_find(keyconf, "Dopesheet", SPACE_ACTION, 0);
action_keymap_keyframes(keyconf, keymap);
}
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index 1b0b305b7aa..630bb75ed5d 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -161,19 +161,19 @@ static int actkeys_deselectall_exec(bContext *C, wmOperator *op)
void ACTION_OT_select_all_toggle (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select All";
- ot->idname= "ACTION_OT_select_all_toggle";
- ot->description= "Toggle selection of all keyframes";
+ ot->name = "Select All";
+ ot->idname = "ACTION_OT_select_all_toggle";
+ ot->description = "Toggle selection of all keyframes";
/* api callbacks */
- ot->exec= actkeys_deselectall_exec;
- ot->poll= ED_operator_action_active;
+ ot->exec = actkeys_deselectall_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- ot->prop= RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
+ ot->prop = RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
}
/* ******************** Border Select Operator **************************** */
@@ -281,10 +281,10 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op)
deselect_action_keys(&ac, 1, SELECT_SUBTRACT);
/* get settings from operator */
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
if (gesture_mode == GESTURE_MODAL_SELECT)
@@ -319,25 +319,25 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op)
void ACTION_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Select";
- ot->idname= "ACTION_OT_select_border";
- ot->description= "Select all keyframes within the specified region";
+ ot->name = "Border Select";
+ ot->idname = "ACTION_OT_select_border";
+ ot->description = "Select all keyframes within the specified region";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= actkeys_borderselect_exec;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = actkeys_borderselect_exec;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= ED_operator_action_active;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* rna */
WM_operator_properties_gesture_border(ot, TRUE);
- ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", "");
+ ot->prop = RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", "");
}
/* ******************** Column Select Operator **************************** */
@@ -527,19 +527,19 @@ static int actkeys_columnselect_exec(bContext *C, wmOperator *op)
void ACTION_OT_select_column (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select All";
- ot->idname= "ACTION_OT_select_column";
- ot->description= "Select all keyframes on the specified frame(s)";
+ ot->name = "Select All";
+ ot->idname = "ACTION_OT_select_column";
+ ot->description = "Select all keyframes on the specified frame(s)";
/* api callbacks */
- ot->exec= actkeys_columnselect_exec;
- ot->poll= ED_operator_action_active;
+ ot->exec = actkeys_columnselect_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- ot->prop= RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", "");
+ ot->prop = RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", "");
}
/* ******************** Select Linked Operator *********************** */
@@ -586,15 +586,15 @@ void ACTION_OT_select_linked (wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Linked";
- ot->idname= "ACTION_OT_select_linked";
+ ot->idname = "ACTION_OT_select_linked";
ot->description = "Select keyframes occurring in the same F-Curves as selected ones";
/* api callbacks */
- ot->exec= actkeys_select_linked_exec;
- ot->poll= ED_operator_action_active;
+ ot->exec = actkeys_select_linked_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
}
/* ******************** Select More/Less Operators *********************** */
@@ -663,15 +663,15 @@ void ACTION_OT_select_more (wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select More";
- ot->idname= "ACTION_OT_select_more";
+ ot->idname = "ACTION_OT_select_more";
ot->description = "Select keyframes beside already selected ones";
/* api callbacks */
- ot->exec= actkeys_select_more_exec;
- ot->poll= ED_operator_action_active;
+ ot->exec = actkeys_select_more_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
}
/* ----------------- */
@@ -697,15 +697,15 @@ void ACTION_OT_select_less (wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Less";
- ot->idname= "ACTION_OT_select_less";
+ ot->idname = "ACTION_OT_select_less";
ot->description = "Deselect keyframes on ends of selection islands";
/* api callbacks */
- ot->exec= actkeys_select_less_exec;
- ot->poll= ED_operator_action_active;
+ ot->exec = actkeys_select_less_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
}
/* ******************** Select Left/Right Operator ************************* */
@@ -785,7 +785,7 @@ static void actkeys_select_leftright (bAnimContext *ac, short leftright, short s
TimeMarker *marker;
for (marker= markers->first; marker; marker= marker->next) {
- if( ((leftright == ACTKEYS_LRSEL_LEFT) && (marker->frame < CFRA)) ||
+ if ( ((leftright == ACTKEYS_LRSEL_LEFT) && (marker->frame < CFRA)) ||
((leftright == ACTKEYS_LRSEL_RIGHT) && (marker->frame >= CFRA)) )
{
marker->flag |= SELECT;
@@ -863,20 +863,20 @@ static int actkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent
void ACTION_OT_select_leftright (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Left/Right";
- ot->idname= "ACTION_OT_select_leftright";
- ot->description= "Select keyframes to the left or the right of the current frame";
+ ot->name = "Select Left/Right";
+ ot->idname = "ACTION_OT_select_leftright";
+ ot->description = "Select keyframes to the left or the right of the current frame";
/* api callbacks */
- ot->invoke= actkeys_select_leftright_invoke;
- ot->exec= actkeys_select_leftright_exec;
- ot->poll= ED_operator_action_active;
+ ot->invoke = actkeys_select_leftright_invoke;
+ ot->exec = actkeys_select_leftright_exec;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "mode", prop_actkeys_leftright_select_types, ACTKEYS_LRSEL_TEST, "Mode", "");
+ ot->prop = RNA_def_enum(ot->srna, "mode", prop_actkeys_leftright_select_types, ACTKEYS_LRSEL_TEST, "Mode", "");
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", "");
}
@@ -1177,16 +1177,16 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
void ACTION_OT_clickselect (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mouse Select Keys";
- ot->idname= "ACTION_OT_clickselect";
- ot->description= "Select keyframes by clicking on them";
+ ot->name = "Mouse Select Keys";
+ ot->idname = "ACTION_OT_clickselect";
+ ot->description = "Select keyframes by clicking on them";
/* api callbacks - absolutely no exec() this yet... */
- ot->invoke= actkeys_clickselect_invoke;
- ot->poll= ED_operator_action_active;
+ ot->invoke = actkeys_clickselect_invoke;
+ ot->poll = ED_operator_action_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 7bda0c9a510..9d0dab7d34e 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -101,10 +101,10 @@ static SpaceLink *action_new(const bContext *C)
BLI_addtail(&saction->regionbase, ar);
ar->regiontype= RGN_TYPE_WINDOW;
- ar->v2d.tot.xmin= -10.0f;
- ar->v2d.tot.ymin= (float)(-sa->winy)/3.0f;
- ar->v2d.tot.xmax= (float)(sa->winx);
- ar->v2d.tot.ymax= 0.0f;
+ ar->v2d.tot.xmin = -10.0f;
+ ar->v2d.tot.ymin = (float)(-sa->winy)/3.0f;
+ ar->v2d.tot.xmax = (float)(sa->winx);
+ ar->v2d.tot.ymax = 0.0f;
ar->v2d.cur = ar->v2d.tot;
@@ -160,7 +160,7 @@ static void action_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "Dopesheet", SPACE_ACTION, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Dopesheet", SPACE_ACTION, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -223,7 +223,7 @@ static void action_channel_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "Animation Channels", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Animation Channels", 0, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -289,17 +289,17 @@ static void action_channel_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case ND_MODIFIER:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
}
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
default:
- if(wmn->data==ND_KEYS)
+ if (wmn->data==ND_KEYS)
ED_region_tag_redraw(ar);
}
}
@@ -341,12 +341,12 @@ static void action_main_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
default:
- if(wmn->data==ND_KEYS)
+ if (wmn->data==ND_KEYS)
ED_region_tag_redraw(ar);
}
}
@@ -438,7 +438,7 @@ static void action_header_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
}
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index b876003c059..31243184961 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -117,8 +117,8 @@ void ED_spacetypes_init(void)
/* register operators */
spacetypes = BKE_spacetypes_list();
- for(type=spacetypes->first; type; type=type->next) {
- if(type->operatortypes)
+ for (type=spacetypes->first; type; type=type->next) {
+ if (type->operatortypes)
type->operatortypes();
}
@@ -136,8 +136,8 @@ void ED_spacetypes_init(void)
/* register dropboxes (can use macros) */
spacetypes = BKE_spacetypes_list();
- for(type=spacetypes->first; type; type=type->next) {
- if(type->dropboxes)
+ for (type=spacetypes->first; type; type=type->next) {
+ if (type->dropboxes)
type->dropboxes();
}
@@ -169,11 +169,11 @@ void ED_spacetypes_keymap(wmKeyConfig *keyconf)
UI_view2d_keymap(keyconf);
spacetypes = BKE_spacetypes_list();
- for(stype=spacetypes->first; stype; stype=stype->next) {
- if(stype->keymap)
+ for (stype=spacetypes->first; stype; stype=stype->next) {
+ if (stype->keymap)
stype->keymap(keyconf);
- for(atype=stype->regiontypes.first; atype; atype=atype->next) {
- if(atype->keymap)
+ for (atype=stype->regiontypes.first; atype; atype=atype->next) {
+ if (atype->keymap)
atype->keymap(keyconf);
}
}
@@ -209,8 +209,8 @@ void ED_region_draw_cb_exit(ARegionType *art, void *handle)
{
RegionDrawCB *rdc;
- for(rdc= art->drawcalls.first; rdc; rdc= rdc->next) {
- if(rdc==(RegionDrawCB *)handle) {
+ for (rdc= art->drawcalls.first; rdc; rdc= rdc->next) {
+ if (rdc==(RegionDrawCB *)handle) {
BLI_remlink(&art->drawcalls, rdc);
MEM_freeN(rdc);
return;
@@ -227,8 +227,8 @@ void ED_region_draw_cb_draw(const bContext *C, ARegion *ar, int type)
{
RegionDrawCB *rdc;
- for(rdc= ar->type->drawcalls.first; rdc; rdc= rdc->next) {
- if(rdc->type==type)
+ for (rdc= ar->type->drawcalls.first; rdc; rdc= rdc->next) {
+ if (rdc->type==type)
rdc->draw(C, ar, rdc->customdata);
}
}
diff --git a/source/blender/editors/space_buttons/CMakeLists.txt b/source/blender/editors/space_buttons/CMakeLists.txt
index ee118f12062..7233d4623d1 100644
--- a/source/blender/editors/space_buttons/CMakeLists.txt
+++ b/source/blender/editors/space_buttons/CMakeLists.txt
@@ -44,4 +44,8 @@ set(SRC
buttons_intern.h
)
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_space_buttons "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/space_buttons/SConscript b/source/blender/editors/space_buttons/SConscript
index 7bc588c627c..92579b6dedf 100644
--- a/source/blender/editors/space_buttons/SConscript
+++ b/source/blender/editors/space_buttons/SConscript
@@ -9,4 +9,7 @@ incs += ' ../../bmesh ../../makesrna ../../render/extern/include ../../blenloade
defs = []
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
env.BlenderLib ( 'bf_editors_space_buttons', sources, Split(incs), defs, libtype=['core'], priority=[120] )
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 2b63e455e11..b698ec03668 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -70,10 +70,10 @@ static int set_pointer_type(ButsContextPath *path, bContextDataResult *result, S
PointerRNA *ptr;
int a;
- for(a=0; a<path->len; a++) {
+ for (a=0; a<path->len; a++) {
ptr= &path->ptr[a];
- if(RNA_struct_is_a(ptr->type, type)) {
+ if (RNA_struct_is_a(ptr->type, type)) {
CTX_data_pointer_set(result, ptr->id.data, ptr->type, ptr->data);
return 1;
}
@@ -87,10 +87,10 @@ static PointerRNA *get_pointer_type(ButsContextPath *path, StructRNA *type)
PointerRNA *ptr;
int a;
- for(a=0; a<path->len; a++) {
+ for (a=0; a<path->len; a++) {
ptr= &path->ptr[a];
- if(RNA_struct_is_a(ptr->type, type))
+ if (RNA_struct_is_a(ptr->type, type))
return ptr;
}
@@ -116,15 +116,15 @@ static int buttons_context_path_world(ButsContextPath *path)
PointerRNA *ptr= &path->ptr[path->len-1];
/* if we already have a (pinned) world, we're done */
- if(RNA_struct_is_a(ptr->type, &RNA_World)) {
+ if (RNA_struct_is_a(ptr->type, &RNA_World)) {
return 1;
}
/* if we have a scene, use the scene's world */
- else if(buttons_context_path_scene(path)) {
+ else if (buttons_context_path_scene(path)) {
scene= path->ptr[path->len-1].data;
world= scene->world;
- if(world) {
+ if (world) {
RNA_id_pointer_create(&scene->world->id, &path->ptr[path->len]);
path->len++;
return 1;
@@ -146,15 +146,15 @@ static int buttons_context_path_object(ButsContextPath *path)
PointerRNA *ptr= &path->ptr[path->len-1];
/* if we already have a (pinned) object, we're done */
- if(RNA_struct_is_a(ptr->type, &RNA_Object)) {
+ if (RNA_struct_is_a(ptr->type, &RNA_Object)) {
return 1;
}
/* if we have a scene, use the scene's active object */
- else if(buttons_context_path_scene(path)) {
+ else if (buttons_context_path_scene(path)) {
scene= path->ptr[path->len-1].data;
ob= (scene->basact)? scene->basact->object: NULL;
- if(ob) {
+ if (ob) {
RNA_id_pointer_create(&ob->id, &path->ptr[path->len]);
path->len++;
@@ -172,19 +172,19 @@ static int buttons_context_path_data(ButsContextPath *path, int type)
PointerRNA *ptr= &path->ptr[path->len-1];
/* if we already have a data, we're done */
- if(RNA_struct_is_a(ptr->type, &RNA_Mesh) && (type == -1 || type == OB_MESH)) return 1;
- else if(RNA_struct_is_a(ptr->type, &RNA_Curve) && (type == -1 || ELEM3(type, OB_CURVE, OB_SURF, OB_FONT))) return 1;
- else if(RNA_struct_is_a(ptr->type, &RNA_Armature) && (type == -1 || type == OB_ARMATURE)) return 1;
- else if(RNA_struct_is_a(ptr->type, &RNA_MetaBall) && (type == -1 || type == OB_MBALL)) return 1;
- else if(RNA_struct_is_a(ptr->type, &RNA_Lattice) && (type == -1 || type == OB_LATTICE)) return 1;
- else if(RNA_struct_is_a(ptr->type, &RNA_Camera) && (type == -1 || type == OB_CAMERA)) return 1;
- else if(RNA_struct_is_a(ptr->type, &RNA_Lamp) && (type == -1 || type == OB_LAMP)) return 1;
- else if(RNA_struct_is_a(ptr->type, &RNA_Speaker) && (type == -1 || type == OB_SPEAKER)) return 1;
+ if (RNA_struct_is_a(ptr->type, &RNA_Mesh) && (type == -1 || type == OB_MESH)) return 1;
+ else if (RNA_struct_is_a(ptr->type, &RNA_Curve) && (type == -1 || ELEM3(type, OB_CURVE, OB_SURF, OB_FONT))) return 1;
+ else if (RNA_struct_is_a(ptr->type, &RNA_Armature) && (type == -1 || type == OB_ARMATURE)) return 1;
+ else if (RNA_struct_is_a(ptr->type, &RNA_MetaBall) && (type == -1 || type == OB_MBALL)) return 1;
+ else if (RNA_struct_is_a(ptr->type, &RNA_Lattice) && (type == -1 || type == OB_LATTICE)) return 1;
+ else if (RNA_struct_is_a(ptr->type, &RNA_Camera) && (type == -1 || type == OB_CAMERA)) return 1;
+ else if (RNA_struct_is_a(ptr->type, &RNA_Lamp) && (type == -1 || type == OB_LAMP)) return 1;
+ else if (RNA_struct_is_a(ptr->type, &RNA_Speaker) && (type == -1 || type == OB_SPEAKER)) return 1;
/* try to get an object in the path, no pinning supported here */
- else if(buttons_context_path_object(path)) {
+ else if (buttons_context_path_object(path)) {
ob= path->ptr[path->len-1].data;
- if(ob && (type == -1 || type == ob->type)) {
+ if (ob && (type == -1 || type == ob->type)) {
RNA_id_pointer_create(ob->data, &path->ptr[path->len]);
path->len++;
@@ -200,10 +200,10 @@ static int buttons_context_path_modifier(ButsContextPath *path)
{
Object *ob;
- if(buttons_context_path_object(path)) {
+ if (buttons_context_path_object(path)) {
ob= path->ptr[path->len-1].data;
- if(ob && ELEM5(ob->type, OB_MESH, OB_CURVE, OB_FONT, OB_SURF, OB_LATTICE))
+ if (ob && ELEM5(ob->type, OB_MESH, OB_CURVE, OB_FONT, OB_SURF, OB_LATTICE))
return 1;
}
@@ -217,23 +217,23 @@ static int buttons_context_path_material(ButsContextPath *path, int for_texture)
Material *ma;
/* if we already have a (pinned) material, we're done */
- if(RNA_struct_is_a(ptr->type, &RNA_Material)) {
+ if (RNA_struct_is_a(ptr->type, &RNA_Material)) {
return 1;
}
/* if we have an object, use the object material slot */
- else if(buttons_context_path_object(path)) {
+ else if (buttons_context_path_object(path)) {
ob= path->ptr[path->len-1].data;
- if(ob && OB_TYPE_SUPPORT_MATERIAL(ob->type)) {
+ if (ob && OB_TYPE_SUPPORT_MATERIAL(ob->type)) {
ma= give_current_material(ob, ob->actcol);
RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
path->len++;
- if(for_texture && give_current_material_texture_node(ma))
+ if (for_texture && give_current_material_texture_node(ma))
return 1;
ma= give_node_material(ma);
- if(ma) {
+ if (ma) {
RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
path->len++;
}
@@ -251,11 +251,11 @@ static int buttons_context_path_bone(ButsContextPath *path)
EditBone *edbo;
/* if we have an armature, get the active bone */
- if(buttons_context_path_data(path, OB_ARMATURE)) {
+ if (buttons_context_path_data(path, OB_ARMATURE)) {
arm= path->ptr[path->len-1].data;
- if(arm->edbo) {
- if(arm->act_edbone) {
+ if (arm->edbo) {
+ if (arm->act_edbone) {
edbo= arm->act_edbone;
RNA_pointer_create(&arm->id, &RNA_EditBone, edbo, &path->ptr[path->len]);
path->len++;
@@ -263,7 +263,7 @@ static int buttons_context_path_bone(ButsContextPath *path)
}
}
else {
- if(arm->act_bone) {
+ if (arm->act_bone) {
RNA_pointer_create(&arm->id, &RNA_Bone, arm->act_bone, &path->ptr[path->len]);
path->len++;
return 1;
@@ -280,22 +280,22 @@ static int buttons_context_path_pose_bone(ButsContextPath *path)
PointerRNA *ptr= &path->ptr[path->len-1];
/* if we already have a (pinned) PoseBone, we're done */
- if(RNA_struct_is_a(ptr->type, &RNA_PoseBone)) {
+ if (RNA_struct_is_a(ptr->type, &RNA_PoseBone)) {
return 1;
}
/* if we have an armature, get the active bone */
- if(buttons_context_path_object(path)) {
+ if (buttons_context_path_object(path)) {
Object *ob= path->ptr[path->len-1].data;
bArmature *arm= ob->data; /* path->ptr[path->len-1].data - works too */
- if(ob->type != OB_ARMATURE || arm->edbo) {
+ if (ob->type != OB_ARMATURE || arm->edbo) {
return 0;
}
else {
- if(arm->act_bone) {
+ if (arm->act_bone) {
bPoseChannel *pchan= get_pose_channel(ob->pose, arm->act_bone->name);
- if(pchan) {
+ if (pchan) {
RNA_pointer_create(&ob->id, &RNA_PoseBone, pchan, &path->ptr[path->len]);
path->len++;
return 1;
@@ -316,14 +316,14 @@ static int buttons_context_path_particle(ButsContextPath *path)
PointerRNA *ptr= &path->ptr[path->len-1];
/* if we already have (pinned) particle settings, we're done */
- if(RNA_struct_is_a(ptr->type, &RNA_ParticleSettings)) {
+ if (RNA_struct_is_a(ptr->type, &RNA_ParticleSettings)) {
return 1;
}
/* if we have an object, get the active particle system */
- if(buttons_context_path_object(path)) {
+ if (buttons_context_path_object(path)) {
ob= path->ptr[path->len-1].data;
- if(ob && ob->type == OB_MESH) {
+ if (ob && ob->type == OB_MESH) {
psys= psys_get_current(ob);
RNA_pointer_create(&ob->id, &RNA_ParticleSystem, psys, &path->ptr[path->len]);
@@ -343,17 +343,17 @@ static int buttons_context_path_brush(ButsContextPath *path)
PointerRNA *ptr= &path->ptr[path->len-1];
/* if we already have a (pinned) brush, we're done */
- if(RNA_struct_is_a(ptr->type, &RNA_Brush)) {
+ if (RNA_struct_is_a(ptr->type, &RNA_Brush)) {
return 1;
}
/* if we have a scene, use the toolsettings brushes */
- else if(buttons_context_path_scene(path)) {
+ else if (buttons_context_path_scene(path)) {
scene= path->ptr[path->len-1].data;
- if(scene)
+ if (scene)
br= paint_brush(paint_get_active(scene));
- if(br) {
+ if (br) {
RNA_id_pointer_create((ID *)br, &path->ptr[path->len]);
path->len++;
@@ -367,36 +367,36 @@ static int buttons_context_path_brush(ButsContextPath *path)
static int buttons_context_path_texture(ButsContextPath *path, ButsContextTexture *ct)
{
- if(ct) {
+ if (ct) {
/* new shading system */
PointerRNA *ptr= &path->ptr[path->len-1];
ID *id;
/* if we already have a (pinned) texture, we're done */
- if(RNA_struct_is_a(ptr->type, &RNA_Texture))
+ if (RNA_struct_is_a(ptr->type, &RNA_Texture))
return 1;
- if(!ct->user)
+ if (!ct->user)
return 0;
id= ct->user->id;
- if(id) {
- if(GS(id->name) == ID_BR)
+ if (id) {
+ if (GS(id->name) == ID_BR)
buttons_context_path_brush(path);
- else if(GS(id->name) == ID_MA)
+ else if (GS(id->name) == ID_MA)
buttons_context_path_material(path, 0);
- else if(GS(id->name) == ID_WO)
+ else if (GS(id->name) == ID_WO)
buttons_context_path_world(path);
- else if(GS(id->name) == ID_LA)
+ else if (GS(id->name) == ID_LA)
buttons_context_path_data(path, OB_LAMP);
- else if(GS(id->name) == ID_PA)
+ else if (GS(id->name) == ID_PA)
buttons_context_path_particle(path);
- else if(GS(id->name) == ID_OB)
+ else if (GS(id->name) == ID_OB)
buttons_context_path_object(path);
}
- if(ct->texture) {
+ if (ct->texture) {
RNA_id_pointer_create(&ct->texture->id, &path->ptr[path->len]);
path->len++;
}
@@ -415,14 +415,14 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
int orig_len = path->len;
/* if we already have a (pinned) texture, we're done */
- if(RNA_struct_is_a(ptr->type, &RNA_Texture)) {
+ if (RNA_struct_is_a(ptr->type, &RNA_Texture)) {
return 1;
}
/* try brush */
- if((path->tex_ctx == SB_TEXC_BRUSH) && buttons_context_path_brush(path)) {
+ if ((path->tex_ctx == SB_TEXC_BRUSH) && buttons_context_path_brush(path)) {
br= path->ptr[path->len-1].data;
- if(br) {
+ if (br) {
tex= give_current_brush_texture(br);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
@@ -431,10 +431,10 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
}
}
/* try world */
- if((path->tex_ctx == SB_TEXC_WORLD) && buttons_context_path_world(path)) {
+ if ((path->tex_ctx == SB_TEXC_WORLD) && buttons_context_path_world(path)) {
wo= path->ptr[path->len-1].data;
- if(wo && GS(wo->id.name)==ID_WO) {
+ if (wo && GS(wo->id.name)==ID_WO) {
tex= give_current_world_texture(wo);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
@@ -443,8 +443,8 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
}
}
/* try particles */
- if((path->tex_ctx == SB_TEXC_PARTICLES) && buttons_context_path_particle(path)) {
- if(path->ptr[path->len-1].type == &RNA_ParticleSettings) {
+ if ((path->tex_ctx == SB_TEXC_PARTICLES) && buttons_context_path_particle(path)) {
+ if (path->ptr[path->len-1].type == &RNA_ParticleSettings) {
ParticleSettings *part = path->ptr[path->len-1].data;
tex= give_current_particle_texture(part);
@@ -455,7 +455,7 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
else {
psys= path->ptr[path->len-1].data;
- if(psys && psys->part && GS(psys->part->id.name)==ID_PA) {
+ if (psys && psys->part && GS(psys->part->id.name)==ID_PA) {
tex= give_current_particle_texture(psys->part);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
@@ -465,10 +465,10 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
}
}
/* try material */
- if(buttons_context_path_material(path, 1)) {
+ if (buttons_context_path_material(path, 1)) {
ma= path->ptr[path->len-1].data;
- if(ma) {
+ if (ma) {
tex= give_current_material_texture(ma);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
@@ -477,10 +477,10 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
}
}
/* try lamp */
- if(buttons_context_path_data(path, OB_LAMP)) {
+ if (buttons_context_path_data(path, OB_LAMP)) {
la= path->ptr[path->len-1].data;
- if(la) {
+ if (la) {
tex= give_current_lamp_texture(la);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
@@ -490,10 +490,10 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
}
/* try brushes again in case of no material, lamp, etc */
path->len = orig_len;
- if(buttons_context_path_brush(path)) {
+ if (buttons_context_path_brush(path)) {
br= path->ptr[path->len-1].data;
- if(br) {
+ if (br) {
tex= give_current_brush_texture(br);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
@@ -519,7 +519,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
path->tex_ctx = sbuts->texture_context;
/* if some ID datablock is pinned, set the root pointer */
- if(sbuts->pinid) {
+ if (sbuts->pinid) {
id= sbuts->pinid;
RNA_id_pointer_create(id, &path->ptr[0]);
@@ -527,7 +527,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
}
/* no pinned root, use scene as root */
- if(path->len == 0) {
+ if (path->len == 0) {
id= (ID*)CTX_data_scene(C);
RNA_id_pointer_create(id, &path->ptr[0]);
path->len++;
@@ -565,7 +565,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
break;
case BCONTEXT_BONE:
found= buttons_context_path_bone(path);
- if(!found)
+ if (!found)
found= buttons_context_path_data(path, OB_ARMATURE);
break;
case BCONTEXT_BONE_CONSTRAINT:
@@ -583,9 +583,9 @@ static int buttons_shading_context(const bContext *C, int mainb)
{
Object *ob= CTX_data_active_object(C);
- if(ELEM3(mainb, BCONTEXT_MATERIAL, BCONTEXT_WORLD, BCONTEXT_TEXTURE))
+ if (ELEM3(mainb, BCONTEXT_MATERIAL, BCONTEXT_WORLD, BCONTEXT_TEXTURE))
return 1;
- if(mainb == BCONTEXT_DATA && ob && ELEM(ob->type, OB_LAMP, OB_CAMERA))
+ if (mainb == BCONTEXT_DATA && ob && ELEM(ob->type, OB_LAMP, OB_CAMERA))
return 1;
return 0;
@@ -595,11 +595,11 @@ static int buttons_shading_new_context(const bContext *C, int flag)
{
Object *ob= CTX_data_active_object(C);
- if(flag & (1 << BCONTEXT_MATERIAL))
+ if (flag & (1 << BCONTEXT_MATERIAL))
return BCONTEXT_MATERIAL;
- else if(ob && ELEM(ob->type, OB_LAMP, OB_CAMERA) && (flag & (1 << BCONTEXT_DATA)))
+ else if (ob && ELEM(ob->type, OB_LAMP, OB_CAMERA) && (flag & (1 << BCONTEXT_DATA)))
return BCONTEXT_DATA;
- else if(flag & (1 << BCONTEXT_WORLD))
+ else if (flag & (1 << BCONTEXT_WORLD))
return BCONTEXT_WORLD;
return BCONTEXT_RENDER;
@@ -613,22 +613,22 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
buttons_texture_context_compute(C, sbuts);
- if(!sbuts->path)
+ if (!sbuts->path)
sbuts->path= MEM_callocN(sizeof(ButsContextPath), "ButsContextPath");
path= sbuts->path;
/* for each context, see if we can compute a valid path to it, if
* this is the case, we know we have to display the button */
- for(a=0; a<BCONTEXT_TOT; a++) {
- if(buttons_context_path(C, path, a, pflag)) {
+ for (a=0; a<BCONTEXT_TOT; a++) {
+ if (buttons_context_path(C, path, a, pflag)) {
flag |= (1<<a);
/* setting icon for data context */
- if(a == BCONTEXT_DATA) {
+ if (a == BCONTEXT_DATA) {
ptr= &path->ptr[path->len-1];
- if(ptr->type)
+ if (ptr->type)
sbuts->dataicon= RNA_struct_ui_icon(ptr->type);
else
sbuts->dataicon= ICON_EMPTY_DATA;
@@ -642,17 +642,17 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
sbuts->mainb= sbuts->mainbuser;
/* in case something becomes invalid, change */
- if((flag & (1 << sbuts->mainb)) == 0) {
- if(sbuts->flag & SB_SHADING_CONTEXT) {
+ if ((flag & (1 << sbuts->mainb)) == 0) {
+ if (sbuts->flag & SB_SHADING_CONTEXT) {
/* try to keep showing shading related buttons */
sbuts->mainb= buttons_shading_new_context(C, flag);
}
- else if(flag & BCONTEXT_OBJECT) {
+ else if (flag & BCONTEXT_OBJECT) {
sbuts->mainb= BCONTEXT_OBJECT;
}
else {
- for(a=0; a<BCONTEXT_TOT; a++) {
- if(flag & (1 << a)) {
+ for (a=0; a<BCONTEXT_TOT; a++) {
+ if (flag & (1 << a)) {
sbuts->mainb= a;
break;
}
@@ -662,14 +662,14 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
buttons_context_path(C, path, sbuts->mainb, pflag);
- if(!(flag & (1 << sbuts->mainb))) {
- if(flag & (1 << BCONTEXT_OBJECT))
+ if (!(flag & (1 << sbuts->mainb))) {
+ if (flag & (1 << BCONTEXT_OBJECT))
sbuts->mainb= BCONTEXT_OBJECT;
else
sbuts->mainb= BCONTEXT_SCENE;
}
- if(buttons_shading_context(C, sbuts->mainb))
+ if (buttons_shading_context(C, sbuts->mainb))
sbuts->flag |= SB_SHADING_CONTEXT;
else
sbuts->flag &= ~SB_SHADING_CONTEXT;
@@ -691,62 +691,62 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
SpaceButs *sbuts= CTX_wm_space_buts(C);
ButsContextPath *path= sbuts?sbuts->path:NULL;
- if(!path)
+ if (!path)
return 0;
/* here we handle context, getting data from precomputed path */
- if(CTX_data_dir(member)) {
+ if (CTX_data_dir(member)) {
CTX_data_dir_set(result, buttons_context_dir);
return 1;
}
- else if(CTX_data_equals(member, "world")) {
+ else if (CTX_data_equals(member, "world")) {
set_pointer_type(path, result, &RNA_World);
return 1;
}
- else if(CTX_data_equals(member, "object")) {
+ else if (CTX_data_equals(member, "object")) {
set_pointer_type(path, result, &RNA_Object);
return 1;
}
- else if(CTX_data_equals(member, "mesh")) {
+ else if (CTX_data_equals(member, "mesh")) {
set_pointer_type(path, result, &RNA_Mesh);
return 1;
}
- else if(CTX_data_equals(member, "armature")) {
+ else if (CTX_data_equals(member, "armature")) {
set_pointer_type(path, result, &RNA_Armature);
return 1;
}
- else if(CTX_data_equals(member, "lattice")) {
+ else if (CTX_data_equals(member, "lattice")) {
set_pointer_type(path, result, &RNA_Lattice);
return 1;
}
- else if(CTX_data_equals(member, "curve")) {
+ else if (CTX_data_equals(member, "curve")) {
set_pointer_type(path, result, &RNA_Curve);
return 1;
}
- else if(CTX_data_equals(member, "meta_ball")) {
+ else if (CTX_data_equals(member, "meta_ball")) {
set_pointer_type(path, result, &RNA_MetaBall);
return 1;
}
- else if(CTX_data_equals(member, "lamp")) {
+ else if (CTX_data_equals(member, "lamp")) {
set_pointer_type(path, result, &RNA_Lamp);
return 1;
}
- else if(CTX_data_equals(member, "camera")) {
+ else if (CTX_data_equals(member, "camera")) {
set_pointer_type(path, result, &RNA_Camera);
return 1;
}
- else if(CTX_data_equals(member, "speaker")) {
+ else if (CTX_data_equals(member, "speaker")) {
set_pointer_type(path, result, &RNA_Speaker);
return 1;
}
- else if(CTX_data_equals(member, "material")) {
+ else if (CTX_data_equals(member, "material")) {
set_pointer_type(path, result, &RNA_Material);
return 1;
}
- else if(CTX_data_equals(member, "texture")) {
+ else if (CTX_data_equals(member, "texture")) {
ButsContextTexture *ct= sbuts->texuser;
- if(ct) {
+ if (ct) {
/* new shading system */
CTX_data_pointer_set(result, &ct->texture->id, &RNA_Texture, ct->texture);
}
@@ -757,41 +757,41 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
return 1;
}
- else if(CTX_data_equals(member, "material_slot")) {
+ else if (CTX_data_equals(member, "material_slot")) {
PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
- if(ptr) {
+ if (ptr) {
Object *ob= ptr->data;
- if(ob && OB_TYPE_SUPPORT_MATERIAL(ob->type) && ob->totcol) {
+ if (ob && OB_TYPE_SUPPORT_MATERIAL(ob->type) && ob->totcol) {
/* a valid actcol isn't ensured [#27526] */
int matnr= ob->actcol-1;
- if(matnr < 0) matnr= 0;
+ if (matnr < 0) matnr= 0;
CTX_data_pointer_set(result, &ob->id, &RNA_MaterialSlot, &ob->mat[matnr]);
}
}
return 1;
}
- else if(CTX_data_equals(member, "texture_user")) {
+ else if (CTX_data_equals(member, "texture_user")) {
ButsContextTexture *ct= sbuts->texuser;
- if(!ct)
+ if (!ct)
return -1; /* old shading system (found but not available) */
- if(ct->user && ct->user->ptr.data) {
+ if (ct->user && ct->user->ptr.data) {
ButsTextureUser *user= ct->user;
CTX_data_pointer_set(result, user->ptr.id.data, user->ptr.type, user->ptr.data);
}
return 1;
}
- else if(CTX_data_equals(member, "texture_node")) {
+ else if (CTX_data_equals(member, "texture_node")) {
ButsContextTexture *ct= sbuts->texuser;
- if(ct) {
+ if (ct) {
/* new shading system */
- if(ct->user && ct->user->node)
+ if (ct->user && ct->user->node)
CTX_data_pointer_set(result, &ct->user->ntree->id, &RNA_Node, ct->user->node);
return 1;
@@ -800,10 +800,10 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
/* old shading system */
PointerRNA *ptr;
- if((ptr=get_pointer_type(path, &RNA_Material))) {
+ if ((ptr=get_pointer_type(path, &RNA_Material))) {
Material *ma= ptr->data;
- if(ma) {
+ if (ma) {
bNode *node= give_current_material_texture_node(ma);
CTX_data_pointer_set(result, &ma->nodetree->id, &RNA_Node, node);
}
@@ -812,18 +812,18 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
return 1;
}
}
- else if(CTX_data_equals(member, "texture_slot")) {
+ else if (CTX_data_equals(member, "texture_slot")) {
ButsContextTexture *ct= sbuts->texuser;
PointerRNA *ptr;
- if(ct)
+ if (ct)
return 0; /* new shading system */
- if((ptr=get_pointer_type(path, &RNA_Material))) {
+ if ((ptr=get_pointer_type(path, &RNA_Material))) {
Material *ma= ptr->data;
/* if we have a node material, get slot from material in material node */
- if(ma && ma->use_nodes && ma->nodetree) {
+ if (ma && ma->use_nodes && ma->nodetree) {
/* if there's an active texture node in the node tree,
* then that texture is in context directly, without a texture slot */
if (give_current_material_texture_node(ma))
@@ -834,84 +834,85 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
CTX_data_pointer_set(result, &ma->id, &RNA_MaterialTextureSlot, ma->mtex[(int)ma->texact]);
else
return 0;
- } else if(ma) {
+ }
+ else if (ma) {
CTX_data_pointer_set(result, &ma->id, &RNA_MaterialTextureSlot, ma->mtex[(int)ma->texact]);
}
}
- else if((ptr=get_pointer_type(path, &RNA_Lamp))) {
+ else if ((ptr=get_pointer_type(path, &RNA_Lamp))) {
Lamp *la= ptr->data;
- if(la)
+ if (la)
CTX_data_pointer_set(result, &la->id, &RNA_LampTextureSlot, la->mtex[(int)la->texact]);
}
- else if((ptr=get_pointer_type(path, &RNA_World))) {
+ else if ((ptr=get_pointer_type(path, &RNA_World))) {
World *wo= ptr->data;
- if(wo)
+ if (wo)
CTX_data_pointer_set(result, &wo->id, &RNA_WorldTextureSlot, wo->mtex[(int)wo->texact]);
}
- else if((ptr=get_pointer_type(path, &RNA_Brush))) { /* how to get this into context? */
+ else if ((ptr=get_pointer_type(path, &RNA_Brush))) { /* how to get this into context? */
Brush *br= ptr->data;
- if(br)
+ if (br)
CTX_data_pointer_set(result, &br->id, &RNA_BrushTextureSlot, &br->mtex);
}
- else if((ptr=get_pointer_type(path, &RNA_ParticleSystem))) {
+ else if ((ptr=get_pointer_type(path, &RNA_ParticleSystem))) {
ParticleSettings *part= ((ParticleSystem *)ptr->data)->part;
- if(part)
+ if (part)
CTX_data_pointer_set(result, &part->id, &RNA_ParticleSettingsTextureSlot, part->mtex[(int)part->texact]);
}
return 1;
}
- else if(CTX_data_equals(member, "bone")) {
+ else if (CTX_data_equals(member, "bone")) {
set_pointer_type(path, result, &RNA_Bone);
return 1;
}
- else if(CTX_data_equals(member, "edit_bone")) {
+ else if (CTX_data_equals(member, "edit_bone")) {
set_pointer_type(path, result, &RNA_EditBone);
return 1;
}
- else if(CTX_data_equals(member, "pose_bone")) {
+ else if (CTX_data_equals(member, "pose_bone")) {
set_pointer_type(path, result, &RNA_PoseBone);
return 1;
}
- else if(CTX_data_equals(member, "particle_system")) {
+ else if (CTX_data_equals(member, "particle_system")) {
set_pointer_type(path, result, &RNA_ParticleSystem);
return 1;
}
- else if(CTX_data_equals(member, "particle_system_editable")) {
- if(PE_poll((bContext*)C))
+ else if (CTX_data_equals(member, "particle_system_editable")) {
+ if (PE_poll((bContext*)C))
set_pointer_type(path, result, &RNA_ParticleSystem);
else
CTX_data_pointer_set(result, NULL, &RNA_ParticleSystem, NULL);
return 1;
}
- else if(CTX_data_equals(member, "cloth")) {
+ else if (CTX_data_equals(member, "cloth")) {
PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
- if(ptr && ptr->data) {
+ if (ptr && ptr->data) {
Object *ob= ptr->data;
ModifierData *md= modifiers_findByType(ob, eModifierType_Cloth);
CTX_data_pointer_set(result, &ob->id, &RNA_ClothModifier, md);
return 1;
}
}
- else if(CTX_data_equals(member, "soft_body")) {
+ else if (CTX_data_equals(member, "soft_body")) {
PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
- if(ptr && ptr->data) {
+ if (ptr && ptr->data) {
Object *ob= ptr->data;
ModifierData *md= modifiers_findByType(ob, eModifierType_Softbody);
CTX_data_pointer_set(result, &ob->id, &RNA_SoftBodyModifier, md);
return 1;
}
}
- else if(CTX_data_equals(member, "fluid")) {
+ else if (CTX_data_equals(member, "fluid")) {
PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
- if(ptr && ptr->data) {
+ if (ptr && ptr->data) {
Object *ob= ptr->data;
ModifierData *md= modifiers_findByType(ob, eModifierType_Fluidsim);
CTX_data_pointer_set(result, &ob->id, &RNA_FluidSimulationModifier, md);
@@ -919,34 +920,34 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
}
}
- else if(CTX_data_equals(member, "smoke")) {
+ else if (CTX_data_equals(member, "smoke")) {
PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
- if(ptr && ptr->data) {
+ if (ptr && ptr->data) {
Object *ob= ptr->data;
ModifierData *md= modifiers_findByType(ob, eModifierType_Smoke);
CTX_data_pointer_set(result, &ob->id, &RNA_SmokeModifier, md);
return 1;
}
}
- else if(CTX_data_equals(member, "collision")) {
+ else if (CTX_data_equals(member, "collision")) {
PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
- if(ptr && ptr->data) {
+ if (ptr && ptr->data) {
Object *ob= ptr->data;
ModifierData *md= modifiers_findByType(ob, eModifierType_Collision);
CTX_data_pointer_set(result, &ob->id, &RNA_CollisionModifier, md);
return 1;
}
}
- else if(CTX_data_equals(member, "brush")) {
+ else if (CTX_data_equals(member, "brush")) {
set_pointer_type(path, result, &RNA_Brush);
return 1;
}
- else if(CTX_data_equals(member, "dynamic_paint")) {
+ else if (CTX_data_equals(member, "dynamic_paint")) {
PointerRNA *ptr= get_pointer_type(path, &RNA_Object);
- if(ptr && ptr->data) {
+ if (ptr && ptr->data) {
Object *ob= ptr->data;
ModifierData *md= modifiers_findByType(ob, eModifierType_DynamicPaint);
CTX_data_pointer_set(result, &ob->id, &RNA_DynamicPaintModifier, md);
@@ -966,7 +967,7 @@ static void pin_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
{
SpaceButs *sbuts= CTX_wm_space_buts(C);
- if(sbuts->flag & SB_PIN_CONTEXT) {
+ if (sbuts->flag & SB_PIN_CONTEXT) {
sbuts->pinid= buttons_context_id_path(C);
}
else
@@ -986,7 +987,7 @@ void buttons_context_draw(const bContext *C, uiLayout *layout)
char namebuf[128], *name;
int a, icon;
- if(!path)
+ if (!path)
return;
row= uiLayoutRow(layout, 1);
@@ -994,27 +995,27 @@ void buttons_context_draw(const bContext *C, uiLayout *layout)
block= uiLayoutGetBlock(row);
uiBlockSetEmboss(block, UI_EMBOSSN);
- but= uiDefIconButBitC(block, ICONTOG, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag, 0, 0, 0, 0, "Follow context or keep fixed datablock displayed");
+ but = uiDefIconButBitC(block, ICONTOG, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag, 0, 0, 0, 0, "Follow context or keep fixed datablock displayed");
uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
uiButSetFunc(but, pin_cb, NULL, NULL);
- for(a=0; a<path->len; a++) {
+ for (a=0; a<path->len; a++) {
ptr= &path->ptr[a];
- if(a != 0)
+ if (a != 0)
uiItemL(row, "", VICO_SMALL_TRI_RIGHT_VEC);
- if(ptr->data) {
+ if (ptr->data) {
icon= RNA_struct_ui_icon(ptr->type);
name= RNA_struct_name_get_alloc(ptr, namebuf, sizeof(namebuf), NULL);
- if(name) {
- if(!ELEM(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE) && ptr->type == &RNA_Scene)
+ if (name) {
+ if (!ELEM(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE) && ptr->type == &RNA_Scene)
uiItemLDrag(row, ptr, "", icon); /* save some space */
else
uiItemLDrag(row, ptr, name, icon);
- if(name != namebuf)
+ if (name != namebuf)
MEM_freeN(name);
}
else
@@ -1047,19 +1048,19 @@ ID *buttons_context_id_path(const bContext *C)
PointerRNA *ptr;
int a;
- if(path->len) {
- for(a=path->len-1; a>=0; a--) {
+ if (path->len) {
+ for (a=path->len-1; a>=0; a--) {
ptr= &path->ptr[a];
/* pin particle settings instead of system, since only settings are an idblock*/
- if(sbuts->mainb == BCONTEXT_PARTICLE && sbuts->flag & SB_PIN_CONTEXT) {
- if(ptr->type == &RNA_ParticleSystem && ptr->data) {
+ if (sbuts->mainb == BCONTEXT_PARTICLE && sbuts->flag & SB_PIN_CONTEXT) {
+ if (ptr->type == &RNA_ParticleSystem && ptr->data) {
ParticleSystem *psys = (ParticleSystem *)ptr->data;
return &psys->part->id;
}
}
- if(ptr->id.data) {
+ if (ptr->id.data) {
return ptr->id.data;
}
}
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c
index 6777e2c2d85..fcc5b488ca9 100644
--- a/source/blender/editors/space_buttons/buttons_header.c
+++ b/source/blender/editors/space_buttons/buttons_header.c
@@ -63,7 +63,7 @@ static void set_texture_context(bContext *C, SpaceButs *sbuts)
case BCONTEXT_DATA:
{
Object *ob = CTX_data_active_object(C);
- if(ob && ob->type==OB_LAMP)
+ if (ob && ob->type==OB_LAMP)
sbuts->texture_context = SB_TEXC_MAT_OR_LAMP;
break;
}
@@ -80,7 +80,7 @@ static void do_buttons_buttons(bContext *C, void *UNUSED(arg), int event)
{
SpaceButs *sbuts= CTX_wm_space_buts(C);
- if(!sbuts) /* editor type switch */
+ if (!sbuts) /* editor type switch */
return;
switch(event) {
@@ -122,8 +122,8 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
uiBlockBeginAlign(block);
#define BUTTON_HEADER_CTX(_ctx, _icon, _tip) \
- if(sbuts->pathflag & (1<<_ctx)) { \
- but= uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, _icon, xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, &(sbuts->mainb), 0.0, (float)_ctx, 0, 0, TIP_(_tip)); \
+ if (sbuts->pathflag & (1<<_ctx)) { \
+ but = uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, _icon, xco+=BUT_UNIT_X, yco, BUT_UNIT_X, UI_UNIT_Y, &(sbuts->mainb), 0.0, (float)_ctx, 0, 0, TIP_(_tip)); \
uiButClearFlag(but, UI_BUT_UNDO); \
} \
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 26516bcda99..ec1c74013e0 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -81,13 +81,13 @@ static int toolbox_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(e
void BUTTONS_OT_toolbox(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toolbox";
- ot->description="Display button panel toolbox";
- ot->idname= "BUTTONS_OT_toolbox";
+ ot->name = "Toolbox";
+ ot->description = "Display button panel toolbox";
+ ot->idname = "BUTTONS_OT_toolbox";
/* api callbacks */
- ot->invoke= toolbox_invoke;
- ot->poll= ED_operator_buttons_active;
+ ot->invoke = toolbox_invoke;
+ ot->poll = ED_operator_buttons_active;
}
/********************** filebrowse operator *********************/
@@ -110,7 +110,7 @@ static int file_browse_exec(bContext *C, wmOperator *op)
str= RNA_string_get_alloc(op->ptr, path_prop, NULL, 0);
/* add slash for directories, important for some properties */
- if(RNA_property_subtype(fbo->prop) == PROP_DIRPATH) {
+ if (RNA_property_subtype(fbo->prop) == PROP_DIRPATH) {
char name[FILE_MAX];
id = fbo->ptr.id.data;
@@ -118,7 +118,7 @@ static int file_browse_exec(bContext *C, wmOperator *op)
BLI_strncpy(path, str, FILE_MAX);
BLI_path_abs(path, id ? ID_BLEND_PATH(G.main, id) : G.main->name);
- if(BLI_is_dir(path)) {
+ if (BLI_is_dir(path)) {
str = MEM_reallocN(str, strlen(str)+2);
BLI_add_slash(str);
}
@@ -134,8 +134,8 @@ static int file_browse_exec(bContext *C, wmOperator *op)
/* special, annoying exception, filesel on redo panel [#26618] */
{
wmOperator *redo_op= WM_operator_last_redo(C);
- if(redo_op) {
- if(fbo->ptr.data == redo_op->ptr->data) {
+ if (redo_op) {
+ if (fbo->ptr.data == redo_op->ptr->data) {
ED_undo_operator_repeat(C, redo_op);
}
}
@@ -168,19 +168,19 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event)
uiFileBrowseContextProperty(C, &ptr, &prop);
- if(!prop)
+ if (!prop)
return OPERATOR_CANCELLED;
str= RNA_property_string_get_alloc(&ptr, prop, NULL, 0, NULL);
/* useful yet irritating feature, Shift+Click to open the file
* Alt+Click to browse a folder in the OS's browser */
- if(event->shift || event->alt) {
+ if (event->shift || event->alt) {
PointerRNA props_ptr;
- if(event->alt) {
+ if (event->alt) {
char *lslash= BLI_last_slash(str);
- if(lslash)
+ if (lslash)
*lslash= '\0';
}
@@ -205,8 +205,8 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* normally ED_fileselect_get_params would handle this but we need to because of stupid
* user-prefs exception - campbell */
- if(RNA_struct_find_property(op->ptr, "relative_path")) {
- if(!RNA_struct_property_is_set(op->ptr, "relative_path")) {
+ if (RNA_struct_find_property(op->ptr, "relative_path")) {
+ if (!RNA_struct_property_is_set(op->ptr, "relative_path")) {
/* annoying exception!, if were dealign with the user prefs, default relative to be off */
RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS && (ptr.data != &U));
}
@@ -220,14 +220,14 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event)
void BUTTONS_OT_file_browse(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Accept";
- ot->description="Open a file browser, Hold Shift to open the file, Alt to browse containing directory";
- ot->idname= "BUTTONS_OT_file_browse";
+ ot->name = "Accept";
+ ot->description = "Open a file browser, Hold Shift to open the file, Alt to browse containing directory";
+ ot->idname = "BUTTONS_OT_file_browse";
/* api callbacks */
- ot->invoke= file_browse_invoke;
- ot->exec= file_browse_exec;
- ot->cancel= file_browse_cancel;
+ ot->invoke = file_browse_invoke;
+ ot->exec = file_browse_exec;
+ ot->cancel = file_browse_cancel;
/* properties */
WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
@@ -237,14 +237,14 @@ void BUTTONS_OT_file_browse(wmOperatorType *ot)
void BUTTONS_OT_directory_browse(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Accept";
- ot->description="Open a directory browser, Hold Shift to open the file, Alt to browse containing directory";
- ot->idname= "BUTTONS_OT_directory_browse";
+ ot->name = "Accept";
+ ot->description = "Open a directory browser, Hold Shift to open the file, Alt to browse containing directory";
+ ot->idname = "BUTTONS_OT_directory_browse";
/* api callbacks */
- ot->invoke= file_browse_invoke;
- ot->exec= file_browse_exec;
- ot->cancel= file_browse_cancel;
+ ot->invoke = file_browse_invoke;
+ ot->exec = file_browse_exec;
+ ot->cancel = file_browse_cancel;
/* properties */
WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c
index fb46dd55a12..ba37cb8a892 100644
--- a/source/blender/editors/space_buttons/buttons_texture.c
+++ b/source/blender/editors/space_buttons/buttons_texture.c
@@ -111,9 +111,9 @@ static void buttons_texture_users_find_nodetree(ListBase *users, ID *id,
{
bNode *node;
- if(ntree) {
- for(node=ntree->nodes.first; node; node=node->next) {
- if(node->typeinfo->nclass == NODE_CLASS_TEXTURE) {
+ if (ntree) {
+ for (node=ntree->nodes.first; node; node=node->next) {
+ if (node->typeinfo->nclass == NODE_CLASS_TEXTURE) {
PointerRNA ptr;
/* PropertyRNA *prop; */ /* UNUSED */
@@ -123,7 +123,7 @@ static void buttons_texture_users_find_nodetree(ListBase *users, ID *id,
buttons_texture_user_node_add(users, id, ntree, node,
category, RNA_struct_ui_icon(ptr.type), node->name);
}
- else if(node->type == NODE_GROUP && node->id) {
+ else if (node->type == NODE_GROUP && node->id) {
buttons_texture_users_find_nodetree(users, id, (bNodeTree*)node->id, category);
}
}
@@ -154,46 +154,46 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
ID *pinid = sbuts->pinid;
/* get data from context */
- if(pinid) {
- if(GS(pinid->name) == ID_SCE)
+ if (pinid) {
+ if (GS(pinid->name) == ID_SCE)
scene= (Scene*)pinid;
- else if(GS(pinid->name) == ID_OB)
+ else if (GS(pinid->name) == ID_OB)
ob= (Object*)pinid;
- else if(GS(pinid->name) == ID_LA)
+ else if (GS(pinid->name) == ID_LA)
la= (Lamp*)pinid;
- else if(GS(pinid->name) == ID_WO)
+ else if (GS(pinid->name) == ID_WO)
wrld= (World*)pinid;
- else if(GS(pinid->name) == ID_MA)
+ else if (GS(pinid->name) == ID_MA)
ma= (Material*)pinid;
- else if(GS(pinid->name) == ID_BR)
+ else if (GS(pinid->name) == ID_BR)
brush= (Brush*)pinid;
}
- if(!scene)
+ if (!scene)
scene= CTX_data_scene(C);
- if(!(pinid || pinid == &scene->id)) {
+ if (!(pinid || pinid == &scene->id)) {
ob= (scene->basact)? scene->basact->object: NULL;
wrld= scene->world;
brush= paint_brush(paint_get_active(scene));
}
- if(ob && ob->type == OB_LAMP && !la)
+ if (ob && ob->type == OB_LAMP && !la)
la= ob->data;
- if(ob && !ma)
+ if (ob && !ma)
ma= give_current_material(ob, ob->actcol);
/* fill users */
users->first = users->last = NULL;
- if(ma)
+ if (ma)
buttons_texture_users_find_nodetree(users, &ma->id, ma->nodetree, "Material");
- if(la)
+ if (la)
buttons_texture_users_find_nodetree(users, &la->id, la->nodetree, "Lamp");
- if(wrld)
+ if (wrld)
buttons_texture_users_find_nodetree(users, &wrld->id, wrld->nodetree, "World");
- if(ob) {
+ if (ob) {
ParticleSystem *psys= psys_get_current(ob);
MTex *mtex;
int a;
@@ -202,12 +202,12 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
modifiers_foreachTexLink(ob, buttons_texture_modifier_foreach, users);
/* particle systems */
- if(psys) {
+ if (psys) {
/* todo: these slots are not in the UI */
- for(a=0; a<MAX_MTEX; a++) {
+ for (a=0; a<MAX_MTEX; a++) {
mtex = psys->part->mtex[a];
- if(mtex) {
+ if (mtex) {
PointerRNA ptr;
PropertyRNA *prop;
@@ -221,7 +221,7 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
}
/* field */
- if(ob->pd && ob->pd->forcefield == PFIELD_TEXTURE) {
+ if (ob->pd && ob->pd->forcefield == PFIELD_TEXTURE) {
PointerRNA ptr;
PropertyRNA *prop;
@@ -234,7 +234,7 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
}
/* brush */
- if(brush) {
+ if (brush) {
PointerRNA ptr;
PropertyRNA *prop;
@@ -253,8 +253,8 @@ void buttons_texture_context_compute(const bContext *C, SpaceButs *sbuts)
ButsContextTexture *ct= sbuts->texuser;
Scene *scene= CTX_data_scene(C);
- if(!scene_use_new_shading_nodes(scene)) {
- if(ct) {
+ if (!scene_use_new_shading_nodes(scene)) {
+ if (ct) {
BLI_freelistN(&ct->users);
MEM_freeN(ct);
sbuts->texuser= NULL;
@@ -263,7 +263,7 @@ void buttons_texture_context_compute(const bContext *C, SpaceButs *sbuts)
return;
}
- if(!ct) {
+ if (!ct) {
ct= MEM_callocN(sizeof(ButsContextTexture), "ButsContextTexture");
sbuts->texuser= ct;
}
@@ -274,14 +274,14 @@ void buttons_texture_context_compute(const bContext *C, SpaceButs *sbuts)
buttons_texture_users_from_context(&ct->users, C, sbuts);
/* set one user as active based on active index */
- if(ct->index >= BLI_countlist(&ct->users))
+ if (ct->index >= BLI_countlist(&ct->users))
ct->index= 0;
ct->user = BLI_findlink(&ct->users, ct->index);
ct->texture = NULL;
- if(ct->user) {
- if(ct->user->ptr.data) {
+ if (ct->user) {
+ if (ct->user->ptr.data) {
PointerRNA texptr;
Tex *tex;
@@ -291,14 +291,14 @@ void buttons_texture_context_compute(const bContext *C, SpaceButs *sbuts)
ct->texture = tex;
}
- else if(ct->user->node && !(ct->user->node->flag & NODE_ACTIVE_TEXTURE)) {
+ else if (ct->user->node && !(ct->user->node->flag & NODE_ACTIVE_TEXTURE)) {
ButsTextureUser *user;
/* detect change of active texture node in same node tree, in that
* case we also automatically switch to the other node */
- for(user=ct->users.first; user; user=user->next) {
- if(user->ntree == ct->user->ntree && user->node != ct->user->node) {
- if(user->node->flag & NODE_ACTIVE_TEXTURE) {
+ for (user=ct->users.first; user; user=user->next) {
+ if (user->ntree == ct->user->ntree && user->node != ct->user->node) {
+ if (user->node->flag & NODE_ACTIVE_TEXTURE) {
ct->user = user;
ct->index = BLI_findindex(&ct->users, user);
break;
@@ -318,11 +318,11 @@ static void template_texture_select(bContext *C, void *user_p, void *UNUSED(arg)
PointerRNA texptr;
Tex *tex;
- if(!ct)
+ if (!ct)
return;
/* set user as active */
- if(user->node) {
+ if (user->node) {
ED_node_set_active(CTX_data_main(C), user->ntree, user->node);
ct->texture = NULL;
}
@@ -346,12 +346,12 @@ static void template_texture_user_menu(bContext *C, uiLayout *layout, void *UNUS
uiBlock *block = uiLayoutGetBlock(layout);
const char *last_category = NULL;
- for(user=ct->users.first; user; user=user->next) {
+ for (user=ct->users.first; user; user=user->next) {
uiBut *but;
char name[UI_MAX_NAME_STR];
/* add label per category */
- if(!last_category || strcmp(last_category, user->category) != 0) {
+ if (!last_category || strcmp(last_category, user->category) != 0) {
uiItemL(layout, user->category, ICON_NONE);
but= block->buttons.last;
but->flag= UI_TEXT_LEFT;
@@ -380,13 +380,13 @@ void uiTemplateTextureUser(uiLayout *layout, bContext *C)
ButsTextureUser *user;
char name[UI_MAX_NAME_STR];
- if(!ct)
+ if (!ct)
return;
/* get current user */
user= ct->user;
- if(!user) {
+ if (!user) {
uiItemL(layout, "No textures in context.", ICON_NONE);
return;
}
@@ -394,12 +394,12 @@ void uiTemplateTextureUser(uiLayout *layout, bContext *C)
/* create button */
BLI_snprintf(name, UI_MAX_NAME_STR, "%s", user->name);
- if(user->icon) {
- but= uiDefIconTextMenuBut(block, template_texture_user_menu, NULL,
+ if (user->icon) {
+ but = uiDefIconTextMenuBut(block, template_texture_user_menu, NULL,
user->icon, name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y, "");
}
else {
- but= uiDefMenuBut(block, template_texture_user_menu, NULL,
+ but = uiDefMenuBut(block, template_texture_user_menu, NULL,
name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y, "");
}
@@ -417,14 +417,14 @@ static void template_texture_show(bContext *C, void *data_p, void *prop_p)
ButsContextTexture *ct= (sbuts)? sbuts->texuser: NULL;
ButsTextureUser *user;
- if(!ct)
+ if (!ct)
return;
- for(user=ct->users.first; user; user=user->next)
- if(user->ptr.data == data_p && user->prop == prop_p)
+ for (user=ct->users.first; user; user=user->next)
+ if (user->ptr.data == data_p && user->prop == prop_p)
break;
- if(user) {
+ if (user) {
/* select texture */
template_texture_select(C, user, NULL);
@@ -446,20 +446,20 @@ void uiTemplateTextureShow(uiLayout *layout, bContext *C, PointerRNA *ptr, Prope
ButsTextureUser *user;
/* only show button in other tabs in properties editor */
- if(!ct || sbuts->mainb == BCONTEXT_TEXTURE)
+ if (!ct || sbuts->mainb == BCONTEXT_TEXTURE)
return;
/* find corresponding texture user */
- for(user=ct->users.first; user; user=user->next)
- if(user->ptr.data == ptr->data && user->prop == prop)
+ for (user=ct->users.first; user; user=user->next)
+ if (user->ptr.data == ptr->data && user->prop == prop)
break;
/* draw button */
- if(user) {
+ if (user) {
uiBlock *block = uiLayoutGetBlock(layout);
uiBut *but;
- but= uiDefIconBut(block, BUT, 0, ICON_BUTS, 0, 0, UI_UNIT_X, UI_UNIT_Y,
+ but = uiDefIconBut(block, BUT, 0, ICON_BUTS, 0, 0, UI_UNIT_X, UI_UNIT_Y,
NULL, 0.0, 0.0, 0.0, 0.0, "Show texture in texture tab");
uiButSetFunc(but, template_texture_show, user->ptr.data, user->prop);
}
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 23dd99ab73d..b29e79aeb67 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -97,10 +97,10 @@ static void buttons_free(SpaceLink *sl)
{
SpaceButs *sbuts= (SpaceButs*) sl;
- if(sbuts->path)
+ if (sbuts->path)
MEM_freeN(sbuts->path);
- if(sbuts->texuser) {
+ if (sbuts->texuser) {
ButsContextTexture *ct= sbuts->texuser;
BLI_freelistN(&ct->users);
MEM_freeN(ct);
@@ -113,8 +113,8 @@ static void buttons_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
SpaceButs *sbuts= sa->spacedata.first;
/* auto-align based on size */
- if(sbuts->align == BUT_AUTO || !sbuts->align) {
- if(sa->winx > sa->winy)
+ if (sbuts->align == BUT_AUTO || !sbuts->align) {
+ if (sa->winx > sa->winy)
sbuts->align= BUT_HORIZONTAL;
else
sbuts->align= BUT_VERTICAL;
@@ -139,7 +139,7 @@ static void buttons_main_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_find(wm->defaultconf, "Property Editor", SPACE_BUTS, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Property Editor", SPACE_BUTS, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -151,31 +151,31 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar)
buttons_context_compute(C, sbuts);
- if(sbuts->mainb == BCONTEXT_SCENE)
+ if (sbuts->mainb == BCONTEXT_SCENE)
ED_region_panels(C, ar, vertical, "scene", sbuts->mainb);
- else if(sbuts->mainb == BCONTEXT_RENDER)
+ else if (sbuts->mainb == BCONTEXT_RENDER)
ED_region_panels(C, ar, vertical, "render", sbuts->mainb);
- else if(sbuts->mainb == BCONTEXT_WORLD)
+ else if (sbuts->mainb == BCONTEXT_WORLD)
ED_region_panels(C, ar, vertical, "world", sbuts->mainb);
- else if(sbuts->mainb == BCONTEXT_OBJECT)
+ else if (sbuts->mainb == BCONTEXT_OBJECT)
ED_region_panels(C, ar, vertical, "object", sbuts->mainb);
- else if(sbuts->mainb == BCONTEXT_DATA)
+ else if (sbuts->mainb == BCONTEXT_DATA)
ED_region_panels(C, ar, vertical, "data", sbuts->mainb);
- else if(sbuts->mainb == BCONTEXT_MATERIAL)
+ else if (sbuts->mainb == BCONTEXT_MATERIAL)
ED_region_panels(C, ar, vertical, "material", sbuts->mainb);
- else if(sbuts->mainb == BCONTEXT_TEXTURE)
+ else if (sbuts->mainb == BCONTEXT_TEXTURE)
ED_region_panels(C, ar, vertical, "texture", sbuts->mainb);
- else if(sbuts->mainb == BCONTEXT_PARTICLE)
+ else if (sbuts->mainb == BCONTEXT_PARTICLE)
ED_region_panels(C, ar, vertical, "particle", sbuts->mainb);
- else if(sbuts->mainb == BCONTEXT_PHYSICS)
+ else if (sbuts->mainb == BCONTEXT_PHYSICS)
ED_region_panels(C, ar, vertical, "physics", sbuts->mainb);
- else if(sbuts->mainb == BCONTEXT_BONE)
+ else if (sbuts->mainb == BCONTEXT_BONE)
ED_region_panels(C, ar, vertical, "bone", sbuts->mainb);
- else if(sbuts->mainb == BCONTEXT_MODIFIER)
+ else if (sbuts->mainb == BCONTEXT_MODIFIER)
ED_region_panels(C, ar, vertical, "modifier", sbuts->mainb);
else if (sbuts->mainb == BCONTEXT_CONSTRAINT)
ED_region_panels(C, ar, vertical, "constraint", sbuts->mainb);
- else if(sbuts->mainb == BCONTEXT_BONE_CONSTRAINT)
+ else if (sbuts->mainb == BCONTEXT_BONE_CONSTRAINT)
ED_region_panels(C, ar, vertical, "bone_constraint", sbuts->mainb);
sbuts->re_align= 0;
@@ -191,7 +191,7 @@ static void buttons_operatortypes(void)
static void buttons_keymap(struct wmKeyConfig *keyconf)
{
- wmKeyMap *keymap= WM_keymap_find(keyconf, "Property Editor", SPACE_BUTS, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "Property Editor", SPACE_BUTS, 0);
WM_keymap_add_item(keymap, "BUTTONS_OT_toolbox", RIGHTMOUSE, KM_PRESS, 0, 0);
}
@@ -224,7 +224,7 @@ static void buttons_area_redraw(ScrArea *sa, short buttons)
SpaceButs *sbuts= sa->spacedata.first;
/* if the area's current button set is equal to the one to redraw */
- if(sbuts->mainb == buttons)
+ if (sbuts->mainb == buttons)
ED_area_tag_redraw(sa);
}
@@ -273,9 +273,10 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
case ND_BONE_SELECT:
buttons_area_redraw(sa, BCONTEXT_BONE);
buttons_area_redraw(sa, BCONTEXT_BONE_CONSTRAINT);
+ buttons_area_redraw(sa, BCONTEXT_DATA);
break;
case ND_MODIFIER:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_area_tag_redraw(sa);
else
buttons_area_redraw(sa, BCONTEXT_MODIFIER);
@@ -341,11 +342,11 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
sbuts->preview= 1;
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_PROPERTIES)
+ if (wmn->data == ND_SPACE_PROPERTIES)
ED_area_tag_redraw(sa);
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_area_tag_redraw(sa);
break;
case NC_ANIMATION:
@@ -357,10 +358,10 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_NODE:
- if(wmn->action==NA_SELECTED) {
+ if (wmn->action==NA_SELECTED) {
ED_area_tag_redraw(sa);
/* new active node, update texture preview */
- if(sbuts->mainb == BCONTEXT_TEXTURE)
+ if (sbuts->mainb == BCONTEXT_TEXTURE)
sbuts->preview= 1;
}
break;
@@ -375,7 +376,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
break;
}
- if(wmn->data == ND_KEYS)
+ if (wmn->data == ND_KEYS)
ED_area_tag_redraw(sa);
}
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c
index ddfd403806c..bb816d1b8b2 100644
--- a/source/blender/editors/space_clip/clip_buttons.c
+++ b/source/blender/editors/space_clip/clip_buttons.c
@@ -85,17 +85,17 @@ void uiTemplateMovieClip(uiLayout *layout, bContext *C, PointerRNA *ptr, const c
uiLayout *row, *split;
uiBlock *block;
- if(!ptr->data)
+ if (!ptr->data)
return;
prop= RNA_struct_find_property(ptr, propname);
- if(!prop) {
+ if (!prop) {
printf("%s: property not found: %s.%s\n",
__func__, RNA_struct_identifier(ptr->type), propname);
return;
}
- if(RNA_property_type(prop) != PROP_POINTER) {
+ if (RNA_property_type(prop) != PROP_POINTER) {
printf("%s: expected pointer property for %s.%s\n",
__func__, RNA_struct_identifier(ptr->type), propname);
return;
@@ -106,10 +106,10 @@ void uiTemplateMovieClip(uiLayout *layout, bContext *C, PointerRNA *ptr, const c
uiLayoutSetContextPointer(layout, "edit_movieclip", &clipptr);
- if(!compact)
+ if (!compact)
uiTemplateID(layout, C, ptr, propname, NULL, "CLIP_OT_open", NULL);
- if(clip) {
+ if (clip) {
row= uiLayoutRow(layout, 0);
block= uiLayoutGetBlock(row);
uiDefBut(block, LABEL, 0, "File Path:", 0, 19, 145, 19, NULL, 0, 0, 0, 0, "");
@@ -133,17 +133,17 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname)
rctf rect;
MovieClipScopes *scopes;
- if(!ptr->data)
+ if (!ptr->data)
return;
prop= RNA_struct_find_property(ptr, propname);
- if(!prop) {
+ if (!prop) {
printf("%s: property not found: %s.%s\n",
__func__, RNA_struct_identifier(ptr->type), propname);
return;
}
- if(RNA_property_type(prop) != PROP_POINTER) {
+ if (RNA_property_type(prop) != PROP_POINTER) {
printf("%s: expected pointer property for %s.%s\n",
__func__, RNA_struct_identifier(ptr->type), propname);
return;
@@ -152,8 +152,8 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname)
scopesptr= RNA_property_pointer_get(ptr, prop);
scopes= (MovieClipScopes *)scopesptr.data;
- rect.xmin= 0; rect.xmax= 200;
- rect.ymin= 0; rect.ymax= 120;
+ rect.xmin = 0; rect.xmax = 200;
+ rect.ymin = 0; rect.ymax = 120;
block= uiLayoutAbsoluteBlock(layout);
@@ -198,7 +198,7 @@ static void marker_update_cb(bContext *C, void *arg_cb, void *UNUSED(arg))
MarkerUpdateCb *cb= (MarkerUpdateCb*) arg_cb;
MovieTrackingMarker *marker;
- if(!cb->compact)
+ if (!cb->compact)
return;
marker= BKE_tracking_ensure_marker(cb->track, cb->framenr);
@@ -218,7 +218,7 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
marker= BKE_tracking_ensure_marker(cb->track, cb->framenr);
- if(event==B_MARKER_POS) {
+ if (event==B_MARKER_POS) {
marker->pos[0]= cb->marker_pos[0]/width;
marker->pos[1]= cb->marker_pos[1]/height;
@@ -228,7 +228,7 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
ok= 1;
}
- else if(event==B_MARKER_PAT_DIM) {
+ else if (event==B_MARKER_PAT_DIM) {
float dim[2], pat_dim[2];
sub_v2_v2v2(pat_dim, cb->track->pat_max, cb->track->pat_min);
@@ -249,7 +249,7 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
ok= 1;
}
- else if(event==B_MARKER_SEARCH_POS) {
+ else if (event==B_MARKER_SEARCH_POS) {
float delta[2], side[2];
sub_v2_v2v2(side, cb->track->search_max, cb->track->search_min);
@@ -265,7 +265,7 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
ok= 1;
}
- else if(event==B_MARKER_SEARCH_DIM) {
+ else if (event==B_MARKER_SEARCH_DIM) {
float dim[2], search_dim[2];
sub_v2_v2v2(search_dim, cb->track->search_max, cb->track->search_min);
@@ -285,11 +285,13 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
BKE_tracking_clamp_track(cb->track, CLAMP_SEARCH_DIM);
ok= 1;
- } else if(event==B_MARKER_FLAG) {
+ }
+ else if (event==B_MARKER_FLAG) {
marker->flag= cb->marker_flag;
ok= 1;
- } else if(event==B_MARKER_OFFSET) {
+ }
+ else if (event==B_MARKER_OFFSET) {
float offset[2], delta[2];
int i;
@@ -299,7 +301,7 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
sub_v2_v2v2(delta, offset, cb->track->offset);
copy_v2_v2(cb->track->offset, offset);
- for(i=0; i<cb->track->markersnr; i++)
+ for (i=0; i<cb->track->markersnr; i++)
sub_v2_v2(cb->track->markers[i].pos, delta);
/* to update position of "parented" objects */
@@ -309,7 +311,7 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event)
ok= 1;
}
- if(ok)
+ if (ok)
WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, cb->clip);
}
@@ -326,17 +328,17 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P
MarkerUpdateCb *cb;
const char *tip;
- if(!ptr->data)
+ if (!ptr->data)
return;
prop= RNA_struct_find_property(ptr, propname);
- if(!prop) {
+ if (!prop) {
printf("%s: property not found: %s.%s\n",
__func__, RNA_struct_identifier(ptr->type), propname);
return;
}
- if(RNA_property_type(prop) != PROP_POINTER) {
+ if (RNA_property_type(prop) != PROP_POINTER) {
printf("%s: expected pointer property for %s.%s\n",
__func__, RNA_struct_identifier(ptr->type), propname);
return;
@@ -357,24 +359,25 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P
cb->marker_flag= marker->flag;
cb->framenr= user->framenr;
- if(compact) {
+ if (compact) {
block= uiLayoutGetBlock(layout);
- if(cb->marker_flag&MARKER_DISABLED)
+ if (cb->marker_flag&MARKER_DISABLED)
tip= "Marker is disabled at current frame";
else
tip= "Marker is enabled at current frame";
bt= uiDefIconButBitI(block, TOGN, MARKER_DISABLED, 0, ICON_RESTRICT_VIEW_OFF, 0, 0, 20, 20, &cb->marker_flag, 0, 0, 1, 0, tip);
uiButSetNFunc(bt, marker_update_cb, cb, NULL);
- } else {
+ }
+ else {
int width, height, step, digits;
float pat_dim[2], pat_pos[2], search_dim[2], search_pos[2];
uiLayout *col;
BKE_movieclip_get_size(clip, user, &width, &height);
- if(track->flag&TRACK_LOCKED) {
+ if (track->flag&TRACK_LOCKED) {
uiLayoutSetActive(layout, 0);
block= uiLayoutAbsoluteBlock(layout);
uiDefBut(block, LABEL, 0, "Track is locked", 0, 0, 300, 19, NULL, 0, 0, 0, 0, "");
@@ -406,7 +409,7 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P
uiBlockSetHandleFunc(block, marker_block_handler, cb);
uiBlockSetNFunc(block, marker_update_cb, cb, NULL);
- if(cb->marker_flag&MARKER_DISABLED)
+ if (cb->marker_flag&MARKER_DISABLED)
tip= "Marker is disabled at current frame";
else
tip= "Marker is enabled at current frame";
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 920b8dc3ccb..ef83a62c290 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -107,10 +107,10 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc
/* cached segments -- could be usefu lto debug caching strategies */
BKE_movieclip_get_cache_segments(clip, &sc->user, &totseg, &points);
- if(totseg) {
+ if (totseg) {
glColor4ub(128, 128, 255, 128);
- for(a= 0; a<totseg; a++) {
+ for (a= 0; a<totseg; a++) {
float x1, x2;
x1= (points[a*2]-sfra)/(efra-sfra+1)*ar->winx;
@@ -121,31 +121,31 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc
}
/* track */
- if(act_track) {
+ if (act_track) {
MovieTrackingTrack *track= act_track;
- for(i= sfra, a= 0; i <= efra; i++) {
+ for (i= sfra, a= 0; i <= efra; i++) {
int framenr;
MovieTrackingMarker *marker;
- while(a<track->markersnr) {
- if(track->markers[a].framenr>=i)
+ while (a<track->markersnr) {
+ if (track->markers[a].framenr>=i)
break;
- if(a<track->markersnr-1 && track->markers[a+1].framenr>i)
+ if (a<track->markersnr-1 && track->markers[a+1].framenr>i)
break;
a++;
}
- if(a<track->markersnr) marker= &track->markers[a];
+ if (a<track->markersnr) marker= &track->markers[a];
else marker= &track->markers[track->markersnr-1];
- if((marker->flag&MARKER_DISABLED)==0) {
+ if ((marker->flag&MARKER_DISABLED)==0) {
framenr= marker->framenr;
- if(framenr!=i) glColor4ub(128, 128, 0, 96);
- else if((marker->flag&MARKER_TRACKED)==0) glColor4ub(255, 255, 0, 196);
+ if (framenr!=i) glColor4ub(128, 128, 0, 96);
+ else if ((marker->flag&MARKER_TRACKED)==0) glColor4ub(255, 255, 0, 196);
else glColor4ub(255, 255, 0, 96);
glRecti((i-sfra)*framelen, 0, (i-sfra+1)*framelen, 4);
@@ -154,28 +154,28 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc
}
/* failed frames */
- if(reconstruction->flag&TRACKING_RECONSTRUCTED) {
+ if (reconstruction->flag&TRACKING_RECONSTRUCTED) {
int n= reconstruction->camnr;
MovieReconstructedCamera *cameras= reconstruction->cameras;
glColor4ub(255, 0, 0, 96);
- for(i= sfra, a= 0; i <= efra; i++) {
+ for (i= sfra, a= 0; i <= efra; i++) {
int ok= 0;
- while(a<n) {
- if(cameras[a].framenr==i) {
+ while (a<n) {
+ if (cameras[a].framenr==i) {
ok= 1;
break;
}
- else if(cameras[a].framenr>i) {
+ else if (cameras[a].framenr>i) {
break;
}
a++;
}
- if(!ok)
+ if (!ok)
glRecti((i-sfra)*framelen, 0, (i-sfra+1)*framelen, 8);
}
}
@@ -198,15 +198,16 @@ static void draw_movieclip_notes(SpaceClip *sc, ARegion *ar)
char str[256]= {0};
int block= 0;
- if(tracking->stats) {
+ if (tracking->stats) {
BLI_strncpy(str, tracking->stats->message, sizeof(str));
block= 1;
- } else {
- if(sc->flag&SC_LOCK_SELECTION)
+ }
+ else {
+ if (sc->flag&SC_LOCK_SELECTION)
strcpy(str, "Locked");
}
- if(str[0])
+ if (str[0])
ED_region_info_draw(ar, str, block, 0.6f);
}
@@ -222,20 +223,21 @@ static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf,
/* find window pixel coordinates of origin */
UI_view2d_to_region_no_clip(&ar->v2d, 0.0f, 0.0f, &x, &y);
- if(sc->flag&SC_MUTE_FOOTAGE) {
+ if (sc->flag&SC_MUTE_FOOTAGE) {
glColor3f(0.0f, 0.0f, 0.0f);
glRectf(x, y, x+zoomx*width, y+zoomy*height);
- } else {
- if(ibuf->rect_float && !ibuf->rect) {
+ }
+ else {
+ if (ibuf->rect_float && !ibuf->rect) {
IMB_rect_from_float(ibuf);
}
- if(ibuf->rect)
+ if (ibuf->rect)
glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
}
/* draw boundary border for frame if stabilization is enabled */
- if(sc->flag&SC_SHOW_STABLE && clip->tracking.stabilization.flag&TRACKING_2D_STABILIZATION) {
+ if (sc->flag&SC_SHOW_STABLE && clip->tracking.stabilization.flag&TRACKING_2D_STABILIZATION) {
glColor3f(0.0f, 0.0f, 0.0f);
glLineStipple(3, 0xaaaa);
glEnable(GL_LINE_STIPPLE);
@@ -274,63 +276,66 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin
int tiny= sc->flag&SC_SHOW_TINY_MARKER, framenr;
MovieTrackingMarker *marker;
- if(count==0)
+ if (count==0)
return;
marker= BKE_tracking_get_marker(track, sc->user.framenr);
- if(marker->framenr!=sc->user.framenr || marker->flag&MARKER_DISABLED)
+ if (marker->framenr!=sc->user.framenr || marker->flag&MARKER_DISABLED)
return;
framenr= marker->framenr;
a= count;
i= framenr-1;
- while(i>=framenr-count) {
+ while (i>=framenr-count) {
marker= BKE_tracking_get_marker(track, i);
- if(!marker || marker->flag&MARKER_DISABLED)
+ if (!marker || marker->flag&MARKER_DISABLED)
break;
- if(marker->framenr==i) {
+ if (marker->framenr==i) {
add_v2_v2v2(path[--a], marker->pos, track->offset);
ED_clip_point_undistorted_pos(sc, path[a], path[a]);
- if(marker->framenr==sc->user.framenr)
+ if (marker->framenr==sc->user.framenr)
curindex= a;
- } else
+ }
+ else {
break;
+ }
i--;
}
b= count;
i= framenr;
- while(i<=framenr+count) {
+ while (i<=framenr+count) {
marker= BKE_tracking_get_marker(track, i);
- if(!marker || marker->flag&MARKER_DISABLED)
+ if (!marker || marker->flag&MARKER_DISABLED)
break;
- if(marker->framenr==i) {
- if(marker->framenr==sc->user.framenr)
+ if (marker->framenr==i) {
+ if (marker->framenr==sc->user.framenr)
curindex= b;
add_v2_v2v2(path[b++], marker->pos, track->offset);
ED_clip_point_undistorted_pos(sc, path[b-1], path[b-1]);
- } else
+ }
+ else
break;
i++;
}
- if(!tiny) {
+ if (!tiny) {
UI_ThemeColor(TH_MARKER_OUTLINE);
- if(TRACK_VIEW_SELECTED(sc, track)) {
+ if (TRACK_VIEW_SELECTED(sc, track)) {
glPointSize(5.0f);
glBegin(GL_POINTS);
- for(i= a; i<b; i++) {
- if(i!=curindex)
+ for (i= a; i<b; i++) {
+ if (i!=curindex)
glVertex2f(path[i][0], path[i][1]);
}
glEnd();
@@ -338,7 +343,7 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin
glLineWidth(3.0f);
glBegin(GL_LINE_STRIP);
- for(i= a; i<b; i++)
+ for (i= a; i<b; i++)
glVertex2f(path[i][0], path[i][1]);
glEnd();
glLineWidth(1.0f);
@@ -346,14 +351,14 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin
UI_ThemeColor(TH_PATH_BEFORE);
- if(TRACK_VIEW_SELECTED(sc, track)) {
+ if (TRACK_VIEW_SELECTED(sc, track)) {
glPointSize(3.0f);
glBegin(GL_POINTS);
- for(i= a; i<b; i++) {
- if(i==count+1)
+ for (i= a; i<b; i++) {
+ if (i==count+1)
UI_ThemeColor(TH_PATH_AFTER);
- if(i!=curindex)
+ if (i!=curindex)
glVertex2f(path[i][0], path[i][1]);
}
glEnd();
@@ -362,8 +367,8 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin
UI_ThemeColor(TH_PATH_BEFORE);
glBegin(GL_LINE_STRIP);
- for(i= a; i<b; i++) {
- if(i==count+1)
+ for (i= a; i<b; i++) {
+ if (i==count+1)
UI_ThemeColor(TH_PATH_AFTER);
glVertex2f(path[i][0], path[i][1]);
@@ -383,7 +388,7 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT
px[0]= 1.0f/width/sc->zoom;
px[1]= 1.0f/height/sc->zoom;
- if((marker->flag&MARKER_DISABLED)==0) {
+ if ((marker->flag&MARKER_DISABLED)==0) {
float pos[2];
rctf r;
@@ -392,15 +397,16 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT
ED_clip_point_undistorted_pos(sc, pos, pos);
- if(BLI_in_rctf(&r, pos[0]-marker_pos[0], pos[1]-marker_pos[1])) {
- if(tiny) glPointSize(3.0f);
+ if (BLI_in_rctf(&r, pos[0]-marker_pos[0], pos[1]-marker_pos[1])) {
+ if (tiny) glPointSize(3.0f);
else glPointSize(4.0f);
glBegin(GL_POINTS);
glVertex2f(pos[0], pos[1]);
glEnd();
glPointSize(1.0f);
- } else {
- if(!tiny) glLineWidth(3.0f);
+ }
+ else {
+ if (!tiny) glLineWidth(3.0f);
glBegin(GL_LINES);
glVertex2f(pos[0] + px[0]*2, pos[1]);
glVertex2f(pos[0] + px[0]*8, pos[1]);
@@ -414,7 +420,7 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT
glVertex2f(pos[0], pos[1] + px[1]*2);
glVertex2f(pos[0], pos[1] + px[1]*8);
glEnd();
- if(!tiny) glLineWidth(1.0f);
+ if (!tiny) glLineWidth(1.0f);
}
}
@@ -422,9 +428,9 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT
glPushMatrix();
glTranslatef(marker_pos[0], marker_pos[1], 0);
- if(!tiny) glLineWidth(3.0f);
+ if (!tiny) glLineWidth(3.0f);
- if(sc->flag&SC_SHOW_MARKER_PATTERN) {
+ if (sc->flag&SC_SHOW_MARKER_PATTERN) {
glBegin(GL_LINE_LOOP);
glVertex2f(track->pat_min[0], track->pat_min[1]);
glVertex2f(track->pat_max[0], track->pat_min[1]);
@@ -434,7 +440,7 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT
}
show_search= TRACK_VIEW_SELECTED(sc, track) && ((marker->flag&MARKER_DISABLED)==0 || (sc->flag&SC_SHOW_MARKER_PATTERN)==0);
- if(sc->flag&SC_SHOW_MARKER_SEARCH && show_search) {
+ if (sc->flag&SC_SHOW_MARKER_SEARCH && show_search) {
glBegin(GL_LINE_LOOP);
glVertex2f(track->search_min[0], track->search_min[1]);
glVertex2f(track->search_max[0], track->search_min[1]);
@@ -444,20 +450,21 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT
}
glPopMatrix();
- if(!tiny) glLineWidth(1.0f);
+ if (!tiny) glLineWidth(1.0f);
}
static void track_colors(MovieTrackingTrack *track, int act, float col[3], float scol[3])
{
- if(track->flag&TRACK_CUSTOMCOLOR) {
- if(act) UI_GetThemeColor3fv(TH_ACT_MARKER, scol);
+ if (track->flag&TRACK_CUSTOMCOLOR) {
+ if (act) UI_GetThemeColor3fv(TH_ACT_MARKER, scol);
else copy_v3_v3(scol, track->color);
mul_v3_v3fl(col, track->color, 0.5f);
- } else {
+ }
+ else {
UI_GetThemeColor3fv(TH_MARKER, col);
- if(act) UI_GetThemeColor3fv(TH_ACT_MARKER, scol);
+ if (act) UI_GetThemeColor3fv(TH_ACT_MARKER, scol);
else UI_GetThemeColor3fv(TH_SEL_MARKER, scol);
}
}
@@ -474,16 +481,17 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
px[1]= 1.0f/height/sc->zoom;
/* marker position and offset position */
- if((track->flag&SELECT)==sel && (marker->flag&MARKER_DISABLED)==0) {
+ if ((track->flag&SELECT)==sel && (marker->flag&MARKER_DISABLED)==0) {
float pos[2];
rctf r;
- if(track->flag&TRACK_LOCKED) {
- if(act) UI_ThemeColor(TH_ACT_MARKER);
- else if(track->flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64);
+ if (track->flag&TRACK_LOCKED) {
+ if (act) UI_ThemeColor(TH_ACT_MARKER);
+ else if (track->flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64);
else UI_ThemeColor(TH_LOCK_MARKER);
- } else {
- if(track->flag&SELECT) glColor3fv(scol);
+ }
+ else {
+ if (track->flag&SELECT) glColor3fv(scol);
else glColor3fv(col);
}
@@ -491,13 +499,14 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
add_v2_v2v2(pos, marker->pos, track->offset);
ED_clip_point_undistorted_pos(sc, pos, pos);
- if(BLI_in_rctf(&r, pos[0]-marker_pos[0], pos[1]-marker_pos[1])) {
- if(!tiny) glPointSize(2.0f);
+ if (BLI_in_rctf(&r, pos[0]-marker_pos[0], pos[1]-marker_pos[1])) {
+ if (!tiny) glPointSize(2.0f);
glBegin(GL_POINTS);
glVertex2f(pos[0], pos[1]);
glEnd();
- if(!tiny) glPointSize(1.0f);
- } else {
+ if (!tiny) glPointSize(1.0f);
+ }
+ else {
glBegin(GL_LINES);
glVertex2f(pos[0] + px[0]*3, pos[1]);
glVertex2f(pos[0] + px[0]*7, pos[1]);
@@ -532,23 +541,24 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
glPushMatrix();
glTranslatef(marker_pos[0], marker_pos[1], 0);
- if(tiny) {
+ if (tiny) {
glLineStipple(3, 0xaaaa);
glEnable(GL_LINE_STIPPLE);
}
- if((track->pat_flag&SELECT)==sel && (sc->flag&SC_SHOW_MARKER_PATTERN)) {
- if(track->flag&TRACK_LOCKED) {
- if(act) UI_ThemeColor(TH_ACT_MARKER);
- else if(track->pat_flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64);
+ if ((track->pat_flag&SELECT)==sel && (sc->flag&SC_SHOW_MARKER_PATTERN)) {
+ if (track->flag&TRACK_LOCKED) {
+ if (act) UI_ThemeColor(TH_ACT_MARKER);
+ else if (track->pat_flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64);
else UI_ThemeColor(TH_LOCK_MARKER);
}
- else if(marker->flag&MARKER_DISABLED) {
- if(act) UI_ThemeColor(TH_ACT_MARKER);
- else if(track->pat_flag&SELECT) UI_ThemeColorShade(TH_DIS_MARKER, 128);
+ else if (marker->flag&MARKER_DISABLED) {
+ if (act) UI_ThemeColor(TH_ACT_MARKER);
+ else if (track->pat_flag&SELECT) UI_ThemeColorShade(TH_DIS_MARKER, 128);
else UI_ThemeColor(TH_DIS_MARKER);
- } else {
- if(track->pat_flag&SELECT) glColor3fv(scol);
+ }
+ else {
+ if (track->pat_flag&SELECT) glColor3fv(scol);
else glColor3fv(col);
}
@@ -562,18 +572,19 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
/* search */
show_search= TRACK_VIEW_SELECTED(sc, track) && ((marker->flag&MARKER_DISABLED)==0 || (sc->flag&SC_SHOW_MARKER_PATTERN)==0);
- if((track->search_flag&SELECT)==sel && (sc->flag&SC_SHOW_MARKER_SEARCH) && show_search) {
- if(track->flag&TRACK_LOCKED) {
- if(act) UI_ThemeColor(TH_ACT_MARKER);
- else if(track->search_flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64);
+ if ((track->search_flag&SELECT)==sel && (sc->flag&SC_SHOW_MARKER_SEARCH) && show_search) {
+ if (track->flag&TRACK_LOCKED) {
+ if (act) UI_ThemeColor(TH_ACT_MARKER);
+ else if (track->search_flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64);
else UI_ThemeColor(TH_LOCK_MARKER);
}
- else if(marker->flag&MARKER_DISABLED) {
- if(act) UI_ThemeColor(TH_ACT_MARKER);
- else if(track->search_flag&SELECT) UI_ThemeColorShade(TH_DIS_MARKER, 128);
+ else if (marker->flag&MARKER_DISABLED) {
+ if (act) UI_ThemeColor(TH_ACT_MARKER);
+ else if (track->search_flag&SELECT) UI_ThemeColorShade(TH_DIS_MARKER, 128);
else UI_ThemeColor(TH_DIS_MARKER);
- } else {
- if(track->search_flag&SELECT) glColor3fv(scol);
+ }
+ else {
+ if (track->search_flag&SELECT) glColor3fv(scol);
else glColor3fv(col);
}
@@ -586,18 +597,19 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
}
/* pyramid */
- if(sel && TRACK_VIEW_SELECTED(sc, track) && (track->tracker==TRACKER_KLT) && (marker->flag&MARKER_DISABLED)==0) {
- if(track->flag&TRACK_LOCKED) {
- if(act) UI_ThemeColor(TH_ACT_MARKER);
- else if(track->pat_flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64);
+ if (sel && TRACK_VIEW_SELECTED(sc, track) && (track->tracker==TRACKER_KLT) && (marker->flag&MARKER_DISABLED)==0) {
+ if (track->flag&TRACK_LOCKED) {
+ if (act) UI_ThemeColor(TH_ACT_MARKER);
+ else if (track->pat_flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64);
else UI_ThemeColor(TH_LOCK_MARKER);
}
- else if(marker->flag&MARKER_DISABLED) {
- if(act) UI_ThemeColor(TH_ACT_MARKER);
- else if(track->pat_flag&SELECT) UI_ThemeColorShade(TH_DIS_MARKER, 128);
+ else if (marker->flag&MARKER_DISABLED) {
+ if (act) UI_ThemeColor(TH_ACT_MARKER);
+ else if (track->pat_flag&SELECT) UI_ThemeColorShade(TH_DIS_MARKER, 128);
else UI_ThemeColor(TH_DIS_MARKER);
- } else {
- if(track->pat_flag&SELECT) glColor3fv(scol);
+ }
+ else {
+ if (track->pat_flag&SELECT) glColor3fv(scol);
else glColor3fv(col);
}
@@ -620,7 +632,7 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
}
}
- if(tiny)
+ if (tiny)
glDisable(GL_LINE_STIPPLE);
glPopMatrix();
@@ -633,15 +645,15 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
int tiny= sc->flag&SC_SHOW_TINY_MARKER;
float col[3], scol[3], px[2];
- if((tiny && outline) || (marker->flag&MARKER_DISABLED))
+ if ((tiny && outline) || (marker->flag&MARKER_DISABLED))
return;
- if(!TRACK_VIEW_SELECTED(sc, track) || track->flag&TRACK_LOCKED)
+ if (!TRACK_VIEW_SELECTED(sc, track) || track->flag&TRACK_LOCKED)
return;
track_colors(track, act, col, scol);
- if(outline) {
+ if (outline) {
glLineWidth(3.0f);
UI_ThemeColor(TH_MARKER_OUTLINE);
}
@@ -661,9 +673,9 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
px[0]= 1.0f/sc->zoom/width/sc->scale;
px[1]= 1.0f/sc->zoom/height/sc->scale;
- if((sc->flag&SC_SHOW_MARKER_SEARCH) && ((track->search_flag&SELECT)==sel || outline)) {
- if(!outline) {
- if(track->search_flag&SELECT) glColor3fv(scol);
+ if ((sc->flag&SC_SHOW_MARKER_SEARCH) && ((track->search_flag&SELECT)==sel || outline)) {
+ if (!outline) {
+ if (track->search_flag&SELECT) glColor3fv(scol);
else glColor3fv(col);
}
@@ -674,7 +686,7 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
tdx= searchdx;
tdy= searchdy;
- if(outline) {
+ if (outline) {
tdx+= px[0];
tdy+= px[1];
}
@@ -693,7 +705,7 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
tdx= searchdx*2.0f;
tdy= searchdy*2.0f;
- if(outline) {
+ if (outline) {
tdx+= px[0];
tdy+= px[1];
}
@@ -705,9 +717,9 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
glEnd();
}
- if((sc->flag&SC_SHOW_MARKER_PATTERN) && ((track->pat_flag&SELECT)==sel || outline)) {
- if(!outline) {
- if(track->pat_flag&SELECT) glColor3fv(scol);
+ if ((sc->flag&SC_SHOW_MARKER_PATTERN) && ((track->pat_flag&SELECT)==sel || outline)) {
+ if (!outline) {
+ if (track->pat_flag&SELECT) glColor3fv(scol);
else glColor3fv(col);
}
@@ -718,7 +730,7 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
tdx= patdx;
tdy= patdy;
- if(outline) {
+ if (outline) {
tdx+= px[0];
tdy+= px[1];
}
@@ -737,7 +749,7 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
tdx= patdx*2.0f;
tdy= patdy*2.0f;
- if(outline) {
+ if (outline) {
tdx+= px[0];
tdy+= px[1];
}
@@ -751,7 +763,7 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo
glPopMatrix();
- if(outline)
+ if (outline)
glLineWidth(1.0f);
}
@@ -763,26 +775,28 @@ static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
uiStyle *style= U.uistyles.first;
int fontid= style->widget.uifont_id;
- if(!TRACK_VIEW_SELECTED(sc, track))
+ if (!TRACK_VIEW_SELECTED(sc, track))
return;
BLF_size(fontid, 11.0f, U.dpi);
fontsize= BLF_height_max(fontid);
- if(marker->flag&MARKER_DISABLED) {
- if(act) UI_ThemeColor(TH_ACT_MARKER);
+ if (marker->flag&MARKER_DISABLED) {
+ if (act) UI_ThemeColor(TH_ACT_MARKER);
else UI_ThemeColorShade(TH_DIS_MARKER, 128);
- } else {
- if(act) UI_ThemeColor(TH_ACT_MARKER);
+ }
+ else {
+ if (act) UI_ThemeColor(TH_ACT_MARKER);
else UI_ThemeColor(TH_SEL_MARKER);
}
- if((sc->flag&SC_SHOW_MARKER_SEARCH) &&
+ if ((sc->flag&SC_SHOW_MARKER_SEARCH) &&
((marker->flag&MARKER_DISABLED)==0 || (sc->flag&SC_SHOW_MARKER_PATTERN)==0))
{
dx= track->search_min[0];
dy= track->search_min[1];
- } else if(sc->flag&SC_SHOW_MARKER_PATTERN) {
+ }
+ else if (sc->flag&SC_SHOW_MARKER_PATTERN) {
dx= track->pat_min[0];
dy= track->pat_min[1];
}
@@ -796,12 +810,12 @@ static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
pos[0]= pos[0]*zoomx;
pos[1]= pos[1]*zoomy - fontsize;
- if(marker->flag&MARKER_DISABLED) strcpy(state, "disabled");
- else if(marker->framenr!=sc->user.framenr) strcpy(state, "estimated");
- else if(marker->flag&MARKER_TRACKED) strcpy(state, "tracked");
+ if (marker->flag&MARKER_DISABLED) strcpy(state, "disabled");
+ else if (marker->framenr!=sc->user.framenr) strcpy(state, "estimated");
+ else if (marker->flag&MARKER_TRACKED) strcpy(state, "tracked");
else strcpy(state, "keyframed");
- if(state[0])
+ if (state[0])
BLI_snprintf(str, sizeof(str), "%s: %s", track->name, state);
else
BLI_snprintf(str, sizeof(str), "%s", track->name);
@@ -810,14 +824,14 @@ static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
BLF_draw(fontid, str, sizeof(str));
pos[1]-= fontsize;
- if(track->flag&TRACK_HAS_BUNDLE) {
+ if (track->flag&TRACK_HAS_BUNDLE) {
BLI_snprintf(str, sizeof(str), "Average error: %.3f", track->error);
BLF_position(fontid, pos[0], pos[1], 0.0f);
BLF_draw(fontid, str, sizeof(str));
pos[1]-= fontsize;
}
- if(track->flag&TRACK_LOCKED) {
+ if (track->flag&TRACK_LOCKED) {
BLF_position(fontid, pos[0], pos[1], 0.0f);
BLF_draw(fontid, "locked", 6);
}
@@ -865,16 +879,16 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
act_track= BKE_tracking_active_track(tracking);
- if(sc->user.render_flag&MCLIP_PROXY_RENDER_UNDISTORT) {
+ if (sc->user.render_flag&MCLIP_PROXY_RENDER_UNDISTORT) {
int count= 0;
/* count */
track= tracksbase->first;
- while(track) {
- if((track->flag&TRACK_HIDDEN)==0) {
+ while (track) {
+ if ((track->flag&TRACK_HIDDEN)==0) {
marker= BKE_tracking_get_marker(track, framenr);
- if(MARKER_VISIBLE(sc, marker))
+ if (MARKER_VISIBLE(sc, marker))
count++;
}
@@ -882,19 +896,19 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
}
/* undistort */
- if(count) {
+ if (count) {
marker_pos= MEM_callocN(2*sizeof(float)*count, "draw_tracking_tracks marker_pos");
track= tracksbase->first;
fp= marker_pos;
- while(track) {
- if((track->flag&TRACK_HIDDEN)==0) {
+ while (track) {
+ if ((track->flag&TRACK_HIDDEN)==0) {
marker= BKE_tracking_get_marker(track, framenr);
- if(MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, marker)) {
ED_clip_point_undistorted_pos(sc, marker->pos, fp);
- if(track==act_track)
+ if (track==act_track)
active_pos= fp;
fp+= 2;
@@ -906,10 +920,10 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
}
}
- if(sc->flag&SC_SHOW_TRACK_PATH) {
+ if (sc->flag&SC_SHOW_TRACK_PATH) {
track= tracksbase->first;
- while(track) {
- if((track->flag&TRACK_HIDDEN)==0)
+ while (track) {
+ if ((track->flag&TRACK_HIDDEN)==0)
draw_track_path(sc, clip, track);
track= track->next;
@@ -919,11 +933,11 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
/* markers outline and non-selected areas */
track= tracksbase->first;
fp= marker_pos;
- while(track) {
- if((track->flag&TRACK_HIDDEN)==0) {
+ while (track) {
+ if ((track->flag&TRACK_HIDDEN)==0) {
marker= BKE_tracking_get_marker(track, framenr);
- if(MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, marker)) {
copy_v2_v2(cur_pos, fp ? fp : marker->pos);
draw_marker_outline(sc, track, marker, cur_pos, width, height);
@@ -931,7 +945,7 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
draw_marker_slide_zones(sc, track, marker, cur_pos, 1, 0, 0, width, height);
draw_marker_slide_zones(sc, track, marker, cur_pos, 0, 0, 0, width, height);
- if(fp)
+ if (fp)
fp+= 2;
}
}
@@ -943,20 +957,20 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
* non-selected areas */
track= tracksbase->first;
fp= marker_pos;
- while(track) {
- if((track->flag&TRACK_HIDDEN)==0) {
+ while (track) {
+ if ((track->flag&TRACK_HIDDEN)==0) {
int act= track==act_track;
marker= BKE_tracking_get_marker(track, framenr);
- if(MARKER_VISIBLE(sc, marker)) {
- if(!act) {
+ if (MARKER_VISIBLE(sc, marker)) {
+ if (!act) {
copy_v2_v2(cur_pos, fp ? fp : marker->pos);
draw_marker_areas(sc, track, marker, cur_pos, width, height, 0, 1);
draw_marker_slide_zones(sc, track, marker, cur_pos, 0, 1, 0, width, height);
}
- if(fp)
+ if (fp)
fp+= 2;
}
}
@@ -965,11 +979,11 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
}
/* active marker would be displayed on top of everything else */
- if(act_track) {
- if((act_track->flag&TRACK_HIDDEN)==0) {
+ if (act_track) {
+ if ((act_track->flag&TRACK_HIDDEN)==0) {
marker= BKE_tracking_get_marker(act_track, framenr);
- if(MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, marker)) {
copy_v2_v2(cur_pos, active_pos ? active_pos : marker->pos);
draw_marker_areas(sc, act_track, marker, cur_pos, width, height, 1, 1);
@@ -978,7 +992,7 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
}
}
- if(sc->flag&SC_SHOW_BUNDLES) {
+ if (sc->flag&SC_SHOW_BUNDLES) {
MovieTrackingObject *object= BKE_tracking_active_object(tracking);
float pos[4], vec[4], mat[4][4], aspy;
@@ -989,11 +1003,11 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
BKE_tracking_projection_matrix(tracking, object, framenr, width, height, mat);
track= tracksbase->first;
- while(track) {
- if((track->flag&TRACK_HIDDEN)==0 && track->flag&TRACK_HAS_BUNDLE) {
+ while (track) {
+ if ((track->flag&TRACK_HIDDEN)==0 && track->flag&TRACK_HAS_BUNDLE) {
marker= BKE_tracking_get_marker(track, framenr);
- if(MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, marker)) {
float npos[2];
copy_v4_v4(vec, track->bundle_pos);
vec[3]=1;
@@ -1005,17 +1019,17 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
BKE_tracking_apply_intrinsics(tracking, pos, npos);
- if(npos[0]>=0.0f && npos[1]>=0.0f && npos[0]<=width && npos[1]<=height*aspy) {
+ if (npos[0]>=0.0f && npos[1]>=0.0f && npos[0]<=width && npos[1]<=height*aspy) {
vec[0]= (marker->pos[0]+track->offset[0])*width;
vec[1]= (marker->pos[1]+track->offset[1])*height*aspy;
sub_v2_v2(vec, npos);
- if(len_v2(vec)<3) glColor3f(0.0f, 1.0f, 0.0f);
+ if (len_v2(vec)<3) glColor3f(0.0f, 1.0f, 0.0f);
else glColor3f(1.0f, 0.0f, 0.0f);
glBegin(GL_POINTS);
- if(undistort) glVertex3f(pos[0]/width, pos[1]/(height*aspy), 0);
+ if (undistort) glVertex3f(pos[0]/width, pos[1]/(height*aspy), 0);
else glVertex3f(npos[0]/width, npos[1]/(height*aspy), 0);
glEnd();
}
@@ -1031,22 +1045,22 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
glPopMatrix();
- if(sc->flag&SC_SHOW_NAMES) {
+ if (sc->flag&SC_SHOW_NAMES) {
/* scaling should be cleared before drawing texts, otherwise font would also be scaled */
track= tracksbase->first;
fp= marker_pos;
- while(track) {
- if((track->flag&TRACK_HIDDEN)==0) {
+ while (track) {
+ if ((track->flag&TRACK_HIDDEN)==0) {
marker= BKE_tracking_get_marker(track, framenr);
- if(MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, marker)) {
int act= track==act_track;
copy_v2_v2(cur_pos, fp ? fp : marker->pos);
draw_marker_texts(sc, track, marker, cur_pos, act, width, height, zoomx, zoomy);
- if(fp) fp+= 2;
+ if (fp) fp+= 2;
}
}
@@ -1056,7 +1070,7 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
glPopMatrix();
- if(marker_pos)
+ if (marker_pos)
MEM_freeN(marker_pos);
}
@@ -1070,13 +1084,13 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
float aspy= 1.0f/tracking->camera.pixel_aspect;
float dx= (float)width/n, dy= (float)height/n*aspy;
- if(sc->mode!=SC_MODE_DISTORTION)
+ if (sc->mode!=SC_MODE_DISTORTION)
return;
- if(!tracking->camera.focal)
+ if (!tracking->camera.focal)
return;
- if((sc->flag&SC_SHOW_GRID)==0 && (sc->flag&SC_MANUAL_CALIBRATION)==0)
+ if ((sc->flag&SC_SHOW_GRID)==0 && (sc->flag&SC_MANUAL_CALIBRATION)==0)
return;
view2d_to_region_float(&ar->v2d, 0.0f, 0.0f, &x, &y);
@@ -1088,28 +1102,28 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
glScalef(width, height, 0);
/* grid */
- if(sc->flag&SC_SHOW_GRID) {
+ if (sc->flag&SC_SHOW_GRID) {
float val[4][2], idx[4][2];
float min[2], max[2];
- for(a=0; a<4; a++) {
- if(a<2) val[a][a%2]= FLT_MAX;
+ for (a=0; a<4; a++) {
+ if (a<2) val[a][a%2]= FLT_MAX;
else val[a][a%2]= -FLT_MAX;
}
zero_v2(pos);
- for(i= 0; i<=n; i++) {
- for(j= 0; j<=n; j++) {
- if(i==0 || j==0 || i==n || j==n) {
+ for (i= 0; i<=n; i++) {
+ for (j= 0; j<=n; j++) {
+ if (i==0 || j==0 || i==n || j==n) {
BKE_tracking_apply_intrinsics(tracking, pos, tpos);
- for(a=0; a<4; a++) {
+ for (a=0; a<4; a++) {
int ok;
- if(a<2) ok= tpos[a%2] < val[a][a%2];
+ if (a<2) ok= tpos[a%2] < val[a][a%2];
else ok= tpos[a%2] > val[a][a%2];
- if(ok) {
+ if (ok) {
copy_v2_v2(val[a], tpos);
idx[a][0]= j;
idx[a][1]= i;
@@ -1126,7 +1140,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
INIT_MINMAX2(min, max);
- for(a= 0; a<4; a++) {
+ for (a= 0; a<4; a++) {
pos[0]= idx[a][0]*dx;
pos[1]= idx[a][1]*dy;
@@ -1139,8 +1153,8 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
dx= (max[0]-min[0])/n;
dy= (max[1]-min[1])/n;
- for(i= 0; i<=n; i++) {
- for(j= 0; j<=n; j++) {
+ for (i= 0; i<=n; i++) {
+ for (j= 0; j<=n; j++) {
BKE_tracking_apply_intrinsics(tracking, pos, grid[i][j]);
grid[i][j][0]/= width;
@@ -1155,30 +1169,30 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
glColor3f(1.0f, 0.0f, 0.0f);
- for(i= 0; i<=n; i++) {
+ for (i= 0; i<=n; i++) {
glBegin(GL_LINE_STRIP);
- for(j= 0; j<=n; j++) {
+ for (j= 0; j<=n; j++) {
glVertex2fv(grid[i][j]);
}
glEnd();
}
- for(j= 0; j<=n; j++) {
+ for (j= 0; j<=n; j++) {
glBegin(GL_LINE_STRIP);
- for(i= 0; i<=n; i++) {
+ for (i= 0; i<=n; i++) {
glVertex2fv(grid[i][j]);
}
glEnd();
}
}
- if(sc->flag&SC_MANUAL_CALIBRATION && clip->gpd) {
+ if (sc->flag&SC_MANUAL_CALIBRATION && clip->gpd) {
bGPDlayer *layer= clip->gpd->layers.first;
- while(layer) {
+ while (layer) {
bGPDframe *frame= layer->frames.first;
- if(layer->flag & GP_LAYER_HIDE) {
+ if (layer->flag & GP_LAYER_HIDE) {
layer= layer->next;
continue;
}
@@ -1187,14 +1201,14 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
glLineWidth(layer->thickness);
glPointSize((float)(layer->thickness + 2));
- while(frame) {
+ while (frame) {
bGPDstroke *stroke= frame->strokes.first;
- while(stroke) {
- if(stroke->flag&GP_STROKE_2DSPACE) {
- if(stroke->totpoints>1) {
+ while (stroke) {
+ if (stroke->flag&GP_STROKE_2DSPACE) {
+ if (stroke->totpoints>1) {
glBegin(GL_LINE_STRIP);
- for(i= 0; i<stroke->totpoints-1; i++) {
+ for (i= 0; i<stroke->totpoints-1; i++) {
float npos[2], dpos[2], len;
int steps;
@@ -1208,7 +1222,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
steps= ceil(len/5.0f);
/* we want to distort only long straight lines */
- if(stroke->totpoints==2) {
+ if (stroke->totpoints==2) {
BKE_tracking_invert_intrinsics(tracking, pos, pos);
BKE_tracking_invert_intrinsics(tracking, npos, npos);
}
@@ -1216,7 +1230,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
sub_v2_v2v2(dpos, npos, pos);
mul_v2_fl(dpos, 1.0f/steps);
- for(j= 0; j<=steps; j++) {
+ for (j= 0; j<=steps; j++) {
BKE_tracking_apply_intrinsics(tracking, pos, tpos);
glVertex2f(tpos[0]/width, tpos[1]/(height*aspy));
@@ -1225,7 +1239,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid
}
glEnd();
}
- else if(stroke->totpoints==1) {
+ else if (stroke->totpoints==1) {
glBegin(GL_POINTS);
glVertex2f(stroke->points[0].x, stroke->points[0].y);
glEnd();
@@ -1256,22 +1270,22 @@ void clip_draw_main(SpaceClip *sc, ARegion *ar, Scene *scene)
float zoomx, zoomy;
/* if no clip, nothing to do */
- if(!clip)
+ if (!clip)
return;
ED_space_clip_size(sc, &width, &height);
ED_space_clip_zoom(sc, ar, &zoomx, &zoomy);
- if(sc->flag&SC_SHOW_STABLE) {
+ if (sc->flag&SC_SHOW_STABLE) {
float smat[4][4], ismat[4][4];
ibuf= ED_space_clip_get_stable_buffer(sc, sc->loc, &sc->scale, &sc->angle);
- if(ibuf) {
+ if (ibuf) {
float loc[2];
float aspect= clip->tracking.camera.pixel_aspect;
- if(width != ibuf->x)
+ if (width != ibuf->x)
mul_v2_v2fl(loc, sc->loc, (float)width / ibuf->x);
else
copy_v2_v2(loc, sc->loc);
@@ -1285,7 +1299,8 @@ void clip_draw_main(SpaceClip *sc, ARegion *ar, Scene *scene)
mul_serie_m4(sc->unistabmat, smat, sc->stabmat, ismat, NULL, NULL, NULL, NULL, NULL);
}
- } else {
+ }
+ else {
ibuf= ED_space_clip_get_buffer(sc);
zero_v2(sc->loc);
@@ -1294,7 +1309,7 @@ void clip_draw_main(SpaceClip *sc, ARegion *ar, Scene *scene)
unit_m4(sc->unistabmat);
}
- if(ibuf) {
+ if (ibuf) {
draw_movieclip_buffer(sc, ar, ibuf, width, height, zoomx, zoomy);
IMB_freeImBuf(ibuf);
@@ -1313,16 +1328,16 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d)
MovieClip *clip= ED_space_clip(sc);
ImBuf *ibuf;
- if(!clip)
+ if (!clip)
return;
- if(onlyv2d) {
+ if (onlyv2d) {
/* if manual calibration is used then grease pencil data is already
* drawed in draw_distortion */
- if((sc->flag&SC_MANUAL_CALIBRATION)==0 || sc->mode!=SC_MODE_DISTORTION) {
+ if ((sc->flag&SC_MANUAL_CALIBRATION)==0 || sc->mode!=SC_MODE_DISTORTION) {
ibuf= ED_space_clip_get_buffer(sc);
- if(ibuf) {
+ if (ibuf) {
glPushMatrix();
glMultMatrixf(sc->unistabmat);
draw_gpencil_2dimage(C, ibuf);
@@ -1331,7 +1346,8 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d)
glPopMatrix();
}
}
- } else {
+ }
+ else {
draw_gpencil_view2d(C, 0);
}
}
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 35d870022a4..87b0ac1aac1 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -59,7 +59,7 @@ int ED_space_clip_poll(bContext *C)
{
SpaceClip *sc= CTX_wm_space_clip(C);
- if(sc && sc->clip)
+ if (sc && sc->clip)
return 1;
return 0;
@@ -69,10 +69,10 @@ void ED_space_clip_set(bContext *C, SpaceClip *sc, MovieClip *clip)
{
sc->clip= clip;
- if(sc->clip && sc->clip->id.us==0)
+ if (sc->clip && sc->clip->id.us==0)
sc->clip->id.us= 1;
- if(C)
+ if (C)
WM_event_add_notifier(C, NC_MOVIECLIP|NA_SELECTED, sc->clip);
}
@@ -83,15 +83,15 @@ MovieClip *ED_space_clip(SpaceClip *sc)
ImBuf *ED_space_clip_get_buffer(SpaceClip *sc)
{
- if(sc->clip) {
+ if (sc->clip) {
ImBuf *ibuf;
ibuf= BKE_movieclip_get_postprocessed_ibuf(sc->clip, &sc->user, sc->postproc_flag);
- if(ibuf && (ibuf->rect || ibuf->rect_float))
+ if (ibuf && (ibuf->rect || ibuf->rect_float))
return ibuf;
- if(ibuf)
+ if (ibuf)
IMB_freeImBuf(ibuf);
}
@@ -100,15 +100,15 @@ ImBuf *ED_space_clip_get_buffer(SpaceClip *sc)
ImBuf *ED_space_clip_get_stable_buffer(SpaceClip *sc, float loc[2], float *scale, float *angle)
{
- if(sc->clip) {
+ if (sc->clip) {
ImBuf *ibuf;
ibuf= BKE_movieclip_get_stable_ibuf(sc->clip, &sc->user, loc, scale, angle, sc->postproc_flag);
- if(ibuf && (ibuf->rect || ibuf->rect_float))
+ if (ibuf && (ibuf->rect || ibuf->rect_float))
return ibuf;
- if(ibuf)
+ if (ibuf)
IMB_freeImBuf(ibuf);
}
@@ -117,11 +117,12 @@ ImBuf *ED_space_clip_get_stable_buffer(SpaceClip *sc, float loc[2], float *scale
void ED_space_clip_size(SpaceClip *sc, int *width, int *height)
{
- if(!sc->clip) {
- *width= 0;
- *height= 0;
- } else
+ if (!sc->clip) {
+ *width = *height = 0;
+ }
+ else {
BKE_movieclip_get_size(sc->clip, &sc->user, width, height);
+ }
}
void ED_space_clip_zoom(SpaceClip *sc, ARegion *ar, float *zoomx, float *zoomy)
@@ -138,7 +139,7 @@ void ED_space_clip_aspect(SpaceClip *sc, float *aspx, float *aspy)
{
MovieClip *clip= ED_space_clip(sc);
- if(clip)
+ if (clip)
BKE_movieclip_aspect(clip, aspx, aspy);
else
*aspx= *aspy= 1.0f;
@@ -150,11 +151,11 @@ void ED_clip_update_frame(const Main *mainp, int cfra)
wmWindow *win;
/* image window, compo node users */
- for(wm=mainp->wm.first; wm; wm= wm->id.next) { /* only 1 wm */
- for(win= wm->windows.first; win; win= win->next) {
+ for (wm=mainp->wm.first; wm; wm= wm->id.next) { /* only 1 wm */
+ for (win= wm->windows.first; win; win= win->next) {
ScrArea *sa;
- for(sa= win->screen->areabase.first; sa; sa= sa->next) {
- if(sa->spacetype==SPACE_CLIP) {
+ for (sa= win->screen->areabase.first; sa; sa= sa->next) {
+ if (sa->spacetype==SPACE_CLIP) {
SpaceClip *sc= sa->spacedata.first;
sc->scopes.ok= 0;
@@ -178,11 +179,11 @@ static int selected_boundbox(SpaceClip *sc, float min[2], float max[2])
ED_space_clip_size(sc, &width, &height);
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track)) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track)) {
MovieTrackingMarker *marker= BKE_tracking_get_marker(track, sc->user.framenr);
- if(marker) {
+ if (marker) {
float pos[3];
pos[0]= marker->pos[0]+track->offset[0];
@@ -190,7 +191,7 @@ static int selected_boundbox(SpaceClip *sc, float min[2], float max[2])
pos[2]= 0.0f;
/* undistortion happens for normalized coords */
- if(sc->user.render_flag&MCLIP_PROXY_RENDER_UNDISTORT)
+ if (sc->user.render_flag&MCLIP_PROXY_RENDER_UNDISTORT)
/* undistortion happens for normalized coords */
ED_clip_point_undistorted_pos(sc, pos, pos);
@@ -218,9 +219,9 @@ int ED_clip_view_selection(SpaceClip *sc, ARegion *ar, int fit)
ED_space_clip_size(sc, &frame_width, &frame_height);
- if(frame_width==0 || frame_height==0) return 0;
+ if (frame_width==0 || frame_height==0) return 0;
- if(!selected_boundbox(sc, min, max))
+ if (!selected_boundbox(sc, min, max))
return 0;
/* center view */
@@ -230,7 +231,7 @@ int ED_clip_view_selection(SpaceClip *sc, ARegion *ar, int fit)
h= max[1]-min[1];
/* set zoom to see all selection */
- if(w>0 && h>0) {
+ if (w>0 && h>0) {
int width, height;
float zoomx, zoomy, newzoom, aspx, aspy;
@@ -244,7 +245,7 @@ int ED_clip_view_selection(SpaceClip *sc, ARegion *ar, int fit)
newzoom= 1.0f/power_of_2(1/MIN2(zoomx, zoomy));
- if(fit || sc->zoom>newzoom)
+ if (fit || sc->zoom>newzoom)
sc->zoom= newzoom;
}
@@ -255,7 +256,7 @@ void ED_clip_point_undistorted_pos(SpaceClip *sc, float co[2], float nco[2])
{
copy_v2_v2(nco, co);
- if(sc->user.render_flag&MCLIP_PROXY_RENDER_UNDISTORT) {
+ if (sc->user.render_flag&MCLIP_PROXY_RENDER_UNDISTORT) {
MovieClip *clip= ED_space_clip(sc);
float aspy= 1.0f/clip->tracking.camera.pixel_aspect;
int width, height;
@@ -292,7 +293,7 @@ void ED_clip_point_stable_pos(bContext *C, float x, float y, float *xr, float *y
*xr= pos[0]/width;
*yr= pos[1]/height;
- if(sc->user.render_flag&MCLIP_PROXY_RENDER_UNDISTORT) {
+ if (sc->user.render_flag&MCLIP_PROXY_RENDER_UNDISTORT) {
MovieClip *clip= ED_space_clip(sc);
MovieTracking *tracking= &clip->tracking;
float aspy= 1.0f/tracking->camera.pixel_aspect;
diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c
index 1e21d0e5120..c1089d2bbcf 100644
--- a/source/blender/editors/space_clip/clip_graph_draw.c
+++ b/source/blender/editors/space_clip/clip_graph_draw.c
@@ -155,10 +155,11 @@ void tracking_segment_start_cb(void *userdata, MovieTrackingTrack *track, int co
copy_v3_v3(col, colors[coord]);
- if(track==userdata) {
+ if (track==userdata) {
col[3]= 1.0f;
glLineWidth(2.0f);
- } else {
+ }
+ else {
col[3]= 0.5f;
glLineWidth(1.0f);
}
@@ -181,14 +182,14 @@ static void tracking_segment_knot_cb(void *userdata, MovieTrackingTrack *track,
struct { MovieTrackingTrack *act_track; int sel; float xscale, yscale, hsize; } *data = userdata;
int sel= 0, sel_flag;
- if(track!=data->act_track)
+ if (track!=data->act_track)
return;
sel_flag= coord == 0 ? MARKER_GRAPH_SEL_X : MARKER_GRAPH_SEL_Y;
sel= (marker->flag & sel_flag) ? 1 : 0;
- if(sel == data->sel) {
- if(sel) UI_ThemeColor(TH_HANDLE_VERTEX_SELECT);
+ if (sel == data->sel) {
+ if (sel) UI_ThemeColor(TH_HANDLE_VERTEX_SELECT);
else UI_ThemeColor(TH_HANDLE_VERTEX);
draw_curve_knot(marker->framenr, val, data->xscale, data->yscale, data->hsize);
@@ -205,7 +206,7 @@ static void draw_tracks_curves(View2D *v2d, SpaceClip *sc)
BKE_movieclip_get_size(clip, &sc->user, &width, &height);
- if(!width || !height)
+ if (!width || !height)
return;
/* non-selected knot handles */
@@ -234,15 +235,15 @@ static void draw_frame_curves(SpaceClip *sc)
glColor3f(0.0f, 0.0f, 1.0f);
- for(i= 0; i<reconstruction->camnr; i++) {
+ for (i= 0; i<reconstruction->camnr; i++) {
MovieReconstructedCamera *camera= &reconstruction->cameras[i];
- if(lines && camera->framenr!=prevfra+1) {
+ if (lines && camera->framenr!=prevfra+1) {
glEnd();
lines= 0;
}
- if(!lines) {
+ if (!lines) {
glBegin(GL_LINE_STRIP);
lines= 1;
}
@@ -252,7 +253,7 @@ static void draw_frame_curves(SpaceClip *sc)
prevfra= camera->framenr;
}
- if(lines)
+ if (lines)
glEnd();
}
@@ -268,11 +269,11 @@ void clip_draw_graph(SpaceClip *sc, ARegion *ar, Scene *scene)
UI_view2d_grid_draw(v2d, grid, V2D_GRIDLINES_ALL);
UI_view2d_grid_free(grid);
- if(clip) {
- if(sc->flag&SC_SHOW_GRAPH_TRACKS)
+ if (clip) {
+ if (sc->flag&SC_SHOW_GRAPH_TRACKS)
draw_tracks_curves(v2d, sc);
- if(sc->flag&SC_SHOW_GRAPH_FRAMES)
+ if (sc->flag&SC_SHOW_GRAPH_FRAMES)
draw_frame_curves(sc);
}
diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c
index aecce3b1ba1..4a1f2c56ee0 100644
--- a/source/blender/editors/space_clip/clip_graph_ops.c
+++ b/source/blender/editors/space_clip/clip_graph_ops.c
@@ -65,7 +65,7 @@ static int ED_space_clip_graph_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
- if(sc && sc->clip) {
+ if (sc && sc->clip) {
ARegion *ar = CTX_wm_region(C);
return ar->regiontype == RGN_TYPE_PREVIEW;
@@ -116,10 +116,10 @@ static void find_nearest_tracking_segment_cb(void *userdata, MovieTrackingTrack
MouseSelectUserData *data= userdata;
float co[2]= {marker->framenr, val};
- if(data->has_prev) {
+ if (data->has_prev) {
float d= dist_to_line_segment_v2(data->mouse_co, data->prev_co, co);
- if(data->track==NULL || d<data->min_dist) {
+ if (data->track==NULL || d<data->min_dist) {
data->track= track;
data->min_dist= d;
data->coord= coord;
@@ -145,7 +145,7 @@ static void find_nearest_tracking_knot_cb(void *userdata, MovieTrackingTrack *tr
float dx= marker->framenr-data->mouse_co[0], dy= val-data->mouse_co[1];
float d= dx*dx+dy*dy;
- if(data->marker==NULL || d<data->min_dist) {
+ if (data->marker==NULL || d<data->min_dist) {
float co[2]= {marker->framenr, val};
data->track= track;
@@ -174,26 +174,26 @@ static int mouse_select_knot(bContext *C, float co[2], int extend)
MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking);
static const int delta= 6;
- if(act_track) {
+ if (act_track) {
MouseSelectUserData userdata;
mouse_select_init_data(&userdata, co);
clip_graph_tracking_values_iterate_track(sc, act_track,
&userdata, find_nearest_tracking_knot_cb, NULL, NULL);
- if(userdata.marker) {
+ if (userdata.marker) {
int x1, y1, x2, y2;
UI_view2d_view_to_region(v2d, co[0], co[1], &x1, &y1);
UI_view2d_view_to_region(v2d, userdata.min_co[0], userdata.min_co[1], &x2, &y2);
- if(abs(x2-x1)<=delta && abs(y2-y1)<=delta) {
- if(!extend) {
+ if (abs(x2-x1)<=delta && abs(y2-y1)<=delta) {
+ if (!extend) {
SelectUserData selectdata = {SEL_DESELECT};
clip_graph_tracking_iterate(sc, &selectdata, toggle_selection_cb);
}
- if(userdata.coord==0)
+ if (userdata.coord==0)
userdata.marker->flag|= MARKER_GRAPH_SEL_X;
else
userdata.marker->flag|= MARKER_GRAPH_SEL_Y;
@@ -217,14 +217,14 @@ static int mouse_select_curve(bContext *C, float co[2], int extend)
mouse_select_init_data(&userdata, co);
clip_graph_tracking_values_iterate(sc, &userdata, find_nearest_tracking_segment_cb, NULL, find_nearest_tracking_segment_end_cb);
- if(userdata.track) {
- if(extend) {
- if(act_track==userdata.track) {
+ if (userdata.track) {
+ if (extend) {
+ if (act_track==userdata.track) {
/* currently only single curve can be selected (selected curve represents active track) */
act_track= NULL;
}
}
- else if(act_track!=userdata.track) {
+ else if (act_track!=userdata.track) {
MovieTrackingMarker *marker;
SelectUserData selectdata = {SEL_DESELECT};
@@ -252,12 +252,12 @@ static int mouse_select(bContext *C, float co[2], int extend)
/* first try to select knot on selected curves */
sel= mouse_select_knot(C, co, extend);
- if(!sel) {
+ if (!sel) {
/* if there's no close enough knot to mouse osition, select nearest curve */
sel= mouse_select_curve(C, co, extend);
}
- if(sel)
+ if (sel)
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
return OPERATOR_FINISHED;
@@ -287,17 +287,17 @@ static int select_invoke(bContext *C, wmOperator *op, wmEvent *event)
void CLIP_OT_graph_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select";
- ot->description= "Select graph curves";
- ot->idname= "CLIP_OT_graph_select";
+ ot->name = "Select";
+ ot->description = "Select graph curves";
+ ot->idname = "CLIP_OT_graph_select";
/* api callbacks */
- ot->exec= select_exec;
- ot->invoke= select_invoke;
- ot->poll= ED_space_clip_graph_poll;
+ ot->exec = select_exec;
+ ot->invoke = select_invoke;
+ ot->poll = ED_space_clip_graph_poll;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX,
@@ -444,7 +444,7 @@ static int graph_select_all_markers_exec(bContext *C, wmOperator *op)
void CLIP_OT_graph_select_all_markers(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Select or Deselect All Markers";
+ ot->name = "(De)select All Markers";
ot->description = "Change selection of all markers of active track";
ot->idname = "CLIP_OT_graph_select_all_markers";
@@ -453,7 +453,7 @@ void CLIP_OT_graph_select_all_markers(wmOperatorType *ot)
ot->poll = ED_space_clip_graph_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -468,7 +468,7 @@ static int delete_curve_exec(bContext *C, wmOperator *UNUSED(op))
ListBase *tracksbase= BKE_tracking_get_tracks(tracking);
MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking);
- if(act_track)
+ if (act_track)
clip_delete_track(C, clip, tracksbase, act_track);
return OPERATOR_FINISHED;
@@ -477,17 +477,17 @@ static int delete_curve_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_graph_delete_curve(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Curve";
- ot->description= "Delete selected curves";
- ot->idname= "CLIP_OT_graph_delete_curve";
+ ot->name = "Delete Curve";
+ ot->description = "Delete selected curves";
+ ot->idname = "CLIP_OT_graph_delete_curve";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= delete_curve_exec;
- ot->poll= ED_space_clip_poll;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = delete_curve_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/******************** delete knot operator ********************/
@@ -500,13 +500,13 @@ static int delete_knot_exec(bContext *C, wmOperator *UNUSED(op))
ListBase *tracksbase= BKE_tracking_get_tracks(tracking);
MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking);
- if(act_track) {
+ if (act_track) {
int a= 0;
- while(a<act_track->markersnr) {
+ while (a<act_track->markersnr) {
MovieTrackingMarker *marker= &act_track->markers[a];
- if(marker->flag & MARKER_GRAPH_SEL)
+ if (marker->flag & MARKER_GRAPH_SEL)
clip_delete_marker(C, clip, tracksbase, act_track, marker);
else
a++;
@@ -519,16 +519,16 @@ static int delete_knot_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_graph_delete_knot(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Knot";
- ot->description= "Delete curve knots";
- ot->idname= "CLIP_OT_graph_delete_knot";
+ ot->name = "Delete Knot";
+ ot->description = "Delete curve knots";
+ ot->idname = "CLIP_OT_graph_delete_knot";
/* api callbacks */
- ot->exec= delete_knot_exec;
- ot->poll= ED_space_clip_graph_poll;
+ ot->exec = delete_knot_exec;
+ ot->poll = ED_space_clip_graph_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/******************** view all operator ********************/
@@ -542,8 +542,8 @@ static void view_all_cb(void *userdata, MovieTrackingTrack *UNUSED(track), Movie
{
ViewAllUserData *data = (ViewAllUserData *)userdata;
- if(val < data->min) data->min = val;
- if(val > data->max) data->max = val;
+ if (val < data->min) data->min = val;
+ if (val > data->max) data->max = val;
}
static int view_all_exec(bContext *C, wmOperator *UNUSED(op))
@@ -656,7 +656,7 @@ static int graph_disable_markers_exec(bContext *C, wmOperator *op)
if (marker->flag & MARKER_GRAPH_SEL) {
if (action==0)
marker->flag |= MARKER_DISABLED;
- else if(action==1)
+ else if (action==1)
marker->flag &= ~MARKER_DISABLED;
else
marker->flag ^= MARKER_DISABLED;
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 552c62936b6..ff8feb69bd9 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -82,15 +82,15 @@ static void sclip_zoom_set(SpaceClip *sc, ARegion *ar, float zoom, float locatio
width*= sc->zoom;
height*= sc->zoom;
- if((width < 4) && (height < 4))
+ if ((width < 4) && (height < 4))
sc->zoom= oldzoom;
- else if((ar->winrct.xmax - ar->winrct.xmin) <= sc->zoom)
+ else if ((ar->winrct.xmax - ar->winrct.xmin) <= sc->zoom)
sc->zoom= oldzoom;
- else if((ar->winrct.ymax - ar->winrct.ymin) <= sc->zoom)
+ else if ((ar->winrct.ymax - ar->winrct.ymin) <= sc->zoom)
sc->zoom= oldzoom;
}
- if((U.uiflag & USER_ZOOM_TO_MOUSEPOS) && location) {
+ if ((U.uiflag & USER_ZOOM_TO_MOUSEPOS) && location) {
ED_space_clip_size(sc, &width, &height);
sc->xof+= ((location[0]-0.5f)*width-sc->xof)*(sc->zoom-oldzoom)/sc->zoom;
@@ -158,8 +158,8 @@ static int open_exec(bContext *C, wmOperator *op)
clip= BKE_add_movieclip_file(str);
- if(!clip) {
- if(op->customdata)
+ if (!clip) {
+ if (op->customdata)
MEM_freeN(op->customdata);
BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s.", str, errno ? strerror(errno) : "Unsupported movie clip format");
@@ -167,13 +167,13 @@ static int open_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- if(!op->customdata)
+ if (!op->customdata)
open_init(C, op);
/* hook into UI */
pprop= op->customdata;
- if(pprop->prop) {
+ if (pprop->prop) {
/* when creating new ID blocks, use is already 1, but RNA
* pointer se also increases user, so this compensates it */
clip->id.us--;
@@ -182,7 +182,7 @@ static int open_exec(bContext *C, wmOperator *op)
RNA_property_pointer_set(&pprop->ptr, pprop->prop, idptr);
RNA_property_update(C, &pprop->ptr, pprop->prop);
}
- else if(sc) {
+ else if (sc) {
ED_space_clip_set(C, sc, clip);
}
@@ -199,16 +199,16 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
char *path= U.textudir;
MovieClip *clip= NULL;
- if(sc)
+ if (sc)
clip= ED_space_clip(sc);
- if(clip)
+ if (clip)
path= clip->name;
- if(!RNA_struct_property_is_set(op->ptr, "relative_path"))
+ if (!RNA_struct_property_is_set(op->ptr, "relative_path"))
RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
- if(RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath"))
return open_exec(C, op);
open_init(C, op);
@@ -221,17 +221,17 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void CLIP_OT_open(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Open Clip";
- ot->description= "Load a sequence of frames or a movie file";
- ot->idname= "CLIP_OT_open";
+ ot->name = "Open Clip";
+ ot->description = "Load a sequence of frames or a movie file";
+ ot->idname = "CLIP_OT_open";
/* api callbacks */
- ot->exec= open_exec;
- ot->invoke= open_invoke;
- ot->cancel= open_cancel;
+ ot->exec = open_exec;
+ ot->invoke = open_invoke;
+ ot->cancel = open_cancel;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
@@ -243,7 +243,7 @@ static int reload_exec(bContext *C, wmOperator *UNUSED(op))
{
MovieClip *clip= CTX_data_edit_movieclip(C);
- if(!clip)
+ if (!clip)
return OPERATOR_CANCELLED;
BKE_movieclip_reload(clip);
@@ -256,12 +256,12 @@ static int reload_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_reload(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reload Clip";
- ot->description= "Reload clip";
- ot->idname= "CLIP_OT_reload";
+ ot->name = "Reload Clip";
+ ot->description = "Reload clip";
+ ot->idname = "CLIP_OT_reload";
/* api callbacks */
- ot->exec= reload_exec;
+ ot->exec = reload_exec;
}
/********************** view pan operator *********************/
@@ -284,7 +284,7 @@ static void view_pan_init(bContext *C, wmOperator *op, wmEvent *event)
vpd->x= event->x;
vpd->y= event->y;
- if(sc->flag&SC_LOCK_SELECTION) vpd->vec= &sc->xlockof;
+ if (sc->flag&SC_LOCK_SELECTION) vpd->vec= &sc->xlockof;
else vpd->vec= &sc->xof;
copy_v2_v2(&vpd->xof, vpd->vec);
@@ -299,7 +299,7 @@ static void view_pan_exit(bContext *C, wmOperator *op, int cancel)
{
ViewPanData *vpd= op->customdata;
- if(cancel) {
+ if (cancel) {
copy_v2_v2(vpd->vec, &vpd->xorig);
ED_region_tag_redraw(CTX_wm_region(C));
@@ -316,10 +316,11 @@ static int view_pan_exec(bContext *C, wmOperator *op)
RNA_float_get_array(op->ptr, "offset", offset);
- if(sc->flag&SC_LOCK_SELECTION) {
+ if (sc->flag&SC_LOCK_SELECTION) {
sc->xlockof+= offset[0];
sc->ylockof+= offset[1];
- } else {
+ }
+ else {
sc->xof+= offset[0];
sc->yof+= offset[1];
}
@@ -370,7 +371,7 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
view_pan_exit(C, op, 0);
return OPERATOR_FINISHED;
default:
- if(event->type==vpd->event_type && event->val==KM_RELEASE) {
+ if (event->type==vpd->event_type && event->val==KM_RELEASE) {
view_pan_exit(C, op, 0);
return OPERATOR_FINISHED;
}
@@ -390,18 +391,18 @@ static int view_pan_cancel(bContext *C, wmOperator *op)
void CLIP_OT_view_pan(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Pan";
- ot->idname= "CLIP_OT_view_pan";
+ ot->name = "View Pan";
+ ot->idname = "CLIP_OT_view_pan";
/* api callbacks */
- ot->exec= view_pan_exec;
- ot->invoke= view_pan_invoke;
- ot->modal= view_pan_modal;
- ot->cancel= view_pan_cancel;
- ot->poll= ED_space_clip_poll;
+ ot->exec = view_pan_exec;
+ ot->invoke = view_pan_invoke;
+ ot->modal = view_pan_modal;
+ ot->cancel = view_pan_cancel;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
/* properties */
RNA_def_float_vector(ot->srna, "offset", 2, NULL, -FLT_MAX, FLT_MAX,
@@ -440,7 +441,7 @@ static void view_zoom_exit(bContext *C, wmOperator *op, int cancel)
SpaceClip *sc= CTX_wm_space_clip(C);
ViewZoomData *vpd= op->customdata;
- if(cancel) {
+ if (cancel) {
sc->zoom= vpd->zoom;
ED_region_tag_redraw(CTX_wm_region(C));
}
@@ -495,7 +496,7 @@ static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
ED_region_tag_redraw(CTX_wm_region(C));
break;
default:
- if(event->type==vpd->event_type && event->val==KM_RELEASE) {
+ if (event->type==vpd->event_type && event->val==KM_RELEASE) {
view_zoom_exit(C, op, 0);
return OPERATOR_FINISHED;
}
@@ -514,18 +515,18 @@ static int view_zoom_cancel(bContext *C, wmOperator *op)
void CLIP_OT_view_zoom(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Zoom";
- ot->idname= "CLIP_OT_view_zoom";
+ ot->name = "View Zoom";
+ ot->idname = "CLIP_OT_view_zoom";
/* api callbacks */
- ot->exec= view_zoom_exec;
- ot->invoke= view_zoom_invoke;
- ot->modal= view_zoom_modal;
- ot->cancel= view_zoom_cancel;
- ot->poll= ED_space_clip_poll;
+ ot->exec = view_zoom_exec;
+ ot->invoke = view_zoom_invoke;
+ ot->modal = view_zoom_modal;
+ ot->cancel = view_zoom_cancel;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
+ ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
/* properties */
RNA_def_float(ot->srna, "factor", 0.0f, 0.0f, FLT_MAX,
@@ -562,13 +563,13 @@ static int view_zoom_in_invoke(bContext *C, wmOperator *op, wmEvent *event)
void CLIP_OT_view_zoom_in(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Zoom In";
- ot->idname= "CLIP_OT_view_zoom_in";
+ ot->name = "View Zoom In";
+ ot->idname = "CLIP_OT_view_zoom_in";
/* api callbacks */
- ot->exec= view_zoom_in_exec;
- ot->invoke= view_zoom_in_invoke;
- ot->poll= ED_space_clip_poll;
+ ot->exec = view_zoom_in_exec;
+ ot->invoke = view_zoom_in_invoke;
+ ot->poll = ED_space_clip_poll;
/* properties */
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in screen coordinates", -10.0f, 10.0f);
@@ -602,13 +603,13 @@ static int view_zoom_out_invoke(bContext *C, wmOperator *op, wmEvent *event)
void CLIP_OT_view_zoom_out(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Zoom Out";
- ot->idname= "CLIP_OT_view_zoom_out";
+ ot->name = "View Zoom Out";
+ ot->idname = "CLIP_OT_view_zoom_out";
/* api callbacks */
- ot->exec= view_zoom_out_exec;
- ot->invoke= view_zoom_out_invoke;
- ot->poll= ED_space_clip_poll;
+ ot->exec = view_zoom_out_exec;
+ ot->invoke = view_zoom_out_invoke;
+ ot->poll = ED_space_clip_poll;
/* properties */
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in normalised (0.0-1.0) coordinates", -10.0f, 10.0f);
@@ -635,12 +636,12 @@ static int view_zoom_ratio_exec(bContext *C, wmOperator *op)
void CLIP_OT_view_zoom_ratio(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Zoom Ratio";
- ot->idname= "CLIP_OT_view_zoom_ratio";
+ ot->name = "View Zoom Ratio";
+ ot->idname = "CLIP_OT_view_zoom_ratio";
/* api callbacks */
- ot->exec= view_zoom_ratio_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = view_zoom_ratio_exec;
+ ot->poll = ED_space_clip_poll;
/* properties */
RNA_def_float(ot->srna, "ratio", 0.0f, 0.0f, FLT_MAX,
@@ -672,7 +673,7 @@ static int view_all_exec(bContext *C, wmOperator *op)
width= ar->winrct.xmax - ar->winrct.xmin + 1;
height= ar->winrct.ymax - ar->winrct.ymin + 1;
- if(fit_view) {
+ if (fit_view) {
const int margin = 5; /* margin from border */
zoomx= (float)width / (w + 2*margin);
@@ -681,7 +682,7 @@ static int view_all_exec(bContext *C, wmOperator *op)
sclip_zoom_set(sc, ar, MIN2(zoomx, zoomy), NULL);
}
else {
- if((w >= width || h >= height) && (width > 0 && height > 0)) {
+ if ((w >= width || h >= height) && (width > 0 && height > 0)) {
zoomx= (float)width/w;
zoomy= (float)height/h;
@@ -702,12 +703,12 @@ static int view_all_exec(bContext *C, wmOperator *op)
void CLIP_OT_view_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View All";
- ot->idname= "CLIP_OT_view_all";
+ ot->name = "View All";
+ ot->idname = "CLIP_OT_view_all";
/* api callbacks */
- ot->exec= view_all_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = view_all_exec;
+ ot->poll = ED_space_clip_poll;
/* properties */
RNA_def_boolean(ot->srna, "fit_view", 0, "Fit View", "Fit frame to the viewport");
@@ -732,12 +733,12 @@ static int view_selected_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_view_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Selected";
- ot->idname= "CLIP_OT_view_selected";
+ ot->name = "View Selected";
+ ot->idname = "CLIP_OT_view_selected";
/* api callbacks */
- ot->exec= view_selected_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = view_selected_exec;
+ ot->poll = ED_space_clip_poll;
}
/********************** change frame operator *********************/
@@ -745,7 +746,7 @@ void CLIP_OT_view_selected(wmOperatorType *ot)
static int change_frame_poll(bContext *C)
{
/* prevent changes during render */
- if(G.rendering)
+ if (G.rendering)
return 0;
return ED_space_clip_poll(C);
@@ -778,11 +779,12 @@ static int frame_from_event(bContext *C, wmEvent *event)
Scene *scene= CTX_data_scene(C);
int framenr= 0;
- if(ar->regiontype == RGN_TYPE_WINDOW) {
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
float sfra= SFRA, efra= EFRA, framelen= ar->winx/(efra-sfra+1);
framenr= sfra+event->mval[0]/framelen;
- } else {
+ }
+ else {
float viewx, viewy;
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &viewx, &viewy);
@@ -797,8 +799,8 @@ static int change_frame_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
ARegion *ar= CTX_wm_region(C);
- if(ar->regiontype == RGN_TYPE_WINDOW) {
- if(event->mval[1]>16)
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
+ if (event->mval[1]>16)
return OPERATOR_PASS_THROUGH;
}
@@ -836,18 +838,18 @@ static int change_frame_modal(bContext *C, wmOperator *op, wmEvent *event)
void CLIP_OT_change_frame(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Change frame";
- ot->idname= "CLIP_OT_change_frame";
- ot->description= "Interactively change the current frame number";
+ ot->name = "Change frame";
+ ot->idname = "CLIP_OT_change_frame";
+ ot->description = "Interactively change the current frame number";
/* api callbacks */
- ot->exec= change_frame_exec;
- ot->invoke= change_frame_invoke;
- ot->modal= change_frame_modal;
- ot->poll= change_frame_poll;
+ ot->exec = change_frame_exec;
+ ot->invoke = change_frame_invoke;
+ ot->modal = change_frame_modal;
+ ot->poll = change_frame_poll;
/* flags */
- ot->flag= OPTYPE_BLOCKING|OPTYPE_UNDO;
+ ot->flag = OPTYPE_BLOCKING|OPTYPE_UNDO;
/* rna */
RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME);
@@ -875,18 +877,18 @@ static int proxy_bitflag_to_array(int size_flag, int build_sizes[4], int undisto
int build_count = 0;
int size_flags[2][4] = {{MCLIP_PROXY_SIZE_25,
MCLIP_PROXY_SIZE_50,
- MCLIP_PROXY_SIZE_75,
- MCLIP_PROXY_SIZE_100},
- {MCLIP_PROXY_UNDISTORTED_SIZE_25,
- MCLIP_PROXY_UNDISTORTED_SIZE_50,
- MCLIP_PROXY_UNDISTORTED_SIZE_75,
- MCLIP_PROXY_UNDISTORTED_SIZE_100}};
+ MCLIP_PROXY_SIZE_75,
+ MCLIP_PROXY_SIZE_100},
+ {MCLIP_PROXY_UNDISTORTED_SIZE_25,
+ MCLIP_PROXY_UNDISTORTED_SIZE_50,
+ MCLIP_PROXY_UNDISTORTED_SIZE_75,
+ MCLIP_PROXY_UNDISTORTED_SIZE_100}};
int size_nr = undistort ? 1 : 0;
- if(size_flag & size_flags[size_nr][0]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_25;
- if(size_flag & size_flags[size_nr][1]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_50;
- if(size_flag & size_flags[size_nr][2]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_75;
- if(size_flag & size_flags[size_nr][3]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_100;
+ if (size_flag & size_flags[size_nr][0]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_25;
+ if (size_flag & size_flags[size_nr][1]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_50;
+ if (size_flag & size_flags[size_nr][2]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_75;
+ if (size_flag & size_flags[size_nr][3]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_100;
return build_count;
}
@@ -908,11 +910,11 @@ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *prog
build_count= proxy_bitflag_to_array(size_flag, build_sizes, 0);
build_undistort_count= proxy_bitflag_to_array(size_flag, build_undistort_sizes, 1);
- if(clip->source == MCLIP_SRC_MOVIE) {
+ if (clip->source == MCLIP_SRC_MOVIE) {
if (pj->index_context)
IMB_anim_index_rebuild(pj->index_context, stop, do_update, progress);
- if(!build_undistort_count) {
+ if (!build_undistort_count) {
if (*stop)
pj->stop = 1;
@@ -924,23 +926,23 @@ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *prog
}
}
- if(build_undistort_count)
+ if (build_undistort_count)
distortion= BKE_tracking_distortion_create();
- for(cfra= sfra; cfra<=efra; cfra++) {
- if(clip->source != MCLIP_SRC_MOVIE)
+ for (cfra= sfra; cfra<=efra; cfra++) {
+ if (clip->source != MCLIP_SRC_MOVIE)
BKE_movieclip_build_proxy_frame(clip, pj->clip_flag, NULL, cfra, build_sizes, build_count, 0);
BKE_movieclip_build_proxy_frame(clip, pj->clip_flag, distortion, cfra, build_undistort_sizes, build_undistort_count, 1);
- if(*stop || G.afbreek)
+ if (*stop || G.afbreek)
break;
*do_update= 1;
*progress= ((float)cfra)/(efra-sfra);
}
- if(distortion)
+ if (distortion)
BKE_tracking_distortion_destroy(distortion);
if (*stop)
@@ -971,7 +973,7 @@ static int clip_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op))
SpaceClip *sc= CTX_wm_space_clip(C);
MovieClip *clip= ED_space_clip(sc);
- if((clip->flag&MCLIP_USE_PROXY)==0)
+ if ((clip->flag&MCLIP_USE_PROXY)==0)
return OPERATOR_CANCELLED;
steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Building Proxies", WM_JOB_PROGRESS);
@@ -1002,16 +1004,16 @@ static int clip_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_rebuild_proxy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Rebuild Proxy and Timecode Indices";
- ot->idname= "CLIP_OT_rebuild_proxy";
- ot->description= "Rebuild all selected proxies and timecode indices in the background";
+ ot->name = "Rebuild Proxy and Timecode Indices";
+ ot->idname = "CLIP_OT_rebuild_proxy";
+ ot->description = "Rebuild all selected proxies and timecode indices in the background";
/* api callbacks */
- ot->exec= clip_rebuild_proxy_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = clip_rebuild_proxy_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
}
/********************** mode set operator *********************/
@@ -1022,10 +1024,11 @@ static int mode_set_exec(bContext *C, wmOperator *op)
int mode= RNA_enum_get(op->ptr, "mode");
int toggle= RNA_boolean_get(op->ptr, "toggle");
- if(sc->mode==mode) {
- if(toggle)
+ if (sc->mode==mode) {
+ if (toggle)
sc->mode= SC_MODE_TRACKING;
- } else {
+ }
+ else {
sc->mode= mode;
}
@@ -1044,14 +1047,14 @@ void CLIP_OT_mode_set(wmOperatorType *ot)
/* identifiers */
- ot->name= "Set Clip Mode";
+ ot->name = "Set Clip Mode";
ot->description = "Set the clip interaction mode";
- ot->idname= "CLIP_OT_mode_set";
+ ot->idname = "CLIP_OT_mode_set";
/* api callbacks */
- ot->exec= mode_set_exec;
+ ot->exec = mode_set_exec;
- ot->poll= ED_space_clip_poll;
+ ot->poll = ED_space_clip_poll;
/* properties */
RNA_def_enum(ot->srna, "mode", mode_items, SC_MODE_TRACKING, "Mode", "");
@@ -1065,15 +1068,15 @@ void ED_operatormacros_clip(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot= WM_operatortype_append_macro("CLIP_OT_add_marker_move", "Add Marker and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("CLIP_OT_add_marker_move", "Add Marker and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Add new marker and move it on movie";
WM_operatortype_macro_define(ot, "CLIP_OT_add_marker");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_struct_idprops_unset(otmacro->ptr, "release_confirm");
- ot= WM_operatortype_append_macro("CLIP_OT_add_marker_slide", "Add Marker and Slide", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("CLIP_OT_add_marker_slide", "Add Marker and Slide", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Add new marker and slide it with mouse until mouse button release";
WM_operatortype_macro_define(ot, "CLIP_OT_add_marker");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
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 d90f429a206..b42b4137ea0 100644
--- a/source/blender/editors/space_clip/clip_toolbar.c
+++ b/source/blender/editors/space_clip/clip_toolbar.c
@@ -61,14 +61,14 @@ static ARegion *clip_has_properties_region(ScrArea *sa)
ARegion *ar, *arnew;
ar= BKE_area_find_region_type(sa, RGN_TYPE_UI);
- if(ar)
+ if (ar)
return ar;
/* add subdiv level; after header */
ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
/* is error! */
- if(ar==NULL)
+ if (ar==NULL)
return NULL;
arnew= MEM_callocN(sizeof(ARegion), "clip properties region");
@@ -92,7 +92,7 @@ static int properties_exec(bContext *C, wmOperator *UNUSED(op))
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= clip_has_properties_region(sa);
- if(ar)
+ if (ar)
ED_region_toggle_hidden(C, ar);
return OPERATOR_FINISHED;
@@ -101,13 +101,13 @@ static int properties_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_properties(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Properties";
- ot->description= "Toggle clip properties panel";
- ot->idname= "CLIP_OT_properties";
+ ot->name = "Properties";
+ ot->description = "Toggle clip properties panel";
+ ot->idname = "CLIP_OT_properties";
/* api callbacks */
- ot->exec= properties_exec;
- ot->poll= properties_poll;
+ ot->exec = properties_exec;
+ ot->poll = properties_poll;
}
/************************** tools ******************************/
@@ -116,23 +116,23 @@ static ARegion *clip_has_tools_region(ScrArea *sa)
{
ARegion *ar, *artool=NULL, *arprops=NULL, *arhead;
- for(ar= sa->regionbase.first; ar; ar= ar->next) {
- if(ar->regiontype==RGN_TYPE_TOOLS)
+ for (ar= sa->regionbase.first; ar; ar= ar->next) {
+ if (ar->regiontype==RGN_TYPE_TOOLS)
artool= ar;
- if(ar->regiontype==RGN_TYPE_TOOL_PROPS)
+ if (ar->regiontype==RGN_TYPE_TOOL_PROPS)
arprops= ar;
}
/* tool region hide/unhide also hides props */
- if(arprops && artool)
+ if (arprops && artool)
return artool;
- if(artool==NULL) {
+ if (artool==NULL) {
/* add subdiv level; after header */
arhead= BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
/* is error! */
- if(arhead==NULL)
+ if (arhead==NULL)
return NULL;
artool= MEM_callocN(sizeof(ARegion), "clip tools region");
@@ -144,7 +144,7 @@ static ARegion *clip_has_tools_region(ScrArea *sa)
artool->flag= RGN_FLAG_HIDDEN;
}
- if(arprops==NULL) {
+ if (arprops==NULL) {
/* add extra subdivided region for tool properties */
arprops= MEM_callocN(sizeof(ARegion), "tool props for clip");
@@ -166,7 +166,7 @@ static int tools_exec(bContext *C, wmOperator *UNUSED(op))
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= clip_has_tools_region(sa);
- if(ar)
+ if (ar)
ED_region_toggle_hidden(C, ar);
return OPERATOR_FINISHED;
@@ -175,13 +175,13 @@ static int tools_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_tools(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Tools";
- ot->description= "Toggle clip tools panel";
- ot->idname= "CLIP_OT_tools";
+ ot->name = "Tools";
+ ot->description = "Toggle clip tools panel";
+ ot->idname = "CLIP_OT_tools";
/* api callbacks */
- ot->exec= tools_exec;
- ot->poll= tools_poll;
+ ot->exec = tools_exec;
+ ot->poll = tools_poll;
}
/************************** redo panel ******************************/
@@ -195,14 +195,14 @@ static void clip_panel_operator_redo_header(const bContext *C, Panel *pa)
{
wmOperator *op= WM_operator_last_redo(C);
- if(op) BLI_strncpy(pa->drawname, op->type->name, sizeof(pa->drawname));
+ if (op) BLI_strncpy(pa->drawname, op->type->name, sizeof(pa->drawname));
else BLI_strncpy(pa->drawname, "Operator", sizeof(pa->drawname));
}
static void clip_panel_operator_redo_operator(const bContext *C, Panel *pa, wmOperator *op)
{
- if(op->type->flag & OPTYPE_MACRO) {
- for(op= op->macro.first; op; op= op->next) {
+ if (op->type->flag & OPTYPE_MACRO) {
+ for (op= op->macro.first; op; op= op->next) {
uiItemL(pa->layout, op->type->name, ICON_NONE);
clip_panel_operator_redo_operator(C, pa, op);
}
@@ -218,9 +218,9 @@ static void clip_panel_operator_redo(const bContext *C, Panel *pa)
wmOperator *op= WM_operator_last_redo(C);
uiBlock *block;
- if(op==NULL)
+ if (op==NULL)
return;
- if(WM_operator_poll((bContext*)C, op->type) == 0)
+ if (WM_operator_poll((bContext*)C, op->type) == 0)
return;
block= uiLayoutGetBlock(pa->layout);
diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c
index 46442d39a7b..c637bffe3ad 100644
--- a/source/blender/editors/space_clip/clip_utils.c
+++ b/source/blender/editors/space_clip/clip_utils.c
@@ -67,17 +67,17 @@ void clip_graph_tracking_values_iterate_track(SpaceClip *sc, MovieTrackingTrack
BKE_movieclip_get_size(clip, &sc->user, &width, &height);
- for(coord= 0; coord<2; coord++) {
+ for (coord= 0; coord<2; coord++) {
int i, open= 0, prevfra= 0;
float prevval= 0.0f;
- for(i= 0; i<track->markersnr; i++) {
+ for (i= 0; i<track->markersnr; i++) {
MovieTrackingMarker *marker= &track->markers[i];
float val;
- if(marker->flag&MARKER_DISABLED) {
- if(open) {
- if(segment_end)
+ if (marker->flag&MARKER_DISABLED) {
+ if (open) {
+ if (segment_end)
segment_end(userdata);
open= 0;
@@ -86,8 +86,8 @@ void clip_graph_tracking_values_iterate_track(SpaceClip *sc, MovieTrackingTrack
continue;
}
- if(!open) {
- if(segment_start)
+ if (!open) {
+ if (segment_start)
segment_start(userdata, track, coord);
open= 1;
@@ -98,15 +98,15 @@ void clip_graph_tracking_values_iterate_track(SpaceClip *sc, MovieTrackingTrack
val= (marker->pos[coord] - prevval) * ((coord==0) ? (width) : (height));
val/= marker->framenr-prevfra;
- if(func)
+ if (func)
func(userdata, track, marker, coord, val);
prevval= marker->pos[coord];
prevfra= marker->framenr;
}
- if(open) {
- if(segment_end)
+ if (open) {
+ if (segment_end)
segment_end(userdata);
}
}
@@ -123,8 +123,8 @@ void clip_graph_tracking_values_iterate(SpaceClip *sc, void *userdata,
MovieTrackingTrack *track;
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track)) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track)) {
clip_graph_tracking_values_iterate_track(sc, track, userdata, func, segment_start, segment_end);
}
@@ -141,17 +141,17 @@ void clip_graph_tracking_iterate(SpaceClip *sc, void *userdata,
MovieTrackingTrack *track;
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track)) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track)) {
int i;
- for(i= 0; i<track->markersnr; i++) {
+ for (i= 0; i<track->markersnr; i++) {
MovieTrackingMarker *marker= &track->markers[i];
- if(marker->flag&MARKER_DISABLED)
+ if (marker->flag&MARKER_DISABLED)
continue;
- if(func)
+ if (func)
func(userdata, marker);
}
}
@@ -168,17 +168,17 @@ void clip_delete_track(bContext *C, MovieClip *clip, ListBase *tracksbase, Movie
int has_bundle= 0, update_stab= 0;
- if(track==act_track)
+ if (track==act_track)
tracking->act_track= NULL;
- if(track==stab->rot_track) {
+ if (track==stab->rot_track) {
stab->rot_track= NULL;
update_stab= 1;
}
/* handle reconstruction display in 3d viewport */
- if(track->flag&TRACK_HAS_BUNDLE)
+ if (track->flag&TRACK_HAS_BUNDLE)
has_bundle= 1;
BKE_tracking_free_track(track);
@@ -186,20 +186,20 @@ void clip_delete_track(bContext *C, MovieClip *clip, ListBase *tracksbase, Movie
WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip);
- if(update_stab) {
+ if (update_stab) {
tracking->stabilization.ok= 0;
DAG_id_tag_update(&clip->id, 0);
WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip);
}
- if(has_bundle)
+ if (has_bundle)
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, NULL);
}
void clip_delete_marker(bContext *C, MovieClip *clip, ListBase *tracksbase, MovieTrackingTrack *track, MovieTrackingMarker *marker)
{
- if(track->markersnr==1) {
+ if (track->markersnr==1) {
clip_delete_track(C, clip, tracksbase, track);
}
else {
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index a92830e1992..ca66248682c 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -77,10 +77,10 @@ static void init_preview_region(const bContext *C, ARegion *ar)
ar->alignment= RGN_ALIGN_TOP;
ar->flag|= RGN_FLAG_HIDDEN;
- ar->v2d.tot.xmin= 0.0f;
- ar->v2d.tot.ymin= -10.0f;
- ar->v2d.tot.xmax= (float)scene->r.efra;
- ar->v2d.tot.ymax= 10.0f;
+ ar->v2d.tot.xmin = 0.0f;
+ ar->v2d.tot.ymin = -10.0f;
+ ar->v2d.tot.xmax = (float)scene->r.efra;
+ ar->v2d.tot.ymax = 10.0f;
ar->v2d.cur= ar->v2d.tot;
@@ -101,14 +101,14 @@ static ARegion *clip_has_preview_region(const bContext *C, ScrArea *sa)
ARegion *ar, *arnew;
ar= BKE_area_find_region_type(sa, RGN_TYPE_PREVIEW);
- if(ar)
+ if (ar)
return ar;
/* add subdiv level; after header */
ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
/* is error! */
- if(ar==NULL)
+ if (ar==NULL)
return NULL;
arnew= MEM_callocN(sizeof(ARegion), "clip preview region");
@@ -124,7 +124,7 @@ static void clip_scopes_tag_refresh(ScrArea *sa)
SpaceClip *sc= (SpaceClip *)sa->spacedata.first;
ARegion *ar;
- if(sc->mode!=SC_MODE_TRACKING)
+ if (sc->mode!=SC_MODE_TRACKING)
return;
/* only while proeprties are visible */
@@ -141,7 +141,7 @@ static void clip_stabilization_tag_refresh(ScrArea *sa)
SpaceClip *sc= (SpaceClip *)sa->spacedata.first;
MovieClip *clip= ED_space_clip(sc);
- if(clip) {
+ if (clip) {
MovieTrackingStabilization *stab= &clip->tracking.stabilization;
stab->ok= 0;
@@ -212,7 +212,7 @@ static void clip_free(SpaceLink *sl)
sc->clip= NULL;
- if(sc->scopes.track_preview)
+ if (sc->scopes.track_preview)
IMB_freeImBuf(sc->scopes.track_preview);
}
@@ -278,12 +278,12 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_SCREEN:
- if(wmn->data==ND_ANIMPLAY) {
+ if (wmn->data==ND_ANIMPLAY) {
ED_area_tag_redraw(sa);
}
break;
case NC_SPACE:
- if(wmn->data==ND_SPACE_CLIP) {
+ if (wmn->data==ND_SPACE_CLIP) {
clip_scopes_tag_refresh(sa);
clip_stabilization_tag_refresh(sa);
ED_area_tag_redraw(sa);
@@ -400,7 +400,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
/* ******** Global hotkeys avalaible for all regions ******** */
- keymap= WM_keymap_find(keyconf, "Clip", SPACE_CLIP, 0);
+ keymap = WM_keymap_find(keyconf, "Clip", SPACE_CLIP, 0);
WM_keymap_add_item(keymap, "CLIP_OT_open", OKEY, KM_PRESS, KM_ALT, 0);
@@ -408,23 +408,25 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "CLIP_OT_properties", NKEY, KM_PRESS, 0, 0);
/* 2d tracking */
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_track_markers", LEFTARROWKEY, KM_PRESS, KM_ALT, 0);
+ 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);
- WM_keymap_add_item(keymap, "CLIP_OT_track_markers", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0);
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_CTRL, 0);
+ 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);
+ 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);
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+ 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);
/* mode */
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_mode_set", TABKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_mode_set", TABKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "mode", SC_MODE_RECONSTRUCTION);
RNA_boolean_set(kmi->ptr, "toggle", TRUE);
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "mode", SC_MODE_DISTORTION);
RNA_boolean_set(kmi->ptr, "toggle", TRUE);
@@ -437,7 +439,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
/* ******** Hotkeys avalaible for main region only ******** */
- keymap= WM_keymap_find(keyconf, "Clip Editor", SPACE_CLIP, 0);
+ keymap = WM_keymap_find(keyconf, "Clip Editor", SPACE_CLIP, 0);
/* ** View/navigation ** */
@@ -468,16 +470,16 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "CLIP_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
/* jump to special frame */
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "position", 0);
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "position", 1);
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "position", 2);
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "position", 3);
/* "timeline" */
@@ -504,23 +506,23 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "CLIP_OT_slide_marker", LEFTMOUSE, KM_PRESS, 0, 0);
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_disable_markers", DKEY, KM_PRESS, KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_disable_markers", DKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "action", 2); /* toggle */
/* tracks */
WM_keymap_add_item(keymap, "CLIP_OT_delete_track", DELKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "CLIP_OT_delete_track", XKEY, KM_PRESS, 0, 0);
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_lock_tracks", LKEY, KM_PRESS, KM_CTRL, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_lock_tracks", LKEY, KM_PRESS, KM_CTRL, 0);
RNA_enum_set(kmi->ptr, "action", 0); /* lock */
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_lock_tracks", LKEY, KM_PRESS, KM_ALT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_lock_tracks", LKEY, KM_PRESS, KM_ALT, 0);
RNA_enum_set(kmi->ptr, "action", 1); /* unlock */
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, 0, 0);
RNA_boolean_set(kmi->ptr, "unselected", FALSE);
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "unselected", TRUE);
WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks_clear", HKEY, KM_PRESS, KM_ALT, 0);
@@ -532,34 +534,34 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_menu(keymap, "CLIP_MT_tracking_specials", WKEY, KM_PRESS, 0, 0);
/* display */
- kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", LKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", LKEY, KM_PRESS, 0, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.lock_selection");
- kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", DKEY, KM_PRESS, KM_ALT, 0);
+ kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", DKEY, KM_PRESS, KM_ALT, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.show_disabled");
- kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", SKEY, KM_PRESS, KM_ALT, 0);
+ kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", SKEY, KM_PRESS, KM_ALT, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.show_marker_search");
- kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", MKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", MKEY, KM_PRESS, 0, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.use_mute_footage");
transform_keymap_for_space(keyconf, keymap, SPACE_CLIP);
/* clean-up */
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_SHIFT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+ 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);
/* ******** Hotkeys avalaible for preview region only ******** */
- keymap= WM_keymap_find(keyconf, "Clip Graph Editor", SPACE_CLIP, 0);
+ keymap = WM_keymap_find(keyconf, "Clip Graph Editor", SPACE_CLIP, 0);
/* "timeline" */
WM_keymap_add_item(keymap, "CLIP_OT_change_frame", ACTIONMOUSE, KM_PRESS, 0, 0);
@@ -588,22 +590,22 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "CLIP_OT_graph_view_all", HOMEKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "CLIP_OT_graph_center_current_frame", PADPERIOD, KM_PRESS, 0, 0);
- kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", LKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", LKEY, KM_PRESS, 0, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.lock_time_cursor");
/* clean-up */
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_SHIFT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+ 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);
/* tracks */
- kmi= WM_keymap_add_item(keymap, "CLIP_OT_graph_disable_markers", DKEY, KM_PRESS, KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "CLIP_OT_graph_disable_markers", DKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "action", 2); /* toggle */
transform_keymap_for_space(keyconf, keymap, SPACE_CLIP);
@@ -615,11 +617,11 @@ static int clip_context(const bContext *C, const char *member, bContextDataResul
{
SpaceClip *sc= CTX_wm_space_clip(C);
- if(CTX_data_dir(member)) {
+ if (CTX_data_dir(member)) {
CTX_data_dir_set(result, clip_context_dir);
return 1;
}
- else if(CTX_data_equals(member, "edit_movieclip")) {
+ else if (CTX_data_equals(member, "edit_movieclip")) {
CTX_data_id_pointer_set(result, &sc->clip->id);
return 1;
}
@@ -682,7 +684,7 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
break;
}
- if(view_changed) {
+ if (view_changed) {
ED_area_initialize(wm, window, sa);
ED_area_tag_redraw(sa);
}
@@ -704,20 +706,20 @@ static void movieclip_main_area_set_view2d(SpaceClip *sc, ARegion *ar)
w= width;
h= height;
- if(clip)
+ if (clip)
h*= clip->aspy/clip->aspx/clip->tracking.camera.pixel_aspect;
winx= ar->winrct.xmax - ar->winrct.xmin + 1;
winy= ar->winrct.ymax - ar->winrct.ymin + 1;
- ar->v2d.tot.xmin= 0;
- ar->v2d.tot.ymin= 0;
- ar->v2d.tot.xmax= w;
- ar->v2d.tot.ymax= h;
+ ar->v2d.tot.xmin = 0;
+ ar->v2d.tot.ymin = 0;
+ ar->v2d.tot.xmax = w;
+ ar->v2d.tot.ymax = h;
- ar->v2d.mask.xmin= ar->v2d.mask.ymin= 0;
- ar->v2d.mask.xmax= winx;
- ar->v2d.mask.ymax= winy;
+ ar->v2d.mask.xmin = ar->v2d.mask.ymin = 0;
+ ar->v2d.mask.xmax = winx;
+ ar->v2d.mask.ymax = winy;
/* which part of the image space do we see? */
x1= ar->winrct.xmin+(winx-sc->zoom*w)/2.0f;
@@ -727,12 +729,12 @@ static void movieclip_main_area_set_view2d(SpaceClip *sc, ARegion *ar)
y1-= sc->zoom*sc->yof;
/* relative display right */
- ar->v2d.cur.xmin= ((ar->winrct.xmin - (float)x1)/sc->zoom);
- ar->v2d.cur.xmax= ar->v2d.cur.xmin + ((float)winx/sc->zoom);
+ ar->v2d.cur.xmin = ((ar->winrct.xmin - (float)x1)/sc->zoom);
+ ar->v2d.cur.xmax = ar->v2d.cur.xmin + ((float)winx/sc->zoom);
/* relative display left */
- ar->v2d.cur.ymin= ((ar->winrct.ymin-(float)y1)/sc->zoom);
- ar->v2d.cur.ymax= ar->v2d.cur.ymin + ((float)winy/sc->zoom);
+ ar->v2d.cur.ymin = ((ar->winrct.ymin-(float)y1)/sc->zoom);
+ ar->v2d.cur.ymax = ar->v2d.cur.ymin + ((float)winy/sc->zoom);
/* normalize 0.0..1.0 */
ar->v2d.cur.xmin /= w;
@@ -749,10 +751,10 @@ static void clip_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "Clip", SPACE_CLIP, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Clip", SPACE_CLIP, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_find(wm->defaultconf, "Clip Editor", SPACE_CLIP, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Clip Editor", SPACE_CLIP, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -765,22 +767,22 @@ static void clip_main_area_draw(const bContext *C, ARegion *ar)
/* if tracking is in progress, we should synchronize framenr from clipuser
* so latest tracked frame would be shown */
- if(clip && clip->tracking_context)
+ if (clip && clip->tracking_context)
BKE_tracking_sync_user(&sc->user, clip->tracking_context);
- if(sc->flag&SC_LOCK_SELECTION) {
+ if (sc->flag&SC_LOCK_SELECTION) {
ImBuf *tmpibuf= NULL;
- if(clip && clip->tracking.stabilization.flag&TRACKING_2D_STABILIZATION) {
+ if (clip && clip->tracking.stabilization.flag&TRACKING_2D_STABILIZATION) {
tmpibuf= ED_space_clip_get_stable_buffer(sc, NULL, NULL, NULL);
}
- if(ED_clip_view_selection(sc, ar, 0)) {
+ if (ED_clip_view_selection(sc, ar, 0)) {
sc->xof+= sc->xlockof;
sc->yof+= sc->ylockof;
}
- if(tmpibuf)
+ if (tmpibuf)
IMB_freeImBuf(tmpibuf);
}
@@ -823,10 +825,10 @@ static void clip_preview_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "Clip", SPACE_CLIP, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Clip", SPACE_CLIP, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_find(wm->defaultconf, "Clip Graph Editor", SPACE_CLIP, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Clip Graph Editor", SPACE_CLIP, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -838,7 +840,7 @@ static void clip_preview_area_draw(const bContext *C, ARegion *ar)
Scene *scene= CTX_data_scene(C);
short unitx= V2D_UNIT_FRAMESCALE, unity= V2D_UNIT_VALUES;
- if(sc->flag & SC_LOCK_TIMECURSOR)
+ if (sc->flag & SC_LOCK_TIMECURSOR)
ED_clip_graph_center_current_frame(scene, ar);
/* clear and setup matrix */
@@ -896,19 +898,19 @@ static void clip_props_area_listener(ARegion *ar, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
case NC_WM:
- if(wmn->data == ND_HISTORY)
+ if (wmn->data == ND_HISTORY)
ED_region_tag_redraw(ar);
break;
case NC_SCENE:
- if(wmn->data == ND_MODE)
+ if (wmn->data == ND_MODE)
ED_region_tag_redraw(ar);
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_CLIP)
+ if (wmn->data == ND_SPACE_CLIP)
ED_region_tag_redraw(ar);
break;
case NC_SCREEN:
- if(wmn->data == ND_GPENCIL)
+ if (wmn->data == ND_GPENCIL)
ED_region_tag_redraw(ar);
break;
}
@@ -923,7 +925,7 @@ static void clip_properties_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_find(wm->defaultconf, "Clip", SPACE_CLIP, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Clip", SPACE_CLIP, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -945,7 +947,7 @@ static void clip_properties_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case NC_BRUSH:
- if(wmn->action==NA_EDITED)
+ if (wmn->action==NA_EDITED)
ED_region_tag_redraw(ar);
break;
}
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index b4990180b19..6cb7536b1ae 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -82,10 +82,10 @@ static int space_clip_frame_poll(bContext *C)
{
SpaceClip *sc= CTX_wm_space_clip(C);
- if(sc) {
+ if (sc) {
MovieClip *clip= ED_space_clip(sc);
- if(clip)
+ if (clip)
return BKE_movieclip_has_frame(clip, &sc->user);
}
@@ -119,7 +119,7 @@ static int add_marker_exec(bContext *C, wmOperator *op)
int width, height;
ED_space_clip_size(sc, &width, &height);
- if(!width || !height)
+ if (!width || !height)
return OPERATOR_CANCELLED;
RNA_float_get_array(op->ptr, "location", pos);
@@ -149,17 +149,17 @@ static int add_marker_invoke(bContext *C, wmOperator *op, wmEvent *event)
void CLIP_OT_add_marker(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Marker";
- ot->idname= "CLIP_OT_add_marker";
- ot->description= "Place new marker at specified location";
+ ot->name = "Add Marker";
+ ot->idname = "CLIP_OT_add_marker";
+ ot->description = "Place new marker at specified location";
/* api callbacks */
- ot->invoke= add_marker_invoke;
- ot->exec= add_marker_exec;
- ot->poll= space_clip_frame_poll;
+ ot->invoke = add_marker_invoke;
+ ot->exec = add_marker_exec;
+ ot->poll = space_clip_frame_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MIN, FLT_MAX,
@@ -176,10 +176,10 @@ static int delete_track_exec(bContext *C, wmOperator *UNUSED(op))
ListBase *tracksbase= BKE_tracking_get_tracks(tracking);
MovieTrackingTrack *track= tracksbase->first, *next;
- while(track) {
+ while (track) {
next= track->next;
- if(TRACK_VIEW_SELECTED(sc, track))
+ if (TRACK_VIEW_SELECTED(sc, track))
clip_delete_track(C, clip, tracksbase, track);
track= next;
@@ -194,17 +194,17 @@ static int delete_track_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_delete_track(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Track";
- ot->idname= "CLIP_OT_delete_track";
- ot->description= "Delete selected tracks";
+ ot->name = "Delete Track";
+ ot->idname = "CLIP_OT_delete_track";
+ ot->description = "Delete selected tracks";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= delete_track_exec;
- ot->poll= ED_space_clip_poll;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = delete_track_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** delete marker operator *********************/
@@ -218,13 +218,13 @@ static int delete_marker_exec(bContext *C, wmOperator *UNUSED(op))
int framenr= sc->user.framenr;
int has_selection= 0;
- while(track) {
+ while (track) {
next= track->next;
- if(TRACK_VIEW_SELECTED(sc, track)) {
+ if (TRACK_VIEW_SELECTED(sc, track)) {
MovieTrackingMarker *marker= BKE_tracking_exact_marker(track, framenr);
- if(marker) {
+ if (marker) {
has_selection|= track->markersnr>1;
clip_delete_marker(C, clip, tracksbase, track, marker);
@@ -234,7 +234,7 @@ static int delete_marker_exec(bContext *C, wmOperator *UNUSED(op))
track= next;
}
- if(!has_selection) {
+ if (!has_selection) {
/* nothing selected now, unlock view so it can be scrolled nice again */
sc->flag&= ~SC_LOCK_SELECTION;
}
@@ -245,17 +245,17 @@ static int delete_marker_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_delete_marker(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Marker";
- ot->idname= "CLIP_OT_delete_marker";
- ot->description= "Delete marker for current frame from selected tracks";
+ ot->name = "Delete Marker";
+ ot->idname = "CLIP_OT_delete_marker";
+ ot->description = "Delete marker for current frame from selected tracks";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= delete_marker_exec;
- ot->poll= ED_space_clip_poll;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = delete_marker_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** slide marker operator *********************/
@@ -290,16 +290,18 @@ static SlideMarkerData *create_slide_marker_data(SpaceClip *sc, MovieTrackingTra
data->track= track;
data->marker= marker;
- if(area==TRACK_AREA_POINT) {
+ if (area==TRACK_AREA_POINT) {
data->pos= marker->pos;
data->offset= track->offset;
copy_v2_v2(data->spos, marker->pos);
copy_v2_v2(data->soff, track->offset);
- } else if(area==TRACK_AREA_PAT) {
- if(action==SLIDE_ACTION_SIZE) {
+ }
+ else if (area==TRACK_AREA_PAT) {
+ if (action==SLIDE_ACTION_SIZE) {
data->min= track->pat_min;
data->max= track->pat_max;
- } else {
+ }
+ else {
int a;
data->pos= marker->pos;
@@ -308,15 +310,16 @@ static SlideMarkerData *create_slide_marker_data(SpaceClip *sc, MovieTrackingTra
copy_v2_v2(data->soff, track->offset);
data->smarkers= MEM_callocN(sizeof(*data->smarkers)*track->markersnr, "slide marekrs");
- for(a= 0; a<track->markersnr; a++)
+ for (a= 0; a<track->markersnr; a++)
copy_v2_v2(data->smarkers[a], track->markers[a].pos);
}
- } else if(area==TRACK_AREA_SEARCH) {
+ }
+ else if (area==TRACK_AREA_SEARCH) {
data->min= track->search_min;
data->max= track->search_max;
}
- if(area==TRACK_AREA_SEARCH || (area==TRACK_AREA_PAT && action!=SLIDE_ACTION_OFFSET)) {
+ if (area==TRACK_AREA_SEARCH || (area==TRACK_AREA_PAT && action!=SLIDE_ACTION_OFFSET)) {
copy_v2_v2(data->smin, data->min);
copy_v2_v2(data->smax, data->max);
}
@@ -327,7 +330,7 @@ static SlideMarkerData *create_slide_marker_data(SpaceClip *sc, MovieTrackingTra
data->width= width;
data->height= height;
- if(action==SLIDE_ACTION_SIZE)
+ if (action==SLIDE_ACTION_SIZE)
data->lock= 1;
return data;
@@ -343,10 +346,11 @@ static int mouse_on_corner(SpaceClip *sc, MovieTrackingTrack *track, MovieTracki
float min[2], max[2];
float crn[2], dx, dy, tdx, tdy;
- if(area==TRACK_AREA_SEARCH) {
+ if (area==TRACK_AREA_SEARCH) {
copy_v2_v2(min, track->search_min);
copy_v2_v2(max, track->search_max);
- } else {
+ }
+ else {
copy_v2_v2(min, track->pat_min);
copy_v2_v2(max, track->pat_max);
}
@@ -360,12 +364,13 @@ static int mouse_on_corner(SpaceClip *sc, MovieTrackingTrack *track, MovieTracki
dx= MIN2(dx, (max[0]-min[0])/6.0f) + tdx;
dy= MIN2(dy, (max[1]-min[1])/6.0f) + tdy;
- if(corner==0) {
+ if (corner==0) {
crn[0]= marker->pos[0]+max[0];
crn[1]= marker->pos[1]+min[1];
inside= co[0]>=crn[0]-dx && co[0]<=crn[0]+tdx && co[1]>=crn[1]-tdy && co[1]<=crn[1]+dy;
- } else {
+ }
+ else {
crn[0]= marker->pos[0]+min[0];
crn[1]= marker->pos[1]+max[1];
@@ -417,37 +422,37 @@ static void *slide_marker_customdata(bContext *C, wmEvent *event)
ED_space_clip_size(sc, &width, &height);
- if(width==0 || height==0)
+ if (width==0 || height==0)
return NULL;
ED_clip_mouse_pos(C, event, co);
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) {
MovieTrackingMarker *marker= BKE_tracking_get_marker(track, sc->user.framenr);
- if((marker->flag&MARKER_DISABLED)==0) {
- if(!customdata)
- if(mouse_on_offset(sc, track, marker, co, width, height))
+ if ((marker->flag&MARKER_DISABLED)==0) {
+ if (!customdata)
+ if (mouse_on_offset(sc, track, marker, co, width, height))
customdata= create_slide_marker_data(sc, track, marker, event, TRACK_AREA_POINT, SLIDE_ACTION_POS, width, height);
- if(sc->flag&SC_SHOW_MARKER_SEARCH) {
- if(mouse_on_corner(sc, track, marker, TRACK_AREA_SEARCH, co, 1, width, height))
+ if (sc->flag&SC_SHOW_MARKER_SEARCH) {
+ if (mouse_on_corner(sc, track, marker, TRACK_AREA_SEARCH, co, 1, width, height))
customdata= create_slide_marker_data(sc, track, marker, event, TRACK_AREA_SEARCH, SLIDE_ACTION_OFFSET, width, height);
- else if(mouse_on_corner(sc, track, marker, TRACK_AREA_SEARCH, co, 0, width, height))
+ else if (mouse_on_corner(sc, track, marker, TRACK_AREA_SEARCH, co, 0, width, height))
customdata= create_slide_marker_data(sc, track, marker, event, TRACK_AREA_SEARCH, SLIDE_ACTION_SIZE, width, height);
}
- if(!customdata && sc->flag&SC_SHOW_MARKER_PATTERN) {
- if(mouse_on_corner(sc, track, marker, TRACK_AREA_PAT, co, 1, width, height))
+ if (!customdata && sc->flag&SC_SHOW_MARKER_PATTERN) {
+ if (mouse_on_corner(sc, track, marker, TRACK_AREA_PAT, co, 1, width, height))
customdata= create_slide_marker_data(sc, track, marker, event, TRACK_AREA_PAT, SLIDE_ACTION_OFFSET, width, height);
- if(!customdata && mouse_on_corner(sc, track, marker, TRACK_AREA_PAT, co, 0, width, height))
+ if (!customdata && mouse_on_corner(sc, track, marker, TRACK_AREA_PAT, co, 0, width, height))
customdata= create_slide_marker_data(sc, track, marker, event, TRACK_AREA_PAT, SLIDE_ACTION_SIZE, width, height);
}
- if(customdata)
+ if (customdata)
break;
}
}
@@ -462,7 +467,7 @@ static int slide_marker_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SlideMarkerData *slidedata= slide_marker_customdata(C, event);
- if(slidedata) {
+ if (slidedata) {
SpaceClip *sc= CTX_wm_space_clip(C);
MovieClip *clip= ED_space_clip(sc);
MovieTracking *tracking= &clip->tracking;
@@ -485,19 +490,21 @@ static int slide_marker_invoke(bContext *C, wmOperator *op, wmEvent *event)
static void cancel_mouse_slide(SlideMarkerData *data)
{
/* cancel sliding */
- if(data->area == TRACK_AREA_POINT) {
- if(data->action==SLIDE_ACTION_OFFSET)
+ if (data->area == TRACK_AREA_POINT) {
+ if (data->action==SLIDE_ACTION_OFFSET)
copy_v2_v2(data->offset, data->soff);
else
copy_v2_v2(data->pos, data->spos);
- } else {
- if(data->action==SLIDE_ACTION_SIZE) {
+ }
+ else {
+ if (data->action==SLIDE_ACTION_SIZE) {
copy_v2_v2(data->min, data->smin);
copy_v2_v2(data->max, data->smax);
- } else {
+ }
+ else {
int a;
- for(a= 0; a<data->track->markersnr; a++)
+ for (a= 0; a<data->track->markersnr; a++)
copy_v2_v2(data->track->markers[a].pos, data->smarkers[a]);
copy_v2_v2(data->offset, data->soff);
@@ -507,7 +514,7 @@ static void cancel_mouse_slide(SlideMarkerData *data)
static void free_slide_data(SlideMarkerData *data)
{
- if(data->smarkers) MEM_freeN(data->smarkers);
+ if (data->smarkers) MEM_freeN(data->smarkers);
MEM_freeN(data);
}
@@ -522,11 +529,11 @@ static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event)
case RIGHTCTRLKEY:
case LEFTSHIFTKEY:
case RIGHTSHIFTKEY:
- if(data->action==SLIDE_ACTION_SIZE)
- if(ELEM(event->type, LEFTCTRLKEY, RIGHTCTRLKEY))
+ if (data->action==SLIDE_ACTION_SIZE)
+ if (ELEM(event->type, LEFTCTRLKEY, RIGHTCTRLKEY))
data->lock= event->val==KM_RELEASE;
- if(ELEM(event->type, LEFTSHIFTKEY, RIGHTSHIFTKEY))
+ if (ELEM(event->type, LEFTSHIFTKEY, RIGHTSHIFTKEY))
data->accurate= event->val==KM_PRESS;
/* no break! update area size */
@@ -537,19 +544,20 @@ static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event)
dx= mdelta[0]/data->width/sc->zoom;
- if(data->lock) dy= -dx/data->height*data->width;
+ if (data->lock) dy= -dx/data->height*data->width;
else dy= mdelta[1]/data->height/sc->zoom;
- if(data->accurate) {
+ if (data->accurate) {
dx/= 5;
dy/= 5;
}
- if(data->area==TRACK_AREA_POINT) {
- if(data->action==SLIDE_ACTION_OFFSET) {
+ if (data->area==TRACK_AREA_POINT) {
+ if (data->action==SLIDE_ACTION_OFFSET) {
data->offset[0]= data->soff[0]+dx;
data->offset[1]= data->soff[1]+dy;
- } else {
+ }
+ else {
data->pos[0]= data->spos[0]+dx;
data->pos[1]= data->spos[1]+dy;
@@ -558,32 +566,35 @@ static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event)
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
DAG_id_tag_update(&sc->clip->id, 0);
- } else {
- if(data->action==SLIDE_ACTION_SIZE) {
+ }
+ else {
+ if (data->action==SLIDE_ACTION_SIZE) {
data->min[0]= data->smin[0]-dx;
data->max[0]= data->smax[0]+dx;
data->min[1]= data->smin[1]+dy;
data->max[1]= data->smax[1]-dy;
- if(data->area==TRACK_AREA_SEARCH) BKE_tracking_clamp_track(data->track, CLAMP_SEARCH_DIM);
+ if (data->area==TRACK_AREA_SEARCH) BKE_tracking_clamp_track(data->track, CLAMP_SEARCH_DIM);
else BKE_tracking_clamp_track(data->track, CLAMP_PAT_DIM);
- } else {
+ }
+ else {
float d[2]={dx, dy};
- if(data->area==TRACK_AREA_SEARCH) {
+ if (data->area==TRACK_AREA_SEARCH) {
add_v2_v2v2(data->min, data->smin, d);
add_v2_v2v2(data->max, data->smax, d);
- } else {
+ }
+ else {
int a;
- for(a= 0; a<data->track->markersnr; a++)
+ for (a= 0; a<data->track->markersnr; a++)
add_v2_v2v2(data->track->markers[a].pos, data->smarkers[a], d);
sub_v2_v2v2(data->offset, data->soff, d);
}
- if(data->area==TRACK_AREA_SEARCH)
+ if (data->area==TRACK_AREA_SEARCH)
BKE_tracking_clamp_track(data->track, CLAMP_SEARCH_POS);
}
}
@@ -593,7 +604,7 @@ static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event)
break;
case LEFTMOUSE:
- if(event->val==KM_RELEASE) {
+ if (event->val==KM_RELEASE) {
free_slide_data(op->customdata);
show_cursor(C);
@@ -621,17 +632,17 @@ static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event)
void CLIP_OT_slide_marker(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Slide Marker";
- ot->description= "Slide marker areas";
- ot->idname= "CLIP_OT_slide_marker";
+ ot->name = "Slide Marker";
+ ot->description = "Slide marker areas";
+ ot->idname = "CLIP_OT_slide_marker";
/* api callbacks */
- ot->poll= space_clip_frame_poll;
- ot->invoke= slide_marker_invoke;
- ot->modal= slide_marker_modal;
+ ot->poll = space_clip_frame_poll;
+ ot->invoke = slide_marker_invoke;
+ ot->modal = slide_marker_modal;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_GRAB_POINTER|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_GRAB_POINTER|OPTYPE_BLOCKING;
/* properties */
RNA_def_float_vector(ot->srna, "offset", 2, NULL, -FLT_MAX, FLT_MAX,
@@ -642,8 +653,8 @@ void CLIP_OT_slide_marker(wmOperatorType *ot)
static int mouse_on_side(float co[2], float x1, float y1, float x2, float y2, float epsx, float epsy)
{
- if(x1>x2) SWAP(float, x1, x2);
- if(y1>y2) SWAP(float, y1, y2);
+ if (x1>x2) SWAP(float, x1, x2);
+ if (y1>y2) SWAP(float, y1, y2);
return (co[0]>=x1-epsx && co[0]<=x2+epsx) && (co[1]>=y1-epsy && co[1]<=y2+epsy);
}
@@ -672,19 +683,19 @@ static int track_mouse_area(SpaceClip *sc, float co[2], MovieTrackingTrack *trac
epsx= MAX2(epsx, 2.0f / width);
epsy= MAX2(epsy, 2.0f / height);
- if(sc->flag&SC_SHOW_MARKER_SEARCH)
- if(mouse_on_rect(co, marker->pos, track->search_min, track->search_max, epsx, epsy))
+ if (sc->flag&SC_SHOW_MARKER_SEARCH)
+ if (mouse_on_rect(co, marker->pos, track->search_min, track->search_max, epsx, epsy))
return TRACK_AREA_SEARCH;
- if((marker->flag&MARKER_DISABLED)==0) {
- if(sc->flag&SC_SHOW_MARKER_PATTERN)
- if(mouse_on_rect(co, marker->pos, track->pat_min, track->pat_max, epsx, epsy))
+ if ((marker->flag&MARKER_DISABLED)==0) {
+ if (sc->flag&SC_SHOW_MARKER_PATTERN)
+ if (mouse_on_rect(co, marker->pos, track->pat_min, track->pat_max, epsx, epsy))
return TRACK_AREA_PAT;
epsx= 12.0f/width;
epsy= 12.0f/height;
- if(fabsf(co[0]-marker->pos[0]-track->offset[0])< epsx && fabsf(co[1]-marker->pos[1]-track->offset[1])<=epsy)
+ if (fabsf(co[0]-marker->pos[0]-track->offset[0])< epsx && fabsf(co[1]-marker->pos[1]-track->offset[1])<=epsy)
return TRACK_AREA_POINT;
}
@@ -712,27 +723,27 @@ static MovieTrackingTrack *find_nearest_track(SpaceClip *sc, ListBase *tracksbas
float mindist= 0.0f;
cur= tracksbase->first;
- while(cur) {
+ while (cur) {
MovieTrackingMarker *marker= BKE_tracking_get_marker(cur, sc->user.framenr);
- if(((cur->flag&TRACK_HIDDEN)==0) && MARKER_VISIBLE(sc, marker)) {
+ if (((cur->flag&TRACK_HIDDEN)==0) && MARKER_VISIBLE(sc, marker)) {
float dist, d1, d2=FLT_MAX, d3=FLT_MAX;
d1= sqrtf((co[0]-marker->pos[0]-cur->offset[0])*(co[0]-marker->pos[0]-cur->offset[0])+
(co[1]-marker->pos[1]-cur->offset[1])*(co[1]-marker->pos[1]-cur->offset[1])); /* distance to marker point */
/* distance to pattern boundbox */
- if(sc->flag&SC_SHOW_MARKER_PATTERN)
+ if (sc->flag&SC_SHOW_MARKER_PATTERN)
d2= dist_to_rect(co, marker->pos, cur->pat_min, cur->pat_max);
/* distance to search boundbox */
- if(sc->flag&SC_SHOW_MARKER_SEARCH && TRACK_VIEW_SELECTED(sc, cur))
+ if (sc->flag&SC_SHOW_MARKER_SEARCH && TRACK_VIEW_SELECTED(sc, cur))
d3= dist_to_rect(co, marker->pos, cur->search_min, cur->search_max);
/* choose minimal distance. useful for cases of overlapped markers. */
dist= MIN3(d1, d2, d3);
- if(track==NULL || dist<mindist) {
+ if (track==NULL || dist<mindist) {
track= cur;
mindist= dist;
}
@@ -755,19 +766,20 @@ static int mouse_select(bContext *C, float co[2], int extend)
track= find_nearest_track(sc, tracksbase, co);
- if(track) {
+ if (track) {
int area= track_mouse_area(sc, co, track);
- if(!extend || !TRACK_VIEW_SELECTED(sc, track))
+ if (!extend || !TRACK_VIEW_SELECTED(sc, track))
area= TRACK_AREA_ALL;
- if(extend && TRACK_AREA_SELECTED(track, area)) {
- if(track==act_track)
+ if (extend && TRACK_AREA_SELECTED(track, area)) {
+ if (track==act_track)
BKE_tracking_deselect_track(track, area);
else
clip->tracking.act_track= track;
- } else {
- if(area==TRACK_AREA_POINT)
+ }
+ else {
+ if (area==TRACK_AREA_POINT)
area= TRACK_AREA_ALL;
BKE_tracking_select_track(tracksbase, track, area, extend);
@@ -775,7 +787,7 @@ static int mouse_select(bContext *C, float co[2], int extend)
}
}
- if(!extend) {
+ if (!extend) {
sc->xlockof= 0.0f;
sc->ylockof= 0.0f;
}
@@ -801,10 +813,10 @@ static int select_invoke(bContext *C, wmOperator *op, wmEvent *event)
float co[2];
int extend= RNA_boolean_get(op->ptr, "extend");
- if(!extend) {
+ if (!extend) {
SlideMarkerData *slidedata= slide_marker_customdata(C, event);
- if(slidedata) {
+ if (slidedata) {
SpaceClip *sc= CTX_wm_space_clip(C);
MovieClip *clip= ED_space_clip(sc);
@@ -827,17 +839,17 @@ static int select_invoke(bContext *C, wmOperator *op, wmEvent *event)
void CLIP_OT_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select";
- ot->description= "Select tracking markers";
- ot->idname= "CLIP_OT_select";
+ ot->name = "Select";
+ ot->description = "Select tracking markers";
+ ot->idname = "CLIP_OT_select";
/* api callbacks */
- ot->exec= select_exec;
- ot->invoke= select_invoke;
- ot->poll= ED_space_clip_poll;
+ ot->exec = select_exec;
+ ot->invoke = select_invoke;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "extend", 0,
@@ -859,10 +871,10 @@ static int border_select_exec(bContext *C, wmOperator *op)
int change= 0, mode, extend;
/* get rectangle from operator */
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
ED_clip_point_stable_pos(C, rect.xmin, rect.ymin, &rectf.xmin, &rectf.ymin);
ED_clip_point_stable_pos(C, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax);
@@ -872,15 +884,15 @@ static int border_select_exec(bContext *C, wmOperator *op)
/* do actual selection */
track= tracksbase->first;
- while(track) {
- if((track->flag&TRACK_HIDDEN)==0) {
+ while (track) {
+ if ((track->flag&TRACK_HIDDEN)==0) {
MovieTrackingMarker *marker= BKE_tracking_get_marker(track, sc->user.framenr);
- if(MARKER_VISIBLE(sc, marker)) {
- if(BLI_in_rctf(&rectf, marker->pos[0], marker->pos[1])) {
+ if (MARKER_VISIBLE(sc, marker)) {
+ if (BLI_in_rctf(&rectf, marker->pos[0], marker->pos[1])) {
BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, mode!=GESTURE_MODAL_SELECT);
}
- else if(!extend) {
+ else if (!extend) {
BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, 1);
}
@@ -891,7 +903,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
track= track->next;
}
- if(change) {
+ if (change) {
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
return OPERATOR_FINISHED;
@@ -903,18 +915,18 @@ static int border_select_exec(bContext *C, wmOperator *op)
void CLIP_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Select";
- ot->description= "Select markers using border selection";
- ot->idname= "CLIP_OT_select_border";
+ ot->name = "Border Select";
+ ot->description = "Select markers using border selection";
+ ot->idname = "CLIP_OT_select_border";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= border_select_exec;
- ot->modal= WM_border_select_modal;
- ot->poll= ED_space_clip_poll;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = border_select_exec;
+ ot->modal = WM_border_select_modal;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
WM_operator_properties_gesture_border(ot, TRUE);
@@ -961,11 +973,11 @@ static int circle_select_exec(bContext *C, wmOperator *op)
/* do selection */
track= tracksbase->first;
- while(track) {
- if((track->flag&TRACK_HIDDEN)==0) {
+ while (track) {
+ if ((track->flag&TRACK_HIDDEN)==0) {
MovieTrackingMarker *marker= BKE_tracking_get_marker(track, sc->user.framenr);
- if(MARKER_VISIBLE(sc, marker) && marker_inside_ellipse(marker, offset, ellipse)) {
+ if (MARKER_VISIBLE(sc, marker) && marker_inside_ellipse(marker, offset, ellipse)) {
BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, mode!=GESTURE_MODAL_SELECT);
change= 1;
@@ -975,7 +987,7 @@ static int circle_select_exec(bContext *C, wmOperator *op)
track= track->next;
}
- if(change) {
+ if (change) {
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
return OPERATOR_FINISHED;
@@ -987,18 +999,18 @@ static int circle_select_exec(bContext *C, wmOperator *op)
void CLIP_OT_select_circle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Circle Select";
- ot->description= "Select markers using circle selection";
- ot->idname= "CLIP_OT_select_circle";
+ ot->name = "Circle Select";
+ ot->description = "Select markers using circle selection";
+ ot->idname = "CLIP_OT_select_circle";
/* api callbacks */
- ot->invoke= WM_gesture_circle_invoke;
- ot->modal= WM_gesture_circle_modal;
- ot->exec= circle_select_exec;
- ot->poll= ED_space_clip_poll;
+ ot->invoke = WM_gesture_circle_invoke;
+ ot->modal = WM_gesture_circle_modal;
+ ot->exec = circle_select_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
@@ -1020,14 +1032,14 @@ static int select_all_exec(bContext *C, wmOperator *op)
int framenr= sc->user.framenr;
int has_selection= 0;
- if(action == SEL_TOGGLE){
+ if (action == SEL_TOGGLE) {
action= SEL_SELECT;
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track)) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track)) {
marker= BKE_tracking_get_marker(track, framenr);
- if(MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, marker)) {
action= SEL_DESELECT;
break;
}
@@ -1038,11 +1050,11 @@ static int select_all_exec(bContext *C, wmOperator *op)
}
track= tracksbase->first;
- while(track) {
- if((track->flag&TRACK_HIDDEN)==0) {
+ while (track) {
+ if ((track->flag&TRACK_HIDDEN)==0) {
marker= BKE_tracking_get_marker(track, framenr);
- if(MARKER_VISIBLE(sc, marker)) {
+ if (MARKER_VISIBLE(sc, marker)) {
switch (action) {
case SEL_SELECT:
track->flag|= SELECT;
@@ -1063,13 +1075,13 @@ static int select_all_exec(bContext *C, wmOperator *op)
}
}
- if(TRACK_VIEW_SELECTED(sc, track))
+ if (TRACK_VIEW_SELECTED(sc, track))
has_selection= 1;
track= track->next;
}
- if(!has_selection)
+ if (!has_selection)
sc->flag&= ~SC_LOCK_SELECTION;
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
@@ -1080,16 +1092,16 @@ static int select_all_exec(bContext *C, wmOperator *op)
void CLIP_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select or Deselect All";
- ot->description= "Change selection of all tracking markers";
- ot->idname= "CLIP_OT_select_all";
+ ot->name = "(De)select All";
+ ot->description = "Change selection of all tracking markers";
+ ot->idname = "CLIP_OT_select_all";
/* api callbacks */
- ot->exec= select_all_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = select_all_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -1107,44 +1119,44 @@ static int select_groped_exec(bContext *C, wmOperator *op)
int group= RNA_enum_get(op->ptr, "group");
track= tracksbase->first;
- while(track) {
+ while (track) {
int ok= 0;
marker= BKE_tracking_get_marker(track, sc->user.framenr);
- if(group==0) { /* Keyframed */
+ if (group==0) { /* Keyframed */
ok= marker->framenr==sc->user.framenr && (marker->flag&MARKER_TRACKED)==0;
}
- else if(group==1) { /* Estimated */
+ else if (group==1) { /* Estimated */
ok= marker->framenr!=sc->user.framenr;
}
- else if(group==2) { /* tracked */
+ else if (group==2) { /* tracked */
ok= marker->framenr==sc->user.framenr && (marker->flag&MARKER_TRACKED);
}
- else if(group==3) { /* locked */
+ else if (group==3) { /* locked */
ok= track->flag&TRACK_LOCKED;
}
- else if(group==4) { /* disabled */
+ else if (group==4) { /* disabled */
ok= marker->flag&MARKER_DISABLED;
}
- else if(group==5) { /* color */
+ else if (group==5) { /* color */
MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking);
- if(act_track) {
+ if (act_track) {
ok= (track->flag&TRACK_CUSTOMCOLOR) == (act_track->flag&TRACK_CUSTOMCOLOR);
- if(ok && track->flag&TRACK_CUSTOMCOLOR)
+ if (ok && track->flag&TRACK_CUSTOMCOLOR)
ok= equals_v3v3(track->color, act_track->color);
}
}
- else if(group==6) { /* failed */
+ else if (group==6) { /* failed */
ok= (track->flag&TRACK_HAS_BUNDLE) == 0;
}
- if(ok) {
+ if (ok) {
track->flag|= SELECT;
- if(sc->flag&SC_SHOW_MARKER_PATTERN) track->pat_flag|= SELECT;
- if(sc->flag&SC_SHOW_MARKER_SEARCH) track->search_flag|= SELECT;
+ if (sc->flag&SC_SHOW_MARKER_PATTERN) track->pat_flag|= SELECT;
+ if (sc->flag&SC_SHOW_MARKER_SEARCH) track->search_flag|= SELECT;
}
track= track->next;
@@ -1169,16 +1181,16 @@ void CLIP_OT_select_grouped(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Select Grouped";
- ot->description= "Select all tracks from specified group";
- ot->idname= "CLIP_OT_select_grouped";
+ ot->name = "Select Grouped";
+ ot->description = "Select all tracks from specified group";
+ ot->idname = "CLIP_OT_select_grouped";
/* api callbacks */
- ot->exec= select_groped_exec;
- ot->poll= space_clip_frame_poll;
+ ot->exec = select_groped_exec;
+ ot->poll = space_clip_frame_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* proeprties */
RNA_def_enum(ot->srna, "group", select_group_items, TRACK_CLEAR_REMAINED, "Action", "Clear action to execute");
@@ -1211,8 +1223,8 @@ static int track_count_markers(SpaceClip *sc, MovieClip *clip)
int framenr= sc->user.framenr;
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) {
MovieTrackingMarker *marker= BKE_tracking_get_marker(track, framenr);
if (!marker || (marker->flag&MARKER_DISABLED) == 0)
@@ -1239,7 +1251,7 @@ static void clear_invisible_track_selection(SpaceClip *sc, MovieClip *clip)
if (hidden) {
MovieTrackingTrack *track = tracksbase->first;
- while(track) {
+ while (track) {
if ((track->flag & TRACK_HIDDEN) == 0)
BKE_tracking_track_flag(track, hidden, SELECT, 1);
@@ -1258,13 +1270,13 @@ static void track_init_markers(SpaceClip *sc, MovieClip *clip, int *frames_limit
clear_invisible_track_selection(sc, clip);
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track)) {
- if((track->flag&TRACK_HIDDEN)==0 && (track->flag&TRACK_LOCKED)==0) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track)) {
+ if ((track->flag&TRACK_HIDDEN)==0 && (track->flag&TRACK_LOCKED)==0) {
BKE_tracking_ensure_marker(track, framenr);
- if(track->frames_limit) {
- if(frames_limit==0)
+ if (track->frames_limit) {
+ if (frames_limit==0)
frames_limit= track->frames_limit;
else
frames_limit= MIN2(frames_limit, track->frames_limit);
@@ -1280,11 +1292,11 @@ static void track_init_markers(SpaceClip *sc, MovieClip *clip, int *frames_limit
static int track_markers_check_direction(int backwards, int curfra, int efra)
{
- if(backwards) {
- if(curfra<efra) return 0;
+ if (backwards) {
+ if (curfra<efra) return 0;
}
else {
- if(curfra>efra) return 0;
+ if (curfra>efra) return 0;
}
return 1;
@@ -1304,21 +1316,21 @@ static int track_markers_initjob(bContext *C, TrackMarkersJob *tmj, int backward
tmj->clip= clip;
tmj->backwards= backwards;
- if(backwards) tmj->efra= SFRA;
+ if (backwards) tmj->efra= SFRA;
else tmj->efra= EFRA;
/* limit frames to be tracked by user setting */
- if(frames_limit) {
- if(backwards) tmj->efra= MAX2(tmj->efra, tmj->sfra-frames_limit);
+ if (frames_limit) {
+ if (backwards) tmj->efra= MAX2(tmj->efra, tmj->sfra-frames_limit);
else tmj->efra= MIN2(tmj->efra, tmj->sfra+frames_limit);
}
- if(settings->speed!=TRACKING_SPEED_FASTEST) {
+ if (settings->speed!=TRACKING_SPEED_FASTEST) {
tmj->delay= 1.0f/scene->r.frs_sec*1000.0f;
- if(settings->speed==TRACKING_SPEED_HALF) tmj->delay*= 2;
- else if(settings->speed==TRACKING_SPEED_QUARTER) tmj->delay*= 4;
- else if(settings->speed==TRACKING_SPEED_DOUBLE) tmj->delay/= 2;
+ if (settings->speed==TRACKING_SPEED_HALF) tmj->delay*= 2;
+ else if (settings->speed==TRACKING_SPEED_QUARTER) tmj->delay*= 4;
+ else if (settings->speed==TRACKING_SPEED_DOUBLE) tmj->delay/= 2;
}
tmj->context= BKE_tracking_context_new(clip, &sc->user, backwards, 1);
@@ -1345,8 +1357,8 @@ static void track_markers_startjob(void *tmv, short *stop, short *do_update, flo
int framenr= tmj->sfra;
//double t= PIL_check_seconds_timer();
- while(framenr != tmj->efra) {
- if(tmj->delay>0) {
+ while (framenr != tmj->efra) {
+ if (tmj->delay>0) {
/* tracking should happen with fixed fps. Calculate time
* using current timer value before tracking frame and after.
*
@@ -1355,24 +1367,25 @@ static void track_markers_startjob(void *tmv, short *stop, short *do_update, flo
double start_time= PIL_check_seconds_timer(), exec_time;
- if(!BKE_tracking_next(tmj->context))
+ if (!BKE_tracking_next(tmj->context))
break;
exec_time= PIL_check_seconds_timer()-start_time;
- if(tmj->delay > (float)exec_time)
+ if (tmj->delay > (float)exec_time)
PIL_sleep_ms(tmj->delay-(float)exec_time);
- } else if(!BKE_tracking_next(tmj->context))
+ }
+ else if (!BKE_tracking_next(tmj->context))
break;
*do_update= 1;
*progress=(float)(framenr-tmj->sfra) / (tmj->efra-tmj->sfra);
- if(tmj->backwards) framenr--;
+ if (tmj->backwards) framenr--;
else framenr++;
tmj->lastfra= framenr;
- if(*stop || track_markers_testbreak())
+ if (*stop || track_markers_testbreak())
break;
}
@@ -1414,34 +1427,34 @@ static int track_markers_exec(bContext *C, wmOperator *op)
int sequence= RNA_boolean_get(op->ptr, "sequence");
int frames_limit;
- if(track_count_markers(sc, clip)==0)
+ if (track_count_markers(sc, clip)==0)
return OPERATOR_CANCELLED;
track_init_markers(sc, clip, &frames_limit);
- if(backwards) efra= SFRA;
+ if (backwards) efra= SFRA;
else efra= EFRA;
/* limit frames to be tracked by user setting */
- if(frames_limit) {
- if(backwards) efra= MAX2(efra, sfra-frames_limit);
+ if (frames_limit) {
+ if (backwards) efra= MAX2(efra, sfra-frames_limit);
else efra= MIN2(efra, sfra+frames_limit);
}
- if(!track_markers_check_direction(backwards, framenr, efra))
+ if (!track_markers_check_direction(backwards, framenr, efra))
return OPERATOR_CANCELLED;
/* do not disable tracks due to threshold when tracking frame-by-frame */
context= BKE_tracking_context_new(clip, &sc->user, backwards, sequence);
- while(framenr != efra) {
- if(!BKE_tracking_next(context))
+ while (framenr != efra) {
+ if (!BKE_tracking_next(context))
break;
- if(backwards) framenr--;
+ if (backwards) framenr--;
else framenr++;
- if(!sequence)
+ if (!sequence)
break;
}
@@ -1467,22 +1480,22 @@ static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
int backwards= RNA_boolean_get(op->ptr, "backwards");
int sequence= RNA_boolean_get(op->ptr, "sequence");
- if(WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C))) {
+ if (WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C))) {
/* only one tracking is allowed at a time */
return OPERATOR_CANCELLED;
}
- if(clip->tracking_context)
+ if (clip->tracking_context)
return OPERATOR_CANCELLED;
- if(track_count_markers(sc, clip)==0)
+ if (track_count_markers(sc, clip)==0)
return OPERATOR_CANCELLED;
- if(!sequence)
+ if (!sequence)
return track_markers_exec(C, op);
tmj= MEM_callocN(sizeof(TrackMarkersJob), "TrackMarkersJob data");
- if(!track_markers_initjob(C, tmj, backwards)) {
+ if (!track_markers_initjob(C, tmj, backwards)) {
track_markers_freejob(tmj);
return OPERATOR_CANCELLED;
@@ -1496,7 +1509,7 @@ static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
* with fixed FPS. To deal with editor refresh we have to synchronize
* tracks from job and tracks in clip. Do this in timer callback
* to prevent threading conflicts. */
- if(tmj->delay>0) WM_jobs_timer(steve, tmj->delay/1000.0f, NC_MOVIECLIP|NA_EVALUATED, 0);
+ if (tmj->delay>0) WM_jobs_timer(steve, tmj->delay/1000.0f, NC_MOVIECLIP|NA_EVALUATED, 0);
else WM_jobs_timer(steve, 0.2, NC_MOVIECLIP|NA_EVALUATED, 0);
WM_jobs_callbacks(steve, track_markers_startjob, NULL, track_markers_updatejob, NULL);
@@ -1515,7 +1528,7 @@ static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
static int track_markers_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
/* no running tracking, remove handler and pass through */
- if(0==WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C)))
+ if (0==WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C)))
return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
/* running tracking */
@@ -1531,18 +1544,18 @@ static int track_markers_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *eve
void CLIP_OT_track_markers(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Track Markers";
- ot->description= "Track selected markers";
- ot->idname= "CLIP_OT_track_markers";
+ ot->name = "Track Markers";
+ ot->description = "Track selected markers";
+ ot->idname = "CLIP_OT_track_markers";
/* api callbacks */
- ot->exec= track_markers_exec;
- ot->invoke= track_markers_invoke;
- ot->poll= space_clip_frame_poll;
- ot->modal= track_markers_modal;
+ ot->exec = track_markers_exec;
+ ot->invoke = track_markers_invoke;
+ ot->poll = space_clip_frame_poll;
+ ot->modal = track_markers_modal;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "backwards", 0, "Backwards", "Do backwards tracking");
@@ -1573,7 +1586,7 @@ static int solve_camera_initjob(bContext *C, SolveCameraJob *scj, wmOperator *op
MovieTrackingObject *object= BKE_tracking_active_object(tracking);
int width, height;
- if(!BKE_tracking_can_reconstruct(tracking, object, error_msg, max_error))
+ if (!BKE_tracking_can_reconstruct(tracking, object, error_msg, max_error))
return 0;
/* could fail if footage uses images with different sizes */
@@ -1616,7 +1629,7 @@ static void solve_camera_freejob(void *scv)
MovieClip *clip= scj->clip;
int solved;
- if(!scj->context) {
+ if (!scj->context) {
/* job weren't fully initialized due to some error */
MEM_freeN(scj);
return;
@@ -1624,20 +1637,20 @@ static void solve_camera_freejob(void *scv)
solved= BKE_tracking_finish_reconstruction(scj->context, tracking);
- if(!solved)
+ if (!solved)
BKE_report(scj->reports, RPT_WARNING, "Some data failed to reconstruct, see console for details");
else
BKE_reportf(scj->reports, RPT_INFO, "Average re-projection error %.3f", tracking->reconstruction.error);
/* set currently solved clip as active for scene */
- if(scene->clip)
+ if (scene->clip)
id_us_min(&clip->id);
scene->clip= clip;
id_us_plus(&clip->id);
/* set blender camera focal length so result would look fine there */
- if(scene->camera) {
+ if (scene->camera) {
Camera *camera= (Camera*)scene->camera->data;
int width, height;
@@ -1669,8 +1682,8 @@ static int solve_camera_exec(bContext *C, wmOperator *op)
char error_msg[256]= "\0";
scj= MEM_callocN(sizeof(SolveCameraJob), "SolveCameraJob data");
- if(!solve_camera_initjob(C, scj, op, error_msg, sizeof(error_msg))) {
- if(error_msg[0])
+ if (!solve_camera_initjob(C, scj, op, error_msg, sizeof(error_msg))) {
+ if (error_msg[0])
BKE_report(op->reports, RPT_ERROR, error_msg);
solve_camera_freejob(scj);
@@ -1696,14 +1709,14 @@ static int solve_camera_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
wmJob *steve;
char error_msg[256]= "\0";
- if(WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C))) {
+ if (WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C))) {
/* only one solve is allowed at a time */
return OPERATOR_CANCELLED;
}
scj= MEM_callocN(sizeof(SolveCameraJob), "SolveCameraJob data");
- if(!solve_camera_initjob(C, scj, op, error_msg, sizeof(error_msg))) {
- if(error_msg[0])
+ if (!solve_camera_initjob(C, scj, op, error_msg, sizeof(error_msg))) {
+ if (error_msg[0])
BKE_report(op->reports, RPT_ERROR, error_msg);
solve_camera_freejob(scj);
@@ -1737,7 +1750,7 @@ static int solve_camera_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
static int solve_camera_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
/* no running solver, remove handler and pass through */
- if(0==WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C)))
+ if (0==WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C)))
return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
/* running tracking */
@@ -1753,18 +1766,18 @@ static int solve_camera_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *even
void CLIP_OT_solve_camera(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Solve Camera";
- ot->description= "Solve camera motion from tracks";
- ot->idname= "CLIP_OT_solve_camera";
+ ot->name = "Solve Camera";
+ ot->description = "Solve camera motion from tracks";
+ ot->idname = "CLIP_OT_solve_camera";
/* api callbacks */
- ot->exec= solve_camera_exec;
- ot->invoke= solve_camera_invoke;
- ot->modal= solve_camera_modal;
- ot->poll= ED_space_clip_poll;
+ ot->exec = solve_camera_exec;
+ ot->invoke = solve_camera_invoke;
+ ot->modal = solve_camera_modal;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** clear solution operator *********************/
@@ -1778,13 +1791,13 @@ static int clear_solution_exec(bContext *C, wmOperator *UNUSED(op))
MovieTrackingReconstruction *reconstruction= BKE_tracking_get_reconstruction(tracking);
MovieTrackingTrack *track= tracksbase->first;
- while(track) {
+ while (track) {
track->flag&= ~TRACK_HAS_BUNDLE;
track= track->next;
}
- if(reconstruction->cameras)
+ if (reconstruction->cameras)
MEM_freeN(reconstruction->cameras);
reconstruction->cameras= NULL;
@@ -1803,16 +1816,16 @@ static int clear_solution_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_clear_solution(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Solution";
- ot->description= "Clear all calculated data";
- ot->idname= "CLIP_OT_clear_solution";
+ ot->name = "Clear Solution";
+ ot->description = "Clear all calculated data";
+ ot->idname = "CLIP_OT_clear_solution";
/* api callbacks */
- ot->exec= clear_solution_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = clear_solution_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** clear track operator *********************/
@@ -1832,8 +1845,8 @@ static int clear_track_path_exec(bContext *C, wmOperator *op)
}
else {
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track))
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track))
BKE_tracking_clear_path(track, sc->user.framenr, action);
track= track->next;
@@ -1855,16 +1868,16 @@ void CLIP_OT_clear_track_path(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Clear Track Path";
- ot->description= "Clear tracks after/before current position or clear the whole track";
- ot->idname= "CLIP_OT_clear_track_path";
+ ot->name = "Clear Track Path";
+ ot->description = "Clear tracks after/before current position or clear the whole track";
+ ot->idname = "CLIP_OT_clear_track_path";
/* api callbacks */
- ot->exec= clear_track_path_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = clear_track_path_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* proeprties */
RNA_def_enum(ot->srna, "action", clear_path_actions, TRACK_CLEAR_REMAINED, "Action", "Clear action to execute");
@@ -1882,12 +1895,12 @@ static int disable_markers_exec(bContext *C, wmOperator *op)
MovieTrackingTrack *track= tracksbase->first;
int action= RNA_enum_get(op->ptr, "action");
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) {
MovieTrackingMarker *marker= BKE_tracking_ensure_marker(track, sc->user.framenr);
- if(action==0) marker->flag|= MARKER_DISABLED;
- else if(action==1) marker->flag&= ~MARKER_DISABLED;
+ if (action==0) marker->flag|= MARKER_DISABLED;
+ else if (action==1) marker->flag&= ~MARKER_DISABLED;
else marker->flag^= MARKER_DISABLED;
}
@@ -1911,16 +1924,16 @@ void CLIP_OT_disable_markers(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Disable Markers";
- ot->description= "Disable/enable selected markers";
- ot->idname= "CLIP_OT_disable_markers";
+ ot->name = "Disable Markers";
+ ot->description = "Disable/enable selected markers";
+ ot->idname = "CLIP_OT_disable_markers";
/* api callbacks */
- ot->exec= disable_markers_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = disable_markers_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "action", actions_items, 0, "Action", "Disable action to execute");
@@ -1933,13 +1946,13 @@ static Object *get_camera_with_movieclip(Scene *scene, MovieClip *clip)
Object *camera= scene->camera;
Base *base;
- if(camera && object_get_movieclip(scene, camera, 0)==clip)
+ if (camera && object_get_movieclip(scene, camera, 0)==clip)
return camera;
base= scene->base.first;
- while(base) {
- if(base->object->type == OB_CAMERA) {
- if(object_get_movieclip(scene, base->object, 0)==clip) {
+ while (base) {
+ if (base->object->type == OB_CAMERA) {
+ if (object_get_movieclip(scene, base->object, 0)==clip) {
camera= base->object;
break;
}
@@ -1960,14 +1973,14 @@ static Object *get_orientation_object(bContext *C)
MovieTrackingObject *tracking_object= BKE_tracking_active_object(tracking);
Object *object= NULL;
- if(tracking_object->flag&TRACKING_OBJECT_CAMERA) {
+ if (tracking_object->flag&TRACKING_OBJECT_CAMERA) {
object= get_camera_with_movieclip(scene, clip);
}
else {
object= OBACT;
}
- if(object && object->parent)
+ if (object && object->parent)
object= object->parent;
return object;
@@ -1975,14 +1988,14 @@ static Object *get_orientation_object(bContext *C)
static int set_orientation_poll(bContext *C)
{
- if(space_clip_frame_poll(C)) {
+ if (space_clip_frame_poll(C)) {
Scene *scene= CTX_data_scene(C);
SpaceClip *sc= CTX_wm_space_clip(C);
MovieClip *clip= ED_space_clip(sc);
MovieTracking *tracking= &clip->tracking;
MovieTrackingObject *tracking_object= BKE_tracking_active_object(tracking);
- if(tracking_object->flag&TRACKING_OBJECT_CAMERA) {
+ if (tracking_object->flag&TRACKING_OBJECT_CAMERA) {
return 1;
}
else {
@@ -2002,8 +2015,8 @@ static int count_selected_bundles(bContext *C)
int tot= 0;
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_HAS_BUNDLE))
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_HAS_BUNDLE))
tot++;
track= track->next;
@@ -2020,13 +2033,13 @@ static void object_solver_inverted_matrix(Scene *scene, Object *ob, float invmat
for (con= ob->constraints.first; con; con=con->next) {
bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
- if(!cti)
+ if (!cti)
continue;
- if(cti->type==CONSTRAINT_TYPE_OBJECTSOLVER) {
+ if (cti->type==CONSTRAINT_TYPE_OBJECTSOLVER) {
bObjectSolverConstraint *data= (bObjectSolverConstraint *)con->data;
- if(!found) {
+ if (!found) {
Object *cam= data->camera ? data->camera : scene->camera;
where_is_object_mat(scene, cam, invmat);
@@ -2038,7 +2051,7 @@ static void object_solver_inverted_matrix(Scene *scene, Object *ob, float invmat
}
}
- if(found)
+ if (found)
invert_m4(invmat);
else
unit_m4(invmat);
@@ -2051,10 +2064,10 @@ static Object *object_solver_camera(Scene *scene, Object *ob)
for (con= ob->constraints.first; con; con=con->next) {
bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
- if(!cti)
+ if (!cti)
continue;
- if(cti->type==CONSTRAINT_TYPE_OBJECTSOLVER) {
+ if (cti->type==CONSTRAINT_TYPE_OBJECTSOLVER) {
bObjectSolverConstraint *data= (bObjectSolverConstraint *)con->data;
return data->camera ? data->camera : scene->camera;
@@ -2078,14 +2091,14 @@ static int set_origin_exec(bContext *C, wmOperator *op)
float mat[4][4], vec[3], median[3];
int selected_count= count_selected_bundles(C);
- if(selected_count==0) {
+ if (selected_count==0) {
BKE_report(op->reports, RPT_ERROR, "At least one track with bundle should be selected to define origin position");
return OPERATOR_CANCELLED;
}
object= get_orientation_object(C);
- if(!object) {
+ if (!object) {
BKE_report(op->reports, RPT_ERROR, "No object to apply orientation on");
return OPERATOR_CANCELLED;
@@ -2097,8 +2110,8 @@ static int set_origin_exec(bContext *C, wmOperator *op)
track= tracksbase->first;
zero_v3(median);
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_HAS_BUNDLE)) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_HAS_BUNDLE)) {
add_v3_v3(median, track->bundle_pos);
}
@@ -2110,7 +2123,7 @@ static int set_origin_exec(bContext *C, wmOperator *op)
mul_v3_m4v3(vec, mat, median);
- if(tracking_object->flag&TRACKING_OBJECT_CAMERA) {
+ if (tracking_object->flag&TRACKING_OBJECT_CAMERA) {
sub_v3_v3(object->loc, vec);
}
else {
@@ -2131,16 +2144,16 @@ static int set_origin_exec(bContext *C, wmOperator *op)
void CLIP_OT_set_origin(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Origin";
- ot->description= "Set active marker as origin by moving camera (or it's parent if present) in 3D space";
- ot->idname= "CLIP_OT_set_origin";
+ ot->name = "Set Origin";
+ ot->description = "Set active marker as origin by moving camera (or it's parent if present) in 3D space";
+ ot->idname = "CLIP_OT_set_origin";
/* api callbacks */
- ot->exec= set_origin_exec;
- ot->poll= set_orientation_poll;
+ ot->exec = set_origin_exec;
+ ot->poll = set_orientation_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "use_median", 0, "Use Median", "Set origin to median point of selected bundles");
@@ -2162,7 +2175,7 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb
mul_v3_m4v3(vec, mat, track->bundle_pos);
copy_v3_v3(dvec, vec);
- if(!is_camera) {
+ if (!is_camera) {
float imat[4][4];
object_solver_inverted_matrix(scene, ob, imat);
@@ -2174,22 +2187,23 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb
sub_v3_v3(vec, obmat[3]);
}
- if(len_v2(vec) < 1e-3f)
+ if (len_v2(vec) < 1e-3f)
return;
unit_m4(mat);
- if(axis=='X') {
- if(fabsf(dvec[1])<1e-3f) {
+ if (axis=='X') {
+ if (fabsf(dvec[1])<1e-3f) {
flip= 1;
mat[0][0]= -1.0f; mat[0][1]= 0.0f; mat[0][2]= 0.0f;
mat[1][0]= 0.0f; mat[1][1]= -1.0f; mat[1][2]= 0.0f;
mat[2][0]= 0.0f; mat[2][1]= 0.0f; mat[2][2]= 1.0f;
- } else {
+ }
+ else {
copy_v3_v3(mat[0], vec);
- if(is_camera || fabsf(vec[2])<1e-3f) {
+ if (is_camera || fabsf(vec[2])<1e-3f) {
mat[0][2]= 0.0f;
mat[2][0]= 0.0f; mat[2][1]= 0.0f; mat[2][2]= 1.0f;
cross_v3_v3v3(mat[1], mat[2], mat[0]);
@@ -2201,17 +2215,19 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb
cross_v3_v3v3(mat[2], mat[0], mat[1]);
}
}
- } else {
- if(fabsf(dvec[0])<1e-3f) {
+ }
+ else {
+ if (fabsf(dvec[0])<1e-3f) {
flip= 1;
mat[0][0]= -1.0f; mat[0][1]= 0.0f; mat[0][2]= 0.0f;
mat[1][0]= 0.0f; mat[1][1]= -1.0f; mat[1][2]= 0.0f;
mat[2][0]= 0.0f; mat[2][1]= 0.0f; mat[2][2]= 1.0f;
- } else {
+ }
+ else {
copy_v3_v3(mat[1], vec);
- if(is_camera || fabsf(vec[2])<1e-3f) {
+ if (is_camera || fabsf(vec[2])<1e-3f) {
mat[1][2]= 0.0f;
mat[2][0]= 0.0f; mat[2][1]= 0.0f; mat[2][2]= 1.0f;
cross_v3_v3v3(mat[0], mat[1], mat[2]);
@@ -2229,13 +2245,13 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb
normalize_v3(mat[1]);
normalize_v3(mat[2]);
- if(is_camera) {
+ if (is_camera) {
invert_m4(mat);
mult_m4_m4m4(mat, mat, obmat);
}
else {
- if(!flip) {
+ if (!flip) {
float lmat[4][4], ilmat[4][4], rmat[3][3];
object_rot_to_mat3(ob, rmat);
@@ -2275,7 +2291,7 @@ static int set_plane_exec(bContext *C, wmOperator *op)
{1.0f, 0.0f, 0.0f, 0.0f},
{0.0f, 0.0f, 0.0f, 1.0f}}; /* 90 degrees Y-axis rotation matrix */
- if(count_selected_bundles(C)!=3) {
+ if (count_selected_bundles(C)!=3) {
BKE_report(op->reports, RPT_ERROR, "Three tracks with bundles are needed to orient the floor");
return OPERATOR_CANCELLED;
@@ -2286,7 +2302,7 @@ static int set_plane_exec(bContext *C, wmOperator *op)
act_track= BKE_tracking_active_track(tracking);
object= get_orientation_object(C);
- if(!object) {
+ if (!object) {
BKE_report(op->reports, RPT_ERROR, "No object to apply orientation on");
return OPERATOR_CANCELLED;
@@ -2296,11 +2312,11 @@ static int set_plane_exec(bContext *C, wmOperator *op)
/* get 3 bundles to use as reference */
track= tracksbase->first;
- while(track && tot<3) {
- if(track->flag&TRACK_HAS_BUNDLE && TRACK_VIEW_SELECTED(sc, track)) {
+ while (track && tot<3) {
+ if (track->flag&TRACK_HAS_BUNDLE && TRACK_VIEW_SELECTED(sc, track)) {
mul_v3_m4v3(vec[tot], mat, track->bundle_pos);
- if(tot==0 || track==act_track)
+ if (tot==0 || track==act_track)
copy_v3_v3(orig, vec[tot]);
else
axis_track= track;
@@ -2337,7 +2353,7 @@ static int set_plane_exec(bContext *C, wmOperator *op)
mat[3][1]= orig[1];
mat[3][2]= orig[2];
- if(tracking_object->flag&TRACKING_OBJECT_CAMERA) {
+ if (tracking_object->flag&TRACKING_OBJECT_CAMERA) {
invert_m4(mat);
object_to_mat4(object, obmat);
@@ -2346,7 +2362,7 @@ static int set_plane_exec(bContext *C, wmOperator *op)
object_apply_mat4(object, newmat, 0, 0);
/* make camera have positive z-coordinate */
- if(object->loc[2]<0) {
+ if (object->loc[2]<0) {
invert_m4(rot);
mult_m4_m4m4(newmat, rot, mat);
object_apply_mat4(object, newmat, 0, 0);
@@ -2377,16 +2393,16 @@ void CLIP_OT_set_plane(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Set Plane";
- ot->description= "Set plane based on 3 selected bundles by moving camera (or it's parent if present) in 3D space";
- ot->idname= "CLIP_OT_set_plane";
+ ot->name = "Set Plane";
+ ot->description = "Set plane based on 3 selected bundles by moving camera (or it's parent if present) in 3D space";
+ ot->idname = "CLIP_OT_set_plane";
/* api callbacks */
- ot->exec= set_plane_exec;
- ot->poll= set_orientation_poll;
+ ot->exec = set_plane_exec;
+ ot->poll = set_orientation_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "plane", plane_items, 0, "Plane", "Plane to be sued for orientation");
@@ -2406,14 +2422,14 @@ static int set_axis_exec(bContext *C, wmOperator *op)
ListBase *tracksbase;
int axis= RNA_enum_get(op->ptr, "axis");
- if(count_selected_bundles(C)!=1) {
+ if (count_selected_bundles(C)!=1) {
BKE_report(op->reports, RPT_ERROR, "Single track with bundle should be selected to define axis");
return OPERATOR_CANCELLED;
}
object= get_orientation_object(C);
- if(!object) {
+ if (!object) {
BKE_report(op->reports, RPT_ERROR, "No object to apply orientation on");
return OPERATOR_CANCELLED;
@@ -2422,8 +2438,8 @@ static int set_axis_exec(bContext *C, wmOperator *op)
tracksbase= BKE_tracking_object_tracks(tracking, tracking_object);
track=tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track))
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track))
break;
track= track->next;
@@ -2449,16 +2465,16 @@ void CLIP_OT_set_axis(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Set Axis";
- ot->description= "Set direction of scene axis rotating camera (or it's parent if present) and assuming selected track lies on real axis joining it with the origin";
- ot->idname= "CLIP_OT_set_axis";
+ ot->name = "Set Axis";
+ ot->description = "Set direction of scene axis rotating camera (or it's parent if present) and assuming selected track lies on real axis joining it with the origin";
+ ot->idname = "CLIP_OT_set_axis";
/* api callbacks */
- ot->exec= set_axis_exec;
- ot->poll= set_orientation_poll;
+ ot->exec = set_axis_exec;
+ ot->poll = set_orientation_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "axis", axis_actions, 0, "Axis", "Axis to use to align bundle along");
@@ -2481,14 +2497,14 @@ static int do_set_scale(bContext *C, wmOperator *op, int scale_solution)
float vec[2][3], mat[4][4], scale;
float dist= RNA_float_get(op->ptr, "distance");
- if(count_selected_bundles(C)!=2) {
+ if (count_selected_bundles(C)!=2) {
BKE_report(op->reports, RPT_ERROR, "Two tracks with bundles should be selected to set scale");
return OPERATOR_CANCELLED;
}
object= get_orientation_object(C);
- if(!object) {
+ if (!object) {
BKE_report(op->reports, RPT_ERROR, "No object to apply orientation on");
return OPERATOR_CANCELLED;
@@ -2497,8 +2513,8 @@ static int do_set_scale(bContext *C, wmOperator *op, int scale_solution)
BKE_get_tracking_mat(scene, camera, mat);
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track)) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track)) {
mul_v3_m4v3(vec[tot], mat, track->bundle_pos);
tot++;
}
@@ -2508,19 +2524,19 @@ static int do_set_scale(bContext *C, wmOperator *op, int scale_solution)
sub_v3_v3(vec[0], vec[1]);
- if(len_v3(vec[0])>1e-5f) {
+ if (len_v3(vec[0])>1e-5f) {
scale= dist / len_v3(vec[0]);
- if(tracking_object->flag&TRACKING_OBJECT_CAMERA) {
+ if (tracking_object->flag&TRACKING_OBJECT_CAMERA) {
mul_v3_fl(object->size, scale);
mul_v3_fl(object->loc, scale);
}
- else if(!scale_solution){
+ else if (!scale_solution) {
Object *solver_camera= object_solver_camera(scene, object);
object->size[0]= object->size[1]= object->size[2]= 1.0f/scale;
- if(solver_camera) {
+ if (solver_camera) {
object->size[0]/= solver_camera->size[0];
object->size[1]/= solver_camera->size[1];
object->size[2]/= solver_camera->size[2];
@@ -2532,7 +2548,7 @@ static int do_set_scale(bContext *C, wmOperator *op, int scale_solution)
DAG_id_tag_update(&clip->id, 0);
- if(object)
+ if (object)
DAG_id_tag_update(&object->id, OB_RECALC_OB);
WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip);
@@ -2552,7 +2568,7 @@ static int set_scale_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
SpaceClip *sc= CTX_wm_space_clip(C);
MovieClip *clip= ED_space_clip(sc);
- if(!RNA_struct_property_is_set(op->ptr, "distance"))
+ if (!RNA_struct_property_is_set(op->ptr, "distance"))
RNA_float_set(op->ptr, "distance", clip->tracking.settings.dist);
return set_scale_exec(C, op);
@@ -2561,17 +2577,17 @@ static int set_scale_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void CLIP_OT_set_scale(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Scale";
- ot->description= "Set scale of scene by scaling camera (or it's parent if present)";
- ot->idname= "CLIP_OT_set_scale";
+ ot->name = "Set Scale";
+ ot->description = "Set scale of scene by scaling camera (or it's parent if present)";
+ ot->idname = "CLIP_OT_set_scale";
/* api callbacks */
- ot->exec= set_scale_exec;
- ot->invoke= set_scale_invoke;
- ot->poll= set_orientation_poll;
+ ot->exec = set_scale_exec;
+ ot->invoke = set_scale_invoke;
+ ot->poll = set_orientation_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_float(ot->srna, "distance", 0.0f, -FLT_MAX, FLT_MAX,
@@ -2582,7 +2598,7 @@ void CLIP_OT_set_scale(wmOperatorType *ot)
static int set_solution_scale_poll(bContext *C)
{
- if(space_clip_frame_poll(C)) {
+ if (space_clip_frame_poll(C)) {
SpaceClip *sc= CTX_wm_space_clip(C);
MovieClip *clip= ED_space_clip(sc);
MovieTracking *tracking= &clip->tracking;
@@ -2604,7 +2620,7 @@ static int set_solution_scale_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE
SpaceClip *sc= CTX_wm_space_clip(C);
MovieClip *clip= ED_space_clip(sc);
- if(!RNA_struct_property_is_set(op->ptr, "distance"))
+ if (!RNA_struct_property_is_set(op->ptr, "distance"))
RNA_float_set(op->ptr, "distance", clip->tracking.settings.object_distance);
return set_solution_scale_exec(C, op);
@@ -2613,17 +2629,17 @@ static int set_solution_scale_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE
void CLIP_OT_set_solution_scale(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Solution Scale";
- ot->description= "Set object solution scale using distance between two selected tracks";
- ot->idname= "CLIP_OT_set_solution_scale";
+ ot->name = "Set Solution Scale";
+ ot->description = "Set object solution scale using distance between two selected tracks";
+ ot->idname = "CLIP_OT_set_solution_scale";
/* api callbacks */
- ot->exec= set_solution_scale_exec;
- ot->invoke= set_solution_scale_invoke;
- ot->poll= set_solution_scale_poll;
+ ot->exec = set_solution_scale_exec;
+ ot->invoke = set_solution_scale_invoke;
+ ot->poll = set_solution_scale_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_float(ot->srna, "distance", 0.0f, -FLT_MAX, FLT_MAX,
@@ -2640,7 +2656,7 @@ static int set_center_principal_exec(bContext *C, wmOperator *UNUSED(op))
BKE_movieclip_get_size(clip, &sc->user, &width, &height);
- if(width==0 || height==0)
+ if (width==0 || height==0)
return OPERATOR_CANCELLED;
clip->tracking.camera.principal[0]= ((float)width)/2.0f;
@@ -2654,16 +2670,16 @@ static int set_center_principal_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_set_center_principal(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Principal to Center";
- ot->description= "Set optical center to center of footage";
- ot->idname= "CLIP_OT_set_center_principal";
+ ot->name = "Set Principal to Center";
+ ot->description = "Set optical center to center of footage";
+ ot->idname = "CLIP_OT_set_center_principal";
/* api callbacks */
- ot->exec= set_center_principal_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = set_center_principal_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** hide tracks operator *********************/
@@ -2681,20 +2697,21 @@ static int hide_tracks_exec(bContext *C, wmOperator *op)
unselected= RNA_boolean_get(op->ptr, "unselected");
track= tracksbase->first;
- while(track) {
- if(unselected==0 && TRACK_VIEW_SELECTED(sc, track)) {
+ while (track) {
+ if (unselected==0 && TRACK_VIEW_SELECTED(sc, track)) {
track->flag|= TRACK_HIDDEN;
- } else if(unselected==1 && !TRACK_VIEW_SELECTED(sc, track)) {
+ }
+ else if (unselected==1 && !TRACK_VIEW_SELECTED(sc, track)) {
track->flag|= TRACK_HIDDEN;
}
track= track->next;
}
- if(act_track && act_track->flag&TRACK_HIDDEN)
+ if (act_track && act_track->flag&TRACK_HIDDEN)
clip->tracking.act_track= NULL;
- if(unselected==0) {
+ if (unselected==0) {
/* no selection on screen now, unlock view so it can be scrolled nice again */
sc->flag&= ~SC_LOCK_SELECTION;
}
@@ -2707,16 +2724,16 @@ static int hide_tracks_exec(bContext *C, wmOperator *op)
void CLIP_OT_hide_tracks(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Hide Tracks";
- ot->description= "Hide selected tracks";
- ot->idname= "CLIP_OT_hide_tracks";
+ ot->name = "Hide Tracks";
+ ot->description = "Hide selected tracks";
+ ot->idname = "CLIP_OT_hide_tracks";
/* api callbacks */
- ot->exec= hide_tracks_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = hide_tracks_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected tracks");
@@ -2732,7 +2749,7 @@ static int hide_tracks_clear_exec(bContext *C, wmOperator *UNUSED(op))
MovieTrackingTrack *track;
track= tracksbase->first;
- while(track) {
+ while (track) {
track->flag&= ~TRACK_HIDDEN;
track= track->next;
@@ -2746,16 +2763,16 @@ static int hide_tracks_clear_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_hide_tracks_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Hide Tracks Clear";
- ot->description= "Clear hide selected tracks";
- ot->idname= "CLIP_OT_hide_tracks_clear";
+ ot->name = "Hide Tracks Clear";
+ ot->description = "Clear hide selected tracks";
+ ot->idname = "CLIP_OT_hide_tracks_clear";
/* api callbacks */
- ot->exec= hide_tracks_clear_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = hide_tracks_clear_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** detect features operator *********************/
@@ -2764,12 +2781,12 @@ static bGPDlayer *detect_get_layer(MovieClip *clip)
{
bGPDlayer *layer;
- if(!clip->gpd)
+ if (!clip->gpd)
return NULL;
layer= clip->gpd->layers.first;
- while(layer) {
- if(layer->flag&GP_LAYER_ACTIVE)
+ while (layer) {
+ if (layer->flag&GP_LAYER_ACTIVE)
return layer;
layer= layer->next;
@@ -2794,13 +2811,13 @@ static int detect_features_exec(bContext *C, wmOperator *op)
int place_outside_layer= 0;
bGPDlayer *layer= NULL;
- if(placement!=0) {
+ if (placement!=0) {
layer= detect_get_layer(clip);
place_outside_layer= placement==2;
}
/* deselect existing tracks */
- while(track) {
+ while (track) {
track->flag&= ~SELECT;
track->pat_flag&= ~SELECT;
track->search_flag&= ~SELECT;
@@ -2828,16 +2845,16 @@ void CLIP_OT_detect_features(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Detect Features";
- ot->description= "Automatically detect features and place markers to track";
- ot->idname= "CLIP_OT_detect_features";
+ ot->name = "Detect Features";
+ ot->description = "Automatically detect features and place markers to track";
+ ot->idname = "CLIP_OT_detect_features";
/* api callbacks */
- ot->exec= detect_features_exec;
- ot->poll= space_clip_frame_poll;
+ ot->exec = detect_features_exec;
+ ot->poll = space_clip_frame_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "placement", placement_items, 0, "Placement", "Placement for detected features");
@@ -2857,25 +2874,25 @@ static int frame_jump_exec(bContext *C, wmOperator *op)
int pos= RNA_enum_get(op->ptr, "position");
int delta;
- if(pos<=1) { /* jump to path */
+ if (pos<=1) { /* jump to path */
track= BKE_tracking_active_track(&clip->tracking);
- if(!track)
+ if (!track)
return OPERATOR_CANCELLED;
delta= pos == 1 ? 1 : -1;
- while(sc->user.framenr+delta >= SFRA && sc->user.framenr+delta <= EFRA) {
+ while (sc->user.framenr+delta >= SFRA && sc->user.framenr+delta <= EFRA) {
MovieTrackingMarker *marker= BKE_tracking_exact_marker(track, sc->user.framenr+delta);
- if(!marker || marker->flag&MARKER_DISABLED)
+ if (!marker || marker->flag&MARKER_DISABLED)
break;
sc->user.framenr+= delta;
}
}
else { /* to to failed frame */
- if(clip->tracking.reconstruction.flag&TRACKING_RECONSTRUCTED) {
+ if (clip->tracking.reconstruction.flag&TRACKING_RECONSTRUCTED) {
int a= sc->user.framenr;
MovieTracking *tracking= &clip->tracking;
MovieTrackingObject *object= BKE_tracking_active_object(tracking);
@@ -2884,12 +2901,12 @@ static int frame_jump_exec(bContext *C, wmOperator *op)
a+= delta;
- while(a+delta >= SFRA && a+delta <= EFRA) {
+ while (a+delta >= SFRA && a+delta <= EFRA) {
MovieReconstructedCamera *cam;
cam= BKE_tracking_get_reconstructed_camera(tracking, object, a);
- if(!cam) {
+ if (!cam) {
sc->user.framenr= a;
break;
@@ -2900,7 +2917,7 @@ static int frame_jump_exec(bContext *C, wmOperator *op)
}
}
- if(CFRA!=sc->user.framenr) {
+ if (CFRA!=sc->user.framenr) {
CFRA= sc->user.framenr;
sound_seek_scene(CTX_data_main(C), CTX_data_scene(C));
@@ -2923,19 +2940,19 @@ void CLIP_OT_frame_jump(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Jump to Frame";
- ot->description= "Jump to special frame";
- ot->idname= "CLIP_OT_frame_jump";
+ ot->name = "Jump to Frame";
+ ot->description = "Jump to special frame";
+ ot->idname = "CLIP_OT_frame_jump";
/* api callbacks */
- ot->exec= frame_jump_exec;
- ot->poll= space_clip_frame_poll;
+ ot->exec = frame_jump_exec;
+ ot->poll = space_clip_frame_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "position", position_items, 0, "Position", "Position to jumo to");
+ RNA_def_enum(ot->srna, "position", position_items, 0, "Position", "Position to jump to");
}
/********************** join tracks operator *********************/
@@ -2950,31 +2967,19 @@ static int join_tracks_exec(bContext *C, wmOperator *op)
act_track= BKE_tracking_active_track(tracking);
- if(!act_track) {
+ if (!act_track) {
BKE_report(op->reports, RPT_ERROR, "No active track to join to");
return OPERATOR_CANCELLED;
}
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && track!=act_track) {
- if(!BKE_tracking_test_join_tracks(act_track, track)) {
- BKE_report(op->reports, RPT_ERROR, "Some selected tracks have got keyframed markers to the same frame");
- return OPERATOR_CANCELLED;
- }
- }
-
- track= track->next;
- }
-
- track= tracksbase->first;
- while(track) {
+ while (track) {
next= track->next;
- if(TRACK_VIEW_SELECTED(sc, track) && track!=act_track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && track!=act_track) {
BKE_tracking_join_tracks(act_track, track);
- if(tracking->stabilization.rot_track == track)
+ if (tracking->stabilization.rot_track == track)
tracking->stabilization.rot_track= act_track;
BKE_tracking_free_track(track);
@@ -2992,16 +2997,16 @@ static int join_tracks_exec(bContext *C, wmOperator *op)
void CLIP_OT_join_tracks(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Join Tracks";
- ot->description= "Join selected tracks";
- ot->idname= "CLIP_OT_join_tracks";
+ ot->name = "Join Tracks";
+ ot->description = "Join selected tracks";
+ ot->idname = "CLIP_OT_join_tracks";
/* api callbacks */
- ot->exec= join_tracks_exec;
- ot->poll= space_clip_frame_poll;
+ ot->exec = join_tracks_exec;
+ ot->poll = space_clip_frame_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** lock tracks operator *********************/
@@ -3015,10 +3020,10 @@ static int lock_tracks_exec(bContext *C, wmOperator *op)
MovieTrackingTrack *track= tracksbase->first;
int action= RNA_enum_get(op->ptr, "action");
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track)) {
- if(action==0) track->flag|= TRACK_LOCKED;
- else if(action==1) track->flag&= ~TRACK_LOCKED;
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track)) {
+ if (action==0) track->flag|= TRACK_LOCKED;
+ else if (action==1) track->flag&= ~TRACK_LOCKED;
else track->flag^= TRACK_LOCKED;
}
@@ -3040,16 +3045,16 @@ void CLIP_OT_lock_tracks(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Lock Tracks";
- ot->description= "Lock/unlock selected tracks";
- ot->idname= "CLIP_OT_lock_tracks";
+ ot->name = "Lock Tracks";
+ ot->description = "Lock/unlock selected tracks";
+ ot->idname = "CLIP_OT_lock_tracks";
/* api callbacks */
- ot->exec= lock_tracks_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = lock_tracks_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "action", actions_items, 0, "Action", "Lock action to execute");
@@ -3065,15 +3070,15 @@ static int track_copy_color_exec(bContext *C, wmOperator *UNUSED(op))
ListBase *tracksbase= BKE_tracking_get_tracks(tracking);
MovieTrackingTrack *track, *act_track= BKE_tracking_active_track(tracking);
- if(!act_track)
+ if (!act_track)
return OPERATOR_CANCELLED;
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && track!=act_track) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && track!=act_track) {
track->flag&= ~TRACK_CUSTOMCOLOR;
- if(act_track->flag&TRACK_CUSTOMCOLOR) {
+ if (act_track->flag&TRACK_CUSTOMCOLOR) {
copy_v3_v3(track->color, act_track->color);
track->flag|= TRACK_CUSTOMCOLOR;
}
@@ -3090,16 +3095,16 @@ static int track_copy_color_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_track_copy_color(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Color";
- ot->description= "Copy color to all selected tracks";
- ot->idname= "CLIP_OT_track_copy_color";
+ ot->name = "Copy Color";
+ ot->description = "Copy color to all selected tracks";
+ ot->idname = "CLIP_OT_track_copy_color";
/* api callbacks */
- ot->exec= track_copy_color_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = track_copy_color_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** add 2d stabilization tracks operator *********************/
@@ -3115,8 +3120,8 @@ static int stabilize_2d_add_exec(bContext *C, wmOperator *UNUSED(op))
int update= 0;
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_USE_2D_STAB)==0) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_USE_2D_STAB)==0) {
track->flag|= TRACK_USE_2D_STAB;
stab->tot_track++;
@@ -3126,7 +3131,7 @@ static int stabilize_2d_add_exec(bContext *C, wmOperator *UNUSED(op))
track= track->next;
}
- if(update) {
+ if (update) {
stab->ok= 0;
DAG_id_tag_update(&clip->id, 0);
@@ -3139,16 +3144,16 @@ static int stabilize_2d_add_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_stabilize_2d_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Stabilization Tracks";
- ot->description= "Add selected tracks to 2D stabilization tool";
- ot->idname= "CLIP_OT_stabilize_2d_add";
+ ot->name = "Add Stabilization Tracks";
+ ot->description = "Add selected tracks to 2D stabilization tool";
+ ot->idname = "CLIP_OT_stabilize_2d_add";
/* api callbacks */
- ot->exec= stabilize_2d_add_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = stabilize_2d_add_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** remove 2d stabilization tracks operator *********************/
@@ -3164,15 +3169,15 @@ static int stabilize_2d_remove_exec(bContext *C, wmOperator *UNUSED(op))
int a= 0, update= 0;
track= tracksbase->first;
- while(track) {
- if(track->flag&TRACK_USE_2D_STAB) {
- if(a==stab->act_track) {
+ while (track) {
+ if (track->flag&TRACK_USE_2D_STAB) {
+ if (a==stab->act_track) {
track->flag&= ~TRACK_USE_2D_STAB;
stab->act_track--;
stab->tot_track--;
- if(stab->act_track<0)
+ if (stab->act_track<0)
stab->act_track= 0;
update= 1;
@@ -3186,7 +3191,7 @@ static int stabilize_2d_remove_exec(bContext *C, wmOperator *UNUSED(op))
track= track->next;
}
- if(update) {
+ if (update) {
stab->ok= 0;
DAG_id_tag_update(&clip->id, 0);
@@ -3199,16 +3204,16 @@ static int stabilize_2d_remove_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_stabilize_2d_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Stabilization Track";
- ot->description= "Remove selected track from stabilization";
- ot->idname= "CLIP_OT_stabilize_2d_remove";
+ ot->name = "Remove Stabilization Track";
+ ot->description = "Remove selected track from stabilization";
+ ot->idname = "CLIP_OT_stabilize_2d_remove";
/* api callbacks */
- ot->exec= stabilize_2d_remove_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = stabilize_2d_remove_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** select 2d stabilization tracks operator *********************/
@@ -3223,8 +3228,8 @@ static int stabilize_2d_select_exec(bContext *C, wmOperator *UNUSED(op))
int update= 0;
track= tracksbase->first;
- while(track) {
- if(track->flag&TRACK_USE_2D_STAB) {
+ while (track) {
+ if (track->flag&TRACK_USE_2D_STAB) {
BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, 0);
update= 1;
@@ -3233,7 +3238,7 @@ static int stabilize_2d_select_exec(bContext *C, wmOperator *UNUSED(op))
track= track->next;
}
- if(update)
+ if (update)
WM_event_add_notifier(C, NC_MOVIECLIP|ND_SELECT, clip);
return OPERATOR_FINISHED;
@@ -3242,16 +3247,16 @@ static int stabilize_2d_select_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_stabilize_2d_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Stabilization Tracks";
- ot->description= "Select track which are used for stabilization";
- ot->idname= "CLIP_OT_stabilize_2d_select";
+ ot->name = "Select Stabilization Tracks";
+ ot->description = "Select track which are used for stabilization";
+ ot->idname = "CLIP_OT_stabilize_2d_select";
/* api callbacks */
- ot->exec= stabilize_2d_select_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = stabilize_2d_select_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** set 2d stabilization rotation track operator *********************/
@@ -3263,7 +3268,7 @@ static int stabilize_2d_set_rotation_exec(bContext *C, wmOperator *UNUSED(op))
MovieTracking *tracking= &clip->tracking;
MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking);
- if(act_track) {
+ if (act_track) {
MovieTrackingStabilization *stab= &tracking->stabilization;
stab->rot_track= act_track;
@@ -3279,16 +3284,16 @@ static int stabilize_2d_set_rotation_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_stabilize_2d_set_rotation(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Rotation Track";
- ot->description= "Use active track to compensate rotation when doing 2D stabilization";
- ot->idname= "CLIP_OT_stabilize_2d_set_rotation";
+ ot->name = "Set Rotation Track";
+ ot->description = "Use active track to compensate rotation when doing 2D stabilization";
+ ot->idname = "CLIP_OT_stabilize_2d_set_rotation";
/* api callbacks */
- ot->exec= stabilize_2d_set_rotation_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = stabilize_2d_set_rotation_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** clean tracks operator *********************/
@@ -3300,53 +3305,53 @@ static int is_track_clean(MovieTrackingTrack *track, int frames, int del)
int start_disabled= 0;
int markersnr= track->markersnr;
- if(del)
+ if (del)
new_markers= MEM_callocN(markersnr*sizeof(MovieTrackingMarker), "track cleaned markers");
- for(a= 0; a<markersnr; a++) {
+ for (a= 0; a<markersnr; a++) {
int end= 0;
- if(prev==-1) {
- if((markers[a].flag&MARKER_DISABLED)==0)
+ if (prev==-1) {
+ if ((markers[a].flag&MARKER_DISABLED)==0)
prev= a;
else
start_disabled= 1;
}
- if(prev >= 0) {
+ if (prev >= 0) {
end= a == markersnr-1;
end|= (a < markersnr-1) && (markers[a].framenr != markers[a+1].framenr-1 ||
markers[a].flag&MARKER_DISABLED);
}
- if(end) {
+ if (end) {
int segok= 1, len= 0;
- if(a != prev && markers[a].framenr != markers[a-1].framenr+1)
+ if (a != prev && markers[a].framenr != markers[a-1].framenr+1)
len= a-prev;
- else if(markers[a].flag&MARKER_DISABLED)
+ else if (markers[a].flag&MARKER_DISABLED)
len= a-prev;
else len= a-prev+1;
- if(frames) {
- if(len < frames) {
+ if (frames) {
+ if (len < frames) {
segok= 0;
ok= 0;
- if(!del)
+ if (!del)
break;
}
}
- if(del) {
- if(segok) {
+ if (del) {
+ if (segok) {
int t= len;
- if(markers[a].flag&MARKER_DISABLED)
+ if (markers[a].flag&MARKER_DISABLED)
t++;
/* place disabled marker in front of current segment */
- if(start_disabled) {
+ if (start_disabled) {
memcpy(new_markers+count, markers+prev, sizeof(MovieTrackingMarker));
new_markers[count].framenr--;
new_markers[count].flag|= MARKER_DISABLED;
@@ -3358,7 +3363,7 @@ static int is_track_clean(MovieTrackingTrack *track, int frames, int del)
memcpy(new_markers+count, markers+prev, t*sizeof(MovieTrackingMarker));
count+= t;
}
- else if(markers[a].flag&MARKER_DISABLED) {
+ else if (markers[a].flag&MARKER_DISABLED) {
/* current segment which would be deleted was finished by disabled marker,
* so next segment should be started from disabled marker */
start_disabled= 1;
@@ -3369,10 +3374,10 @@ static int is_track_clean(MovieTrackingTrack *track, int frames, int del)
}
}
- if(del) {
+ if (del) {
MEM_freeN(track->markers);
- if(count) {
+ if (count) {
track->markers= new_markers;
}
else {
@@ -3397,25 +3402,25 @@ static int clean_tracks_exec(bContext *C, wmOperator *op)
int action= RNA_enum_get(op->ptr, "action");
float error= RNA_float_get(op->ptr, "error");
- if(error && action==TRACKING_CLEAN_DELETE_SEGMENT)
+ if (error && action==TRACKING_CLEAN_DELETE_SEGMENT)
action= TRACKING_CLEAN_DELETE_TRACK;
track= tracksbase->first;
- while(track) {
+ while (track) {
next= track->next;
- if((track->flag&TRACK_HIDDEN)==0 && (track->flag&TRACK_LOCKED)==0) {
+ if ((track->flag&TRACK_HIDDEN)==0 && (track->flag&TRACK_LOCKED)==0) {
int ok= 1;
ok= (is_track_clean(track, frames, action==TRACKING_CLEAN_DELETE_SEGMENT)) &&
(error == 0.0f || (track->flag&TRACK_HAS_BUNDLE)==0 || track->error < error);
- if(!ok) {
- if(action==TRACKING_CLEAN_SELECT) {
+ if (!ok) {
+ if (action==TRACKING_CLEAN_SELECT) {
BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, 0);
}
- else if(action==TRACKING_CLEAN_DELETE_TRACK) {
- if(track==act_track)
+ else if (action==TRACKING_CLEAN_DELETE_TRACK) {
+ if (track==act_track)
clip->tracking.act_track= NULL;
BKE_tracking_free_track(track);
@@ -3424,8 +3429,8 @@ static int clean_tracks_exec(bContext *C, wmOperator *op)
}
/* happens when all tracking segments are not long enough */
- if(track && track->markersnr==0) {
- if(track==act_track)
+ if (track && track->markersnr==0) {
+ if (track==act_track)
clip->tracking.act_track= NULL;
BKE_tracking_free_track(track);
@@ -3447,13 +3452,13 @@ static int clean_tracks_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
SpaceClip *sc= CTX_wm_space_clip(C);
MovieClip *clip= ED_space_clip(sc);
- if(!RNA_struct_property_is_set(op->ptr, "frames"))
+ if (!RNA_struct_property_is_set(op->ptr, "frames"))
RNA_int_set(op->ptr, "frames", clip->tracking.settings.clean_frames);
- if(!RNA_struct_property_is_set(op->ptr, "error"))
+ if (!RNA_struct_property_is_set(op->ptr, "error"))
RNA_float_set(op->ptr, "error", clip->tracking.settings.clean_error);
- if(!RNA_struct_property_is_set(op->ptr, "action"))
+ if (!RNA_struct_property_is_set(op->ptr, "action"))
RNA_enum_set(op->ptr, "action", clip->tracking.settings.clean_action);
return clean_tracks_exec(C, op);
@@ -3469,17 +3474,17 @@ void CLIP_OT_clean_tracks(wmOperatorType *ot)
};
/* identifiers */
- ot->name= "Clean Tracks";
- ot->description= "Clean tracks with high error values or few frames";
- ot->idname= "CLIP_OT_clean_tracks";
+ ot->name = "Clean Tracks";
+ ot->description = "Clean tracks with high error values or few frames";
+ ot->idname = "CLIP_OT_clean_tracks";
/* api callbacks */
- ot->exec= clean_tracks_exec;
- ot->invoke= clean_tracks_invoke;
- ot->poll= ED_space_clip_poll;
+ ot->exec = clean_tracks_exec;
+ ot->invoke = clean_tracks_invoke;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "frames", 0, 0, INT_MAX, "Tracked Frames", "Effect on tracks which are tracked less than specified amount of frames", 0, INT_MAX);
@@ -3505,16 +3510,16 @@ static int tracking_object_new_exec(bContext *C, wmOperator *UNUSED(op))
void CLIP_OT_tracking_object_new(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Tracking Object";
- ot->description= "Add new object for tracking";
- ot->idname= "CLIP_OT_tracking_object_new";
+ ot->name = "Add Tracking Object";
+ ot->description = "Add new object for tracking";
+ ot->idname = "CLIP_OT_tracking_object_new";
/* api callbacks */
- ot->exec= tracking_object_new_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = tracking_object_new_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** remove tracking object *********************/
@@ -3528,7 +3533,7 @@ static int tracking_object_remove_exec(bContext *C, wmOperator *op)
object= BKE_tracking_active_object(tracking);
- if(object->flag&TRACKING_OBJECT_CAMERA) {
+ if (object->flag&TRACKING_OBJECT_CAMERA) {
BKE_report(op->reports, RPT_WARNING, "Object used for camera tracking can't be deleted");
return OPERATOR_CANCELLED;
}
@@ -3543,16 +3548,16 @@ static int tracking_object_remove_exec(bContext *C, wmOperator *op)
void CLIP_OT_tracking_object_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Movie Tracking Object";
- ot->description= "Remove object for tracking";
- ot->idname= "CLIP_OT_tracking_object_remove";
+ ot->name = "Movie Tracking Object";
+ ot->description = "Remove object for tracking";
+ ot->idname = "CLIP_OT_tracking_object_remove";
/* api callbacks */
- ot->exec= tracking_object_remove_exec;
- ot->poll= ED_space_clip_poll;
+ ot->exec = tracking_object_remove_exec;
+ ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************** copy tracks to clipboard operator *********************/
@@ -3583,7 +3588,7 @@ void CLIP_OT_copy_tracks(wmOperatorType *ot)
ot->poll = ED_space_clip_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
}
/********************** paste tracks from clipboard operator *********************/
@@ -3623,5 +3628,5 @@ void CLIP_OT_paste_tracks(wmOperatorType *ot)
ot->poll = paste_tracks_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c
index 4855121a4de..1bfdcee1aae 100644
--- a/source/blender/editors/space_console/console_draw.c
+++ b/source/blender/editors/space_console/console_draw.c
@@ -153,7 +153,7 @@ static int console_textview_line_color(struct TextViewContext *tvc, unsigned cha
ConsoleLine *cl_iter= (ConsoleLine *)tvc->iter;
/* annoying hack, to draw the prompt */
- if(tvc->iter_index == 0) {
+ if (tvc->iter_index == 0) {
const SpaceConsole *sc= (SpaceConsole *)tvc->arg1;
const ConsoleLine *cl= (ConsoleLine *)sc->history.last;
const int prompt_len= strlen(sc->prompt);
@@ -163,7 +163,7 @@ static int console_textview_line_color(struct TextViewContext *tvc, unsigned cha
xy[1] += tvc->lheight/6;
/* account for wrapping */
- if(cl->len < tvc->console_width) {
+ if (cl->len < tvc->console_width) {
/* simple case, no wrapping */
pen[0]= tvc->cwidth * cursor_loc;
pen[1]= -2;
@@ -214,8 +214,8 @@ static int console_textview_main__internal(struct SpaceConsole *sc, struct ARegi
tvc.sel_start= sc->sel_start;
tvc.sel_end= sc->sel_end;
tvc.lheight= sc->lheight;
- tvc.ymin= v2d->cur.ymin;
- tvc.ymax= v2d->cur.ymax;
+ tvc.ymin = v2d->cur.ymin;
+ tvc.ymax = v2d->cur.ymax;
tvc.winx= ar->winx;
console_scrollback_prompt_begin(sc, &cl_dummy);
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index b52bc75eac8..425cee38af0 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -94,7 +94,7 @@ static void console_scrollback_limit(SpaceConsole *sc)
if (U.scrollback < 32) U.scrollback= 256; // XXX - save in user defaults
- for(tot= BLI_countlist(&sc->scrollback); tot > U.scrollback; tot--)
+ for (tot= BLI_countlist(&sc->scrollback); tot > U.scrollback; tot--)
console_scrollback_free(sc, sc->scrollback.first);
}
@@ -102,11 +102,11 @@ static ConsoleLine * console_history_find(SpaceConsole *sc, const char *str, Con
{
ConsoleLine *cl;
- for(cl= sc->history.last; cl; cl= cl->prev) {
+ for (cl= sc->history.last; cl; cl= cl->prev) {
if (cl==cl_ignore)
continue;
- if(strcmp(str, cl->line)==0)
+ if (strcmp(str, cl->line)==0)
return cl;
}
@@ -136,7 +136,7 @@ static void console_lb_debug__internal(ListBase *lb)
ConsoleLine *cl;
printf("%d: ", BLI_countlist(lb));
- for(cl= lb->first; cl; cl= cl->next)
+ for (cl= lb->first; cl; cl= cl->next)
printf("<%s> ", cl->line);
printf("\n");
@@ -155,14 +155,15 @@ static ConsoleLine *console_lb_add__internal(ListBase *lb, ConsoleLine *from)
{
ConsoleLine *ci= MEM_callocN(sizeof(ConsoleLine), "ConsoleLine Add");
- if(from) {
+ if (from) {
ci->line= BLI_strdup(from->line);
ci->len= strlen(ci->line);
ci->len_alloc= ci->len;
ci->cursor= from->cursor;
ci->type= from->type;
- } else {
+ }
+ else {
ci->line= MEM_callocN(64, "console-in-line");
ci->len_alloc= 64;
ci->len= 0;
@@ -191,7 +192,7 @@ static ConsoleLine *console_scrollback_add(const bContext *C, ConsoleLine *from)
static ConsoleLine *console_lb_add_str__internal(ListBase *lb, char *str, int own)
{
ConsoleLine *ci= MEM_callocN(sizeof(ConsoleLine), "ConsoleLine Add");
- if(own) ci->line= str;
+ if (own) ci->line= str;
else ci->line= BLI_strdup(str);
ci->len = ci->len_alloc = strlen(str);
@@ -214,7 +215,7 @@ ConsoleLine *console_history_verify(const bContext *C)
{
SpaceConsole *sc= CTX_wm_space_console(C);
ConsoleLine *ci= sc->history.last;
- if(ci==NULL)
+ if (ci==NULL)
ci= console_history_add(C, NULL);
return ci;
@@ -224,7 +225,7 @@ ConsoleLine *console_history_verify(const bContext *C)
static void console_line_verify_length(ConsoleLine *ci, int len)
{
/* resize the buffer if needed */
- if(len >= ci->len_alloc) {
+ if (len >= ci->len_alloc) {
int new_len= len * 2; /* new length */
char *new_line= MEM_callocN(new_len, "console line");
memcpy(new_line, ci->line, ci->len);
@@ -239,12 +240,12 @@ static int console_line_insert(ConsoleLine *ci, char *str)
{
int len = strlen(str);
- if(len>0 && str[len-1]=='\n') {/* stop new lines being pasted at the end of lines */
+ if (len>0 && str[len-1]=='\n') {/* stop new lines being pasted at the end of lines */
str[len-1]= '\0';
len--;
}
- if(len==0)
+ if (len==0)
return 0;
console_line_verify_length(ci, len + ci->len);
@@ -326,7 +327,7 @@ static int console_move_exec(bContext *C, wmOperator *op)
break;
}
- if(done) {
+ if (done) {
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= CTX_wm_region(C);
@@ -341,13 +342,13 @@ static int console_move_exec(bContext *C, wmOperator *op)
void CONSOLE_OT_move(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Cursor";
- ot->description= "Move cursor position";
- ot->idname= "CONSOLE_OT_move";
+ ot->name = "Move Cursor";
+ ot->description = "Move cursor position";
+ ot->idname = "CONSOLE_OT_move";
/* api callbacks */
- ot->exec= console_move_exec;
- ot->poll= ED_operator_console_active;
+ ot->exec = console_move_exec;
+ ot->poll = ED_operator_console_active;
/* properties */
RNA_def_enum(ot->srna, "type", console_move_type_items, LINE_BEGIN, "Type", "Where to move cursor to");
@@ -363,7 +364,7 @@ static int console_insert_exec(bContext *C, wmOperator *op)
int len;
// XXX, alligned tab key hack
- if(str[0]=='\t' && str[1]=='\0') {
+ if (str[0]=='\t' && str[1]=='\0') {
len= TAB_LENGTH - (ci->cursor % TAB_LENGTH);
MEM_freeN(str);
str= MEM_mallocN(len + 1, "insert_exec");
@@ -375,7 +376,7 @@ static int console_insert_exec(bContext *C, wmOperator *op)
MEM_freeN(str);
- if(len==0) {
+ if (len==0) {
return OPERATOR_CANCELLED;
}
else {
@@ -392,10 +393,10 @@ static int console_insert_exec(bContext *C, wmOperator *op)
static int console_insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- // if(!RNA_struct_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */
- if(!RNA_string_length(op->ptr, "text")) {
+ // if (!RNA_struct_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */
+ if (!RNA_string_length(op->ptr, "text")) {
/* if alt/ctrl/super are pressed pass through */
- if(event->ctrl || event->oskey) {
+ if (event->ctrl || event->oskey) {
return OPERATOR_PASS_THROUGH;
}
else {
@@ -411,18 +412,21 @@ static int console_insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
void CONSOLE_OT_insert(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
- ot->name= "Insert";
- ot->description= "Insert text at cursor position";
- ot->idname= "CONSOLE_OT_insert";
+ ot->name = "Insert";
+ ot->description = "Insert text at cursor position";
+ ot->idname = "CONSOLE_OT_insert";
/* api callbacks */
- ot->exec= console_insert_exec;
- ot->invoke= console_insert_invoke;
- ot->poll= ED_operator_console_active;
+ ot->exec = console_insert_exec;
+ ot->invoke = console_insert_invoke;
+ ot->poll = ED_operator_console_active;
/* properties */
- RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
+ prop = RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
@@ -442,20 +446,20 @@ static int console_delete_exec(bContext *C, wmOperator *op)
const short type= RNA_enum_get(op->ptr, "type");
int done = 0;
- if(ci->len==0) {
+ if (ci->len==0) {
return OPERATOR_CANCELLED;
}
switch(type) {
case DEL_NEXT_CHAR:
- if(ci->cursor < ci->len) {
+ if (ci->cursor < ci->len) {
memmove(ci->line + ci->cursor, ci->line + ci->cursor+1, (ci->len - ci->cursor)+1);
ci->len--;
done= 1;
}
break;
case DEL_PREV_CHAR:
- if(ci->cursor > 0) {
+ if (ci->cursor > 0) {
ci->cursor--; /* same as above */
memmove(ci->line + ci->cursor, ci->line + ci->cursor+1, (ci->len - ci->cursor)+1);
ci->len--;
@@ -464,7 +468,7 @@ static int console_delete_exec(bContext *C, wmOperator *op)
break;
}
- if(!done) {
+ if (!done) {
return OPERATOR_CANCELLED;
}
else {
@@ -483,13 +487,13 @@ static int console_delete_exec(bContext *C, wmOperator *op)
void CONSOLE_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete";
- ot->description= "Delete text by cursor position";
- ot->idname= "CONSOLE_OT_delete";
+ ot->name = "Delete";
+ ot->description = "Delete text by cursor position";
+ ot->idname = "CONSOLE_OT_delete";
/* api callbacks */
- ot->exec= console_delete_exec;
- ot->poll= ED_operator_console_active;
+ ot->exec = console_delete_exec;
+ ot->poll = ED_operator_console_active;
/* properties */
RNA_def_enum(ot->srna, "type", console_delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete");
@@ -507,13 +511,13 @@ static int console_clear_exec(bContext *C, wmOperator *op)
/*ConsoleLine *ci= */ console_history_verify(C);
- if(scrollback) { /* last item in mistory */
- while(sc->scrollback.first)
+ if (scrollback) { /* last item in mistory */
+ while (sc->scrollback.first)
console_scrollback_free(sc, sc->scrollback.first);
}
- if(history) {
- while(sc->history.first)
+ if (history) {
+ while (sc->history.first)
console_history_free(sc, sc->history.first);
}
@@ -526,13 +530,13 @@ static int console_clear_exec(bContext *C, wmOperator *op)
void CONSOLE_OT_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear";
- ot->description= "Clear text by type";
- ot->idname= "CONSOLE_OT_clear";
+ ot->name = "Clear";
+ ot->description = "Clear text by type";
+ ot->idname = "CONSOLE_OT_clear";
/* api callbacks */
- ot->exec= console_clear_exec;
- ot->poll= ED_operator_console_active;
+ ot->exec = console_clear_exec;
+ ot->poll = ED_operator_console_active;
/* properties */
RNA_def_boolean(ot->srna, "scrollback", 1, "Scrollback", "Clear the scrollback history");
@@ -553,14 +557,14 @@ static int console_history_cycle_exec(bContext *C, wmOperator *op)
/* keep a copy of the line above so when history is cycled
* this is the only function that needs to know about the double-up */
- if(ci->prev) {
+ if (ci->prev) {
ConsoleLine *ci_prev= (ConsoleLine *)ci->prev;
- if(strcmp(ci->line, ci_prev->line)==0)
+ if (strcmp(ci->line, ci_prev->line)==0)
console_history_free(sc, ci_prev);
}
- if(reverse) { /* last item in mistory */
+ if (reverse) { /* last item in mistory */
ci= sc->history.last;
BLI_remlink(&sc->history, ci);
BLI_addhead(&sc->history, ci);
@@ -573,7 +577,7 @@ static int console_history_cycle_exec(bContext *C, wmOperator *op)
{ /* add a duplicate of the new arg and remove all other instances */
ConsoleLine *cl;
- while((cl= console_history_find(sc, ci->line, ci)))
+ while ((cl= console_history_find(sc, ci->line, ci)))
console_history_free(sc, cl);
console_history_add(C, (ConsoleLine *)sc->history.last);
@@ -594,13 +598,13 @@ static int console_history_cycle_exec(bContext *C, wmOperator *op)
void CONSOLE_OT_history_cycle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "History Cycle";
- ot->description= "Cycle through history";
- ot->idname= "CONSOLE_OT_history_cycle";
+ ot->name = "History Cycle";
+ ot->description = "Cycle through history";
+ ot->idname = "CONSOLE_OT_history_cycle";
/* api callbacks */
- ot->exec= console_history_cycle_exec;
- ot->poll= ED_operator_console_active;
+ ot->exec = console_history_cycle_exec;
+ ot->poll = ED_operator_console_active;
/* properties */
RNA_def_boolean(ot->srna, "reverse", 0, "Reverse", "Reverse cycle history");
@@ -614,18 +618,18 @@ static int console_history_append_exec(bContext *C, wmOperator *op)
ARegion *ar= CTX_wm_region(C);
ScrArea *sa= CTX_wm_area(C);
ConsoleLine *ci= console_history_verify(C);
- char *str= RNA_string_get_alloc(op->ptr, "text", NULL, 0); /* own this text in the new line, dont free */
+ char *str= RNA_string_get_alloc(op->ptr, "text", NULL, 0); /* own this text in the new line, don't free */
int cursor= RNA_int_get(op->ptr, "current_character");
short rem_dupes= RNA_boolean_get(op->ptr, "remove_duplicates");
int prev_len= ci->len;
- if(rem_dupes) {
+ if (rem_dupes) {
ConsoleLine *cl;
- while((cl= console_history_find(sc, ci->line, ci)))
+ while ((cl= console_history_find(sc, ci->line, ci)))
console_history_free(sc, cl);
- if(strcmp(str, ci->line)==0) {
+ if (strcmp(str, ci->line)==0) {
MEM_freeN(str);
return OPERATOR_FINISHED;
}
@@ -649,13 +653,13 @@ static int console_history_append_exec(bContext *C, wmOperator *op)
void CONSOLE_OT_history_append(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "History Append";
- ot->description= "Append history at cursor position";
- ot->idname= "CONSOLE_OT_history_append";
+ ot->name = "History Append";
+ ot->description = "Append history at cursor position";
+ ot->idname = "CONSOLE_OT_history_append";
/* api callbacks */
- ot->exec= console_history_append_exec;
- ot->poll= ED_operator_console_active;
+ ot->exec = console_history_append_exec;
+ ot->poll = ED_operator_console_active;
/* properties */
RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
@@ -671,7 +675,7 @@ static int console_scrollback_append_exec(bContext *C, wmOperator *op)
ARegion *ar= CTX_wm_region(C);
ConsoleLine *ci;
- char *str= RNA_string_get_alloc(op->ptr, "text", NULL, 0); /* own this text in the new line, dont free */
+ char *str= RNA_string_get_alloc(op->ptr, "text", NULL, 0); /* own this text in the new line, don't free */
int type= RNA_enum_get(op->ptr, "type");
console_history_verify(C);
@@ -683,7 +687,7 @@ static int console_scrollback_append_exec(bContext *C, wmOperator *op)
/* 'ar' can be null depending on the operator that runs
* rendering with invoke default for eg causes this */
- if(ar) {
+ if (ar) {
console_textview_update_rect(sc, ar);
}
@@ -703,13 +707,13 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Scrollback Append";
- ot->description= "Append scrollback text by type";
- ot->idname= "CONSOLE_OT_scrollback_append";
+ ot->name = "Scrollback Append";
+ ot->description = "Append scrollback text by type";
+ ot->idname = "CONSOLE_OT_scrollback_append";
/* api callbacks */
- ot->exec= console_scrollback_append_exec;
- ot->poll= ED_operator_console_active;
+ ot->exec = console_scrollback_append_exec;
+ ot->poll = ED_operator_console_active;
/* properties */
RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
@@ -732,22 +736,22 @@ static int console_copy_exec(bContext *C, wmOperator *UNUSED(op))
#if 0
/* copy whole file */
- for(cl= sc->scrollback.first; cl; cl= cl->next) {
+ for (cl= sc->scrollback.first; cl; cl= cl->next) {
BLI_dynstr_append(buf_dyn, cl->line);
BLI_dynstr_append(buf_dyn, "\n");
}
#endif
- if(sc->sel_start == sc->sel_end)
+ if (sc->sel_start == sc->sel_end)
return OPERATOR_CANCELLED;
console_scrollback_prompt_begin(sc, &cl_dummy);
- for(cl= sc->scrollback.first; cl; cl= cl->next) {
+ for (cl= sc->scrollback.first; cl; cl= cl->next) {
offset += cl->len + 1;
}
- if(offset==0) {
+ if (offset==0) {
console_scrollback_prompt_end(sc, &cl_dummy);
return OPERATOR_CANCELLED;
}
@@ -756,12 +760,12 @@ static int console_copy_exec(bContext *C, wmOperator *UNUSED(op))
sel[0]= offset - sc->sel_end;
sel[1]= offset - sc->sel_start;
- for(cl= sc->scrollback.first; cl; cl= cl->next) {
- if(sel[0] <= cl->len && sel[1] >= 0) {
+ for (cl= sc->scrollback.first; cl; cl= cl->next) {
+ if (sel[0] <= cl->len && sel[1] >= 0) {
int sta= MAX2(sel[0], 0);
int end= MIN2(sel[1], cl->len);
- if(BLI_dynstr_get_len(buf_dyn))
+ if (BLI_dynstr_get_len(buf_dyn))
BLI_dynstr_append(buf_dyn, "\n");
BLI_dynstr_nappend(buf_dyn, cl->line + sta, end - sta);
@@ -786,13 +790,13 @@ static int console_copy_exec(bContext *C, wmOperator *UNUSED(op))
void CONSOLE_OT_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy to Clipboard";
- ot->description= "Copy selected text to clipboard";
- ot->idname= "CONSOLE_OT_copy";
+ ot->name = "Copy to Clipboard";
+ ot->description = "Copy selected text to clipboard";
+ ot->idname = "CONSOLE_OT_copy";
/* api callbacks */
- ot->poll= ED_operator_console_active;
- ot->exec= console_copy_exec;
+ ot->poll = ED_operator_console_active;
+ ot->exec = console_copy_exec;
/* properties */
}
@@ -806,19 +810,19 @@ static int console_paste_exec(bContext *C, wmOperator *UNUSED(op))
char *buf_str= WM_clipboard_text_get(0);
char *buf_step, *buf_next;
- if(buf_str==NULL)
+ if (buf_str==NULL)
return OPERATOR_CANCELLED;
buf_step= buf_str;
- while((buf_next=buf_step) && buf_next[0] != '\0') {
+ while ((buf_next=buf_step) && buf_next[0] != '\0') {
buf_step= strchr(buf_next, '\n');
- if(buf_step) {
+ if (buf_step) {
*buf_step= '\0';
buf_step++;
}
- if(buf_next != buf_str) {
+ if (buf_next != buf_str) {
WM_operator_name_call(C, "CONSOLE_OT_execute", WM_OP_EXEC_DEFAULT, NULL);
ci= console_history_verify(C);
}
@@ -839,13 +843,13 @@ static int console_paste_exec(bContext *C, wmOperator *UNUSED(op))
void CONSOLE_OT_paste(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Paste from Clipboard";
- ot->description= "Paste text from clipboard";
- ot->idname= "CONSOLE_OT_paste";
+ ot->name = "Paste from Clipboard";
+ ot->description = "Paste text from clipboard";
+ ot->idname = "CONSOLE_OT_paste";
/* api callbacks */
- ot->poll= ED_operator_console_active;
- ot->exec= console_paste_exec;
+ ot->poll = ED_operator_console_active;
+ ot->exec = console_paste_exec;
/* properties */
}
@@ -861,7 +865,7 @@ static void console_cursor_set_to_pos(SpaceConsole *sc, ARegion *ar, SetConsoleC
int pos;
pos= console_char_pick(sc, ar, mval);
- if(scu->sel_init == INT_MAX) {
+ if (scu->sel_init == INT_MAX) {
scu->sel_init= pos;
sc->sel_start = sc->sel_end = pos;
return;
@@ -897,7 +901,7 @@ static void console_modal_select_apply(bContext *C, wmOperator *op, wmEvent *eve
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) {
+ if (sel_prev[0] != sc->sel_start || sel_prev[1] != sc->sel_end) {
ED_area_tag_redraw(CTX_wm_area(C));
}
}
@@ -908,7 +912,7 @@ static void console_cursor_set_exit(bContext *UNUSED(C), wmOperator *op)
SetConsoleCursor *scu= op->customdata;
#if 0
- if(txt_has_sel(text)) {
+ if (txt_has_sel(text)) {
buffer = txt_sel_to_buf(text);
WM_clipboard_text_set(buffer, 1);
MEM_freeN(buffer);
@@ -964,13 +968,13 @@ static int console_modal_select_cancel(bContext *C, wmOperator *op)
void CONSOLE_OT_select_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Selection";
- ot->idname= "CONSOLE_OT_select_set";
- ot->description= "Set the console selection";
+ ot->name = "Set Selection";
+ ot->idname = "CONSOLE_OT_select_set";
+ ot->description = "Set the console selection";
/* api callbacks */
- ot->invoke= console_modal_select_invoke;
- ot->modal= console_modal_select;
- ot->cancel= console_modal_select_cancel;
- ot->poll= ED_operator_console_active;
+ ot->invoke = console_modal_select_invoke;
+ ot->modal = console_modal_select;
+ ot->cancel = console_modal_select_cancel;
+ ot->poll = ED_operator_console_active;
}
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index d781179249b..1867f93b1ef 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -101,10 +101,10 @@ static void console_free(SpaceLink *sl)
{
SpaceConsole *sc= (SpaceConsole*) sl;
- while(sc->scrollback.first)
+ while (sc->scrollback.first)
console_scrollback_free(sc, sc->scrollback.first);
- while(sc->history.first)
+ while (sc->history.first)
console_history_free(sc, sc->history.first);
}
@@ -141,14 +141,14 @@ static void console_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* always keep the bottom part of the view aligned, less annoying */
- if(prev_y_min != ar->v2d.cur.ymin) {
+ if (prev_y_min != ar->v2d.cur.ymin) {
const float cur_y_range= ar->v2d.cur.ymax - ar->v2d.cur.ymin;
- ar->v2d.cur.ymin= prev_y_min;
- ar->v2d.cur.ymax= prev_y_min + cur_y_range;
+ ar->v2d.cur.ymin = prev_y_min;
+ ar->v2d.cur.ymax = prev_y_min + cur_y_range;
}
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "Console", SPACE_CONSOLE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Console", SPACE_CONSOLE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
/* add drop boxes */
@@ -163,7 +163,7 @@ static void console_main_area_init(wmWindowManager *wm, ARegion *ar)
static int id_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))
{
// SpaceConsole *sc= CTX_wm_space_console(C);
- if(drag->type==WM_DRAG_ID)
+ if (drag->type==WM_DRAG_ID)
return 1;
return 0;
}
@@ -185,7 +185,7 @@ static void id_drop_copy(wmDrag *drag, wmDropBox *drop)
static int path_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))
{
// SpaceConsole *sc= CTX_wm_space_console(C);
- if(drag->type==WM_DRAG_PATH)
+ if (drag->type==WM_DRAG_PATH)
return 1;
return 0;
}
@@ -216,7 +216,7 @@ static void console_main_area_draw(const bContext *C, ARegion *ar)
View2D *v2d= &ar->v2d;
View2DScrollers *scrollers;
- if(sc->scrollback.first==NULL)
+ if (sc->scrollback.first==NULL)
WM_operator_name_call((bContext *)C, "CONSOLE_OT_banner", WM_OP_EXEC_DEFAULT, NULL);
/* clear and setup matrix */
@@ -260,7 +260,7 @@ static void console_operatortypes(void)
static void console_keymap(struct wmKeyConfig *keyconf)
{
- wmKeyMap *keymap= WM_keymap_find(keyconf, "Console", SPACE_CONSOLE, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "Console", SPACE_CONSOLE, 0);
wmKeyMapItem *kmi;
#ifdef __APPLE__
@@ -293,9 +293,8 @@ static void console_keymap(struct wmKeyConfig *keyconf)
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);
- kmi = WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", UPARROWKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "reverse", TRUE);
- WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", DOWNARROWKEY, KM_PRESS, 0, 0);
+ 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);
@@ -358,7 +357,7 @@ static void console_main_area_listener(ARegion *ar, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
case NC_SPACE:
- if(wmn->data == ND_SPACE_CONSOLE) { /* generic redraw request */
+ if (wmn->data == ND_SPACE_CONSOLE) { /* generic redraw request */
ED_region_tag_redraw(ar);
}
break;
diff --git a/source/blender/editors/space_file/CMakeLists.txt b/source/blender/editors/space_file/CMakeLists.txt
index 6d959d0b739..98e147413ff 100644
--- a/source/blender/editors/space_file/CMakeLists.txt
+++ b/source/blender/editors/space_file/CMakeLists.txt
@@ -78,4 +78,8 @@ if(WITH_IMAGE_HDR)
add_definitions(-DWITH_HDR)
endif()
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_space_file "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/space_file/SConscript b/source/blender/editors/space_file/SConscript
index ad96840f7b9..ad8bcba39d6 100644
--- a/source/blender/editors/space_file/SConscript
+++ b/source/blender/editors/space_file/SConscript
@@ -19,11 +19,14 @@ if env['WITH_BF_OPENEXR']:
if env['WITH_BF_TIFF']:
defs.append('WITH_TIFF')
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
if env['OURPLATFORM'] == 'linux':
cflags='-pthread'
incs += ' ../../../extern/binreloc/include'
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
-
+
env.BlenderLib ( 'bf_editors_space_file', sources, Split(incs), defs, libtype=['core'], priority=[115] )
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 462e7030805..4d764bff311 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -157,7 +157,8 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
if (available_w <= loadbutton + separator + input_minw
|| params->title[0] == 0) {
loadbutton = 0;
- } else {
+ }
+ else {
line1_w -= (loadbutton + separator);
line2_w = line1_w;
}
@@ -166,7 +167,8 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
fnumbuttons = 2 * btn_fn_w;
if (!loadbutton || line2_w <= fnumbuttons + separator + input_minw) {
fnumbuttons = 0;
- } else {
+ }
+ else {
line2_w -= (fnumbuttons + separator);
}
@@ -183,16 +185,17 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
uiButSetCompleteFunc(but, autocomplete_directory, NULL);
uiButSetFlag(but, UI_BUT_NO_UTF8);
- if((params->flag & FILE_DIRSEL_ONLY) == 0) {
+ if ((params->flag & FILE_DIRSEL_ONLY) == 0) {
but = uiDefBut(block, TEX, B_FS_FILENAME, "",
min_x, line2_y, line2_w-chan_offs, btn_h,
params->file, 0.0, (float)FILE_MAXFILE, 0, 0,
TIP_(overwrite_alert ?N_("File name, overwrite existing") : N_("File name")));
uiButSetCompleteFunc(but, autocomplete_file, NULL);
uiButSetFlag(but, UI_BUT_NO_UTF8);
+ uiButClearFlag(but, UI_BUT_UNDO); /* operator button above does this automatic */
/* check if this overrides a file and if the operator option is used */
- if(overwrite_alert) {
+ if (overwrite_alert) {
uiButSetFlag(but, UI_BUT_REDALERT);
}
}
@@ -219,7 +222,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
}
/* Execute / cancel buttons. */
- if(loadbutton) {
+ if (loadbutton) {
uiDefButO(block, BUT, "FILE_OT_execute", WM_OP_EXEC_REGION_WIN, IFACE_(params->title),
max_x - loadbutton, line1_y, loadbutton, btn_h, TIP_(params->title));
@@ -246,7 +249,7 @@ static int get_file_icon(struct direntry *file)
if ( strcmp(file->relname, "..") == 0) {
return ICON_FILE_PARENT;
}
- if(file->flags & BLENDERFILE) {
+ if (file->flags & BLENDERFILE) {
return ICON_FILE_BLEND;
}
return ICON_FILE_FOLDER;
@@ -284,7 +287,7 @@ static void file_draw_icon(uiBlock *block, char *path, int sx, int sy, int icon,
/*if (icon == ICON_FILE_BLANK) alpha = 0.375f;*/
- but= uiDefIconBut(block, LABEL, 0, icon, x, y, width, height, NULL, 0.0f, 0.0f, 0.0f, 0.0f, "");
+ but = uiDefIconBut(block, LABEL, 0, icon, x, y, width, height, NULL, 0.0f, 0.0f, 0.0f, 0.0f, "");
uiButSetDragPath(but, path);
}
@@ -342,7 +345,8 @@ static void file_draw_preview(uiBlock *block, struct direntry *file, int sx, int
scaledx = ( (float)imb->x/(float)imb->y )*layout->prv_h;
scale = scaledy/imb->y;
}
- } else {
+ }
+ else {
scaledx = (float)imb->x;
scaledy = (float)imb->y;
scale = 1.0;
@@ -375,7 +379,7 @@ static void file_draw_preview(uiBlock *block, struct direntry *file, int sx, int
}
/* dragregion */
- but= uiDefBut(block, LABEL, 0, "", xco, yco, ex, ey, NULL, 0.0, 0.0, 0, 0, "");
+ but = uiDefBut(block, LABEL, 0, "", xco, yco, ex, ey, NULL, 0.0, 0.0, 0, 0, "");
uiButSetDragImage(but, file->path, get_file_icon(file), imb, scale);
glDisable(GL_BLEND);
@@ -395,7 +399,7 @@ static void renamebutton_cb(bContext *C, void *UNUSED(arg1), char *oldname)
BLI_strncpy(filename, sfile->params->renameedit, sizeof(filename));
BLI_make_file_string(G.main->name, newname, sfile->params->dir, filename);
- if( strcmp(orgname, newname) != 0 ) {
+ if ( strcmp(orgname, newname) != 0 ) {
if (!BLI_exists(newname)) {
BLI_rename(orgname, newname);
/* to make sure we show what is on disk */
@@ -476,7 +480,8 @@ void file_draw_list(const bContext *C, ARegion *ar)
/* adjust, so the next row is already drawn when scrolling */
if (layout->flag & FILE_LAYOUT_HOR) {
numfiles_layout += layout->rows;
- } else {
+ }
+ else {
numfiles_layout += layout->columns;
}
@@ -514,7 +519,8 @@ void file_draw_list(const bContext *C, ARegion *ar)
}
file_draw_preview(block, file, sx, sy, imb, layout, !is_icon && (file->flags & IMAGEFILE));
- } else {
+ }
+ else {
file_draw_icon(block, file->path, sx, sy-(UI_UNIT_Y / 6), get_file_icon(file), ICON_DEFAULT_WIDTH_SCALE, ICON_DEFAULT_HEIGHT_SCALE);
sx += ICON_DEFAULT_WIDTH_SCALE + 4;
}
@@ -526,6 +532,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
textwidth, textheight, sfile->params->renameedit, 1.0f, (float)sizeof(sfile->params->renameedit),0,0,"");
uiButSetRenameFunc(but, renamebutton_cb, file);
uiButSetFlag(but, UI_BUT_NO_UTF8); /* allow non utf8 names */
+ uiButClearFlag(but, UI_BUT_UNDO);
if ( 0 == uiButActiveOnly(C, block, but)) {
file->selflag &= ~EDITING_FILE;
}
@@ -542,7 +549,8 @@ void file_draw_list(const bContext *C, ARegion *ar)
file_draw_string(sx, sy, file->size, layout->column_widths[COLUMN_SIZE], layout->tile_h, align);
sx += (int)layout->column_widths[COLUMN_SIZE] + 12;
}
- } else if (params->display == FILE_LONGDISPLAY) {
+ }
+ else if (params->display == FILE_LONGDISPLAY) {
sx += (int)layout->column_widths[COLUMN_NAME] + 12;
#ifndef WIN32
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index f663307507a..62b7aafb187 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -170,7 +170,7 @@ static FileSelect file_select_do(bContext* C, int selected_idx)
{
params->active_file = selected_idx;
- if(S_ISDIR(file->type)) {
+ if (S_ISDIR(file->type)) {
/* the path is too long and we are not going up! */
if (strcmp(file->relname, "..") && strlen(params->dir) + strlen(file->relname) >= FILE_MAX ) {
// XXX error("Path too long, cannot enter this directory");
@@ -240,12 +240,12 @@ static int file_border_select_modal(bContext *C, wmOperator *op, wmEvent *event)
result= WM_border_select_modal(C, op, event);
- if(result==OPERATOR_RUNNING_MODAL) {
+ if (result==OPERATOR_RUNNING_MODAL) {
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
BLI_isect_rcti(&(ar->v2d.mask), &rect, &rect);
@@ -257,7 +257,8 @@ static int file_border_select_modal(bContext *C, wmOperator *op, wmEvent *event)
}
params->sel_first = sel.first; params->sel_last = sel.last;
- }else {
+ }
+ else {
params->active_file = -1;
params->sel_first = params->sel_last = -1;
file_deselect_all(sfile, HILITED_FILE);
@@ -275,12 +276,12 @@ static int file_border_select_exec(bContext *C, wmOperator *op)
int extend= RNA_boolean_get(op->ptr, "extend");
short select= (RNA_int_get(op->ptr, "gesture_mode")==GESTURE_MODAL_SELECT);
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
- if(!extend) {
+ if (!extend) {
SpaceFile *sfile= CTX_wm_space_file(C);
file_deselect_all(sfile, SELECTED_FILE);
@@ -291,7 +292,8 @@ static int file_border_select_exec(bContext *C, wmOperator *op)
ret = file_select(C, &rect, select ? FILE_SEL_ADD : FILE_SEL_REMOVE, 0);
if (FILE_SELECT_DIR == ret) {
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
- } else if (FILE_SELECT_FILE == ret) {
+ }
+ else if (FILE_SELECT_FILE == ret) {
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
}
return OPERATOR_FINISHED;
@@ -300,16 +302,16 @@ static int file_border_select_exec(bContext *C, wmOperator *op)
void FILE_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Activate/Select File";
- ot->description= "Activate/select the file(s) contained in the border";
- ot->idname= "FILE_OT_select_border";
+ ot->name = "Activate/Select File";
+ ot->description = "Activate/select the file(s) contained in the border";
+ ot->idname = "FILE_OT_select_border";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= file_border_select_exec;
- ot->modal= file_border_select_modal;
- ot->poll= ED_operator_file_active;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = file_border_select_exec;
+ ot->modal = file_border_select_modal;
+ ot->poll = ED_operator_file_active;
+ ot->cancel = WM_border_select_cancel;
/* rna */
WM_operator_properties_gesture_border(ot, 1);
@@ -324,13 +326,13 @@ static int file_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
int extend = RNA_boolean_get(op->ptr, "extend");
int fill = RNA_boolean_get(op->ptr, "fill");
- if(ar->regiontype != RGN_TYPE_WINDOW)
+ if (ar->regiontype != RGN_TYPE_WINDOW)
return OPERATOR_CANCELLED;
rect.xmin = rect.xmax = event->mval[0];
rect.ymin = rect.ymax = event->mval[1];
- if(!BLI_in_rcti(&ar->v2d.mask, rect.xmin, rect.ymin))
+ if (!BLI_in_rcti(&ar->v2d.mask, rect.xmin, rect.ymin))
return OPERATOR_CANCELLED;
/* single select, deselect all selected first */
@@ -351,13 +353,13 @@ static int file_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
void FILE_OT_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Activate/Select File";
- ot->description= "Activate/select file";
- ot->idname= "FILE_OT_select";
+ ot->name = "Activate/Select File";
+ ot->description = "Activate/select file";
+ ot->idname = "FILE_OT_select";
/* api callbacks */
- ot->invoke= file_select_invoke;
- ot->poll= ED_operator_file_active;
+ ot->invoke = file_select_invoke;
+ ot->poll = ED_operator_file_active;
/* rna */
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first");
@@ -398,13 +400,13 @@ static int file_select_all_exec(bContext *C, wmOperator *UNUSED(op))
void FILE_OT_select_all_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select/Deselect All Files";
- ot->description= "Select/deselect all files";
- ot->idname= "FILE_OT_select_all_toggle";
+ ot->name = "(De)select All Files";
+ ot->description = "Select or deselect all files";
+ ot->idname = "FILE_OT_select_all_toggle";
/* api callbacks */
- ot->exec= file_select_all_exec;
- ot->poll= ED_operator_file_active;
+ ot->exec = file_select_all_exec;
+ ot->poll = ED_operator_file_active;
/* rna */
@@ -417,7 +419,7 @@ static int bookmark_select_exec(bContext *C, wmOperator *op)
{
SpaceFile *sfile= CTX_wm_space_file(C);
- if(RNA_struct_find_property(op->ptr, "dir")) {
+ if (RNA_struct_find_property(op->ptr, "dir")) {
char entry[256];
FileSelectParams* params = sfile->params;
@@ -435,13 +437,13 @@ static int bookmark_select_exec(bContext *C, wmOperator *op)
void FILE_OT_select_bookmark(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Directory";
- ot->description= "Select a bookmarked directory";
- ot->idname= "FILE_OT_select_bookmark";
+ ot->name = "Select Directory";
+ ot->description = "Select a bookmarked directory";
+ ot->idname = "FILE_OT_select_bookmark";
/* api callbacks */
- ot->exec= bookmark_select_exec;
- ot->poll= ED_operator_file_active;
+ ot->exec = bookmark_select_exec;
+ ot->poll = ED_operator_file_active;
RNA_def_string(ot->srna, "dir", "", 256, "Dir", "");
}
@@ -468,13 +470,13 @@ static int bookmark_add_exec(bContext *C, wmOperator *UNUSED(op))
void FILE_OT_bookmark_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Bookmark";
- ot->description= "Add a bookmark for the selected/active directory";
- ot->idname= "FILE_OT_bookmark_add";
+ ot->name = "Add Bookmark";
+ ot->description = "Add a bookmark for the selected/active directory";
+ ot->idname = "FILE_OT_bookmark_add";
/* api callbacks */
- ot->exec= bookmark_add_exec;
- ot->poll= ED_operator_file_active;
+ ot->exec = bookmark_add_exec;
+ ot->poll = ED_operator_file_active;
}
static int bookmark_delete_exec(bContext *C, wmOperator *op)
@@ -483,7 +485,7 @@ static int bookmark_delete_exec(bContext *C, wmOperator *op)
struct FSMenu* fsmenu = fsmenu_get();
int nentries = fsmenu_get_nentries(fsmenu, FS_CATEGORY_BOOKMARKS);
- if(RNA_struct_find_property(op->ptr, "index")) {
+ if (RNA_struct_find_property(op->ptr, "index")) {
int index = RNA_int_get(op->ptr, "index");
if ( (index >-1) && (index < nentries)) {
char name[FILE_MAX];
@@ -501,13 +503,13 @@ static int bookmark_delete_exec(bContext *C, wmOperator *op)
void FILE_OT_delete_bookmark(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Bookmark";
- ot->description= "Delete selected bookmark";
- ot->idname= "FILE_OT_delete_bookmark";
+ ot->name = "Delete Bookmark";
+ ot->description = "Delete selected bookmark";
+ ot->idname = "FILE_OT_delete_bookmark";
/* api callbacks */
- ot->exec= bookmark_delete_exec;
- ot->poll= ED_operator_file_active;
+ ot->exec = bookmark_delete_exec;
+ ot->poll = ED_operator_file_active;
RNA_def_int(ot->srna, "index", -1, -1, 20000, "Index", "", -1, 20000);
}
@@ -518,7 +520,7 @@ int file_hilight_set(SpaceFile *sfile, ARegion *ar, int mx, int my)
FileSelectParams* params;
int numfiles, origfile;
- if(sfile==NULL || sfile->files==NULL) return 0;
+ if (sfile==NULL || sfile->files==NULL) return 0;
numfiles = filelist_numfiles(sfile->files);
params = ED_fileselect_get_params(sfile);
@@ -528,7 +530,7 @@ int file_hilight_set(SpaceFile *sfile, ARegion *ar, int mx, int my)
mx -= ar->winrct.xmin;
my -= ar->winrct.ymin;
- if(BLI_in_rcti(&ar->v2d.mask, mx, my)) {
+ if (BLI_in_rcti(&ar->v2d.mask, mx, my)) {
float fx, fy;
int active_file;
@@ -536,7 +538,7 @@ int file_hilight_set(SpaceFile *sfile, ARegion *ar, int mx, int my)
active_file = ED_fileselect_layout_offset(sfile->layout, (int)(v2d->tot.xmin + fx), (int)(v2d->tot.ymax - fy));
- if((active_file >= 0) && (active_file < numfiles))
+ if ((active_file >= 0) && (active_file < numfiles))
params->active_file=active_file;
else
params->active_file= -1;
@@ -552,7 +554,7 @@ static int file_highlight_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *e
ARegion *ar= CTX_wm_region(C);
SpaceFile *sfile= CTX_wm_space_file(C);
- if(!file_hilight_set(sfile, ar, event->x, event->y))
+ if (!file_hilight_set(sfile, ar, event->x, event->y))
return OPERATOR_CANCELLED;
ED_area_tag_redraw(CTX_wm_area(C));
@@ -563,13 +565,13 @@ static int file_highlight_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *e
void FILE_OT_highlight(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Highlight File";
- ot->description= "Highlight selected file(s)";
- ot->idname= "FILE_OT_highlight";
+ ot->name = "Highlight File";
+ ot->description = "Highlight selected file(s)";
+ ot->idname = "FILE_OT_highlight";
/* api callbacks */
- ot->invoke= file_highlight_invoke;
- ot->poll= ED_operator_file_active;
+ ot->invoke = file_highlight_invoke;
+ ot->poll = ED_operator_file_active;
}
int file_cancel_exec(bContext *C, wmOperator *UNUSED(unused))
@@ -597,32 +599,32 @@ static int file_operator_poll(bContext *C)
void FILE_OT_cancel(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Cancel File Load";
- ot->description= "Cancel loading of selected file";
- ot->idname= "FILE_OT_cancel";
+ ot->name = "Cancel File Load";
+ ot->description = "Cancel loading of selected file";
+ ot->idname = "FILE_OT_cancel";
/* api callbacks */
- ot->exec= file_cancel_exec;
- ot->poll= file_operator_poll;
+ ot->exec = file_cancel_exec;
+ ot->poll = file_operator_poll;
}
void file_sfile_to_operator(wmOperator *op, SpaceFile *sfile, char *filepath)
{
BLI_join_dirfile(filepath, FILE_MAX, sfile->params->dir, sfile->params->file); /* XXX, not real length */
- if(RNA_struct_find_property(op->ptr, "relative_path")) {
- if(RNA_boolean_get(op->ptr, "relative_path")) {
+ if (RNA_struct_find_property(op->ptr, "relative_path")) {
+ if (RNA_boolean_get(op->ptr, "relative_path")) {
BLI_path_rel(filepath, G.main->name);
}
}
- if(RNA_struct_find_property(op->ptr, "filename")) {
+ if (RNA_struct_find_property(op->ptr, "filename")) {
RNA_string_set(op->ptr, "filename", sfile->params->file);
}
- if(RNA_struct_find_property(op->ptr, "directory")) {
+ if (RNA_struct_find_property(op->ptr, "directory")) {
RNA_string_set(op->ptr, "directory", sfile->params->dir);
}
- if(RNA_struct_find_property(op->ptr, "filepath")) {
+ if (RNA_struct_find_property(op->ptr, "filepath")) {
RNA_string_set(op->ptr, "filepath", filepath);
}
@@ -635,7 +637,7 @@ void file_sfile_to_operator(wmOperator *op, SpaceFile *sfile, char *filepath)
PropertyRNA *prop_dirs= RNA_struct_find_property(op->ptr, "dirs");
int i, numfiles = filelist_numfiles(sfile->files);
- if(prop_files) {
+ if (prop_files) {
RNA_property_collection_clear(op->ptr, prop_files);
for (i=0; i<numfiles; i++) {
if (filelist_is_selected(sfile->files, i, CHECK_FILES)) {
@@ -646,7 +648,7 @@ void file_sfile_to_operator(wmOperator *op, SpaceFile *sfile, char *filepath)
}
}
- if(prop_dirs) {
+ if (prop_dirs) {
RNA_property_collection_clear(op->ptr, prop_dirs);
for (i=0; i<numfiles; i++) {
if (filelist_is_selected(sfile->files, i, CHECK_DIRS)) {
@@ -666,16 +668,16 @@ void file_operator_to_sfile(SpaceFile *sfile, wmOperator *op)
PropertyRNA *prop;
/* If neither of the above are set, split the filepath back */
- if((prop= RNA_struct_find_property(op->ptr, "filepath"))) {
+ if ((prop= RNA_struct_find_property(op->ptr, "filepath"))) {
char filepath[FILE_MAX];
RNA_property_string_get(op->ptr, prop, filepath);
BLI_split_dirfile(filepath, sfile->params->dir, sfile->params->file, sizeof(sfile->params->dir), sizeof(sfile->params->file));
}
else {
- if((prop= RNA_struct_find_property(op->ptr, "filename"))) {
+ if ((prop= RNA_struct_find_property(op->ptr, "filename"))) {
RNA_property_string_get(op->ptr, prop, sfile->params->file);
}
- if((prop= RNA_struct_find_property(op->ptr, "directory"))) {
+ if ((prop= RNA_struct_find_property(op->ptr, "directory"))) {
RNA_property_string_get(op->ptr, prop, sfile->params->dir);
}
}
@@ -691,13 +693,13 @@ void file_draw_check_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
{
SpaceFile *sfile= CTX_wm_space_file(C);
wmOperator *op= sfile->op;
- if(op) { /* fail on reload */
- if(op->type->check) {
+ if (op) { /* fail on reload */
+ if (op->type->check) {
char filepath[FILE_MAX];
file_sfile_to_operator(op, sfile, filepath);
/* redraw */
- if(op->type->check(C, op)) {
+ if (op->type->check(C, op)) {
file_operator_to_sfile(sfile, op);
/* redraw, else the changed settings wont get updated */
@@ -709,12 +711,12 @@ void file_draw_check_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
int file_draw_check_exists(SpaceFile *sfile)
{
- if(sfile->op) { /* fails on reload */
- if(RNA_struct_find_property(sfile->op->ptr, "check_existing")) {
- if(RNA_boolean_get(sfile->op->ptr, "check_existing")) {
+ if (sfile->op) { /* fails on reload */
+ if (RNA_struct_find_property(sfile->op->ptr, "check_existing")) {
+ if (RNA_boolean_get(sfile->op->ptr, "check_existing")) {
char filepath[FILE_MAX];
BLI_join_dirfile(filepath, sizeof(filepath), sfile->params->dir, sfile->params->file);
- if(BLI_is_file(filepath)) {
+ if (BLI_is_file(filepath)) {
return TRUE;
}
}
@@ -730,7 +732,7 @@ int file_exec(bContext *C, wmOperator *exec_op)
SpaceFile *sfile= CTX_wm_space_file(C);
char filepath[FILE_MAX];
- if(sfile->op) {
+ if (sfile->op) {
wmOperator *op= sfile->op;
/* when used as a macro, for doubleclick,
@@ -739,7 +741,7 @@ int file_exec(bContext *C, wmOperator *exec_op)
int i, active=0;
for (i=0; i<filelist_numfiles(sfile->files); i++) {
- if(filelist_is_selected(sfile->files, i, CHECK_ALL)) {
+ if (filelist_is_selected(sfile->files, i, CHECK_ALL)) {
active=1;
break;
}
@@ -766,16 +768,20 @@ int file_exec(bContext *C, wmOperator *exec_op)
void FILE_OT_execute(struct wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
- ot->name= "Execute File Window";
- ot->description= "Execute selected file";
- ot->idname= "FILE_OT_execute";
+ ot->name = "Execute File Window";
+ ot->description = "Execute selected file";
+ ot->idname = "FILE_OT_execute";
/* api callbacks */
- ot->exec= file_exec;
- ot->poll= file_operator_poll;
+ ot->exec = file_exec;
+ ot->poll = file_operator_poll;
- RNA_def_boolean(ot->srna, "need_active", 0, "Need Active", "Only execute if there's an active selected file in the file list");
+ prop = RNA_def_boolean(ot->srna, "need_active", 0, "Need Active",
+ "Only execute if there's an active selected file in the file list");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
@@ -783,7 +789,7 @@ int file_parent_exec(bContext *C, wmOperator *UNUSED(unused))
{
SpaceFile *sfile= CTX_wm_space_file(C);
- if(sfile->params) {
+ if (sfile->params) {
if (BLI_has_parent(sfile->params->dir)) {
BLI_parent_dir(sfile->params->dir);
BLI_cleanup_dir(G.main->name, sfile->params->dir);
@@ -800,13 +806,13 @@ int file_parent_exec(bContext *C, wmOperator *UNUSED(unused))
void FILE_OT_parent(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Parent File";
- ot->description= "Move to parent directory";
- ot->idname= "FILE_OT_parent";
+ ot->name = "Parent File";
+ ot->description = "Move to parent directory";
+ ot->idname = "FILE_OT_parent";
/* api callbacks */
- ot->exec= file_parent_exec;
- ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+ ot->exec = file_parent_exec;
+ ot->poll = ED_operator_file_active; /* <- important, handler is on window level */
}
@@ -825,20 +831,20 @@ static int file_refresh_exec(bContext *C, wmOperator *UNUSED(unused))
void FILE_OT_previous(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Previous Folder";
- ot->description= "Move to previous folder";
- ot->idname= "FILE_OT_previous";
+ ot->name = "Previous Folder";
+ ot->description = "Move to previous folder";
+ ot->idname = "FILE_OT_previous";
/* api callbacks */
- ot->exec= file_previous_exec;
- ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+ ot->exec = file_previous_exec;
+ ot->poll = ED_operator_file_active; /* <- important, handler is on window level */
}
int file_previous_exec(bContext *C, wmOperator *UNUSED(unused))
{
SpaceFile *sfile= CTX_wm_space_file(C);
- if(sfile->params) {
+ if (sfile->params) {
if (!sfile->folders_next)
sfile->folders_next = folderlist_new();
@@ -856,19 +862,19 @@ int file_previous_exec(bContext *C, wmOperator *UNUSED(unused))
void FILE_OT_next(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Next Folder";
- ot->description= "Move to next folder";
- ot->idname= "FILE_OT_next";
+ ot->name = "Next Folder";
+ ot->description = "Move to next folder";
+ ot->idname = "FILE_OT_next";
/* api callbacks */
- ot->exec= file_next_exec;
- ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+ ot->exec = file_next_exec;
+ ot->poll = ED_operator_file_active; /* <- important, handler is on window level */
}
int file_next_exec(bContext *C, wmOperator *UNUSED(unused))
{
SpaceFile *sfile= CTX_wm_space_file(C);
- if(sfile->params) {
+ if (sfile->params) {
if (!sfile->folders_next)
sfile->folders_next = folderlist_new();
@@ -898,7 +904,7 @@ static int file_smoothscroll_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
int i;
/* escape if not our timer */
- if(sfile->smoothscroll_timer==NULL || sfile->smoothscroll_timer!=event->customdata)
+ if (sfile->smoothscroll_timer==NULL || sfile->smoothscroll_timer!=event->customdata)
return OPERATOR_PASS_THROUGH;
numfiles = filelist_numfiles(sfile->files);
@@ -935,7 +941,8 @@ static int file_smoothscroll_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
if (sfile->layout->flag & FILE_LAYOUT_HOR) {
sfile->scroll_offset = (edit_idx/sfile->layout->rows)*sfile->layout->rows;
if (sfile->scroll_offset <= offset) sfile->scroll_offset -= sfile->layout->rows;
- } else {
+ }
+ else {
sfile->scroll_offset = (edit_idx/sfile->layout->columns)*sfile->layout->columns;
if (sfile->scroll_offset <= offset) sfile->scroll_offset -= sfile->layout->columns;
}
@@ -958,14 +965,17 @@ static int file_smoothscroll_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
if (sfile->scroll_offset < offset) {
if (sfile->layout->flag & FILE_LAYOUT_HOR) {
WM_operator_name_call(C, "VIEW2D_OT_scroll_left", 0, NULL);
- } else {
+ }
+ else {
WM_operator_name_call(C, "VIEW2D_OT_scroll_up", 0, NULL);
}
- } else {
+ }
+ else {
if (sfile->layout->flag & FILE_LAYOUT_HOR) {
WM_operator_name_call(C, "VIEW2D_OT_scroll_right", 0, NULL);
- } else {
+ }
+ else {
WM_operator_name_call(C, "VIEW2D_OT_scroll_down", 0, NULL);
}
}
@@ -983,14 +993,14 @@ void FILE_OT_smoothscroll(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Smooth Scroll";
- ot->idname= "FILE_OT_smoothscroll";
- ot->description="Smooth scroll to make editable file visible";
+ ot->name = "Smooth Scroll";
+ ot->idname = "FILE_OT_smoothscroll";
+ ot->description = "Smooth scroll to make editable file visible";
/* api callbacks */
- ot->invoke= file_smoothscroll_invoke;
+ ot->invoke = file_smoothscroll_invoke;
- ot->poll= ED_operator_file_active;
+ ot->poll = ED_operator_file_active;
}
@@ -1024,14 +1034,14 @@ int file_directory_new_exec(bContext *C, wmOperator *op)
SpaceFile *sfile= CTX_wm_space_file(C);
- if(!sfile->params) {
+ if (!sfile->params) {
BKE_report(op->reports,RPT_WARNING, "No parent directory given");
return OPERATOR_CANCELLED;
}
path[0] = '\0';
- if(RNA_struct_find_property(op->ptr, "directory")) {
+ if (RNA_struct_find_property(op->ptr, "directory")) {
RNA_string_get(op->ptr, "directory", path);
if (path[0] != '\0') generate_name= 0;
}
@@ -1070,14 +1080,14 @@ int file_directory_new_exec(bContext *C, wmOperator *op)
void FILE_OT_directory_new(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Create New Directory";
- ot->description= "Create a new directory";
- ot->idname= "FILE_OT_directory_new";
+ ot->name = "Create New Directory";
+ ot->description = "Create a new directory";
+ ot->idname = "FILE_OT_directory_new";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= file_directory_new_exec;
- ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+ ot->invoke = WM_operator_confirm;
+ ot->exec = file_directory_new_exec;
+ ot->poll = ED_operator_file_active; /* <- important, handler is on window level */
RNA_def_string_dir_path(ot->srna, "directory", "", FILE_MAX, "Directory", "Name of new directory");
@@ -1088,7 +1098,7 @@ static void file_expand_directory(bContext *C)
{
SpaceFile *sfile= CTX_wm_space_file(C);
- if(sfile->params) {
+ if (sfile->params) {
if ( sfile->params->dir[0] == '~' ) {
char tmpstr[sizeof(sfile->params->dir)-1];
BLI_strncpy(tmpstr, sfile->params->dir+1, sizeof(tmpstr));
@@ -1122,7 +1132,7 @@ static int file_directory_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev
{
SpaceFile *sfile= CTX_wm_space_file(C);
- if(sfile->params) {
+ if (sfile->params) {
file_expand_directory(C);
if (!BLI_exists(sfile->params->dir)) {
@@ -1141,7 +1151,7 @@ int file_directory_exec(bContext *C, wmOperator *UNUSED(unused))
{
SpaceFile *sfile= CTX_wm_space_file(C);
- if(sfile->params) {
+ if (sfile->params) {
file_expand_directory(C);
if (!BLI_exists(sfile->params->dir)) {
@@ -1149,7 +1159,7 @@ int file_directory_exec(bContext *C, wmOperator *UNUSED(unused))
}
/* special case, user may have pasted a filepath into the directory */
- if(BLI_is_file(sfile->params->dir)) {
+ if (BLI_is_file(sfile->params->dir)) {
char path[sizeof(sfile->params->dir)];
BLI_strncpy(path, sfile->params->dir, sizeof(path));
BLI_split_dirfile(path, sfile->params->dir, sfile->params->file, sizeof(sfile->params->dir), sizeof(sfile->params->file));
@@ -1192,33 +1202,33 @@ static int file_directory_poll(bContext *C)
void FILE_OT_directory(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Enter Directory Name";
- ot->description= "Enter a directory name";
- ot->idname= "FILE_OT_directory";
+ ot->name = "Enter Directory Name";
+ ot->description = "Enter a directory name";
+ ot->idname = "FILE_OT_directory";
/* api callbacks */
- ot->invoke= file_directory_invoke;
- ot->exec= file_directory_exec;
- ot->poll= file_directory_poll; /* <- important, handler is on window level */
+ ot->invoke = file_directory_invoke;
+ ot->exec = file_directory_exec;
+ ot->poll = file_directory_poll; /* <- important, handler is on window level */
}
void FILE_OT_refresh(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Refresh Filelist";
- ot->description= "Refresh the file list";
- ot->idname= "FILE_OT_refresh";
+ ot->name = "Refresh Filelist";
+ ot->description = "Refresh the file list";
+ ot->idname = "FILE_OT_refresh";
/* api callbacks */
- ot->exec= file_refresh_exec;
- ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+ ot->exec = file_refresh_exec;
+ ot->poll = ED_operator_file_active; /* <- important, handler is on window level */
}
static int file_hidedot_exec(bContext *C, wmOperator *UNUSED(unused))
{
SpaceFile *sfile= CTX_wm_space_file(C);
- if(sfile->params) {
+ if (sfile->params) {
sfile->params->flag ^= FILE_HIDE_DOT;
ED_fileselect_clear(C, sfile);
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
@@ -1231,30 +1241,30 @@ static int file_hidedot_exec(bContext *C, wmOperator *UNUSED(unused))
void FILE_OT_hidedot(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Hide Dot Files";
- ot->description= "Toggle hide hidden dot files";
- ot->idname= "FILE_OT_hidedot";
+ ot->name = "Toggle Hide Dot Files";
+ ot->description = "Toggle hide hidden dot files";
+ ot->idname = "FILE_OT_hidedot";
/* api callbacks */
- ot->exec= file_hidedot_exec;
- ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+ ot->exec = file_hidedot_exec;
+ ot->poll = ED_operator_file_active; /* <- important, handler is on window level */
}
struct ARegion *file_buttons_region(struct ScrArea *sa)
{
ARegion *ar, *arnew;
- for(ar= sa->regionbase.first; ar; ar= ar->next)
- if(ar->regiontype==RGN_TYPE_CHANNELS)
+ for (ar= sa->regionbase.first; ar; ar= ar->next)
+ if (ar->regiontype==RGN_TYPE_CHANNELS)
return ar;
/* add subdiv level; after header */
- for(ar= sa->regionbase.first; ar; ar= ar->next)
- if(ar->regiontype==RGN_TYPE_HEADER)
+ for (ar= sa->regionbase.first; ar; ar= ar->next)
+ if (ar->regiontype==RGN_TYPE_HEADER)
break;
/* is error! */
- if(ar==NULL) return NULL;
+ if (ar==NULL) return NULL;
arnew= MEM_callocN(sizeof(ARegion), "buttons for file panels");
@@ -1272,7 +1282,7 @@ static int file_bookmark_toggle_exec(bContext *C, wmOperator *UNUSED(unused))
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= file_buttons_region(sa);
- if(ar)
+ if (ar)
ED_region_toggle_hidden(C, ar);
return OPERATOR_FINISHED;
@@ -1281,13 +1291,13 @@ static int file_bookmark_toggle_exec(bContext *C, wmOperator *UNUSED(unused))
void FILE_OT_bookmark_toggle(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Bookmarks";
- ot->description= "Toggle bookmarks display";
- ot->idname= "FILE_OT_bookmark_toggle";
+ ot->name = "Toggle Bookmarks";
+ ot->description = "Toggle bookmarks display";
+ ot->idname = "FILE_OT_bookmark_toggle";
/* api callbacks */
- ot->exec= file_bookmark_toggle_exec;
- ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+ ot->exec = file_bookmark_toggle_exec;
+ ot->poll = ED_operator_file_active; /* <- important, handler is on window level */
}
@@ -1297,7 +1307,7 @@ static int file_filenum_exec(bContext *C, wmOperator *op)
ScrArea *sa= CTX_wm_area(C);
int inc = RNA_int_get(op->ptr, "increment");
- if(sfile->params && (inc != 0)) {
+ if (sfile->params && (inc != 0)) {
BLI_newname(sfile->params->file, inc);
ED_area_tag_redraw(sa);
file_draw_check_cb(C, NULL, NULL);
@@ -1311,13 +1321,13 @@ static int file_filenum_exec(bContext *C, wmOperator *op)
void FILE_OT_filenum(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Increment Number in Filename";
- ot->description= "Increment number in filename";
- ot->idname= "FILE_OT_filenum";
+ ot->name = "Increment Number in Filename";
+ ot->description = "Increment number in filename";
+ ot->idname = "FILE_OT_filenum";
/* api callbacks */
- ot->exec= file_filenum_exec;
- ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+ ot->exec = file_filenum_exec;
+ ot->poll = ED_operator_file_active; /* <- important, handler is on window level */
/* props */
RNA_def_int(ot->srna, "increment", 1, -100, 100, "Increment", "", -100,100);
@@ -1328,7 +1338,7 @@ static int file_rename_exec(bContext *C, wmOperator *UNUSED(op))
ScrArea *sa= CTX_wm_area(C);
SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
- if(sfile->params) {
+ if (sfile->params) {
int idx = sfile->params->active_file;
int numfiles = filelist_numfiles(sfile->files);
if ( (0<=idx) && (idx<numfiles) ) {
@@ -1352,7 +1362,8 @@ static int file_rename_poll(bContext *C)
if (sfile && sfile->params) {
if (sfile->params->active_file < 0) {
poll= 0;
- } else {
+ }
+ else {
char dir[FILE_MAX], group[FILE_MAX];
if (filelist_islibrary(sfile->files, dir, group)) poll= 0;
}
@@ -1365,13 +1376,13 @@ static int file_rename_poll(bContext *C)
void FILE_OT_rename(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Rename File or Directory";
- ot->description= "Rename file or file directory";
- ot->idname= "FILE_OT_rename";
+ ot->name = "Rename File or Directory";
+ ot->description = "Rename file or file directory";
+ ot->idname = "FILE_OT_rename";
/* api callbacks */
- ot->exec= file_rename_exec;
- ot->poll= file_rename_poll;
+ ot->exec = file_rename_exec;
+ ot->poll = file_rename_poll;
}
@@ -1384,7 +1395,8 @@ static int file_delete_poll(bContext *C)
if (sfile && sfile->params) {
if (sfile->params->active_file < 0) {
poll= 0;
- } else {
+ }
+ else {
char dir[FILE_MAX], group[FILE_MAX];
if (filelist_islibrary(sfile->files, dir, group)) poll= 0;
file = filelist_file(sfile->files, sfile->params->active_file);
@@ -1417,14 +1429,14 @@ int file_delete_exec(bContext *C, wmOperator *UNUSED(op))
void FILE_OT_delete(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete File";
- ot->description= "Delete selected file";
- ot->idname= "FILE_OT_delete";
+ ot->name = "Delete File";
+ ot->description = "Delete selected file";
+ ot->idname = "FILE_OT_delete";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= file_delete_exec;
- ot->poll= file_delete_poll; /* <- important, handler is on window level */
+ ot->invoke = WM_operator_confirm;
+ ot->exec = file_delete_exec;
+ ot->poll = file_delete_poll; /* <- important, handler is on window level */
}
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index a7cb800e5a7..596721bff07 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -80,7 +80,7 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat
*nr= -1;
/* hide if no entries */
- if(nentries == 0)
+ if (nentries == 0)
return;
/* layout */
@@ -100,8 +100,8 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat
entry = fsmenu_get_entry(fsmenu, category, i);
/* set this list item as active if we have a match */
- if(sfile->params) {
- if(BLI_path_cmp(sfile->params->dir, entry) == 0) {
+ if (sfile->params) {
+ if (BLI_path_cmp(sfile->params->dir, entry) == 0) {
*nr= i;
}
}
@@ -112,16 +112,16 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat
BLI_getlastdir(temp, dir, FILE_MAX);
BLI_del_slash(dir);
- if(dir[0] == 0)
+ if (dir[0] == 0)
BLI_strncpy(dir, entry, FILE_MAX);
/* create list item */
- but= uiDefIconTextButS(block, LISTROW, 0, icon, dir, 0,0,UI_UNIT_X*10,UI_UNIT_Y, nr, 0, i, 0, 0, entry);
+ but = uiDefIconTextButS(block, LISTROW, 0, icon, dir, 0,0,UI_UNIT_X*10,UI_UNIT_Y, nr, 0, i, 0, 0, entry);
uiButSetFunc(but, file_panel_cb, entry, NULL);
uiButSetFlag(but, UI_ICON_LEFT|UI_TEXT_LEFT);
/* create delete button */
- if(allow_delete && fsmenu_can_save(fsmenu, category, i)) {
+ if (allow_delete && fsmenu_can_save(fsmenu, category, i)) {
uiBlockSetEmboss(block, UI_EMBOSSN);
uiItemIntO(layout, "", ICON_X, "FILE_OT_delete_bookmark", "index", i);
uiBlockSetEmboss(block, UI_EMBOSS);
@@ -133,7 +133,7 @@ static void file_panel_system(const bContext *C, Panel *pa)
{
SpaceFile *sfile= CTX_wm_space_file(C);
- if(sfile)
+ if (sfile)
file_panel_category(C, pa, FS_CATEGORY_SYSTEM, &sfile->systemnr, ICON_DISK_DRIVE, 0, 0);
}
@@ -142,7 +142,7 @@ static void file_panel_bookmarks(const bContext *C, Panel *pa)
SpaceFile *sfile= CTX_wm_space_file(C);
uiLayout *row;
- if(sfile) {
+ if (sfile) {
row= uiLayoutRow(pa->layout, 0);
uiItemO(row, IFACE_("Add"), ICON_ZOOMIN, "file.bookmark_add");
uiItemL(row, NULL, ICON_NONE);
@@ -155,7 +155,7 @@ static void file_panel_recent(const bContext *C, Panel *pa)
{
SpaceFile *sfile= CTX_wm_space_file(C);
- if(sfile) {
+ if (sfile) {
if ( !(U.uiflag & USER_HIDE_RECENT) ) {
file_panel_category(C, pa, FS_CATEGORY_RECENT, &sfile->recentnr, ICON_FILE_FOLDER, 0, 1);
}
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 8632abd3410..694664f1f62 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -158,24 +158,26 @@ static int compare_name(const void *a1, const void *a2)
/* type is equal to stat.st_mode */
- if (S_ISDIR(entry1->type)){
+ if (S_ISDIR(entry1->type)) {
if (S_ISDIR(entry2->type)==0) return (-1);
- } else{
+ }
+ else {
if (S_ISDIR(entry2->type)) return (1);
}
- if (S_ISREG(entry1->type)){
+ if (S_ISREG(entry1->type)) {
if (S_ISREG(entry2->type)==0) return (-1);
- } else{
+ }
+ else {
if (S_ISREG(entry2->type)) return (1);
}
if ((entry1->type & S_IFMT) < (entry2->type & S_IFMT)) return (-1);
if ((entry1->type & S_IFMT) > (entry2->type & S_IFMT)) return (1);
/* make sure "." and ".." are always first */
- if( strcmp(entry1->relname, ".")==0 ) return (-1);
- if( strcmp(entry2->relname, ".")==0 ) return (1);
- if( strcmp(entry1->relname, "..")==0 ) return (-1);
- if( strcmp(entry2->relname, "..")==0 ) return (1);
+ if ( strcmp(entry1->relname, ".")==0 ) return (-1);
+ if ( strcmp(entry2->relname, ".")==0 ) return (1);
+ if ( strcmp(entry1->relname, "..")==0 ) return (-1);
+ if ( strcmp(entry2->relname, "..")==0 ) return (1);
return (BLI_natstrcmp(entry1->relname,entry2->relname));
}
@@ -186,24 +188,26 @@ static int compare_date(const void *a1, const void *a2)
/* type is equal to stat.st_mode */
- if (S_ISDIR(entry1->type)){
+ if (S_ISDIR(entry1->type)) {
if (S_ISDIR(entry2->type)==0) return (-1);
- } else{
+ }
+ else {
if (S_ISDIR(entry2->type)) return (1);
}
- if (S_ISREG(entry1->type)){
+ if (S_ISREG(entry1->type)) {
if (S_ISREG(entry2->type)==0) return (-1);
- } else{
+ }
+ else {
if (S_ISREG(entry2->type)) return (1);
}
if ((entry1->type & S_IFMT) < (entry2->type & S_IFMT)) return (-1);
if ((entry1->type & S_IFMT) > (entry2->type & S_IFMT)) return (1);
/* make sure "." and ".." are always first */
- if( strcmp(entry1->relname, ".")==0 ) return (-1);
- if( strcmp(entry2->relname, ".")==0 ) return (1);
- if( strcmp(entry1->relname, "..")==0 ) return (-1);
- if( strcmp(entry2->relname, "..")==0 ) return (1);
+ if ( strcmp(entry1->relname, ".")==0 ) return (-1);
+ if ( strcmp(entry2->relname, ".")==0 ) return (1);
+ if ( strcmp(entry1->relname, "..")==0 ) return (-1);
+ if ( strcmp(entry2->relname, "..")==0 ) return (1);
if ( entry1->s.st_mtime < entry2->s.st_mtime) return 1;
if ( entry1->s.st_mtime > entry2->s.st_mtime) return -1;
@@ -217,24 +221,26 @@ static int compare_size(const void *a1, const void *a2)
/* type is equal to stat.st_mode */
- if (S_ISDIR(entry1->type)){
+ if (S_ISDIR(entry1->type)) {
if (S_ISDIR(entry2->type)==0) return (-1);
- } else{
+ }
+ else {
if (S_ISDIR(entry2->type)) return (1);
}
- if (S_ISREG(entry1->type)){
+ if (S_ISREG(entry1->type)) {
if (S_ISREG(entry2->type)==0) return (-1);
- } else{
+ }
+ else {
if (S_ISREG(entry2->type)) return (1);
}
if ((entry1->type & S_IFMT) < (entry2->type & S_IFMT)) return (-1);
if ((entry1->type & S_IFMT) > (entry2->type & S_IFMT)) return (1);
/* make sure "." and ".." are always first */
- if( strcmp(entry1->relname, ".")==0 ) return (-1);
- if( strcmp(entry2->relname, ".")==0 ) return (1);
- if( strcmp(entry1->relname, "..")==0 ) return (-1);
- if( strcmp(entry2->relname, "..")==0 ) return (1);
+ if ( strcmp(entry1->relname, ".")==0 ) return (-1);
+ if ( strcmp(entry2->relname, ".")==0 ) return (1);
+ if ( strcmp(entry1->relname, "..")==0 ) return (-1);
+ if ( strcmp(entry2->relname, "..")==0 ) return (1);
if ( entry1->s.st_size < entry2->s.st_size) return 1;
if ( entry1->s.st_size > entry2->s.st_size) return -1;
@@ -256,24 +262,26 @@ static int compare_extension(const void *a1, const void *a2)
/* type is equal to stat.st_mode */
- if (S_ISDIR(entry1->type)){
+ if (S_ISDIR(entry1->type)) {
if (S_ISDIR(entry2->type)==0) return (-1);
- } else{
+ }
+ else {
if (S_ISDIR(entry2->type)) return (1);
}
- if (S_ISREG(entry1->type)){
+ if (S_ISREG(entry1->type)) {
if (S_ISREG(entry2->type)==0) return (-1);
- } else{
+ }
+ else {
if (S_ISREG(entry2->type)) return (1);
}
if ((entry1->type & S_IFMT) < (entry2->type & S_IFMT)) return (-1);
if ((entry1->type & S_IFMT) > (entry2->type & S_IFMT)) return (1);
/* make sure "." and ".." are always first */
- if( strcmp(entry1->relname, ".")==0 ) return (-1);
- if( strcmp(entry2->relname, ".")==0 ) return (1);
- if( strcmp(entry1->relname, "..")==0 ) return (-1);
- if( strcmp(entry2->relname, "..")==0 ) return (1);
+ if ( strcmp(entry1->relname, ".")==0 ) return (-1);
+ if ( strcmp(entry2->relname, ".")==0 ) return (1);
+ if ( strcmp(entry1->relname, "..")==0 ) return (-1);
+ if ( strcmp(entry2->relname, "..")==0 ) return (1);
return (BLI_strcasecmp(sufix1, sufix2));
}
@@ -283,17 +291,20 @@ static int is_hidden_file(const char* filename, short hide_dot)
int is_hidden=0;
if (hide_dot) {
- if(filename[0]=='.' && filename[1]!='.' && filename[1]!=0) {
+ if (filename[0]=='.' && filename[1]!='.' && filename[1]!=0) {
is_hidden=1; /* ignore .file */
- } else if (((filename[0] == '.') && (filename[1] == 0) )) {
+ }
+ else if (((filename[0] == '.') && (filename[1] == 0) )) {
is_hidden=1; /* ignore . */
- } else {
+ }
+ else {
int len=strlen(filename);
- if( (len>0) && (filename[len-1]=='~') ) {
+ if ( (len>0) && (filename[len-1]=='~') ) {
is_hidden=1; /* ignore file~ */
}
}
- } else {
+ }
+ else {
if (((filename[0] == '.') && (filename[1] == 0) )) {
is_hidden=1; /* ignore . */
}
@@ -307,12 +318,14 @@ static int is_filtered_file(struct direntry* file, const char* UNUSED(dir), unsi
if (filter) {
if (file->flags & filter) {
is_filtered=1;
- } else if (file->type & S_IFDIR) {
+ }
+ else if (file->type & S_IFDIR) {
if (filter & FOLDERFILE) {
is_filtered = 1;
}
}
- } else {
+ }
+ else {
is_filtered = 1;
}
return is_filtered && !is_hidden_file(file->relname, hide_dot);
@@ -324,7 +337,8 @@ static int is_filtered_lib(struct direntry* file, const char* dir, unsigned int
char tdir[FILE_MAX], tgroup[GROUP_MAX];
if (BLO_is_a_library(dir, tdir, tgroup)) {
is_filtered = !is_hidden_file(file->relname, hide_dot);
- } else {
+ }
+ else {
is_filtered = is_filtered_file(file, dir, filter, hide_dot);
}
return is_filtered;
@@ -415,13 +429,13 @@ void folderlist_popdir(struct ListBase* folderlist, char *dir)
struct FolderList *folder;
folder = folderlist->last;
- if(folder){
+ if (folder) {
// remove the current directory
MEM_freeN(folder->foldername);
BLI_freelinkN(folderlist, folder);
folder = folderlist->last;
- if(folder){
+ if (folder) {
prev_dir = folder->foldername;
BLI_strncpy(dir, prev_dir, FILE_MAXDIR);
}
@@ -435,8 +449,8 @@ void folderlist_pushdir(ListBase* folderlist, const char *dir)
previous_folder = folderlist->last;
// check if already exists
- if(previous_folder && previous_folder->foldername){
- if(BLI_path_cmp(previous_folder->foldername, dir)==0){
+ if (previous_folder && previous_folder->foldername) {
+ if (BLI_path_cmp(previous_folder->foldername, dir)==0) {
return;
}
}
@@ -472,9 +486,9 @@ int folderlist_clear_next(struct SpaceFile *sfile)
/* not listbase itself */
void folderlist_free(ListBase* folderlist)
{
- if (folderlist){
+ if (folderlist) {
FolderList *folder;
- for(folder= folderlist->first; folder; folder= folder->next)
+ for (folder= folderlist->first; folder; folder= folder->next)
MEM_freeN(folder->foldername);
BLI_freelistN(folderlist);
}
@@ -489,7 +503,7 @@ ListBase *folderlist_duplicate(ListBase* folderlist)
BLI_duplicatelist(folderlistn, folderlist);
- for(folder= folderlistn->first; folder; folder= folder->next) {
+ for (folder= folderlistn->first; folder; folder= folder->next) {
folder->foldername= MEM_dupallocN(folder->foldername);
}
return folderlistn;
@@ -564,7 +578,7 @@ void filelist_free(struct FileList* filelist)
void filelist_freelib(struct FileList* filelist)
{
- if(filelist->libfiledata)
+ if (filelist->libfiledata)
BLO_blendhandle_close(filelist->libfiledata);
filelist->libfiledata= NULL;
}
@@ -626,28 +640,37 @@ struct ImBuf * filelist_geticon(struct FileList* filelist, int index)
if (file->type & S_IFDIR) {
if ( strcmp(filelist->filelist[fidx].relname, "..") == 0) {
ibuf = gSpecialFileImages[SPECIAL_IMG_PARENT];
- } else if ( strcmp(filelist->filelist[fidx].relname, ".") == 0) {
+ }
+ else if ( strcmp(filelist->filelist[fidx].relname, ".") == 0) {
ibuf = gSpecialFileImages[SPECIAL_IMG_REFRESH];
- } else {
+ }
+ else {
ibuf = gSpecialFileImages[SPECIAL_IMG_FOLDER];
}
- } else {
+ }
+ else {
ibuf = gSpecialFileImages[SPECIAL_IMG_UNKNOWNFILE];
}
if (file->flags & BLENDERFILE) {
ibuf = gSpecialFileImages[SPECIAL_IMG_BLENDFILE];
- } else if ( (file->flags & MOVIEFILE) || (file->flags & MOVIEFILE_ICON) ) {
+ }
+ else if ( (file->flags & MOVIEFILE) || (file->flags & MOVIEFILE_ICON) ) {
ibuf = gSpecialFileImages[SPECIAL_IMG_MOVIEFILE];
- } else if (file->flags & SOUNDFILE) {
+ }
+ else if (file->flags & SOUNDFILE) {
ibuf = gSpecialFileImages[SPECIAL_IMG_SOUNDFILE];
- } else if (file->flags & PYSCRIPTFILE) {
+ }
+ else if (file->flags & PYSCRIPTFILE) {
ibuf = gSpecialFileImages[SPECIAL_IMG_PYTHONFILE];
- } else if (file->flags & FTFONTFILE) {
+ }
+ else if (file->flags & FTFONTFILE) {
ibuf = gSpecialFileImages[SPECIAL_IMG_FONTFILE];
- } else if (file->flags & TEXTFILE) {
+ }
+ else if (file->flags & TEXTFILE) {
ibuf = gSpecialFileImages[SPECIAL_IMG_TEXTFILE];
- } else if (file->flags & IMAGEFILE) {
+ }
+ else if (file->flags & IMAGEFILE) {
ibuf = gSpecialFileImages[SPECIAL_IMG_LOADING];
}
@@ -677,7 +700,7 @@ int filelist_find(struct FileList* filelist, const char *filename)
for (i = 0; i < filelist->numfiles; ++i) {
- if ( strcmp(filelist->filelist[i].relname, filename) == 0) { /* not dealing with user input so dont need BLI_path_cmp */
+ if ( strcmp(filelist->filelist[i].relname, filename) == 0) { /* not dealing with user input so don't need BLI_path_cmp */
index = i;
break;
}
@@ -715,17 +738,17 @@ static int file_is_blend_backup(const char *str)
a= strlen(str);
b= 7;
- if(a==0 || b>=a);
+ if (a==0 || b>=a);
else {
char *loc;
- if(a > b+1)
+ if (a > b+1)
b++;
/* allow .blend1 .blend2 .blend32 */
loc= BLI_strcasestr(str+a-b, ".blend");
- if(loc)
+ if (loc)
retval= 1;
}
@@ -735,32 +758,41 @@ static int file_is_blend_backup(const char *str)
static int file_extension_type(const char *relname)
{
- if(BLO_has_bfile_extension(relname)) {
+ if (BLO_has_bfile_extension(relname)) {
return BLENDERFILE;
- } else if(file_is_blend_backup(relname)) {
+ }
+ else if (file_is_blend_backup(relname)) {
return BLENDERFILE_BACKUP;
- } else if(BLI_testextensie(relname, ".py")) {
+ }
+ else if (BLI_testextensie(relname, ".py")) {
return PYSCRIPTFILE;
- } else if(BLI_testextensie(relname, ".txt")
+ }
+ else if (BLI_testextensie(relname, ".txt")
|| BLI_testextensie(relname, ".glsl")
|| BLI_testextensie(relname, ".data")) {
return TEXTFILE;
- } else if( BLI_testextensie(relname, ".ttf")
+ }
+ else if ( BLI_testextensie(relname, ".ttf")
|| BLI_testextensie(relname, ".ttc")
|| BLI_testextensie(relname, ".pfb")
|| BLI_testextensie(relname, ".otf")
|| BLI_testextensie(relname, ".otc")) {
return FTFONTFILE;
- } else if(BLI_testextensie(relname, ".btx")) {
+ }
+ else if (BLI_testextensie(relname, ".btx")) {
return BTXFILE;
- } else if(BLI_testextensie(relname, ".dae")) {
+ }
+ else if (BLI_testextensie(relname, ".dae")) {
return COLLADAFILE;
- } else if(BLI_testextensie_array(relname, imb_ext_image)
+ }
+ else if (BLI_testextensie_array(relname, imb_ext_image)
|| (G.have_quicktime && BLI_testextensie_array(relname, imb_ext_image_qt))) {
return IMAGEFILE;
- } else if(BLI_testextensie_array(relname, imb_ext_movie)) {
+ }
+ else if (BLI_testextensie_array(relname, imb_ext_movie)) {
return MOVIEFILE;
- } else if(BLI_testextensie_array(relname, imb_ext_audio)) {
+ }
+ else if (BLI_testextensie_array(relname, imb_ext_audio)) {
return SOUNDFILE;
}
return 0;
@@ -797,7 +829,7 @@ static void filelist_setfiletypes(struct FileList* filelist)
file= filelist->filelist;
- for(num=0; num<filelist->numfiles; num++, file++) {
+ for (num=0; num<filelist->numfiles; num++, file++) {
file->type= file->s.st_mode; /* restore the mess below */
/* Don't check extensions for directories */
@@ -806,7 +838,7 @@ static void filelist_setfiletypes(struct FileList* filelist)
}
file->flags = file_extension_type(file->relname);
- if(filelist->filter_glob
+ if (filelist->filter_glob
&& BLI_testextensie_glob(file->relname, filelist->filter_glob)) {
file->flags= OPERATORFILE;
}
@@ -827,7 +859,7 @@ static void filelist_read_dir(struct FileList* filelist)
BLI_cleanup_dir(G.main->name, filelist->dir);
filelist->numfiles = BLI_dir_contents(filelist->dir, &(filelist->filelist));
- if(!chdir(wdir)) {} /* fix warning about not checking return value */
+ if (!chdir(wdir)) {} /* fix warning about not checking return value */
filelist_setfiletypes(filelist);
filelist_filter(filelist);
}
@@ -843,15 +875,15 @@ static void filelist_read_library(struct FileList* filelist)
if (!filelist) return;
BLI_cleanup_dir(G.main->name, filelist->dir);
filelist_from_library(filelist);
- if(!filelist->libfiledata) {
+ if (!filelist->libfiledata) {
int num;
struct direntry *file;
BLI_make_exist(filelist->dir);
filelist_read_dir(filelist);
file = filelist->filelist;
- for(num=0; num<filelist->numfiles; num++, file++) {
- if(BLO_has_bfile_extension(file->relname)) {
+ for (num=0; num<filelist->numfiles; num++, file++) {
+ if (BLO_has_bfile_extension(file->relname)) {
char name[FILE_MAX];
BLI_join_dirfile(name, sizeof(name), filelist->dir, file->relname);
@@ -994,7 +1026,7 @@ void filelist_from_library(struct FileList* filelist)
ok= filelist_islibrary(filelist, dir, group);
if (!ok) {
/* free */
- if(filelist->libfiledata) BLO_blendhandle_close(filelist->libfiledata);
+ if (filelist->libfiledata) BLO_blendhandle_close(filelist->libfiledata);
filelist->libfiledata= NULL;
return;
}
@@ -1005,7 +1037,7 @@ void filelist_from_library(struct FileList* filelist)
/* for the time being only read filedata when libfiledata==0 */
if (filelist->libfiledata == NULL) {
filelist->libfiledata= BLO_blendhandle_from_file(dir, NULL);
- if(filelist->libfiledata == NULL) return;
+ if (filelist->libfiledata == NULL) return;
}
idcode= groupname_to_code(group);
@@ -1019,7 +1051,8 @@ void filelist_from_library(struct FileList* filelist)
BLO_blendhandle_close(filelist->libfiledata);
filelist->libfiledata= BLO_blendhandle_from_file(dir, NULL);
- } else {
+ }
+ else {
previews= NULL;
nprevs= 0;
names= BLO_blendhandle_get_linkable_groups(filelist->libfiledata);
@@ -1039,15 +1072,16 @@ void filelist_from_library(struct FileList* filelist)
filelist->filelist[i + 1].relname= BLI_strdup(blockname);
if (idcode) {
filelist->filelist[i + 1].type |= S_IFREG;
- } else {
+ }
+ else {
filelist->filelist[i + 1].type |= S_IFDIR;
}
}
- if(previews && (nnames != nprevs)) {
+ if (previews && (nnames != nprevs)) {
printf("filelist_from_library: error, found %d items, %d previews\n", nnames, nprevs);
}
- else if(previews) {
+ else if (previews) {
for (i=0, l= previews; i<nnames; i++, l= l->next) {
PreviewImage *img= l->link;
@@ -1092,20 +1126,20 @@ void filelist_from_main(struct FileList *filelist)
// filelist->type = FILE_MAIN; // XXXXX TODO: add modes to filebrowser
- if(filelist->dir[0]=='/') filelist->dir[0]= 0;
+ if (filelist->dir[0]=='/') filelist->dir[0]= 0;
- if(filelist->dir[0]) {
+ if (filelist->dir[0]) {
idcode= groupname_to_code(filelist->dir);
- if(idcode==0) filelist->dir[0]= 0;
+ if (idcode==0) filelist->dir[0]= 0;
}
- if( filelist->dir[0]==0) {
+ if ( filelist->dir[0]==0) {
/* make directories */
filelist->numfiles= 25;
filelist->filelist= (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry));
- for(a=0; a<filelist->numfiles; a++) {
+ for (a=0; a<filelist->numfiles; a++) {
memset( &(filelist->filelist[a]), 0 , sizeof(struct direntry));
filelist->filelist[a].type |= S_IFDIR;
}
@@ -1142,11 +1176,11 @@ void filelist_from_main(struct FileList *filelist)
idcode= groupname_to_code(filelist->dir);
lb= which_libbase(G.main, idcode );
- if(lb == NULL) return;
+ if (lb == NULL) return;
id= lb->first;
filelist->numfiles= 0;
- while(id) {
+ while (id) {
if (!filelist->hide_dot || id->name[2] != '.') {
filelist->numfiles++;
}
@@ -1171,12 +1205,12 @@ void filelist_from_main(struct FileList *filelist)
id= lb->first;
totlib= totbl= 0;
- while(id) {
+ while (id) {
ok = 1;
- if(ok) {
+ if (ok) {
if (!filelist->hide_dot || id->name[2] != '.') {
memset( files, 0 , sizeof(struct direntry));
- if(id->lib==NULL)
+ if (id->lib==NULL)
files->relname= BLI_strdup(id->name+2);
else {
files->relname= MEM_mallocN(FILE_MAX+32, "filename for lib");
@@ -1184,28 +1218,28 @@ void filelist_from_main(struct FileList *filelist)
}
files->type |= S_IFREG;
#if 0 // XXXXX TODO show the selection status of the objects
- if(!filelist->has_func) { /* F4 DATA BROWSE */
- if(idcode==ID_OB) {
- if( ((Object *)id)->flag & SELECT) files->selflag |= SELECTED_FILE;
+ if (!filelist->has_func) { /* F4 DATA BROWSE */
+ if (idcode==ID_OB) {
+ if ( ((Object *)id)->flag & SELECT) files->selflag |= SELECTED_FILE;
}
- else if(idcode==ID_SCE) {
- if( ((Scene *)id)->r.scemode & R_BG_RENDER) files->selflag |= SELECTED_FILE;
+ else if (idcode==ID_SCE) {
+ if ( ((Scene *)id)->r.scemode & R_BG_RENDER) files->selflag |= SELECTED_FILE;
}
}
#endif
files->nr= totbl+1;
files->poin= id;
fake= id->flag & LIB_FAKEUSER;
- if(idcode == ID_MA || idcode == ID_TE || idcode == ID_LA || idcode == ID_WO || idcode == ID_IM) {
+ if (idcode == ID_MA || idcode == ID_TE || idcode == ID_LA || idcode == ID_WO || idcode == ID_IM) {
files->flags |= IMAGEFILE;
}
- if(id->lib && fake) BLI_snprintf(files->extra, sizeof(files->extra), "LF %d", id->us);
- else if(id->lib) BLI_snprintf(files->extra, sizeof(files->extra), "L %d", id->us);
- else if(fake) BLI_snprintf(files->extra, sizeof(files->extra), "F %d", id->us);
+ if (id->lib && fake) BLI_snprintf(files->extra, sizeof(files->extra), "LF %d", id->us);
+ else if (id->lib) BLI_snprintf(files->extra, sizeof(files->extra), "L %d", id->us);
+ else if (fake) BLI_snprintf(files->extra, sizeof(files->extra), "F %d", id->us);
else BLI_snprintf(files->extra, sizeof(files->extra), " %d", id->us);
- if(id->lib) {
- if(totlib==0) firstlib= files;
+ if (id->lib) {
+ if (totlib==0) firstlib= files;
totlib++;
}
@@ -1218,7 +1252,7 @@ void filelist_from_main(struct FileList *filelist)
}
/* only qsort of library blocks */
- if(totlib>1) {
+ if (totlib>1) {
qsort(firstlib, totlib, sizeof(struct direntry), compare_name);
}
}
@@ -1231,7 +1265,7 @@ static void thumbnail_joblist_free(ThumbnailJob *tj)
FileImage* limg = tj->loadimages.first;
/* free the images not yet copied to the filelist -> these will get freed with the filelist */
- for( ; limg; limg= limg->next) {
+ for ( ; limg; limg= limg->next) {
if ((limg->img) && (!limg->done)) {
IMB_freeImBuf(limg->img);
}
@@ -1250,9 +1284,11 @@ static void thumbnails_startjob(void *tjv, short *stop, short *do_update, float
while ( (*stop==0) && (limg) ) {
if ( limg->flags & IMAGEFILE ) {
limg->img = IMB_thumb_manage(limg->path, THB_NORMAL, THB_SOURCE_IMAGE);
- } else if ( limg->flags & BLENDERFILE ) {
+ }
+ else if ( limg->flags & BLENDERFILE ) {
limg->img = IMB_thumb_manage(limg->path, THB_NORMAL, THB_SOURCE_BLEND);
- } else if ( limg->flags & MOVIEFILE ) {
+ }
+ else if ( limg->flags & MOVIEFILE ) {
limg->img = IMB_thumb_manage(limg->path, THB_NORMAL, THB_SOURCE_MOVIE);
if (!limg->img) {
/* remember that file can't be loaded via IMB_open_anim */
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index fa2874f4842..3ed3c0690a2 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -125,7 +125,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
BLI_strncpy(params->title, op->type->name, sizeof(params->title));
- if(RNA_struct_find_property(op->ptr, "filemode"))
+ if (RNA_struct_find_property(op->ptr, "filemode"))
params->type = RNA_int_get(op->ptr, "filemode");
else
params->type = FILE_SPECIAL;
@@ -152,12 +152,12 @@ short ED_fileselect_set_params(SpaceFile *sfile)
}
}
- if(params->dir[0]) {
+ if (params->dir[0]) {
BLI_cleanup_dir(G.main->name, params->dir);
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 {
@@ -165,27 +165,27 @@ short ED_fileselect_set_params(SpaceFile *sfile)
}
params->filter = 0;
- if(RNA_struct_find_property(op->ptr, "filter_blender"))
+ if (RNA_struct_find_property(op->ptr, "filter_blender"))
params->filter |= RNA_boolean_get(op->ptr, "filter_blender") ? BLENDERFILE : 0;
- if(RNA_struct_find_property(op->ptr, "filter_image"))
+ if (RNA_struct_find_property(op->ptr, "filter_image"))
params->filter |= RNA_boolean_get(op->ptr, "filter_image") ? IMAGEFILE : 0;
- if(RNA_struct_find_property(op->ptr, "filter_movie"))
+ if (RNA_struct_find_property(op->ptr, "filter_movie"))
params->filter |= RNA_boolean_get(op->ptr, "filter_movie") ? MOVIEFILE : 0;
- if(RNA_struct_find_property(op->ptr, "filter_text"))
+ if (RNA_struct_find_property(op->ptr, "filter_text"))
params->filter |= RNA_boolean_get(op->ptr, "filter_text") ? TEXTFILE : 0;
- if(RNA_struct_find_property(op->ptr, "filter_python"))
+ if (RNA_struct_find_property(op->ptr, "filter_python"))
params->filter |= RNA_boolean_get(op->ptr, "filter_python") ? PYSCRIPTFILE : 0;
- if(RNA_struct_find_property(op->ptr, "filter_font"))
+ if (RNA_struct_find_property(op->ptr, "filter_font"))
params->filter |= RNA_boolean_get(op->ptr, "filter_font") ? FTFONTFILE : 0;
- if(RNA_struct_find_property(op->ptr, "filter_sound"))
+ if (RNA_struct_find_property(op->ptr, "filter_sound"))
params->filter |= RNA_boolean_get(op->ptr, "filter_sound") ? SOUNDFILE : 0;
- if(RNA_struct_find_property(op->ptr, "filter_text"))
+ if (RNA_struct_find_property(op->ptr, "filter_text"))
params->filter |= RNA_boolean_get(op->ptr, "filter_text") ? TEXTFILE : 0;
- if(RNA_struct_find_property(op->ptr, "filter_folder"))
+ if (RNA_struct_find_property(op->ptr, "filter_folder"))
params->filter |= RNA_boolean_get(op->ptr, "filter_folder") ? FOLDERFILE : 0;
- if(RNA_struct_find_property(op->ptr, "filter_btx"))
+ if (RNA_struct_find_property(op->ptr, "filter_btx"))
params->filter |= RNA_boolean_get(op->ptr, "filter_btx") ? BTXFILE : 0;
- if(RNA_struct_find_property(op->ptr, "filter_collada"))
+ if (RNA_struct_find_property(op->ptr, "filter_collada"))
params->filter |= RNA_boolean_get(op->ptr, "filter_collada") ? COLLADAFILE : 0;
if (RNA_struct_find_property(op->ptr, "filter_glob")) {
RNA_string_get(op->ptr, "filter_glob", params->filter_glob);
@@ -198,14 +198,16 @@ short ED_fileselect_set_params(SpaceFile *sfile)
if (params->filter != 0) {
if (U.uiflag & USER_FILTERFILEEXTS) {
params->flag |= FILE_FILTER;
- } else {
+ }
+ else {
params->flag &= ~FILE_FILTER;
}
}
if (U.uiflag & USER_HIDE_DOT) {
params->flag |= FILE_HIDE_DOT;
- } else {
+ }
+ else {
params->flag &= ~FILE_HIDE_DOT;
}
@@ -216,16 +218,17 @@ short ED_fileselect_set_params(SpaceFile *sfile)
params->flag |= RNA_boolean_get(op->ptr, "active_layer") ? FILE_ACTIVELAY : 0;
}
- if(RNA_struct_find_property(op->ptr, "display_type"))
+ if (RNA_struct_find_property(op->ptr, "display_type"))
params->display= RNA_enum_get(op->ptr, "display_type");
- if(params->display==FILE_DEFAULTDISPLAY) {
+ if (params->display==FILE_DEFAULTDISPLAY) {
if (U.uiflag & USER_SHOW_THUMBNAILS) {
- if(params->filter & (IMAGEFILE|MOVIEFILE))
+ if (params->filter & (IMAGEFILE|MOVIEFILE))
params->display= FILE_IMGDISPLAY;
else
params->display= FILE_SHORTDISPLAY;
- } else {
+ }
+ else {
params->display= FILE_SHORTDISPLAY;
}
}
@@ -276,7 +279,8 @@ int ED_fileselect_layout_numfiles(FileLayout* layout, struct ARegion *ar)
int width = (int)(ar->v2d.cur.xmax - ar->v2d.cur.xmin - 2*layout->tile_border_x);
numfiles = (int)((float)width / (float)layout->tile_w + 0.5f);
return numfiles*layout->rows;
- } else {
+ }
+ else {
int height = (int)(ar->v2d.cur.ymax - ar->v2d.cur.ymin - 2*layout->tile_border_y);
numfiles = (int)((float)height/(float)layout->tile_h + 0.5f);
return numfiles*layout->columns;
@@ -312,7 +316,8 @@ FileSelection ED_fileselect_layout_offset_rect(FileLayout* layout, const rcti* r
if ( (colmin > layout->columns-1) || (rowmin > layout->rows-1) ) {
sel.first = -1;
- } else {
+ }
+ else {
if (layout->flag & FILE_LAYOUT_HOR)
sel.first = layout->rows*colmin + rowmin;
else
@@ -320,7 +325,8 @@ FileSelection ED_fileselect_layout_offset_rect(FileLayout* layout, const rcti* r
}
if ( (colmax > layout->columns-1) || (rowmax > layout->rows-1) ) {
sel.last = -1;
- } else {
+ }
+ else {
if (layout->flag & FILE_LAYOUT_HOR)
sel.last = layout->rows*colmax + rowmax;
else
@@ -356,7 +362,8 @@ void ED_fileselect_layout_tilepos(FileLayout* layout, int tile, int *x, int *y)
if (layout->flag == FILE_LAYOUT_HOR) {
*x = layout->tile_border_x + (tile/layout->rows)*(layout->tile_w+2*layout->tile_border_x);
*y = layout->tile_border_y + (tile%layout->rows)*(layout->tile_h+2*layout->tile_border_y);
- } else {
+ }
+ else {
*x = layout->tile_border_x + ((tile)%layout->columns)*(layout->tile_w+2*layout->tile_border_x);
*y = layout->tile_border_y + ((tile)/layout->columns)*(layout->tile_h+2*layout->tile_border_y);
}
@@ -393,7 +400,8 @@ float file_shorten_string(char* string, float w, int front)
temp[slen+4] = '\0';
BLI_strncpy(string, temp, slen+4);
}
- } else {
+ }
+ else {
char *s = string;
while (sw>w) {
int slen = strlen(string);
@@ -482,7 +490,8 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
if (sfile->layout == NULL) {
sfile->layout = MEM_callocN(sizeof(struct FileLayout), "file_layout");
sfile->layout->dirty = TRUE;
- } else if (sfile->layout->dirty == FALSE) {
+ }
+ else if (sfile->layout->dirty == FALSE) {
return;
}
@@ -502,7 +511,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
layout->tile_h = layout->prv_h + 2*layout->prv_border_y + textheight;
layout->width= (int)(v2d->cur.xmax - v2d->cur.xmin - 2*layout->tile_border_x);
layout->columns= layout->width / (layout->tile_w + 2*layout->tile_border_x);
- if(layout->columns > 0)
+ if (layout->columns > 0)
layout->rows= numfiles/layout->columns + 1; // XXX dirty, modulo is zero
else {
layout->columns = 1;
@@ -510,7 +519,8 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
}
layout->height= sfile->layout->rows*(layout->tile_h+2*layout->tile_border_y) + layout->tile_border_y*2;
layout->flag = FILE_LAYOUT_VER;
- } else {
+ }
+ else {
layout->prv_w = 0;
layout->prv_h = 0;
layout->tile_border_x = 8;
@@ -527,7 +537,8 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
maxlen = ICON_DEFAULT_WIDTH_SCALE + 4 +
(int)layout->column_widths[COLUMN_NAME] + 12 +
(int)layout->column_widths[COLUMN_SIZE] + 12;
- } else {
+ }
+ else {
maxlen = ICON_DEFAULT_WIDTH_SCALE + 4 +
(int)layout->column_widths[COLUMN_NAME] + 12 +
#ifndef WIN32
@@ -542,7 +553,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
}
layout->tile_w = maxlen;
- if(layout->rows > 0)
+ if (layout->rows > 0)
layout->columns = numfiles/layout->rows + 1; // XXX dirty, modulo is zero
else {
layout->rows = 1;
@@ -570,13 +581,13 @@ void file_change_dir(bContext *C, int checkdir)
ED_fileselect_clear(C, sfile);
- if(checkdir && BLI_is_dir(sfile->params->dir)==0) {
+ if (checkdir && BLI_is_dir(sfile->params->dir)==0) {
BLI_strncpy(sfile->params->dir, filelist_dir(sfile->files), sizeof(sfile->params->dir));
/* could return but just refresh the current dir */
}
filelist_setdir(sfile->files, sfile->params->dir);
- if(folderlist_clear_next(sfile))
+ if (folderlist_clear_next(sfile))
folderlist_free(sfile->folders_next);
folderlist_pushdir(sfile->folders_prev, sfile->params->dir);
@@ -608,7 +619,7 @@ void autocomplete_directory(struct bContext *C, char *str, void *UNUSED(arg_v))
SpaceFile *sfile= CTX_wm_space_file(C);
/* search if str matches the beginning of name */
- if(str[0] && sfile->files) {
+ if (str[0] && sfile->files) {
char dirname[FILE_MAX];
DIR *dir;
@@ -618,7 +629,7 @@ void autocomplete_directory(struct bContext *C, char *str, void *UNUSED(arg_v))
dir = opendir(dirname);
- if(dir) {
+ if (dir) {
AutoComplete *autocpl= autocomplete_begin(str, FILE_MAX);
while ((de = readdir(dir)) != NULL) {
@@ -643,7 +654,8 @@ void autocomplete_directory(struct bContext *C, char *str, void *UNUSED(arg_v))
autocomplete_end(autocpl, str);
if (BLI_exists(str)) {
BLI_add_slash(str);
- } else {
+ }
+ else {
BLI_strncpy(sfile->params->dir, str, sizeof(sfile->params->dir));
}
}
@@ -655,12 +667,12 @@ void autocomplete_file(struct bContext *C, char *str, void *UNUSED(arg_v))
SpaceFile *sfile= CTX_wm_space_file(C);
/* search if str matches the beginning of name */
- if(str[0] && sfile->files) {
+ if (str[0] && sfile->files) {
AutoComplete *autocpl= autocomplete_begin(str, FILE_MAX);
int nentries = filelist_numfiles(sfile->files);
int i;
- for(i= 0; i<nentries; ++i) {
+ for (i= 0; i<nentries; ++i) {
struct direntry* file = filelist_file(sfile->files, i);
if (file && S_ISREG(file->type)) {
autocomplete_do_name(autocpl, file->relname);
@@ -685,8 +697,8 @@ void ED_fileselect_clear(struct bContext *C, struct SpaceFile *sfile)
void ED_fileselect_exit(struct bContext *C, struct SpaceFile *sfile)
{
- if(!sfile) return;
- if(sfile->op) {
+ if (!sfile) return;
+ if (sfile->op) {
WM_event_fileselect_event(C, sfile->op, EVT_FILESELECT_EXTERNAL_CANCEL);
sfile->op = NULL;
}
diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index 4c9d2be791b..ddd4b31d145 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -177,7 +177,8 @@ void fsmenu_insert_entry(struct FSMenu* fsmenu, FSMenuCategory category, const c
else if (sorted && cmp_ret < 0) {
break;
}
- } else {
+ }
+ else {
// if we're bookmarking this, file should come
// before the last separator, only automatically added
// current dir go after the last sep.
@@ -194,7 +195,8 @@ void fsmenu_insert_entry(struct FSMenu* fsmenu, FSMenuCategory category, const c
if (prev) {
fsme->next= prev->next;
prev->next= fsme;
- } else {
+ }
+ else {
fsme->next= fsms;
fsmenu_set_category(fsmenu, category, fsme);
}
@@ -217,7 +219,8 @@ void fsmenu_remove_entry(struct FSMenu* fsmenu, FSMenuCategory category, int idx
/* remove fsme from list */
if (prev) {
prev->next= fsme->next;
- } else {
+ }
+ else {
fsms= fsme->next;
fsmenu_set_category(fsmenu, category, fsms);
}
@@ -233,7 +236,7 @@ void fsmenu_write_file(struct FSMenu* fsmenu, const char *filename)
FSMenuEntry *fsme= NULL;
int nskip= 0;
- FILE *fp = fopen(filename, "w");
+ FILE *fp = BLI_fopen(filename, "w");
if (!fp) return;
fprintf(fp, "[Bookmarks]\n");
@@ -262,16 +265,18 @@ void fsmenu_read_bookmarks(struct FSMenu* fsmenu, const char *filename)
FSMenuCategory category = FS_CATEGORY_BOOKMARKS;
FILE *fp;
- fp = fopen(filename, "r");
+ fp = BLI_fopen(filename, "r");
if (!fp) return;
while ( fgets ( line, 256, fp ) != NULL ) /* read a line */
{
- if (strncmp(line, "[Bookmarks]", 11)==0){
+ if (strncmp(line, "[Bookmarks]", 11)==0) {
category = FS_CATEGORY_BOOKMARKS;
- } else if (strncmp(line, "[Recent]", 8)==0){
+ }
+ else if (strncmp(line, "[Recent]", 8)==0) {
category = FS_CATEGORY_RECENT;
- } else {
+ }
+ else {
int len = strlen(line);
if (len>0) {
if (line[len-1] == '\n') {
@@ -344,7 +349,7 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
* assume they are the standard ones
* TODO : replace hardcoded paths with proper BLI_get_folder calls */
home = getenv("HOME");
- if(home) {
+ if (home) {
BLI_snprintf(line, 256, "%s/", home);
fsmenu_insert_entry(fsmenu, FS_CATEGORY_BOOKMARKS, line, 1, 0);
BLI_snprintf(line, 256, "%s/Desktop/", home);
@@ -465,7 +470,7 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
{
const char *home= getenv("HOME");
- if(home) {
+ if (home) {
BLI_snprintf(line, FILE_MAXDIR, "%s/", home);
fsmenu_insert_entry(fsmenu, FS_CATEGORY_BOOKMARKS, line, 1, 0);
BLI_snprintf(line, FILE_MAXDIR, "%s/Desktop/", home);
@@ -489,11 +494,11 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
else {
while ((mnt = getmntent (fp))) {
/* not sure if this is right, but seems to give the relevant mnts */
- if(strncmp(mnt->mnt_fsname, "/dev", 4))
+ if (strncmp(mnt->mnt_fsname, "/dev", 4))
continue;
len= strlen(mnt->mnt_dir);
- if(len && mnt->mnt_dir[len-1] != '/') {
+ if (len && mnt->mnt_dir[len-1] != '/') {
BLI_snprintf(line, FILE_MAXDIR, "%s/", mnt->mnt_dir);
fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, line, 1, 0);
}
@@ -509,7 +514,7 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
#endif
/* fallback */
- if(!found)
+ if (!found)
fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, "/", 1, 0);
}
}
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 9eafd4533d2..0cf15c22efa 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -113,7 +113,7 @@ static void file_free(SpaceLink *sl)
{
SpaceFile *sfile= (SpaceFile *) sl;
- if(sfile->files) {
+ if (sfile->files) {
// XXXXX would need to do thumbnails_stop here, but no context available
filelist_freelib(sfile->files);
filelist_free(sfile->files);
@@ -121,13 +121,13 @@ static void file_free(SpaceLink *sl)
sfile->files= NULL;
}
- if(sfile->folders_prev) {
+ if (sfile->folders_prev) {
folderlist_free(sfile->folders_prev);
MEM_freeN(sfile->folders_prev);
sfile->folders_prev= NULL;
}
- if(sfile->folders_next) {
+ if (sfile->folders_next) {
folderlist_free(sfile->folders_next);
MEM_freeN(sfile->folders_next);
sfile->folders_next= NULL;
@@ -151,7 +151,7 @@ static void file_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
SpaceFile *sfile= (SpaceFile*)sa->spacedata.first;
//printf("file_init\n");
- if(sfile->layout) sfile->layout->dirty= TRUE;
+ if (sfile->layout) sfile->layout->dirty= TRUE;
}
@@ -169,10 +169,10 @@ static SpaceLink *file_duplicate(SpaceLink *sl)
filelist_setdir(sfilen->files, sfilen->params->dir);
}
- if(sfileo->folders_prev)
+ if (sfileo->folders_prev)
sfilen->folders_prev = folderlist_duplicate(sfileo->folders_prev);
- if(sfileo->folders_next)
+ if (sfileo->folders_next)
sfilen->folders_next = folderlist_duplicate(sfileo->folders_next);
if (sfileo->layout) {
@@ -200,26 +200,29 @@ static void file_refresh(const bContext *C, ScrArea *UNUSED(sa))
if (filelist_empty(sfile->files)) {
thumbnails_stop(sfile->files, C);
filelist_readdir(sfile->files);
- if(params->sort!=FILE_SORT_NONE) {
+ if (params->sort!=FILE_SORT_NONE) {
filelist_sort(sfile->files, params->sort);
}
BLI_strncpy(params->dir, filelist_dir(sfile->files), FILE_MAX);
- if(params->display == FILE_IMGDISPLAY) {
+ if (params->display == FILE_IMGDISPLAY) {
thumbnails_start(sfile->files, C);
}
- } else {
- if(params->sort!=FILE_SORT_NONE) {
+ }
+ else {
+ if (params->sort!=FILE_SORT_NONE) {
thumbnails_stop(sfile->files, C);
filelist_sort(sfile->files, params->sort);
- if(params->display == FILE_IMGDISPLAY) {
+ if (params->display == FILE_IMGDISPLAY) {
thumbnails_start(sfile->files, C);
}
- } else {
- if(params->display == FILE_IMGDISPLAY) {
+ }
+ else {
+ if (params->display == FILE_IMGDISPLAY) {
if (!thumbnails_running(sfile->files,C)) {
thumbnails_start(sfile->files, C);
}
- } else {
+ }
+ else {
/* stop any running thumbnail jobs if we're not
* displaying them - speedup for NFS */
thumbnails_stop(sfile->files, C);
@@ -272,10 +275,10 @@ static void file_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
/* own keymaps */
- keymap= WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_find(wm->defaultconf, "File Browser Main", SPACE_FILE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "File Browser Main", SPACE_FILE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
@@ -333,9 +336,9 @@ static void file_main_area_draw(const bContext *C, ARegion *ar)
/* XXX this happens on scaling down Screen (like from startup.blend) */
/* view2d has no type specific for filewindow case, which doesnt scroll vertically */
- if(v2d->cur.ymax < 0) {
+ if (v2d->cur.ymax < 0) {
v2d->cur.ymin -= v2d->cur.ymax;
- v2d->cur.ymax= 0;
+ v2d->cur.ymax = 0;
}
}
/* v2d has initialized flag, so this call will only set the mask correct */
@@ -395,7 +398,7 @@ static void file_keymap(struct wmKeyConfig *keyconf)
{
wmKeyMapItem *kmi;
/* keys for all areas */
- wmKeyMap *keymap= WM_keymap_find(keyconf, "File Browser", SPACE_FILE, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "File Browser", SPACE_FILE, 0);
WM_keymap_add_item(keymap, "FILE_OT_bookmark_toggle", NKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "FILE_OT_parent", PKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "FILE_OT_bookmark_add", BKEY, KM_PRESS, KM_CTRL, 0);
@@ -408,8 +411,8 @@ static void file_keymap(struct wmKeyConfig *keyconf)
WM_keymap_verify_item(keymap, "FILE_OT_smoothscroll", TIMER1, KM_ANY, KM_ANY, 0);
/* 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);
+ 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);
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);
@@ -438,7 +441,7 @@ static void file_keymap(struct wmKeyConfig *keyconf)
/* keys for button area (top) */
- keymap= WM_keymap_find(keyconf, "File Browser Buttons", SPACE_FILE, 0);
+ keymap = WM_keymap_find(keyconf, "File Browser Buttons", SPACE_FILE, 0);
kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, 0, 0);
RNA_int_set(kmi->ptr, "increment", 1);
kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, KM_SHIFT, 0);
@@ -461,7 +464,7 @@ static void file_channel_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
/* own keymaps */
- keymap= WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -485,7 +488,7 @@ static void file_header_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_header_init(ar);
- keymap= WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -502,10 +505,10 @@ static void file_ui_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_find(wm->defaultconf, "File Browser Buttons", SPACE_FILE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "File Browser Buttons", SPACE_FILE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -518,8 +521,8 @@ static void file_ui_area_draw(const bContext *C, ARegion *ar)
glClear(GL_COLOR_BUFFER_BIT);
/* scrolling here is just annoying, disable it */
- ar->v2d.cur.ymax= ar->v2d.cur.ymax - ar->v2d.cur.ymin;
- ar->v2d.cur.ymin= 0;
+ ar->v2d.cur.ymax = ar->v2d.cur.ymax - ar->v2d.cur.ymin;
+ ar->v2d.cur.ymin = 0;
/* set view2d view matrix for scrolling (without scrollers) */
UI_view2d_view_ortho(&ar->v2d);
diff --git a/source/blender/editors/space_graph/CMakeLists.txt b/source/blender/editors/space_graph/CMakeLists.txt
index 50ab985d1e0..5b39604809c 100644
--- a/source/blender/editors/space_graph/CMakeLists.txt
+++ b/source/blender/editors/space_graph/CMakeLists.txt
@@ -53,4 +53,8 @@ if(WITH_AUDASPACE)
add_definitions(-DWITH_AUDASPACE)
endif()
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_space_graph "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/space_graph/SConscript b/source/blender/editors/space_graph/SConscript
index fe8846d2c30..83239a5480a 100644
--- a/source/blender/editors/space_graph/SConscript
+++ b/source/blender/editors/space_graph/SConscript
@@ -7,4 +7,9 @@ incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' #/intern/audaspace/intern ../../blenloader'
-env.BlenderLib ( 'bf_editors_space_graph', sources, Split(incs), [], libtype=['core'], priority=[50] )
+defs = []
+
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
+env.BlenderLib ( 'bf_editors_space_graph', sources, Split(incs), defs, libtype=['core'], priority=[50] )
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 642d43f2e71..4d2fe2cd568 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -108,12 +108,12 @@ static int graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve **
/* try to find 'active' F-Curve */
elem= get_active_fcurve_channel(&ac);
- if(elem == NULL)
+ if (elem == NULL)
return 0;
- if(fcu)
+ if (fcu)
*fcu= (FCurve*)elem->data;
- if(ale)
+ if (ale)
*ale= elem;
else
MEM_freeN(elem);
@@ -452,7 +452,7 @@ static int graph_panel_drivers_poll(const bContext *C, PanelType *UNUSED(pt))
{
SpaceIpo *sipo= CTX_wm_space_graph(C);
- if(sipo->mode != SIPO_MODE_DRIVERS)
+ if (sipo->mode != SIPO_MODE_DRIVERS)
return 0;
return graph_panel_context(C, NULL, NULL);
@@ -614,11 +614,11 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
/* general actions - management */
col= uiLayoutColumn(pa->layout, 0);
block= uiLayoutGetBlock(col);
- but= uiDefBut(block, BUT, B_IPO_DEPCHANGE, IFACE_("Update Dependencies"), 0, 0, 10*UI_UNIT_X, 22,
+ but = uiDefBut(block, BUT, B_IPO_DEPCHANGE, IFACE_("Update Dependencies"), 0, 0, 10*UI_UNIT_X, 22,
NULL, 0.0, 0.0, 0, 0, TIP_("Force updates of dependencies"));
uiButSetFunc(but, driver_update_flags_cb, fcu, NULL);
- but= uiDefBut(block, BUT, B_IPO_DEPCHANGE, IFACE_("Remove Driver"), 0, 0, 10*UI_UNIT_X, 18,
+ but = uiDefBut(block, BUT, B_IPO_DEPCHANGE, IFACE_("Remove Driver"), 0, 0, 10*UI_UNIT_X, 18,
NULL, 0.0, 0.0, 0, 0, TIP_("Remove this driver"));
uiButSetNFunc(but, driver_remove_cb, MEM_dupallocN(ale), NULL);
@@ -662,7 +662,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
/* add driver variables */
col= uiLayoutColumn(pa->layout, 0);
block= uiLayoutGetBlock(col);
- but= uiDefBut(block, BUT, B_IPO_DEPCHANGE, IFACE_("Add Variable"), 0, 0, 10*UI_UNIT_X, UI_UNIT_Y,
+ but = uiDefBut(block, BUT, B_IPO_DEPCHANGE, IFACE_("Add Variable"), 0, 0, 10*UI_UNIT_X, UI_UNIT_Y,
NULL, 0.0, 0.0, 0, 0, TIP_("Add a new target variable for this Driver"));
uiButSetFunc(but, driver_add_var_cb, driver, NULL);
@@ -686,7 +686,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
/* remove button */
uiBlockSetEmboss(block, UI_EMBOSSN);
- but= uiDefIconBut(block, BUT, B_IPO_DEPCHANGE, ICON_X, 290, 0, UI_UNIT_X, UI_UNIT_Y,
+ but = uiDefIconBut(block, BUT, B_IPO_DEPCHANGE, ICON_X, 290, 0, UI_UNIT_X, UI_UNIT_Y,
NULL, 0.0, 0.0, 0.0, 0.0, IFACE_("Delete target variable"));
uiButSetFunc(but, driver_delete_var_cb, driver, dvar);
uiBlockSetEmboss(block, UI_EMBOSS);
@@ -831,7 +831,7 @@ static int graph_properties(bContext *C, wmOperator *UNUSED(op))
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= graph_has_buttons_region(sa);
- if(ar)
+ if (ar)
ED_region_toggle_hidden(C, ar);
return OPERATOR_FINISHED;
@@ -839,13 +839,13 @@ static int graph_properties(bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_properties(wmOperatorType *ot)
{
- ot->name= "Properties";
- ot->idname= "GRAPH_OT_properties";
- ot->description= "Toggle display properties panel";
+ ot->name = "Properties";
+ ot->idname = "GRAPH_OT_properties";
+ ot->description = "Toggle display properties panel";
- ot->exec= graph_properties;
- ot->poll= ED_operator_graphedit_active;
+ ot->exec = graph_properties;
+ ot->poll = ED_operator_graphedit_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index 8af16bd1aec..279e6ce0400 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -48,6 +48,7 @@
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_windowmanager_types.h"
+#include "DNA_userdef_types.h"
#include "BKE_context.h"
#include "BKE_curve.h"
@@ -72,7 +73,7 @@
* drawing components for some F-Curve (fcu)
* - selected F-Curves should be more visible than partially visible ones
*/
-#define drawFCurveFade(fcu) ( ((fcu)->flag & FCURVE_SELECTED)? 1.0f : 0.25f )
+#define drawFCurveFade(fcu) ( ((fcu)->flag & FCURVE_SELECTED)? 1.0f : U.fcu_inactive_alpha )
/* set the color for some point from some value given packed into an int
* - intV: integer value containing color info packed into an int
@@ -498,7 +499,7 @@ static void draw_fcurve_curve (bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2
/* when opening a blend file on a different sized screen or while dragging the toolbar this can happen
* best just bail out in this case */
UI_view2d_grid_size(grid, &dx, &dy);
- if(dx <= 0.0f)
+ if (dx <= 0.0f)
return;
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 9a965c3a109..c0cd2a882c8 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -184,16 +184,16 @@ static int graphkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_previewrange_set (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Auto-Set Preview Range";
- ot->idname= "GRAPH_OT_previewrange_set";
- ot->description= "Automatically set Preview Range based on range of keyframes";
+ ot->name = "Auto-Set Preview Range";
+ ot->idname = "GRAPH_OT_previewrange_set";
+ ot->description = "Automatically set Preview Range based on range of keyframes";
/* api callbacks */
- ot->exec= graphkeys_previewrange_exec;
- ot->poll= ED_operator_graphedit_active; // XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier...
+ ot->exec = graphkeys_previewrange_exec;
+ ot->poll = ED_operator_graphedit_active; // XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier...
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ****************** View-All Operator ****************** */
@@ -246,31 +246,31 @@ static int graphkeys_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_view_all (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View All";
- ot->idname= "GRAPH_OT_view_all";
- ot->description= "Reset viewable area to show full keyframe range";
+ ot->name = "View All";
+ ot->idname = "GRAPH_OT_view_all";
+ ot->description = "Reset viewable area to show full keyframe range";
/* api callbacks */
- ot->exec= graphkeys_viewall_exec;
- ot->poll= ED_operator_graphedit_active; // XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier...
+ ot->exec = graphkeys_viewall_exec;
+ ot->poll = ED_operator_graphedit_active; // XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier...
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
void GRAPH_OT_view_selected (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Selected";
- ot->idname= "GRAPH_OT_view_selected";
- ot->description= "Reset viewable area to show selected keyframe range";
+ ot->name = "View Selected";
+ ot->idname = "GRAPH_OT_view_selected";
+ ot->description = "Reset viewable area to show selected keyframe range";
/* api callbacks */
- ot->exec= graphkeys_view_selected_exec;
- ot->poll= ED_operator_graphedit_active; // XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier...
+ ot->exec = graphkeys_view_selected_exec;
+ ot->poll = ED_operator_graphedit_active; // XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier...
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Create Ghost-Curves Operator *********************** */
@@ -376,16 +376,16 @@ static int graphkeys_create_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op)
void GRAPH_OT_ghost_curves_create (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Create Ghost Curves";
- ot->idname= "GRAPH_OT_ghost_curves_create";
- ot->description= "Create snapshot (Ghosts) of selected F-Curves as background aid for active Graph Editor";
+ ot->name = "Create Ghost Curves";
+ ot->idname = "GRAPH_OT_ghost_curves_create";
+ ot->description = "Create snapshot (Ghosts) of selected F-Curves as background aid for active Graph Editor";
/* api callbacks */
- ot->exec= graphkeys_create_ghostcurves_exec;
- ot->poll= graphop_visible_keyframes_poll;
+ ot->exec = graphkeys_create_ghostcurves_exec;
+ ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
// todo: add props for start/end frames
}
@@ -419,16 +419,16 @@ static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_ghost_curves_clear (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Ghost Curves";
- ot->idname= "GRAPH_OT_ghost_curves_clear";
- ot->description= "Clear F-Curve snapshots (Ghosts) for active Graph Editor";
+ ot->name = "Clear Ghost Curves";
+ ot->idname = "GRAPH_OT_ghost_curves_clear";
+ ot->description = "Clear F-Curve snapshots (Ghosts) for active Graph Editor";
/* api callbacks */
- ot->exec= graphkeys_clear_ghostcurves_exec;
- ot->poll= ED_operator_graphedit_active;
+ ot->exec = graphkeys_clear_ghostcurves_exec;
+ ot->poll = ED_operator_graphedit_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************************************************************************** */
@@ -514,20 +514,20 @@ static int graphkeys_insertkey_exec(bContext *C, wmOperator *op)
void GRAPH_OT_keyframe_insert (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Insert Keyframes";
- ot->idname= "GRAPH_OT_keyframe_insert";
- ot->description= "Insert keyframes for the specified channels";
+ ot->name = "Insert Keyframes";
+ ot->idname = "GRAPH_OT_keyframe_insert";
+ ot->description = "Insert keyframes for the specified channels";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= graphkeys_insertkey_exec;
- ot->poll= graphop_editable_keyframes_poll;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = graphkeys_insertkey_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_insertkey_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_graphkeys_insertkey_types, 0, "Type", "");
}
/* ******************** Click-Insert Keyframes Operator ************************* */
@@ -621,17 +621,17 @@ static int graphkeys_click_insert_invoke (bContext *C, wmOperator *op, wmEvent *
void GRAPH_OT_click_insert (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Click-Insert Keyframes";
- ot->idname= "GRAPH_OT_click_insert";
- ot->description= "Insert new keyframe at the cursor position for the active F-Curve";
+ ot->name = "Click-Insert Keyframes";
+ ot->idname = "GRAPH_OT_click_insert";
+ ot->description = "Insert new keyframe at the cursor position for the active F-Curve";
/* api callbacks */
- ot->invoke= graphkeys_click_insert_invoke;
- ot->exec= graphkeys_click_insert_exec;
- ot->poll= graphop_active_fcurve_poll;
+ ot->invoke = graphkeys_click_insert_invoke;
+ ot->exec = graphkeys_click_insert_exec;
+ ot->poll = graphop_active_fcurve_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_float(ot->srna, "frame", 1.0f, -FLT_MAX, FLT_MAX, "Frame Number", "Frame to insert keyframe on", 0, 100);
@@ -704,16 +704,16 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op)
void GRAPH_OT_copy (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Keyframes";
- ot->idname= "GRAPH_OT_copy";
- ot->description= "Copy selected keyframes to the copy/paste buffer";
+ ot->name = "Copy Keyframes";
+ ot->idname = "GRAPH_OT_copy";
+ ot->description = "Copy selected keyframes to the copy/paste buffer";
/* api callbacks */
- ot->exec= graphkeys_copy_exec;
- ot->poll= graphop_editable_keyframes_poll;
+ ot->exec = graphkeys_copy_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -749,17 +749,17 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op)
void GRAPH_OT_paste (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Paste Keyframes";
- ot->idname= "GRAPH_OT_paste";
- ot->description= "Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame";
+ ot->name = "Paste Keyframes";
+ ot->idname = "GRAPH_OT_paste";
+ ot->description = "Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame";
/* api callbacks */
-// ot->invoke= WM_operator_props_popup; // better wait for graph redo panel
- ot->exec= graphkeys_paste_exec;
- ot->poll= graphop_editable_keyframes_poll;
+// ot->invoke = WM_operator_props_popup; // better wait for graph redo panel
+ ot->exec = graphkeys_paste_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, "Offset", "Paste time offset of keys");
RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merging pasted keys and existing");
@@ -818,17 +818,17 @@ static int graphkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
void GRAPH_OT_duplicate (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Duplicate Keyframes";
- ot->idname= "GRAPH_OT_duplicate";
- ot->description= "Make a copy of all selected keyframes";
+ ot->name = "Duplicate Keyframes";
+ ot->idname = "GRAPH_OT_duplicate";
+ ot->description = "Make a copy of all selected keyframes";
/* api callbacks */
- ot->invoke= graphkeys_duplicate_invoke;
- ot->exec= graphkeys_duplicate_exec;
- ot->poll= graphop_editable_keyframes_poll;
+ ot->invoke = graphkeys_duplicate_invoke;
+ ot->exec = graphkeys_duplicate_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* to give to transform */
RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
@@ -888,17 +888,17 @@ static int graphkeys_delete_exec(bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_delete (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Keyframes";
- ot->idname= "GRAPH_OT_delete";
- ot->description= "Remove all selected keyframes";
+ ot->name = "Delete Keyframes";
+ ot->idname = "GRAPH_OT_delete";
+ ot->description = "Remove all selected keyframes";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= graphkeys_delete_exec;
- ot->poll= graphop_editable_keyframes_poll;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = graphkeys_delete_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Clean Keyframes Operator ************************* */
@@ -950,20 +950,20 @@ static int graphkeys_clean_exec(bContext *C, wmOperator *op)
void GRAPH_OT_clean (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clean Keyframes";
- ot->idname= "GRAPH_OT_clean";
- ot->description= "Simplify F-Curves by removing closely spaced keyframes";
+ ot->name = "Clean Keyframes";
+ ot->idname = "GRAPH_OT_clean";
+ ot->description = "Simplify F-Curves by removing closely spaced keyframes";
/* api callbacks */
- //ot->invoke= // XXX we need that number popup for this!
- ot->exec= graphkeys_clean_exec;
- ot->poll= graphop_editable_keyframes_poll;
+ //ot->invoke = // XXX we need that number popup for this!
+ ot->exec = graphkeys_clean_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 1000.0f);
+ ot->prop = RNA_def_float(ot->srna, "threshold", 0.001f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 1000.0f);
}
/* ******************** Bake F-Curve Operator *********************** */
@@ -1033,17 +1033,17 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_bake (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Bake Curve";
- ot->idname= "GRAPH_OT_bake";
- ot->description= "Bake selected F-Curves to a set of sampled points defining a similar curve";
+ ot->name = "Bake Curve";
+ ot->idname = "GRAPH_OT_bake";
+ ot->description = "Bake selected F-Curves to a set of sampled points defining a similar curve";
/* api callbacks */
- ot->invoke= WM_operator_confirm; // FIXME...
- ot->exec= graphkeys_bake_exec;
- ot->poll= graphop_selected_fcurve_poll;
+ ot->invoke = WM_operator_confirm; // FIXME...
+ ot->exec = graphkeys_bake_exec;
+ ot->poll = graphop_selected_fcurve_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
// todo: add props for start/end frames
}
@@ -1074,7 +1074,7 @@ static float fcurve_samplingcb_sound (FCurve *UNUSED(fcu), void *data, float eva
tSoundBakeInfo *sbi= (tSoundBakeInfo *)data;
int position = evaltime - sbi->cfra;
- if((position < 0) || (position >= sbi->length))
+ if ((position < 0) || (position >= sbi->length))
return 0.0f;
return sbi->samples[position];
@@ -1177,17 +1177,17 @@ static int graphkeys_sound_bake_invoke (bContext *C, wmOperator *op, wmEvent *ev
void GRAPH_OT_sound_bake (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Bake Sound to F-Curves";
- ot->idname= "GRAPH_OT_sound_bake";
- ot->description= "Bakes a sound wave to selected F-Curves";
+ ot->name = "Bake Sound to F-Curves";
+ ot->idname = "GRAPH_OT_sound_bake";
+ ot->description = "Bakes a sound wave to selected F-Curves";
/* api callbacks */
- ot->invoke= graphkeys_sound_bake_invoke;
- ot->exec= graphkeys_sound_bake_exec;
- ot->poll= graphop_selected_fcurve_poll;
+ ot->invoke = graphkeys_sound_bake_invoke;
+ ot->exec = graphkeys_sound_bake_exec;
+ ot->poll = graphop_selected_fcurve_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
@@ -1251,16 +1251,16 @@ static int graphkeys_sample_exec(bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_sample (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Sample Keyframes";
- ot->idname= "GRAPH_OT_sample";
- ot->description= "Add keyframes on every frame between the selected keyframes";
+ ot->name = "Sample Keyframes";
+ ot->idname = "GRAPH_OT_sample";
+ ot->description = "Add keyframes on every frame between the selected keyframes";
/* api callbacks */
- ot->exec= graphkeys_sample_exec;
- ot->poll= graphop_editable_keyframes_poll;
+ ot->exec = graphkeys_sample_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1360,20 +1360,20 @@ static int graphkeys_expo_exec(bContext *C, wmOperator *op)
void GRAPH_OT_extrapolation_type (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Keyframe Extrapolation";
- ot->idname= "GRAPH_OT_extrapolation_type";
- ot->description= "Set extrapolation mode for selected F-Curves";
+ ot->name = "Set Keyframe Extrapolation";
+ ot->idname = "GRAPH_OT_extrapolation_type";
+ ot->description = "Set extrapolation mode for selected F-Curves";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= graphkeys_expo_exec;
- ot->poll= graphop_editable_keyframes_poll;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = graphkeys_expo_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_expo_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_graphkeys_expo_types, 0, "Type", "");
}
/* ******************** Set Interpolation-Type Operator *********************** */
@@ -1429,20 +1429,20 @@ static int graphkeys_ipo_exec(bContext *C, wmOperator *op)
void GRAPH_OT_interpolation_type (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Keyframe Interpolation";
- ot->idname= "GRAPH_OT_interpolation_type";
- ot->description= "Set interpolation mode for the F-Curve segments starting from the selected keyframes";
+ ot->name = "Set Keyframe Interpolation";
+ ot->idname = "GRAPH_OT_interpolation_type";
+ ot->description = "Set interpolation mode for the F-Curve segments starting from the selected keyframes";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= graphkeys_ipo_exec;
- ot->poll= graphop_editable_keyframes_poll;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = graphkeys_ipo_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", beztriple_interpolation_mode_items, 0, "Type", "");
}
/* ******************** Set Handle-Type Operator *********************** */
@@ -1506,20 +1506,20 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op)
void GRAPH_OT_handle_type (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Keyframe Handle Type";
- ot->idname= "GRAPH_OT_handle_type";
- ot->description= "Set type of handle for selected keyframes";
+ ot->name = "Set Keyframe Handle Type";
+ ot->idname = "GRAPH_OT_handle_type";
+ ot->description = "Set type of handle for selected keyframes";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= graphkeys_handletype_exec;
- ot->poll= graphop_editable_keyframes_poll;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = graphkeys_handletype_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", keyframe_handle_type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", keyframe_handle_type_items, 0, "Type", "");
}
/* ************************************************************************** */
@@ -1700,16 +1700,16 @@ static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
void GRAPH_OT_euler_filter (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Euler Discontinuity Filter";
- ot->idname= "GRAPH_OT_euler_filter";
- ot->description= "Fixes the most common causes of gimbal lock in the selected Euler Rotation F-Curves";
+ ot->name = "Euler Discontinuity Filter";
+ ot->idname = "GRAPH_OT_euler_filter";
+ ot->description = "Fixes the most common causes of gimbal lock in the selected Euler Rotation F-Curves";
/* api callbacks */
- ot->exec= graphkeys_euler_filter_exec;
- ot->poll= graphop_editable_keyframes_poll;
+ ot->exec = graphkeys_euler_filter_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ***************** Jump to Selected Frames Operator *********************** */
@@ -1774,16 +1774,16 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_frame_jump (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Jump to Frame";
- ot->idname= "GRAPH_OT_frame_jump";
- ot->description= "Set the current frame to the average frame of the selected keyframes";
+ ot->name = "Jump to Frame";
+ ot->idname = "GRAPH_OT_frame_jump";
+ ot->description = "Set the current frame to the average frame of the selected keyframes";
/* api callbacks */
- ot->exec= graphkeys_framejump_exec;
- ot->poll= graphop_visible_keyframes_poll;
+ ot->exec = graphkeys_framejump_exec;
+ ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Snap Keyframes Operator *********************** */
@@ -1878,20 +1878,20 @@ static int graphkeys_snap_exec(bContext *C, wmOperator *op)
void GRAPH_OT_snap (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap Keys";
- ot->idname= "GRAPH_OT_snap";
- ot->description= "Snap selected keyframes to the chosen times/values";
+ ot->name = "Snap Keys";
+ ot->idname = "GRAPH_OT_snap";
+ ot->description = "Snap selected keyframes to the chosen times/values";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= graphkeys_snap_exec;
- ot->poll= graphop_editable_keyframes_poll;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = graphkeys_snap_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_snap_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_graphkeys_snap_types, 0, "Type", "");
}
/* ******************** Mirror Keyframes Operator *********************** */
@@ -1996,20 +1996,20 @@ static int graphkeys_mirror_exec(bContext *C, wmOperator *op)
void GRAPH_OT_mirror (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mirror Keys";
- ot->idname= "GRAPH_OT_mirror";
- ot->description= "Flip selected keyframes over the selected mirror line";
+ ot->name = "Mirror Keys";
+ ot->idname = "GRAPH_OT_mirror";
+ ot->description = "Flip selected keyframes over the selected mirror line";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= graphkeys_mirror_exec;
- ot->poll= graphop_editable_keyframes_poll;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = graphkeys_mirror_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_graphkeys_mirror_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_graphkeys_mirror_types, 0, "Type", "");
}
/* ******************** Smooth Keyframes Operator *********************** */
@@ -2051,16 +2051,16 @@ static int graphkeys_smooth_exec(bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_smooth (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Smooth Keys";
- ot->idname= "GRAPH_OT_smooth";
- ot->description= "Apply weighted moving means to make selected F-Curves less bumpy";
+ ot->name = "Smooth Keys";
+ ot->idname = "GRAPH_OT_smooth";
+ ot->description = "Apply weighted moving means to make selected F-Curves less bumpy";
/* api callbacks */
- ot->exec= graphkeys_smooth_exec;
- ot->poll= graphop_editable_keyframes_poll;
+ ot->exec = graphkeys_smooth_exec;
+ ot->poll = graphop_editable_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************************************************************************** */
@@ -2155,20 +2155,20 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
void GRAPH_OT_fmodifier_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add F-Curve Modifier";
- ot->idname= "GRAPH_OT_fmodifier_add";
- ot->description= "Add F-Modifiers to the selected F-Curves";
+ ot->name = "Add F-Curve Modifier";
+ ot->idname = "GRAPH_OT_fmodifier_add";
+ ot->description = "Add F-Modifiers to the selected F-Curves";
/* api callbacks */
- ot->invoke= graph_fmodifier_add_invoke;
- ot->exec= graph_fmodifier_add_exec;
- ot->poll= graphop_selected_fcurve_poll;
+ ot->invoke = graph_fmodifier_add_invoke;
+ ot->exec = graph_fmodifier_add_exec;
+ ot->poll = graphop_selected_fcurve_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", "");
RNA_def_boolean(ot->srna, "only_active", 1, "Only Active", "Only add F-Modifier to active F-Curve");
}
@@ -2213,16 +2213,16 @@ static int graph_fmodifier_copy_exec(bContext *C, wmOperator *op)
void GRAPH_OT_fmodifier_copy (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy F-Modifiers";
- ot->idname= "GRAPH_OT_fmodifier_copy";
- ot->description= "Copy the F-Modifier(s) of the active F-Curve";
+ ot->name = "Copy F-Modifiers";
+ ot->idname = "GRAPH_OT_fmodifier_copy";
+ ot->description = "Copy the F-Modifier(s) of the active F-Curve";
/* api callbacks */
- ot->exec= graph_fmodifier_copy_exec;
- ot->poll= graphop_active_fcurve_poll;
+ ot->exec = graph_fmodifier_copy_exec;
+ ot->poll = graphop_active_fcurve_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
//ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All F-Modifiers", "Copy all the F-Modifiers, instead of just the active one");
@@ -2275,16 +2275,16 @@ static int graph_fmodifier_paste_exec(bContext *C, wmOperator *op)
void GRAPH_OT_fmodifier_paste (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Paste F-Modifiers";
- ot->idname= "GRAPH_OT_fmodifier_paste";
- ot->description= "Add copied F-Modifiers to the selected F-Curves";
+ ot->name = "Paste F-Modifiers";
+ ot->idname = "GRAPH_OT_fmodifier_paste";
+ ot->description = "Add copied F-Modifiers to the selected F-Curves";
/* api callbacks */
- ot->exec= graph_fmodifier_paste_exec;
- ot->poll= graphop_active_fcurve_poll;
+ ot->exec = graph_fmodifier_paste_exec;
+ ot->poll = graphop_active_fcurve_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************************************************************************** */
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index aba58098563..2887fa1c881 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -164,18 +164,18 @@ static int graphview_cursor_modal(bContext *C, wmOperator *op, wmEvent *event)
static void GRAPH_OT_cursor_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Cursor";
- ot->idname= "GRAPH_OT_cursor_set";
- ot->description= "Interactively set the current frame number and value cursor";
+ ot->name = "Set Cursor";
+ ot->idname = "GRAPH_OT_cursor_set";
+ ot->description = "Interactively set the current frame number and value cursor";
/* api callbacks */
- ot->exec= graphview_cursor_exec;
- ot->invoke= graphview_cursor_invoke;
- ot->modal= graphview_cursor_modal;
- ot->poll= ED_operator_graphedit_active;
+ ot->exec = graphview_cursor_exec;
+ ot->invoke = graphview_cursor_invoke;
+ ot->modal = graphview_cursor_modal;
+ ot->poll = ED_operator_graphedit_active;
/* flags */
- ot->flag= OPTYPE_BLOCKING|OPTYPE_UNDO;
+ ot->flag = OPTYPE_BLOCKING|OPTYPE_UNDO;
/* rna */
RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME);
@@ -241,11 +241,11 @@ void ED_operatormacros_graph(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot= WM_operatortype_append_macro("GRAPH_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("GRAPH_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
if (ot) {
- ot->description= "Make a copy of all selected keyframes and move them";
+ ot->description = "Make a copy of all selected keyframes and move them";
WM_operatortype_macro_define(ot, "GRAPH_OT_duplicate");
- otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
+ otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
}
}
@@ -273,23 +273,23 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
RNA_boolean_set(kmi->ptr, "extend", FALSE);
RNA_boolean_set(kmi->ptr, "curves", FALSE);
RNA_boolean_set(kmi->ptr, "column", FALSE);
- kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT|KM_SHIFT, 0);
+ 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);
@@ -298,14 +298,14 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
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);
+ 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_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST);
- kmi= WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
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);
+ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
RNA_boolean_set(kmi->ptr, "extend", FALSE);
RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_RIGHT);
@@ -406,7 +406,7 @@ void graphedit_keymap(wmKeyConfig *keyconf)
wmKeyMap *keymap;
/* keymap for all regions */
- keymap= WM_keymap_find(keyconf, "Graph Editor Generic", SPACE_IPO, 0);
+ keymap = WM_keymap_find(keyconf, "Graph Editor Generic", SPACE_IPO, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_properties", NKEY, KM_PRESS, 0, 0);
/* extrapolation works on channels, not keys */
WM_keymap_add_item(keymap, "GRAPH_OT_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0);
@@ -418,7 +418,7 @@ void graphedit_keymap(wmKeyConfig *keyconf)
*/
/* keyframes */
- keymap= WM_keymap_find(keyconf, "Graph Editor", SPACE_IPO, 0);
+ keymap = WM_keymap_find(keyconf, "Graph Editor", SPACE_IPO, 0);
graphedit_keymap_keyframes(keyconf, keymap);
}
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index bdd3497a931..864708a873a 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -169,19 +169,19 @@ static int graphkeys_deselectall_exec(bContext *C, wmOperator *op)
void GRAPH_OT_select_all_toggle (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select All";
- ot->idname= "GRAPH_OT_select_all_toggle";
- ot->description= "Toggle selection of all keyframes";
+ ot->name = "Select All";
+ ot->idname = "GRAPH_OT_select_all_toggle";
+ ot->description = "Toggle selection of all keyframes";
/* api callbacks */
- ot->exec= graphkeys_deselectall_exec;
- ot->poll= graphop_visible_keyframes_poll;
+ ot->exec = graphkeys_deselectall_exec;
+ ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
/* props */
- ot->prop= RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
+ ot->prop = RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
}
/* ******************** Border Select Operator **************************** */
@@ -316,10 +316,10 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op)
incl_handles = RNA_boolean_get(op->ptr, "include_handles");
/* get settings from operator */
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
/* selection 'mode' depends on whether borderselect region only matters on one axis */
if (RNA_boolean_get(op->ptr, "axis_range")) {
@@ -348,25 +348,25 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op)
void GRAPH_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Select";
- ot->idname= "GRAPH_OT_select_border";
- ot->description= "Select all keyframes within the specified region";
+ ot->name = "Border Select";
+ ot->idname = "GRAPH_OT_select_border";
+ ot->description = "Select all keyframes within the specified region";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= graphkeys_borderselect_exec;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = graphkeys_borderselect_exec;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= graphop_visible_keyframes_poll;
+ ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
/* rna */
WM_operator_properties_gesture_border(ot, TRUE);
- ot->prop= RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", "");
+ 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");
}
@@ -538,19 +538,19 @@ static int graphkeys_columnselect_exec(bContext *C, wmOperator *op)
void GRAPH_OT_select_column (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select All";
- ot->idname= "GRAPH_OT_select_column";
- ot->description= "Select all keyframes on the specified frame(s)";
+ ot->name = "Select All";
+ ot->idname = "GRAPH_OT_select_column";
+ ot->description = "Select all keyframes on the specified frame(s)";
/* api callbacks */
- ot->exec= graphkeys_columnselect_exec;
- ot->poll= graphop_visible_keyframes_poll;
+ ot->exec = graphkeys_columnselect_exec;
+ ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
/* props */
- ot->prop= RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", "");
+ ot->prop = RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", "");
}
/* ******************** Select Linked Operator *********************** */
@@ -597,15 +597,15 @@ void GRAPH_OT_select_linked (wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Linked";
- ot->idname= "GRAPH_OT_select_linked";
+ ot->idname = "GRAPH_OT_select_linked";
ot->description = "Select keyframes occurring in the same F-Curves as selected ones";
/* api callbacks */
- ot->exec= graphkeys_select_linked_exec;
- ot->poll= graphop_visible_keyframes_poll;
+ ot->exec = graphkeys_select_linked_exec;
+ ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
}
/* ******************** Select More/Less Operators *********************** */
@@ -675,15 +675,15 @@ void GRAPH_OT_select_more (wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select More";
- ot->idname= "GRAPH_OT_select_more";
+ ot->idname = "GRAPH_OT_select_more";
ot->description = "Select keyframes beside already selected ones";
/* api callbacks */
- ot->exec= graphkeys_select_more_exec;
- ot->poll= graphop_visible_keyframes_poll;
+ ot->exec = graphkeys_select_more_exec;
+ ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
}
/* ----------------- */
@@ -709,15 +709,15 @@ void GRAPH_OT_select_less (wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Less";
- ot->idname= "GRAPH_OT_select_less";
+ ot->idname = "GRAPH_OT_select_less";
ot->description = "Deselect keyframes on ends of selection islands";
/* api callbacks */
- ot->exec= graphkeys_select_less_exec;
- ot->poll= graphop_visible_keyframes_poll;
+ ot->exec = graphkeys_select_less_exec;
+ ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
}
/* ******************** Select Left/Right Operator ************************* */
@@ -849,20 +849,20 @@ static int graphkeys_select_leftright_invoke (bContext *C, wmOperator *op, wmEve
void GRAPH_OT_select_leftright (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Left/Right";
- ot->idname= "GRAPH_OT_select_leftright";
- ot->description= "Select keyframes to the left or the right of the current frame";
+ ot->name = "Select Left/Right";
+ ot->idname = "GRAPH_OT_select_leftright";
+ ot->description = "Select keyframes to the left or the right of the current frame";
/* api callbacks */
ot->invoke= graphkeys_select_leftright_invoke;
- ot->exec= graphkeys_select_leftright_exec;
- ot->poll= graphop_visible_keyframes_poll;
+ ot->exec = graphkeys_select_leftright_exec;
+ ot->poll = graphop_visible_keyframes_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "mode", prop_graphkeys_leftright_select_types, GRAPHKEYS_LRSEL_TEST, "Mode", "");
+ ot->prop = RNA_def_enum(ot->srna, "mode", prop_graphkeys_leftright_select_types, GRAPHKEYS_LRSEL_TEST, "Mode", "");
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", "");
}
@@ -1334,13 +1334,13 @@ static int graphkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *ev
void GRAPH_OT_clickselect (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mouse Select Keys";
- ot->idname= "GRAPH_OT_clickselect";
- ot->description= "Select keyframes by clicking on them";
+ ot->name = "Mouse Select Keys";
+ ot->idname = "GRAPH_OT_clickselect";
+ ot->description = "Select keyframes by clicking on them";
/* api callbacks */
- ot->invoke= graphkeys_clickselect_invoke;
- ot->poll= graphop_visible_keyframes_poll;
+ ot->invoke = graphkeys_clickselect_invoke;
+ ot->poll = graphop_visible_keyframes_poll;
/* id-props */
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 08f21a3f5aa..37cdbd4963a 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -70,7 +70,7 @@ ARegion *graph_has_buttons_region(ScrArea *sa)
ARegion *ar, *arnew;
ar= BKE_area_find_region_type(sa, RGN_TYPE_UI);
- if(ar) return ar;
+ if (ar) return ar;
/* add subdiv level; after main */
ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
@@ -142,10 +142,10 @@ static SpaceLink *graph_new(const bContext *C)
BLI_addtail(&sipo->regionbase, ar);
ar->regiontype= RGN_TYPE_WINDOW;
- ar->v2d.tot.xmin= 0.0f;
- ar->v2d.tot.ymin= (float)scene->r.sfra - 10.0f;
- ar->v2d.tot.xmax= (float)scene->r.efra;
- ar->v2d.tot.ymax= 10.0f;
+ ar->v2d.tot.xmin = 0.0f;
+ ar->v2d.tot.ymin = (float)scene->r.sfra - 10.0f;
+ ar->v2d.tot.xmax = (float)scene->r.efra;
+ ar->v2d.tot.ymax = 10.0f;
ar->v2d.cur= ar->v2d.tot;
@@ -211,9 +211,9 @@ static void graph_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "Graph Editor", SPACE_IPO, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Graph Editor", SPACE_IPO, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_find(wm->defaultconf, "Graph Editor Generic", SPACE_IPO, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Graph Editor Generic", SPACE_IPO, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -310,9 +310,9 @@ static void graph_channel_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "Animation Channels", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Animation Channels", 0, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_find(wm->defaultconf, "Graph Editor Generic", SPACE_IPO, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Graph Editor Generic", SPACE_IPO, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -362,7 +362,7 @@ static void graph_buttons_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_find(wm->defaultconf, "Graph Editor Generic", SPACE_IPO, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Graph Editor Generic", SPACE_IPO, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -400,7 +400,7 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case ND_MODIFIER:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
}
@@ -414,11 +414,11 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
default:
- if(wmn->data==ND_KEYS)
+ if (wmn->data==ND_KEYS)
ED_region_tag_redraw(ar);
}
@@ -474,13 +474,13 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_GRAPH)
+ if (wmn->data == ND_SPACE_GRAPH)
ED_area_tag_redraw(sa);
break;
// XXX: restore the case below if not enough updates occur...
//default:
- // if(wmn->data==ND_KEYS)
+ // if (wmn->data==ND_KEYS)
// ED_area_tag_redraw(sa);
}
}
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index d54468f64ea..dbee8f207ec 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -101,15 +101,15 @@ static void image_info(Scene *scene, ImageUser *iuser, Image *ima, ImBuf *ibuf,
str[0]= 0;
- if(ima==NULL) return;
+ if (ima==NULL) return;
- if(ibuf==NULL) {
+ if (ibuf==NULL) {
ofs+= sprintf(str, "Can't Load Image");
}
else {
- if(ima->source==IMA_SRC_MOVIE) {
+ if (ima->source==IMA_SRC_MOVIE) {
ofs+= sprintf(str, "Movie");
- if(ima->anim)
+ if (ima->anim)
ofs+= sprintf(str+ofs, "%d frs", IMB_anim_get_duration(ima->anim, IMB_TC_RECORD_RUN));
}
else
@@ -117,34 +117,34 @@ static void image_info(Scene *scene, ImageUser *iuser, Image *ima, ImBuf *ibuf,
ofs+= sprintf(str+ofs, ": size %d x %d,", ibuf->x, ibuf->y);
- if(ibuf->rect_float) {
- if(ibuf->channels!=4) {
+ if (ibuf->rect_float) {
+ if (ibuf->channels!=4) {
ofs+= sprintf(str+ofs, "%d float channel(s)", ibuf->channels);
}
- else if(ibuf->planes == R_IMF_PLANES_RGBA)
+ else if (ibuf->planes == R_IMF_PLANES_RGBA)
ofs+= sprintf(str+ofs, " RGBA float");
else
ofs+= sprintf(str+ofs, " RGB float");
}
else {
- if(ibuf->planes == R_IMF_PLANES_RGBA)
+ if (ibuf->planes == R_IMF_PLANES_RGBA)
ofs+= sprintf(str+ofs, " RGBA byte");
else
ofs+= sprintf(str+ofs, " RGB byte");
}
- if(ibuf->zbuf || ibuf->zbuf_float)
+ if (ibuf->zbuf || ibuf->zbuf_float)
ofs+= sprintf(str+ofs, " + Z");
- if(ima->source==IMA_SRC_SEQUENCE) {
+ if (ima->source==IMA_SRC_SEQUENCE) {
char *file= BLI_last_slash(ibuf->name);
- if(file==NULL) file= ibuf->name;
+ if (file==NULL) file= ibuf->name;
else file++;
ofs+= sprintf(str+ofs, ", %s", file);
}
}
/* the frame number, even if we cant */
- if(ima->source==IMA_SRC_SEQUENCE) {
+ if (ima->source==IMA_SRC_SEQUENCE) {
/* don't use iuser->framenr directly because it may not be updated if auto-refresh is off */
const int framenr= BKE_image_user_get_frame(iuser, CFRA, 0);
ofs+= sprintf(str+ofs, ", Frame: %d", framenr);
@@ -158,10 +158,10 @@ struct ImageUser *ntree_get_active_iuser(bNodeTree *ntree)
{
bNode *node;
- if(ntree)
- for(node= ntree->nodes.first; node; node= node->next)
- if( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))
- if(node->flag & NODE_DO_OUTPUT)
+ if (ntree)
+ for (node= ntree->nodes.first; node; node= node->next)
+ if ( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))
+ if (node->flag & NODE_DO_OUTPUT)
return node->storage;
return NULL;
}
@@ -196,8 +196,8 @@ static void image_panel_curves(const bContext *C, Panel *pa)
ibuf= ED_space_image_acquire_buffer(sima, &lock);
- if(ibuf) {
- if(sima->cumap==NULL)
+ if (ibuf) {
+ if (sima->cumap==NULL)
sima->cumap= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
/* curvemap black/white levels only works for RGBA */
@@ -220,12 +220,12 @@ void image_preview_event(int event)
{
int exec= 0;
- if(event==0) {
+ if (event==0) {
G.scene->r.scemode &= ~R_COMP_CROP;
exec= 1;
}
else {
- if(image_preview_active(curarea, NULL, NULL)) {
+ if (image_preview_active(curarea, NULL, NULL)) {
G.scene->r.scemode |= R_COMP_CROP;
exec= 1;
}
@@ -233,7 +233,7 @@ void image_preview_event(int event)
G.scene->r.scemode &= ~R_COMP_CROP;
}
- if(exec && G.scene->nodetree) {
+ if (exec && G.scene->nodetree) {
/* should work when no node editor in screen..., so we execute right away */
ntreeCompositTagGenerators(G.scene->nodetree);
@@ -267,7 +267,7 @@ static void preview_cb(struct ScrArea *sa, struct uiBlock *block)
int winy= (G.scene->r.size*G.scene->r.ysch)/100;
int mval[2];
- if(G.scene->r.mode & R_BORDER) {
+ if (G.scene->r.mode & R_BORDER) {
winx*= (G.scene->r.border.xmax - G.scene->r.border.xmin);
winy*= (G.scene->r.border.ymax - G.scene->r.border.ymin);
}
@@ -289,10 +289,10 @@ static void preview_cb(struct ScrArea *sa, struct uiBlock *block)
areamouseco_to_ipoco(v2d, mval, &dispf.xmax, &dispf.ymax);
/* map to render coordinates */
- disprect->xmin= dispf.xmin;
- disprect->xmax= dispf.xmax;
- disprect->ymin= dispf.ymin;
- disprect->ymax= dispf.ymax;
+ disprect->xmin = dispf.xmin;
+ disprect->xmax = dispf.xmax;
+ disprect->ymin = dispf.ymin;
+ disprect->ymax = dispf.ymax;
CLAMP(disprect->xmin, 0, winx);
CLAMP(disprect->xmax, 0, winx);
@@ -308,14 +308,14 @@ static int is_preview_allowed(ScrArea *cur)
ScrArea *sa;
/* check if another areawindow has preview set */
- for(sa=G.curscreen->areabase.first; sa; sa= sa->next) {
- if(sa!=cur && sa->spacetype==SPACE_IMAGE) {
- if(image_preview_active(sa, NULL, NULL))
+ for (sa=G.curscreen->areabase.first; sa; sa= sa->next) {
+ if (sa!=cur && sa->spacetype==SPACE_IMAGE) {
+ if (image_preview_active(sa, NULL, NULL))
return 0;
}
}
/* check image type */
- if(sima->image==NULL || sima->image->type!=IMA_TYPE_COMPOSITE)
+ if (sima->image==NULL || sima->image->type!=IMA_TYPE_COMPOSITE)
return 0;
return 1;
@@ -328,7 +328,7 @@ static void image_panel_preview(ScrArea *sa, short cntrl) // IMAGE_HANDLER_PREVI
SpaceImage *sima= sa->spacedata.first;
int ofsx, ofsy;
- if(is_preview_allowed(sa)==0) {
+ if (is_preview_allowed(sa)==0) {
rem_blockhandler(sa, IMAGE_HANDLER_PREVIEW);
G.scene->r.scemode &= ~R_COMP_CROP; /* quite weak */
return;
@@ -340,7 +340,7 @@ static void image_panel_preview(ScrArea *sa, short cntrl) // IMAGE_HANDLER_PREVI
ofsx= -150+(sa->winx/2)/sima->blockscale;
ofsy= -100+(sa->winy/2)/sima->blockscale;
- if(uiNewPanel(C, ar, block, "Preview", "Image", ofsx, ofsy, 300, 200)==0) return;
+ if (uiNewPanel(C, ar, block, "Preview", "Image", ofsx, ofsy, 300, 200)==0) return;
uiBlockSetDrawExtraFunc(block, preview_cb);
@@ -360,7 +360,7 @@ static char *slot_menu(void)
strcpy(str, "Slot %t");
a= strlen(str);
- for(slot=0; slot<IMA_MAX_RENDER_SLOT; slot++)
+ for (slot=0; slot<IMA_MAX_RENDER_SLOT; slot++)
a += sprintf(str+a, "|Slot %d %%x%d", slot+1, slot);
return str;
@@ -378,15 +378,15 @@ static char *layer_menu(RenderResult *rr, short *UNUSED(curlay))
a= strlen(str);
/* compo result */
- if(rr->rectf) {
+ if (rr->rectf) {
a+= sprintf(str+a, "|Composite %%x0");
nr= 1;
}
- else if(rr->rect32) {
+ else if (rr->rect32) {
a+= sprintf(str+a, "|Sequence %%x0");
nr= 1;
}
- for(rl= rr->layers.first; rl; rl= rl->next, nr++) {
+ for (rl= rr->layers.first; rl; rl= rl->next, nr++) {
a+= sprintf(str+a, "|%s %%x%d", rl->name, nr);
}
@@ -407,16 +407,16 @@ static char *pass_menu(RenderLayer *rl, short *curpass)
a= strlen(str);
/* rendered results don't have a Combined pass */
- if(rl==NULL || rl->rectf) {
+ if (rl==NULL || rl->rectf) {
a+= sprintf(str+a, "|Combined %%x0");
nr= 1;
}
- if(rl)
- for(rpass= rl->passes.first; rpass; rpass= rpass->next, nr++)
+ if (rl)
+ for (rpass= rl->passes.first; rpass; rpass= rpass->next, nr++)
a+= sprintf(str+a, "|%s %%x%d", rpass->name, nr);
- if(*curpass >= nr)
+ if (*curpass >= nr)
*curpass= 0;
return str;
@@ -428,7 +428,7 @@ static void set_frames_cb(bContext *C, void *ima_v, void *iuser_v)
Image *ima= ima_v;
ImageUser *iuser= iuser_v;
- if(ima->anim) {
+ if (ima->anim) {
iuser->frames = IMB_anim_get_duration(ima->anim, IMB_TC_RECORD_RUN);
BKE_image_user_calc_frame(iuser, scene->r.cfra, 0);
}
@@ -448,10 +448,10 @@ static void image_multi_inclay_cb(bContext *C, void *rr_v, void *iuser_v)
ImageUser *iuser= iuser_v;
int tot= BLI_countlist(&rr->layers);
- if(rr->rectf || rr->rect32)
+ if (rr->rectf || rr->rect32)
tot++; /* fake compo/sequencer layer */
- if(iuser->layer<tot-1) {
+ if (iuser->layer<tot-1) {
iuser->layer++;
BKE_image_multilayer_index(rr, iuser);
WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL);
@@ -461,7 +461,7 @@ static void image_multi_declay_cb(bContext *C, void *rr_v, void *iuser_v)
{
ImageUser *iuser= iuser_v;
- if(iuser->layer>0) {
+ if (iuser->layer>0) {
iuser->layer--;
BKE_image_multilayer_index(rr_v, iuser);
WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL);
@@ -473,13 +473,13 @@ static void image_multi_incpass_cb(bContext *C, void *rr_v, void *iuser_v)
ImageUser *iuser= iuser_v;
RenderLayer *rl= BLI_findlink(&rr->layers, iuser->layer);
- if(rl) {
+ if (rl) {
int tot= BLI_countlist(&rl->passes);
- if(rr->rectf || rr->rect32)
+ if (rr->rectf || rr->rect32)
tot++; /* fake compo/sequencer layer */
- if(iuser->pass<tot-1) {
+ if (iuser->pass<tot-1) {
iuser->pass++;
BKE_image_multilayer_index(rr, iuser);
WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL);
@@ -490,7 +490,7 @@ static void image_multi_decpass_cb(bContext *C, void *rr_v, void *iuser_v)
{
ImageUser *iuser= iuser_v;
- if(iuser->pass>0) {
+ if (iuser->pass>0) {
iuser->pass--;
BKE_image_multilayer_index(rr_v, iuser);
WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL);
@@ -530,26 +530,26 @@ static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, Image
wmenu3= (3*w)/6;
/* menu buts */
- if(render_slot) {
+ if (render_slot) {
strp= slot_menu();
- but= uiDefButS(block, MENU, 0, strp, 0, 0, wmenu1, UI_UNIT_Y, render_slot, 0,0,0,0, "Select Slot");
+ but = uiDefButS(block, MENU, 0, strp, 0, 0, wmenu1, UI_UNIT_Y, render_slot, 0,0,0,0, "Select Slot");
uiButSetFunc(but, image_multi_cb, rr, iuser);
MEM_freeN(strp);
}
- if(rr) {
+ if (rr) {
strp= layer_menu(rr, &iuser->layer);
- but= uiDefButS(block, MENU, 0, strp, 0, 0, wmenu2, UI_UNIT_Y, &iuser->layer, 0,0,0,0, "Select Layer");
+ but = uiDefButS(block, MENU, 0, strp, 0, 0, wmenu2, UI_UNIT_Y, &iuser->layer, 0,0,0,0, "Select Layer");
uiButSetFunc(but, image_multi_cb, rr, iuser);
MEM_freeN(strp);
layer = iuser->layer;
- if(rr->rectf || rr->rect32)
+ if (rr->rectf || rr->rect32)
layer--; /* fake compo/sequencer layer */
rl= BLI_findlink(&rr->layers, layer); /* return NULL is meant to be */
strp= pass_menu(rl, &iuser->pass);
- but= uiDefButS(block, MENU, 0, strp, 0, 0, wmenu3, UI_UNIT_Y, &iuser->pass, 0,0,0,0, "Select Pass");
+ but = uiDefButS(block, MENU, 0, strp, 0, 0, wmenu3, UI_UNIT_Y, &iuser->pass, 0,0,0,0, "Select Pass");
uiButSetFunc(but, image_multi_cb, rr, iuser);
MEM_freeN(strp);
}
@@ -564,25 +564,25 @@ static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, RenderResult *rr,
row= uiLayoutRow(layout, 1);
- if(rr==NULL || iuser==NULL)
+ if (rr==NULL || iuser==NULL)
return;
- if(rr->layers.first==NULL) {
+ if (rr->layers.first==NULL) {
uiItemL(row, "No Layers in Render Result", ICON_NONE);
return;
}
/* decrease, increase arrows */
- but= uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Layer");
+ but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Layer");
uiButSetFunc(but, image_multi_declay_cb, rr, iuser);
- but= uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Layer");
+ but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Layer");
uiButSetFunc(but, image_multi_inclay_cb, rr, iuser);
uiblock_layer_pass_buttons(row, rr, iuser, 230 * dpi_fac, render_slot);
/* decrease, increase arrows */
- but= uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Pass");
+ but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Pass");
uiButSetFunc(but, image_multi_decpass_cb, rr, iuser);
- but= uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Pass");
+ but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Pass");
uiButSetFunc(but, image_multi_incpass_cb, rr, iuser);
uiBlockEndAlign(block);
@@ -626,17 +626,17 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
char str[128];
void *lock;
- if(!ptr->data)
+ if (!ptr->data)
return;
prop= RNA_struct_find_property(ptr, propname);
- if(!prop) {
+ if (!prop) {
printf("%s: property not found: %s.%s\n",
__func__, RNA_struct_identifier(ptr->type), propname);
return;
}
- if(RNA_property_type(prop) != PROP_POINTER) {
+ if (RNA_property_type(prop) != PROP_POINTER) {
printf("%s: expected pointer property for %s.%s\n",
__func__, RNA_struct_identifier(ptr->type), propname);
return;
@@ -655,13 +655,13 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
uiLayoutSetContextPointer(layout, "edit_image", &imaptr);
- if(!compact)
+ if (!compact)
uiTemplateID(layout, C, ptr, propname, "IMAGE_OT_new", "IMAGE_OT_open", NULL);
- if(ima) {
+ if (ima) {
uiBlockSetNFunc(block, rna_update_cb, MEM_dupallocN(cb), NULL);
- if(ima->source == IMA_SRC_VIEWER) {
+ if (ima->source == IMA_SRC_VIEWER) {
ibuf= BKE_image_acquire_ibuf(ima, iuser, &lock);
image_info(scene, iuser, ima, ibuf, str);
BKE_image_release_ibuf(ima, lock);
@@ -669,18 +669,18 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
uiItemL(layout, ima->id.name+2, ICON_NONE);
uiItemL(layout, str, ICON_NONE);
- if(ima->type==IMA_TYPE_COMPOSITE) {
+ if (ima->type==IMA_TYPE_COMPOSITE) {
// XXX not working yet
#if 0
iuser= ntree_get_active_iuser(scene->nodetree);
- if(iuser) {
+ if (iuser) {
uiBlockBeginAlign(block);
uiDefIconTextBut(block, BUT, B_SIMA_RECORD, ICON_REC, "Record", 10,120,100,20, 0, 0, 0, 0, 0, "");
uiDefIconTextBut(block, BUT, B_SIMA_PLAY, ICON_PLAY, "Play", 110,120,100,20, 0, 0, 0, 0, 0, "");
- but= uiDefBut(block, BUT, B_NOP, "Free Cache", 210,120,100,20, 0, 0, 0, 0, 0, "");
+ but = uiDefBut(block, BUT, B_NOP, "Free Cache", 210,120,100,20, 0, 0, 0, 0, 0, "");
uiButSetFunc(but, image_freecache_cb, ima, NULL);
- if(iuser->frames)
+ if (iuser->frames)
BLI_snprintf(str, sizeof(str), "(%d) Frames:", iuser->framenr);
else strcpy(str, "Frames:");
uiBlockBeginAlign(block);
@@ -689,7 +689,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
}
#endif
}
- else if(ima->type==IMA_TYPE_R_RESULT) {
+ else if (ima->type==IMA_TYPE_R_RESULT) {
/* browse layer/passes */
Render *re= RE_GetRender(scene->id.name);
RenderResult *rr= RE_AcquireResultRead(re);
@@ -700,7 +700,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
else {
uiItemR(layout, &imaptr, "source", 0, NULL, ICON_NONE);
- if(ima->source != IMA_SRC_GENERATED) {
+ if (ima->source != IMA_SRC_GENERATED) {
row= uiLayoutRow(layout, 1);
if (ima->packedfile)
uiItemO(row, "", ICON_PACKAGE, "image.unpack");
@@ -716,8 +716,8 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
// XXX what was this for?
#if 0
/* check for re-render, only buttons */
- if(imagechanged==B_IMAGECHANGED) {
- if(iuser->flag & IMA_ANIM_REFRESHED) {
+ if (imagechanged==B_IMAGECHANGED) {
+ if (iuser->flag & IMA_ANIM_REFRESHED) {
iuser->flag &= ~IMA_ANIM_REFRESHED;
WM_event_add_notifier(C, NC_IMAGE, ima);
}
@@ -725,11 +725,11 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
#endif
/* multilayer? */
- if(ima->type==IMA_TYPE_MULTILAYER && ima->rr) {
+ if (ima->type==IMA_TYPE_MULTILAYER && ima->rr) {
uiblock_layer_pass_arrow_buttons(layout, ima->rr, iuser, NULL);
}
- else if(ima->source != IMA_SRC_GENERATED) {
- if(compact == 0) {
+ else if (ima->source != IMA_SRC_GENERATED) {
+ if (compact == 0) {
ibuf= BKE_image_acquire_ibuf(ima, iuser, &lock);
image_info(scene, iuser, ima, ibuf, str);
BKE_image_release_ibuf(ima, lock);
@@ -737,8 +737,8 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
}
}
- if(ima->source != IMA_SRC_GENERATED) {
- if(compact == 0) { /* background image view doesnt need these */
+ if (ima->source != IMA_SRC_GENERATED) {
+ if (compact == 0) { /* background image view doesnt need these */
uiItemS(layout);
split= uiLayoutSplit(layout, 0, 0);
@@ -755,7 +755,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
}
}
- if(ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
+ if (ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
uiItemS(layout);
split= uiLayoutSplit(layout, 0, 0);
@@ -764,9 +764,9 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
BLI_snprintf(str, sizeof(str), "(%d) Frames", iuser->framenr);
uiItemR(col, userptr, "frame_duration", 0, str, ICON_NONE);
- if(ima->anim) {
+ if (ima->anim) {
block= uiLayoutGetBlock(col);
- but= uiDefBut(block, BUT, 0, "Match Movie Length", 0, 0, UI_UNIT_X*2, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Set the number of frames to match the movie or sequence");
+ but = uiDefBut(block, BUT, 0, "Match Movie Length", 0, 0, UI_UNIT_X*2, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Set the number of frames to match the movie or sequence");
uiButSetFunc(but, set_frames_cb, ima, iuser);
}
@@ -780,7 +780,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
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) {
+ else if (ima->source==IMA_SRC_GENERATED) {
split= uiLayoutSplit(layout, 0, 0);
col= uiLayoutColumn(split, 1);
@@ -818,7 +818,7 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr)
uiItemR(sub, imfptr, "color_mode", UI_ITEM_R_EXPAND, "Color", ICON_NONE);
/* only display depth setting if multiple depths can be used */
- if((ELEM6(depth_ok,
+ if ((ELEM6(depth_ok,
R_IMF_CHAN_DEPTH_1,
R_IMF_CHAN_DEPTH_8,
R_IMF_CHAN_DEPTH_12,
@@ -877,7 +877,7 @@ void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser
RenderResult *rr;
/* render layers and passes */
- if(ima && iuser) {
+ if (ima && iuser) {
const float dpi_fac= UI_DPI_FAC;
rr= BKE_image_acquire_renderresult(scene, ima);
uiblock_layer_pass_buttons(layout, rr, iuser, 160 * dpi_fac, (ima->type==IMA_TYPE_R_RESULT)? &ima->render_slot: NULL);
@@ -909,7 +909,7 @@ static int image_properties(bContext *C, wmOperator *UNUSED(op))
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= image_has_buttons_region(sa);
- if(ar)
+ if (ar)
ED_region_toggle_hidden(C, ar);
return OPERATOR_FINISHED;
@@ -917,15 +917,15 @@ static int image_properties(bContext *C, wmOperator *UNUSED(op))
void IMAGE_OT_properties(wmOperatorType *ot)
{
- ot->name= "Properties";
- ot->idname= "IMAGE_OT_properties";
- ot->description= "Toggle display properties panel";
+ ot->name = "Properties";
+ ot->idname = "IMAGE_OT_properties";
+ ot->description = "Toggle display properties panel";
- ot->exec= image_properties;
- ot->poll= ED_operator_image_active;
+ ot->exec = image_properties;
+ ot->poll = ED_operator_image_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
static int image_scopes(bContext *C, wmOperator *UNUSED(op))
@@ -933,7 +933,7 @@ static int image_scopes(bContext *C, wmOperator *UNUSED(op))
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= image_has_scope_region(sa);
- if(ar)
+ if (ar)
ED_region_toggle_hidden(C, ar);
return OPERATOR_FINISHED;
@@ -941,14 +941,14 @@ static int image_scopes(bContext *C, wmOperator *UNUSED(op))
void IMAGE_OT_scopes(wmOperatorType *ot)
{
- ot->name= "Scopes";
- ot->idname= "IMAGE_OT_scopes";
- ot->description= "Toggle display scopes panel";
+ ot->name = "Scopes";
+ ot->idname = "IMAGE_OT_scopes";
+ ot->description = "Toggle display scopes panel";
- ot->exec= image_scopes;
- ot->poll= ED_operator_image_active;
+ ot->exec = image_scopes;
+ ot->poll = ED_operator_image_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index e91a44e0358..59ca1925abf 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -80,14 +80,14 @@ static void image_verify_buffer_float(Image *ima, ImBuf *ibuf, int color_manage)
{
/* detect if we need to redo the curve map.
* ibuf->rect is zero for compositor and render results after change
- * convert to 32 bits always... drawing float rects isnt supported well (atis)
+ * convert to 32 bits always... drawing float rects isn't supported well (atis)
*
* NOTE: if float buffer changes, we have to manually remove the rect
*/
- if(ibuf->rect_float && (ibuf->rect==NULL || (ibuf->userflags & IB_RECT_INVALID)) ) {
- if(color_manage) {
- if(ima && ima->source == IMA_SRC_VIEWER)
+ if (ibuf->rect_float && (ibuf->rect==NULL || (ibuf->userflags & IB_RECT_INVALID)) ) {
+ if (color_manage) {
+ if (ima && ima->source == IMA_SRC_VIEWER)
ibuf->profile = IB_PROFILE_LINEAR_RGB;
}
else
@@ -103,7 +103,7 @@ static void draw_render_info(Scene *scene, Image *ima, ARegion *ar)
rr= BKE_image_acquire_renderresult(scene, ima);
- if(rr && rr->text) {
+ if (rr && rr->text) {
ED_region_info_draw(ar, rr->text, 1, 0.25);
}
@@ -147,14 +147,14 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int
BLF_draw_ascii(blf_mono_font, str, sizeof(str));
dx += BLF_width(blf_mono_font, str);
- if(zp) {
+ if (zp) {
glColor3ub(255, 255, 255);
BLI_snprintf(str, sizeof(str), " Z:%-.4f |", 0.5f+0.5f*(((float)*zp)/(float)0x7fffffff));
BLF_position(blf_mono_font, dx, 6, 0);
BLF_draw_ascii(blf_mono_font, str, sizeof(str));
dx += BLF_width(blf_mono_font, str);
}
- if(zpf) {
+ if (zpf) {
glColor3ub(255, 255, 255);
BLI_snprintf(str, sizeof(str), " Z:%-.3f |", *zpf);
BLF_position(blf_mono_font, dx, 6, 0);
@@ -162,7 +162,7 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int
dx += BLF_width(blf_mono_font, str);
}
- if(channels >= 3) {
+ if (channels >= 3) {
glColor3ubv(red);
if (fp)
BLI_snprintf(str, sizeof(str), " R:%-.4f", fp[0]);
@@ -196,7 +196,7 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int
BLF_draw_ascii(blf_mono_font, str, sizeof(str));
dx += BLF_width(blf_mono_font, str);
- if(channels == 4) {
+ if (channels == 4) {
glColor3ub(255, 255, 255);
if (fp)
BLI_snprintf(str, sizeof(str), " A:%-.4f", fp[3]);
@@ -265,10 +265,20 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int
glVertex2f(dx+30, 17);
glVertex2f(dx+30, 3);
glEnd();
+
+ /* draw outline */
+ glColor3ub(128, 128, 128);
+ glBegin(GL_LINE_LOOP);
+ glVertex2f(dx, 3);
+ glVertex2f(dx, 17);
+ glVertex2f(dx+30, 17);
+ glVertex2f(dx+30, 3);
+ glEnd();
+
dx += 35;
glColor3ub(255, 255, 255);
- if(channels == 1) {
+ if (channels == 1) {
if (fp) {
rgb_to_hsv(fp[0], fp[0], fp[0], &hue, &sat, &val);
rgb_to_yuv(fp[0], fp[0], fp[0], &lum, &u, &v);
@@ -288,7 +298,7 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int
BLF_draw_ascii(blf_mono_font, str, sizeof(str));
dx += BLF_width(blf_mono_font, str);
}
- else if(channels >= 3) {
+ else if (channels >= 3) {
if (fp) {
rgb_to_hsv(fp[0], fp[1], fp[2], &hue, &sat, &val);
rgb_to_yuv(fp[0], fp[1], fp[2], &lum, &u, &v);
@@ -339,16 +349,16 @@ static void draw_image_grid(ARegion *ar, float zoomx, float zoomy)
/* gridsize adapted to zoom level */
gridsize= 0.5f*(zoomx+zoomy);
- if(gridsize<=0.0f) return;
+ if (gridsize<=0.0f) return;
- if(gridsize<1.0f) {
- while(gridsize<1.0f) {
+ if (gridsize<1.0f) {
+ while (gridsize<1.0f) {
gridsize*= 4.0f;
gridstep*= 4.0f;
}
}
else {
- while(gridsize>=4.0f) {
+ while (gridsize>=4.0f) {
gridsize/= 4.0f;
gridstep/= 4.0f;
}
@@ -361,7 +371,7 @@ static void draw_image_grid(ARegion *ar, float zoomx, float zoomy)
fac= 0.0f;
glBegin(GL_LINES);
- while(fac<1.0f) {
+ while (fac<1.0f) {
glVertex2f(x1, y1*(1.0f-fac) + y2*fac);
glVertex2f(x2, y1*(1.0f-fac) + y2*fac);
glVertex2f(x1*(1.0f-fac) + x2*fac, y1);
@@ -373,7 +383,7 @@ static void draw_image_grid(ARegion *ar, float zoomx, float zoomy)
UI_ThemeColor(TH_BACK);
fac= 0.0f;
- while(fac<1.0f) {
+ while (fac<1.0f) {
glVertex2f(x1, y1*(1.0f-fac) + y2*fac);
glVertex2f(x2, y1*(1.0f-fac) + y2*fac);
glVertex2f(x1*(1.0f-fac) + x2*fac, y1);
@@ -411,7 +421,7 @@ static void sima_draw_alpha_pixels(float x1, float y1, int rectx, int recty, uns
{
/* swap bytes, so alpha is most significant one, then just draw it as luminance int */
- if(ENDIAN_ORDER == B_ENDIAN)
+ if (ENDIAN_ORDER == B_ENDIAN)
glPixelStorei(GL_UNPACK_SWAP_BYTES, 1);
glaDrawPixelsSafe(x1, y1, rectx, recty, rectx, GL_LUMINANCE, GL_UNSIGNED_INT, recti);
@@ -423,7 +433,7 @@ static void sima_draw_alpha_pixelsf(float x1, float y1, int rectx, int recty, fl
float *trectf= MEM_mallocN(rectx*recty*4, "temp");
int a, b;
- for(a= rectx*recty -1, b= 4*a+3; a>=0; a--, b-=4)
+ for (a= rectx*recty -1, b= 4*a+3; a>=0; a--, b-=4)
trectf[a]= rectf[b];
glaDrawPixelsSafe(x1, y1, rectx, recty, rectx, GL_LUMINANCE, GL_FLOAT, trectf);
@@ -463,7 +473,7 @@ static void sima_draw_zbuffloat_pixels(Scene *scene, float x1, float y1, int rec
float bias, scale, *rectf, clipend;
int a;
- if(scene->camera && scene->camera->type==OB_CAMERA) {
+ if (scene->camera && scene->camera->type==OB_CAMERA) {
bias= ((Camera *)scene->camera->data)->clipsta;
clipend= ((Camera *)scene->camera->data)->clipend;
scale= 1.0f/(clipend-bias);
@@ -475,10 +485,10 @@ static void sima_draw_zbuffloat_pixels(Scene *scene, float x1, float y1, int rec
}
rectf= MEM_mallocN(rectx*recty*4, "temp");
- for(a= rectx*recty -1; a>=0; a--) {
- if(rect_float[a]>clipend)
+ for (a= rectx*recty -1; a>=0; a--) {
+ if (rect_float[a]>clipend)
rectf[a]= 0.0f;
- else if(rect_float[a]<bias)
+ else if (rect_float[a]<bias)
rectf[a]= 1.0f;
else {
rectf[a]= 1.0f - (rect_float[a]-bias)*scale;
@@ -502,22 +512,22 @@ static void draw_image_buffer(SpaceImage *sima, ARegion *ar, Scene *scene, Image
UI_view2d_to_region_no_clip(&ar->v2d, fx, fy, &x, &y);
/* this part is generic image display */
- if(sima->flag & SI_SHOW_ALPHA) {
- if(ibuf->rect)
+ if (sima->flag & SI_SHOW_ALPHA) {
+ if (ibuf->rect)
sima_draw_alpha_pixels(x, y, ibuf->x, ibuf->y, ibuf->rect);
- else if(ibuf->rect_float && ibuf->channels==4)
+ else if (ibuf->rect_float && ibuf->channels==4)
sima_draw_alpha_pixelsf(x, y, ibuf->x, ibuf->y, ibuf->rect_float);
}
- else if(sima->flag & SI_SHOW_ZBUF && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1))) {
- if(ibuf->zbuf)
+ else if (sima->flag & SI_SHOW_ZBUF && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1))) {
+ if (ibuf->zbuf)
sima_draw_zbuf_pixels(x, y, ibuf->x, ibuf->y, ibuf->zbuf);
- else if(ibuf->zbuf_float)
+ else if (ibuf->zbuf_float)
sima_draw_zbuffloat_pixels(scene, x, y, ibuf->x, ibuf->y, ibuf->zbuf_float);
- else if(ibuf->channels==1)
+ else if (ibuf->channels==1)
sima_draw_zbuffloat_pixels(scene, x, y, ibuf->x, ibuf->y, ibuf->rect_float);
}
else {
- if(sima->flag & SI_USE_ALPHA) {
+ if (sima->flag & SI_USE_ALPHA) {
unsigned char col1[3]= {100, 100, 100}, col2[3]= {160, 160, 160};
sima_draw_alpha_backdrop(x, y, ibuf->x, ibuf->y, zoomx, zoomy, col1, col2);
@@ -529,14 +539,14 @@ static void draw_image_buffer(SpaceImage *sima, ARegion *ar, Scene *scene, Image
* convert them, and optionally apply curves */
image_verify_buffer_float(ima, ibuf, color_manage);
- if(ibuf->rect)
+ if (ibuf->rect)
glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
#if 0
else
glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_FLOAT, ibuf->rect_float);
#endif
- if(sima->flag & SI_USE_ALPHA)
+ if (sima->flag & SI_USE_ALPHA)
glDisable(GL_BLEND);
}
@@ -558,7 +568,7 @@ static unsigned int *get_part_from_ibuf(ImBuf *ibuf, short startx, short starty,
rp=rectmain= MEM_mallocN(heigth*len*sizeof(int), "rect");
- for(y=0; y<heigth; y++) {
+ for (y=0; y<heigth; y++) {
memcpy(rp, rt, len*4);
rt+= ibuf->x;
rp+= len;
@@ -573,12 +583,12 @@ static void draw_image_buffer_tiled(SpaceImage *sima, ARegion *ar, Scene *scene,
int color_manage = scene->r.color_mgt_flag & R_COLOR_MANAGEMENT;
/* verify valid values, just leave this a while */
- if(ima->xrep<1) return;
- if(ima->yrep<1) return;
+ if (ima->xrep<1) return;
+ if (ima->yrep<1) return;
glPixelZoom(zoomx, zoomy);
- if(sima->curtile >= ima->xrep*ima->yrep)
+ if (sima->curtile >= ima->xrep*ima->yrep)
sima->curtile = ima->xrep*ima->yrep - 1;
/* create char buffer from float if needed */
@@ -592,8 +602,8 @@ static void draw_image_buffer_tiled(SpaceImage *sima, ARegion *ar, Scene *scene,
rect= get_part_from_ibuf(ibuf, sx, sy, sx+dx, sy+dy);
/* draw repeated */
- for(sy=0; sy+dy<=ibuf->y; sy+= dy) {
- for(sx=0; sx+dx<=ibuf->x; sx+= dx) {
+ for (sy=0; sy+dy<=ibuf->y; sy+= dy) {
+ for (sx=0; sx+dx<=ibuf->x; sx+= dx) {
UI_view2d_to_region_no_clip(&ar->v2d, fx + (float)sx/(float)ibuf->x, fy + (float)sy/(float)ibuf->y, &x, &y);
glaDrawPixelsSafe(x, y, dx, dy, dx, GL_RGBA, GL_UNSIGNED_BYTE, rect);
@@ -616,16 +626,16 @@ static void draw_image_buffer_repeated(SpaceImage *sima, ARegion *ar, Scene *sce
int x;
- for(x=xmin; x<xmax; x++) {
+ for (x=xmin; x<xmax; x++) {
int y;
- for(y=ymin; y<ymax; y++) {
- if(ima && (ima->tpageflag & IMA_TILES))
+ for (y=ymin; y<ymax; y++) {
+ if (ima && (ima->tpageflag & IMA_TILES))
draw_image_buffer_tiled(sima, ar, scene, ima, ibuf, x, y, zoomx, zoomy);
else
draw_image_buffer(sima, ar, scene, ima, ibuf, x, y, zoomx, zoomy);
/* only draw until running out of time */
- if((PIL_check_seconds_timer() - time_current) > 0.25)
+ if ((PIL_check_seconds_timer() - time_current) > 0.25)
return;
}
}
@@ -669,15 +679,15 @@ static void draw_image_view_tool(Scene *scene)
float radius;
int draw= 0;
- if(brush) {
- if(settings->imapaint.flag & IMAGEPAINT_DRAWING) {
- if(settings->imapaint.flag & IMAGEPAINT_DRAW_TOOL_DRAWING)
+ if (brush) {
+ if (settings->imapaint.flag & IMAGEPAINT_DRAWING) {
+ if (settings->imapaint.flag & IMAGEPAINT_DRAW_TOOL_DRAWING)
draw= 1;
}
- else if(settings->imapaint.flag & IMAGEPAINT_DRAW_TOOL)
+ else if (settings->imapaint.flag & IMAGEPAINT_DRAW_TOOL)
draw= 1;
- if(draw) {
+ if (draw) {
getmouseco_areawin(mval);
radius= brush_size(brush)*G.sima->zoom;
@@ -699,16 +709,16 @@ static unsigned char *get_alpha_clone_image(Scene *scene, int *width, int *heigh
unsigned int size, alpha;
unsigned char *rect, *cp;
- if(!brush || !brush->clone.image)
+ if (!brush || !brush->clone.image)
return NULL;
ibuf= BKE_image_get_ibuf(brush->clone.image, NULL);
- if(!ibuf || !ibuf->rect)
+ if (!ibuf || !ibuf->rect)
return NULL;
rect= MEM_dupallocN(ibuf->rect);
- if(!rect)
+ if (!rect)
return NULL;
*width= ibuf->x;
@@ -718,7 +728,7 @@ static unsigned char *get_alpha_clone_image(Scene *scene, int *width, int *heigh
alpha= (unsigned char)255*brush->clone.alpha;
cp= rect;
- while(size-- > 0) {
+ while (size-- > 0) {
cp[3]= alpha;
cp += 4;
}
@@ -734,12 +744,12 @@ static void draw_image_paint_helpers(ARegion *ar, Scene *scene, float zoomx, flo
brush= paint_brush(&scene->toolsettings->imapaint.paint);
- if(brush && (brush->imagepaint_tool == PAINT_TOOL_CLONE)) {
+ if (brush && (brush->imagepaint_tool == PAINT_TOOL_CLONE)) {
/* this is not very efficient, but glDrawPixels doesn't allow
* drawing with alpha */
clonerect= get_alpha_clone_image(scene, &w, &h);
- if(clonerect) {
+ if (clonerect) {
UI_view2d_to_region_no_clip(&ar->v2d, brush->clone.offset[0], brush->clone.offset[1], &x, &y);
glPixelZoom(zoomx, zoomy);
@@ -770,13 +780,13 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene)
#if 0
what_image(sima);
- if(sima->image) {
+ if (sima->image) {
ED_image_aspect(sima->image, &xuser_asp, &yuser_asp);
/* UGLY hack? until now iusers worked fine... but for flipbook viewer we need this */
- if(sima->image->type==IMA_TYPE_COMPOSITE) {
+ if (sima->image->type==IMA_TYPE_COMPOSITE) {
ImageUser *iuser= ntree_get_active_iuser(scene->nodetree);
- if(iuser) {
+ if (iuser) {
BKE_image_user_calc_imanr(iuser, scene->r.cfra, 0);
sima->iuser= *iuser;
}
@@ -795,26 +805,26 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene)
show_render= (show_viewer && ima->type == IMA_TYPE_R_RESULT);
/* draw the image or grid */
- if(ibuf==NULL)
+ if (ibuf==NULL)
draw_image_grid(ar, zoomx, zoomy);
- else if(sima->flag & SI_DRAW_TILE)
+ else if (sima->flag & SI_DRAW_TILE)
draw_image_buffer_repeated(sima, ar, scene, ima, ibuf, zoomx, zoomy);
- else if(ima && (ima->tpageflag & IMA_TILES))
+ else if (ima && (ima->tpageflag & IMA_TILES))
draw_image_buffer_tiled(sima, ar, scene, ima, ibuf, 0.0f, 0.0, zoomx, zoomy);
else
draw_image_buffer(sima, ar, scene, ima, ibuf, 0.0f, 0.0f, zoomx, zoomy);
/* paint helpers */
- if(sima->flag & SI_DRAWTOOL)
+ if (sima->flag & SI_DRAWTOOL)
draw_image_paint_helpers(ar, scene, zoomx, zoomy);
/* XXX integrate this code */
#if 0
- if(ibuf) {
+ if (ibuf) {
float xoffs=0.0f, yoffs= 0.0f;
- if(image_preview_active(sa, &xim, &yim)) {
+ if (image_preview_active(sa, &xim, &yim)) {
xoffs= scene->r.disprect.xmin;
yoffs= scene->r.disprect.ymin;
glColor3ub(0,0,0);
@@ -829,7 +839,7 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene)
ED_space_image_release_buffer(sima, lock);
/* render info */
- if(ima && show_render)
+ if (ima && show_render)
draw_render_info(scene, ima, ar);
}
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index ae47125fa84..be53b03bec6 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -96,15 +96,15 @@ static void sima_zoom_set(SpaceImage *sima, ARegion *ar, float zoom, float locat
width *= sima->zoom;
height *= sima->zoom;
- if((width < 4) && (height < 4))
+ if ((width < 4) && (height < 4))
sima->zoom= oldzoom;
- else if((ar->winrct.xmax - ar->winrct.xmin) <= sima->zoom)
+ else if ((ar->winrct.xmax - ar->winrct.xmin) <= sima->zoom)
sima->zoom= oldzoom;
- else if((ar->winrct.ymax - ar->winrct.ymin) <= sima->zoom)
+ else if ((ar->winrct.ymax - ar->winrct.ymin) <= sima->zoom)
sima->zoom= oldzoom;
}
- if((U.uiflag & USER_ZOOM_TO_MOUSEPOS) && location) {
+ if ((U.uiflag & USER_ZOOM_TO_MOUSEPOS) && location) {
float aspx, aspy, w, h;
ED_space_image_size(sima, &width, &height);
@@ -133,15 +133,15 @@ static int image_poll(bContext *C)
static int space_image_buffer_exists_poll(bContext *C)
{
SpaceImage *sima= CTX_wm_space_image(C);
- if(sima && sima->spacetype==SPACE_IMAGE)
- if(ED_space_image_has_buffer(sima))
+ if (sima && sima->spacetype==SPACE_IMAGE)
+ if (ED_space_image_has_buffer(sima))
return 1;
return 0;
}
static int space_image_file_exists_poll(bContext *C)
{
- if(space_image_buffer_exists_poll(C)) {
+ if (space_image_buffer_exists_poll(C)) {
Main *bmain= CTX_data_main(C);
SpaceImage *sima= CTX_wm_space_image(C);
ImBuf *ibuf;
@@ -150,11 +150,11 @@ static int space_image_file_exists_poll(bContext *C)
char name[FILE_MAX];
ibuf= ED_space_image_acquire_buffer(sima, &lock);
- if(ibuf) {
+ if (ibuf) {
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) == FALSE) {
@@ -174,7 +174,7 @@ static int space_image_file_exists_poll(bContext *C)
static int space_image_poll(bContext *C)
{
SpaceImage *sima= CTX_wm_space_image(C);
- if(sima && sima->spacetype==SPACE_IMAGE && sima->image)
+ if (sima && sima->spacetype==SPACE_IMAGE && sima->image)
return 1;
return 0;
}
@@ -184,7 +184,7 @@ int space_image_main_area_poll(bContext *C)
SpaceImage *sima= CTX_wm_space_image(C);
// XXX ARegion *ar= CTX_wm_region(C);
- if(sima)
+ if (sima)
return 1; // XXX (ar && ar->type->regionid == RGN_TYPE_WINDOW);
return 0;
@@ -196,7 +196,7 @@ int space_image_main_area_not_uv_brush_poll(bContext *C)
SpaceImage *sima= CTX_wm_space_image(C);
ToolSettings *toolsettings = CTX_data_scene(C)->toolsettings;
- if(sima && !toolsettings->uvsculpt)
+ if (sima && !toolsettings->uvsculpt)
return 1;
return 0;
@@ -208,8 +208,8 @@ static int space_image_image_sample_poll(bContext *C)
Object *obedit= CTX_data_edit_object(C);
ToolSettings *toolsettings = CTX_data_scene(C)->toolsettings;
- if(obedit){
- if(ED_space_image_show_uvedit(sima, obedit) && (toolsettings->use_uv_sculpt))
+ if (obedit) {
+ if (ED_space_image_show_uvedit(sima, obedit) && (toolsettings->use_uv_sculpt))
return 0;
}
return space_image_main_area_poll(C);
@@ -244,7 +244,7 @@ static void image_view_pan_exit(bContext *C, wmOperator *op, int cancel)
SpaceImage *sima= CTX_wm_space_image(C);
ViewPanData *vpd= op->customdata;
- if(cancel) {
+ if (cancel) {
sima->xof= vpd->xof;
sima->yof= vpd->yof;
ED_region_tag_redraw(CTX_wm_region(C));
@@ -267,7 +267,7 @@ static int image_view_pan_exec(bContext *C, wmOperator *op)
/* XXX notifier? */
#if 0
- if(image_preview_active(curarea, NULL, NULL)) {
+ if (image_preview_active(curarea, NULL, NULL)) {
/* recalculates new preview rect */
scrarea_do_windraw(curarea);
image_preview_event(2);
@@ -312,7 +312,7 @@ static int image_view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
image_view_pan_exec(C, op);
break;
default:
- if(event->type==vpd->event_type && event->val==KM_RELEASE) {
+ if (event->type==vpd->event_type && event->val==KM_RELEASE) {
image_view_pan_exit(C, op, 0);
return OPERATOR_FINISHED;
}
@@ -331,18 +331,18 @@ static int image_view_pan_cancel(bContext *C, wmOperator *op)
void IMAGE_OT_view_pan(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Pan";
- ot->idname= "IMAGE_OT_view_pan";
+ ot->name = "View Pan";
+ ot->idname = "IMAGE_OT_view_pan";
/* api callbacks */
- ot->exec= image_view_pan_exec;
- ot->invoke= image_view_pan_invoke;
- ot->modal= image_view_pan_modal;
- ot->cancel= image_view_pan_cancel;
- ot->poll= space_image_main_area_poll;
+ ot->exec = image_view_pan_exec;
+ ot->invoke = image_view_pan_invoke;
+ ot->modal = image_view_pan_modal;
+ ot->cancel = image_view_pan_cancel;
+ ot->poll = space_image_main_area_poll;
/* flags */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
/* properties */
RNA_def_float_vector(ot->srna, "offset", 2, NULL, -FLT_MAX, FLT_MAX,
@@ -382,7 +382,7 @@ static void image_view_zoom_exit(bContext *C, wmOperator *op, int cancel)
SpaceImage *sima= CTX_wm_space_image(C);
ViewZoomData *vpd= op->customdata;
- if(cancel) {
+ if (cancel) {
sima->zoom= vpd->zoom;
ED_region_tag_redraw(CTX_wm_region(C));
}
@@ -402,7 +402,7 @@ static int image_view_zoom_exec(bContext *C, wmOperator *op)
/* XXX notifier? */
#if 0
- if(image_preview_active(curarea, NULL, NULL)) {
+ if (image_preview_active(curarea, NULL, NULL)) {
/* recalculates new preview rect */
scrarea_do_windraw(curarea);
image_preview_event(2);
@@ -449,7 +449,7 @@ static int image_view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
ED_region_tag_redraw(CTX_wm_region(C));
break;
default:
- if(event->type==vpd->event_type && event->val==KM_RELEASE) {
+ if (event->type==vpd->event_type && event->val==KM_RELEASE) {
image_view_zoom_exit(C, op, 0);
return OPERATOR_FINISHED;
}
@@ -468,18 +468,18 @@ static int image_view_zoom_cancel(bContext *C, wmOperator *op)
void IMAGE_OT_view_zoom(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Zoom";
- ot->idname= "IMAGE_OT_view_zoom";
+ ot->name = "View Zoom";
+ ot->idname = "IMAGE_OT_view_zoom";
/* api callbacks */
- ot->exec= image_view_zoom_exec;
- ot->invoke= image_view_zoom_invoke;
- ot->modal= image_view_zoom_modal;
- ot->cancel= image_view_zoom_cancel;
- ot->poll= space_image_main_area_poll;
+ ot->exec = image_view_zoom_exec;
+ ot->invoke = image_view_zoom_invoke;
+ ot->modal = image_view_zoom_modal;
+ ot->cancel = image_view_zoom_cancel;
+ ot->poll = space_image_main_area_poll;
/* flags */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
/* properties */
RNA_def_float(ot->srna, "factor", 0.0f, 0.0f, FLT_MAX,
@@ -536,11 +536,11 @@ static int image_view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *
void IMAGE_OT_view_ndof(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "NDOF Pan/Zoom";
- ot->idname= "IMAGE_OT_view_ndof";
+ ot->name = "NDOF Pan/Zoom";
+ ot->idname = "IMAGE_OT_view_ndof";
/* api callbacks */
- ot->invoke= image_view_ndof_invoke;
+ ot->invoke = image_view_ndof_invoke;
}
/********************** view all operator *********************/
@@ -570,7 +570,7 @@ static int image_view_all_exec(bContext *C, wmOperator *UNUSED(op))
width = ar->winrct.xmax - ar->winrct.xmin + 1;
height = ar->winrct.ymax - ar->winrct.ymin + 1;
- if((w >= width || h >= height) && (width > 0 && height > 0)) {
+ if ((w >= width || h >= height) && (width > 0 && height > 0)) {
/* find the zoom value that will fit the image in the image space */
zoomx= width/w;
zoomy= height/h;
@@ -589,12 +589,12 @@ static int image_view_all_exec(bContext *C, wmOperator *UNUSED(op))
void IMAGE_OT_view_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View All";
- ot->idname= "IMAGE_OT_view_all";
+ ot->name = "View All";
+ ot->idname = "IMAGE_OT_view_all";
/* api callbacks */
- ot->exec= image_view_all_exec;
- ot->poll= space_image_main_area_poll;
+ ot->exec = image_view_all_exec;
+ ot->poll = space_image_main_area_poll;
}
/********************** view selected operator *********************/
@@ -623,7 +623,7 @@ static int image_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
height= height*aspy;
/* get bounds */
- if(!ED_uvedit_minmax(scene, ima, obedit, min, max))
+ if (!ED_uvedit_minmax(scene, ima, obedit, min, max))
return OPERATOR_CANCELLED;
/* adjust offset and zoom */
@@ -634,7 +634,7 @@ static int image_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
d[1]= max[1] - min[1];
size= 0.5f*MAX2(d[0], d[1])*MAX2(width, height)/256.0f;
- if(size<=0.01f) size= 0.01f;
+ if (size<=0.01f) size= 0.01f;
sima_zoom_set(sima, ar, 0.7f/size, NULL);
ED_region_tag_redraw(CTX_wm_region(C));
@@ -650,12 +650,12 @@ static int image_view_selected_poll(bContext *C)
void IMAGE_OT_view_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Center";
- ot->idname= "IMAGE_OT_view_selected";
+ ot->name = "View Center";
+ ot->idname = "IMAGE_OT_view_selected";
/* api callbacks */
- ot->exec= image_view_selected_exec;
- ot->poll= image_view_selected_poll;
+ ot->exec = image_view_selected_exec;
+ ot->poll = image_view_selected_poll;
}
/********************** view zoom in/out operator *********************/
@@ -689,13 +689,13 @@ static int image_view_zoom_in_invoke(bContext *C, wmOperator *op, wmEvent *event
void IMAGE_OT_view_zoom_in(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Zoom In";
- ot->idname= "IMAGE_OT_view_zoom_in";
+ ot->name = "View Zoom In";
+ ot->idname = "IMAGE_OT_view_zoom_in";
/* api callbacks */
- ot->invoke= image_view_zoom_in_invoke;
- ot->exec= image_view_zoom_in_exec;
- ot->poll= space_image_main_area_poll;
+ ot->invoke = image_view_zoom_in_invoke;
+ ot->exec = image_view_zoom_in_exec;
+ ot->poll = space_image_main_area_poll;
/* properties */
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in screen coordinates", -10.0f, 10.0f);
@@ -730,13 +730,13 @@ static int image_view_zoom_out_invoke(bContext *C, wmOperator *op, wmEvent *even
void IMAGE_OT_view_zoom_out(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Zoom Out";
- ot->idname= "IMAGE_OT_view_zoom_out";
+ ot->name = "View Zoom Out";
+ ot->idname = "IMAGE_OT_view_zoom_out";
/* api callbacks */
- ot->invoke= image_view_zoom_out_invoke;
- ot->exec= image_view_zoom_out_exec;
- ot->poll= space_image_main_area_poll;
+ ot->invoke = image_view_zoom_out_invoke;
+ ot->exec = image_view_zoom_out_exec;
+ ot->poll = space_image_main_area_poll;
/* properties */
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in screen coordinates", -10.0f, 10.0f);
@@ -757,7 +757,7 @@ static int image_view_zoom_ratio_exec(bContext *C, wmOperator *op)
/* XXX notifier? */
#if 0
- if(image_preview_active(curarea, NULL, NULL)) {
+ if (image_preview_active(curarea, NULL, NULL)) {
/* recalculates new preview rect */
scrarea_do_windraw(curarea);
image_preview_event(2);
@@ -772,12 +772,12 @@ static int image_view_zoom_ratio_exec(bContext *C, wmOperator *op)
void IMAGE_OT_view_zoom_ratio(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Zoom Ratio";
- ot->idname= "IMAGE_OT_view_zoom_ratio";
+ ot->name = "View Zoom Ratio";
+ ot->idname = "IMAGE_OT_view_zoom_ratio";
/* api callbacks */
- ot->exec= image_view_zoom_ratio_exec;
- ot->poll= space_image_main_area_poll;
+ ot->exec = image_view_zoom_ratio_exec;
+ ot->poll = space_image_main_area_poll;
/* properties */
RNA_def_float(ot->srna, "ratio", 0.0f, 0.0f, FLT_MAX,
@@ -826,19 +826,19 @@ static int image_open_exec(bContext *C, wmOperator *op)
ima= BKE_add_image_file(str);
- if(!ima) {
- if(op->customdata) MEM_freeN(op->customdata);
+ if (!ima) {
+ if (op->customdata) MEM_freeN(op->customdata);
BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s", str, errno ? strerror(errno) : "Unsupported image format");
return OPERATOR_CANCELLED;
}
- if(!op->customdata)
+ if (!op->customdata)
image_open_init(C, op);
/* hook into UI */
pprop= op->customdata;
- if(pprop->prop) {
+ if (pprop->prop) {
/* when creating new ID blocks, use is already 1, but RNA
* pointer se also increases user, so this compensates it */
ima->id.us--;
@@ -847,19 +847,19 @@ static int image_open_exec(bContext *C, wmOperator *op)
RNA_property_pointer_set(&pprop->ptr, pprop->prop, idptr);
RNA_property_update(C, &pprop->ptr, pprop->prop);
}
- else if(sima) {
+ else if (sima) {
ED_space_image_set(sima, scene, obedit, ima);
iuser= &sima->iuser;
}
else {
Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data;
- if(tex && tex->type==TEX_IMAGE)
+ if (tex && tex->type==TEX_IMAGE)
iuser= &tex->iuser;
}
/* initialize because of new image */
- if(iuser) {
+ if (iuser) {
iuser->sfra= 1;
iuser->offset= 0;
iuser->fie_ima= 2;
@@ -882,20 +882,20 @@ static int image_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
char *path=U.textudir;
Image *ima= NULL;
- if(sima) {
+ if (sima) {
ima= sima->image;
}
if (ima==NULL) {
Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data;
- if(tex && tex->type==TEX_IMAGE)
+ if (tex && tex->type==TEX_IMAGE)
ima= tex->ima;
}
- if(ima)
+ if (ima)
path= ima->name;
- if(RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath"))
return image_open_exec(C, op);
image_open_init(C, op);
@@ -909,17 +909,17 @@ static int image_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
void IMAGE_OT_open(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Open Image";
- ot->description= "Open image";
- ot->idname= "IMAGE_OT_open";
+ ot->name = "Open Image";
+ ot->description = "Open image";
+ ot->idname = "IMAGE_OT_open";
/* api callbacks */
- ot->exec= image_open_exec;
- ot->invoke= image_open_invoke;
- ot->cancel= image_open_cancel;
+ ot->exec = image_open_exec;
+ ot->invoke = image_open_invoke;
+ ot->cancel = image_open_cancel;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
@@ -932,7 +932,7 @@ static int image_replace_exec(bContext *C, wmOperator *op)
SpaceImage *sima= CTX_wm_space_image(C);
char str[FILE_MAX];
- if(!sima->image)
+ if (!sima->image)
return OPERATOR_CANCELLED;
RNA_string_get(op->ptr, "filepath", str);
@@ -958,13 +958,13 @@ static int image_replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
{
SpaceImage *sima= CTX_wm_space_image(C);
- if(!sima->image)
+ if (!sima->image)
return OPERATOR_CANCELLED;
- if(RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath"))
return image_replace_exec(C, op);
- if(!RNA_struct_property_is_set(op->ptr, "relative_path"))
+ if (!RNA_struct_property_is_set(op->ptr, "relative_path"))
RNA_boolean_set(op->ptr, "relative_path", (strncmp(sima->image->name, "//", 2))==0);
image_filesel(C, op, sima->image->name);
@@ -975,16 +975,16 @@ static int image_replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
void IMAGE_OT_replace(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Replace Image";
- ot->idname= "IMAGE_OT_replace";
+ ot->name = "Replace Image";
+ ot->idname = "IMAGE_OT_replace";
/* api callbacks */
- ot->exec= image_replace_exec;
- ot->invoke= image_replace_invoke;
- ot->poll= space_image_poll;
+ ot->exec = image_replace_exec;
+ ot->invoke = image_replace_invoke;
+ ot->poll = space_image_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
@@ -1035,13 +1035,13 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima,
void *lock;
ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock);
- if(ibuf) {
+ if (ibuf) {
Image *ima= sima->image;
short is_depth_set= FALSE;
simopts->im_format.planes= ibuf->planes;
- if(ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)) {
+ if (ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)) {
/* imtype */
simopts->im_format= scene->r.im_format;
is_depth_set= TRUE;
@@ -1069,16 +1069,17 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima,
simopts->im_format.depth= imtype_best_depth(ibuf, simopts->im_format.imtype);
}
- /* some formats dont use quality so fallback to scenes quality */
+ /* some formats don't use quality so fallback to scenes quality */
if (simopts->im_format.quality == 0) {
simopts->im_format.quality= scene->r.im_format.quality;
}
/* check for empty path */
- if(guess_path && simopts->filepath[0]==0) {
+ if (guess_path && simopts->filepath[0]==0) {
if ( (G.ima[0] == '/') && (G.ima[1] == '/') && (G.ima[2] == '\0') ) {
BLI_strncpy(simopts->filepath, "//untitled", FILE_MAX);
- } else {
+ }
+ else {
BLI_strncpy(simopts->filepath, G.ima, FILE_MAX);
}
BLI_path_abs(simopts->filepath, G.main->name);
@@ -1130,27 +1131,27 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
WM_cursor_wait(1);
- if(ima->type == IMA_TYPE_R_RESULT) {
+ if (ima->type == IMA_TYPE_R_RESULT) {
/* enforce user setting for RGB or RGBA, but skip BW */
- if(simopts->im_format.planes==R_IMF_PLANES_RGBA) {
+ if (simopts->im_format.planes==R_IMF_PLANES_RGBA) {
ibuf->planes= R_IMF_PLANES_RGBA;
}
- else if(simopts->im_format.planes==R_IMF_PLANES_RGB) {
+ else if (simopts->im_format.planes==R_IMF_PLANES_RGB) {
ibuf->planes= R_IMF_PLANES_RGB;
}
}
else {
/* TODO, better solution, if a 24bit image is painted onto it may contain alpha */
- if(ibuf->userflags & IB_BITMAPDIRTY) { /* it has been painted onto */
+ if (ibuf->userflags & IB_BITMAPDIRTY) { /* it has been painted onto */
/* checks each pixel, not ideal */
ibuf->planes= BKE_alphatest_ibuf(ibuf) ? 32 : 24;
}
}
- if(simopts->im_format.imtype==R_IMF_IMTYPE_MULTILAYER) {
+ if (simopts->im_format.imtype==R_IMF_IMTYPE_MULTILAYER) {
Scene *scene= CTX_data_scene(C);
RenderResult *rr= BKE_image_acquire_renderresult(scene, ima);
- if(rr) {
+ if (rr) {
RE_WriteRenderResult(op->reports, rr, simopts->filepath, simopts->im_format.quality);
ok= TRUE;
}
@@ -1166,8 +1167,8 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
}
if (ok) {
- if(!save_copy) {
- if(do_newpath) {
+ if (!save_copy) {
+ if (do_newpath) {
BLI_strncpy(ibuf->name, simopts->filepath, sizeof(ibuf->name));
BLI_strncpy(ima->name, simopts->filepath, sizeof(ima->name));
}
@@ -1175,28 +1176,28 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
ibuf->userflags &= ~IB_BITMAPDIRTY;
/* change type? */
- if(ima->type==IMA_TYPE_R_RESULT) {
+ if (ima->type==IMA_TYPE_R_RESULT) {
ima->type= IMA_TYPE_IMAGE;
/* workaround to ensure the render result buffer is no longer used
* by this image, otherwise can crash when a new render result is
* created. */
- if(ibuf->rect && !(ibuf->mall & IB_rect))
+ if (ibuf->rect && !(ibuf->mall & IB_rect))
imb_freerectImBuf(ibuf);
- if(ibuf->rect_float && !(ibuf->mall & IB_rectfloat))
+ if (ibuf->rect_float && !(ibuf->mall & IB_rectfloat))
imb_freerectfloatImBuf(ibuf);
- if(ibuf->zbuf && !(ibuf->mall & IB_zbuf))
+ if (ibuf->zbuf && !(ibuf->mall & IB_zbuf))
IMB_freezbufImBuf(ibuf);
- if(ibuf->zbuf_float && !(ibuf->mall & IB_zbuffloat))
+ if (ibuf->zbuf_float && !(ibuf->mall & IB_zbuffloat))
IMB_freezbuffloatImBuf(ibuf);
}
- if( ELEM(ima->source, IMA_SRC_GENERATED, IMA_SRC_VIEWER)) {
+ if ( ELEM(ima->source, IMA_SRC_GENERATED, IMA_SRC_VIEWER)) {
ima->source= IMA_SRC_FILE;
ima->type= IMA_TYPE_IMAGE;
}
/* only image path, never ibuf */
- if(relative) {
+ if (relative) {
BLI_path_rel(ima->name, relbase); /* only after saving */
}
}
@@ -1247,7 +1248,7 @@ static int image_save_as_check(bContext *UNUSED(C), wmOperator *op)
ImageFormatData *imf= op->customdata;
char filepath[FILE_MAX];
RNA_string_get(op->ptr, "filepath", filepath);
- if(BKE_add_image_extension(filepath, imf->imtype)) {
+ if (BKE_add_image_extension(filepath, imf->imtype)) {
RNA_string_set(op->ptr, "filepath", filepath);
return TRUE;
}
@@ -1261,7 +1262,7 @@ static int image_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
Scene *scene= CTX_data_scene(C);
SaveImageOptions simopts;
- if(RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath"))
return image_save_as_exec(C, op);
if (save_image_options_init(&simopts, sima, scene, TRUE) == 0)
@@ -1269,7 +1270,7 @@ static int image_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
save_image_options_to_op(&simopts, op);
/* 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")) {
+ 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);
}
@@ -1320,19 +1321,19 @@ void IMAGE_OT_save_as(wmOperatorType *ot)
// PropertyRNA *prop;
/* identifiers */
- ot->name= "Save As Image";
- ot->idname= "IMAGE_OT_save_as";
+ ot->name = "Save As Image";
+ ot->idname = "IMAGE_OT_save_as";
/* api callbacks */
- ot->exec= image_save_as_exec;
- ot->check= image_save_as_check;
- ot->invoke= image_save_as_invoke;
- ot->cancel= image_save_as_cancel;
- ot->ui= image_save_as_draw;
- ot->poll= space_image_buffer_exists_poll;
+ ot->exec = image_save_as_exec;
+ ot->check = image_save_as_check;
+ ot->invoke = image_save_as_invoke;
+ ot->cancel = image_save_as_cancel;
+ ot->ui = image_save_as_draw;
+ ot->poll = space_image_buffer_exists_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "copy", 0, "Copy", "Create a new image file without modifying the current image in blender");
@@ -1366,15 +1367,15 @@ static int image_save_exec(bContext *C, wmOperator *op)
void IMAGE_OT_save(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Save Image";
- ot->idname= "IMAGE_OT_save";
+ ot->name = "Save Image";
+ ot->idname = "IMAGE_OT_save";
/* api callbacks */
- ot->exec= image_save_exec;
- ot->poll= space_image_file_exists_poll;
+ ot->exec = image_save_exec;
+ ot->poll = space_image_file_exists_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/******************* save sequence operator ********************/
@@ -1387,32 +1388,32 @@ static int image_save_sequence_exec(bContext *C, wmOperator *op)
int tot= 0;
char di[FILE_MAX], fi[FILE_MAX];
- if(sima->image==NULL)
+ if (sima->image==NULL)
return OPERATOR_CANCELLED;
- if(sima->image->source!=IMA_SRC_SEQUENCE) {
+ if (sima->image->source!=IMA_SRC_SEQUENCE) {
BKE_report(op->reports, RPT_ERROR, "Can only save sequence on image sequences");
return OPERATOR_CANCELLED;
}
- if(sima->image->type==IMA_TYPE_MULTILAYER) {
+ if (sima->image->type==IMA_TYPE_MULTILAYER) {
BKE_report(op->reports, RPT_ERROR, "Can't save multilayer sequences");
return OPERATOR_CANCELLED;
}
/* get total */
- for(ibuf= sima->image->ibufs.first; ibuf; ibuf= ibuf->next)
- if(ibuf->userflags & IB_BITMAPDIRTY)
+ for (ibuf= sima->image->ibufs.first; ibuf; ibuf= ibuf->next)
+ if (ibuf->userflags & IB_BITMAPDIRTY)
tot++;
- if(tot==0) {
+ if (tot==0) {
BKE_report(op->reports, RPT_WARNING, "No images have been changed");
return OPERATOR_CANCELLED;
}
/* get a filename for menu */
- for(ibuf= sima->image->ibufs.first; ibuf; ibuf= ibuf->next)
- if(ibuf->userflags & IB_BITMAPDIRTY)
+ for (ibuf= sima->image->ibufs.first; ibuf; ibuf= ibuf->next)
+ if (ibuf->userflags & IB_BITMAPDIRTY)
break;
BLI_strncpy(di, ibuf->name, FILE_MAX);
@@ -1420,14 +1421,14 @@ static int image_save_sequence_exec(bContext *C, wmOperator *op)
BKE_reportf(op->reports, RPT_INFO, "%d Image(s) will be saved in %s", tot, di);
- for(ibuf= sima->image->ibufs.first; ibuf; ibuf= ibuf->next) {
- if(ibuf->userflags & IB_BITMAPDIRTY) {
+ for (ibuf= sima->image->ibufs.first; ibuf; ibuf= ibuf->next) {
+ if (ibuf->userflags & IB_BITMAPDIRTY) {
char name[FILE_MAX];
BLI_strncpy(name, ibuf->name, sizeof(name));
BLI_path_abs(name, bmain->name);
- if(0 == IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat)) {
+ if (0 == IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat)) {
BKE_reportf(op->reports, RPT_ERROR, "Could not write image %s", name);
break;
}
@@ -1443,15 +1444,15 @@ static int image_save_sequence_exec(bContext *C, wmOperator *op)
void IMAGE_OT_save_sequence(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Save Sequence";
- ot->idname= "IMAGE_OT_save_sequence";
+ ot->name = "Save Sequence";
+ ot->idname = "IMAGE_OT_save_sequence";
/* api callbacks */
- ot->exec= image_save_sequence_exec;
- ot->poll= space_image_buffer_exists_poll;
+ ot->exec = image_save_sequence_exec;
+ ot->poll = space_image_buffer_exists_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/******************** reload image operator ********************/
@@ -1461,7 +1462,7 @@ static int image_reload_exec(bContext *C, wmOperator *UNUSED(op))
Image *ima= CTX_data_edit_image(C);
SpaceImage *sima= CTX_wm_space_image(C);
- if(!ima)
+ if (!ima)
return OPERATOR_CANCELLED;
/* XXX unpackImage frees image buffers */
@@ -1478,14 +1479,14 @@ static int image_reload_exec(bContext *C, wmOperator *UNUSED(op))
void IMAGE_OT_reload(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reload Image";
- ot->idname= "IMAGE_OT_reload";
+ ot->name = "Reload Image";
+ ot->idname = "IMAGE_OT_reload";
/* api callbacks */
- ot->exec= image_reload_exec;
+ ot->exec = image_reload_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER; /* no undo, image buffer is not handled by undo */
+ ot->flag = OPTYPE_REGISTER; /* no undo, image buffer is not handled by undo */
}
/********************** new image operator *********************/
@@ -1518,18 +1519,18 @@ static int image_new_exec(bContext *C, wmOperator *op)
if (!floatbuf && scene->r.color_mgt_flag & R_COLOR_MANAGEMENT)
linearrgb_to_srgb_v3_v3(color, color);
- if(!alpha)
+ if (!alpha)
color[3]= 1.0f;
ima = BKE_add_image_size(width, height, name, alpha ? 32 : 24, floatbuf, uvtestgrid, color);
- if(!ima)
+ if (!ima)
return OPERATOR_CANCELLED;
/* hook into UI */
uiIDContextProperty(C, &ptr, &prop);
- if(prop) {
+ if (prop) {
/* when creating new ID blocks, use is already 1, but RNA
* pointer se also increases user, so this compensates it */
ima->id.us--;
@@ -1538,7 +1539,7 @@ static int image_new_exec(bContext *C, wmOperator *op)
RNA_property_pointer_set(&ptr, prop, idptr);
RNA_property_update(C, &ptr, prop);
}
- else if(sima)
+ else if (sima)
ED_space_image_set(sima, scene, obedit, ima);
// XXX other users?
@@ -1560,16 +1561,16 @@ void IMAGE_OT_new(wmOperatorType *ot)
static float default_color[4]= {0.0f, 0.0f, 0.0f, 1.0f};
/* identifiers */
- ot->name= "New Image";
- ot->description= "Create a new image";
- ot->idname= "IMAGE_OT_new";
+ ot->name = "New Image";
+ ot->description = "Create a new image";
+ ot->idname = "IMAGE_OT_new";
/* api callbacks */
- ot->exec= image_new_exec;
- ot->invoke= image_new_invoke;
+ ot->exec = image_new_exec;
+ ot->invoke = image_new_invoke;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
RNA_def_string(ot->srna, "name", "untitled", MAX_ID_NAME-2, "Name", "Image datablock name");
@@ -1589,7 +1590,7 @@ static int image_invert_poll(bContext *C)
Image *ima= CTX_data_edit_image(C);
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
- if( ibuf != NULL )
+ if ( ibuf != NULL )
return 1;
return 0;
}
@@ -1607,32 +1608,32 @@ static int image_invert_exec(bContext *C, wmOperator *op)
int i;
- if( ibuf == NULL) // TODO: this should actually never happen, but does for render-results -> cleanup
+ if ( ibuf == NULL) // TODO: this should actually never happen, but does for render-results -> cleanup
return OPERATOR_CANCELLED;
/* TODO: make this into an IMB_invert_channels(ibuf,r,g,b,a) method!? */
if (ibuf->rect_float) {
float *fp = (float *) ibuf->rect_float;
- for( i = ibuf->x * ibuf->y; i > 0; i--, fp+=4 ) {
- if( r ) fp[0] = 1.0f - fp[0];
- if( g ) fp[1] = 1.0f - fp[1];
- if( b ) fp[2] = 1.0f - fp[2];
- if( a ) fp[3] = 1.0f - fp[3];
+ for ( i = ibuf->x * ibuf->y; i > 0; i--, fp+=4 ) {
+ if ( r ) fp[0] = 1.0f - fp[0];
+ if ( g ) fp[1] = 1.0f - fp[1];
+ if ( b ) fp[2] = 1.0f - fp[2];
+ if ( a ) fp[3] = 1.0f - fp[3];
}
- if(ibuf->rect) {
+ if (ibuf->rect) {
IMB_rect_from_float(ibuf);
}
}
- else if(ibuf->rect) {
+ else if (ibuf->rect) {
char *cp = (char *) ibuf->rect;
- for( i = ibuf->x * ibuf->y; i > 0; i--, cp+=4 ) {
- if( r ) cp[0] = 255 - cp[0];
- if( g ) cp[1] = 255 - cp[1];
- if( b ) cp[2] = 255 - cp[2];
- if( a ) cp[3] = 255 - cp[3];
+ for ( i = ibuf->x * ibuf->y; i > 0; i--, cp+=4 ) {
+ if ( r ) cp[0] = 255 - cp[0];
+ if ( g ) cp[1] = 255 - cp[1];
+ if ( b ) cp[2] = 255 - cp[2];
+ if ( a ) cp[3] = 255 - cp[3];
}
}
else {
@@ -1640,7 +1641,7 @@ static int image_invert_exec(bContext *C, wmOperator *op)
}
ibuf->userflags |= IB_BITMAPDIRTY;
- if(ibuf->mipmap[0])
+ if (ibuf->mipmap[0])
ibuf->userflags |= IB_MIPMAP_INVALID;
WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, ima);
@@ -1650,12 +1651,12 @@ static int image_invert_exec(bContext *C, wmOperator *op)
void IMAGE_OT_invert(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Invert Channels";
- ot->idname= "IMAGE_OT_invert";
+ ot->name = "Invert Channels";
+ ot->idname = "IMAGE_OT_invert";
/* api callbacks */
- ot->exec= image_invert_exec;
- ot->poll= image_invert_poll;
+ ot->exec = image_invert_exec;
+ ot->poll = image_invert_poll;
/* properties */
RNA_def_boolean(ot->srna, "invert_r", 0, "Red", "Invert Red Channel");
@@ -1664,7 +1665,7 @@ void IMAGE_OT_invert(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "invert_a", 0, "Alpha", "Invert Alpha Channel");
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************* pack operator *********************/
@@ -1674,12 +1675,12 @@ static int image_pack_test(bContext *C, wmOperator *op)
Image *ima= CTX_data_edit_image(C);
int as_png= RNA_boolean_get(op->ptr, "as_png");
- if(!ima)
+ if (!ima)
return 0;
- if(!as_png && ima->packedfile)
+ if (!as_png && ima->packedfile)
return 0;
- if(ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) {
+ if (ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) {
BKE_report(op->reports, RPT_ERROR, "Packing movies or image sequences not supported");
return 0;
}
@@ -1694,15 +1695,15 @@ static int image_pack_exec(bContext *C, wmOperator *op)
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
int as_png= RNA_boolean_get(op->ptr, "as_png");
- if(!image_pack_test(C, op))
+ if (!image_pack_test(C, op))
return OPERATOR_CANCELLED;
- if(!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) {
+ if (!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) {
BKE_report(op->reports, RPT_ERROR, "Can't pack edited image from disk, only as internal PNG");
return OPERATOR_CANCELLED;
}
- if(as_png)
+ if (as_png)
BKE_image_memorypack(ima);
else
ima->packedfile= newPackedFile(op->reports, ima->name, ID_BLEND_PATH(bmain, &ima->id));
@@ -1720,10 +1721,10 @@ static int image_pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
uiLayout *layout;
int as_png= RNA_boolean_get(op->ptr, "as_png");
- if(!image_pack_test(C, op))
+ if (!image_pack_test(C, op))
return OPERATOR_CANCELLED;
- if(!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) {
+ if (!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) {
pup= uiPupMenuBegin(C, "OK", ICON_QUESTION);
layout= uiPupMenuLayout(pup);
uiItemBooleanO(layout, "Can't pack edited image from disk. Pack as internal PNG?", ICON_NONE, op->idname, "as_png", 1);
@@ -1738,16 +1739,16 @@ static int image_pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
void IMAGE_OT_pack(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Pack Image";
- ot->description= "Pack an image as embedded data into the .blend file";
- ot->idname= "IMAGE_OT_pack";
+ ot->name = "Pack Image";
+ ot->description = "Pack an image as embedded data into the .blend file";
+ ot->idname = "IMAGE_OT_pack";
/* api callbacks */
- ot->exec= image_pack_exec;
- ot->invoke= image_pack_invoke;
+ ot->exec = image_pack_exec;
+ ot->invoke = image_pack_invoke;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "as_png", 0, "Pack As PNG", "Pack image as lossless PNG");
@@ -1768,15 +1769,15 @@ static int image_unpack_exec(bContext *C, wmOperator *op)
if (!ima) ima = CTX_data_edit_image(C);
}
- if(!ima || !ima->packedfile)
+ if (!ima || !ima->packedfile)
return OPERATOR_CANCELLED;
- if(ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) {
+ if (ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) {
BKE_report(op->reports, RPT_ERROR, "Unpacking movies or image sequences not supported");
return OPERATOR_CANCELLED;
}
- if(G.fileflags & G_AUTOPACK)
+ if (G.fileflags & G_AUTOPACK)
BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save");
/* XXX unpackImage frees image buffers */
@@ -1793,18 +1794,18 @@ static int image_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
{
Image *ima= CTX_data_edit_image(C);
- if(RNA_struct_property_is_set(op->ptr, "id"))
+ if (RNA_struct_property_is_set(op->ptr, "id"))
return image_unpack_exec(C, op);
- if(!ima || !ima->packedfile)
+ if (!ima || !ima->packedfile)
return OPERATOR_CANCELLED;
- if(ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) {
+ if (ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) {
BKE_report(op->reports, RPT_ERROR, "Unpacking movies or image sequences not supported");
return OPERATOR_CANCELLED;
}
- if(G.fileflags & G_AUTOPACK)
+ if (G.fileflags & G_AUTOPACK)
BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save");
unpack_menu(C, "IMAGE_OT_unpack", ima->id.name+2, ima->name, "textures", ima->packedfile);
@@ -1815,16 +1816,16 @@ static int image_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
void IMAGE_OT_unpack(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Unpack Image";
- ot->description= "Save an image packed in the .blend file to disk";
- ot->idname= "IMAGE_OT_unpack";
+ ot->name = "Unpack Image";
+ ot->description = "Save an image packed in the .blend file to disk";
+ ot->idname = "IMAGE_OT_unpack";
/* api callbacks */
- ot->exec= image_unpack_exec;
- ot->invoke= image_unpack_invoke;
+ ot->exec = image_unpack_exec;
+ ot->invoke = image_unpack_invoke;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack");
@@ -1855,7 +1856,7 @@ typedef struct ImageSampleInfo {
static void image_sample_draw(const bContext *UNUSED(C), ARegion *ar, void *arg_info)
{
ImageSampleInfo *info= arg_info;
- if(info->draw) {
+ if (info->draw) {
/* no color management needed for images (color_manage=0) */
ED_image_draw_info(ar, 0, info->channels, info->x, info->y, info->colp, info->colfp, info->zp, info->zfp);
}
@@ -1870,14 +1871,14 @@ static void image_sample_apply(bContext *C, wmOperator *op, wmEvent *event)
ImageSampleInfo *info= op->customdata;
float fx, fy;
- if(ibuf == NULL) {
+ if (ibuf == NULL) {
ED_space_image_release_buffer(sima, lock);
return;
}
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fx, &fy);
- if(fx>=0.0f && fy>=0.0f && fx<1.0f && fy<1.0f) {
+ if (fx>=0.0f && fy>=0.0f && fx<1.0f && fy<1.0f) {
float *fp;
unsigned char *cp;
int x= (int)(fx*ibuf->x), y= (int)(fy*ibuf->y);
@@ -1895,7 +1896,7 @@ static void image_sample_apply(bContext *C, wmOperator *op, wmEvent *event)
info->zp= NULL;
info->zfp= NULL;
- if(ibuf->rect) {
+ if (ibuf->rect) {
cp= (unsigned char *)(ibuf->rect + y*ibuf->x + x);
info->col[0]= cp[0];
@@ -1910,7 +1911,7 @@ static void image_sample_apply(bContext *C, wmOperator *op, wmEvent *event)
info->colf[3]= (float)cp[3]/255.0f;
info->colfp= info->colf;
}
- if(ibuf->rect_float) {
+ if (ibuf->rect_float) {
fp= (ibuf->rect_float + (ibuf->channels)*(y*ibuf->x + x));
info->colf[0]= fp[0];
@@ -1920,28 +1921,28 @@ static void image_sample_apply(bContext *C, wmOperator *op, wmEvent *event)
info->colfp= info->colf;
}
- if(ibuf->zbuf) {
+ if (ibuf->zbuf) {
info->z= ibuf->zbuf[y*ibuf->x + x];
info->zp= &info->z;
}
- if(ibuf->zbuf_float) {
+ if (ibuf->zbuf_float) {
info->zf= ibuf->zbuf_float[y*ibuf->x + x];
info->zfp= &info->zf;
}
- if(sima->cumap && ibuf->channels==4) {
+ if (sima->cumap && ibuf->channels==4) {
/* we reuse this callback for set curves point operators */
- if(RNA_struct_find_property(op->ptr, "point")) {
+ if (RNA_struct_find_property(op->ptr, "point")) {
int point= RNA_enum_get(op->ptr, "point");
- if(point == 1) {
+ if (point == 1) {
curvemapping_set_black_white(sima->cumap, NULL, info->colfp);
- if(ibuf->rect_float)
+ if (ibuf->rect_float)
curvemapping_do_ibuf(sima->cumap, ibuf);
}
- else if(point == 0) {
+ else if (point == 0) {
curvemapping_set_black_white(sima->cumap, info->colfp, NULL);
- if(ibuf->rect_float)
+ if (ibuf->rect_float)
curvemapping_do_ibuf(sima->cumap, ibuf);
}
}
@@ -1953,8 +1954,8 @@ static void image_sample_apply(bContext *C, wmOperator *op, wmEvent *event)
ScrArea *sa, *cur= curarea;
node_curvemap_sample(fp); /* sends global to node editor */
- for(sa= G.curscreen->areabase.first; sa; sa= sa->next) {
- if(sa->spacetype==SPACE_NODE) {
+ for (sa= G.curscreen->areabase.first; sa; sa= sa->next) {
+ if (sa->spacetype==SPACE_NODE) {
areawinset(sa->win);
scrarea_do_windraw(sa);
}
@@ -1986,7 +1987,7 @@ static int image_sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
ARegion *ar= CTX_wm_region(C);
ImageSampleInfo *info;
- if(!ED_space_image_has_buffer(sima))
+ if (!ED_space_image_has_buffer(sima))
return OPERATOR_CANCELLED;
info= MEM_callocN(sizeof(ImageSampleInfo), "ImageSampleInfo");
@@ -2025,17 +2026,17 @@ static int image_sample_cancel(bContext *C, wmOperator *op)
void IMAGE_OT_sample(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Sample Color";
- ot->idname= "IMAGE_OT_sample";
+ ot->name = "Sample Color";
+ ot->idname = "IMAGE_OT_sample";
/* api callbacks */
- ot->invoke= image_sample_invoke;
- ot->modal= image_sample_modal;
- ot->cancel= image_sample_cancel;
- ot->poll= space_image_image_sample_poll;
+ ot->invoke = image_sample_invoke;
+ ot->modal = image_sample_modal;
+ ot->cancel = image_sample_cancel;
+ ot->poll = space_image_image_sample_poll;
/* flags */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
}
/******************** sample line operator ********************/
@@ -2089,7 +2090,8 @@ static int image_sample_line_exec(bContext *C, wmOperator *op)
if (x<0 || y<0 || x>=ibuf->x || y>=ibuf->y) {
hist->data_luma[i] = hist->data_r[i] = hist->data_g[i]= hist->data_b[i] = 0.0f;
- } else {
+ }
+ else {
if (ibuf->rect_float) {
fp= (ibuf->rect_float + (ibuf->channels)*(y*ibuf->x + x));
@@ -2124,7 +2126,7 @@ static int image_sample_line_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceImage *sima= CTX_wm_space_image(C);
- if(!ED_space_image_has_buffer(sima))
+ if (!ED_space_image_has_buffer(sima))
return OPERATOR_CANCELLED;
return WM_gesture_straightline_invoke(C, op, event);
@@ -2133,18 +2135,18 @@ static int image_sample_line_invoke(bContext *C, wmOperator *op, wmEvent *event)
void IMAGE_OT_sample_line(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Sample Line";
- ot->idname= "IMAGE_OT_sample_line";
+ ot->name = "Sample Line";
+ ot->idname = "IMAGE_OT_sample_line";
/* api callbacks */
- ot->invoke= image_sample_line_invoke;
- ot->modal= WM_gesture_straightline_modal;
- ot->exec= image_sample_line_exec;
- ot->poll= space_image_main_area_poll;
- ot->cancel= WM_gesture_straightline_cancel;
+ ot->invoke = image_sample_line_invoke;
+ ot->modal = WM_gesture_straightline_modal;
+ ot->exec = image_sample_line_exec;
+ ot->poll = space_image_main_area_poll;
+ ot->cancel = WM_gesture_straightline_cancel;
/* flags */
- ot->flag= 0; /* no undo/register since this operates on the space */
+ ot->flag = 0; /* no undo/register since this operates on the space */
WM_operator_properties_gesture_straightline(ot, CURSOR_EDIT);
}
@@ -2159,17 +2161,17 @@ void IMAGE_OT_curves_point_set(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Set Curves Point";
- ot->idname= "IMAGE_OT_curves_point_set";
+ ot->name = "Set Curves Point";
+ ot->idname = "IMAGE_OT_curves_point_set";
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->invoke= image_sample_invoke;
- ot->modal= image_sample_modal;
- ot->cancel= image_sample_cancel;
- ot->poll= space_image_main_area_not_uv_brush_poll;
+ ot->invoke = image_sample_invoke;
+ ot->modal = image_sample_modal;
+ ot->cancel = image_sample_cancel;
+ ot->poll = space_image_main_area_not_uv_brush_poll;
/* properties */
RNA_def_enum(ot->srna, "point", point_items, 0, "Point", "Set black point or white point for curves");
@@ -2203,7 +2205,7 @@ static int image_record_composite_apply(bContext *C, wmOperator *op)
ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser);
/* save memory in flipbooks */
- if(ibuf)
+ if (ibuf)
imb_freerectfloatImBuf(ibuf);
scene->r.cfra++;
@@ -2217,9 +2219,9 @@ static int image_record_composite_init(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
RecordCompositeData *rcd;
- if(sima->iuser.frames < 2)
+ if (sima->iuser.frames < 2)
return 0;
- if(scene->nodetree == NULL)
+ if (scene->nodetree == NULL)
return 0;
op->customdata= rcd= MEM_callocN(sizeof(RecordCompositeData), "ImageRecordCompositeData");
@@ -2242,7 +2244,7 @@ static void image_record_composite_exit(bContext *C, wmOperator *op)
WM_cursor_restore(CTX_wm_window(C));
- if(rcd->timer)
+ if (rcd->timer)
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), rcd->timer);
WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, sima->image);
@@ -2255,10 +2257,10 @@ static void image_record_composite_exit(bContext *C, wmOperator *op)
static int image_record_composite_exec(bContext *C, wmOperator *op)
{
- if(!image_record_composite_init(C, op))
+ if (!image_record_composite_init(C, op))
return OPERATOR_CANCELLED;
- while(image_record_composite_apply(C, op))
+ while (image_record_composite_apply(C, op))
;
image_record_composite_exit(C, op);
@@ -2270,14 +2272,14 @@ static int image_record_composite_invoke(bContext *C, wmOperator *op, wmEvent *U
{
RecordCompositeData *rcd;
- if(!image_record_composite_init(C, op))
+ if (!image_record_composite_init(C, op))
return OPERATOR_CANCELLED;
rcd= op->customdata;
rcd->timer= WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.0f);
WM_event_add_modal_handler(C, op);
- if(!image_record_composite_apply(C, op))
+ if (!image_record_composite_apply(C, op))
return OPERATOR_FINISHED;
return OPERATOR_RUNNING_MODAL;
@@ -2289,8 +2291,8 @@ static int image_record_composite_modal(bContext *C, wmOperator *op, wmEvent *ev
switch(event->type) {
case TIMER:
- if(rcd->timer == event->customdata) {
- if(!image_record_composite_apply(C, op)) {
+ if (rcd->timer == event->customdata) {
+ if (!image_record_composite_apply(C, op)) {
image_record_composite_exit(C, op);
return OPERATOR_FINISHED;
}
@@ -2313,15 +2315,15 @@ static int image_record_composite_cancel(bContext *C, wmOperator *op)
void IMAGE_OT_record_composite(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Record Composite";
- ot->idname= "IMAGE_OT_record_composite";
+ ot->name = "Record Composite";
+ ot->idname = "IMAGE_OT_record_composite";
/* api callbacks */
- ot->exec= image_record_composite_exec;
- ot->invoke= image_record_composite_invoke;
- ot->modal= image_record_composite_modal;
- ot->cancel= image_record_composite_cancel;
- ot->poll= space_image_buffer_exists_poll;
+ ot->exec = image_record_composite_exec;
+ ot->invoke = image_record_composite_invoke;
+ ot->modal = image_record_composite_modal;
+ ot->cancel = image_record_composite_cancel;
+ ot->poll = space_image_buffer_exists_poll;
}
/********************* cycle render slot operator *********************/
@@ -2339,27 +2341,27 @@ static int image_cycle_render_slot_exec(bContext *C, wmOperator *op)
int a, slot, cur= ima->render_slot;
const short use_reverse= RNA_boolean_get(op->ptr, "reverse");
- for(a=1; a<IMA_MAX_RENDER_SLOT; a++) {
+ for (a=1; a<IMA_MAX_RENDER_SLOT; a++) {
slot= (cur + (use_reverse ? -a:a))%IMA_MAX_RENDER_SLOT;
- if(slot<0) slot+=IMA_MAX_RENDER_SLOT;
+ if (slot<0) slot+=IMA_MAX_RENDER_SLOT;
- if(ima->renders[slot] || slot == ima->last_render_slot) {
+ if (ima->renders[slot] || slot == ima->last_render_slot) {
ima->render_slot= slot;
break;
}
- else if((slot - 1) == ima->last_render_slot && slot < IMA_MAX_RENDER_SLOT) {
+ else if ((slot - 1) == ima->last_render_slot && slot < IMA_MAX_RENDER_SLOT) {
ima->render_slot= slot;
break;
}
}
- if(a == IMA_MAX_RENDER_SLOT)
+ if (a == IMA_MAX_RENDER_SLOT)
ima->render_slot= ((cur == 1)? 0: 1);
WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL);
/* no undo push for browsing existing */
- if(ima->renders[ima->render_slot] || ima->render_slot==ima->last_render_slot)
+ if (ima->renders[ima->render_slot] || ima->render_slot==ima->last_render_slot)
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
@@ -2368,15 +2370,15 @@ static int image_cycle_render_slot_exec(bContext *C, wmOperator *op)
void IMAGE_OT_cycle_render_slot(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Cycle Render Slot";
- ot->idname= "IMAGE_OT_cycle_render_slot";
+ ot->name = "Cycle Render Slot";
+ ot->idname = "IMAGE_OT_cycle_render_slot";
/* api callbacks */
- ot->exec= image_cycle_render_slot_exec;
- ot->poll= image_cycle_render_slot_poll;
+ ot->exec = image_cycle_render_slot_exec;
+ ot->poll = image_cycle_render_slot_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "reverse", 0, "Cycle in Reverse", "");
}
@@ -2394,42 +2396,42 @@ void ED_image_update_frame(const Main *mainp, int cfra)
Tex *tex;
/* texture users */
- for(tex= mainp->tex.first; tex; tex= tex->id.next) {
- if(tex->type==TEX_IMAGE && tex->ima) {
- if(ELEM(tex->ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
- if(tex->iuser.flag & IMA_ANIM_ALWAYS)
+ for (tex= mainp->tex.first; tex; tex= tex->id.next) {
+ if (tex->type==TEX_IMAGE && tex->ima) {
+ if (ELEM(tex->ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
+ if (tex->iuser.flag & IMA_ANIM_ALWAYS)
BKE_image_user_calc_frame(&tex->iuser, cfra, 0);
}
}
}
/* image window, compo node users */
- for(wm=mainp->wm.first; wm; wm= wm->id.next) { /* only 1 wm */
- for(win= wm->windows.first; win; win= win->next) {
+ for (wm=mainp->wm.first; wm; wm= wm->id.next) { /* only 1 wm */
+ for (win= wm->windows.first; win; win= win->next) {
ScrArea *sa;
- for(sa= win->screen->areabase.first; sa; sa= sa->next) {
- if(sa->spacetype==SPACE_VIEW3D) {
+ for (sa= win->screen->areabase.first; sa; sa= sa->next) {
+ if (sa->spacetype==SPACE_VIEW3D) {
View3D *v3d= sa->spacedata.first;
BGpic *bgpic;
- for(bgpic= v3d->bgpicbase.first; bgpic; bgpic= bgpic->next)
- if(bgpic->iuser.flag & IMA_ANIM_ALWAYS)
+ for (bgpic= v3d->bgpicbase.first; bgpic; bgpic= bgpic->next)
+ if (bgpic->iuser.flag & IMA_ANIM_ALWAYS)
BKE_image_user_calc_frame(&bgpic->iuser, cfra, 0);
}
- else if(sa->spacetype==SPACE_IMAGE) {
+ else if (sa->spacetype==SPACE_IMAGE) {
SpaceImage *sima= sa->spacedata.first;
- if(sima->iuser.flag & IMA_ANIM_ALWAYS)
+ if (sima->iuser.flag & IMA_ANIM_ALWAYS)
BKE_image_user_calc_frame(&sima->iuser, cfra, 0);
}
- else if(sa->spacetype==SPACE_NODE) {
+ else if (sa->spacetype==SPACE_NODE) {
SpaceNode *snode= sa->spacedata.first;
- if((snode->treetype==NTREE_COMPOSIT) && (snode->nodetree)) {
+ if ((snode->treetype==NTREE_COMPOSIT) && (snode->nodetree)) {
bNode *node;
- for(node= snode->nodetree->nodes.first; node; node= node->next) {
- if(node->id && node->type==CMP_NODE_IMAGE) {
+ for (node= snode->nodetree->nodes.first; node; node= node->next) {
+ if (node->id && node->type==CMP_NODE_IMAGE) {
Image *ima= (Image *)node->id;
ImageUser *iuser= node->storage;
- if(ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE))
- if(iuser->flag & IMA_ANIM_ALWAYS)
+ if (ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE))
+ if (iuser->flag & IMA_ANIM_ALWAYS)
BKE_image_user_calc_frame(iuser, cfra, 0);
}
}
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 1af37a66022..f1967477d7a 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -92,16 +92,16 @@ void ED_space_image_set(SpaceImage *sima, Scene *scene, Object *obedit, Image *i
* to check if the face is displayed in UV-localview */
sima->image= ima;
- if(ima == NULL || ima->type==IMA_TYPE_R_RESULT || ima->type==IMA_TYPE_COMPOSITE)
+ if (ima == NULL || ima->type==IMA_TYPE_R_RESULT || ima->type==IMA_TYPE_COMPOSITE)
sima->flag &= ~SI_DRAWTOOL;
- if(sima->image)
+ if (sima->image)
BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_USER_NEW_IMAGE);
- if(sima->image && sima->image->id.us==0)
+ if (sima->image && sima->image->id.us==0)
sima->image->id.us= 1;
- if(obedit)
+ if (obedit)
WM_main_add_notifier(NC_GEOM|ND_DATA, obedit->data);
WM_main_add_notifier(NC_SPACE|ND_SPACE_IMAGE, NULL);
@@ -111,15 +111,15 @@ ImBuf *ED_space_image_acquire_buffer(SpaceImage *sima, void **lock_r)
{
ImBuf *ibuf;
- if(sima && sima->image) {
+ if (sima && sima->image) {
#if 0
- if(sima->image->type==IMA_TYPE_R_RESULT && BIF_show_render_spare())
+ if (sima->image->type==IMA_TYPE_R_RESULT && BIF_show_render_spare())
return BIF_render_spare_imbuf();
else
#endif
ibuf= BKE_image_acquire_ibuf(sima->image, &sima->iuser, lock_r);
- if(ibuf && (ibuf->rect || ibuf->rect_float))
+ if (ibuf && (ibuf->rect || ibuf->rect_float))
return ibuf;
}
@@ -128,7 +128,7 @@ ImBuf *ED_space_image_acquire_buffer(SpaceImage *sima, void **lock_r)
void ED_space_image_release_buffer(SpaceImage *sima, void *lock)
{
- if(sima && sima->image)
+ if (sima && sima->image)
BKE_image_release_ibuf(sima->image, lock);
}
@@ -150,10 +150,10 @@ void ED_image_size(Image *ima, int *width, int *height)
ImBuf *ibuf= NULL;
void *lock;
- if(ima)
+ if (ima)
ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock);
- if(ibuf && ibuf->x > 0 && ibuf->y > 0) {
+ if (ibuf && ibuf->x > 0 && ibuf->y > 0) {
*width= ibuf->x;
*height= ibuf->y;
}
@@ -162,7 +162,7 @@ void ED_image_size(Image *ima, int *width, int *height)
*height= 256;
}
- if(ima)
+ if (ima)
BKE_image_release_ibuf(ima, lock);
}
@@ -174,23 +174,23 @@ void ED_space_image_size(SpaceImage *sima, int *width, int *height)
ibuf= ED_space_image_acquire_buffer(sima, &lock);
- if(ibuf && ibuf->x > 0 && ibuf->y > 0) {
+ if (ibuf && ibuf->x > 0 && ibuf->y > 0) {
*width= ibuf->x;
*height= ibuf->y;
}
- else if(sima->image && sima->image->type==IMA_TYPE_R_RESULT && scene) {
+ else if (sima->image && sima->image->type==IMA_TYPE_R_RESULT && scene) {
/* not very important, just nice */
*width= (scene->r.xsch*scene->r.size)/100;
*height= (scene->r.ysch*scene->r.size)/100;
- if((scene->r.mode & R_BORDER) && (scene->r.mode & R_CROP)) {
+ if ((scene->r.mode & R_BORDER) && (scene->r.mode & R_CROP)) {
*width *= (scene->r.border.xmax - scene->r.border.xmin);
*height *= (scene->r.border.ymax - scene->r.border.ymin);
}
}
/* I know a bit weak... but preview uses not actual image size */
- // XXX else if(image_preview_active(sima, width, height));
+ // XXX else if (image_preview_active(sima, width, height));
else {
*width= 256;
*height= 256;
@@ -203,7 +203,7 @@ void ED_image_aspect(Image *ima, float *aspx, float *aspy)
{
*aspx= *aspy= 1.0;
- if((ima == NULL) || (ima->type == IMA_TYPE_R_RESULT) || (ima->type == IMA_TYPE_COMPOSITE) ||
+ if ((ima == NULL) || (ima->type == IMA_TYPE_R_RESULT) || (ima->type == IMA_TYPE_COMPOSITE) ||
(ima->aspx==0.0f || ima->aspy==0.0f))
return;
@@ -236,7 +236,7 @@ void ED_space_image_uv_aspect(SpaceImage *sima, float *aspx, float *aspy)
*aspx *= (float)w;
*aspy *= (float)h;
- if(*aspx < *aspy) {
+ if (*aspx < *aspy) {
*aspy= *aspy / *aspx;
*aspx= 1.0f;
}
@@ -264,7 +264,7 @@ int ED_space_image_show_render(SpaceImage *sima)
int ED_space_image_show_paint(SpaceImage *sima)
{
- if(ED_space_image_show_render(sima))
+ if (ED_space_image_show_render(sima))
return 0;
return (sima->flag & SI_DRAWTOOL);
@@ -272,10 +272,10 @@ int ED_space_image_show_paint(SpaceImage *sima)
int ED_space_image_show_uvedit(SpaceImage *sima, Object *obedit)
{
- if(sima && (ED_space_image_show_render(sima) || ED_space_image_show_paint(sima)))
+ if (sima && (ED_space_image_show_render(sima) || ED_space_image_show_paint(sima)))
return 0;
- if(obedit && obedit->type == OB_MESH) {
+ if (obedit && obedit->type == OB_MESH) {
struct BMEditMesh *em = BMEdit_FromObject(obedit);
int ret;
@@ -289,11 +289,11 @@ int ED_space_image_show_uvedit(SpaceImage *sima, Object *obedit)
int ED_space_image_show_uvshadow(SpaceImage *sima, Object *obedit)
{
- if(ED_space_image_show_render(sima))
+ if (ED_space_image_show_render(sima))
return 0;
- if(ED_space_image_show_paint(sima))
- if(obedit && obedit->type == OB_MESH) {
+ if (ED_space_image_show_paint(sima))
+ if (obedit && obedit->type == OB_MESH) {
struct BMEditMesh *em = BMEdit_FromObject(obedit);
int ret;
@@ -328,13 +328,13 @@ ARegion *image_has_buttons_region(ScrArea *sa)
ARegion *ar, *arnew;
ar= BKE_area_find_region_type(sa, RGN_TYPE_UI);
- if(ar) return ar;
+ if (ar) return ar;
/* add subdiv level; after header */
ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
/* is error! */
- if(ar==NULL) return NULL;
+ if (ar==NULL) return NULL;
arnew= MEM_callocN(sizeof(ARegion), "buttons for image");
@@ -352,13 +352,13 @@ ARegion *image_has_scope_region(ScrArea *sa)
ARegion *ar, *arnew;
ar= BKE_area_find_region_type(sa, RGN_TYPE_PREVIEW);
- if(ar) return ar;
+ if (ar) return ar;
/* add subdiv level; after buttons */
ar= BKE_area_find_region_type(sa, RGN_TYPE_UI);
/* is error! */
- if(ar==NULL) return NULL;
+ if (ar==NULL) return NULL;
arnew= MEM_callocN(sizeof(ARegion), "scopes for image");
@@ -429,7 +429,7 @@ static void image_free(SpaceLink *sl)
{
SpaceImage *simage= (SpaceImage*) sl;
- if(simage->cumap)
+ if (simage->cumap)
curvemapping_free(simage->cumap);
scopes_free(&simage->scopes);
}
@@ -450,7 +450,7 @@ static SpaceLink *image_duplicate(SpaceLink *sl)
SpaceImage *simagen= MEM_dupallocN(sl);
/* clear or remove stuff from old */
- if(simagen->cumap)
+ if (simagen->cumap)
simagen->cumap= curvemapping_copy(simagen->cumap);
scopes_new(&simagen->scopes);
@@ -495,7 +495,7 @@ static void image_operatortypes(void)
static void image_keymap(struct wmKeyConfig *keyconf)
{
- wmKeyMap *keymap= WM_keymap_find(keyconf, "Image Generic", SPACE_IMAGE, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "Image Generic", SPACE_IMAGE, 0);
wmKeyMapItem *kmi;
WM_keymap_add_item(keymap, "IMAGE_OT_new", NKEY, KM_PRESS, KM_ALT, 0);
@@ -509,7 +509,7 @@ static void image_keymap(struct wmKeyConfig *keyconf)
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);
- keymap= WM_keymap_find(keyconf, "Image", SPACE_IMAGE, 0);
+ keymap = WM_keymap_find(keyconf, "Image", SPACE_IMAGE, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "IMAGE_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
@@ -540,7 +540,7 @@ static void image_keymap(struct wmKeyConfig *keyconf)
RNA_enum_set(WM_keymap_add_item(keymap, "IMAGE_OT_curves_point_set", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "point", 1);
/* toggle editmode is handy to have while UV unwrapping */
- kmi= WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, 0, 0);
+ 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);
}
@@ -548,8 +548,8 @@ static void image_keymap(struct wmKeyConfig *keyconf)
/* dropboxes */
static int image_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))
{
- if(drag->type==WM_DRAG_PATH)
- if(ELEM3(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_BLANK)) /* rule might not work? */
+ if (drag->type==WM_DRAG_PATH)
+ if (ELEM3(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_BLANK)) /* rule might not work? */
return 1;
return 0;
}
@@ -579,25 +579,25 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa))
ima= ED_space_image(sima);
- if(sima->iuser.flag & IMA_ANIM_ALWAYS)
+ if (sima->iuser.flag & IMA_ANIM_ALWAYS)
BKE_image_user_calc_frame(&sima->iuser, scene->r.cfra, 0);
/* check if we have to set the image from the editmesh */
- if(ima && (ima->source==IMA_SRC_VIEWER || sima->pin));
- else if(obedit && obedit->type == OB_MESH) {
+ if (ima && (ima->source==IMA_SRC_VIEWER || sima->pin));
+ else if (obedit && obedit->type == OB_MESH) {
Mesh *me= (Mesh*)obedit->data;
struct BMEditMesh *em= me->edit_btmesh;
int sloppy= 1; /* partially selected face is ok */
- if(scene_use_new_shading_nodes(scene)) {
+ if (scene_use_new_shading_nodes(scene)) {
/* new shading system, get image from material */
BMFace *efa = BM_active_face_get(em->bm, sloppy);
- if(efa) {
+ if (efa) {
Image *node_ima;
ED_object_get_active_image(obedit, efa->mat_nr, &node_ima, NULL, NULL);
- if(node_ima)
+ if (node_ima)
sima->image= node_ima;
}
}
@@ -605,16 +605,16 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa))
/* old shading system, we set texface */
MTexPoly *tf;
- if(em && EDBM_texFaceCheck(em)) {
+ if (em && EDBM_texFaceCheck(em)) {
sima->image= NULL;
tf = EDBM_get_active_mtexpoly(em, NULL, TRUE); /* partially selected face is ok */
- if(tf) {
+ if (tf) {
/* don't need to check for pin here, see above */
sima->image= tf->tpage;
- if(sima->flag & SI_EDITTILE);
+ if (sima->flag & SI_EDITTILE);
else sima->curtile= tf->tile;
}
}
@@ -653,7 +653,7 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_IMAGE) {
+ if (wmn->data == ND_SPACE_IMAGE) {
image_scopes_tag_refresh(sa);
ED_area_tag_redraw(sa);
}
@@ -673,7 +673,7 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn)
switch(wmn->data) {
case ND_TRANSFORM:
case ND_MODIFIER:
- if(ob && (ob->mode & OB_MODE_EDIT) && sima->lock && (sima->flag & SI_DRAWSHADOW)) {
+ if (ob && (ob->mode & OB_MODE_EDIT) && sima->lock && (sima->flag & SI_DRAWSHADOW)) {
ED_area_tag_refresh(sa);
ED_area_tag_redraw(sa);
}
@@ -689,10 +689,10 @@ static int image_context(const bContext *C, const char *member, bContextDataResu
{
SpaceImage *sima= CTX_wm_space_image(C);
- if(CTX_data_dir(member)) {
+ if (CTX_data_dir(member)) {
CTX_data_dir_set(result, image_context_dir);
}
- else if(CTX_data_equals(member, "edit_image")) {
+ else if (CTX_data_equals(member, "edit_image")) {
CTX_data_id_pointer_set(result, (ID*)ED_space_image(sima));
return 1;
}
@@ -710,7 +710,7 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar)
int width, height, winx, winy;
#if 0
- if(image_preview_active(curarea, &width, &height));
+ if (image_preview_active(curarea, &width, &height));
else
#endif
ED_space_image_size(sima, &width, &height);
@@ -718,20 +718,20 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar)
w= width;
h= height;
- if(ima)
+ if (ima)
h *= ima->aspy/ima->aspx;
winx= ar->winrct.xmax - ar->winrct.xmin + 1;
winy= ar->winrct.ymax - ar->winrct.ymin + 1;
- ar->v2d.tot.xmin= 0;
- ar->v2d.tot.ymin= 0;
- ar->v2d.tot.xmax= w;
- ar->v2d.tot.ymax= h;
+ ar->v2d.tot.xmin = 0;
+ ar->v2d.tot.ymin = 0;
+ ar->v2d.tot.xmax = w;
+ ar->v2d.tot.ymax = h;
- ar->v2d.mask.xmin= ar->v2d.mask.ymin= 0;
- ar->v2d.mask.xmax= winx;
- ar->v2d.mask.ymax= winy;
+ ar->v2d.mask.xmin = ar->v2d.mask.ymin = 0;
+ ar->v2d.mask.xmax = winx;
+ ar->v2d.mask.ymax = winy;
/* which part of the image space do we see? */
x1= ar->winrct.xmin+(winx-sima->zoom*w)/2.0f;
@@ -741,12 +741,12 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar)
y1-= sima->zoom*sima->yof;
/* relative display right */
- ar->v2d.cur.xmin= ((ar->winrct.xmin - (float)x1)/sima->zoom);
- ar->v2d.cur.xmax= ar->v2d.cur.xmin + ((float)winx/sima->zoom);
+ ar->v2d.cur.xmin = ((ar->winrct.xmin - (float)x1)/sima->zoom);
+ ar->v2d.cur.xmax = ar->v2d.cur.xmin + ((float)winx/sima->zoom);
/* relative display left */
- ar->v2d.cur.ymin= ((ar->winrct.ymin-(float)y1)/sima->zoom);
- ar->v2d.cur.ymax= ar->v2d.cur.ymin + ((float)winy/sima->zoom);
+ ar->v2d.cur.ymin = ((ar->winrct.ymin-(float)y1)/sima->zoom);
+ ar->v2d.cur.ymax = ar->v2d.cur.ymin + ((float)winy/sima->zoom);
/* normalize 0.0..1.0 */
ar->v2d.cur.xmin /= w;
@@ -764,19 +764,19 @@ static void image_main_area_init(wmWindowManager *wm, ARegion *ar)
// UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy);
/* image paint polls for mode */
- keymap= WM_keymap_find(wm->defaultconf, "Image Paint", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Image Paint", 0, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_find(wm->defaultconf, "UV Editor", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "UV Editor", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "UV Sculpt", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "UV Sculpt", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
/* own keymaps */
- keymap= WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Image", SPACE_IMAGE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Image", SPACE_IMAGE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -851,7 +851,7 @@ static void image_buttons_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -869,7 +869,7 @@ static void image_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case NC_BRUSH:
- if(wmn->action==NA_EDITED)
+ if (wmn->action==NA_EDITED)
ED_region_tag_redraw(ar);
break;
case NC_TEXTURE:
@@ -890,7 +890,7 @@ static void image_scope_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Image Generic", SPACE_IMAGE, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -900,7 +900,7 @@ static void image_scope_area_draw(const bContext *C, ARegion *ar)
Scene *scene= CTX_data_scene(C);
void *lock;
ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock);
- if(ibuf) {
+ if (ibuf) {
scopes_update(&sima->scopes, ibuf, scene->r.color_mgt_flag & R_COLOR_MANAGEMENT );
}
ED_space_image_release_buffer(sima, lock);
diff --git a/source/blender/editors/space_info/CMakeLists.txt b/source/blender/editors/space_info/CMakeLists.txt
index 7cf5b1fc3fb..94b40a9f40a 100644
--- a/source/blender/editors/space_info/CMakeLists.txt
+++ b/source/blender/editors/space_info/CMakeLists.txt
@@ -48,4 +48,8 @@ set(SRC
textview.h
)
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_space_info "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/space_info/SConscript b/source/blender/editors/space_info/SConscript
index 746edadccc2..e4746aefa0c 100644
--- a/source/blender/editors/space_info/SConscript
+++ b/source/blender/editors/space_info/SConscript
@@ -8,4 +8,7 @@ incs += ' ../../bmesh ../../windowmanager #/intern/guardedalloc #/extern/glew/in
defs = []
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
env.BlenderLib ( 'bf_editors_space_info', sources, Split(incs), defs, libtype=['core'], priority=[70] )
diff --git a/source/blender/editors/space_info/info_draw.c b/source/blender/editors/space_info/info_draw.c
index d2be3bd2812..c06a778951d 100644
--- a/source/blender/editors/space_info/info_draw.c
+++ b/source/blender/editors/space_info/info_draw.c
@@ -65,9 +65,9 @@
static void info_report_color(unsigned char *fg, unsigned char *bg, Report *report, int bool)
{
- if(report->flag & SELECT) {
+ if (report->flag & SELECT) {
fg[0]=255; fg[1]=255; fg[2]=255;
- if(bool) {
+ if (bool) {
bg[0]=96; bg[1]=128; bg[2]=255;
}
else {
@@ -114,7 +114,7 @@ static void report_textview_init__internal(TextViewContext *tvc)
const char *str= report->message;
const char *next_str= strchr(str + tvc->iter_char, '\n');
- if(next_str) {
+ if (next_str) {
tvc->iter_char_next= (int)(next_str - str);
}
else {
@@ -151,7 +151,7 @@ static int report_textview_begin(TextViewContext *tvc)
#ifdef USE_INFO_NEWLINE
tvc->iter_tmp= 0;
- if(tvc->iter && report_textview_skip__internal(tvc)) {
+ if (tvc->iter && report_textview_skip__internal(tvc)) {
/* init the newline iterator */
tvc->iter_char= 0;
report_textview_init__internal(tvc);
@@ -177,9 +177,9 @@ static int report_textview_step(TextViewContext *tvc)
/* simple case, but no newline support */
Report *report= (Report *)tvc->iter;
- if(report->len <= tvc->iter_char_next) {
+ if (report->len <= tvc->iter_char_next) {
tvc->iter= (void *)((Link *)tvc->iter)->prev;
- if(tvc->iter && report_textview_skip__internal(tvc)) {
+ if (tvc->iter && report_textview_skip__internal(tvc)) {
tvc->iter_tmp++;
tvc->iter_char= 0; /* reset start */
@@ -270,8 +270,8 @@ static int info_textview_main__internal(struct SpaceInfo *sinfo, struct ARegion
tvc.sel_start= 0;
tvc.sel_end= 0;
tvc.lheight= 14; //sc->lheight;
- tvc.ymin= v2d->cur.ymin;
- tvc.ymax= v2d->cur.ymax;
+ tvc.ymin = v2d->cur.ymin;
+ tvc.ymax = v2d->cur.ymax;
tvc.winx= ar->winx;
ret= textview_draw(&tvc, draw, mval, mouse_pick, pos_pick);
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index e4febdef73b..3157b920ff0 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -85,16 +85,16 @@ static int pack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
ImBuf *ibuf;
// first check for dirty images
- for(ima=bmain->image.first; ima; ima=ima->id.next) {
- if(ima->ibufs.first) { /* XXX FIX */
+ for (ima=bmain->image.first; ima; ima=ima->id.next) {
+ if (ima->ibufs.first) { /* XXX FIX */
ibuf= BKE_image_get_ibuf(ima, NULL);
- if(ibuf && (ibuf->userflags & IB_BITMAPDIRTY))
+ if (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))
break;
}
}
- if(ima) {
+ if (ima) {
uiPupMenuOkee(C, "FILE_OT_pack_all", "Some images are painted on. These changes will be lost. Continue?");
return OPERATOR_CANCELLED;
}
@@ -105,15 +105,15 @@ static int pack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void FILE_OT_pack_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Pack All";
- ot->idname= "FILE_OT_pack_all";
+ ot->name = "Pack All";
+ ot->idname = "FILE_OT_pack_all";
/* api callbacks */
- ot->exec= pack_all_exec;
- ot->invoke= pack_all_invoke;
+ ot->exec = pack_all_exec;
+ ot->invoke = pack_all_invoke;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************* unpack all operator *********************/
@@ -132,7 +132,7 @@ static int unpack_all_exec(bContext *C, wmOperator *op)
Main *bmain= CTX_data_main(C);
int method= RNA_enum_get(op->ptr, "method");
- if(method != PF_KEEP) unpackAll(bmain, op->reports, method); /* XXX PF_ASK can't work here */
+ if (method != PF_KEEP) unpackAll(bmain, op->reports, method); /* XXX PF_ASK can't work here */
G.fileflags &= ~G_AUTOPACK;
return OPERATOR_FINISHED;
@@ -148,13 +148,13 @@ static int unpack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
count = countPackedFiles(bmain);
- if(!count) {
+ if (!count) {
BKE_report(op->reports, RPT_WARNING, "No packed files. Autopack disabled");
G.fileflags &= ~G_AUTOPACK;
return OPERATOR_CANCELLED;
}
- if(count == 1)
+ if (count == 1)
strcpy(title, "Unpack 1 file");
else
BLI_snprintf(title, sizeof(title), "Unpack %d files", count);
@@ -173,15 +173,15 @@ static int unpack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
void FILE_OT_unpack_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Unpack All";
- ot->idname= "FILE_OT_unpack_all";
+ ot->name = "Unpack All";
+ ot->idname = "FILE_OT_unpack_all";
/* api callbacks */
- ot->exec= unpack_all_exec;
- ot->invoke= unpack_all_invoke;
+ ot->exec = unpack_all_exec;
+ ot->invoke = unpack_all_invoke;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "method", unpack_all_method_items, PF_USE_LOCAL, "Method", "How to unpack");
@@ -193,7 +193,7 @@ static int make_paths_relative_exec(bContext *C, wmOperator *op)
{
Main *bmain= CTX_data_main(C);
- if(!G.relbase_valid) {
+ if (!G.relbase_valid) {
BKE_report(op->reports, RPT_WARNING, "Can't set relative paths with an unsaved blend file");
return OPERATOR_CANCELLED;
}
@@ -209,14 +209,14 @@ static int make_paths_relative_exec(bContext *C, wmOperator *op)
void FILE_OT_make_paths_relative(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make All Paths Relative";
- ot->idname= "FILE_OT_make_paths_relative";
+ ot->name = "Make All Paths Relative";
+ ot->idname = "FILE_OT_make_paths_relative";
/* api callbacks */
- ot->exec= make_paths_relative_exec;
+ ot->exec = make_paths_relative_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************* make paths absolute operator *********************/
@@ -225,7 +225,7 @@ static int make_paths_absolute_exec(bContext *C, wmOperator *op)
{
Main *bmain= CTX_data_main(C);
- if(!G.relbase_valid) {
+ if (!G.relbase_valid) {
BKE_report(op->reports, RPT_WARNING, "Can't set absolute paths with an unsaved blend file");
return OPERATOR_CANCELLED;
}
@@ -241,14 +241,14 @@ static int make_paths_absolute_exec(bContext *C, wmOperator *op)
void FILE_OT_make_paths_absolute(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make All Paths Absolute";
- ot->idname= "FILE_OT_make_paths_absolute";
+ ot->name = "Make All Paths Absolute";
+ ot->idname = "FILE_OT_make_paths_absolute";
/* api callbacks */
- ot->exec= make_paths_absolute_exec;
+ ot->exec = make_paths_absolute_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/********************* report missing files operator *********************/
@@ -266,14 +266,14 @@ static int report_missing_files_exec(bContext *C, wmOperator *op)
void FILE_OT_report_missing_files(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Report Missing Files";
- ot->idname= "FILE_OT_report_missing_files";
+ ot->name = "Report Missing Files";
+ ot->idname = "FILE_OT_report_missing_files";
/* api callbacks */
- ot->exec= report_missing_files_exec;
+ ot->exec = report_missing_files_exec;
/* flags */
- ot->flag= 0; /* only reports so no need to undo/register */
+ ot->flag = 0; /* only reports so no need to undo/register */
}
/********************* find missing files operator *********************/
@@ -298,15 +298,15 @@ static int find_missing_files_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE
void FILE_OT_find_missing_files(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Find Missing Files";
- ot->idname= "FILE_OT_find_missing_files";
+ ot->name = "Find Missing Files";
+ ot->idname = "FILE_OT_find_missing_files";
/* api callbacks */
- ot->exec= find_missing_files_exec;
- ot->invoke= find_missing_files_invoke;
+ ot->exec = find_missing_files_exec;
+ ot->invoke = find_missing_files_invoke;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
@@ -339,7 +339,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
int send_note= 0;
/* escape if not our timer */
- if( (reports->reporttimer==NULL) ||
+ if ( (reports->reporttimer==NULL) ||
(reports->reporttimer != event->customdata) ||
((report= BKE_reports_last_displayable(reports))==NULL) /* may have been deleted */
) {
@@ -363,15 +363,17 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
if (rti->widthfac == 0.0f) {
/* initialize colors based on report type */
- if(report->type & RPT_ERROR_ALL) {
+ if (report->type & RPT_ERROR_ALL) {
rti->col[0] = 1.0;
rti->col[1] = 0.2;
rti->col[2] = 0.0;
- } else if(report->type & RPT_WARNING_ALL) {
+ }
+ else if (report->type & RPT_WARNING_ALL) {
rti->col[0] = 1.0;
rti->col[1] = 1.0;
rti->col[2] = 0.0;
- } else if(report->type & RPT_INFO_ALL) {
+ }
+ else if (report->type & RPT_INFO_ALL) {
rti->col[0] = 0.3;
rti->col[1] = 0.45;
rti->col[2] = 0.7;
@@ -384,7 +386,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
color_progress = (float)reports->reporttimer->duration / color_timeout;
/* save us from too many draws */
- if(color_progress <= 1.0f) {
+ if (color_progress <= 1.0f) {
send_note= 1;
/* fade colors out sharply according to progress through fade-out duration */
@@ -399,7 +401,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
send_note= 1;
}
- if(send_note) {
+ if (send_note) {
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_INFO, NULL);
}
@@ -409,14 +411,14 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
void INFO_OT_reports_display_update(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Update Reports Display";
- ot->idname= "INFO_OT_reports_display_update";
+ ot->name = "Update Reports Display";
+ ot->idname = "INFO_OT_reports_display_update";
/* api callbacks */
- ot->invoke= update_reports_display_invoke;
+ ot->invoke = update_reports_display_invoke;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
/* properties */
}
diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c
index a1ea0449128..4e6ccf2f2b1 100644
--- a/source/blender/editors/space_info/info_report.c
+++ b/source/blender/editors/space_info/info_report.c
@@ -53,11 +53,11 @@ int info_report_mask(SpaceInfo *UNUSED(sinfo))
#if 0
int report_mask = 0;
- if(sinfo->rpt_mask & INFO_RPT_DEBUG) report_mask |= RPT_DEBUG_ALL;
- if(sinfo->rpt_mask & INFO_RPT_INFO) report_mask |= RPT_INFO_ALL;
- if(sinfo->rpt_mask & INFO_RPT_OP) report_mask |= RPT_OPERATOR_ALL;
- if(sinfo->rpt_mask & INFO_RPT_WARN) report_mask |= RPT_WARNING_ALL;
- if(sinfo->rpt_mask & INFO_RPT_ERR) report_mask |= RPT_ERROR_ALL;
+ if (sinfo->rpt_mask & INFO_RPT_DEBUG) report_mask |= RPT_DEBUG_ALL;
+ if (sinfo->rpt_mask & INFO_RPT_INFO) report_mask |= RPT_INFO_ALL;
+ if (sinfo->rpt_mask & INFO_RPT_OP) report_mask |= RPT_OPERATOR_ALL;
+ if (sinfo->rpt_mask & INFO_RPT_WARN) report_mask |= RPT_WARNING_ALL;
+ if (sinfo->rpt_mask & INFO_RPT_ERR) report_mask |= RPT_ERROR_ALL;
return report_mask;
#endif
@@ -76,8 +76,8 @@ static int report_replay_exec(bContext *C, wmOperator *UNUSED(op))
#if 0
sc->type= CONSOLE_TYPE_PYTHON;
- for(report=reports->list.last; report; report=report->prev) {
- if((report->type & report_mask) && (report->type & RPT_OPERATOR_ALL) && (report->flag & SELECT)) {
+ for (report=reports->list.last; report; report=report->prev) {
+ if ((report->type & report_mask) && (report->type & RPT_OPERATOR_ALL) && (report->flag & SELECT)) {
console_history_add_str(sc, report->message, 0);
WM_operator_name_call(C, "CONSOLE_OT_execute", WM_OP_EXEC_DEFAULT, NULL);
@@ -95,16 +95,16 @@ static int report_replay_exec(bContext *C, wmOperator *UNUSED(op))
void INFO_OT_report_replay(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Replay Operators";
- ot->description= "Replay selected reports";
- ot->idname= "INFO_OT_report_replay";
+ ot->name = "Replay Operators";
+ ot->description = "Replay selected reports";
+ ot->idname = "INFO_OT_report_replay";
/* api callbacks */
- ot->poll= ED_operator_info_active;
- ot->exec= report_replay_exec;
+ ot->poll = ED_operator_info_active;
+ ot->exec = report_replay_exec;
/* flags */
- /* ot->flag= OPTYPE_REGISTER; */
+ /* ot->flag = OPTYPE_REGISTER; */
/* properties */
}
@@ -114,7 +114,7 @@ static int select_report_pick_exec(bContext *C, wmOperator *op)
int report_index= RNA_int_get(op->ptr, "report_index");
Report *report= BLI_findlink(&CTX_wm_reports(C)->list, report_index);
- if(!report)
+ if (!report)
return OPERATOR_CANCELLED;
report->flag ^= SELECT; /* toggle */
@@ -145,17 +145,17 @@ static int select_report_pick_invoke(bContext *C, wmOperator *op, wmEvent *event
void INFO_OT_select_pick(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select report";
- ot->description= "Select reports by index";
- ot->idname= "INFO_OT_select_pick";
+ ot->name = "Select report";
+ ot->description = "Select reports by index";
+ ot->idname = "INFO_OT_select_pick";
/* api callbacks */
- ot->poll= ED_operator_info_active;
- ot->invoke= select_report_pick_invoke;
- ot->exec= select_report_pick_exec;
+ ot->poll = ED_operator_info_active;
+ ot->invoke = select_report_pick_invoke;
+ ot->exec = select_report_pick_exec;
/* flags */
- /* ot->flag= OPTYPE_REGISTER; */
+ /* ot->flag = OPTYPE_REGISTER; */
/* properties */
RNA_def_int(ot->srna, "report_index", 0, 0, INT_MAX, "Report", "Index of the report", 0, INT_MAX);
@@ -172,22 +172,22 @@ static int report_select_all_toggle_exec(bContext *C, wmOperator *UNUSED(op))
Report *report;
- for(report=reports->list.last; report; report=report->prev) {
- if((report->type & report_mask) && (report->flag & SELECT)) {
+ for (report=reports->list.last; report; report=report->prev) {
+ if ((report->type & report_mask) && (report->flag & SELECT)) {
deselect= 1;
break;
}
}
- if(deselect) {
- for(report=reports->list.last; report; report=report->prev)
- if(report->type & report_mask)
+ if (deselect) {
+ for (report=reports->list.last; report; report=report->prev)
+ if (report->type & report_mask)
report->flag &= ~SELECT;
}
else {
- for(report=reports->list.last; report; report=report->prev)
- if(report->type & report_mask)
+ for (report=reports->list.last; report; report=report->prev)
+ if (report->type & report_mask)
report->flag |= SELECT;
}
@@ -199,16 +199,16 @@ static int report_select_all_toggle_exec(bContext *C, wmOperator *UNUSED(op))
void INFO_OT_select_all_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "(De)Select All";
- ot->description= "(de)select all reports";
- ot->idname= "INFO_OT_select_all_toggle";
+ ot->name = "(De)select All";
+ ot->description = "Select or deselect all reports";
+ ot->idname = "INFO_OT_select_all_toggle";
/* api callbacks */
- ot->poll= ED_operator_info_active;
- ot->exec= report_select_all_toggle_exec;
+ ot->poll = ED_operator_info_active;
+ ot->exec = report_select_all_toggle_exec;
/* flags */
- /*ot->flag= OPTYPE_REGISTER;*/
+ /*ot->flag = OPTYPE_REGISTER;*/
/* properties */
}
@@ -231,10 +231,10 @@ static int borderselect_exec(bContext *C, wmOperator *op)
short selecting= (RNA_int_get(op->ptr, "gesture_mode")==GESTURE_MODAL_SELECT);
//int mval[2];
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
#if 0
mval[0]= rect.xmin;
@@ -245,10 +245,10 @@ static int borderselect_exec(bContext *C, wmOperator *op)
UI_view2d_region_to_view(v2d, mval[0], mval[1], &rectf.xmax, &rectf.ymax);
#endif
- if(!extend) {
- for(report= reports->list.first; report; report= report->next) {
+ if (!extend) {
+ for (report= reports->list.first; report; report= report->next) {
- if((report->type & report_mask)==0)
+ if ((report->type & report_mask)==0)
continue;
report->flag &= ~SELECT;
@@ -259,35 +259,35 @@ static int borderselect_exec(bContext *C, wmOperator *op)
report_max= info_text_pick(sinfo, ar, reports, rect.ymin);
/* get the first report if none found */
- if(report_min==NULL) {
+ if (report_min==NULL) {
// printf("find_min\n");
- for(report=reports->list.first; report; report=report->next) {
- if(report->type & report_mask) {
+ for (report=reports->list.first; report; report=report->next) {
+ if (report->type & report_mask) {
report_min= report;
break;
}
}
}
- if(report_max==NULL) {
+ if (report_max==NULL) {
// printf("find_max\n");
- for(report=reports->list.last; report; report=report->prev) {
- if(report->type & report_mask) {
+ for (report=reports->list.last; report; report=report->prev) {
+ if (report->type & report_mask) {
report_max= report;
break;
}
}
}
- if(report_min==NULL || report_max==NULL)
+ if (report_min==NULL || report_max==NULL)
return OPERATOR_CANCELLED;
- for(report= report_min; (report != report_max->next); report= report->next) {
+ for (report= report_min; (report != report_max->next); report= report->next) {
- if((report->type & report_mask)==0)
+ if ((report->type & report_mask)==0)
continue;
- if(selecting)
+ if (selecting)
report->flag |= SELECT;
else
report->flag &= ~SELECT;
@@ -303,20 +303,20 @@ static int borderselect_exec(bContext *C, wmOperator *op)
void INFO_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Select";
- ot->description= "Toggle border selection";
- ot->idname= "INFO_OT_select_border";
+ ot->name = "Border Select";
+ ot->description = "Toggle border selection";
+ ot->idname = "INFO_OT_select_border";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= borderselect_exec;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = borderselect_exec;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= ED_operator_info_active;
+ ot->poll = ED_operator_info_active;
/* flags */
- /* ot->flag= OPTYPE_REGISTER; */
+ /* ot->flag = OPTYPE_REGISTER; */
/* rna */
WM_operator_properties_gesture_border(ot, TRUE);
@@ -333,11 +333,11 @@ static int report_delete_exec(bContext *C, wmOperator *UNUSED(op))
Report *report, *report_next;
- for(report=reports->list.first; report; ) {
+ for (report=reports->list.first; report; ) {
report_next=report->next;
- if((report->type & report_mask) && (report->flag & SELECT)) {
+ if ((report->type & report_mask) && (report->flag & SELECT)) {
BLI_remlink(&reports->list, report);
MEM_freeN((void *)report->message);
MEM_freeN(report);
@@ -354,16 +354,16 @@ static int report_delete_exec(bContext *C, wmOperator *UNUSED(op))
void INFO_OT_report_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Reports";
- ot->description= "Delete selected reports";
- ot->idname= "INFO_OT_report_delete";
+ ot->name = "Delete Reports";
+ ot->description = "Delete selected reports";
+ ot->idname = "INFO_OT_report_delete";
/* api callbacks */
- ot->poll= ED_operator_info_active;
- ot->exec= report_delete_exec;
+ ot->poll = ED_operator_info_active;
+ ot->exec = report_delete_exec;
/* flags */
- /*ot->flag= OPTYPE_REGISTER;*/
+ /*ot->flag = OPTYPE_REGISTER;*/
/* properties */
}
@@ -380,8 +380,8 @@ static int report_copy_exec(bContext *C, wmOperator *UNUSED(op))
DynStr *buf_dyn= BLI_dynstr_new();
char *buf_str;
- for(report=reports->list.first; report; report= report->next) {
- if((report->type & report_mask) && (report->flag & SELECT)) {
+ for (report=reports->list.first; report; report= report->next) {
+ if ((report->type & report_mask) && (report->flag & SELECT)) {
BLI_dynstr_append(buf_dyn, report->message);
BLI_dynstr_append(buf_dyn, "\n");
}
@@ -399,16 +399,16 @@ static int report_copy_exec(bContext *C, wmOperator *UNUSED(op))
void INFO_OT_report_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Reports to Clipboard";
- ot->description= "Copy selected reports to Clipboard";
- ot->idname= "INFO_OT_report_copy";
+ ot->name = "Copy Reports to Clipboard";
+ ot->description = "Copy selected reports to Clipboard";
+ ot->idname = "INFO_OT_report_copy";
/* api callbacks */
- ot->poll= ED_operator_info_active;
- ot->exec= report_copy_exec;
+ ot->poll = ED_operator_info_active;
+ ot->exec = report_copy_exec;
/* flags */
- /*ot->flag= OPTYPE_REGISTER;*/
+ /*ot->flag = OPTYPE_REGISTER;*/
/* properties */
}
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 120783db340..59e4a1aaf04 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -76,7 +76,7 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
stats->totmesh +=totob;
- if(dm) {
+ if (dm) {
totvert = dm->getNumVerts(dm);
totedge = dm->getNumEdges(dm);
totface = dm->getNumPolys(dm);
@@ -85,7 +85,7 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
stats->totedge += totedge*totob;
stats->totface += totface*totob;
- if(sel) {
+ if (sel) {
stats->totvertsel += totvert;
stats->totfacesel += totface;
}
@@ -102,7 +102,7 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
stats->totcurve += totob;
- if(ob->disp.first)
+ if (ob->disp.first)
count_displist(&ob->disp, &tot, &totf);
tot *= totob;
@@ -111,7 +111,7 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
stats->totvert+= tot;
stats->totface+= totf;
- if(sel) {
+ if (sel) {
stats->totvertsel += tot;
stats->totfacesel += totf;
}
@@ -128,7 +128,7 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
stats->totvert += tot;
stats->totface += totf;
- if(sel) {
+ if (sel) {
stats->totvertsel += tot;
stats->totfacesel += totf;
}
@@ -139,7 +139,7 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
static void stats_object_edit(Object *obedit, SceneStats *stats)
{
- if(obedit->type==OB_MESH) {
+ if (obedit->type==OB_MESH) {
BMEditMesh *em = BMEdit_FromObject(obedit);
stats->totvert = em->bm->totvert;
@@ -151,26 +151,26 @@ static void stats_object_edit(Object *obedit, SceneStats *stats)
stats->totface = em->bm->totface;
stats->totfacesel = em->bm->totfacesel;
}
- else if(obedit->type==OB_ARMATURE){
+ else if (obedit->type==OB_ARMATURE) {
/* Armature Edit */
bArmature *arm= obedit->data;
EditBone *ebo;
- for(ebo=arm->edbo->first; ebo; ebo=ebo->next){
+ for (ebo=arm->edbo->first; ebo; ebo=ebo->next) {
stats->totbone++;
- if((ebo->flag & BONE_CONNECTED) && ebo->parent)
+ if ((ebo->flag & BONE_CONNECTED) && ebo->parent)
stats->totvert--;
- if(ebo->flag & BONE_TIPSEL)
+ if (ebo->flag & BONE_TIPSEL)
stats->totvertsel++;
- if(ebo->flag & BONE_ROOTSEL)
+ if (ebo->flag & BONE_ROOTSEL)
stats->totvertsel++;
- if(ebo->flag & BONE_SELECTED) stats->totbonesel++;
+ if (ebo->flag & BONE_SELECTED) stats->totbonesel++;
/* if this is a connected child and it's parent is being moved, remove our root */
- if((ebo->flag & BONE_CONNECTED)&& (ebo->flag & BONE_ROOTSEL) && ebo->parent && (ebo->parent->flag & BONE_TIPSEL))
+ if ((ebo->flag & BONE_CONNECTED)&& (ebo->flag & BONE_ROOTSEL) && ebo->parent && (ebo->parent->flag & BONE_TIPSEL))
stats->totvertsel--;
stats->totvert+=2;
@@ -185,40 +185,40 @@ static void stats_object_edit(Object *obedit, SceneStats *stats)
int a;
ListBase *nurbs= curve_editnurbs(cu);
- for(nu=nurbs->first; nu; nu=nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu=nurbs->first; nu; nu=nu->next) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
+ while (a--) {
stats->totvert+=3;
- if(bezt->f1) stats->totvertsel++;
- if(bezt->f2) stats->totvertsel++;
- if(bezt->f3) stats->totvertsel++;
+ if (bezt->f1) stats->totvertsel++;
+ if (bezt->f2) stats->totvertsel++;
+ if (bezt->f3) stats->totvertsel++;
bezt++;
}
}
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
+ while (a--) {
stats->totvert++;
- if(bp->f1 & SELECT) stats->totvertsel++;
+ if (bp->f1 & SELECT) stats->totvertsel++;
bp++;
}
}
}
}
- else if(obedit->type==OB_MBALL) {
+ else if (obedit->type==OB_MBALL) {
/* MetaBall Edit */
MetaBall *mball= obedit->data;
MetaElem *ml;
- for(ml= mball->editelems->first; ml; ml=ml->next) {
+ for (ml= mball->editelems->first; ml; ml=ml->next) {
stats->totvert++;
- if(ml->flag & SELECT) stats->totvertsel++;
+ if (ml->flag & SELECT) stats->totvertsel++;
}
}
- else if(obedit->type==OB_LATTICE) {
+ else if (obedit->type==OB_LATTICE) {
/* Lattice Edit */
Lattice *lt= obedit->data;
Lattice *editlatt= lt->editlatt->latt;
@@ -228,9 +228,9 @@ static void stats_object_edit(Object *obedit, SceneStats *stats)
bp= editlatt->def;
a= editlatt->pntsu*editlatt->pntsv*editlatt->pntsw;
- while(a--) {
+ while (a--) {
stats->totvert++;
- if(bp->f1 & SELECT) stats->totvertsel++;
+ if (bp->f1 & SELECT) stats->totvertsel++;
bp++;
}
}
@@ -238,53 +238,43 @@ static void stats_object_edit(Object *obedit, SceneStats *stats)
static void stats_object_pose(Object *ob, SceneStats *stats)
{
- if(ob->pose) {
+ if (ob->pose) {
bArmature *arm= ob->data;
bPoseChannel *pchan;
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
stats->totbone++;
- if(pchan->bone && (pchan->bone->flag & BONE_SELECTED))
- if(pchan->bone->layer & arm->layer)
+ if (pchan->bone && (pchan->bone->flag & BONE_SELECTED))
+ if (pchan->bone->layer & arm->layer)
stats->totbonesel++;
}
}
}
-static void stats_object_paint(Object *ob, SceneStats *stats)
-{
- if(ob->type == OB_MESH) {
- Mesh *me= ob->data;
-
- stats->totface= me->totface;
- stats->totvert= me->totvert;
- }
-}
-
static void stats_dupli_object(Base *base, Object *ob, SceneStats *stats)
{
- if(base->flag & SELECT) stats->totobjsel++;
+ if (base->flag & SELECT) stats->totobjsel++;
- if(ob->transflag & OB_DUPLIPARTS) {
+ if (ob->transflag & OB_DUPLIPARTS) {
/* Dupli Particles */
ParticleSystem *psys;
ParticleSettings *part;
- for(psys=ob->particlesystem.first; psys; psys=psys->next){
+ for (psys=ob->particlesystem.first; psys; psys=psys->next) {
part=psys->part;
- if(part->draw_as==PART_DRAW_OB && part->dup_ob){
+ if (part->draw_as==PART_DRAW_OB && part->dup_ob) {
int tot=count_particles(psys);
stats_object(part->dup_ob, 0, tot, stats);
}
- else if(part->draw_as==PART_DRAW_GR && part->dup_group){
+ else if (part->draw_as==PART_DRAW_GR && part->dup_group) {
GroupObject *go;
int tot, totgroup=0, cur=0;
- for(go= part->dup_group->gobject.first; go; go=go->next)
+ for (go= part->dup_group->gobject.first; go; go=go->next)
totgroup++;
- for(go= part->dup_group->gobject.first; go; go=go->next) {
+ for (go= part->dup_group->gobject.first; go; go=go->next) {
tot=count_particles_mod(psys,totgroup,cur);
stats_object(go->ob, 0, tot, stats);
cur++;
@@ -295,19 +285,19 @@ static void stats_dupli_object(Base *base, Object *ob, SceneStats *stats)
stats_object(ob, base->flag & SELECT, 1, stats);
stats->totobj++;
}
- else if(ob->parent && (ob->parent->transflag & (OB_DUPLIVERTS|OB_DUPLIFACES))) {
+ else if (ob->parent && (ob->parent->transflag & (OB_DUPLIVERTS|OB_DUPLIFACES))) {
/* Dupli Verts/Faces */
int tot= count_duplilist(ob->parent);
stats->totobj+=tot;
stats_object(ob, base->flag & SELECT, tot, stats);
}
- else if(ob->transflag & OB_DUPLIFRAMES) {
+ else if (ob->transflag & OB_DUPLIFRAMES) {
/* Dupli Frames */
int tot= count_duplilist(ob);
stats->totobj+=tot;
stats_object(ob, base->flag & SELECT, tot, stats);
}
- else if((ob->transflag & OB_DUPLIGROUP) && ob->dup_group) {
+ else if ((ob->transflag & OB_DUPLIGROUP) && ob->dup_group) {
/* Dupli Group */
int tot= count_duplilist(ob);
stats->totobj+=tot;
@@ -327,26 +317,22 @@ static void stats_update(Scene *scene)
Object *ob= (scene->basact)? scene->basact->object: NULL;
Base *base;
- if(scene->obedit) {
+ if (scene->obedit) {
/* Edit Mode */
stats_object_edit(scene->obedit, &stats);
}
- else if(ob && (ob->mode & OB_MODE_POSE)) {
+ else if (ob && (ob->mode & OB_MODE_POSE)) {
/* Pose Mode */
stats_object_pose(ob, &stats);
}
- else if(ob && (ob->flag & OB_MODE_ALL_PAINT)) {
- /* Sculpt and Paint Mode */
- stats_object_paint(ob, &stats);
- }
else {
/* Objects */
- for(base= scene->base.first; base; base=base->next)
- if(scene->lay & base->lay)
+ for (base= scene->base.first; base; base=base->next)
+ if (scene->lay & base->lay)
stats_dupli_object(base, base->object, &stats);
}
- if(!scene->stats)
+ if (!scene->stats)
scene->stats= MEM_callocN(sizeof(SceneStats), "SceneStats");
*(scene->stats)= stats;
@@ -365,28 +351,28 @@ static void stats_string(Scene *scene)
/* get memory statistics */
s= memstr + sprintf(memstr, " | Mem:%.2fM", (double)((mem_in_use-mmap_in_use)>>10)/1024.0);
- if(mmap_in_use)
+ if (mmap_in_use)
sprintf(s, " (%.2fM)", (double)((mmap_in_use)>>10)/1024.0);
s= stats->infostr;
s+= sprintf(s, "%s | ", versionstr);
- if(scene->obedit) {
- if(ob_get_keyblock(scene->obedit))
+ if (scene->obedit) {
+ if (ob_get_keyblock(scene->obedit))
s+= sprintf(s, "(Key) ");
- if(scene->obedit->type==OB_MESH) {
- if(scene->toolsettings->selectmode & SCE_SELECT_VERTEX)
+ if (scene->obedit->type==OB_MESH) {
+ if (scene->toolsettings->selectmode & SCE_SELECT_VERTEX)
s+= sprintf(s, "Ve:%d-%d | Ed:%d-%d | Fa:%d-%d",
stats->totvertsel, stats->totvert, stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface);
- else if(scene->toolsettings->selectmode & SCE_SELECT_EDGE)
+ else if (scene->toolsettings->selectmode & SCE_SELECT_EDGE)
s+= sprintf(s, "Ed:%d-%d | Fa:%d-%d",
stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface);
else
s+= sprintf(s, "Fa:%d-%d", stats->totfacesel, stats->totface);
}
- else if(scene->obedit->type==OB_ARMATURE) {
+ else if (scene->obedit->type==OB_ARMATURE) {
s+= sprintf(s, "Ve:%d-%d | Bo:%d-%d", stats->totvertsel, stats->totvert, stats->totbonesel, stats->totbone);
}
else {
@@ -395,7 +381,7 @@ static void stats_string(Scene *scene)
strcat(s, memstr);
}
- else if(ob && (ob->mode & OB_MODE_POSE)) {
+ else if (ob && (ob->mode & OB_MODE_POSE)) {
s += sprintf(s, "Bo:%d-%d %s",
stats->totbonesel, stats->totbone, memstr);
}
@@ -404,13 +390,13 @@ static void stats_string(Scene *scene)
stats->totvert, stats->totface, stats->totobjsel, stats->totobj, stats->totlamp, memstr);
}
- if(ob)
+ if (ob)
sprintf(s, " | %s", ob->id.name+2);
}
void ED_info_stats_clear(Scene *scene)
{
- if(scene->stats) {
+ if (scene->stats) {
MEM_freeN(scene->stats);
scene->stats= NULL;
}
@@ -418,7 +404,7 @@ void ED_info_stats_clear(Scene *scene)
const char *ED_info_stats_string(Scene *scene)
{
- if(!scene->stats)
+ if (!scene->stats)
stats_update(scene);
stats_string(scene);
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index b9ef57e6850..9dc58537145 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -131,7 +131,7 @@ static void info_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "Info", SPACE_INFO, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Info", SPACE_INFO, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -155,7 +155,7 @@ static void info_main_area_draw(const bContext *C, ARegion *ar)
glClear(GL_COLOR_BUFFER_BIT);
/* quick way to avoid drawing if not bug enough */
- if(ar->winy < 16)
+ if (ar->winy < 16)
return;
info_textview_update_rect(C, ar);
@@ -196,12 +196,12 @@ static void info_operatortypes(void)
static void info_keymap(struct wmKeyConfig *keyconf)
{
- wmKeyMap *keymap= WM_keymap_find(keyconf, "Window", 0, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "Window", 0, 0);
WM_keymap_verify_item(keymap, "INFO_OT_reports_display_update", TIMERREPORT, KM_ANY, KM_ANY, 0);
/* info space */
- keymap= WM_keymap_find(keyconf, "Info", SPACE_INFO, 0);
+ keymap = WM_keymap_find(keyconf, "Info", SPACE_INFO, 0);
/* report selection */
@@ -233,7 +233,7 @@ static void info_main_area_listener(ARegion *ar, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
case NC_SPACE:
- if(wmn->data == ND_SPACE_INFO_REPORT) {
+ if (wmn->data == ND_SPACE_INFO_REPORT) {
/* redraw also but only for report view, could do less redraws by checking the type */
ED_region_tag_redraw(ar);
}
@@ -246,23 +246,23 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
case NC_SCREEN:
- if(ELEM(wmn->data, ND_SCREENCAST, ND_ANIMPLAY))
+ if (ELEM(wmn->data, ND_SCREENCAST, ND_ANIMPLAY))
ED_region_tag_redraw(ar);
break;
case NC_WM:
- if(wmn->data == ND_JOB)
+ if (wmn->data == ND_JOB)
ED_region_tag_redraw(ar);
break;
case NC_SCENE:
- if(wmn->data==ND_RENDER_RESULT)
+ if (wmn->data==ND_RENDER_RESULT)
ED_region_tag_redraw(ar);
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_INFO)
+ if (wmn->data == ND_SPACE_INFO)
ED_region_tag_redraw(ar);
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
}
@@ -274,10 +274,11 @@ static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu)
uiLayout *layout= menu->layout;
uiLayoutSetOperatorContext(layout, WM_OP_EXEC_REGION_WIN);
if (G.recent_files.first) {
- for(recent = G.recent_files.first; (recent); recent = recent->next) {
+ for (recent = G.recent_files.first; (recent); recent = recent->next) {
uiItemStringO(layout, BLI_path_basename(recent->filepath), ICON_FILE_BLEND, "WM_OT_open_mainfile", "filepath", recent->filepath);
}
- } else {
+ }
+ else {
uiItemL(layout, IFACE_("No Recent Files"), ICON_NONE);
}
}
diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c
index 177b72567e5..c55ba069e11 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -65,7 +65,7 @@ typedef struct ConsoleDrawContext {
static void console_draw_sel(int sel[2], int xy[2], int str_len_draw, int cwidth, int lheight)
{
- if(sel[0] <= str_len_draw && sel[1] >= 0) {
+ if (sel[0] <= str_len_draw && sel[1] >= 0) {
int sta = MAX2(sel[0], 0);
int end = MIN2(sel[1], str_len_draw);
@@ -95,19 +95,20 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str
const int mono= blf_mono_font;
/* just advance the height */
- if(cdc->draw==0) {
- if(cdc->pos_pick && (cdc->mval[1] != INT_MAX)) {
- if(cdc->xy[1] <= cdc->mval[1]) {
- if((y_next >= cdc->mval[1])) {
+ if (cdc->draw==0) {
+ if (cdc->pos_pick && (cdc->mval[1] != INT_MAX)) {
+ if (cdc->xy[1] <= cdc->mval[1]) {
+ if ((y_next >= cdc->mval[1])) {
int ofs = (int)floor(((float)cdc->mval[0] / (float)cdc->cwidth));
/* wrap */
- if(str_len > cdc->console_width)
+ if (str_len > cdc->console_width)
ofs += (cdc->console_width * ((int)((((float)(y_next - cdc->mval[1]) / (float)(y_next-cdc->xy[1])) * tot_lines))));
CLAMP(ofs, 0, str_len);
*cdc->pos_pick += str_len - ofs;
- } else
+ }
+ else
*cdc->pos_pick += str_len + 1;
}
}
@@ -120,14 +121,14 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str
cdc->xy[1]= y_next;
/* adjust selection even if not drawing */
- if(cdc->sel[0] != cdc->sel[1]) {
+ if (cdc->sel[0] != cdc->sel[1]) {
STEP_SEL(-(str_len + 1));
}
return 1;
}
- if(str_len > cdc->console_width) { /* wrap? */
+ if (str_len > cdc->console_width) { /* wrap? */
const int initial_offset= ((tot_lines-1) * cdc->console_width);
const char *line_stride= str + initial_offset; /* advance to the last line and draw it first */
@@ -138,7 +139,7 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str
cdc->sel[0] = str_len - sel_orig[1];
cdc->sel[1] = str_len - sel_orig[0];
- if(bg) {
+ if (bg) {
glColor3ubv(bg);
glRecti(0, cdc->xy[1]-rct_ofs, cdc->winx, (cdc->xy[1]+(cdc->lheight*tot_lines))+rct_ofs);
}
@@ -149,7 +150,7 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str
BLF_position(mono, cdc->xy[0], cdc->xy[1], 0);
BLF_draw(mono, line_stride, str_len - initial_offset);
- if(cdc->sel[0] != cdc->sel[1]) {
+ if (cdc->sel[0] != cdc->sel[1]) {
STEP_SEL(-initial_offset);
// glColor4ub(255, 0, 0, 96); // debug
console_draw_sel(cdc->sel, cdc->xy, str_len % cdc->console_width, cdc->cwidth, cdc->lheight);
@@ -161,11 +162,11 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str
line_stride -= cdc->console_width;
- for(; line_stride >= str; line_stride -= cdc->console_width) {
+ for (; line_stride >= str; line_stride -= cdc->console_width) {
BLF_position(mono, cdc->xy[0], cdc->xy[1], 0);
BLF_draw(mono, line_stride, cdc->console_width);
- if(cdc->sel[0] != cdc->sel[1]) {
+ if (cdc->sel[0] != cdc->sel[1]) {
// glColor4ub(0, 255, 0, 96); // debug
console_draw_sel(cdc->sel, cdc->xy, cdc->console_width, cdc->cwidth, cdc->lheight);
STEP_SEL(cdc->console_width);
@@ -175,7 +176,7 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str
cdc->xy[1] += cdc->lheight;
/* check if were out of view bounds */
- if(cdc->xy[1] > cdc->ymax)
+ if (cdc->xy[1] > cdc->ymax)
return 0;
}
@@ -184,7 +185,7 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str
}
else { /* simple, no wrap */
- if(bg) {
+ if (bg) {
glColor3ubv(bg);
glRecti(0, cdc->xy[1]-rct_ofs, cdc->winx, cdc->xy[1]+cdc->lheight-rct_ofs);
}
@@ -194,7 +195,7 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str
BLF_position(mono, cdc->xy[0], cdc->xy[1], 0);
BLF_draw(mono, str, str_len);
- if(cdc->sel[0] != cdc->sel[1]) {
+ if (cdc->sel[0] != cdc->sel[1]) {
int isel[2];
isel[0]= str_len - cdc->sel[1];
@@ -207,7 +208,7 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str
cdc->xy[1] += cdc->lheight;
- if(cdc->xy[1] > cdc->ymax)
+ if (cdc->xy[1] > cdc->ymax)
return 0;
}
@@ -232,10 +233,10 @@ int textview_draw(TextViewContext *tvc, int draw, int mval[2], void **mouse_pick
xy[0]= x_orig; xy[1]= y_orig;
- if(mval[1] != INT_MAX)
+ if (mval[1] != INT_MAX)
mval[1] += (tvc->ymin + CONSOLE_DRAW_MARGIN);
- if(pos_pick)
+ if (pos_pick)
*pos_pick = 0;
/* constants for the sequencer context */
@@ -245,8 +246,8 @@ int textview_draw(TextViewContext *tvc, int draw, int mval[2], void **mouse_pick
cdc.console_width= (tvc->winx - (CONSOLE_DRAW_SCROLL + CONSOLE_DRAW_MARGIN*2) ) / cdc.cwidth;
CLAMP(cdc.console_width, 1, INT_MAX); /* avoid divide by zero on small windows */
cdc.winx= tvc->winx-(CONSOLE_DRAW_MARGIN+CONSOLE_DRAW_SCROLL);
- cdc.ymin= tvc->ymin;
- cdc.ymax= tvc->ymax;
+ cdc.ymin = tvc->ymin;
+ cdc.ymax = tvc->ymax;
cdc.xy= xy;
cdc.sel= sel;
cdc.pos_pick= pos_pick;
@@ -258,12 +259,12 @@ int textview_draw(TextViewContext *tvc, int draw, int mval[2], void **mouse_pick
tvc->console_width= cdc.console_width;
tvc->iter_index= 0;
- if(tvc->sel_start != tvc->sel_end) {
+ if (tvc->sel_start != tvc->sel_end) {
sel[0]= tvc->sel_start;
sel[1]= tvc->sel_end;
}
- if(tvc->begin(tvc)) {
+ if (tvc->begin(tvc)) {
do {
const char *ext_line;
@@ -272,26 +273,26 @@ int textview_draw(TextViewContext *tvc, int draw, int mval[2], void **mouse_pick
y_prev= xy[1];
- if(draw)
+ if (draw)
color_flag= tvc->line_color(tvc, fg, bg);
tvc->line_get(tvc, &ext_line, &ext_len);
- if(!console_draw_string(&cdc, ext_line, ext_len, (color_flag & TVC_LINE_FG) ? fg : NULL, (color_flag & TVC_LINE_BG) ? bg : NULL)) {
+ if (!console_draw_string(&cdc, ext_line, ext_len, (color_flag & TVC_LINE_FG) ? fg : NULL, (color_flag & TVC_LINE_BG) ? bg : NULL)) {
/* when drawing, if we pass v2d->cur.ymax, then quit */
- if(draw) {
+ if (draw) {
break; /* past the y limits */
}
}
- if((mval[1] != INT_MAX) && (mval[1] >= y_prev && mval[1] <= xy[1])) {
+ if ((mval[1] != INT_MAX) && (mval[1] >= y_prev && mval[1] <= xy[1])) {
*mouse_pick= (void *)tvc->iter;
break;
}
tvc->iter_index++;
- } while(tvc->step(tvc));
+ } while (tvc->step(tvc));
}
tvc->end(tvc);
diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c
index 388f9470cb5..b98e6995f46 100644
--- a/source/blender/editors/space_logic/logic_buttons.c
+++ b/source/blender/editors/space_logic/logic_buttons.c
@@ -108,7 +108,7 @@ static int logic_properties(bContext *C, wmOperator *UNUSED(op))
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= logic_has_buttons_region(sa);
- if(ar)
+ if (ar)
ED_region_toggle_hidden(C, ar);
return OPERATOR_FINISHED;
@@ -116,15 +116,15 @@ static int logic_properties(bContext *C, wmOperator *UNUSED(op))
void LOGIC_OT_properties(wmOperatorType *ot)
{
- ot->name= "Properties";
- ot->description= "Toggle display properties panel";
- ot->idname= "LOGIC_OT_properties";
+ ot->name = "Properties";
+ ot->description = "Toggle display properties panel";
+ ot->idname = "LOGIC_OT_properties";
- ot->exec= logic_properties;
- ot->poll= ED_operator_logic_active;
+ ot->exec = logic_properties;
+ ot->poll = ED_operator_logic_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
/* Remove Logic Bricks Connections */
@@ -137,15 +137,15 @@ static int cut_links_intersect(uiLinkLine *line, float mcoords[][2], int tot)
int i, b;
rcti rectlink;
- rectlink.xmin= (int) (line->from->x1 + line->from->x2) / 2;
- rectlink.ymin= (int) (line->from->y1 + line->from->y2) / 2;
- rectlink.xmax= (int) (line->to->x1 + line->to->x2) / 2;
- rectlink.ymax= (int) (line->to->y1 + line->to->y2) / 2;
+ rectlink.xmin = (int) (line->from->x1 + line->from->x2) / 2;
+ rectlink.ymin = (int) (line->from->y1 + line->from->y2) / 2;
+ rectlink.xmax = (int) (line->to->x1 + line->to->x2) / 2;
+ rectlink.ymax = (int) (line->to->y1 + line->to->y2) / 2;
- if(ui_link_bezier_points(&rectlink, coord_array, LINK_RESOL)){
- for(i=0; i<tot-1; i++)
- for(b=0; b<LINK_RESOL-1; b++)
- if(isect_line_line_v2(mcoords[i], mcoords[i+1], coord_array[b], coord_array[b+1]) > 0)
+ if (ui_link_bezier_points(&rectlink, coord_array, LINK_RESOL)) {
+ for (i=0; i<tot-1; i++)
+ for (b=0; b<LINK_RESOL-1; b++)
+ if (isect_line_line_v2(mcoords[i], mcoords[i+1], coord_array[b], coord_array[b+1]) > 0)
return 1;
}
return 0;
@@ -164,7 +164,7 @@ static int cut_links_exec(bContext *C, wmOperator *op)
UI_view2d_region_to_view(&ar->v2d, (short)loc[0], (short)loc[1],
&mcoords[i][0], &mcoords[i][1]);
i++;
- if(i>= 256) break;
+ if (i>= 256) break;
}
RNA_END;
@@ -172,15 +172,15 @@ static int cut_links_exec(bContext *C, wmOperator *op)
uiBlock *block;
uiLinkLine *line, *nline;
uiBut *but;
- for(block= ar->uiblocks.first; block; block= block->next)
+ for (block= ar->uiblocks.first; block; block= block->next)
{
but= block->buttons.first;
- while(but) {
- if(but->type==LINK && but->link) {
- for(line= but->link->lines.first; line; line= nline) {
+ while (but) {
+ if (but->type==LINK && but->link) {
+ for (line= but->link->lines.first; line; line= nline) {
nline= line->next;
- if(cut_links_intersect(line, mcoords, i)) {
+ if (cut_links_intersect(line, mcoords, i)) {
ui_delete_linkline(line, but);
}
}
@@ -197,19 +197,19 @@ void LOGIC_OT_links_cut(wmOperatorType *ot)
{
PropertyRNA *prop;
- ot->name= "Cut links";
- ot->idname= "LOGIC_OT_links_cut";
- ot->description= "Remove logic brick connections";
+ ot->name = "Cut links";
+ ot->idname = "LOGIC_OT_links_cut";
+ ot->description = "Remove logic brick connections";
- ot->invoke= WM_gesture_lines_invoke;
- ot->modal= WM_gesture_lines_modal;
- ot->exec= cut_links_exec;
- ot->cancel= WM_gesture_lines_cancel;
+ ot->invoke = WM_gesture_lines_invoke;
+ ot->modal = WM_gesture_lines_modal;
+ ot->exec = cut_links_exec;
+ ot->cancel = WM_gesture_lines_cancel;
- ot->poll= ED_operator_logic_active;
+ ot->poll = ED_operator_logic_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath);
diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c
index 86ac2d0c369..cac4fe04765 100644
--- a/source/blender/editors/space_logic/logic_ops.c
+++ b/source/blender/editors/space_logic/logic_ops.c
@@ -258,16 +258,16 @@ static int sensor_remove_exec(bContext *C, wmOperator *op)
static void LOGIC_OT_sensor_remove(wmOperatorType *ot)
{
- ot->name= "Remove Sensor";
- ot->description= "Remove a sensor from the active object";
- ot->idname= "LOGIC_OT_sensor_remove";
+ ot->name = "Remove Sensor";
+ ot->description = "Remove a sensor from the active object";
+ ot->idname = "LOGIC_OT_sensor_remove";
- ot->invoke= sensor_remove_invoke;
- ot->exec= sensor_remove_exec;
- ot->poll= edit_sensor_poll;
+ ot->invoke = sensor_remove_invoke;
+ ot->exec = sensor_remove_exec;
+ ot->poll = edit_sensor_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_sensor_properties(ot);
}
@@ -293,7 +293,7 @@ static int sensor_add_exec(bContext *C, wmOperator *op)
prop = RNA_struct_find_property(&sens_ptr, "type");
RNA_string_get(op->ptr, "name", name);
- if(BLI_strnlen(name, MAX_NAME) < 1){
+ if (BLI_strnlen(name, MAX_NAME) < 1) {
RNA_property_enum_name(C, &sens_ptr, prop, RNA_property_enum_get(&sens_ptr, prop), &sens_name);
BLI_strncpy(sens->name, sens_name, sizeof(sens->name));
}
@@ -313,20 +313,20 @@ static void LOGIC_OT_sensor_add(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Add Sensor";
+ ot->name = "Add Sensor";
ot->description = "Add a sensor to the active object";
- ot->idname= "LOGIC_OT_sensor_add";
+ ot->idname = "LOGIC_OT_sensor_add";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= sensor_add_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = sensor_add_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, SENS_ALWAYS, "Type", "Type of sensor to add");
+ ot->prop = prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, SENS_ALWAYS, "Type", "Type of sensor to add");
RNA_def_enum_funcs(prop, rna_Sensor_type_itemf);
RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Sensor to add");
RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Sensor to");
@@ -361,16 +361,16 @@ static int controller_remove_exec(bContext *C, wmOperator *op)
static void LOGIC_OT_controller_remove(wmOperatorType *ot)
{
- ot->name= "Remove Controller";
- ot->description= "Remove a controller from the active object";
- ot->idname= "LOGIC_OT_controller_remove";
+ ot->name = "Remove Controller";
+ ot->description = "Remove a controller from the active object";
+ ot->idname = "LOGIC_OT_controller_remove";
- ot->invoke= controller_remove_invoke;
- ot->exec= controller_remove_exec;
- ot->poll= edit_controller_poll;
+ ot->invoke = controller_remove_invoke;
+ ot->exec = controller_remove_exec;
+ ot->poll = edit_controller_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_controller_properties(ot);
}
@@ -386,7 +386,7 @@ static int controller_add_exec(bContext *C, wmOperator *op)
int type= RNA_enum_get(op->ptr, "type");
ob= edit_object_property_get(C, op);
- if(!ob)
+ if (!ob)
return OPERATOR_CANCELLED;
cont= new_controller(type);
@@ -397,7 +397,7 @@ static int controller_add_exec(bContext *C, wmOperator *op)
prop = RNA_struct_find_property(&cont_ptr, "type");
RNA_string_get(op->ptr, "name", name);
- if(BLI_strnlen(name, MAX_NAME) < 1){
+ if (BLI_strnlen(name, MAX_NAME) < 1) {
RNA_property_enum_name(C, &cont_ptr, prop, RNA_property_enum_get(&cont_ptr, prop), &cont_name);
BLI_strncpy(cont->name, cont_name, sizeof(cont->name));
}
@@ -428,20 +428,20 @@ static int controller_add_exec(bContext *C, wmOperator *op)
static void LOGIC_OT_controller_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Controller";
+ ot->name = "Add Controller";
ot->description = "Add a controller to the active object";
- ot->idname= "LOGIC_OT_controller_add";
+ ot->idname = "LOGIC_OT_controller_add";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= controller_add_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = controller_add_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", controller_type_items, CONT_LOGIC_AND, "Type", "Type of controller to add");
+ ot->prop = RNA_def_enum(ot->srna, "type", controller_type_items, CONT_LOGIC_AND, "Type", "Type of controller to add");
RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Controller to add");
RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Controller to");
}
@@ -475,16 +475,16 @@ static int actuator_remove_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e
static void LOGIC_OT_actuator_remove(wmOperatorType *ot)
{
- ot->name= "Remove Actuator";
- ot->description= "Remove an actuator from the active object";
- ot->idname= "LOGIC_OT_actuator_remove";
+ ot->name = "Remove Actuator";
+ ot->description = "Remove an actuator from the active object";
+ ot->idname = "LOGIC_OT_actuator_remove";
- ot->invoke= actuator_remove_invoke;
- ot->exec= actuator_remove_exec;
- ot->poll= edit_actuator_poll;
+ ot->invoke = actuator_remove_invoke;
+ ot->exec = actuator_remove_exec;
+ ot->poll = edit_actuator_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
edit_actuator_properties(ot);
}
@@ -499,7 +499,7 @@ static int actuator_add_exec(bContext *C, wmOperator *op)
int type= RNA_enum_get(op->ptr, "type");
ob= edit_object_property_get(C, op);
- if(!ob)
+ if (!ob)
return OPERATOR_CANCELLED;
act= new_actuator(type);
@@ -510,7 +510,7 @@ static int actuator_add_exec(bContext *C, wmOperator *op)
prop = RNA_struct_find_property(&act_ptr, "type");
RNA_string_get(op->ptr, "name", name);
- if (BLI_strnlen(name, MAX_NAME) < 1){
+ if (BLI_strnlen(name, MAX_NAME) < 1) {
RNA_property_enum_name(C, &act_ptr, prop, RNA_property_enum_get(&act_ptr, prop), &act_name);
BLI_strncpy(act->name, act_name, sizeof(act->name));
}
@@ -530,20 +530,20 @@ static void LOGIC_OT_actuator_add(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Add Actuator";
+ ot->name = "Add Actuator";
ot->description = "Add an actuator to the active object";
- ot->idname= "LOGIC_OT_actuator_add";
+ ot->idname = "LOGIC_OT_actuator_add";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= actuator_add_exec;
- ot->poll= ED_operator_object_active_editable;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = actuator_add_exec;
+ ot->poll = ED_operator_object_active_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, CONT_LOGIC_AND, "Type", "Type of actuator to add");
+ ot->prop = prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, CONT_LOGIC_AND, "Type", "Type of actuator to add");
RNA_def_enum_funcs(prop, rna_Actuator_type_itemf);
RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Actuator to add");
RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Actuator to");
@@ -584,17 +584,17 @@ static int sensor_move_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event
static void LOGIC_OT_sensor_move(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Sensor";
+ ot->name = "Move Sensor";
ot->description = "Move Sensor";
- ot->idname= "LOGIC_OT_sensor_move";
+ ot->idname = "LOGIC_OT_sensor_move";
/* api callbacks */
- ot->invoke= sensor_move_invoke;
- ot->exec= sensor_move_exec;
- ot->poll= edit_sensor_poll;
+ ot->invoke = sensor_move_invoke;
+ ot->exec = sensor_move_exec;
+ ot->poll = edit_sensor_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
edit_sensor_properties(ot);
@@ -629,17 +629,17 @@ static int controller_move_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e
static void LOGIC_OT_controller_move(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Controller";
+ ot->name = "Move Controller";
ot->description = "Move Controller";
- ot->idname= "LOGIC_OT_controller_move";
+ ot->idname = "LOGIC_OT_controller_move";
/* api callbacks */
- ot->invoke= controller_move_invoke;
- ot->exec= controller_move_exec;
- ot->poll= edit_controller_poll;
+ ot->invoke = controller_move_invoke;
+ ot->exec = controller_move_exec;
+ ot->poll = edit_controller_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
edit_controller_properties(ot);
@@ -674,17 +674,17 @@ static int actuator_move_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
static void LOGIC_OT_actuator_move(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Actuator";
+ ot->name = "Move Actuator";
ot->description = "Move Actuator";
- ot->idname= "LOGIC_OT_actuator_move";
+ ot->idname = "LOGIC_OT_actuator_move";
/* api callbacks */
- ot->invoke= actuator_move_invoke;
- ot->exec= actuator_move_exec;
- ot->poll= edit_actuator_poll;
+ ot->invoke = actuator_move_invoke;
+ ot->exec = actuator_move_exec;
+ ot->poll = edit_actuator_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
edit_actuator_properties(ot);
@@ -708,17 +708,17 @@ static int texface_convert_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e
static void LOGIC_OT_texface_convert(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "TexFace to Material Converter";
+ ot->name = "TexFace to Material Converter";
ot->description = "Convert old texface settings into material. It may create new materials if needed";
- ot->idname= "LOGIC_OT_texface_convert";
+ ot->idname = "LOGIC_OT_texface_convert";
/* api callbacks */
- ot->invoke= texface_convert_invoke;
- ot->exec= texface_convert_exec;
-// ot->poll= texface_convert_poll;
+ ot->invoke = texface_convert_invoke;
+ ot->exec = texface_convert_exec;
+// ot->poll = texface_convert_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index 4a301277ff3..37b284a030d 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -132,15 +132,15 @@ void make_unique_prop_names(bContext *C, char *str)
/* for each object, make properties and sca names unique */
/* count total names */
- for(a=0; a<obcount; a++) {
+ for (a=0; a<obcount; a++) {
ob= (Object *)idar[a];
propcount+= BLI_countlist(&ob->prop);
propcount+= BLI_countlist(&ob->sensors);
propcount+= BLI_countlist(&ob->controllers);
propcount+= BLI_countlist(&ob->actuators);
}
- if(propcount==0) {
- if(idar) MEM_freeN(idar);
+ if (propcount==0) {
+ if (idar) MEM_freeN(idar);
return;
}
@@ -149,25 +149,25 @@ void make_unique_prop_names(bContext *C, char *str)
/* count total names */
nr= 0;
- for(a=0; a<obcount; a++) {
+ for (a=0; a<obcount; a++) {
ob= (Object *)idar[a];
prop= ob->prop.first;
- while(prop) {
+ while (prop) {
names[nr++]= prop->name;
prop= prop->next;
}
sens= ob->sensors.first;
- while(sens) {
+ while (sens) {
names[nr++]= sens->name;
sens= sens->next;
}
cont= ob->controllers.first;
- while(cont) {
+ while (cont) {
names[nr++]= cont->name;
cont= cont->next;
}
act= ob->actuators.first;
- while(act) {
+ while (act) {
names[nr++]= act->name;
act= act->next;
}
@@ -177,8 +177,8 @@ void make_unique_prop_names(bContext *C, char *str)
/* now we check for double names, and change them */
- for(nr=0; nr<propcount; nr++) {
- if(names[nr]!=str && strcmp( names[nr], str )==0 ) {
+ for (nr=0; nr<propcount; nr++) {
+ if (names[nr]!=str && strcmp( names[nr], str )==0 ) {
BLI_newname(str, +1);
}
}
@@ -208,19 +208,19 @@ static void old_sca_move_sensor(bContext *C, void *datav, void *move_up)
// val= pupmenu("Move up%x1|Move down %x2");
val = move_up ? 1:2;
- if(val>0) {
+ if (val>0) {
/* now find out which object has this ... */
base= FIRSTBASE;
- while(base) {
+ while (base) {
sens= base->object->sensors.first;
- while(sens) {
- if(sens == sens_to_delete) break;
+ while (sens) {
+ if (sens == sens_to_delete) break;
sens= sens->next;
}
- if(sens) {
- if( val==1 && sens->prev) {
+ if (sens) {
+ if ( val==1 && sens->prev) {
for (tmp=sens->prev; tmp; tmp=tmp->prev) {
if (tmp->flag & SENS_VISIBLE)
break;
@@ -230,7 +230,7 @@ static void old_sca_move_sensor(bContext *C, void *datav, void *move_up)
BLI_insertlinkbefore(&base->object->sensors, tmp, sens);
}
}
- else if( val==2 && sens->next) {
+ else if ( val==2 && sens->next) {
for (tmp=sens->next; tmp; tmp=tmp->next) {
if (tmp->flag & SENS_VISIBLE)
break;
@@ -261,23 +261,23 @@ static void old_sca_move_controller(bContext *C, void *datav, void *move_up)
//val= pupmenu("Move up%x1|Move down %x2");
val = move_up ? 1:2;
- if(val>0) {
+ if (val>0) {
/* now find out which object has this ... */
base= FIRSTBASE;
- while(base) {
+ while (base) {
cont= base->object->controllers.first;
- while(cont) {
- if(cont == controller_to_del) break;
+ while (cont) {
+ if (cont == controller_to_del) break;
cont= cont->next;
}
- if(cont) {
- if( val==1 && cont->prev) {
+ if (cont) {
+ if ( val==1 && cont->prev) {
/* locate the controller that has the same state mask but is earlier in the list */
tmp = cont->prev;
- while(tmp) {
- if(tmp->state_mask & cont->state_mask)
+ while (tmp) {
+ if (tmp->state_mask & cont->state_mask)
break;
tmp = tmp->prev;
}
@@ -286,10 +286,10 @@ static void old_sca_move_controller(bContext *C, void *datav, void *move_up)
BLI_insertlinkbefore(&base->object->controllers, tmp, cont);
}
}
- else if( val==2 && cont->next) {
+ else if ( val==2 && cont->next) {
tmp = cont->next;
- while(tmp) {
- if(tmp->state_mask & cont->state_mask)
+ while (tmp) {
+ if (tmp->state_mask & cont->state_mask)
break;
tmp = tmp->next;
}
@@ -317,19 +317,19 @@ static void old_sca_move_actuator(bContext *C, void *datav, void *move_up)
//val= pupmenu("Move up%x1|Move down %x2");
val = move_up ? 1:2;
- if(val>0) {
+ if (val>0) {
/* now find out which object has this ... */
base= FIRSTBASE;
- while(base) {
+ while (base) {
act= base->object->actuators.first;
- while(act) {
- if(act == actuator_to_move) break;
+ while (act) {
+ if (act == actuator_to_move) break;
act= act->next;
}
- if(act) {
- if( val==1 && act->prev) {
+ if (act) {
+ if ( val==1 && act->prev) {
/* locate the first visible actuators before this one */
for (tmp = act->prev; tmp; tmp=tmp->prev) {
if (tmp->flag & ACT_VISIBLE)
@@ -340,7 +340,7 @@ static void old_sca_move_actuator(bContext *C, void *datav, void *move_up)
BLI_insertlinkbefore(&base->object->actuators, tmp, act);
}
}
- else if( val==2 && act->next) {
+ else if ( val==2 && act->next) {
for (tmp=act->next; tmp; tmp=tmp->next) {
if (tmp->flag & ACT_VISIBLE)
break;
@@ -369,7 +369,7 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
int didit, bit;
ob= CTX_data_active_object(C);
- if(ob==NULL) return;
+ if (ob==NULL) return;
switch(event) {
@@ -385,8 +385,8 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
break;
case B_ADD_SENS:
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
- if(ob->scaflag & OB_ADDSENS) {
+ for (ob=bmain->object.first; ob; ob=ob->id.next) {
+ if (ob->scaflag & OB_ADDSENS) {
ob->scaflag &= ~OB_ADDSENS;
sens= new_sensor(SENS_ALWAYS);
BLI_addtail(&(ob->sensors), sens);
@@ -399,10 +399,10 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
break;
case B_CHANGE_SENS:
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
+ for (ob=bmain->object.first; ob; ob=ob->id.next) {
sens= ob->sensors.first;
- while(sens) {
- if(sens->type != sens->otype) {
+ while (sens) {
+ if (sens->type != sens->otype) {
init_sensor(sens);
sens->otype= sens->type;
break;
@@ -413,10 +413,10 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
break;
case B_DEL_SENS:
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
+ for (ob=bmain->object.first; ob; ob=ob->id.next) {
sens= ob->sensors.first;
- while(sens) {
- if(sens->flag & SENS_DEL) {
+ while (sens) {
+ if (sens->flag & SENS_DEL) {
BLI_remlink(&(ob->sensors), sens);
free_sensor(sens);
break;
@@ -428,8 +428,8 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
break;
case B_ADD_CONT:
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
- if(ob->scaflag & OB_ADDCONT) {
+ for (ob=bmain->object.first; ob; ob=ob->id.next) {
+ if (ob->scaflag & OB_ADDCONT) {
ob->scaflag &= ~OB_ADDCONT;
cont= new_controller(CONT_LOGIC_AND);
make_unique_prop_names(C, cont->name);
@@ -453,8 +453,8 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
break;
case B_SET_STATE_BIT:
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
- if(ob->scaflag & OB_ALLSTATE) {
+ for (ob=bmain->object.first; ob; ob=ob->id.next) {
+ if (ob->scaflag & OB_ALLSTATE) {
ob->scaflag &= ~OB_ALLSTATE;
ob->state = 0x3FFFFFFF;
}
@@ -462,8 +462,8 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
break;
case B_INIT_STATE_BIT:
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
- if(ob->scaflag & OB_INITSTBIT) {
+ for (ob=bmain->object.first; ob; ob=ob->id.next) {
+ if (ob->scaflag & OB_INITSTBIT) {
ob->scaflag &= ~OB_INITSTBIT;
ob->state = ob->init_state;
if (!ob->state)
@@ -473,10 +473,10 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
break;
case B_CHANGE_CONT:
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
+ for (ob=bmain->object.first; ob; ob=ob->id.next) {
cont= ob->controllers.first;
- while(cont) {
- if(cont->type != cont->otype) {
+ while (cont) {
+ if (cont->type != cont->otype) {
init_controller(cont);
cont->otype= cont->type;
break;
@@ -488,10 +488,10 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
case B_DEL_CONT:
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
+ for (ob=bmain->object.first; ob; ob=ob->id.next) {
cont= ob->controllers.first;
- while(cont) {
- if(cont->flag & CONT_DEL) {
+ while (cont) {
+ if (cont->flag & CONT_DEL) {
BLI_remlink(&(ob->controllers), cont);
unlink_controller(cont);
free_controller(cont);
@@ -504,8 +504,8 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
break;
case B_ADD_ACT:
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
- if(ob->scaflag & OB_ADDACT) {
+ for (ob=bmain->object.first; ob; ob=ob->id.next) {
+ if (ob->scaflag & OB_ADDACT) {
ob->scaflag &= ~OB_ADDACT;
act= new_actuator(ACT_OBJECT);
make_unique_prop_names(C, act->name);
@@ -517,10 +517,10 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
break;
case B_CHANGE_ACT:
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
+ for (ob=bmain->object.first; ob; ob=ob->id.next) {
act= ob->actuators.first;
- while(act) {
- if(act->type != act->otype) {
+ while (act) {
+ if (act->type != act->otype) {
init_actuator(act);
act->otype= act->type;
break;
@@ -531,10 +531,10 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
break;
case B_DEL_ACT:
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
+ for (ob=bmain->object.first; ob; ob=ob->id.next) {
act= ob->actuators.first;
- while(act) {
- if(act->flag & ACT_DEL) {
+ while (act) {
+ if (act->flag & ACT_DEL) {
BLI_remlink(&(ob->actuators), act);
unlink_actuator(act);
free_actuator(act);
@@ -549,38 +549,38 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
case B_SOUNDACT_BROWSE:
/* since we don't know which... */
didit= 0;
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
+ for (ob=bmain->object.first; ob; ob=ob->id.next) {
act= ob->actuators.first;
- while(act)
+ while (act)
{
- if(act->type==ACT_SOUND)
+ if (act->type==ACT_SOUND)
{
bSoundActuator *sa= act->data;
- if(sa->sndnr)
+ if (sa->sndnr)
{
ID *sound= bmain->sound.first;
int nr= 1;
- if(sa->sndnr == -2) {
+ if (sa->sndnr == -2) {
// XXX activate_databrowse((ID *)bmain->sound.first, ID_SO, 0, B_SOUNDACT_BROWSE,
// &sa->sndnr, do_logic_buts);
break;
}
- while(sound)
+ while (sound)
{
- if(nr==sa->sndnr)
+ if (nr==sa->sndnr)
break;
nr++;
sound= sound->next;
}
- if(sa->sound)
+ if (sa->sound)
((ID *)sa->sound)->us--;
sa->sound= (struct bSound *)sound;
- if(sound)
+ if (sound)
sound->us++;
sa->sndnr= 0;
@@ -589,7 +589,7 @@ static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
}
act= act->next;
}
- if(didit)
+ if (didit)
break;
}
@@ -759,12 +759,12 @@ static void set_sca_ob(Object *ob)
bActuator *act;
cont= ob->controllers.first;
- while(cont) {
+ while (cont) {
cont->mynew= (bController *)ob;
cont= cont->next;
}
act= ob->actuators.first;
- while(act) {
+ while (act) {
act->mynew= (bActuator *)ob;
act= act->next;
}
@@ -788,10 +788,10 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
*count= 0;
- if(scene==NULL) return NULL;
+ if (scene==NULL) return NULL;
ob= bmain->object.first;
- while(ob) {
+ while (ob) {
ob->scavisflag= 0;
set_sca_ob(ob);
ob= ob->id.next;
@@ -801,78 +801,78 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
lay= scene->lay;
base= FIRSTBASE;
- while(base) {
- if(base->lay & lay) {
- if(base->flag & SELECT) {
- if(scavisflag & BUTS_SENS_SEL) base->object->scavisflag |= OB_VIS_SENS;
- if(scavisflag & BUTS_CONT_SEL) base->object->scavisflag |= OB_VIS_CONT;
- if(scavisflag & BUTS_ACT_SEL) base->object->scavisflag |= OB_VIS_ACT;
+ while (base) {
+ if (base->lay & lay) {
+ if (base->flag & SELECT) {
+ if (scavisflag & BUTS_SENS_SEL) base->object->scavisflag |= OB_VIS_SENS;
+ if (scavisflag & BUTS_CONT_SEL) base->object->scavisflag |= OB_VIS_CONT;
+ if (scavisflag & BUTS_ACT_SEL) base->object->scavisflag |= OB_VIS_ACT;
}
}
base= base->next;
}
- if(obact) {
- if(scavisflag & BUTS_SENS_ACT) obact->scavisflag |= OB_VIS_SENS;
- if(scavisflag & BUTS_CONT_ACT) obact->scavisflag |= OB_VIS_CONT;
- if(scavisflag & BUTS_ACT_ACT) obact->scavisflag |= OB_VIS_ACT;
+ if (obact) {
+ if (scavisflag & BUTS_SENS_ACT) obact->scavisflag |= OB_VIS_SENS;
+ if (scavisflag & BUTS_CONT_ACT) obact->scavisflag |= OB_VIS_CONT;
+ if (scavisflag & BUTS_ACT_ACT) obact->scavisflag |= OB_VIS_ACT;
}
/* 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)) {
+ if (scavisflag & (BUTS_SENS_LINK|BUTS_CONT_LINK|BUTS_ACT_LINK|BUTS_SENS_STATE|BUTS_ACT_STATE)) {
doit= 1;
- while(doit) {
+ while (doit) {
doit= 0;
ob= bmain->object.first;
- while(ob) {
+ while (ob) {
/* 1st case: select sensor when controller selected */
- if((scavisflag & (BUTS_SENS_LINK|BUTS_SENS_STATE)) && (ob->scavisflag & OB_VIS_SENS)==0) {
+ if ((scavisflag & (BUTS_SENS_LINK|BUTS_SENS_STATE)) && (ob->scavisflag & OB_VIS_SENS)==0) {
sens= ob->sensors.first;
- while(sens) {
- for(a=0; a<sens->totlinks; a++) {
- if(sens->links[a]) {
+ while (sens) {
+ for (a=0; a<sens->totlinks; a++) {
+ if (sens->links[a]) {
obt= (Object *)sens->links[a]->mynew;
- if(obt && (obt->scavisflag & OB_VIS_CONT)) {
+ if (obt && (obt->scavisflag & OB_VIS_CONT)) {
doit= 1;
ob->scavisflag |= OB_VIS_SENS;
break;
}
}
}
- if(doit) break;
+ if (doit) break;
sens= sens->next;
}
}
/* 2nd case: select cont when act selected */
- if((scavisflag & BUTS_CONT_LINK) && (ob->scavisflag & OB_VIS_CONT)==0) {
+ if ((scavisflag & BUTS_CONT_LINK) && (ob->scavisflag & OB_VIS_CONT)==0) {
cont= ob->controllers.first;
- while(cont) {
- for(a=0; a<cont->totlinks; a++) {
- if(cont->links[a]) {
+ while (cont) {
+ for (a=0; a<cont->totlinks; a++) {
+ if (cont->links[a]) {
obt= (Object *)cont->links[a]->mynew;
- if(obt && (obt->scavisflag & OB_VIS_ACT)) {
+ if (obt && (obt->scavisflag & OB_VIS_ACT)) {
doit= 1;
ob->scavisflag |= OB_VIS_CONT;
break;
}
}
}
- if(doit) break;
+ if (doit) break;
cont= cont->next;
}
}
/* 3rd case: select controller when sensor selected */
- if((scavisflag & BUTS_CONT_LINK) && (ob->scavisflag & OB_VIS_SENS)) {
+ if ((scavisflag & BUTS_CONT_LINK) && (ob->scavisflag & OB_VIS_SENS)) {
sens= ob->sensors.first;
- while(sens) {
- for(a=0; a<sens->totlinks; a++) {
- if(sens->links[a]) {
+ while (sens) {
+ for (a=0; a<sens->totlinks; a++) {
+ if (sens->links[a]) {
obt= (Object *)sens->links[a]->mynew;
- if(obt && (obt->scavisflag & OB_VIS_CONT)==0) {
+ if (obt && (obt->scavisflag & OB_VIS_CONT)==0) {
doit= 1;
obt->scavisflag |= OB_VIS_CONT;
}
@@ -883,13 +883,13 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
}
/* 4th case: select actuator when controller selected */
- if( (scavisflag & (BUTS_ACT_LINK|BUTS_ACT_STATE)) && (ob->scavisflag & OB_VIS_CONT)) {
+ if ( (scavisflag & (BUTS_ACT_LINK|BUTS_ACT_STATE)) && (ob->scavisflag & OB_VIS_CONT)) {
cont= ob->controllers.first;
- while(cont) {
- for(a=0; a<cont->totlinks; a++) {
- if(cont->links[a]) {
+ while (cont) {
+ for (a=0; a<cont->totlinks; a++) {
+ if (cont->links[a]) {
obt= (Object *)cont->links[a]->mynew;
- if(obt && (obt->scavisflag & OB_VIS_ACT)==0) {
+ if (obt && (obt->scavisflag & OB_VIS_ACT)==0) {
doit= 1;
obt->scavisflag |= OB_VIS_ACT;
}
@@ -906,13 +906,13 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
/* now we count */
ob= bmain->object.first;
- while(ob) {
- if( ob->scavisflag ) (*count)++;
+ while (ob) {
+ if ( ob->scavisflag ) (*count)++;
ob= ob->id.next;
}
- if(*count==0) return NULL;
- if(*count>24) *count= 24; /* temporal */
+ if (*count==0) return NULL;
+ if (*count>24) *count= 24; /* temporal */
idar= MEM_callocN( (*count)*sizeof(void *), "idar");
@@ -925,12 +925,12 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
nr++;
}
- while(ob) {
- if( (ob->scavisflag) && (ob != obact)) {
+ while (ob) {
+ if ( (ob->scavisflag) && (ob != obact)) {
idar[nr]= (ID *)ob;
nr++;
}
- if(nr>=24) break;
+ if (nr>=24) break;
ob= ob->id.next;
}
@@ -975,8 +975,8 @@ static void verify_logicbutton_func(bContext *UNUSED(C), void *data1, void *data
{
bSensor *sens= (bSensor*)data1;
- if(sens->level && sens->tap) {
- if(data2 == &(sens->level))
+ if (sens->level && sens->tap) {
+ if (data2 == &(sens->level))
sens->tap= 0;
else
sens->level= 0;
@@ -991,7 +991,7 @@ static void test_scriptpoin_but(struct bContext *C, const char *name, ID **idpp)
static void test_actionpoin_but(struct bContext *C, const char *name, ID **idpp)
{
*idpp= BLI_findstring(&CTX_data_main(C)->action, name, offsetof(ID, name) + 2);
- if(*idpp)
+ if (*idpp)
id_us_plus(*idpp);
}
@@ -999,28 +999,28 @@ static void test_actionpoin_but(struct bContext *C, const char *name, ID **idpp)
static void test_obpoin_but(struct bContext *C, const char *name, ID **idpp)
{
*idpp= BLI_findstring(&CTX_data_main(C)->object, name, offsetof(ID, name) + 2);
- if(*idpp)
+ if (*idpp)
id_lib_extern(*idpp); /* checks lib data, sets correct flag for saving then */
}
static void test_meshpoin_but(struct bContext *C, const char *name, ID **idpp)
{
*idpp= BLI_findstring(&CTX_data_main(C)->mesh, name, offsetof(ID, name) + 2);
- if(*idpp)
+ if (*idpp)
id_us_plus(*idpp);
}
static void test_matpoin_but(struct bContext *C, const char *name, ID **idpp)
{
*idpp= BLI_findstring(&CTX_data_main(C)->mat, name, offsetof(ID, name) + 2);
- if(*idpp)
+ if (*idpp)
id_us_plus(*idpp);
}
static void test_scenepoin_but(struct bContext *C, const char *name, ID **idpp)
{
*idpp= BLI_findstring(&CTX_data_main(C)->scene, name, offsetof(ID, name) + 2);
- if(*idpp)
+ if (*idpp)
id_us_plus(*idpp);
}
@@ -1028,11 +1028,11 @@ static void test_keyboard_event(struct bContext *UNUSED(C), void *arg_ks, void *
{
bKeyboardSensor *ks= (bKeyboardSensor*)arg_ks;
- if(!ISKEYBOARD(ks->key))
+ if (!ISKEYBOARD(ks->key))
ks->key= 0;
- if(!ISKEYBOARD(ks->qual))
+ if (!ISKEYBOARD(ks->qual))
ks->qual= 0;
- if(!ISKEYBOARD(ks->qual2))
+ if (!ISKEYBOARD(ks->qual2))
ks->qual2= 0;
}
@@ -1067,12 +1067,12 @@ static void draw_default_sensor_header(bSensor *sens,
/* value or shift? */
uiBlockBeginAlign(block);
- but= uiDefButS(block, TOG, 1, "Level",
+ but = uiDefButS(block, TOG, 1, "Level",
(short)(x + 10 + 0.5 * (w-20)), (short)(y - 21), (short)(0.20 * (w-20)), 19,
&sens->level, 0.0, 0.0, 0, 0,
"Level detector, trigger controllers of new states (only applicable upon logic state transition)");
uiButSetFunc(but, verify_logicbutton_func, sens, &(sens->level));
- but= uiDefButS(block, TOG, 1, "Tap",
+ but = uiDefButS(block, TOG, 1, "Tap",
(short)(x + 10 + 0.702 * (w-20)), (short)(y - 21), (short)(0.12 * (w-20)), 19,
&sens->tap, 0.0, 0.0, 0, 0,
"Trigger controllers only for an instant, even while the sensor remains true");
@@ -1090,9 +1090,9 @@ static void get_armature_bone_constraint(Object *ob, const char *posechannel, co
/* check that bone exist in the active object */
if (ob->type == OB_ARMATURE && ob->pose) {
bPoseChannel *pchan= get_pose_channel(ob->pose, posechannel);
- if(pchan) {
+ if (pchan) {
bConstraint *con= BLI_findstring(&pchan->constraints, constraint_name, offsetof(bConstraint, name));
- if(con) {
+ if (con) {
*constraint= con;
}
}
@@ -1218,7 +1218,8 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
uiDefBut(block, TEX, 1, "Material:", (short)(xco + 10 + 0.40 * (width-20)),
(short)(yco-44), (short)(0.6*(width-20)), 19, &cs->materialName, 0, MAX_NAME, 0, 0,
"Only look for Objects with this material");
- } else {
+ }
+ else {
uiDefBut(block, TEX, 1, "Property:", (short)(xco + 10 + 0.40 * (width-20)), (short)(yco-44),
(short)(0.6*(width-20)), 19, &cs->name, 0, MAX_NAME, 0, 0,
"Only look for Objects with this property");
@@ -1302,14 +1303,14 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
if ((ks->type&1)==0) { /* is All Keys option off? */
/* line 2: hotkey and allkeys toggle */
- but= uiDefKeyevtButS(block, 0, "", xco+40, yco-44, (width)/2, 19, &ks->key, "Key code");
+ but = uiDefKeyevtButS(block, 0, "", xco+40, yco-44, (width)/2, 19, &ks->key, "Key code");
uiButSetFunc(but, test_keyboard_event, ks, NULL);
/* line 3: two key modifyers (qual1, qual2) */
uiDefBut(block, LABEL, 0, "Hold", xco, yco-68, 40, 19, NULL, 0, 0, 0, 0, "");
- but= uiDefKeyevtButS(block, 0, "", xco+40, yco-68, (width-50)/2, 19, &ks->qual, "Modifier key code");
+ but = uiDefKeyevtButS(block, 0, "", xco+40, yco-68, (width-50)/2, 19, &ks->qual, "Modifier key code");
uiButSetFunc(but, test_keyboard_event, ks, NULL);
- but= uiDefKeyevtButS(block, 0, "", xco+40+(width-50)/2, yco-68, (width-50)/2, 19, &ks->qual2, "Second Modifier key code");
+ but = uiDefKeyevtButS(block, 0, "", xco+40+(width-50)/2, yco-68, (width-50)/2, 19, &ks->qual2, "Second Modifier key code");
uiButSetFunc(but, test_keyboard_event, ks, NULL);
}
@@ -1352,14 +1353,14 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
ps->name, 0, MAX_NAME, 0, 0, "Property name");
}
- if(ps->type == SENS_PROP_INTERVAL)
+ if (ps->type == SENS_PROP_INTERVAL)
{
uiDefBut(block, TEX, 1, "Min: ", xco,yco-92,width/2, 19,
ps->value, 0, MAX_NAME, 0, 0, "check for min value");
uiDefBut(block, TEX, 1, "Max: ", xco+width/2,yco-92,width/2, 19,
ps->maxvalue, 0, MAX_NAME, 0, 0, "check for max value");
}
- else if(ps->type == SENS_PROP_CHANGED) {
+ else if (ps->type == SENS_PROP_CHANGED) {
/* pass */
}
else {
@@ -1469,7 +1470,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
&ms->type, 0, 31, 0, 0,
"Specify the type of event this mouse sensor should trigger on");
- if(ms->type==32) {
+ if (ms->type==32) {
uiDefButBitS(block, TOG, SENS_MOUSE_FOCUS_PULSE, B_REDR, "Pulse",(short)(xco + 10) + (width*0.8f)-20,(short)(yco - 44),
(short)(0.20 * (width-20)), 19, &ms->flag, 0.0, 0.0, 0, 0,
"Moving the mouse over a different object generates a pulse");
@@ -1599,7 +1600,8 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
str = "All Hat Events";
break;
}
- } else {
+ }
+ else {
str = "All";
}
@@ -1608,7 +1610,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
&joy->flag, 0, 0, 0, 0,
"Triggered by all events on this joysticks current type (axis/button/hat)");
}
- if(joy->type == SENS_JOY_BUTTON)
+ if (joy->type == SENS_JOY_BUTTON)
{
if ((joy->flag & SENS_JOY_ANY_EVENT)==0) {
uiDefButI(block, NUM, 1, "Number:", xco+10 + 0.6 * (width-20), yco-68, 0.4 * (width-20), 19,
@@ -1616,7 +1618,7 @@ static short draw_sensorbuttons(Object *ob, bSensor *sens, uiBlock *block, short
"Specify which button to use");
}
}
- else if(joy->type == SENS_JOY_AXIS) {
+ else if (joy->type == SENS_JOY_AXIS) {
uiDefButS(block, NUM, 1, "Number:", xco+10, yco-68, 0.46 * (width-20), 19,
&joy->axis, 1, 8.0, 100, 0,
"Specify which axis pair to use, 1 is useually the main direction input");
@@ -1689,7 +1691,7 @@ static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco
case CONT_PYTHON:
ysize= 28;
- if(cont->data==NULL) init_controller(cont);
+ if (cont->data==NULL) init_controller(cont);
pc= cont->data;
UI_ThemeColor(TH_PANEL);
@@ -1699,7 +1701,7 @@ static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco
uiBlockBeginAlign(block);
uiDefButI(block, MENU, B_REDR, "Execution Method%t|Script%x0|Module%x1", xco+4,yco-23, 66, 19, &pc->mode, 0, 0, 0, 0, "Python script type (textblock or module - faster)");
- if(pc->mode==0)
+ if (pc->mode==0)
uiDefIDPoinBut(block, test_scriptpoin_but, ID_TXT, 1, "", xco+70,yco-23,width-74, 19, &pc->text, "Blender textblock to run as a script");
else {
uiDefBut(block, TEX, 1, "", xco+70,yco-23,(width-70)-25, 19, pc->module, 0, sizeof(pc->module), 0, 0, "Module name and function to run e.g. \"someModule.main\". Internal texts and external python files can be used");
@@ -1945,7 +1947,8 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefButBitS(block, TOG, ACT_ADD_LIN_VEL, 0, "use_additive",xco+45+3*wval+15, yco-129, 35, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between ADD and SET linV");
}
- } else if (oa->type == ACT_OBJECT_SERVO)
+ }
+ else if (oa->type == ACT_OBJECT_SERVO)
{
ysize= 195;
@@ -2026,7 +2029,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
&aa->end_reset, 0.0, 0.0, 0, 0, "Restore last frame when switching on/off, otherwise play from the start each time");
- if(aa->type == ACT_ACTION_FROM_PROP) {
+ if (aa->type == ACT_ACTION_FROM_PROP) {
uiDefBut(block, TEX, 0, "Prop: ",xco+10, yco-44, width-20, 19, aa->name, 0.0, MAX_NAME, 0, 0, "Use this property to define the Action position");
}
else {
@@ -2084,7 +2087,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
"Let the ipo acts in local coordinates, used in Force and Add mode");
}
- if(ia->type==ACT_IPO_FROM_PROP) {
+ if (ia->type==ACT_IPO_FROM_PROP) {
uiDefBut(block, TEX, 0,
"Prop: ", xco+10, yco-44, width-80, 19,
ia->name, 0.0, MAX_NAME, 0, 0,
@@ -2127,11 +2130,11 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefBut(block, TEX, 1, "Prop: ", xco+30,yco-44,width-60, 19, pa->name, 0, MAX_NAME, 0, 0, "Property name");
- if(pa->type==ACT_PROP_TOGGLE) {
+ if (pa->type==ACT_PROP_TOGGLE) {
/* no ui */
ysize -= 22;
}
- else if(pa->type==ACT_PROP_COPY) {
+ else if (pa->type==ACT_PROP_COPY) {
uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+10, yco-64, (width-20)/2, 19, &(pa->ob), "Copy from this Object");
uiDefBut(block, TEX, 1, "Prop: ", xco+10+(width-20)/2, yco-64, (width-20)/2, 19, pa->value, 0, MAX_NAME, 0, 0, "Copy this property");
}
@@ -2147,7 +2150,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
sa = act->data;
sa->sndnr = 0;
- if(sa->flag & ACT_SND_3D_SOUND)
+ if (sa->flag & ACT_SND_3D_SOUND)
ysize = 180;
else
ysize = 92;
@@ -2156,7 +2159,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
glRects(xco, yco-ysize, xco+width, yco);
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
- if(bmain->sound.first) {
+ if (bmain->sound.first) {
IDnames_to_pupstring(&str, "Sound files", NULL, &(bmain->sound), (ID *)sa->sound, &(sa->sndnr));
/* reset this value, it is for handling the event */
sa->sndnr = 0;
@@ -2164,7 +2167,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefButO(block, BUT, "sound.open", 0, "Load Sound", xco+wval+10, yco-22, wval, 19,
"Load a sound file (remember to set caching on for small sounds that are played often)");
- if(sa->sound) {
+ if (sa->sound) {
char dummy_str[] = "Sound mode %t|Play Stop %x0|Play End %x1|Loop Stop %x2|"
"Loop End %x3|Loop Ping Pong Stop %x5|Loop Ping Pong %x4";
uiDefBut(block, TEX, B_IDNAME, "SO:",xco+30,yco-22,wval-20,19,
@@ -2177,7 +2180,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
12.0, 0, 0, "Sets the pitch of this sound");
uiDefButS(block, TOG | BIT, 0, "3D Sound", xco+10, yco-88, width-20, 19,
&sa->flag, 0.0, 1.0, 0.0, 0.0, "Plays the sound positioned in 3D space");
- if(sa->flag & ACT_SND_3D_SOUND) {
+ if (sa->flag & ACT_SND_3D_SOUND) {
uiDefButF(block, NUM, 0, "Minimum Gain: ", xco+10, yco-110, wval, 19,
&sa->sound3D.min_gain, 0.0, 1.0, 0.0, 0.0,
"The minimum gain of the sound, no matter how far it is away");
@@ -2229,7 +2232,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefButF(block, NUM, 0, "Min:", xco+10, yco-44, (width-60)/2, 19, &ca->min, 0.0, 20.0, 0, 0, "");
- if(ca->axis==0) ca->axis= 'x';
+ if (ca->axis==0) ca->axis= 'x';
uiDefButS(block, ROW, 0, "X", xco+10+(width-60)/2, yco-44, 20, 19, &ca->axis, 4.0, (float)'x', 0, 0, "Camera tries to get behind the X axis");
uiDefButS(block, ROW, 0, "Y", xco+30+(width-60)/2, yco-44, 20, 19, &ca->axis, 4.0, (float)'y', 0, 0, "Camera tries to get behind the Y axis");
@@ -2243,7 +2246,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
eoa= act->data;
- if(eoa->type==ACT_EDOB_ADD_OBJECT) {
+ if (eoa->type==ACT_EDOB_ADD_OBJECT) {
ysize = 92;
glRects(xco, yco-ysize, xco+width, yco);
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
@@ -2287,12 +2290,12 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
}
- else if(eoa->type==ACT_EDOB_END_OBJECT) {
+ else if (eoa->type==ACT_EDOB_END_OBJECT) {
ysize= 28;
glRects(xco, yco-ysize, xco+width, yco);
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
}
- else if(eoa->type==ACT_EDOB_REPLACE_MESH) {
+ else if (eoa->type==ACT_EDOB_REPLACE_MESH) {
ysize= 48;
glRects(xco, yco-ysize, xco+width, yco);
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
@@ -2302,7 +2305,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefButBitS(block, TOGN, ACT_EDOB_REPLACE_MESH_NOGFX, 0, "Gfx", xco+40 + (width-80)/2, yco-44, (width-80)/4, 19, &eoa->flag, 0, 0, 0, 0, "Replace the display mesh");
uiDefButBitS(block, TOG, ACT_EDOB_REPLACE_MESH_PHYS, 0, "Phys", xco+40 + (width-80)/2 +(width-80)/4, yco-44, (width-80)/4, 19, &eoa->flag, 0, 0, 0, 0, "Replace the physics mesh (triangle bounds only. compound shapes not supported)");
}
- else if(eoa->type==ACT_EDOB_TRACK_TO) {
+ else if (eoa->type==ACT_EDOB_TRACK_TO) {
ysize= 48;
glRects(xco, yco-ysize, xco+width, yco);
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
@@ -2311,14 +2314,14 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefButI(block, NUM, 0, "Time:", xco+10+(width-20)/2, yco-44, (width-20)/2-40, 19, &eoa->time, 0.0, 2000.0, 0, 0, "Duration the tracking takes");
uiDefButS(block, TOG, 0, "3D", xco+width-50, yco-44, 40, 19, &eoa->flag, 0.0, 0.0, 0, 0, "Enable 3D tracking");
}
- else if(eoa->type==ACT_EDOB_DYNAMICS) {
+ else if (eoa->type==ACT_EDOB_DYNAMICS) {
ysize= 69;
glRects(xco, yco-ysize, xco+width, yco);
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
str= "Dynamic Operation %t|Restore Dynamics %x0|Suspend Dynamics %x1|Enable Rigid Body %x2|Disable Rigid Body %x3|Set Mass %x4";
uiDefButS(block, MENU, B_REDR, str, xco+40, yco-44, (width-80), 19, &(eoa->dyn_operation), 0.0, 0.0, 0, 0, "");
- if(eoa->dyn_operation==4) {
+ if (eoa->dyn_operation==4) {
uiDefButF(block, NUM, 0, "", xco+40, yco-63, width-80, 19,
&eoa->mass, 0.0, 10000.0, 10, 0,
"Mass for object");
@@ -2351,16 +2354,17 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefBut(block, LABEL, 0, "Min", xco+80, yco-45, (width-90)/2, 19, NULL, 0.0, 0.0, 0, 0, "");
uiDefBut(block, LABEL, 0, "Max", xco+80+(width-90)/2, yco-45, (width-90)/2, 19, NULL, 0.0, 0.0, 0, 0, "");
- if(coa->flag & ACT_CONST_LOCX) fp= coa->minloc;
- else if(coa->flag & ACT_CONST_LOCY) fp= coa->minloc+1;
- else if(coa->flag & ACT_CONST_LOCZ) fp= coa->minloc+2;
- else if(coa->flag & ACT_CONST_ROTX) fp= coa->minrot;
- else if(coa->flag & ACT_CONST_ROTY) fp= coa->minrot+1;
+ if (coa->flag & ACT_CONST_LOCX) fp= coa->minloc;
+ else if (coa->flag & ACT_CONST_LOCY) fp= coa->minloc+1;
+ else if (coa->flag & ACT_CONST_LOCZ) fp= coa->minloc+2;
+ else if (coa->flag & ACT_CONST_ROTX) fp= coa->minrot;
+ else if (coa->flag & ACT_CONST_ROTY) fp= coa->minrot+1;
else fp= coa->minrot+2;
uiDefButF(block, NUM, 0, "", xco+80, yco-65, (width-90)/2, 19, fp, -2000.0, 2000.0, 10, 0, "");
uiDefButF(block, NUM, 0, "", xco+80+(width-90)/2, yco-65, (width-90)/2, 19, fp+3, -2000.0, 2000.0, 10, 0, "");
- } else if (coa->type == ACT_CONST_TYPE_DIST) {
+ }
+ else if (coa->type == ACT_CONST_TYPE_DIST) {
ysize= 106;
glRects(xco, yco-ysize, xco+width, yco);
@@ -2375,8 +2379,8 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefButBitS(block, TOG, ACT_CONST_LOCAL, 0, "L", xco+80+(width-115), yco-45, 25, 19,
&coa->flag, 0.0, 0.0, 0, 0, "Set ray along object's axis or global axis");
- if(coa->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= coa->minloc;
- else if(coa->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= coa->minloc+1;
+ if (coa->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= coa->minloc;
+ else if (coa->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= coa->minloc+1;
else fp= coa->minloc+2;
uiDefButF(block, NUM, 0, "", xco+80, yco-65, (width-115)/2, 19, fp+3, 0.0, 2000.0, 10, 0, "Maximum length of ray");
@@ -2400,7 +2404,8 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
&coa->flag, 0.0, 0.0, 0, 0, "Persistent actuator: stays active even if ray does not reach target");
uiDefButS(block, NUM, 0, "time", xco+50, yco-103, (width-60)/2, 19, &(coa->time), 0.0, 1000.0, 0, 0, "Maximum activation time in frame, 0 for unlimited");
uiDefButS(block, NUM, 0, "rotDamp", xco+50+(width-60)/2, yco-103, (width-60)/2, 19, &(coa->rotdamp), 0.0, 100.0, 0, 0, "Use a different damping for orientation");
- } else if (coa->type == ACT_CONST_TYPE_ORI) {
+ }
+ else if (coa->type == ACT_CONST_TYPE_ORI) {
ysize= 87;
glRects(xco, yco-ysize, xco+width, yco);
@@ -2421,7 +2426,8 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefButS(block, NUM, 0, "time", xco+10, yco-84, 70, 19, &(coa->time), 0.0, 1000.0, 0, 0, "Maximum activation time in frame, 0 for unlimited");
uiDefButF(block, NUM, 0, "min", xco+80, yco-84, (width-115)/2, 19, &(coa->minloc[0]), 0.0, 180.0, 10, 1, "Minimum angle (in degree) to maintain with target direction. No correction is done if angle with target direction is between min and max");
uiDefButF(block, NUM, 0, "max", xco+80+(width-115)/2, yco-84, (width-115)/2, 19, &(coa->maxloc[0]), 0.0, 180.0, 10, 1, "Maximum angle (in degree) allowed with target direction. No correction is done if angle with target direction is between min and max");
- } else if (coa->type == ACT_CONST_TYPE_FH) {
+ }
+ else if (coa->type == ACT_CONST_TYPE_FH) {
ysize= 106;
glRects(xco, yco-ysize, xco+width, yco);
@@ -2430,8 +2436,8 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
str= "Direction %t|None %x0|X axis %x1|Y axis %x2|Z axis %x4|-X axis %x8|-Y axis %x16|-Z axis %x32";
uiDefButS(block, MENU, B_REDR, str, xco+10, yco-65, 70, 19, &coa->mode, 0.0, 0.0, 0, 0, "Set the direction of the ray (in world coordinate)");
- if(coa->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= coa->minloc;
- else if(coa->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= coa->minloc+1;
+ if (coa->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= coa->minloc;
+ else if (coa->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= coa->minloc+1;
else fp= coa->minloc+2;
uiDefButF(block, NUM, 0, "damp", xco+10, yco-45, (width-70)/2, 19, &coa->maxrot[0], 0.0, 1.0, 1, 0, "Damping factor of the Fh spring force");
@@ -2466,12 +2472,12 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
case ACT_SCENE:
sca= act->data;
- if(sca->type==ACT_SCENE_RESTART) {
+ if (sca->type==ACT_SCENE_RESTART) {
ysize= 28;
glRects(xco, yco-ysize, xco+width, yco);
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
}
- else if(sca->type==ACT_SCENE_CAMERA) {
+ else if (sca->type==ACT_SCENE_CAMERA) {
ysize= 48;
glRects(xco, yco-ysize, xco+width, yco);
@@ -2479,7 +2485,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+40, yco-44, (width-80), 19, &(sca->camera), "Set this Camera. Leave empty to refer to self object");
}
- else if(sca->type==ACT_SCENE_SET) {
+ else if (sca->type==ACT_SCENE_SET) {
ysize= 48;
glRects(xco, yco-ysize, xco+width, yco);
@@ -2487,7 +2493,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefIDPoinBut(block, test_scenepoin_but, ID_SCE, 1, "SCE:", xco+40, yco-44, (width-80), 19, &(sca->scene), "Set this Scene");
}
- else if(sca->type==ACT_SCENE_ADD_FRONT) {
+ else if (sca->type==ACT_SCENE_ADD_FRONT) {
ysize= 48;
glRects(xco, yco-ysize, xco+width, yco);
@@ -2495,7 +2501,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefIDPoinBut(block, test_scenepoin_but, ID_SCE, 1, "SCE:", xco+40, yco-44, (width-80), 19, &(sca->scene), "Add an Overlay Scene");
}
- else if(sca->type==ACT_SCENE_ADD_BACK) {
+ else if (sca->type==ACT_SCENE_ADD_BACK) {
ysize= 48;
glRects(xco, yco-ysize, xco+width, yco);
@@ -2503,7 +2509,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefIDPoinBut(block, test_scenepoin_but, ID_SCE, 1, "SCE:", xco+40, yco-44, (width-80), 19, &(sca->scene), "Add a Background Scene");
}
- else if(sca->type==ACT_SCENE_REMOVE) {
+ else if (sca->type==ACT_SCENE_REMOVE) {
ysize= 48;
glRects(xco, yco-ysize, xco+width, yco);
@@ -2511,7 +2517,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefIDPoinBut(block, test_scenepoin_but, ID_SCE, 1, "SCE:", xco+40, yco-44, (width-80), 19, &(sca->scene), "Remove a Scene");
}
- else if(sca->type==ACT_SCENE_SUSPEND) {
+ else if (sca->type==ACT_SCENE_SUSPEND) {
ysize= 48;
glRects(xco, yco-ysize, xco+width, yco);
@@ -2519,7 +2525,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
uiDefIDPoinBut(block, test_scenepoin_but, ID_SCE, 1, "SCE:", xco+40, yco-44, (width-80), 19, &(sca->scene), "Pause a Scene");
}
- else if(sca->type==ACT_SCENE_RESUME) {
+ else if (sca->type==ACT_SCENE_RESUME) {
ysize= 48;
glRects(xco, yco-ysize, xco+width, yco);
@@ -2578,11 +2584,11 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
str= "GroupKey types %t|Set Key %x6|Play %x0|Ping Pong %x1|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x5";
uiDefButS(block, MENU, 1, str, xco+20, yco-24, width-40, 19, &ga->type, 0, 0, 0, 0, "");
- if(ga->type==ACT_GROUP_SET) {
+ if (ga->type==ACT_GROUP_SET) {
uiDefBut(block, TEX, 0, "Key: ", xco+20, yco-44, (width-10)/2, 19, ga->name, 0.0, MAX_NAME, 0, 0, "This name defines groupkey to be set");
uiDefButI(block, NUM, 0, "Frame:", xco+20+(width-10)/2, yco-44, (width-70)/2, 19, &ga->sta, 0.0, 2500.0, 0, 0, "Set this frame");
}
- else if(ga->type==ACT_GROUP_FROM_PROP) {
+ else if (ga->type==ACT_GROUP_FROM_PROP) {
uiDefBut(block, TEX, 0, "Prop: ", xco+20, yco-44, width-40, 19, ga->name, 0.0, MAX_NAME, 0, 0, "Use this property to define the Group position");
}
else {
@@ -2860,7 +2866,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
case ACT_PARENT:
parAct = act->data;
- if(parAct->type==ACT_PARENT_SET) {
+ if (parAct->type==ACT_PARENT_SET) {
ysize= 48;
glRects(xco, yco-ysize, xco+width, yco);
@@ -2879,7 +2885,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
"Make this object ghost while parented (only if not compound)");
uiBlockEndAlign(block);
}
- else if(parAct->type==ACT_PARENT_REMOVE) {
+ else if (parAct->type==ACT_PARENT_REMOVE) {
ysize= 28;
glRects(xco, yco-ysize, xco+width, yco);
@@ -2958,23 +2964,23 @@ static void do_sensor_menu(bContext *C, void *UNUSED(arg), int event)
idar= get_selected_and_linked_obs(C, &count, slogic->scaflag);
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
ob= (Object *)idar[a];
- if(event==0 || event==2) ob->scaflag |= OB_SHOWSENS;
- else if(event==1) ob->scaflag &= ~OB_SHOWSENS;
+ if (event==0 || event==2) ob->scaflag |= OB_SHOWSENS;
+ else if (event==1) ob->scaflag &= ~OB_SHOWSENS;
}
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
ob= (Object *)idar[a];
sens= ob->sensors.first;
- while(sens) {
- if(event==2) sens->flag |= SENS_SHOW;
- else if(event==3) sens->flag &= ~SENS_SHOW;
+ while (sens) {
+ if (event==2) sens->flag |= SENS_SHOW;
+ else if (event==3) sens->flag &= ~SENS_SHOW;
sens= sens->next;
}
}
- if(idar) MEM_freeN(idar);
+ if (idar) MEM_freeN(idar);
}
static uiBlock *sensor_menu(bContext *C, ARegion *ar, void *UNUSED(arg))
@@ -3007,23 +3013,23 @@ static void do_controller_menu(bContext *C, void *UNUSED(arg), int event)
idar= get_selected_and_linked_obs(C, &count, slogic->scaflag);
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
ob= (Object *)idar[a];
- if(event==0 || event==2) ob->scaflag |= OB_SHOWCONT;
- else if(event==1) ob->scaflag &= ~OB_SHOWCONT;
+ if (event==0 || event==2) ob->scaflag |= OB_SHOWCONT;
+ else if (event==1) ob->scaflag &= ~OB_SHOWCONT;
}
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
ob= (Object *)idar[a];
cont= ob->controllers.first;
- while(cont) {
- if(event==2) cont->flag |= CONT_SHOW;
- else if(event==3) cont->flag &= ~CONT_SHOW;
+ while (cont) {
+ if (event==2) cont->flag |= CONT_SHOW;
+ else if (event==3) cont->flag &= ~CONT_SHOW;
cont= cont->next;
}
}
- if(idar) MEM_freeN(idar);
+ if (idar) MEM_freeN(idar);
}
static uiBlock *controller_menu(bContext *C, ARegion *ar, void *UNUSED(arg))
@@ -3056,23 +3062,23 @@ static void do_actuator_menu(bContext *C, void *UNUSED(arg), int event)
idar= get_selected_and_linked_obs(C, &count, slogic->scaflag);
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
ob= (Object *)idar[a];
- if(event==0 || event==2) ob->scaflag |= OB_SHOWACT;
- else if(event==1) ob->scaflag &= ~OB_SHOWACT;
+ if (event==0 || event==2) ob->scaflag |= OB_SHOWACT;
+ else if (event==1) ob->scaflag &= ~OB_SHOWACT;
}
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
ob= (Object *)idar[a];
act= ob->actuators.first;
- while(act) {
- if(event==2) act->flag |= ACT_SHOW;
- else if(event==3) act->flag &= ~ACT_SHOW;
+ while (act) {
+ if (event==2) act->flag |= ACT_SHOW;
+ else if (event==3) act->flag &= ~ACT_SHOW;
act= act->next;
}
}
- if(idar) MEM_freeN(idar);
+ if (idar) MEM_freeN(idar);
}
static uiBlock *actuator_menu(bContext *C, ARegion *ar, void *UNUSED(arg))
@@ -3212,10 +3218,11 @@ static void draw_sensor_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *lo
row= uiLayoutRow(box, 0);
uiItemR(row, ptr, "show_expanded", UI_ITEM_R_NO_BG, "", ICON_NONE);
- if(RNA_boolean_get(ptr, "show_expanded")) {
+ if (RNA_boolean_get(ptr, "show_expanded")) {
uiItemR(row, ptr, "type", 0, "", ICON_NONE);
uiItemR(row, ptr, "name", 0, "", ICON_NONE);
- } else {
+ }
+ else {
uiItemL(row, sensor_name(sens->type), ICON_NONE);
uiItemL(row, sens->name, ICON_NONE);
}
@@ -3225,7 +3232,7 @@ static void draw_sensor_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *lo
&& 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) {
+ if (RNA_boolean_get(ptr, "show_expanded")==0) {
sub= uiLayoutRow(row, 1);
uiItemEnumO(sub, "LOGIC_OT_sensor_move", "", ICON_TRIA_UP, "direction", 1); // up
uiItemEnumO(sub, "LOGIC_OT_sensor_move", "", ICON_TRIA_DOWN, "direction", 2); // down
@@ -3276,7 +3283,7 @@ static void draw_sensor_armature(uiLayout *layout, PointerRNA *ptr)
PropertyRNA *bones_prop= NULL;
uiLayout *row;
- if(ob->type != OB_ARMATURE){
+ if (ob->type != OB_ARMATURE) {
uiItemL(layout, "Sensor only available for armatures", ICON_NONE);
return;
}
@@ -3569,12 +3576,13 @@ static void draw_controller_header(uiLayout *layout, PointerRNA *ptr, int xco, i
row= uiLayoutRow(box, 0);
uiItemR(row, ptr, "show_expanded", UI_ITEM_R_NO_BG, "", ICON_NONE);
- if(RNA_boolean_get(ptr, "show_expanded")) {
+ if (RNA_boolean_get(ptr, "show_expanded")) {
uiItemR(row, ptr, "type", 0, "", ICON_NONE);
uiItemR(row, ptr, "name", 0, "", ICON_NONE);
/* XXX provisory for Blender 2.50Beta */
uiDefBlockBut(uiLayoutGetBlock(layout), controller_state_mask_menu, cont, state, (short)(xco+width-44), yco, 22+22, UI_UNIT_Y, "Set controller state index (from 1 to 30)");
- } else {
+ }
+ else {
uiItemL(row, controller_name(cont->type), ICON_NONE);
uiItemL(row, cont->name, ICON_NONE);
uiItemL(row, state, ICON_NONE);
@@ -3582,7 +3590,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) {
+ if (RNA_boolean_get(ptr, "show_expanded")==0) {
sub= uiLayoutRow(row, 1);
uiItemEnumO(sub, "LOGIC_OT_controller_move", "", ICON_TRIA_UP, "direction", 1); // up
uiItemEnumO(sub, "LOGIC_OT_controller_move", "", ICON_TRIA_DOWN, "direction", 2); // down
@@ -3659,10 +3667,11 @@ static void draw_actuator_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *
row= uiLayoutRow(box, 0);
uiItemR(row, ptr, "show_expanded", UI_ITEM_R_NO_BG, "", ICON_NONE);
- if(RNA_boolean_get(ptr, "show_expanded")) {
+ if (RNA_boolean_get(ptr, "show_expanded")) {
uiItemR(row, ptr, "type", 0, "", ICON_NONE);
uiItemR(row, ptr, "name", 0, "", ICON_NONE);
- } else {
+ }
+ else {
uiItemL(row, actuator_name(act->type), ICON_NONE);
uiItemL(row, act->name, ICON_NONE);
}
@@ -3672,7 +3681,7 @@ static void draw_actuator_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *
&& 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) {
+ if (RNA_boolean_get(ptr, "show_expanded")==0) {
sub= uiLayoutRow(row, 1);
uiItemEnumO(sub, "LOGIC_OT_actuator_move", "", ICON_TRIA_UP, "direction", 1); // up
uiItemEnumO(sub, "LOGIC_OT_actuator_move", "", ICON_TRIA_DOWN, "direction", 2); // down
@@ -3704,7 +3713,7 @@ static void draw_actuator_action(uiLayout *layout, PointerRNA *ptr)
uiItemR(row, ptr, "use_continue_last_frame", 0, NULL, ICON_NONE);
row= uiLayoutRow(layout, 0);
- if((RNA_enum_get(ptr, "play_mode") == ACT_ACTION_FROM_PROP))
+ if ((RNA_enum_get(ptr, "play_mode") == ACT_ACTION_FROM_PROP))
uiItemPointerR(row, ptr, "property", &settings_ptr, "properties", NULL, ICON_NONE);
else {
@@ -3738,7 +3747,7 @@ static void draw_actuator_armature(uiLayout *layout, PointerRNA *ptr)
PointerRNA pose_ptr, pchan_ptr;
PropertyRNA *bones_prop = NULL;
- if(ob->type != OB_ARMATURE){
+ if (ob->type != OB_ARMATURE) {
uiItemL(layout, "Actuator only available for armatures", ICON_NONE);
return;
}
@@ -3945,7 +3954,7 @@ static void draw_actuator_edit_object(uiLayout *layout, PointerRNA *ptr)
case ACT_EDOB_END_OBJECT:
break;
case ACT_EDOB_REPLACE_MESH:
- if(ob->type != OB_MESH) {
+ if (ob->type != OB_MESH) {
uiItemL(layout, "Mode only available for mesh objects", ICON_NONE);
break;
}
@@ -3963,7 +3972,7 @@ static void draw_actuator_edit_object(uiLayout *layout, PointerRNA *ptr)
uiItemR(sub, ptr, "use_3d_tracking", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
break;
case ACT_EDOB_DYNAMICS:
- if(ob->type != OB_MESH) {
+ if (ob->type != OB_MESH) {
uiItemL(layout, "Mode only available for mesh objects", ICON_NONE);
break;
}
@@ -4022,7 +4031,7 @@ static void draw_actuator_message(uiLayout *layout, PointerRNA *ptr, bContext *C
row= uiLayoutRow(layout, 1);
uiItemR(row, ptr, "body_type", 0, NULL, ICON_NONE);
- if(RNA_enum_get(ptr, "body_type") == ACT_MESG_MESG)
+ if (RNA_enum_get(ptr, "body_type") == ACT_MESG_MESG)
uiItemR(row, ptr, "body_message", 0, "", ICON_NONE);
else // mode == ACT_MESG_PROP
uiItemPointerR(row, ptr, "body_property", &settings_ptr, "properties", "", ICON_NONE);
@@ -4199,7 +4208,7 @@ static void draw_actuator_random(uiLayout *layout, PointerRNA *ptr)
row = uiLayoutRow(layout, 0);
- switch (RNA_enum_get(ptr, "distribution")){
+ switch (RNA_enum_get(ptr, "distribution")) {
case ACT_RANDOM_BOOL_CONST:
uiItemR(row, ptr, "use_always_true", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
break;
@@ -4267,7 +4276,7 @@ static void draw_actuator_shape_action(uiLayout *layout, PointerRNA *ptr)
PointerRNA settings_ptr;
uiLayout *row;
- if(ob->type != OB_MESH){
+ if (ob->type != OB_MESH) {
uiItemL(layout, "Actuator only available for mesh objects", ICON_NONE);
return;
}
@@ -4280,7 +4289,7 @@ static void draw_actuator_shape_action(uiLayout *layout, PointerRNA *ptr)
uiItemR(row, ptr, "use_continue_last_frame", 0, NULL, ICON_NONE);
row= uiLayoutRow(layout, 0);
- if((RNA_enum_get(ptr, "mode") == ACT_ACTION_FROM_PROP))
+ if ((RNA_enum_get(ptr, "mode") == ACT_ACTION_FROM_PROP))
uiItemPointerR(row, ptr, "property", &settings_ptr, "properties", NULL, ICON_NONE);
else {
@@ -4481,7 +4490,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
short a, count;
int xco, yco, width;
- if(ob==NULL) return;
+ if (ob==NULL) return;
RNA_pointer_create(NULL, &RNA_SpaceLogicEditor, slogic, &logic_ptr);
idar= get_selected_and_linked_obs(C, &count, slogic->scaflag);
@@ -4491,7 +4500,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
uiBlockSetHandleFunc(block, do_logic_buts, NULL);
/* loop over all objects and set visible/linked flags for the logic bricks */
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
bActuator *act;
bSensor *sens;
bController *cont;
@@ -4502,20 +4511,20 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
/* clean ACT_LINKED and ACT_VISIBLE of all potentially visible actuators so that we can determine which is actually linked/visible */
act = ob->actuators.first;
- while(act) {
+ while (act) {
act->flag &= ~(ACT_LINKED|ACT_VISIBLE);
act = act->next;
}
/* same for sensors */
sens= ob->sensors.first;
- while(sens) {
+ while (sens) {
sens->flag &= ~(SENS_VISIBLE);
sens = sens->next;
}
/* mark the linked and visible actuators */
cont= ob->controllers.first;
- while(cont) {
+ while (cont) {
flag = ACT_LINKED;
/* this controller is visible, mark all its actuator */
@@ -4543,7 +4552,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
uiItemR(row, &logic_ptr, "show_controllers_active_object", 0, "Act", ICON_NONE);
uiItemR(row, &logic_ptr, "show_controllers_linked_controller", 0, "Link", ICON_NONE);
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
bController *cont;
PointerRNA ptr;
uiLayout *split, *subsplit, *col;
@@ -4552,7 +4561,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
ob= (Object *)idar[a];
/* only draw the controller common header if "use_visible" */
- if( (ob->scavisflag & OB_VIS_CONT) == 0) continue;
+ if ( (ob->scavisflag & OB_VIS_CONT) == 0) continue;
/* Drawing the Controller Header common to all Selected Objects */
@@ -4595,7 +4604,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
uiItemS(layout);
- for(cont= ob->controllers.first; cont; cont=cont->next) {
+ for (cont= ob->controllers.first; cont; cont=cont->next) {
RNA_pointer_create((ID *)ob, &RNA_Controller, cont, &ptr);
if (!(ob->scaflag & OB_ALLSTATE) && !(ob->state & cont->state_mask))
@@ -4627,7 +4636,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
/* put link button to the right */
col = uiLayoutColumn(subsplit, 0);
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, "");
+ 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);
}
}
@@ -4647,14 +4656,14 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
uiItemR(row, &logic_ptr, "show_sensors_linked_controller", 0, "Link", ICON_NONE);
uiItemR(row, &logic_ptr, "show_sensors_active_states", 0, "State", ICON_NONE);
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
bSensor *sens;
PointerRNA ptr;
ob= (Object *)idar[a];
/* only draw the sensor common header if "use_visible" */
- if((ob->scavisflag & OB_VIS_SENS) == 0) continue;
+ if ((ob->scavisflag & OB_VIS_SENS) == 0) continue;
row = uiLayoutRow(layout, 1);
uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors");
@@ -4665,7 +4674,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
uiItemS(layout);
- for(sens= ob->sensors.first; sens; sens=sens->next) {
+ for (sens= ob->sensors.first; sens; sens=sens->next) {
RNA_pointer_create((ID *)ob, &RNA_Sensor, sens, &ptr);
if ((ob->scaflag & OB_ALLSTATE) ||
@@ -4693,7 +4702,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
/* put link button to the right */
col = uiLayoutColumn(split, 0);
/* 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, "");
+ 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);
}
}
@@ -4713,14 +4722,14 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
uiItemR(row, &logic_ptr, "show_actuators_linked_controller", 0, "Link", ICON_NONE);
uiItemR(row, &logic_ptr, "show_actuators_active_states", 0, "State", ICON_NONE);
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
bActuator *act;
PointerRNA ptr;
ob= (Object *)idar[a];
/* only draw the actuator common header if "use_visible" */
- if( (ob->scavisflag & OB_VIS_ACT) == 0) continue;
+ if ( (ob->scavisflag & OB_VIS_ACT) == 0) continue;
row = uiLayoutRow(layout, 1);
uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
@@ -4731,7 +4740,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
uiItemS(layout);
- for(act= ob->actuators.first; act; act=act->next) {
+ for (act= ob->actuators.first; act; act=act->next) {
RNA_pointer_create((ID *)ob, &RNA_Actuator, act, &ptr);
@@ -4773,7 +4782,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
uiEndBlock(C, block);
uiDrawBlock(C, block);
- if(idar) MEM_freeN(idar);
+ if (idar) MEM_freeN(idar);
}
void logic_buttons(bContext *C, ARegion *ar)
@@ -4801,7 +4810,7 @@ void logic_buttons(bContext *C, ARegion *ar)
return;
}
- if(ob==NULL) return;
+ if (ob==NULL) return;
// uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
BLI_snprintf(numstr, sizeof(numstr), "buttonswin %p", (void *)ar);
@@ -4814,16 +4823,16 @@ void logic_buttons(bContext *C, ARegion *ar)
/* clean ACT_LINKED and ACT_VISIBLE of all potentially visible actuators so that
* we can determine which is actually linked/visible */
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
ob= (Object *)idar[a];
act= ob->actuators.first;
- while(act) {
+ while (act) {
act->flag &= ~(ACT_LINKED|ACT_VISIBLE);
act = act->next;
}
/* same for sensors */
sens= ob->sensors.first;
- while(sens) {
+ while (sens) {
sens->flag &= ~(SENS_VISIBLE);
sens = sens->next;
}
@@ -4841,19 +4850,19 @@ void logic_buttons(bContext *C, ARegion *ar)
uiDefButBitS(block, TOG, BUTS_CONT_LINK, B_REDR, "Link", xco+110+2*(width-100)/3, yco+35, (width-100)/3, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show linked Objects to Sensor/Actuator");
uiBlockEndAlign(block);
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
unsigned int controller_state_mask = 0; /* store a bitmask for states that are used */
ob= (Object *)idar[a];
// uiClearButLock();
// uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
- if( (ob->scavisflag & OB_VIS_CONT) == 0) continue;
+ if ( (ob->scavisflag & OB_VIS_CONT) == 0) continue;
/* presume it is only objects for now */
uiBlockBeginAlign(block);
-// if(ob->controllers.first) uiSetCurFont(block, UI_HELVB);
+// if (ob->controllers.first) uiSetCurFont(block, UI_HELVB);
uiDefButBitS(block, TOG, OB_SHOWCONT, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Active Object name");
-// if(ob->controllers.first) uiSetCurFont(block, UI_HELV);
+// if (ob->controllers.first) uiSetCurFont(block, UI_HELV);
uiDefButBitS(block, TOG, OB_ADDCONT, B_ADD_CONT, "Add",(short)(xco+width-40), yco, 50, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Add a new Controller");
uiBlockEndAlign(block);
yco-=20;
@@ -4862,7 +4871,7 @@ void logic_buttons(bContext *C, ARegion *ar)
/* note that some of these actuators could be from objects that are not in the display list.
* It's ok because those actuators will not be displayed here */
cont= ob->controllers.first;
- while(cont) {
+ while (cont) {
for (iact=0; iact<cont->totlinks; iact++) {
act = cont->links[iact];
if (act)
@@ -4872,7 +4881,7 @@ void logic_buttons(bContext *C, ARegion *ar)
cont = cont->next;
}
- if(ob->scaflag & OB_SHOWCONT) {
+ if (ob->scaflag & OB_SHOWCONT) {
/* first show the state */
uiDefBlockBut(block, object_state_mask_menu, ob, "State", (short)(xco-10), (short)(yco-10), 36, UI_UNIT_Y, "Object state menu: store and retrieve initial state");
@@ -4909,7 +4918,7 @@ void logic_buttons(bContext *C, ARegion *ar)
yco -= 6;
}
cont= ob->controllers.first;
- while(cont) {
+ while (cont) {
if (cont->state_mask & (1<<stbit)) {
/* this controller is visible, mark all its actuator */
for (iact=0; iact<cont->totlinks; iact++) {
@@ -4924,35 +4933,35 @@ void logic_buttons(bContext *C, ARegion *ar)
sprintf(numstr, "%d", first_bit(cont->state_mask)+1);
uiDefBlockBut(block, controller_state_mask_menu, cont, numstr, (short)(xco+width-44), yco, 22, UI_UNIT_Y, "Set controller state index (from 1 to 30)");
- if(cont->flag & CONT_SHOW) {
+ if (cont->flag & CONT_SHOW) {
cont->otype= cont->type;
uiDefButS(block, MENU, B_CHANGE_CONT, controller_pup(),(short)(xco+22), yco, 70, UI_UNIT_Y, &cont->type, 0, 0, 0, 0, "Controller type");
- but= uiDefBut(block, TEX, 1, "", (short)(xco+92), yco, (short)(width-158), UI_UNIT_Y, cont->name, 0, MAX_NAME, 0, 0, "Controller name");
+ but = uiDefBut(block, TEX, 1, "", (short)(xco+92), yco, (short)(width-158), UI_UNIT_Y, cont->name, 0, MAX_NAME, 0, 0, "Controller name");
uiButSetFunc(but, make_unique_prop_names_cb, cont->name, (void*) 0);
ycoo= yco;
yco= draw_controllerbuttons(cont, block, xco, yco, width);
- if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2;
+ if (yco-6 < ycoo) ycoo= (yco+ycoo-20)/2;
}
else {
cpack(0x999999);
glRecti(xco+22, yco, xco+width-22,yco+19);
- but= uiDefBut(block, LABEL, 0, controller_name(cont->type), (short)(xco+22), yco, 70, UI_UNIT_Y, cont, 0, 0, 0, 0, "Controller type");
+ but = uiDefBut(block, LABEL, 0, controller_name(cont->type), (short)(xco+22), yco, 70, UI_UNIT_Y, cont, 0, 0, 0, 0, "Controller type");
//uiButSetFunc(but, old_sca_move_controller, cont, NULL);
- but= uiDefBut(block, LABEL, 0, cont->name,(short)(xco+92), yco,(short)(width-158), UI_UNIT_Y, cont, 0, 0, 0, 0, "Controller name");
+ but = uiDefBut(block, LABEL, 0, cont->name,(short)(xco+92), yco,(short)(width-158), UI_UNIT_Y, cont, 0, 0, 0, 0, "Controller name");
//uiButSetFunc(but, old_sca_move_controller, cont, NULL);
uiBlockBeginAlign(block);
- but= uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_UP, (short)(xco+width-(110+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick up");
+ but = uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_UP, (short)(xco+width-(110+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick up");
uiButSetFunc(but, old_sca_move_controller, cont, (void *)TRUE);
- but= uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_DOWN, (short)(xco+width-(88+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick down");
+ but = uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_DOWN, (short)(xco+width-(88+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick down");
uiButSetFunc(but, old_sca_move_controller, cont, (void *)FALSE);
uiBlockEndAlign(block);
ycoo= yco;
}
- but= uiDefIconBut(block, LINK, 0, ICON_LINK, (short)(xco+width), ycoo, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
+ but = uiDefIconBut(block, LINK, 0, ICON_LINK, (short)(xco+width), ycoo, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
uiSetButLink(but, NULL, (void ***)&(cont->links), &cont->totlinks, LINK_CONTROLLER, LINK_ACTUATOR);
uiDefIconBut(block, INLINK, 0, ICON_INLINK,(short)(xco-19), ycoo, UI_UNIT_X, UI_UNIT_Y, cont, LINK_CONTROLLER, 0, 0, 0, "");
@@ -4980,26 +4989,26 @@ void logic_buttons(bContext *C, ARegion *ar)
uiDefButBitS(block, TOG, BUTS_SENS_STATE, B_REDR, "State", xco+80+3*(width-70)/4, yco+35, (width-70)/4, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show only sensors connected to active states");
uiBlockEndAlign(block);
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
ob= (Object *)idar[a];
// uiClearButLock();
// uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
- if( (ob->scavisflag & OB_VIS_SENS) == 0) continue;
+ if ( (ob->scavisflag & OB_VIS_SENS) == 0) continue;
/* presume it is only objects for now */
uiBlockBeginAlign(block);
-// if(ob->sensors.first) uiSetCurFont(block, UI_HELVB);
+// if (ob->sensors.first) uiSetCurFont(block, UI_HELVB);
uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors");
-// if(ob->sensors.first) uiSetCurFont(block, UI_HELV);
+// if (ob->sensors.first) uiSetCurFont(block, UI_HELV);
uiDefButBitS(block, TOG, OB_ADDSENS, B_ADD_SENS, "Add",(short)(xco+width-40), yco, 50, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Add a new Sensor");
uiBlockEndAlign(block);
yco-=20;
- if(ob->scaflag & OB_SHOWSENS) {
+ if (ob->scaflag & OB_SHOWSENS) {
sens= ob->sensors.first;
- while(sens) {
+ while (sens) {
if (!(slogic->scaflag & BUTS_SENS_STATE) ||
(sens->totlinks == 0) || /* always display sensor without links so that is can be edited */
(sens->flag & SENS_PIN && slogic->scaflag & BUTS_SENS_STATE) || /* states can hide some sensors, pinned sensors ignore the visible state */
@@ -5018,30 +5027,30 @@ void logic_buttons(bContext *C, ARegion *ar)
ycoo= yco;
if (sens->flag & SENS_SHOW) {
uiDefButS(block, MENU, B_CHANGE_SENS, sensor_pup(), (short)(xco+22), yco, 80, UI_UNIT_Y, &sens->type, 0, 0, 0, 0, "Sensor type");
- but= uiDefBut(block, TEX, 1, "", (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens->name, 0, MAX_NAME, 0, 0, "Sensor name");
+ but = uiDefBut(block, TEX, 1, "", (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens->name, 0, MAX_NAME, 0, 0, "Sensor name");
uiButSetFunc(but, make_unique_prop_names_cb, sens->name, (void*) 0);
sens->otype= sens->type;
yco= draw_sensorbuttons(ob, sens, block, xco, yco, width);
- if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2;
+ if (yco-6 < ycoo) ycoo= (yco+ycoo-20)/2;
}
else {
set_col_sensor(sens->type, 1);
glRecti(xco+22, yco, xco+width-22,yco+19);
- but= uiDefBut(block, LABEL, 0, sensor_name(sens->type), (short)(xco+22), yco, 80, UI_UNIT_Y, sens, 0, 0, 0, 0, "");
+ but = uiDefBut(block, LABEL, 0, sensor_name(sens->type), (short)(xco+22), yco, 80, UI_UNIT_Y, sens, 0, 0, 0, 0, "");
//uiButSetFunc(but, old_sca_move_sensor, sens, NULL);
- but= uiDefBut(block, LABEL, 0, sens->name, (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens, 0, MAX_NAME, 0, 0, "");
+ but = uiDefBut(block, LABEL, 0, sens->name, (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens, 0, MAX_NAME, 0, 0, "");
//uiButSetFunc(but, old_sca_move_sensor, sens, NULL);
uiBlockBeginAlign(block);
- but= uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_UP, (short)(xco+width-(66+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick up");
+ but = uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_UP, (short)(xco+width-(66+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick up");
uiButSetFunc(but, old_sca_move_sensor, sens, (void *)TRUE);
- but= uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_DOWN, (short)(xco+width-(44+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick down");
+ but = uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_DOWN, (short)(xco+width-(44+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick down");
uiButSetFunc(but, old_sca_move_sensor, sens, (void *)FALSE);
uiBlockEndAlign(block);
}
- but= uiDefIconBut(block, LINK, 0, ICON_LINK, (short)(xco+width), ycoo, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
+ but = uiDefIconBut(block, LINK, 0, ICON_LINK, (short)(xco+width), ycoo, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
uiSetButLink(but, NULL, (void ***)&(sens->links), &sens->totlinks, LINK_SENSOR, LINK_CONTROLLER);
yco-=20;
@@ -5061,25 +5070,25 @@ void logic_buttons(bContext *C, ARegion *ar)
uiDefButBitS(block, TOG, BUTS_ACT_LINK, B_REDR, "Link", xco+110+2*(width-100)/4, yco+35, (width-100)/4, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller");
uiDefButBitS(block, TOG, BUTS_ACT_STATE, B_REDR, "State", xco+110+3*(width-100)/4, yco+35, (width-100)/4, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show only actuators connected to active states");
uiBlockEndAlign(block);
- for(a=0; a<count; a++) {
+ for (a=0; a<count; a++) {
ob= (Object *)idar[a];
// uiClearButLock();
// uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
- if( (ob->scavisflag & OB_VIS_ACT) == 0) continue;
+ if ( (ob->scavisflag & OB_VIS_ACT) == 0) continue;
/* presume it is only objects for now */
uiBlockBeginAlign(block);
-// if(ob->actuators.first) uiSetCurFont(block, UI_HELVB);
+// if (ob->actuators.first) uiSetCurFont(block, UI_HELVB);
uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name+2,(short)(xco-10), yco,(short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
-// if(ob->actuators.first) uiSetCurFont(block, UI_HELV);
+// if (ob->actuators.first) uiSetCurFont(block, UI_HELV);
uiDefButBitS(block, TOG, OB_ADDACT, B_ADD_ACT, "Add",(short)(xco+width-40), yco, 50, UI_UNIT_Y, &ob->scaflag, 0, 0, 0, 0, "Add a new Actuator");
uiBlockEndAlign(block);
yco-=20;
- if(ob->scaflag & OB_SHOWACT) {
+ if (ob->scaflag & OB_SHOWACT) {
act= ob->actuators.first;
- while(act) {
+ while (act) {
if (!(slogic->scaflag & BUTS_ACT_STATE) ||
!(act->flag & ACT_LINKED) || /* always display actuators without links so that is can be edited */
(act->flag & ACT_VISIBLE) || /* this actuator has visible connection, display it */
@@ -5093,15 +5102,15 @@ void logic_buttons(bContext *C, ARegion *ar)
uiDefIconButBitS(block, ICONTOG, ACT_PIN, B_REDR, ICON_PINNED, (short)(xco+width-44), yco, 22, UI_UNIT_Y, &act->flag, 0, 0, 0, 0, "Display when not linked to a visible states controller");
uiDefIconButBitS(block, ICONTOG, ACT_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, UI_UNIT_Y, &act->flag, 0, 0, 0, 0, "Display the actuator");
- if(act->flag & ACT_SHOW) {
+ if (act->flag & ACT_SHOW) {
act->otype= act->type;
uiDefButS(block, MENU, B_CHANGE_ACT, actuator_pup(ob), (short)(xco+22), yco, 90, UI_UNIT_Y, &act->type, 0, 0, 0, 0, "Actuator type");
- but= uiDefBut(block, TEX, 1, "", (short)(xco+112), yco, (short)(width-(pin?156:134)), UI_UNIT_Y, act->name, 0, MAX_NAME, 0, 0, "Actuator name");
+ but = uiDefBut(block, TEX, 1, "", (short)(xco+112), yco, (short)(width-(pin?156:134)), UI_UNIT_Y, act->name, 0, MAX_NAME, 0, 0, "Actuator name");
uiButSetFunc(but, make_unique_prop_names_cb, act->name, (void*) 0);
ycoo= yco;
yco= draw_actuatorbuttons(bmain, ob, act, block, xco, yco, width);
- if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2;
+ if (yco-6 < ycoo) ycoo= (yco+ycoo-20)/2;
}
else {
set_col_actuator(act->type, 1);
@@ -5112,9 +5121,9 @@ void logic_buttons(bContext *C, ARegion *ar)
// uiButSetFunc(but, old_sca_move_actuator, act, NULL);
uiBlockBeginAlign(block);
- but= uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_UP, (short)(xco+width-(66+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick up");
+ but = uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_UP, (short)(xco+width-(66+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick up");
uiButSetFunc(but, old_sca_move_actuator, act, (void *)TRUE);
- but= uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_DOWN, (short)(xco+width-(44+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick down");
+ but = uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_DOWN, (short)(xco+width-(44+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick down");
uiButSetFunc(but, old_sca_move_actuator, act, (void *)FALSE);
uiBlockEndAlign(block);
@@ -5136,7 +5145,7 @@ void logic_buttons(bContext *C, ARegion *ar)
uiEndBlock(C, block);
uiDrawBlock(C, block);
- if(idar) MEM_freeN(idar);
+ if (idar) MEM_freeN(idar);
}
diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c
index a9b1acbcc04..1b6d72cbc3e 100644
--- a/source/blender/editors/space_logic/space_logic.c
+++ b/source/blender/editors/space_logic/space_logic.c
@@ -63,13 +63,13 @@ ARegion *logic_has_buttons_region(ScrArea *sa)
ARegion *ar, *arnew;
ar= BKE_area_find_region_type(sa, RGN_TYPE_UI);
- if(ar) return ar;
+ if (ar) return ar;
/* add subdiv level; after header */
ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
/* is error! */
- if(ar==NULL) return NULL;
+ if (ar==NULL) return NULL;
arnew= MEM_callocN(sizeof(ARegion), "buttons for image");
@@ -119,15 +119,15 @@ static SpaceLink *logic_new(const bContext *UNUSED(C))
BLI_addtail(&slogic->regionbase, ar);
ar->regiontype= RGN_TYPE_WINDOW;
- ar->v2d.tot.xmin= 0.0f;
- ar->v2d.tot.ymin= 0.0f;
- ar->v2d.tot.xmax= 1280;
- ar->v2d.tot.ymax= 240.0f;
+ ar->v2d.tot.xmin = 0.0f;
+ ar->v2d.tot.ymin = 0.0f;
+ ar->v2d.tot.xmax = 1280;
+ ar->v2d.tot.ymax = 240.0f;
- ar->v2d.cur.xmin= 0.0f;
- ar->v2d.cur.ymin= 0.0f;
- ar->v2d.cur.xmax= 1280.0f;
- ar->v2d.cur.ymax= 240.0f;
+ ar->v2d.cur.xmin = 0.0f;
+ ar->v2d.cur.ymin = 0.0f;
+ ar->v2d.cur.xmax = 1280.0f;
+ ar->v2d.cur.ymax = 240.0f;
ar->v2d.min[0]= 1.0f;
ar->v2d.min[1]= 1.0f;
@@ -151,7 +151,7 @@ static void logic_free(SpaceLink *UNUSED(sl))
{
// Spacelogic *slogic= (SpaceLogic*) sl;
-// if(slogic->gpd)
+// if (slogic->gpd)
// XXX free_gpencil_data(slogic->gpd);
}
@@ -178,7 +178,7 @@ static void logic_operatortypes(void)
static void logic_keymap(struct wmKeyConfig *keyconf)
{
- wmKeyMap *keymap= WM_keymap_find(keyconf, "Logic Editor", SPACE_LOGIC, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "Logic Editor", SPACE_LOGIC, 0);
WM_keymap_add_item(keymap, "LOGIC_OT_properties", NKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "LOGIC_OT_links_cut", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
@@ -213,7 +213,7 @@ static void logic_listener(ARegion *ar, wmNotifier *wmn)
case NC_OBJECT:
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
}
@@ -236,7 +236,7 @@ static void logic_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymaps */
- keymap= WM_keymap_find(wm->defaultconf, "Logic Editor", SPACE_LOGIC, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Logic Editor", SPACE_LOGIC, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -275,7 +275,7 @@ static void logic_buttons_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_find(wm->defaultconf, "Logic Editor", SPACE_LOGIC, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Logic Editor", SPACE_LOGIC, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
diff --git a/source/blender/editors/space_nla/CMakeLists.txt b/source/blender/editors/space_nla/CMakeLists.txt
index cae31f86388..aa3598e8e1f 100644
--- a/source/blender/editors/space_nla/CMakeLists.txt
+++ b/source/blender/editors/space_nla/CMakeLists.txt
@@ -46,4 +46,8 @@ set(SRC
nla_intern.h
)
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_space_nla "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/space_nla/SConscript b/source/blender/editors/space_nla/SConscript
index 6738f3380b4..ee010e6856f 100644
--- a/source/blender/editors/space_nla/SConscript
+++ b/source/blender/editors/space_nla/SConscript
@@ -6,4 +6,9 @@ sources = env.Glob('*.c')
incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader'
-env.BlenderLib ( 'bf_editors_space_nla', sources, Split(incs), [], libtype=['core'], priority=[85] )
+defs = []
+
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
+env.BlenderLib ( 'bf_editors_space_nla', sources, Split(incs), defs, libtype=['core'], priority=[85] )
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index 6086496b00b..e6f2a947a11 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -519,7 +519,7 @@ static int nla_properties(bContext *C, wmOperator *UNUSED(op))
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= nla_has_buttons_region(sa);
- if(ar)
+ if (ar)
ED_region_toggle_hidden(C, ar);
return OPERATOR_FINISHED;
@@ -527,13 +527,13 @@ static int nla_properties(bContext *C, wmOperator *UNUSED(op))
void NLA_OT_properties(wmOperatorType *ot)
{
- ot->name= "Properties";
- ot->idname= "NLA_OT_properties";
- ot->description= "Toggle display properties panel";
+ ot->name = "Properties";
+ ot->idname = "NLA_OT_properties";
+ ot->description = "Toggle display properties panel";
- ot->exec= nla_properties;
- ot->poll= ED_operator_nla_active;
+ ot->exec = nla_properties;
+ ot->poll = ED_operator_nla_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index 7cbe5058190..0b65866298a 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -345,16 +345,16 @@ static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *e
void NLA_OT_channels_click (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mouse Click on NLA Channels";
- ot->idname= "NLA_OT_channels_click";
- ot->description= "Handle clicks to select NLA channels";
+ ot->name = "Mouse Click on NLA Channels";
+ ot->idname = "NLA_OT_channels_click";
+ ot->description = "Handle clicks to select NLA channels";
/* api callbacks */
- ot->invoke= nlachannels_mouseclick_invoke;
- ot->poll= ED_operator_nla_active;
+ ot->invoke = nlachannels_mouseclick_invoke;
+ ot->poll = ED_operator_nla_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
@@ -419,16 +419,16 @@ static int nlaedit_add_tracks_exec (bContext *C, wmOperator *op)
void NLA_OT_tracks_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Track(s)";
- ot->idname= "NLA_OT_tracks_add";
- ot->description= "Add NLA-Tracks above/after the selected tracks";
+ ot->name = "Add Track(s)";
+ ot->idname = "NLA_OT_tracks_add";
+ ot->description = "Add NLA-Tracks above/after the selected tracks";
/* api callbacks */
- ot->exec= nlaedit_add_tracks_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_add_tracks_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "above_selected", 0, "Above Selected", "Add a new NLA Track above every existing selected one");
@@ -455,7 +455,7 @@ static int nlaedit_delete_tracks_exec (bContext *C, wmOperator *UNUSED(op))
/* delete tracks */
for (ale= anim_data.first; ale; ale= ale->next) {
- if(ale->type == ANIMTYPE_NLATRACK) {
+ if (ale->type == ANIMTYPE_NLATRACK) {
NlaTrack *nlt= (NlaTrack *)ale->data;
AnimData *adt= ale->adt;
@@ -483,16 +483,16 @@ static int nlaedit_delete_tracks_exec (bContext *C, wmOperator *UNUSED(op))
void NLA_OT_delete_tracks (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Tracks";
- ot->idname= "NLA_OT_delete_tracks";
- ot->description= "Delete selected NLA-Tracks and the strips they contain";
+ ot->name = "Delete Tracks";
+ ot->idname = "NLA_OT_delete_tracks";
+ ot->description = "Delete selected NLA-Tracks and the strips they contain";
/* api callbacks */
- ot->exec= nlaedit_delete_tracks_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_delete_tracks_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* *********************************************** */
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index f94918e4b4a..0b8565b93a2 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -498,10 +498,10 @@ static void nla_draw_strip_text (AnimData *adt, NlaTrack *nlt, NlaStrip *strip,
* - padding of 2 'units' on either side
*/
// TODO: make this centered?
- rect.xmin= strip->start + xofs;
- rect.ymin= yminc;
- rect.xmax= strip->end - xofs;
- rect.ymax= ymaxc;
+ rect.xmin = strip->start + xofs;
+ rect.ymin = yminc;
+ rect.xmax = strip->end - xofs;
+ rect.ymax = ymaxc;
/* add this string to the cache of texts to draw */
UI_view2d_text_cache_rectf(v2d, &rect, str, col);
@@ -559,7 +559,7 @@ void draw_nla_main_data (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
/* don't use totrect set, as the width stays the same
* (NOTE: this is ok here, the configuration is pretty straightforward)
*/
- v2d->tot.ymin= (float)(-height);
+ v2d->tot.ymin = (float)(-height);
/* loop through channels, and set up drawing depending on their type */
y= (float)(-NLACHANNEL_HEIGHT(snla));
@@ -946,7 +946,7 @@ void draw_nla_channel_list (bContext *C, bAnimContext *ac, ARegion *ar)
/* don't use totrect set, as the width stays the same
* (NOTE: this is ok here, the configuration is pretty straightforward)
*/
- v2d->tot.ymin= (float)(-height);
+ v2d->tot.ymin = (float)(-height);
/* need to do a view-sync here, so that the keys area doesn't jump around (it must copy this) */
UI_view2d_sync(NULL, ac->sa, v2d, V2D_LOCK_COPY);
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index c0e9b7a3a57..d191f1d1d35 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -158,16 +158,16 @@ static int nlaedit_enable_tweakmode_exec (bContext *C, wmOperator *op)
void NLA_OT_tweakmode_enter (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Enter Tweak Mode";
- ot->idname= "NLA_OT_tweakmode_enter";
- ot->description= "Enter tweaking mode for the action referenced by the active strip";
+ ot->name = "Enter Tweak Mode";
+ ot->idname = "NLA_OT_tweakmode_enter";
+ ot->description = "Enter tweaking mode for the action referenced by the active strip";
/* api callbacks */
- ot->exec= nlaedit_enable_tweakmode_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_enable_tweakmode_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ------------- */
@@ -223,16 +223,16 @@ static int nlaedit_disable_tweakmode_exec (bContext *C, wmOperator *op)
void NLA_OT_tweakmode_exit (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Exit Tweak Mode";
- ot->idname= "NLA_OT_tweakmode_exit";
- ot->description= "Exit tweaking mode for the action referenced by the active strip";
+ ot->name = "Exit Tweak Mode";
+ ot->idname = "NLA_OT_tweakmode_exit";
+ ot->description = "Exit tweaking mode for the action referenced by the active strip";
/* api callbacks */
- ot->exec= nlaedit_disable_tweakmode_exec;
- ot->poll= nlaop_poll_tweakmode_on;
+ ot->exec = nlaedit_disable_tweakmode_exec;
+ ot->poll = nlaop_poll_tweakmode_on;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* *********************************************** */
@@ -309,8 +309,8 @@ static int nlaedit_viewall(bContext *C, const short onlySel)
v2d->cur.xmax += extra;
/* set vertical range */
- v2d->cur.ymax= 0.0f;
- v2d->cur.ymin= (float)-(v2d->mask.ymax - v2d->mask.ymin);
+ v2d->cur.ymax = 0.0f;
+ v2d->cur.ymin = (float)-(v2d->mask.ymax - v2d->mask.ymin);
/* do View2D syncing */
UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY);
@@ -338,31 +338,31 @@ static int nlaedit_viewsel_exec(bContext *C, wmOperator *UNUSED(op))
void NLA_OT_view_all (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View All";
- ot->idname= "NLA_OT_view_all";
- ot->description= "Reset viewable area to show full strips range";
+ ot->name = "View All";
+ ot->idname = "NLA_OT_view_all";
+ ot->description = "Reset viewable area to show full strips range";
/* api callbacks */
- ot->exec= nlaedit_viewall_exec;
- ot->poll= ED_operator_nla_active;
+ ot->exec = nlaedit_viewall_exec;
+ ot->poll = ED_operator_nla_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
void NLA_OT_view_selected (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Selected";
- ot->idname= "NLA_OT_view_selected";
- ot->description= "Reset viewable area to show selected strips range";
+ ot->name = "View Selected";
+ ot->idname = "NLA_OT_view_selected";
+ ot->description = "Reset viewable area to show selected strips range";
/* api callbacks */
- ot->exec= nlaedit_viewsel_exec;
- ot->poll= ED_operator_nla_active;
+ ot->exec = nlaedit_viewsel_exec;
+ ot->poll = ED_operator_nla_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* *********************************************** */
@@ -473,23 +473,23 @@ void NLA_OT_actionclip_add (wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Add Action Strip";
- ot->idname= "NLA_OT_actionclip_add";
- ot->description= "Add an Action-Clip strip (i.e. an NLA Strip referencing an Action) to the active track";
+ ot->name = "Add Action Strip";
+ ot->idname = "NLA_OT_actionclip_add";
+ ot->description = "Add an Action-Clip strip (i.e. an NLA Strip referencing an Action) to the active track";
/* api callbacks */
- ot->invoke= WM_enum_search_invoke;
- ot->exec= nlaedit_add_actionclip_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->invoke = WM_enum_search_invoke;
+ ot->exec = nlaedit_add_actionclip_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
// TODO: this would be nicer as an ID-pointer...
prop= RNA_def_enum(ot->srna, "action", DummyRNA_NULL_items, 0, "Action", "");
RNA_def_enum_funcs(prop, RNA_action_itemf);
- ot->prop= prop;
+ ot->prop = prop;
}
/* ******************** Add Transition Operator ***************************** */
@@ -598,16 +598,16 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op)
void NLA_OT_transition_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Transition";
- ot->idname= "NLA_OT_transition_add";
- ot->description= "Add a transition strip between two adjacent selected strips";
+ ot->name = "Add Transition";
+ ot->idname = "NLA_OT_transition_add";
+ ot->description = "Add a transition strip between two adjacent selected strips";
/* api callbacks */
- ot->exec= nlaedit_add_transition_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_add_transition_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Add Sound Clip Operator ***************************** */
@@ -683,16 +683,16 @@ static int nlaedit_add_sound_exec (bContext *C, wmOperator *UNUSED(op))
void NLA_OT_soundclip_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Sound Clip";
- ot->idname= "NLA_OT_soundclip_add";
- ot->description= "Add a strip for controlling when speaker plays its sound clip";
+ ot->name = "Add Sound Clip";
+ ot->idname = "NLA_OT_soundclip_add";
+ ot->description = "Add a strip for controlling when speaker plays its sound clip";
/* api callbacks */
- ot->exec= nlaedit_add_sound_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_add_sound_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Add Meta-Strip Operator ***************************** */
@@ -745,16 +745,16 @@ static int nlaedit_add_meta_exec (bContext *C, wmOperator *UNUSED(op))
void NLA_OT_meta_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Meta-Strips";
- ot->idname= "NLA_OT_meta_add";
- ot->description= "Add new meta-strips incorporating the selected strips";
+ ot->name = "Add Meta-Strips";
+ ot->idname = "NLA_OT_meta_add";
+ ot->description = "Add new meta-strips incorporating the selected strips";
/* api callbacks */
- ot->exec= nlaedit_add_meta_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_add_meta_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Remove Meta-Strip Operator ***************************** */
@@ -797,16 +797,16 @@ static int nlaedit_remove_meta_exec (bContext *C, wmOperator *UNUSED(op))
void NLA_OT_meta_remove (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Meta-Strips";
- ot->idname= "NLA_OT_meta_remove";
- ot->description= "Separate out the strips held by the selected meta-strips";
+ ot->name = "Remove Meta-Strips";
+ ot->idname = "NLA_OT_meta_remove";
+ ot->description = "Separate out the strips held by the selected meta-strips";
/* api callbacks */
- ot->exec= nlaedit_remove_meta_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_remove_meta_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Duplicate Strips Operator ************************** */
@@ -900,17 +900,17 @@ static int nlaedit_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED
void NLA_OT_duplicate (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Duplicate Strips";
- ot->idname= "NLA_OT_duplicate";
- ot->description= "Duplicate selected NLA-Strips, adding the new strips in new tracks above the originals";
+ ot->name = "Duplicate Strips";
+ ot->idname = "NLA_OT_duplicate";
+ ot->description = "Duplicate selected NLA-Strips, adding the new strips in new tracks above the originals";
/* api callbacks */
- ot->invoke= nlaedit_duplicate_invoke;
- ot->exec= nlaedit_duplicate_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->invoke = nlaedit_duplicate_invoke;
+ ot->exec = nlaedit_duplicate_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* to give to transform */
RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
@@ -975,16 +975,16 @@ static int nlaedit_delete_exec (bContext *C, wmOperator *UNUSED(op))
void NLA_OT_delete (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete Strips";
- ot->idname= "NLA_OT_delete";
- ot->description= "Delete selected strips";
+ ot->name = "Delete Strips";
+ ot->idname = "NLA_OT_delete";
+ ot->description = "Delete selected strips";
/* api callbacks */
- ot->exec= nlaedit_delete_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_delete_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Split Strips Operator ***************************** */
@@ -1120,16 +1120,16 @@ static int nlaedit_split_exec (bContext *C, wmOperator *UNUSED(op))
void NLA_OT_split (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Split Strips";
- ot->idname= "NLA_OT_split";
- ot->description= "Split selected strips at their midpoints";
+ ot->name = "Split Strips";
+ ot->idname = "NLA_OT_split";
+ ot->description = "Split selected strips at their midpoints";
/* api callbacks */
- ot->exec= nlaedit_split_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_split_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Bake Strips Operator ***************************** */
@@ -1173,16 +1173,16 @@ static int nlaedit_bake_exec (bContext *C, wmOperator *UNUSED(op))
void NLA_OT_bake (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Bake Strips";
- ot->idname= "NLA_OT_bake";
- ot->description= "Bake all strips of selected AnimData blocks";
+ ot->name = "Bake Strips";
+ ot->idname = "NLA_OT_bake";
+ ot->description = "Bake all strips of selected AnimData blocks";
/* api callbacks */
- ot->exec= nlaedit_bake_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_bake_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* *********************************************** */
@@ -1235,16 +1235,16 @@ static int nlaedit_toggle_mute_exec (bContext *C, wmOperator *UNUSED(op))
void NLA_OT_mute_toggle (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Muting";
- ot->idname= "NLA_OT_mute_toggle";
- ot->description= "Mute or un-mute selected strips";
+ ot->name = "Toggle Muting";
+ ot->idname = "NLA_OT_mute_toggle";
+ ot->description = "Mute or un-mute selected strips";
/* api callbacks */
- ot->exec= nlaedit_toggle_mute_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_toggle_mute_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Swap Strips Operator ************************** */
@@ -1392,16 +1392,16 @@ static int nlaedit_swap_exec (bContext *C, wmOperator *op)
void NLA_OT_swap (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Swap Strips";
- ot->idname= "NLA_OT_swap";
- ot->description= "Swap order of selected strips within tracks";
+ ot->name = "Swap Strips";
+ ot->idname = "NLA_OT_swap";
+ ot->description = "Swap order of selected strips within tracks";
/* api callbacks */
- ot->exec= nlaedit_swap_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_swap_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Move Strips Up Operator ************************** */
@@ -1466,16 +1466,16 @@ static int nlaedit_move_up_exec (bContext *C, wmOperator *UNUSED(op))
void NLA_OT_move_up (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Strips Up";
- ot->idname= "NLA_OT_move_up";
- ot->description= "Move selected strips up a track if there's room";
+ ot->name = "Move Strips Up";
+ ot->idname = "NLA_OT_move_up";
+ ot->description = "Move selected strips up a track if there's room";
/* api callbacks */
- ot->exec= nlaedit_move_up_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_move_up_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Move Strips Down Operator ************************** */
@@ -1540,16 +1540,16 @@ static int nlaedit_move_down_exec (bContext *C, wmOperator *UNUSED(op))
void NLA_OT_move_down (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Strips Down";
- ot->idname= "NLA_OT_move_down";
- ot->description= "Move selected strips down a track if there's room";
+ ot->name = "Move Strips Down";
+ ot->idname = "NLA_OT_move_down";
+ ot->description = "Move selected strips down a track if there's room";
/* api callbacks */
- ot->exec= nlaedit_move_down_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_move_down_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Sync Action Length Operator ***************************** */
@@ -1616,19 +1616,19 @@ static int nlaedit_sync_actlen_exec (bContext *C, wmOperator *op)
void NLA_OT_action_sync_length (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Sync Action Length";
- ot->idname= "NLA_OT_action_sync_length";
- ot->description= "Synchronize the length of the referenced Action with the length used in the strip";
+ ot->name = "Sync Action Length";
+ ot->idname = "NLA_OT_action_sync_length";
+ ot->description = "Synchronize the length of the referenced Action with the length used in the strip";
/* api callbacks */
- ot->exec= nlaedit_sync_actlen_exec;
- ot->poll= ED_operator_nla_active; // XXX: is this satisfactory... probably requires a check for active strip...
+ ot->exec = nlaedit_sync_actlen_exec;
+ ot->poll = ED_operator_nla_active; // XXX: is this satisfactory... probably requires a check for active strip...
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_boolean(ot->srna, "active", 1, "Active Strip Only", "Only sync the active length for the active strip");
+ ot->prop = RNA_def_boolean(ot->srna, "active", 1, "Active Strip Only", "Only sync the active length for the active strip");
}
/* ******************** Apply Scale Operator ***************************** */
@@ -1716,16 +1716,16 @@ static int nlaedit_apply_scale_exec (bContext *C, wmOperator *UNUSED(op))
void NLA_OT_apply_scale (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Apply Scale";
- ot->idname= "NLA_OT_apply_scale";
- ot->description= "Apply scaling of selected strips to their referenced Actions";
+ ot->name = "Apply Scale";
+ ot->idname = "NLA_OT_apply_scale";
+ ot->description = "Apply scaling of selected strips to their referenced Actions";
/* api callbacks */
- ot->exec= nlaedit_apply_scale_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_apply_scale_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Clear Scale Operator ***************************** */
@@ -1779,16 +1779,16 @@ static int nlaedit_clear_scale_exec (bContext *C, wmOperator *UNUSED(op))
void NLA_OT_clear_scale (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Scale";
- ot->idname= "NLA_OT_clear_scale";
- ot->description= "Reset scaling of selected strips";
+ ot->name = "Clear Scale";
+ ot->idname = "NLA_OT_clear_scale";
+ ot->description = "Reset scaling of selected strips";
/* api callbacks */
- ot->exec= nlaedit_clear_scale_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_clear_scale_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ******************** Snap Strips Operator ************************** */
@@ -1920,20 +1920,20 @@ static int nlaedit_snap_exec (bContext *C, wmOperator *op)
void NLA_OT_snap (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap Strips";
- ot->idname= "NLA_OT_snap";
- ot->description= "Move start of strips to specified time";
+ ot->name = "Snap Strips";
+ ot->idname = "NLA_OT_snap";
+ ot->description = "Move start of strips to specified time";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= nlaedit_snap_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = nlaedit_snap_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", prop_nlaedit_snap_types, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_nlaedit_snap_types, 0, "Type", "");
}
/* *********************************************** */
@@ -2039,20 +2039,20 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op)
void NLA_OT_fmodifier_add (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add F-Modifier";
- ot->idname= "NLA_OT_fmodifier_add";
- ot->description= "Add a F-Modifier of the specified type to the selected NLA-Strips";
+ ot->name = "Add F-Modifier";
+ ot->idname = "NLA_OT_fmodifier_add";
+ ot->description = "Add a F-Modifier of the specified type to the selected NLA-Strips";
/* api callbacks */
- ot->invoke= nla_fmodifier_add_invoke;
- ot->exec= nla_fmodifier_add_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->invoke = nla_fmodifier_add_invoke;
+ ot->exec = nla_fmodifier_add_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", "");
RNA_def_boolean(ot->srna, "only_active", 0, "Only Active", "Only add a F-Modifier of the specified type to the active strip");
}
@@ -2103,16 +2103,16 @@ static int nla_fmodifier_copy_exec(bContext *C, wmOperator *op)
void NLA_OT_fmodifier_copy (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy F-Modifiers";
- ot->idname= "NLA_OT_fmodifier_copy";
- ot->description= "Copy the F-Modifier(s) of the active NLA-Strip";
+ ot->name = "Copy F-Modifiers";
+ ot->idname = "NLA_OT_fmodifier_copy";
+ ot->description = "Copy the F-Modifier(s) of the active NLA-Strip";
/* api callbacks */
- ot->exec= nla_fmodifier_copy_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nla_fmodifier_copy_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
//ot->prop = RNA_def_boolean(ot->srna, "all", 1, "All F-Modifiers", "Copy all the F-Modifiers, instead of just the active one");
@@ -2165,16 +2165,16 @@ static int nla_fmodifier_paste_exec(bContext *C, wmOperator *op)
void NLA_OT_fmodifier_paste (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Paste F-Modifiers";
- ot->idname= "NLA_OT_fmodifier_paste";
- ot->description= "Add copied F-Modifiers to the selected NLA-Strips";
+ ot->name = "Paste F-Modifiers";
+ ot->idname = "NLA_OT_fmodifier_paste";
+ ot->description = "Add copied F-Modifiers to the selected NLA-Strips";
/* api callbacks */
- ot->exec= nla_fmodifier_paste_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nla_fmodifier_paste_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* *********************************************** */
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c
index 55831de876c..78fb92f2ee4 100644
--- a/source/blender/editors/space_nla/nla_ops.c
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -200,21 +200,21 @@ static void nla_keymap_main (wmKeyConfig *keyconf, wmKeyMap *keymap)
/* click select */
kmi = WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, 0, 0);
RNA_boolean_set(kmi->ptr, "extend", FALSE);
- kmi= WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
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_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);
+ 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_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST);
- kmi= WM_keymap_add_item(keymap, "NLA_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
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);
+ kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
RNA_boolean_set(kmi->ptr, "extend", FALSE);
RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_RIGHT);
@@ -301,7 +301,7 @@ void nla_keymap(wmKeyConfig *keyconf)
wmKeyMap *keymap;
/* keymap for all regions */
- keymap= WM_keymap_find(keyconf, "NLA Generic", SPACE_NLA, 0);
+ keymap = WM_keymap_find(keyconf, "NLA Generic", SPACE_NLA, 0);
WM_keymap_add_item(keymap, "NLA_OT_properties", NKEY, KM_PRESS, 0, 0);
/* channels */
@@ -311,11 +311,11 @@ void nla_keymap(wmKeyConfig *keyconf)
*
* However, those operations which involve clicking on channels and/or the placement of them in the view are implemented here instead
*/
- keymap= WM_keymap_find(keyconf, "NLA Channels", SPACE_NLA, 0);
+ keymap = WM_keymap_find(keyconf, "NLA Channels", SPACE_NLA, 0);
nla_keymap_channels(keymap);
/* data */
- keymap= WM_keymap_find(keyconf, "NLA Editor", SPACE_NLA, 0);
+ keymap = WM_keymap_find(keyconf, "NLA Editor", SPACE_NLA, 0);
nla_keymap_main(keyconf, keymap);
}
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index 6ad83f6591a..1434bd8ddc2 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -186,16 +186,16 @@ static int nlaedit_deselectall_exec(bContext *C, wmOperator *op)
void NLA_OT_select_all_toggle (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select or Deselect All";
- ot->idname= "NLA_OT_select_all_toggle";
- ot->description= "(De)Select all NLA-Strips";
+ ot->name = "(De)select All";
+ ot->idname = "NLA_OT_select_all_toggle";
+ ot->description = "Select or deselect all NLA-Strips";
/* api callbacks */
- ot->exec= nlaedit_deselectall_exec;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->exec = nlaedit_deselectall_exec;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
+ ot->flag = OPTYPE_REGISTER/*|OPTYPE_UNDO*/;
/* props */
RNA_def_boolean(ot->srna, "invert", 0, "Invert", "");
@@ -294,10 +294,10 @@ static int nlaedit_borderselect_exec(bContext *C, wmOperator *op)
deselect_nla_strips(&ac, DESELECT_STRIPS_TEST, SELECT_SUBTRACT);
/* get settings from operator */
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
if (RNA_int_get(op->ptr, "gesture_mode") == GESTURE_MODAL_SELECT)
selectmode = SELECT_ADD;
@@ -331,20 +331,20 @@ static int nlaedit_borderselect_exec(bContext *C, wmOperator *op)
void NLA_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Select";
- ot->idname= "NLA_OT_select_border";
- ot->description= "Use box selection to grab NLA-Strips";
+ ot->name = "Border Select";
+ ot->idname = "NLA_OT_select_border";
+ ot->description = "Use box selection to grab NLA-Strips";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= nlaedit_borderselect_exec;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = nlaedit_borderselect_exec;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= nlaop_poll_tweakmode_off;
+ ot->poll = nlaop_poll_tweakmode_off;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* rna */
WM_operator_properties_gesture_border(ot, 1);
@@ -484,20 +484,20 @@ static int nlaedit_select_leftright_invoke (bContext *C, wmOperator *op, wmEvent
void NLA_OT_select_leftright (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Left/Right";
- ot->idname= "NLA_OT_select_leftright";
- ot->description= "Select strips to the left or the right of the current frame";
+ ot->name = "Select Left/Right";
+ ot->idname = "NLA_OT_select_leftright";
+ ot->description = "Select strips to the left or the right of the current frame";
/* api callbacks */
- ot->invoke= nlaedit_select_leftright_invoke;
- ot->exec= nlaedit_select_leftright_exec;
- ot->poll= ED_operator_nla_active;
+ ot->invoke = nlaedit_select_leftright_invoke;
+ ot->exec = nlaedit_select_leftright_exec;
+ ot->poll = ED_operator_nla_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
- ot->prop= RNA_def_enum(ot->srna, "mode", prop_nlaedit_leftright_select_types, NLAEDIT_LRSEL_TEST, "Mode", "");
+ ot->prop = RNA_def_enum(ot->srna, "mode", prop_nlaedit_leftright_select_types, NLAEDIT_LRSEL_TEST, "Mode", "");
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", "");
}
@@ -646,16 +646,16 @@ static int nlaedit_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
void NLA_OT_click_select (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mouse Select";
- ot->idname= "NLA_OT_click_select";
- ot->description= "Handle clicks to select NLA Strips";
+ ot->name = "Mouse Select";
+ ot->idname = "NLA_OT_click_select";
+ ot->description = "Handle clicks to select NLA Strips";
/* api callbacks - absolutely no exec() this yet... */
- ot->invoke= nlaedit_clickselect_invoke;
- ot->poll= ED_operator_nla_active;
+ ot->invoke = nlaedit_clickselect_invoke;
+ ot->poll = ED_operator_nla_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* id-props */
RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 2f0d39c5f91..4dc3aef7d2c 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -69,7 +69,7 @@ ARegion *nla_has_buttons_region(ScrArea *sa)
ARegion *ar, *arnew;
ar= BKE_area_find_region_type(sa, RGN_TYPE_UI);
- if(ar) return ar;
+ if (ar) return ar;
/* add subdiv level; after main */
ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
@@ -140,10 +140,10 @@ static SpaceLink *nla_new(const bContext *C)
BLI_addtail(&snla->regionbase, ar);
ar->regiontype= RGN_TYPE_WINDOW;
- ar->v2d.tot.xmin= (float)(SFRA-10);
- ar->v2d.tot.ymin= (float)(-sa->winy)/3.0f;
- ar->v2d.tot.xmax= (float)(EFRA+10);
- ar->v2d.tot.ymax= 0.0f;
+ ar->v2d.tot.xmin = (float)(SFRA-10);
+ ar->v2d.tot.ymin = (float)(-sa->winy)/3.0f;
+ ar->v2d.tot.xmax = (float)(EFRA+10);
+ ar->v2d.tot.ymax = 0.0f;
ar->v2d.cur = ar->v2d.tot;
@@ -210,13 +210,13 @@ static void nla_channel_area_init(wmWindowManager *wm, ARegion *ar)
/* own keymap */
/* own channels map first to override some channel keymaps */
- keymap= WM_keymap_find(wm->defaultconf, "NLA Channels", SPACE_NLA, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "NLA Channels", SPACE_NLA, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
/* now generic channels map for everything else that can apply */
- keymap= WM_keymap_find(wm->defaultconf, "Animation Channels", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Animation Channels", 0, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_find(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -256,9 +256,9 @@ static void nla_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "NLA Editor", SPACE_NLA, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "NLA Editor", SPACE_NLA, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_find(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -336,7 +336,7 @@ static void nla_buttons_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_find(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -371,7 +371,7 @@ static void nla_region_listener(ARegion *ar, wmNotifier *wmn)
}
break;
default:
- if(wmn->data==ND_KEYS)
+ if (wmn->data==ND_KEYS)
ED_region_tag_redraw(ar);
break;
}
@@ -413,11 +413,11 @@ static void nla_main_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
default:
- if(wmn->data==ND_KEYS)
+ if (wmn->data==ND_KEYS)
ED_region_tag_redraw(ar);
}
}
@@ -446,12 +446,12 @@ static void nla_channel_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
default:
- if(wmn->data==ND_KEYS)
+ if (wmn->data==ND_KEYS)
ED_region_tag_redraw(ar);
}
}
@@ -487,7 +487,7 @@ static void nla_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_NLA)
+ if (wmn->data == ND_SPACE_NLA)
ED_area_tag_redraw(sa);
break;
}
diff --git a/source/blender/editors/space_node/CMakeLists.txt b/source/blender/editors/space_node/CMakeLists.txt
index f33b784c5d2..8c3397b9ddd 100644
--- a/source/blender/editors/space_node/CMakeLists.txt
+++ b/source/blender/editors/space_node/CMakeLists.txt
@@ -54,4 +54,8 @@ set(SRC
node_intern.h
)
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_space_node "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/space_node/SConscript b/source/blender/editors/space_node/SConscript
index ec4ed971a76..58fae203cf5 100644
--- a/source/blender/editors/space_node/SConscript
+++ b/source/blender/editors/space_node/SConscript
@@ -14,7 +14,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
if env['CC'] == 'gcc':
#cf.append('-Werror')
pass
-
+
if env['OURPLATFORM'] == 'linux':
cflags='-pthread'
incs += ' ../../../extern/binreloc/include'
@@ -22,4 +22,7 @@ if env['OURPLATFORM'] == 'linux':
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
env.BlenderLib ( 'bf_editors_space_node', sources, Split(incs), defs, libtype=['core'], priority=[55], compileflags=cf )
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 64af846a79b..7176c86cb11 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -79,17 +79,13 @@
#include "node_intern.h"
-
-// XXX interface.h
-extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select);
-
/* ****************** SOCKET BUTTON DRAW FUNCTIONS ***************** */
static void node_sync_cb(bContext *UNUSED(C), void *snode_v, void *node_v)
{
SpaceNode *snode= snode_v;
- if(snode->treetype==NTREE_SHADER) {
+ if (snode->treetype==NTREE_SHADER) {
nodeShaderSynchronizeID(node_v, 1);
// allqueue(REDRAWBUTSSHADING, 0);
}
@@ -287,7 +283,7 @@ static void node_draw_socket_new(bNodeSocket *sock, float size)
glColor3ub(180, 180, 180);
glBegin(GL_POLYGON);
- for(a=0; a<16; a++)
+ for (a=0; a<16; a++)
glVertex2f(x+size*si[a], y+size*co[a]);
glEnd();
@@ -295,7 +291,7 @@ static void node_draw_socket_new(bNodeSocket *sock, float size)
glEnable(GL_BLEND);
glEnable( GL_LINE_SMOOTH );
glBegin(GL_LINE_LOOP);
- for(a=0; a<16; a++)
+ for (a=0; a<16; a++)
glVertex2f(x+size*si[a], y+size*co[a]);
glEnd();
glDisable( GL_LINE_SMOOTH );
@@ -340,7 +336,7 @@ static void node_buts_mix_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA
row= uiLayoutRow(layout, 1);
uiItemR(row, ptr, "blend_type", 0, "", ICON_NONE);
- if(ntree->type == NTREE_COMPOSIT)
+ if (ntree->type == NTREE_COMPOSIT)
uiItemR(row, ptr, "use_alpha", 0, "", ICON_IMAGE_RGB_ALPHA);
}
@@ -352,9 +348,9 @@ static void node_buts_time(uiLayout *layout, bContext *UNUSED(C), PointerRNA *pt
bNode *node= ptr->data;
CurveMapping *cumap= node->storage;
- if(cumap) {
+ if (cumap) {
cumap->flag |= CUMA_DRAW_CFRA;
- if(node->custom1<node->custom2)
+ if (node->custom1<node->custom2)
cumap->sample[0]= (float)(CFRA - node->custom1)/(float)(node->custom2-node->custom1);
}
#endif
@@ -389,7 +385,7 @@ static void node_buts_curvecol(uiLayout *layout, bContext *UNUSED(C), PointerRNA
bNode *node= ptr->data;
CurveMapping *cumap= node->storage;
- if(_sample_col) {
+ if (_sample_col) {
cumap->flag |= CUMA_DRAW_SAMPLE;
copy_v3_v3(cumap->sample, _sample_col);
}
@@ -431,9 +427,9 @@ static void node_browse_tex_cb(bContext *C, void *ntree_v, void *node_v)
bNode *node= node_v;
Tex *tex;
- if(node->menunr<1) return;
+ if (node->menunr<1) return;
- if(node->id) {
+ if (node->id) {
node->id->us--;
node->id= NULL;
}
@@ -445,7 +441,7 @@ static void node_browse_tex_cb(bContext *C, void *ntree_v, void *node_v)
nodeSetActive(ntree, node);
- if( ntree->type == NTREE_TEXTURE )
+ if ( ntree->type == NTREE_TEXTURE )
ntreeTexCheckCyclics( ntree );
// allqueue(REDRAWBUTSSHADING, 0);
@@ -500,7 +496,7 @@ static void node_buts_texture(uiLayout *layout, bContext *UNUSED(C), PointerRNA
uiItemR(layout, ptr, "texture", 0, "", ICON_NONE);
- if(multi) {
+ if (multi) {
/* Number Drawing not optimal here, better have a list*/
uiItemR(layout, ptr, "node_output", 0, "", ICON_NONE);
}
@@ -516,15 +512,15 @@ static int node_resize_area_default(bNode *node, int x, int y)
if (node->flag & NODE_HIDDEN) {
rctf totr= node->totr;
/* right part of node */
- totr.xmin= node->totr.xmax-20.0f;
+ totr.xmin = node->totr.xmax-20.0f;
return BLI_in_rctf(&totr, x, y);
}
else {
/* rect we're interested in is just the bottom right corner */
rctf totr= node->totr;
/* bottom right corner */
- totr.xmin= totr.xmax-10.0f;
- totr.ymax= totr.ymin+10.0f;
+ totr.xmin = totr.xmax-10.0f;
+ totr.ymax = totr.ymin+10.0f;
return BLI_in_rctf(&totr, x, y);
}
}
@@ -563,8 +559,8 @@ static void node_update_group(const bContext *C, bNodeTree *ntree, bNode *gnode)
rect->ymin = rect->ymax = locy;
counter= 1;
- for(node= ngroup->nodes.first; node; node= node->next) {
- if(counter) {
+ for (node= ngroup->nodes.first; node; node= node->next) {
+ if (counter) {
*rect= node->totr;
counter= 0;
}
@@ -956,13 +952,13 @@ static void node_update_frame(const bContext *UNUSED(C), bNodeTree *UNUSED(ntree
/* get "global" coords */
nodeSpaceCoords(node, &locx, &locy);
- node->prvr.xmin= locx + NODE_DYS;
- node->prvr.xmax= locx + node->width- NODE_DYS;
+ node->prvr.xmin = locx + NODE_DYS;
+ node->prvr.xmax = locx + node->width- NODE_DYS;
- node->totr.xmin= locx;
- node->totr.xmax= locx + node->width;
- node->totr.ymax= locy;
- node->totr.ymin= locy - node->height;
+ node->totr.xmin = locx;
+ node->totr.xmax = locx + node->width;
+ node->totr.ymax = locy;
+ node->totr.ymin = locy - node->height;
}
static void node_common_set_butfunc(bNodeType *ntype)
@@ -998,9 +994,9 @@ static void node_browse_text_cb(bContext *C, void *ntree_v, void *node_v)
bNode *node= node_v;
/* ID *oldid; */ /* UNUSED */
- if(node->menunr<1) return;
+ if (node->menunr<1) return;
- if(node->id) {
+ if (node->id) {
node->id->us--;
}
/* oldid= node->id; */ /* UNUSED */
@@ -1025,7 +1021,7 @@ static void node_shader_buts_material(uiLayout *layout, bContext *C, PointerRNA
uiTemplateID(layout, C, ptr, "material", "MATERIAL_OT_new", NULL, NULL);
- if(!node->id) return;
+ if (!node->id) return;
col= uiLayoutColumn(layout, 0);
uiItemR(col, ptr, "use_diffuse", 0, NULL, ICON_NONE);
@@ -1070,7 +1066,7 @@ static void node_shader_buts_geometry(uiLayout *layout, bContext *C, PointerRNA
col= uiLayoutColumn(layout, 0);
- if(obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) {
+ if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) {
PointerRNA dataptr= RNA_pointer_get(&obptr, "data");
uiItemPointerR(col, ptr, "uv_layer", &dataptr, "uv_textures", "", ICON_NONE);
@@ -1150,7 +1146,7 @@ static void node_shader_buts_dynamic(uiLayout *layout, bContext *C, PointerRNA *
int xoff=0;
/* B_NODE_EXEC is handled in butspace.c do_node_buts */
- if(!node->id) {
+ if (!node->id) {
const char *strp;
IDnames_to_pupstring(&strp, NULL, "", &(bmain->text), NULL, NULL);
node->menunr= 0;
@@ -1159,7 +1155,7 @@ static void node_shader_buts_dynamic(uiLayout *layout, bContext *C, PointerRNA *
&node->menunr, 0, 0, 0, 0, "Browses existing choices");
uiButSetFunc(bt, node_browse_text_cb, ntree, node);
xoff=19;
- if(strp) MEM_freeN((void *)strp);
+ if (strp) MEM_freeN((void *)strp);
}
else {
bt = uiDefBut(block, BUT, B_NOP, "Update",
@@ -1273,7 +1269,7 @@ static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA *
uiTemplateID(layout, C, ptr, "image", NULL, "IMAGE_OT_open", NULL);
- if(!node->id) return;
+ if (!node->id) return;
prop = RNA_struct_find_property(ptr, "image");
if (!prop || RNA_property_type(prop) != PROP_POINTER) return;
@@ -1285,7 +1281,7 @@ static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA *
source= RNA_enum_get(&imaptr, "source");
- if(source == IMA_SRC_SEQUENCE) {
+ if (source == IMA_SRC_SEQUENCE) {
/* don't use iuser->framenr directly because it may not be updated if auto-refresh is off */
Scene *scene= CTX_data_scene(C);
ImageUser *iuser= node->storage;
@@ -1325,7 +1321,7 @@ static void node_composit_buts_renderlayers(uiLayout *layout, bContext *C, Point
uiTemplateID(layout, C, ptr, "scene", NULL, NULL, NULL);
- if(!node->id) return;
+ if (!node->id) return;
col= uiLayoutColumn(layout, 0);
row = uiLayoutRow(col, 0);
@@ -1538,12 +1534,13 @@ static void node_composit_buts_crop(uiLayout *layout, bContext *UNUSED(C), Point
uiItemR(layout, ptr, "relative", 0, NULL, ICON_NONE);
col= uiLayoutColumn(layout, 1);
- if (RNA_boolean_get(ptr, "relative")){
+ if (RNA_boolean_get(ptr, "relative")) {
uiItemR(col, ptr, "rel_min_x", 0, "Left", ICON_NONE);
uiItemR(col, ptr, "rel_max_x", 0, "Right", ICON_NONE);
uiItemR(col, ptr, "rel_min_y", 0, "Up", ICON_NONE);
uiItemR(col, ptr, "rel_max_y", 0, "Down", ICON_NONE);
- } else {
+ }
+ else {
uiItemR(col, ptr, "min_x", 0, "Left", ICON_NONE);
uiItemR(col, ptr, "max_x", 0, "Right", ICON_NONE);
uiItemR(col, ptr, "min_y", 0, "Up", ICON_NONE);
@@ -1656,7 +1653,7 @@ static void node_composit_buts_color_spill(uiLayout *layout, bContext *UNUSED(C)
col= uiLayoutColumn(layout, 0);
uiItemR(col, ptr, "limit_method", 0, NULL, ICON_NONE);
- if(RNA_enum_get(ptr, "limit_method")==0) {
+ if (RNA_enum_get(ptr, "limit_method")==0) {
uiItemL(col, "Limiting Channel:", ICON_NONE);
row=uiLayoutRow(col,0);
uiItemR(row, ptr, "limit_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
@@ -1711,7 +1708,7 @@ static void node_composit_buts_channel_matte(uiLayout *layout, bContext *UNUSED(
col = uiLayoutColumn(layout, 0);
uiItemR(col, ptr, "limit_method", 0, NULL, ICON_NONE);
- if(RNA_enum_get(ptr, "limit_method")==0) {
+ if (RNA_enum_get(ptr, "limit_method")==0) {
uiItemL(col, "Limiting Channel:", ICON_NONE);
row=uiLayoutRow(col,0);
uiItemR(row, ptr, "limit_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
@@ -1847,7 +1844,8 @@ static void node_composit_buts_colorbalance(uiLayout *layout, bContext *UNUSED(C
row = uiLayoutRow(col, 0);
uiItemR(row, ptr, "gain", 0, NULL, ICON_NONE);
- } else {
+ }
+ else {
split = uiLayoutSplit(layout, 0, 0);
col = uiLayoutColumn(split, 0);
@@ -1881,7 +1879,8 @@ static void node_composit_buts_colorbalance_but(uiLayout *layout, bContext *UNUS
uiTemplateColorWheel(layout, ptr, "gain", 1, 1, 1, 1);
uiItemR(layout, ptr, "gain", 0, NULL, ICON_NONE);
- } else {
+ }
+ else {
uiTemplateColorWheel(layout, ptr, "offset", 1, 1, 0, 1);
uiItemR(layout, ptr, "offset", 0, NULL, ICON_NONE);
@@ -1915,7 +1914,7 @@ static void node_composit_buts_stabilize2d(uiLayout *layout, bContext *C, Pointe
uiTemplateID(layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL);
- if(!node->id)
+ if (!node->id)
return;
uiItemR(layout, ptr, "filter_type", 0, "", 0);
@@ -1932,7 +1931,7 @@ static void node_composit_buts_moviedistortion(uiLayout *layout, bContext *C, Po
uiTemplateID(layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL);
- if(!node->id)
+ if (!node->id)
return;
uiItemR(layout, ptr, "distortion_type", 0, "", 0);
@@ -2198,7 +2197,7 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe
break;
case TEX_VORONOI:
uiItemR(col, &tex_ptr, "distance_metric", 0, "", ICON_NONE);
- if(tex->vn_distm == TEX_MINKOVSKY) {
+ if (tex->vn_distm == TEX_MINKOVSKY) {
uiItemR(col, &tex_ptr, "minkovsky_exponent", 0, NULL, ICON_NONE);
}
uiItemR(col, &tex_ptr, "color_mode", 0, "", ICON_NONE);
@@ -2220,7 +2219,7 @@ static void node_texture_buts_output(uiLayout *layout, bContext *UNUSED(C), Poin
static void node_texture_set_butfunc(bNodeType *ntype)
{
ntype->uifuncbut = NULL;
- if( ntype->type >= TEX_NODE_PROC && ntype->type < TEX_NODE_PROC_MAX ) {
+ if ( ntype->type >= TEX_NODE_PROC && ntype->type < TEX_NODE_PROC_MAX ) {
ntype->uifunc = node_texture_buts_proc;
}
else switch(ntype->type) {
@@ -2333,11 +2332,11 @@ void ED_init_node_butfuncs(void)
void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage)
{
- if((snode->flag & SNODE_BACKDRAW) && snode->treetype==NTREE_COMPOSIT) {
+ if ((snode->flag & SNODE_BACKDRAW) && snode->treetype==NTREE_COMPOSIT) {
Image *ima= BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
void *lock;
ImBuf *ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock);
- if(ibuf) {
+ if (ibuf) {
float x, y;
glMatrixMode(GL_PROJECTION);
@@ -2346,7 +2345,7 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage)
glPushMatrix();
/* keep this, saves us from a version patch */
- if(snode->zoom==0.0f) snode->zoom= 1.0f;
+ if (snode->zoom==0.0f) snode->zoom= 1.0f;
/* somehow the offset has to be calculated inverse */
@@ -2357,26 +2356,27 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage)
x = (ar->winx-snode->zoom*ibuf->x)/2 + snode->xof;
y = (ar->winy-snode->zoom*ibuf->y)/2 + snode->yof;
- if(!ibuf->rect) {
- if(color_manage)
+ if (!ibuf->rect) {
+ if (color_manage)
ibuf->profile = IB_PROFILE_LINEAR_RGB;
else
ibuf->profile = IB_PROFILE_NONE;
IMB_rect_from_float(ibuf);
}
- if(ibuf->rect) {
+ if (ibuf->rect) {
if (snode->flag & SNODE_SHOW_ALPHA) {
glPixelZoom(snode->zoom, snode->zoom);
/* swap bytes, so alpha is most significant one, then just draw it as luminance int */
- if(ENDIAN_ORDER == B_ENDIAN)
+ if (ENDIAN_ORDER == B_ENDIAN)
glPixelStorei(GL_UNPACK_SWAP_BYTES, 1);
glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_LUMINANCE, GL_UNSIGNED_INT, ibuf->rect);
glPixelStorei(GL_UNPACK_SWAP_BYTES, 0);
glPixelZoom(1.0f, 1.0f);
- } else if (snode->flag & SNODE_USE_ALPHA) {
+ }
+ else if (snode->flag & SNODE_USE_ALPHA) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glPixelZoom(snode->zoom, snode->zoom);
@@ -2385,7 +2385,8 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage)
glPixelZoom(1.0f, 1.0f);
glDisable(GL_BLEND);
- } else {
+ }
+ else {
glPixelZoom(snode->zoom, snode->zoom);
glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
@@ -2411,10 +2412,10 @@ static void draw_nodespace_back_tex(ScrArea *sa, SpaceNode *snode)
draw_nodespace_grid(snode);
- if(snode->flag & SNODE_BACKDRAW) {
+ if (snode->flag & SNODE_BACKDRAW) {
Image *ima= BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
- if(ibuf) {
+ if (ibuf) {
int x, y;
float zoom = 1.0;
@@ -2425,7 +2426,7 @@ static void draw_nodespace_back_tex(ScrArea *sa, SpaceNode *snode)
glaDefine2DArea(&sa->winrct);
- if(ibuf->x > sa->winx || ibuf->y > sa->winy) {
+ if (ibuf->x > sa->winx || ibuf->y > sa->winy) {
float zoomx, zoomy;
zoomx= (float)sa->winx/ibuf->x;
zoomy= (float)sa->winy/ibuf->y;
@@ -2438,9 +2439,9 @@ static void draw_nodespace_back_tex(ScrArea *sa, SpaceNode *snode)
glPixelZoom(zoom, zoom);
glColor4f(1.0, 1.0, 1.0, 1.0);
- if(ibuf->rect)
+ if (ibuf->rect)
glaDrawPixelsTex(x, y, ibuf->x, ibuf->y, GL_UNSIGNED_BYTE, ibuf->rect);
- else if(ibuf->channels==4)
+ else if (ibuf->channels==4)
glaDrawPixelsTex(x, y, ibuf->x, ibuf->y, GL_FLOAT, ibuf->rect_float);
glPixelZoom(1.0, 1.0);
@@ -2460,21 +2461,21 @@ int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, floa
float dist, vec[4][2];
/* in v0 and v3 we put begin/end points */
- if(link->fromsock) {
+ if (link->fromsock) {
vec[0][0]= link->fromsock->locx;
vec[0][1]= link->fromsock->locy;
}
else {
- if(snode==NULL) return 0;
+ if (snode==NULL) return 0;
vec[0][0]= snode->mx;
vec[0][1]= snode->my;
}
- if(link->tosock) {
+ if (link->tosock) {
vec[3][0]= link->tosock->locx;
vec[3][1]= link->tosock->locy;
}
else {
- if(snode==NULL) return 0;
+ if (snode==NULL) return 0;
vec[3][0]= snode->mx;
vec[3][1]= snode->my;
}
@@ -2488,7 +2489,7 @@ int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, floa
vec[2][0]= vec[3][0]-dist;
vec[2][1]= vec[3][1];
- if(v2d && MIN4(vec[0][0], vec[1][0], vec[2][0], vec[3][0]) > v2d->cur.xmax); /* clipped */
+ if (v2d && MIN4(vec[0][0], vec[1][0], vec[2][0], vec[3][0]) > v2d->cur.xmax); /* clipped */
else if (v2d && MAX4(vec[0][0], vec[1][0], vec[2][0], vec[3][0]) < v2d->cur.xmin); /* clipped */
else {
@@ -2506,7 +2507,7 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int t
{
float coord_array[LINK_RESOL+1][2];
- if(node_link_bezier_points(v2d, snode, link, coord_array, LINK_RESOL)) {
+ if (node_link_bezier_points(v2d, snode, link, coord_array, LINK_RESOL)) {
float dist, spline_step = 0.0f;
int i;
@@ -2519,12 +2520,12 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int t
glEnable(GL_LINE_SMOOTH);
- if(do_triple) {
+ if (do_triple) {
UI_ThemeColorShadeAlpha(th_col3, -80, -120);
glLineWidth(4.0f);
glBegin(GL_LINE_STRIP);
- for(i=0; i<=LINK_RESOL; i++) {
+ for (i=0; i<=LINK_RESOL; i++) {
glVertex2fv(coord_array[i]);
}
glEnd();
@@ -2535,9 +2536,9 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int t
* changing color in begin/end blocks.
*/
glLineWidth(1.5f);
- if(do_shaded) {
+ if (do_shaded) {
glBegin(GL_LINES);
- for(i=0; i<LINK_RESOL; i++) {
+ for (i=0; i<LINK_RESOL; i++) {
UI_ThemeColorBlend(th_col1, th_col2, spline_step);
glVertex2fv(coord_array[i]);
@@ -2551,7 +2552,7 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int t
else {
UI_ThemeColor(th_col1);
glBegin(GL_LINE_STRIP);
- for(i=0; i<=LINK_RESOL; i++) {
+ for (i=0; i<=LINK_RESOL; i++) {
glVertex2fv(coord_array[i]);
}
glEnd();
@@ -2566,21 +2567,21 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int t
static void node_link_straight_points(View2D *UNUSED(v2d), SpaceNode *snode, bNodeLink *link, float coord_array[][2])
{
- if(link->fromsock) {
+ if (link->fromsock) {
coord_array[0][0]= link->fromsock->locx;
coord_array[0][1]= link->fromsock->locy;
}
else {
- if(snode==NULL) return;
+ if (snode==NULL) return;
coord_array[0][0]= snode->mx;
coord_array[0][1]= snode->my;
}
- if(link->tosock) {
+ if (link->tosock) {
coord_array[1][0]= link->tosock->locx;
coord_array[1][1]= link->tosock->locy;
}
else {
- if(snode==NULL) return;
+ if (snode==NULL) return;
coord_array[1][0]= snode->mx;
coord_array[1][1]= snode->my;
}
@@ -2599,7 +2600,7 @@ void node_draw_link_straight(View2D *v2d, SpaceNode *snode, bNodeLink *link, int
glEnable(GL_LINE_SMOOTH);
- if(do_triple) {
+ if (do_triple) {
UI_ThemeColorShadeAlpha(th_col3, -80, -120);
glLineWidth(4.0f);
@@ -2616,7 +2617,7 @@ void node_draw_link_straight(View2D *v2d, SpaceNode *snode, bNodeLink *link, int
* for Intel hardware, this breaks with GL_LINE_STRIP and
* changing color in begin/end blocks.
*/
- if(do_shaded) {
+ if (do_shaded) {
glBegin(GL_LINES);
for (i=0; i < LINK_RESOL-1; ++i) {
float t= (float)i/(float)(LINK_RESOL-1);
@@ -2650,38 +2651,38 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
int do_shaded= 0, th_col1= TH_HEADER, th_col2= TH_HEADER;
int do_triple= 0, th_col3= TH_WIRE;
- if(link->fromsock==NULL && link->tosock==NULL)
+ if (link->fromsock==NULL && link->tosock==NULL)
return;
/* new connection */
- if(!link->fromsock || !link->tosock) {
+ if (!link->fromsock || !link->tosock) {
th_col1 = TH_ACTIVE;
do_triple = 1;
}
else {
/* going to give issues once... */
- if(link->tosock->flag & SOCK_UNAVAIL)
+ if (link->tosock->flag & SOCK_UNAVAIL)
return;
- if(link->fromsock->flag & SOCK_UNAVAIL)
+ if (link->fromsock->flag & SOCK_UNAVAIL)
return;
/* a bit ugly... but thats how we detect the internal group links */
- if(!link->fromnode || !link->tonode) {
+ if (!link->fromnode || !link->tonode) {
UI_ThemeColorBlend(TH_BACK, TH_WIRE, 0.5f);
do_shaded= 0;
}
else {
/* check cyclic */
- if((link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF) && (link->flag & NODE_LINK_VALID)) {
+ if ((link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF) && (link->flag & NODE_LINK_VALID)) {
/* special indicated link, on drop-node */
- if(link->flag & NODE_LINKFLAG_HILITE) {
+ if (link->flag & NODE_LINKFLAG_HILITE) {
th_col1= th_col2= TH_ACTIVE;
}
else {
/* regular link */
- if(link->fromnode->flag & SELECT)
+ if (link->fromnode->flag & SELECT)
th_col1= TH_EDGE_SELECT;
- if(link->tonode->flag & SELECT)
+ if (link->tonode->flag & SELECT)
th_col2= TH_EDGE_SELECT;
}
do_shaded= 1;
diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c
index 1b5f2417384..19eebe4d320 100644
--- a/source/blender/editors/space_node/node_buttons.c
+++ b/source/blender/editors/space_node/node_buttons.c
@@ -142,10 +142,10 @@ static void node_sockets_panel(const bContext *C, Panel *pa)
uiLayout *layout= pa->layout, *split;
char name[UI_MAX_NAME_STR];
- if(ELEM(NULL, ntree, node))
+ if (ELEM(NULL, ntree, node))
return;
- for(sock=node->inputs.first; sock; sock=sock->next) {
+ for (sock=node->inputs.first; sock; sock=sock->next) {
BLI_snprintf(name, sizeof(name), "%s:", sock->name);
split = uiLayoutSplit(layout, 0.35f, 0);
@@ -187,7 +187,7 @@ static int node_properties(bContext *C, wmOperator *UNUSED(op))
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= node_has_buttons_region(sa);
- if(ar)
+ if (ar)
ED_region_toggle_hidden(C, ar);
return OPERATOR_FINISHED;
@@ -202,13 +202,13 @@ static int node_properties_poll(bContext *C)
void NODE_OT_properties(wmOperatorType *ot)
{
- ot->name= "Properties";
- ot->description= "Toggles the properties panel display";
- ot->idname= "NODE_OT_properties";
+ ot->name = "Properties";
+ ot->description = "Toggles the properties panel display";
+ ot->idname = "NODE_OT_properties";
- ot->exec= node_properties;
- ot->poll= node_properties_poll;
+ ot->exec = node_properties;
+ ot->poll = node_properties_poll;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index a2775832c1d..23b700e5b64 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -49,6 +49,8 @@
#include "BLI_threads.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_main.h"
@@ -88,7 +90,7 @@ void ED_node_tree_update(SpaceNode *snode, Scene *scene)
{
snode_set_context(snode, scene);
- if(snode->nodetree && snode->nodetree->id.us==0)
+ if (snode->nodetree && snode->nodetree->id.us==0)
snode->nodetree->id.us= 1;
}
@@ -99,28 +101,28 @@ void ED_node_changed_update(ID *id, bNode *node)
node_tree_from_ID(id, &nodetree, &edittree, &treetype);
- if(treetype==NTREE_SHADER) {
+ if (treetype==NTREE_SHADER) {
DAG_id_tag_update(id, 0);
- if(GS(id->name) == ID_MA)
+ if (GS(id->name) == ID_MA)
WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, id);
- else if(GS(id->name) == ID_LA)
+ else if (GS(id->name) == ID_LA)
WM_main_add_notifier(NC_LAMP|ND_LIGHTING_DRAW, id);
- else if(GS(id->name) == ID_WO)
+ else if (GS(id->name) == ID_WO)
WM_main_add_notifier(NC_WORLD|ND_WORLD_DRAW, id);
}
- else if(treetype==NTREE_COMPOSIT) {
- if(node)
+ else if (treetype==NTREE_COMPOSIT) {
+ if (node)
nodeUpdate(edittree, node);
/* don't use NodeTagIDChanged, it gives far too many recomposites for image, scene layers, ... */
node= node_tree_get_editgroup(nodetree);
- if(node)
+ if (node)
nodeUpdateID(nodetree, node->id);
WM_main_add_notifier(NC_SCENE|ND_NODES, id);
}
- else if(treetype==NTREE_TEXTURE) {
+ else if (treetype==NTREE_TEXTURE) {
DAG_id_tag_update(id, 0);
WM_main_add_notifier(NC_TEXTURE|ND_NODES, id);
}
@@ -130,12 +132,12 @@ static int has_nodetree(bNodeTree *ntree, bNodeTree *lookup)
{
bNode *node;
- if(ntree == lookup)
+ if (ntree == lookup)
return 1;
- for(node=ntree->nodes.first; node; node=node->next)
- if(node->type == NODE_GROUP && node->id)
- if(has_nodetree((bNodeTree*)node->id, lookup))
+ for (node=ntree->nodes.first; node; node=node->next)
+ if (node->type == NODE_GROUP && node->id)
+ if (has_nodetree((bNodeTree*)node->id, lookup))
return 1;
return 0;
@@ -161,15 +163,15 @@ void ED_node_generic_update(Main *bmain, bNodeTree *ntree, bNode *node)
/* look through all datablocks, to support groups */
tti->foreach_nodetree(bmain, &cd, node_generic_update_cb);
- if(ntree->type == NTREE_TEXTURE)
+ if (ntree->type == NTREE_TEXTURE)
ntreeTexCheckCyclics(ntree);
}
static void do_node_internal_buttons(bContext *C, void *node_v, int event)
{
- if(event==B_NODE_EXEC) {
+ if (event==B_NODE_EXEC) {
SpaceNode *snode= CTX_wm_space_node(C);
- if(snode && snode->id)
+ if (snode && snode->id)
ED_node_changed_update(snode->id, node_v);
}
}
@@ -228,41 +230,41 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
dy-= NODE_DY;
/* little bit space in top */
- if(node->outputs.first)
+ if (node->outputs.first)
dy-= NODE_DYS/2;
/* output sockets */
- for(nsock= node->outputs.first; nsock; nsock= nsock->next) {
- if(!nodeSocketIsHidden(nsock)) {
+ for (nsock= node->outputs.first; nsock; nsock= nsock->next) {
+ if (!nodeSocketIsHidden(nsock)) {
nsock->locx= locx + node->width;
nsock->locy= dy - NODE_DYS;
dy-= NODE_DY;
}
}
- node->prvr.xmin= locx + NODE_DYS;
- node->prvr.xmax= locx + node->width- NODE_DYS;
+ node->prvr.xmin = locx + NODE_DYS;
+ node->prvr.xmax = locx + node->width- NODE_DYS;
/* preview rect? */
- if(node->flag & NODE_PREVIEW) {
+ if (node->flag & NODE_PREVIEW) {
/* only recalculate size when there's a preview actually, otherwise we use stored result */
BLI_lock_thread(LOCK_PREVIEW);
- if(node->preview && node->preview->rect) {
+ if (node->preview && node->preview->rect) {
float aspect= 1.0f;
- if(node->preview && node->preview->xsize && node->preview->ysize)
+ if (node->preview && node->preview->xsize && node->preview->ysize)
aspect= (float)node->preview->ysize/(float)node->preview->xsize;
dy-= NODE_DYS/2;
- node->prvr.ymax= dy;
+ node->prvr.ymax = dy;
- if(aspect <= 1.0f)
- node->prvr.ymin= dy - aspect*(node->width-NODE_DY);
+ if (aspect <= 1.0f)
+ node->prvr.ymin = dy - aspect*(node->width-NODE_DY);
else {
float dx= (node->width - NODE_DYS) - (node->width- NODE_DYS)/aspect; /* width correction of image */
- node->prvr.ymin= dy - (node->width-NODE_DY);
+ node->prvr.ymin = dy - (node->width-NODE_DY);
node->prvr.xmin+= 0.5f*dx;
node->prvr.xmax-= 0.5f*dx;
@@ -271,16 +273,16 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
dy= node->prvr.ymin - NODE_DYS/2;
/* make sure that maximums are bigger or equal to minimums */
- if(node->prvr.xmax < node->prvr.xmin) SWAP(float, node->prvr.xmax, node->prvr.xmin);
- if(node->prvr.ymax < node->prvr.ymin) SWAP(float, node->prvr.ymax, node->prvr.ymin);
+ if (node->prvr.xmax < node->prvr.xmin) SWAP(float, node->prvr.xmax, node->prvr.xmin);
+ if (node->prvr.ymax < node->prvr.ymin) SWAP(float, node->prvr.ymax, node->prvr.ymin);
}
else {
float oldh= node->prvr.ymax - node->prvr.ymin;
- if(oldh==0.0f)
+ if (oldh==0.0f)
oldh= 0.6f*node->width-NODE_DY;
dy-= NODE_DYS/2;
- node->prvr.ymax= dy;
- node->prvr.ymin= dy - oldh;
+ node->prvr.ymax = dy;
+ node->prvr.ymin = dy - oldh;
dy= node->prvr.ymin - NODE_DYS/2;
}
@@ -288,14 +290,14 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
}
/* buttons rect? */
- if((node->flag & NODE_OPTIONS) && node->typeinfo->uifunc) {
+ if ((node->flag & NODE_OPTIONS) && node->typeinfo->uifunc) {
dy-= NODE_DYS/2;
/* set this for uifunc() that don't use layout engine yet */
- node->butr.xmin= 0;
- node->butr.xmax= node->width - 2*NODE_DYS;
- node->butr.ymin= 0;
- node->butr.ymax= 0;
+ node->butr.xmin = 0;
+ node->butr.xmax = node->width - 2*NODE_DYS;
+ node->butr.ymin = 0;
+ node->butr.ymax = 0;
RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr);
@@ -311,8 +313,8 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
}
/* input sockets */
- for(nsock= node->inputs.first; nsock; nsock= nsock->next) {
- if(!nodeSocketIsHidden(nsock)) {
+ for (nsock= node->inputs.first; nsock; nsock= nsock->next) {
+ if (!nodeSocketIsHidden(nsock)) {
nsock->locx= locx;
nsock->locy= dy - NODE_DYS;
dy-= NODE_DY;
@@ -320,13 +322,13 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
}
/* little bit space in end */
- if(node->inputs.first || (node->flag & (NODE_OPTIONS|NODE_PREVIEW))==0 )
+ if (node->inputs.first || (node->flag & (NODE_OPTIONS|NODE_PREVIEW))==0 )
dy-= NODE_DYS/2;
- node->totr.xmin= locx;
- node->totr.xmax= locx + node->width;
- node->totr.ymax= locy;
- node->totr.ymin= MIN2(dy, locy-2*NODE_DY);
+ node->totr.xmin = locx;
+ node->totr.xmax = locx + node->width;
+ node->totr.ymax = locy;
+ node->totr.ymin = MIN2(dy, locy-2*NODE_DY);
/* Set the block bounds to clip mouse events from underlying nodes.
* Add a margin for sockets on each side.
@@ -350,28 +352,28 @@ static void node_update_hidden(bNode *node)
nodeSpaceCoords(node, &locx, &locy);
/* calculate minimal radius */
- for(nsock= node->inputs.first; nsock; nsock= nsock->next)
- if(!nodeSocketIsHidden(nsock))
+ for (nsock= node->inputs.first; nsock; nsock= nsock->next)
+ if (!nodeSocketIsHidden(nsock))
totin++;
- for(nsock= node->outputs.first; nsock; nsock= nsock->next)
- if(!nodeSocketIsHidden(nsock))
+ for (nsock= node->outputs.first; nsock; nsock= nsock->next)
+ if (!nodeSocketIsHidden(nsock))
totout++;
tot= MAX2(totin, totout);
- if(tot>4) {
+ if (tot>4) {
hiddenrad += 5.0f*(float)(tot-4);
}
- node->totr.xmin= locx;
- node->totr.xmax= locx + 3*hiddenrad + node->miniwidth;
- node->totr.ymax= locy + (hiddenrad - 0.5f*NODE_DY);
- node->totr.ymin= node->totr.ymax - 2*hiddenrad;
+ node->totr.xmin = locx;
+ node->totr.xmax = locx + 3*hiddenrad + node->miniwidth;
+ node->totr.ymax = locy + (hiddenrad - 0.5f*NODE_DY);
+ node->totr.ymin = node->totr.ymax - 2*hiddenrad;
/* output sockets */
rad=drad= (float)M_PI/(1.0f + (float)totout);
- for(nsock= node->outputs.first; nsock; nsock= nsock->next) {
- if(!nodeSocketIsHidden(nsock)) {
+ for (nsock= node->outputs.first; nsock; nsock= nsock->next) {
+ if (!nodeSocketIsHidden(nsock)) {
nsock->locx= node->totr.xmax - hiddenrad + (float)sin(rad)*hiddenrad;
nsock->locy= node->totr.ymin + hiddenrad + (float)cos(rad)*hiddenrad;
rad+= drad;
@@ -381,8 +383,8 @@ static void node_update_hidden(bNode *node)
/* input sockets */
rad=drad= - (float)M_PI/(1.0f + (float)totin);
- for(nsock= node->inputs.first; nsock; nsock= nsock->next) {
- if(!nodeSocketIsHidden(nsock)) {
+ for (nsock= node->inputs.first; nsock; nsock= nsock->next) {
+ if (!nodeSocketIsHidden(nsock)) {
nsock->locx= node->totr.xmin + hiddenrad + (float)sin(rad)*hiddenrad;
nsock->locy= node->totr.ymin + hiddenrad + (float)cos(rad)*hiddenrad;
rad+= drad;
@@ -401,7 +403,7 @@ static void node_update_hidden(bNode *node)
void node_update_default(const bContext *C, bNodeTree *ntree, bNode *node)
{
- if(node->flag & NODE_HIDDEN)
+ if (node->flag & NODE_HIDDEN)
node_update_hidden(node);
else
node_update_basis(C, ntree, node);
@@ -409,19 +411,19 @@ void node_update_default(const bContext *C, bNodeTree *ntree, bNode *node)
static int node_get_colorid(bNode *node)
{
- if(node->typeinfo->nclass==NODE_CLASS_INPUT)
+ if (node->typeinfo->nclass==NODE_CLASS_INPUT)
return TH_NODE_IN_OUT;
- if(node->typeinfo->nclass==NODE_CLASS_OUTPUT) {
- if(node->flag & NODE_DO_OUTPUT)
+ if (node->typeinfo->nclass==NODE_CLASS_OUTPUT) {
+ if (node->flag & NODE_DO_OUTPUT)
return TH_NODE_IN_OUT;
else
return TH_NODE;
}
- if(node->typeinfo->nclass==NODE_CLASS_CONVERTOR)
+ if (node->typeinfo->nclass==NODE_CLASS_CONVERTOR)
return TH_NODE_CONVERTOR;
- if(ELEM3(node->typeinfo->nclass, NODE_CLASS_OP_COLOR, NODE_CLASS_OP_VECTOR, NODE_CLASS_OP_FILTER))
+ if (ELEM3(node->typeinfo->nclass, NODE_CLASS_OP_COLOR, NODE_CLASS_OP_VECTOR, NODE_CLASS_OP_FILTER))
return TH_NODE_OPERATOR;
- if(node->typeinfo->nclass==NODE_CLASS_GROUP)
+ if (node->typeinfo->nclass==NODE_CLASS_GROUP)
return TH_NODE_GROUP;
return TH_NODE;
}
@@ -434,7 +436,7 @@ static void node_draw_mute_line(View2D *v2d, SpaceNode *snode, bNode *node)
ListBase links;
bNodeLink *link;
- if(node->typeinfo->internal_connect == NULL)
+ if (node->typeinfo->internal_connect == NULL)
return;
/* Get default muting links. */
@@ -443,7 +445,7 @@ static void node_draw_mute_line(View2D *v2d, SpaceNode *snode, bNode *node)
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
- for(link = links.first; link; link = link->next)
+ for (link = links.first; link; link = link->next)
node_draw_link_bezier(v2d, snode, link, TH_REDALERT, 0, TH_WIRE, 0, TH_WIRE);
glDisable(GL_BLEND);
@@ -474,7 +476,7 @@ static void node_circle_draw(float x, float y, float size, char *col, int highli
glColor3ub(col[0], col[1], col[2]);
glBegin(GL_POLYGON);
- for(a=0; a<16; a++)
+ for (a=0; a<16; a++)
glVertex2f(x+size*si[a], y+size*co[a]);
glEnd();
@@ -488,7 +490,7 @@ static void node_circle_draw(float x, float y, float size, char *col, int highli
glEnable(GL_BLEND);
glEnable( GL_LINE_SMOOTH );
glBegin(GL_LINE_LOOP);
- for(a=0; a<16; a++)
+ for (a=0; a<16; a++)
glVertex2f(x+size*si[a], y+size*co[a]);
glEnd();
glDisable( GL_LINE_SMOOTH );
@@ -517,25 +519,25 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv)
glRectf(prv->xmin, prv->ymin, prv->xmax, prv->ymax);
glColor3ub(160, 160, 160);
- for(y=prv->ymin; y<prv->ymax; y+=tile*2) {
- for(x=prv->xmin; x<prv->xmax; x+=tile*2) {
+ for (y=prv->ymin; y<prv->ymax; y+=tile*2) {
+ for (x=prv->xmin; x<prv->xmax; x+=tile*2) {
float tilex= tile, tiley= tile;
- if(x+tile > prv->xmax)
+ if (x+tile > prv->xmax)
tilex= prv->xmax-x;
- if(y+tile > prv->ymax)
+ if (y+tile > prv->ymax)
tiley= prv->ymax-y;
glRectf(x, y, x + tilex, y + tiley);
}
}
- for(y=prv->ymin+tile; y<prv->ymax; y+=tile*2) {
- for(x=prv->xmin+tile; x<prv->xmax; x+=tile*2) {
+ for (y=prv->ymin+tile; y<prv->ymax; y+=tile*2) {
+ for (x=prv->xmin+tile; x<prv->xmax; x+=tile*2) {
float tilex= tile, tiley= tile;
- if(x+tile > prv->xmax)
+ if (x+tile > prv->xmax)
tilex= prv->xmax-x;
- if(y+tile > prv->ymax)
+ if (y+tile > prv->ymax)
tiley= prv->ymax-y;
glRectf(x, y, x + tilex, y + tiley);
@@ -582,7 +584,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
View2D *v2d = &ar->v2d;
/* hurmf... another candidate for callback, have to see how this works first */
- if(node->id && node->block && snode->treetype==NTREE_SHADER)
+ if (node->id && node->block && snode->treetype==NTREE_SHADER)
nodeShaderSynchronizeID(node, 0);
/* skip if out of view */
@@ -598,12 +600,12 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
ui_dropshadow(rct, BASIS_RAD, snode->aspect, node->flag & SELECT);
/* header */
- if(color_id==TH_NODE)
+ if (color_id==TH_NODE)
UI_ThemeColorShade(color_id, -20);
else
UI_ThemeColor(color_id);
- if(node->flag & NODE_MUTED)
+ if (node->flag & NODE_MUTED)
UI_ThemeColorBlend(color_id, TH_REDALERT, 0.5f);
uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT);
@@ -613,7 +615,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
iconofs= rct->xmax - 7.0f;
/* preview */
- if(node->typeinfo->flag & NODE_PREVIEW) {
+ if (node->typeinfo->flag & NODE_PREVIEW) {
uiBut *but;
iconofs-=iconbutw;
uiBlockSetEmboss(node->block, UI_EMBOSSN);
@@ -629,7 +631,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
uiBlockSetEmboss(node->block, UI_EMBOSS);
}
/* group edit */
- if(node->type == NODE_GROUP) {
+ if (node->type == NODE_GROUP) {
uiBut *but;
iconofs-=iconbutw;
uiBlockSetEmboss(node->block, UI_EMBOSSN);
@@ -640,7 +642,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
}
/* title */
- if(node->flag & SELECT)
+ if (node->flag & SELECT)
UI_ThemeColor(TH_TEXT_HI);
else
UI_ThemeColorBlendShade(TH_TEXT, color_id, 0.4f, 10);
@@ -662,7 +664,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
/* this isn't doing anything for the label, so commenting out */
#if 0
- if(node->flag & SELECT)
+ if (node->flag & SELECT)
UI_ThemeColor(TH_TEXT_HI);
else
UI_ThemeColor(TH_TEXT);
@@ -671,7 +673,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
BLI_strncpy(showname, nodeLabel(node), sizeof(showname));
//if(node->flag & NODE_MUTED)
- // BLI_snprintf(showname, sizeof(showname), "[%s]", showname); // XXX - dont print into self!
+ // BLI_snprintf(showname, sizeof(showname), "[%s]", showname); // XXX - don't print into self!
uiDefBut(node->block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(rct->ymax-NODE_DY),
(int)(iconofs - rct->xmin-18.0f), NODE_DY, NULL, 0, 0, 0, 0, "");
@@ -687,11 +689,11 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
node_scaling_widget(TH_NODE, snode->aspect, rct->xmax-BASIS_RAD*snode->aspect, rct->ymin, rct->xmax, rct->ymin+BASIS_RAD*snode->aspect);
/* outline active and selected emphasis */
- if( node->flag & (NODE_ACTIVE|SELECT) ) {
+ if ( node->flag & (NODE_ACTIVE|SELECT) ) {
glEnable(GL_BLEND);
glEnable( GL_LINE_SMOOTH );
/* using different shades of TH_TEXT_HI for the empasis, like triangle */
- if( node->flag & NODE_ACTIVE )
+ if ( node->flag & NODE_ACTIVE )
UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, -40);
else
UI_ThemeColorShadeAlpha(TH_TEXT_HI, -20, -120);
@@ -703,51 +705,53 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
}
/* disable lines */
- if(node->flag & NODE_MUTED)
+ if (node->flag & NODE_MUTED)
node_draw_mute_line(v2d, snode, node);
/* socket inputs, buttons */
- for(sock= node->inputs.first; sock; sock= sock->next) {
+ for (sock= node->inputs.first; sock; sock= sock->next) {
bNodeSocketType *stype= ntreeGetSocketType(sock->type);
- if(nodeSocketIsHidden(sock))
+ if (nodeSocketIsHidden(sock))
continue;
node_socket_circle_draw(ntree, sock, NODE_SOCKSIZE);
if (stype->buttonfunc)
- stype->buttonfunc(C, node->block, ntree, node, sock, sock->name, sock->locx+NODE_DYS, sock->locy-NODE_DYS, node->width-NODE_DY);
+ stype->buttonfunc(C, node->block, ntree, node, sock, IFACE_(sock->name), sock->locx+NODE_DYS, sock->locy-NODE_DYS, node->width-NODE_DY);
}
/* socket outputs */
- for(sock= node->outputs.first; sock; sock= sock->next) {
+ for (sock= node->outputs.first; sock; sock= sock->next) {
PointerRNA sockptr;
- float slen;
- int ofs;
RNA_pointer_create((ID*)ntree, &RNA_NodeSocket, sock, &sockptr);
- if(nodeSocketIsHidden(sock))
+ if (nodeSocketIsHidden(sock))
continue;
node_socket_circle_draw(ntree, sock, NODE_SOCKSIZE);
- ofs= 0;
- UI_ThemeColor(TH_TEXT);
- slen= snode->aspect*UI_GetStringWidth(sock->name);
- while(slen > node->width) {
- ofs++;
- slen= snode->aspect*UI_GetStringWidth(sock->name+ofs);
+ {
+ const char *name = IFACE_(sock->name);
+ float slen;
+ int ofs = 0;
+ UI_ThemeColor(TH_TEXT);
+ slen= snode->aspect*UI_GetStringWidth(name);
+ while (slen > node->width) {
+ ofs++;
+ slen= snode->aspect*UI_GetStringWidth(name+ofs);
+ }
+ uiDefBut(node->block, LABEL, 0, name+ofs, (short)(sock->locx-15.0f-slen), (short)(sock->locy-9.0f),
+ (short)(node->width-NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, "");
}
- uiDefBut(node->block, LABEL, 0, sock->name+ofs, (short)(sock->locx-15.0f-slen), (short)(sock->locy-9.0f),
- (short)(node->width-NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, "");
}
/* preview */
- if(node->flag & NODE_PREVIEW) {
+ if (node->flag & NODE_PREVIEW) {
BLI_lock_thread(LOCK_PREVIEW);
- if(node->preview && node->preview->rect && !BLI_rctf_is_empty(&node->prvr))
+ if (node->preview && node->preview->rect && !BLI_rctf_is_empty(&node->prvr))
node_draw_preview(node->preview, &node->prvr);
BLI_unlock_thread(LOCK_PREVIEW);
}
@@ -775,16 +779,16 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
/* body */
UI_ThemeColor(color_id);
- if(node->flag & NODE_MUTED)
+ if (node->flag & NODE_MUTED)
UI_ThemeColorBlend(color_id, TH_REDALERT, 0.5f);
uiRoundBox(rct->xmin, rct->ymin, rct->xmax, rct->ymax, hiddenrad);
/* outline active and selected emphasis */
- if( node->flag & (NODE_ACTIVE|SELECT) ) {
+ if ( node->flag & (NODE_ACTIVE|SELECT) ) {
glEnable(GL_BLEND);
glEnable( GL_LINE_SMOOTH );
/* using different shades of TH_TEXT_HI for the empasis, like triangle */
- if( node->flag & NODE_ACTIVE )
+ if ( node->flag & NODE_ACTIVE )
UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, -40);
else
UI_ThemeColorShadeAlpha(TH_TEXT_HI, -20, -120);
@@ -794,7 +798,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
}
/* title */
- if(node->flag & SELECT)
+ if (node->flag & SELECT)
UI_ThemeColor(TH_TEXT_HI);
else
UI_ThemeColorBlendShade(TH_TEXT, color_id, 0.4f, 10);
@@ -815,19 +819,19 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
}
/* disable lines */
- if(node->flag & NODE_MUTED)
+ if (node->flag & NODE_MUTED)
node_draw_mute_line(&ar->v2d, snode, node);
- if(node->flag & SELECT)
+ if (node->flag & SELECT)
UI_ThemeColor(TH_TEXT_HI);
else
UI_ThemeColor(TH_TEXT);
- if(node->miniwidth>0.0f) {
+ if (node->miniwidth>0.0f) {
BLI_strncpy(showname, nodeLabel(node), sizeof(showname));
//if(node->flag & NODE_MUTED)
- // BLI_snprintf(showname, sizeof(showname), "[%s]", showname); // XXX - dont print into self!
+ // BLI_snprintf(showname, sizeof(showname), "[%s]", showname); // XXX - don't print into self!
uiDefBut(node->block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(centy-10),
(int)(rct->xmax - rct->xmin-18.0f -12.0f), NODE_DY, NULL, 0, 0, 0, 0, "");
@@ -845,13 +849,13 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
fdrawline(rct->xmax-dx-3.0f*snode->aspect, centy-4.0f, rct->xmax-dx-3.0f*snode->aspect, centy+4.0f);
/* sockets */
- for(sock= node->inputs.first; sock; sock= sock->next) {
- if(!nodeSocketIsHidden(sock))
+ for (sock= node->inputs.first; sock; sock= sock->next) {
+ if (!nodeSocketIsHidden(sock))
node_socket_circle_draw(snode->nodetree, sock, socket_size);
}
- for(sock= node->outputs.first; sock; sock= sock->next) {
- if(!nodeSocketIsHidden(sock))
+ for (sock= node->outputs.first; sock; sock= sock->next) {
+ if (!nodeSocketIsHidden(sock))
node_socket_circle_draw(snode->nodetree, sock, socket_size);
}
@@ -862,7 +866,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
void node_draw_default(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *node)
{
- if(node->flag & NODE_HIDDEN)
+ if (node->flag & NODE_HIDDEN)
node_draw_hidden(C, ar, snode, node);
else
node_draw_basis(C, ar, snode, ntree, node);
@@ -878,7 +882,7 @@ void node_update_nodetree(const bContext *C, bNodeTree *ntree, float offsetx, fl
{
bNode *node;
- for(node= ntree->nodes.first; node; node= node->next) {
+ for (node= ntree->nodes.first; node; node= node->next) {
/* XXX little hack */
node->locx += offsetx;
node->locy += offsety;
@@ -902,18 +906,18 @@ void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeT
bNodeLink *link;
int a;
- if(ntree==NULL) return; /* groups... */
+ if (ntree==NULL) return; /* groups... */
/* node lines */
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
- for(link= ntree->links.first; link; link= link->next)
+ for (link= ntree->links.first; link; link= link->next)
node_draw_link(&ar->v2d, snode, link);
glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
/* draw nodes, last nodes in front */
- for(a=0, node= ntree->nodes.first; node; node=node->next, a++) {
+ for (a=0, node= ntree->nodes.first; node; node=node->next, a++) {
node->nr= a; /* index of node in list, used for exec event code */
node_draw(C, ar, snode, ntree, node);
}
@@ -949,7 +953,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
/* nodes */
snode_set_context(snode, CTX_data_scene(C));
- if(snode->nodetree) {
+ if (snode->nodetree) {
bNode *node;
node_uiblocks_init(C, snode->nodetree);
@@ -957,8 +961,8 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
/* uiBlocks must be initialized in drawing order for correct event clipping.
* Node group internal blocks added after the main group block.
*/
- for(node= snode->nodetree->nodes.first; node; node= node->next) {
- if(node->flag & NODE_GROUP_EDIT)
+ for (node= snode->nodetree->nodes.first; node; node= node->next) {
+ if (node->flag & NODE_GROUP_EDIT)
node_uiblocks_init(C, (bNodeTree *)node->id);
}
@@ -967,8 +971,8 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
#if 0
/* active group */
- for(node= snode->nodetree->nodes.first; node; node= node->next) {
- if(node->flag & NODE_GROUP_EDIT)
+ for (node= snode->nodetree->nodes.first; node; node= node->next) {
+ if (node->flag & NODE_GROUP_EDIT)
node_draw_group(C, ar, snode, snode->nodetree, node);
}
#endif
@@ -977,7 +981,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
/* temporary links */
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
- for(nldrag= snode->linkdrag.first; nldrag; nldrag= nldrag->next)
+ for (nldrag= snode->linkdrag.first; nldrag; nldrag= nldrag->next)
node_draw_link(&ar->v2d, snode, nldrag->link);
glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 8587133976d..d95947142f9 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -132,7 +132,7 @@ static void compo_freejob(void *cjv)
{
CompoJob *cj= cjv;
- if(cj->localtree) {
+ if (cj->localtree) {
ntreeLocalMerge(cj->localtree, cj->ntree);
}
MEM_freeN(cj);
@@ -169,7 +169,7 @@ static void compo_startjob(void *cjv, short *stop, short *do_update, float *prog
CompoJob *cj= cjv;
bNodeTree *ntree= cj->localtree;
- if(cj->scene->use_nodes==0)
+ if (cj->scene->use_nodes==0)
return;
cj->stop= stop;
@@ -220,9 +220,9 @@ void snode_composite_job(const bContext *C, ScrArea *sa)
/* operator poll callback */
static int composite_node_active(bContext *C)
{
- if( ED_operator_node_active(C)) {
+ if ( ED_operator_node_active(C)) {
SpaceNode *snode= CTX_wm_space_node(C);
- if(snode->treetype==NTREE_COMPOSIT)
+ if (snode->treetype==NTREE_COMPOSIT)
return 1;
}
return 0;
@@ -234,10 +234,10 @@ static bNode *editnode_get_active(bNodeTree *ntree)
bNode *node;
/* check for edited group */
- for(node= ntree->nodes.first; node; node= node->next)
- if(nodeGroupEditGet(node))
+ for (node= ntree->nodes.first; node; node= node->next)
+ if (nodeGroupEditGet(node))
break;
- if(node)
+ if (node)
return nodeGetActive((bNodeTree *)node->id);
else
return nodeGetActive(ntree);
@@ -252,11 +252,11 @@ void snode_notify(bContext *C, SpaceNode *snode)
{
WM_event_add_notifier(C, NC_NODE|NA_EDITED, NULL);
- if(snode->treetype==NTREE_SHADER)
+ if (snode->treetype==NTREE_SHADER)
WM_event_add_notifier(C, NC_MATERIAL|ND_NODES, snode->id);
- else if(snode->treetype==NTREE_COMPOSIT)
+ else if (snode->treetype==NTREE_COMPOSIT)
WM_event_add_notifier(C, NC_SCENE|ND_NODES, snode->id);
- else if(snode->treetype==NTREE_TEXTURE)
+ else if (snode->treetype==NTREE_TEXTURE)
WM_event_add_notifier(C, NC_TEXTURE|ND_NODES, snode->id);
}
@@ -265,8 +265,8 @@ bNode *node_tree_get_editgroup(bNodeTree *nodetree)
bNode *gnode;
/* get the groupnode */
- for(gnode= nodetree->nodes.first; gnode; gnode= gnode->next)
- if(nodeGroupEditGet(gnode))
+ for (gnode= nodetree->nodes.first; gnode; gnode= gnode->next)
+ if (nodeGroupEditGet(gnode))
break;
return gnode;
}
@@ -289,7 +289,7 @@ void ED_node_shader_default(Scene *scene, ID *id)
Material *ma= (Material*)id;
ma->nodetree = ntree;
- if(scene_use_new_shading_nodes(scene)) {
+ if (scene_use_new_shading_nodes(scene)) {
output_type = SH_NODE_OUTPUT_MATERIAL;
shader_type = SH_NODE_BSDF_DIFFUSE;
}
@@ -321,7 +321,7 @@ void ED_node_shader_default(Scene *scene, ID *id)
shader_type = SH_NODE_EMISSION;
copy_v3_v3(color, &la->r);
- if(la->type == LA_LOCAL || la->type == LA_SPOT || la->type == LA_AREA)
+ if (la->type == LA_LOCAL || la->type == LA_SPOT || la->type == LA_AREA)
strength= 100.0f;
else
strength= 1.0f;
@@ -347,11 +347,11 @@ void ED_node_shader_default(Scene *scene, ID *id)
nodeAddLink(ntree, in, fromsock, out, tosock);
/* default values */
- if(scene_use_new_shading_nodes(scene)) {
+ if (scene_use_new_shading_nodes(scene)) {
sock= in->inputs.first;
copy_v3_v3(((bNodeSocketValueRGBA*)sock->default_value)->value, color);
- if(strength != 0.0f) {
+ if (strength != 0.0f) {
sock= in->inputs.last;
((bNodeSocketValueFloat*)sock->default_value)->value= strength;
}
@@ -369,7 +369,7 @@ void ED_node_composit_default(Scene *sce)
bNodeTemplate ntemp;
/* but lets check it anyway */
- if(sce->nodetree) {
+ if (sce->nodetree) {
if (G.f & G_DEBUG)
printf("error in composite initialize\n");
return;
@@ -409,7 +409,7 @@ void ED_node_texture_default(Tex *tx)
bNodeTemplate ntemp;
/* but lets check it anyway */
- if(tx->nodetree) {
+ if (tx->nodetree) {
if (G.f & G_DEBUG)
printf("error in texture initialize\n");
return;
@@ -440,43 +440,43 @@ void node_tree_from_ID(ID *id, bNodeTree **ntree, bNodeTree **edittree, int *tre
bNode *node= NULL;
short idtype= GS(id->name);
- if(idtype == ID_NT) {
+ if (idtype == ID_NT) {
*ntree= (bNodeTree*)id;
- if(treetype) *treetype= (*ntree)->type;
+ if (treetype) *treetype= (*ntree)->type;
}
- else if(idtype == ID_MA) {
+ else if (idtype == ID_MA) {
*ntree= ((Material*)id)->nodetree;
- if(treetype) *treetype= NTREE_SHADER;
+ if (treetype) *treetype= NTREE_SHADER;
}
- else if(idtype == ID_LA) {
+ else if (idtype == ID_LA) {
*ntree= ((Lamp*)id)->nodetree;
- if(treetype) *treetype= NTREE_SHADER;
+ if (treetype) *treetype= NTREE_SHADER;
}
- else if(idtype == ID_WO) {
+ else if (idtype == ID_WO) {
*ntree= ((World*)id)->nodetree;
- if(treetype) *treetype= NTREE_SHADER;
+ if (treetype) *treetype= NTREE_SHADER;
}
- else if(idtype == ID_SCE) {
+ else if (idtype == ID_SCE) {
*ntree= ((Scene*)id)->nodetree;
- if(treetype) *treetype= NTREE_COMPOSIT;
+ if (treetype) *treetype= NTREE_COMPOSIT;
}
- else if(idtype == ID_TE) {
+ else if (idtype == ID_TE) {
*ntree= ((Tex*)id)->nodetree;
- if(treetype) *treetype= NTREE_TEXTURE;
+ if (treetype) *treetype= NTREE_TEXTURE;
}
else {
- if(treetype) *treetype= 0;
+ if (treetype) *treetype= 0;
return;
}
/* find editable group */
- if(edittree) {
- if(*ntree)
- for(node= (*ntree)->nodes.first; node; node= node->next)
- if(nodeGroupEditGet(node))
+ if (edittree) {
+ if (*ntree)
+ for (node= (*ntree)->nodes.first; node; node= node->next)
+ if (nodeGroupEditGet(node))
break;
- if(node && node->id)
+ if (node && node->id)
*edittree= (bNodeTree *)node->id;
else
*edittree= *ntree;
@@ -485,7 +485,7 @@ void node_tree_from_ID(ID *id, bNodeTree **ntree, bNodeTree **edittree, int *tre
else {
*ntree= NULL;
*edittree= NULL;
- if(treetype) *treetype= 0;
+ if (treetype) *treetype= 0;
}
}
@@ -496,17 +496,17 @@ void snode_set_context(SpaceNode *snode, Scene *scene)
snode->id= snode->from= NULL;
- if(snode->treetype==NTREE_SHADER) {
+ if (snode->treetype==NTREE_SHADER) {
/* need active object, or we allow pinning... */
- if(snode->shaderfrom == SNODE_SHADER_OBJECT) {
- if(ob) {
- if(ob->type == OB_LAMP) {
+ if (snode->shaderfrom == SNODE_SHADER_OBJECT) {
+ if (ob) {
+ if (ob->type == OB_LAMP) {
snode->from= &ob->id;
snode->id= ob->data;
}
else {
Material *ma= give_current_material(ob, ob->actcol);
- if(ma) {
+ if (ma) {
snode->from= &ob->id;
snode->id= &ma->id;
}
@@ -514,26 +514,26 @@ void snode_set_context(SpaceNode *snode, Scene *scene)
}
}
else { /* SNODE_SHADER_WORLD */
- if(scene->world) {
+ if (scene->world) {
snode->from= NULL;
snode->id= &scene->world->id;
}
}
}
- else if(snode->treetype==NTREE_COMPOSIT) {
+ else if (snode->treetype==NTREE_COMPOSIT) {
snode->id= &scene->id;
/* update output sockets based on available layers */
ntreeCompositForceHidden(scene->nodetree, scene);
}
- else if(snode->treetype==NTREE_TEXTURE) {
+ else if (snode->treetype==NTREE_TEXTURE) {
Tex *tx= NULL;
- if(snode->texfrom==SNODE_TEX_OBJECT) {
- if(ob) {
+ if (snode->texfrom==SNODE_TEX_OBJECT) {
+ if (ob) {
tx= give_current_object_texture(ob);
- if(ob->type == OB_LAMP)
+ if (ob->type == OB_LAMP)
snode->from= (ID*)ob->data;
else
snode->from= (ID*)give_current_material(ob, ob->actcol);
@@ -542,7 +542,7 @@ void snode_set_context(SpaceNode *snode, Scene *scene)
snode->id= &tx->id;
}
}
- else if(snode->texfrom==SNODE_TEX_WORLD) {
+ else if (snode->texfrom==SNODE_TEX_WORLD) {
tx= give_current_world_texture(scene->world);
snode->from= (ID *)scene->world;
snode->id= &tx->id;
@@ -550,7 +550,7 @@ void snode_set_context(SpaceNode *snode, Scene *scene)
else {
struct Brush *brush= NULL;
- if(ob && (ob->mode & OB_MODE_SCULPT))
+ if (ob && (ob->mode & OB_MODE_SCULPT))
brush= paint_brush(&scene->toolsettings->sculpt->paint);
else
brush= paint_brush(&scene->toolsettings->imapaint.paint);
@@ -581,7 +581,7 @@ static void snode_update(SpaceNode *snode, bNode *node)
/* if inside group, tag entire group */
gnode= node_tree_get_editgroup(snode->nodetree);
- if(gnode)
+ if (gnode)
nodeUpdateID(snode->nodetree, gnode->id);
}
@@ -589,12 +589,12 @@ static int has_nodetree(bNodeTree *ntree, bNodeTree *lookup)
{
bNode *node;
- if(ntree == lookup)
+ if (ntree == lookup)
return 1;
- for(node=ntree->nodes.first; node; node=node->next)
- if(node->type == NODE_GROUP && node->id)
- if(has_nodetree((bNodeTree*)node->id, lookup))
+ for (node=ntree->nodes.first; node; node=node->next)
+ if (node->type == NODE_GROUP && node->id)
+ if (has_nodetree((bNodeTree*)node->id, lookup))
return 1;
return 0;
@@ -606,72 +606,72 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node)
nodeSetActive(ntree, node);
- if(node->type!=NODE_GROUP) {
+ if (node->type!=NODE_GROUP) {
int was_output= (node->flag & NODE_DO_OUTPUT);
/* tree specific activate calls */
- if(ntree->type==NTREE_SHADER) {
+ if (ntree->type==NTREE_SHADER) {
/* when we select a material, active texture is cleared, for buttons */
- if(node->id && ELEM3(GS(node->id->name), ID_MA, ID_LA, ID_WO))
+ if (node->id && ELEM3(GS(node->id->name), ID_MA, ID_LA, ID_WO))
nodeClearActiveID(ntree, ID_TE);
- if(node->type==SH_NODE_OUTPUT) {
+ if (node->type==SH_NODE_OUTPUT) {
bNode *tnode;
- for(tnode= ntree->nodes.first; tnode; tnode= tnode->next)
- if( tnode->type==SH_NODE_OUTPUT)
+ for (tnode= ntree->nodes.first; tnode; tnode= tnode->next)
+ if ( tnode->type==SH_NODE_OUTPUT)
tnode->flag &= ~NODE_DO_OUTPUT;
node->flag |= NODE_DO_OUTPUT;
- if(was_output==0)
+ if (was_output==0)
ED_node_generic_update(bmain, ntree, node);
}
/* if active texture changed, free glsl materials */
- if((node->flag & NODE_ACTIVE_TEXTURE) && !was_active_texture) {
+ if ((node->flag & NODE_ACTIVE_TEXTURE) && !was_active_texture) {
Material *ma;
- for(ma=bmain->mat.first; ma; ma=ma->id.next)
- if(ma->nodetree && ma->use_nodes && has_nodetree(ma->nodetree, ntree))
+ for (ma=bmain->mat.first; ma; ma=ma->id.next)
+ if (ma->nodetree && ma->use_nodes && has_nodetree(ma->nodetree, ntree))
GPU_material_free(ma);
}
WM_main_add_notifier(NC_MATERIAL|ND_NODES, node->id);
}
- else if(ntree->type==NTREE_COMPOSIT) {
+ else if (ntree->type==NTREE_COMPOSIT) {
/* make active viewer, currently only 1 supported... */
- if( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) {
+ if ( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) {
bNode *tnode;
- for(tnode= ntree->nodes.first; tnode; tnode= tnode->next)
- if( ELEM(tnode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))
+ for (tnode= ntree->nodes.first; tnode; tnode= tnode->next)
+ if ( ELEM(tnode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))
tnode->flag &= ~NODE_DO_OUTPUT;
node->flag |= NODE_DO_OUTPUT;
- if(was_output==0)
+ if (was_output==0)
ED_node_generic_update(bmain, ntree, node);
/* addnode() doesnt link this yet... */
node->id= (ID *)BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
}
- else if(node->type==CMP_NODE_R_LAYERS) {
+ else if (node->type==CMP_NODE_R_LAYERS) {
Scene *scene;
- for(scene=bmain->scene.first; scene; scene=scene->id.next) {
- if(scene->nodetree && scene->use_nodes && has_nodetree(scene->nodetree, ntree)) {
- if(node->id==NULL || node->id==(ID *)scene) {
+ for (scene=bmain->scene.first; scene; scene=scene->id.next) {
+ if (scene->nodetree && scene->use_nodes && has_nodetree(scene->nodetree, ntree)) {
+ if (node->id==NULL || node->id==(ID *)scene) {
scene->r.actlay= node->custom1;
}
}
}
}
- else if(node->type==CMP_NODE_COMPOSITE) {
+ else if (node->type==CMP_NODE_COMPOSITE) {
if (was_output==0) {
bNode *tnode;
- for(tnode= ntree->nodes.first; tnode; tnode= tnode->next)
- if( tnode->type==CMP_NODE_COMPOSITE)
+ for (tnode= ntree->nodes.first; tnode; tnode= tnode->next)
+ if ( tnode->type==CMP_NODE_COMPOSITE)
tnode->flag &= ~NODE_DO_OUTPUT;
node->flag |= NODE_DO_OUTPUT;
@@ -679,10 +679,10 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node)
}
}
}
- else if(ntree->type==NTREE_TEXTURE) {
+ else if (ntree->type==NTREE_TEXTURE) {
// XXX
#if 0
- if(node->id)
+ if (node->id)
; // XXX BIF_preview_changed(-1);
// allqueue(REDRAWBUTSSHADING, 1);
// allqueue(REDRAWIPO, 0);
@@ -811,12 +811,12 @@ void snode_make_group_editable(SpaceNode *snode, bNode *gnode)
bNode *node;
/* make sure nothing has group editing on */
- for(node=snode->nodetree->nodes.first; node; node=node->next)
+ for (node=snode->nodetree->nodes.first; node; node=node->next)
nodeGroupEditClear(node);
- if(gnode==NULL) {
+ if (gnode==NULL) {
/* with NULL argument we do a toggle */
- if(snode->edittree==snode->nodetree)
+ if (snode->edittree==snode->nodetree)
gnode= nodeGetActive(snode->nodetree);
}
@@ -824,9 +824,9 @@ void snode_make_group_editable(SpaceNode *snode, bNode *gnode)
snode->edittree = nodeGroupEditSet(gnode, 1);
/* deselect all other nodes, so we can also do grabbing of entire subtree */
- for(node= snode->nodetree->nodes.first; node; node= node->next)
- node->flag &= ~SELECT;
- gnode->flag |= SELECT;
+ for (node= snode->nodetree->nodes.first; node; node= node->next)
+ node_deselect(node);
+ node_select(gnode);
}
else
snode->edittree= snode->nodetree;
@@ -858,7 +858,7 @@ static int node_group_edit_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e
/* XXX callback? */
if (snode->nodetree==snode->edittree) {
gnode = nodeGetActive(snode->edittree);
- if(gnode && gnode->id && GS(gnode->id->name)==ID_NT && gnode->id->lib) {
+ if (gnode && gnode->id && GS(gnode->id->name)==ID_NT && gnode->id->lib) {
uiPupMenuOkee(C, op->type->idname, "Make group local?");
return OPERATOR_CANCELLED;
}
@@ -1138,18 +1138,18 @@ static int node_group_ungroup_exec(bContext *C, wmOperator *op)
/* are we inside of a group? */
gnode= node_tree_get_editgroup(snode->nodetree);
- if(gnode)
+ if (gnode)
snode_make_group_editable(snode, NULL);
gnode= nodeGetActive(snode->edittree);
- if(gnode==NULL)
+ if (gnode==NULL)
return OPERATOR_CANCELLED;
- if(gnode->type!=NODE_GROUP) {
+ if (gnode->type!=NODE_GROUP) {
BKE_report(op->reports, RPT_WARNING, "Not a group");
return OPERATOR_CANCELLED;
}
- else if(!node_group_ungroup(snode->edittree, gnode)) {
+ else if (!node_group_ungroup(snode->edittree, gnode)) {
BKE_report(op->reports, RPT_WARNING, "Can't ungroup");
return OPERATOR_CANCELLED;
}
@@ -1182,8 +1182,8 @@ static bNode *visible_node(SpaceNode *snode, rctf *rct)
{
bNode *node;
- for(node=snode->edittree->nodes.last; node; node=node->prev) {
- if(BLI_isect_rctf(&node->totr, rct, NULL))
+ for (node=snode->edittree->nodes.last; node; node=node->prev) {
+ if (BLI_isect_rctf(&node->totr, rct, NULL))
break;
}
return node;
@@ -1245,7 +1245,7 @@ static int snode_bg_viewmove_invoke(bContext *C, wmOperator *op, wmEvent *event)
ima= BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock);
- if(ibuf == NULL) {
+ if (ibuf == NULL) {
BKE_image_release_ibuf(ima, lock);
return OPERATOR_CANCELLED;
}
@@ -1279,18 +1279,18 @@ static int snode_bg_viewmove_cancel(bContext *UNUSED(C), wmOperator *op)
void NODE_OT_backimage_move(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Background Image Move";
+ ot->name = "Background Image Move";
ot->description = "Move Node backdrop";
- ot->idname= "NODE_OT_backimage_move";
+ ot->idname = "NODE_OT_backimage_move";
/* api callbacks */
- ot->invoke= snode_bg_viewmove_invoke;
- ot->modal= snode_bg_viewmove_modal;
- ot->poll= composite_node_active;
- ot->cancel= snode_bg_viewmove_cancel;
+ ot->invoke = snode_bg_viewmove_invoke;
+ ot->modal = snode_bg_viewmove_modal;
+ ot->poll = composite_node_active;
+ ot->cancel = snode_bg_viewmove_cancel;
/* flags */
- ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
+ ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
}
static int backimage_zoom(bContext *C, wmOperator *op)
@@ -1310,15 +1310,15 @@ void NODE_OT_backimage_zoom(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Background Image Zoom";
- ot->idname= "NODE_OT_backimage_zoom";
+ ot->name = "Background Image Zoom";
+ ot->idname = "NODE_OT_backimage_zoom";
/* api callbacks */
- ot->exec= backimage_zoom;
- ot->poll= composite_node_active;
+ ot->exec = backimage_zoom;
+ ot->poll = composite_node_active;
/* flags */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
/* internal */
RNA_def_float(ot->srna, "factor", 1.2f, 0.0f, 10.0f, "Factor", "", 0.0f, 10.0f);
@@ -1362,11 +1362,11 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
ima= BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock);
- if(!ibuf)
+ if (!ibuf)
return;
- if(!ibuf->rect) {
- if(info->color_manage)
+ if (!ibuf->rect) {
+ if (info->color_manage)
ibuf->profile = IB_PROFILE_LINEAR_RGB;
else
ibuf->profile = IB_PROFILE_NONE;
@@ -1379,7 +1379,7 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
fx = (bufx > 0.0f ? ((float)event->mval[0] - 0.5f*ar->winx - snode->xof) / bufx + 0.5f : 0.0f);
fy = (bufy > 0.0f ? ((float)event->mval[1] - 0.5f*ar->winy - snode->yof) / bufy + 0.5f : 0.0f);
- if(fx>=0.0f && fy>=0.0f && fx<1.0f && fy<1.0f) {
+ if (fx>=0.0f && fy>=0.0f && fx<1.0f && fy<1.0f) {
float *fp;
char *cp;
int x= (int)(fx*ibuf->x), y= (int)(fy*ibuf->y);
@@ -1392,7 +1392,7 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
info->draw= 1;
info->channels= ibuf->channels;
- if(ibuf->rect) {
+ if (ibuf->rect) {
cp= (char *)(ibuf->rect + y*ibuf->x + x);
info->col[0]= cp[0];
@@ -1405,7 +1405,7 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
info->colf[2]= (float)cp[2]/255.0f;
info->colf[3]= (float)cp[3]/255.0f;
}
- if(ibuf->rect_float) {
+ if (ibuf->rect_float) {
fp= (ibuf->rect_float + (ibuf->channels)*(y*ibuf->x + x));
info->colf[0]= fp[0];
@@ -1437,7 +1437,7 @@ static int sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
ARegion *ar= CTX_wm_region(C);
ImageSampleInfo *info;
- if(snode->treetype!=NTREE_COMPOSIT || !(snode->flag & SNODE_BACKDRAW))
+ if (snode->treetype!=NTREE_COMPOSIT || !(snode->flag & SNODE_BACKDRAW))
return OPERATOR_CANCELLED;
info= MEM_callocN(sizeof(ImageSampleInfo), "ImageSampleInfo");
@@ -1476,17 +1476,17 @@ static int sample_cancel(bContext *C, wmOperator *op)
void NODE_OT_backimage_sample(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Backimage Sample";
- ot->idname= "NODE_OT_backimage_sample";
+ ot->name = "Backimage Sample";
+ ot->idname = "NODE_OT_backimage_sample";
/* api callbacks */
- ot->invoke= sample_invoke;
- ot->modal= sample_modal;
- ot->cancel= sample_cancel;
- ot->poll= ED_operator_node_active;
+ ot->invoke = sample_invoke;
+ ot->modal = sample_modal;
+ ot->cancel = sample_cancel;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
}
/* ********************** size widget operator ******************** */
@@ -1512,7 +1512,7 @@ static int node_resize_modal(bContext *C, wmOperator *op, wmEvent *event)
&mx, &my);
if (node) {
- if(node->flag & NODE_HIDDEN) {
+ if (node->flag & NODE_HIDDEN) {
node->miniwidth= nsw->oldminiwidth + mx - nsw->mxstart;
CLAMP(node->miniwidth, 0.0f, 100.0f);
}
@@ -1550,12 +1550,12 @@ static int node_resize_invoke(bContext *C, wmOperator *op, wmEvent *event)
ARegion *ar= CTX_wm_region(C);
bNode *node= editnode_get_active(snode->edittree);
- if(node) {
+ if (node) {
/* convert mouse coordinates to v2d space */
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1],
&snode->mx, &snode->my);
- if(node->typeinfo->resize_area_func(node, snode->mx, snode->my)) {
+ if (node->typeinfo->resize_area_func(node, snode->mx, snode->my)) {
NodeSizeWidget *nsw= MEM_callocN(sizeof(NodeSizeWidget), "size widget op data");
op->customdata= nsw;
@@ -1587,17 +1587,17 @@ static int node_resize_cancel(bContext *UNUSED(C), wmOperator *op)
void NODE_OT_resize(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Resize Node";
- ot->idname= "NODE_OT_resize";
+ ot->name = "Resize Node";
+ ot->idname = "NODE_OT_resize";
/* api callbacks */
- ot->invoke= node_resize_invoke;
- ot->modal= node_resize_modal;
- ot->poll= ED_operator_node_active;
- ot->cancel= node_resize_cancel;
+ ot->invoke = node_resize_invoke;
+ ot->modal = node_resize_modal;
+ ot->poll = ED_operator_node_active;
+ ot->cancel = node_resize_cancel;
/* flags */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
}
@@ -1607,11 +1607,11 @@ int node_has_hidden_sockets(bNode *node, short flag)
{
bNodeSocket *sock;
- for(sock= node->inputs.first; sock; sock= sock->next)
- if(sock->flag & flag)
+ for (sock= node->inputs.first; sock; sock= sock->next)
+ if (sock->flag & flag)
return 1;
- for(sock= node->outputs.first; sock; sock= sock->next)
- if(sock->flag & flag)
+ for (sock= node->outputs.first; sock; sock= sock->next)
+ if (sock->flag & flag)
return 1;
return 0;
}
@@ -1620,20 +1620,20 @@ void node_set_hidden_sockets(SpaceNode *snode, bNode *node, short flag, int set)
{
bNodeSocket *sock;
- if(set==0) {
- for(sock= node->inputs.first; sock; sock= sock->next)
+ if (set==0) {
+ for (sock= node->inputs.first; sock; sock= sock->next)
sock->flag &= ~flag;
- for(sock= node->outputs.first; sock; sock= sock->next)
+ for (sock= node->outputs.first; sock; sock= sock->next)
sock->flag &= ~flag;
}
else {
/* hide unused sockets */
- for(sock= node->inputs.first; sock; sock= sock->next) {
- if(sock->link==NULL)
+ for (sock= node->inputs.first; sock; sock= sock->next) {
+ if (sock->link==NULL)
sock->flag |= flag;
}
- for(sock= node->outputs.first; sock; sock= sock->next) {
- if(nodeCountSocketLinks(snode->edittree, sock)==0)
+ for (sock= node->outputs.first; sock; sock= sock->next) {
+ if (nodeCountSocketLinks(snode->edittree, sock)==0)
sock->flag |= flag;
}
}
@@ -1647,20 +1647,20 @@ static int node_link_viewer(const bContext *C, bNode *tonode)
bNodeSocket *sock;
/* context check */
- if(tonode==NULL || tonode->outputs.first==NULL)
+ if (tonode==NULL || tonode->outputs.first==NULL)
return OPERATOR_CANCELLED;
- if( ELEM(tonode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))
+ if ( ELEM(tonode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))
return OPERATOR_CANCELLED;
/* get viewer */
- for(node= snode->edittree->nodes.first; node; node= node->next)
- if( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))
- if(node->flag & NODE_DO_OUTPUT)
+ for (node= snode->edittree->nodes.first; node; node= node->next)
+ if ( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))
+ if (node->flag & NODE_DO_OUTPUT)
break;
/* no viewer, we make one active */
- if(node==NULL) {
- for(node= snode->edittree->nodes.first; node; node= node->next) {
- if( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) {
+ if (node==NULL) {
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
+ if ( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) {
node->flag |= NODE_DO_OUTPUT;
break;
}
@@ -1672,32 +1672,32 @@ static int node_link_viewer(const bContext *C, bNode *tonode)
/* try to find an already connected socket to cycle to the next */
if (node) {
link = NULL;
- for(link= snode->edittree->links.first; link; link= link->next)
- if(link->tonode==node && link->fromnode==tonode)
- if(link->tosock==node->inputs.first)
+ for (link= snode->edittree->links.first; link; link= link->next)
+ if (link->tonode==node && link->fromnode==tonode)
+ if (link->tosock==node->inputs.first)
break;
- if(link) {
+ if (link) {
/* unlink existing connection */
sock= link->fromsock;
nodeRemLink(snode->edittree, link);
/* find a socket after the previously connected socket */
- for(sock=sock->next; sock; sock= sock->next)
- if(!nodeSocketIsHidden(sock))
+ for (sock=sock->next; sock; sock= sock->next)
+ if (!nodeSocketIsHidden(sock))
break;
}
}
/* find a socket starting from the first socket */
- if(!sock) {
- for(sock= tonode->outputs.first; sock; sock= sock->next)
- if(!nodeSocketIsHidden(sock))
+ if (!sock) {
+ for (sock= tonode->outputs.first; sock; sock= sock->next)
+ if (!nodeSocketIsHidden(sock))
break;
}
- if(sock) {
+ if (sock) {
/* add a new viewer if none exists yet */
- if(!node) {
+ if (!node) {
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
bNodeTemplate ntemp;
@@ -1712,12 +1712,12 @@ static int node_link_viewer(const bContext *C, bNode *tonode)
}
else {
/* get link to viewer */
- for(link= snode->edittree->links.first; link; link= link->next)
- if(link->tonode==node && link->tosock==node->inputs.first)
+ for (link= snode->edittree->links.first; link; link= link->next)
+ if (link->tonode==node && link->tosock==node->inputs.first)
break;
}
- if(link==NULL) {
+ if (link==NULL) {
nodeAddLink(snode->edittree, tonode, sock, node, node->inputs.first);
}
else {
@@ -1739,7 +1739,7 @@ static int node_active_link_viewer(bContext *C, wmOperator *UNUSED(op))
node= editnode_get_active(snode->edittree);
- if(!node)
+ if (!node)
return OPERATOR_CANCELLED;
ED_preview_kill_jobs(C);
@@ -1757,16 +1757,16 @@ static int node_active_link_viewer(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_link_viewer(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Link to Viewer Node";
+ ot->name = "Link to Viewer Node";
ot->description = "Link to viewer node";
- ot->idname= "NODE_OT_link_viewer";
+ ot->idname = "NODE_OT_link_viewer";
/* api callbacks */
- ot->exec= node_active_link_viewer;
- ot->poll= composite_node_active;
+ ot->exec = node_active_link_viewer;
+ ot->poll = composite_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1779,17 +1779,17 @@ static int UNUSED_FUNCTION(node_mouse_groupheader)(SpaceNode *snode)
// XXX int mval[2];
gnode= node_tree_get_editgroup(snode->nodetree);
- if(gnode==NULL) return 0;
+ if (gnode==NULL) return 0;
// XXX getmouseco_areawin(mval);
// XXX areamouseco_to_ipoco(G.v2d, mval, &mx, &my);
/* click in header or outside? */
- if(BLI_in_rctf(&gnode->totr, mx, my)==0) {
+ if (BLI_in_rctf(&gnode->totr, mx, my)==0) {
rctf rect= gnode->totr;
rect.ymax += NODE_DY;
- if(BLI_in_rctf(&rect, mx, my)==0)
+ if (BLI_in_rctf(&rect, mx, my)==0)
snode_make_group_editable(snode, NULL); /* toggles, so exits editmode */
// else
// XXX transform_nodes(snode->nodetree, 'g', "Move group");
@@ -1811,7 +1811,7 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
*sockp= NULL;
/* check if we click in a socket */
- for(node= snode->edittree->nodes.first; node; node= node->next) {
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
rect.xmin = snode->mx - (NODE_SOCKSIZE+4);
rect.ymin = snode->my - (NODE_SOCKSIZE+4);
@@ -1823,17 +1823,18 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
if (in_out == SOCK_IN) {
rect.xmax += NODE_SOCKSIZE;
rect.xmin -= NODE_SOCKSIZE*4;
- } else if (in_out == SOCK_OUT) {
+ }
+ else if (in_out == SOCK_OUT) {
rect.xmax += NODE_SOCKSIZE*4;
rect.xmin -= NODE_SOCKSIZE;
}
}
- if(in_out & SOCK_IN) {
- for(sock= node->inputs.first; sock; sock= sock->next) {
- if(!nodeSocketIsHidden(sock)) {
- if(BLI_in_rctf(&rect, sock->locx, sock->locy)) {
- if(node == visible_node(snode, &rect)) {
+ if (in_out & SOCK_IN) {
+ for (sock= node->inputs.first; sock; sock= sock->next) {
+ if (!nodeSocketIsHidden(sock)) {
+ if (BLI_in_rctf(&rect, sock->locx, sock->locy)) {
+ if (node == visible_node(snode, &rect)) {
*nodep= node;
*sockp= sock;
return 1;
@@ -1842,11 +1843,11 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
}
}
}
- if(in_out & SOCK_OUT) {
- for(sock= node->outputs.first; sock; sock= sock->next) {
- if(!nodeSocketIsHidden(sock)) {
- if(BLI_in_rctf(&rect, sock->locx, sock->locy)) {
- if(node == visible_node(snode, &rect)) {
+ if (in_out & SOCK_OUT) {
+ for (sock= node->outputs.first; sock; sock= sock->next) {
+ if (!nodeSocketIsHidden(sock)) {
+ if (BLI_in_rctf(&rect, sock->locx, sock->locy)) {
+ if (node == visible_node(snode, &rect)) {
*nodep= node;
*sockp= sock;
return 1;
@@ -1860,10 +1861,10 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
/* check group sockets
* NB: using ngroup->outputs as input sockets and vice versa here!
*/
- if(in_out & SOCK_IN) {
- for(sock= snode->edittree->outputs.first; sock; sock= sock->next) {
- if(!nodeSocketIsHidden(sock)) {
- if(BLI_in_rctf(&rect, sock->locx, sock->locy)) {
+ if (in_out & SOCK_IN) {
+ for (sock= snode->edittree->outputs.first; sock; sock= sock->next) {
+ if (!nodeSocketIsHidden(sock)) {
+ if (BLI_in_rctf(&rect, sock->locx, sock->locy)) {
*nodep= NULL; /* NULL node pointer indicates group socket */
*sockp= sock;
return 1;
@@ -1871,10 +1872,10 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
}
}
}
- if(in_out & SOCK_OUT) {
- for(sock= snode->edittree->inputs.first; sock; sock= sock->next) {
- if(!nodeSocketIsHidden(sock)) {
- if(BLI_in_rctf(&rect, sock->locx, sock->locy)) {
+ if (in_out & SOCK_OUT) {
+ for (sock= snode->edittree->inputs.first; sock; sock= sock->next) {
+ if (!nodeSocketIsHidden(sock)) {
+ if (BLI_in_rctf(&rect, sock->locx, sock->locy)) {
*nodep= NULL; /* NULL node pointer indicates group socket */
*sockp= sock;
return 1;
@@ -2031,8 +2032,8 @@ void snode_autoconnect(SpaceNode *snode, int allow_multiple, int replace)
bNode *node;
int i, numlinks=0;
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->flag & NODE_SELECT) {
+ for (node= ntree->nodes.first; node; node= node->next) {
+ if (node->flag & NODE_SELECT) {
nli = MEM_mallocN(sizeof(bNodeListItem), "temporary node list item");
nli->node = node;
BLI_addtail(nodelist, nli);
@@ -2112,13 +2113,13 @@ bNode *node_add_node(SpaceNode *snode, Main *bmain, Scene *scene, bNodeTemplate
node = nodeAddNode(snode->edittree, ntemp);
/* generics */
- if(node) {
+ if (node) {
node->locx= locx;
node->locy= locy + 60.0f; // arbitrary.. so its visible, (0,0) is top of node
- node->flag |= SELECT;
+ node_select(node);
gnode= node_tree_get_editgroup(snode->nodetree);
- if(gnode) {
+ if (gnode) {
node->locx -= gnode->locx;
node->locy -= gnode->locy;
}
@@ -2126,24 +2127,24 @@ bNode *node_add_node(SpaceNode *snode, Main *bmain, Scene *scene, bNodeTemplate
ntreeUpdateTree(snode->edittree);
ED_node_set_active(bmain, snode->edittree, node);
- if(snode->nodetree->type==NTREE_COMPOSIT) {
- if(ELEM4(node->type, CMP_NODE_R_LAYERS, CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS, CMP_NODE_OUTPUT_FILE)) {
+ if (snode->nodetree->type==NTREE_COMPOSIT) {
+ if (ELEM4(node->type, CMP_NODE_R_LAYERS, CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS, CMP_NODE_OUTPUT_FILE)) {
node->id = &scene->id;
}
- else if(ELEM3(node->type, CMP_NODE_MOVIECLIP, CMP_NODE_MOVIEDISTORTION, CMP_NODE_STABILIZE2D)) {
+ else if (ELEM3(node->type, CMP_NODE_MOVIECLIP, CMP_NODE_MOVIEDISTORTION, CMP_NODE_STABILIZE2D)) {
node->id = (ID *)scene->clip;
}
ntreeCompositForceHidden(snode->edittree, scene);
}
- if(node->id)
+ if (node->id)
id_us_plus(node->id);
snode_update(snode, node);
}
- if(snode->nodetree->type==NTREE_TEXTURE) {
+ if (snode->nodetree->type==NTREE_TEXTURE) {
ntreeTexCheckCyclics(snode->edittree);
}
@@ -2157,19 +2158,18 @@ static int node_duplicate_exec(bContext *C, wmOperator *op)
SpaceNode *snode= CTX_wm_space_node(C);
bNodeTree *ntree= snode->edittree;
bNode *node, *newnode, *lastnode;
- bNodeSocket *sock;
bNodeLink *link, *newlink, *lastlink;
int keep_inputs = RNA_boolean_get(op->ptr, "keep_inputs");
ED_preview_kill_jobs(C);
lastnode = ntree->nodes.last;
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->flag & SELECT) {
+ for (node= ntree->nodes.first; node; node= node->next) {
+ if (node->flag & SELECT) {
newnode = nodeCopyNode(ntree, node);
- if(newnode->id) {
- /* simple id user adjustment, node internal functions dont touch this
+ if (newnode->id) {
+ /* simple id user adjustment, node internal functions don't touch this
* but operators and readfile.c do. */
id_us_plus(newnode->id);
/* to ensure redraws or rerenders happen */
@@ -2215,19 +2215,14 @@ static int node_duplicate_exec(bContext *C, wmOperator *op)
}
/* deselect old nodes, select the copies instead */
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->flag & SELECT) {
+ for (node= ntree->nodes.first; node; node= node->next) {
+ if (node->flag & SELECT) {
/* has been set during copy above */
newnode = node->new_node;
- node->flag &= ~(NODE_SELECT|NODE_ACTIVE);
- newnode->flag |= NODE_SELECT;
-
- /* deselect old node sockets */
- for (sock=node->inputs.first; sock; sock=sock->next)
- sock->flag &= ~SELECT;
- for (sock=node->outputs.first; sock; sock=sock->next)
- sock->flag &= ~SELECT;
+ node_deselect(node);
+ node->flag &= ~NODE_ACTIVE;
+ node_select(newnode);
}
/* make sure we don't copy new nodes again! */
@@ -2246,16 +2241,16 @@ static int node_duplicate_exec(bContext *C, wmOperator *op)
void NODE_OT_duplicate(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Duplicate Nodes";
+ ot->name = "Duplicate Nodes";
ot->description = "Duplicate selected nodes";
- ot->idname= "NODE_OT_duplicate";
+ ot->idname = "NODE_OT_duplicate";
/* api callbacks */
- ot->exec= node_duplicate_exec;
- ot->poll= ED_operator_node_active;
+ ot->exec = node_duplicate_exec;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "keep_inputs", 0, "Keep Inputs", "Keep the input links to duplicated nodes");
}
@@ -2267,22 +2262,22 @@ static void node_remove_extra_links(SpaceNode *snode, bNodeSocket *tsock, bNodeL
bNodeLink *tlink;
bNodeSocket *sock;
- if(tsock && nodeCountSocketLinks(snode->edittree, link->tosock) > tsock->limit) {
+ if (tsock && nodeCountSocketLinks(snode->edittree, link->tosock) > tsock->limit) {
- for(tlink= snode->edittree->links.first; tlink; tlink= tlink->next) {
- if(link!=tlink && tlink->tosock==link->tosock)
+ for (tlink= snode->edittree->links.first; tlink; tlink= tlink->next) {
+ if (link!=tlink && tlink->tosock==link->tosock)
break;
}
- if(tlink) {
+ if (tlink) {
/* try to move the existing link to the next available socket */
if (tlink->tonode) {
/* is there a free input socket with the target type? */
- for(sock= tlink->tonode->inputs.first; sock; sock= sock->next) {
- if(sock->type==tlink->tosock->type)
- if(nodeCountSocketLinks(snode->edittree, sock) < sock->limit)
+ for (sock= tlink->tonode->inputs.first; sock; sock= sock->next) {
+ if (sock->type==tlink->tosock->type)
+ if (nodeCountSocketLinks(snode->edittree, sock) < sock->limit)
break;
}
- if(sock) {
+ if (sock) {
tlink->tosock= sock;
sock->flag &= ~(SOCK_HIDDEN|SOCK_AUTO_HIDDEN);
}
@@ -2321,13 +2316,13 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
switch (event->type) {
case MOUSEMOVE:
- if(in_out==SOCK_OUT) {
+ if (in_out==SOCK_OUT) {
/* only target socket becomes hilighted */
node_deselect_all_input_sockets(snode, 0);
- if(node_find_indicated_socket(snode, &tnode, &tsock, SOCK_IN)) {
- if(nodeFindLink(snode->edittree, sock, tsock)==NULL) {
- if( link->tosock!= tsock && (!tnode || (tnode!=node && link->tonode!=tnode)) ) {
+ if (node_find_indicated_socket(snode, &tnode, &tsock, SOCK_IN)) {
+ if (nodeFindLink(snode->edittree, sock, tsock)==NULL) {
+ if ( link->tosock!= tsock && (!tnode || (tnode!=node && link->tonode!=tnode)) ) {
link->tonode= tnode;
link->tosock= tsock;
if (link->prev==NULL && link->next==NULL) {
@@ -2340,7 +2335,7 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
}
/* hilight target socket */
- tsock->flag |= SELECT;
+ node_socket_select(tnode, tsock);
}
else {
if (link->tonode || link->tosock) {
@@ -2358,10 +2353,10 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
/* only target socket becomes hilighted */
node_deselect_all_output_sockets(snode, 0);
- if(node_find_indicated_socket(snode, &tnode, &tsock, SOCK_OUT)) {
- if(nodeFindLink(snode->edittree, sock, tsock)==NULL) {
- if(nodeCountSocketLinks(snode->edittree, tsock) < tsock->limit) {
- if( link->fromsock!= tsock && (!tnode || (tnode!=node && link->fromnode!=tnode)) ) {
+ if (node_find_indicated_socket(snode, &tnode, &tsock, SOCK_OUT)) {
+ if (nodeFindLink(snode->edittree, sock, tsock)==NULL) {
+ if (nodeCountSocketLinks(snode->edittree, tsock) < tsock->limit) {
+ if ( link->fromsock!= tsock && (!tnode || (tnode!=node && link->fromnode!=tnode)) ) {
link->fromnode= tnode;
link->fromsock= tsock;
if (link->prev==NULL && link->next==NULL) {
@@ -2375,7 +2370,7 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
}
/* hilight target socket */
- tsock->flag |= SELECT;
+ node_socket_select(tnode, tsock);
}
else {
if (link->tonode || link->tosock) {
@@ -2395,12 +2390,12 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
case LEFTMOUSE:
case RIGHTMOUSE:
case MIDDLEMOUSE:
- if(link->tosock && link->fromsock) {
+ if (link->tosock && link->fromsock) {
/* send changed events for original tonode and new */
snode_update(snode, link->tonode);
/* we might need to remove a link */
- if(in_out==SOCK_OUT)
+ if (in_out==SOCK_OUT)
node_remove_extra_links(snode, link->tosock, link);
/* deselect sockets after successful linking */
@@ -2459,16 +2454,16 @@ static int node_link_init(SpaceNode *snode, bNodeLinkDrag *nldrag)
int in_out = 0;
/* output indicated? */
- if(node_find_indicated_socket(snode, &nldrag->node, &nldrag->sock, SOCK_OUT)) {
- if(nodeCountSocketLinks(snode->edittree, nldrag->sock) < nldrag->sock->limit)
+ if (node_find_indicated_socket(snode, &nldrag->node, &nldrag->sock, SOCK_OUT)) {
+ if (nodeCountSocketLinks(snode->edittree, nldrag->sock) < nldrag->sock->limit)
in_out = SOCK_OUT;
else {
/* find if we break a link */
- for(link= snode->edittree->links.first; link; link= link->next) {
- if(link->fromsock==nldrag->sock)
+ for (link= snode->edittree->links.first; link; link= link->next) {
+ if (link->fromsock==nldrag->sock)
break;
}
- if(link) {
+ if (link) {
nldrag->node= link->tonode;
nldrag->sock= link->tosock;
nodeRemLink(snode->edittree, link);
@@ -2478,21 +2473,21 @@ static int node_link_init(SpaceNode *snode, bNodeLinkDrag *nldrag)
/* hilight source socket only */
node_deselect_all_output_sockets(snode, 0);
- nldrag->sock->flag |= SELECT;
+ node_socket_select(nldrag->node, nldrag->sock);
}
/* or an input? */
- else if(node_find_indicated_socket(snode, &nldrag->node, &nldrag->sock, SOCK_IN)) {
- if(nodeCountSocketLinks(snode->edittree, nldrag->sock) < nldrag->sock->limit)
+ else if (node_find_indicated_socket(snode, &nldrag->node, &nldrag->sock, SOCK_IN)) {
+ if (nodeCountSocketLinks(snode->edittree, nldrag->sock) < nldrag->sock->limit)
in_out = SOCK_IN;
else {
/* find if we break a link */
- for(link= snode->edittree->links.first; link; link= link->next) {
- if(link->tosock==nldrag->sock)
+ for (link= snode->edittree->links.first; link; link= link->next) {
+ if (link->tosock==nldrag->sock)
break;
}
- if(link) {
+ if (link) {
/* send changed event to original tonode */
- if(link->tonode)
+ if (link->tonode)
snode_update(snode, link->tonode);
nldrag->node= link->fromnode;
@@ -2504,7 +2499,7 @@ static int node_link_init(SpaceNode *snode, bNodeLinkDrag *nldrag)
/* hilight source socket only */
node_deselect_all_input_sockets(snode, 0);
- nldrag->sock->flag |= SELECT;
+ node_socket_select(nldrag->node, nldrag->sock);
}
return in_out;
@@ -2524,11 +2519,11 @@ static int node_link_invoke(bContext *C, wmOperator *op, wmEvent *event)
nldrag->in_out= node_link_init(snode, nldrag);
- if(nldrag->in_out) {
+ if (nldrag->in_out) {
op->customdata= nldrag;
/* we make a temporal link */
- if(nldrag->in_out==SOCK_OUT) {
+ if (nldrag->in_out==SOCK_OUT) {
nldrag->link= MEM_callocN(sizeof(bNodeLink), "link");
nldrag->link->fromnode= nldrag->node;
nldrag->link->fromsock= nldrag->sock;
@@ -2570,18 +2565,18 @@ static int node_link_cancel(bContext *C, wmOperator *op)
void NODE_OT_link(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Link Nodes";
- ot->idname= "NODE_OT_link";
+ ot->name = "Link Nodes";
+ ot->idname = "NODE_OT_link";
/* api callbacks */
- ot->invoke= node_link_invoke;
- ot->modal= node_link_modal;
-// ot->exec= node_link_exec;
- ot->poll= ED_operator_node_active;
- ot->cancel= node_link_cancel;
+ ot->invoke = node_link_invoke;
+ ot->modal = node_link_modal;
+// ot->exec = node_link_exec;
+ ot->poll = ED_operator_node_active;
+ ot->cancel = node_link_cancel;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
}
/* ********************** Make Link operator ***************** */
@@ -2610,16 +2605,16 @@ static int node_make_link_exec(bContext *C, wmOperator *op)
void NODE_OT_link_make(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Links";
- ot->description= "Makes a link between selected output in input sockets";
- ot->idname= "NODE_OT_link_make";
+ ot->name = "Make Links";
+ ot->description = "Makes a link between selected output in input sockets";
+ ot->idname = "NODE_OT_link_make";
/* callbacks */
- ot->exec= node_make_link_exec;
- ot->poll= ED_operator_node_active; // XXX we need a special poll which checks that there are selected input/output sockets
+ ot->exec = node_make_link_exec;
+ ot->poll = ED_operator_node_active; // XXX we need a special poll which checks that there are selected input/output sockets
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "replace", 0, "Replace", "Replace socket connections with the new links");
}
@@ -2632,11 +2627,11 @@ static int cut_links_intersect(bNodeLink *link, float mcoords[][2], int tot)
float coord_array[LINK_RESOL+1][2];
int i, b;
- if(node_link_bezier_points(NULL, NULL, link, coord_array, LINK_RESOL)) {
+ if (node_link_bezier_points(NULL, NULL, link, coord_array, LINK_RESOL)) {
- for(i=0; i<tot-1; i++)
- for(b=0; b<LINK_RESOL; b++)
- if(isect_line_line_v2(mcoords[i], mcoords[i+1], coord_array[b], coord_array[b+1]) > 0)
+ for (i=0; i<tot-1; i++)
+ for (b=0; b<LINK_RESOL; b++)
+ if (isect_line_line_v2(mcoords[i], mcoords[i+1], coord_array[b], coord_array[b+1]) > 0)
return 1;
}
return 0;
@@ -2656,19 +2651,19 @@ static int cut_links_exec(bContext *C, wmOperator *op)
UI_view2d_region_to_view(&ar->v2d, (short)loc[0], (short)loc[1],
&mcoords[i][0], &mcoords[i][1]);
i++;
- if(i>= 256) break;
+ if (i>= 256) break;
}
RNA_END;
- if(i>1) {
+ if (i>1) {
bNodeLink *link, *next;
ED_preview_kill_jobs(C);
- for(link= snode->edittree->links.first; link; link= next) {
+ for (link= snode->edittree->links.first; link; link= next) {
next= link->next;
- if(cut_links_intersect(link, mcoords, i)) {
+ if (cut_links_intersect(link, mcoords, i)) {
snode_update(snode, link->tonode);
nodeRemLink(snode->edittree, link);
}
@@ -2688,18 +2683,18 @@ void NODE_OT_links_cut(wmOperatorType *ot)
{
PropertyRNA *prop;
- ot->name= "Cut links";
- ot->idname= "NODE_OT_links_cut";
+ ot->name = "Cut links";
+ ot->idname = "NODE_OT_links_cut";
- ot->invoke= WM_gesture_lines_invoke;
- ot->modal= WM_gesture_lines_modal;
- ot->exec= cut_links_exec;
- ot->cancel= WM_gesture_lines_cancel;
+ ot->invoke = WM_gesture_lines_invoke;
+ ot->modal = WM_gesture_lines_modal;
+ ot->exec = cut_links_exec;
+ ot->cancel = WM_gesture_lines_cancel;
- ot->poll= ED_operator_node_active;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath);
@@ -2717,8 +2712,8 @@ static int detach_links_exec(bContext *C, wmOperator *UNUSED(op))
ED_preview_kill_jobs(C);
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->flag & SELECT) {
+ for (node= ntree->nodes.first; node; node= node->next) {
+ if (node->flag & SELECT) {
nodeInternalRelink(ntree, node);
}
}
@@ -2733,14 +2728,14 @@ static int detach_links_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_links_detach(wmOperatorType *ot)
{
- ot->name= "Detach Links";
- ot->idname= "NODE_OT_links_detach";
+ ot->name = "Detach Links";
+ ot->idname = "NODE_OT_links_detach";
- ot->exec= detach_links_exec;
- ot->poll= ED_operator_node_active;
+ ot->exec = detach_links_exec;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ********************* automatic node insert on dragging ******************* */
@@ -2757,8 +2752,8 @@ static bNodeSocket *socket_best_match(ListBase *sockets)
/* try all types, starting from 'highest' (i.e. colors, vectors, values) */
for (type=maxtype; type >= 0; --type) {
- for(sock= sockets->first; sock; sock= sock->next) {
- if(!nodeSocketIsHidden(sock) && type==sock->type) {
+ for (sock= sockets->first; sock; sock= sock->next) {
+ if (!nodeSocketIsHidden(sock) && type==sock->type) {
return sock;
}
}
@@ -2766,8 +2761,8 @@ static bNodeSocket *socket_best_match(ListBase *sockets)
/* no visible sockets, unhide first of highest type */
for (type=maxtype; type >= 0; --type) {
- for(sock= sockets->first; sock; sock= sock->next) {
- if(type==sock->type) {
+ for (sock= sockets->first; sock; sock= sock->next) {
+ if (type==sock->type) {
sock->flag &= ~(SOCK_HIDDEN|SOCK_AUTO_HIDDEN);
return sock;
}
@@ -2785,27 +2780,27 @@ static SpaceNode *ed_node_link_conditions(ScrArea *sa, bNode **select)
bNodeLink *link;
/* no unlucky accidents */
- if(sa==NULL || sa->spacetype!=SPACE_NODE) return NULL;
+ if (sa==NULL || sa->spacetype!=SPACE_NODE) return NULL;
*select= NULL;
- for(node= snode->edittree->nodes.first; node; node= node->next) {
- if(node->flag & SELECT) {
- if(*select)
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
+ if (node->flag & SELECT) {
+ if (*select)
break;
else
*select= node;
}
}
/* only one selected */
- if(node || *select==NULL) return NULL;
+ if (node || *select==NULL) return NULL;
/* correct node */
- if((*select)->inputs.first==NULL || (*select)->outputs.first==NULL) return NULL;
+ if ((*select)->inputs.first==NULL || (*select)->outputs.first==NULL) return NULL;
/* test node for links */
- for(link= snode->edittree->links.first; link; link=link->next) {
- if(link->tonode == *select || link->fromnode == *select)
+ for (link= snode->edittree->links.first; link; link=link->next) {
+ if (link->tonode == *select || link->fromnode == *select)
return NULL;
}
@@ -2820,14 +2815,14 @@ void ED_node_link_insert(ScrArea *sa)
bNodeLink *link;
bNodeSocket *sockto;
- if(snode==NULL) return;
+ if (snode==NULL) return;
/* get the link */
- for(link= snode->edittree->links.first; link; link=link->next)
- if(link->flag & NODE_LINKFLAG_HILITE)
+ for (link= snode->edittree->links.first; link; link=link->next)
+ if (link->flag & NODE_LINKFLAG_HILITE)
break;
- if(link) {
+ if (link) {
node= link->tonode;
sockto= link->tosock;
@@ -2851,13 +2846,13 @@ void ED_node_link_intersect_test(ScrArea *sa, int test)
bNodeLink *link, *selink=NULL;
float mcoords[6][2];
- if(snode==NULL) return;
+ if (snode==NULL) return;
/* clear flags */
- for(link= snode->edittree->links.first; link; link=link->next)
+ for (link= snode->edittree->links.first; link; link=link->next)
link->flag &= ~NODE_LINKFLAG_HILITE;
- if(test==0) return;
+ if (test==0) return;
/* okay, there's 1 node, without links, now intersect */
mcoords[0][0]= select->totr.xmin;
@@ -2875,16 +2870,16 @@ void ED_node_link_intersect_test(ScrArea *sa, int test)
/* we only tag a single link for intersect now */
/* idea; use header dist when more? */
- for(link= snode->edittree->links.first; link; link=link->next) {
+ for (link= snode->edittree->links.first; link; link=link->next) {
- if(cut_links_intersect(link, mcoords, 5)) { /* intersect code wants edges */
- if(selink)
+ if (cut_links_intersect(link, mcoords, 5)) { /* intersect code wants edges */
+ if (selink)
break;
selink= link;
}
}
- if(link==NULL && selink)
+ if (link==NULL && selink)
selink->flag |= NODE_LINKFLAG_HILITE;
}
@@ -2904,13 +2899,13 @@ static int node_read_renderlayers_exec(bContext *C, wmOperator *UNUSED(op))
ED_preview_kill_jobs(C);
/* first tag scenes unread */
- for(scene= bmain->scene.first; scene; scene= scene->id.next)
+ for (scene= bmain->scene.first; scene; scene= scene->id.next)
scene->id.flag |= LIB_DOIT;
- for(node= snode->edittree->nodes.first; node; node= node->next) {
- if(node->type==CMP_NODE_R_LAYERS) {
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
+ if (node->type==CMP_NODE_R_LAYERS) {
ID *id= node->id;
- if(id->flag & LIB_DOIT) {
+ if (id->flag & LIB_DOIT) {
RE_ReadRenderResult(curscene, (Scene *)id);
ntreeCompositTagRender((Scene *)id);
id->flag &= ~LIB_DOIT;
@@ -2927,15 +2922,15 @@ static int node_read_renderlayers_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_read_renderlayers(wmOperatorType *ot)
{
- ot->name= "Read Render Layers";
- ot->idname= "NODE_OT_read_renderlayers";
+ ot->name = "Read Render Layers";
+ ot->idname = "NODE_OT_read_renderlayers";
- ot->exec= node_read_renderlayers_exec;
+ ot->exec = node_read_renderlayers_exec;
- ot->poll= composite_node_active;
+ ot->poll = composite_node_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
static int node_read_fullsamplelayers_exec(bContext *C, wmOperator *UNUSED(op))
@@ -2960,15 +2955,15 @@ static int node_read_fullsamplelayers_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_read_fullsamplelayers(wmOperatorType *ot)
{
- ot->name= "Read Full Sample Layers";
- ot->idname= "NODE_OT_read_fullsamplelayers";
+ ot->name = "Read Full Sample Layers";
+ ot->idname = "NODE_OT_read_fullsamplelayers";
- ot->exec= node_read_fullsamplelayers_exec;
+ ot->exec = node_read_fullsamplelayers_exec;
- ot->poll= composite_node_active;
+ ot->poll = composite_node_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
int node_render_changed_exec(bContext *C, wmOperator *UNUSED(op))
@@ -2976,15 +2971,15 @@ int node_render_changed_exec(bContext *C, wmOperator *UNUSED(op))
Scene *sce= CTX_data_scene(C);
bNode *node;
- for(node= sce->nodetree->nodes.first; node; node= node->next) {
- if(node->id==(ID *)sce && node->need_exec) {
+ for (node= sce->nodetree->nodes.first; node; node= node->next) {
+ if (node->id==(ID *)sce && node->need_exec) {
break;
}
}
- if(node) {
+ if (node) {
SceneRenderLayer *srl= BLI_findlink(&sce->r.layers, node->custom1);
- if(srl) {
+ if (srl) {
PointerRNA op_ptr;
WM_operator_properties_create(&op_ptr, "RENDER_OT_render");
@@ -3008,15 +3003,15 @@ int node_render_changed_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_render_changed(wmOperatorType *ot)
{
- ot->name= "Render Changed Layer";
- ot->idname= "NODE_OT_render_changed";
+ ot->name = "Render Changed Layer";
+ ot->idname = "NODE_OT_render_changed";
- ot->exec= node_render_changed_exec;
+ ot->exec = node_render_changed_exec;
- ot->poll= composite_node_active;
+ ot->poll = composite_node_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
@@ -3027,20 +3022,20 @@ static int node_group_make_exec(bContext *C, wmOperator *op)
SpaceNode *snode = CTX_wm_space_node(C);
bNode *gnode;
- if(snode->edittree!=snode->nodetree) {
+ if (snode->edittree!=snode->nodetree) {
BKE_report(op->reports, RPT_WARNING, "Can not add a new Group in a Group");
return OPERATOR_CANCELLED;
}
/* for time being... is too complex to handle */
- if(snode->treetype==NTREE_COMPOSIT) {
- for(gnode=snode->nodetree->nodes.first; gnode; gnode= gnode->next) {
- if(gnode->flag & SELECT)
- if(gnode->type==CMP_NODE_R_LAYERS)
+ if (snode->treetype==NTREE_COMPOSIT) {
+ for (gnode=snode->nodetree->nodes.first; gnode; gnode= gnode->next) {
+ if (gnode->flag & SELECT)
+ if (gnode->type==CMP_NODE_R_LAYERS)
break;
}
- if(gnode) {
+ if (gnode) {
BKE_report(op->reports, RPT_WARNING, "Can not add RenderLayer in a Group");
return OPERATOR_CANCELLED;
}
@@ -3049,7 +3044,7 @@ static int node_group_make_exec(bContext *C, wmOperator *op)
ED_preview_kill_jobs(C);
gnode= node_group_make_from_selected(snode->nodetree);
- if(gnode==NULL) {
+ if (gnode==NULL) {
BKE_report(op->reports, RPT_WARNING, "Can not make Group");
return OPERATOR_CANCELLED;
}
@@ -3090,29 +3085,29 @@ static void node_flag_toggle_exec(SpaceNode *snode, int toggle_flag)
* If the flag is set on all nodes it is unset.
* If the flag is not set on all nodes, it is set.
*/
- for(node= snode->edittree->nodes.first; node; node= node->next) {
- if(node->flag & SELECT) {
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
+ if (node->flag & SELECT) {
- if(toggle_flag== NODE_PREVIEW && (node->typeinfo->flag & NODE_PREVIEW)==0)
+ if (toggle_flag== NODE_PREVIEW && (node->typeinfo->flag & NODE_PREVIEW)==0)
continue;
- if(toggle_flag== NODE_OPTIONS && (node->typeinfo->flag & NODE_OPTIONS)==0)
+ if (toggle_flag== NODE_OPTIONS && (node->typeinfo->flag & NODE_OPTIONS)==0)
continue;
- if(node->flag & toggle_flag)
+ if (node->flag & toggle_flag)
tot_eq++;
else
tot_neq++;
}
}
- for(node= snode->edittree->nodes.first; node; node= node->next) {
- if(node->flag & SELECT) {
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
+ if (node->flag & SELECT) {
- if(toggle_flag== NODE_PREVIEW && (node->typeinfo->flag & NODE_PREVIEW)==0)
+ if (toggle_flag== NODE_PREVIEW && (node->typeinfo->flag & NODE_PREVIEW)==0)
continue;
- if(toggle_flag== NODE_OPTIONS && (node->typeinfo->flag & NODE_OPTIONS)==0)
+ if (toggle_flag== NODE_OPTIONS && (node->typeinfo->flag & NODE_OPTIONS)==0)
continue;
- if( (tot_eq && tot_neq) || tot_eq==0) {
+ if ( (tot_eq && tot_neq) || tot_eq==0) {
node->flag |= toggle_flag;
/* hide/unhide node also toggles unlinked socket display */
@@ -3135,7 +3130,7 @@ static int node_hide_toggle_exec(bContext *C, wmOperator *UNUSED(op))
SpaceNode *snode= CTX_wm_space_node(C);
/* sanity checking (poll callback checks this already) */
- if((snode == NULL) || (snode->edittree == NULL))
+ if ((snode == NULL) || (snode->edittree == NULL))
return OPERATOR_CANCELLED;
node_flag_toggle_exec(snode, NODE_HIDDEN);
@@ -3148,16 +3143,16 @@ static int node_hide_toggle_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_hide_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Hide";
- ot->description= "Toggle hiding of selected nodes";
- ot->idname= "NODE_OT_hide_toggle";
+ ot->name = "Hide";
+ ot->description = "Toggle hiding of selected nodes";
+ ot->idname = "NODE_OT_hide_toggle";
/* callbacks */
- ot->exec= node_hide_toggle_exec;
- ot->poll= ED_operator_node_active;
+ ot->exec = node_hide_toggle_exec;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int node_preview_toggle_exec(bContext *C, wmOperator *UNUSED(op))
@@ -3165,7 +3160,7 @@ static int node_preview_toggle_exec(bContext *C, wmOperator *UNUSED(op))
SpaceNode *snode= CTX_wm_space_node(C);
/* sanity checking (poll callback checks this already) */
- if((snode == NULL) || (snode->edittree == NULL))
+ if ((snode == NULL) || (snode->edittree == NULL))
return OPERATOR_CANCELLED;
ED_preview_kill_jobs(C);
@@ -3180,16 +3175,16 @@ static int node_preview_toggle_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_preview_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Node Preview";
- ot->description= "Toggle preview display for selected nodes";
- ot->idname= "NODE_OT_preview_toggle";
+ ot->name = "Toggle Node Preview";
+ ot->description = "Toggle preview display for selected nodes";
+ ot->idname = "NODE_OT_preview_toggle";
/* callbacks */
- ot->exec= node_preview_toggle_exec;
- ot->poll= ED_operator_node_active;
+ ot->exec = node_preview_toggle_exec;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int node_options_toggle_exec(bContext *C, wmOperator *UNUSED(op))
@@ -3197,7 +3192,7 @@ static int node_options_toggle_exec(bContext *C, wmOperator *UNUSED(op))
SpaceNode *snode= CTX_wm_space_node(C);
/* sanity checking (poll callback checks this already) */
- if((snode == NULL) || (snode->edittree == NULL))
+ if ((snode == NULL) || (snode->edittree == NULL))
return OPERATOR_CANCELLED;
node_flag_toggle_exec(snode, NODE_OPTIONS);
@@ -3210,16 +3205,16 @@ static int node_options_toggle_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_options_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Node Options";
- ot->description= "Toggle option buttons display for selected nodes";
- ot->idname= "NODE_OT_options_toggle";
+ ot->name = "Toggle Node Options";
+ ot->description = "Toggle option buttons display for selected nodes";
+ ot->idname = "NODE_OT_options_toggle";
/* callbacks */
- ot->exec= node_options_toggle_exec;
- ot->poll= ED_operator_node_active;
+ ot->exec = node_options_toggle_exec;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int node_socket_toggle_exec(bContext *C, wmOperator *UNUSED(op))
@@ -3229,24 +3224,24 @@ static int node_socket_toggle_exec(bContext *C, wmOperator *UNUSED(op))
int hidden;
/* sanity checking (poll callback checks this already) */
- if((snode == NULL) || (snode->edittree == NULL))
+ if ((snode == NULL) || (snode->edittree == NULL))
return OPERATOR_CANCELLED;
ED_preview_kill_jobs(C);
/* Toggle for all selected nodes */
hidden = 0;
- for(node= snode->edittree->nodes.first; node; node= node->next) {
- if(node->flag & SELECT) {
- if(node_has_hidden_sockets(node, SOCK_HIDDEN)) {
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
+ if (node->flag & SELECT) {
+ if (node_has_hidden_sockets(node, SOCK_HIDDEN)) {
hidden= 1;
break;
}
}
}
- for(node= snode->edittree->nodes.first; node; node= node->next) {
- if(node->flag & SELECT) {
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
+ if (node->flag & SELECT) {
node_set_hidden_sockets(snode, node, SOCK_HIDDEN, !hidden);
}
}
@@ -3261,16 +3256,16 @@ static int node_socket_toggle_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_hide_socket_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Hidden Node Sockets";
- ot->description= "Toggle unused node socket display";
- ot->idname= "NODE_OT_hide_socket_toggle";
+ ot->name = "Toggle Hidden Node Sockets";
+ ot->description = "Toggle unused node socket display";
+ ot->idname = "NODE_OT_hide_socket_toggle";
/* callbacks */
- ot->exec= node_socket_toggle_exec;
- ot->poll= ED_operator_node_active;
+ ot->exec = node_socket_toggle_exec;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ****************** Mute operator *********************** */
@@ -3282,7 +3277,7 @@ static int node_mute_exec(bContext *C, wmOperator *UNUSED(op))
ED_preview_kill_jobs(C);
- for(node= snode->edittree->nodes.first; node; node= node->next) {
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
/* Only allow muting of nodes having a mute func! */
if ((node->flag & SELECT) && node->typeinfo->internal_connect) {
node->flag ^= NODE_MUTED;
@@ -3299,16 +3294,16 @@ static int node_mute_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_mute_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Node Mute";
- ot->description= "Toggle muting of the nodes";
- ot->idname= "NODE_OT_mute_toggle";
+ ot->name = "Toggle Node Mute";
+ ot->description = "Toggle muting of the nodes";
+ ot->idname = "NODE_OT_mute_toggle";
/* callbacks */
- ot->exec= node_mute_exec;
- ot->poll= ED_operator_node_active;
+ ot->exec = node_mute_exec;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ****************** Delete operator ******************* */
@@ -3320,11 +3315,11 @@ static int node_delete_exec(bContext *C, wmOperator *UNUSED(op))
ED_preview_kill_jobs(C);
- for(node= snode->edittree->nodes.first; node; node= next) {
+ for (node= snode->edittree->nodes.first; node; node= next) {
next= node->next;
- if(node->flag & SELECT) {
+ if (node->flag & SELECT) {
/* check id user here, nodeFreeNode is called for free dbase too */
- if(node->id)
+ if (node->id)
node->id->us--;
nodeFreeNode(snode->edittree, node);
}
@@ -3341,16 +3336,16 @@ static int node_delete_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete";
+ ot->name = "Delete";
ot->description = "Delete selected nodes";
- ot->idname= "NODE_OT_delete";
+ ot->idname = "NODE_OT_delete";
/* api callbacks */
- ot->exec= node_delete_exec;
- ot->poll= ED_operator_node_active;
+ ot->exec = node_delete_exec;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ****************** Delete with reconnect ******************* */
@@ -3361,13 +3356,13 @@ static int node_delete_reconnect_exec(bContext *C, wmOperator *UNUSED(op))
ED_preview_kill_jobs(C);
- for(node= snode->edittree->nodes.first; node; node= next) {
+ for (node= snode->edittree->nodes.first; node; node= next) {
next= node->next;
- if(node->flag & SELECT) {
+ if (node->flag & SELECT) {
nodeInternalRelink(snode->edittree, node);
/* check id user here, nodeFreeNode is called for free dbase too */
- if(node->id)
+ if (node->id)
node->id->us--;
nodeFreeNode(snode->edittree, node);
}
@@ -3384,16 +3379,16 @@ static int node_delete_reconnect_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_delete_reconnect(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete with reconnect";
+ ot->name = "Delete with reconnect";
ot->description = "Delete nodes; will reconnect nodes as if deletion was muted";
- ot->idname= "NODE_OT_delete_reconnect";
+ ot->idname = "NODE_OT_delete_reconnect";
/* api callbacks */
- ot->exec= node_delete_reconnect_exec;
- ot->poll= ED_operator_node_active;
+ ot->exec = node_delete_reconnect_exec;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ****************** Show Cyclic Dependencies Operator ******************* */
@@ -3412,16 +3407,16 @@ static int node_show_cycles_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_show_cyclic_dependencies(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Show Cyclic Dependencies";
- ot->description= "Sort the nodes and show the cyclic dependencies between the nodes";
- ot->idname= "NODE_OT_show_cyclic_dependencies";
+ ot->name = "Show Cyclic Dependencies";
+ ot->description = "Sort the nodes and show the cyclic dependencies between the nodes";
+ ot->idname = "NODE_OT_show_cyclic_dependencies";
/* callbacks */
- ot->exec= node_show_cycles_exec;
- ot->poll= ED_operator_node_active;
+ ot->exec = node_show_cycles_exec;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ****************** Add File Node Operator ******************* */
@@ -3435,8 +3430,6 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
Image *ima= NULL;
bNodeTemplate ntemp;
- ntemp.type = -1;
-
/* check input variables */
if (RNA_struct_property_is_set(op->ptr, "filepath")) {
char path[FILE_MAX];
@@ -3446,17 +3439,17 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
ima= BKE_add_image_file(path);
- if(!ima) {
+ if (!ima) {
BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s", path, errno ? strerror(errno) : "Unsupported image format");
return OPERATOR_CANCELLED;
}
}
- else if(RNA_struct_property_is_set(op->ptr, "name")) {
+ else if (RNA_struct_property_is_set(op->ptr, "name")) {
char name[MAX_ID_NAME-2];
RNA_string_get(op->ptr, "name", name);
ima= (Image *)find_id("IM", name);
- if(!ima) {
+ if (!ima) {
BKE_reportf(op->reports, RPT_ERROR, "Image named \"%s\", not found", name);
return OPERATOR_CANCELLED;
}
@@ -3464,12 +3457,20 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
node_deselect_all(snode);
- if (snode->nodetree->type==NTREE_COMPOSIT)
- ntemp.type = CMP_NODE_IMAGE;
-
- if (ntemp.type < 0)
- return OPERATOR_CANCELLED;
-
+ switch (snode->nodetree->type) {
+ case NTREE_SHADER:
+ ntemp.type = SH_NODE_TEX_IMAGE;
+ break;
+ case NTREE_TEXTURE:
+ ntemp.type = TEX_NODE_IMAGE;
+ break;
+ case NTREE_COMPOSIT:
+ ntemp.type = CMP_NODE_IMAGE;
+ break;
+ default:
+ return OPERATOR_CANCELLED;
+ }
+
ED_preview_kill_jobs(C);
node = node_add_node(snode, bmain, scene, &ntemp, snode->mx, snode->my);
@@ -3505,17 +3506,17 @@ static int node_add_file_invoke(bContext *C, wmOperator *op, wmEvent *event)
void NODE_OT_add_file(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add File Node";
- ot->description= "Add a file node to the current node editor";
- ot->idname= "NODE_OT_add_file";
+ ot->name = "Add File Node";
+ ot->description = "Add a file node to the current node editor";
+ ot->idname = "NODE_OT_add_file";
/* callbacks */
- ot->exec= node_add_file_exec;
- ot->invoke= node_add_file_invoke;
- ot->poll= composite_node_active;
+ ot->exec = node_add_file_exec;
+ ot->invoke = node_add_file_invoke;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); //XXX TODO, relative_path
RNA_def_string(ot->srna, "name", "Image", MAX_ID_NAME-2, "Name", "Datablock name to assign");
@@ -3544,13 +3545,13 @@ static int new_node_tree_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "name", treename);
ntree = ntreeAddTree(treename, treetype, 0);
- if(!ntree)
+ if (!ntree)
return OPERATOR_CANCELLED;
/* hook into UI */
uiIDContextProperty(C, &ptr, &prop);
- if(prop) {
+ if (prop) {
RNA_id_pointer_create(&ntree->id, &idptr);
RNA_property_pointer_set(&ptr, prop, idptr);
/* RNA_property_pointer_set increases the user count,
@@ -3559,7 +3560,7 @@ static int new_node_tree_exec(bContext *C, wmOperator *op)
--ntree->id.us;
RNA_property_update(C, &ptr, prop);
}
- else if(snode) {
+ else if (snode) {
Scene *scene= CTX_data_scene(C);
snode->nodetree = ntree;
@@ -3572,15 +3573,15 @@ static int new_node_tree_exec(bContext *C, wmOperator *op)
void NODE_OT_new_node_tree(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "New node tree";
- ot->idname= "NODE_OT_new_node_tree";
+ ot->name = "New node tree";
+ ot->idname = "NODE_OT_new_node_tree";
/* api callbacks */
- ot->exec= new_node_tree_exec;
- ot->poll= ED_operator_node_active;
+ ot->exec = new_node_tree_exec;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", nodetree_type_items, NTREE_COMPOSIT, "Tree Type", "");
RNA_def_string(ot->srna, "name", "NodeTree", MAX_ID_NAME-2, "Name", "");
@@ -3610,16 +3611,16 @@ static int node_output_file_add_socket_exec(bContext *C, wmOperator *op)
void NODE_OT_output_file_add_socket(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add File Node Socket";
- ot->description= "Add a new input to a file output node";
- ot->idname= "NODE_OT_output_file_add_socket";
+ ot->name = "Add File Node Socket";
+ ot->description = "Add a new input to a file output node";
+ ot->idname = "NODE_OT_output_file_add_socket";
/* callbacks */
- ot->exec= node_output_file_add_socket_exec;
- ot->poll= composite_node_active;
+ ot->exec = node_output_file_add_socket_exec;
+ ot->poll = composite_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_string(ot->srna, "file_path", "Image", MAX_NAME, "File Path", "Sub-path of the output file");
}
@@ -3646,14 +3647,14 @@ static int node_output_file_remove_active_socket_exec(bContext *C, wmOperator *U
void NODE_OT_output_file_remove_active_socket(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove File Node Socket";
- ot->description= "Remove active input from a file output node";
- ot->idname= "NODE_OT_output_file_remove_active_socket";
+ ot->name = "Remove File Node Socket";
+ ot->description = "Remove active input from a file output node";
+ ot->idname = "NODE_OT_output_file_remove_active_socket";
/* callbacks */
- ot->exec= node_output_file_remove_active_socket_exec;
- ot->poll= composite_node_active;
+ ot->exec = node_output_file_remove_active_socket_exec;
+ ot->poll = composite_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c
index df83afc143e..7ddc4bdf857 100644
--- a/source/blender/editors/space_node/node_header.c
+++ b/source/blender/editors/space_node/node_header.c
@@ -75,33 +75,33 @@ static void do_node_add(bContext *C, bNodeTemplate *ntemp)
bNode *node;
/* get location to add node at mouse */
- for(ar=sa->regionbase.first; ar; ar=ar->next) {
- if(ar->regiontype == RGN_TYPE_WINDOW) {
+ for (ar=sa->regionbase.first; ar; ar=ar->next) {
+ if (ar->regiontype == RGN_TYPE_WINDOW) {
wmWindow *win= CTX_wm_window(C);
int x= win->eventstate->x - ar->winrct.xmin;
int y= win->eventstate->y - ar->winrct.ymin;
- if(y < 60) y+= 60;
+ if (y < 60) y+= 60;
UI_view2d_region_to_view(&ar->v2d, x, y, &snode->mx, &snode->my);
}
}
/* store selection in temp test flag */
- for(node= snode->edittree->nodes.first; node; node= node->next) {
- if(node->flag & NODE_SELECT) node->flag |= NODE_TEST;
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
+ if (node->flag & NODE_SELECT) node->flag |= NODE_TEST;
else node->flag &= ~NODE_TEST;
}
/* node= */ node_add_node(snode, bmain, scene, ntemp, snode->mx, snode->my);
/* select previous selection before autoconnect */
- for(node= snode->edittree->nodes.first; node; node= node->next) {
- if(node->flag & NODE_TEST) node->flag |= NODE_SELECT;
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
+ if (node->flag & NODE_TEST) node->flag |= NODE_SELECT;
}
/* deselect after autoconnection */
- for(node= snode->edittree->nodes.first; node; node= node->next) {
- if(node->flag & NODE_TEST) node->flag &= ~NODE_SELECT;
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
+ if (node->flag & NODE_TEST) node->flag &= ~NODE_SELECT;
}
snode_notify(C, snode);
@@ -195,13 +195,13 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
ntree = snode->nodetree;
- if(!ntree) {
+ if (!ntree) {
uiItemS(layout);
return;
}
- if(ntree->type == NTREE_SHADER) {
- if(scene_use_new_shading_nodes(scene))
+ if (ntree->type == NTREE_SHADER) {
+ if (scene_use_new_shading_nodes(scene))
compatibility= NODE_NEW_SHADING;
else
compatibility= NODE_OLD_SHADING;
@@ -214,14 +214,14 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
/* XXX hack: negative numbers used for empty group types */
if (node_tree_has_type(ntree->type, NODE_GROUP))
- uiItemV(layout, "New Group", 0, -NODE_GROUP);
+ uiItemV(layout, IFACE_("New Group"), 0, -NODE_GROUP);
if (node_tree_has_type(ntree->type, NODE_FORLOOP))
- uiItemV(layout, "New For Loop", 0, -NODE_FORLOOP);
+ uiItemV(layout, IFACE_("New For Loop"), 0, -NODE_FORLOOP);
if (node_tree_has_type(ntree->type, NODE_WHILELOOP))
- uiItemV(layout, "New While Loop", 0, -NODE_WHILELOOP);
+ uiItemV(layout, IFACE_("New While Loop"), 0, -NODE_WHILELOOP);
uiItemS(layout);
- for(ngroup=bmain->nodetree.first, event=0; ngroup; ngroup= ngroup->id.next, ++event) {
+ for (ngroup=bmain->nodetree.first, event=0; ngroup; ngroup= ngroup->id.next, ++event) {
/* only use group trees */
if (ngroup->type==ntree->type && ELEM3(ngroup->nodetype, NODE_GROUP, NODE_FORLOOP, NODE_WHILELOOP)) {
uiItemV(layout, ngroup->id.name+2, 0, event);
@@ -239,7 +239,7 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
for (ntype=ntreeGetType(ntree->type)->node_types.first; ntype; ntype=ntype->next) {
if (ntype->nclass==nodeclass && ntype->name)
if (!compatibility || (ntype->compatibility & compatibility))
- uiItemV(layout, ntype->name, 0, ntype->type);
+ uiItemV(layout, IFACE_(ntype->name), 0, ntype->type);
}
}
}
@@ -247,7 +247,7 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
static void node_menu_add_foreach_cb(void *calldata, int nclass, const char *name)
{
uiLayout *layout= calldata;
- uiItemMenuF(layout, name, 0, node_add_menu, SET_INT_IN_POINTER(nclass));
+ uiItemMenuF(layout, IFACE_(name), 0, node_add_menu, SET_INT_IN_POINTER(nclass));
}
static void node_menu_add(const bContext *C, Menu *menu)
@@ -257,10 +257,10 @@ static void node_menu_add(const bContext *C, Menu *menu)
uiLayout *layout= menu->layout;
bNodeTreeType *ntreetype= ntreeGetType(snode->treetype);
- if(!snode->nodetree)
+ if (!snode->nodetree)
uiLayoutSetActive(layout, 0);
- if(ntreetype && ntreetype->foreach_nodeclass)
+ if (ntreetype && ntreetype->foreach_nodeclass)
ntreetype->foreach_nodeclass(scene, layout, node_menu_add_foreach_cb);
}
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index c2a418af064..ea8fdd8059b 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -81,7 +81,11 @@ void node_operatortypes(void);
void node_keymap(wmKeyConfig *keyconf);
/* node_select.c */
+void node_select(struct bNode *node);
+void node_deselect(struct bNode *node);
void node_deselect_all(struct SpaceNode *snode);
+void node_socket_select(struct bNode *node, struct bNodeSocket *sock);
+void node_socket_deselect(struct bNode *node, struct bNodeSocket *sock, int deselect_node);
void node_deselect_all_input_sockets(struct SpaceNode *snode, int deselect_nodes);
void node_deselect_all_output_sockets(struct SpaceNode *snode, int deselect_nodes);
int node_select_same_type(struct SpaceNode *snode);
diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c
index 93263a2e54b..e1493b5b1a5 100644
--- a/source/blender/editors/space_node/node_ops.c
+++ b/source/blender/editors/space_node/node_ops.c
@@ -110,24 +110,24 @@ void ED_operatormacros_node(void)
wmOperatorType *ot;
wmOperatorTypeMacro *mot;
- ot= WM_operatortype_append_macro("NODE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("NODE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Duplicate selected nodes and move them";
WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
/* modified operator call for duplicating with input links */
- ot= WM_operatortype_append_macro("NODE_OT_duplicate_move_keep_inputs", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("NODE_OT_duplicate_move_keep_inputs", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Duplicate selected nodes keeping input links and move them";
mot = WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
RNA_boolean_set(mot->ptr, "keep_inputs", TRUE);
WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
- ot= WM_operatortype_append_macro("NODE_OT_select_link_viewer", "Link Viewer", OPTYPE_UNDO);
+ ot = WM_operatortype_append_macro("NODE_OT_select_link_viewer", "Link Viewer", OPTYPE_UNDO);
ot->description = "Select node and link it to a viewer node";
WM_operatortype_macro_define(ot, "NODE_OT_select");
WM_operatortype_macro_define(ot, "NODE_OT_link_viewer");
- ot= WM_operatortype_append_macro("NODE_OT_move_detach_links", "Detach", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("NODE_OT_move_detach_links", "Detach", OPTYPE_UNDO|OPTYPE_REGISTER);
ot->description = "Move a node to detach links";
WM_operatortype_macro_define(ot, "NODE_OT_links_detach");
mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
@@ -140,12 +140,12 @@ void node_keymap(struct wmKeyConfig *keyconf)
wmKeyMapItem *kmi;
/* Entire Editor only ----------------- */
- keymap= WM_keymap_find(keyconf, "Node Generic", SPACE_NODE, 0);
+ keymap = WM_keymap_find(keyconf, "Node Generic", SPACE_NODE, 0);
WM_keymap_add_item(keymap, "NODE_OT_properties", NKEY, KM_PRESS, 0, 0);
/* Main Area only ----------------- */
- keymap= WM_keymap_find(keyconf, "Node Editor", SPACE_NODE, 0);
+ keymap = WM_keymap_find(keyconf, "Node Editor", SPACE_NODE, 0);
/* mouse select in nodes used to be both keys, but perhaps this should be reduced?
* NOTE: mouse-clicks on left-mouse will fall through to allow transform-tweak, but also link/resize
@@ -170,9 +170,9 @@ void node_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "NODE_OT_select_link_viewer", LEFTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
WM_keymap_add_item(keymap, "NODE_OT_backimage_move", MIDDLEMOUSE, KM_PRESS, KM_ALT, 0);
- kmi= WM_keymap_add_item(keymap, "NODE_OT_backimage_zoom", VKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "NODE_OT_backimage_zoom", VKEY, KM_PRESS, 0, 0);
RNA_float_set(kmi->ptr, "factor", 0.83333f);
- kmi= WM_keymap_add_item(keymap, "NODE_OT_backimage_zoom", VKEY, KM_PRESS, KM_ALT, 0);
+ kmi = WM_keymap_add_item(keymap, "NODE_OT_backimage_zoom", VKEY, KM_PRESS, KM_ALT, 0);
RNA_float_set(kmi->ptr, "factor", 1.2f);
WM_keymap_add_item(keymap, "NODE_OT_backimage_sample", ACTIONMOUSE, KM_PRESS, KM_ALT, 0);
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index e2f3e7b51f2..15d7986a5c4 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -62,7 +62,7 @@ static bNode *node_under_mouse(bNodeTree *ntree, int mx, int my)
{
bNode *node;
- for(node=ntree->nodes.last; node; node=node->prev) {
+ for (node=ntree->nodes.last; node; node=node->prev) {
/* node body (header and scale are in other operators) */
if (BLI_in_rctf(&node->totr, mx, my))
return node;
@@ -173,12 +173,12 @@ static void node_sort(bNodeTree *ntree)
}
}
-static void node_select(bNode *node)
+void node_select(bNode *node)
{
node->flag |= SELECT;
}
-static void node_deselect(bNode *node)
+void node_deselect(bNode *node)
{
bNodeSocket *sock;
@@ -199,7 +199,7 @@ static void node_toggle(bNode *node)
node_select(node);
}
-static void node_socket_select(bNode *node, bNodeSocket *sock)
+void node_socket_select(bNode *node, bNodeSocket *sock)
{
sock->flag |= SELECT;
@@ -208,7 +208,7 @@ static void node_socket_select(bNode *node, bNodeSocket *sock)
node->flag |= SELECT;
}
-static void node_socket_deselect(bNode *node, bNodeSocket *sock, int deselect_node)
+void node_socket_deselect(bNode *node, bNodeSocket *sock, int deselect_node)
{
sock->flag &= ~SELECT;
@@ -247,7 +247,7 @@ void node_deselect_all(SpaceNode *snode)
{
bNode *node;
- for(node= snode->edittree->nodes.first; node; node= node->next)
+ for (node= snode->edittree->nodes.first; node; node= node->next)
node_deselect(node);
}
@@ -419,6 +419,7 @@ static int node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, const i
bNode *node, *tnode;
bNodeSocket *sock, *tsock;
float mx, my;
+ int selected = 0;
/* get mouse coordinates in view2d space */
UI_view2d_region_to_view(&ar->v2d, mval[0], mval[1], &mx, &my);
@@ -426,63 +427,61 @@ static int node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, const i
snode->mx = mx;
snode->my = my;
- /* first do socket selection, these generally overlap with nodes */
- if (node_find_indicated_socket(snode, &node, &sock, SOCK_IN)) {
- if (extend) {
+ if (extend) {
+ /* first do socket selection, these generally overlap with nodes.
+ * socket selection only in extend mode.
+ */
+ if (node_find_indicated_socket(snode, &node, &sock, SOCK_IN)) {
node_socket_toggle(node, sock, 1);
+ selected = 1;
}
- else {
- node_deselect_all_input_sockets(snode, 1);
- node_socket_select(node, sock);
- }
-
- return 1;
- }
- else if (node_find_indicated_socket(snode, &node, &sock, SOCK_OUT)) {
- if (extend) {
+ else if (node_find_indicated_socket(snode, &node, &sock, SOCK_OUT)) {
if (sock->flag & SELECT) {
node_socket_deselect(node, sock, 1);
}
else {
- /* still only allow one selected output per node when extending, for sensible linking.
- * extend allows selecting outputs from different nodes though.
- */
+ /* only allow one selected output per node, for sensible linking.
+ * allows selecting outputs from different nodes though.
+ */
if (node) {
for (tsock=node->outputs.first; tsock; tsock=tsock->next)
node_socket_deselect(node, tsock, 1);
}
node_socket_select(node, sock);
}
+ selected = 1;
}
else {
- node_deselect_all_output_sockets(snode, 1);
- node_socket_select(node, sock);
+ /* find the closest visible node */
+ node = node_under_mouse(snode->edittree, mx, my);
+
+ if (node) {
+ node_toggle(node);
+
+ ED_node_set_active(bmain, snode->edittree, node);
+ selected = 1;
+ }
}
-
- return 1;
}
- else {
+ else { /* extend==0 */
+
/* find the closest visible node */
node = node_under_mouse(snode->edittree, mx, my);
if (node) {
- if (extend == 0) {
- for (tnode=snode->edittree->nodes.first; tnode; tnode=tnode->next)
- if (tnode!=node)
- node_deselect(tnode);
- node_select(node);
- }
- else {
- node_toggle(node);
- }
-
+ for (tnode=snode->edittree->nodes.first; tnode; tnode=tnode->next)
+ node_deselect(tnode);
+ node_select(node);
ED_node_set_active(bmain, snode->edittree, node);
- node_sort(snode->edittree);
- return 1;
+ selected = 1;
}
-
- return 0;
}
+
+ /* update node order */
+ if (selected)
+ node_sort(snode->edittree);
+
+ return selected;
}
static int node_select_exec(bContext *C, wmOperator *op)
@@ -525,16 +524,16 @@ static int node_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
void NODE_OT_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select";
- ot->idname= "NODE_OT_select";
- ot->description= "Select the node under the cursor";
+ ot->name = "Select";
+ ot->idname = "NODE_OT_select";
+ ot->description = "Select the node under the cursor";
/* api callbacks */
- ot->invoke= node_select_invoke;
- ot->poll= ED_operator_node_active;
+ ot->invoke = node_select_invoke;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, "Mouse X", "", INT_MIN, INT_MAX);
@@ -554,22 +553,22 @@ static int node_borderselect_exec(bContext *C, wmOperator *op)
int gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
int extend= RNA_boolean_get(op->ptr, "extend");
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
UI_view2d_region_to_view(&ar->v2d, rect.xmin, rect.ymin, &rectf.xmin, &rectf.ymin);
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
UI_view2d_region_to_view(&ar->v2d, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax);
- for(node= snode->edittree->nodes.first; node; node= node->next) {
- if(BLI_isect_rctf(&rectf, &node->totr, NULL)) {
- if(gesture_mode==GESTURE_MODAL_SELECT)
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
+ if (BLI_isect_rctf(&rectf, &node->totr, NULL)) {
+ if (gesture_mode==GESTURE_MODAL_SELECT)
node_select(node);
else
node_deselect(node);
}
- else if(!extend) {
+ else if (!extend) {
node_deselect(node);
}
}
@@ -604,20 +603,20 @@ static int node_border_select_invoke(bContext *C, wmOperator *op, wmEvent *event
void NODE_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Select";
- ot->idname= "NODE_OT_select_border";
- ot->description= "Use box selection to select nodes";
+ ot->name = "Border Select";
+ ot->idname = "NODE_OT_select_border";
+ ot->description = "Use box selection to select nodes";
/* api callbacks */
- ot->invoke= node_border_select_invoke;
- ot->exec= node_borderselect_exec;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = node_border_select_invoke;
+ ot->exec = node_borderselect_exec;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= ED_operator_node_active;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* rna */
WM_operator_properties_gesture_border(ot, TRUE);
@@ -633,16 +632,16 @@ static int node_select_all_exec(bContext *C, wmOperator *UNUSED(op))
bNode *node;
int count= 0;
- for(node=first; node; node=node->next)
- if(node->flag & NODE_SELECT)
+ for (node=first; node; node=node->next)
+ if (node->flag & NODE_SELECT)
count++;
- if(count) {
- for(node=first; node; node=node->next)
+ if (count) {
+ for (node=first; node; node=node->next)
node_deselect(node);
}
else {
- for(node=first; node; node=node->next)
+ for (node=first; node; node=node->next)
node_select(node);
}
@@ -655,7 +654,7 @@ static int node_select_all_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Select or Deselect All";
+ ot->name = "(De)select All";
ot->description = "(De)select all nodes";
ot->idname = "NODE_OT_select_all";
@@ -717,16 +716,16 @@ static int node_select_linked_from_exec(bContext *C, wmOperator *UNUSED(op))
bNodeLink *link;
bNode *node;
- for(node=snode->edittree->nodes.first; node; node=node->next)
+ for (node=snode->edittree->nodes.first; node; node=node->next)
node->flag &= ~NODE_TEST;
- for(link=snode->edittree->links.first; link; link=link->next) {
- if(link->fromnode && link->tonode && (link->tonode->flag & NODE_SELECT))
+ for (link=snode->edittree->links.first; link; link=link->next) {
+ if (link->fromnode && link->tonode && (link->tonode->flag & NODE_SELECT))
link->fromnode->flag |= NODE_TEST;
}
- for(node=snode->edittree->nodes.first; node; node=node->next) {
- if(node->flag & NODE_TEST)
+ for (node=snode->edittree->nodes.first; node; node=node->next) {
+ if (node->flag & NODE_TEST)
node_select(node);
}
diff --git a/source/blender/editors/space_node/node_state.c b/source/blender/editors/space_node/node_state.c
index 58623e17b10..5463d4a8ff0 100644
--- a/source/blender/editors/space_node/node_state.c
+++ b/source/blender/editors/space_node/node_state.c
@@ -67,13 +67,13 @@ static void snode_home(ScrArea *UNUSED(sa), ARegion *ar, SpaceNode* snode)
oldwidth= cur->xmax - cur->xmin;
oldheight= cur->ymax - cur->ymin;
- cur->xmin= cur->ymin= 0.0f;
+ cur->xmin = cur->ymin = 0.0f;
cur->xmax=ar->winx;
cur->ymax=ar->winy;
- if(snode->edittree) {
- for(node= snode->edittree->nodes.first; node; node= node->next) {
- if(first) {
+ if (snode->edittree) {
+ for (node= snode->edittree->nodes.first; node; node= node->next) {
+ if (first) {
first= 0;
ar->v2d.cur= node->totr;
}
@@ -88,17 +88,17 @@ static void snode_home(ScrArea *UNUSED(sa), ARegion *ar, SpaceNode* snode)
width= cur->xmax - cur->xmin;
height= cur->ymax- cur->ymin;
- if(width > height) {
+ if (width > height) {
float newheight;
newheight= oldheight * width/oldwidth;
- cur->ymin= cur->ymin - newheight/4;
- cur->ymax= cur->ymax + newheight/4;
+ cur->ymin = cur->ymin - newheight/4;
+ cur->ymax = cur->ymax + newheight/4;
}
else {
float newwidth;
newwidth= oldwidth * height/oldheight;
- cur->xmin= cur->xmin - newwidth/4;
- cur->xmax= cur->xmax + newwidth/4;
+ cur->xmin = cur->xmin - newwidth/4;
+ cur->xmax = cur->xmax + newwidth/4;
}
ar->v2d.tot= ar->v2d.cur;
@@ -120,14 +120,14 @@ static int node_view_all_exec(bContext *C, wmOperator *UNUSED(op))
void NODE_OT_view_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View All";
- ot->idname= "NODE_OT_view_all";
- ot->description= "Resize view so you can see all nodes";
+ ot->name = "View All";
+ ot->idname = "NODE_OT_view_all";
+ ot->description = "Resize view so you can see all nodes";
/* api callbacks */
- ot->exec= node_view_all_exec;
- ot->poll= ED_operator_node_active;
+ ot->exec = node_view_all_exec;
+ ot->poll = ED_operator_node_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index 781f37918fd..3d841b05632 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -59,6 +59,7 @@
#include "../interface/interface_intern.h"
#include "ED_node.h"
+#include "ED_util.h"
/************************* Node Socket Manipulation **************************/
@@ -66,13 +67,13 @@ static void node_tag_recursive(bNode *node)
{
bNodeSocket *input;
- if(!node || (node->flag & NODE_TEST))
+ if (!node || (node->flag & NODE_TEST))
return; /* in case of cycles */
node->flag |= NODE_TEST;
- for(input=node->inputs.first; input; input=input->next)
- if(input->link)
+ for (input=node->inputs.first; input; input=input->next)
+ if (input->link)
node_tag_recursive(input->link->fromnode);
}
@@ -80,13 +81,13 @@ static void node_clear_recursive(bNode *node)
{
bNodeSocket *input;
- if(!node || !(node->flag & NODE_TEST))
+ if (!node || !(node->flag & NODE_TEST))
return; /* in case of cycles */
node->flag &= ~NODE_TEST;
- for(input=node->inputs.first; input; input=input->next)
- if(input->link)
+ for (input=node->inputs.first; input; input=input->next)
+ if (input->link)
node_clear_recursive(input->link->fromnode);
}
@@ -95,28 +96,28 @@ static void node_remove_linked(bNodeTree *ntree, bNode *rem_node)
bNode *node, *next;
bNodeSocket *sock;
- if(!rem_node)
+ if (!rem_node)
return;
/* tag linked nodes to be removed */
- for(node=ntree->nodes.first; node; node=node->next)
+ for (node=ntree->nodes.first; node; node=node->next)
node->flag &= ~NODE_TEST;
node_tag_recursive(rem_node);
/* clear tags on nodes that are still used by other nodes */
- for(node=ntree->nodes.first; node; node=node->next)
- if(!(node->flag & NODE_TEST))
- for(sock=node->inputs.first; sock; sock=sock->next)
- if(sock->link && sock->link->fromnode != rem_node)
+ for (node=ntree->nodes.first; node; node=node->next)
+ if (!(node->flag & NODE_TEST))
+ for (sock=node->inputs.first; sock; sock=sock->next)
+ if (sock->link && sock->link->fromnode != rem_node)
node_clear_recursive(sock->link->fromnode);
/* remove nodes */
- for(node=ntree->nodes.first; node; node=next) {
+ for (node=ntree->nodes.first; node; node=next) {
next = node->next;
- if(node->flag & NODE_TEST) {
- if(node->id)
+ if (node->flag & NODE_TEST) {
+ if (node->id)
node->id->us--;
nodeFreeNode(ntree, node);
}
@@ -126,7 +127,7 @@ static void node_remove_linked(bNodeTree *ntree, bNode *rem_node)
/* disconnect socket from the node it is connected to */
static void node_socket_disconnect(Main *bmain, bNodeTree *ntree, bNode *node_to, bNodeSocket *sock_to)
{
- if(!sock_to->link)
+ if (!sock_to->link)
return;
nodeRemLink(ntree, sock_to->link);
@@ -140,7 +141,7 @@ static void node_socket_disconnect(Main *bmain, bNodeTree *ntree, bNode *node_to
/* remove all nodes connected to this socket, if they aren't connected to other nodes */
static void node_socket_remove(Main *bmain, bNodeTree *ntree, bNode *node_to, bNodeSocket *sock_to)
{
- if(!sock_to->link)
+ if (!sock_to->link)
return;
node_remove_linked(ntree, sock_to->link->fromnode);
@@ -159,31 +160,31 @@ static void node_socket_add_replace(Main *bmain, bNodeTree *ntree, bNode *node_t
bNode *node_prev = NULL;
/* unlink existing node */
- if(sock_to->link) {
+ if (sock_to->link) {
node_prev = sock_to->link->fromnode;
nodeRemLink(ntree, sock_to->link);
}
/* find existing node that we can use */
- for(node_from=ntree->nodes.first; node_from; node_from=node_from->next)
- if(node_from->type == ntemp->type)
+ for (node_from=ntree->nodes.first; node_from; node_from=node_from->next)
+ if (node_from->type == ntemp->type)
break;
- if(node_from)
- if(!(node_from->inputs.first == NULL && !(node_from->typeinfo->flag & NODE_OPTIONS)))
+ if (node_from)
+ if (!(node_from->inputs.first == NULL && !(node_from->typeinfo->flag & NODE_OPTIONS)))
node_from = NULL;
- if(node_prev && node_prev->type == ntemp->type &&
+ if (node_prev && node_prev->type == ntemp->type &&
(ntemp->type != NODE_GROUP || node_prev->id == &ntemp->ngroup->id)) {
/* keep the previous node if it's the same type */
node_from = node_prev;
}
- else if(!node_from) {
+ else if (!node_from) {
node_from= nodeAddNode(ntree, ntemp);
node_from->locx = node_to->locx - (node_from->typeinfo->width + 50);
node_from->locy = node_to->locy;
- if(node_from->id)
+ if (node_from->id)
id_us_plus(node_from->id);
}
@@ -194,15 +195,18 @@ static void node_socket_add_replace(Main *bmain, bNodeTree *ntree, bNode *node_t
nodeAddLink(ntree, node_from, sock_from, node_to, sock_to);
/* copy input sockets from previous node */
- if(node_prev && node_from != node_prev) {
+ if (node_prev && node_from != node_prev) {
bNodeSocket *sock_prev, *sock_from;
- for(sock_prev=node_prev->inputs.first; sock_prev; sock_prev=sock_prev->next) {
- for(sock_from=node_from->inputs.first; sock_from; sock_from=sock_from->next) {
- if(strcmp(sock_prev->name, sock_from->name) == 0 && sock_prev->type == sock_from->type) {
+ for (sock_prev=node_prev->inputs.first; sock_prev; sock_prev=sock_prev->next) {
+ for (sock_from=node_from->inputs.first; sock_from; sock_from=sock_from->next) {
+ if (nodeCountSocketLinks(ntree, sock_from) >= sock_from->limit)
+ continue;
+
+ if (strcmp(sock_prev->name, sock_from->name) == 0 && sock_prev->type == sock_from->type) {
bNodeLink *link = sock_prev->link;
- if(link && link->fromnode) {
+ if (link && link->fromnode) {
nodeAddLink(ntree, link->fromnode, link->fromsock, node_from, sock_from);
nodeRemLink(ntree, link);
}
@@ -215,7 +219,7 @@ static void node_socket_add_replace(Main *bmain, bNodeTree *ntree, bNode *node_t
}
/* also preserve mapping for texture nodes */
- if(node_from->typeinfo->nclass == NODE_CLASS_TEXTURE &&
+ if (node_from->typeinfo->nclass == NODE_CLASS_TEXTURE &&
node_prev->typeinfo->nclass == NODE_CLASS_TEXTURE)
memcpy(node_from->storage, node_prev->storage, sizeof(NodeTexBase));
@@ -250,7 +254,7 @@ typedef struct NodeLinkArg {
uiLayout *layout;
} NodeLinkArg;
-static void ui_node_link(bContext *UNUSED(C), void *arg_p, void *event_p)
+static void ui_node_link(bContext *C, void *arg_p, void *event_p)
{
NodeLinkArg *arg = (NodeLinkArg*)arg_p;
Main *bmain = arg->bmain;
@@ -263,21 +267,23 @@ static void ui_node_link(bContext *UNUSED(C), void *arg_p, void *event_p)
ntemp.type = arg->type;
ntemp.ngroup = arg->ngroup;
- if(event == UI_NODE_LINK_DISCONNECT)
+ if (event == UI_NODE_LINK_DISCONNECT)
node_socket_disconnect(bmain, ntree, node_to, sock_to);
- else if(event == UI_NODE_LINK_REMOVE)
+ else if (event == UI_NODE_LINK_REMOVE)
node_socket_remove(bmain, ntree, node_to, sock_to);
else
node_socket_add_replace(bmain, ntree, node_to, sock_to, &ntemp, arg->output);
+
+ ED_undo_push(C, "Node input modify");
}
static void ui_node_sock_name(bNodeSocket *sock, char name[UI_MAX_NAME_STR])
{
- if(sock->link && sock->link->fromnode) {
+ if (sock->link && sock->link->fromnode) {
bNode *node = sock->link->fromnode;
char node_name[UI_MAX_NAME_STR];
- if(node->type == NODE_GROUP) {
+ if (node->type == NODE_GROUP) {
if (node->id)
BLI_strncpy(node_name, node->id->name+2, UI_MAX_NAME_STR);
else
@@ -286,14 +292,14 @@ static void ui_node_sock_name(bNodeSocket *sock, char name[UI_MAX_NAME_STR])
else
BLI_strncpy(node_name, node->typeinfo->name, UI_MAX_NAME_STR);
- if(node->inputs.first == NULL &&
+ if (node->inputs.first == NULL &&
node->outputs.first != node->outputs.last &&
!(node->typeinfo->flag & NODE_OPTIONS))
BLI_snprintf(name, UI_MAX_NAME_STR, "%s | %s", node_name, sock->link->fromsock->name);
else
BLI_strncpy(name, node_name, UI_MAX_NAME_STR);
}
- else if(sock->type == SOCK_SHADER)
+ else if (sock->type == SOCK_SHADER)
BLI_strncpy(name, "None", UI_MAX_NAME_STR);
else
BLI_strncpy(name, "Default", UI_MAX_NAME_STR);
@@ -319,31 +325,31 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname)
int first = 1;
int compatibility= 0;
- if(ntree->type == NTREE_SHADER) {
- if(scene_use_new_shading_nodes(arg->scene))
+ if (ntree->type == NTREE_SHADER) {
+ if (scene_use_new_shading_nodes(arg->scene))
compatibility= NODE_NEW_SHADING;
else
compatibility= NODE_OLD_SHADING;
}
- if(nclass == NODE_CLASS_GROUP) {
- for(ngroup=bmain->nodetree.first; ngroup; ngroup=ngroup->id.next) {
+ if (nclass == NODE_CLASS_GROUP) {
+ for (ngroup=bmain->nodetree.first; ngroup; ngroup=ngroup->id.next) {
bNodeSocket *gsock;
char name[UI_MAX_NAME_STR];
int i, j, num = 0;
- if(ngroup->type != ntree->type)
+ if (ngroup->type != ntree->type)
continue;
- for(gsock=ngroup->inputs.first; gsock; gsock=gsock->next)
- if(ui_compatible_sockets(gsock->type, sock->type))
+ for (gsock=ngroup->inputs.first; gsock; gsock=gsock->next)
+ if (ui_compatible_sockets(gsock->type, sock->type))
num++;
- for(i=0, j=0, gsock=ngroup->outputs.first; gsock; gsock=gsock->next, i++) {
- if(!ui_compatible_sockets(gsock->type, sock->type))
+ for (i=0, j=0, gsock=ngroup->outputs.first; gsock; gsock=gsock->next, i++) {
+ if (!ui_compatible_sockets(gsock->type, sock->type))
continue;
- if(first) {
+ if (first) {
column= uiLayoutColumn(layout, 0);
uiBlockSetCurLayout(block, column);
@@ -354,8 +360,8 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname)
first = 0;
}
- if(num > 1) {
- if(j == 0) {
+ if (num > 1) {
+ if (j == 0) {
uiItemL(column, ngroup->id.name+2, ICON_NODE);
but= block->buttons.last;
but->flag= UI_TEXT_LEFT;
@@ -381,26 +387,26 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname)
else {
bNodeTreeType *ttype= ntreeGetType(ntree->type);
- for(ntype=ttype->node_types.first; ntype; ntype=ntype->next) {
+ for (ntype=ttype->node_types.first; ntype; ntype=ntype->next) {
bNodeSocketTemplate *stemp;
char name[UI_MAX_NAME_STR];
int i, j, num = 0;
- if(compatibility && !(ntype->compatibility & compatibility))
+ if (compatibility && !(ntype->compatibility & compatibility))
continue;
- if(ntype->nclass != nclass)
+ if (ntype->nclass != nclass)
continue;
- for(i=0, stemp=ntype->outputs; stemp && stemp->type != -1; stemp++, i++)
- if(ui_compatible_sockets(stemp->type, sock->type))
+ for (i=0, stemp=ntype->outputs; stemp && stemp->type != -1; stemp++, i++)
+ if (ui_compatible_sockets(stemp->type, sock->type))
num++;
- for(i=0, j=0, stemp=ntype->outputs; stemp && stemp->type != -1; stemp++, i++) {
- if(!ui_compatible_sockets(stemp->type, sock->type))
+ for (i=0, j=0, stemp=ntype->outputs; stemp && stemp->type != -1; stemp++, i++) {
+ if (!ui_compatible_sockets(stemp->type, sock->type))
continue;
- if(first) {
+ if (first) {
column= uiLayoutColumn(layout, 0);
uiBlockSetCurLayout(block, column);
@@ -411,8 +417,8 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname)
first = 0;
}
- if(num > 1) {
- if(j == 0) {
+ if (num > 1) {
+ if (j == 0) {
uiItemL(column, ntype->name, ICON_NODE);
but= block->buttons.last;
but->flag= UI_TEXT_LEFT;
@@ -440,7 +446,7 @@ static void node_menu_column_foreach_cb(void *calldata, int nclass, const char *
{
NodeLinkArg *arg = (NodeLinkArg*)calldata;
- if(!ELEM(nclass, NODE_CLASS_GROUP, NODE_CLASS_LAYOUT))
+ if (!ELEM(nclass, NODE_CLASS_GROUP, NODE_CLASS_LAYOUT))
ui_node_menu_column(arg, nclass, name);
}
@@ -462,13 +468,13 @@ static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_
arg->scene= scene;
arg->layout= split;
- if(ntreetype && ntreetype->foreach_nodeclass)
+ if (ntreetype && ntreetype->foreach_nodeclass)
ntreetype->foreach_nodeclass(scene, arg, node_menu_column_foreach_cb);
column= uiLayoutColumn(split, 0);
uiBlockSetCurLayout(block, column);
- if(sock->link) {
+ if (sock->link) {
uiItemL(column, "Link", ICON_NONE);
but= block->buttons.last;
but->flag= UI_TEXT_LEFT;
@@ -500,21 +506,21 @@ void uiTemplateNodeLink(uiLayout *layout, bNodeTree *ntree, bNode *node, bNodeSo
uiBlockSetCurLayout(block, layout);
- if(sock->link || sock->type == SOCK_SHADER || (sock->flag & SOCK_HIDE_VALUE)) {
+ if (sock->link || sock->type == SOCK_SHADER || (sock->flag & SOCK_HIDE_VALUE)) {
char name[UI_MAX_NAME_STR];
ui_node_sock_name(sock, name);
- but= uiDefMenuBut(block, ui_template_node_link_menu, NULL, name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y, "");
+ but = uiDefMenuBut(block, ui_template_node_link_menu, NULL, name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y, "");
}
else
- but= uiDefIconMenuBut(block, ui_template_node_link_menu, NULL, ICON_NONE, 0, 0, UI_UNIT_X, UI_UNIT_Y, "");
+ but = uiDefIconMenuBut(block, ui_template_node_link_menu, NULL, ICON_NONE, 0, 0, UI_UNIT_X, UI_UNIT_Y, "");
but->type= MENU;
but->flag |= UI_TEXT_LEFT|UI_BUT_NODE_LINK;
but->poin= (char*)but;
but->func_argN = arg;
- if(sock->link && sock->link->fromnode)
- if(sock->link->fromnode->flag & NODE_ACTIVE_TEXTURE)
+ if (sock->link && sock->link->fromnode)
+ if (sock->link->fromnode->flag & NODE_ACTIVE_TEXTURE)
but->flag |= UI_BUT_NODE_ACTIVE;
}
@@ -531,8 +537,8 @@ static void ui_node_draw_node(uiLayout *layout, bContext *C, bNodeTree *ntree, b
RNA_pointer_create(&ntree->id, &RNA_Node, node, &nodeptr);
- if(node->typeinfo->uifunc) {
- if(node->type != NODE_GROUP) {
+ if (node->typeinfo->uifunc) {
+ if (node->type != NODE_GROUP) {
split = uiLayoutSplit(layout, 0.35f, 0);
col = uiLayoutColumn(split, 0);
col = uiLayoutColumn(split, 0);
@@ -541,7 +547,7 @@ static void ui_node_draw_node(uiLayout *layout, bContext *C, bNodeTree *ntree, b
}
}
- for(input=node->inputs.first; input; input=input->next)
+ for (input=node->inputs.first; input; input=input->next)
ui_node_draw_input(layout, C, ntree, node, input, depth+1);
}
@@ -556,7 +562,7 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree,
int indent = (depth > 1)? 2*(depth - 1): 0;
int dependency_loop;
- if(input->flag & SOCK_UNAVAIL)
+ if (input->flag & SOCK_UNAVAIL)
return;
/* to avoid eternal loops on cyclic dependencies */
@@ -564,7 +570,7 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree,
lnode = (input->link)? input->link->fromnode: NULL;
dependency_loop = (lnode && (lnode->flag & NODE_TEST));
- if(dependency_loop)
+ if (dependency_loop)
lnode = NULL;
/* socket RNA pointer */
@@ -580,10 +586,10 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree,
row = uiLayoutRow(split, 1);
- if(depth > 0) {
+ if (depth > 0) {
uiBlockSetEmboss(block, UI_EMBOSSN);
- if(lnode && (lnode->inputs.first || (lnode->typeinfo->uifunc && lnode->type != NODE_GROUP))) {
+ if (lnode && (lnode->inputs.first || (lnode->typeinfo->uifunc && lnode->type != NODE_GROUP))) {
int icon = (input->flag & SOCK_COLLAPSED)? ICON_DISCLOSURE_TRI_RIGHT: ICON_DISCLOSURE_TRI_DOWN;
uiItemR(row, &inputptr, "show_expanded", UI_ITEM_R_ICON_ONLY, "", icon);
}
@@ -600,16 +606,16 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree,
bt= block->buttons.last;
bt->flag= UI_TEXT_LEFT;
- if(dependency_loop) {
+ if (dependency_loop) {
row = uiLayoutRow(split, 0);
uiItemL(row, "Dependency Loop", ICON_ERROR);
}
- else if(lnode) {
+ else if (lnode) {
/* input linked to a node */
uiTemplateNodeLink(split, ntree, node, input);
- if(!(input->flag & SOCK_COLLAPSED)) {
- if(depth == 0)
+ if (!(input->flag & SOCK_COLLAPSED)) {
+ if (depth == 0)
uiItemS(layout);
ui_node_draw_node(layout, C, ntree, lnode, depth);
@@ -617,8 +623,8 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree,
}
else {
/* input not linked, show value */
- if(input->type != SOCK_SHADER && !(input->flag & SOCK_HIDE_VALUE)) {
- if(input->type == SOCK_VECTOR) {
+ if (input->type != SOCK_SHADER && !(input->flag & SOCK_HIDE_VALUE)) {
+ if (input->type == SOCK_VECTOR) {
row = uiLayoutRow(split, 0);
col = uiLayoutColumn(row, 0);
@@ -643,14 +649,14 @@ void uiTemplateNodeView(uiLayout *layout, bContext *C, bNodeTree *ntree, bNode *
{
bNode *tnode;
- if(!ntree)
+ if (!ntree)
return;
/* clear for cycle check */
- for(tnode=ntree->nodes.first; tnode; tnode=tnode->next)
+ for (tnode=ntree->nodes.first; tnode; tnode=tnode->next)
tnode->flag &= ~NODE_TEST;
- if(input)
+ if (input)
ui_node_draw_input(layout, C, ntree, node, input, 0);
else
ui_node_draw_node(layout, C, ntree, node, 0);
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 93d3b22e092..fca9927b0f5 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -72,13 +72,13 @@ ARegion *node_has_buttons_region(ScrArea *sa)
ARegion *ar, *arnew;
ar= BKE_area_find_region_type(sa, RGN_TYPE_UI);
- if(ar) return ar;
+ if (ar) return ar;
/* add subdiv level; after header */
ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
/* is error! */
- if(ar==NULL) return NULL;
+ if (ar==NULL) return NULL;
arnew= MEM_callocN(sizeof(ARegion), "buttons for node");
@@ -125,15 +125,15 @@ static SpaceLink *node_new(const bContext *UNUSED(C))
BLI_addtail(&snode->regionbase, ar);
ar->regiontype= RGN_TYPE_WINDOW;
- ar->v2d.tot.xmin= -256.0f;
- ar->v2d.tot.ymin= -256.0f;
- ar->v2d.tot.xmax= 768.0f;
- ar->v2d.tot.ymax= 768.0f;
+ ar->v2d.tot.xmin = -256.0f;
+ ar->v2d.tot.ymin = -256.0f;
+ ar->v2d.tot.xmax = 768.0f;
+ ar->v2d.tot.ymax = 768.0f;
- ar->v2d.cur.xmin= -256.0f;
- ar->v2d.cur.ymin= -256.0f;
- ar->v2d.cur.xmax= 768.0f;
- ar->v2d.cur.ymax= 768.0f;
+ ar->v2d.cur.xmin = -256.0f;
+ ar->v2d.cur.ymin = -256.0f;
+ ar->v2d.cur.xmax = 768.0f;
+ ar->v2d.cur.ymax = 768.0f;
ar->v2d.min[0]= 1.0f;
ar->v2d.min[1]= 1.0f;
@@ -183,8 +183,8 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
ED_area_tag_redraw(sa);
break;
case ND_TRANSFORM_DONE:
- if(type==NTREE_COMPOSIT) {
- if(snode->flag & SNODE_AUTO_RENDER) {
+ if (type==NTREE_COMPOSIT) {
+ if (snode->flag & SNODE_AUTO_RENDER) {
snode->recalc= 1;
ED_area_tag_refresh(sa);
}
@@ -193,48 +193,48 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_WM:
- if(wmn->data==ND_FILEREAD)
+ if (wmn->data==ND_FILEREAD)
ED_area_tag_refresh(sa);
break;
/* future: add ID checks? */
case NC_MATERIAL:
- if(type==NTREE_SHADER) {
- if(wmn->data==ND_SHADING)
+ if (type==NTREE_SHADER) {
+ if (wmn->data==ND_SHADING)
ED_area_tag_refresh(sa);
- else if(wmn->data==ND_SHADING_DRAW)
+ else if (wmn->data==ND_SHADING_DRAW)
ED_area_tag_refresh(sa);
- else if(wmn->action==NA_ADDED && snode->edittree)
+ else if (wmn->action==NA_ADDED && snode->edittree)
nodeSetActiveID(snode->edittree, ID_MA, wmn->reference);
}
break;
case NC_TEXTURE:
- if(type==NTREE_SHADER || type==NTREE_TEXTURE) {
- if(wmn->data==ND_NODES)
+ if (type==NTREE_SHADER || type==NTREE_TEXTURE) {
+ if (wmn->data==ND_NODES)
ED_area_tag_refresh(sa);
}
break;
case NC_WORLD:
- if(type==NTREE_SHADER && shader_type==SNODE_SHADER_WORLD) {
+ if (type==NTREE_SHADER && shader_type==SNODE_SHADER_WORLD) {
ED_area_tag_refresh(sa);
}
break;
case NC_OBJECT:
- if(type==NTREE_SHADER) {
- if(wmn->data==ND_OB_SHADING)
+ if (type==NTREE_SHADER) {
+ if (wmn->data==ND_OB_SHADING)
ED_area_tag_refresh(sa);
}
break;
case NC_TEXT:
/* pynodes */
- if(wmn->data==ND_SHADING)
+ if (wmn->data==ND_SHADING)
ED_area_tag_refresh(sa);
break;
case NC_SPACE:
- if(wmn->data==ND_SPACE_NODE)
+ if (wmn->data==ND_SPACE_NODE)
ED_area_tag_refresh(sa);
- else if(wmn->data==ND_SPACE_NODE_VIEW)
+ else if (wmn->data==ND_SPACE_NODE_VIEW)
ED_area_tag_redraw(sa);
break;
case NC_NODE:
@@ -253,11 +253,11 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
case NC_IMAGE:
if (wmn->action == NA_EDITED) {
- if(type==NTREE_COMPOSIT) {
+ if (type==NTREE_COMPOSIT) {
/* note that nodeUpdateID is already called by BKE_image_signal() on all
* scenes so really this is just to know if the images is used in the compo else
* painting on images could become very slow when the compositor is open. */
- if(nodeUpdateID(snode->nodetree, wmn->reference))
+ if (nodeUpdateID(snode->nodetree, wmn->reference))
ED_area_tag_refresh(sa);
}
}
@@ -272,29 +272,29 @@ static void node_area_refresh(const struct bContext *C, struct ScrArea *sa)
snode_set_context(snode, CTX_data_scene(C));
- if(snode->nodetree) {
- if(snode->treetype==NTREE_SHADER) {
- if(GS(snode->id->name) == ID_MA) {
+ if (snode->nodetree) {
+ if (snode->treetype==NTREE_SHADER) {
+ if (GS(snode->id->name) == ID_MA) {
Material *ma= (Material *)snode->id;
- if(ma->use_nodes)
+ if (ma->use_nodes)
ED_preview_shader_job(C, sa, snode->id, NULL, NULL, 100, 100, PR_NODE_RENDER);
}
- else if(GS(snode->id->name) == ID_LA) {
+ else if (GS(snode->id->name) == ID_LA) {
Lamp *la= (Lamp *)snode->id;
- if(la->use_nodes)
+ if (la->use_nodes)
ED_preview_shader_job(C, sa, snode->id, NULL, NULL, 100, 100, PR_NODE_RENDER);
}
- else if(GS(snode->id->name) == ID_WO) {
+ else if (GS(snode->id->name) == ID_WO) {
World *wo= (World *)snode->id;
- if(wo->use_nodes)
+ if (wo->use_nodes)
ED_preview_shader_job(C, sa, snode->id, NULL, NULL, 100, 100, PR_NODE_RENDER);
}
}
- else if(snode->treetype==NTREE_COMPOSIT) {
+ else if (snode->treetype==NTREE_COMPOSIT) {
Scene *scene= (Scene *)snode->id;
- if(scene->use_nodes) {
+ if (scene->use_nodes) {
/* recalc is set on 3d view changes for auto compo */
- if(snode->recalc) {
+ if (snode->recalc) {
snode->recalc= 0;
node_render_changed_exec((struct bContext*)C, NULL);
}
@@ -302,9 +302,9 @@ static void node_area_refresh(const struct bContext *C, struct ScrArea *sa)
snode_composite_job(C, sa);
}
}
- else if(snode->treetype==NTREE_TEXTURE) {
+ else if (snode->treetype==NTREE_TEXTURE) {
Tex *tex= (Tex *)snode->id;
- if(tex->use_nodes) {
+ if (tex->use_nodes) {
ED_preview_shader_job(C, sa, snode->id, NULL, NULL, 100, 100, PR_NODE_RENDER);
}
}
@@ -330,7 +330,7 @@ static void node_buttons_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_find(wm->defaultconf, "Node Generic", SPACE_NODE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Node Generic", SPACE_NODE, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -348,10 +348,10 @@ static void node_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymaps */
- keymap= WM_keymap_find(wm->defaultconf, "Node Generic", SPACE_NODE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Node Generic", SPACE_NODE, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Node Editor", SPACE_NODE, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Node Editor", SPACE_NODE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
/* add drop boxes */
@@ -372,13 +372,13 @@ static void node_main_area_draw(const bContext *C, ARegion *ar)
static int node_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))
{
- if(drag->type==WM_DRAG_ID) {
+ if (drag->type==WM_DRAG_ID) {
ID *id= (ID *)drag->poin;
- if( GS(id->name)==ID_IM )
+ if ( GS(id->name)==ID_IM )
return 1;
}
- else if(drag->type==WM_DRAG_PATH){
- if(ELEM(drag->icon, 0, ICON_FILE_IMAGE)) /* rule might not work? */
+ else if (drag->type==WM_DRAG_PATH) {
+ if (ELEM(drag->icon, 0, ICON_FILE_IMAGE)) /* rule might not work? */
return 1;
}
return 0;
@@ -388,7 +388,7 @@ static void node_id_path_drop_copy(wmDrag *drag, wmDropBox *drop)
{
ID *id= (ID *)drag->poin;
- if(id) {
+ if (id) {
RNA_string_set(drop->ptr, "name", id->name+2);
}
if (drag->path[0]) {
@@ -431,11 +431,11 @@ static void node_region_listener(ARegion *ar, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
case NC_SPACE:
- if(wmn->data==ND_SPACE_NODE)
+ if (wmn->data==ND_SPACE_NODE)
ED_region_tag_redraw(ar);
break;
case NC_SCREEN:
- if(wmn->data == ND_GPENCIL)
+ if (wmn->data == ND_GPENCIL)
ED_region_tag_redraw(ar);
break;
case NC_SCENE:
@@ -445,11 +445,11 @@ static void node_region_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case NC_OBJECT:
- if(wmn->data==ND_OB_SHADING)
+ if (wmn->data==ND_OB_SHADING)
ED_region_tag_redraw(ar);
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
}
@@ -461,16 +461,16 @@ static int node_context(const bContext *C, const char *member, bContextDataResul
{
SpaceNode *snode= CTX_wm_space_node(C);
- if(CTX_data_dir(member)) {
+ if (CTX_data_dir(member)) {
CTX_data_dir_set(result, node_context_dir);
return 1;
}
- else if(CTX_data_equals(member, "selected_nodes")) {
+ else if (CTX_data_equals(member, "selected_nodes")) {
bNode *node;
- if(snode->edittree) {
- for(node=snode->edittree->nodes.last; node; node=node->prev) {
- if(node->flag & NODE_SELECT) {
+ if (snode->edittree) {
+ for (node=snode->edittree->nodes.last; node; node=node->prev) {
+ if (node->flag & NODE_SELECT) {
CTX_data_list_add(result, &snode->edittree->id, &RNA_Node, node);
}
}
@@ -478,12 +478,12 @@ static int node_context(const bContext *C, const char *member, bContextDataResul
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
return 1;
}
- else if(CTX_data_equals(member, "active_node")) {
+ else if (CTX_data_equals(member, "active_node")) {
bNode *node;
- if(snode->edittree) {
- for(node=snode->edittree->nodes.last; node; node=node->prev) {
- if(node->flag & NODE_ACTIVE) {
+ if (snode->edittree) {
+ for (node=snode->edittree->nodes.last; node; node=node->prev) {
+ if (node->flag & NODE_ACTIVE) {
CTX_data_pointer_set(result, &snode->edittree->id, &RNA_Node, node);
break;
}
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index f0115170525..73289dce968 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -95,9 +95,9 @@
static void outliner_height(SpaceOops *soops, ListBase *lb, int *h)
{
TreeElement *te= lb->first;
- while(te) {
+ while (te) {
TreeStoreElem *tselem= TREESTORE(te);
- if(TSELEM_OPEN(tselem,soops))
+ if (TSELEM_OPEN(tselem,soops))
outliner_height(soops, &te->subtree, h);
(*h) += UI_UNIT_Y;
te= te->next;
@@ -108,11 +108,11 @@ static void outliner_height(SpaceOops *soops, ListBase *lb, int *h)
static void outliner_width(SpaceOops *soops, ListBase *lb, int *w)
{
TreeElement *te= lb->first;
- while(te) {
+ while (te) {
// TreeStoreElem *tselem= TREESTORE(te);
// XXX fixme... te->xend is not set yet
- if(!TSELEM_OPEN(tselem,soops)) {
+ if (!TSELEM_OPEN(tselem,soops)) {
if (te->xend > *w)
*w = te->xend;
}
@@ -125,19 +125,19 @@ static void outliner_width(SpaceOops *soops, ListBase *lb, int *w)
static void outliner_rna_width(SpaceOops *soops, ListBase *lb, int *w, int startx)
{
TreeElement *te= lb->first;
- while(te) {
+ while (te) {
TreeStoreElem *tselem= TREESTORE(te);
// XXX fixme... (currently, we're using a fixed length of 100)!
#if 0
- if(te->xend) {
- if(te->xend > *w)
+ if (te->xend) {
+ if (te->xend > *w)
*w = te->xend;
}
#endif
- if(startx+100 > *w)
+ if (startx+100 > *w)
*w = startx+100;
- if(TSELEM_OPEN(tselem,soops))
+ if (TSELEM_OPEN(tselem,soops))
outliner_rna_width(soops, &te->subtree, w, startx+UI_UNIT_X);
te= te->next;
}
@@ -150,7 +150,7 @@ static void restrictbutton_view_cb(bContext *C, void *poin, void *poin2)
Scene *scene = (Scene *)poin;
Object *ob = (Object *)poin2;
- if(!common_restrict_check(C, ob)) return;
+ if (!common_restrict_check(C, ob)) return;
/* deselect objects that are invisible */
if (ob->restrictflag & OB_RESTRICT_VIEW) {
@@ -167,7 +167,7 @@ static void restrictbutton_sel_cb(bContext *C, void *poin, void *poin2)
Scene *scene = (Scene *)poin;
Object *ob = (Object *)poin2;
- if(!common_restrict_check(C, ob)) return;
+ if (!common_restrict_check(C, ob)) return;
/* if select restriction has just been turned on */
if (ob->restrictflag & OB_RESTRICT_SELECT) {
@@ -201,7 +201,7 @@ static void restrictbutton_modifier_cb(bContext *C, void *UNUSED(poin), void *po
static void restrictbutton_bone_cb(bContext *C, void *UNUSED(poin), void *poin2)
{
Bone *bone= (Bone *)poin2;
- if(bone && (bone->flag & BONE_HIDDEN_P))
+ if (bone && (bone->flag & BONE_HIDDEN_P))
bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
}
@@ -209,7 +209,7 @@ static void restrictbutton_bone_cb(bContext *C, void *UNUSED(poin), void *poin2)
static void restrictbutton_ebone_cb(bContext *C, void *UNUSED(poin), void *poin2)
{
EditBone *ebone= (EditBone *)poin2;
- if(ebone && (ebone->flag & BONE_HIDDEN_A))
+ if (ebone && (ebone->flag & BONE_HIDDEN_A))
ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
@@ -219,8 +219,8 @@ static int group_restrict_flag(Group *gr, int flag)
{
GroupObject *gob;
- for(gob= gr->gobject.first; gob; gob= gob->next) {
- if((gob->ob->restrictflag & flag) == 0)
+ for (gob= gr->gobject.first; gob; gob= gob->next) {
+ if ((gob->ob->restrictflag & flag) == 0)
return 0;
}
@@ -231,8 +231,8 @@ static int group_select_flag(Group *gr)
{
GroupObject *gob;
- for(gob= gr->gobject.first; gob; gob= gob->next)
- if((gob->ob->flag & SELECT))
+ for (gob= gr->gobject.first; gob; gob= gob->next)
+ if ((gob->ob->flag & SELECT))
return 1;
return 0;
@@ -244,23 +244,23 @@ void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag)
GroupObject *gob;
Group *gr = (Group *)poin2;
- if(group_restrict_flag(gr, flag)) {
- for(gob= gr->gobject.first; gob; gob= gob->next) {
+ if (group_restrict_flag(gr, flag)) {
+ for (gob= gr->gobject.first; gob; gob= gob->next) {
gob->ob->restrictflag &= ~flag;
- if(flag==OB_RESTRICT_VIEW)
- if(gob->ob->flag & SELECT)
+ if (flag==OB_RESTRICT_VIEW)
+ if (gob->ob->flag & SELECT)
ED_base_object_select(object_in_scene(gob->ob, scene), BA_DESELECT);
}
}
else {
- for(gob= gr->gobject.first; gob; gob= gob->next) {
+ for (gob= gr->gobject.first; gob; gob= gob->next) {
/* not in editmode */
- if(scene->obedit!=gob->ob) {
+ if (scene->obedit!=gob->ob) {
gob->ob->restrictflag |= flag;
- if(flag==OB_RESTRICT_VIEW)
- if((gob->ob->flag & SELECT) == 0)
+ if (flag==OB_RESTRICT_VIEW)
+ if ((gob->ob->flag & SELECT) == 0)
ED_base_object_select(object_in_scene(gob->ob, scene), BA_SELECT);
}
}
@@ -292,10 +292,10 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
TreeStore *ts= soops->treestore;
TreeStoreElem *tselem= tsep;
- if(ts && tselem) {
+ if (ts && tselem) {
TreeElement *te= outliner_find_tse(soops, tselem);
- if(tselem->type==0) {
+ if (tselem->type==0) {
test_idbutton(tselem->id->name+2); // library.c, unique name and alpha sort
switch(GS(tselem->id->name)) {
@@ -335,7 +335,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
case TSE_EBONE:
{
bArmature *arm= (bArmature *)tselem->id;
- if(arm->edbo) {
+ if (arm->edbo) {
EditBone *ebone= te->directdata;
char newname[sizeof(ebone->name)];
@@ -407,11 +407,11 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
Object *ob = NULL;
Group *gr = NULL;
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(te->ys+2*UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
+ if (te->ys+2*UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
/* objects have toggle-able restriction flags */
- if(tselem->type==0 && te->idcode==ID_OB) {
+ if (tselem->type==0 && te->idcode==ID_OB) {
PointerRNA ptr;
ob = (Object *)tselem->id;
@@ -436,7 +436,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
uiBlockSetEmboss(block, UI_EMBOSS);
}
- if(tselem->type==0 && te->idcode==ID_GR){
+ if (tselem->type==0 && te->idcode==ID_GR) {
int restrict_bool;
gr = (Group *)tselem->id;
@@ -457,7 +457,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
uiBlockSetEmboss(block, UI_EMBOSS);
}
/* scene render layers and passes have toggle-able flags too! */
- else if(tselem->type==TSE_R_LAYER) {
+ else if (tselem->type==TSE_R_LAYER) {
uiBlockSetEmboss(block, UI_EMBOSSN);
bt= uiDefIconButBitI(block, ICONTOGN, SCE_LAY_DISABLE, 0, ICON_CHECKBOX_HLT-1,
@@ -466,7 +466,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
uiBlockSetEmboss(block, UI_EMBOSS);
}
- else if(tselem->type==TSE_R_PASS) {
+ else if (tselem->type==TSE_R_PASS) {
int *layflag= te->directdata;
int passflag= 1<<tselem->nr;
@@ -478,14 +478,14 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
uiButSetFunc(bt, restrictbutton_r_lay_cb, tselem->id, NULL);
layflag++; /* is lay_xor */
- if(ELEM8(passflag, SCE_PASS_SPEC, SCE_PASS_SHADOW, SCE_PASS_AO, SCE_PASS_REFLECT, SCE_PASS_REFRACT, SCE_PASS_INDIRECT, SCE_PASS_EMIT, SCE_PASS_ENVIRONMENT))
+ if (ELEM8(passflag, SCE_PASS_SPEC, SCE_PASS_SHADOW, SCE_PASS_AO, SCE_PASS_REFLECT, SCE_PASS_REFRACT, SCE_PASS_INDIRECT, SCE_PASS_EMIT, SCE_PASS_ENVIRONMENT))
bt= uiDefIconButBitI(block, TOG, passflag, 0, (*layflag & passflag)?ICON_DOT:ICON_BLANK1,
(int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, layflag, 0, 0, 0, 0, "Exclude this Pass from Combined");
uiButSetFunc(bt, restrictbutton_r_lay_cb, tselem->id, NULL);
uiBlockSetEmboss(block, UI_EMBOSS);
}
- else if(tselem->type==TSE_MODIFIER) {
+ else if (tselem->type==TSE_MODIFIER) {
ModifierData *md= (ModifierData *)te->directdata;
ob = (Object *)tselem->id;
@@ -498,7 +498,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
(int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow renderability");
uiButSetFunc(bt, restrictbutton_modifier_cb, scene, ob);
}
- else if(tselem->type==TSE_POSE_CHANNEL) {
+ else if (tselem->type==TSE_POSE_CHANNEL) {
bPoseChannel *pchan= (bPoseChannel *)te->directdata;
Bone *bone = pchan->bone;
@@ -511,7 +511,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
(int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL);
}
- else if(tselem->type==TSE_EBONE) {
+ else if (tselem->type==TSE_EBONE) {
EditBone *ebone= (EditBone *)te->directdata;
uiBlockSetEmboss(block, UI_EMBOSSN);
@@ -525,7 +525,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
}
}
- if(TSELEM_OPEN(tselem,soops)) outliner_draw_restrictbuts(block, scene, ar, soops, &te->subtree);
+ if (TSELEM_OPEN(tselem,soops)) outliner_draw_restrictbuts(block, scene, ar, soops, &te->subtree);
}
}
@@ -534,7 +534,7 @@ static void outliner_draw_rnacols(ARegion *ar, int sizex)
View2D *v2d= &ar->v2d;
float miny = v2d->cur.ymin-V2D_SCROLL_HEIGHT;
- if(miny<v2d->tot.ymin) miny = v2d->tot.ymin;
+ if (miny<v2d->tot.ymin) miny = v2d->tot.ymin;
UI_ThemeColorShadeAlpha(TH_BACK, -15, -200);
@@ -559,17 +559,17 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa
uiBlockSetEmboss(block, UI_EMBOSST);
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(te->ys+2*UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
- if(tselem->type == TSE_RNA_PROPERTY) {
+ if (te->ys+2*UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
+ if (tselem->type == TSE_RNA_PROPERTY) {
ptr= &te->rnaptr;
prop= te->directdata;
- if(!(RNA_property_type(prop) == PROP_POINTER && (TSELEM_OPEN(tselem,soops))) )
+ if (!(RNA_property_type(prop) == PROP_POINTER && (TSELEM_OPEN(tselem,soops))) )
uiDefAutoButR(block, ptr, prop, -1, "", ICON_NONE, sizex, (int)te->ys, OL_RNA_COL_SIZEX, UI_UNIT_Y-1);
}
- else if(tselem->type == TSE_RNA_ARRAY_ELEM) {
+ else if (tselem->type == TSE_RNA_ARRAY_ELEM) {
ptr= &te->rnaptr;
prop= te->directdata;
@@ -577,16 +577,16 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa
}
}
- if(TSELEM_OPEN(tselem,soops)) outliner_draw_rnabuts(block, scene, ar, soops, sizex, &te->subtree);
+ if (TSELEM_OPEN(tselem,soops)) outliner_draw_rnabuts(block, scene, ar, soops, sizex, &te->subtree);
}
}
static void operator_call_cb(struct bContext *UNUSED(C), void *arg_kmi, void *arg2)
{
wmOperatorType *ot= arg2;
- wmKeyMapItem *kmi= arg_kmi;
+ wmKeyMapItem *kmi = arg_kmi;
- if(ot)
+ if (ot)
BLI_strncpy(kmi->idname, ot->idname, OP_MAX_TYPENAME);
}
@@ -594,16 +594,16 @@ static void operator_search_cb(const struct bContext *UNUSED(C), void *UNUSED(ar
{
GHashIterator *iter= WM_operatortype_iter();
- for( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) {
+ for ( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) {
wmOperatorType *ot= BLI_ghashIterator_getValue(iter);
- if(BLI_strcasestr(ot->idname, str)) {
+ if (BLI_strcasestr(ot->idname, str)) {
char name[OP_MAX_TYPENAME];
/* display name for menu */
WM_operator_py_idname(name, ot->idname);
- if(0==uiSearchItemAdd(items, name, ot, 0))
+ if (0==uiSearchItemAdd(items, name, ot, 0))
break;
}
}
@@ -616,7 +616,7 @@ static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi)
static char search[OP_MAX_TYPENAME];
wmEvent event;
wmWindow *win= CTX_wm_window(C);
- wmKeyMapItem *kmi= arg_kmi;
+ wmKeyMapItem *kmi = arg_kmi;
wmOperatorType *ot= WM_operatortype_find(kmi->idname, 0);
uiBlock *block;
uiBut *but;
@@ -630,7 +630,7 @@ static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi)
/* fake button, it holds space for search items */
uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL);
- but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, UI_UNIT_Y, 0, 0, "");
+ but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, UI_UNIT_Y, 0, 0, "");
uiButSetSearchFunc(but, operator_search_cb, arg_kmi, operator_call_cb, ot);
uiBoundsBlock(block, 6);
@@ -654,9 +654,9 @@ static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi)
static short keymap_menu_type(short type)
{
- if(ISKEYBOARD(type)) return OL_KM_KEYBOARD;
- if(ISTWEAK(type)) return OL_KM_TWEAK;
- if(ISMOUSE(type)) return OL_KM_MOUSE;
+ if (ISKEYBOARD(type)) return OL_KM_KEYBOARD;
+ if (ISTWEAK(type)) return OL_KM_TWEAK;
+ if (ISMOUSE(type)) return OL_KM_MOUSE;
// return OL_KM_SPECIALS;
return 0;
}
@@ -735,10 +735,10 @@ static const char *keymap_tweak_dir_menu(void)
static void keymap_type_cb(bContext *C, void *kmi_v, void *UNUSED(arg_v))
{
- wmKeyMapItem *kmi= kmi_v;
+ wmKeyMapItem *kmi = kmi_v;
short maptype= keymap_menu_type(kmi->type);
- if(maptype!=kmi->maptype) {
+ if (maptype!=kmi->maptype) {
switch(kmi->maptype) {
case OL_KM_KEYBOARD:
kmi->type= AKEY;
@@ -767,9 +767,9 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo
uiBlockSetEmboss(block, UI_EMBOSST);
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(te->ys+2*UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
+ if (te->ys+2*UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
uiBut *but;
const char *str;
int xstart= 240;
@@ -777,11 +777,11 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo
int butw2= 90; /* event type, menus */
int butw3= 43; /* modifiers */
- if(tselem->type == TSE_KEYMAP_ITEM) {
- wmKeyMapItem *kmi= te->directdata;
+ if (tselem->type == TSE_KEYMAP_ITEM) {
+ wmKeyMapItem *kmi = te->directdata;
/* modal map? */
- if(kmi->propvalue);
+ if (kmi->propvalue);
else {
uiDefBlockBut(block, operator_search_menu, kmi, "", xstart, (int)te->ys+1, butw1, UI_UNIT_Y-1, "Assign new Operator");
}
@@ -791,7 +791,7 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo
kmi->maptype= keymap_menu_type(kmi->type);
str= keymap_type_menu();
- but= uiDefButS(block, MENU, 0, str, xstart, (int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->maptype, 0, 0, 0, 0, "Event type");
+ but = uiDefButS(block, MENU, 0, str, xstart, (int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->maptype, 0, 0, 0, 0, "Event type");
uiButSetFunc(but, keymap_type_cb, kmi, NULL);
xstart+= butw2+5;
@@ -826,7 +826,7 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo
xstart+= butw3+5;
/* rna property */
- if(kmi->ptr && kmi->ptr->data) {
+ if (kmi->ptr && kmi->ptr->data) {
uiDefBut(block, LABEL, 0, "(RNA property)", xstart, (int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->oskey, 0, 0, 0, 0, ""); xstart+= butw2;
}
@@ -834,7 +834,7 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo
}
}
- if(TSELEM_OPEN(tselem,soops)) outliner_draw_keymapbuts(block, ar, soops, &te->subtree);
+ if (TSELEM_OPEN(tselem,soops)) outliner_draw_keymapbuts(block, ar, soops, &te->subtree);
}
}
@@ -846,38 +846,38 @@ static void outliner_buttons(const bContext *C, uiBlock *block, ARegion *ar, Spa
TreeStoreElem *tselem;
int spx, dx, len;
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(te->ys+2*UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
+ if (te->ys+2*UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) {
- if(tselem->flag & TSE_TEXTBUT) {
+ if (tselem->flag & TSE_TEXTBUT) {
/* If we add support to rename Sequence.
* need change this.
*/
- if(tselem->type == TSE_POSE_BASE) continue; // prevent crash when trying to rename 'pose' entry of armature
+ if (tselem->type == TSE_POSE_BASE) continue; // prevent crash when trying to rename 'pose' entry of armature
- if(tselem->type==TSE_EBONE) len = sizeof(((EditBone*) 0)->name);
+ if (tselem->type==TSE_EBONE) len = sizeof(((EditBone*) 0)->name);
else if (tselem->type==TSE_MODIFIER) len = sizeof(((ModifierData*) 0)->name);
- else if(tselem->id && GS(tselem->id->name)==ID_LI) len = sizeof(((Library*) 0)->name);
+ else if (tselem->id && GS(tselem->id->name)==ID_LI) len = sizeof(((Library*) 0)->name);
else len= MAX_ID_NAME-2;
dx= (int)UI_GetStringWidth(te->name);
- if(dx<100) dx= 100;
+ if (dx<100) dx= 100;
spx=te->xs+2*UI_UNIT_X-4;
- if(spx+dx+10>ar->v2d.cur.xmax) dx = ar->v2d.cur.xmax-spx-10;
+ if (spx+dx+10>ar->v2d.cur.xmax) dx = ar->v2d.cur.xmax-spx-10;
bt= uiDefBut(block, TEX, OL_NAMEBUTTON, "", spx, (int)te->ys, dx+10, UI_UNIT_Y-1, (void *)te->name, 1.0, (float)len, 0, 0, "");
uiButSetRenameFunc(bt, namebutton_cb, tselem);
/* returns false if button got removed */
- if( 0 == uiButActiveOnly(C, block, bt) )
+ if ( 0 == uiButActiveOnly(C, block, bt) )
tselem->flag &= ~TSE_TEXTBUT;
}
}
- if(TSELEM_OPEN(tselem,soops)) outliner_buttons(C, block, ar, soops, &te->subtree);
+ if (TSELEM_OPEN(tselem,soops)) outliner_buttons(C, block, ar, soops, &te->subtree);
}
}
@@ -895,16 +895,17 @@ struct DrawIconArg {
static void tselem_draw_icon_uibut(struct DrawIconArg *arg, int icon)
{
/* restrict column clip... it has been coded by simply overdrawing, doesnt work for buttons */
- if(arg->x >= arg->xmax) {
+ if (arg->x >= arg->xmax) {
glEnable(GL_BLEND);
UI_icon_draw_aspect(arg->x, arg->y, icon, 1.0f, arg->alpha);
glDisable(GL_BLEND);
- } else {
+ }
+ else {
/* XXX investigate: button placement of icons is way different than UI_icon_draw? */
float ufac= UI_UNIT_X/20.0f;
- uiBut *but= uiDefIconBut(arg->block, LABEL, 0, icon, arg->x-3.0f*ufac, arg->y, UI_UNIT_X-4.0f*ufac, UI_UNIT_Y-4.0f*ufac, NULL, 0.0, 0.0, 1.0, arg->alpha, (arg->id && arg->id->lib) ? arg->id->lib->name : "");
+ uiBut *but = uiDefIconBut(arg->block, LABEL, 0, icon, arg->x-3.0f*ufac, arg->y, UI_UNIT_X-4.0f*ufac, UI_UNIT_Y-4.0f*ufac, NULL, 0.0, 0.0, 1.0, arg->alpha, (arg->id && arg->id->lib) ? arg->id->lib->name : "");
- if(arg->id)
+ if (arg->id)
uiButSetDragID(but, arg->id);
}
@@ -917,12 +918,12 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
/* make function calls a bit compacter */
arg.block= block;
arg.id= tselem->id;
- arg.xmax= xmax;
+ arg.xmax = xmax;
arg.x= x;
arg.y= y;
arg.alpha= alpha;
- if(tselem->type) {
+ if (tselem->type) {
switch( tselem->type) {
case TSE_ANIM_DATA:
UI_icon_draw(x, y, ICON_ANIM_DATA); break; // xxx
@@ -1052,15 +1053,15 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
case TSE_POSEGRP_BASE:
UI_icon_draw(x, y, ICON_VERTEXSEL); break;
case TSE_SEQUENCE:
- if(te->idcode==SEQ_MOVIE)
+ if (te->idcode==SEQ_MOVIE)
UI_icon_draw(x, y, ICON_SEQUENCE);
- else if(te->idcode==SEQ_META)
+ else if (te->idcode==SEQ_META)
UI_icon_draw(x, y, ICON_DOT);
- else if(te->idcode==SEQ_SCENE)
+ else if (te->idcode==SEQ_SCENE)
UI_icon_draw(x, y, ICON_SCENE);
- else if(te->idcode==SEQ_SOUND)
+ else if (te->idcode==SEQ_SOUND)
UI_icon_draw(x, y, ICON_SOUND);
- else if(te->idcode==SEQ_IMAGE)
+ else if (te->idcode==SEQ_IMAGE)
UI_icon_draw(x, y, ICON_IMAGE_COL);
else
UI_icon_draw(x, y, ICON_PARTICLES);
@@ -1072,7 +1073,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
UI_icon_draw(x, y, ICON_OBJECT_DATA);
break;
case TSE_RNA_STRUCT:
- if(RNA_struct_is_ID(te->rnaptr.type)) {
+ if (RNA_struct_is_ID(te->rnaptr.type)) {
arg.id= (ID *)te->rnaptr.data;
tselem_draw_icon_uibut(&arg, RNA_struct_ui_icon(te->rnaptr.type));
}
@@ -1180,26 +1181,26 @@ static void outliner_draw_iconrow(bContext *C, uiBlock *block, Scene *scene, Spa
TreeStoreElem *tselem;
int active;
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
/* exit drawing early */
- if((*offsx) - UI_UNIT_X > xmax)
+ if ((*offsx) - UI_UNIT_X > xmax)
break;
tselem= TREESTORE(te);
/* object hierarchy always, further constrained on level */
- if(level<1 || (tselem->type==0 && te->idcode==ID_OB)) {
+ if (level<1 || (tselem->type==0 && te->idcode==ID_OB)) {
/* active blocks get white circle */
- if(tselem->type==0) {
- if(te->idcode==ID_OB) active= (OBACT==(Object *)tselem->id);
- else if(scene->obedit && scene->obedit->data==tselem->id) active= 1; // XXX use context?
+ if (tselem->type==0) {
+ if (te->idcode==ID_OB) active= (OBACT==(Object *)tselem->id);
+ else if (scene->obedit && scene->obedit->data==tselem->id) active= 1; // XXX use context?
else active= tree_element_active(C, scene, soops, te, 0);
}
else active= tree_element_type_active(NULL, scene, soops, te, tselem, 0);
- if(active) {
+ if (active) {
float ufac= UI_UNIT_X/20.0f;
uiSetRoundBox(UI_CNR_ALL);
@@ -1217,8 +1218,8 @@ static void outliner_draw_iconrow(bContext *C, uiBlock *block, Scene *scene, Spa
(*offsx) += UI_UNIT_X;
}
- /* this tree element always has same amount of branches, so dont draw */
- if(tselem->type!=TSE_R_LAYER)
+ /* this tree element always has same amount of branches, so don't draw */
+ if (tselem->type!=TSE_R_LAYER)
outliner_draw_iconrow(C, block, scene, soops, &te->subtree, level+1, xmax, offsx, ys);
}
@@ -1233,7 +1234,7 @@ static void outliner_set_coord_tree_element(SpaceOops *soops, TreeElement *te, i
te->xs= (float)startx;
te->ys= (float)(*starty);
- for(ten= te->subtree.first; ten; ten= ten->next) {
+ for (ten= te->subtree.first; ten; ten= ten->next) {
outliner_set_coord_tree_element(soops, ten, startx+UI_UNIT_X, starty);
}
}
@@ -1248,11 +1249,11 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
tselem= TREESTORE(te);
- if(*starty+2*UI_UNIT_Y >= ar->v2d.cur.ymin && *starty<= ar->v2d.cur.ymax) {
+ if (*starty+2*UI_UNIT_Y >= ar->v2d.cur.ymin && *starty<= ar->v2d.cur.ymax) {
int xmax= ar->v2d.cur.xmax;
- /* icons can be ui buts, we dont want it to overlap with restrict */
- if((soops->flag & SO_HIDE_RESTRICTCOLS)==0)
+ /* icons can be ui buts, we don't want it to overlap with restrict */
+ if ((soops->flag & SO_HIDE_RESTRICTCOLS)==0)
xmax-= OL_TOGW+UI_UNIT_X;
glEnable(GL_BLEND);
@@ -1272,17 +1273,17 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
}
/* colors for active/selected data */
- if(tselem->type==0) {
- if(te->idcode==ID_SCE) {
- if(tselem->id == (ID *)scene) {
+ if (tselem->type==0) {
+ if (te->idcode==ID_SCE) {
+ if (tselem->id == (ID *)scene) {
glColor4ub(255, 255, 255, 100);
active= 2;
}
}
- else if(te->idcode==ID_GR) {
+ else if (te->idcode==ID_GR) {
Group *gr = (Group *)tselem->id;
- if(group_select_flag(gr)) {
+ if (group_select_flag(gr)) {
char col[4];
UI_GetThemeColorType4ubv(TH_SELECT, SPACE_VIEW3D, col);
col[3]= 100;
@@ -1291,24 +1292,24 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
active= 2;
}
}
- else if(te->idcode==ID_OB) {
+ else if (te->idcode==ID_OB) {
Object *ob= (Object *)tselem->id;
- if(ob==OBACT || (ob->flag & SELECT)) {
+ if (ob==OBACT || (ob->flag & SELECT)) {
char col[4]= {0, 0, 0, 0};
/* outliner active ob: always white text, circle color now similar to view3d */
active= 2; /* means it draws a color circle */
- if(ob==OBACT) {
- if(ob->flag & SELECT) {
+ if (ob==OBACT) {
+ if (ob->flag & SELECT) {
UI_GetThemeColorType4ubv(TH_ACTIVE, SPACE_VIEW3D, col);
col[3]= 100;
}
active= 1; /* means it draws white text */
}
- else if(ob->flag & SELECT) {
+ else if (ob->flag & SELECT) {
UI_GetThemeColorType4ubv(TH_SELECT, SPACE_VIEW3D, col);
col[3]= 100;
}
@@ -1317,24 +1318,24 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
}
}
- else if(scene->obedit && scene->obedit->data==tselem->id) {
+ else if (scene->obedit && scene->obedit->data==tselem->id) {
glColor4ub(255, 255, 255, 100);
active= 2;
}
else {
- if(tree_element_active(C, scene, soops, te, 0)) {
+ if (tree_element_active(C, scene, soops, te, 0)) {
glColor4ub(220, 220, 255, 100);
active= 2;
}
}
}
else {
- if( tree_element_type_active(NULL, scene, soops, te, tselem, 0) ) active= 2;
+ if ( tree_element_type_active(NULL, scene, soops, te, tselem, 0) ) active= 2;
glColor4ub(220, 220, 255, 100);
}
/* active circle */
- if(active) {
+ if (active) {
uiSetRoundBox(UI_CNR_ALL);
uiRoundBox( (float)startx+UI_UNIT_Y-1.5f*ufac, (float)*starty+2.0f*ufac, (float)startx+2.0f*UI_UNIT_Y-4.0f*ufac, (float)*starty+UI_UNIT_Y-1.0f*ufac, UI_UNIT_Y/2.0f-2.0f*ufac);
glEnable(GL_BLEND); /* roundbox disables it */
@@ -1343,15 +1344,15 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
}
/* open/close icon, only when sublevels, except for scene */
- if(te->subtree.first || (tselem->type==0 && te->idcode==ID_SCE) || (te->flag & TE_LAZY_CLOSED)) {
+ if (te->subtree.first || (tselem->type==0 && te->idcode==ID_SCE) || (te->flag & TE_LAZY_CLOSED)) {
int icon_x;
- if(tselem->type==0 && ELEM(te->idcode, ID_OB, ID_SCE))
+ if (tselem->type==0 && ELEM(te->idcode, ID_OB, ID_SCE))
icon_x = startx;
else
icon_x = startx+5*ufac;
// icons a bit higher
- if(TSELEM_OPEN(tselem,soops))
+ if (TSELEM_OPEN(tselem,soops))
UI_icon_draw((float)icon_x, (float)*starty+2*ufac, ICON_DISCLOSURE_TRI_DOWN);
else
UI_icon_draw((float)icon_x, (float)*starty+2*ufac, ICON_DISCLOSURE_TRI_RIGHT);
@@ -1360,7 +1361,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
/* datatype icon */
- if(!(ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM))) {
+ if (!(ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM))) {
// icons a bit higher
tselem_draw_icon(block, xmax, (float)startx+offsx - 0.5f*ufac, (float)*starty+2.0f*ufac, tselem, te, 1.0f);
@@ -1369,9 +1370,9 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
else
offsx+= 2*ufac;
- if(tselem->type==0 && tselem->id->lib) {
+ if (tselem->type==0 && tselem->id->lib) {
glPixelTransferf(GL_ALPHA_SCALE, 0.5f);
- if(tselem->id->flag & LIB_INDIRECT)
+ if (tselem->id->flag & LIB_INDIRECT)
UI_icon_draw((float)startx+offsx, (float)*starty+2*ufac, ICON_LIBRARY_DATA_INDIRECT);
else
UI_icon_draw((float)startx+offsx, (float)*starty+2*ufac, ICON_LIBRARY_DATA_DIRECT);
@@ -1381,8 +1382,8 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
glDisable(GL_BLEND);
/* name */
- if(active==1) UI_ThemeColor(TH_TEXT_HI);
- else if(ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) UI_ThemeColorBlend(TH_BACK, TH_TEXT, 0.75f);
+ if (active==1) UI_ThemeColor(TH_TEXT_HI);
+ else if (ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) UI_ThemeColorBlend(TH_BACK, TH_TEXT, 0.75f);
else UI_ThemeColor(TH_TEXT);
UI_DrawString(startx+offsx, *starty+5*ufac, te->name);
@@ -1390,10 +1391,10 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
offsx+= (int)(UI_UNIT_X + UI_GetStringWidth(te->name));
/* closed item, we draw the icons, not when it's a scene, or master-server list though */
- if(!TSELEM_OPEN(tselem,soops)) {
- if(te->subtree.first) {
- if(tselem->type==0 && te->idcode==ID_SCE);
- else if(tselem->type!=TSE_R_LAYER) { /* this tree element always has same amount of branches, so dont draw */
+ if (!TSELEM_OPEN(tselem,soops)) {
+ if (te->subtree.first) {
+ if (tselem->type==0 && te->idcode==ID_SCE);
+ else if (tselem->type!=TSE_R_LAYER) { /* this tree element always has same amount of branches, so don't draw */
int tempx= startx+offsx;
// divider
@@ -1416,14 +1417,14 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
te->ys= (float)*starty;
te->xend= startx+offsx;
- if(TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem,soops)) {
*starty-= UI_UNIT_Y;
- for(ten= te->subtree.first; ten; ten= ten->next)
+ for (ten= te->subtree.first; ten; ten= ten->next)
outliner_draw_tree_element(C, block, scene, ar, soops, ten, startx+UI_UNIT_X, starty);
}
else {
- for(ten= te->subtree.first; ten; ten= ten->next)
+ for (ten= te->subtree.first; ten; ten= ten->next)
outliner_set_coord_tree_element(soops, te, startx, starty);
*starty-= UI_UNIT_Y;
@@ -1436,28 +1437,28 @@ static void outliner_draw_hierarchy(SpaceOops *soops, ListBase *lb, int startx,
TreeStoreElem *tselem;
int y1, y2;
- if(lb->first==NULL) return;
+ if (lb->first==NULL) return;
y1=y2= *starty; /* for vertical lines between objects */
- for(te=lb->first; te; te= te->next) {
+ for (te=lb->first; te; te= te->next) {
y2= *starty;
tselem= TREESTORE(te);
/* horizontal line? */
- if(tselem->type==0 && (te->idcode==ID_OB || te->idcode==ID_SCE))
+ if (tselem->type==0 && (te->idcode==ID_OB || te->idcode==ID_SCE))
glRecti(startx, *starty, startx+UI_UNIT_X, *starty-1);
*starty-= UI_UNIT_Y;
- if(TSELEM_OPEN(tselem,soops))
+ if (TSELEM_OPEN(tselem,soops))
outliner_draw_hierarchy(soops, &te->subtree, startx+UI_UNIT_X, starty);
}
/* vertical line */
te= lb->last;
- if(te->parent || lb->first!=lb->last) {
+ if (te->parent || lb->first!=lb->last) {
tselem= TREESTORE(te);
- if(tselem->type==0 && te->idcode==ID_OB) {
+ if (tselem->type==0 && te->idcode==ID_OB) {
glRecti(startx, y1+UI_UNIT_Y, startx+1, y2);
}
@@ -1469,18 +1470,18 @@ static void outliner_draw_struct_marks(ARegion *ar, SpaceOops *soops, ListBase *
TreeElement *te;
TreeStoreElem *tselem;
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
/* selection status */
- if(TSELEM_OPEN(tselem,soops))
- if(tselem->type == TSE_RNA_STRUCT)
+ if (TSELEM_OPEN(tselem,soops))
+ if (tselem->type == TSE_RNA_STRUCT)
glRecti(0, *starty+1, (int)ar->v2d.cur.xmax+V2D_SCROLL_WIDTH, *starty+UI_UNIT_Y-1);
*starty-= UI_UNIT_Y;
- if(TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem,soops)) {
outliner_draw_struct_marks(ar, soops, &te->subtree, starty);
- if(tselem->type == TSE_RNA_STRUCT)
+ if (tselem->type == TSE_RNA_STRUCT)
fdrawline(0, (float)*starty+UI_UNIT_Y, ar->v2d.cur.xmax+V2D_SCROLL_WIDTH, (float)*starty+UI_UNIT_Y);
}
}
@@ -1491,15 +1492,15 @@ static void outliner_draw_selection(ARegion *ar, SpaceOops *soops, ListBase *lb,
TreeElement *te;
TreeStoreElem *tselem;
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
/* selection status */
- if(tselem->flag & TSE_SELECTED) {
+ if (tselem->flag & TSE_SELECTED) {
glRecti(0, *starty+1, (int)ar->v2d.cur.xmax, *starty+UI_UNIT_Y-1);
}
*starty-= UI_UNIT_Y;
- if(TSELEM_OPEN(tselem,soops)) outliner_draw_selection(ar, soops, &te->subtree, starty);
+ if (TSELEM_OPEN(tselem,soops)) outliner_draw_selection(ar, soops, &te->subtree, starty);
}
}
@@ -1535,7 +1536,7 @@ static void outliner_draw_tree(bContext *C, uiBlock *block, Scene *scene, ARegio
// items themselves
starty= (int)ar->v2d.tot.ymax-UI_UNIT_Y-OL_Y_OFFSET;
startx= 0;
- for(te= soops->tree.first; te; te= te->next) {
+ for (te= soops->tree.first; te; te= te->next) {
outliner_draw_tree_element(C, block, scene, ar, soops, te, startx, &starty);
}
}
@@ -1549,7 +1550,7 @@ static void outliner_back(ARegion *ar)
ystart= (int)ar->v2d.tot.ymax;
ystart= UI_UNIT_Y*(ystart/(UI_UNIT_Y))-OL_Y_OFFSET;
- while(ystart+2*UI_UNIT_Y > ar->v2d.cur.ymin) {
+ while (ystart+2*UI_UNIT_Y > ar->v2d.cur.ymin) {
glRecti(0, ystart, (int)ar->v2d.cur.xmax+V2D_SCROLL_WIDTH, ystart+UI_UNIT_Y);
ystart-= 2*UI_UNIT_Y;
}
@@ -1567,7 +1568,7 @@ static void outliner_draw_restrictcols(ARegion *ar)
ystart= (int)ar->v2d.tot.ymax;
ystart= UI_UNIT_Y*(ystart/(UI_UNIT_Y))-OL_Y_OFFSET;
- while(ystart+2*UI_UNIT_Y > ar->v2d.cur.ymin) {
+ while (ystart+2*UI_UNIT_Y > ar->v2d.cur.ymin) {
glRecti((int)ar->v2d.cur.xmax-OL_TOGW, ystart, (int)ar->v2d.cur.xmax, ystart+UI_UNIT_Y);
ystart-= 2*UI_UNIT_Y;
}
@@ -1660,12 +1661,12 @@ void draw_outliner(const bContext *C)
block= uiBeginBlock(C, ar, __func__, UI_EMBOSS);
outliner_draw_tree((bContext *)C, block, scene, ar, soops);
- if(ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) {
+ if (ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) {
/* draw rna buttons */
outliner_draw_rnacols(ar, sizex_rna);
outliner_draw_rnabuts(block, scene, ar, soops, sizex_rna, &soops->tree);
}
- else if(soops->outlinevis == SO_KEYMAP) {
+ else if (soops->outlinevis == SO_KEYMAP) {
outliner_draw_keymapbuts(block, ar, soops, &soops->tree);
}
else if (!(soops->flag & SO_HIDE_RESTRICTCOLS)) {
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index e844688b6c2..c59cd626a93 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -158,24 +158,24 @@ static void outliner_open_reveal(SpaceOops *soops, ListBase *lb, TreeElement *te
static int do_outliner_item_openclose(bContext *C, SpaceOops *soops, TreeElement *te, int all, const float mval[2])
{
- if(mval[1]>te->ys && mval[1]<te->ys+UI_UNIT_Y) {
+ if (mval[1]>te->ys && mval[1]<te->ys+UI_UNIT_Y) {
TreeStoreElem *tselem= TREESTORE(te);
/* all below close/open? */
- if(all) {
+ if (all) {
tselem->flag &= ~TSE_CLOSED;
outliner_set_flag(soops, &te->subtree, TSE_CLOSED, !outliner_has_one_flag(soops, &te->subtree, TSE_CLOSED, 1));
}
else {
- if(tselem->flag & TSE_CLOSED) tselem->flag &= ~TSE_CLOSED;
+ if (tselem->flag & TSE_CLOSED) tselem->flag &= ~TSE_CLOSED;
else tselem->flag |= TSE_CLOSED;
}
return 1;
}
- for(te= te->subtree.first; te; te= te->next) {
- if(do_outliner_item_openclose(C, soops, te, all, mval))
+ for (te= te->subtree.first; te; te= te->next) {
+ if (do_outliner_item_openclose(C, soops, te, all, mval))
return 1;
}
return 0;
@@ -193,8 +193,8 @@ static int outliner_item_openclose(bContext *C, wmOperator *op, wmEvent *event)
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], fmval, fmval+1);
- for(te= soops->tree.first; te; te= te->next) {
- if(do_outliner_item_openclose(C, soops, te, all, fmval))
+ for (te= soops->tree.first; te; te= te->next) {
+ if (do_outliner_item_openclose(C, soops, te, all, fmval))
break;
}
@@ -205,13 +205,13 @@ static int outliner_item_openclose(bContext *C, wmOperator *op, wmEvent *event)
void OUTLINER_OT_item_openclose(wmOperatorType *ot)
{
- ot->name= "Open/Close Item";
- ot->idname= "OUTLINER_OT_item_openclose";
- ot->description= "Toggle whether item under cursor is enabled or closed";
+ ot->name = "Open/Close Item";
+ ot->idname = "OUTLINER_OT_item_openclose";
+ ot->description = "Toggle whether item under cursor is enabled or closed";
- ot->invoke= outliner_item_openclose;
+ ot->invoke = outliner_item_openclose;
- ot->poll= ED_operator_outliner_active;
+ ot->poll = ED_operator_outliner_active;
RNA_def_boolean(ot->srna, "all", 1, "All", "Close or open all items");
}
@@ -221,21 +221,21 @@ void OUTLINER_OT_item_openclose(wmOperatorType *ot)
static void do_item_rename(ARegion *ar, TreeElement *te, TreeStoreElem *tselem, ReportList *reports)
{
/* can't rename rna datablocks entries */
- if(ELEM3(tselem->type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) {
+ if (ELEM3(tselem->type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) {
/* do nothing */;
}
- else if(ELEM10(tselem->type, TSE_ANIM_DATA, TSE_NLA, TSE_DEFGROUP_BASE, TSE_CONSTRAINT_BASE, TSE_MODIFIER_BASE,
+ else if (ELEM10(tselem->type, TSE_ANIM_DATA, TSE_NLA, TSE_DEFGROUP_BASE, TSE_CONSTRAINT_BASE, TSE_MODIFIER_BASE,
TSE_SCRIPT_BASE, TSE_POSE_BASE, TSE_POSEGRP_BASE, TSE_R_LAYER_BASE, TSE_R_PASS))
{
BKE_report(reports, RPT_WARNING, "Cannot edit builtin name");
}
- else if(ELEM3(tselem->type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP)) {
+ else if (ELEM3(tselem->type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP)) {
BKE_report(reports, RPT_WARNING, "Cannot edit sequence name");
}
- else if(tselem->id->lib) {
+ else if (tselem->id->lib) {
// XXX error_libdata();
}
- else if(te->idcode == ID_LI && te->parent) {
+ else if (te->idcode == ID_LI && te->parent) {
BKE_report(reports, RPT_WARNING, "Cannot edit the path of an indirectly linked library");
}
else {
@@ -255,19 +255,19 @@ static int do_outliner_item_rename(bContext *C, ARegion *ar, SpaceOops *soops, T
{
ReportList *reports= CTX_wm_reports(C); // XXX
- if(mval[1]>te->ys && mval[1]<te->ys+UI_UNIT_Y) {
+ if (mval[1]>te->ys && mval[1]<te->ys+UI_UNIT_Y) {
TreeStoreElem *tselem= TREESTORE(te);
/* name and first icon */
- if(mval[0]>te->xs+UI_UNIT_X && mval[0]<te->xend) {
+ if (mval[0]>te->xs+UI_UNIT_X && mval[0]<te->xend) {
do_item_rename(ar, te, tselem, reports);
}
return 1;
}
- for(te= te->subtree.first; te; te= te->next) {
- if(do_outliner_item_rename(C, ar, soops, te, mval)) return 1;
+ for (te= te->subtree.first; te; te= te->next) {
+ if (do_outliner_item_rename(C, ar, soops, te, mval)) return 1;
}
return 0;
}
@@ -281,8 +281,8 @@ static int outliner_item_rename(bContext *C, wmOperator *UNUSED(op), wmEvent *ev
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], fmval, fmval+1);
- for(te= soops->tree.first; te; te= te->next) {
- if(do_outliner_item_rename(C, ar, soops, te, fmval)) break;
+ for (te= soops->tree.first; te; te= te->next) {
+ if (do_outliner_item_rename(C, ar, soops, te, fmval)) break;
}
return OPERATOR_FINISHED;
@@ -291,13 +291,13 @@ static int outliner_item_rename(bContext *C, wmOperator *UNUSED(op), wmEvent *ev
void OUTLINER_OT_item_rename(wmOperatorType *ot)
{
- ot->name= "Rename Item";
- ot->idname= "OUTLINER_OT_item_rename";
- ot->description= "Rename item under cursor";
+ ot->name = "Rename Item";
+ ot->idname = "OUTLINER_OT_item_rename";
+ ot->description = "Rename item under cursor";
- ot->invoke= outliner_item_rename;
+ ot->invoke = outliner_item_rename;
- ot->poll= ED_operator_outliner_active;
+ ot->poll = ED_operator_outliner_active;
}
/* ************************************************************** */
@@ -313,10 +313,10 @@ static int outliner_count_levels(SpaceOops *soops, ListBase *lb, int curlevel)
TreeElement *te;
int level=curlevel, lev;
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
lev= outliner_count_levels(soops, &te->subtree, curlevel+1);
- if(lev>level) level= lev;
+ if (lev>level) level= lev;
}
return level;
}
@@ -327,12 +327,12 @@ int outliner_has_one_flag(SpaceOops *soops, ListBase *lb, short flag, short curl
TreeStoreElem *tselem;
int level;
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(tselem->flag & flag) return curlevel;
+ if (tselem->flag & flag) return curlevel;
level= outliner_has_one_flag(soops, &te->subtree, flag, curlevel+1);
- if(level) return level;
+ if (level) return level;
}
return 0;
}
@@ -342,9 +342,9 @@ void outliner_set_flag(SpaceOops *soops, ListBase *lb, short flag, short set)
TreeElement *te;
TreeStoreElem *tselem;
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(set==0) tselem->flag &= ~flag;
+ if (set==0) tselem->flag &= ~flag;
else tselem->flag |= flag;
outliner_set_flag(soops, &te->subtree, flag, set);
}
@@ -385,10 +385,10 @@ void object_toggle_visibility_cb(bContext *C, Scene *scene, TreeElement *te, Tre
Object *ob = (Object *)tselem->id;
/* add check for edit mode */
- if(!common_restrict_check(C, ob)) return;
+ if (!common_restrict_check(C, ob)) return;
- if(base || (base= object_in_scene(ob, scene))) {
- if((base->object->restrictflag ^= OB_RESTRICT_VIEW)) {
+ if (base || (base= object_in_scene(ob, scene))) {
+ if ((base->object->restrictflag ^= OB_RESTRICT_VIEW)) {
ED_base_object_select(base, BA_DESELECT);
}
}
@@ -417,15 +417,15 @@ static int outliner_toggle_visibility_exec(bContext *C, wmOperator *UNUSED(op))
void OUTLINER_OT_visibility_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Visibility";
- ot->idname= "OUTLINER_OT_visibility_toggle";
- ot->description= "Toggle the visibility of selected items";
+ ot->name = "Toggle Visibility";
+ ot->idname = "OUTLINER_OT_visibility_toggle";
+ ot->description = "Toggle the visibility of selected items";
/* callbacks */
- ot->exec= outliner_toggle_visibility_exec;
- ot->poll= ED_operator_outliner_active_no_editobject;
+ ot->exec = outliner_toggle_visibility_exec;
+ ot->poll = ED_operator_outliner_active_no_editobject;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* Toggle Selectability ---------------------------------------- */
@@ -434,8 +434,8 @@ void object_toggle_selectability_cb(bContext *UNUSED(C), Scene *scene, TreeEleme
{
Base *base= (Base *)te->directdata;
- if(base==NULL) base= object_in_scene((Object *)tselem->id, scene);
- if(base) {
+ if (base==NULL) base= object_in_scene((Object *)tselem->id, scene);
+ if (base) {
base->object->restrictflag^=OB_RESTRICT_SELECT;
}
}
@@ -463,15 +463,15 @@ static int outliner_toggle_selectability_exec(bContext *C, wmOperator *UNUSED(op
void OUTLINER_OT_selectability_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Selectability";
- ot->idname= "OUTLINER_OT_selectability_toggle";
- ot->description= "Toggle the selectability";
+ ot->name = "Toggle Selectability";
+ ot->idname = "OUTLINER_OT_selectability_toggle";
+ ot->description = "Toggle the selectability";
/* callbacks */
- ot->exec= outliner_toggle_selectability_exec;
- ot->poll= ED_operator_outliner_active_no_editobject;
+ ot->exec = outliner_toggle_selectability_exec;
+ ot->poll = ED_operator_outliner_active_no_editobject;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* Toggle Renderability ---------------------------------------- */
@@ -480,8 +480,8 @@ void object_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeEleme
{
Base *base= (Base *)te->directdata;
- if(base==NULL) base= object_in_scene((Object *)tselem->id, scene);
- if(base) {
+ if (base==NULL) base= object_in_scene((Object *)tselem->id, scene);
+ if (base) {
base->object->restrictflag^=OB_RESTRICT_RENDER;
}
}
@@ -507,15 +507,15 @@ static int outliner_toggle_renderability_exec(bContext *C, wmOperator *UNUSED(op
void OUTLINER_OT_renderability_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Renderability";
- ot->idname= "OUTLINER_OT_renderability_toggle";
- ot->description= "Toggle the renderability of selected items";
+ ot->name = "Toggle Renderability";
+ ot->idname = "OUTLINER_OT_renderability_toggle";
+ ot->description = "Toggle the renderability of selected items";
/* callbacks */
- ot->exec= outliner_toggle_renderability_exec;
- ot->poll= ED_operator_outliner_active;
+ ot->exec = outliner_toggle_renderability_exec;
+ ot->poll = ED_operator_outliner_active;
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* =============================================== */
@@ -541,13 +541,13 @@ static int outliner_toggle_expanded_exec(bContext *C, wmOperator *UNUSED(op))
void OUTLINER_OT_expanded_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Expand/Collapse All";
- ot->idname= "OUTLINER_OT_expanded_toggle";
- ot->description= "Expand/Collapse all items";
+ ot->name = "Expand/Collapse All";
+ ot->idname = "OUTLINER_OT_expanded_toggle";
+ ot->description = "Expand/Collapse all items";
/* callbacks */
- ot->exec= outliner_toggle_expanded_exec;
- ot->poll= ED_operator_outliner_active;
+ ot->exec = outliner_toggle_expanded_exec;
+ ot->poll = ED_operator_outliner_active;
/* no undo or registry, UI option */
}
@@ -576,13 +576,13 @@ static int outliner_toggle_selected_exec(bContext *C, wmOperator *UNUSED(op))
void OUTLINER_OT_selected_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Selected";
- ot->idname= "OUTLINER_OT_selected_toggle";
- ot->description= "Toggle the Outliner selection of items";
+ ot->name = "Toggle Selected";
+ ot->idname = "OUTLINER_OT_selected_toggle";
+ ot->description = "Toggle the Outliner selection of items";
/* callbacks */
- ot->exec= outliner_toggle_selected_exec;
- ot->poll= ED_operator_outliner_active;
+ ot->exec = outliner_toggle_selected_exec;
+ ot->poll = ED_operator_outliner_active;
/* no undo or registry, UI option */
}
@@ -612,8 +612,8 @@ static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op))
ytop= (int)(te->ys + (v2d->mask.ymax - v2d->mask.ymin)/2);
if (ytop>0) ytop= 0;
- v2d->cur.ymax= (float)ytop;
- v2d->cur.ymin= (float)(ytop-(v2d->mask.ymax - v2d->mask.ymin));
+ v2d->cur.ymax = (float)ytop;
+ v2d->cur.ymin = (float)(ytop-(v2d->mask.ymax - v2d->mask.ymin));
/* make te->xs ==> te->xend center of view */
xdelta = (int)(te->xs - v2d->cur.xmin);
@@ -631,13 +631,13 @@ static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op))
void OUTLINER_OT_show_active(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Show Active";
- ot->idname= "OUTLINER_OT_show_active";
- ot->description= "Adjust the view so that the active Object is shown centered";
+ ot->name = "Show Active";
+ ot->idname = "OUTLINER_OT_show_active";
+ ot->description = "Adjust the view so that the active Object is shown centered";
/* callbacks */
- ot->exec= outliner_show_active_exec;
- ot->poll= ED_operator_outliner_active;
+ ot->exec = outliner_show_active_exec;
+ ot->poll = ED_operator_outliner_active;
}
/* View Panning --------------------------------------------------- */
@@ -648,10 +648,10 @@ static int outliner_scroll_page_exec(bContext *C, wmOperator *op)
int dy= ar->v2d.mask.ymax - ar->v2d.mask.ymin;
int up= 0;
- if(RNA_boolean_get(op->ptr, "up"))
+ if (RNA_boolean_get(op->ptr, "up"))
up= 1;
- if(up == 0) dy= -dy;
+ if (up == 0) dy= -dy;
ar->v2d.cur.ymin+= dy;
ar->v2d.cur.ymax+= dy;
@@ -664,13 +664,13 @@ static int outliner_scroll_page_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_scroll_page(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Scroll Page";
- ot->idname= "OUTLINER_OT_scroll_page";
- ot->description= "Scroll page up or down";
+ ot->name = "Scroll Page";
+ ot->idname = "OUTLINER_OT_scroll_page";
+ ot->description = "Scroll page up or down";
/* callbacks */
- ot->exec= outliner_scroll_page_exec;
- ot->poll= ED_operator_outliner_active;
+ ot->exec = outliner_scroll_page_exec;
+ ot->poll = ED_operator_outliner_active;
/* properties */
RNA_def_boolean(ot->srna, "up", 0, "Up", "Scroll up one page");
@@ -691,9 +691,9 @@ static void outliner_set_coordinates_element(SpaceOops *soops, TreeElement *te,
te->ys= (float)(*starty);
*starty-= UI_UNIT_Y;
- if(TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem,soops)) {
TreeElement *ten;
- for(ten= te->subtree.first; ten; ten= ten->next) {
+ for (ten= te->subtree.first; ten; ten= ten->next) {
outliner_set_coordinates_element(soops, ten, startx+UI_UNIT_X, starty);
}
}
@@ -707,7 +707,7 @@ static void outliner_set_coordinates(ARegion *ar, SpaceOops *soops)
int starty= (int)(ar->v2d.tot.ymax)-UI_UNIT_Y;
int startx= 0;
- for(te= soops->tree.first; te; te= te->next) {
+ for (te= soops->tree.first; te; te= te->next) {
outliner_set_coordinates_element(soops, te, startx, &starty);
}
}
@@ -720,7 +720,7 @@ static TreeElement *outliner_find_named(SpaceOops *soops, ListBase *lb, char *na
for (te= lb->first; te; te= te->next) {
int found = outliner_filter_has_name(te, name, flags);
- if(found) {
+ if (found) {
/* name is right, but is element the previous one? */
if (prev) {
if ((te != prev) && (*prevFound))
@@ -734,7 +734,7 @@ static TreeElement *outliner_find_named(SpaceOops *soops, ListBase *lb, char *na
}
tes= outliner_find_named(soops, &te->subtree, name, flags, prev, prevFound);
- if(tes) return tes;
+ if (tes) return tes;
}
/* nothing valid found */
@@ -781,7 +781,7 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so
tselem= TREESTORE(te);
if (tselem) {
/* expand branches so that it will be visible, we need to get correct coordinates */
- if( outliner_open_back(soops, te))
+ if ( outliner_open_back(soops, te))
outliner_set_coordinates(ar, soops);
/* deselect all visible, and select found element */
@@ -790,9 +790,9 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so
/* make te->ys center of view */
ytop= (int)(te->ys + (ar->v2d.mask.ymax-ar->v2d.mask.ymin)/2);
- if(ytop>0) ytop= 0;
- ar->v2d.cur.ymax= (float)ytop;
- ar->v2d.cur.ymin= (float)(ytop-(ar->v2d.mask.ymax-ar->v2d.mask.ymin));
+ if (ytop>0) ytop= 0;
+ ar->v2d.cur.ymax = (float)ytop;
+ ar->v2d.cur.ymin = (float)(ytop-(ar->v2d.mask.ymax-ar->v2d.mask.ymin));
/* make te->xs ==> te->xend center of view */
xdelta = (int)(te->xs - ar->v2d.cur.xmin);
@@ -824,14 +824,14 @@ static void outliner_openclose_level(SpaceOops *soops, ListBase *lb, int curleve
TreeElement *te;
TreeStoreElem *tselem;
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(open) {
- if(curlevel<=level) tselem->flag &= ~TSE_CLOSED;
+ if (open) {
+ if (curlevel<=level) tselem->flag &= ~TSE_CLOSED;
}
else {
- if(curlevel>=level) tselem->flag |= TSE_CLOSED;
+ if (curlevel>=level) tselem->flag |= TSE_CLOSED;
}
outliner_openclose_level(soops, &te->subtree, curlevel+1, level, open);
@@ -846,12 +846,12 @@ static int outliner_one_level_exec(bContext *C, wmOperator *op)
int level;
level= outliner_has_one_flag(soops, &soops->tree, TSE_CLOSED, 1);
- if(add==1) {
- if(level) outliner_openclose_level(soops, &soops->tree, 1, level, 1);
+ if (add==1) {
+ if (level) outliner_openclose_level(soops, &soops->tree, 1, level, 1);
}
else {
- if(level==0) level= outliner_count_levels(soops, &soops->tree, 0);
- if(level) outliner_openclose_level(soops, &soops->tree, 1, level-1, 0);
+ if (level==0) level= outliner_count_levels(soops, &soops->tree, 0);
+ if (level) outliner_openclose_level(soops, &soops->tree, 1, level-1, 0);
}
ED_region_tag_redraw(ar);
@@ -862,13 +862,13 @@ static int outliner_one_level_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_show_one_level(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Show/Hide One Level";
- ot->idname= "OUTLINER_OT_show_one_level";
- ot->description= "Expand/collapse all entries by one level";
+ ot->name = "Show/Hide One Level";
+ ot->idname = "OUTLINER_OT_show_one_level";
+ ot->description = "Expand/collapse all entries by one level";
/* callbacks */
- ot->exec= outliner_one_level_exec;
- ot->poll= ED_operator_outliner_active;
+ ot->exec = outliner_one_level_exec;
+ ot->poll = ED_operator_outliner_active;
/* no undo or registry, UI option */
@@ -884,10 +884,10 @@ static int subtree_has_objects(SpaceOops *soops, ListBase *lb)
TreeElement *te;
TreeStoreElem *tselem;
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(tselem->type==0 && te->idcode==ID_OB) return 1;
- if( subtree_has_objects(soops, &te->subtree)) return 1;
+ if (tselem->type==0 && te->idcode==ID_OB) return 1;
+ if ( subtree_has_objects(soops, &te->subtree)) return 1;
}
return 0;
}
@@ -899,22 +899,22 @@ static void tree_element_show_hierarchy(Scene *scene, SpaceOops *soops, ListBase
TreeStoreElem *tselem;
/* open all object elems, close others */
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(tselem->type==0) {
- if(te->idcode==ID_SCE) {
- if(tselem->id!=(ID *)scene) tselem->flag |= TSE_CLOSED;
+ if (tselem->type==0) {
+ if (te->idcode==ID_SCE) {
+ if (tselem->id!=(ID *)scene) tselem->flag |= TSE_CLOSED;
else tselem->flag &= ~TSE_CLOSED;
}
- else if(te->idcode==ID_OB) {
- if(subtree_has_objects(soops, &te->subtree)) tselem->flag &= ~TSE_CLOSED;
+ else if (te->idcode==ID_OB) {
+ if (subtree_has_objects(soops, &te->subtree)) tselem->flag &= ~TSE_CLOSED;
else tselem->flag |= TSE_CLOSED;
}
}
else tselem->flag |= TSE_CLOSED;
- if(TSELEM_OPEN(tselem,soops)) tree_element_show_hierarchy(scene, soops, &te->subtree);
+ if (TSELEM_OPEN(tselem,soops)) tree_element_show_hierarchy(scene, soops, &te->subtree);
}
}
@@ -936,13 +936,13 @@ static int outliner_show_hierarchy_exec(bContext *C, wmOperator *UNUSED(op))
void OUTLINER_OT_show_hierarchy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Show Hierarchy";
- ot->idname= "OUTLINER_OT_show_hierarchy";
- ot->description= "Open all object entries and close all others";
+ ot->name = "Show Hierarchy";
+ ot->idname = "OUTLINER_OT_show_hierarchy";
+ ot->description = "Open all object entries and close all others";
/* callbacks */
- ot->exec= outliner_show_hierarchy_exec;
- ot->poll= ED_operator_outliner_active; // TODO: shouldn't be allowed in RNA views...
+ ot->exec = outliner_show_hierarchy_exec;
+ ot->poll = ED_operator_outliner_active; // TODO: shouldn't be allowed in RNA views...
/* no undo or registry, UI option */
}
@@ -1013,12 +1013,12 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
/* just 'append' property to path
* - to prevent memory leaks, we must write to newpath not path, then free old path + swap them
*/
- if(tse->type == TSE_RNA_PROPERTY) {
- if(RNA_property_type(prop) == PROP_POINTER) {
+ if (tse->type == TSE_RNA_PROPERTY) {
+ if (RNA_property_type(prop) == PROP_POINTER) {
/* for pointer we just append property name */
newpath= RNA_path_append(*path, ptr, prop, 0, NULL);
}
- else if(RNA_property_type(prop) == PROP_COLLECTION) {
+ else if (RNA_property_type(prop) == PROP_COLLECTION) {
char buf[128], *name;
temnext= (TreeElement*)(ld->next->data);
@@ -1027,19 +1027,19 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
nextptr= &temnext->rnaptr;
name= RNA_struct_name_get_alloc(nextptr, buf, sizeof(buf), NULL);
- if(name) {
+ if (name) {
/* if possible, use name as a key in the path */
newpath= RNA_path_append(*path, NULL, prop, 0, name);
- if(name != buf)
+ if (name != buf)
MEM_freeN(name);
}
else {
/* otherwise use index */
int index= 0;
- for(temsub=tem->subtree.first; temsub; temsub=temsub->next, index++)
- if(temsub == temnext)
+ for (temsub=tem->subtree.first; temsub; temsub=temsub->next, index++)
+ if (temsub == temnext)
break;
newpath= RNA_path_append(*path, NULL, prop, index, NULL);
@@ -1049,7 +1049,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
}
}
- if(newpath) {
+ if (newpath) {
if (*path) MEM_freeN(*path);
*path= newpath;
newpath= NULL;
@@ -1059,11 +1059,11 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
/* no ID, so check if entry is RNA-struct, and if that RNA-struct is an ID datablock to extract info from */
if (tse->type == TSE_RNA_STRUCT) {
/* ptr->data not ptr->id.data seems to be the one we want, since ptr->data is sometimes the owner of this ID? */
- if(RNA_struct_is_ID(ptr->type)) {
+ if (RNA_struct_is_ID(ptr->type)) {
*id= (ID *)ptr->data;
/* clear path */
- if(*path) {
+ if (*path) {
MEM_freeN(*path);
path= NULL;
}
@@ -1206,13 +1206,13 @@ static int outliner_drivers_addsel_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_drivers_add_selected(wmOperatorType *ot)
{
/* api callbacks */
- ot->idname= "OUTLINER_OT_drivers_add_selected";
- ot->name= "Add Drivers for Selected";
- ot->description= "Add drivers to selected items";
+ ot->idname = "OUTLINER_OT_drivers_add_selected";
+ ot->name = "Add Drivers for Selected";
+ ot->description = "Add drivers to selected items";
/* api callbacks */
- ot->exec= outliner_drivers_addsel_exec;
- ot->poll= ed_operator_outliner_datablocks_active;
+ ot->exec = outliner_drivers_addsel_exec;
+ ot->poll = ed_operator_outliner_datablocks_active;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1241,13 +1241,13 @@ static int outliner_drivers_deletesel_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_drivers_delete_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->idname= "OUTLINER_OT_drivers_delete_selected";
- ot->name= "Delete Drivers for Selected";
- ot->description= "Delete drivers assigned to selected items";
+ ot->idname = "OUTLINER_OT_drivers_delete_selected";
+ ot->name = "Delete Drivers for Selected";
+ ot->description = "Delete drivers assigned to selected items";
/* api callbacks */
- ot->exec= outliner_drivers_deletesel_exec;
- ot->poll= ed_operator_outliner_datablocks_active;
+ ot->exec = outliner_drivers_deletesel_exec;
+ ot->poll = ed_operator_outliner_datablocks_active;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1380,13 +1380,13 @@ static int outliner_keyingset_additems_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_keyingset_add_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->idname= "OUTLINER_OT_keyingset_add_selected";
- ot->name= "Keying Set Add Selected";
- ot->description= "Add selected items (blue-grey rows) to active Keying Set";
+ ot->idname = "OUTLINER_OT_keyingset_add_selected";
+ ot->name = "Keying Set Add Selected";
+ ot->description = "Add selected items (blue-grey rows) to active Keying Set";
/* api callbacks */
- ot->exec= outliner_keyingset_additems_exec;
- ot->poll= ed_operator_outliner_datablocks_active;
+ ot->exec = outliner_keyingset_additems_exec;
+ ot->poll = ed_operator_outliner_datablocks_active;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1417,13 +1417,13 @@ static int outliner_keyingset_removeitems_exec(bContext *C, wmOperator *UNUSED(o
void OUTLINER_OT_keyingset_remove_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->idname= "OUTLINER_OT_keyingset_remove_selected";
- ot->name= "Keying Set Remove Selected";
+ ot->idname = "OUTLINER_OT_keyingset_remove_selected";
+ ot->name = "Keying Set Remove Selected";
ot->description = "Remove selected items (blue-grey rows) from active Keying Set";
/* api callbacks */
- ot->exec= outliner_keyingset_removeitems_exec;
- ot->poll= ed_operator_outliner_datablocks_active;
+ ot->exec = outliner_keyingset_removeitems_exec;
+ ot->poll = ed_operator_outliner_datablocks_active;
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1508,7 +1508,7 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, wmEvent *event)
if (te_found) break;
}
- if(te_found) {
+ if (te_found) {
RNA_string_set(op->ptr, "parent", te_found->name);
/* Identify parent and child */
RNA_string_get(op->ptr, "child", childname);
@@ -1624,18 +1624,18 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, wmEvent *event)
void OUTLINER_OT_parent_drop(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Drop to Set Parent";
+ ot->name = "Drop to Set Parent";
ot->description = "Drag to parent in Outliner";
- ot->idname= "OUTLINER_OT_parent_drop";
+ ot->idname = "OUTLINER_OT_parent_drop";
/* api callbacks */
- ot->invoke= parent_drop_invoke;
- ot->exec= parent_drop_exec;
+ ot->invoke = parent_drop_invoke;
+ ot->exec = parent_drop_exec;
- ot->poll= ED_operator_outliner_active;
+ ot->poll = ED_operator_outliner_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_string(ot->srna, "child", "Object", MAX_ID_NAME, "Child", "Child Object");
@@ -1702,17 +1702,17 @@ static int parent_clear_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
void OUTLINER_OT_parent_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Drop to Clear Parent";
+ ot->name = "Drop to Clear Parent";
ot->description = "Drag to clear parent in Outliner";
- ot->idname= "OUTLINER_OT_parent_clear";
+ ot->idname = "OUTLINER_OT_parent_clear";
/* api callbacks */
- ot->invoke= parent_clear_invoke;
+ ot->invoke = parent_clear_invoke;
- ot->poll= ED_operator_outliner_active;
+ ot->poll = ED_operator_outliner_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_string(ot->srna, "dragged_obj", "Object", MAX_ID_NAME, "Child", "Child Object");
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c
index 17434d0f6c9..d2ef4573ccf 100644
--- a/source/blender/editors/space_outliner/outliner_ops.c
+++ b/source/blender/editors/space_outliner/outliner_ops.c
@@ -84,7 +84,7 @@ void outliner_operatortypes(void)
void outliner_keymap(wmKeyConfig *keyconf)
{
- wmKeyMap *keymap= WM_keymap_find(keyconf, "Outliner", SPACE_OUTLINER, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "Outliner", SPACE_OUTLINER, 0);
wmKeyMapItem *kmi;
WM_keymap_add_item(keymap, "OUTLINER_OT_item_rename", LEFTMOUSE, KM_DBL_CLICK, 0, 0);
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 4814edf585e..c7aa4dc4e92 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -159,11 +159,11 @@ static int tree_element_active_renderlayer(bContext *C, TreeElement *te, TreeSto
Scene *sce;
/* paranoia check */
- if(te->idcode!=ID_SCE)
+ if (te->idcode!=ID_SCE)
return 0;
sce= (Scene *)tselem->id;
- if(set) {
+ if (set) {
sce->r.actlay= tselem->nr;
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, sce);
}
@@ -181,25 +181,25 @@ static int tree_element_set_active_object(bContext *C, Scene *scene, SpaceOops
Object *ob= NULL;
/* if id is not object, we search back */
- if(te->idcode==ID_OB) ob= (Object *)tselem->id;
+ if (te->idcode==ID_OB) ob= (Object *)tselem->id;
else {
ob= (Object *)outliner_search_back(soops, te, ID_OB);
- if(ob==OBACT) return 0;
+ if (ob==OBACT) return 0;
}
- if(ob==NULL) return 0;
+ if (ob==NULL) return 0;
sce= (Scene *)outliner_search_back(soops, te, ID_SCE);
- if(sce && scene != sce) {
+ if (sce && scene != sce) {
ED_screen_set_scene(C, CTX_wm_screen(C), sce);
}
/* find associated base in current scene */
base= object_in_scene(ob, scene);
- if(base) {
- if(set==2) {
+ if (base) {
+ if (set==2) {
/* swap select */
- if(base->flag & SELECT)
+ if (base->flag & SELECT)
ED_base_object_select(base, BA_DESELECT);
else
ED_base_object_select(base, BA_SELECT);
@@ -209,13 +209,13 @@ static int tree_element_set_active_object(bContext *C, Scene *scene, SpaceOops
scene_deselect_all(scene);
ED_base_object_select(base, BA_SELECT);
}
- if(C) {
+ if (C) {
ED_base_object_activate(C, base); /* adds notifier */
WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
}
}
- if(ob!=scene->obedit)
+ if (ob!=scene->obedit)
ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
return 1;
@@ -229,32 +229,32 @@ static int tree_element_active_material(bContext *C, Scene *scene, SpaceOops *so
/* we search for the object parent */
ob= (Object *)outliner_search_back(soops, te, ID_OB);
// note: ob->matbits can be NULL when a local object points to a library mesh.
- if(ob==NULL || ob!=OBACT || ob->matbits==NULL) return 0; // just paranoia
+ if (ob==NULL || ob!=OBACT || ob->matbits==NULL) return 0; // just paranoia
/* searching in ob mat array? */
tes= te->parent;
- if(tes->idcode==ID_OB) {
- if(set) {
+ if (tes->idcode==ID_OB) {
+ if (set) {
ob->actcol= te->index+1;
ob->matbits[te->index]= 1; // make ob material active too
}
else {
- if(ob->actcol == te->index+1)
- if(ob->matbits[te->index]) return 1;
+ if (ob->actcol == te->index+1)
+ if (ob->matbits[te->index]) return 1;
}
}
/* or we search for obdata material */
else {
- if(set) {
+ if (set) {
ob->actcol= te->index+1;
ob->matbits[te->index]= 0; // make obdata material active too
}
else {
- if(ob->actcol == te->index+1)
- if(ob->matbits[te->index]==0) return 1;
+ if (ob->actcol == te->index+1)
+ if (ob->matbits[te->index]==0) return 1;
}
}
- if(set) {
+ if (set) {
WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING, NULL);
}
return 0;
@@ -267,7 +267,7 @@ static int tree_element_active_texture(bContext *C, Scene *scene, SpaceOops *soo
Object *ob=OBACT;
SpaceButs *sbuts=NULL;
- if(ob==NULL) return 0; // no active object
+ if (ob==NULL) return 0; // no active object
/*tselem= TREESTORE(te);*/ /*UNUSED*/
@@ -278,25 +278,25 @@ static int tree_element_active_texture(bContext *C, Scene *scene, SpaceOops *soo
tep= te->parent;
tselemp= TREESTORE(tep);
- if(tep->idcode==ID_WO) {
+ if (tep->idcode==ID_WO) {
World *wrld= (World *)tselemp->id;
- if(set) {
- if(sbuts) {
+ if (set) {
+ if (sbuts) {
// XXX sbuts->tabo= TAB_SHADING_TEX; // hack from header_buttonswin.c
// XXX sbuts->texfrom= 1;
}
// XXX extern_set_butspace(F6KEY, 0); // force shading buttons texture
wrld->texact= te->index;
}
- else if(tselemp->id == (ID *)(scene->world)) {
- if(wrld->texact==te->index) return 1;
+ else if (tselemp->id == (ID *)(scene->world)) {
+ if (wrld->texact==te->index) return 1;
}
}
- else if(tep->idcode==ID_LA) {
+ else if (tep->idcode==ID_LA) {
Lamp *la= (Lamp *)tselemp->id;
- if(set) {
- if(sbuts) {
+ if (set) {
+ if (sbuts) {
// XXX sbuts->tabo= TAB_SHADING_TEX; // hack from header_buttonswin.c
// XXX sbuts->texfrom= 2;
}
@@ -304,15 +304,15 @@ static int tree_element_active_texture(bContext *C, Scene *scene, SpaceOops *soo
la->texact= te->index;
}
else {
- if(tselemp->id == ob->data) {
- if(la->texact==te->index) return 1;
+ if (tselemp->id == ob->data) {
+ if (la->texact==te->index) return 1;
}
}
}
- else if(tep->idcode==ID_MA) {
+ else if (tep->idcode==ID_MA) {
Material *ma= (Material *)tselemp->id;
- if(set) {
- if(sbuts) {
+ if (set) {
+ if (sbuts) {
//sbuts->tabo= TAB_SHADING_TEX; // hack from header_buttonswin.c
// XXX sbuts->texfrom= 0;
}
@@ -322,12 +322,12 @@ static int tree_element_active_texture(bContext *C, Scene *scene, SpaceOops *soo
/* also set active material */
ob->actcol= tep->index+1;
}
- else if(tep->flag & TE_ACTIVE) { // this is active material
- if(ma->texact==te->index) return 1;
+ else if (tep->flag & TE_ACTIVE) { // this is active material
+ if (ma->texact==te->index) return 1;
}
}
- if(set)
+ if (set)
WM_event_add_notifier(C, NC_TEXTURE, NULL);
return 0;
@@ -340,9 +340,9 @@ static int tree_element_active_lamp(bContext *UNUSED(C), Scene *scene, SpaceOops
/* we search for the object parent */
ob= (Object *)outliner_search_back(soops, te, ID_OB);
- if(ob==NULL || ob!=OBACT) return 0; // just paranoia
+ if (ob==NULL || ob!=OBACT) return 0; // just paranoia
- if(set) {
+ if (set) {
// XXX extern_set_butspace(F5KEY, 0);
}
else return 1;
@@ -354,7 +354,7 @@ static int tree_element_active_camera(bContext *UNUSED(C), Scene *scene, SpaceOo
{
Object *ob= (Object *)outliner_search_back(soops, te, ID_OB);
- if(set)
+ if (set)
return 0;
return scene->camera == ob;
@@ -367,19 +367,19 @@ static int tree_element_active_world(bContext *C, Scene *scene, SpaceOops *soops
Scene *sce=NULL;
tep= te->parent;
- if(tep) {
+ if (tep) {
tselem= TREESTORE(tep);
sce= (Scene *)tselem->id;
}
- if(set) { // make new scene active
- if(sce && scene != sce) {
+ if (set) { // make new scene active
+ if (sce && scene != sce) {
ED_screen_set_scene(C, CTX_wm_screen(C), sce);
}
}
- if(tep==NULL || tselem->id == (ID *)scene) {
- if(set) {
+ if (tep==NULL || tselem->id == (ID *)scene) {
+ if (set) {
// XXX extern_set_butspace(F8KEY, 0);
}
else {
@@ -395,7 +395,7 @@ static int tree_element_active_defgroup(bContext *C, Scene *scene, TreeElement *
/* id in tselem is object */
ob= (Object *)tselem->id;
- if(set) {
+ if (set) {
BLI_assert(te->index+1 >= 0);
ob->actdef= te->index+1;
@@ -403,8 +403,8 @@ static int tree_element_active_defgroup(bContext *C, Scene *scene, TreeElement *
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
}
else {
- if(ob==OBACT)
- if(ob->actdef== te->index+1) return 1;
+ if (ob==OBACT)
+ if (ob->actdef== te->index+1) return 1;
}
return 0;
}
@@ -413,14 +413,14 @@ static int tree_element_active_posegroup(bContext *C, Scene *scene, TreeElement
{
Object *ob= (Object *)tselem->id;
- if(set) {
+ if (set) {
if (ob->pose) {
ob->pose->active_group= te->index+1;
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
}
else {
- if(ob==OBACT && ob->pose) {
+ if (ob==OBACT && ob->pose) {
if (ob->pose->active_group== te->index+1) return 1;
}
}
@@ -433,15 +433,16 @@ static int tree_element_active_posechannel(bContext *C, Scene *scene, TreeElemen
bArmature *arm= ob->data;
bPoseChannel *pchan= te->directdata;
- if(set) {
- if(!(pchan->bone->flag & BONE_HIDDEN_P)) {
+ if (set) {
+ if (!(pchan->bone->flag & BONE_HIDDEN_P)) {
- if(set==2) ED_pose_deselectall(ob, 2); // 2 = clear active tag
+ if (set==2) ED_pose_deselectall(ob, 2); // 2 = clear active tag
else ED_pose_deselectall(ob, 0); // 0 = deselect
- if(set==2 && (pchan->bone->flag & BONE_SELECTED)) {
+ if (set==2 && (pchan->bone->flag & BONE_SELECTED)) {
pchan->bone->flag &= ~BONE_SELECTED;
- } else {
+ }
+ else {
pchan->bone->flag |= BONE_SELECTED;
arm->act_bone= pchan->bone;
}
@@ -451,7 +452,7 @@ static int tree_element_active_posechannel(bContext *C, Scene *scene, TreeElemen
}
}
else {
- if(ob==OBACT && ob->pose) {
+ if (ob==OBACT && ob->pose) {
if (pchan->bone->flag & BONE_SELECTED) return 1;
}
}
@@ -463,14 +464,15 @@ static int tree_element_active_bone(bContext *C, Scene *scene, TreeElement *te,
bArmature *arm= (bArmature *)tselem->id;
Bone *bone= te->directdata;
- if(set) {
- if(!(bone->flag & BONE_HIDDEN_P)) {
- if(set==2) ED_pose_deselectall(OBACT, 2); // 2 is clear active tag
+ if (set) {
+ if (!(bone->flag & BONE_HIDDEN_P)) {
+ if (set==2) ED_pose_deselectall(OBACT, 2); // 2 is clear active tag
else ED_pose_deselectall(OBACT, 0);
- if(set==2 && (bone->flag & BONE_SELECTED)) {
+ if (set==2 && (bone->flag & BONE_SELECTED)) {
bone->flag &= ~BONE_SELECTED;
- } else {
+ }
+ else {
bone->flag |= BONE_SELECTED;
arm->act_bone= bone;
}
@@ -481,7 +483,7 @@ static int tree_element_active_bone(bContext *C, Scene *scene, TreeElement *te,
else {
Object *ob= OBACT;
- if(ob && ob->data==arm) {
+ if (ob && ob->data==arm) {
if (bone->flag & BONE_SELECTED) return 1;
}
}
@@ -492,16 +494,16 @@ static int tree_element_active_bone(bContext *C, Scene *scene, TreeElement *te,
/* ebones only draw in editmode armature */
static void tree_element_active_ebone__sel(bContext *C, Scene *scene, bArmature *arm, EditBone *ebone, short sel)
{
- if(sel) {
+ if (sel) {
ebone->flag |= BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL;
arm->act_edbone= ebone;
// flush to parent?
- if(ebone->parent && (ebone->flag & BONE_CONNECTED)) ebone->parent->flag |= BONE_TIPSEL;
+ if (ebone->parent && (ebone->flag & BONE_CONNECTED)) ebone->parent->flag |= BONE_TIPSEL;
}
else {
ebone->flag &= ~(BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL);
// flush to parent?
- if(ebone->parent && (ebone->flag & BONE_CONNECTED)) ebone->parent->flag &= ~BONE_TIPSEL;
+ if (ebone->parent && (ebone->flag & BONE_CONNECTED)) ebone->parent->flag &= ~BONE_TIPSEL;
}
WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE, scene->obedit);
@@ -511,16 +513,16 @@ static int tree_element_active_ebone(bContext *C, Scene *scene, TreeElement *te,
bArmature *arm= scene->obedit->data;
EditBone *ebone= te->directdata;
- if(set==1) {
- if(!(ebone->flag & BONE_HIDDEN_A)) {
+ if (set==1) {
+ if (!(ebone->flag & BONE_HIDDEN_A)) {
ED_armature_deselect_all(scene->obedit, 0); // deselect
tree_element_active_ebone__sel(C, scene, arm, ebone, TRUE);
return 1;
}
}
else if (set==2) {
- if(!(ebone->flag & BONE_HIDDEN_A)) {
- if(!(ebone->flag & BONE_SELECTED)) {
+ if (!(ebone->flag & BONE_HIDDEN_A)) {
+ if (!(ebone->flag & BONE_SELECTED)) {
tree_element_active_ebone__sel(C, scene, arm, ebone, TRUE);
return 1;
}
@@ -539,7 +541,7 @@ static int tree_element_active_ebone(bContext *C, Scene *scene, TreeElement *te,
static int tree_element_active_modifier(bContext *C, TreeElement *UNUSED(te), TreeStoreElem *tselem, int set)
{
- if(set) {
+ if (set) {
Object *ob= (Object *)tselem->id;
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
@@ -552,7 +554,7 @@ static int tree_element_active_modifier(bContext *C, TreeElement *UNUSED(te), Tr
static int tree_element_active_psys(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tselem, int set)
{
- if(set) {
+ if (set) {
Object *ob= (Object *)tselem->id;
WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob);
@@ -565,7 +567,7 @@ static int tree_element_active_psys(bContext *C, Scene *UNUSED(scene), TreeEleme
static int tree_element_active_constraint(bContext *C, TreeElement *UNUSED(te), TreeStoreElem *tselem, int set)
{
- if(set) {
+ if (set) {
Object *ob= (Object *)tselem->id;
WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
@@ -586,17 +588,17 @@ static int tree_element_active_pose(bContext *C, Scene *scene, TreeElement *UNUS
Object *ob= (Object *)tselem->id;
Base *base= object_in_scene(ob, scene);
- if(set) {
- if(scene->obedit)
+ if (set) {
+ if (scene->obedit)
ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
- if(ob->mode & OB_MODE_POSE)
+ if (ob->mode & OB_MODE_POSE)
ED_armature_exit_posemode(C, base);
else
ED_armature_enter_posemode(C, base);
}
else {
- if(ob->mode & OB_MODE_POSE) return 1;
+ if (ob->mode & OB_MODE_POSE) return 1;
}
return 0;
}
@@ -605,11 +607,11 @@ static int tree_element_active_sequence(TreeElement *te, TreeStoreElem *UNUSED(t
{
Sequence *seq= (Sequence*) te->directdata;
- if(set) {
+ if (set) {
// XXX select_single_seq(seq, 1);
}
else {
- if(seq->flag & SELECT)
+ if (seq->flag & SELECT)
return(1);
}
return(0);
@@ -621,21 +623,21 @@ static int tree_element_active_sequence_dup(Scene *scene, TreeElement *te, TreeS
Editing *ed= seq_give_editing(scene, FALSE);
seq= (Sequence*)te->directdata;
- if(set==0) {
- if(seq->flag & SELECT)
+ if (set==0) {
+ if (seq->flag & SELECT)
return(1);
return(0);
}
// XXX select_single_seq(seq, 1);
p= ed->seqbasep->first;
- while(p) {
- if((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
+ while (p) {
+ if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
p= p->next;
continue;
}
-// if(!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
+// if (!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
// XXX select_single_seq(p, 0);
p= p->next;
}
@@ -644,10 +646,10 @@ static int tree_element_active_sequence_dup(Scene *scene, TreeElement *te, TreeS
static int tree_element_active_keymap_item(bContext *UNUSED(C), TreeElement *te, TreeStoreElem *UNUSED(tselem), int set)
{
- wmKeyMapItem *kmi= te->directdata;
+ wmKeyMapItem *kmi = te->directdata;
- if(set==0) {
- if(kmi->flag & KMI_INACTIVE) return 0;
+ if (set==0) {
+ if (kmi->flag & KMI_INACTIVE) return 0;
return 1;
}
else {
@@ -695,8 +697,8 @@ int tree_element_type_active(bContext *C, Scene *scene, SpaceOops *soops, TreeEl
case TSE_MODIFIER:
return tree_element_active_modifier(C, te, tselem, set);
case TSE_LINKED_OB:
- if(set) tree_element_set_active_object(C, scene, soops, te, set);
- else if(tselem->id==(ID *)OBACT) return 1;
+ if (set) tree_element_set_active_object(C, scene, soops, te, set);
+ else if (tselem->id==(ID *)OBACT) return 1;
break;
case TSE_LINKED_PSYS:
return tree_element_active_psys(C, scene, te, tselem, set);
@@ -726,24 +728,24 @@ int tree_element_type_active(bContext *C, Scene *scene, SpaceOops *soops, TreeEl
static int do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, SpaceOops *soops, TreeElement *te, int extend, const float mval[2])
{
- if(mval[1]>te->ys && mval[1]<te->ys+UI_UNIT_Y) {
+ if (mval[1]>te->ys && mval[1]<te->ys+UI_UNIT_Y) {
TreeStoreElem *tselem= TREESTORE(te);
int openclose= 0;
/* open close icon */
- if((te->flag & TE_ICONROW)==0) { // hidden icon, no open/close
- if( mval[0]>te->xs && mval[0]<te->xs+UI_UNIT_X)
+ if ((te->flag & TE_ICONROW)==0) { // hidden icon, no open/close
+ if ( mval[0]>te->xs && mval[0]<te->xs+UI_UNIT_X)
openclose= 1;
}
- if(openclose) {
+ if (openclose) {
/* all below close/open? */
- if(extend) {
+ if (extend) {
tselem->flag &= ~TSE_CLOSED;
outliner_set_flag(soops, &te->subtree, TSE_CLOSED, !outliner_has_one_flag(soops, &te->subtree, TSE_CLOSED, 1));
}
else {
- if(tselem->flag & TSE_CLOSED) tselem->flag &= ~TSE_CLOSED;
+ if (tselem->flag & TSE_CLOSED) tselem->flag &= ~TSE_CLOSED;
else tselem->flag |= TSE_CLOSED;
}
@@ -751,50 +753,51 @@ static int do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, Spa
return 1;
}
/* name and first icon */
- else if(mval[0]>te->xs+UI_UNIT_X && mval[0]<te->xend) {
+ else if (mval[0]>te->xs+UI_UNIT_X && mval[0]<te->xend) {
/* always makes active object */
- if(tselem->type!=TSE_SEQUENCE && tselem->type!=TSE_SEQ_STRIP && tselem->type!=TSE_SEQUENCE_DUP)
+ if (tselem->type!=TSE_SEQUENCE && tselem->type!=TSE_SEQ_STRIP && tselem->type!=TSE_SEQUENCE_DUP)
tree_element_set_active_object(C, scene, soops, te, 1 + (extend!=0 && tselem->type==0));
- if(tselem->type==0) { // the lib blocks
+ if (tselem->type==0) { // the lib blocks
/* editmode? */
- if(te->idcode==ID_SCE) {
- if(scene!=(Scene *)tselem->id) {
+ if (te->idcode==ID_SCE) {
+ if (scene!=(Scene *)tselem->id) {
ED_screen_set_scene(C, CTX_wm_screen(C), (Scene *)tselem->id);
}
}
- else if(te->idcode==ID_GR) {
+ else if (te->idcode==ID_GR) {
Group *gr= (Group *)tselem->id;
GroupObject *gob;
- if(extend) {
+ if (extend) {
int sel= BA_SELECT;
- for(gob= gr->gobject.first; gob; gob= gob->next) {
- if(gob->ob->flag & SELECT) {
+ for (gob= gr->gobject.first; gob; gob= gob->next) {
+ if (gob->ob->flag & SELECT) {
sel= BA_DESELECT;
break;
}
}
- for(gob= gr->gobject.first; gob; gob= gob->next) {
+ for (gob= gr->gobject.first; gob; gob= gob->next) {
ED_base_object_select(object_in_scene(gob->ob, scene), sel);
}
}
else {
scene_deselect_all(scene);
- for(gob= gr->gobject.first; gob; gob= gob->next) {
- if((gob->ob->flag & SELECT) == 0)
+ for (gob= gr->gobject.first; gob; gob= gob->next) {
+ if ((gob->ob->flag & SELECT) == 0)
ED_base_object_select(object_in_scene(gob->ob, scene), BA_SELECT);
}
}
WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
}
- else if(ELEM5(te->idcode, ID_ME, ID_CU, ID_MB, ID_LT, ID_AR)) {
+ else if (ELEM5(te->idcode, ID_ME, ID_CU, ID_MB, ID_LT, ID_AR)) {
WM_operator_name_call(C, "OBJECT_OT_editmode_toggle", WM_OP_INVOKE_REGION_WIN, NULL);
- } else { // rest of types
+ }
+ else { // rest of types
tree_element_active(C, scene, soops, te, 1);
}
@@ -805,8 +808,8 @@ static int do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, Spa
}
}
- for(te= te->subtree.first; te; te= te->next) {
- if(do_outliner_item_activate(C, scene, ar, soops, te, extend, mval)) return 1;
+ for (te= te->subtree.first; te; te= te->next) {
+ if (do_outliner_item_activate(C, scene, ar, soops, te, extend, mval)) return 1;
}
return 0;
}
@@ -830,11 +833,11 @@ static int outliner_item_activate(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_CANCELLED;
}
- for(te= soops->tree.first; te; te= te->next) {
- if(do_outliner_item_activate(C, scene, ar, soops, te, extend, fmval)) break;
+ for (te= soops->tree.first; te; te= te->next) {
+ if (do_outliner_item_activate(C, scene, ar, soops, te, extend, fmval)) break;
}
- if(te) {
+ if (te) {
ED_undo_push(C, "Outliner click event");
}
else {
@@ -846,7 +849,7 @@ static int outliner_item_activate(bContext *C, wmOperator *op, wmEvent *event)
fmval[0], fmval[1], NULL, &row);
/* select relevant row */
- if(outliner_select(soops, &soops->tree, &row, &selecting)) {
+ if (outliner_select(soops, &soops->tree, &row, &selecting)) {
soops->storeflag |= SO_TREESTORE_REDRAW;
@@ -863,13 +866,13 @@ static int outliner_item_activate(bContext *C, wmOperator *op, wmEvent *event)
void OUTLINER_OT_item_activate(wmOperatorType *ot)
{
- ot->name= "Activate Item";
- ot->idname= "OUTLINER_OT_item_activate";
- ot->description= "Handle mouse clicks to activate/select items";
+ ot->name = "Activate Item";
+ ot->idname = "OUTLINER_OT_item_activate";
+ ot->description = "Handle mouse clicks to activate/select items";
- ot->invoke= outliner_item_activate;
+ ot->invoke = outliner_item_activate;
- ot->poll= ED_operator_outliner_active;
+ ot->poll = ED_operator_outliner_active;
RNA_def_boolean(ot->srna, "extend", 1, "Extend", "Extend selection for activation");
}
@@ -909,15 +912,15 @@ static int outliner_border_select_exec(bContext *C, wmOperator *op)
rctf rectf;
int gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
UI_view2d_region_to_view(&ar->v2d, rect.xmin, rect.ymin, &rectf.xmin, &rectf.ymin);
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
UI_view2d_region_to_view(&ar->v2d, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax);
- for(te= soops->tree.first; te; te= te->next) {
+ for (te= soops->tree.first; te; te= te->next) {
outliner_item_border_select(scene, soops, &rectf, te, gesture_mode);
}
@@ -930,20 +933,20 @@ static int outliner_border_select_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Select";
- ot->idname= "OUTLINER_OT_select_border";
- ot->description= "Use box selection to select tree elements";
+ ot->name = "Border Select";
+ ot->idname = "OUTLINER_OT_select_border";
+ ot->description = "Use box selection to select tree elements";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= outliner_border_select_exec;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = outliner_border_select_exec;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= ED_operator_outliner_active;
+ ot->poll = ED_operator_outliner_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* rna */
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 b44e363090f..45830eed223 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -115,13 +115,13 @@ static void set_operation_types(SpaceOops *soops, ListBase *lb,
TreeElement *te;
TreeStoreElem *tselem;
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(tselem->flag & TSE_SELECTED) {
- if(tselem->type) {
- if(*datalevel==0)
+ if (tselem->flag & TSE_SELECTED) {
+ if (tselem->type) {
+ if (*datalevel==0)
*datalevel= tselem->type;
- else if(*datalevel!=tselem->type)
+ else if (*datalevel!=tselem->type)
*datalevel= -1;
}
else {
@@ -139,13 +139,13 @@ static void set_operation_types(SpaceOops *soops, ListBase *lb,
case ID_MA: case ID_TE: case ID_IP: case ID_IM:
case ID_SO: case ID_KE: case ID_WO: case ID_AC:
case ID_NLA: case ID_TXT: case ID_GR:
- if(*idlevel==0) *idlevel= idcode;
- else if(*idlevel!=idcode) *idlevel= -1;
+ if (*idlevel==0) *idlevel= idcode;
+ else if (*idlevel!=idcode) *idlevel= -1;
break;
}
}
}
- if(TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem,soops)) {
set_operation_types(soops, &te->subtree,
scenelevel, objectlevel, idlevel, datalevel);
}
@@ -163,29 +163,29 @@ static void unlink_material_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeEl
Material **matar=NULL;
int a, totcol=0;
- if( GS(tsep->id->name)==ID_OB) {
+ if ( GS(tsep->id->name)==ID_OB) {
Object *ob= (Object *)tsep->id;
totcol= ob->totcol;
matar= ob->mat;
}
- else if( GS(tsep->id->name)==ID_ME) {
+ else if ( GS(tsep->id->name)==ID_ME) {
Mesh *me= (Mesh *)tsep->id;
totcol= me->totcol;
matar= me->mat;
}
- else if( GS(tsep->id->name)==ID_CU) {
+ else if ( GS(tsep->id->name)==ID_CU) {
Curve *cu= (Curve *)tsep->id;
totcol= cu->totcol;
matar= cu->mat;
}
- else if( GS(tsep->id->name)==ID_MB) {
+ else if ( GS(tsep->id->name)==ID_MB) {
MetaBall *mb= (MetaBall *)tsep->id;
totcol= mb->totcol;
matar= mb->mat;
}
- for(a=0; a<totcol; a++) {
- if(a==te->index && matar[a]) {
+ for (a=0; a<totcol; a++) {
+ if (a==te->index && matar[a]) {
matar[a]->id.us--;
matar[a]= NULL;
}
@@ -197,23 +197,23 @@ static void unlink_texture_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeEle
MTex **mtex= NULL;
int a;
- if( GS(tsep->id->name)==ID_MA) {
+ if ( GS(tsep->id->name)==ID_MA) {
Material *ma= (Material *)tsep->id;
mtex= ma->mtex;
}
- else if( GS(tsep->id->name)==ID_LA) {
+ else if ( GS(tsep->id->name)==ID_LA) {
Lamp *la= (Lamp *)tsep->id;
mtex= la->mtex;
}
- else if( GS(tsep->id->name)==ID_WO) {
+ else if ( GS(tsep->id->name)==ID_WO) {
World *wrld= (World *)tsep->id;
mtex= wrld->mtex;
}
else return;
- for(a=0; a<MAX_MTEX; a++) {
- if(a==te->index && mtex[a]) {
- if(mtex[a]->tex) {
+ for (a=0; a<MAX_MTEX; a++) {
+ if (a==te->index && mtex[a]) {
+ if (mtex[a]->tex) {
mtex[a]->tex->id.us--;
mtex[a]->tex= NULL;
}
@@ -225,8 +225,8 @@ static void unlink_group_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeEleme
{
Group *group= (Group *)tselem->id;
- if(tsep) {
- if( GS(tsep->id->name)==ID_OB) {
+ if (tsep) {
+ if ( GS(tsep->id->name)==ID_OB) {
Object *ob= (Object *)tsep->id;
ob->dup_group= NULL;
}
@@ -252,15 +252,15 @@ static void outliner_do_libdata_operation(bContext *C, Scene *scene, SpaceOops *
TreeElement *te;
TreeStoreElem *tselem;
- for(te=lb->first; te; te= te->next) {
+ for (te=lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(tselem->flag & TSE_SELECTED) {
- if(tselem->type==0) {
+ if (tselem->flag & TSE_SELECTED) {
+ if (tselem->type==0) {
TreeStoreElem *tsep= TREESTORE(te->parent);
operation_cb(C, scene, te, tsep, tselem);
}
}
- if(TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem,soops)) {
outliner_do_libdata_operation(C, scene, soops, &te->subtree, operation_cb);
}
}
@@ -272,8 +272,8 @@ static void object_select_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te,
{
Base *base= (Base *)te->directdata;
- if(base==NULL) base= object_in_scene((Object *)tselem->id, scene);
- if(base && ((base->object->restrictflag & OB_RESTRICT_VIEW)==0)) {
+ if (base==NULL) base= object_in_scene((Object *)tselem->id, scene);
+ if (base && ((base->object->restrictflag & OB_RESTRICT_VIEW)==0)) {
base->flag |= SELECT;
base->object->flag |= SELECT;
}
@@ -283,8 +283,8 @@ static void object_deselect_cb(bContext *UNUSED(C), Scene *scene, TreeElement *t
{
Base *base= (Base *)te->directdata;
- if(base==NULL) base= object_in_scene((Object *)tselem->id, scene);
- if(base) {
+ if (base==NULL) base= object_in_scene((Object *)tselem->id, scene);
+ if (base) {
base->flag &= ~SELECT;
base->object->flag &= ~SELECT;
}
@@ -294,11 +294,11 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto
{
Base *base= (Base *)te->directdata;
- if(base==NULL)
+ if (base==NULL)
base= object_in_scene((Object *)tselem->id, scene);
- if(base) {
+ if (base) {
// check also library later
- if(scene->obedit==base->object)
+ if (scene->obedit==base->object)
ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
ED_base_object_free_and_unlink(CTX_data_main(C), scene, base);
@@ -378,12 +378,13 @@ static void group_linkobs2scene_cb(bContext *UNUSED(C), Scene *scene, TreeElemen
GroupObject *gob;
Base *base;
- for(gob=group->gobject.first; gob; gob=gob->next) {
+ for (gob=group->gobject.first; gob; gob=gob->next) {
base= object_in_scene(gob->ob, scene);
if (base) {
base->object->flag |= SELECT;
base->flag |= SELECT;
- } else {
+ }
+ else {
/* link to scene */
base= MEM_callocN( sizeof(Base), "add_base");
BLI_addhead(&scene->base, base);
@@ -402,22 +403,22 @@ void outliner_do_object_operation(bContext *C, Scene *scene_act, SpaceOops *soop
TreeElement *te;
TreeStoreElem *tselem;
- for(te=lb->first; te; te= te->next) {
+ for (te=lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(tselem->flag & TSE_SELECTED) {
- if(tselem->type==0 && te->idcode==ID_OB) {
+ if (tselem->flag & TSE_SELECTED) {
+ if (tselem->type==0 && te->idcode==ID_OB) {
// when objects selected in other scenes... dunno if that should be allowed
Scene *scene_owner= (Scene *)outliner_search_back(soops, te, ID_SCE);
- if(scene_owner && scene_act != scene_owner) {
+ if (scene_owner && scene_act != scene_owner) {
ED_screen_set_scene(C, CTX_wm_screen(C), scene_owner);
}
/* important to use 'scene_owner' not scene_act else deleting objects can crash.
* only use 'scene_act' when 'scene_owner' is NULL, which can happen when the
- * outliner isnt showing scenes: Visible Layer draw mode for eg. */
+ * outliner isn't showing scenes: Visible Layer draw mode for eg. */
operation_cb(C, scene_owner ? scene_owner : scene_act, te, NULL, tselem);
}
}
- if(TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem,soops)) {
outliner_do_object_operation(C, scene_act, soops, &te->subtree, operation_cb);
}
}
@@ -459,15 +460,15 @@ static void pchan_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem))
{
bPoseChannel *pchan= (bPoseChannel *)te->directdata;
- if(event==1)
+ if (event==1)
pchan->bone->flag |= BONE_SELECTED;
- else if(event==2)
+ else if (event==2)
pchan->bone->flag &= ~BONE_SELECTED;
- else if(event==3) {
+ else if (event==3) {
pchan->bone->flag |= BONE_HIDDEN_P;
pchan->bone->flag &= ~BONE_SELECTED;
}
- else if(event==4)
+ else if (event==4)
pchan->bone->flag &= ~BONE_HIDDEN_P;
}
@@ -475,15 +476,15 @@ static void bone_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem))
{
Bone *bone= (Bone *)te->directdata;
- if(event==1)
+ if (event==1)
bone->flag |= BONE_SELECTED;
- else if(event==2)
+ else if (event==2)
bone->flag &= ~BONE_SELECTED;
- else if(event==3) {
+ else if (event==3) {
bone->flag |= BONE_HIDDEN_P;
bone->flag &= ~BONE_SELECTED;
}
- else if(event==4)
+ else if (event==4)
bone->flag &= ~BONE_HIDDEN_P;
}
@@ -491,22 +492,22 @@ static void ebone_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem))
{
EditBone *ebone= (EditBone *)te->directdata;
- if(event==1)
+ if (event==1)
ebone->flag |= BONE_SELECTED;
- else if(event==2)
+ else if (event==2)
ebone->flag &= ~BONE_SELECTED;
- else if(event==3) {
+ else if (event==3) {
ebone->flag |= BONE_HIDDEN_A;
ebone->flag &= ~BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL;
}
- else if(event==4)
+ else if (event==4)
ebone->flag &= ~BONE_HIDDEN_A;
}
static void sequence_cb(int event, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tselem))
{
// Sequence *seq= (Sequence*) te->directdata;
- if(event==1) {
+ if (event==1) {
// XXX select_single_seq(seq, 1);
}
}
@@ -517,14 +518,14 @@ static void outliner_do_data_operation(SpaceOops *soops, int type, int event, Li
TreeElement *te;
TreeStoreElem *tselem;
- for(te=lb->first; te; te= te->next) {
+ for (te=lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(tselem->flag & TSE_SELECTED) {
- if(tselem->type==type) {
+ if (tselem->flag & TSE_SELECTED) {
+ if (tselem->type==type) {
operation_cb(event, te, tselem);
}
}
- if(TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem,soops)) {
outliner_do_data_operation(soops, type, event, &te->subtree, operation_cb);
}
}
@@ -557,22 +558,22 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op)
event= RNA_enum_get(op->ptr, "type");
- if(event==1) {
+ if (event==1) {
Scene *sce= scene; // to be able to delete, scenes are set...
outliner_do_object_operation(C, scene, soops, &soops->tree, object_select_cb);
- if(scene != sce) {
+ if (scene != sce) {
ED_screen_set_scene(C, CTX_wm_screen(C), sce);
}
str= "Select Objects";
WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
}
- else if(event==2) {
+ else if (event==2) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_deselect_cb);
str= "Deselect Objects";
WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
}
- else if(event==4) {
+ else if (event==4) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_delete_cb);
/* XXX: tree management normally happens from draw_outliner(), but when
@@ -586,26 +587,26 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op)
str= "Delete Objects";
WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
}
- else if(event==5) { /* disabled, see above enum (ton) */
+ else if (event==5) { /* disabled, see above enum (ton) */
outliner_do_object_operation(C, scene, soops, &soops->tree, id_local_cb);
str= "Localized Objects";
}
- else if(event==6) {
+ else if (event==6) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_visibility_cb);
str= "Toggle Visibility";
WM_event_add_notifier(C, NC_SCENE|ND_OB_VISIBLE, scene);
}
- else if(event==7) {
+ else if (event==7) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_selectability_cb);
str= "Toggle Selectability";
WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
}
- else if(event==8) {
+ else if (event==8) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_renderability_cb);
str= "Toggle Renderability";
WM_event_add_notifier(C, NC_SCENE|ND_OB_RENDER, scene);
}
- else if(event==9) {
+ else if (event==9) {
outliner_do_object_operation(C, scene, soops, &soops->tree, item_rename_cb);
str= "Rename Object";
}
@@ -619,18 +620,18 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_object_operation(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Outliner Object Operation";
- ot->idname= "OUTLINER_OT_object_operation";
- ot->description= "";
+ ot->name = "Outliner Object Operation";
+ ot->idname = "OUTLINER_OT_object_operation";
+ ot->description = "";
/* callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= outliner_object_operation_exec;
- ot->poll= ED_operator_outliner_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = outliner_object_operation_exec;
+ ot->poll = ED_operator_outliner_active;
- ot->flag= 0;
+ ot->flag = 0;
- ot->prop= RNA_def_enum(ot->srna, "type", prop_object_op_types, 0, "Object Operation", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_object_op_types, 0, "Object Operation", "");
}
/* **************************************** */
@@ -659,31 +660,31 @@ static int outliner_group_operation_exec(bContext *C, wmOperator *op)
event= RNA_enum_get(op->ptr, "type");
- if(event==1) {
+ if (event==1) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, unlink_group_cb);
str= "Unlink group";
}
- else if(event==2) {
+ else if (event==2) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, id_local_cb);
str= "Localized Data";
}
- else if(event==3) {
+ else if (event==3) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, group_linkobs2scene_cb);
str= "Link Group Objects to Scene";
}
- else if(event==4) {
+ else if (event==4) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, group_toggle_visibility_cb);
str= "Toggle Visibility";
}
- else if(event==5) {
+ else if (event==5) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, group_toggle_selectability_cb);
str= "Toggle Selectability";
}
- else if(event==6) {
+ else if (event==6) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, group_toggle_renderability_cb);
str= "Toggle Renderability";
}
- else if(event==7) {
+ else if (event==7) {
outliner_do_libdata_operation(C, scene, soops, &soops->tree, item_rename_cb);
str= "Rename";
}
@@ -699,18 +700,18 @@ static int outliner_group_operation_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_group_operation(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Outliner Group Operation";
- ot->idname= "OUTLINER_OT_group_operation";
- ot->description= "";
+ ot->name = "Outliner Group Operation";
+ ot->idname = "OUTLINER_OT_group_operation";
+ ot->description = "";
/* callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= outliner_group_operation_exec;
- ot->poll= ED_operator_outliner_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = outliner_group_operation_exec;
+ ot->poll = ED_operator_outliner_active;
- ot->flag= 0;
+ ot->flag = 0;
- ot->prop= RNA_def_enum(ot->srna, "type", prop_group_op_types, 0, "Group Operation", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_group_op_types, 0, "Group Operation", "");
}
/* **************************************** */
@@ -869,18 +870,18 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_id_operation(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Outliner ID data Operation";
- ot->idname= "OUTLINER_OT_id_operation";
- ot->description= "";
+ ot->name = "Outliner ID data Operation";
+ ot->idname = "OUTLINER_OT_id_operation";
+ ot->description = "";
/* callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= outliner_id_operation_exec;
- ot->poll= ED_operator_outliner_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = outliner_id_operation_exec;
+ ot->poll = ED_operator_outliner_active;
- ot->flag= 0;
+ ot->flag = 0;
- ot->prop= RNA_def_enum(ot->srna, "type", prop_id_op_types, 0, "ID data Operation", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_id_op_types, 0, "ID data Operation", "");
}
/* **************************************** */
@@ -894,7 +895,7 @@ static void outliner_do_id_set_operation(SpaceOops *soops, int type, ListBase *l
for (te=lb->first; te; te= te->next) {
tselem= TREESTORE(te);
if (tselem->flag & TSE_SELECTED) {
- if(tselem->type==type) {
+ if (tselem->type==type) {
TreeStoreElem *tsep = TREESTORE(te->parent);
operation_cb(te, tselem, tsep, newid);
}
@@ -972,23 +973,23 @@ void OUTLINER_OT_action_set(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Outliner Set Action";
- ot->idname= "OUTLINER_OT_action_set";
- ot->description= "Change the active action used";
+ ot->name = "Outliner Set Action";
+ ot->idname = "OUTLINER_OT_action_set";
+ ot->description = "Change the active action used";
/* api callbacks */
- ot->invoke= WM_enum_search_invoke;
- ot->exec= outliner_action_set_exec;
- ot->poll= ED_operator_outliner_active;
+ ot->invoke = WM_enum_search_invoke;
+ ot->exec = outliner_action_set_exec;
+ ot->poll = ED_operator_outliner_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
/* props */
// TODO: this would be nicer as an ID-pointer...
prop= RNA_def_enum(ot->srna, "action", DummyRNA_NULL_items, 0, "Action", "");
RNA_def_enum_funcs(prop, RNA_action_itemf);
- ot->prop= prop;
+ ot->prop = prop;
}
/* **************************************** */
@@ -1087,18 +1088,18 @@ static int outliner_animdata_operation_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_animdata_operation(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Outliner Animation Data Operation";
- ot->idname= "OUTLINER_OT_animdata_operation";
- ot->description= "";
+ ot->name = "Outliner Animation Data Operation";
+ ot->idname = "OUTLINER_OT_animdata_operation";
+ ot->description = "";
/* callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= outliner_animdata_operation_exec;
- ot->poll= ED_operator_outliner_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = outliner_animdata_operation_exec;
+ ot->poll = ED_operator_outliner_active;
- ot->flag= 0;
+ ot->flag = 0;
- ot->prop= RNA_def_enum(ot->srna, "type", prop_animdata_op_types, 0, "Animation Operation", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_animdata_op_types, 0, "Animation Operation", "");
}
/* **************************************** */
@@ -1124,29 +1125,29 @@ static int outliner_data_operation_exec(bContext *C, wmOperator *op)
event= RNA_enum_get(op->ptr, "type");
set_operation_types(soops, &soops->tree, &scenelevel, &objectlevel, &idlevel, &datalevel);
- if(datalevel==TSE_POSE_CHANNEL) {
- if(event>0) {
+ if (datalevel==TSE_POSE_CHANNEL) {
+ if (event>0) {
outliner_do_data_operation(soops, datalevel, event, &soops->tree, pchan_cb);
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
ED_undo_push(C, "PoseChannel operation");
}
}
- else if(datalevel==TSE_BONE) {
- if(event>0) {
+ else if (datalevel==TSE_BONE) {
+ if (event>0) {
outliner_do_data_operation(soops, datalevel, event, &soops->tree, bone_cb);
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
ED_undo_push(C, "Bone operation");
}
}
- else if(datalevel==TSE_EBONE) {
- if(event>0) {
+ else if (datalevel==TSE_EBONE) {
+ if (event>0) {
outliner_do_data_operation(soops, datalevel, event, &soops->tree, ebone_cb);
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
ED_undo_push(C, "EditBone operation");
}
}
- else if(datalevel==TSE_SEQUENCE) {
- if(event>0) {
+ else if (datalevel==TSE_SEQUENCE) {
+ if (event>0) {
outliner_do_data_operation(soops, datalevel, event, &soops->tree, sequence_cb);
}
}
@@ -1158,18 +1159,18 @@ static int outliner_data_operation_exec(bContext *C, wmOperator *op)
void OUTLINER_OT_data_operation(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Outliner Data Operation";
- ot->idname= "OUTLINER_OT_data_operation";
- ot->description= "";
+ ot->name = "Outliner Data Operation";
+ ot->idname = "OUTLINER_OT_data_operation";
+ ot->description = "";
/* callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= outliner_data_operation_exec;
- ot->poll= ED_operator_outliner_active;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = outliner_data_operation_exec;
+ ot->poll = ED_operator_outliner_active;
- ot->flag= 0;
+ ot->flag = 0;
- ot->prop= RNA_def_enum(ot->srna, "type", prop_data_op_types, 0, "Data Operation", "");
+ ot->prop = RNA_def_enum(ot->srna, "type", prop_data_op_types, 0, "Data Operation", "");
}
@@ -1180,7 +1181,7 @@ static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, S
{
ReportList *reports = CTX_wm_reports(C); // XXX...
- if(mval[1]>te->ys && mval[1]<te->ys+UI_UNIT_Y) {
+ if (mval[1]>te->ys && mval[1]<te->ys+UI_UNIT_Y) {
int scenelevel=0, objectlevel=0, idlevel=0, datalevel=0;
TreeStoreElem *tselem= TREESTORE(te);
@@ -1198,15 +1199,15 @@ static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, S
set_operation_types(soops, &soops->tree, &scenelevel, &objectlevel, &idlevel, &datalevel);
- if(scenelevel) {
+ if (scenelevel) {
//if(objectlevel || datalevel || idlevel) error("Mixed selection");
//else pupmenu("Scene Operations%t|Delete");
}
- else if(objectlevel) {
+ else if (objectlevel) {
WM_operator_name_call(C, "OUTLINER_OT_object_operation", WM_OP_INVOKE_REGION_WIN, NULL);
}
- else if(idlevel) {
- if(idlevel==-1 || datalevel) BKE_report(reports, RPT_WARNING, "Mixed selection");
+ else if (idlevel) {
+ if (idlevel==-1 || datalevel) BKE_report(reports, RPT_WARNING, "Mixed selection");
else {
if (idlevel==ID_GR)
WM_operator_name_call(C, "OUTLINER_OT_group_operation", WM_OP_INVOKE_REGION_WIN, NULL);
@@ -1214,8 +1215,8 @@ static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, S
WM_operator_name_call(C, "OUTLINER_OT_id_operation", WM_OP_INVOKE_REGION_WIN, NULL);
}
}
- else if(datalevel) {
- if(datalevel==-1) BKE_report(reports, RPT_WARNING, "Mixed selection");
+ else if (datalevel) {
+ if (datalevel==-1) BKE_report(reports, RPT_WARNING, "Mixed selection");
else {
if (datalevel == TSE_ANIM_DATA)
WM_operator_name_call(C, "OUTLINER_OT_animdata_operation", WM_OP_INVOKE_REGION_WIN, NULL);
@@ -1231,8 +1232,8 @@ static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, S
return 1;
}
- for(te= te->subtree.first; te; te= te->next) {
- if(do_outliner_operation_event(C, scene, ar, soops, te, event, mval))
+ for (te= te->subtree.first; te; te= te->next) {
+ if (do_outliner_operation_event(C, scene, ar, soops, te, event, mval))
return 1;
}
return 0;
@@ -1249,8 +1250,8 @@ static int outliner_operation(bContext *C, wmOperator *UNUSED(op), wmEvent *even
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], fmval, fmval+1);
- for(te= soops->tree.first; te; te= te->next) {
- if(do_outliner_operation_event(C, scene, ar, soops, te, event, fmval)) break;
+ for (te= soops->tree.first; te; te= te->next) {
+ if (do_outliner_operation_event(C, scene, ar, soops, te, event, fmval)) break;
}
return OPERATOR_FINISHED;
@@ -1259,13 +1260,13 @@ static int outliner_operation(bContext *C, wmOperator *UNUSED(op), wmEvent *even
/* Menu only! Calls other operators */
void OUTLINER_OT_operation(wmOperatorType *ot)
{
- ot->name= "Execute Operation";
- ot->idname= "OUTLINER_OT_operation";
- ot->description= "Context menu for item operations";
+ ot->name = "Execute Operation";
+ ot->idname = "OUTLINER_OT_operation";
+ ot->description = "Context menu for item operations";
- ot->invoke= outliner_operation;
+ ot->invoke = outliner_operation;
- ot->poll= ED_operator_outliner_active;
+ ot->poll = ED_operator_outliner_active;
}
/* ****************************************************** */
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 56cfcf9e18a..e83fce0cf05 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -115,23 +115,23 @@ static void outliner_storage_cleanup(SpaceOops *soops)
{
TreeStore *ts= soops->treestore;
- if(ts) {
+ if (ts) {
TreeStoreElem *tselem;
int a, unused= 0;
/* each element used once, for ID blocks with more users to have each a treestore */
- for(a=0, tselem= ts->data; a<ts->usedelem; a++, tselem++) tselem->used= 0;
+ for (a=0, tselem= ts->data; a<ts->usedelem; a++, tselem++) tselem->used= 0;
/* cleanup only after reading file or undo step, and always for
* RNA datablocks view in order to save memory */
- if(soops->storeflag & SO_TREESTORE_CLEANUP) {
+ if (soops->storeflag & SO_TREESTORE_CLEANUP) {
- for(a=0, tselem= ts->data; a<ts->usedelem; a++, tselem++) {
- if(tselem->id==NULL) unused++;
+ for (a=0, tselem= ts->data; a<ts->usedelem; a++, tselem++) {
+ if (tselem->id==NULL) unused++;
}
- if(unused) {
- if(ts->usedelem == unused) {
+ if (unused) {
+ if (ts->usedelem == unused) {
MEM_freeN(ts->data);
ts->data= NULL;
ts->usedelem= ts->totelem= 0;
@@ -140,8 +140,8 @@ static void outliner_storage_cleanup(SpaceOops *soops)
TreeStoreElem *tsnewar, *tsnew;
tsnew=tsnewar= MEM_mallocN((ts->usedelem-unused)*sizeof(TreeStoreElem), "new tselem");
- for(a=0, tselem= ts->data; a<ts->usedelem; a++, tselem++) {
- if(tselem->id) {
+ for (a=0, tselem= ts->data; a<ts->usedelem; a++, tselem++) {
+ if (tselem->id) {
*tsnew= *tselem;
tsnew++;
}
@@ -163,16 +163,16 @@ static void check_persistent(SpaceOops *soops, TreeElement *te, ID *id, short ty
int a;
/* case 1; no TreeStore */
- if(soops->treestore==NULL) {
+ if (soops->treestore==NULL) {
soops->treestore= MEM_callocN(sizeof(TreeStore), "treestore");
}
ts= soops->treestore;
/* check if 'te' is in treestore */
tselem= ts->data;
- for(a=0; a<ts->usedelem; a++, tselem++) {
- if(tselem->id==id && tselem->used==0) {
- if((type==0 && tselem->type==0) ||(tselem->type==type && tselem->nr==nr)) {
+ for (a=0; a<ts->usedelem; a++, tselem++) {
+ if (tselem->id==id && tselem->used==0) {
+ if ((type==0 && tselem->type==0) ||(tselem->type==type && tselem->nr==nr)) {
te->store_index= a;
tselem->used= 1;
return;
@@ -181,11 +181,11 @@ static void check_persistent(SpaceOops *soops, TreeElement *te, ID *id, short ty
}
/* add 1 element to treestore */
- if(ts->usedelem==ts->totelem) {
+ if (ts->usedelem==ts->totelem) {
TreeStoreElem *tsnew;
tsnew= MEM_mallocN((ts->totelem+TS_CHUNK)*sizeof(TreeStoreElem), "treestore data");
- if(ts->data) {
+ if (ts->data) {
memcpy(tsnew, ts->data, ts->totelem*sizeof(TreeStoreElem));
MEM_freeN(ts->data);
}
@@ -196,7 +196,7 @@ static void check_persistent(SpaceOops *soops, TreeElement *te, ID *id, short ty
tselem= ts->data+ts->usedelem;
tselem->type= type;
- if(type) tselem->nr= nr; // we're picky! :)
+ if (type) tselem->nr= nr; // we're picky! :)
else tselem->nr= 0;
tselem->id= id;
tselem->used = 0;
@@ -211,13 +211,13 @@ static void check_persistent(SpaceOops *soops, TreeElement *te, ID *id, short ty
void outliner_free_tree(ListBase *lb)
{
- while(lb->first) {
+ while (lb->first) {
TreeElement *te= lb->first;
outliner_free_tree(&te->subtree);
BLI_remlink(lb, te);
- if(te->flag & TE_FREE_NAME) MEM_freeN((void *)te->name);
+ if (te->flag & TE_FREE_NAME) MEM_freeN((void *)te->name);
MEM_freeN(te);
}
}
@@ -232,10 +232,10 @@ void outliner_cleanup_tree(SpaceOops *soops)
static TreeElement *outliner_find_tree_element(ListBase *lb, int store_index)
{
TreeElement *te= lb->first, *tes;
- while(te) {
- if(te->store_index==store_index) return te;
+ while (te) {
+ if (te->store_index==store_index) return te;
tes= outliner_find_tree_element(&te->subtree, store_index);
- if(tes) return tes;
+ if (tes) return tes;
te= te->next;
}
return NULL;
@@ -248,18 +248,18 @@ TreeElement *outliner_find_tse(SpaceOops *soops, TreeStoreElem *tse)
TreeStoreElem *tselem;
int a;
- if(tse->id==NULL) return NULL;
+ if (tse->id==NULL) return NULL;
/* check if 'tse' is in treestore */
tselem= ts->data;
- for(a=0; a<ts->usedelem; a++, tselem++) {
- if((tse->type==0 && tselem->type==0) || (tselem->type==tse->type && tselem->nr==tse->nr)) {
- if(tselem->id==tse->id) {
+ for (a=0; a<ts->usedelem; a++, tselem++) {
+ if ((tse->type==0 && tselem->type==0) || (tselem->type==tse->type && tselem->nr==tse->nr)) {
+ if (tselem->id==tse->id) {
break;
}
}
}
- if(tselem)
+ if (tselem)
return outliner_find_tree_element(&soops->tree, a);
return NULL;
@@ -271,14 +271,14 @@ TreeElement *outliner_find_id(SpaceOops *soops, ListBase *lb, ID *id)
TreeElement *te, *tes;
TreeStoreElem *tselem;
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
tselem= TREESTORE(te);
- if(tselem->type==0) {
- if(tselem->id==id) return te;
+ if (tselem->type==0) {
+ if (tselem->id==id) return te;
/* only deeper on scene or object */
- if( te->idcode==ID_OB || te->idcode==ID_SCE || (soops->outlinevis == SO_GROUPS && te->idcode==ID_GR)) {
+ if ( te->idcode==ID_OB || te->idcode==ID_SCE || (soops->outlinevis == SO_GROUPS && te->idcode==ID_GR)) {
tes= outliner_find_id(soops, &te->subtree, id);
- if(tes) return tes;
+ if (tes) return tes;
}
}
}
@@ -291,9 +291,9 @@ ID *outliner_search_back(SpaceOops *soops, TreeElement *te, short idcode)
TreeStoreElem *tselem;
te= te->parent;
- while(te) {
+ while (te) {
tselem= TREESTORE(te);
- if(tselem->type==0 && te->idcode==idcode) return tselem->id;
+ if (tselem->type==0 && te->idcode==idcode) return tselem->id;
te= te->parent;
}
return NULL;
@@ -318,7 +318,7 @@ static void outliner_add_bone(SpaceOops *soops, ListBase *lb, ID *id, Bone *curB
te->name= curBone->name;
te->directdata= curBone;
- for(curBone= curBone->childbase.first; curBone; curBone=curBone->next) {
+ for (curBone= curBone->childbase.first; curBone; curBone=curBone->next) {
outliner_add_bone(soops, &te->subtree, id, curBone, te, a);
}
}
@@ -341,7 +341,7 @@ static void outliner_add_passes(SpaceOops *soops, TreeElement *tenla, ID *id, Sc
/* save cpu cycles, but we add the first to invoke an open/close triangle */
tselem = TREESTORE(tenla);
- if(tselem->flag & TSE_CLOSED)
+ if (tselem->flag & TSE_CLOSED)
return;
te= outliner_add_element(soops, &tenla->subtree, id, tenla, TSE_R_PASS, LOG2I(SCE_PASS_Z));
@@ -422,14 +422,14 @@ static void outliner_add_scene_contents(SpaceOops *soops, ListBase *lb, Scene *s
int a;
tenla->name= "RenderLayers";
- for(a=0, srl= sce->r.layers.first; srl; srl= srl->next, a++) {
+ for (a=0, srl= sce->r.layers.first; srl; srl= srl->next, a++) {
TreeElement *tenlay= outliner_add_element(soops, &tenla->subtree, sce, te, TSE_R_LAYER, a);
tenlay->name= srl->name;
tenlay->directdata= &srl->passflag;
- if(srl->light_override)
+ if (srl->light_override)
outliner_add_element(soops, &tenlay->subtree, srl->light_override, tenlay, TSE_LINKED_LAMP, 0);
- if(srl->mat_override)
+ if (srl->mat_override)
outliner_add_element(soops, &tenlay->subtree, srl->mat_override, tenlay, TSE_LINKED_MAT, 0);
outliner_add_passes(soops, tenlay, &sce->id, srl);
@@ -469,13 +469,13 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
if ((arm->edbo == NULL) && (ob->mode & OB_MODE_POSE)) {
int a= 0, const_index= 1000; /* ensure unique id for bone constraints */
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next, a++) {
+ for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next, a++) {
ten= outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_POSE_CHANNEL, a);
ten->name= pchan->name;
ten->directdata= pchan;
pchan->temp= (void *)ten;
- if(pchan->constraints.first) {
+ if (pchan->constraints.first) {
//Object *target;
bConstraint *con;
TreeElement *ten1;
@@ -483,12 +483,12 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
//char *str;
tenla1->name= "Constraints";
- for(con= pchan->constraints.first; con; con= con->next, const_index++) {
+ for (con= pchan->constraints.first; con; con= con->next, const_index++) {
ten1= outliner_add_element(soops, &tenla1->subtree, ob, tenla1, TSE_CONSTRAINT, const_index);
#if 0 /* disabled as it needs to be reworked for recoded constraints system */
target= get_constraint_target(con, &str);
- if(str && str[0]) ten1->name= str;
- else if(target) ten1->name= target->id.name+2;
+ if (str && str[0]) ten1->name= str;
+ else if (target) ten1->name= target->id.name+2;
else ten1->name= con->name;
#endif
ten1->name= con->name;
@@ -499,12 +499,12 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
}
/* make hierarchy */
ten= tenla->subtree.first;
- while(ten) {
+ while (ten) {
TreeElement *nten= ten->next, *par;
tselem= TREESTORE(ten);
- if(tselem->type==TSE_POSE_CHANNEL) {
+ if (tselem->type==TSE_POSE_CHANNEL) {
pchan= (bPoseChannel *)ten->directdata;
- if(pchan->parent) {
+ if (pchan->parent) {
BLI_remlink(&tenla->subtree, ten);
par= (TreeElement *)pchan->parent->temp;
BLI_addtail(&par->subtree, ten);
@@ -516,7 +516,7 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
}
/* Pose Groups */
- if(ob->pose->agroups.first) {
+ if (ob->pose->agroups.first) {
bActionGroup *agrp;
TreeElement *ten;
TreeElement *tenla= outliner_add_element(soops, &te->subtree, ob, te, TSE_POSEGRP_BASE, 0);
@@ -531,10 +531,10 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
}
}
- for(a=0; a<ob->totcol; a++)
+ for (a=0; a<ob->totcol; a++)
outliner_add_element(soops, &te->subtree, ob->mat[a], te, 0, a);
- if(ob->constraints.first) {
+ if (ob->constraints.first) {
//Object *target;
bConstraint *con;
TreeElement *ten;
@@ -546,8 +546,8 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
ten= outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_CONSTRAINT, a);
#if 0 /* disabled due to constraints system targets recode... code here needs review */
target= get_constraint_target(con, &str);
- if(str && str[0]) ten->name= str;
- else if(target) ten->name= target->id.name+2;
+ if (str && str[0]) ten->name= str;
+ else if (target) ten->name= target->id.name+2;
else ten->name= con->name;
#endif
ten->name= con->name;
@@ -641,7 +641,7 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
outliner_add_element(soops, &te->subtree, me, te, TSE_ANIM_DATA, 0);
outliner_add_element(soops, &te->subtree, me->key, te, 0, 0);
- for(a=0; a<me->totcol; a++)
+ for (a=0; a<me->totcol; a++)
outliner_add_element(soops, &te->subtree, me->mat[a], te, 0, a);
/* could do tfaces with image links, but the images are not grouped nicely.
* would require going over all tfaces, sort images in use. etc... */
@@ -655,7 +655,7 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
if (cu->adt)
outliner_add_element(soops, &te->subtree, cu, te, TSE_ANIM_DATA, 0);
- for(a=0; a<cu->totcol; a++)
+ for (a=0; a<cu->totcol; a++)
outliner_add_element(soops, &te->subtree, cu->mat[a], te, 0, a);
}
break;
@@ -667,7 +667,7 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
if (mb->adt)
outliner_add_element(soops, &te->subtree, mb, te, TSE_ANIM_DATA, 0);
- for(a=0; a<mb->totcol; a++)
+ for (a=0; a<mb->totcol; a++)
outliner_add_element(soops, &te->subtree, mb->mat[a], te, 0, a);
}
break;
@@ -679,8 +679,8 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
if (ma->adt)
outliner_add_element(soops, &te->subtree, ma, te, TSE_ANIM_DATA, 0);
- for(a=0; a<MAX_MTEX; a++) {
- if(ma->mtex[a]) outliner_add_element(soops, &te->subtree, ma->mtex[a]->tex, te, 0, a);
+ for (a=0; a<MAX_MTEX; a++) {
+ if (ma->mtex[a]) outliner_add_element(soops, &te->subtree, ma->mtex[a]->tex, te, 0, a);
}
}
break;
@@ -710,8 +710,8 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
if (la->adt)
outliner_add_element(soops, &te->subtree, la, te, TSE_ANIM_DATA, 0);
- for(a=0; a<MAX_MTEX; a++) {
- if(la->mtex[a]) outliner_add_element(soops, &te->subtree, la->mtex[a]->tex, te, 0, a);
+ for (a=0; a<MAX_MTEX; a++) {
+ if (la->mtex[a]) outliner_add_element(soops, &te->subtree, la->mtex[a]->tex, te, 0, a);
}
}
break;
@@ -719,7 +719,7 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
{
Speaker *spk= (Speaker *)id;
- if(spk->adt)
+ if (spk->adt)
outliner_add_element(soops, &te->subtree, spk, te, TSE_ANIM_DATA, 0);
}
break;
@@ -731,8 +731,8 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
if (wrld->adt)
outliner_add_element(soops, &te->subtree, wrld, te, TSE_ANIM_DATA, 0);
- for(a=0; a<MAX_MTEX; a++) {
- if(wrld->mtex[a]) outliner_add_element(soops, &te->subtree, wrld->mtex[a]->tex, te, 0, a);
+ for (a=0; a<MAX_MTEX; a++) {
+ if (wrld->mtex[a]) outliner_add_element(soops, &te->subtree, wrld->mtex[a]->tex, te, 0, a);
}
}
break;
@@ -758,7 +758,7 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
if (arm->adt)
outliner_add_element(soops, &te->subtree, arm, te, TSE_ANIM_DATA, 0);
- if(arm->edbo) {
+ if (arm->edbo) {
EditBone *ebone;
TreeElement *ten;
@@ -770,10 +770,10 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
}
/* make hierarchy */
ten= arm->edbo->first ? ((EditBone *)arm->edbo->first)->temp : NULL;
- while(ten) {
+ while (ten) {
TreeElement *nten= ten->next, *par;
ebone= (EditBone *)ten->directdata;
- if(ebone->parent) {
+ if (ebone->parent) {
BLI_remlink(&te->subtree, ten);
par= ebone->parent->temp;
BLI_addtail(&par->subtree, ten);
@@ -785,10 +785,10 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
else {
/* do not extend Armature when we have posemode */
tselem= TREESTORE(te->parent);
- if( GS(tselem->id->name)==ID_OB && ((Object *)tselem->id)->mode & OB_MODE_POSE);
+ if ( GS(tselem->id->name)==ID_OB && ((Object *)tselem->id)->mode & OB_MODE_POSE);
else {
Bone *curBone;
- for (curBone=arm->bonebase.first; curBone; curBone=curBone->next){
+ for (curBone=arm->bonebase.first; curBone; curBone=curBone->next) {
outliner_add_bone(soops, &te->subtree, id, curBone, te, &a);
}
}
@@ -807,12 +807,12 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
ID *id= idv;
int a = 0;
- if(ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) {
+ if (ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) {
id= ((PointerRNA*)idv)->id.data;
- if(!id) id= ((PointerRNA*)idv)->data;
+ if (!id) id= ((PointerRNA*)idv)->data;
}
- if(id==NULL) return NULL;
+ if (id==NULL) return NULL;
te= MEM_callocN(sizeof(TreeElement), "tree elem");
/* add to the visual tree */
@@ -822,24 +822,24 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
tselem= TREESTORE(te);
/* if we are searching for something expand to see child elements */
- if(SEARCHING_OUTLINER(soops))
+ if (SEARCHING_OUTLINER(soops))
tselem->flag |= TSE_CHILDSEARCH;
te->parent= parent;
te->index= index; // for data arays
- if(ELEM3(type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP));
- else if(ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM));
- else if(type==TSE_ANIM_DATA);
+ if (ELEM3(type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP));
+ else if (ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM));
+ else if (type==TSE_ANIM_DATA);
else {
te->name= id->name+2; // default, can be overridden by Library or non-ID data
te->idcode= GS(id->name);
}
- if(type==0) {
+ if (type==0) {
/* ID datablock */
outliner_add_id_contents(soops, te, tselem, id);
}
- else if(type==TSE_ANIM_DATA) {
+ else if (type==TSE_ANIM_DATA) {
IdAdtTemplate *iat = (IdAdtTemplate *)idv;
AnimData *adt= (AnimData *)iat->adt;
@@ -897,12 +897,12 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
for (strip=nlt->strips.first; strip; strip=strip->next, b++) {
ten= outliner_add_element(soops, &tenlt->subtree, strip->act, tenlt, TSE_NLA_ACTION, b);
- if(ten) ten->directdata= strip;
+ if (ten) ten->directdata= strip;
}
}
}
}
- else if(type==TSE_SEQUENCE) {
+ else if (type==TSE_SEQUENCE) {
Sequence *seq= (Sequence*) idv;
Sequence *p;
@@ -914,25 +914,25 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
te->idcode= seq->type;
te->directdata= seq;
- if(seq->type<7) {
+ if (seq->type<7) {
/*
* This work like the sequence.
* If the sequence have a name (not default name)
* show it, in other case put the filename.
*/
- if(strcmp(seq->name, "SQ"))
+ if (strcmp(seq->name, "SQ"))
te->name= seq->name;
else {
- if((seq->strip) && (seq->strip->stripdata))
+ if ((seq->strip) && (seq->strip->stripdata))
te->name= seq->strip->stripdata->name;
else
te->name= "SQ None";
}
- if(seq->type==SEQ_META) {
+ if (seq->type==SEQ_META) {
te->name= "Meta Strip";
p= seq->seqbase.first;
- while(p) {
+ while (p) {
outliner_add_element(soops, &te->subtree, (void*)p, te, TSE_SEQUENCE, index);
p= p->next;
}
@@ -943,23 +943,23 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
else
te->name= "Effect";
}
- else if(type==TSE_SEQ_STRIP) {
+ else if (type==TSE_SEQ_STRIP) {
Strip *strip= (Strip *)idv;
- if(strip->dir)
+ if (strip->dir)
te->name= strip->dir;
else
te->name= "Strip None";
te->directdata= strip;
}
- else if(type==TSE_SEQUENCE_DUP) {
+ else if (type==TSE_SEQUENCE_DUP) {
Sequence *seq= (Sequence*)idv;
te->idcode= seq->type;
te->directdata= seq;
te->name= seq->strip->stripdata->name;
}
- else if(ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) {
+ else if (ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) {
PointerRNA pptr, propptr, *ptr= (PointerRNA*)idv;
PropertyRNA *prop, *iterprop;
PropertyType proptype;
@@ -967,39 +967,39 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
/* we do lazy build, for speed and to avoid infinite recusion */
- if(ptr->data == NULL) {
+ if (ptr->data == NULL) {
te->name= "(empty)";
}
- else if(type == TSE_RNA_STRUCT) {
+ else if (type == TSE_RNA_STRUCT) {
/* struct */
te->name= RNA_struct_name_get_alloc(ptr, NULL, 0, NULL);
- if(te->name)
+ if (te->name)
te->flag |= TE_FREE_NAME;
else
te->name= RNA_struct_ui_name(ptr->type);
/* If searching don't expand RNA entries */
- if(SEARCHING_OUTLINER(soops) && BLI_strcasecmp("RNA",te->name)==0) tselem->flag &= ~TSE_CHILDSEARCH;
+ if (SEARCHING_OUTLINER(soops) && BLI_strcasecmp("RNA",te->name)==0) tselem->flag &= ~TSE_CHILDSEARCH;
iterprop= RNA_struct_iterator_property(ptr->type);
tot= RNA_property_collection_length(ptr, iterprop);
/* auto open these cases */
- if(!parent || (RNA_property_type(parent->directdata)) == PROP_POINTER)
- if(!tselem->used)
+ if (!parent || (RNA_property_type(parent->directdata)) == PROP_POINTER)
+ if (!tselem->used)
tselem->flag &= ~TSE_CLOSED;
- if(TSELEM_OPEN(tselem,soops)) {
- for(a=0; a<tot; a++)
+ if (TSELEM_OPEN(tselem,soops)) {
+ for (a=0; a<tot; a++)
outliner_add_element(soops, &te->subtree, (void*)ptr, te, TSE_RNA_PROPERTY, a);
}
- else if(tot)
+ else if (tot)
te->flag |= TE_LAZY_CLOSED;
te->rnaptr= *ptr;
}
- else if(type == TSE_RNA_PROPERTY) {
+ else if (type == TSE_RNA_PROPERTY) {
/* property */
iterprop= RNA_struct_iterator_property(ptr->type);
RNA_property_collection_lookup_int(ptr, iterprop, index, &propptr);
@@ -1012,42 +1012,42 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
te->rnaptr= *ptr;
/* If searching don't expand RNA entries */
- if(SEARCHING_OUTLINER(soops) && BLI_strcasecmp("RNA",te->name)==0) tselem->flag &= ~TSE_CHILDSEARCH;
+ if (SEARCHING_OUTLINER(soops) && BLI_strcasecmp("RNA",te->name)==0) tselem->flag &= ~TSE_CHILDSEARCH;
- if(proptype == PROP_POINTER) {
+ if (proptype == PROP_POINTER) {
pptr= RNA_property_pointer_get(ptr, prop);
- if(pptr.data) {
- if(TSELEM_OPEN(tselem,soops))
+ if (pptr.data) {
+ if (TSELEM_OPEN(tselem,soops))
outliner_add_element(soops, &te->subtree, (void*)&pptr, te, TSE_RNA_STRUCT, -1);
else
te->flag |= TE_LAZY_CLOSED;
}
}
- else if(proptype == PROP_COLLECTION) {
+ else if (proptype == PROP_COLLECTION) {
tot= RNA_property_collection_length(ptr, prop);
- if(TSELEM_OPEN(tselem,soops)) {
- for(a=0; a<tot; a++) {
+ if (TSELEM_OPEN(tselem,soops)) {
+ for (a=0; a<tot; a++) {
RNA_property_collection_lookup_int(ptr, prop, a, &pptr);
outliner_add_element(soops, &te->subtree, (void*)&pptr, te, TSE_RNA_STRUCT, a);
}
}
- else if(tot)
+ else if (tot)
te->flag |= TE_LAZY_CLOSED;
}
- else if(ELEM3(proptype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
+ else if (ELEM3(proptype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
tot= RNA_property_array_length(ptr, prop);
- if(TSELEM_OPEN(tselem,soops)) {
- for(a=0; a<tot; a++)
+ if (TSELEM_OPEN(tselem,soops)) {
+ for (a=0; a<tot; a++)
outliner_add_element(soops, &te->subtree, (void*)ptr, te, TSE_RNA_ARRAY_ELEM, a);
}
- else if(tot)
+ else if (tot)
te->flag |= TE_LAZY_CLOSED;
}
}
- else if(type == TSE_RNA_ARRAY_ELEM) {
+ else if (type == TSE_RNA_ARRAY_ELEM) {
char c;
prop= parent->directdata;
@@ -1059,12 +1059,12 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
c= RNA_property_array_item_char(prop, index);
te->name= MEM_callocN(sizeof(char)*20, "OutlinerRNAArrayName");
- if(c) sprintf((char *)te->name, " %c", c);
+ if (c) sprintf((char *)te->name, " %c", c);
else sprintf((char *)te->name, " %d", index+1);
te->flag |= TE_FREE_NAME;
}
}
- else if(type == TSE_KEYMAP) {
+ else if (type == TSE_KEYMAP) {
wmKeyMap *km= (wmKeyMap *)idv;
wmKeyMapItem *kmi;
char opname[OP_MAX_TYPENAME];
@@ -1072,24 +1072,24 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
te->directdata= idv;
te->name= km->idname;
- if(TSELEM_OPEN(tselem,soops)) {
+ if (TSELEM_OPEN(tselem,soops)) {
a= 0;
- for (kmi= km->items.first; kmi; kmi= kmi->next, a++) {
+ for (kmi = km->items.first; kmi; kmi = kmi->next, a++) {
const char *key= WM_key_event_string(kmi->type);
- if(key[0]) {
+ if (key[0]) {
wmOperatorType *ot= NULL;
- if(kmi->propvalue);
+ if (kmi->propvalue);
else ot= WM_operatortype_find(kmi->idname, 0);
- if(ot || kmi->propvalue) {
+ if (ot || kmi->propvalue) {
TreeElement *ten= outliner_add_element(soops, &te->subtree, kmi, te, TSE_KEYMAP_ITEM, a);
ten->directdata= kmi;
- if(kmi->propvalue) {
+ if (kmi->propvalue) {
ten->name= "Modal map, not yet";
}
else {
@@ -1116,7 +1116,7 @@ static int need_add_seq_dup(Sequence *seq)
{
Sequence *p;
- if((!seq->strip) || (!seq->strip->stripdata) || (!seq->strip->stripdata->name))
+ if ((!seq->strip) || (!seq->strip->stripdata) || (!seq->strip->stripdata->name))
return(1);
/*
@@ -1124,25 +1124,25 @@ static int need_add_seq_dup(Sequence *seq)
* sequence before this, don't need it, just return.
*/
p= seq->prev;
- while(p) {
- if((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
+ while (p) {
+ if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
p= p->prev;
continue;
}
- if(!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
+ if (!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
return(2);
p= p->prev;
}
p= seq->next;
- while(p) {
- if((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
+ while (p) {
+ if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
p= p->next;
continue;
}
- if(!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
+ if (!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
return(0);
p= p->next;
}
@@ -1155,13 +1155,13 @@ static void outliner_add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *t
Sequence *p;
p= seq;
- while(p) {
- if((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
+ while (p) {
+ if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
p= p->next;
continue;
}
- if(!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
+ if (!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
/* ch= */ /* UNUSED */ outliner_add_element(soops, &te->subtree, (void*)p, te, TSE_SEQUENCE, index);
p= p->next;
}
@@ -1181,18 +1181,18 @@ static void outliner_make_hierarchy(SpaceOops *soops, ListBase *lb)
/* build hierarchy */
// XXX also, set extents here...
te= lb->first;
- while(te) {
+ while (te) {
ten= te->next;
tselem= TREESTORE(te);
- if(tselem->type==0 && te->idcode==ID_OB) {
+ if (tselem->type==0 && te->idcode==ID_OB) {
Object *ob= (Object *)tselem->id;
- if(ob->parent && ob->parent->id.newid) {
+ if (ob->parent && ob->parent->id.newid) {
BLI_remlink(lb, te);
tep= (TreeElement *)ob->parent->id.newid;
BLI_addtail(&tep->subtree, te);
// set correct parent pointers
- for(te=tep->subtree.first; te; te= te->next) te->parent= tep;
+ for (te=tep->subtree.first; te; te= te->next) te->parent= tep;
}
}
te= ten;
@@ -1216,15 +1216,15 @@ static int treesort_alpha(const void *v1, const void *v2)
/* first put objects last (hierarchy) */
comp= (x1->idcode==ID_OB);
- if(x2->idcode==ID_OB) comp+=2;
+ if (x2->idcode==ID_OB) comp+=2;
- if(comp==1) return 1;
- else if(comp==2) return -1;
- else if(comp==3) {
+ if (comp==1) return 1;
+ else if (comp==2) return -1;
+ else if (comp==3) {
comp= strcmp(x1->name, x2->name);
- if( comp>0 ) return 1;
- else if( comp<0) return -1;
+ if ( comp>0 ) return 1;
+ else if ( comp<0) return -1;
return 0;
}
return 0;
@@ -1237,20 +1237,20 @@ static int treesort_obtype_alpha(const void *v1, const void *v2)
const tTreeSort *x1= v1, *x2= v2;
/* first put objects last (hierarchy) */
- if(x1->idcode==ID_OB && x2->idcode!=ID_OB) return 1;
- else if(x2->idcode==ID_OB && x1->idcode!=ID_OB) return -1;
+ if (x1->idcode==ID_OB && x2->idcode!=ID_OB) return 1;
+ else if (x2->idcode==ID_OB && x1->idcode!=ID_OB) return -1;
else {
/* 2nd we check ob type */
- if(x1->idcode==ID_OB && x2->idcode==ID_OB) {
- if( ((Object *)x1->id)->type > ((Object *)x2->id)->type) return 1;
- else if( ((Object *)x1->id)->type > ((Object *)x2->id)->type) return -1;
+ if (x1->idcode==ID_OB && x2->idcode==ID_OB) {
+ if ( ((Object *)x1->id)->type > ((Object *)x2->id)->type) return 1;
+ else if ( ((Object *)x1->id)->type > ((Object *)x2->id)->type) return -1;
else return 0;
}
else {
int comp= strcmp(x1->name, x2->name);
- if( comp>0 ) return 1;
- else if( comp<0) return -1;
+ if ( comp>0 ) return 1;
+ else if ( comp<0) return -1;
return 0;
}
}
@@ -1265,38 +1265,38 @@ static void outliner_sort(SpaceOops *soops, ListBase *lb)
int totelem=0;
te= lb->last;
- if(te==NULL) return;
+ if (te==NULL) return;
tselem= TREESTORE(te);
/* sorting rules; only object lists or deformgroups */
- if( (tselem->type==TSE_DEFGROUP) || (tselem->type==0 && te->idcode==ID_OB)) {
+ if ( (tselem->type==TSE_DEFGROUP) || (tselem->type==0 && te->idcode==ID_OB)) {
/* count first */
- for(te= lb->first; te; te= te->next) totelem++;
+ for (te= lb->first; te; te= te->next) totelem++;
- if(totelem>1) {
+ if (totelem>1) {
tTreeSort *tear= MEM_mallocN(totelem*sizeof(tTreeSort), "tree sort array");
tTreeSort *tp=tear;
int skip= 0;
- for(te= lb->first; te; te= te->next, tp++) {
+ for (te= lb->first; te; te= te->next, tp++) {
tselem= TREESTORE(te);
tp->te= te;
tp->name= te->name;
tp->idcode= te->idcode;
- if(tselem->type && tselem->type!=TSE_DEFGROUP) tp->idcode= 0; // dont sort this
+ if (tselem->type && tselem->type!=TSE_DEFGROUP) tp->idcode= 0; // don't sort this
tp->id= tselem->id;
}
/* keep beginning of list */
- for(tp= tear, skip=0; skip<totelem; skip++, tp++)
- if(tp->idcode) break;
+ for (tp= tear, skip=0; skip<totelem; skip++, tp++)
+ if (tp->idcode) break;
- if(skip<totelem)
+ if (skip<totelem)
qsort(tear+skip, totelem-skip, sizeof(tTreeSort), treesort_alpha);
lb->first=lb->last= NULL;
tp= tear;
- while(totelem--) {
+ while (totelem--) {
BLI_addtail(lb, tp->te);
tp++;
}
@@ -1304,7 +1304,7 @@ static void outliner_sort(SpaceOops *soops, ListBase *lb)
}
}
- for(te= lb->first; te; te= te->next) {
+ for (te= lb->first; te; te= te->next) {
outliner_sort(soops, &te->subtree);
}
}
@@ -1379,7 +1379,7 @@ static int outliner_filter_tree(SpaceOops *soops, ListBase *lb)
outliner_free_tree(&te->subtree);
BLI_remlink(lb, te);
- if(te->flag & TE_FREE_NAME) MEM_freeN((void *)te->name);
+ if (te->flag & TE_FREE_NAME) MEM_freeN((void *)te->name);
MEM_freeN(te);
}
}
@@ -1414,35 +1414,35 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
/* Are we looking for something - we want to tag parents to filter child matches
* - NOT in datablocks view - searching all datablocks takes way too long to be useful
* - this variable is only set once per tree build */
- if(soops->search_string[0]!=0 && soops->outlinevis!=SO_DATABLOCKS)
+ if (soops->search_string[0]!=0 && soops->outlinevis!=SO_DATABLOCKS)
soops->search_flags |= SO_SEARCH_RECURSIVE;
else
soops->search_flags &= ~SO_SEARCH_RECURSIVE;
- if(soops->tree.first && (soops->storeflag & SO_TREESTORE_REDRAW))
+ if (soops->tree.first && (soops->storeflag & SO_TREESTORE_REDRAW))
return;
outliner_free_tree(&soops->tree);
outliner_storage_cleanup(soops);
/* clear ob id.new flags */
- for(ob= mainvar->object.first; ob; ob= ob->id.next) ob->id.newid= NULL;
+ for (ob= mainvar->object.first; ob; ob= ob->id.next) ob->id.newid= NULL;
/* options */
- if(soops->outlinevis == SO_LIBRARIES) {
+ if (soops->outlinevis == SO_LIBRARIES) {
Library *lib;
- for(lib= mainvar->library.first; lib; lib= lib->id.next) {
+ for (lib= mainvar->library.first; lib; lib= lib->id.next) {
ten= outliner_add_element(soops, &soops->tree, lib, NULL, 0, 0);
lib->id.newid= (ID *)ten;
}
/* make hierarchy */
ten= soops->tree.first;
- while(ten) {
+ while (ten) {
TreeElement *nten= ten->next, *par;
tselem= TREESTORE(ten);
lib= (Library *)tselem->id;
- if(lib->parent) {
+ if (lib->parent) {
BLI_remlink(&soops->tree, ten);
par= (TreeElement *)lib->parent->id.newid;
BLI_addtail(&par->subtree, ten);
@@ -1451,67 +1451,67 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
ten= nten;
}
/* restore newid pointers */
- for(lib= mainvar->library.first; lib; lib= lib->id.next)
+ for (lib= mainvar->library.first; lib; lib= lib->id.next)
lib->id.newid= NULL;
}
- else if(soops->outlinevis == SO_ALL_SCENES) {
+ else if (soops->outlinevis == SO_ALL_SCENES) {
Scene *sce;
- for(sce= mainvar->scene.first; sce; sce= sce->id.next) {
+ for (sce= mainvar->scene.first; sce; sce= sce->id.next) {
te= outliner_add_element(soops, &soops->tree, sce, NULL, 0, 0);
tselem= TREESTORE(te);
- if(sce==scene && show_opened)
+ if (sce==scene && show_opened)
tselem->flag &= ~TSE_CLOSED;
- for(base= sce->base.first; base; base= base->next) {
+ for (base= sce->base.first; base; base= base->next) {
ten= outliner_add_element(soops, &te->subtree, base->object, te, 0, 0);
ten->directdata= base;
}
outliner_make_hierarchy(soops, &te->subtree);
/* clear id.newid, to prevent objects be inserted in wrong scenes (parent in other scene) */
- for(base= sce->base.first; base; base= base->next) base->object->id.newid= NULL;
+ for (base= sce->base.first; base; base= base->next) base->object->id.newid= NULL;
}
}
- else if(soops->outlinevis == SO_CUR_SCENE) {
+ else if (soops->outlinevis == SO_CUR_SCENE) {
outliner_add_scene_contents(soops, &soops->tree, scene, NULL);
- for(base= scene->base.first; base; base= base->next) {
+ for (base= scene->base.first; base; base= base->next) {
ten= outliner_add_element(soops, &soops->tree, base->object, NULL, 0, 0);
ten->directdata= base;
}
outliner_make_hierarchy(soops, &soops->tree);
}
- else if(soops->outlinevis == SO_VISIBLE) {
- for(base= scene->base.first; base; base= base->next) {
- if(base->lay & scene->lay)
+ else if (soops->outlinevis == SO_VISIBLE) {
+ for (base= scene->base.first; base; base= base->next) {
+ if (base->lay & scene->lay)
outliner_add_element(soops, &soops->tree, base->object, NULL, 0, 0);
}
outliner_make_hierarchy(soops, &soops->tree);
}
- else if(soops->outlinevis == SO_GROUPS) {
+ else if (soops->outlinevis == SO_GROUPS) {
Group *group;
GroupObject *go;
- for(group= mainvar->group.first; group; group= group->id.next) {
- if(group->gobject.first) {
+ for (group= mainvar->group.first; group; group= group->id.next) {
+ if (group->gobject.first) {
te= outliner_add_element(soops, &soops->tree, group, NULL, 0, 0);
- for(go= group->gobject.first; go; go= go->next) {
+ for (go= group->gobject.first; go; go= go->next) {
ten= outliner_add_element(soops, &te->subtree, go->ob, te, 0, 0);
ten->directdata= NULL; /* eh, why? */
}
outliner_make_hierarchy(soops, &te->subtree);
/* clear id.newid, to prevent objects be inserted in wrong scenes (parent in other scene) */
- for(go= group->gobject.first; go; go= go->next) go->ob->id.newid= NULL;
+ for (go= group->gobject.first; go; go= go->next) go->ob->id.newid= NULL;
}
}
}
- else if(soops->outlinevis == SO_SAME_TYPE) {
+ else if (soops->outlinevis == SO_SAME_TYPE) {
Object *ob= OBACT;
- if(ob) {
- for(base= scene->base.first; base; base= base->next) {
- if(base->object->type==ob->type) {
+ if (ob) {
+ for (base= scene->base.first; base; base= base->next) {
+ if (base->object->type==ob->type) {
ten= outliner_add_element(soops, &soops->tree, base->object, NULL, 0, 0);
ten->directdata= base;
}
@@ -1519,10 +1519,10 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
outliner_make_hierarchy(soops, &soops->tree);
}
}
- else if(soops->outlinevis == SO_SELECTED) {
- for(base= scene->base.first; base; base= base->next) {
- if(base->lay & scene->lay) {
- if(base==BASACT || (base->flag & SELECT)) {
+ else if (soops->outlinevis == SO_SELECTED) {
+ for (base= scene->base.first; base; base= base->next) {
+ if (base->lay & scene->lay) {
+ if (base==BASACT || (base->flag & SELECT)) {
ten= outliner_add_element(soops, &soops->tree, base->object, NULL, 0, 0);
ten->directdata= base;
}
@@ -1530,65 +1530,65 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
}
outliner_make_hierarchy(soops, &soops->tree);
}
- else if(soops->outlinevis==SO_SEQUENCE) {
+ else if (soops->outlinevis==SO_SEQUENCE) {
Sequence *seq;
Editing *ed= seq_give_editing(scene, FALSE);
int op;
- if(ed==NULL)
+ if (ed==NULL)
return;
seq= ed->seqbasep->first;
- if(!seq)
+ if (!seq)
return;
- while(seq) {
+ while (seq) {
op= need_add_seq_dup(seq);
- if(op==1) {
+ if (op==1) {
/* ten= */ outliner_add_element(soops, &soops->tree, (void*)seq, NULL, TSE_SEQUENCE, 0);
}
- else if(op==0) {
+ else if (op==0) {
ten= outliner_add_element(soops, &soops->tree, (void*)seq, NULL, TSE_SEQUENCE_DUP, 0);
outliner_add_seq_dup(soops, seq, ten, 0);
}
seq= seq->next;
}
}
- else if(soops->outlinevis==SO_DATABLOCKS) {
+ else if (soops->outlinevis==SO_DATABLOCKS) {
PointerRNA mainptr;
RNA_main_pointer_create(mainvar, &mainptr);
ten= outliner_add_element(soops, &soops->tree, (void*)&mainptr, NULL, TSE_RNA_STRUCT, -1);
- if(show_opened) {
+ if (show_opened) {
tselem= TREESTORE(ten);
tselem->flag &= ~TSE_CLOSED;
}
}
- else if(soops->outlinevis==SO_USERDEF) {
+ else if (soops->outlinevis==SO_USERDEF) {
PointerRNA userdefptr;
RNA_pointer_create(NULL, &RNA_UserPreferences, &U, &userdefptr);
ten= outliner_add_element(soops, &soops->tree, (void*)&userdefptr, NULL, TSE_RNA_STRUCT, -1);
- if(show_opened) {
+ if (show_opened) {
tselem= TREESTORE(ten);
tselem->flag &= ~TSE_CLOSED;
}
}
- else if(soops->outlinevis==SO_KEYMAP) {
+ else if (soops->outlinevis==SO_KEYMAP) {
wmWindowManager *wm= mainvar->wm.first;
wmKeyMap *km;
- for(km= wm->defaultconf->keymaps.first; km; km= km->next) {
+ for (km= wm->defaultconf->keymaps.first; km; km= km->next) {
/* ten= */ outliner_add_element(soops, &soops->tree, (void*)km, NULL, TSE_KEYMAP, 0);
}
}
else {
ten= outliner_add_element(soops, &soops->tree, OBACT, NULL, 0, 0);
- if(ten) ten->directdata= BASACT;
+ if (ten) ten->directdata= BASACT;
}
outliner_sort(soops, &soops->tree);
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index ebbe28e62fa..ed050b7f93d 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -66,7 +66,7 @@ static void outliner_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "Outliner", SPACE_OUTLINER, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Outliner", SPACE_OUTLINER, 0);
/* don't pass on view2d mask, it's always set with scrollbar space, hide fails */
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, NULL, &ar->winrct);
@@ -83,15 +83,15 @@ static int outliner_parent_drop_poll(bContext *C, wmDrag *drag, wmEvent *event)
float fmval[2];
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fmval[0], &fmval[1]);
- if(drag->type == WM_DRAG_ID) {
+ if (drag->type == WM_DRAG_ID) {
ID *id = (ID *)drag->poin;
- if( GS(id->name) == ID_OB ) {
+ if ( GS(id->name) == ID_OB ) {
/* Ensure item under cursor is valid drop target */
/* Find object hovered over */
- for(te= soops->tree.first; te; te= te->next) {
+ for (te= soops->tree.first; te; te= te->next) {
TreeElement *te_valid;
te_valid= outliner_dropzone_parent(C, event, te, fmval);
- if(te_valid) return 1;
+ if (te_valid) return 1;
}
}
}
@@ -114,20 +114,20 @@ static int outliner_parent_clear_poll(bContext *C, wmDrag *drag, wmEvent *event)
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fmval[0], &fmval[1]);
- if(drag->type == WM_DRAG_ID) {
+ if (drag->type == WM_DRAG_ID) {
ID *id = (ID *)drag->poin;
- if( GS(id->name) == ID_OB ) {
+ if ( GS(id->name) == ID_OB ) {
//TODO: Check if no parent?
/* Ensure location under cursor is valid dropzone */
- for(te= soops->tree.first; te; te= te->next) {
- if(outliner_dropzone_parent_clear(C, event, te, fmval)) return 1;
+ for (te= soops->tree.first; te; te= te->next) {
+ if (outliner_dropzone_parent_clear(C, event, te, fmval)) return 1;
}
/* Check if mouse cursor is below the tree */
te= soops->tree.last;
- while(((te->flag & TE_LAZY_CLOSED)==0) && (te->subtree.last)) {
+ while (((te->flag & TE_LAZY_CLOSED)==0) && (te->subtree.last)) {
te= te->subtree.last;
}
- if(fmval[1] < te->ys) return 1;
+ if (fmval[1] < te->ys) return 1;
}
}
return 0;
@@ -232,15 +232,15 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
break;
case NC_LAMP:
/* For updating lamp icons, when changing lamp type */
- if(wmn->data == ND_LIGHTING_DRAW)
+ if (wmn->data == ND_LIGHTING_DRAW)
ED_region_tag_redraw(ar);
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_OUTLINER)
+ if (wmn->data == ND_SPACE_OUTLINER)
ED_region_tag_redraw(ar);
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
case NC_MATERIAL:
@@ -269,7 +269,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case ND_ANIMCHAN:
- if(wmn->action==NA_SELECTED)
+ if (wmn->action==NA_SELECTED)
ED_region_tag_redraw(ar);
break;
}
@@ -301,11 +301,11 @@ static void outliner_header_area_listener(ARegion *ar, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
case NC_SCENE:
- if(wmn->data == ND_KEYINGSET)
+ if (wmn->data == ND_KEYINGSET)
ED_region_tag_redraw(ar);
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_OUTLINER)
+ if (wmn->data == ND_SPACE_OUTLINER)
ED_region_tag_redraw(ar);
break;
}
@@ -349,8 +349,8 @@ static void outliner_free(SpaceLink *sl)
SpaceOops *soutliner= (SpaceOops*)sl;
outliner_free_tree(&soutliner->tree);
- if(soutliner->treestore) {
- if(soutliner->treestore->data) MEM_freeN(soutliner->treestore->data);
+ if (soutliner->treestore) {
+ if (soutliner->treestore->data) MEM_freeN(soutliner->treestore->data);
MEM_freeN(soutliner->treestore);
}
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index 7702e952e24..4ff0c7ba5b3 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -57,7 +57,7 @@ static int run_pyfile_exec(bContext *C, wmOperator *op)
char path[512];
RNA_string_get(op->ptr, "filepath", path);
#ifdef WITH_PYTHON
- if(BPY_filepath_exec(C, path, op->reports)) {
+ if (BPY_filepath_exec(C, path, op->reports)) {
ARegion *ar= CTX_wm_region(C);
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
@@ -71,16 +71,16 @@ static int run_pyfile_exec(bContext *C, wmOperator *op)
void SCRIPT_OT_python_file_run(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Run python file";
- ot->description= "Run Python file";
- ot->idname= "SCRIPT_OT_python_file_run";
+ ot->name = "Run python file";
+ ot->description = "Run Python file";
+ ot->idname = "SCRIPT_OT_python_file_run";
ot->flag = OPTYPE_UNDO;
/* api callbacks */
- ot->exec= run_pyfile_exec;
- ot->poll= ED_operator_areaactive;
+ ot->exec = run_pyfile_exec;
+ ot->poll = ED_operator_areaactive;
- RNA_def_string_file_path(ot->srna, "filepath", "", 512, "Path", "");
+ RNA_def_string_file_path(ot->srna, "filepath", "", FILE_MAX, "Path", "");
}
@@ -103,10 +103,10 @@ static int script_reload_exec(bContext *C, wmOperator *UNUSED(op))
void SCRIPT_OT_reload(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reload Scripts";
- ot->description= "Reload Scripts";
- ot->idname= "SCRIPT_OT_reload";
+ ot->name = "Reload Scripts";
+ ot->description = "Reload Scripts";
+ ot->idname = "SCRIPT_OT_reload";
/* api callbacks */
- ot->exec= script_reload_exec;
+ ot->exec = script_reload_exec;
}
diff --git a/source/blender/editors/space_script/script_ops.c b/source/blender/editors/space_script/script_ops.c
index 3ae89eefda3..0c99d9b34c4 100644
--- a/source/blender/editors/space_script/script_ops.c
+++ b/source/blender/editors/space_script/script_ops.c
@@ -60,7 +60,7 @@ void script_operatortypes(void)
void script_keymap(wmKeyConfig *keyconf)
{
- wmKeyMap *keymap= WM_keymap_find(keyconf, "Script", SPACE_SCRIPT, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "Script", SPACE_SCRIPT, 0);
/* TODO - this is just while we have no way to load a text datablock */
RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0)->ptr, "filepath", "test.py");
diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c
index dbda276b20c..bad9a01fbcf 100644
--- a/source/blender/editors/space_script/space_script.c
+++ b/source/blender/editors/space_script/space_script.c
@@ -135,7 +135,7 @@ static void script_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "Script", SPACE_SCRIPT, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Script", SPACE_SCRIPT, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 96e837eb95b..7c5f1a1543f 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -52,9 +52,9 @@
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_sequencer.h"
+#include "BKE_movieclip.h"
#include "BKE_report.h"
-
#include "WM_api.h"
#include "WM_types.h"
@@ -88,10 +88,10 @@
static void sequencer_generic_props__internal(wmOperatorType *ot, int flag)
{
- if(flag & SEQPROP_STARTFRAME)
+ if (flag & SEQPROP_STARTFRAME)
RNA_def_int(ot->srna, "frame_start", 0, INT_MIN, INT_MAX, "Start Frame", "Start frame of the sequence strip", INT_MIN, INT_MAX);
- if(flag & SEQPROP_ENDFRAME)
+ if (flag & SEQPROP_ENDFRAME)
RNA_def_int(ot->srna, "frame_end", 0, INT_MIN, INT_MAX, "End Frame", "End frame for the color strip", INT_MIN, INT_MAX); /* not usual since most strips have a fixed length */
RNA_def_int(ot->srna, "channel", 1, 1, MAXSEQ, "Channel", "Channel to place this strip into", 1, MAXSEQ);
@@ -103,10 +103,10 @@ static void sequencer_generic_props__internal(wmOperatorType *ot, int flag)
static void sequencer_generic_invoke_path__internal(bContext *C, wmOperator *op, const char *identifier)
{
- if(RNA_struct_find_property(op->ptr, identifier)) {
+ if (RNA_struct_find_property(op->ptr, identifier)) {
Scene *scene= CTX_data_scene(C);
Sequence *last_seq= seq_active_get(scene);
- if(last_seq && last_seq->strip && SEQ_HAS_PATH(last_seq)) {
+ if (last_seq && last_seq->strip && SEQ_HAS_PATH(last_seq)) {
char path[sizeof(last_seq->strip->dir)];
BLI_strncpy(path, last_seq->strip->dir, sizeof(path));
BLI_path_abs(path, G.main->name);
@@ -123,8 +123,8 @@ static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, w
UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &mval_v2d[0], &mval_v2d[1]);
- /* effect strips dont need a channel initialized from the mouse */
- if(!(flag & SEQPROP_NOCHAN)) {
+ /* effect strips don't need a channel initialized from the mouse */
+ if (!(flag & SEQPROP_NOCHAN)) {
RNA_int_set(op->ptr, "channel", (int)mval_v2d[1]+0.5f);
}
@@ -149,17 +149,18 @@ static void seq_load_operator_info(SeqLoadInfo *seq_load, wmOperator *op)
seq_load->end_frame= seq_load->start_frame; /* un-set */
seq_load->channel= RNA_int_get(op->ptr, "channel");
- seq_load->len= 1; // images only, if endframe isnt set!
+ seq_load->len= 1; // images only, if endframe isn't set!
- if(RNA_struct_find_property(op->ptr, "filepath")) {
+ if (RNA_struct_find_property(op->ptr, "filepath")) {
RNA_string_get(op->ptr, "filepath", seq_load->path); /* full path, file is set by the caller */
is_file= 1;
- } else if (RNA_struct_find_property(op->ptr, "directory")) {
+ }
+ else if (RNA_struct_find_property(op->ptr, "directory")) {
RNA_string_get(op->ptr, "directory", seq_load->path); /* full path, file is set by the caller */
is_file= 0;
}
- if((is_file != -1) && relative)
+ if ((is_file != -1) && relative)
BLI_path_rel(seq_load->path, G.main->name);
@@ -180,10 +181,10 @@ static void seq_load_operator_info(SeqLoadInfo *seq_load, wmOperator *op)
seq_load->flag |= SEQ_LOAD_FRAME_ADVANCE;
- if(is_file==1) {
+ if (is_file==1) {
BLI_strncpy(seq_load->name, BLI_path_basename(seq_load->path), sizeof(seq_load->name));
}
- else if(RNA_struct_find_property(op->ptr, "files")) {
+ else if (RNA_struct_find_property(op->ptr, "files")) {
/* used for image strip */
/* best guess, first images name */
RNA_BEGIN(op->ptr, itemptr, "files") {
@@ -224,19 +225,16 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op)
seq->blend_mode= SEQ_CROSS; /* so alpha adjustment fade to the strip below */
seq->scene= sce_seq;
- seq->sfra= sce_seq->r.sfra;
/* basic defaults */
seq->strip= strip= MEM_callocN(sizeof(Strip), "strip");
- strip->len = seq->len = sce_seq->r.efra - sce_seq->r.sfra + 1;
+ seq->len = sce_seq->r.efra - sce_seq->r.sfra + 1;
strip->us= 1;
- strip->stripdata= MEM_callocN(seq->len*sizeof(StripElem), "stripelem");
-
BLI_strncpy(seq->name+2, sce_seq->id.name+2, sizeof(seq->name)-2);
seqbase_unique_name_recursive(&ed->seqbase, seq);
- seq->scene_sound = sound_scene_add_scene_sound(scene, seq, start_frame, start_frame + strip->len, 0);
+ seq->scene_sound = sound_scene_add_scene_sound(scene, seq, start_frame, start_frame + seq->len, 0);
calc_sequence_disp(scene, seq);
sort_seq(scene);
@@ -247,8 +245,8 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op)
seq->flag |= SELECT;
}
- if(RNA_boolean_get(op->ptr, "overlap") == FALSE) {
- if(seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
+ if (RNA_boolean_get(op->ptr, "overlap") == FALSE) {
+ if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
}
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
@@ -259,12 +257,12 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op)
static int sequencer_add_scene_strip_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(!ED_operator_sequencer_active(C)) {
+ if (!ED_operator_sequencer_active(C)) {
BKE_report(op->reports, RPT_ERROR, "Sequencer area not active");
return OPERATOR_CANCELLED;
}
- if(!RNA_struct_property_is_set(op->ptr, "scene"))
+ if (!RNA_struct_property_is_set(op->ptr, "scene"))
return WM_enum_search_invoke(C, op, event);
sequencer_generic_invoke_xy__internal(C, op, event, 0);
@@ -279,25 +277,122 @@ void SEQUENCER_OT_scene_strip_add(struct wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Add Scene Strip";
- ot->idname= "SEQUENCER_OT_scene_strip_add";
- ot->description= "Add a strip to the sequencer using a blender scene as a source";
+ ot->name = "Add Scene Strip";
+ ot->idname = "SEQUENCER_OT_scene_strip_add";
+ ot->description = "Add a strip to the sequencer using a blender scene as a source";
/* api callbacks */
- ot->invoke= sequencer_add_scene_strip_invoke;
- ot->exec= sequencer_add_scene_strip_exec;
+ ot->invoke = sequencer_add_scene_strip_invoke;
+ ot->exec = sequencer_add_scene_strip_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME);
prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", "");
RNA_def_enum_funcs(prop, RNA_scene_itemf);
- ot->prop= prop;
+ ot->prop = prop;
}
+/* add movieclip operator */
+static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Editing *ed= seq_give_editing(scene, TRUE);
+
+ MovieClip *clip;
+
+ Sequence *seq; /* generic strip vars */
+ Strip *strip;
+
+ int start_frame, channel; /* operator props */
+
+ start_frame= RNA_int_get(op->ptr, "frame_start");
+ channel= RNA_int_get(op->ptr, "channel");
+
+ clip= BLI_findlink(&CTX_data_main(C)->movieclip, RNA_enum_get(op->ptr, "clip"));
+
+ if (clip == NULL) {
+ BKE_report(op->reports, RPT_ERROR, "MovieClip not found");
+ return OPERATOR_CANCELLED;
+ }
+
+ seq = alloc_sequence(ed->seqbasep, start_frame, channel);
+ seq->type= SEQ_MOVIECLIP;
+ seq->blend_mode= SEQ_CROSS;
+ seq->clip = clip;
+
+ /* basic defaults */
+ seq->strip= strip= MEM_callocN(sizeof(Strip), "strip");
+ seq->len = BKE_movieclip_get_duration(clip);
+ strip->us= 1;
+
+ BLI_strncpy(seq->name+2, clip->id.name+2, sizeof(seq->name)-2);
+ seqbase_unique_name_recursive(&ed->seqbase, seq);
+
+ calc_sequence_disp(scene, seq);
+ sort_seq(scene);
+
+ if (RNA_boolean_get(op->ptr, "replace_sel")) {
+ deselect_all_seq(scene);
+ seq_active_set(scene, seq);
+ seq->flag |= SELECT;
+ }
+
+ if (RNA_boolean_get(op->ptr, "overlap") == FALSE) {
+ if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
+ }
+
+ WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
+
+ return OPERATOR_FINISHED;
+}
+
+
+static int sequencer_add_movieclip_strip_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ if (!ED_operator_sequencer_active(C)) {
+ BKE_report(op->reports, RPT_ERROR, "Sequencer area not active");
+ return OPERATOR_CANCELLED;
+ }
+
+ if (!RNA_struct_property_is_set(op->ptr, "clip"))
+ return WM_enum_search_invoke(C, op, event);
+
+ sequencer_generic_invoke_xy__internal(C, op, event, 0);
+ return sequencer_add_movieclip_strip_exec(C, op);
+ // needs a menu
+ // return WM_menu_invoke(C, op, event);
+}
+
+
+void SEQUENCER_OT_movieclip_strip_add(struct wmOperatorType *ot)
+{
+ PropertyRNA *prop;
+
+ /* identifiers */
+ ot->name = "Add MovieClip Strip";
+ ot->idname = "SEQUENCER_OT_movieclip_strip_add";
+ ot->description = "Add a movieclip strip to the sequencer";
+
+ /* api callbacks */
+ ot->invoke = sequencer_add_movieclip_strip_invoke;
+ ot->exec = sequencer_add_movieclip_strip_exec;
+
+ ot->poll = ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME);
+ prop= RNA_def_enum(ot->srna, "clip", DummyRNA_NULL_items, 0, "Clip", "");
+ RNA_def_enum_funcs(prop, RNA_movieclip_itemf);
+ ot->prop = prop;
+}
+
+
static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoadFunc seq_load_func)
{
Scene *scene= CTX_data_scene(C); /* only for sound */
@@ -314,7 +409,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
tot_files= RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files"));
- if(tot_files) {
+ if (tot_files) {
/* multiple files */
char dir_only[FILE_MAX];
char file_only[FILE_MAX];
@@ -327,8 +422,8 @@ 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(seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
+ if (overlap == FALSE) {
+ if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
}
}
}
@@ -338,8 +433,8 @@ 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(seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
+ if (overlap == FALSE) {
+ if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
}
}
}
@@ -367,13 +462,15 @@ static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op)
static int sequencer_add_movie_strip_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(!ED_operator_sequencer_active(C)) {
+ if (!ED_operator_sequencer_active(C)) {
BKE_report(op->reports, RPT_ERROR, "Sequencer area not active");
return OPERATOR_CANCELLED;
}
/* This is for drag and drop */
- if(RNA_collection_length(op->ptr, "files") || RNA_struct_property_is_set(op->ptr, "filepath")) {
+ if ((RNA_struct_property_is_set(op->ptr, "files") && RNA_collection_length(op->ptr, "files")) ||
+ RNA_struct_property_is_set(op->ptr, "filepath"))
+ {
sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_NOPATHS);
return sequencer_add_movie_strip_exec(C, op);
}
@@ -391,18 +488,18 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Movie Strip";
- ot->idname= "SEQUENCER_OT_movie_strip_add";
- ot->description= "Add a movie strip to the sequencer";
+ ot->name = "Add Movie Strip";
+ ot->idname = "SEQUENCER_OT_movie_strip_add";
+ ot->description = "Add a movie strip to the sequencer";
/* api callbacks */
- ot->invoke= sequencer_add_movie_strip_invoke;
- ot->exec= sequencer_add_movie_strip_exec;
+ ot->invoke = sequencer_add_movie_strip_invoke;
+ ot->exec = sequencer_add_movie_strip_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
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);
@@ -419,13 +516,15 @@ static int sequencer_add_sound_strip_exec(bContext *C, wmOperator *op)
static int sequencer_add_sound_strip_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(!ED_operator_sequencer_active(C)) {
+ if (!ED_operator_sequencer_active(C)) {
BKE_report(op->reports, RPT_ERROR, "Sequencer area not active");
return OPERATOR_CANCELLED;
}
/* This is for drag and drop */
- if(RNA_collection_length(op->ptr, "files") || RNA_struct_property_is_set(op->ptr, "filepath")) {
+ if ((RNA_struct_property_is_set(op->ptr, "files") && RNA_collection_length(op->ptr, "files")) ||
+ RNA_struct_property_is_set(op->ptr, "filepath"))
+ {
sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_NOPATHS);
return sequencer_add_sound_strip_exec(C, op);
}
@@ -443,18 +542,18 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Sound Strip";
- ot->idname= "SEQUENCER_OT_sound_strip_add";
- ot->description= "Add a sound strip to the sequencer";
+ ot->name = "Add Sound Strip";
+ ot->idname = "SEQUENCER_OT_sound_strip_add";
+ ot->description = "Add a sound strip to the sequencer";
/* api callbacks */
- ot->invoke= sequencer_add_sound_strip_invoke;
- ot->exec= sequencer_add_sound_strip_exec;
+ ot->invoke = sequencer_add_sound_strip_invoke;
+ ot->exec = sequencer_add_sound_strip_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
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);
@@ -479,10 +578,10 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op)
/* images are unique in how they handle this - 1 per strip elem */
seq_load.len= RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files"));
- if(seq_load.len==0)
+ if (seq_load.len==0)
return OPERATOR_CANCELLED;
- if(seq_load.flag & SEQ_LOAD_REPLACE_SEL)
+ if (seq_load.flag & SEQ_LOAD_REPLACE_SEL)
deselect_all_seq(scene);
@@ -499,8 +598,8 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op)
}
RNA_END;
- if(seq_load.len == 1) {
- if(seq_load.start_frame < seq_load.end_frame) {
+ if (seq_load.len == 1) {
+ if (seq_load.start_frame < seq_load.end_frame) {
seq->endstill= seq_load.end_frame - seq_load.start_frame;
}
}
@@ -512,8 +611,8 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op)
/* last active name */
strncpy(ed->act_imagedir, strip->dir, FILE_MAXDIR-1);
- if(RNA_boolean_get(op->ptr, "overlap") == FALSE) {
- if(seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
+ if (RNA_boolean_get(op->ptr, "overlap") == FALSE) {
+ if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
}
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
@@ -524,14 +623,14 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op)
static int sequencer_add_image_strip_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(!ED_operator_sequencer_active(C)) {
+ if (!ED_operator_sequencer_active(C)) {
BKE_report(op->reports, RPT_ERROR, "Sequencer area not active");
return OPERATOR_CANCELLED;
}
/* drag drop has set the names */
- if(RNA_collection_length(op->ptr, "files")) {
+ if (RNA_struct_property_is_set(op->ptr, "files") && RNA_collection_length(op->ptr, "files")) {
sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_ENDFRAME|SEQPROP_NOPATHS);
return sequencer_add_image_strip_exec(C, op);
}
@@ -547,18 +646,18 @@ void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Image Strip";
- ot->idname= "SEQUENCER_OT_image_strip_add";
- ot->description= "Add an image or image sequence to the sequencer";
+ ot->name = "Add Image Strip";
+ ot->idname = "SEQUENCER_OT_image_strip_add";
+ ot->description = "Add an image or image sequence to the sequencer";
/* api callbacks */
- ot->invoke= sequencer_add_image_strip_invoke;
- ot->exec= sequencer_add_image_strip_exec;
+ ot->invoke = sequencer_add_image_strip_invoke;
+ ot->exec = sequencer_add_image_strip_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY|WM_FILESEL_RELPATH|WM_FILESEL_FILES, FILE_DEFAULTDISPLAY);
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_ENDFRAME);
@@ -587,7 +686,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
type= RNA_enum_get(op->ptr, "type");
// XXX move to invoke
- if(!seq_effect_find_selected(scene, NULL, type, &seq1, &seq2, &seq3, &error_msg)) {
+ if (!seq_effect_find_selected(scene, NULL, type, &seq1, &seq2, &seq3, &error_msg)) {
BKE_report(op->reports, RPT_ERROR, error_msg);
return OPERATOR_CANCELLED;
}
@@ -624,10 +723,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
/* basic defaults */
seq->strip= strip= MEM_callocN(sizeof(Strip), "strip");
- strip->len = seq->len;
strip->us= 1;
- if(seq->len>0)
- strip->stripdata= MEM_callocN(seq->len*sizeof(StripElem), "stripelem");
if (seq->type==SEQ_PLUGIN) {
char path[FILE_MAX];
@@ -635,35 +731,37 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
sh.init_plugin(seq, path);
- if(seq->plugin==NULL) {
+ if (seq->plugin==NULL) {
BLI_remlink(ed->seqbasep, seq);
seq_free_sequence(scene, seq);
BKE_reportf(op->reports, RPT_ERROR, "Sequencer plugin \"%s\" could not load", path);
return OPERATOR_CANCELLED;
}
- } else if (seq->type == SEQ_COLOR) {
+ }
+ else if (seq->type == SEQ_COLOR) {
SolidColorVars *colvars= (SolidColorVars *)seq->effectdata;
RNA_float_get_array(op->ptr, "color", colvars->col);
seq->blend_mode= SEQ_CROSS; /* so alpha adjustment fade to the strip below */
- } else if (seq->type == SEQ_ADJUSTMENT) {
+ }
+ else if (seq->type == SEQ_ADJUSTMENT) {
seq->blend_mode= SEQ_CROSS;
}
/* an unset channel is a special case where we automatically go above
* the other strips. */
- if(!RNA_struct_property_is_set(op->ptr, "channel")) {
- if(seq->seq1) {
+ if (!RNA_struct_property_is_set(op->ptr, "channel")) {
+ if (seq->seq1) {
int chan= MAX3( seq->seq1 ? seq->seq1->machine : 0,
seq->seq2 ? seq->seq2->machine : 0,
seq->seq3 ? seq->seq3->machine : 0);
- if(chan < MAXSEQ)
+ if (chan < MAXSEQ)
seq->machine= chan;
}
}
- if(RNA_boolean_get(op->ptr, "overlap") == FALSE) {
- if(seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
+ if (RNA_boolean_get(op->ptr, "overlap") == FALSE) {
+ if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
}
update_changed_seq_and_deps(scene, seq, 1, 1); /* runs calc_sequence */
@@ -692,19 +790,19 @@ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEven
int type= -1;
int prop_flag= SEQPROP_ENDFRAME;
- if(!ED_operator_sequencer_active(C)) {
+ if (!ED_operator_sequencer_active(C)) {
BKE_report(op->reports, RPT_ERROR, "Sequencer area not active");
return OPERATOR_CANCELLED;
}
- if(is_type_set) {
+ if (is_type_set) {
type= RNA_enum_get(op->ptr, "type");
/* when invoking an effect strip which uses inputs,
* skip initializing the channel from the mouse.
* Instead leave the property unset so exec() initializes it to be
* above the strips its applied to. */
- if(get_sequence_effect_num_inputs(type) != 0) {
+ if (get_sequence_effect_num_inputs(type) != 0) {
prop_flag |= SEQPROP_NOCHAN;
}
}
@@ -724,18 +822,18 @@ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEven
void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Effect Strip";
- ot->idname= "SEQUENCER_OT_effect_strip_add";
- ot->description= "Add an effect to the sequencer, most are applied on top of existing strips";
+ ot->name = "Add Effect Strip";
+ ot->idname = "SEQUENCER_OT_effect_strip_add";
+ ot->description = "Add an effect to the sequencer, most are applied on top of existing strips";
/* api callbacks */
- ot->invoke= sequencer_add_effect_strip_invoke;
- ot->exec= sequencer_add_effect_strip_exec;
+ ot->invoke = sequencer_add_effect_strip_invoke;
+ ot->exec = sequencer_add_effect_strip_exec;
- ot->poll= ED_operator_scene_editable;
+ ot->poll = ED_operator_scene_editable;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_ENDFRAME);
diff --git a/source/blender/editors/space_sequencer/sequencer_buttons.c b/source/blender/editors/space_sequencer/sequencer_buttons.c
index 9aefdea9fb0..ee1a0a7ef6d 100644
--- a/source/blender/editors/space_sequencer/sequencer_buttons.c
+++ b/source/blender/editors/space_sequencer/sequencer_buttons.c
@@ -99,7 +99,7 @@ static int sequencer_properties(bContext *C, wmOperator *UNUSED(op))
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= sequencer_has_buttons_region(sa);
- if(ar)
+ if (ar)
ED_region_toggle_hidden(C, ar);
return OPERATOR_FINISHED;
@@ -107,14 +107,14 @@ static int sequencer_properties(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_properties(wmOperatorType *ot)
{
- ot->name= "Properties";
- ot->idname= "SEQUENCER_OT_properties";
- ot->description= "Open sequencer properties panel";
+ ot->name = "Properties";
+ ot->idname = "SEQUENCER_OT_properties";
+ ot->description = "Open sequencer properties panel";
- ot->exec= sequencer_properties;
- ot->poll= ED_operator_sequencer_active;
+ ot->exec = sequencer_properties;
+ ot->poll = ED_operator_sequencer_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 1bbf4b670b5..d29af06bbcd 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -72,7 +72,7 @@
#define SEQ_RIGHTHANDLE 2
-/* Note, Dont use SEQ_BEGIN/SEQ_END while drawing!
+/* Note, Don't use SEQ_BEGIN/SEQ_END while drawing!
* it messes up transform, - Campbell */
static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, float y1, float x2, float y2);
@@ -93,11 +93,15 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[
case SEQ_MOVIE:
UI_GetThemeColor3ubv(TH_SEQ_MOVIE, col);
break;
+
+ case SEQ_MOVIECLIP:
+ UI_GetThemeColor3ubv(TH_SEQ_MOVIECLIP, col);
+ break;
case SEQ_SCENE:
UI_GetThemeColor3ubv(TH_SEQ_SCENE, col);
- if(seq->scene==curscene) {
+ if (seq->scene==curscene) {
UI_GetColorPtrShade3ubv(col, col, 20);
}
break;
@@ -144,7 +148,8 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[
case SEQ_COLOR:
if (colvars->col) {
rgb_float_to_uchar(col, colvars->col);
- } else {
+ }
+ else {
col[0] = col[1] = col[2] = 128;
}
break;
@@ -156,7 +161,7 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[
case SEQ_SOUND:
UI_GetThemeColor3ubv(TH_SEQ_AUDIO, col);
blendcol[0] = blendcol[1] = blendcol[2] = 128;
- if(seq->flag & SEQ_MUTE) UI_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.5, 20);
+ if (seq->flag & SEQ_MUTE) UI_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.5, 20);
break;
default:
@@ -171,7 +176,7 @@ static void drawseqwave(Scene *scene, Sequence *seq, float x1, float y1, float x
* x2 the end x value, same for y1 and y2
* stepsize is width of a pixel.
*/
- if(seq->flag & SEQ_AUDIO_DRAW_WAVEFORM) {
+ if (seq->flag & SEQ_AUDIO_DRAW_WAVEFORM) {
int i, j, pos;
int length = floor((x2-x1)/stepsize)+1;
float ymid = (y1+y2)/2;
@@ -182,34 +187,34 @@ static void drawseqwave(Scene *scene, Sequence *seq, float x1, float y1, float x
SoundWaveform* waveform;
- if(!seq->sound->waveform)
+ if (!seq->sound->waveform)
sound_read_waveform(seq->sound);
- if(!seq->sound->waveform)
+ if (!seq->sound->waveform)
return; /* zero length sound */
waveform = seq->sound->waveform;
- if(!waveform)
+ if (!waveform)
return;
startsample = floor((seq->startofs + seq->anim_startofs)/FPS * SOUND_WAVE_SAMPLES_PER_SECOND);
endsample = ceil((seq->startofs + seq->anim_startofs + seq->enddisp - seq->startdisp)/FPS * SOUND_WAVE_SAMPLES_PER_SECOND);
samplestep = (endsample-startsample) * stepsize / (x2-x1);
- if(length > floor((waveform->length - startsample) / samplestep))
+ if (length > floor((waveform->length - startsample) / samplestep))
length = floor((waveform->length - startsample) / samplestep);
glBegin(GL_LINE_STRIP);
- for(i = 0; i < length; i++)
+ for (i = 0; i < length; i++)
{
pos = startsample + i * samplestep;
value = waveform->data[pos * 3];
- for(j = pos+1; (j < waveform->length) && (j < pos + samplestep); j++)
+ for (j = pos+1; (j < waveform->length) && (j < pos + samplestep); j++)
{
- if(value > waveform->data[j * 3])
+ if (value > waveform->data[j * 3])
value = waveform->data[j * 3];
}
@@ -218,15 +223,15 @@ static void drawseqwave(Scene *scene, Sequence *seq, float x1, float y1, float x
glEnd();
glBegin(GL_LINE_STRIP);
- for(i = 0; i < length; i++)
+ for (i = 0; i < length; i++)
{
pos = startsample + i * samplestep;
value = waveform->data[pos * 3 + 1];
- for(j = pos+1; (j < waveform->length) && (j < pos + samplestep); j++)
+ for (j = pos+1; (j < waveform->length) && (j < pos + samplestep); j++)
{
- if(value < waveform->data[j * 3 + 1])
+ if (value < waveform->data[j * 3 + 1])
value = waveform->data[j * 3 + 1];
}
@@ -238,7 +243,7 @@ static void drawseqwave(Scene *scene, Sequence *seq, float x1, float y1, float x
static void drawmeta_stipple(int value)
{
- if(value) {
+ if (value) {
glEnable(GL_POLYGON_STIPPLE);
glPolygonStipple(stipple_halftone);
@@ -269,7 +274,7 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1,
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- if(seqm->flag & SEQ_MUTE)
+ if (seqm->flag & SEQ_MUTE)
drawmeta_stipple(1);
for (seq= seqm->seqbase.first; seq; seq= seq->next) {
@@ -283,13 +288,13 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1,
col[3]= 196; /* alpha, used for all meta children */
for (seq= seqm->seqbase.first; seq; seq= seq->next) {
- if((seq->startdisp > x2 || seq->enddisp < x1) == 0) {
+ if ((seq->startdisp > x2 || seq->enddisp < x1) == 0) {
float y_chan= (seq->machine - chan_min) / (float)(chan_range) * draw_range;
float x1_chan= seq->startdisp;
float x2_chan= seq->enddisp;
float y1_chan, y2_chan;
- if((seqm->flag & SEQ_MUTE) == 0 && (seq->flag & SEQ_MUTE))
+ if ((seqm->flag & SEQ_MUTE) == 0 && (seq->flag & SEQ_MUTE))
drawmeta_stipple(1);
get_seq_color3ubv(scene, seq, col);
@@ -297,8 +302,8 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1,
glColor4ubv(col);
/* clamp within parent sequence strip bounds */
- if(x1_chan < x1) x1_chan= x1;
- if(x2_chan > x2) x2_chan= x2;
+ if (x1_chan < x1) x1_chan= x1;
+ if (x2_chan > x2) x2_chan= x2;
y1_chan= y1 + y_chan + (draw_height * SEQ_STRIP_OFSBOTTOM);
y2_chan= y1 + y_chan + (draw_height * SEQ_STRIP_OFSTOP);
@@ -309,7 +314,7 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1,
glColor4ubv(col);
fdrawbox(x1_chan, y1_chan, x2_chan, y2_chan);
- if((seqm->flag & SEQ_MUTE) == 0 && (seq->flag & SEQ_MUTE))
+ if ((seqm->flag & SEQ_MUTE) == 0 && (seq->flag & SEQ_MUTE))
drawmeta_stipple(0);
}
}
@@ -352,7 +357,8 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire
v3[0]= v2[0] + handsize/4; v3[1]= (y1+y2)/2.0f;
whichsel = SEQ_LEFTSEL;
- } else if (direction == SEQ_RIGHTHANDLE) {
+ }
+ else if (direction == SEQ_RIGHTHANDLE) {
rx1 = x2-handsize*0.75f;
rx2 = x2;
@@ -364,19 +370,19 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire
}
/* draw! */
- if(seq->type < SEQ_EFFECT ||
+ if (seq->type < SEQ_EFFECT ||
get_sequence_effect_num_inputs(seq->type) == 0) {
glEnable( GL_BLEND );
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- if(seq->flag & whichsel) glColor4ub(0, 0, 0, 80);
+ if (seq->flag & whichsel) glColor4ub(0, 0, 0, 80);
else if (seq->flag & SELECT) glColor4ub(255, 255, 255, 30);
else glColor4ub(0, 0, 0, 22);
glRectf(rx1, y1, rx2, y2);
- if(seq->flag & whichsel) glColor4ub(255, 255, 255, 200);
+ if (seq->flag & whichsel) glColor4ub(255, 255, 255, 200);
else glColor4ub(0, 0, 0, 50);
glEnable( GL_POLYGON_SMOOTH );
@@ -388,13 +394,14 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire
glDisable( GL_BLEND );
}
- if(G.moving || (seq->flag & whichsel)) {
+ if (G.moving || (seq->flag & whichsel)) {
const char col[4]= {255, 255, 255, 255};
if (direction == SEQ_LEFTHANDLE) {
BLI_snprintf(numstr, sizeof(numstr),"%d", seq->startdisp);
x1= rx1;
y1 -= 0.45f;
- } else {
+ }
+ else {
BLI_snprintf(numstr, sizeof(numstr), "%d", seq->enddisp - 1);
x1= x2 - handsize*0.75f;
y1= y2 + 0.05f;
@@ -409,7 +416,7 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq)
unsigned char col[3], blendcol[3];
View2D *v2d= &ar->v2d;
- if(seq->type >= SEQ_EFFECT) return;
+ if (seq->type >= SEQ_EFFECT) return;
x1= seq->startdisp;
x2= seq->enddisp;
@@ -419,11 +426,11 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq)
pixely = (v2d->cur.ymax - v2d->cur.ymin)/(v2d->mask.ymax - v2d->mask.ymin);
- if(pixely <= 0) return; /* can happen when the view is split/resized */
+ if (pixely <= 0) return; /* can happen when the view is split/resized */
blendcol[0] = blendcol[1] = blendcol[2] = 120;
- if(seq->startofs) {
+ if (seq->startofs) {
glEnable( GL_BLEND );
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -432,7 +439,8 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq)
if (seq->flag & SELECT) {
UI_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.3, -40);
glColor4ub(col[0], col[1], col[2], 170);
- } else {
+ }
+ else {
UI_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.6, 0);
glColor4ub(col[0], col[1], col[2], 110);
}
@@ -446,7 +454,7 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq)
glDisable( GL_BLEND );
}
- if(seq->endofs) {
+ if (seq->endofs) {
glEnable( GL_BLEND );
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -455,7 +463,8 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq)
if (seq->flag & SELECT) {
UI_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.3, -40);
glColor4ub(col[0], col[1], col[2], 170);
- } else {
+ }
+ else {
UI_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.6, 0);
glColor4ub(col[0], col[1], col[2], 110);
}
@@ -469,7 +478,7 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq)
glDisable( GL_BLEND );
}
- if(seq->startstill) {
+ if (seq->startstill) {
get_seq_color3ubv(scene, seq, col);
UI_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.75, 40);
glColor3ubv((GLubyte *)col);
@@ -483,11 +492,11 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq)
glColor3ubv((GLubyte *)col);
- for(a=y1; a< y2; a+= pixely * 2.0f) {
+ for (a=y1; a< y2; a+= pixely * 2.0f) {
fdrawline(x1, a, (float)(seq->start), a);
}
}
- if(seq->endstill) {
+ if (seq->endstill) {
get_seq_color3ubv(scene, seq, col);
UI_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.75, 40);
glColor3ubv((GLubyte *)col);
@@ -501,7 +510,7 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq)
glColor3ubv((GLubyte *)col);
- for(a=y1; a< y2; a+= pixely * 2.0f) {
+ for (a=y1; a< y2; a+= pixely * 2.0f) {
fdrawline((float)(seq->start+seq->len), a, x2, a);
}
}
@@ -516,17 +525,18 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
char col[4];
/* note, all strings should include 'name' */
- if(name[0]=='\0')
+ if (name[0]=='\0')
name= give_seqname(seq);
- if(seq->type == SEQ_META || seq->type == SEQ_ADJUSTMENT) {
+ if (seq->type == SEQ_META || seq->type == SEQ_ADJUSTMENT) {
BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name);
}
- else if(seq->type == SEQ_SCENE) {
- if(seq->scene) {
- if(seq->scene_camera) {
+ else if (seq->type == SEQ_SCENE) {
+ if (seq->scene) {
+ if (seq->scene_camera) {
BLI_snprintf(str, sizeof(str), "%d | %s: %s (%s)", seq->len, name, seq->scene->id.name+2, ((ID *)seq->scene_camera)->name+2);
- } else {
+ }
+ else {
BLI_snprintf(str, sizeof(str), "%d | %s: %s", seq->len, name, seq->scene->id.name+2);
}
}
@@ -534,17 +544,25 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name);
}
}
- else if(seq->type == SEQ_MULTICAM) {
+ else if (seq->type == SEQ_MOVIECLIP) {
+ if (seq->clip && strcmp(name, seq->clip->id.name+2) != 0) {
+ BLI_snprintf(str, sizeof(str), "%d | %s: %s", seq->len, name, seq->clip->id.name+2);
+ }
+ else {
+ BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name);
+ }
+ }
+ else if (seq->type == SEQ_MULTICAM) {
BLI_snprintf(str, sizeof(str), "Cam | %s: %d", name, seq->multicam_source);
}
- else if(seq->type == SEQ_IMAGE) {
+ else if (seq->type == SEQ_IMAGE) {
BLI_snprintf(str, sizeof(str), "%d | %s: %s%s", seq->len, name, seq->strip->dir, seq->strip->stripdata->name);
}
- else if(seq->type & SEQ_EFFECT) {
+ else if (seq->type & SEQ_EFFECT) {
int can_float = (seq->type != SEQ_PLUGIN)
|| (seq->plugin && seq->plugin->version >= 4);
- if(seq->seq3!=seq->seq2 && seq->seq1!=seq->seq3)
+ if (seq->seq3!=seq->seq2 && seq->seq1!=seq->seq3)
BLI_snprintf(str, sizeof(str), "%d | %s: %d>%d (use %d)%s", seq->len, name, seq->seq1->machine, seq->seq2->machine, seq->seq3->machine, can_float ? "" : " No float, upgrade plugin!");
else if (seq->seq1 && seq->seq2)
BLI_snprintf(str, sizeof(str), "%d | %s: %d>%d%s", seq->len, name, seq->seq1->machine, seq->seq2->machine, can_float ? "" : " No float, upgrade plugin!");
@@ -552,7 +570,7 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name);
}
else if (seq->type == SEQ_SOUND) {
- if(seq->sound)
+ if (seq->sound)
BLI_snprintf(str, sizeof(str), "%d | %s: %s", seq->len, name, seq->sound->name);
else
BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name);
@@ -561,19 +579,21 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
BLI_snprintf(str, sizeof(str), "%d | %s: %s%s", seq->len, name, seq->strip->dir, seq->strip->stripdata->name);
}
- if(seq->flag & SELECT){
+ if (seq->flag & SELECT) {
col[0]= col[1]= col[2]= 255;
- }else if ((((int)background_col[0] + (int)background_col[1] + (int)background_col[2]) / 3) < 50){
+ }
+ else if ((((int)background_col[0] + (int)background_col[1] + (int)background_col[2]) / 3) < 50) {
col[0]= col[1]= col[2]= 80; /* use lighter text color for dark background */
- }else{
+ }
+ else {
col[0]= col[1]= col[2]= 0;
}
col[3]= 255;
- rect.xmin= x1;
- rect.ymin= y1;
- rect.xmax= x2;
- rect.ymax= y2;
+ rect.xmin = x1;
+ rect.ymin = y1;
+ rect.xmax = x2;
+ rect.ymax = y2;
UI_view2d_text_cache_rectf(v2d, &rect, str, col);
}
@@ -593,8 +613,8 @@ static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, floa
glShadeModel(GL_SMOOTH);
glBegin(GL_QUADS);
- if(seq->flag & SEQ_INVALID_EFFECT) { col[0]= 255; col[1]= 0; col[2]= 255; }
- else if(seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, -50);
+ if (seq->flag & SEQ_INVALID_EFFECT) { col[0]= 255; col[1]= 0; col[2]= 255; }
+ else if (seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, -50);
/* else UI_GetColorPtrShade3ubv(col, col, 0); */ /* DO NOTHING */
glColor3ubv(col);
@@ -602,8 +622,8 @@ static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, floa
glVertex2f(x1,y1);
glVertex2f(x2,y1);
- if(seq->flag & SEQ_INVALID_EFFECT) { col[0]= 255; col[1]= 0; col[2]= 255; }
- else if(seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 5);
+ if (seq->flag & SEQ_INVALID_EFFECT) { col[0]= 255; col[1]= 0; col[2]= 255; }
+ else if (seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 5);
else UI_GetColorPtrShade3ubv(col, col, -5);
glColor3ubv((GLubyte *)col);
@@ -620,7 +640,7 @@ static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, floa
glVertex2f(x1,ymid2);
glVertex2f(x2,ymid2);
- if(seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, -15);
+ if (seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, -15);
else UI_GetColorPtrShade3ubv(col, col, 25);
glColor3ubv((GLubyte *)col);
@@ -650,10 +670,10 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline
is_single_image = (char)seq_single_check(seq);
/* body */
- if(seq->startstill) x1= seq->start;
+ if (seq->startstill) x1= seq->start;
else x1= seq->startdisp;
y1= seq->machine+SEQ_STRIP_OFSBOTTOM;
- if(seq->endstill) x2= seq->start+seq->len;
+ if (seq->endstill) x2= seq->start+seq->len;
else x2= seq->enddisp;
y2= seq->machine+SEQ_STRIP_OFSTOP;
@@ -680,10 +700,10 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline
x2= seq->enddisp;
/* draw sound wave */
- if(seq->type == SEQ_SOUND) drawseqwave(scene, seq, x1, y1, x2, y2, (ar->v2d.cur.xmax - ar->v2d.cur.xmin)/ar->winx);
+ if (seq->type == SEQ_SOUND) drawseqwave(scene, seq, x1, y1, x2, y2, (ar->v2d.cur.xmax - ar->v2d.cur.xmin)/ar->winx);
/* draw lock */
- if(seq->flag & SEQ_LOCK) {
+ if (seq->flag & SEQ_LOCK) {
glEnable(GL_POLYGON_STIPPLE);
glEnable(GL_BLEND);
@@ -703,7 +723,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline
get_seq_color3ubv(scene, seq, col);
if (G.moving && (seq->flag & SELECT)) {
- if(seq->flag & SEQ_OVERLAP) {
+ if (seq->flag & SEQ_OVERLAP) {
col[0]= 255; col[1]= col[2]= 40;
}
else
@@ -725,20 +745,20 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline
glDisable(GL_LINE_STIPPLE);
}
- if(seq->type==SEQ_META) drawmeta_contents(scene, seq, x1, y1, x2, y2);
+ if (seq->type==SEQ_META) drawmeta_contents(scene, seq, x1, y1, x2, y2);
/* calculate if seq is long enough to print a name */
x1= seq->startdisp+seq->handsize;
x2= seq->enddisp-seq->handsize;
/* info text on the strip */
- if(x1<v2d->cur.xmin) x1= v2d->cur.xmin;
- else if(x1>v2d->cur.xmax) x1= v2d->cur.xmax;
- if(x2<v2d->cur.xmin) x2= v2d->cur.xmin;
- else if(x2>v2d->cur.xmax) x2= v2d->cur.xmax;
+ if (x1<v2d->cur.xmin) x1= v2d->cur.xmin;
+ else if (x1>v2d->cur.xmax) x1= v2d->cur.xmax;
+ if (x2<v2d->cur.xmin) x2= v2d->cur.xmin;
+ else if (x2>v2d->cur.xmax) x2= v2d->cur.xmax;
/* nice text here would require changing the view matrix for texture text */
- if( (x2-x1) / pixelx > 32) {
+ if ( (x2-x1) / pixelx > 32) {
draw_seq_text(v2d, seq, x1, x2, y1, y2, background_col);
}
}
@@ -750,7 +770,7 @@ static void UNUSED_FUNCTION(set_special_seq_update)(int val)
// int x;
/* if mouse over a sequence && LEFTMOUSE */
- if(val) {
+ if (val) {
// XXX special_seq_update= find_nearest_seq(&x);
}
else special_seq_update= NULL;
@@ -766,6 +786,7 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq
float viewrectx, viewrecty;
float render_size = 0.0;
float proxy_size = 100.0;
+ float col[3];
GLuint texid;
GLuint last_texid;
SeqRenderData context;
@@ -773,7 +794,8 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq
render_size = sseq->render_size;
if (render_size == 0) {
render_size = scene->r.size;
- } else {
+ }
+ else {
proxy_size = render_size;
}
if (render_size < 0) {
@@ -792,9 +814,9 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq
viewrecty /= proxy_size / 100.0f;
}
- if(frame_ofs == 0) {
- /* XXX TODO: take color from theme */
- glClearColor(0.0, 0.0, 0.0, 0.0);
+ if (frame_ofs == 0) {
+ UI_GetThemeColor3fv(TH_SEQ_PREVIEW, col);
+ glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
}
@@ -805,7 +827,7 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq
UI_view2d_curRect_validate(v2d);
/* only initialize the preview if a render is in progress */
- if(G.rendering)
+ if (G.rendering)
return;
context = seq_new_render_data(bmain, scene, rectx, recty, proxy_size);
@@ -817,10 +839,10 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq
else
ibuf= (ImBuf *)give_ibuf_seq_threaded(context, cfra + frame_ofs, sseq->chanshown);
- if(ibuf==NULL)
+ if (ibuf==NULL)
return;
- if(ibuf->rect==NULL && ibuf->rect_float == NULL)
+ if (ibuf->rect==NULL && ibuf->rect_float == NULL)
return;
switch(sseq->mainb) {
@@ -832,7 +854,8 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq
case SEQ_DRAW_IMG_WAVEFORM:
if ((sseq->flag & SEQ_DRAW_COLOR_SEPARATED) != 0) {
scope = make_sep_waveform_view_from_ibuf(ibuf);
- } else {
+ }
+ else {
scope = make_waveform_view_from_ibuf(ibuf);
}
break;
@@ -849,7 +872,7 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq
ibuf = scope;
}
- if(ibuf->rect_float && ibuf->rect==NULL) {
+ if (ibuf->rect_float && ibuf->rect==NULL) {
IMB_rect_from_float(ibuf);
}
@@ -868,12 +891,12 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, ibuf->x, ibuf->y, 0, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
glBegin(GL_QUADS);
- if(frame_ofs) {
+ if (frame_ofs) {
rctf tot_clip;
- tot_clip.xmin= v2d->tot.xmin + (ABS(v2d->tot.xmax - v2d->tot.xmin) * scene->ed->over_border.xmin);
- tot_clip.ymin= v2d->tot.ymin + (ABS(v2d->tot.ymax - v2d->tot.ymin) * scene->ed->over_border.ymin);
- tot_clip.xmax= v2d->tot.xmin + (ABS(v2d->tot.xmax - v2d->tot.xmin) * scene->ed->over_border.xmax);
- tot_clip.ymax= v2d->tot.ymin + (ABS(v2d->tot.ymax - v2d->tot.ymin) * scene->ed->over_border.ymax);
+ tot_clip.xmin = v2d->tot.xmin + (ABS(v2d->tot.xmax - v2d->tot.xmin) * scene->ed->over_border.xmin);
+ tot_clip.ymin = v2d->tot.ymin + (ABS(v2d->tot.ymax - v2d->tot.ymin) * scene->ed->over_border.ymin);
+ tot_clip.xmax = v2d->tot.xmin + (ABS(v2d->tot.xmax - v2d->tot.xmin) * scene->ed->over_border.xmax);
+ tot_clip.ymax = v2d->tot.ymin + (ABS(v2d->tot.ymax - v2d->tot.ymin) * scene->ed->over_border.ymax);
glTexCoord2f(scene->ed->over_border.xmin, scene->ed->over_border.ymin);glVertex2f(tot_clip.xmin, tot_clip.ymin);
glTexCoord2f(scene->ed->over_border.xmin, scene->ed->over_border.ymax);glVertex2f(tot_clip.xmin, tot_clip.ymax);
@@ -891,7 +914,7 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq
glDisable(GL_TEXTURE_2D);
glDeleteTextures(1, &texid);
- if(sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
+ if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
float x1 = v2d->tot.xmin;
float y1 = v2d->tot.ymin;
@@ -956,7 +979,8 @@ void drawprefetchseqspace(Scene *scene, ARegion *UNUSED(ar), SpaceSeq *sseq)
int proxy_size = 100.0;
if (render_size == 0) {
render_size = scene->r.size;
- } else {
+ }
+ else {
proxy_size = render_size;
}
if (render_size < 0) {
@@ -966,7 +990,7 @@ void drawprefetchseqspace(Scene *scene, ARegion *UNUSED(ar), SpaceSeq *sseq)
rectx= (render_size*scene->r.xsch)/100;
recty= (render_size*scene->r.ysch)/100;
- if(sseq->mainb != SEQ_DRAW_SEQUENCE) {
+ if (sseq->mainb != SEQ_DRAW_SEQUENCE) {
give_ibuf_prefetch_request(
rectx, recty, (scene->r.cfra), sseq->chanshown,
proxy_size);
@@ -1138,7 +1162,7 @@ void draw_timeline_seq(const bContext *C, ARegion *ar)
ANIM_draw_previewrange(C, v2d);
/* overlap playhead */
- if(scene->ed && scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW) {
+ if (scene->ed && scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW) {
int cfra_over= (scene->ed->over_flag & SEQ_EDIT_OVERLAY_ABS) ? scene->ed->over_cfra : scene->r.cfra + scene->ed->over_ofs;
glColor3f(0.2, 0.2, 0.2);
// glRectf(cfra_over, v2d->cur.ymin, scene->ed->over_ofs + scene->r.cfra + 1, v2d->cur.ymax);
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 2815297eb13..bcc2c358529 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -55,6 +55,7 @@
#include "BKE_sequencer.h"
#include "BKE_report.h"
#include "BKE_sound.h"
+#include "BKE_movieclip.h"
#include "IMB_imbuf.h"
@@ -75,9 +76,6 @@
/* own include */
#include "sequencer_intern.h"
-static int okee(const char *UNUSED(dummy)) {return 0;}
-
-
/* XXX */
/* RNA Enums, used in multiple files */
EnumPropertyItem sequencer_prop_effect_types[] = {
@@ -225,12 +223,12 @@ static void seq_proxy_build_job(const bContext *C)
void seq_rectf(Sequence *seq, rctf *rectf)
{
- if(seq->startstill) rectf->xmin= seq->start;
- else rectf->xmin= seq->startdisp;
- rectf->ymin= seq->machine+SEQ_STRIP_OFSBOTTOM;
- if(seq->endstill) rectf->xmax= seq->start+seq->len;
- else rectf->xmax= seq->enddisp;
- rectf->ymax= seq->machine+SEQ_STRIP_OFSTOP;
+ if (seq->startstill) rectf->xmin = seq->start;
+ else rectf->xmin = seq->startdisp;
+ rectf->ymin = seq->machine+SEQ_STRIP_OFSBOTTOM;
+ if (seq->endstill) rectf->xmax = seq->start+seq->len;
+ else rectf->xmax = seq->enddisp;
+ rectf->ymax = seq->machine+SEQ_STRIP_OFSTOP;
}
static void UNUSED_FUNCTION(change_plugin_seq)(Scene *scene, char *str) /* called from fileselect */
@@ -239,7 +237,7 @@ static void UNUSED_FUNCTION(change_plugin_seq)(Scene *scene, char *str) /* calle
struct SeqEffectHandle sh;
Sequence *last_seq= seq_active_get(scene);
- if(last_seq==NULL || last_seq->type != SEQ_PLUGIN) return;
+ if (last_seq==NULL || last_seq->type != SEQ_PLUGIN) return;
sh = get_sequence_effect(last_seq);
sh.free(last_seq);
@@ -249,7 +247,7 @@ static void UNUSED_FUNCTION(change_plugin_seq)(Scene *scene, char *str) /* calle
last_seq->seq2->machine,
last_seq->seq3->machine);
- if( seq_test_overlap(ed->seqbasep, last_seq) ) shuffle_seq(ed->seqbasep, last_seq, scene);
+ if ( seq_test_overlap(ed->seqbasep, last_seq) ) shuffle_seq(ed->seqbasep, last_seq, scene);
}
@@ -261,7 +259,7 @@ void boundbox_seq(Scene *scene, rctf *rect)
float min[2], max[2];
- if(ed==NULL) return;
+ if (ed==NULL) return;
min[0]= 0.0;
max[0]= EFRA+1;
@@ -269,19 +267,19 @@ void boundbox_seq(Scene *scene, rctf *rect)
max[1]= 8.0;
seq= ed->seqbasep->first;
- while(seq) {
+ while (seq) {
- if( min[0] > seq->startdisp-1) min[0]= seq->startdisp-1;
- if( max[0] < seq->enddisp+1) max[0]= seq->enddisp+1;
- if( max[1] < seq->machine+2) max[1]= seq->machine+2;
+ if ( min[0] > seq->startdisp-1) min[0]= seq->startdisp-1;
+ if ( max[0] < seq->enddisp+1) max[0]= seq->enddisp+1;
+ if ( max[1] < seq->machine+2) max[1]= seq->machine+2;
seq= seq->next;
}
- rect->xmin= min[0];
- rect->xmax= max[0];
- rect->ymin= min[1];
- rect->ymax= max[1];
+ rect->xmin = min[0];
+ rect->xmax = max[0];
+ rect->ymin = min[1];
+ rect->ymax = max[1];
}
@@ -306,12 +304,12 @@ Sequence *find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int se
Sequence *seq;
Editing *ed= seq_give_editing(scene, FALSE);
- if(ed==NULL) return NULL;
+ if (ed==NULL) return NULL;
if (sel>0) sel = SELECT;
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
- if( (seq!=test) &&
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
+ if ( (seq!=test) &&
(test->machine==seq->machine) &&
((sel == -1) || (sel && (seq->flag & SELECT)) || (sel==0 && (seq->flag & SELECT)==0) ))
{
@@ -342,11 +340,11 @@ static Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, i
best_dist = MAXFRAME*2;
- if(ed==NULL) return NULL;
+ if (ed==NULL) return NULL;
seq= ed->seqbasep->first;
- while(seq) {
- if( (seq!=test) &&
+ while (seq) {
+ if ( (seq!=test) &&
(test->machine==seq->machine) &&
(test->depth==seq->depth) &&
((sel == -1) || (sel==(seq->flag & SELECT))))
@@ -369,7 +367,8 @@ static Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, i
if (dist==0) {
best_seq = seq;
break;
- } else if (dist < best_dist) {
+ }
+ else if (dist < best_dist) {
best_dist = dist;
best_seq = seq;
}
@@ -391,7 +390,7 @@ Sequence *find_nearest_seq(Scene *scene, View2D *v2d, int *hand, const int mval[
*hand= SEQ_SIDE_NONE;
- if(ed==NULL) return NULL;
+ if (ed==NULL) return NULL;
pixelx = (v2d->cur.xmax - v2d->cur.xmin)/(v2d->mask.xmax - v2d->mask.xmin);
@@ -399,32 +398,33 @@ Sequence *find_nearest_seq(Scene *scene, View2D *v2d, int *hand, const int mval[
seq= ed->seqbasep->first;
- while(seq) {
- if(seq->machine == (int)y) {
+ while (seq) {
+ if (seq->machine == (int)y) {
/* check for both normal strips, and strips that have been flipped horizontally */
- if( ((seq->startdisp < seq->enddisp) && (seq->startdisp<=x && seq->enddisp>=x)) ||
+ if ( ((seq->startdisp < seq->enddisp) && (seq->startdisp<=x && seq->enddisp>=x)) ||
((seq->startdisp > seq->enddisp) && (seq->startdisp>=x && seq->enddisp<=x)) )
{
- if(seq_tx_test(seq)) {
+ if (seq_tx_test(seq)) {
/* clamp handles to defined size in pixel space */
handsize = seq->handsize;
displen = (float)abs(seq->startdisp - seq->enddisp);
- if (displen / pixelx > 16) { /* dont even try to grab the handles of small strips */
+ if (displen / pixelx > 16) { /* don't even try to grab the handles of small strips */
/* Set the max value to handle to 1/3 of the total len when its less then 28.
* This is important because otherwise selecting handles happens even when you click in the middle */
if ((displen/3) < 30*pixelx) {
handsize = displen/3;
- } else {
+ }
+ else {
CLAMP(handsize, 7*pixelx, 30*pixelx);
}
- if( handsize+seq->startdisp >=x )
+ if ( handsize+seq->startdisp >=x )
*hand= SEQ_SIDE_LEFT;
- else if( -handsize+seq->enddisp <=x )
+ else if ( -handsize+seq->enddisp <=x )
*hand= SEQ_SIDE_RIGHT;
}
}
@@ -445,11 +445,11 @@ static int seq_is_parent(Sequence *par, Sequence *seq)
static int seq_is_predecessor(Sequence *pred, Sequence *seq)
{
if (!pred) return 0;
- if(pred == seq) return 0;
- else if(seq_is_parent(pred, seq)) return 1;
- else if(pred->seq1 && seq_is_predecessor(pred->seq1, seq)) return 1;
- else if(pred->seq2 && seq_is_predecessor(pred->seq2, seq)) return 1;
- else if(pred->seq3 && seq_is_predecessor(pred->seq3, seq)) return 1;
+ if (pred == seq) return 0;
+ else if (seq_is_parent(pred, seq)) return 1;
+ else if (pred->seq1 && seq_is_predecessor(pred->seq1, seq)) return 1;
+ else if (pred->seq2 && seq_is_predecessor(pred->seq2, seq)) return 1;
+ else if (pred->seq3 && seq_is_predecessor(pred->seq3, seq)) return 1;
return 0;
}
@@ -460,7 +460,7 @@ void deselect_all_seq(Scene *scene)
Editing *ed= seq_give_editing(scene, FALSE);
- if(ed==NULL) return;
+ if (ed==NULL) return;
SEQP_BEGIN(ed, seq) {
seq->flag &= ~SEQ_ALLSEL;
@@ -474,13 +474,13 @@ void recurs_sel_seq(Sequence *seqm)
Sequence *seq;
seq= seqm->seqbase.first;
- while(seq) {
+ while (seq) {
- if(seqm->flag & (SEQ_LEFTSEL+SEQ_RIGHTSEL)) seq->flag &= ~SEQ_ALLSEL;
- else if(seqm->flag & SELECT) seq->flag |= SELECT;
+ if (seqm->flag & (SEQ_LEFTSEL+SEQ_RIGHTSEL)) seq->flag &= ~SEQ_ALLSEL;
+ else if (seqm->flag & SELECT) seq->flag |= SELECT;
else seq->flag &= ~SEQ_ALLSEL;
- if(seq->seqbase.first) recurs_sel_seq(seq);
+ if (seq->seqbase.first) recurs_sel_seq(seq);
seq= seq->next;
}
@@ -496,16 +496,16 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen
if (!activeseq)
seq2= seq_active_get(scene);
- for(seq=ed->seqbasep->first; seq; seq=seq->next) {
- if(seq->flag & SELECT) {
+ for (seq=ed->seqbasep->first; seq; seq=seq->next) {
+ if (seq->flag & SELECT) {
if (seq->type == SEQ_SOUND && get_sequence_effect_num_inputs(type) != 0) {
*error_str= "Can't apply effects to audio sequence strips";
return 0;
}
- if((seq != activeseq) && (seq != seq2)) {
- if(seq2 == NULL) seq2= seq;
- else if(seq1 == NULL) seq1= seq;
- else if(seq3 == NULL) seq3= seq;
+ if ((seq != activeseq) && (seq != seq2)) {
+ if (seq2 == NULL) seq2= seq;
+ else if (seq1 == NULL) seq1= seq;
+ else if (seq3 == NULL) seq3= seq;
else {
*error_str= "Can't apply effect to more than 3 sequence strips";
return 0;
@@ -528,18 +528,18 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen
*selseq1 = *selseq2 = *selseq3 = NULL;
return 1; /* succsess */
case 1:
- if(seq2==NULL) {
+ if (seq2==NULL) {
*error_str= "Need at least one selected sequence strip";
return 0;
}
- if(seq1==NULL) seq1= seq2;
- if(seq3==NULL) seq3= seq2;
+ if (seq1==NULL) seq1= seq2;
+ if (seq3==NULL) seq3= seq2;
case 2:
- if(seq1==NULL || seq2==NULL) {
+ if (seq1==NULL || seq2==NULL) {
*error_str= "Need 2 selected sequence strips";
return 0;
}
- if(seq3 == NULL) seq3= seq2;
+ if (seq3 == NULL) seq3= seq2;
}
if (seq1==NULL && seq2==NULL && seq3==NULL) {
@@ -561,18 +561,18 @@ static Sequence *del_seq_find_replace_recurs(Scene *scene, Sequence *seq)
/* try to find a replacement input sequence, and flag for later deletion if
* no replacement can be found */
- if(!seq)
+ if (!seq)
return NULL;
- else if(!(seq->type & SEQ_EFFECT))
+ else if (!(seq->type & SEQ_EFFECT))
return ((seq->flag & SELECT)? NULL: seq);
- else if(!(seq->flag & SELECT)) {
+ else if (!(seq->flag & SELECT)) {
/* try to find replacement for effect inputs */
seq1= del_seq_find_replace_recurs(scene, seq->seq1);
seq2= del_seq_find_replace_recurs(scene, seq->seq2);
seq3= del_seq_find_replace_recurs(scene, seq->seq3);
- if(seq1==seq->seq1 && seq2==seq->seq2 && seq3==seq->seq3);
- else if(seq1 || seq2 || seq3) {
+ if (seq1==seq->seq1 && seq2==seq->seq2 && seq3==seq->seq3);
+ else if (seq1 || seq2 || seq3) {
seq->seq1= (seq1)? seq1: (seq2)? seq2: seq3;
seq->seq2= (seq2)? seq2: (seq1)? seq1: seq3;
seq->seq3= (seq3)? seq3: (seq1)? seq1: seq2;
@@ -584,9 +584,9 @@ static Sequence *del_seq_find_replace_recurs(Scene *scene, Sequence *seq)
}
if (seq->flag & SELECT) {
- if((seq1 = del_seq_find_replace_recurs(scene, seq->seq1))) return seq1;
- if((seq2 = del_seq_find_replace_recurs(scene, seq->seq2))) return seq2;
- if((seq3 = del_seq_find_replace_recurs(scene, seq->seq3))) return seq3;
+ if ((seq1 = del_seq_find_replace_recurs(scene, seq->seq1))) return seq1;
+ if ((seq2 = del_seq_find_replace_recurs(scene, seq->seq2))) return seq2;
+ if ((seq3 = del_seq_find_replace_recurs(scene, seq->seq3))) return seq3;
else return NULL;
}
else
@@ -599,12 +599,12 @@ static void recurs_del_seq_flag(Scene *scene, ListBase *lb, short flag, short de
Sequence *last_seq = seq_active_get(scene);
seq= lb->first;
- while(seq) {
+ while (seq) {
seqn= seq->next;
- if((seq->flag & flag) || deleteall) {
+ if ((seq->flag & flag) || deleteall) {
BLI_remlink(lb, seq);
- if(seq==last_seq) seq_active_set(scene, NULL);
- if(seq->type==SEQ_META) recurs_del_seq_flag(scene, &seq->seqbase, flag, 1);
+ if (seq==last_seq) seq_active_set(scene, NULL);
+ if (seq->type==SEQ_META) recurs_del_seq_flag(scene, &seq->seqbase, flag, 1);
seq_free_sequence(scene, seq);
}
seq= seqn;
@@ -639,7 +639,8 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence * seq, int cutframe)
if (seq->type == SEQ_META) {
skip_dup = TRUE;
seq->startstill = seq->start - cutframe;
- } else {
+ }
+ else {
seq->start= cutframe -1;
seq->startstill= cutframe -seq->startdisp -1;
seq->anim_endofs += seq->len - 1;
@@ -663,7 +664,6 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence * seq, int cutframe)
reload_sequence_new_file(scene, seq, FALSE);
calc_sequence(scene, seq);
- new_tstripdata(seq);
if (!skip_dup) {
/* Duplicate AFTER the first change */
@@ -704,7 +704,6 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence * seq, int cutframe)
reload_sequence_new_file(scene, seqn, FALSE);
calc_sequence(scene, seqn);
- new_tstripdata(seqn);
}
return seqn;
}
@@ -736,7 +735,8 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence * seq, int cutframe)
if (seq->type == SEQ_META) {
skip_dup = TRUE;
seq->startstill = seq->start - cutframe;
- } else {
+ }
+ else {
seq->start= cutframe -1;
seq->startstill= cutframe -seq->startdisp -1;
seq->endofs = seq->len - 1;
@@ -757,7 +757,6 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence * seq, int cutframe)
}
calc_sequence(scene, seq);
- new_tstripdata(seq);
if (!skip_dup) {
/* Duplicate AFTER the first change */
@@ -793,7 +792,6 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence * seq, int cutframe)
}
calc_sequence(scene, seqn);
- new_tstripdata(seqn);
}
return seqn;
}
@@ -809,21 +807,23 @@ static int cut_seq_list(Scene *scene, ListBase *old, ListBase *new, int cutframe
seq= old->first;
- while(seq) {
+ while (seq) {
seq_next_iter = seq->next; /* we need this because we may remove seq */
seq->tmp= NULL;
- if(seq->flag & SELECT) {
- if(cutframe > seq->startdisp &&
+ if (seq->flag & SELECT) {
+ if (cutframe > seq->startdisp &&
cutframe < seq->enddisp) {
Sequence * seqn = cut_seq(scene, seq, cutframe);
if (seqn) {
BLI_addtail(new, seqn);
}
did_something = TRUE;
- } else if (seq->enddisp <= cutframe) {
+ }
+ else if (seq->enddisp <= cutframe) {
/* do nothing */
- } else if (seq->startdisp >= cutframe) {
+ }
+ else if (seq->startdisp >= cutframe) {
/* move into new list */
BLI_remlink(old, seq);
BLI_addtail(new, seq);
@@ -842,10 +842,10 @@ static int insert_gap(Scene *scene, int gap, int cfra)
/* all strips >= cfra are shifted */
- if(ed==NULL) return 0;
+ if (ed==NULL) return 0;
SEQP_BEGIN(ed, seq) {
- if(seq->startdisp >= cfra) {
+ if (seq->startdisp >= cfra) {
seq->start+= gap;
calc_sequence(scene, seq);
done= 1;
@@ -864,16 +864,16 @@ static void UNUSED_FUNCTION(touch_seq_files)(Scene *scene)
/* touch all strips with movies */
- if(ed==NULL) return;
+ if (ed==NULL) return;
- if(okee("Touch and print selected movies")==0) return;
+ // XXX25 if (okee("Touch and print selected movies")==0) return;
WM_cursor_wait(1);
SEQP_BEGIN(ed, seq) {
- if(seq->flag & SELECT) {
- if(seq->type==SEQ_MOVIE) {
- if(seq->strip && seq->strip->stripdata) {
+ if (seq->flag & SELECT) {
+ if (seq->type==SEQ_MOVIE) {
+ if (seq->strip && seq->strip->stripdata) {
BLI_make_file_string(G.main->name, str, seq->strip->dir, seq->strip->stripdata->name);
BLI_file_touch(seq->name);
}
@@ -893,13 +893,13 @@ static void set_filter_seq(Scene *scene)
Editing *ed= seq_give_editing(scene, FALSE);
- if(ed==NULL) return;
+ if (ed==NULL) return;
- if(okee("Set Deinterlace")==0) return;
+ if (okee("Set Deinterlace")==0) return;
SEQP_BEGIN(ed, seq) {
- if(seq->flag & SELECT) {
- if(seq->type==SEQ_MOVIE) {
+ if (seq->flag & SELECT) {
+ if (seq->type==SEQ_MOVIE) {
seq->flag |= SEQ_FILTERY;
reload_sequence_new_file(scene, seq, FALSE);
calc_sequence(scene, seq);
@@ -918,7 +918,7 @@ static void UNUSED_FUNCTION(seq_remap_paths)(Scene *scene)
char from[FILE_MAX], to[FILE_MAX], stripped[FILE_MAX];
- if(last_seq==NULL)
+ if (last_seq==NULL)
return;
BLI_strncpy(from, last_seq->strip->dir, sizeof(from));
@@ -933,8 +933,8 @@ static void UNUSED_FUNCTION(seq_remap_paths)(Scene *scene)
return;
SEQP_BEGIN(ed, seq) {
- if(seq->flag & SELECT) {
- if(strncmp(seq->strip->dir, from, strlen(from))==0) {
+ if (seq->flag & SELECT) {
+ if (strncmp(seq->strip->dir, from, strlen(from))==0) {
printf("found %s\n", seq->strip->dir);
/* strip off the beginning */
@@ -958,19 +958,19 @@ static void UNUSED_FUNCTION(no_gaps)(Scene *scene)
int cfra, first= 0, done;
- if(ed==NULL) return;
+ if (ed==NULL) return;
- for(cfra= CFRA; cfra<=EFRA; cfra++) {
- if(first==0) {
- if( evaluate_seq_frame(scene, cfra) ) first= 1;
+ for (cfra= CFRA; cfra<=EFRA; cfra++) {
+ if (first==0) {
+ if ( evaluate_seq_frame(scene, cfra) ) first= 1;
}
else {
done= 1;
- while( evaluate_seq_frame(scene, cfra) == 0) {
+ while ( evaluate_seq_frame(scene, cfra) == 0) {
done= insert_gap(scene, -1, cfra);
- if(done==0) break;
+ if (done==0) break;
}
- if(done==0) break;
+ if (done==0) break;
}
}
@@ -1033,18 +1033,20 @@ static int sequencer_snap_exec(bContext *C, wmOperator *op)
snap_frame= RNA_int_get(op->ptr, "frame");
/* also check metas */
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
if (seq->flag & SELECT && !(seq->depth==0 && seq->flag & SEQ_LOCK) &&
seq_tx_test(seq)) {
- if((seq->flag & (SEQ_LEFTSEL+SEQ_RIGHTSEL))==0) {
+ if ((seq->flag & (SEQ_LEFTSEL+SEQ_RIGHTSEL))==0) {
/* simple but no anim update */
/* seq->start= snap_frame-seq->startofs+seq->startstill; */
seq_translate(scene, seq, (snap_frame-seq->startofs+seq->startstill) - seq->start);
- } else {
- if(seq->flag & SEQ_LEFTSEL) {
+ }
+ else {
+ if (seq->flag & SEQ_LEFTSEL) {
seq_tx_set_final_left(seq, snap_frame);
- } else { /* SEQ_RIGHTSEL */
+ }
+ else { /* SEQ_RIGHTSEL */
seq_tx_set_final_right(seq, snap_frame);
}
seq_tx_handle_xlimits(seq, seq->flag & SEQ_LEFTSEL, seq->flag & SEQ_RIGHTSEL);
@@ -1054,20 +1056,20 @@ static int sequencer_snap_exec(bContext *C, wmOperator *op)
}
/* test for effects and overlap
- * dont use SEQP_BEGIN since that would be recursive */
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
- if(seq->flag & SELECT && !(seq->depth==0 && seq->flag & SEQ_LOCK)) {
+ * don't use SEQP_BEGIN since that would be recursive */
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
+ if (seq->flag & SELECT && !(seq->depth==0 && seq->flag & SEQ_LOCK)) {
seq->flag &= ~SEQ_OVERLAP;
- if( seq_test_overlap(ed->seqbasep, seq) ) {
+ if ( seq_test_overlap(ed->seqbasep, seq) ) {
shuffle_seq(ed->seqbasep, seq, scene);
}
}
- else if(seq->type & SEQ_EFFECT) {
- if(seq->seq1 && (seq->seq1->flag & SELECT))
+ else if (seq->type & SEQ_EFFECT) {
+ if (seq->seq1 && (seq->seq1->flag & SELECT))
calc_sequence(scene, seq);
- else if(seq->seq2 && (seq->seq2->flag & SELECT))
+ else if (seq->seq2 && (seq->seq2->flag & SELECT))
calc_sequence(scene, seq);
- else if(seq->seq3 && (seq->seq3->flag & SELECT))
+ else if (seq->seq3 && (seq->seq3->flag & SELECT))
calc_sequence(scene, seq);
}
}
@@ -1095,17 +1097,17 @@ static int sequencer_snap_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev
void SEQUENCER_OT_snap(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap strips";
- ot->idname= "SEQUENCER_OT_snap";
- ot->description="Frame where selected strips will be snapped";
+ ot->name = "Snap strips";
+ ot->idname = "SEQUENCER_OT_snap";
+ ot->description = "Frame where selected strips will be snapped";
/* api callbacks */
- ot->invoke= sequencer_snap_invoke;
- ot->exec= sequencer_snap_exec;
- ot->poll= sequencer_edit_poll;
+ ot->invoke = sequencer_snap_invoke;
+ ot->exec = sequencer_snap_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_int(ot->srna, "frame", 0, INT_MIN, INT_MAX, "Frame", "Frame where selected strips will be snapped", INT_MIN, INT_MAX);
}
@@ -1120,14 +1122,14 @@ static int sequencer_mute_exec(bContext *C, wmOperator *op)
selected= !RNA_boolean_get(op->ptr, "unselected");
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
if ((seq->flag & SEQ_LOCK)==0) {
- if(selected){ /* mute unselected */
- if(seq->flag & SELECT)
+ if (selected) { /* mute unselected */
+ if (seq->flag & SELECT)
seq->flag |= SEQ_MUTE;
}
else {
- if((seq->flag & SELECT)==0)
+ if ((seq->flag & SELECT)==0)
seq->flag |= SEQ_MUTE;
}
}
@@ -1142,16 +1144,16 @@ static int sequencer_mute_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_mute(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mute Strips";
- ot->idname= "SEQUENCER_OT_mute";
- ot->description="Mute selected strips";
+ ot->name = "Mute Strips";
+ ot->idname = "SEQUENCER_OT_mute";
+ ot->description = "Mute selected strips";
/* api callbacks */
- ot->exec= sequencer_mute_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_mute_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Mute unselected rather than selected strips");
}
@@ -1167,14 +1169,14 @@ static int sequencer_unmute_exec(bContext *C, wmOperator *op)
selected= !RNA_boolean_get(op->ptr, "unselected");
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
if ((seq->flag & SEQ_LOCK)==0) {
- if(selected){ /* unmute unselected */
- if(seq->flag & SELECT)
+ if (selected) { /* unmute unselected */
+ if (seq->flag & SELECT)
seq->flag &= ~SEQ_MUTE;
}
else {
- if((seq->flag & SELECT)==0)
+ if ((seq->flag & SELECT)==0)
seq->flag &= ~SEQ_MUTE;
}
}
@@ -1189,16 +1191,16 @@ static int sequencer_unmute_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_unmute(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Un-Mute Strips";
- ot->idname= "SEQUENCER_OT_unmute";
- ot->description="Un-Mute unselected rather than selected strips";
+ ot->name = "Un-Mute Strips";
+ ot->idname = "SEQUENCER_OT_unmute";
+ ot->description = "Un-Mute unselected rather than selected strips";
/* api callbacks */
- ot->exec= sequencer_unmute_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_unmute_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "UnMute unselected rather than selected strips");
}
@@ -1211,7 +1213,7 @@ static int sequencer_lock_exec(bContext *C, wmOperator *UNUSED(op))
Editing *ed= seq_give_editing(scene, FALSE);
Sequence *seq;
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
if (seq->flag & SELECT) {
seq->flag |= SEQ_LOCK;
}
@@ -1225,16 +1227,16 @@ static int sequencer_lock_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_lock(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Lock Strips";
- ot->idname= "SEQUENCER_OT_lock";
- ot->description="Lock the active strip so that it can't be transformed";
+ ot->name = "Lock Strips";
+ ot->idname = "SEQUENCER_OT_lock";
+ ot->description = "Lock the active strip so that it can't be transformed";
/* api callbacks */
- ot->exec= sequencer_lock_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_lock_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* unlock operator */
@@ -1244,7 +1246,7 @@ static int sequencer_unlock_exec(bContext *C, wmOperator *UNUSED(op))
Editing *ed= seq_give_editing(scene, FALSE);
Sequence *seq;
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
if (seq->flag & SELECT) {
seq->flag &= ~SEQ_LOCK;
}
@@ -1258,16 +1260,16 @@ static int sequencer_unlock_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_unlock(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "UnLock Strips";
- ot->idname= "SEQUENCER_OT_unlock";
- ot->description="Unlock the active strip so that it can't be transformed";
+ ot->name = "UnLock Strips";
+ ot->idname = "SEQUENCER_OT_unlock";
+ ot->description = "Unlock the active strip so that it can't be transformed";
/* api callbacks */
- ot->exec= sequencer_unlock_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_unlock_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* reload operator */
@@ -1277,8 +1279,8 @@ static int sequencer_reload_exec(bContext *C, wmOperator *UNUSED(op))
Editing *ed= seq_give_editing(scene, FALSE);
Sequence *seq;
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
- if(seq->flag & SELECT) {
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
+ if (seq->flag & SELECT) {
update_changed_seq_and_deps(scene, seq, 0, 1);
}
}
@@ -1291,16 +1293,16 @@ static int sequencer_reload_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_reload(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reload Strips";
- ot->idname= "SEQUENCER_OT_reload";
- ot->description="Reload strips in the sequencer";
+ ot->name = "Reload Strips";
+ ot->idname = "SEQUENCER_OT_reload";
+ ot->description = "Reload strips in the sequencer";
/* api callbacks */
- ot->exec= sequencer_reload_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_reload_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER; /* no undo, the data changed is stored outside 'main' */
+ ot->flag = OPTYPE_REGISTER; /* no undo, the data changed is stored outside 'main' */
}
/* reload operator */
@@ -1319,13 +1321,13 @@ static int sequencer_refresh_all_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_refresh_all(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Refresh Sequencer";
- ot->idname= "SEQUENCER_OT_refresh_all";
- ot->description="Refresh the sequencer editor";
+ ot->name = "Refresh Sequencer";
+ ot->idname = "SEQUENCER_OT_refresh_all";
+ ot->description = "Refresh the sequencer editor";
/* api callbacks */
- ot->exec= sequencer_refresh_all_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_refresh_all_exec;
+ ot->poll = sequencer_edit_poll;
}
static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op)
@@ -1334,12 +1336,12 @@ static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op)
Sequence *seq1, *seq2, *seq3, *last_seq = seq_active_get(scene);
const char *error_msg;
- if(!seq_effect_find_selected(scene, last_seq, last_seq->type, &seq1, &seq2, &seq3, &error_msg)) {
+ if (!seq_effect_find_selected(scene, last_seq, last_seq->type, &seq1, &seq2, &seq3, &error_msg)) {
BKE_report(op->reports, RPT_ERROR, error_msg);
return OPERATOR_CANCELLED;
}
/* see reassigning would create a cycle */
- if( seq_is_predecessor(seq1, last_seq) ||
+ if ( seq_is_predecessor(seq1, last_seq) ||
seq_is_predecessor(seq2, last_seq) ||
seq_is_predecessor(seq3, last_seq)
) {
@@ -1363,9 +1365,9 @@ static int sequencer_effect_poll(bContext *C)
Scene *scene= CTX_data_scene(C);
Editing *ed= seq_give_editing(scene, FALSE);
- if(ed) {
+ if (ed) {
Sequence *last_seq= seq_active_get(scene);
- if(last_seq && (last_seq->type & SEQ_EFFECT)) {
+ if (last_seq && (last_seq->type & SEQ_EFFECT)) {
return 1;
}
}
@@ -1376,16 +1378,16 @@ static int sequencer_effect_poll(bContext *C)
void SEQUENCER_OT_reassign_inputs(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reassign Inputs";
- ot->idname= "SEQUENCER_OT_reassign_inputs";
- ot->description="Reassign the inputs for the effect strip";
+ ot->name = "Reassign Inputs";
+ ot->idname = "SEQUENCER_OT_reassign_inputs";
+ ot->description = "Reassign the inputs for the effect strip";
/* api callbacks */
- ot->exec= sequencer_reassign_inputs_exec;
- ot->poll= sequencer_effect_poll;
+ ot->exec = sequencer_reassign_inputs_exec;
+ ot->poll = sequencer_effect_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1394,7 +1396,7 @@ static int sequencer_swap_inputs_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
Sequence *seq, *last_seq = seq_active_get(scene);
- if(last_seq->seq1==NULL || last_seq->seq2 == NULL) {
+ if (last_seq->seq1==NULL || last_seq->seq2 == NULL) {
BKE_report(op->reports, RPT_ERROR, "No valid inputs to swap");
return OPERATOR_CANCELLED;
}
@@ -1412,16 +1414,16 @@ static int sequencer_swap_inputs_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_swap_inputs(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Swap Inputs";
- ot->idname= "SEQUENCER_OT_swap_inputs";
- ot->description="Swap the first two inputs for the effect strip";
+ ot->name = "Swap Inputs";
+ ot->idname = "SEQUENCER_OT_swap_inputs";
+ ot->description = "Swap the first two inputs for the effect strip";
/* api callbacks */
- ot->exec= sequencer_swap_inputs_exec;
- ot->poll= sequencer_effect_poll;
+ ot->exec = sequencer_swap_inputs_exec;
+ ot->poll = sequencer_effect_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1449,7 +1451,8 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op)
if (cut_hard==SEQ_CUT_HARD) {
changed = cut_seq_list(scene, ed->seqbasep, &newlist, cut_frame, cut_seq_hard);
- } else {
+ }
+ else {
changed = cut_seq_list(scene, ed->seqbasep, &newlist, cut_frame, cut_seq_soft);
}
@@ -1463,7 +1466,8 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op)
if ( seq->startdisp >= cut_frame ) {
seq->flag &= ~SEQ_ALLSEL;
}
- } else {
+ }
+ else {
if ( seq->enddisp <= cut_frame ) {
seq->flag &= ~SEQ_ALLSEL;
}
@@ -1475,7 +1479,7 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op)
sort_seq(scene);
}
- if(changed) {
+ if (changed) {
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
return OPERATOR_FINISHED;
}
@@ -1507,17 +1511,17 @@ static int sequencer_cut_invoke(bContext *C, wmOperator *op, wmEvent *event)
void SEQUENCER_OT_cut(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Cut Strips";
- ot->idname= "SEQUENCER_OT_cut";
- ot->description="Cut the selected strips";
+ ot->name = "Cut Strips";
+ ot->idname = "SEQUENCER_OT_cut";
+ ot->description = "Cut the selected strips";
/* api callbacks */
- ot->invoke= sequencer_cut_invoke;
- ot->exec= sequencer_cut_exec;
- ot->poll= sequencer_edit_poll;
+ ot->invoke = sequencer_cut_invoke;
+ ot->exec = sequencer_cut_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_int(ot->srna, "frame", 0, INT_MIN, INT_MAX, "Frame", "Frame where selected strips will be cut", INT_MIN, INT_MAX);
RNA_def_enum(ot->srna, "type", prop_cut_types, SEQ_CUT_SOFT, "Type", "The type of cut operation to perform on strips");
@@ -1544,17 +1548,17 @@ static int sequencer_add_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
ListBase nseqbase= {NULL, NULL};
- if(ed==NULL)
+ if (ed==NULL)
return OPERATOR_CANCELLED;
seqbase_dupli_recursive(scene, NULL, &nseqbase, ed->seqbasep, SEQ_DUPE_CONTEXT);
- if(nseqbase.first) {
+ if (nseqbase.first) {
Sequence * seq= nseqbase.first;
/* rely on the nseqbase list being added at the end */
BLI_movelisttolist(ed->seqbasep, &nseqbase);
- for( ; seq; seq= seq->next)
+ for ( ; seq; seq= seq->next)
seq_recursive_apply(seq, apply_unique_name_cb, scene);
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
@@ -1577,17 +1581,17 @@ static int sequencer_add_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *
void SEQUENCER_OT_duplicate(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Duplicate Strips";
- ot->idname= "SEQUENCER_OT_duplicate";
- ot->description="Duplicate the selected strips";
+ ot->name = "Duplicate Strips";
+ ot->idname = "SEQUENCER_OT_duplicate";
+ ot->description = "Duplicate the selected strips";
/* api callbacks */
- ot->invoke= sequencer_add_duplicate_invoke;
- ot->exec= sequencer_add_duplicate_exec;
- ot->poll= ED_operator_sequencer_active;
+ ot->invoke = sequencer_add_duplicate_invoke;
+ ot->exec = sequencer_add_duplicate_exec;
+ ot->poll = ED_operator_sequencer_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* to give to transform */
RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
@@ -1605,7 +1609,8 @@ static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op))
seq=seq_active_get(scene);
if (seq && seq->flag & SELECT) { /* avoid a loop since this is likely to be selected */
nothingSelected = FALSE;
- } else {
+ }
+ else {
for (seq = ed->seqbasep->first; seq; seq = seq->next) {
if (seq->flag & SELECT) {
nothingSelected = FALSE;
@@ -1618,8 +1623,8 @@ static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
/* for effects, try to find a replacement input */
- for(seq=ed->seqbasep->first; seq; seq=seq->next)
- if((seq->type & SEQ_EFFECT) && !(seq->flag & SELECT))
+ for (seq=ed->seqbasep->first; seq; seq=seq->next)
+ if ((seq->type & SEQ_EFFECT) && !(seq->flag & SELECT))
del_seq_find_replace_recurs(scene, seq);
/* delete all selected strips */
@@ -1627,15 +1632,14 @@ static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op))
/* updates lengths etc */
seq= ed->seqbasep->first;
- while(seq) {
+ while (seq) {
calc_sequence(scene, seq);
seq= seq->next;
}
/* free parent metas */
ms= ed->metastack.last;
- while(ms) {
- ms->parseq->strip->len= 0; /* force new alloc */
+ while (ms) {
calc_sequence(scene, ms->parseq);
ms= ms->prev;
}
@@ -1650,17 +1654,17 @@ void SEQUENCER_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Erase Strips";
- ot->idname= "SEQUENCER_OT_delete";
- ot->description="Erase selected strips from the sequencer";
+ ot->name = "Erase Strips";
+ ot->idname = "SEQUENCER_OT_delete";
+ ot->description = "Erase selected strips from the sequencer";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= sequencer_delete_exec;
- ot->poll= sequencer_edit_poll;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = sequencer_delete_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1672,22 +1676,22 @@ static int sequencer_offset_clear_exec(bContext *C, wmOperator *UNUSED(op))
Sequence *seq;
/* for effects, try to find a replacement input */
- for(seq=ed->seqbasep->first; seq; seq=seq->next) {
- if((seq->type & SEQ_EFFECT)==0 && (seq->flag & SELECT)) {
+ for (seq=ed->seqbasep->first; seq; seq=seq->next) {
+ if ((seq->type & SEQ_EFFECT)==0 && (seq->flag & SELECT)) {
seq->startofs= seq->endofs= seq->startstill= seq->endstill= 0;
}
}
/* updates lengths etc */
seq= ed->seqbasep->first;
- while(seq) {
+ while (seq) {
calc_sequence(scene, seq);
seq= seq->next;
}
- for(seq=ed->seqbasep->first; seq; seq=seq->next) {
- if((seq->type & SEQ_EFFECT)==0 && (seq->flag & SELECT)) {
- if(seq_test_overlap(ed->seqbasep, seq)) {
+ for (seq=ed->seqbasep->first; seq; seq=seq->next) {
+ if ((seq->type & SEQ_EFFECT)==0 && (seq->flag & SELECT)) {
+ if (seq_test_overlap(ed->seqbasep, seq)) {
shuffle_seq(ed->seqbasep, seq, scene);
}
}
@@ -1703,16 +1707,16 @@ void SEQUENCER_OT_offset_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Strip Offset";
- ot->idname= "SEQUENCER_OT_offset_clear";
- ot->description="Clear strip offsets from the start and end frames";
+ ot->name = "Clear Strip Offset";
+ ot->idname = "SEQUENCER_OT_offset_clear";
+ ot->description = "Clear strip offsets from the start and end frames";
/* api callbacks */
- ot->exec= sequencer_offset_clear_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_offset_clear_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1731,11 +1735,11 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
seq= ed->seqbasep->first; /* poll checks this is valid */
while (seq) {
- if((seq->flag & SELECT) && (seq->type == SEQ_IMAGE) && (seq->len > 1)) {
- /* remove seq so overlap tests dont conflict,
+ if ((seq->flag & SELECT) && (seq->type == SEQ_IMAGE) && (seq->len > 1)) {
+ /* remove seq so overlap tests don't conflict,
* see seq_free_sequence below for the real free'ing */
BLI_remlink(ed->seqbasep, seq);
- /* if(seq->ipo) seq->ipo->id.us--; */
+ /* if (seq->ipo) seq->ipo->id.us--; */
/* XXX, remove fcurve and assign to split image strips */
start_ofs = cfra = seq_tx_get_final_left(seq, 0);
@@ -1755,7 +1759,6 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
/* new strip */
strip_new= seq_new->strip;
- strip_new->len= 1;
strip_new->us= 1;
/* new stripdata */
@@ -1763,7 +1766,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
BLI_strncpy(se_new->name, se->name, sizeof(se_new->name));
calc_sequence(scene, seq_new);
- if(step > 1) {
+ if (step > 1) {
seq_new->flag &= ~SEQ_OVERLAP;
if (seq_test_overlap(ed->seqbasep, seq_new)) {
shuffle_seq(ed->seqbasep, seq_new, scene);
@@ -1778,7 +1781,8 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
seq_free_sequence(scene, seq);
seq = seq->next;
- } else {
+ }
+ else {
seq = seq->next;
}
}
@@ -1795,16 +1799,16 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_images_separate(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Separate Images";
- ot->idname= "SEQUENCER_OT_images_separate";
- ot->description="On image sequence strips, it returns a strip for each image";
+ ot->name = "Separate Images";
+ ot->idname = "SEQUENCER_OT_images_separate";
+ ot->description = "On image sequence strips, it returns a strip for each image";
/* api callbacks */
- ot->exec= sequencer_separate_images_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_separate_images_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_int(ot->srna, "length", 1, 1, 1000, "Length", "Length of each frame", 1, INT_MAX);
}
@@ -1820,7 +1824,7 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op))
Sequence *last_seq= seq_active_get(scene);
MetaStack *ms;
- if(last_seq && last_seq->type==SEQ_META && last_seq->flag & SELECT) {
+ if (last_seq && last_seq->type==SEQ_META && last_seq->flag & SELECT) {
/* Enter Metastrip */
ms= MEM_mallocN(sizeof(MetaStack), "metastack");
BLI_addtail(&ed->metastack, ms);
@@ -1837,7 +1841,7 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op))
Sequence *seq;
- if(ed->metastack.first==NULL)
+ if (ed->metastack.first==NULL)
return OPERATOR_CANCELLED;
ms= ed->metastack.last;
@@ -1846,7 +1850,7 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op))
ed->seqbasep= ms->oldbasep;
/* recalc all: the meta can have effects connected to it */
- for(seq= ed->seqbasep->first; seq; seq= seq->next)
+ for (seq= ed->seqbasep->first; seq; seq= seq->next)
calc_sequence(scene, seq);
seq_active_set(scene, ms->parseq);
@@ -1867,16 +1871,16 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_meta_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Meta Strip";
- ot->idname= "SEQUENCER_OT_meta_toggle";
- ot->description="Toggle a metastrip (to edit enclosed strips)";
+ ot->name = "Toggle Meta Strip";
+ ot->idname = "SEQUENCER_OT_meta_toggle";
+ ot->description = "Toggle a metastrip (to edit enclosed strips)";
/* api callbacks */
- ot->exec= sequencer_meta_toggle_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_meta_toggle_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1889,7 +1893,7 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
Sequence *seq, *seqm, *next, *last_seq = seq_active_get(scene);
int channel_max= 1;
- if(seqbase_isolated_sel_check(ed->seqbasep)==FALSE) {
+ if (seqbase_isolated_sel_check(ed->seqbasep)==FALSE) {
BKE_report(op->reports, RPT_ERROR, "Please select all related strips");
return OPERATOR_CANCELLED;
}
@@ -1902,9 +1906,9 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
seqm->flag= SELECT;
seq= ed->seqbasep->first;
- while(seq) {
+ while (seq) {
next= seq->next;
- if(seq!=seqm && (seq->flag & SELECT)) {
+ if (seq!=seqm && (seq->flag & SELECT)) {
channel_max= MAX2(seq->machine, channel_max);
BLI_remlink(ed->seqbasep, seq);
BLI_addtail(&seqm->seqbase, seq);
@@ -1915,12 +1919,11 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
calc_sequence(scene, seqm);
seqm->strip= MEM_callocN(sizeof(Strip), "metastrip");
- seqm->strip->len= seqm->len;
seqm->strip->us= 1;
seq_active_set(scene, seqm);
- if( seq_test_overlap(ed->seqbasep, seqm) ) shuffle_seq(ed->seqbasep, seqm, scene);
+ if ( seq_test_overlap(ed->seqbasep, seqm) ) shuffle_seq(ed->seqbasep, seqm, scene);
seq_update_muting(ed);
@@ -1934,17 +1937,17 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_meta_make(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Meta Strip";
- ot->idname= "SEQUENCER_OT_meta_make";
- ot->description="Group selected strips into a metastrip";
+ ot->name = "Make Meta Strip";
+ ot->idname = "SEQUENCER_OT_meta_make";
+ ot->description = "Group selected strips into a metastrip";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= sequencer_meta_make_exec;
- ot->poll= sequencer_edit_poll;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = sequencer_meta_make_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -1965,7 +1968,7 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op))
Sequence *seq, *last_seq = seq_active_get(scene); /* last_seq checks ed==NULL */
- if(last_seq==NULL || last_seq->type!=SEQ_META)
+ if (last_seq==NULL || last_seq->type!=SEQ_META)
return OPERATOR_CANCELLED;
BLI_movelisttolist(ed->seqbasep, &last_seq->seqbase);
@@ -1977,18 +1980,18 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op))
seq_free_sequence(scene, last_seq);
/* emtpy meta strip, delete all effects depending on it */
- for(seq=ed->seqbasep->first; seq; seq=seq->next)
- if((seq->type & SEQ_EFFECT) && seq_depends_on_meta(seq, last_seq))
+ for (seq=ed->seqbasep->first; seq; seq=seq->next)
+ if ((seq->type & SEQ_EFFECT) && seq_depends_on_meta(seq, last_seq))
seq->flag |= SEQ_FLAG_DELETE;
recurs_del_seq_flag(scene, ed->seqbasep, SEQ_FLAG_DELETE, 0);
/* test for effects and overlap
- * dont use SEQP_BEGIN since that would be recursive */
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
- if(seq->flag & SELECT) {
+ * don't use SEQP_BEGIN since that would be recursive */
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
+ if (seq->flag & SELECT) {
seq->flag &= ~SEQ_OVERLAP;
- if(seq_test_overlap(ed->seqbasep, seq)) {
+ if (seq_test_overlap(ed->seqbasep, seq)) {
shuffle_seq(ed->seqbasep, seq, scene);
}
}
@@ -2005,17 +2008,17 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_meta_separate(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "UnMeta Strip";
- ot->idname= "SEQUENCER_OT_meta_separate";
- ot->description="Put the contents of a metastrip back in the sequencer";
+ ot->name = "UnMeta Strip";
+ ot->idname = "SEQUENCER_OT_meta_separate";
+ ot->description = "Put the contents of a metastrip back in the sequencer";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= sequencer_meta_separate_exec;
- ot->poll= sequencer_edit_poll;
+ ot->invoke = WM_operator_confirm;
+ ot->exec = sequencer_meta_separate_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* view_all operator */
@@ -2038,16 +2041,16 @@ static int sequencer_view_all_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_view_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View All";
- ot->idname= "SEQUENCER_OT_view_all";
- ot->description="View all the strips in the sequencer";
+ ot->name = "View All";
+ ot->idname = "SEQUENCER_OT_view_all";
+ ot->description = "View all the strips in the sequencer";
/* api callbacks */
- ot->exec= sequencer_view_all_exec;
- ot->poll= ED_operator_sequencer_active;
+ ot->exec = sequencer_view_all_exec;
+ ot->poll = ED_operator_sequencer_active;
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
}
/* view_all operator */
@@ -2104,16 +2107,16 @@ static int sequencer_view_all_preview_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_view_all_preview(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View All";
- ot->idname= "SEQUENCER_OT_view_all_preview";
- ot->description="Zoom preview to fit in the area";
+ ot->name = "View All";
+ ot->idname = "SEQUENCER_OT_view_all_preview";
+ ot->description = "Zoom preview to fit in the area";
/* api callbacks */
- ot->exec= sequencer_view_all_preview_exec;
- ot->poll= ED_operator_sequencer_active;
+ ot->exec = sequencer_view_all_preview_exec;
+ ot->poll = ED_operator_sequencer_active;
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
}
@@ -2140,13 +2143,13 @@ static int sequencer_view_zoom_ratio_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_view_zoom_ratio(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Sequencer View Zoom Ratio";
- ot->idname= "SEQUENCER_OT_view_zoom_ratio";
+ ot->name = "Sequencer View Zoom Ratio";
+ ot->idname = "SEQUENCER_OT_view_zoom_ratio";
ot->description = "Change zoom ratio of sequencer preview";
/* api callbacks */
- ot->exec= sequencer_view_zoom_ratio_exec;
- ot->poll= ED_operator_sequencer_active;
+ ot->exec = sequencer_view_zoom_ratio_exec;
+ ot->poll = ED_operator_sequencer_active;
/* properties */
RNA_def_float(ot->srna, "ratio", 1.0f, 0.0f, FLT_MAX,
@@ -2178,16 +2181,16 @@ static int sequencer_view_toggle_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_view_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Toggle";
- ot->idname= "SEQUENCER_OT_view_toggle";
- ot->description="Toggle between sequencer views (sequence, preview, both)";
+ ot->name = "View Toggle";
+ ot->idname = "SEQUENCER_OT_view_toggle";
+ ot->description = "Toggle between sequencer views (sequence, preview, both)";
/* api callbacks */
- ot->exec= sequencer_view_toggle_exec;
- ot->poll= ED_operator_sequencer_active;
+ ot->exec = sequencer_view_toggle_exec;
+ ot->poll = ED_operator_sequencer_active;
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
}
@@ -2210,11 +2213,11 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
int ymargin= 1;
int xmargin= FPS;
- if(ed==NULL)
+ if (ed==NULL)
return OPERATOR_CANCELLED;
- for(seq=ed->seqbasep->first; seq; seq=seq->next) {
- if(seq->flag & SELECT) {
+ for (seq=ed->seqbasep->first; seq; seq=seq->next) {
+ if (seq->flag & SELECT) {
xmin= MIN2(xmin, seq->startdisp);
xmax= MAX2(xmax, seq->enddisp);
@@ -2232,18 +2235,18 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
orig_height= v2d->cur.ymax - v2d->cur.ymin;
- v2d->cur.xmin= xmin;
- v2d->cur.xmax= xmax;
+ v2d->cur.xmin = xmin;
+ v2d->cur.xmax = xmax;
- v2d->cur.ymin= ymin;
- v2d->cur.ymax= ymax;
+ v2d->cur.ymin = ymin;
+ v2d->cur.ymax = ymax;
/* only zoom out vertically */
if (orig_height > v2d->cur.ymax - v2d->cur.ymin) {
ymid= (v2d->cur.ymax + v2d->cur.ymin) / 2;
- v2d->cur.ymin= ymid - (orig_height/2);
- v2d->cur.ymax= ymid + (orig_height/2);
+ v2d->cur.ymin = ymid - (orig_height/2);
+ v2d->cur.ymax = ymid + (orig_height/2);
}
UI_view2d_curRect_validate(v2d);
@@ -2258,16 +2261,16 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_view_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Selected";
- ot->idname= "SEQUENCER_OT_view_selected";
- ot->description="Zoom the sequencer on the selected strips";
+ ot->name = "View Selected";
+ ot->idname = "SEQUENCER_OT_view_selected";
+ ot->description = "Zoom the sequencer on the selected strips";
/* api callbacks */
- ot->exec= sequencer_view_selected_exec;
- ot->poll= ED_operator_sequencer_active;
+ ot->exec = sequencer_view_selected_exec;
+ ot->poll = ED_operator_sequencer_active;
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
}
@@ -2279,9 +2282,9 @@ static int find_next_prev_edit(Scene *scene, int cfra, int side)
int dist, best_dist;
best_dist = MAXFRAME*2;
- if(ed==NULL) return cfra;
+ if (ed==NULL) return cfra;
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
dist = MAXFRAME*2;
switch (side) {
@@ -2293,7 +2296,8 @@ static int find_next_prev_edit(Scene *scene, int cfra, int side)
case SEQ_SIDE_RIGHT:
if (seq->startdisp > cfra) {
dist = seq->startdisp - cfra;
- } else if (seq->startdisp == cfra) {
+ }
+ else if (seq->startdisp == cfra) {
frame_seq=seq;
}
break;
@@ -2332,7 +2336,7 @@ static int sequencer_next_edit_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
- if(!next_prev_edit_internal(scene, SEQ_SIDE_RIGHT))
+ if (!next_prev_edit_internal(scene, SEQ_SIDE_RIGHT))
return OPERATOR_CANCELLED;
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
@@ -2343,16 +2347,16 @@ static int sequencer_next_edit_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_next_edit(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Next Edit";
- ot->idname= "SEQUENCER_OT_next_edit";
- ot->description="Move frame to next edit point";
+ ot->name = "Next Edit";
+ ot->idname = "SEQUENCER_OT_next_edit";
+ ot->description = "Move frame to next edit point";
/* api callbacks */
- ot->exec= sequencer_next_edit_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_next_edit_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
}
@@ -2362,7 +2366,7 @@ static int sequencer_previous_edit_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
- if(!next_prev_edit_internal(scene, SEQ_SIDE_LEFT))
+ if (!next_prev_edit_internal(scene, SEQ_SIDE_LEFT))
return OPERATOR_CANCELLED;
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
@@ -2373,16 +2377,16 @@ static int sequencer_previous_edit_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_previous_edit(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Previous Edit";
- ot->idname= "SEQUENCER_OT_previous_edit";
- ot->description="Move frame to previous edit point";
+ ot->name = "Previous Edit";
+ ot->idname = "SEQUENCER_OT_previous_edit";
+ ot->description = "Move frame to previous edit point";
/* api callbacks */
- ot->exec= sequencer_previous_edit_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_previous_edit_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
}
@@ -2403,9 +2407,9 @@ static Sequence* sequence_find_parent(Scene* scene, Sequence* child)
Sequence *parent= NULL;
Sequence *seq;
- if(ed==NULL) return NULL;
+ if (ed==NULL) return NULL;
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
if ( (seq != child) && seq_is_parent(seq, child) ) {
parent = seq;
break;
@@ -2424,11 +2428,11 @@ static int sequencer_swap_exec(bContext *C, wmOperator *op)
Sequence *seq, *iseq;
int side= RNA_enum_get(op->ptr, "side");
- if(active_seq==NULL) return OPERATOR_CANCELLED;
+ if (active_seq==NULL) return OPERATOR_CANCELLED;
seq = find_next_prev_sequence(scene, active_seq, side, -1);
- if(seq) {
+ if (seq) {
/* disallow effect strips */
if (get_sequence_effect_num_inputs(seq->type) >= 1 && (seq->effectdata || seq->seq1 || seq->seq2 || seq->seq3))
@@ -2446,17 +2450,17 @@ static int sequencer_swap_exec(bContext *C, wmOperator *op)
}
// XXX - should be a generic function
- for(iseq= scene->ed->seqbasep->first; iseq; iseq= iseq->next) {
- if((iseq->type & SEQ_EFFECT) && (seq_is_parent(iseq, active_seq) || seq_is_parent(iseq, seq))) {
+ for (iseq= scene->ed->seqbasep->first; iseq; iseq= iseq->next) {
+ if ((iseq->type & SEQ_EFFECT) && (seq_is_parent(iseq, active_seq) || seq_is_parent(iseq, seq))) {
calc_sequence(scene, iseq);
}
}
/* do this in a new loop since both effects need to be calculated first */
- for(iseq= scene->ed->seqbasep->first; iseq; iseq= iseq->next) {
- if((iseq->type & SEQ_EFFECT) && (seq_is_parent(iseq, active_seq) || seq_is_parent(iseq, seq))) {
+ for (iseq= scene->ed->seqbasep->first; iseq; iseq= iseq->next) {
+ if ((iseq->type & SEQ_EFFECT) && (seq_is_parent(iseq, active_seq) || seq_is_parent(iseq, seq))) {
/* this may now overlap */
- if( seq_test_overlap(ed->seqbasep, iseq) ) {
+ if ( seq_test_overlap(ed->seqbasep, iseq) ) {
shuffle_seq(ed->seqbasep, iseq, scene);
}
}
@@ -2477,16 +2481,16 @@ static int sequencer_swap_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_swap(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Swap Strip";
- ot->idname= "SEQUENCER_OT_swap";
- ot->description="Swap active strip with strip to the right or left";
+ ot->name = "Swap Strip";
+ ot->idname = "SEQUENCER_OT_swap";
+ ot->description = "Swap active strip with strip to the right or left";
/* api callbacks */
- ot->exec= sequencer_swap_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_swap_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "side", prop_side_lr_types, SEQ_SIDE_RIGHT, "Side", "Side of the strip to swap");
@@ -2499,7 +2503,7 @@ static int sequencer_rendersize_exec(bContext *C, wmOperator *UNUSED(op))
Sequence *active_seq = seq_active_get(scene);
StripElem *se = NULL;
- if(active_seq==NULL)
+ if (active_seq==NULL)
return OPERATOR_CANCELLED;
@@ -2536,29 +2540,29 @@ static int sequencer_rendersize_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_rendersize(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Render Size";
- ot->idname= "SEQUENCER_OT_rendersize";
- ot->description="Set render size and aspect from active sequence";
+ ot->name = "Set Render Size";
+ ot->idname = "SEQUENCER_OT_rendersize";
+ ot->description = "Set render size and aspect from active sequence";
/* api callbacks */
- ot->exec= sequencer_rendersize_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_rendersize_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
}
static void seq_copy_del_sound(Scene *scene, Sequence *seq)
{
- if(seq->type == SEQ_META) {
+ if (seq->type == SEQ_META) {
Sequence *iseq;
- for(iseq= seq->seqbase.first; iseq; iseq= iseq->next) {
+ for (iseq= seq->seqbase.first; iseq; iseq= iseq->next) {
seq_copy_del_sound(scene, iseq);
}
}
- else if(seq->scene_sound) {
+ else if (seq->scene_sound) {
sound_remove_scene_sound(scene, seq->scene_sound);
seq->scene_sound = NULL;
}
@@ -2575,7 +2579,7 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op)
seq_free_clipboard();
- if(seqbase_isolated_sel_check(ed->seqbasep)==FALSE) {
+ if (seqbase_isolated_sel_check(ed->seqbasep)==FALSE) {
BKE_report(op->reports, RPT_ERROR, "Please select all related strips");
return OPERATOR_CANCELLED;
}
@@ -2585,17 +2589,17 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op)
/* To make sure the copied strips have unique names between each other add
* them temporarily to the end of the original seqbase. (bug 25932)
*/
- if(nseqbase.first) {
+ if (nseqbase.first) {
Sequence *seq, *first_seq = nseqbase.first;
BLI_movelisttolist(ed->seqbasep, &nseqbase);
- for(seq=first_seq; seq; seq=seq->next)
+ for (seq=first_seq; seq; seq=seq->next)
seq_recursive_apply(seq, apply_unique_name_cb, scene);
seqbase_clipboard.first = first_seq;
seqbase_clipboard.last = ed->seqbasep->last;
- if(first_seq->prev) {
+ if (first_seq->prev) {
first_seq->prev->next = NULL;
ed->seqbasep->last = first_seq->prev;
first_seq->prev = NULL;
@@ -2605,7 +2609,7 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op)
seqbase_clipboard_frame= scene->r.cfra;
/* Need to remove anything that references the current scene */
- for(seq= seqbase_clipboard.first; seq; seq= seq->next) {
+ for (seq= seqbase_clipboard.first; seq; seq= seq->next) {
seq_copy_del_sound(scene, seq);
}
@@ -2615,29 +2619,29 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy";
- ot->idname= "SEQUENCER_OT_copy";
- ot->description="";
+ ot->name = "Copy";
+ ot->idname = "SEQUENCER_OT_copy";
+ ot->description = "";
/* api callbacks */
- ot->exec= sequencer_copy_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_copy_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
/* properties */
}
static void seq_paste_add_sound(Scene *scene, Sequence *seq)
{
- if(seq->type == SEQ_META) {
+ if (seq->type == SEQ_META) {
Sequence *iseq;
- for(iseq= seq->seqbase.first; iseq; iseq= iseq->next) {
+ for (iseq= seq->seqbase.first; iseq; iseq= iseq->next) {
seq_paste_add_sound(scene, iseq);
}
}
- else if(seq->type == SEQ_SOUND) {
+ else if (seq->type == SEQ_SOUND) {
seq->scene_sound = sound_add_scene_sound_defaults(scene, seq);
}
}
@@ -2656,8 +2660,8 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op))
seqbase_dupli_recursive(scene, NULL, &nseqbase, &seqbase_clipboard, SEQ_DUPE_UNIQUE_NAME);
/* transform pasted strips before adding */
- if(ofs) {
- for(iseq= nseqbase.first; iseq; iseq= iseq->next) {
+ if (ofs) {
+ for (iseq= nseqbase.first; iseq; iseq= iseq->next) {
seq_translate(scene, iseq, ofs);
seq_sound_init(scene, iseq);
}
@@ -2668,7 +2672,7 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op))
BLI_movelisttolist(ed->seqbasep, &nseqbase);
/* make sure the pasted strips have unique names between them */
- for(; iseq; iseq=iseq->next) {
+ for (; iseq; iseq=iseq->next) {
seq_recursive_apply(iseq, apply_unique_name_cb, scene);
/* restore valid sound_scene for newly added strips */
@@ -2683,16 +2687,16 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_paste(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Paste";
- ot->idname= "SEQUENCER_OT_paste";
- ot->description="";
+ ot->name = "Paste";
+ ot->idname = "SEQUENCER_OT_paste";
+ ot->description = "";
/* api callbacks */
- ot->exec= sequencer_paste_exec;
- ot->poll= ED_operator_sequencer_active;
+ ot->exec = sequencer_paste_exec;
+ ot->poll = ED_operator_sequencer_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
}
@@ -2704,12 +2708,12 @@ static int sequencer_swap_data_exec(bContext *C, wmOperator *op)
Sequence *seq_other;
const char *error_msg;
- if(seq_active_pair_get(scene, &seq_act, &seq_other) == 0) {
+ if (seq_active_pair_get(scene, &seq_act, &seq_other) == 0) {
BKE_report(op->reports, RPT_ERROR, "Must select 2 strips");
return OPERATOR_CANCELLED;
}
- if(seq_swap(seq_act, seq_other, &error_msg) == 0) {
+ if (seq_swap(seq_act, seq_other, &error_msg) == 0) {
BKE_report(op->reports, RPT_ERROR, error_msg);
return OPERATOR_CANCELLED;
}
@@ -2723,8 +2727,8 @@ static int sequencer_swap_data_exec(bContext *C, wmOperator *op)
calc_sequence(scene, seq_act);
calc_sequence(scene, seq_other);
- if(seq_act->sound) sound_add_scene_sound_defaults(scene, seq_act);
- if(seq_other->sound) sound_add_scene_sound_defaults(scene, seq_other);
+ if (seq_act->sound) sound_add_scene_sound_defaults(scene, seq_act);
+ if (seq_other->sound) sound_add_scene_sound_defaults(scene, seq_other);
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
@@ -2734,16 +2738,16 @@ static int sequencer_swap_data_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_swap_data(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Sequencer Swap Data";
- ot->idname= "SEQUENCER_OT_swap_data";
- ot->description="Swap 2 sequencer strips";
+ ot->name = "Sequencer Swap Data";
+ ot->idname = "SEQUENCER_OT_swap_data";
+ ot->description = "Swap 2 sequencer strips";
/* api callbacks */
- ot->exec= sequencer_swap_data_exec;
- ot->poll= ED_operator_sequencer_active;
+ ot->exec = sequencer_swap_data_exec;
+ ot->poll = ED_operator_sequencer_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
}
@@ -2761,7 +2765,7 @@ static int view_ghost_border_exec(bContext *C, wmOperator *op)
UI_view2d_region_to_view(v2d, RNA_int_get(op->ptr, "xmin"), RNA_int_get(op->ptr, "ymin"), &rect.xmin, &rect.ymin);
UI_view2d_region_to_view(v2d, RNA_int_get(op->ptr, "xmax"), RNA_int_get(op->ptr, "ymax"), &rect.xmax, &rect.ymax);
- if(ed==NULL)
+ if (ed==NULL)
return OPERATOR_CANCELLED;
rect.xmin /= (float)(ABS(v2d->tot.xmax - v2d->tot.xmin));
@@ -2791,19 +2795,19 @@ static int view_ghost_border_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Offset View";
- ot->idname= "SEQUENCER_OT_view_ghost_border";
- ot->description="Enable border select mode";
+ ot->name = "Border Offset View";
+ ot->idname = "SEQUENCER_OT_view_ghost_border";
+ ot->description = "Enable border select mode";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= view_ghost_border_exec;
- ot->modal= WM_border_select_modal;
- ot->poll= sequencer_view_poll;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = view_ghost_border_exec;
+ ot->modal = WM_border_select_modal;
+ ot->poll = sequencer_view_poll;
+ ot->cancel = WM_border_select_cancel;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
/* rna */
WM_operator_properties_gesture_border(ot, FALSE);
@@ -2820,16 +2824,16 @@ static int sequencer_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_rebuild_proxy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Rebuild Proxy and Timecode Indices";
- ot->idname= "SEQUENCER_OT_rebuild_proxy";
- ot->description="Rebuild all selected proxies and timecode indeces using the job system";
+ ot->name = "Rebuild Proxy and Timecode Indices";
+ ot->idname = "SEQUENCER_OT_rebuild_proxy";
+ ot->description = "Rebuild all selected proxies and timecode indeces using the job system";
/* api callbacks */
- ot->exec= sequencer_rebuild_proxy_exec;
- ot->poll= ED_operator_sequencer_active;
+ ot->exec = sequencer_rebuild_proxy_exec;
+ ot->poll = ED_operator_sequencer_active;
/* flags */
- ot->flag= OPTYPE_REGISTER;
+ ot->flag = OPTYPE_REGISTER;
}
/* change ops */
@@ -2864,7 +2868,7 @@ static int sequencer_change_effect_input_exec(bContext *C, wmOperator *op)
break;
}
- if(*seq_1 == NULL || *seq_2 == NULL) {
+ if (*seq_1 == NULL || *seq_2 == NULL) {
BKE_report(op->reports, RPT_ERROR, "One of the effect inputs is unset, can't swap");
return OPERATOR_CANCELLED;
}
@@ -2874,7 +2878,7 @@ static int sequencer_change_effect_input_exec(bContext *C, wmOperator *op)
update_changed_seq_and_deps(scene, seq, 0, 1);
- /* important else we dont get the imbuf cache flushed */
+ /* important else we don't get the imbuf cache flushed */
free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE);
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
@@ -2885,18 +2889,18 @@ static int sequencer_change_effect_input_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_change_effect_input(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Change Effect Input";
- ot->idname= "SEQUENCER_OT_change_effect_input";
- ot->description="";
+ ot->name = "Change Effect Input";
+ ot->idname = "SEQUENCER_OT_change_effect_input";
+ ot->description = "";
/* api callbacks */
- ot->exec= sequencer_change_effect_input_exec;
- ot->poll= sequencer_effect_poll;
+ ot->exec = sequencer_change_effect_input_exec;
+ ot->poll = sequencer_effect_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
- ot->prop= RNA_def_enum(ot->srna, "swap", prop_change_effect_input_types, 0, "Swap", "The effect inputs to swap");
+ ot->prop = RNA_def_enum(ot->srna, "swap", prop_change_effect_input_types, 0, "Swap", "The effect inputs to swap");
}
static int sequencer_change_effect_type_exec(bContext *C, wmOperator *op)
@@ -2934,7 +2938,7 @@ static int sequencer_change_effect_type_exec(bContext *C, wmOperator *op)
/* update */
update_changed_seq_and_deps(scene, seq, 0, 1);
- /* important else we dont get the imbuf cache flushed */
+ /* important else we don't get the imbuf cache flushed */
free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE);
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
@@ -2945,18 +2949,18 @@ static int sequencer_change_effect_type_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_change_effect_type(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Change Effect Type";
- ot->idname= "SEQUENCER_OT_change_effect_type";
- ot->description="";
+ ot->name = "Change Effect Type";
+ ot->idname = "SEQUENCER_OT_change_effect_type";
+ ot->description = "";
/* api callbacks */
- ot->exec= sequencer_change_effect_type_exec;
- ot->poll= sequencer_effect_poll;
+ ot->exec = sequencer_change_effect_type_exec;
+ ot->poll = sequencer_effect_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
- ot->prop= RNA_def_enum(ot->srna, "type", sequencer_prop_effect_types, SEQ_CROSS, "Type", "Sequencer effect type");
+ ot->prop = RNA_def_enum(ot->srna, "type", sequencer_prop_effect_types, SEQ_CROSS, "Type", "Sequencer effect type");
}
static int sequencer_change_path_exec(bContext *C, wmOperator *op)
@@ -2967,12 +2971,12 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
Sequence *seq= seq_active_get(scene);
const int is_relative_path= RNA_boolean_get(op->ptr, "relative_path");
- if(seq->type == SEQ_IMAGE) {
+ if (seq->type == SEQ_IMAGE) {
char directory[FILE_MAX];
const int len= RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files"));
StripElem *se;
- if(len==0)
+ if (len==0)
return OPERATOR_CANCELLED;
RNA_string_get(op->ptr, "directory", directory);
@@ -2984,7 +2988,7 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
}
BLI_strncpy(seq->strip->dir, directory, sizeof(seq->strip->dir));
- if(seq->strip->stripdata) {
+ if (seq->strip->stripdata) {
MEM_freeN(seq->strip->stripdata);
}
seq->strip->stripdata= se= MEM_callocN(len*sizeof(StripElem), "stripelem");
@@ -3000,13 +3004,13 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
/* reset these else we wont see all the images */
seq->anim_startofs= seq->anim_endofs= 0;
- /* correct start/end frames so we dont move
+ /* correct start/end frames so we don't move
* important not to set seq->len= len; allow the function to handle it */
reload_sequence_new_file(scene, seq, TRUE);
calc_sequence(scene, seq);
- /* important else we dont get the imbuf cache flushed */
+ /* important else we don't get the imbuf cache flushed */
free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE);
}
else {
@@ -3036,7 +3040,7 @@ static int sequencer_change_path_invoke(bContext *C, wmOperator *op, wmEvent *UN
RNA_string_set(op->ptr, "directory", seq->strip->dir);
/* set default display depending on seq type */
- if(seq->type == SEQ_IMAGE) {
+ if (seq->type == SEQ_IMAGE) {
RNA_boolean_set(op->ptr, "filter_movie", FALSE);
}
else {
@@ -3051,17 +3055,79 @@ static int sequencer_change_path_invoke(bContext *C, wmOperator *op, wmEvent *UN
void SEQUENCER_OT_change_path(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Change Data/Files";
- ot->idname= "SEQUENCER_OT_change_path";
- ot->description="";
+ ot->name = "Change Data/Files";
+ ot->idname = "SEQUENCER_OT_change_path";
+ ot->description = "";
/* api callbacks */
- ot->exec= sequencer_change_path_exec;
- ot->invoke= sequencer_change_path_invoke;
- ot->poll= sequencer_strip_has_path_poll;
+ ot->exec = sequencer_change_path_exec;
+ ot->invoke = sequencer_change_path_invoke;
+ ot->poll = sequencer_strip_has_path_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY|WM_FILESEL_RELPATH|WM_FILESEL_FILEPATH|WM_FILESEL_FILES, FILE_DEFAULTDISPLAY);
}
+
+static int sequencer_update_strip_length_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ Scene *scene = CTX_data_scene(C);
+ Editing *ed = seq_give_editing(scene, FALSE);
+ Sequence *seq;
+ int update = FALSE;
+
+ SEQP_BEGIN(ed, seq) {
+ if ((seq->flag & SELECT)) {
+ int changed = FALSE;
+
+ switch (seq->type) {
+ case SEQ_SCENE:
+ seq->len = seq->scene->r.efra - seq->scene->r.sfra + 1;
+ changed = TRUE;
+ break;
+ case SEQ_MOVIECLIP:
+ seq->len = BKE_movieclip_get_duration(seq->clip);
+ changed = TRUE;
+ break;
+ case SEQ_MOVIE:
+ seq->len = IMB_anim_get_duration(seq->anim, IMB_TC_RECORD_RUN);
+ changed = TRUE;
+ break;
+ }
+
+ if (changed) {
+ calc_sequence_disp(scene, seq);
+
+ if (seq_test_overlap(ed->seqbasep, seq))
+ shuffle_seq(ed->seqbasep, seq, scene);
+
+ update = TRUE;
+ }
+ }
+ }
+ SEQ_END
+
+ if (update) {
+ free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE);
+
+ WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void SEQUENCER_OT_update_strip_length(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Update Strip Length";
+ ot->idname = "SEQUENCER_OT_update_strip_length";
+ ot->description = "Update actual content length for selected strips";
+
+ /* api callbacks */
+ ot->exec = sequencer_update_strip_length_exec;
+ ot->poll = ED_operator_sequencer_active;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+}
diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h
index 2d98278e163..7acaaf76c62 100644
--- a/source/blender/editors/space_sequencer/sequencer_intern.h
+++ b/source/blender/editors/space_sequencer/sequencer_intern.h
@@ -117,6 +117,8 @@ void SEQUENCER_OT_paste(struct wmOperatorType *ot);
void SEQUENCER_OT_rebuild_proxy(struct wmOperatorType *ot);
+void SEQUENCER_OT_update_strip_length(struct wmOperatorType *ot);
+
/* preview specific operators */
void SEQUENCER_OT_view_all_preview(struct wmOperatorType *ot);
@@ -136,6 +138,7 @@ void SEQUENCER_OT_select_grouped(struct wmOperatorType *ot);
/* sequencer_select.c */
void SEQUENCER_OT_scene_strip_add(struct wmOperatorType *ot);
void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot);
+void SEQUENCER_OT_movieclip_strip_add(struct wmOperatorType *ot);
void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot);
void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot);
void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c
index e53d06c9786..2e24a8be346 100644
--- a/source/blender/editors/space_sequencer/sequencer_ops.c
+++ b/source/blender/editors/space_sequencer/sequencer_ops.c
@@ -104,6 +104,7 @@ void sequencer_operatortypes(void)
/* sequencer_add.c */
WM_operatortype_append(SEQUENCER_OT_scene_strip_add);
+ WM_operatortype_append(SEQUENCER_OT_movieclip_strip_add);
WM_operatortype_append(SEQUENCER_OT_movie_strip_add);
WM_operatortype_append(SEQUENCER_OT_sound_strip_add);
WM_operatortype_append(SEQUENCER_OT_image_strip_add);
@@ -112,6 +113,8 @@ void sequencer_operatortypes(void)
WM_operatortype_append(SEQUENCER_OT_copy);
WM_operatortype_append(SEQUENCER_OT_paste);
+
+ WM_operatortype_append(SEQUENCER_OT_update_strip_length);
}
@@ -123,14 +126,14 @@ void sequencer_keymap(wmKeyConfig *keyconf)
/* Common items ------------------------------------------------------------------ */
keymap = WM_keymap_find(keyconf, "SequencerCommon", SPACE_SEQ, 0);
- kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", OKEY, KM_PRESS, KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", OKEY, KM_PRESS, KM_SHIFT, 0);
RNA_string_set(kmi->ptr, "data_path", "scene.sequence_editor.show_overlay");
/* operators common to sequence and preview view */
WM_keymap_add_item(keymap, "SEQUENCER_OT_view_toggle", TABKEY, KM_PRESS, KM_CTRL, 0);
/* Strips Region --------------------------------------------------------------- */
- keymap= WM_keymap_find(keyconf, "Sequencer", SPACE_SEQ, 0);
+ keymap = WM_keymap_find(keyconf, "Sequencer", SPACE_SEQ, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_properties", NKEY, KM_PRESS, 0, 0);
@@ -221,20 +224,20 @@ void sequencer_keymap(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
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);
+ 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);
- kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL|KM_ALT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0);
+ 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);
#endif
@@ -246,21 +249,21 @@ void sequencer_keymap(wmKeyConfig *keyconf)
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);
+ 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);
/* match action editor */
- kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+ 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);
/* adjusted since 2.4 */
- kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+ 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);
@@ -284,7 +287,7 @@ void sequencer_keymap(wmKeyConfig *keyconf)
WM_keymap_add_menu(keymap, "SEQUENCER_MT_change", CKEY, KM_PRESS, 0, 0);
- kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", OKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_int", OKEY, KM_PRESS, 0, 0);
RNA_string_set(kmi->ptr, "data_path", "scene.sequence_editor.overlay_frame");
RNA_int_set(kmi->ptr, "value", 0);
@@ -295,7 +298,7 @@ void sequencer_keymap(wmKeyConfig *keyconf)
/* Preview Region ----------------------------------------------------------- */
- keymap= WM_keymap_find(keyconf, "SequencerPreview", SPACE_SEQ, 0);
+ keymap = WM_keymap_find(keyconf, "SequencerPreview", SPACE_SEQ, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_view_all_preview", HOMEKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_properties", NKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c
index c13a5202c19..2e36c233f8e 100644
--- a/source/blender/editors/space_sequencer/sequencer_scopes.c
+++ b/source/blender/editors/space_sequencer/sequencer_scopes.c
@@ -240,7 +240,8 @@ struct ImBuf *make_waveform_view_from_ibuf(struct ImBuf * ibuf)
{
if (ibuf->rect_float) {
return make_waveform_view_from_ibuf_float(ibuf);
- } else {
+ }
+ else {
return make_waveform_view_from_ibuf_byte(ibuf);
}
}
@@ -353,7 +354,8 @@ struct ImBuf *make_sep_waveform_view_from_ibuf(struct ImBuf * ibuf)
{
if (ibuf->rect_float) {
return make_sep_waveform_view_from_ibuf_float(ibuf);
- } else {
+ }
+ else {
return make_sep_waveform_view_from_ibuf_byte(ibuf);
}
}
@@ -426,7 +428,8 @@ struct ImBuf * make_zebra_view_from_ibuf(struct ImBuf * src, float perc)
if (src->rect_float) {
draw_zebra_float(src, ibuf, perc);
- } else {
+ }
+ else {
draw_zebra_byte(src, ibuf, perc);
}
return ibuf;
@@ -508,7 +511,8 @@ static int get_bin_float(float f)
{
if (f < -0.25f) {
f = -0.25f;
- } else if (f > 1.25f) {
+ }
+ else if (f > 1.25f) {
f = 1.25f;
}
@@ -561,7 +565,8 @@ struct ImBuf *make_histogram_view_from_ibuf(struct ImBuf * ibuf)
{
if (ibuf->rect_float) {
return make_histogram_view_from_ibuf_float(ibuf);
- } else {
+ }
+ else {
return make_histogram_view_from_ibuf_byte(ibuf);
}
}
@@ -696,7 +701,8 @@ struct ImBuf *make_vectorscope_view_from_ibuf(struct ImBuf * ibuf)
{
if (ibuf->rect_float) {
return make_vectorscope_view_from_ibuf_float(ibuf);
- } else {
+ }
+ else {
return make_vectorscope_view_from_ibuf_byte(ibuf);
}
}
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 32c7be99e94..00c2caea258 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -89,8 +89,8 @@ static void select_active_side(ListBase *seqbase, int sel_side, int channel, int
{
Sequence *seq;
- for(seq= seqbase->first; seq; seq=seq->next) {
- if(channel==seq->machine) {
+ for (seq= seqbase->first; seq; seq=seq->next) {
+ if (channel==seq->machine) {
switch(sel_side) {
case SEQ_SIDE_LEFT:
if (frame > (seq->startdisp)) {
@@ -117,27 +117,27 @@ static void select_linked_time(ListBase *seqbase, Sequence *seq_link)
{
Sequence *seq;
- for(seq= seqbase->first; seq; seq=seq->next) {
- if(seq_link->machine != seq->machine) {
+ for (seq= seqbase->first; seq; seq=seq->next) {
+ if (seq_link->machine != seq->machine) {
int left_match = (seq->startdisp == seq_link->startdisp) ? 1:0;
int right_match = (seq->enddisp == seq_link->enddisp) ? 1:0;
- if(left_match && right_match) {
+ if (left_match && right_match) {
/* a direct match, copy the selection settinhs */
seq->flag &= ~(SELECT|SEQ_LEFTSEL|SEQ_RIGHTSEL);
seq->flag |= seq_link->flag & (SELECT|SEQ_LEFTSEL|SEQ_RIGHTSEL);
recurs_sel_seq(seq);
}
- else if(seq_link->flag & SELECT && (left_match || right_match)) {
+ else if (seq_link->flag & SELECT && (left_match || right_match)) {
/* clear for reselection */
seq->flag &= ~(SEQ_LEFTSEL|SEQ_RIGHTSEL);
- if(left_match && seq_link->flag & SEQ_LEFTSEL)
+ if (left_match && seq_link->flag & SEQ_LEFTSEL)
seq->flag |= SELECT|SEQ_LEFTSEL;
- if(right_match && seq_link->flag & SEQ_RIGHTSEL)
+ if (right_match && seq_link->flag & SEQ_RIGHTSEL)
seq->flag |= SELECT|SEQ_RIGHTSEL;
recurs_sel_seq(seq);
@@ -163,16 +163,16 @@ static void UNUSED_FUNCTION(select_single_seq)(Scene *scene, Sequence *seq, int
{
Editing *ed= seq_give_editing(scene, FALSE);
- if(deselect_all)
+ if (deselect_all)
deselect_all_seq(scene);
seq_active_set(scene, seq);
- if((seq->type==SEQ_IMAGE) || (seq->type==SEQ_MOVIE)) {
- if(seq->strip)
+ if ((seq->type==SEQ_IMAGE) || (seq->type==SEQ_MOVIE)) {
+ if (seq->strip)
BLI_strncpy(ed->act_imagedir, seq->strip->dir, FILE_MAXDIR);
}
- else if(seq->type==SEQ_SOUND) {
- if(seq->strip)
+ else if (seq->type==SEQ_SOUND) {
+ if (seq->strip)
BLI_strncpy(ed->act_sounddir, seq->strip->dir, FILE_MAXDIR);
}
seq->flag|= SELECT;
@@ -259,16 +259,16 @@ static int sequencer_de_select_all_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_select_all(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select or Deselect All";
- ot->idname= "SEQUENCER_OT_select_all";
- ot->description="Select or deselect all strips";
+ ot->name = "(De)select All";
+ ot->idname = "SEQUENCER_OT_select_all";
+ ot->description = "Select or deselect all strips";
/* api callbacks */
- ot->exec= sequencer_de_select_all_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_de_select_all_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_select_all(ot);
}
@@ -281,7 +281,7 @@ static int sequencer_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
Editing *ed= seq_give_editing(scene, FALSE);
Sequence *seq;
- for(seq= ed->seqbasep->first; seq; seq=seq->next) {
+ for (seq= ed->seqbasep->first; seq; seq=seq->next) {
if (seq->flag & SELECT) {
seq->flag &= ~SEQ_ALLSEL;
}
@@ -299,16 +299,16 @@ static int sequencer_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_select_inverse(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Inverse";
- ot->idname= "SEQUENCER_OT_select_inverse";
- ot->description="Select unselected strips";
+ ot->name = "Select Inverse";
+ ot->idname = "SEQUENCER_OT_select_inverse";
+ ot->description = "Select unselected strips";
/* api callbacks */
- ot->exec= sequencer_select_inverse_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_select_inverse_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
@@ -325,7 +325,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
int hand,sel_side;
TimeMarker *marker;
- if(ed==NULL)
+ if (ed==NULL)
return OPERATOR_CANCELLED;
marker=find_nearest_marker(SCE_MARKERS, 1); //XXX - dummy function for now
@@ -333,7 +333,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
seq= find_nearest_seq(scene, v2d, &hand, event->mval);
// XXX - not nice, Ctrl+RMB needs to do left_right only when not over a strip
- if(seq && linked_time && left_right)
+ if (seq && linked_time && left_right)
left_right= FALSE;
@@ -352,7 +352,8 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
marker->flag |= SELECT;
}
- } else if (left_right) {
+ }
+ else if (left_right) {
/* use different logic for this */
float x;
deselect_all_seq(scene);
@@ -360,13 +361,13 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
SEQP_BEGIN(ed, seq) {
if (x < CFRA) {
- if(seq->enddisp < CFRA) {
+ if (seq->enddisp < CFRA) {
seq->flag |= SELECT;
recurs_sel_seq(seq);
}
}
else {
- if(seq->startdisp > CFRA) {
+ if (seq->startdisp > CFRA) {
seq->flag |= SELECT;
recurs_sel_seq(seq);
}
@@ -380,7 +381,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
TimeMarker *tmarker;
for (tmarker= scene->markers.first; tmarker; tmarker= tmarker->next) {
- if( ((x < CFRA) && tmarker->frame < CFRA) ||
+ if ( ((x < CFRA) && tmarker->frame < CFRA) ||
((x >= CFRA) && tmarker->frame >= CFRA)
) {
tmarker->flag |= SELECT;
@@ -391,29 +392,31 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
}
}
- } else {
+ }
+ else {
// seq= find_nearest_seq(scene, v2d, &hand, mval);
act_orig= ed->act_seq;
- if(extend == 0 && linked_handle==0)
+ if (extend == 0 && linked_handle==0)
deselect_all_seq(scene);
- if(seq) {
+ if (seq) {
seq_active_set(scene, seq);
if ((seq->type == SEQ_IMAGE) || (seq->type == SEQ_MOVIE)) {
- if(seq->strip) {
+ if (seq->strip) {
BLI_strncpy(ed->act_imagedir, seq->strip->dir, FILE_MAXDIR);
}
- } else
+ }
+ else
if (seq->type == SEQ_SOUND) {
- if(seq->strip) {
+ if (seq->strip) {
BLI_strncpy(ed->act_sounddir, seq->strip->dir, FILE_MAXDIR);
}
}
- if(extend && (seq->flag & SELECT) && ed->act_seq == act_orig ) {
+ if (extend && (seq->flag & SELECT) && ed->act_seq == act_orig ) {
switch(hand) {
case SEQ_SIDE_NONE:
if (linked_handle==0)
@@ -429,13 +432,13 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
else {
seq->flag |= SELECT;
- if(hand==SEQ_SIDE_LEFT) seq->flag |= SEQ_LEFTSEL;
- if(hand==SEQ_SIDE_RIGHT) seq->flag |= SEQ_RIGHTSEL;
+ if (hand==SEQ_SIDE_LEFT) seq->flag |= SEQ_LEFTSEL;
+ if (hand==SEQ_SIDE_RIGHT) seq->flag |= SEQ_RIGHTSEL;
}
/* On Alt selection, select the strip and bordering handles */
if (linked_handle && !ELEM(hand, SEQ_SIDE_LEFT, SEQ_SIDE_RIGHT)) {
- if(extend==0) deselect_all_seq(scene);
+ if (extend==0) deselect_all_seq(scene);
seq->flag |= SELECT;
select_surrounding_handles(scene, seq);
}
@@ -451,12 +454,13 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
switch (sel_side) {
case SEQ_SIDE_LEFT:
if ((seq->flag & SEQ_LEFTSEL) && (neighbor->flag & SEQ_RIGHTSEL)) {
- if(extend==0) deselect_all_seq(scene);
+ if (extend==0) deselect_all_seq(scene);
seq->flag |= SELECT;
select_active_side(ed->seqbasep, SEQ_SIDE_LEFT, seq->machine, seq->startdisp);
- } else {
- if(extend==0) deselect_all_seq(scene);
+ }
+ else {
+ if (extend==0) deselect_all_seq(scene);
seq->flag |= SELECT;
neighbor->flag |= SELECT;
@@ -467,12 +471,13 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
break;
case SEQ_SIDE_RIGHT:
if ((seq->flag & SEQ_RIGHTSEL) && (neighbor->flag & SEQ_LEFTSEL)) {
- if(extend==0) deselect_all_seq(scene);
+ if (extend==0) deselect_all_seq(scene);
seq->flag |= SELECT;
select_active_side(ed->seqbasep, SEQ_SIDE_RIGHT, seq->machine, seq->startdisp);
- } else {
- if(extend==0) deselect_all_seq(scene);
+ }
+ else {
+ if (extend==0) deselect_all_seq(scene);
seq->flag |= SELECT;
neighbor->flag |= SELECT;
@@ -482,14 +487,15 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
break;
}
- } else {
- if(extend==0) deselect_all_seq(scene);
+ }
+ else {
+ if (extend==0) deselect_all_seq(scene);
select_active_side(ed->seqbasep, sel_side, seq->machine, seq->startdisp);
}
}
recurs_sel_seq(seq);
- if(linked_time) {
+ if (linked_time) {
select_linked_time(ed->seqbasep, seq);
}
}
@@ -503,9 +509,9 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
xo= mval[0];
yo= mval[1];
- while(get_mbut()) {
+ while (get_mbut()) {
// getmouseco_areawin(mval);
- if(abs(mval[0]-xo)+abs(mval[1]-yo) > 4) {
+ if (abs(mval[0]-xo)+abs(mval[1]-yo) > 4) {
transform_markers('g', 0);
return;
}
@@ -522,21 +528,21 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
void SEQUENCER_OT_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Activate/Select";
- ot->idname= "SEQUENCER_OT_select";
- ot->description="Select a strip (last selected becomes the \"active strip\")";
+ ot->name = "Activate/Select";
+ ot->idname = "SEQUENCER_OT_select";
+ ot->description = "Select a strip (last selected becomes the \"active strip\")";
/* api callbacks */
- ot->invoke= sequencer_select_invoke;
- ot->poll= ED_operator_sequencer_active;
+ ot->invoke = sequencer_select_invoke;
+ ot->poll = ED_operator_sequencer_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection");
RNA_def_boolean(ot->srna, "linked_handle", 0, "Linked Handle", "Select handles next to the active strip");
- /* for animation this is an enum but atm having an enum isnt useful for us */
+ /* for animation this is an enum but atm having an enum isn't useful for us */
RNA_def_boolean(ot->srna, "left_right", 0, "Left/Right", "Select based on the current frame side the cursor is on");
RNA_def_boolean(ot->srna, "linked_time", 0, "Linked Time", "Select other strips at the same time");
}
@@ -552,25 +558,26 @@ static int select_more_less_seq__internal(Scene *scene, int sel, int linked)
int change=0;
int isel;
- if(ed==NULL) return 0;
+ if (ed==NULL) return 0;
if (sel) {
sel = SELECT;
isel = 0;
- } else {
+ }
+ else {
sel = 0;
isel = SELECT;
}
if (!linked) {
/* if not linked we only want to touch each seq once, newseq */
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
seq->tmp = NULL;
}
}
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
- if((int)(seq->flag & SELECT) == sel) {
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
+ if ((int)(seq->flag & SELECT) == sel) {
if ((linked==0 && seq->tmp)==0) {
/* only get unselected nabours */
neighbor = find_neighboring_sequence(scene, seq, SEQ_SIDE_LEFT, isel);
@@ -601,7 +608,7 @@ static int sequencer_select_more_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
- if(!select_more_less_seq__internal(scene, 0, 0))
+ if (!select_more_less_seq__internal(scene, 0, 0))
return OPERATOR_CANCELLED;
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene);
@@ -612,16 +619,16 @@ static int sequencer_select_more_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_select_more(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select More";
- ot->idname= "SEQUENCER_OT_select_more";
- ot->description="Select more strips adjacent to the current selection";
+ ot->name = "Select More";
+ ot->idname = "SEQUENCER_OT_select_more";
+ ot->description = "Select more strips adjacent to the current selection";
/* api callbacks */
- ot->exec= sequencer_select_more_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_select_more_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
}
@@ -632,7 +639,7 @@ static int sequencer_select_less_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
- if(!select_more_less_seq__internal(scene, 1, 0))
+ if (!select_more_less_seq__internal(scene, 1, 0))
return OPERATOR_CANCELLED;
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene);
@@ -643,16 +650,16 @@ static int sequencer_select_less_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_select_less(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Less";
- ot->idname= "SEQUENCER_OT_select_less";
- ot->description="Shrink the current selection of adjacent selected strips";
+ ot->name = "Select Less";
+ ot->idname = "SEQUENCER_OT_select_less";
+ ot->description = "Shrink the current selection of adjacent selected strips";
/* api callbacks */
- ot->exec= sequencer_select_less_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_select_less_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
}
@@ -693,16 +700,16 @@ static int sequencer_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEv
void SEQUENCER_OT_select_linked_pick(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select pick linked";
- ot->idname= "SEQUENCER_OT_select_linked_pick";
- ot->description="Select a chain of linked strips nearest to the mouse pointer";
+ ot->name = "Select pick linked";
+ ot->idname = "SEQUENCER_OT_select_linked_pick";
+ ot->description = "Select a chain of linked strips nearest to the mouse pointer";
/* api callbacks */
- ot->invoke= sequencer_select_linked_pick_invoke;
- ot->poll= ED_operator_sequencer_active;
+ ot->invoke = sequencer_select_linked_pick_invoke;
+ ot->poll = ED_operator_sequencer_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection");
@@ -728,16 +735,16 @@ static int sequencer_select_linked_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_select_linked(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select linked";
- ot->idname= "SEQUENCER_OT_select_linked";
- ot->description="Select all strips adjacent to the current selection";
+ ot->name = "Select linked";
+ ot->idname = "SEQUENCER_OT_select_linked";
+ ot->description = "Select all strips adjacent to the current selection";
/* api callbacks */
- ot->exec= sequencer_select_linked_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_select_linked_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
}
@@ -752,7 +759,7 @@ static int sequencer_select_handles_exec(bContext *C, wmOperator *op)
int sel_side= RNA_enum_get(op->ptr, "side");
- for(seq= ed->seqbasep->first; seq; seq=seq->next) {
+ for (seq= ed->seqbasep->first; seq; seq=seq->next) {
if (seq->flag & SELECT) {
switch(sel_side) {
case SEQ_SIDE_LEFT:
@@ -778,16 +785,16 @@ static int sequencer_select_handles_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_select_handles(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Handles";
- ot->idname= "SEQUENCER_OT_select_handles";
- ot->description="Select manipulator handles on the sides of the selected strip";
+ ot->name = "Select Handles";
+ ot->idname = "SEQUENCER_OT_select_handles";
+ ot->description = "Select manipulator handles on the sides of the selected strip";
/* api callbacks */
- ot->exec= sequencer_select_handles_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_select_handles_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "side", prop_side_types, SEQ_SIDE_BOTH, "Side", "The side of the handle that is selected");
@@ -815,16 +822,16 @@ static int sequencer_select_active_side_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_select_active_side(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Active Side";
- ot->idname= "SEQUENCER_OT_select_active_side";
- ot->description="Select strips on the nominated side of the active strip";
+ ot->name = "Select Active Side";
+ ot->idname = "SEQUENCER_OT_select_active_side";
+ ot->description = "Select strips on the nominated side of the active strip";
/* api callbacks */
- ot->exec= sequencer_select_active_side_exec;
- ot->poll= sequencer_edit_poll;
+ ot->exec = sequencer_select_active_side_exec;
+ ot->poll = sequencer_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_enum(ot->srna, "side", prop_side_types, SEQ_SIDE_BOTH, "Side", "The side of the handle that is selected");
@@ -845,13 +852,13 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op)
int extend = RNA_boolean_get(op->ptr, "extend");
int mval[2];
- if(ed==NULL)
+ if (ed==NULL)
return OPERATOR_CANCELLED;
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
mval[0]= rect.xmin;
mval[1]= rect.ymin;
@@ -860,15 +867,15 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op)
mval[1]= rect.ymax;
UI_view2d_region_to_view(v2d, mval[0], mval[1], &rectf.xmax, &rectf.ymax);
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
seq_rectf(seq, &rq);
- if(BLI_isect_rctf(&rq, &rectf, NULL)) {
- if(selecting) seq->flag |= SELECT;
+ if (BLI_isect_rctf(&rq, &rectf, NULL)) {
+ if (selecting) seq->flag |= SELECT;
else seq->flag &= ~SEQ_ALLSEL;
recurs_sel_seq(seq);
}
- else if(!extend) {
+ else if (!extend) {
seq->flag &= ~SEQ_ALLSEL;
recurs_sel_seq(seq);
}
@@ -884,20 +891,20 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Select";
- ot->idname= "SEQUENCER_OT_select_border";
- ot->description="Enable border select mode";
+ ot->name = "Border Select";
+ ot->idname = "SEQUENCER_OT_select_border";
+ ot->description = "Enable border select mode";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= sequencer_borderselect_exec;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = sequencer_borderselect_exec;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= ED_operator_sequencer_active;
+ ot->poll = ED_operator_sequencer_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* rna */
WM_operator_properties_gesture_border(ot, TRUE);
@@ -1025,9 +1032,9 @@ static short select_grouped_effect(Editing *ed, Sequence *actseq)
SEQP_BEGIN(ed, seq) {
if (effects[seq->type]) {
- if(seq->seq1) seq->seq1->flag |= SELECT;
- if(seq->seq2) seq->seq2->flag |= SELECT;
- if(seq->seq3) seq->seq3->flag |= SELECT;
+ if (seq->seq1) seq->seq1->flag |= SELECT;
+ if (seq->seq2) seq->seq2->flag |= SELECT;
+ if (seq->seq3) seq->seq3->flag |= SELECT;
changed = TRUE;
}
}
@@ -1069,7 +1076,7 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq)
actseq->tmp= SET_INT_IN_POINTER(TRUE);
- for(seq_begin(ed, &iter, 1); iter.valid; seq_next(&iter)) {
+ for (seq_begin(ed, &iter, 1); iter.valid; seq_next(&iter)) {
seq = iter.seq;
/* Ignore all seqs already selected! */
@@ -1133,13 +1140,13 @@ static int sequencer_select_grouped_exec(bContext *C, wmOperator *op)
SEQ_END;
}
- if(type==1) changed |= select_grouped_type(ed, actseq);
- else if(type==2) changed |= select_grouped_type_basic(ed, actseq);
- else if(type==3) changed |= select_grouped_type_effect(ed, actseq);
- else if(type==4) changed |= select_grouped_data(ed, actseq);
- else if(type==5) changed |= select_grouped_effect(ed, actseq);
- else if(type==6) changed |= select_grouped_effect_link(ed, actseq);
- else if(type==7) changed |= select_grouped_time_overlap(ed, actseq);
+ if (type==1) changed |= select_grouped_type(ed, actseq);
+ else if (type==2) changed |= select_grouped_type_basic(ed, actseq);
+ else if (type==3) changed |= select_grouped_type_effect(ed, actseq);
+ else if (type==4) changed |= select_grouped_data(ed, actseq);
+ else if (type==5) changed |= select_grouped_effect(ed, actseq);
+ else if (type==6) changed |= select_grouped_effect_link(ed, actseq);
+ else if (type==7) changed |= select_grouped_time_overlap(ed, actseq);
if (changed) {
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene);
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index e3e362c53a8..fe6ff40922e 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -65,13 +65,13 @@ ARegion *sequencer_has_buttons_region(ScrArea *sa)
ARegion *ar, *arnew;
ar= BKE_area_find_region_type(sa, RGN_TYPE_UI);
- if(ar) return ar;
+ if (ar) return ar;
/* add subdiv level; after header */
ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
/* is error! */
- if(ar==NULL) return NULL;
+ if (ar==NULL) return NULL;
arnew= MEM_callocN(sizeof(ARegion), "buttons for sequencer");
@@ -88,8 +88,8 @@ static ARegion *sequencer_find_region(ScrArea *sa, short type)
{
ARegion *ar=NULL;
- for(ar= sa->regionbase.first; ar; ar= ar->next)
- if(ar->regiontype==type)
+ for (ar= sa->regionbase.first; ar; ar= ar->next)
+ if (ar->regiontype==type)
return ar;
return ar;
@@ -134,10 +134,10 @@ static SpaceLink *sequencer_new(const bContext *C)
ar->v2d.keepzoom= V2D_KEEPASPECT | V2D_KEEPZOOM;
ar->v2d.minzoom= 0.00001f;
ar->v2d.maxzoom= 100000.0f;
- ar->v2d.tot.xmin= -960.0f; /* 1920 width centered */
- ar->v2d.tot.ymin= -540.0f; /* 1080 height centered */
- ar->v2d.tot.xmax= 960.0f;
- ar->v2d.tot.ymax= 540.0f;
+ ar->v2d.tot.xmin = -960.0f; /* 1920 width centered */
+ ar->v2d.tot.ymin = -540.0f; /* 1080 height centered */
+ ar->v2d.tot.xmax = 960.0f;
+ ar->v2d.tot.ymax = 540.0f;
ar->v2d.min[0]= 0.0f;
ar->v2d.min[1]= 0.0f;
ar->v2d.max[0]= 12000.0f;
@@ -156,10 +156,10 @@ static SpaceLink *sequencer_new(const bContext *C)
/* seq space goes from (0,8) to (0, efra) */
- ar->v2d.tot.xmin= 0.0f;
- ar->v2d.tot.ymin= 0.0f;
- ar->v2d.tot.xmax= scene->r.efra;
- ar->v2d.tot.ymax= 8.0f;
+ ar->v2d.tot.xmin = 0.0f;
+ ar->v2d.tot.ymin = 0.0f;
+ ar->v2d.tot.xmax = scene->r.efra;
+ ar->v2d.tot.ymax = 8.0f;
ar->v2d.cur= ar->v2d.tot;
@@ -186,7 +186,7 @@ static void sequencer_free(SpaceLink *UNUSED(sl))
{
// SpaceSeq *sseq= (SpaceSequencer*) sl;
-// XXX if(sseq->gpd) free_gpencil_data(sseq->gpd);
+// XXX if (sseq->gpd) free_gpencil_data(sseq->gpd);
}
@@ -273,7 +273,7 @@ static void sequencer_refresh(const bContext *C, ScrArea *sa)
break;
}
- if(view_changed) {
+ if (view_changed) {
ED_area_initialize(wm, window, sa);
ED_area_tag_redraw(sa);
}
@@ -300,11 +300,11 @@ static void sequencer_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
- keymap= WM_keymap_find(wm->defaultconf, "SequencerCommon", SPACE_SEQ, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "SequencerCommon", SPACE_SEQ, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "Sequencer", SPACE_SEQ, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Sequencer", SPACE_SEQ, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
/* add drop boxes */
@@ -326,24 +326,24 @@ static void sequencer_main_area_draw(const bContext *C, ARegion *ar)
static int image_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))
{
- if(drag->type==WM_DRAG_PATH)
- if(ELEM(drag->icon, ICON_FILE_IMAGE, ICON_FILE_BLANK)) /* rule might not work? */
+ if (drag->type==WM_DRAG_PATH)
+ if (ELEM(drag->icon, ICON_FILE_IMAGE, ICON_FILE_BLANK)) /* rule might not work? */
return 1;
return 0;
}
static int movie_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))
{
- if(drag->type==WM_DRAG_PATH)
- if(ELEM3(drag->icon, 0, ICON_FILE_MOVIE, ICON_FILE_BLANK)) /* rule might not work? */
+ if (drag->type==WM_DRAG_PATH)
+ if (ELEM3(drag->icon, 0, ICON_FILE_MOVIE, ICON_FILE_BLANK)) /* rule might not work? */
return 1;
return 0;
}
static int sound_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))
{
- if(drag->type==WM_DRAG_PATH)
- if(ELEM(drag->icon, ICON_FILE_SOUND, ICON_FILE_BLANK)) /* rule might not work? */
+ if (drag->type==WM_DRAG_PATH)
+ if (ELEM(drag->icon, ICON_FILE_SOUND, ICON_FILE_BLANK)) /* rule might not work? */
return 1;
return 0;
}
@@ -351,10 +351,10 @@ static int sound_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(ev
static void sequencer_drop_copy(wmDrag *drag, wmDropBox *drop)
{
/* copy drag path to properties */
- if(RNA_struct_find_property(drop->ptr, "filepath"))
+ if (RNA_struct_find_property(drop->ptr, "filepath"))
RNA_string_set(drop->ptr, "filepath", drag->path);
- if(RNA_struct_find_property(drop->ptr, "directory")) {
+ if (RNA_struct_find_property(drop->ptr, "directory")) {
PointerRNA itemptr;
char dir[FILE_MAX], file[FILE_MAX];
@@ -407,11 +407,11 @@ static void sequencer_main_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_SEQUENCER)
+ if (wmn->data == ND_SPACE_SEQUENCER)
ED_region_tag_redraw(ar);
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
}
@@ -424,11 +424,11 @@ static void sequencer_preview_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
- keymap= WM_keymap_find(wm->defaultconf, "SequencerCommon", SPACE_SEQ, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "SequencerCommon", SPACE_SEQ, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "SequencerPreview", SPACE_SEQ, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "SequencerPreview", SPACE_SEQ, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -443,15 +443,15 @@ static void sequencer_preview_area_draw(const bContext *C, ARegion *ar)
draw_image_seq(C, scene, ar, sseq, scene->r.cfra, 0);
- if(scene->ed && scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW && sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
+ if (scene->ed && scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW && sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
int over_cfra;
- if(scene->ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
+ if (scene->ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
over_cfra= scene->ed->over_cfra;
else
over_cfra= scene->r.cfra + scene->ed->over_ofs;
- if(over_cfra != scene->r.cfra)
+ if (over_cfra != scene->r.cfra)
draw_image_seq(C, scene, ar, sseq, scene->r.cfra, over_cfra - scene->r.cfra);
}
@@ -471,7 +471,7 @@ static void sequencer_preview_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_SEQUENCER)
+ if (wmn->data == ND_SPACE_SEQUENCER)
ED_region_tag_redraw(ar);
break;
case NC_ID:
@@ -512,11 +512,11 @@ static void sequencer_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_SEQUENCER)
+ if (wmn->data == ND_SPACE_SEQUENCER)
ED_region_tag_redraw(ar);
break;
case NC_ID:
- if(wmn->action == NA_RENAME)
+ if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
}
@@ -590,7 +590,7 @@ void ED_spacetype_sequencer(void)
BKE_spacetype_register(st);
/* set the sequencer callback when not in background mode */
- if(G.background==0) {
+ if (G.background==0) {
sequencer_view3d_cb = ED_view3d_draw_offscreen_imbuf_simple;
}
}
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index a416e9cf973..cc9ce10d017 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -129,7 +129,7 @@ static void text_listener(ScrArea *sa, wmNotifier *wmn)
/* check if active text was changed, no need to redraw if text isn't active
* reference==NULL means text was unlinked, should update anyway for this
* case -- no way to know was text active before unlinking or not */
- if(wmn->reference && wmn->reference != st->text)
+ if (wmn->reference && wmn->reference != st->text)
break;
switch(wmn->data) {
@@ -137,7 +137,7 @@ static void text_listener(ScrArea *sa, wmNotifier *wmn)
ED_area_tag_redraw(sa);
break;
case ND_CURSOR:
- if(st->text && st->text == wmn->reference)
+ if (st->text && st->text == wmn->reference)
text_scroll_to_cursor(st, sa);
ED_area_tag_redraw(sa);
@@ -146,7 +146,7 @@ static void text_listener(ScrArea *sa, wmNotifier *wmn)
switch(wmn->action) {
case NA_EDITED:
- if(st->text) {
+ if (st->text) {
text_drawcache_tag_update(st, 1);
text_update_edited(st->text);
}
@@ -158,7 +158,7 @@ static void text_listener(ScrArea *sa, wmNotifier *wmn)
ED_area_tag_redraw(sa);
break;
case NA_SELECTED:
- if(st->text && st->text == wmn->reference)
+ if (st->text && st->text == wmn->reference)
text_scroll_to_cursor(st, sa);
break;
@@ -166,7 +166,7 @@ static void text_listener(ScrArea *sa, wmNotifier *wmn)
break;
case NC_SPACE:
- if(wmn->data == ND_SPACE_TEXT)
+ if (wmn->data == ND_SPACE_TEXT)
ED_area_tag_redraw(sa);
break;
}
@@ -235,7 +235,7 @@ static void text_keymap(struct wmKeyConfig *keyconf)
wmKeyMap *keymap;
wmKeyMapItem *kmi;
- keymap= WM_keymap_find(keyconf, "Text", SPACE_TEXT, 0);
+ keymap = WM_keymap_find(keyconf, "Text", SPACE_TEXT, 0);
#ifdef __APPLE__
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", LEFTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
@@ -298,7 +298,7 @@ static void text_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "TEXT_OT_copy", INSERTKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "TEXT_OT_paste", INSERTKEY, KM_PRESS, KM_SHIFT, 0);
- if(U.uiflag & USER_MMB_PASTE) { // XXX not dynamic
+ 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);
}
@@ -388,11 +388,11 @@ static int text_context(const bContext *C, const char *member, bContextDataResul
{
SpaceText *st= CTX_wm_space_text(C);
- if(CTX_data_dir(member)) {
+ if (CTX_data_dir(member)) {
CTX_data_dir_set(result, text_context_dir);
return 1;
}
- else if(CTX_data_equals(member, "edit_text")) {
+ else if (CTX_data_equals(member, "edit_text")) {
CTX_data_id_pointer_set(result, &st->text->id);
return 1;
}
@@ -411,7 +411,7 @@ static void text_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "Text", SPACE_TEXT, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Text", SPACE_TEXT, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
/* add drop boxes */
@@ -452,8 +452,8 @@ static void text_cursor(wmWindow *win, ScrArea *UNUSED(sa), ARegion *UNUSED(ar))
static int text_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))
{
- if(drag->type==WM_DRAG_PATH)
- if(ELEM(drag->icon, ICON_FILE_SCRIPT, ICON_FILE_BLANK)) /* rule might not work? */
+ if (drag->type==WM_DRAG_PATH)
+ if (ELEM(drag->icon, ICON_FILE_SCRIPT, ICON_FILE_BLANK)) /* rule might not work? */
return 1;
return 0;
}
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index e9062b052e6..b2259aac035 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -111,7 +111,7 @@ static void flatten_string_append(FlattenString *fs, const char *c, int accum, i
{
int i;
- if(fs->pos+len > fs->len) {
+ if (fs->pos+len > fs->len) {
char *nbuf; int *naccum;
fs->len*= 2;
@@ -121,7 +121,7 @@ static void flatten_string_append(FlattenString *fs, const char *c, int accum, i
memcpy(nbuf, fs->buf, fs->pos * sizeof(*fs->buf));
memcpy(naccum, fs->accum, fs->pos * sizeof(*fs->accum));
- if(fs->buf != fs->fixedbuf) {
+ if (fs->buf != fs->fixedbuf) {
MEM_freeN(fs->buf);
MEM_freeN(fs->accum);
}
@@ -148,12 +148,12 @@ int flatten_string(SpaceText *st, FlattenString *fs, const char *in)
fs->accum= fs->fixedaccum;
fs->len = sizeof(fs->fixedbuf);
- for(r = 0, i = 0; *in; r++) {
- if(*in=='\t') {
+ for (r = 0, i = 0; *in; r++) {
+ if (*in=='\t') {
i= st->tabnumber - (total%st->tabnumber);
total+= i;
- while(i--)
+ while (i--)
flatten_string_append(fs, " ", r, 1);
in++;
@@ -173,9 +173,9 @@ int flatten_string(SpaceText *st, FlattenString *fs, const char *in)
void flatten_string_free(FlattenString *fs)
{
- if(fs->buf != fs->fixedbuf)
+ if (fs->buf != fs->fixedbuf)
MEM_freeN(fs->buf);
- if(fs->accum != fs->fixedaccum)
+ if (fs->accum != fs->fixedaccum)
MEM_freeN(fs->accum);
}
@@ -195,25 +195,25 @@ static int find_builtinfunc(char *string)
"is", "lambda", "not", "or", "pass", "print",
"raise", "return", "try", "while", "yield", "with"};
- for(a=0; a < sizeof(builtinfuncs)/sizeof(builtinfuncs[0]); a++) {
+ for (a=0; a < sizeof(builtinfuncs)/sizeof(builtinfuncs[0]); a++) {
i = 0;
- while(1) {
+ while (1) {
/* If we hit the end of a keyword... (eg. "def") */
- if(builtinfuncs[a][i]=='\0') {
+ if (builtinfuncs[a][i]=='\0') {
/* If we still have identifier chars in the source (eg. "definate") */
- if(text_check_identifier(string[i]))
+ if (text_check_identifier(string[i]))
i = -1; /* No match */
break; /* Next keyword if no match, otherwise we're done */
/* If chars mismatch, move on to next keyword */
}
- else if(string[i]!=builtinfuncs[a][i]) {
+ else if (string[i]!=builtinfuncs[a][i]) {
i = -1;
break; /* Break inner loop, start next keyword */
}
i++;
}
- if(i>0) break; /* If we have a match, we're done */
+ if (i>0) break; /* If we have a match, we're done */
}
return i;
}
@@ -229,22 +229,22 @@ static int find_specialvar(char *string)
{
int i = 0;
/* Check for "def" */
- if(string[0]=='d' && string[1]=='e' && string[2]=='f')
+ if (string[0]=='d' && string[1]=='e' && string[2]=='f')
i = 3;
/* Check for "class" */
- else if(string[0]=='c' && string[1]=='l' && string[2]=='a' && string[3]=='s' && string[4]=='s')
+ else if (string[0]=='c' && string[1]=='l' && string[2]=='a' && string[3]=='s' && string[4]=='s')
i = 5;
/* If next source char is an identifier (eg. 'i' in "definate") no match */
- if(i==0 || text_check_identifier(string[i]))
+ if (i==0 || text_check_identifier(string[i]))
return -1;
return i;
}
static int find_decorator(char *string)
{
- if(string[0] == '@') {
+ if (string[0] == '@') {
int i = 1;
- while(text_check_identifier(string[i])) {
+ while (text_check_identifier(string[i])) {
i++;
}
return i;
@@ -256,16 +256,16 @@ static int find_bool(char *string)
{
int i = 0;
/* Check for "False" */
- if(string[0]=='F' && string[1]=='a' && string[2]=='l' && string[3]=='s' && string[4]=='e')
+ if (string[0]=='F' && string[1]=='a' && string[2]=='l' && string[3]=='s' && string[4]=='e')
i = 5;
/* Check for "True" */
- else if(string[0]=='T' && string[1]=='r' && string[2]=='u' && string[3]=='e')
+ else if (string[0]=='T' && string[1]=='r' && string[2]=='u' && string[3]=='e')
i = 4;
/* Check for "None" */
- else if(string[0]=='N' && string[1]=='o' && string[2]=='n' && string[3]=='e')
+ else if (string[0]=='N' && string[1]=='o' && string[2]=='n' && string[3]=='e')
i = 4;
/* If next source char is an identifier (eg. 'i' in "definate") no match */
- if(i==0 || text_check_identifier(string[i]))
+ if (i==0 || text_check_identifier(string[i]))
return -1;
return i;
}
@@ -274,16 +274,16 @@ static int find_bool(char *string)
* as needed. Allocation is done here, alone, to ensure consistency. */
static int text_check_format_len(TextLine *line, unsigned int len)
{
- if(line->format) {
- if(strlen(line->format) < len) {
+ if (line->format) {
+ if (strlen(line->format) < len) {
MEM_freeN(line->format);
line->format = MEM_mallocN(len+2, "SyntaxFormat");
- if(!line->format) return 0;
+ if (!line->format) return 0;
}
}
else {
line->format = MEM_mallocN(len+2, "SyntaxFormat");
- if(!line->format) return 0;
+ if (!line->format) return 0;
}
return 1;
@@ -310,14 +310,14 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next)
int len, i;
/* Get continuation from previous line */
- if(line->prev && line->prev->format != NULL) {
+ if (line->prev && line->prev->format != NULL) {
fmt= line->prev->format;
cont = fmt[strlen(fmt)+1]; /* Just after the null-terminator */
}
else cont = 0;
/* Get original continuation from this line */
- if(line->format != NULL) {
+ if (line->format != NULL) {
fmt= line->format;
orig = fmt[strlen(fmt)+1]; /* Just after the null-terminator */
}
@@ -325,26 +325,26 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next)
len = flatten_string(st, &fs, line->line);
str = fs.buf;
- if(!text_check_format_len(line, len)) {
+ if (!text_check_format_len(line, len)) {
flatten_string_free(&fs);
return;
}
fmt = line->format;
- while(*str) {
+ while (*str) {
/* Handle escape sequences by skipping both \ and next char */
- if(*str == '\\') {
+ if (*str == '\\') {
*fmt = prev; fmt++; str++;
- if(*str == '\0') break;
+ if (*str == '\0') break;
*fmt = prev; fmt++; str += BLI_str_utf8_size(str);
continue;
}
/* Handle continuations */
- else if(cont) {
+ else if (cont) {
/* Triple strings ("""...""" or '''...''') */
- if(cont & TXT_TRISTR) {
+ if (cont & TXT_TRISTR) {
find = (cont & TXT_DBLQUOTSTR) ? '"' : '\'';
- if(*str==find && *(str+1)==find && *(str+2)==find) {
+ if (*str==find && *(str+1)==find && *(str+2)==find) {
*fmt = 'l'; fmt++; str++;
*fmt = 'l'; fmt++; str++;
cont = 0;
@@ -353,7 +353,7 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next)
}
else {
find = (cont & TXT_DBLQUOTSTR) ? '"' : '\'';
- if(*str == find) cont = 0;
+ if (*str == find) cont = 0;
}
*fmt = 'l';
@@ -362,14 +362,15 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next)
/* Not in a string... */
else {
/* Deal with comments first */
- if(prev == '#' || *str == '#') {
+ if (prev == '#' || *str == '#') {
*fmt = '#';
str += BLI_str_utf8_size(str) - 1;
- } else if(*str == '"' || *str == '\'') {
+ }
+ else if (*str == '"' || *str == '\'') {
/* Strings */
find = *str;
cont = (*str== '"') ? TXT_DBLQUOTSTR : TXT_SNGQUOTSTR;
- if(*(str+1) == find && *(str+2) == find) {
+ if (*(str+1) == find && *(str+2) == find) {
*fmt = 'l'; fmt++; str++;
*fmt = 'l'; fmt++; str++;
cont |= TXT_TRISTR;
@@ -377,15 +378,15 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next)
*fmt = 'l';
}
/* Whitespace (all ws. has been converted to spaces) */
- else if(*str == ' ')
+ else if (*str == ' ')
*fmt = '_';
/* Numbers (digits not part of an identifier and periods followed by digits) */
- else if((prev != 'q' && text_check_digit(*str)) || (*str == '.' && text_check_digit(*(str+1))))
+ else if ((prev != 'q' && text_check_digit(*str)) || (*str == '.' && text_check_digit(*(str+1))))
*fmt = 'n';
/* Booleans */
- else if(prev != 'q' && (i=find_bool(str)) != -1)
- if(i>0) {
- while(i>1) {
+ else if (prev != 'q' && (i=find_bool(str)) != -1)
+ if (i>0) {
+ while (i>1) {
*fmt = 'n'; fmt++; str++;
i--;
}
@@ -396,24 +397,24 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next)
*fmt = 'q';
}
/* Punctuation */
- else if(text_check_delim(*str))
+ else if (text_check_delim(*str))
*fmt = '!';
/* Identifiers and other text (no previous ws. or delims. so text continues) */
- else if(prev == 'q') {
+ else if (prev == 'q') {
str += BLI_str_utf8_size(str) - 1;
*fmt = 'q';
}
/* Not ws, a digit, punct, or continuing text. Must be new, check for special words */
else {
/* Special vars(v) or built-in keywords(b) */
- if((i=find_specialvar(str)) != -1)
+ if ((i=find_specialvar(str)) != -1)
prev = 'v';
- else if((i=find_builtinfunc(str)) != -1)
+ else if ((i=find_builtinfunc(str)) != -1)
prev = 'b';
- else if((i=find_decorator(str)) != -1)
+ else if ((i=find_decorator(str)) != -1)
prev = 'v'; /* could have a new color for this */
- if(i>0) {
- while(i>1) {
+ if (i>0) {
+ while (i>1) {
*fmt = prev; fmt++; str++;
i--;
}
@@ -435,7 +436,7 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next)
*fmt = cont;
/* If continuation has changed and we're allowed, process the next line */
- if(cont!=orig && do_next && line->next) {
+ if (cont!=orig && do_next && line->next) {
txt_format_line(st, line->next, do_next);
}
@@ -448,9 +449,9 @@ static void txt_format_text(SpaceText *st)
{
TextLine *linep;
- if(!st->text) return;
+ if (!st->text) return;
- for(linep=st->text->lines.first; linep; linep=linep->next)
+ for (linep=st->text->lines.first; linep; linep=linep->next)
txt_format_line(st, linep, 0);
}
#endif
@@ -532,27 +533,28 @@ void wrap_offset(SpaceText *st, ARegion *ar, TextLine *linein, int cursin, int *
*offl= *offc= 0;
- if(!st->text) return;
- if(!st->wordwrap) return;
+ if (!st->text) return;
+ if (!st->wordwrap) return;
text= st->text;
/* Move pointer to first visible line (top) */
linep= text->lines.first;
i= st->top;
- while(i>0 && linep) {
+ while (i>0 && linep) {
int lines= text_get_visible_lines(st, ar, linep->line);
/* Line before top */
- if(linep == linein) {
- if(lines <= i)
+ if (linep == linein) {
+ if (lines <= i)
/* no visible part of line */
return;
}
if (i-lines<0) {
break;
- } else {
+ }
+ else {
linep= linep->next;
(*offl)+= lines-1;
i-= lines;
@@ -562,28 +564,28 @@ void wrap_offset(SpaceText *st, ARegion *ar, TextLine *linein, int cursin, int *
max= wrap_width(st, ar);
cursin = txt_utf8_offset_to_index(linein->line, cursin);
- while(linep) {
+ while (linep) {
start= 0;
end= max;
chop= 1;
*offc= 0;
- for(i=0, j=0; linep->line[j]; j+=BLI_str_utf8_size(linep->line+j)) {
+ for (i=0, j=0; linep->line[j]; j+=BLI_str_utf8_size(linep->line+j)) {
int chars;
/* Mimic replacement of tabs */
ch= linep->line[j];
- if(ch=='\t') {
+ if (ch=='\t') {
chars= st->tabnumber-i%st->tabnumber;
- if(linep==linein && i<cursin) cursin += chars-1;
+ if (linep==linein && i<cursin) cursin += chars-1;
ch= ' ';
}
else {
chars= 1;
}
- while(chars--) {
- if(i-start>=max) {
- if(chop && linep==linein && i >= cursin) {
+ while (chars--) {
+ if (i-start>=max) {
+ if (chop && linep==linein && i >= cursin) {
if (i==cursin) {
(*offl)++;
*offc -= end-start;
@@ -599,16 +601,16 @@ void wrap_offset(SpaceText *st, ARegion *ar, TextLine *linein, int cursin, int *
end += max;
chop= 1;
}
- else if(ch==' ' || ch=='-') {
+ else if (ch==' ' || ch=='-') {
end = i+1;
chop= 0;
- if(linep==linein && i >= cursin)
+ if (linep==linein && i >= cursin)
return;
}
i++;
}
}
- if(linep==linein) break;
+ if (linep==linein) break;
linep= linep->next;
}
}
@@ -621,8 +623,8 @@ void wrap_offset_in_line(SpaceText *st, ARegion *ar, TextLine *linein, int cursi
*offl= *offc= 0;
- if(!st->text) return;
- if(!st->wordwrap) return;
+ if (!st->text) return;
+ if (!st->wordwrap) return;
max= wrap_width(st, ar);
@@ -632,21 +634,21 @@ void wrap_offset_in_line(SpaceText *st, ARegion *ar, TextLine *linein, int cursi
*offc= 0;
cursin = txt_utf8_offset_to_index(linein->line, cursin);
- for(i=0, j=0; linein->line[j]; j += BLI_str_utf8_size(linein->line + j)) {
+ for (i=0, j=0; linein->line[j]; j += BLI_str_utf8_size(linein->line + j)) {
/* Mimic replacement of tabs */
ch= linein->line[j];
- if(ch=='\t') {
+ if (ch=='\t') {
chars= st->tabnumber-i%st->tabnumber;
- if(i<cursin) cursin += chars-1;
+ if (i<cursin) cursin += chars-1;
ch= ' ';
}
else
chars= 1;
- while(chars--) {
- if(i-start>=max) {
- if(chop && i >= cursin) {
+ while (chars--) {
+ if (i-start>=max) {
+ if (chop && i >= cursin) {
if (i==cursin) {
(*offl)++;
*offc -= end-start;
@@ -662,10 +664,10 @@ void wrap_offset_in_line(SpaceText *st, ARegion *ar, TextLine *linein, int cursi
end += max;
chop= 1;
}
- else if(ch==' ' || ch=='-') {
+ else if (ch==' ' || ch=='-') {
end = i+1;
chop= 0;
- if(i >= cursin)
+ if (i >= cursin)
return;
}
i++;
@@ -677,8 +679,8 @@ int text_get_char_pos(SpaceText *st, const char *line, int cur)
{
int a=0, i;
- for(i=0; i<cur && line[i]; i += BLI_str_utf8_size(line + i)) {
- if(line[i]=='\t')
+ for (i=0; i<cur && line[i]; i += BLI_str_utf8_size(line + i)) {
+ if (line[i]=='\t')
a += st->tabnumber-a%st->tabnumber;
else
a++;
@@ -704,17 +706,17 @@ static int text_draw_wrapped(SpaceText *st, const char *str, int x, int y, int w
flatten_string(st, &fs, str);
str= fs.buf;
max= w/st->cwidth;
- if(max<8) max= 8;
+ if (max<8) max= 8;
basex= x;
lines= 1;
start= 0; mstart= 0;
end= max; mend= txt_utf8_get_nth(str, max) - str;
- for(i=0, mi=0; str[mi]; i++, mi+=BLI_str_utf8_size(str+mi)) {
- if(i-start >= max) {
+ for (i=0, mi=0; str[mi]; i++, mi+=BLI_str_utf8_size(str+mi)) {
+ if (i-start >= max) {
/* skip hidden part of line */
- if(skip) {
+ if (skip) {
skip--;
start= end; mstart= mend;
end += max; mend= txt_utf8_get_nth(str+mend, max) - str;
@@ -722,8 +724,8 @@ static int text_draw_wrapped(SpaceText *st, const char *str, int x, int y, int w
}
/* Draw the visible portion of text on the overshot line */
- for(a=start, ma=mstart; a<end; a++, ma+=BLI_str_utf8_size(str+ma)) {
- if(st->showsyntax && format) format_draw_color(format[a]);
+ for (a=start, ma=mstart; a<end; a++, ma+=BLI_str_utf8_size(str+ma)) {
+ if (st->showsyntax && format) format_draw_color(format[a]);
x += text_font_draw_character_utf8(st, x, y, str + ma);
}
y -= st->lheight;
@@ -732,16 +734,16 @@ static int text_draw_wrapped(SpaceText *st, const char *str, int x, int y, int w
start= end; mstart= mend;
end += max; mend= txt_utf8_get_nth(str+mend, max) - str;
- if(y<=0) break;
+ if (y<=0) break;
}
- else if(str[mi]==' ' || str[mi]=='-') {
+ else if (str[mi]==' ' || str[mi]=='-') {
end = i+1; mend = mi+1;
}
}
/* Draw the remaining text */
- for(a=start, ma=mstart; str[ma] && y > 0; a++, ma+=BLI_str_utf8_size(str+ma)) {
- if(st->showsyntax && format)
+ for (a=start, ma=mstart; str[ma] && y > 0; a++, ma+=BLI_str_utf8_size(str+ma)) {
+ if (st->showsyntax && format)
format_draw_color(format[a]);
x += text_font_draw_character_utf8(st, x, y, str+ma);
@@ -759,7 +761,7 @@ static int text_draw(SpaceText *st, char *str, int cshift, int maxwidth, int dra
const char *in;
int w= flatten_string(st, &fs, str);
- if(w < cshift) {
+ if (w < cshift) {
flatten_string_free(&fs);
return 0; /* String is shorter than shift */
}
@@ -768,14 +770,14 @@ static int text_draw(SpaceText *st, char *str, int cshift, int maxwidth, int dra
acc= fs.accum+cshift;
w= w-cshift;
- if(draw) {
+ if (draw) {
int amount = maxwidth ? MIN2(w, maxwidth) : w;
- if(st->showsyntax && format) {
+ if (st->showsyntax && format) {
int a, str_shift= 0;
format = format+cshift;
- for(a = 0; a < amount; a++) {
+ for (a = 0; a < amount; a++) {
format_draw_color(format[a]);
x += text_font_draw_character_utf8(st, x, y, in + str_shift);
str_shift += BLI_str_utf8_size(in + str_shift);
@@ -784,15 +786,15 @@ static int text_draw(SpaceText *st, char *str, int cshift, int maxwidth, int dra
else text_font_draw(st, x, y, in);
}
else {
- while(w-- && *acc++ < maxwidth)
+ while (w-- && *acc++ < maxwidth)
r+= st->cwidth;
}
flatten_string_free(&fs);
- if(cshift && r==0)
+ if (cshift && r==0)
return 0;
- else if(st->showlinenrs)
+ else if (st->showlinenrs)
return r+TXT_OFFSET+TEXTXLOC;
else
return r+TXT_OFFSET;
@@ -832,7 +834,7 @@ static void text_update_drawcache(SpaceText *st, ARegion *ar)
int full_update= 0, nlines= 0;
Text *txt= st->text;
- if(!st->drawcache) text_drawcache_init(st);
+ if (!st->drawcache) text_drawcache_init(st);
text_update_character_width(st);
@@ -848,15 +850,15 @@ static void text_update_drawcache(SpaceText *st, ARegion *ar)
full_update|= drawcache->cwidth != st->cwidth; /* word-wrapping option was toggled */
full_update|= strncmp(drawcache->text_id, txt->id.name, MAX_ID_NAME); /* text datablock was changed */
- if(st->wordwrap) {
+ if (st->wordwrap) {
/* update line heights */
- if(full_update || !drawcache->line_height) {
+ if (full_update || !drawcache->line_height) {
drawcache->valid_head = 0;
drawcache->valid_tail = 0;
drawcache->update_flag = 1;
}
- if(drawcache->update_flag) {
+ if (drawcache->update_flag) {
TextLine *line= st->text->lines.first;
int lineno= 0, size, lines_count;
int *fp= drawcache->line_height, *new_tail, *old_tail;
@@ -864,7 +866,7 @@ static void text_update_drawcache(SpaceText *st, ARegion *ar)
nlines= BLI_countlist(&txt->lines);
size= sizeof(int)*nlines;
- if(fp) fp= MEM_reallocN(fp, size);
+ if (fp) fp= MEM_reallocN(fp, size);
else fp= MEM_callocN(size, "text drawcache line_height");
drawcache->valid_tail= drawcache->valid_head= 0;
@@ -874,16 +876,18 @@ static void text_update_drawcache(SpaceText *st, ARegion *ar)
drawcache->total_lines= 0;
- if(st->showlinenrs)
+ if (st->showlinenrs)
st->linenrs_tot= (int)floor(log10((float)nlines)) + 1;
- while(line) {
- if(drawcache->valid_head) { /* we're inside valid head lines */
+ while (line) {
+ if (drawcache->valid_head) { /* we're inside valid head lines */
lines_count= fp[lineno];
drawcache->valid_head--;
- } else if (lineno > new_tail - fp) { /* we-re inside valid tail lines */
+ }
+ else if (lineno > new_tail - fp) { /* we-re inside valid tail lines */
lines_count= fp[lineno];
- } else {
+ }
+ else {
lines_count= text_get_visible_lines(st, ar, line->line);
}
@@ -896,16 +900,17 @@ static void text_update_drawcache(SpaceText *st, ARegion *ar)
drawcache->line_height= fp;
}
- } else {
- if(drawcache->line_height) {
+ }
+ else {
+ if (drawcache->line_height) {
MEM_freeN(drawcache->line_height);
drawcache->line_height= NULL;
}
- if(full_update || drawcache->update_flag) {
+ if (full_update || drawcache->update_flag) {
nlines= BLI_countlist(&txt->lines);
- if(st->showlinenrs)
+ if (st->showlinenrs)
st->linenrs_tot= (int)floor(log10((float)nlines)) + 1;
}
@@ -936,24 +941,25 @@ void text_drawcache_tag_update(SpaceText *st, int full)
if (st == NULL)
return;
- if(st->drawcache) {
+ if (st->drawcache) {
DrawCache *drawcache= (DrawCache *)st->drawcache;
Text *txt= st->text;
- if(drawcache->update_flag) {
+ if (drawcache->update_flag) {
/* happens when tagging update from space listener */
/* should do nothing to prevent locally tagged cache be fully recalculated */
return;
}
- if(!full) {
+ if (!full) {
int sellno= BLI_findindex(&txt->lines, txt->sell);
int curlno= BLI_findindex(&txt->lines, txt->curl);
- if(curlno < sellno) {
+ if (curlno < sellno) {
drawcache->valid_head= curlno;
drawcache->valid_tail= drawcache->nlines - sellno - 1;
- } else {
+ }
+ else {
drawcache->valid_head= sellno;
drawcache->valid_tail= drawcache->nlines - curlno - 1;
}
@@ -961,9 +967,10 @@ void text_drawcache_tag_update(SpaceText *st, int full)
/* quick cache recalculation is also used in delete operator,
* which could merge lines which are adjacent to current selection lines
* expand recalculate area to this lines */
- if(drawcache->valid_head>0) drawcache->valid_head--;
- if(drawcache->valid_tail>0) drawcache->valid_tail--;
- } else {
+ if (drawcache->valid_head>0) drawcache->valid_head--;
+ if (drawcache->valid_tail>0) drawcache->valid_tail--;
+ }
+ else {
drawcache->valid_head= 0;
drawcache->valid_tail= 0;
}
@@ -976,8 +983,8 @@ void text_free_caches(SpaceText *st)
{
DrawCache *drawcache= (DrawCache *)st->drawcache;
- if(drawcache) {
- if(drawcache->line_height)
+ if (drawcache) {
+ if (drawcache->line_height)
MEM_freeN(drawcache->line_height);
MEM_freeN(drawcache);
@@ -1003,22 +1010,22 @@ int text_get_visible_lines(SpaceText *st, ARegion *ar, const char *str)
lines= 1;
start= 0;
end= max;
- for(i= 0, j= 0; str[j]; j+=BLI_str_utf8_size(str+j)) {
+ for (i= 0, j= 0; str[j]; j+=BLI_str_utf8_size(str+j)) {
/* Mimic replacement of tabs */
ch= str[j];
- if(ch=='\t') {
+ if (ch=='\t') {
chars= st->tabnumber-i%st->tabnumber;
ch= ' ';
}
else chars= 1;
- while(chars--) {
- if(i-start >= max) {
+ while (chars--) {
+ if (i-start >= max) {
lines++;
start= end;
end += max;
}
- else if(ch==' ' || ch=='-') {
+ else if (ch==' ' || ch=='-') {
end= i+1;
}
@@ -1031,7 +1038,7 @@ int text_get_visible_lines(SpaceText *st, ARegion *ar, const char *str)
int text_get_span_wrap(SpaceText *st, ARegion *ar, TextLine *from, TextLine *to)
{
- if(st->wordwrap) {
+ if (st->wordwrap) {
int ret=0;
TextLine *tmp= from;
@@ -1043,7 +1050,8 @@ int text_get_span_wrap(SpaceText *st, ARegion *ar, TextLine *from, TextLine *to)
}
return ret;
- } else return txt_get_span(from, to);
+ }
+ else return txt_get_span(from, to);
}
int text_get_total_lines(SpaceText *st, ARegion *ar)
@@ -1065,23 +1073,25 @@ static TextLine *first_visible_line(SpaceText *st, ARegion *ar, int *wrap_top)
text_update_drawcache(st, ar);
- if(wrap_top) *wrap_top= 0;
+ if (wrap_top) *wrap_top= 0;
- if(st->wordwrap) {
- while(i>0 && pline) {
+ if (st->wordwrap) {
+ while (i>0 && pline) {
int lines= text_get_visible_lines_no(st, lineno);
if (i-lines<0) {
- if(wrap_top) *wrap_top= i;
+ if (wrap_top) *wrap_top= i;
break;
- } else {
+ }
+ else {
pline= pline->next;
i-= lines;
lineno++;
}
}
- } else {
- for(i=st->top; pline->next && i>0; i--)
+ }
+ else {
+ for (i=st->top; pline->next && i>0; i--)
pline= pline->next;
}
@@ -1103,18 +1113,18 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back)
blank_lines = st->viewlines / 2;
/* nicer code: use scroll rect for entire bar */
- back->xmin= ar->winx -18;
- back->xmax= ar->winx;
- back->ymin= 0;
- back->ymax= ar->winy;
+ back->xmin = ar->winx -18;
+ back->xmax = ar->winx;
+ back->ymin = 0;
+ back->ymax = ar->winy;
- scroll->xmin= ar->winx - 17;
- scroll->xmax= ar->winx - 5;
- scroll->ymin= 4;
- scroll->ymax= 4+pix_available;
+ scroll->xmin = ar->winx - 17;
+ scroll->xmax = ar->winx - 5;
+ scroll->ymin = 4;
+ scroll->ymax = 4+pix_available;
/* when re-sizing a view-port with the bar at the bottom to a greater height more blank lines will be added */
- if(ltexth + blank_lines < st->top + st->viewlines) {
+ if (ltexth + blank_lines < st->top + st->viewlines) {
blank_lines = st->top + st->viewlines - ltexth;
}
@@ -1122,7 +1132,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back)
barheight = (ltexth > 0)? (st->viewlines*pix_available)/ltexth: 0;
pix_bardiff = 0;
- if(barheight < 20) {
+ if (barheight < 20) {
pix_bardiff = 20 - barheight; /* take into account the now non-linear sizing of the bar */
barheight = 20;
}
@@ -1136,52 +1146,52 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back)
CLAMP(st->txtbar.ymax, pix_bottom_margin, ar->winy - pix_top_margin);
st->pix_per_line= (pix_available > 0)? (float) ltexth/pix_available: 0;
- if(st->pix_per_line < 0.1f) st->pix_per_line=0.1f;
+ if (st->pix_per_line < 0.1f) st->pix_per_line=0.1f;
curl_off= text_get_span_wrap(st, ar, st->text->lines.first, st->text->curl);
sell_off= text_get_span_wrap(st, ar, st->text->lines.first, st->text->sell);
lhlstart = MIN2(curl_off, sell_off);
lhlend = MAX2(curl_off, sell_off);
- if(ltexth > 0) {
+ if (ltexth > 0) {
hlstart = (lhlstart * pix_available)/ltexth;
hlend = (lhlend * pix_available)/ltexth;
/* the scrollbar is non-linear sized */
- if(pix_bardiff > 0) {
+ if (pix_bardiff > 0) {
/* the start of the highlight is in the current viewport */
- if(ltexth && st->viewlines && lhlstart >= st->top && lhlstart <= st->top + st->viewlines) {
+ if (ltexth && st->viewlines && lhlstart >= st->top && lhlstart <= st->top + st->viewlines) {
/* speed the progresion of the start of the highlight through the scrollbar */
hlstart = ( ( (pix_available - pix_bardiff) * lhlstart) / ltexth) + (pix_bardiff * (lhlstart - st->top) / st->viewlines);
}
- else if(lhlstart > st->top + st->viewlines && hlstart < barstart + barheight && hlstart > barstart) {
+ else if (lhlstart > st->top + st->viewlines && hlstart < barstart + barheight && hlstart > barstart) {
/* push hl start down */
hlstart = barstart + barheight;
}
- else if(lhlend > st->top && lhlstart < st->top && hlstart > barstart) {
+ else if (lhlend > st->top && lhlstart < st->top && hlstart > barstart) {
/*fill out start */
hlstart = barstart;
}
- if(hlend <= hlstart) {
+ if (hlend <= hlstart) {
hlend = hlstart + 2;
}
/* the end of the highlight is in the current viewport */
- if(ltexth && st->viewlines && lhlend >= st->top && lhlend <= st->top + st->viewlines) {
+ if (ltexth && st->viewlines && lhlend >= st->top && lhlend <= st->top + st->viewlines) {
/* speed the progresion of the end of the highlight through the scrollbar */
hlend = (((pix_available - pix_bardiff )*lhlend)/ltexth) + (pix_bardiff * (lhlend - st->top)/st->viewlines);
}
- else if(lhlend < st->top && hlend >= barstart - 2 && hlend < barstart + barheight) {
+ else if (lhlend < st->top && hlend >= barstart - 2 && hlend < barstart + barheight) {
/* push hl end up */
hlend = barstart;
}
- else if(lhlend > st->top + st->viewlines && lhlstart < st->top + st->viewlines && hlend < barstart + barheight) {
+ else if (lhlend > st->top + st->viewlines && lhlstart < st->top + st->viewlines && hlend < barstart + barheight) {
/* fill out end */
hlend = barstart + barheight;
}
- if(hlend <= hlstart) {
+ if (hlend <= hlstart) {
hlstart = hlend - 2;
}
}
@@ -1191,13 +1201,13 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back)
hlend = 0;
}
- if(hlend - hlstart < 2) {
+ if (hlend - hlstart < 2) {
hlend = hlstart + 2;
}
st->txtscroll= *scroll;
- st->txtscroll.ymax= ar->winy - pix_top_margin - hlstart;
- st->txtscroll.ymin= ar->winy - pix_top_margin - hlend;
+ st->txtscroll.ymax = ar->winy - pix_top_margin - hlstart;
+ st->txtscroll.ymin = ar->winy - pix_top_margin - hlend;
CLAMP(st->txtscroll.ymin, pix_bottom_margin, ar->winy - pix_top_margin);
CLAMP(st->txtscroll.ymax, pix_bottom_margin, ar->winy - pix_top_margin);
@@ -1241,16 +1251,16 @@ static void draw_markers(SpaceText *st, ARegion *ar)
topy= txt_get_span(text->lines.first, top);
- for(marker= text->markers.first; marker; marker= next) {
+ for (marker= text->markers.first; marker; marker= next) {
next= marker->next;
/* invisible line (before top) */
- if(marker->lineno<topi) continue;
+ if (marker->lineno<topi) continue;
line= BLI_findlink(&text->lines, marker->lineno);
/* Remove broken markers */
- if(marker->end>line->len || marker->start>marker->end) {
+ if (marker->end>line->len || marker->start>marker->end) {
BLI_freelinkN(&text->markers, marker);
continue;
}
@@ -1264,13 +1274,13 @@ static void draw_markers(SpaceText *st, ARegion *ar)
x2 = text_get_char_pos(st, line->line, marker->end) - st->left + offc;
/* invisible part of line (before top, after last visible line) */
- if(y2 < 0 || y1 > st->top+st->viewlines) continue;
+ if (y2 < 0 || y1 > st->top+st->viewlines) continue;
glColor3ubv(marker->color);
x= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
y= ar->winy-3;
- if(y1==y2) {
+ if (y1==y2) {
y -= y1*st->lheight;
glBegin(GL_LINE_LOOP);
glVertex2i(x+x2*st->cwidth+1, y);
@@ -1289,7 +1299,7 @@ static void draw_markers(SpaceText *st, ARegion *ar)
glEnd();
y-=st->lheight;
- for(i=y1+1; i<y2; i++) {
+ for (i=y1+1; i<y2; i++) {
glBegin(GL_LINES);
glVertex2i(x, y);
glVertex2i(ar->winx, y);
@@ -1318,24 +1328,24 @@ static void draw_documentation(SpaceText *st, ARegion *ar)
int i, br, lines;
int boxw, boxh, l, x, y /* , top */ /* UNUSED */;
- if(!st || !st->text) return;
- if(!texttool_text_is_active(st->text)) return;
+ if (!st || !st->text) return;
+ if (!texttool_text_is_active(st->text)) return;
docs = texttool_docs_get();
- if(!docs) return;
+ if (!docs) return;
/* Count the visible lines to the cursor */
- for(tmp=st->text->curl, l=-st->top; tmp; tmp=tmp->prev, l++);
- if(l<0) return;
+ for (tmp=st->text->curl, l=-st->top; tmp; tmp=tmp->prev, l++);
+ if (l<0) return;
- if(st->showlinenrs) {
+ if (st->showlinenrs) {
x= st->cwidth*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4;
}
else {
x= st->cwidth*(st->text->curc-st->left) + TXT_OFFSET - 4;
}
- if(texttool_suggest_first()) {
+ if (texttool_suggest_first()) {
x += SUGG_LIST_WIDTH*st->cwidth + 50;
}
@@ -1366,32 +1376,32 @@ static void draw_documentation(SpaceText *st, ARegion *ar)
UI_ThemeColor(TH_TEXT);
i= 0; br= DOC_WIDTH; lines= 0; // XXX -doc_scroll;
- for(p=docs; *p; p++) {
- if(*p == '\r' && *(++p) != '\n') *(--p)= '\n'; /* Fix line endings */
- if(*p == ' ' || *p == '\t')
+ for (p=docs; *p; p++) {
+ if (*p == '\r' && *(++p) != '\n') *(--p)= '\n'; /* Fix line endings */
+ if (*p == ' ' || *p == '\t')
br= i;
- else if(*p == '\n') {
+ else if (*p == '\n') {
buf[i]= '\0';
- if(lines>=0) {
+ if (lines>=0) {
y -= st->lheight;
text_draw(st, buf, 0, 0, 1, x+4, y-3, NULL);
}
i= 0; br= DOC_WIDTH; lines++;
}
buf[i++]= *p;
- if(i == DOC_WIDTH) { /* Reached the width, go to last break and wrap there */
+ if (i == DOC_WIDTH) { /* Reached the width, go to last break and wrap there */
buf[br]= '\0';
- if(lines>=0) {
+ if (lines>=0) {
y -= st->lheight;
text_draw(st, buf, 0, 0, 1, x+4, y-3, NULL);
}
p -= i-br-1; /* Rewind pointer to last break */
i= 0; br= DOC_WIDTH; lines++;
}
- if(lines >= DOC_HEIGHT) break;
+ if (lines >= DOC_HEIGHT) break;
}
- if(0 /* XXX doc_scroll*/ > 0 && lines < DOC_HEIGHT) {
+ if (0 /* XXX doc_scroll*/ > 0 && lines < DOC_HEIGHT) {
// XXX doc_scroll--;
draw_documentation(st, ar);
}
@@ -1406,23 +1416,23 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar)
char str[SUGG_LIST_WIDTH+1];
int w, boxw=0, boxh, i, l, x, y, b, *top;
- if(!st || !st->text) return;
- if(!texttool_text_is_active(st->text)) return;
+ if (!st || !st->text) return;
+ if (!texttool_text_is_active(st->text)) return;
first = texttool_suggest_first();
last = texttool_suggest_last();
- if(!first || !last) return;
+ if (!first || !last) return;
text_pop_suggest_list();
sel = texttool_suggest_selected();
top = texttool_suggest_top();
/* Count the visible lines to the cursor */
- for(tmp=st->text->curl, l=-st->top; tmp; tmp=tmp->prev, l++);
- if(l<0) return;
+ for (tmp=st->text->curl, l=-st->top; tmp; tmp=tmp->prev, l++);
+ if (l<0) return;
- if(st->showlinenrs) {
+ if (st->showlinenrs) {
x = st->cwidth*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4;
}
else {
@@ -1439,9 +1449,9 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar)
glRecti(x, y, x+boxw, y-boxh);
/* Set the top 'item' of the visible list */
- for(i=0, item=first; i<*top && item->next; i++, item=item->next);
+ for (i=0, item=first; i<*top && item->next; i++, item=item->next);
- for(i=0; i<SUGG_LIST_SIZE && item; i++, item=item->next) {
+ for (i=0; i<SUGG_LIST_SIZE && item; i++, item=item->next) {
y -= st->lheight;
@@ -1449,7 +1459,7 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar)
w = BLF_width(mono, str);
- if(item == sel) {
+ if (item == sel) {
UI_ThemeColor(TH_SHADE2);
glRecti(x+16, y-3, x+16+w, y+st->lheight-3);
}
@@ -1461,13 +1471,13 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar)
case 'v': UI_ThemeColor(TH_SYNTAX_N); break;
case '?': UI_ThemeColor(TH_TEXT); b=0; break;
}
- if(b) {
+ if (b) {
glRecti(x+8, y+2, x+11, y+5);
UI_ThemeColor(TH_TEXT);
}
text_draw(st, str, 0, 0, 1, x+16, y-1, NULL);
- if(item == last) break;
+ if (item == last) break;
}
}
@@ -1480,7 +1490,7 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
int x, y, w, i;
/* Draw the selection */
- if(text->curl!=text->sell || text->curc!=text->selc) {
+ if (text->curl!=text->sell || text->curc!=text->selc) {
int offl, offc;
/* Convert all to view space character coordinates */
wrap_offset(st, ar, text->curl, text->curc, &offl, &offc);
@@ -1490,16 +1500,16 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
vsell = txt_get_span(text->lines.first, text->sell) - st->top + offl;
vselc = text_get_char_pos(st, text->sell->line, text->selc) - st->left + offc;
- if(vcurc<0) vcurc=0;
- if(vselc<0) vselc=0, hidden=1;
+ if (vcurc<0) vcurc=0;
+ if (vselc<0) vselc=0, hidden=1;
UI_ThemeColor(TH_SHADE2);
x= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
y= ar->winy-2;
- if(vcurl==vsell) {
+ if (vcurl==vsell) {
y -= vcurl*st->lheight;
- if(vcurc < vselc)
+ if (vcurc < vselc)
glRecti(x+vcurc*st->cwidth-1, y, x+vselc*st->cwidth, y-st->lheight);
else
glRecti(x+vselc*st->cwidth-1, y, x+vcurc*st->cwidth, y-st->lheight);
@@ -1507,7 +1517,7 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
else {
int froml, fromc, tol, toc;
- if(vcurl < vsell) {
+ if (vcurl < vsell) {
froml= vcurl; tol= vsell;
fromc= vcurc; toc= vselc;
}
@@ -1518,7 +1528,7 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
y -= froml*st->lheight;
glRecti(x+fromc*st->cwidth-1, y, ar->winx, y-st->lheight); y-=st->lheight;
- for(i=froml+1; i<tol; i++)
+ for (i=froml+1; i<tol; i++)
glRecti(x-4, y, ar->winx, y-st->lheight), y-=st->lheight;
glRecti(x-4, y, x+toc*st->cwidth, y-st->lheight); y-=st->lheight;
@@ -1530,16 +1540,16 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
vsell = txt_get_span(text->lines.first, text->sell) - st->top + offl;
vselc = text_get_char_pos(st, text->sell->line, text->selc) - st->left + offc;
- if(vselc<0) {
+ if (vselc<0) {
vselc= 0;
hidden= 1;
}
}
- if(st->line_hlight) {
+ if (st->line_hlight) {
int x1, x2, y1, y2;
- if(st->wordwrap) {
+ if (st->wordwrap) {
int visible_lines = text_get_visible_lines(st, ar, text->sell->line);
int offl, offc;
@@ -1547,12 +1557,13 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
y1= ar->winy-2 - (vsell-offl)*st->lheight;
y2= y1-st->lheight*visible_lines+1;
- } else {
+ }
+ else {
y1= ar->winy-2 - vsell*st->lheight;
y2= y1-st->lheight+1;
}
- if(!(y1<0 || y2 > ar->winy)) { /* check we need to draw */
+ if (!(y1<0 || y2 > ar->winy)) { /* check we need to draw */
x1= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
x2= x1 + ar->winx;
@@ -1565,17 +1576,17 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
}
}
- if(!hidden) {
+ if (!hidden) {
/* Draw the cursor itself (we draw the sel. cursor as this is the leading edge) */
x= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
x += vselc*st->cwidth;
y= ar->winy-2 - vsell*st->lheight;
- if(st->overwrite) {
+ if (st->overwrite) {
char ch= text->sell->line[text->selc];
w= st->cwidth;
- if(ch=='\t') w*= st->tabnumber-(vselc+st->left)%st->tabnumber;
+ if (ch=='\t') w*= st->tabnumber-(vselc+st->left)%st->tabnumber;
UI_ThemeColor(TH_HILITE);
glRecti(x, y-st->lheight-1, x+w, y-st->lheight+1);
@@ -1599,13 +1610,13 @@ static void draw_brackets(SpaceText *st, ARegion *ar)
char ch;
// showsyntax must be on or else the format string will be null
- if(!text->curl || !st->showsyntax) return;
+ if (!text->curl || !st->showsyntax) return;
startl= text->curl;
startc= text->curc;
b= text_check_bracket(startl->line[startc]);
- if(b==0 && startc>0) b = text_check_bracket(startl->line[--startc]);
- if(b==0) return;
+ if (b==0 && startc>0) b = text_check_bracket(startl->line[--startc]);
+ if (b==0) return;
linep= startl;
c= startc;
@@ -1615,34 +1626,34 @@ static void draw_brackets(SpaceText *st, ARegion *ar)
find= -b;
stack= 0;
- /* Dont highlight backets if syntax HL is off or bracket in string or comment. */
- if(!linep->format || linep->format[fc] == 'l' || linep->format[fc] == '#')
+ /* Don't highlight backets if syntax HL is off or bracket in string or comment. */
+ if (!linep->format || linep->format[fc] == 'l' || linep->format[fc] == '#')
return;
- if(b>0) {
+ if (b>0) {
/* opening bracket, search forward for close */
fc++;
c+= BLI_str_utf8_size(linep->line+c);
- while(linep) {
- while(c<linep->len) {
- if(linep->format && linep->format[fc] != 'l' && linep->format[fc] != '#') {
+ while (linep) {
+ while (c<linep->len) {
+ if (linep->format && linep->format[fc] != 'l' && linep->format[fc] != '#') {
b= text_check_bracket(linep->line[c]);
- if(b==find) {
- if(stack==0) {
+ if (b==find) {
+ if (stack==0) {
endl= linep;
endc= c;
break;
}
stack--;
}
- else if(b==-find) {
+ else if (b==-find) {
stack++;
}
}
fc++;
c+= BLI_str_utf8_size(linep->line+c);
}
- if(endl) break;
+ if (endl) break;
linep= linep->next;
c= 0;
fc= 0;
@@ -1652,28 +1663,28 @@ static void draw_brackets(SpaceText *st, ARegion *ar)
/* closing bracket, search backward for open */
fc--;
if (c>0) c -= linep->line+c-BLI_str_prev_char_utf8(linep->line+c);
- while(linep) {
- while(fc>=0) {
- if(linep->format && linep->format[fc] != 'l' && linep->format[fc] != '#') {
+ while (linep) {
+ while (fc>=0) {
+ if (linep->format && linep->format[fc] != 'l' && linep->format[fc] != '#') {
b= text_check_bracket(linep->line[c]);
- if(b==find) {
- if(stack==0) {
+ if (b==find) {
+ if (stack==0) {
endl= linep;
endc= c;
break;
}
stack--;
}
- else if(b==-find) {
+ else if (b==-find) {
stack++;
}
}
fc--;
if (c>0) c -= linep->line+c-BLI_str_prev_char_utf8(linep->line+c);
}
- if(endl) break;
+ if (endl) break;
linep= linep->prev;
- if(linep) {
+ if (linep) {
if (linep->format) fc= strlen(linep->format)-1;
else fc= -1;
if (linep->len) c= BLI_str_prev_char_utf8(linep->line+linep->len)-linep->line;
@@ -1682,7 +1693,7 @@ static void draw_brackets(SpaceText *st, ARegion *ar)
}
}
- if(!endl || endc==-1)
+ if (!endl || endc==-1)
return;
UI_ThemeColor(TH_HILITE);
@@ -1694,7 +1705,7 @@ static void draw_brackets(SpaceText *st, ARegion *ar)
wrap_offset(st, ar, startl, startc, &offl, &offc);
viewc= text_get_char_pos(st, startl->line, startc) - st->left + offc;
- if(viewc >= 0){
+ if (viewc >= 0) {
viewl= txt_get_span(text->lines.first, startl) - st->top + offl;
text_font_draw_character(st, x+viewc*st->cwidth, y-viewl*st->lheight, ch);
@@ -1706,7 +1717,7 @@ static void draw_brackets(SpaceText *st, ARegion *ar)
wrap_offset(st, ar, endl, endc, &offl, &offc);
viewc= text_get_char_pos(st, endl->line, endc) - st->left + offc;
- if(viewc >= 0) {
+ if (viewc >= 0) {
viewl= txt_get_span(text->lines.first, endl) - st->top + offl;
text_font_draw_character(st, x+viewc*st->cwidth, y-viewl*st->lheight, ch);
@@ -1725,17 +1736,17 @@ void draw_text_main(SpaceText *st, ARegion *ar)
int i, x, y, winx, linecount= 0, lineno= 0;
int wraplinecount= 0, wrap_skip= 0;
- if(st->lheight) st->viewlines= (int)ar->winy/st->lheight;
+ if (st->lheight) st->viewlines= (int)ar->winy/st->lheight;
else st->viewlines= 0;
/* if no text, nothing to do */
- if(!text)
+ if (!text)
return;
text_update_drawcache(st, ar);
/* make sure all the positional pointers exist */
- if(!text->curl || !text->sell || !text->lines.first || !text->lines.last)
+ if (!text->curl || !text->sell || !text->lines.first || !text->lines.last)
txt_clean_text(text);
/* update rects for scroll */
@@ -1744,22 +1755,24 @@ void draw_text_main(SpaceText *st, ARegion *ar)
/* update syntax formatting if needed */
tmp= text->lines.first;
lineno= 0;
- for(i= 0; i<st->top && tmp; i++) {
- if(st->showsyntax && !tmp->format)
+ for (i= 0; i<st->top && tmp; i++) {
+ if (st->showsyntax && !tmp->format)
txt_format_line(st, tmp, 0);
- if(st->wordwrap) {
+ if (st->wordwrap) {
int lines= text_get_visible_lines_no(st, lineno);
if (wraplinecount+lines>st->top) {
wrap_skip= st->top-wraplinecount;
break;
- } else {
+ }
+ else {
wraplinecount+= lines;
tmp= tmp->next;
linecount++;
}
- } else {
+ }
+ else {
tmp= tmp->next;
linecount++;
}
@@ -1772,7 +1785,7 @@ void draw_text_main(SpaceText *st, ARegion *ar)
st->cwidth= MAX2(st->cwidth, 1);
/* draw line numbers background */
- if(st->showlinenrs) {
+ if (st->showlinenrs) {
x= TXT_OFFSET + TEXTXLOC;
UI_ThemeColor(TH_GRID);
@@ -1791,13 +1804,13 @@ void draw_text_main(SpaceText *st, ARegion *ar)
/* draw the text */
UI_ThemeColor(TH_TEXT);
- for(i=0; y>0 && i<st->viewlines && tmp; i++, tmp= tmp->next) {
- if(st->showsyntax && !tmp->format)
+ for (i=0; y>0 && i<st->viewlines && tmp; i++, tmp= tmp->next) {
+ if (st->showsyntax && !tmp->format)
txt_format_line(st, tmp, 0);
- if(st->showlinenrs && !wrap_skip) {
+ if (st->showlinenrs && !wrap_skip) {
/* draw line number */
- if(tmp == text->curl)
+ if (tmp == text->curl)
UI_ThemeColor(TH_HILITE);
else
UI_ThemeColor(TH_TEXT);
@@ -1809,7 +1822,7 @@ void draw_text_main(SpaceText *st, ARegion *ar)
UI_ThemeColor(TH_TEXT);
}
- if(st->wordwrap) {
+ if (st->wordwrap) {
/* draw word wrapped text */
int lines = text_draw_wrapped(st, tmp->line, x, y, winx-x, tmp->format, wrap_skip);
y -= lines*st->lheight;
@@ -1823,7 +1836,7 @@ void draw_text_main(SpaceText *st, ARegion *ar)
wrap_skip= 0;
}
- if(st->flags&ST_SHOW_MARGIN) {
+ if (st->flags&ST_SHOW_MARGIN) {
UI_ThemeColor(TH_HILITE);
glBegin(GL_LINES);
@@ -1854,19 +1867,19 @@ void text_update_character_width(SpaceText *st)
}
/* Moves the view to the cursor location,
- * also used to make sure the view isnt outside the file */
+ * also used to make sure the view isn't outside the file */
void text_scroll_to_cursor(SpaceText *st, ScrArea *sa)
{
Text *text;
ARegion *ar= NULL;
int i, x, winx= 0;
- if(ELEM3(NULL, st, st->text, st->text->curl)) return;
+ if (ELEM3(NULL, st, st->text, st->text->curl)) return;
text= st->text;
- for(ar=sa->regionbase.first; ar; ar= ar->next)
- if(ar->regiontype==RGN_TYPE_WINDOW) {
+ for (ar=sa->regionbase.first; ar; ar= ar->next)
+ if (ar->regiontype==RGN_TYPE_WINDOW) {
winx= ar->winx;
break;
}
@@ -1876,27 +1889,27 @@ void text_scroll_to_cursor(SpaceText *st, ScrArea *sa)
text_update_character_width(st);
i= txt_get_span(text->lines.first, text->sell);
- if(st->wordwrap) {
+ if (st->wordwrap) {
int offl, offc;
wrap_offset(st, ar, text->sell, text->selc, &offl, &offc);
i+= offl;
}
- if(st->top+st->viewlines <= i || st->top > i)
+ if (st->top+st->viewlines <= i || st->top > i)
st->top= i - st->viewlines/2;
- if(st->wordwrap) {
+ if (st->wordwrap) {
st->left= 0;
}
else {
x= text_draw(st, text->sell->line, st->left, text->selc, 0, 0, 0, NULL);
- if(x==0 || x>winx)
+ if (x==0 || x>winx)
st->left= text->curc-0.5*winx/st->cwidth;
}
- if(st->top < 0) st->top= 0;
- if(st->left <0) st->left= 0;
+ if (st->top < 0) st->top= 0;
+ if (st->left <0) st->left= 0;
}
void text_update_cursor_moved(bContext *C)
diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c
index b8e53f752e2..f4f92ac8db3 100644
--- a/source/blender/editors/space_text/text_header.c
+++ b/source/blender/editors/space_text/text_header.c
@@ -79,13 +79,13 @@ static ARegion *text_has_properties_region(ScrArea *sa)
ARegion *ar, *arnew;
ar= BKE_area_find_region_type(sa, RGN_TYPE_UI);
- if(ar) return ar;
+ if (ar) return ar;
/* add subdiv level; after header */
ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
/* is error! */
- if(ar==NULL) return NULL;
+ if (ar==NULL) return NULL;
arnew= MEM_callocN(sizeof(ARegion), "properties region");
@@ -108,7 +108,7 @@ static int text_properties_exec(bContext *C, wmOperator *UNUSED(op))
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= text_has_properties_region(sa);
- if(ar)
+ if (ar)
ED_region_toggle_hidden(C, ar);
return OPERATOR_FINISHED;
@@ -117,13 +117,13 @@ static int text_properties_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_properties(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Properties";
- ot->description= "Toggle text properties panel";
- ot->idname= "TEXT_OT_properties";
+ ot->name = "Properties";
+ ot->description = "Toggle text properties panel";
+ ot->idname = "TEXT_OT_properties";
/* api callbacks */
- ot->exec= text_properties_exec;
- ot->poll= text_properties_poll;
+ ot->exec = text_properties_exec;
+ ot->poll = text_properties_poll;
}
/******************** XXX popup menus *******************/
@@ -134,9 +134,9 @@ void TEXT_OT_properties(wmOperatorType *ot)
uiPopupMenu *pup;
- if(text) {
+ if (text) {
pup= uiPupMenuBegin(C, "Text", ICON_NONE);
- if(txt_has_sel(text)) {
+ if (txt_has_sel(text)) {
uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_cut");
uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_copy");
}
@@ -173,7 +173,7 @@ void TEXT_OT_properties(wmOperatorType *ot)
uiPopupMenu *pup;
- if(text) {
+ if (text) {
pup= uiPupMenuBegin(C, "Text", ICON_NONE);
uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_new");
uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_open");
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 17857275d36..de26fa1f8ca 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -74,7 +74,7 @@
/************************ poll ***************************/
-BM_INLINE int text_pixel_x_to_index(SpaceText *st, const int x)
+BLI_INLINE int text_pixel_x_to_index(SpaceText *st, const int x)
{
/* add half the char width so mouse cursor selection is inbetween letters */
return (x + (st->cwidth / 2)) / st->cwidth;
@@ -89,10 +89,10 @@ static int text_edit_poll(bContext *C)
{
Text *text= CTX_data_edit_text(C);
- if(!text)
+ if (!text)
return 0;
- if(text->id.lib) {
+ if (text->id.lib) {
// BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata");
return 0;
}
@@ -105,10 +105,10 @@ static int text_space_edit_poll(bContext *C)
SpaceText *st= CTX_wm_space_text(C);
Text *text= CTX_data_edit_text(C);
- if(!st || !text)
+ if (!st || !text)
return 0;
- if(text->id.lib) {
+ if (text->id.lib) {
// BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata");
return 0;
}
@@ -122,13 +122,13 @@ static int text_region_edit_poll(bContext *C)
Text *text= CTX_data_edit_text(C);
ARegion *ar= CTX_wm_region(C);
- if(!st || !text)
+ if (!st || !text)
return 0;
- if(!ar || ar->regiontype != RGN_TYPE_WINDOW)
+ if (!ar || ar->regiontype != RGN_TYPE_WINDOW)
return 0;
- if(text->id.lib) {
+ if (text->id.lib) {
// BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata");
return 0;
}
@@ -140,11 +140,11 @@ static int text_region_edit_poll(bContext *C)
void text_update_line_edited(TextLine *line)
{
- if(!line)
+ if (!line)
return;
/* we just free format here, and let it rebuild during draw */
- if(line->format) {
+ if (line->format) {
MEM_freeN(line->format);
line->format= NULL;
}
@@ -154,7 +154,7 @@ void text_update_edited(Text *text)
{
TextLine *line;
- for(line=text->lines.first; line; line=line->next)
+ for (line=text->lines.first; line; line=line->next)
text_update_line_edited(line);
}
@@ -172,18 +172,18 @@ static int text_new_exec(bContext *C, wmOperator *UNUSED(op))
/* hook into UI */
uiIDContextProperty(C, &ptr, &prop);
- if(prop) {
+ if (prop) {
/* when creating new ID blocks, use is already 1, but RNA
* pointer se also increases user, so this compensates it */
/* doesnt always seem to happen... (ton) */
- if(text->id.us>1)
+ if (text->id.us>1)
text->id.us--;
RNA_id_pointer_create(&text->id, &idptr);
RNA_property_pointer_set(&ptr, prop, idptr);
RNA_property_update(C, &ptr, prop);
}
- else if(st) {
+ else if (st) {
st->text= text;
st->top= 0;
text_drawcache_tag_update(st, 1);
@@ -197,16 +197,16 @@ static int text_new_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_new(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Create Text Block";
- ot->idname= "TEXT_OT_new";
- ot->description= "Create a new text data block";
+ ot->name = "Create Text Block";
+ ot->idname = "TEXT_OT_new";
+ ot->description = "Create a new text data block";
/* api callbacks */
- ot->exec= text_new_exec;
- ot->poll= text_new_poll;
+ ot->exec = text_new_exec;
+ ot->poll = text_new_poll;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
}
/******************* open operator *********************/
@@ -238,18 +238,18 @@ static int text_open_exec(bContext *C, wmOperator *op)
text= add_text(str, G.main->name);
- if(!text) {
- if(op->customdata) MEM_freeN(op->customdata);
+ if (!text) {
+ if (op->customdata) MEM_freeN(op->customdata);
return OPERATOR_CANCELLED;
}
- if(!op->customdata)
+ if (!op->customdata)
text_open_init(C, op);
/* hook into UI */
pprop= op->customdata;
- if(pprop->prop) {
+ if (pprop->prop) {
/* when creating new ID blocks, use is already 1, but RNA
* pointer se also increases user, so this compensates it */
text->id.us--;
@@ -258,13 +258,13 @@ static int text_open_exec(bContext *C, wmOperator *op)
RNA_property_pointer_set(&pprop->ptr, pprop->prop, idptr);
RNA_property_update(C, &pprop->ptr, pprop->prop);
}
- else if(st) {
+ else if (st) {
st->text= text;
st->top= 0;
}
if (internal) {
- if(text->name)
+ if (text->name)
MEM_freeN(text->name);
text->name = NULL;
@@ -283,7 +283,7 @@ static int text_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
Text *text= CTX_data_edit_text(C);
char *path= (text && text->name)? text->name: G.main->name;
- if(RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath"))
return text_open_exec(C, op);
text_open_init(C, op);
@@ -296,18 +296,18 @@ static int text_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void TEXT_OT_open(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Open Text Block";
- ot->idname= "TEXT_OT_open";
- ot->description= "Open a new text data block";
+ ot->name = "Open Text Block";
+ ot->idname = "TEXT_OT_open";
+ ot->description = "Open a new text data block";
/* api callbacks */
- ot->exec= text_open_exec;
- ot->invoke= text_open_invoke;
- ot->cancel= text_open_cancel;
- ot->poll= text_new_poll;
+ ot->exec = text_open_exec;
+ ot->invoke = text_open_invoke;
+ ot->cancel = text_open_cancel;
+ ot->poll = text_new_poll;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); //XXX TODO, relative_path
@@ -320,13 +320,13 @@ static int text_reload_exec(bContext *C, wmOperator *op)
{
Text *text= CTX_data_edit_text(C);
- if(!reopen_text(text)) {
+ if (!reopen_text(text)) {
BKE_report(op->reports, RPT_ERROR, "Could not reopen file");
return OPERATOR_CANCELLED;
}
#ifdef WITH_PYTHON
- if(text->compiled)
+ if (text->compiled)
BPY_text_free_code(text);
#endif
@@ -341,14 +341,14 @@ static int text_reload_exec(bContext *C, wmOperator *op)
void TEXT_OT_reload(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reload";
- ot->idname= "TEXT_OT_reload";
- ot->description= "Reload active text data block from its file";
+ ot->name = "Reload";
+ ot->idname = "TEXT_OT_reload";
+ ot->description = "Reload active text data block from its file";
/* api callbacks */
- ot->exec= text_reload_exec;
- ot->invoke= WM_operator_confirm;
- ot->poll= text_edit_poll;
+ ot->exec = text_reload_exec;
+ ot->invoke = WM_operator_confirm;
+ ot->poll = text_edit_poll;
}
/******************* delete operator *********************/
@@ -366,13 +366,13 @@ static int text_unlink_exec(bContext *C, wmOperator *UNUSED(op))
Text *text= CTX_data_edit_text(C);
/* make the previous text active, if its not there make the next text active */
- if(st) {
- if(text->id.prev) {
+ if (st) {
+ if (text->id.prev) {
st->text = text->id.prev;
text_update_cursor_moved(C);
WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text);
}
- else if(text->id.next) {
+ else if (text->id.next) {
st->text = text->id.next;
text_update_cursor_moved(C);
WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text);
@@ -391,17 +391,17 @@ static int text_unlink_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_unlink(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Unlink";
- ot->idname= "TEXT_OT_unlink";
- ot->description= "Unlink active text data block";
+ ot->name = "Unlink";
+ ot->idname = "TEXT_OT_unlink";
+ ot->description = "Unlink active text data block";
/* api callbacks */
- ot->exec= text_unlink_exec;
- ot->invoke= WM_operator_confirm;
- ot->poll= text_unlink_poll;
+ ot->exec = text_unlink_exec;
+ ot->invoke = WM_operator_confirm;
+ ot->poll = text_unlink_poll;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
}
/******************* make internal operator *********************/
@@ -412,7 +412,7 @@ static int text_make_internal_exec(bContext *C, wmOperator *UNUSED(op))
text->flags |= TXT_ISMEM | TXT_ISDIRTY;
- if(text->name) {
+ if (text->name) {
MEM_freeN(text->name);
text->name= NULL;
}
@@ -426,16 +426,16 @@ static int text_make_internal_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_make_internal(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Internal";
- ot->idname= "TEXT_OT_make_internal";
- ot->description= "Make active text file internal";
+ ot->name = "Make Internal";
+ ot->idname = "TEXT_OT_make_internal";
+ ot->description = "Make active text file internal";
/* api callbacks */
- ot->exec= text_make_internal_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_make_internal_exec;
+ ot->poll = text_edit_poll;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
}
/******************* save operator *********************/
@@ -444,7 +444,7 @@ static int text_save_poll(bContext *C)
{
Text *text= CTX_data_edit_text(C);
- if(!text_edit_poll(C))
+ if (!text_edit_poll(C))
return 0;
return (text->name != NULL && !(text->flags & TXT_ISMEM));
@@ -460,15 +460,15 @@ static void txt_write_file(Text *text, ReportList *reports)
BLI_strncpy(filepath, text->name, FILE_MAX);
BLI_path_abs(filepath, G.main->name);
- fp= fopen(filepath, "w");
- if(fp==NULL) {
+ fp= BLI_fopen(filepath, "w");
+ if (fp==NULL) {
BKE_reportf(reports, RPT_ERROR, "Unable to save \"%s\": %s", filepath, errno ? strerror(errno) : "Unknown error writing file");
return;
}
tmp= text->lines.first;
- while(tmp) {
- if(tmp->next) fprintf(fp, "%s\n", tmp->line);
+ while (tmp) {
+ if (tmp->next) fprintf(fp, "%s\n", tmp->line);
else fprintf(fp, "%s", tmp->line);
tmp= tmp->next;
@@ -476,7 +476,7 @@ static void txt_write_file(Text *text, ReportList *reports)
fclose (fp);
- if(stat(filepath, &st) == 0) {
+ if (stat(filepath, &st) == 0) {
text->mtime= st.st_mtime;
}
else {
@@ -484,7 +484,7 @@ static void txt_write_file(Text *text, ReportList *reports)
BKE_reportf(reports, RPT_WARNING, "Unable to stat \"%s\": %s", filepath, errno ? strerror(errno) : "Unknown error starrng file");
}
- if(text->flags & TXT_ISDIRTY)
+ if (text->flags & TXT_ISDIRTY)
text->flags ^= TXT_ISDIRTY;
}
@@ -503,13 +503,13 @@ static int text_save_exec(bContext *C, wmOperator *op)
void TEXT_OT_save(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Save";
- ot->idname= "TEXT_OT_save";
- ot->description= "Save active text data block";
+ ot->name = "Save";
+ ot->idname = "TEXT_OT_save";
+ ot->description = "Save active text data block";
/* api callbacks */
- ot->exec= text_save_exec;
- ot->poll= text_save_poll;
+ ot->exec = text_save_exec;
+ ot->poll = text_save_poll;
}
/******************* save as operator *********************/
@@ -519,12 +519,12 @@ static int text_save_as_exec(bContext *C, wmOperator *op)
Text *text= CTX_data_edit_text(C);
char str[FILE_MAX];
- if(!text)
+ if (!text)
return OPERATOR_CANCELLED;
RNA_string_get(op->ptr, "filepath", str);
- if(text->name) MEM_freeN(text->name);
+ if (text->name) MEM_freeN(text->name);
text->name= BLI_strdup(str);
text->flags &= ~TXT_ISMEM;
@@ -541,12 +541,12 @@ static int text_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
Text *text= CTX_data_edit_text(C);
char *str;
- if(RNA_struct_property_is_set(op->ptr, "filepath"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath"))
return text_save_as_exec(C, op);
- if(text->name)
+ if (text->name)
str= text->name;
- else if(text->flags & TXT_ISMEM)
+ else if (text->flags & TXT_ISMEM)
str= text->id.name+2;
else
str= G.main->name;
@@ -560,14 +560,14 @@ static int text_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
void TEXT_OT_save_as(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Save As";
- ot->idname= "TEXT_OT_save_as";
- ot->description= "Save active text file with options";
+ ot->name = "Save As";
+ ot->idname = "TEXT_OT_save_as";
+ ot->description = "Save active text file with options";
/* api callbacks */
- ot->exec= text_save_as_exec;
- ot->invoke= text_save_as_invoke;
- ot->poll= text_edit_poll;
+ ot->exec = text_save_as_exec;
+ ot->invoke = text_save_as_invoke;
+ ot->poll = text_edit_poll;
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); //XXX TODO, relative_path
@@ -591,16 +591,16 @@ static int text_run_script(bContext *C, ReportList *reports)
int curc_prev= text->curc;
if (BPY_text_exec(C, text, reports, !is_live)) {
- if(is_live) {
+ if (is_live) {
/* for nice live updates */
WM_event_add_notifier(C, NC_WINDOW|NA_EDITED, NULL);
}
return OPERATOR_FINISHED;
}
- /* Dont report error messages while live editing */
- if(!is_live) {
- if(text->curl != curl_prev || curc_prev != text->curc) {
+ /* Don't report error messages while live editing */
+ if (!is_live) {
+ if (text->curl != curl_prev || curc_prev != text->curc) {
text_update_cursor_moved(C);
WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text);
}
@@ -630,16 +630,16 @@ static int text_run_script_exec(bContext *C, wmOperator *op)
void TEXT_OT_run_script(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Run Script";
- ot->idname= "TEXT_OT_run_script";
- ot->description= "Run active script";
+ ot->name = "Run Script";
+ ot->idname = "TEXT_OT_run_script";
+ ot->description = "Run active script";
/* api callbacks */
- ot->poll= text_run_script_poll;
- ot->exec= text_run_script_exec;
+ ot->poll = text_run_script_poll;
+ ot->exec = text_run_script_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/******************* refresh pyconstraints operator *********************/
@@ -654,30 +654,30 @@ static int text_refresh_pyconstraints_exec(bContext *UNUSED(C), wmOperator *UNUS
short update;
/* check all pyconstraints */
- for(ob= CTX_data_main(C)->object.first; ob; ob= ob->id.next) {
+ for (ob= CTX_data_main(C)->object.first; ob; ob= ob->id.next) {
update = 0;
- if(ob->type==OB_ARMATURE && ob->pose) {
+ if (ob->type==OB_ARMATURE && ob->pose) {
bPoseChannel *pchan;
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- for(con = pchan->constraints.first; con; con= con->next) {
- if(con->type==CONSTRAINT_TYPE_PYTHON) {
+ for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (con = pchan->constraints.first; con; con= con->next) {
+ if (con->type==CONSTRAINT_TYPE_PYTHON) {
bPythonConstraint *data = con->data;
- if(data->text==text) BPY_pyconstraint_update(ob, con);
+ if (data->text==text) BPY_pyconstraint_update(ob, con);
update = 1;
}
}
}
}
- for(con = ob->constraints.first; con; con= con->next) {
- if(con->type==CONSTRAINT_TYPE_PYTHON) {
+ for (con = ob->constraints.first; con; con= con->next) {
+ if (con->type==CONSTRAINT_TYPE_PYTHON) {
bPythonConstraint *data = con->data;
- if(data->text==text) BPY_pyconstraint_update(ob, con);
+ if (data->text==text) BPY_pyconstraint_update(ob, con);
update = 1;
}
}
- if(update) {
+ if (update) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
}
@@ -690,13 +690,13 @@ static int text_refresh_pyconstraints_exec(bContext *UNUSED(C), wmOperator *UNUS
void TEXT_OT_refresh_pyconstraints(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Refresh PyConstraints";
- ot->idname= "TEXT_OT_refresh_pyconstraints";
- ot->description= "Refresh all pyconstraints";
+ ot->name = "Refresh PyConstraints";
+ ot->idname = "TEXT_OT_refresh_pyconstraints";
+ ot->description = "Refresh all pyconstraints";
/* api callbacks */
- ot->exec= text_refresh_pyconstraints_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_refresh_pyconstraints_exec;
+ ot->poll = text_edit_poll;
}
/******************* paste operator *********************/
@@ -707,25 +707,25 @@ static char *txt_copy_selected(Text *text)
char *buf= NULL;
int charf, charl, length= 0;
- if(!text) return NULL;
- if(!text->curl) return NULL;
- if(!text->sell) return NULL;
+ if (!text) return NULL;
+ if (!text->curl) return NULL;
+ if (!text->sell) return NULL;
- if(!txt_has_sel(text)) return NULL;
+ if (!txt_has_sel(text)) return NULL;
- if(text->curl==text->sell) {
+ if (text->curl==text->sell) {
linef= linel= text->curl;
- if(text->curc < text->selc) {
+ if (text->curc < text->selc) {
charf= text->curc;
charl= text->selc;
}
- else{
+ else {
charf= text->selc;
charl= text->curc;
}
}
- else if(txt_get_span(text->curl, text->sell)<0) {
+ else if (txt_get_span(text->curl, text->sell)<0) {
linef= text->sell;
linel= text->curl;
@@ -740,7 +740,7 @@ static char *txt_copy_selected(Text *text)
charl= text->selc;
}
- if(linef == linel) {
+ if (linef == linel) {
length= charl-charf;
buf= MEM_callocN(length+1, "cut buffera");
@@ -753,7 +753,7 @@ static char *txt_copy_selected(Text *text)
length++; /* For the '\n' */
tmp= linef->next;
- while(tmp && tmp!= linel) {
+ while (tmp && tmp!= linel) {
length+= tmp->len+1;
tmp= tmp->next;
}
@@ -766,7 +766,7 @@ static char *txt_copy_selected(Text *text)
buf[length++]='\n';
tmp= linef->next;
- while(tmp && tmp!=linel) {
+ while (tmp && tmp!=linel) {
strncpy(buf+length, tmp->line, tmp->len);
length+= tmp->len;
@@ -791,7 +791,7 @@ static int text_paste_exec(bContext *C, wmOperator *op)
buf= WM_clipboard_text_get(selection);
- if(!buf)
+ if (!buf)
return OPERATOR_CANCELLED;
text_drawcache_tag_update(CTX_wm_space_text(C), 0);
@@ -805,7 +805,7 @@ static int text_paste_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text);
/* run the script while editing, evil but useful */
- if(CTX_wm_space_text(C)->live_edit)
+ if (CTX_wm_space_text(C)->live_edit)
text_run_script(C, NULL);
return OPERATOR_FINISHED;
@@ -814,13 +814,13 @@ static int text_paste_exec(bContext *C, wmOperator *op)
void TEXT_OT_paste(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Paste";
- ot->idname= "TEXT_OT_paste";
- ot->description= "Paste text from clipboard";
+ ot->name = "Paste";
+ ot->idname = "TEXT_OT_paste";
+ ot->description = "Paste text from clipboard";
/* api callbacks */
- ot->exec= text_paste_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_paste_exec;
+ ot->poll = text_edit_poll;
/* properties */
RNA_def_boolean(ot->srna, "selection", 0, "Selection", "Paste text selected elsewhere rather than copied (X11 only)");
@@ -834,7 +834,7 @@ static void txt_copy_clipboard(Text *text)
buf= txt_copy_selected(text);
- if(buf) {
+ if (buf) {
WM_clipboard_text_set(buf, 0);
MEM_freeN(buf);
}
@@ -852,13 +852,13 @@ static int text_copy_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy";
- ot->idname= "TEXT_OT_copy";
- ot->description= "Copy selected text to clipboard";
+ ot->name = "Copy";
+ ot->idname = "TEXT_OT_copy";
+ ot->description = "Copy selected text to clipboard";
/* api callbacks */
- ot->exec= text_copy_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_copy_exec;
+ ot->poll = text_edit_poll;
}
/******************* cut operator *********************/
@@ -876,7 +876,7 @@ static int text_cut_exec(bContext *C, wmOperator *UNUSED(op))
WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text);
/* run the script while editing, evil but useful */
- if(CTX_wm_space_text(C)->live_edit)
+ if (CTX_wm_space_text(C)->live_edit)
text_run_script(C, NULL);
return OPERATOR_FINISHED;
@@ -885,13 +885,13 @@ static int text_cut_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_cut(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Cut";
- ot->idname= "TEXT_OT_cut";
- ot->description= "Cut selected text to clipboard";
+ ot->name = "Cut";
+ ot->idname = "TEXT_OT_cut";
+ ot->description = "Cut selected text to clipboard";
/* api callbacks */
- ot->exec= text_cut_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_cut_exec;
+ ot->poll = text_edit_poll;
}
/******************* indent operator *********************/
@@ -902,7 +902,7 @@ static int text_indent_exec(bContext *C, wmOperator *UNUSED(op))
text_drawcache_tag_update(CTX_wm_space_text(C), 0);
- if(txt_has_sel(text)) {
+ if (txt_has_sel(text)) {
txt_order_cursors(text);
txt_indent(text);
}
@@ -920,13 +920,13 @@ static int text_indent_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_indent(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Indent";
- ot->idname= "TEXT_OT_indent";
- ot->description= "Indent selected text";
+ ot->name = "Indent";
+ ot->idname = "TEXT_OT_indent";
+ ot->description = "Indent selected text";
/* api callbacks */
- ot->exec= text_indent_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_indent_exec;
+ ot->poll = text_edit_poll;
}
/******************* unindent operator *********************/
@@ -935,7 +935,7 @@ static int text_unindent_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
- if(txt_has_sel(text)) {
+ if (txt_has_sel(text)) {
text_drawcache_tag_update(CTX_wm_space_text(C), 0);
txt_order_cursors(text);
@@ -955,13 +955,13 @@ static int text_unindent_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_unindent(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Unindent";
- ot->idname= "TEXT_OT_unindent";
- ot->description= "Unindent selected text";
+ ot->name = "Unindent";
+ ot->idname = "TEXT_OT_unindent";
+ ot->description = "Unindent selected text";
/* api callbacks */
- ot->exec= text_unindent_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_unindent_exec;
+ ot->poll = text_edit_poll;
}
/******************* line break operator *********************/
@@ -979,16 +979,17 @@ static int text_line_break_exec(bContext *C, wmOperator *UNUSED(op))
curts= setcurr_tab_spaces(text, space);
txt_split_curline(text);
- for(a=0; a < curts; a++) {
+ for (a=0; a < curts; a++) {
if (text->flags & TXT_TABSTOSPACES) {
txt_add_char(text, ' ');
- } else {
+ }
+ else {
txt_add_char(text, '\t');
}
}
- if(text->curl) {
- if(text->curl->prev)
+ if (text->curl) {
+ if (text->curl->prev)
text_update_line_edited(text->curl->prev);
text_update_line_edited(text->curl);
}
@@ -1002,13 +1003,13 @@ static int text_line_break_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_line_break(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Line Break";
- ot->idname= "TEXT_OT_line_break";
- ot->description= "Insert line break at cursor position";
+ ot->name = "Line Break";
+ ot->idname = "TEXT_OT_line_break";
+ ot->description = "Insert line break at cursor position";
/* api callbacks */
- ot->exec= text_line_break_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_line_break_exec;
+ ot->poll = text_edit_poll;
}
/******************* comment operator *********************/
@@ -1017,7 +1018,7 @@ static int text_comment_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
- if(txt_has_sel(text)) {
+ if (txt_has_sel(text)) {
text_drawcache_tag_update(CTX_wm_space_text(C), 0);
txt_order_cursors(text);
@@ -1035,13 +1036,13 @@ static int text_comment_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_comment(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Comment";
- ot->idname= "TEXT_OT_comment";
- ot->description= "Convert selected text to comment";
+ ot->name = "Comment";
+ ot->idname = "TEXT_OT_comment";
+ ot->description = "Convert selected text to comment";
/* api callbacks */
- ot->exec= text_comment_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_comment_exec;
+ ot->poll = text_edit_poll;
}
/******************* uncomment operator *********************/
@@ -1050,7 +1051,7 @@ static int text_uncomment_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
- if(txt_has_sel(text)) {
+ if (txt_has_sel(text)) {
text_drawcache_tag_update(CTX_wm_space_text(C), 0);
txt_order_cursors(text);
@@ -1069,13 +1070,13 @@ static int text_uncomment_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_uncomment(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Uncomment";
- ot->idname= "TEXT_OT_uncomment";
- ot->description= "Convert selected comment to text";
+ ot->name = "Uncomment";
+ ot->idname = "TEXT_OT_uncomment";
+ ot->description = "Convert selected comment to text";
/* api callbacks */
- ot->exec= text_uncomment_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_uncomment_exec;
+ ot->poll = text_edit_poll;
}
/******************* convert whitespace operator *********************/
@@ -1100,16 +1101,16 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op)
tmp = text->lines.first;
//first convert to all space, this make it a lot easier to convert to tabs because there is no mixtures of ' ' && '\t'
- while(tmp) {
+ while (tmp) {
text_check_line = tmp->line;
number = flatten_string(st, &fs, text_check_line)+1;
flatten_string_free(&fs);
new_line = MEM_callocN(number, "Converted_Line");
j = 0;
- for(a=0; a < strlen(text_check_line); a++) { //foreach char in line
- if(text_check_line[a] == '\t') { //checking for tabs
+ for (a=0; a < strlen(text_check_line); a++) { //foreach char in line
+ if (text_check_line[a] == '\t') { //checking for tabs
//get the number of spaces this tabs is showing
- //i dont like doing it this way but will look into it later
+ //i don't like doing it this way but will look into it later
new_line[j] = '\0';
number = flatten_string(st, &fs, new_line);
flatten_string_free(&fs);
@@ -1118,7 +1119,7 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op)
number = flatten_string(st, &fs, new_line)-number;
flatten_string_free(&fs);
- for(extra = 0; extra < number; extra++) {
+ for (extra = 0; extra < number; extra++) {
new_line[j] = ' ';
j++;
}
@@ -1130,8 +1131,8 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op)
}
new_line[j] = '\0';
// put new_line in the tmp->line spot still need to try and set the curc correctly
- if(tmp->line) MEM_freeN(tmp->line);
- if(tmp->format) MEM_freeN(tmp->format);
+ if (tmp->line) MEM_freeN(tmp->line);
+ if (tmp->format) MEM_freeN(tmp->format);
tmp->line = new_line;
tmp->len = strlen(new_line);
@@ -1143,38 +1144,38 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op)
//start over from the beginning
tmp = text->lines.first;
- while(tmp) {
+ while (tmp) {
text_check_line = tmp->line;
extra = 0;
- for(a = 0; a < strlen(text_check_line); a++) {
+ for (a = 0; a < strlen(text_check_line); a++) {
number = 0;
- for(j = 0; j < (size_t)st->tabnumber; j++) {
- if((a+j) <= strlen(text_check_line)) { //check to make sure we are not pass the end of the line
- if(text_check_line[a+j] != ' ') {
+ for (j = 0; j < (size_t)st->tabnumber; j++) {
+ if ((a+j) <= strlen(text_check_line)) { //check to make sure we are not pass the end of the line
+ if (text_check_line[a+j] != ' ') {
number = 1;
}
}
}
- if(!number) { //found all number of space to equal a tab
+ if (!number) { //found all number of space to equal a tab
a = a+(st->tabnumber-1);
extra = extra+1;
}
}
- if( extra > 0 ) { //got tabs make malloc and do what you have to do
+ if ( extra > 0 ) { //got tabs make malloc and do what you have to do
new_line = MEM_callocN(strlen(text_check_line)-(((st->tabnumber*extra)-extra)-1), "Converted_Line");
extra = 0; //reuse vars
- for(a = 0; a < strlen(text_check_line); a++) {
+ for (a = 0; a < strlen(text_check_line); a++) {
number = 0;
- for(j = 0; j < (size_t)st->tabnumber; j++) {
- if((a+j) <= strlen(text_check_line)) { //check to make sure we are not pass the end of the line
- if(text_check_line[a+j] != ' ') {
+ for (j = 0; j < (size_t)st->tabnumber; j++) {
+ if ((a+j) <= strlen(text_check_line)) { //check to make sure we are not pass the end of the line
+ if (text_check_line[a+j] != ' ') {
number = 1;
}
}
}
- if(!number) { //found all number of space to equal a tab
+ if (!number) { //found all number of space to equal a tab
new_line[extra] = '\t';
a = a+(st->tabnumber-1);
++extra;
@@ -1187,8 +1188,8 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op)
}
new_line[extra] = '\0';
// put new_line in the tmp->line spot still need to try and set the curc correctly
- if(tmp->line) MEM_freeN(tmp->line);
- if(tmp->format) MEM_freeN(tmp->format);
+ if (tmp->line) MEM_freeN(tmp->line);
+ if (tmp->format) MEM_freeN(tmp->format);
tmp->line = new_line;
tmp->len = strlen(new_line);
@@ -1209,13 +1210,13 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op)
void TEXT_OT_convert_whitespace(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Convert Whitespace";
- ot->idname= "TEXT_OT_convert_whitespace";
- ot->description= "Convert whitespaces by type";
+ ot->name = "Convert Whitespace";
+ ot->idname = "TEXT_OT_convert_whitespace";
+ ot->description = "Convert whitespaces by type";
/* api callbacks */
- ot->exec= text_convert_whitespace_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_convert_whitespace_exec;
+ ot->poll = text_edit_poll;
/* properties */
RNA_def_enum(ot->srna, "type", whitespace_type_items, TO_SPACES, "Type", "Type of whitespace to convert to");
@@ -1238,13 +1239,13 @@ static int text_select_all_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select All";
- ot->idname= "TEXT_OT_select_all";
- ot->description= "Select all text";
+ ot->name = "Select All";
+ ot->idname = "TEXT_OT_select_all";
+ ot->description = "Select all text";
/* api callbacks */
- ot->exec= text_select_all_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_select_all_exec;
+ ot->poll = text_edit_poll;
}
/******************* select line operator *********************/
@@ -1264,13 +1265,13 @@ static int text_select_line_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_select_line(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Line";
- ot->idname= "TEXT_OT_select_line";
- ot->description= "Select text by line";
+ ot->name = "Select Line";
+ ot->idname = "TEXT_OT_select_line";
+ ot->description = "Select text by line";
/* api callbacks */
- ot->exec= text_select_line_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_select_line_exec;
+ ot->poll = text_edit_poll;
}
/******************* select word operator *********************/
@@ -1291,13 +1292,13 @@ static int text_select_word_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_select_word(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Word";
- ot->idname= "TEXT_OT_select_word";
- ot->description= "Select word under cursor";
+ ot->name = "Select Word";
+ ot->idname = "TEXT_OT_select_word";
+ ot->description = "Select word under cursor";
/* api callbacks */
- ot->exec= text_select_word_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_select_word_exec;
+ ot->poll = text_edit_poll;
}
/******************* previous marker operator *********************/
@@ -1310,10 +1311,10 @@ static int text_previous_marker_exec(bContext *C, wmOperator *UNUSED(op))
lineno= txt_get_span(text->lines.first, text->curl);
mrk= text->markers.last;
- while(mrk && (mrk->lineno>lineno || (mrk->lineno==lineno && mrk->end > text->curc)))
+ while (mrk && (mrk->lineno>lineno || (mrk->lineno==lineno && mrk->end > text->curc)))
mrk= mrk->prev;
- if(!mrk) mrk= text->markers.last;
- if(mrk) {
+ if (!mrk) mrk= text->markers.last;
+ if (mrk) {
txt_move_to(text, mrk->lineno, mrk->start, 0);
txt_move_to(text, mrk->lineno, mrk->end, 1);
}
@@ -1327,13 +1328,13 @@ static int text_previous_marker_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_previous_marker(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Previous Marker";
- ot->idname= "TEXT_OT_previous_marker";
- ot->description= "Move to previous marker";
+ ot->name = "Previous Marker";
+ ot->idname = "TEXT_OT_previous_marker";
+ ot->description = "Move to previous marker";
/* api callbacks */
- ot->exec= text_previous_marker_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_previous_marker_exec;
+ ot->poll = text_edit_poll;
}
/******************* next marker operator *********************/
@@ -1346,10 +1347,10 @@ static int text_next_marker_exec(bContext *C, wmOperator *UNUSED(op))
lineno= txt_get_span(text->lines.first, text->curl);
mrk= text->markers.first;
- while(mrk && (mrk->lineno<lineno || (mrk->lineno==lineno && mrk->start <= text->curc)))
+ while (mrk && (mrk->lineno<lineno || (mrk->lineno==lineno && mrk->start <= text->curc)))
mrk= mrk->next;
- if(!mrk) mrk= text->markers.first;
- if(mrk) {
+ if (!mrk) mrk= text->markers.first;
+ if (mrk) {
txt_move_to(text, mrk->lineno, mrk->start, 0);
txt_move_to(text, mrk->lineno, mrk->end, 1);
}
@@ -1363,13 +1364,13 @@ static int text_next_marker_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_next_marker(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Next Marker";
- ot->idname= "TEXT_OT_next_marker";
- ot->description= "Move to next marker";
+ ot->name = "Next Marker";
+ ot->idname = "TEXT_OT_next_marker";
+ ot->description = "Move to next marker";
/* api callbacks */
- ot->exec= text_next_marker_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_next_marker_exec;
+ ot->poll = text_edit_poll;
}
/******************* clear all markers operator *********************/
@@ -1389,13 +1390,13 @@ static int text_clear_all_markers_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_markers_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear All Markers";
- ot->idname= "TEXT_OT_markers_clear";
- ot->description= "Clear all markers";
+ ot->name = "Clear All Markers";
+ ot->idname = "TEXT_OT_markers_clear";
+ ot->description = "Clear all markers";
/* api callbacks */
- ot->exec= text_clear_all_markers_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_clear_all_markers_exec;
+ ot->poll = text_edit_poll;
}
/************************ move operator ************************/
@@ -1427,60 +1428,60 @@ static int text_get_cursor_rel(SpaceText* st, ARegion *ar, TextLine *linein, int
end= max;
chop= loop= 1;
- for(i=0, j=0; loop; j+=BLI_str_utf8_size(linein->line+j)) {
+ for (i=0, j=0; loop; j+=BLI_str_utf8_size(linein->line+j)) {
int chars;
/* Mimic replacement of tabs */
ch= linein->line[j];
- if(ch=='\t') {
+ if (ch=='\t') {
chars= st->tabnumber-i%st->tabnumber;
ch= ' ';
}
else chars= 1;
- while(chars--) {
- if(rell==0 && i-start==relc) {
+ while (chars--) {
+ if (rell==0 && i-start==relc) {
/* current position could be wrapped to next line */
/* this should be checked when end of current line would be reached */
selc= j;
found= 1;
}
- else if(i-end==relc) {
+ else if (i-end==relc) {
curs= j;
}
- if(i-start>=max) {
- if(found) {
+ if (i-start>=max) {
+ if (found) {
/* exact cursor position was found, check if it's */
/* still on needed line (hasn't been wrapped) */
- if(selc>endj && !chop) selc= endj;
+ if (selc>endj && !chop) selc= endj;
loop= 0;
break;
}
- if(chop) endj= j;
+ if (chop) endj= j;
start= end;
end += max;
chop= 1;
rell--;
- if(rell==0 && i-start>=relc) {
+ if (rell==0 && i-start>=relc) {
selc= curs;
loop= 0;
break;
}
}
else if (ch=='\0') {
- if(!found) selc= linein->len;
+ if (!found) selc= linein->len;
loop= 0;
break;
}
- else if(ch==' ' || ch=='-') {
- if(found) {
+ else if (ch==' ' || ch=='-') {
+ if (found) {
loop= 0;
break;
}
- if(rell==0 && i-start>=relc) {
+ if (rell==0 && i-start>=relc) {
selc= curs;
loop= 0;
break;
@@ -1506,12 +1507,12 @@ static int cursor_skip_find_line(SpaceText* st, ARegion *ar,
*rell= lines;
/* handle current line */
- if(lines>0) {
+ if (lines>0) {
visible_lines= text_get_visible_lines(st, ar, (*linep)->line);
- if(*rell-visible_lines+offl>=0) {
- if(!(*linep)->next) {
- if(offl < visible_lines-1) {
+ if (*rell-visible_lines+offl>=0) {
+ if (!(*linep)->next) {
+ if (offl < visible_lines-1) {
*rell= visible_lines-1;
return 1;
}
@@ -1522,14 +1523,16 @@ static int cursor_skip_find_line(SpaceText* st, ARegion *ar,
*rell-= visible_lines-offl;
*linep=(*linep)->next;
- } else {
+ }
+ else {
*rell+= offl;
return 1;
}
- } else {
- if(*rell+offl<=0) {
- if(!(*linep)->prev) {
- if(offl) {
+ }
+ else {
+ if (*rell+offl<=0) {
+ if (!(*linep)->prev) {
+ if (offl) {
*rell= 0;
return 1;
}
@@ -1540,33 +1543,35 @@ static int cursor_skip_find_line(SpaceText* st, ARegion *ar,
*rell+= offl;
*linep=(*linep)->prev;
- } else {
+ }
+ else {
*rell+= offl;
return 1;
}
}
/* skip lines and find destination line and offsets */
- while(*linep) {
+ while (*linep) {
visible_lines= text_get_visible_lines(st, ar, (*linep)->line);
- if(lines<0) { /* moving top */
- if(*rell+visible_lines >= 0) {
+ if (lines<0) { /* moving top */
+ if (*rell+visible_lines >= 0) {
*rell+= visible_lines;
break;
}
- if(!(*linep)->prev) {
+ if (!(*linep)->prev) {
*rell= 0;
break;
}
*rell+= visible_lines;
*linep=(*linep)->prev;
- } else { /* moving bottom */
- if(*rell-visible_lines < 0) break;
+ }
+ else { /* moving bottom */
+ if (*rell-visible_lines < 0) break;
- if(!(*linep)->next) {
+ if (!(*linep)->next) {
*rell= visible_lines-1;
break;
}
@@ -1602,34 +1607,34 @@ static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
chop= loop= 1;
*charp= 0;
- for(i=0, j=0; loop; j+=BLI_str_utf8_size((*linep)->line+j)) {
+ for (i=0, j=0; loop; j+=BLI_str_utf8_size((*linep)->line+j)) {
int chars;
/* Mimic replacement of tabs */
ch= (*linep)->line[j];
- if(ch=='\t') {
+ if (ch=='\t') {
chars= st->tabnumber-i%st->tabnumber;
ch= ' ';
}
else chars= 1;
- while(chars--) {
- if(i-start>=max) {
+ while (chars--) {
+ if (i-start>=max) {
*charp= endj;
- if(j>=oldc) {
- if(ch=='\0') *charp= txt_utf8_index_to_offset((*linep)->line, start);
+ if (j>=oldc) {
+ if (ch=='\0') *charp= txt_utf8_index_to_offset((*linep)->line, start);
loop= 0;
break;
}
- if(chop) endj= j;
+ if (chop) endj= j;
start= end;
end += max;
chop= 1;
}
- else if(ch==' ' || ch=='-' || ch=='\0') {
- if(j>=oldc) {
+ else if (ch==' ' || ch=='-' || ch=='\0') {
+ if (j>=oldc) {
*charp= txt_utf8_index_to_offset((*linep)->line, start);
loop= 0;
break;
@@ -1670,22 +1675,22 @@ static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
chop= loop= 1;
*charp= 0;
- for(i=0, j=0; loop; j+=BLI_str_utf8_size((*linep)->line+j)) {
+ for (i=0, j=0; loop; j+=BLI_str_utf8_size((*linep)->line+j)) {
int chars;
/* Mimic replacement of tabs */
ch= (*linep)->line[j];
- if(ch=='\t') {
+ if (ch=='\t') {
chars= st->tabnumber-i%st->tabnumber;
ch= ' ';
}
else chars= 1;
- while(chars--) {
- if(i-start>=max) {
- if(chop) endj= BLI_str_prev_char_utf8((*linep)->line+j)-(*linep)->line;
+ while (chars--) {
+ if (i-start>=max) {
+ if (chop) endj= BLI_str_prev_char_utf8((*linep)->line+j)-(*linep)->line;
- if(endj>=oldc) {
- if(ch=='\0') *charp= (*linep)->len;
+ if (endj>=oldc) {
+ if (ch=='\0') *charp= (*linep)->len;
else *charp= endj;
loop= 0;
break;
@@ -1694,11 +1699,13 @@ static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
start= end;
end += max;
chop= 1;
- } else if(ch=='\0') {
+ }
+ else if (ch=='\0') {
*charp= (*linep)->len;
loop= 0;
break;
- } else if(ch==' ' || ch=='-') {
+ }
+ else if (ch==' ' || ch=='-') {
end= i+1;
endj= j;
chop= 0;
@@ -1729,18 +1736,20 @@ static void txt_wrap_move_up(SpaceText *st, ARegion *ar, short sel)
wrap_offset_in_line(st, ar, *linep, *charp, &offl, &offc);
col= text_get_char_pos(st, (*linep)->line, *charp) + offc;
- if(offl) {
+ if (offl) {
*charp= text_get_cursor_rel(st, ar, *linep, offl-1, col);
newl= BLI_findindex(&text->lines, linep);
- } else {
- if((*linep)->prev) {
+ }
+ else {
+ if ((*linep)->prev) {
int visible_lines;
*linep= (*linep)->prev;
visible_lines= text_get_visible_lines(st, ar, (*linep)->line);
*charp= text_get_cursor_rel(st, ar, *linep, visible_lines-1, col);
newl--;
- } else *charp= 0;
+ }
+ else *charp= 0;
}
if (!sel) txt_pop_sel(text);
@@ -1766,15 +1775,17 @@ static void txt_wrap_move_down(SpaceText *st, ARegion *ar, short sel)
wrap_offset_in_line(st, ar, *linep, *charp, &offl, &offc);
col= text_get_char_pos(st, (*linep)->line, *charp) + offc;
visible_lines= text_get_visible_lines(st, ar, (*linep)->line);
- if(offl<visible_lines-1) {
+ if (offl<visible_lines-1) {
*charp= text_get_cursor_rel(st, ar, *linep, offl+1, col);
newl= BLI_findindex(&text->lines, linep);
- } else {
- if((*linep)->next) {
+ }
+ else {
+ if ((*linep)->next) {
*linep= (*linep)->next;
*charp= text_get_cursor_rel(st, ar, *linep, 0, col);
newl++;
- } else *charp= (*linep)->len;
+ }
+ else *charp= (*linep)->len;
}
if (!sel) txt_pop_sel(text);
@@ -1797,13 +1808,14 @@ static void cursor_skip(SpaceText* st, ARegion *ar, Text *text, int lines, int s
oldl= txt_get_span(text->lines.first, *linep);
oldc= *charp;
- if(st && ar && st->wordwrap) {
+ if (st && ar && st->wordwrap) {
int rell, relc;
/* find line and offsets inside it needed to set cursor position */
- if(cursor_skip_find_line(st, ar, lines, linep, charp, &rell, &relc))
+ if (cursor_skip_find_line(st, ar, lines, linep, charp, &rell, &relc))
*charp= text_get_cursor_rel (st, ar, *linep, rell, relc);
- } else {
+ }
+ else {
while (lines>0 && (*linep)->next) {
*linep= (*linep)->next;
lines--;
@@ -1827,17 +1839,17 @@ static int text_move_cursor(bContext *C, int type, int select)
ARegion *ar= CTX_wm_region(C);
/* ensure we have the right region, it's optional */
- if(ar && ar->regiontype != RGN_TYPE_WINDOW)
+ if (ar && ar->regiontype != RGN_TYPE_WINDOW)
ar= NULL;
switch(type) {
case LINE_BEGIN:
- if(st && st->wordwrap && ar) txt_wrap_move_bol(st, ar, select);
+ if (st && st->wordwrap && ar) txt_wrap_move_bol(st, ar, select);
else txt_move_bol(text, select);
break;
case LINE_END:
- if(st && st->wordwrap && ar) txt_wrap_move_eol(st, ar, select);
+ if (st && st->wordwrap && ar) txt_wrap_move_eol(st, ar, select);
else txt_move_eol(text, select);
break;
@@ -1866,22 +1878,22 @@ static int text_move_cursor(bContext *C, int type, int select)
break;
case PREV_LINE:
- if(st && st->wordwrap && ar) txt_wrap_move_up(st, ar, select);
+ if (st && st->wordwrap && ar) txt_wrap_move_up(st, ar, select);
else txt_move_up(text, select);
break;
case NEXT_LINE:
- if(st && st->wordwrap && ar) txt_wrap_move_down(st, ar, select);
+ if (st && st->wordwrap && ar) txt_wrap_move_down(st, ar, select);
else txt_move_down(text, select);
break;
case PREV_PAGE:
- if(st) cursor_skip(st, ar, st->text, -st->viewlines, select);
+ if (st) cursor_skip(st, ar, st->text, -st->viewlines, select);
else cursor_skip(NULL, NULL, text, -10, select);
break;
case NEXT_PAGE:
- if(st) cursor_skip(st, ar, st->text, st->viewlines, select);
+ if (st) cursor_skip(st, ar, st->text, st->viewlines, select);
else cursor_skip(NULL, NULL, text, 10, select);
break;
}
@@ -1902,13 +1914,13 @@ static int text_move_exec(bContext *C, wmOperator *op)
void TEXT_OT_move(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Cursor";
- ot->idname= "TEXT_OT_move";
- ot->description= "Move cursor to position type";
+ ot->name = "Move Cursor";
+ ot->idname = "TEXT_OT_move";
+ ot->description = "Move cursor to position type";
/* api callbacks */
- ot->exec= text_move_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_move_exec;
+ ot->poll = text_edit_poll;
/* properties */
RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to");
@@ -1926,13 +1938,13 @@ static int text_move_select_exec(bContext *C, wmOperator *op)
void TEXT_OT_move_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move Select";
- ot->idname= "TEXT_OT_move_select";
- ot->description= "Make selection from current cursor position to new cursor position type";
+ ot->name = "Move Select";
+ ot->idname = "TEXT_OT_move_select";
+ ot->description = "Make selection from current cursor position to new cursor position type";
/* api callbacks */
- ot->exec= text_move_select_exec;
- ot->poll= text_space_edit_poll;
+ ot->exec = text_move_select_exec;
+ ot->poll = text_space_edit_poll;
/* properties */
RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to, to make a selection");
@@ -1946,9 +1958,9 @@ static int text_jump_exec(bContext *C, wmOperator *op)
int line= RNA_int_get(op->ptr, "line");
short nlines= txt_get_span(text->lines.first, text->lines.last)+1;
- if(line < 1)
+ if (line < 1)
txt_move_toline(text, 1, 0);
- else if(line > nlines)
+ else if (line > nlines)
txt_move_toline(text, nlines-1, 0);
else
txt_move_toline(text, line-1, 0);
@@ -1968,14 +1980,14 @@ static int text_jump_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void TEXT_OT_jump(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Jump";
- ot->idname= "TEXT_OT_jump";
- ot->description= "Jump cursor to line";
+ ot->name = "Jump";
+ ot->idname = "TEXT_OT_jump";
+ ot->description = "Jump cursor to line";
/* api callbacks */
- ot->invoke= text_jump_invoke;
- ot->exec= text_jump_exec;
- ot->poll= text_edit_poll;
+ ot->invoke = text_jump_invoke;
+ ot->exec = text_jump_exec;
+ ot->poll = text_edit_poll;
/* properties */
RNA_def_int(ot->srna, "line", 1, 1, INT_MAX, "Line", "Line number to jump to", 1, 10000);
@@ -1997,13 +2009,13 @@ static int text_delete_exec(bContext *C, wmOperator *op)
text_drawcache_tag_update(CTX_wm_space_text(C), 0);
- if(type == DEL_PREV_WORD)
+ if (type == DEL_PREV_WORD)
txt_backspace_word(text);
- else if(type == DEL_PREV_CHAR)
+ else if (type == DEL_PREV_CHAR)
txt_backspace_char(text);
- else if(type == DEL_NEXT_WORD)
+ else if (type == DEL_NEXT_WORD)
txt_delete_word(text);
- else if(type == DEL_NEXT_CHAR)
+ else if (type == DEL_NEXT_CHAR)
txt_delete_char(text);
text_update_line_edited(text->curl);
@@ -2012,7 +2024,7 @@ static int text_delete_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text);
/* run the script while editing, evil but useful */
- if(CTX_wm_space_text(C)->live_edit)
+ if (CTX_wm_space_text(C)->live_edit)
text_run_script(C, NULL);
return OPERATOR_FINISHED;
@@ -2021,13 +2033,13 @@ static int text_delete_exec(bContext *C, wmOperator *op)
void TEXT_OT_delete(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Delete";
- ot->idname= "TEXT_OT_delete";
- ot->description= "Delete text by cursor position";
+ ot->name = "Delete";
+ ot->idname = "TEXT_OT_delete";
+ ot->description = "Delete text by cursor position";
/* api callbacks */
- ot->exec= text_delete_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_delete_exec;
+ ot->poll = text_edit_poll;
/* properties */
RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete");
@@ -2049,13 +2061,13 @@ static int text_toggle_overwrite_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_overwrite_toggle(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Toggle Overwrite";
- ot->idname= "TEXT_OT_overwrite_toggle";
- ot->description= "Toggle overwrite while typing";
+ ot->name = "Toggle Overwrite";
+ ot->idname = "TEXT_OT_overwrite_toggle";
+ ot->description = "Toggle overwrite while typing";
/* api callbacks */
- ot->exec= text_toggle_overwrite_exec;
- ot->poll= text_space_edit_poll;
+ ot->exec = text_toggle_overwrite_exec;
+ ot->poll = text_space_edit_poll;
}
/******************* scroll operator **********************/
@@ -2070,8 +2082,8 @@ static void txt_screen_skip(SpaceText *st, ARegion *ar, int lines)
last= text_get_total_lines(st, ar);
last= last - (st->viewlines/2);
- if(st->top>last) st->top= last;
- if(st->top<0) st->top= 0;
+ if (st->top>last) st->top= last;
+ if (st->top<0) st->top= 0;
}
/* quick enum for tsc->zone (scroller handles) */
@@ -2104,7 +2116,7 @@ static int text_scroll_exec(bContext *C, wmOperator *op)
int lines= RNA_int_get(op->ptr, "lines");
- if(lines == 0)
+ if (lines == 0)
return OPERATOR_CANCELLED;
txt_screen_skip(st, ar, lines*U.wheellinescroll);
@@ -2124,7 +2136,7 @@ static void text_scroll_apply(bContext *C, wmOperator *op, wmEvent *event)
text_update_character_width(st);
- if(tsc->first) {
+ if (tsc->first) {
tsc->old[0]= mval[0];
tsc->old[1]= mval[1];
tsc->first= 0;
@@ -2133,7 +2145,7 @@ static void text_scroll_apply(bContext *C, wmOperator *op, wmEvent *event)
tsc->delta[0]+= mval[0] - tsc->old[0];
tsc->delta[1]+= mval[1] - tsc->old[1];
- if(!tsc->scrollbar) {
+ if (!tsc->scrollbar) {
txtdelta[0]= -tsc->delta[0]/st->cwidth;
txtdelta[1]= tsc->delta[1]/st->lheight;
@@ -2145,15 +2157,15 @@ static void text_scroll_apply(bContext *C, wmOperator *op, wmEvent *event)
tsc->delta[1]+= txtdelta[1]/st->pix_per_line;
}
- if(txtdelta[0] || txtdelta[1]) {
+ if (txtdelta[0] || txtdelta[1]) {
txt_screen_skip(st, ar, txtdelta[1]);
- if(st->wordwrap) {
+ if (st->wordwrap) {
st->left= 0;
}
else {
st->left+= txtdelta[0];
- if(st->left<0) st->left= 0;
+ if (st->left<0) st->left= 0;
}
ED_area_tag_redraw(CTX_wm_area(C));
@@ -2179,13 +2191,13 @@ static int text_scroll_modal(bContext *C, wmOperator *op, wmEvent *event)
switch(event->type) {
case MOUSEMOVE:
- if(tsc->zone == SCROLLHANDLE_BAR)
+ if (tsc->zone == SCROLLHANDLE_BAR)
text_scroll_apply(C, op, event);
break;
case LEFTMOUSE:
case RIGHTMOUSE:
case MIDDLEMOUSE:
- if(ELEM(tsc->zone, SCROLLHANDLE_MIN_OUTSIDE, SCROLLHANDLE_MAX_OUTSIDE)) {
+ if (ELEM(tsc->zone, SCROLLHANDLE_MIN_OUTSIDE, SCROLLHANDLE_MAX_OUTSIDE)) {
int last;
st->top+= st->viewlines * (tsc->zone==SCROLLHANDLE_MIN_OUTSIDE ? 1 : -1);
@@ -2216,7 +2228,7 @@ static int text_scroll_invoke(bContext *C, wmOperator *op, wmEvent *event)
SpaceText *st= CTX_wm_space_text(C);
TextScroll *tsc;
- if(RNA_struct_property_is_set(op->ptr, "lines"))
+ if (RNA_struct_property_is_set(op->ptr, "lines"))
return text_scroll_exec(C, op);
tsc= MEM_callocN(sizeof(TextScroll), "TextScroll");
@@ -2249,22 +2261,22 @@ static int text_scroll_invoke(bContext *C, wmOperator *op, wmEvent *event)
void TEXT_OT_scroll(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Scroll";
+ ot->name = "Scroll";
/* don't really see the difference between this and
* scroll_bar. Both do basically the same thing (aside
* from keymaps).*/
- ot->idname= "TEXT_OT_scroll";
- ot->description= "Scroll text screen";
+ ot->idname = "TEXT_OT_scroll";
+ ot->description = "Scroll text screen";
/* api callbacks */
- ot->exec= text_scroll_exec;
- ot->invoke= text_scroll_invoke;
- ot->modal= text_scroll_modal;
- ot->cancel= text_scroll_cancel;
- ot->poll= text_scroll_poll;
+ ot->exec = text_scroll_exec;
+ ot->invoke = text_scroll_invoke;
+ ot->modal = text_scroll_modal;
+ ot->cancel = text_scroll_cancel;
+ ot->poll = text_scroll_poll;
/* flags */
- ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
+ ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
/* properties */
RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll", -100, 100);
@@ -2279,10 +2291,10 @@ static int text_region_scroll_poll(bContext *C)
Text *text= CTX_data_edit_text(C);
ARegion *ar= CTX_wm_region(C);
- if(!st || !text)
+ if (!st || !text)
return 0;
- if(!ar || ar->regiontype != RGN_TYPE_WINDOW)
+ if (!ar || ar->regiontype != RGN_TYPE_WINDOW)
return 0;
return 1;
@@ -2296,22 +2308,22 @@ static int text_scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event)
const int *mval= event->mval;
int zone= -1;
- if(RNA_struct_property_is_set(op->ptr, "lines"))
+ if (RNA_struct_property_is_set(op->ptr, "lines"))
return text_scroll_exec(C, op);
/* verify we are in the right zone */
- if(mval[0]>st->txtbar.xmin && mval[0]<st->txtbar.xmax) {
- if(mval[1]>=st->txtbar.ymin && mval[1]<=st->txtbar.ymax) {
+ if (mval[0]>st->txtbar.xmin && mval[0]<st->txtbar.xmax) {
+ if (mval[1]>=st->txtbar.ymin && mval[1]<=st->txtbar.ymax) {
/* mouse inside scroll handle */
zone = SCROLLHANDLE_BAR;
}
- else if(mval[1]>TXT_SCROLL_SPACE && mval[1]<ar->winy-TXT_SCROLL_SPACE) {
- if(mval[1]<st->txtbar.ymin) zone= SCROLLHANDLE_MIN_OUTSIDE;
+ else if (mval[1]>TXT_SCROLL_SPACE && mval[1]<ar->winy-TXT_SCROLL_SPACE) {
+ if (mval[1]<st->txtbar.ymin) zone= SCROLLHANDLE_MIN_OUTSIDE;
else zone= SCROLLHANDLE_MAX_OUTSIDE;
}
}
- if(zone == -1) {
+ if (zone == -1) {
/* we are outside slider - nothing to do */
return OPERATOR_PASS_THROUGH;
}
@@ -2343,21 +2355,21 @@ static int text_scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event)
void TEXT_OT_scroll_bar(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Scrollbar";
+ ot->name = "Scrollbar";
/* don't really see the difference between this and
* scroll. Both do basically the same thing (aside
* from keymaps).*/
- ot->idname= "TEXT_OT_scroll_bar";
- ot->description= "Scroll text screen";
+ ot->idname = "TEXT_OT_scroll_bar";
+ ot->description = "Scroll text screen";
/* api callbacks */
- ot->invoke= text_scroll_bar_invoke;
- ot->modal= text_scroll_modal;
- ot->cancel= text_scroll_cancel;
- ot->poll= text_region_scroll_poll;
+ ot->invoke = text_scroll_bar_invoke;
+ ot->modal = text_scroll_modal;
+ ot->cancel = text_scroll_cancel;
+ ot->poll = text_region_scroll_poll;
/* flags */
- ot->flag= OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING;
/* properties */
RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll", -100, 100);
@@ -2375,8 +2387,8 @@ static int flatten_len(SpaceText *st, const char *str)
{
int i, total = 0;
- for(i = 0; str[i]; i += BLI_str_utf8_size(str+i)) {
- if(str[i]=='\t') {
+ for (i = 0; str[i]; i += BLI_str_utf8_size(str+i)) {
+ if (str[i]=='\t') {
total += st->tabnumber - total%st->tabnumber;
}
else total++;
@@ -2389,7 +2401,7 @@ static int flatten_index_to_offset(SpaceText *st, const char *str, int index)
{
int i, j;
for (i= 0, j= 0; i < index; j += BLI_str_utf8_size(str+j))
- if(str[j]=='\t')
+ if (str[j]=='\t')
i += st->tabnumber - i%st->tabnumber;
else
i++;
@@ -2407,7 +2419,8 @@ static TextLine *get_first_visible_line(SpaceText *st, ARegion *ar, int *y)
if (i-lines < 0) {
*y += i;
break;
- } else {
+ }
+ else {
linep = linep->next;
i -= lines;
}
@@ -2426,7 +2439,7 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in
/* Point to first visible line */
TextLine *linep = get_first_visible_line(st, ar, &y);
- while(loop && linep) {
+ while (loop && linep) {
int i = 0, start = 0, end = max; /* view */
int j = 0, curs = 0, endj = 0; /* mem */
int chop = 1; /* flags */
@@ -2436,7 +2449,7 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in
/* Mimic replacement of tabs */
ch = linep->line[j];
- if(ch == '\t') {
+ if (ch == '\t') {
chars = st->tabnumber - i%st->tabnumber;
ch = ' ';
}
@@ -2457,7 +2470,7 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in
found = 1;
/* Prepare curs for next wrap */
}
- else if(i - end == x) {
+ else if (i - end == x) {
curs = j;
}
if (i - start >= max) {
@@ -2469,11 +2482,11 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in
break;
}
- if(chop) endj = j;
+ if (chop) endj = j;
start = end;
end += max;
- if(j < linep->len)
+ if (j < linep->len)
y--;
chop = 1;
@@ -2489,7 +2502,7 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in
break;
}
- if(y == 0 && i-start >= x) {
+ if (y == 0 && i-start >= x) {
charp = curs;
loop = 0;
break;
@@ -2501,12 +2514,12 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in
i++;
}
- if(ch == '\0') break;
+ if (ch == '\0') break;
}
- if(!loop || found) break;
+ if (!loop || found) break;
- if(!linep->next) {
+ if (!linep->next) {
charp = linep->len;
break;
}
@@ -2522,7 +2535,7 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in
}
if (linep && charp != -1) {
- if(sel) { text->sell = linep; text->selc = charp; }
+ if (sel) { text->sell = linep; text->selc = charp; }
else { text->curl = linep; text->curc = charp; }
}
}
@@ -2533,13 +2546,13 @@ static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, int
text_update_character_width(st);
y= (ar->winy - 2 - y)/st->lheight;
- if(st->showlinenrs) x-= TXT_OFFSET+TEXTXLOC;
+ if (st->showlinenrs) x-= TXT_OFFSET+TEXTXLOC;
else x-= TXT_OFFSET;
- if(x<0) x= 0;
+ if (x<0) x= 0;
x = text_pixel_x_to_index(st, x) + st->left;
- if(st->wordwrap) {
+ if (st->wordwrap) {
text_cursor_set_to_pos_wrapped(st, ar, x, y, sel);
}
else {
@@ -2547,24 +2560,24 @@ static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, int
int *charp;
int w;
- if(sel) { linep= &text->sell; charp= &text->selc; }
+ if (sel) { linep= &text->sell; charp= &text->selc; }
else { linep= &text->curl; charp= &text->curc; }
y-= txt_get_span(text->lines.first, *linep) - st->top;
- if(y>0) {
- while(y-- != 0) if((*linep)->next) *linep= (*linep)->next;
+ if (y>0) {
+ while (y-- != 0) if ((*linep)->next) *linep= (*linep)->next;
}
- else if(y<0) {
- while(y++ != 0) if((*linep)->prev) *linep= (*linep)->prev;
+ else if (y<0) {
+ while (y++ != 0) if ((*linep)->prev) *linep= (*linep)->prev;
}
w= flatten_len(st, (*linep)->line);
- if(x<w) *charp= flatten_index_to_offset(st, (*linep)->line, x);
+ if (x<w) *charp= flatten_index_to_offset(st, (*linep)->line, x);
else *charp= (*linep)->len;
}
- if(!sel) txt_pop_sel(text);
+ if (!sel) txt_pop_sel(text);
}
static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event)
@@ -2573,18 +2586,18 @@ static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event)
ARegion *ar= CTX_wm_region(C);
SetSelection *ssel= op->customdata;
- if(event->mval[1]<0 || event->mval[1]>ar->winy) {
+ if (event->mval[1]<0 || event->mval[1]>ar->winy) {
int d= (ssel->old[1]-event->mval[1])*st->pix_per_line;
- if(d) txt_screen_skip(st, ar, d);
+ if (d) txt_screen_skip(st, ar, d);
text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1]<0?0:ar->winy, 1);
text_update_cursor_moved(C);
WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text);
}
- else if(!st->wordwrap && (event->mval[0]<0 || event->mval[0]>ar->winx)) {
- if(event->mval[0]>ar->winx) st->left++;
- else if(event->mval[0]<0 && st->left>0) st->left--;
+ else if (!st->wordwrap && (event->mval[0]<0 || event->mval[0]>ar->winx)) {
+ if (event->mval[0]>ar->winx) st->left++;
+ else if (event->mval[0]<0 && st->left>0) st->left--;
text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1], 1);
@@ -2611,7 +2624,7 @@ static void text_cursor_set_exit(bContext *C, wmOperator *op)
int linep2, charp2;
char *buffer;
- if(txt_has_sel(text)) {
+ if (txt_has_sel(text)) {
buffer = txt_sel_to_buf(text);
WM_clipboard_text_set(buffer, 1);
MEM_freeN(buffer);
@@ -2620,7 +2633,7 @@ static void text_cursor_set_exit(bContext *C, wmOperator *op)
linep2= txt_get_span(st->text->lines.first, st->text->sell);
charp2= st->text->selc;
- if(ssel->sell!=linep2 || ssel->selc!=charp2)
+ if (ssel->sell!=linep2 || ssel->selc!=charp2)
txt_undo_add_toop(st->text, UNDO_STO, ssel->sell, ssel->selc, linep2, charp2);
text_update_cursor_moved(C);
@@ -2634,7 +2647,7 @@ static int text_set_selection_invoke(bContext *C, wmOperator *op, wmEvent *event
SpaceText *st= CTX_wm_space_text(C);
SetSelection *ssel;
- if(event->mval[0]>=st->txtbar.xmin)
+ if (event->mval[0]>=st->txtbar.xmin)
return OPERATOR_PASS_THROUGH;
op->customdata= MEM_callocN(sizeof(SetSelection), "SetCursor");
@@ -2679,15 +2692,15 @@ static int text_set_selection_cancel(bContext *C, wmOperator *op)
void TEXT_OT_selection_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Selection";
- ot->idname= "TEXT_OT_selection_set";
- ot->description= "Set cursor selection";
+ ot->name = "Set Selection";
+ ot->idname = "TEXT_OT_selection_set";
+ ot->description = "Set cursor selection";
/* api callbacks */
- ot->invoke= text_set_selection_invoke;
- ot->modal= text_set_selection_modal;
- ot->cancel= text_set_selection_cancel;
- ot->poll= text_region_edit_poll;
+ ot->invoke = text_set_selection_invoke;
+ ot->modal = text_set_selection_modal;
+ ot->cancel = text_set_selection_cancel;
+ ot->poll = text_region_edit_poll;
/* properties */
RNA_def_boolean(ot->srna, "select", 0, "Select", "Set selection end rather than cursor");
@@ -2721,7 +2734,7 @@ static int text_cursor_set_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceText *st= CTX_wm_space_text(C);
- if(event->mval[0]>=st->txtbar.xmin)
+ if (event->mval[0]>=st->txtbar.xmin)
return OPERATOR_PASS_THROUGH;
RNA_int_set(op->ptr, "x", event->mval[0]);
@@ -2733,14 +2746,14 @@ static int text_cursor_set_invoke(bContext *C, wmOperator *op, wmEvent *event)
void TEXT_OT_cursor_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Cursor";
- ot->idname= "TEXT_OT_cursor_set";
- ot->description= "Set cursor position";
+ ot->name = "Set Cursor";
+ ot->idname = "TEXT_OT_cursor_set";
+ ot->description = "Set cursor position";
/* api callbacks */
- ot->invoke= text_cursor_set_invoke;
- ot->exec= text_cursor_set_exec;
- ot->poll= text_region_edit_poll;
+ ot->invoke = text_cursor_set_invoke;
+ ot->exec = text_cursor_set_exec;
+ ot->poll = text_region_edit_poll;
/* properties */
RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
@@ -2761,17 +2774,17 @@ static int text_line_number_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
text_update_character_width(st);
- if(!st->showlinenrs)
+ if (!st->showlinenrs)
return OPERATOR_PASS_THROUGH;
- if(!(mval[0]>2 && mval[0]<(TXT_OFFSET + TEXTXLOC) && mval[1]>2 && mval[1]<ar->winy-2))
+ if (!(mval[0]>2 && mval[0]<(TXT_OFFSET + TEXTXLOC) && mval[1]>2 && mval[1]<ar->winy-2))
return OPERATOR_PASS_THROUGH;
- if(!(event->ascii>='0' && event->ascii<='9'))
+ if (!(event->ascii>='0' && event->ascii<='9'))
return OPERATOR_PASS_THROUGH;
time = PIL_check_seconds_timer();
- if(last_jump < time-1)
+ if (last_jump < time-1)
jump_to= 0;
jump_to *= 10;
@@ -2789,13 +2802,13 @@ static int text_line_number_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
void TEXT_OT_line_number(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Line Number";
- ot->idname= "TEXT_OT_line_number";
- ot->description= "The current line number";
+ ot->name = "Line Number";
+ ot->idname = "TEXT_OT_line_number";
+ ot->description = "The current line number";
/* api callbacks */
- ot->invoke= text_line_number_invoke;
- ot->poll= text_region_edit_poll;
+ ot->invoke = text_line_number_invoke;
+ ot->poll = text_region_edit_poll;
}
/******************* insert operator **********************/
@@ -2813,12 +2826,13 @@ static int text_insert_exec(bContext *C, wmOperator *op)
str= RNA_string_get_alloc(op->ptr, "text", NULL, 0);
- if(st && st->overwrite) {
+ if (st && st->overwrite) {
while (str[i]) {
code = BLI_str_utf8_as_unicode_step(str, &i);
done |= txt_replace_char(text, code);
}
- } else {
+ }
+ else {
while (str[i]) {
code = BLI_str_utf8_as_unicode_step(str, &i);
done |= txt_add_char(text, code);
@@ -2827,7 +2841,7 @@ static int text_insert_exec(bContext *C, wmOperator *op)
MEM_freeN(str);
- if(!done)
+ if (!done)
return OPERATOR_CANCELLED;
text_update_line_edited(text->curl);
@@ -2842,10 +2856,10 @@ static int text_insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
int ret;
- // if(!RNA_struct_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */
- if(!RNA_string_length(op->ptr, "text")) {
+ // if (!RNA_struct_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */
+ if (!RNA_string_length(op->ptr, "text")) {
/* if alt/ctrl/super are pressed pass through */
- if(event->ctrl || event->oskey) {
+ if (event->ctrl || event->oskey) {
return OPERATOR_PASS_THROUGH;
}
else {
@@ -2855,7 +2869,8 @@ static int text_insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
if (event->utf8_buf[0]) {
len = BLI_str_utf8_size(event->utf8_buf);
memcpy(str, event->utf8_buf, len);
- } else {
+ }
+ else {
/* in theory, ghost can set value to extended ascii here */
len = BLI_str_utf8_from_unicode(event->ascii, str);
}
@@ -2867,7 +2882,7 @@ static int text_insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
ret = text_insert_exec(C, op);
/* run the script while editing, evil but useful */
- if(ret==OPERATOR_FINISHED && CTX_wm_space_text(C)->live_edit)
+ if (ret==OPERATOR_FINISHED && CTX_wm_space_text(C)->live_edit)
text_run_script(C, NULL);
return ret;
@@ -2875,18 +2890,21 @@ static int text_insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
void TEXT_OT_insert(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
- ot->name= "Insert";
- ot->idname= "TEXT_OT_insert";
- ot->description= "Insert text at cursor position";
+ ot->name = "Insert";
+ ot->idname = "TEXT_OT_insert";
+ ot->description = "Insert text at cursor position";
/* api callbacks */
- ot->exec= text_insert_exec;
- ot->invoke= text_insert_invoke;
- ot->poll= text_edit_poll;
+ ot->exec = text_insert_exec;
+ ot->invoke = text_insert_invoke;
+ ot->poll = text_edit_poll;
/* properties */
- RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
+ prop = RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
/******************* find operator *********************/
@@ -2905,18 +2923,18 @@ static int text_find_and_replace(bContext *C, wmOperator *op, short mode)
int found = 0;
char *tmp;
- if(!st->findstr[0] || (mode == TEXT_REPLACE && !st->replacestr[0]))
+ if (!st->findstr[0] || (mode == TEXT_REPLACE && !st->replacestr[0]))
return OPERATOR_CANCELLED;
flags= st->flags;
- if(flags & ST_FIND_ALL)
+ if (flags & ST_FIND_ALL)
flags ^= ST_FIND_WRAP;
do {
int proceed= 0;
- if(first) {
- if(text->markers.first)
+ if (first) {
+ if (text->markers.first)
WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text);
txt_clear_markers(text, TMARK_GRP_FINDALL, 0);
@@ -2925,16 +2943,16 @@ static int text_find_and_replace(bContext *C, wmOperator *op, short mode)
first= 0;
/* Replace current */
- if(mode!=TEXT_FIND && txt_has_sel(text)) {
+ if (mode!=TEXT_FIND && txt_has_sel(text)) {
tmp= txt_sel_to_buf(text);
- if(flags & ST_MATCH_CASE) proceed= strcmp(st->findstr, tmp)==0;
+ if (flags & ST_MATCH_CASE) proceed= strcmp(st->findstr, tmp)==0;
else proceed= BLI_strcasecmp(st->findstr, tmp)==0;
- if(proceed) {
- if(mode==TEXT_REPLACE) {
+ if (proceed) {
+ if (mode==TEXT_REPLACE) {
txt_insert_buf(text, st->replacestr);
- if(text->curl && text->curl->format) {
+ if (text->curl && text->curl->format) {
MEM_freeN(text->curl->format);
text->curl->format= NULL;
}
@@ -2942,12 +2960,12 @@ static int text_find_and_replace(bContext *C, wmOperator *op, short mode)
WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text);
text_drawcache_tag_update(CTX_wm_space_text(C), 1);
}
- else if(mode==TEXT_MARK_ALL) {
+ else if (mode==TEXT_MARK_ALL) {
unsigned char color[4];
UI_GetThemeColor4ubv(TH_SHADE2, color);
- if(txt_find_marker(text, text->curl, text->selc, TMARK_GRP_FINDALL, 0)) {
- if(tmp) MEM_freeN(tmp), tmp=NULL;
+ if (txt_find_marker(text, text->curl, text->selc, TMARK_GRP_FINDALL, 0)) {
+ if (tmp) MEM_freeN(tmp), tmp=NULL;
break;
}
@@ -2961,14 +2979,14 @@ static int text_find_and_replace(bContext *C, wmOperator *op, short mode)
}
/* Find next */
- if(txt_find_string(text, st->findstr, flags & ST_FIND_WRAP, flags & ST_MATCH_CASE)) {
+ if (txt_find_string(text, st->findstr, flags & ST_FIND_WRAP, flags & ST_MATCH_CASE)) {
text_update_cursor_moved(C);
WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text);
}
- else if(flags & ST_FIND_ALL) {
- if(text==start) break;
- if(!start) start= text;
- if(text->id.next)
+ else if (flags & ST_FIND_ALL) {
+ if (text==start) break;
+ if (!start) start= text;
+ if (text->id.next)
text= st->text= text->id.next;
else
text= st->text= bmain->text.first;
@@ -2978,11 +2996,11 @@ static int text_find_and_replace(bContext *C, wmOperator *op, short mode)
first= 1;
}
else {
- if(!found && !proceed) BKE_reportf(op->reports, RPT_ERROR, "Text not found: %s", st->findstr);
+ if (!found && !proceed) BKE_reportf(op->reports, RPT_ERROR, "Text not found: %s", st->findstr);
break;
}
found = 1;
- } while(mode==TEXT_MARK_ALL);
+ } while (mode==TEXT_MARK_ALL);
return OPERATOR_FINISHED;
}
@@ -2995,13 +3013,13 @@ static int text_find_exec(bContext *C, wmOperator *op)
void TEXT_OT_find(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Find";
- ot->idname= "TEXT_OT_find";
- ot->description= "Find specified text";
+ ot->name = "Find";
+ ot->idname = "TEXT_OT_find";
+ ot->description = "Find specified text";
/* api callbacks */
- ot->exec= text_find_exec;
- ot->poll= text_space_edit_poll;
+ ot->exec = text_find_exec;
+ ot->poll = text_space_edit_poll;
}
/******************* replace operator *********************/
@@ -3014,13 +3032,13 @@ static int text_replace_exec(bContext *C, wmOperator *op)
void TEXT_OT_replace(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Replace";
- ot->idname= "TEXT_OT_replace";
- ot->description= "Replace text with the specified text";
+ ot->name = "Replace";
+ ot->idname = "TEXT_OT_replace";
+ ot->description = "Replace text with the specified text";
/* api callbacks */
- ot->exec= text_replace_exec;
- ot->poll= text_space_edit_poll;
+ ot->exec = text_replace_exec;
+ ot->poll = text_space_edit_poll;
}
/******************* mark all operator *********************/
@@ -3033,13 +3051,13 @@ static int text_mark_all_exec(bContext *C, wmOperator *op)
void TEXT_OT_mark_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mark All";
- ot->idname= "TEXT_OT_mark_all";
- ot->description= "Mark all specified text";
+ ot->name = "Mark All";
+ ot->idname = "TEXT_OT_mark_all";
+ ot->description = "Mark all specified text";
/* api callbacks */
- ot->exec= text_mark_all_exec;
- ot->poll= text_space_edit_poll;
+ ot->exec = text_mark_all_exec;
+ ot->poll = text_space_edit_poll;
}
/******************* find set selected *********************/
@@ -3054,7 +3072,7 @@ static int text_find_set_selected_exec(bContext *C, wmOperator *op)
BLI_strncpy(st->findstr, tmp, ST_MAX_FIND_STR);
MEM_freeN(tmp);
- if(!st->findstr[0])
+ if (!st->findstr[0])
return OPERATOR_FINISHED;
return text_find_and_replace(C, op, TEXT_FIND);
@@ -3063,13 +3081,13 @@ static int text_find_set_selected_exec(bContext *C, wmOperator *op)
void TEXT_OT_find_set_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Find Set Selected";
- ot->idname= "TEXT_OT_find_set_selected";
- ot->description= "Find specified text and set as selected";
+ ot->name = "Find Set Selected";
+ ot->idname = "TEXT_OT_find_set_selected";
+ ot->description = "Find specified text and set as selected";
/* api callbacks */
- ot->exec= text_find_set_selected_exec;
- ot->poll= text_space_edit_poll;
+ ot->exec = text_find_set_selected_exec;
+ ot->poll = text_space_edit_poll;
}
/******************* replace set selected *********************/
@@ -3090,13 +3108,13 @@ static int text_replace_set_selected_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_replace_set_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Replace Set Selected";
- ot->idname= "TEXT_OT_replace_set_selected";
- ot->description= "Replace text with specified text and set as selected";
+ ot->name = "Replace Set Selected";
+ ot->idname = "TEXT_OT_replace_set_selected";
+ ot->description = "Replace text with specified text and set as selected";
/* api callbacks */
- ot->exec= text_replace_set_selected_exec;
- ot->poll= text_space_edit_poll;
+ ot->exec = text_replace_set_selected_exec;
+ ot->poll = text_space_edit_poll;
}
/****************** resolve conflict operator ******************/
@@ -3120,24 +3138,24 @@ int text_file_modified(Text *text)
int result;
char file[FILE_MAX];
- if(!text || !text->name)
+ if (!text || !text->name)
return 0;
BLI_strncpy(file, text->name, FILE_MAX);
BLI_path_abs(file, G.main->name);
- if(!BLI_exists(file))
+ if (!BLI_exists(file))
return 2;
result = stat(file, &st);
- if(result == -1)
+ if (result == -1)
return -1;
- if((st.st_mode & S_IFMT) != S_IFREG)
+ if ((st.st_mode & S_IFMT) != S_IFREG)
return -1;
- if(st.st_mtime > text->mtime)
+ if (st.st_mtime > text->mtime)
return 1;
return 0;
@@ -3149,16 +3167,16 @@ static void text_ignore_modified(Text *text)
int result;
char file[FILE_MAX];
- if(!text || !text->name) return;
+ if (!text || !text->name) return;
BLI_strncpy(file, text->name, FILE_MAX);
BLI_path_abs(file, G.main->name);
- if(!BLI_exists(file)) return;
+ if (!BLI_exists(file)) return;
result = stat(file, &st);
- if(result == -1 || (st.st_mode & S_IFMT) != S_IFREG)
+ if (result == -1 || (st.st_mode & S_IFMT) != S_IFREG)
return;
text->mtime= st.st_mtime;
@@ -3192,7 +3210,7 @@ static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *UN
switch(text_file_modified(text)) {
case 1:
- if(text->flags & TXT_ISDIRTY) {
+ if (text->flags & TXT_ISDIRTY) {
/* modified locally and externally, ahhh. offer more possibilites. */
pup= uiPupMenuBegin(C, "File Modified Outside and Inside Blender", ICON_NONE);
layout= uiPupMenuLayout(pup);
@@ -3225,14 +3243,14 @@ static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *UN
void TEXT_OT_resolve_conflict(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Resolve Conflict";
- ot->idname= "TEXT_OT_resolve_conflict";
- ot->description= "When external text is out of sync, resolve the conflict";
+ ot->name = "Resolve Conflict";
+ ot->idname = "TEXT_OT_resolve_conflict";
+ ot->description = "When external text is out of sync, resolve the conflict";
/* api callbacks */
- ot->exec= text_resolve_conflict_exec;
- ot->invoke= text_resolve_conflict_invoke;
- ot->poll= text_save_poll;
+ ot->exec = text_resolve_conflict_exec;
+ ot->invoke = text_resolve_conflict_invoke;
+ ot->poll = text_save_poll;
/* properties */
RNA_def_enum(ot->srna, "resolution", resolution_items, RESOLVE_IGNORE, "Resolution", "How to solve conflict due to differences in internal and external text");
@@ -3253,16 +3271,16 @@ static int text_to_3d_object_exec(bContext *C, wmOperator *op)
void TEXT_OT_to_3d_object(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "To 3D Object";
- ot->idname= "TEXT_OT_to_3d_object";
- ot->description= "Create 3d text object from active text data block";
+ ot->name = "To 3D Object";
+ ot->idname = "TEXT_OT_to_3d_object";
+ ot->description = "Create 3d text object from active text data block";
/* api callbacks */
- ot->exec= text_to_3d_object_exec;
- ot->poll= text_edit_poll;
+ ot->exec = text_to_3d_object_exec;
+ ot->poll = text_edit_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "split_lines", 0, "Split Lines", "Create one object per line in the text");
@@ -3275,12 +3293,12 @@ void ED_text_undo_step(bContext *C, int step)
{
Text *text= CTX_data_edit_text(C);
- if(!text)
+ if (!text)
return;
- if(step==1)
+ if (step==1)
txt_do_undo(text);
- else if(step==-1)
+ else if (step==-1)
txt_do_redo(text);
text_update_edited(text);
diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c
index 88bd6b9c4c0..452f74e8826 100644
--- a/source/blender/editors/space_text/text_python.c
+++ b/source/blender/editors/space_text/text_python.c
@@ -55,24 +55,24 @@ int text_do_suggest_select(SpaceText *st, ARegion *ar)
int tgti, *top;
int mval[2] = {0, 0};
- if(!st || !st->text) return 0;
- if(!texttool_text_is_active(st->text)) return 0;
+ if (!st || !st->text) return 0;
+ if (!texttool_text_is_active(st->text)) return 0;
first = texttool_suggest_first();
last = texttool_suggest_last();
/* sel = texttool_suggest_selected(); */ /* UNUSED */
top = texttool_suggest_top();
- if(!last || !first)
+ if (!last || !first)
return 0;
/* Count the visible lines to the cursor */
- for(tmp=st->text->curl, l=-st->top; tmp; tmp=tmp->prev, l++);
- if(l<0) return 0;
+ for (tmp=st->text->curl, l=-st->top; tmp; tmp=tmp->prev, l++);
+ if (l<0) return 0;
text_update_character_width(st);
- if(st->showlinenrs) {
+ if (st->showlinenrs) {
x = st->cwidth*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4;
}
else {
@@ -85,19 +85,19 @@ int text_do_suggest_select(SpaceText *st, ARegion *ar)
// XXX getmouseco_areawin(mval);
- if(mval[0]<x || x+w<mval[0] || mval[1]<y-h || y<mval[1])
+ if (mval[0]<x || x+w<mval[0] || mval[1]<y-h || y<mval[1])
return 0;
/* Work out which of the items is at the top of the visible list */
- for(i=0, item=first; i<*top && item->next; i++, item=item->next);
+ for (i=0, item=first; i<*top && item->next; i++, item=item->next);
/* Work out the target item index in the visible list */
tgti = (y-mval[1]-4) / st->lheight;
- if(tgti<0 || tgti>SUGG_LIST_SIZE)
+ if (tgti<0 || tgti>SUGG_LIST_SIZE)
return 1;
- for(i=tgti; i>0 && item->next; i--, item=item->next);
- if(item)
+ for (i=tgti; i>0 && item->next; i--, item=item->next);
+ if (item)
texttool_suggest_select(item);
return 1;
}
@@ -112,13 +112,13 @@ void text_pop_suggest_list(void)
top= texttool_suggest_top();
i= 0;
- while(item && item != sel) {
+ while (item && item != sel) {
item= item->next;
i++;
}
- if(i > *top+SUGG_LIST_SIZE-1)
+ if (i > *top+SUGG_LIST_SIZE-1)
*top= i-SUGG_LIST_SIZE+1;
- else if(i < *top)
+ else if (i < *top)
*top= i;
}
@@ -127,16 +127,16 @@ static void get_suggest_prefix(Text *text, int offset)
int i, len;
char *line, tmp[256];
- if(!text) return;
- if(!texttool_text_is_active(text)) return;
+ if (!text) return;
+ if (!texttool_text_is_active(text)) return;
line= text->curl->line;
- for(i=text->curc-1+offset; i>=0; i--)
- if(!text_check_identifier(line[i]))
+ for (i=text->curc-1+offset; i>=0; i--)
+ if (!text_check_identifier(line[i]))
break;
i++;
len= text->curc-i+offset;
- if(len > 255) {
+ if (len > 255) {
printf("Suggestion prefix too long\n");
len = 255;
}
@@ -151,29 +151,29 @@ static void confirm_suggestion(Text *text, int skipleft)
int i, over=0;
char *line;
- if(!text) return;
- if(!texttool_text_is_active(text)) return;
+ if (!text) return;
+ if (!texttool_text_is_active(text)) return;
sel = texttool_suggest_selected();
- if(!sel) return;
+ if (!sel) return;
line= text->curl->line;
i=text->curc-skipleft-1;
- while(i>=0) {
- if(!text_check_identifier(line[i]))
+ while (i>=0) {
+ if (!text_check_identifier(line[i]))
break;
over++;
i--;
}
- for(i=0; i<skipleft; i++)
+ for (i=0; i<skipleft; i++)
txt_move_left(text, 0);
- for(i=0; i<over; i++)
+ for (i=0; i<over; i++)
txt_move_left(text, 1);
txt_insert_buf(text, sel->name);
- for(i=0; i<skipleft; i++)
+ for (i=0; i<skipleft; i++)
txt_move_right(text, 0);
texttool_text_clear();
@@ -196,78 +196,78 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s
ARegion *ar= NULL; // XXX
int qual= 0; // XXX
int draw=0, tools=0, swallow=0, scroll=1;
- if(!texttool_text_is_active(st->text)) return 0;
- if(!st->text || st->text->id.lib) return 0;
+ if (!texttool_text_is_active(st->text)) return 0;
+ if (!st->text || st->text->id.lib) return 0;
- if(st->doplugins && texttool_text_is_active(st->text)) {
- if(texttool_suggest_first()) tools |= TOOL_SUGG_LIST;
- if(texttool_docs_get()) tools |= TOOL_DOCUMENT;
+ if (st->doplugins && texttool_text_is_active(st->text)) {
+ if (texttool_suggest_first()) tools |= TOOL_SUGG_LIST;
+ if (texttool_docs_get()) tools |= TOOL_DOCUMENT;
}
- if(ascii) {
- if(tools & TOOL_SUGG_LIST) {
- if((ascii != '_' && ascii != '*' && ispunct(ascii)) || text_check_whitespace(ascii)) {
+ if (ascii) {
+ if (tools & TOOL_SUGG_LIST) {
+ if ((ascii != '_' && ascii != '*' && ispunct(ascii)) || text_check_whitespace(ascii)) {
confirm_suggestion(st->text, 0);
text_update_line_edited(st->text->curl);
}
- else if((st->overwrite && txt_replace_char(st->text, ascii)) || txt_add_char(st->text, ascii)) {
+ else if ((st->overwrite && txt_replace_char(st->text, ascii)) || txt_add_char(st->text, ascii)) {
get_suggest_prefix(st->text, 0);
text_pop_suggest_list();
swallow= 1;
draw= 1;
}
}
- if(tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0, draw= 1;
+ if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0, draw= 1;
}
- else if(val==1 && evnt) {
+ else if (val==1 && evnt) {
switch (evnt) {
case LEFTMOUSE:
- if(text_do_suggest_select(st, ar))
+ if (text_do_suggest_select(st, ar))
swallow= 1;
else {
- if(tools & TOOL_SUGG_LIST) texttool_suggest_clear();
- if(tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0;
+ if (tools & TOOL_SUGG_LIST) texttool_suggest_clear();
+ if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0;
}
draw= 1;
break;
case MIDDLEMOUSE:
- if(text_do_suggest_select(st, ar)) {
+ if (text_do_suggest_select(st, ar)) {
confirm_suggestion(st->text, 0);
text_update_line_edited(st->text->curl);
swallow= 1;
}
else {
- if(tools & TOOL_SUGG_LIST) texttool_suggest_clear();
- if(tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0;
+ if (tools & TOOL_SUGG_LIST) texttool_suggest_clear();
+ if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0;
}
draw= 1;
break;
case ESCKEY:
draw= swallow= 1;
- if(tools & TOOL_SUGG_LIST) texttool_suggest_clear();
- else if(tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0;
+ if (tools & TOOL_SUGG_LIST) texttool_suggest_clear();
+ else if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0;
else draw= swallow= 0;
break;
case RETKEY:
- if(tools & TOOL_SUGG_LIST) {
+ if (tools & TOOL_SUGG_LIST) {
confirm_suggestion(st->text, 0);
text_update_line_edited(st->text->curl);
swallow= 1;
draw= 1;
}
- if(tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0, draw= 1;
+ if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0, draw= 1;
break;
case LEFTARROWKEY:
case BACKSPACEKEY:
- if(tools & TOOL_SUGG_LIST) {
- if(qual)
+ if (tools & TOOL_SUGG_LIST) {
+ if (qual)
texttool_suggest_clear();
else {
/* Work out which char we are about to delete/pass */
- if(st->text->curl && st->text->curc > 0) {
+ if (st->text->curl && st->text->curc > 0) {
char ch= st->text->curl->line[st->text->curc-1];
- if((ch=='_' || !ispunct(ch)) && !text_check_whitespace(ch)) {
+ if ((ch=='_' || !ispunct(ch)) && !text_check_whitespace(ch)) {
get_suggest_prefix(st->text, -1);
text_pop_suggest_list();
}
@@ -278,17 +278,17 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s
texttool_suggest_clear();
}
}
- if(tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0;
+ if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0;
break;
case RIGHTARROWKEY:
- if(tools & TOOL_SUGG_LIST) {
- if(qual)
+ if (tools & TOOL_SUGG_LIST) {
+ if (qual)
texttool_suggest_clear();
else {
/* Work out which char we are about to pass */
- if(st->text->curl && st->text->curc < st->text->curl->len) {
+ if (st->text->curl && st->text->curc < st->text->curl->len) {
char ch= st->text->curl->line[st->text->curc+1];
- if((ch=='_' || !ispunct(ch)) && !text_check_whitespace(ch)) {
+ if ((ch=='_' || !ispunct(ch)) && !text_check_whitespace(ch)) {
get_suggest_prefix(st->text, 1);
text_pop_suggest_list();
}
@@ -299,24 +299,24 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s
texttool_suggest_clear();
}
}
- if(tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0;
+ if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0;
break;
case PAGEDOWNKEY:
scroll= SUGG_LIST_SIZE-1;
case WHEELDOWNMOUSE:
case DOWNARROWKEY:
- if(tools & TOOL_DOCUMENT) {
+ if (tools & TOOL_DOCUMENT) {
doc_scroll++;
swallow= 1;
draw= 1;
break;
}
- else if(tools & TOOL_SUGG_LIST) {
+ else if (tools & TOOL_SUGG_LIST) {
SuggItem *sel = texttool_suggest_selected();
- if(!sel) {
+ if (!sel) {
texttool_suggest_select(texttool_suggest_first());
}
- else while(sel && sel!=texttool_suggest_last() && sel->next && scroll--) {
+ else while (sel && sel!=texttool_suggest_last() && sel->next && scroll--) {
texttool_suggest_select(sel->next);
sel= sel->next;
}
@@ -329,15 +329,15 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s
scroll= SUGG_LIST_SIZE-1;
case WHEELUPMOUSE:
case UPARROWKEY:
- if(tools & TOOL_DOCUMENT) {
- if(doc_scroll>0) doc_scroll--;
+ if (tools & TOOL_DOCUMENT) {
+ if (doc_scroll>0) doc_scroll--;
swallow= 1;
draw= 1;
break;
}
- else if(tools & TOOL_SUGG_LIST) {
+ else if (tools & TOOL_SUGG_LIST) {
SuggItem *sel = texttool_suggest_selected();
- while(sel && sel!=texttool_suggest_first() && sel->prev && scroll--) {
+ while (sel && sel!=texttool_suggest_first() && sel->prev && scroll--) {
texttool_suggest_select(sel->prev);
sel= sel->prev;
}
@@ -350,8 +350,8 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s
case LEFTSHIFTKEY:
break;
default:
- if(tools & TOOL_SUGG_LIST) texttool_suggest_clear(), draw= 1;
- if(tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0, draw= 1;
+ if (tools & TOOL_SUGG_LIST) texttool_suggest_clear(), draw= 1;
+ if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0, draw= 1;
}
}
@@ -365,13 +365,13 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s
#if 0
#ifdef WITH_PYTHON
/* Run text plugin scripts if enabled */
- if(st->doplugins && event && val) {
- if(BPY_menu_do_shortcut(PYMENU_TEXTPLUGIN, event, qual)) {
+ if (st->doplugins && event && val) {
+ if (BPY_menu_do_shortcut(PYMENU_TEXTPLUGIN, event, qual)) {
do_draw= 1;
}
}
#endif
- if(do_draw)
+ if (do_draw)
; // XXX redraw_alltext();
#endif
@@ -383,26 +383,26 @@ static short UNUSED_FUNCTION(do_textmarkers)(SpaceText *st, char ascii, unsigned
int qual= 0; // XXX
text= st->text;
- if(!text || text->id.lib || text->curl != text->sell) return 0;
+ if (!text || text->id.lib || text->curl != text->sell) return 0;
marker= txt_find_marker(text, text->sell, text->selc, 0, 0);
- if(marker && (marker->start > text->curc || marker->end < text->curc))
+ if (marker && (marker->start > text->curc || marker->end < text->curc))
marker= NULL;
- if(!marker) {
+ if (!marker) {
/* Find the next temporary marker */
- if(evnt==TABKEY) {
+ if (evnt==TABKEY) {
int lineno= txt_get_span(text->lines.first, text->curl);
mrk= text->markers.first;
- while(mrk) {
- if(!marker && (mrk->flags & TMARK_TEMP)) marker= mrk;
- if((mrk->flags & TMARK_TEMP) && (mrk->lineno > lineno || (mrk->lineno==lineno && mrk->end > text->curc))) {
+ while (mrk) {
+ if (!marker && (mrk->flags & TMARK_TEMP)) marker= mrk;
+ if ((mrk->flags & TMARK_TEMP) && (mrk->lineno > lineno || (mrk->lineno==lineno && mrk->end > text->curc))) {
marker= mrk;
break;
}
mrk= mrk->next;
}
- if(marker) {
+ if (marker) {
txt_move_to(text, marker->lineno, marker->start, 0);
txt_move_to(text, marker->lineno, marker->end, 1);
// XXX text_update_cursor_moved(C);
@@ -412,60 +412,60 @@ static short UNUSED_FUNCTION(do_textmarkers)(SpaceText *st, char ascii, unsigned
swallow= 1;
}
}
- else if(evnt==ESCKEY) {
- if(txt_clear_markers(text, 0, TMARK_TEMP)) swallow= 1;
- else if(txt_clear_markers(text, 0, 0)) swallow= 1;
+ else if (evnt==ESCKEY) {
+ if (txt_clear_markers(text, 0, TMARK_TEMP)) swallow= 1;
+ else if (txt_clear_markers(text, 0, 0)) swallow= 1;
else return 0;
evnt= ascii= val= 0;
draw= 1;
}
- if(!swallow) return 0;
+ if (!swallow) return 0;
}
- if(ascii) {
- if(marker->flags & TMARK_EDITALL) {
+ if (ascii) {
+ if (marker->flags & TMARK_EDITALL) {
c= text->curc-marker->start;
s= text->selc-marker->start;
- if(s<0 || s>marker->end-marker->start) return 0;
+ if (s<0 || s>marker->end-marker->start) return 0;
mrk= txt_next_marker(text, marker);
- while(mrk) {
+ while (mrk) {
nxt=txt_next_marker(text, mrk); /* mrk may become invalid */
txt_move_to(text, mrk->lineno, mrk->start+c, 0);
- if(s!=c) txt_move_to(text, mrk->lineno, mrk->start+s, 1);
- if(st->overwrite) {
- if(txt_replace_char(text, ascii))
+ if (s!=c) txt_move_to(text, mrk->lineno, mrk->start+s, 1);
+ if (st->overwrite) {
+ if (txt_replace_char(text, ascii))
text_update_line_edited(st->text->curl);
}
else {
- if(txt_add_char(text, ascii)) {
+ if (txt_add_char(text, ascii)) {
text_update_line_edited(st->text->curl);
}
}
- if(mrk==marker || mrk==nxt) break;
+ if (mrk==marker || mrk==nxt) break;
mrk=nxt;
}
swallow= 1;
draw= 1;
}
}
- else if(val) {
+ else if (val) {
switch(evnt) {
case BACKSPACEKEY:
- if(marker->flags & TMARK_EDITALL) {
+ if (marker->flags & TMARK_EDITALL) {
c= text->curc-marker->start;
s= text->selc-marker->start;
- if(s<0 || s>marker->end-marker->start) return 0;
+ if (s<0 || s>marker->end-marker->start) return 0;
mrk= txt_next_marker(text, marker);
- while(mrk) {
+ while (mrk) {
nxt= txt_next_marker(text, mrk); /* mrk may become invalid */
txt_move_to(text, mrk->lineno, mrk->start+c, 0);
- if(s!=c) txt_move_to(text, mrk->lineno, mrk->start+s, 1);
+ if (s!=c) txt_move_to(text, mrk->lineno, mrk->start+s, 1);
txt_backspace_char(text);
text_update_line_edited(st->text->curl);
- if(mrk==marker || mrk==nxt) break;
+ if (mrk==marker || mrk==nxt) break;
mrk= nxt;
}
swallow= 1;
@@ -473,19 +473,19 @@ static short UNUSED_FUNCTION(do_textmarkers)(SpaceText *st, char ascii, unsigned
}
break;
case DELKEY:
- if(marker->flags & TMARK_EDITALL) {
+ if (marker->flags & TMARK_EDITALL) {
c= text->curc-marker->start;
s= text->selc-marker->start;
- if(s<0 || s>marker->end-marker->start) return 0;
+ if (s<0 || s>marker->end-marker->start) return 0;
mrk= txt_next_marker(text, marker);
- while(mrk) {
+ while (mrk) {
nxt= txt_next_marker(text, mrk); /* mrk may become invalid */
txt_move_to(text, mrk->lineno, mrk->start+c, 0);
- if(s!=c) txt_move_to(text, mrk->lineno, mrk->start+s, 1);
+ if (s!=c) txt_move_to(text, mrk->lineno, mrk->start+s, 1);
txt_delete_char(text);
text_update_line_edited(st->text->curl);
- if(mrk==marker || mrk==nxt) break;
+ if (mrk==marker || mrk==nxt) break;
mrk= nxt;
}
swallow= 1;
@@ -493,20 +493,20 @@ static short UNUSED_FUNCTION(do_textmarkers)(SpaceText *st, char ascii, unsigned
}
break;
case TABKEY:
- if(qual & LR_SHIFTKEY) {
+ if (qual & LR_SHIFTKEY) {
nxt= marker->prev;
- if(!nxt) nxt= text->markers.last;
+ if (!nxt) nxt= text->markers.last;
}
else {
nxt= marker->next;
- if(!nxt) nxt= text->markers.first;
+ if (!nxt) nxt= text->markers.first;
}
- if(marker->flags & TMARK_TEMP) {
- if(nxt==marker) nxt= NULL;
+ if (marker->flags & TMARK_TEMP) {
+ if (nxt==marker) nxt= NULL;
BLI_freelinkN(&text->markers, marker);
}
mrk= nxt;
- if(mrk) {
+ if (mrk) {
txt_move_to(text, mrk->lineno, mrk->start, 0);
txt_move_to(text, mrk->lineno, mrk->end, 1);
// XXX text_update_cursor_moved(C);
@@ -517,11 +517,11 @@ static short UNUSED_FUNCTION(do_textmarkers)(SpaceText *st, char ascii, unsigned
break;
/* Events that should clear markers */
- case UKEY: if(!(qual & LR_ALTKEY)) break;
- case ZKEY: if(evnt==ZKEY && !(qual & LR_CTRLKEY)) break;
+ case UKEY: if (!(qual & LR_ALTKEY)) break;
+ case ZKEY: if (evnt==ZKEY && !(qual & LR_CTRLKEY)) break;
case RETKEY:
case ESCKEY:
- if(marker->flags & (TMARK_EDITALL | TMARK_TEMP))
+ if (marker->flags & (TMARK_EDITALL | TMARK_TEMP))
txt_clear_markers(text, marker->group, 0);
else
BLI_freelinkN(&text->markers, marker);
@@ -532,11 +532,11 @@ static short UNUSED_FUNCTION(do_textmarkers)(SpaceText *st, char ascii, unsigned
case LEFTMOUSE:
break;
case FKEY: /* Allow find */
- if(qual & LR_SHIFTKEY) swallow= 1;
+ if (qual & LR_SHIFTKEY) swallow= 1;
break;
default:
- if(qual!=0 && qual!=LR_SHIFTKEY)
+ if (qual!=0 && qual!=LR_SHIFTKEY)
swallow= 1; /* Swallow all other shortcut events */
}
}
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index bf1b1ddc18a..5e56dfa728e 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -106,7 +106,7 @@ static void time_draw_cache(SpaceTime *stime, Object *ob)
/* iterate over pointcaches on the active object,
* add spacetimecache and vertex array for each */
- for(pid=pidlist.first; pid; pid=pid->next) {
+ for (pid=pidlist.first; pid; pid=pid->next) {
float col[4], *fp;
int i, sta = pid->cache->startframe, end = pid->cache->endframe;
int len = (end - sta + 1)*4;
@@ -130,12 +130,12 @@ static void time_draw_cache(SpaceTime *stime, Object *ob)
break;
}
- if(pid->cache->cached_frames == NULL)
+ if (pid->cache->cached_frames == NULL)
continue;
/* make sure we have stc with correct array length */
- if(stc == NULL || MEM_allocN_len(stc->array) != len*2*sizeof(float)) {
- if(stc) {
+ if (stc == NULL || MEM_allocN_len(stc->array) != len*2*sizeof(float)) {
+ if (stc) {
MEM_freeN(stc->array);
}
else {
@@ -227,7 +227,7 @@ static void time_draw_cache(SpaceTime *stime, Object *ob)
BLI_freelistN(&pidlist);
/* free excessive caches */
- while(stc) {
+ while (stc) {
SpaceTimeCache *tmp = stc->next;
BLI_remlink(&stime->caches, stc);
MEM_freeN(stc->array);
@@ -380,7 +380,7 @@ static void time_refresh(const bContext *UNUSED(C), ScrArea *sa)
{
/* find the main timeline region and refresh cache display*/
ARegion *ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
- if(ar) {
+ if (ar) {
SpaceTime *stime = (SpaceTime *)sa->spacedata.first;
time_cache_refresh(stime);
}
@@ -416,8 +416,8 @@ static void time_listener(ScrArea *sa, wmNotifier *wmn)
for (ar= sa->regionbase.first; ar; ar= ar->next) {
if (ar->regiontype==RGN_TYPE_WINDOW) {
- ar->v2d.tot.xmin= (float)(SFRA - 4);
- ar->v2d.tot.xmax= (float)(EFRA + 4);
+ ar->v2d.tot.xmin = (float)(SFRA - 4);
+ ar->v2d.tot.xmax = (float)(EFRA + 4);
break;
}
}
@@ -449,7 +449,7 @@ static void time_main_area_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
- keymap= WM_keymap_find(wm->defaultconf, "Timeline", SPACE_TIME, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Timeline", SPACE_TIME, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -511,7 +511,7 @@ static void time_main_area_listener(ARegion *ar, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
case NC_SPACE:
- if(wmn->data == ND_SPACE_TIME)
+ if (wmn->data == ND_SPACE_TIME)
ED_region_tag_redraw(ar);
break;
@@ -551,7 +551,7 @@ static void time_header_area_listener(ARegion *ar, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
case NC_SCREEN:
- if(wmn->data==ND_ANIMPLAY)
+ if (wmn->data==ND_ANIMPLAY)
ED_region_tag_redraw(ar);
break;
@@ -567,7 +567,7 @@ static void time_header_area_listener(ARegion *ar, wmNotifier *wmn)
}
case NC_SPACE:
- if(wmn->data == ND_SPACE_TIME)
+ if (wmn->data == ND_SPACE_TIME)
ED_region_tag_redraw(ar);
break;
}
@@ -599,10 +599,10 @@ static SpaceLink *time_new(const bContext *C)
BLI_addtail(&stime->regionbase, ar);
ar->regiontype= RGN_TYPE_WINDOW;
- ar->v2d.tot.xmin= (float)(SFRA - 4);
- ar->v2d.tot.ymin= 0.0f;
- ar->v2d.tot.xmax= (float)(EFRA + 4);
- ar->v2d.tot.ymax= 50.0f;
+ ar->v2d.tot.xmin = (float)(SFRA - 4);
+ ar->v2d.tot.ymin = 0.0f;
+ ar->v2d.tot.xmax = (float)(EFRA + 4);
+ ar->v2d.tot.ymax = 50.0f;
ar->v2d.cur= ar->v2d.tot;
diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c
index 78d903a2997..3eaf2b8100e 100644
--- a/source/blender/editors/space_time/time_ops.c
+++ b/source/blender/editors/space_time/time_ops.c
@@ -56,17 +56,20 @@ static int time_set_sfra_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
frame= CFRA;
- /* if 'end frame' (Preview Range or Actual) is less than 'frame',
- * clamp 'frame' to 'end frame'
- */
- if (PEFRA < frame) frame= PEFRA;
-
+
/* if Preview Range is defined, set the 'start' frame for that */
if (PRVRANGEON)
scene->r.psfra= frame;
else
scene->r.sfra= frame;
+ if (PEFRA < frame) {
+ if (PRVRANGEON)
+ scene->r.pefra= frame;
+ else
+ scene->r.efra= frame;
+ }
+
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
return OPERATOR_FINISHED;
@@ -75,16 +78,16 @@ static int time_set_sfra_exec (bContext *C, wmOperator *UNUSED(op))
static void TIME_OT_start_frame_set (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Start Frame";
- ot->idname= "TIME_OT_start_frame_set";
- ot->description="Set the start frame";
+ ot->name = "Set Start Frame";
+ ot->idname = "TIME_OT_start_frame_set";
+ ot->description = "Set the start frame";
/* api callbacks */
- ot->exec= time_set_sfra_exec;
- ot->poll= ED_operator_timeline_active;
+ ot->exec = time_set_sfra_exec;
+ ot->poll = ED_operator_timeline_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -98,16 +101,18 @@ static int time_set_efra_exec (bContext *C, wmOperator *UNUSED(op))
frame= CFRA;
- /* if 'start frame' (Preview Range or Actual) is greater than 'frame',
- * clamp 'frame' to 'end frame'
- */
- if (PSFRA > frame) frame= PSFRA;
-
/* if Preview Range is defined, set the 'end' frame for that */
if (PRVRANGEON)
scene->r.pefra= frame;
else
scene->r.efra= frame;
+
+ if (PSFRA > frame) {
+ if (PRVRANGEON)
+ scene->r.psfra= frame;
+ else
+ scene->r.sfra= frame;
+ }
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
@@ -117,16 +122,16 @@ static int time_set_efra_exec (bContext *C, wmOperator *UNUSED(op))
static void TIME_OT_end_frame_set (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set End Frame";
- ot->idname= "TIME_OT_end_frame_set";
- ot->description="Set the end frame";
+ ot->name = "Set End Frame";
+ ot->idname = "TIME_OT_end_frame_set";
+ ot->description = "Set the end frame";
/* api callbacks */
- ot->exec= time_set_efra_exec;
- ot->poll= ED_operator_timeline_active;
+ ot->exec = time_set_efra_exec;
+ ot->poll = ED_operator_timeline_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************************ View All Operator *******************************/
@@ -142,8 +147,8 @@ static int time_view_all_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* set extents of view to start/end frames (Preview Range too) */
- v2d->cur.xmin= (float)PSFRA;
- v2d->cur.xmax= (float)PEFRA;
+ v2d->cur.xmin = (float)PSFRA;
+ v2d->cur.xmax = (float)PEFRA;
/* we need an extra "buffer" factor on either side so that the endpoints are visible */
extra= 0.01f * (v2d->cur.xmax - v2d->cur.xmin);
@@ -159,16 +164,16 @@ static int time_view_all_exec (bContext *C, wmOperator *UNUSED(op))
static void TIME_OT_view_all (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View All";
- ot->idname= "TIME_OT_view_all";
- ot->description= "Show the entire playable frame range";
+ ot->name = "View All";
+ ot->idname = "TIME_OT_view_all";
+ ot->description = "Show the entire playable frame range";
/* api callbacks */
- ot->exec= time_view_all_exec;
- ot->poll= ED_operator_timeline_active;
+ ot->exec = time_view_all_exec;
+ ot->poll = ED_operator_timeline_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ************************** registration **********************************/
@@ -182,7 +187,7 @@ void time_operatortypes(void)
void time_keymap(wmKeyConfig *keyconf)
{
- wmKeyMap *keymap= WM_keymap_find(keyconf, "Timeline", SPACE_TIME, 0);
+ wmKeyMap *keymap = WM_keymap_find(keyconf, "Timeline", SPACE_TIME, 0);
WM_keymap_add_item(keymap, "TIME_OT_start_frame_set", SKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "TIME_OT_end_frame_set", EKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_view3d/CMakeLists.txt b/source/blender/editors/space_view3d/CMakeLists.txt
index e78bad62ba5..1bba237ed5c 100644
--- a/source/blender/editors/space_view3d/CMakeLists.txt
+++ b/source/blender/editors/space_view3d/CMakeLists.txt
@@ -69,4 +69,8 @@ endif()
add_definitions(-DGLEW_STATIC)
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_space_view3d "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/space_view3d/SConscript b/source/blender/editors/space_view3d/SConscript
index 53bd7828b63..e412927f8ca 100644
--- a/source/blender/editors/space_view3d/SConscript
+++ b/source/blender/editors/space_view3d/SConscript
@@ -16,4 +16,7 @@ if env['WITH_BF_GAMEENGINE']:
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
env.BlenderLib ( 'bf_editors_space_view3d', sources, Split(incs), defines = defs, libtype=['core'], priority=[40] )
diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c
index e15252056cc..545ec42e72f 100644
--- a/source/blender/editors/space_view3d/drawanimviz.c
+++ b/source/blender/editors/space_view3d/drawanimviz.c
@@ -79,7 +79,7 @@ void draw_motion_paths_init(View3D *v3d, ARegion *ar)
}
/* Draw the given motion path for an Object or a Bone
- * - assumes that the viewport has already been initialised properly
+ * - assumes that the viewport has already been initialized properly
* i.e. draw_motion_paths_init() has been called
*/
void draw_motion_path_instance(Scene *scene,
@@ -210,7 +210,7 @@ void draw_motion_path_instance(Scene *scene,
UI_ThemeColor(TH_TEXT_HI);
}
- // XXX, this isnt up to date but probably should be kept so.
+ // XXX, this isn't up to date but probably should be kept so.
invert_m4_m4(ob->imat, ob->obmat);
/* Draw frame numbers at each framestep value */
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 54dff3e4786..aae0348de20 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -170,10 +170,18 @@ static short set_pchan_glColor (short colCode, int boneflag, short constflag)
glColor3ubv(cp);
}
else {
- if (boneflag & BONE_DRAW_ACTIVE && boneflag & BONE_SELECTED) UI_ThemeColorShade(TH_BONE_POSE, 40);
- else if (boneflag & BONE_DRAW_ACTIVE) UI_ThemeColorBlend(TH_WIRE, TH_BONE_POSE, 0.15f); /* unselected active */
- else if (boneflag & BONE_SELECTED) UI_ThemeColor(TH_BONE_POSE);
- else UI_ThemeColor(TH_WIRE);
+ if ((boneflag & BONE_DRAW_ACTIVE) && (boneflag & BONE_SELECTED)) {
+ UI_ThemeColorShade(TH_BONE_POSE, 40);
+ }
+ else if (boneflag & BONE_DRAW_ACTIVE) {
+ UI_ThemeColorBlend(TH_WIRE, TH_BONE_POSE, 0.15f); /* unselected active */
+ }
+ else if (boneflag & BONE_SELECTED) {
+ UI_ThemeColor(TH_BONE_POSE);
+ }
+ else {
+ UI_ThemeColor(TH_WIRE);
+ }
}
return 1;
@@ -290,10 +298,18 @@ static short set_pchan_glColor (short colCode, int boneflag, short constflag)
static void set_ebone_glColor(const unsigned int boneflag)
{
- if (boneflag & BONE_DRAW_ACTIVE && boneflag & BONE_SELECTED) UI_ThemeColor(TH_EDGE_SELECT);
- else if (boneflag & BONE_DRAW_ACTIVE) UI_ThemeColorBlend(TH_WIRE, TH_EDGE_SELECT, 0.15f); /* unselected active */
- else if (boneflag & BONE_SELECTED) UI_ThemeColorShade(TH_EDGE_SELECT, -20);
- else UI_ThemeColor(TH_WIRE);
+ if ((boneflag & BONE_DRAW_ACTIVE) && (boneflag & BONE_SELECTED)) {
+ UI_ThemeColor(TH_EDGE_SELECT);
+ }
+ else if (boneflag & BONE_DRAW_ACTIVE) {
+ UI_ThemeColorBlend(TH_WIRE, TH_EDGE_SELECT, 0.15f); /* unselected active */
+ }
+ else if (boneflag & BONE_SELECTED) {
+ UI_ThemeColorShade(TH_EDGE_SELECT, -20);
+ }
+ else {
+ UI_ThemeColor(TH_WIRE);
+ }
}
/* *************** Armature drawing, helper calls for parts ******************* */
@@ -1749,16 +1765,21 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
OB_SOLID, arm->flag, flag, index, bone->length);
}
}
- else if (arm->drawtype==ARM_LINE)
- ; /* nothing in solid */
- else if (arm->drawtype==ARM_WIRE)
- ; /* nothing in solid */
- else if (arm->drawtype==ARM_ENVELOPE)
+ else if (arm->drawtype == ARM_LINE) {
+ /* nothing in solid */
+ }
+ else if (arm->drawtype == ARM_WIRE) {
+ /* nothing in solid */
+ }
+ else if (arm->drawtype == ARM_ENVELOPE) {
draw_sphere_bone(OB_SOLID, arm->flag, flag, 0, index, pchan, NULL);
- else if (arm->drawtype==ARM_B_BONE)
+ }
+ else if (arm->drawtype == ARM_B_BONE) {
draw_b_bone(OB_SOLID, arm->flag, flag, 0, index, pchan, NULL);
- else
+ }
+ else {
draw_bone(OB_SOLID, arm->flag, flag, 0, index, bone->length);
+ }
glPopMatrix();
}
@@ -1843,7 +1864,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
if (index != -1)
index+= 0x10000; // pose bones count in higher 2 bytes only
}
- /* stick or wire bones have not been drawn yet so dont clear object selection in this case */
+ /* stick or wire bones have not been drawn yet so don't clear object selection in this case */
if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)==0 && draw_wire) {
/* object tag, for bordersel optim */
glLoadName(index & 0xFFFF);
@@ -1937,8 +1958,9 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
/* set color-set to use */
set_pchan_colorset(ob, pchan);
- if ((pchan->custom) && !(arm->flag & ARM_NO_CUSTOM))
- ; // custom bone shapes should not be drawn here!
+ if ((pchan->custom) && !(arm->flag & ARM_NO_CUSTOM)) {
+ /* custom bone shapes should not be drawn here! */
+ }
else if (arm->drawtype==ARM_ENVELOPE) {
if (dt < OB_SOLID)
draw_sphere_bone_wire(smat, imat, arm->flag, flag, constflag, index, pchan, NULL);
@@ -1973,7 +1995,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
draw_pose_dofs(ob);
/* finally names and axes */
- if (arm->flag & (ARM_DRAWNAMES|ARM_DRAWAXES) && is_outline == 0) {
+ if ((arm->flag & (ARM_DRAWNAMES|ARM_DRAWAXES)) && (is_outline == 0)) {
/* patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing */
if ((G.f & G_PICKSEL) == 0) {
float vec[3];
@@ -2543,7 +2565,7 @@ int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, in
draw_ebones(v3d, ar, ob, dt);
arm->flag &= ~ARM_EDITMODE;
}
- else{
+ else {
/* Draw Pose */
if (ob->pose && ob->pose->chanbase.first) {
/* drawing posemode selection indices or colors only in these cases */
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 651b0edb123..0ec9e9664f6 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -152,7 +152,7 @@ static DMDrawOption draw_mesh_face_select__setHiddenOpts(void *userData, int ind
else
return DM_DRAW_OPTION_SKIP;
}
- else if(flags & eEdge_Select)
+ else if (flags & eEdge_Select)
return DM_DRAW_OPTION_NORMAL;
else
return DM_DRAW_OPTION_SKIP;
@@ -294,7 +294,8 @@ static int set_draw_settings_cached(int clearcache, MTFace *texface, Material *m
if (textured!=c_textured || texface!=c_texface) {
if (textured ) {
c_badtex= !GPU_set_tpage(texface, !(litob->mode & OB_MODE_TEXTURE_PAINT), alphablend);
- }else {
+ }
+ else {
GPU_set_tpage(NULL, 0, 0);
c_badtex= 0;
}
@@ -404,7 +405,7 @@ static DMDrawOption draw_tface__set_draw_legacy(MTFace *tface, int has_mcol, int
glColor3ub(0xFF, 0x00, 0xFF);
return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */
}
- else if (ma && ma->shade_flag&MA_OBCOLOR) {
+ else if (ma && (ma->shade_flag&MA_OBCOLOR)) {
glColor3ubv(Gtexdraw.obcol);
return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */
}
@@ -444,7 +445,7 @@ static DMDrawOption draw_tface__set_draw(MTFace *tface, int has_mcol, int matnr)
if (tface && set_draw_settings_cached(0, tface, ma, Gtexdraw)) {
return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */
}
- else if (tface && tface->mode&TF_OBCOL) {
+ else if (tface && (tface->mode & TF_OBCOL)) {
return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */
}
else if (!has_mcol) {
@@ -461,7 +462,7 @@ static void add_tface_color_layer(DerivedMesh *dm)
MFace *mface = dm->getTessFaceArray(dm);
MCol *finalCol;
int i,j;
- MCol *mcol = dm->getTessFaceDataArray(dm, CD_WEIGHT_MCOL);
+ MCol *mcol = dm->getTessFaceDataArray(dm, CD_PREVIEW_MCOL);
if (!mcol)
mcol = dm->getTessFaceDataArray(dm, CD_MCOL);
@@ -486,7 +487,7 @@ static void add_tface_color_layer(DerivedMesh *dm)
finalCol[i*4+j].r = 255;
}
}
- else if (tface && tface->mode&TF_OBCOL) {
+ else if (tface && (tface->mode & TF_OBCOL)) {
for (j=0;j<4;j++) {
finalCol[i*4+j].b = FTOCHAR(Gtexdraw.obcol[0]);
finalCol[i*4+j].g = FTOCHAR(Gtexdraw.obcol[1]);
@@ -694,10 +695,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
lcol = &mloopcol[mp->loopstart];
for (j = 0; j <= totloop_clamp; j++, lcol++) {
- tmp_mcol[j].a = lcol->a;
- tmp_mcol[j].r = lcol->r;
- tmp_mcol[j].g = lcol->g;
- tmp_mcol[j].b = lcol->b;
+ MESH_MLOOPCOL_TO_MCOL(lcol, &tmp_mcol[j]);
}
}
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 925e8703577..2b45c73c961 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -56,6 +56,7 @@
#include "BLI_utildefines.h"
#include "BKE_anim.h" //for the where_on_path function
+#include "BKE_armature.h"
#include "BKE_camera.h"
#include "BKE_constraint.h" // for the get_constraint_target function
#include "BKE_curve.h"
@@ -193,11 +194,11 @@ static int check_ob_drawface_dot(Scene *sce, View3D *vd, char dt)
if ((vd->flag & V3D_ZBUF_SELECT) == 0)
return 1;
- /* if its drawing textures with zbuf sel, then dont draw dots */
+ /* if its drawing textures with zbuf sel, then don't draw dots */
if (dt==OB_TEXTURE && vd->drawtype==OB_TEXTURE)
return 0;
- if (vd->drawtype>=OB_SOLID && vd->flag2 & V3D_SOLID_TEX)
+ if ((vd->drawtype >= OB_SOLID) && (vd->flag2 & V3D_SOLID_TEX))
return 0;
return 1;
@@ -525,103 +526,105 @@ void drawaxes(float size, char drawtype)
float v3[3]= {0.0, 0.0, 0.0};
switch(drawtype) {
-
- case OB_PLAINAXES:
- for (axis=0; axis<3; axis++) {
+
+ case OB_PLAINAXES:
+ for (axis=0; axis<3; axis++) {
+ glBegin(GL_LINES);
+
+ v1[axis]= size;
+ v2[axis]= -size;
+ glVertex3fv(v1);
+ glVertex3fv(v2);
+
+ /* reset v1 & v2 to zero */
+ v1[axis]= v2[axis]= 0.0f;
+
+ glEnd();
+ }
+ break;
+ case OB_SINGLE_ARROW:
+
glBegin(GL_LINES);
-
- v1[axis]= size;
- v2[axis]= -size;
+ /* in positive z direction only */
+ v1[2]= size;
glVertex3fv(v1);
glVertex3fv(v2);
+ glEnd();
- /* reset v1 & v2 to zero */
- v1[axis]= v2[axis]= 0.0f;
+ /* square pyramid */
+ glBegin(GL_TRIANGLES);
+
+ v2[0]= size * 0.035f; v2[1] = size * 0.035f;
+ v3[0]= size * -0.035f; v3[1] = size * 0.035f;
+ v2[2]= v3[2]= size * 0.75f;
+
+ for (axis=0; axis<4; axis++) {
+ if (axis % 2 == 1) {
+ v2[0] = -v2[0];
+ v3[1] = -v3[1];
+ }
+ else {
+ v2[1] = -v2[1];
+ v3[0] = -v3[0];
+ }
+
+ glVertex3fv(v1);
+ glVertex3fv(v2);
+ glVertex3fv(v3);
- glEnd();
- }
- break;
- case OB_SINGLE_ARROW:
-
- glBegin(GL_LINES);
- /* in positive z direction only */
- v1[2]= size;
- glVertex3fv(v1);
- glVertex3fv(v2);
- glEnd();
-
- /* square pyramid */
- glBegin(GL_TRIANGLES);
-
- v2[0]= size * 0.035f; v2[1] = size * 0.035f;
- v3[0]= size * -0.035f; v3[1] = size * 0.035f;
- v2[2]= v3[2]= size * 0.75f;
-
- for (axis=0; axis<4; axis++) {
- if (axis % 2 == 1) {
- v2[0] = -v2[0];
- v3[1] = -v3[1];
- }
- else {
- v2[1] = -v2[1];
- v3[0] = -v3[0];
}
-
- glVertex3fv(v1);
- glVertex3fv(v2);
- glVertex3fv(v3);
-
- }
- glEnd();
-
- break;
- case OB_CUBE:
- drawcube_size(size);
- break;
-
- case OB_CIRCLE:
- drawcircle_size(size);
- break;
-
- case OB_EMPTY_SPHERE:
- draw_empty_sphere(size);
- break;
+ glEnd();
- case OB_EMPTY_CONE:
- draw_empty_cone(size);
- break;
+ break;
+ case OB_CUBE:
+ drawcube_size(size);
+ break;
- case OB_ARROWS:
- default:
- for (axis=0; axis<3; axis++) {
- const int arrow_axis= (axis==0) ? 1:0;
+ case OB_CIRCLE:
+ drawcircle_size(size);
+ break;
- glBegin(GL_LINES);
-
- v2[axis]= size;
- glVertex3fv(v1);
- glVertex3fv(v2);
+ case OB_EMPTY_SPHERE:
+ draw_empty_sphere(size);
+ break;
+
+ case OB_EMPTY_CONE:
+ draw_empty_cone(size);
+ break;
+
+ case OB_ARROWS:
+ default:
+ {
+ for (axis=0; axis<3; axis++) {
+ const int arrow_axis= (axis==0) ? 1:0;
+
+ glBegin(GL_LINES);
+
+ v2[axis]= size;
+ glVertex3fv(v1);
+ glVertex3fv(v2);
- v1[axis]= size*0.85f;
- v1[arrow_axis]= -size*0.08f;
- glVertex3fv(v1);
- glVertex3fv(v2);
+ v1[axis]= size*0.85f;
+ v1[arrow_axis]= -size*0.08f;
+ glVertex3fv(v1);
+ glVertex3fv(v2);
- v1[arrow_axis]= size*0.08f;
- glVertex3fv(v1);
- glVertex3fv(v2);
-
- glEnd();
+ v1[arrow_axis]= size*0.08f;
+ glVertex3fv(v1);
+ glVertex3fv(v2);
+
+ glEnd();
- v2[axis]+= size*0.125f;
-
- draw_xyz_wire(v2, size, axis);
-
-
- /* reset v1 & v2 to zero */
- v1[arrow_axis]= v1[axis]= v2[axis]= 0.0f;
+ v2[axis]+= size*0.125f;
+
+ draw_xyz_wire(v2, size, axis);
+
+
+ /* reset v1 & v2 to zero */
+ v1[arrow_axis]= v1[axis]= v2[axis]= 0.0f;
+ }
+ break;
}
- break;
}
}
@@ -939,21 +942,21 @@ static void drawcube(void)
{
glBegin(GL_LINE_STRIP);
- glVertex3fv(cube[0]); glVertex3fv(cube[1]);glVertex3fv(cube[2]); glVertex3fv(cube[3]);
- glVertex3fv(cube[0]); glVertex3fv(cube[4]);glVertex3fv(cube[5]); glVertex3fv(cube[6]);
- glVertex3fv(cube[7]); glVertex3fv(cube[4]);
+ glVertex3fv(cube[0]); glVertex3fv(cube[1]);glVertex3fv(cube[2]); glVertex3fv(cube[3]);
+ glVertex3fv(cube[0]); glVertex3fv(cube[4]);glVertex3fv(cube[5]); glVertex3fv(cube[6]);
+ glVertex3fv(cube[7]); glVertex3fv(cube[4]);
glEnd();
glBegin(GL_LINE_STRIP);
- glVertex3fv(cube[1]); glVertex3fv(cube[5]);
+ glVertex3fv(cube[1]); glVertex3fv(cube[5]);
glEnd();
glBegin(GL_LINE_STRIP);
- glVertex3fv(cube[2]); glVertex3fv(cube[6]);
+ glVertex3fv(cube[2]); glVertex3fv(cube[6]);
glEnd();
glBegin(GL_LINE_STRIP);
- glVertex3fv(cube[3]); glVertex3fv(cube[7]);
+ glVertex3fv(cube[3]); glVertex3fv(cube[7]);
glEnd();
}
@@ -963,25 +966,25 @@ static void drawcube(void)
static void drawcube_size(float size)
{
glBegin(GL_LINE_STRIP);
- glVertex3f(-size,-size,-size); glVertex3f(-size,-size,size);
- glVertex3f(-size,size,size); glVertex3f(-size,size,-size);
+ glVertex3f(-size,-size,-size); glVertex3f(-size,-size,size);
+ glVertex3f(-size,size,size); glVertex3f(-size,size,-size);
- glVertex3f(-size,-size,-size); glVertex3f(size,-size,-size);
- glVertex3f(size,-size,size); glVertex3f(size,size,size);
+ glVertex3f(-size,-size,-size); glVertex3f(size,-size,-size);
+ glVertex3f(size,-size,size); glVertex3f(size,size,size);
- glVertex3f(size,size,-size); glVertex3f(size,-size,-size);
+ glVertex3f(size,size,-size); glVertex3f(size,-size,-size);
glEnd();
glBegin(GL_LINE_STRIP);
- glVertex3f(-size,-size,size); glVertex3f(size,-size,size);
+ glVertex3f(-size,-size,size); glVertex3f(size,-size,size);
glEnd();
glBegin(GL_LINE_STRIP);
- glVertex3f(-size,size,size); glVertex3f(size,size,size);
+ glVertex3f(-size,size,size); glVertex3f(size,size,size);
glEnd();
glBegin(GL_LINE_STRIP);
- glVertex3f(-size,size,-size); glVertex3f(size,size,-size);
+ glVertex3f(-size,size,-size); glVertex3f(size,size,-size);
glEnd();
}
@@ -995,21 +998,21 @@ static void drawcube_size(const float size[3])
glBegin(GL_LINE_STRIP);
- glVertex3fv(cube[0]); glVertex3fv(cube[1]);glVertex3fv(cube[2]); glVertex3fv(cube[3]);
- glVertex3fv(cube[0]); glVertex3fv(cube[4]);glVertex3fv(cube[5]); glVertex3fv(cube[6]);
- glVertex3fv(cube[7]); glVertex3fv(cube[4]);
+ glVertex3fv(cube[0]); glVertex3fv(cube[1]);glVertex3fv(cube[2]); glVertex3fv(cube[3]);
+ glVertex3fv(cube[0]); glVertex3fv(cube[4]);glVertex3fv(cube[5]); glVertex3fv(cube[6]);
+ glVertex3fv(cube[7]); glVertex3fv(cube[4]);
glEnd();
glBegin(GL_LINE_STRIP);
- glVertex3fv(cube[1]); glVertex3fv(cube[5]);
+ glVertex3fv(cube[1]); glVertex3fv(cube[5]);
glEnd();
glBegin(GL_LINE_STRIP);
- glVertex3fv(cube[2]); glVertex3fv(cube[6]);
+ glVertex3fv(cube[2]); glVertex3fv(cube[6]);
glEnd();
glBegin(GL_LINE_STRIP);
- glVertex3fv(cube[3]); glVertex3fv(cube[7]);
+ glVertex3fv(cube[3]); glVertex3fv(cube[7]);
glEnd();
glPopMatrix();
@@ -1027,8 +1030,8 @@ static void drawshadbuflimits(Lamp *la, float mat[][4])
madd_v3_v3v3fl(end, mat[3], lavec, la->clipend);
glBegin(GL_LINE_STRIP);
- glVertex3fv(sta);
- glVertex3fv(end);
+ glVertex3fv(sta);
+ glVertex3fv(end);
glEnd();
glPointSize(3.0);
@@ -1150,7 +1153,7 @@ static void draw_transp_spot_volume(Lamp *la, float x, float z)
/* draw front side lighting */
glCullFace(GL_BACK);
- glBlendFunc(GL_ONE, GL_ONE);
+ glBlendFunc(GL_ONE, GL_ONE);
glColor4f(0.2f, 0.2f, 0.2f, 1.0f);
draw_spot_cone(la, x, z);
@@ -1224,7 +1227,7 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
/* restore */
if (ob->id.us>1)
glColor4fv(curcol);
-
+
/* Outer circle */
circrad = 3.0f*lampsize;
setlinestyle(3);
@@ -1233,9 +1236,7 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
/* draw dashed outer circle if shadow is on. remember some lamps can't have certain shadows! */
if (la->type!=LA_HEMI) {
- if ( (la->mode & LA_SHAD_RAY) ||
- ((la->mode & LA_SHAD_BUF) && (la->type==LA_SPOT))
- ) {
+ if ((la->mode & LA_SHAD_RAY) || ((la->mode & LA_SHAD_BUF) && (la->type == LA_SPOT))) {
drawcircball(GL_LINE_LOOP, vec, circrad + 3.0f*pixsize, imat);
}
}
@@ -1273,7 +1274,7 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
glTranslatef(-vec[0], -vec[1], -vec[2]);
- }
+ }
if (la->type==LA_LOCAL) {
if (la->mode & LA_SPHERE) {
@@ -1289,7 +1290,7 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
/* skip drawing extra info */
}
else if ((la->type==LA_SPOT) || (la->type==LA_YF_PHOTON)) {
- lvec[0]=lvec[1]= 0.0;
+ lvec[0]=lvec[1]= 0.0;
lvec[2] = 1.0;
x = rv3d->persmat[0][2];
y = rv3d->persmat[1][2];
@@ -1306,9 +1307,9 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
/* draw the angled sides of the cone */
glBegin(GL_LINE_STRIP);
- glVertex3fv(vvec);
- glVertex3fv(vec);
- glVertex3fv(lvec);
+ glVertex3fv(vvec);
+ glVertex3fv(vec);
+ glVertex3fv(lvec);
glEnd();
z = x*sqrtf(1.0f - y*y);
@@ -1324,13 +1325,13 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
tvec[2]= 0.0;
glBegin(GL_LINE_LOOP);
- glVertex3fv(tvec);
- tvec[1]= -z_abs; /* neg */
- glVertex3fv(tvec);
- tvec[0]= -z_abs; /* neg */
- glVertex3fv(tvec);
- tvec[1]= z_abs; /* pos */
- glVertex3fv(tvec);
+ glVertex3fv(tvec);
+ tvec[1]= -z_abs; /* neg */
+ glVertex3fv(tvec);
+ tvec[0]= -z_abs; /* neg */
+ glVertex3fv(tvec);
+ tvec[1]= z_abs; /* pos */
+ glVertex3fv(tvec);
glEnd();
}
else circ(0.0, 0.0, fabsf(z));
@@ -1359,8 +1360,8 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
interp_v3_v3v3(vvec_clip, vec, vvec, clipsta_fac);
glBegin(GL_LINE_STRIP);
- glVertex3fv(lvec_clip);
- glVertex3fv(vvec_clip);
+ glVertex3fv(lvec_clip);
+ glVertex3fv(vvec_clip);
glEnd();
}
}
@@ -1368,10 +1369,10 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
/* draw the line from the circle along the dist */
glBegin(GL_LINE_STRIP);
- vec[2] = -circrad;
- glVertex3fv(vec);
- vec[2]= -la->dist;
- glVertex3fv(vec);
+ vec[2] = -circrad;
+ glVertex3fv(vec);
+ vec[2]= -la->dist;
+ glVertex3fv(vec);
glEnd();
if (la->type==LA_HEMI) {
@@ -1390,17 +1391,16 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
glBegin(GL_LINE_STRIP);
for (steps=0; steps<6; steps++) {
- if (axis == 0 || axis == 1) { /* x axis up, x axis down */
+ if (axis == 0 || axis == 1) { /* x axis up, x axis down */
/* make the arcs start at the edge of the energy circle */
if (steps == 0) v[0] = dir*circrad;
else v[0] = v[0] + dir*(steps*outdist);
}
else if (axis == 2 || axis == 3) { /* y axis up, y axis down */
/* make the arcs start at the edge of the energy circle */
- if (steps == 0) v[1] = dir*circrad;
- else v[1] = v[1] + dir*(steps*outdist);
+ v[1] = (steps == 0) ? (dir * circrad) : (v[1] + dir * (steps * outdist));
}
-
+
v[2] = v[2] - steps*zdist;
glVertex3fv(v);
@@ -1421,7 +1421,7 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
else if (la->area_shape==LA_AREA_RECT)
fdrawbox(-la->area_size*0.5f, -la->area_sizey*0.5f, la->area_size*0.5f, la->area_sizey*0.5f);
- glBegin(GL_LINE_STRIP);
+ glBegin(GL_LINE_STRIP);
glVertex3f(0.0,0.0,-circrad);
glVertex3f(0.0,0.0,-la->dist);
glEnd();
@@ -1439,21 +1439,21 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
UI_GetThemeColor4ubv(TH_LAMP, col);
glColor4ubv(col);
-
+
glEnable(GL_BLEND);
if (vec[2]>0) vec[2] -= circrad;
else vec[2] += circrad;
glBegin(GL_LINE_STRIP);
- glVertex3fv(vec);
- vec[2]= 0;
- glVertex3fv(vec);
+ glVertex3fv(vec);
+ vec[2]= 0;
+ glVertex3fv(vec);
glEnd();
glPointSize(2.0);
glBegin(GL_POINTS);
- glVertex3fv(vec);
+ glVertex3fv(vec);
glEnd();
glPointSize(1.0);
@@ -1524,8 +1524,8 @@ static void draw_bundle_sphere(void)
}
static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D *v3d,
- MovieClip *clip, MovieTrackingObject *tracking_object, int flag,
- int *global_track_index, int draw_selected)
+ MovieClip *clip, MovieTrackingObject *tracking_object, int flag,
+ int *global_track_index, int draw_selected)
{
MovieTracking *tracking= &clip->tracking;
MovieTrackingTrack *track;
@@ -1572,65 +1572,65 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D
glLoadName(base->selcol + (tracknr<<16));
glPushMatrix();
- glTranslatef(track->bundle_pos[0], track->bundle_pos[1], track->bundle_pos[2]);
- glScalef(v3d->bundle_size/0.05f, v3d->bundle_size/0.05f, v3d->bundle_size/0.05f);
+ glTranslatef(track->bundle_pos[0], track->bundle_pos[1], track->bundle_pos[2]);
+ glScalef(v3d->bundle_size/0.05f, v3d->bundle_size/0.05f, v3d->bundle_size/0.05f);
- if (v3d->drawtype==OB_WIRE) {
- glDisable(GL_LIGHTING);
+ if (v3d->drawtype==OB_WIRE) {
+ glDisable(GL_LIGHTING);
+
+ if (selected) {
+ if (base==BASACT) UI_ThemeColor(TH_ACTIVE);
+ else UI_ThemeColor(TH_SELECT);
+ }
+ else {
+ if (track->flag&TRACK_CUSTOMCOLOR) glColor3fv(track->color);
+ else UI_ThemeColor(TH_WIRE);
+ }
+ drawaxes(0.05f, v3d->bundle_drawtype);
+
+ glEnable(GL_LIGHTING);
+ }
+ else if (v3d->drawtype>OB_WIRE) {
+ if (v3d->bundle_drawtype==OB_EMPTY_SPHERE) {
+ /* selection outline */
if (selected) {
if (base==BASACT) UI_ThemeColor(TH_ACTIVE);
else UI_ThemeColor(TH_SELECT);
- }
- else {
- if (track->flag&TRACK_CUSTOMCOLOR) glColor3fv(track->color);
- else UI_ThemeColor(TH_WIRE);
- }
- drawaxes(0.05f, v3d->bundle_drawtype);
-
- glEnable(GL_LIGHTING);
- }
- else if (v3d->drawtype>OB_WIRE) {
- if (v3d->bundle_drawtype==OB_EMPTY_SPHERE) {
- /* selection outline */
- if (selected) {
- if (base==BASACT) UI_ThemeColor(TH_ACTIVE);
- else UI_ThemeColor(TH_SELECT);
+ glLineWidth(2.f);
+ glDisable(GL_LIGHTING);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- glLineWidth(2.f);
- glDisable(GL_LIGHTING);
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ draw_bundle_sphere();
- draw_bundle_sphere();
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ glEnable(GL_LIGHTING);
+ glLineWidth(1.f);
+ }
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- glEnable(GL_LIGHTING);
- glLineWidth(1.f);
- }
+ if (track->flag&TRACK_CUSTOMCOLOR) glColor3fv(track->color);
+ else UI_ThemeColor(TH_BUNDLE_SOLID);
- if (track->flag&TRACK_CUSTOMCOLOR) glColor3fv(track->color);
- else UI_ThemeColor(TH_BUNDLE_SOLID);
+ draw_bundle_sphere();
+ }
+ else {
+ glDisable(GL_LIGHTING);
- draw_bundle_sphere();
+ if (selected) {
+ if (base==BASACT) UI_ThemeColor(TH_ACTIVE);
+ else UI_ThemeColor(TH_SELECT);
}
else {
- glDisable(GL_LIGHTING);
-
- if (selected) {
- if (base==BASACT) UI_ThemeColor(TH_ACTIVE);
- else UI_ThemeColor(TH_SELECT);
- }
- else {
- if (track->flag&TRACK_CUSTOMCOLOR) glColor3fv(track->color);
- else UI_ThemeColor(TH_WIRE);
- }
+ if (track->flag&TRACK_CUSTOMCOLOR) glColor3fv(track->color);
+ else UI_ThemeColor(TH_WIRE);
+ }
- drawaxes(0.05f, v3d->bundle_drawtype);
+ drawaxes(0.05f, v3d->bundle_drawtype);
- glEnable(GL_LIGHTING);
- }
+ glEnable(GL_LIGHTING);
}
+ }
glPopMatrix();
@@ -1662,13 +1662,13 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D
glLineWidth(2.0f);
glBegin(GL_LINE_STRIP);
- for (a= 0; a<reconstruction->camnr; a++, camera++) {
- glVertex3fv(camera->mat[3]);
- }
- glEnd();
+ for (a= 0; a<reconstruction->camnr; a++, camera++) {
+ glVertex3fv(camera->mat[3]);
+ }
+ glEnd();
- glLineWidth(1.0f);
- glEnable(GL_LIGHTING);
+ glLineWidth(1.0f);
+ glEnable(GL_LIGHTING);
}
}
}
@@ -1679,7 +1679,7 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D
}
static void draw_viewport_reconstruction(Scene *scene, Base *base, View3D *v3d, MovieClip *clip,
- int flag, int draw_selected)
+ int flag, int draw_selected)
{
MovieTracking *tracking= &clip->tracking;
MovieTrackingObject *tracking_object;
@@ -1702,7 +1702,7 @@ static void draw_viewport_reconstruction(Scene *scene, Base *base, View3D *v3d,
tracking_object= tracking->objects.first;
while (tracking_object) {
draw_viewport_object_reconstruction(scene, base, v3d, clip, tracking_object,
- flag, &global_track_index, draw_selected);
+ flag, &global_track_index, draw_selected);
tracking_object= tracking_object->next;
}
@@ -1787,7 +1787,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base
/* draw an outline arrow for inactive cameras and filled
* for active cameras. We actually draw both outline+filled
- * for active cameras so the wire can be seen side-on */
+ * for active cameras so the wire can be seen side-on */
for (i=0;i<2;i++) {
if (i==0) glBegin(GL_LINE_LOOP);
else if (i==1 && (ob == v3d->camera)) glBegin(GL_TRIANGLES);
@@ -1803,7 +1803,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base
tvec[0]= shift[0];
tvec[1]= shift[1] + ((1.1f * drawsize * (asp[1] + 0.7f)) * scale[1]);
glVertex3fv(tvec); /* top */
-
+
glEnd();
}
@@ -1811,7 +1811,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base
if (cam->flag & (CAM_SHOWLIMITS+CAM_SHOWMIST)) {
float nobmat[4][4];
World *wrld;
-
+
/* draw in normalized object matrix space */
copy_m4_m4(nobmat, ob->obmat);
normalize_m4(nobmat);
@@ -1829,7 +1829,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base
wrld= scene->world;
if (cam->flag & CAM_SHOWMIST)
if (wrld) draw_limit_line(wrld->miststa, wrld->miststa+wrld->mistdist, 0xFFFFFF);
-
+
glPopMatrix();
}
}
@@ -1905,7 +1905,7 @@ static void lattice_draw_verts(Lattice *lt, DispList *dl, short sel)
}
glPointSize(1.0);
- bglEnd();
+ bglEnd();
}
void lattice_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, BPoint *bp, int x, int y), void *userData)
@@ -1996,7 +1996,7 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob)
}
}
}
- }
+ }
glEnd();
/* restoration for weight colors */
@@ -2017,7 +2017,7 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob)
/* Note! - foreach funcs should be called while drawing or directly after
* if not, ED_view3d_init_mats_rv3d() can be used for selection tools
- * but would not give correct results with dupli's for eg. which dont
+ * but would not give correct results with dupli's for eg. which don't
* use the object matrix in the usual way */
static void mesh_foreachScreenVert__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s))
{
@@ -2092,11 +2092,11 @@ static void drawSelectedVertices(DerivedMesh *dm, Mesh *me)
}
static int is_co_in_region(ARegion *ar, const short co[2])
{
- return ( (co[0] != IS_CLIPPED) && /* may be the only initialized value, check first */
- (co[0] >= 0) &&
- (co[0] < ar->winx) &&
- (co[1] >= 0) &&
- (co[1] < ar->winy));
+ return ((co[0] != IS_CLIPPED) && /* may be the only initialized value, check first */
+ (co[0] >= 0) &&
+ (co[0] < ar->winx) &&
+ (co[1] >= 0) &&
+ (co[1] < ar->winy));
}
static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, float *v0co, float *v1co)
{
@@ -2374,7 +2374,7 @@ static void draw_dm_verts(BMEditMesh *em, DerivedMesh *dm, int sel, BMVert *eve_
bglEnd();
}
- /* Draw edges with color set based on selection */
+/* Draw edges with color set based on selection */
static DMDrawOption draw_dm_edges_sel__setDrawOptions(void *userData, int index)
{
BMEdge *eed;
@@ -2408,7 +2408,7 @@ static DMDrawOption draw_dm_edges_sel__setDrawOptions(void *userData, int index)
}
}
static void draw_dm_edges_sel(BMEditMesh *em, DerivedMesh *dm, unsigned char *baseCol,
- unsigned char *selCol, unsigned char *actCol, BMEdge *eed_act)
+ unsigned char *selCol, unsigned char *actCol, BMEdge *eed_act)
{
drawDMEdgesSel_userData data;
@@ -2420,7 +2420,7 @@ static void draw_dm_edges_sel(BMEditMesh *em, DerivedMesh *dm, unsigned char *ba
dm->drawMappedEdges(dm, draw_dm_edges_sel__setDrawOptions, &data);
}
- /* Draw edges */
+/* Draw edges */
static DMDrawOption draw_dm_edges__setDrawOptions(void *userData, int index)
{
if (BM_elem_flag_test(EDBM_get_edge_for_index(userData, index), BM_ELEM_HIDDEN))
@@ -2434,7 +2434,7 @@ static void draw_dm_edges(BMEditMesh *em, DerivedMesh *dm)
dm->drawMappedEdges(dm, draw_dm_edges__setDrawOptions, em);
}
- /* Draw edges with color interpolated based on selection */
+/* Draw edges with color interpolated based on selection */
static DMDrawOption draw_dm_edges_sel_interp__setDrawOptions(void *userData, int index)
{
if (BM_elem_flag_test(EDBM_get_edge_for_index(((void**)userData)[0], index), BM_ELEM_HIDDEN))
@@ -2449,10 +2449,10 @@ static void draw_dm_edges_sel_interp__setDrawInterpOptions(void *userData, int i
unsigned char *col0 = cols[(BM_elem_flag_test(eed->v1, BM_ELEM_SELECT))?2:1];
unsigned char *col1 = cols[(BM_elem_flag_test(eed->v2, BM_ELEM_SELECT))?2:1];
- glColor4ub( col0[0] + (col1[0]-col0[0])*t,
- col0[1] + (col1[1]-col0[1])*t,
- col0[2] + (col1[2]-col0[2])*t,
- col0[3] + (col1[3]-col0[3])*t);
+ glColor4ub(col0[0] + (col1[0] - col0[0]) * t,
+ col0[1] + (col1[1] - col0[1]) * t,
+ col0[2] + (col1[2] - col0[2]) * t,
+ col0[3] + (col1[3] - col0[3]) * t);
}
static void draw_dm_edges_sel_interp(BMEditMesh *em, DerivedMesh *dm, unsigned char *baseCol, unsigned char *selCol)
@@ -2462,7 +2462,7 @@ static void draw_dm_edges_sel_interp(BMEditMesh *em, DerivedMesh *dm, unsigned c
dm->drawMappedEdgesInterp(dm, draw_dm_edges_sel_interp__setDrawOptions, draw_dm_edges_sel_interp__setDrawInterpOptions, cols);
}
- /* Draw only seam edges */
+/* Draw only seam edges */
static DMDrawOption draw_dm_edges_seams__setDrawOptions(void *userData, int index)
{
BMEdge *eed = EDBM_get_edge_for_index(userData, index);
@@ -2478,7 +2478,7 @@ static void draw_dm_edges_seams(BMEditMesh *em, DerivedMesh *dm)
dm->drawMappedEdges(dm, draw_dm_edges_seams__setDrawOptions, em);
}
- /* Draw only sharp edges */
+/* Draw only sharp edges */
static DMDrawOption draw_dm_edges_sharp__setDrawOptions(void *userData, int index)
{
BMEdge *eed = EDBM_get_edge_for_index(userData, index);
@@ -2494,7 +2494,7 @@ static void draw_dm_edges_sharp(BMEditMesh *em, DerivedMesh *dm)
dm->drawMappedEdges(dm, draw_dm_edges_sharp__setDrawOptions, em);
}
- /* Draw only Freestyle feature edges */
+/* Draw only Freestyle feature edges */
static int draw_dm_edges_freestyle__setDrawOptions(void *userData, int index)
{
BMEdge *eed = EDBM_get_edge_for_index(userData, index);
@@ -2506,7 +2506,7 @@ static void draw_dm_edges_freestyle(BMEditMesh *em, DerivedMesh *dm)
dm->drawMappedEdges(dm, draw_dm_edges_freestyle__setDrawOptions, em);
}
- /* Draw faces with color set based on selection
+/* Draw faces with color set based on selection
* return 2 for the active face so it renders with stipple enabled */
static DMDrawOption draw_dm_faces_sel__setDrawOptions(void *userData, int index)
{
@@ -2565,7 +2565,7 @@ static int draw_dm_faces_sel__compareDrawOptions(void *userData, int index, int
/* also draws the active face */
static void draw_dm_faces_sel(BMEditMesh *em, DerivedMesh *dm, unsigned char *baseCol,
- unsigned char *selCol, unsigned char *markCol, unsigned char *actCol, BMFace *efa_act)
+ unsigned char *selCol, unsigned char *markCol, unsigned char *actCol, BMFace *efa_act)
{
drawDMFacesSel_userData data;
data.dm= dm;
@@ -2683,7 +2683,7 @@ static void draw_em_fancy_verts(Scene *scene, View3D *v3d, Object *obedit,
if (pass==0) {
if (v3d->zbuf && !(v3d->flag&V3D_ZBUF_SELECT)) {
glDisable(GL_DEPTH_TEST);
-
+
glEnable(GL_BLEND);
}
else {
@@ -2697,7 +2697,7 @@ static void draw_em_fancy_verts(Scene *scene, View3D *v3d, Object *obedit,
else {
col[3] = fcol[3] = 255;
}
-
+
if (ts->selectmode & SCE_SELECT_VERTEX) {
glPointSize(size);
glColor4ubv(col);
@@ -2734,13 +2734,13 @@ static void draw_em_fancy_edges(BMEditMesh *em, Scene *scene, View3D *v3d,
UI_GetThemeColor4ubv(TH_WIRE, wireCol);
UI_GetThemeColor4ubv(TH_EDITMESH_ACTIVE, actCol);
- /* when sel only is used, dont render wire, only selected, this is used for
+ /* when sel only is used, don't render wire, only selected, this is used for
* textured draw mode when the 'edges' option is disabled */
if (sel_only)
wireCol[3] = 0;
for (pass=0; pass<2; pass++) {
- /* show wires in transparant when no zbuf clipping for select */
+ /* show wires in transparant when no zbuf clipping for select */
if (pass==0) {
if (v3d->zbuf && (v3d->flag & V3D_ZBUF_SELECT)==0) {
glEnable(GL_BLEND);
@@ -2759,7 +2759,7 @@ static void draw_em_fancy_edges(BMEditMesh *em, Scene *scene, View3D *v3d,
if (ts->selectmode == SCE_SELECT_FACE) {
draw_dm_edges_sel(em, cageDM, wireCol, selCol, actCol, eed_act);
- }
+ }
else if ( (me->drawflag & ME_DRAWEDGES) || (ts->selectmode & SCE_SELECT_EDGE) ) {
if (cageDM->drawMappedEdgesInterp && (ts->selectmode & SCE_SELECT_VERTEX)) {
glShadeModel(GL_SMOOTH);
@@ -2906,15 +2906,16 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, BMEditMesh *em, UnitS
for (efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL);
- efa; efa=BM_iter_step(&iter)) {
+ efa; efa=BM_iter_step(&iter))
+ {
BMIter liter;
BMLoop *loop;
BM_face_center_bounds_calc(em->bm, efa, vmid);
for (loop = BM_iter_new(&liter, em->bm, BM_LOOPS_OF_FACE, efa);
- loop; loop = BM_iter_step(&liter)) {
-
+ loop; loop = BM_iter_step(&liter))
+ {
float v1[3], v2[3], v3[3];
copy_v3_v3(v1, loop->prev->v->co);
@@ -3071,14 +3072,14 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
glDisable(GL_LIGHTING);
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
}
-
+
// Setup for drawing wire over, disable zbuffer
// write to show selected edge wires better
UI_ThemeColor(TH_WIRE);
bglPolygonOffset(rv3d->dist, 1.0);
glDepthMask(0);
- }
+ }
else {
if (cageDM!=finalDM) {
UI_ThemeColorBlend(TH_WIRE, TH_BACK, 0.7);
@@ -3088,7 +3089,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
if (me->drawflag & ME_DRAWFACES) { /* transp faces */
unsigned char col1[4], col2[4], col3[4], col4[4];
-
+
UI_GetThemeColor4ubv(TH_FACE, col1);
UI_GetThemeColor4ubv(TH_FACE_SELECT, col2);
UI_GetThemeColor4ubv(TH_FREESTYLE_FACE_MARK, col3);
@@ -3097,8 +3098,8 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
glEnable(GL_BLEND);
glDepthMask(0); // disable write in zbuffer, needed for nice transp
- /* dont draw unselected faces, only selected, this is MUCH nicer when texturing */
- if CHECK_OB_DRAWTEXTURE(v3d, dt)
+ /* don't draw unselected faces, only selected, this is MUCH nicer when texturing */
+ if (CHECK_OB_DRAWTEXTURE(v3d, dt))
col1[3] = 0;
if (!(me->drawflag & ME_DRAW_FREESTYLE_FACE))
@@ -3114,7 +3115,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
* Make all other faces zero alpha except for the active
* */
unsigned char col1[4], col2[4], col3[4], col4[4];
- col1[3] = col2[3] = col3[3] = 0; /* dont draw */
+ col1[3] = col2[3] = col3[3] = 0; /* don't draw */
UI_GetThemeColor4ubv(TH_EDITMESH_ACTIVE, col4);
glEnable(GL_BLEND);
@@ -3129,7 +3130,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
/* here starts all fancy draw-extra over */
if ((me->drawflag & ME_DRAWEDGES)==0 && CHECK_OB_DRAWTEXTURE(v3d, dt)) {
- /* we are drawing textures and 'ME_DRAWEDGES' is disabled, dont draw any edges */
+ /* we are drawing textures and 'ME_DRAWEDGES' is disabled, don't draw any edges */
/* only draw selected edges otherwise there is no way of telling if a face is selected */
draw_em_fancy_edges(em, scene, v3d, me, cageDM, 1, eed_act);
@@ -3139,9 +3140,9 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
if (me->drawflag & ME_DRAWSEAMS) {
UI_ThemeColor(TH_EDGE_SEAM);
glLineWidth(2);
-
+
draw_dm_edges_seams(em, cageDM);
-
+
glColor3ub(0,0,0);
glLineWidth(1);
}
@@ -3149,13 +3150,13 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
if (me->drawflag & ME_DRAWSHARP) {
UI_ThemeColor(TH_EDGE_SHARP);
glLineWidth(2);
-
+
draw_dm_edges_sharp(em, cageDM);
-
+
glColor3ub(0,0,0);
glLineWidth(1);
}
-
+
if(me->drawflag & ME_DRAW_FREESTYLE_EDGE) {
UI_ThemeColor(TH_FREESTYLE_EDGE_MARK);
glLineWidth(2);
@@ -3222,7 +3223,7 @@ static void draw_mesh_object_outline(View3D *v3d, Object *ob, DerivedMesh *dm)
/* if transparent, we cannot draw the edges for solid select... edges have no material info.
* drawFacesSolid() doesn't draw the transparent faces */
if (ob->dtx & OB_DRAWTRANSP) {
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
dm->drawFacesSolid(dm, NULL, 0, GPU_enable_material);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
GPU_disable_material();
@@ -3230,7 +3231,7 @@ static void draw_mesh_object_outline(View3D *v3d, Object *ob, DerivedMesh *dm)
else {
dm->drawEdges(dm, 0, 1);
}
-
+
glLineWidth(1.0);
glDepthMask(1);
}
@@ -3253,7 +3254,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
/* Check to draw dynamic paint colors (or weights from WeightVG modifiers).
* Note: Last "preview-active" modifier in stack will win! */
- if (DM_get_tessface_data_layer(dm, CD_WEIGHT_MCOL) && modifiers_isPreview(ob))
+ if (DM_get_tessface_data_layer(dm, CD_PREVIEW_MCOL) && modifiers_isPreview(ob))
draw_flags |= DRAW_MODIFIERS_PREVIEW;
/* Unwanted combination */
@@ -3272,7 +3273,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW);
if (dt==OB_BOUNDBOX) {
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_WIRE)==0)
+ if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && v3d->drawtype >= OB_WIRE)==0)
draw_bounding_volume(scene, ob, ob->boundtype);
}
else if (hasHaloMat || (totface==0 && totedge==0)) {
@@ -3325,8 +3326,8 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
* rather than the shading, this is also forced in wire view */
GPU_enable_material(0, NULL);
dm->drawMappedFaces(dm, NULL, GPU_enable_material, NULL, me->mpoly,
- DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH);
-
+ DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH);
+
bglPolygonOffset(rv3d->dist, 1.0);
glDepthMask(0); // disable write in zbuffer, selected edge wires show better
@@ -3344,7 +3345,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
GPU_disable_material();
- /* since we already draw wire as wp guide, dont draw over the top */
+ /* since we already draw wire as wp guide, don't draw over the top */
draw_wire= OBDRAW_WIRE_OFF;
}
else if (draw_flags & DRAW_MODIFIERS_PREVIEW) {
@@ -3454,7 +3455,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
glEnable(GL_COLOR_MATERIAL);
dm->drawMappedFaces(dm, NULL, GPU_enable_material, NULL, me->mpoly,
- DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH);
+ DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH);
glDisable(GL_COLOR_MATERIAL);
glDisable(GL_LIGHTING);
@@ -3463,11 +3464,11 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
else if (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_TEXTURE_PAINT)) {
if (me->mloopcol)
dm->drawMappedFaces(dm, NULL, GPU_enable_material, NULL, NULL,
- DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH);
+ DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH);
else {
glColor3f(1.0f, 1.0f, 1.0f);
dm->drawMappedFaces(dm, NULL, GPU_enable_material, NULL, NULL,
- DM_DRAW_ALWAYS_SMOOTH);
+ DM_DRAW_ALWAYS_SMOOTH);
}
}
}
@@ -3486,7 +3487,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
glColor3ub(80,80,80);
}
else {
- if (ob->flag & OB_FROMGROUP)
+ if (ob->flag & OB_FROMGROUP)
UI_ThemeColor(TH_GROUP);
else {
if (ob->dtx & OB_DRAWWIRE && flag==DRAW_CONSTCOLOR)
@@ -3524,7 +3525,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
glDepthMask(0); // disable write in zbuffer, selected edge wires show better
}
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_SOLID)==0)
+ if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && v3d->drawtype >= OB_SOLID)==0)
dm->drawEdges(dm, (dt==OB_WIRE || totface==0), me->drawflag & ME_ALLEDGES);
if (dt!=OB_WIRE && (draw_wire == OBDRAW_WIRE_ON_DEPTH)) {
@@ -3566,8 +3567,8 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
}
if (obedit && ob!=obedit && ob->data==obedit->data) {
- if (ob_get_key(ob) || ob_get_key(obedit));
- else if (ob->modifiers.first || obedit->modifiers.first);
+ if (ob_get_key(ob) || ob_get_key(obedit)) {}
+ else if (ob->modifiers.first || obedit->modifiers.first) {}
else drawlinked= 1;
}
@@ -3578,7 +3579,7 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
finalDM = cageDM = editbmesh_get_derived_base(ob, em);
else
cageDM = editbmesh_get_derived_cage_and_final(scene, ob, em, &finalDM,
- scene->customdata_mask);
+ scene->customdata_mask);
if (dt>OB_WIRE) {
glsl = draw_glsl_material(scene, ob, v3d, dt);
@@ -3601,7 +3602,7 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
if (dt==OB_SOLID || glsl) {
GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl,
- (check_alpha)? &do_alpha_after: NULL);
+ (check_alpha)? &do_alpha_after: NULL);
}
draw_mesh_fancy(scene, ar, v3d, rv3d, base, dt, flag);
@@ -3646,84 +3647,84 @@ static int drawDispListwire(ListBase *dlbase)
if (dlbase==NULL) return 1;
glEnableClientState(GL_VERTEX_ARRAY);
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
for (dl= dlbase->first; dl; dl= dl->next) {
if (dl->parts==0 || dl->nr==0)
continue;
data= dl->verts;
-
+
switch(dl->type) {
- case DL_SEGM:
-
- glVertexPointer(3, GL_FLOAT, 0, data);
-
- for (parts=0; parts<dl->parts; parts++)
- glDrawArrays(GL_LINE_STRIP, parts*dl->nr, dl->nr);
-
- break;
- case DL_POLY:
-
- glVertexPointer(3, GL_FLOAT, 0, data);
-
- for (parts=0; parts<dl->parts; parts++)
- glDrawArrays(GL_LINE_LOOP, parts*dl->nr, dl->nr);
-
- break;
- case DL_SURF:
-
- glVertexPointer(3, GL_FLOAT, 0, data);
-
- for (parts=0; parts<dl->parts; parts++) {
- if (dl->flag & DL_CYCL_U)
- glDrawArrays(GL_LINE_LOOP, parts*dl->nr, dl->nr);
- else
+ case DL_SEGM:
+
+ glVertexPointer(3, GL_FLOAT, 0, data);
+
+ for (parts=0; parts<dl->parts; parts++)
glDrawArrays(GL_LINE_STRIP, parts*dl->nr, dl->nr);
- }
-
- for (nr=0; nr<dl->nr; nr++) {
- int ofs= 3*dl->nr;
- data= ( dl->verts )+3*nr;
- parts= dl->parts;
+ break;
+ case DL_POLY:
- if (dl->flag & DL_CYCL_V) glBegin(GL_LINE_LOOP);
- else glBegin(GL_LINE_STRIP);
-
- while (parts--) {
- glVertex3fv(data);
- data+=ofs;
+ glVertexPointer(3, GL_FLOAT, 0, data);
+
+ for (parts=0; parts<dl->parts; parts++)
+ glDrawArrays(GL_LINE_LOOP, parts*dl->nr, dl->nr);
+
+ break;
+ case DL_SURF:
+
+ glVertexPointer(3, GL_FLOAT, 0, data);
+
+ for (parts=0; parts<dl->parts; parts++) {
+ if (dl->flag & DL_CYCL_U)
+ glDrawArrays(GL_LINE_LOOP, parts*dl->nr, dl->nr);
+ else
+ glDrawArrays(GL_LINE_STRIP, parts*dl->nr, dl->nr);
}
- glEnd();
-
- /* (ton) this code crashes for me when resolv is 86 or higher... no clue */
+
+ for (nr=0; nr<dl->nr; nr++) {
+ int ofs= 3*dl->nr;
+
+ data= ( dl->verts )+3*nr;
+ parts= dl->parts;
+
+ if (dl->flag & DL_CYCL_V) glBegin(GL_LINE_LOOP);
+ else glBegin(GL_LINE_STRIP);
+
+ while (parts--) {
+ glVertex3fv(data);
+ data+=ofs;
+ }
+ glEnd();
+
+/* (ton) this code crashes for me when resolv is 86 or higher... no clue */
// glVertexPointer(3, GL_FLOAT, sizeof(float)*3*dl->nr, data + 3*nr);
// if (dl->flag & DL_CYCL_V)
// glDrawArrays(GL_LINE_LOOP, 0, dl->parts);
// else
// glDrawArrays(GL_LINE_STRIP, 0, dl->parts);
- }
- break;
-
- case DL_INDEX3:
- if (draw_index_wire) {
- glVertexPointer(3, GL_FLOAT, 0, dl->verts);
- glDrawElements(GL_TRIANGLES, 3*dl->parts, GL_UNSIGNED_INT, dl->index);
- }
- break;
-
- case DL_INDEX4:
- if (draw_index_wire) {
- glVertexPointer(3, GL_FLOAT, 0, dl->verts);
- glDrawElements(GL_QUADS, 4*dl->parts, GL_UNSIGNED_INT, dl->index);
- }
- break;
+ }
+ break;
+
+ case DL_INDEX3:
+ if (draw_index_wire) {
+ glVertexPointer(3, GL_FLOAT, 0, dl->verts);
+ glDrawElements(GL_TRIANGLES, 3*dl->parts, GL_UNSIGNED_INT, dl->index);
+ }
+ break;
+
+ case DL_INDEX4:
+ if (draw_index_wire) {
+ glVertexPointer(3, GL_FLOAT, 0, dl->verts);
+ glDrawElements(GL_QUADS, 4*dl->parts, GL_UNSIGNED_INT, dl->index);
+ }
+ break;
}
}
glDisableClientState(GL_VERTEX_ARRAY);
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
return 0;
}
@@ -3756,88 +3757,88 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl)
ndata= dl->nors;
switch(dl->type) {
- case DL_SEGM:
- if (ob->type==OB_SURF) {
- int nr;
+ case DL_SEGM:
+ if (ob->type==OB_SURF) {
+ int nr;
- glDisable(GL_LIGHTING);
- glColor3fv(curcol);
-
- // glVertexPointer(3, GL_FLOAT, 0, dl->verts);
- // glDrawArrays(GL_LINE_STRIP, 0, dl->nr);
+ glDisable(GL_LIGHTING);
+ glColor3fv(curcol);
- glBegin(GL_LINE_STRIP);
- for (nr= dl->nr; nr; nr--, data+=3)
- glVertex3fv(data);
- glEnd();
+ // glVertexPointer(3, GL_FLOAT, 0, dl->verts);
+ // glDrawArrays(GL_LINE_STRIP, 0, dl->nr);
- glEnable(GL_LIGHTING);
- }
- break;
- case DL_POLY:
- if (ob->type==OB_SURF) {
- int nr;
+ glBegin(GL_LINE_STRIP);
+ for (nr= dl->nr; nr; nr--, data+=3)
+ glVertex3fv(data);
+ glEnd();
- glDisable(GL_LIGHTING);
-
- /* for some reason glDrawArrays crashes here in half of the platforms (not osx) */
- //glVertexPointer(3, GL_FLOAT, 0, dl->verts);
- //glDrawArrays(GL_LINE_LOOP, 0, dl->nr);
-
- glBegin(GL_LINE_LOOP);
- for (nr= dl->nr; nr; nr--, data+=3)
- glVertex3fv(data);
- glEnd();
-
- glEnable(GL_LIGHTING);
+ glEnable(GL_LIGHTING);
+ }
break;
- }
- case DL_SURF:
-
- if (dl->index) {
+ case DL_POLY:
+ if (ob->type==OB_SURF) {
+ int nr;
+
+ glDisable(GL_LIGHTING);
+
+ /* for some reason glDrawArrays crashes here in half of the platforms (not osx) */
+ //glVertexPointer(3, GL_FLOAT, 0, dl->verts);
+ //glDrawArrays(GL_LINE_LOOP, 0, dl->nr);
+
+ glBegin(GL_LINE_LOOP);
+ for (nr= dl->nr; nr; nr--, data+=3)
+ glVertex3fv(data);
+ glEnd();
+
+ glEnable(GL_LIGHTING);
+ break;
+ }
+ case DL_SURF:
+
+ if (dl->index) {
+ GPU_enable_material(dl->col+1, (glsl)? &gattribs: NULL);
+
+ if (dl->rt & CU_SMOOTH) glShadeModel(GL_SMOOTH);
+ else glShadeModel(GL_FLAT);
+
+ glEnableClientState(GL_NORMAL_ARRAY);
+ glVertexPointer(3, GL_FLOAT, 0, dl->verts);
+ glNormalPointer(GL_FLOAT, 0, dl->nors);
+ glDrawElements(GL_QUADS, 4*dl->totindex, GL_UNSIGNED_INT, dl->index);
+ glDisableClientState(GL_NORMAL_ARRAY);
+ }
+ break;
+
+ case DL_INDEX3:
GPU_enable_material(dl->col+1, (glsl)? &gattribs: NULL);
-
- if (dl->rt & CU_SMOOTH) glShadeModel(GL_SMOOTH);
- else glShadeModel(GL_FLAT);
- glEnableClientState(GL_NORMAL_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, dl->verts);
- glNormalPointer(GL_FLOAT, 0, dl->nors);
- glDrawElements(GL_QUADS, 4*dl->totindex, GL_UNSIGNED_INT, dl->index);
- glDisableClientState(GL_NORMAL_ARRAY);
- }
- break;
- case DL_INDEX3:
- GPU_enable_material(dl->col+1, (glsl)? &gattribs: NULL);
-
- glVertexPointer(3, GL_FLOAT, 0, dl->verts);
-
- /* voor polys only one normal needed */
- if (index3_nors_incr) {
+ /* voor polys only one normal needed */
+ if (index3_nors_incr) {
+ glEnableClientState(GL_NORMAL_ARRAY);
+ glNormalPointer(GL_FLOAT, 0, dl->nors);
+ }
+ else
+ glNormal3fv(ndata);
+
+ glDrawElements(GL_TRIANGLES, 3*dl->parts, GL_UNSIGNED_INT, dl->index);
+
+ if (index3_nors_incr)
+ glDisableClientState(GL_NORMAL_ARRAY);
+
+ break;
+
+ case DL_INDEX4:
+ GPU_enable_material(dl->col+1, (glsl)? &gattribs: NULL);
+
glEnableClientState(GL_NORMAL_ARRAY);
+ glVertexPointer(3, GL_FLOAT, 0, dl->verts);
glNormalPointer(GL_FLOAT, 0, dl->nors);
- }
- else
- glNormal3fv(ndata);
-
- glDrawElements(GL_TRIANGLES, 3*dl->parts, GL_UNSIGNED_INT, dl->index);
-
- if (index3_nors_incr)
+ glDrawElements(GL_QUADS, 4*dl->parts, GL_UNSIGNED_INT, dl->index);
glDisableClientState(GL_NORMAL_ARRAY);
- break;
-
- case DL_INDEX4:
- GPU_enable_material(dl->col+1, (glsl)? &gattribs: NULL);
-
- glEnableClientState(GL_NORMAL_ARRAY);
- glVertexPointer(3, GL_FLOAT, 0, dl->verts);
- glNormalPointer(GL_FLOAT, 0, dl->nors);
- glDrawElements(GL_QUADS, 4*dl->parts, GL_UNSIGNED_INT, dl->index);
- glDisableClientState(GL_NORMAL_ARRAY);
-
- break;
+ break;
}
dl= dl->next;
}
@@ -3879,7 +3880,7 @@ static int drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d, B
GPU_end_object_materials();
}
else {
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_SOLID)==0)
+ if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && v3d->drawtype >= OB_SOLID)==0)
drawCurveDMWired (ob);
}
@@ -3902,88 +3903,64 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
}
switch(ob->type) {
- case OB_FONT:
- case OB_CURVE:
- cu= ob->data;
-
- lb= &ob->disp;
-
- if (solid) {
- dl= lb->first;
- if (dl==NULL) return 1;
+ case OB_FONT:
+ case OB_CURVE:
+ cu= ob->data;
- if (dl->nors==NULL) addnormalsDispList(lb);
- index3_nors_incr= 0;
-
- if ( displist_has_faces(lb)==0) {
- if (!render_only) {
- draw_index_wire= 0;
- drawDispListwire(lb);
- draw_index_wire= 1;
- }
- }
- else {
- if (draw_glsl_material(scene, ob, v3d, dt)) {
- GPU_begin_object_materials(v3d, rv3d, scene, ob, 1, NULL);
- drawDispListsolid(lb, ob, 1);
- GPU_end_object_materials();
+ lb= &ob->disp;
+
+ if (solid) {
+ dl= lb->first;
+ if (dl==NULL) return 1;
+
+ if (dl->nors==NULL) addnormalsDispList(lb);
+ index3_nors_incr= 0;
+
+ if ( displist_has_faces(lb)==0) {
+ if (!render_only) {
+ draw_index_wire= 0;
+ drawDispListwire(lb);
+ draw_index_wire= 1;
+ }
}
else {
- GPU_begin_object_materials(v3d, rv3d, scene, ob, 0, NULL);
- drawDispListsolid(lb, ob, 0);
- GPU_end_object_materials();
+ if (draw_glsl_material(scene, ob, v3d, dt)) {
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, 1, NULL);
+ drawDispListsolid(lb, ob, 1);
+ GPU_end_object_materials();
+ }
+ else {
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, 0, NULL);
+ drawDispListsolid(lb, ob, 0);
+ GPU_end_object_materials();
+ }
+ if (cu->editnurb && cu->bevobj==NULL && cu->taperobj==NULL && cu->ext1 == 0.0f && cu->ext2 == 0.0f) {
+ cpack(0);
+ draw_index_wire= 0;
+ drawDispListwire(lb);
+ draw_index_wire= 1;
+ }
}
- if (cu->editnurb && cu->bevobj==NULL && cu->taperobj==NULL && cu->ext1 == 0.0f && cu->ext2 == 0.0f) {
- cpack(0);
+ index3_nors_incr= 1;
+ }
+ else {
+ if (!render_only || (render_only && displist_has_faces(lb))) {
draw_index_wire= 0;
- drawDispListwire(lb);
+ retval= drawDispListwire(lb);
draw_index_wire= 1;
}
}
- index3_nors_incr= 1;
- }
- else {
- if (!render_only || (render_only && displist_has_faces(lb))) {
- draw_index_wire= 0;
- retval= drawDispListwire(lb);
- draw_index_wire= 1;
- }
- }
- break;
- case OB_SURF:
+ break;
+ case OB_SURF:
- lb= &ob->disp;
-
- if (solid) {
- dl= lb->first;
- if (dl==NULL) return 1;
-
- if (dl->nors==NULL) addnormalsDispList(lb);
-
- if (draw_glsl_material(scene, ob, v3d, dt)) {
- GPU_begin_object_materials(v3d, rv3d, scene, ob, 1, NULL);
- drawDispListsolid(lb, ob, 1);
- GPU_end_object_materials();
- }
- else {
- GPU_begin_object_materials(v3d, rv3d, scene, ob, 0, NULL);
- drawDispListsolid(lb, ob, 0);
- GPU_end_object_materials();
- }
- }
- else {
- retval= drawDispListwire(lb);
- }
- break;
- case OB_MBALL:
-
- if ( is_basis_mball(ob)) {
lb= &ob->disp;
- if (lb->first==NULL) makeDispListMBall(scene, ob);
- if (lb->first==NULL) return 1;
-
+
if (solid) {
-
+ dl= lb->first;
+ if (dl==NULL) return 1;
+
+ if (dl->nors==NULL) addnormalsDispList(lb);
+
if (draw_glsl_material(scene, ob, v3d, dt)) {
GPU_begin_object_materials(v3d, rv3d, scene, ob, 1, NULL);
drawDispListsolid(lb, ob, 1);
@@ -3995,12 +3972,36 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
GPU_end_object_materials();
}
}
- else{
- /* MetaBalls use DL_INDEX4 type of DispList */
+ else {
retval= drawDispListwire(lb);
}
- }
- break;
+ break;
+ case OB_MBALL:
+
+ if ( is_basis_mball(ob)) {
+ lb= &ob->disp;
+ if (lb->first==NULL) makeDispListMBall(scene, ob);
+ if (lb->first==NULL) return 1;
+
+ if (solid) {
+
+ if (draw_glsl_material(scene, ob, v3d, dt)) {
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, 1, NULL);
+ drawDispListsolid(lb, ob, 1);
+ GPU_end_object_materials();
+ }
+ else {
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, 0, NULL);
+ drawDispListsolid(lb, ob, 0);
+ GPU_end_object_materials();
+ }
+ }
+ else {
+ /* MetaBalls use DL_INDEX4 type of DispList */
+ retval= drawDispListwire(lb);
+ }
+ }
+ break;
}
return retval;
@@ -4022,7 +4023,7 @@ static void draw_particle_arrays(int draw_as, int totpoint, int ob_dt, int selec
if (ob_dt<=OB_WIRE || select)
glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
else
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glDrawArrays(GL_QUADS, 0, 4*totpoint);
break;
@@ -4093,13 +4094,13 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix
add_v3_v3(vec, state->co);
copy_v3_v3(pdd->vd,vec); pdd->vd+=3;
copy_v3_v3(pdd->vd,vec2); pdd->vd+=3;
-
+
vec[1]=2.0f*pixsize;
vec[0]=vec[2]=0.0;
mul_qt_v3(state->rot,vec);
if (draw_as==PART_DRAW_AXIS) {
copy_v3_v3(vec2,state->co);
- }
+ }
else sub_v3_v3v3(vec2, state->co, vec);
add_v3_v3(vec, state->co);
@@ -4220,7 +4221,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
/* don't draw normal paths in edit mode */
if (psys_in_edit_mode(scene, psys) && (pset->flag & PE_DRAW_PART)==0)
return;
-
+
if (part->draw_as == PART_DRAW_REND)
draw_as = part->ren_as;
else
@@ -4356,8 +4357,10 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
}
if (ELEM3(draw_as, PART_DRAW_DOT, PART_DRAW_CROSS, PART_DRAW_LINE)
- && part->draw_col > PART_DRAW_COL_MAT)
+ && part->draw_col > PART_DRAW_COL_MAT)
+ {
create_cdata = 1;
+ }
if (!create_cdata && pdd && pdd->cdata) {
MEM_freeN(pdd->cdata);
@@ -4436,8 +4439,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
/* circles don't use drawdata, so have to add a special case here */
if ((pdd || draw_as==PART_DRAW_CIRC) && draw_as!=PART_DRAW_PATH) {
/* 5. */
- if (pdd && (pdd->flag & PARTICLE_DRAW_DATA_UPDATED)
- && (pdd->vedata || part->draw & (PART_DRAW_SIZE|PART_DRAW_NUM|PART_DRAW_HEALTH))==0) {
+ if (pdd && (pdd->flag & PARTICLE_DRAW_DATA_UPDATED) &&
+ (pdd->vedata || part->draw & (PART_DRAW_SIZE|PART_DRAW_NUM|PART_DRAW_HEALTH))==0)
+ {
totpoint = pdd->totpoint; /* draw data is up to date */
}
else for (a=0,pa=pars; a<totpart+totchild; a++, pa++) {
@@ -4473,7 +4477,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
weight_to_rgb(ma_col, intensity);
}
}
- else{
+ else {
ChildParticle *cpa= &psys->child[a-totpart];
pa_time=psys_get_child_time(psys,cpa,cfra,&pa_birthtime,&pa_dietime);
@@ -4754,7 +4758,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
glNormalPointer(GL_FLOAT, 0, pdd->ndata);
glEnable(GL_LIGHTING);
}
- else{
+ else {
glDisableClientState(GL_NORMAL_ARRAY);
glDisable(GL_LIGHTING);
}
@@ -4921,7 +4925,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit)
if (key->flag&PEK_SELECT) {
copy_v3_v3(cd,sel_col);
}
- else{
+ else {
copy_v3_v3(cd,nosel_col);
}
@@ -4934,7 +4938,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit)
cd=cdata;
pd=pdata;
for (i=0, point=edit->points; i<totpoint; i++, point++) {
- if (point->flag & PEP_HIDE)
+ if (point->flag & PEP_HIDE || point->totkey == 0)
continue;
if (point->keys->flag & PEK_USE_WCO)
@@ -4954,7 +4958,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit)
}
else if (pset->selectmode == SCE_SELECT_END) {
for (i=0, point=edit->points; i<totpoint; i++, point++) {
- if ((point->flag & PEP_HIDE)==0) {
+ if ((point->flag & PEP_HIDE)==0 && point->totkey) {
key = point->keys + point->totkey - 1;
if (key->flag & PEK_SELECT)
glColor3fv(sel_col);
@@ -4997,12 +5001,12 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
root[0] = -drw_size;
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
+ glVertex3fv(root);
tip[1] = tip[2] = 0.0f;
tip[0] = drw_size;
mul_m3_v3(tr,tip);
add_v3_v3(tip, com);
- glVertex3fv(tip);
+ glVertex3fv(tip);
glEnd();
root[1] =0.0f; root[2] = tw;
@@ -5010,8 +5014,8 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
glBegin(GL_LINES);
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
- glVertex3fv(tip);
+ glVertex3fv(root);
+ glVertex3fv(tip);
glEnd();
root[1] =0.0f; root[2] = -tw;
@@ -5019,8 +5023,8 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
glBegin(GL_LINES);
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
- glVertex3fv(tip);
+ glVertex3fv(root);
+ glVertex3fv(tip);
glEnd();
root[1] = tw; root[2] = 0.0f;
@@ -5028,8 +5032,8 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
glBegin(GL_LINES);
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
- glVertex3fv(tip);
+ glVertex3fv(root);
+ glVertex3fv(tip);
glEnd();
root[1] =-tw; root[2] = 0.0f;
@@ -5037,8 +5041,8 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
glBegin(GL_LINES);
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
- glVertex3fv(tip);
+ glVertex3fv(root);
+ glVertex3fv(tip);
glEnd();
glColor4ub(0x00, 0x7F, 0x00, 155);
@@ -5048,12 +5052,12 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
root[1] = -drw_size;
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
+ glVertex3fv(root);
tip[0] = tip[2] = 0.0f;
tip[1] = drw_size;
mul_m3_v3(tr,tip);
add_v3_v3(tip, com);
- glVertex3fv(tip);
+ glVertex3fv(tip);
glEnd();
root[0] =0.0f; root[2] = tw;
@@ -5061,8 +5065,8 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
glBegin(GL_LINES);
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
- glVertex3fv(tip);
+ glVertex3fv(root);
+ glVertex3fv(tip);
glEnd();
root[0] = 0.0f; root[2] = -tw;
@@ -5070,8 +5074,8 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
glBegin(GL_LINES);
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
- glVertex3fv(tip);
+ glVertex3fv(root);
+ glVertex3fv(tip);
glEnd();
root[0] = tw; root[2] = 0.0f;
@@ -5079,8 +5083,8 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
glBegin(GL_LINES);
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
- glVertex3fv(tip);
+ glVertex3fv(root);
+ glVertex3fv(tip);
glEnd();
root[0] =-tw; root[2] = 0.0f;
@@ -5088,8 +5092,8 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
glBegin(GL_LINES);
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
- glVertex3fv(tip);
+ glVertex3fv(root);
+ glVertex3fv(tip);
glEnd();
glColor4ub(0x00, 0x00, 0x7F, 155);
@@ -5098,12 +5102,12 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
root[2] = -drw_size;
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
+ glVertex3fv(root);
tip[0] = tip[1] = 0.0f;
tip[2] = drw_size;
mul_m3_v3(tr,tip);
add_v3_v3(tip, com);
- glVertex3fv(tip);
+ glVertex3fv(tip);
glEnd();
root[0] =0.0f; root[1] = tw;
@@ -5111,8 +5115,8 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
glBegin(GL_LINES);
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
- glVertex3fv(tip);
+ glVertex3fv(root);
+ glVertex3fv(tip);
glEnd();
root[0] =0.0f; root[1] = -tw;
@@ -5120,8 +5124,8 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
glBegin(GL_LINES);
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
- glVertex3fv(tip);
+ glVertex3fv(root);
+ glVertex3fv(tip);
glEnd();
root[0] = tw; root[1] = 0.0f;
@@ -5129,8 +5133,8 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
glBegin(GL_LINES);
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
- glVertex3fv(tip);
+ glVertex3fv(root);
+ glVertex3fv(tip);
glEnd();
root[0] = -tw; root[1] = 0.0f;
@@ -5138,8 +5142,8 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float
glBegin(GL_LINES);
mul_m3_v3(tr,root);
add_v3_v3(root, com);
- glVertex3fv(root);
- glVertex3fv(tip);
+ glVertex3fv(root);
+ glVertex3fv(tip);
glEnd();
}
@@ -5153,12 +5157,12 @@ static void tekenhandlesN(Nurb *nu, short sel, short hide_handles)
if (nu->hide || hide_handles) return;
- glBegin(GL_LINES);
+ glBegin(GL_LINES);
if (nu->type == CU_BEZIER) {
#define TH_HANDLE_COL_TOT ((TH_HANDLE_SEL_FREE - TH_HANDLE_FREE) + 1)
- /* use MIN2 when indexing to ensure newer files dont read outside the array */
+ /* use MIN2 when indexing to ensure newer files don't read outside the array */
unsigned char handle_cols[TH_HANDLE_COL_TOT][3];
const int basecol= sel ? TH_HANDLE_SEL_FREE : TH_HANDLE_FREE;
@@ -5175,25 +5179,25 @@ static void tekenhandlesN(Nurb *nu, short sel, short hide_handles)
glColor3ubv(handle_cols[MIN2(bezt->h1, TH_HANDLE_COL_TOT-1)]);
glVertex3fv(fp);
- glVertex3fv(fp+3);
+ glVertex3fv(fp+3);
glColor3ubv(handle_cols[MIN2(bezt->h2, TH_HANDLE_COL_TOT-1)]);
- glVertex3fv(fp+3);
- glVertex3fv(fp+6);
+ glVertex3fv(fp+3);
+ glVertex3fv(fp+6);
}
else if ( (bezt->f1 & SELECT)==sel) {
fp= bezt->vec[0];
glColor3ubv(handle_cols[MIN2(bezt->h1, TH_HANDLE_COL_TOT-1)]);
- glVertex3fv(fp);
- glVertex3fv(fp+3);
+ glVertex3fv(fp);
+ glVertex3fv(fp+3);
}
else if ( (bezt->f3 & SELECT)==sel) {
fp= bezt->vec[1];
glColor3ubv(handle_cols[MIN2(bezt->h2, TH_HANDLE_COL_TOT-1)]);
- glVertex3fv(fp);
- glVertex3fv(fp+3);
+ glVertex3fv(fp);
+ glVertex3fv(fp+3);
}
}
bezt++;
@@ -5391,87 +5395,56 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel)
while (nu) {
if (nu->hide==0) {
switch(nu->type) {
- case CU_POLY:
- if (!sel && index== cu->actnu) {
- /* we should draw active spline highlight below everything */
- editnurb_draw_active_poly(nu);
- }
-
- UI_ThemeColor(TH_NURB_ULINE);
- bp= nu->bp;
- for (b=0; b<nu->pntsv; b++) {
- if (nu->flagu & 1) glBegin(GL_LINE_LOOP);
- else glBegin(GL_LINE_STRIP);
-
- for (a=0; a<nu->pntsu; a++, bp++) {
- glVertex3fv(bp->vec);
+ case CU_POLY:
+ if (!sel && index== cu->actnu) {
+ /* we should draw active spline highlight below everything */
+ editnurb_draw_active_poly(nu);
}
- glEnd();
- }
- break;
- case CU_NURBS:
- if (!sel && index== cu->actnu) {
- /* we should draw active spline highlight below everything */
- editnurb_draw_active_nurbs(nu);
- }
+ UI_ThemeColor(TH_NURB_ULINE);
+ bp= nu->bp;
+ for (b=0; b<nu->pntsv; b++) {
+ if (nu->flagu & 1) glBegin(GL_LINE_LOOP);
+ else glBegin(GL_LINE_STRIP);
- bp= nu->bp;
- for (b=0; b<nu->pntsv; b++) {
- bp1= bp;
- bp++;
- for (a=nu->pntsu-1; a>0; a--, bp++) {
- if (bp->hide==0 && bp1->hide==0) {
- if (sel) {
- if ( (bp->f1 & SELECT) && ( bp1->f1 & SELECT ) ) {
- UI_ThemeColor(TH_NURB_SEL_ULINE);
-
- glBegin(GL_LINE_STRIP);
- glVertex3fv(bp->vec);
- glVertex3fv(bp1->vec);
- glEnd();
- }
- }
- else {
- if ( (bp->f1 & SELECT) && ( bp1->f1 & SELECT) );
- else {
- UI_ThemeColor(TH_NURB_ULINE);
-
- glBegin(GL_LINE_STRIP);
- glVertex3fv(bp->vec);
- glVertex3fv(bp1->vec);
- glEnd();
- }
- }
+ for (a=0; a<nu->pntsu; a++, bp++) {
+ glVertex3fv(bp->vec);
}
- bp1= bp;
+
+ glEnd();
+ }
+ break;
+ case CU_NURBS:
+ if (!sel && index== cu->actnu) {
+ /* we should draw active spline highlight below everything */
+ editnurb_draw_active_nurbs(nu);
}
- }
- if (nu->pntsv > 1) { /* surface */
- ofs= nu->pntsu;
- for (b=0; b<nu->pntsu; b++) {
- bp1= nu->bp+b;
- bp= bp1+ofs;
- for (a=nu->pntsv-1; a>0; a--, bp+=ofs) {
+ bp= nu->bp;
+ for (b=0; b<nu->pntsv; b++) {
+ bp1= bp;
+ bp++;
+ for (a=nu->pntsu-1; a>0; a--, bp++) {
if (bp->hide==0 && bp1->hide==0) {
if (sel) {
- if ( (bp->f1 & SELECT) && ( bp1->f1 & SELECT) ) {
- UI_ThemeColor(TH_NURB_SEL_VLINE);
-
+ if ( (bp->f1 & SELECT) && ( bp1->f1 & SELECT ) ) {
+ UI_ThemeColor(TH_NURB_SEL_ULINE);
+
glBegin(GL_LINE_STRIP);
- glVertex3fv(bp->vec);
+ glVertex3fv(bp->vec);
glVertex3fv(bp1->vec);
glEnd();
}
}
else {
- if ( (bp->f1 & SELECT) && ( bp1->f1 & SELECT) );
+ if ((bp->f1 & SELECT) && (bp1->f1 & SELECT)) {
+ /* pass */
+ }
else {
- UI_ThemeColor(TH_NURB_VLINE);
-
+ UI_ThemeColor(TH_NURB_ULINE);
+
glBegin(GL_LINE_STRIP);
- glVertex3fv(bp->vec);
+ glVertex3fv(bp->vec);
glVertex3fv(bp1->vec);
glEnd();
}
@@ -5480,9 +5453,44 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel)
bp1= bp;
}
}
+ if (nu->pntsv > 1) { /* surface */
+
+ ofs= nu->pntsu;
+ for (b=0; b<nu->pntsu; b++) {
+ bp1= nu->bp+b;
+ bp= bp1+ofs;
+ for (a=nu->pntsv-1; a>0; a--, bp+=ofs) {
+ if (bp->hide==0 && bp1->hide==0) {
+ if (sel) {
+ if ( (bp->f1 & SELECT) && ( bp1->f1 & SELECT) ) {
+ UI_ThemeColor(TH_NURB_SEL_VLINE);
+
+ glBegin(GL_LINE_STRIP);
+ glVertex3fv(bp->vec);
+ glVertex3fv(bp1->vec);
+ glEnd();
+ }
+ }
+ else {
+ if ((bp->f1 & SELECT) && (bp1->f1 & SELECT)) {
+ /* pass */
+ }
+ else {
+ UI_ThemeColor(TH_NURB_VLINE);
+
+ glBegin(GL_LINE_STRIP);
+ glVertex3fv(bp->vec);
+ glVertex3fv(bp1->vec);
+ glEnd();
+ }
+ }
+ }
+ bp1= bp;
+ }
+ }
- }
- break;
+ }
+ break;
}
}
@@ -5529,12 +5537,12 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
/* direction vectors for 3d curve paths
- * when at its lowest, dont render normals */
- if (cu->flag & CU_3D && ts->normalsize > 0.0015f && (cu->drawflag & CU_HIDE_NORMALS)==0) {
+ * when at its lowest, don't render normals */
+ if ((cu->flag & CU_3D) && (ts->normalsize > 0.0015f) && (cu->drawflag & CU_HIDE_NORMALS)==0) {
UI_ThemeColor(TH_WIRE);
for (bl=cu->bev.first,nu=nurb; nu && bl; bl=bl->next,nu=nu->next) {
- BevPoint *bevp= (BevPoint *)(bl+1);
+ BevPoint *bevp= (BevPoint *)(bl + 1);
int nr= bl->nr;
int skip= nu->resolu/16;
@@ -5593,8 +5601,8 @@ static void draw_empty_sphere (float size)
glPushMatrix();
- qobj = gluNewQuadric();
- gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);
+ qobj = gluNewQuadric();
+ gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);
gluDisk(qobj, 0.0, 1, 16, 1);
glRotatef(90, 0, 1, 0);
@@ -5603,7 +5611,7 @@ static void draw_empty_sphere (float size)
glRotatef(90, 1, 0, 0);
gluDisk(qobj, 0.0, 1, 16, 1);
- gluDeleteQuadric(qobj);
+ gluDeleteQuadric(qobj);
glPopMatrix();
glEndList();
@@ -5619,8 +5627,8 @@ static void draw_empty_cone (float size)
{
float cent=0;
float radius;
- GLUquadricObj *qobj = gluNewQuadric();
- gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);
+ GLUquadricObj *qobj = gluNewQuadric();
+ gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);
glPushMatrix();
@@ -5633,7 +5641,7 @@ static void draw_empty_cone (float size)
glPopMatrix();
- gluDeleteQuadric(qobj);
+ gluDeleteQuadric(qobj);
}
/* draw points on curve speed handles */
@@ -5649,7 +5657,7 @@ static void curve_draw_speed(Scene *scene, Object *ob)
if (cu->ipo==NULL)
return;
- icu= cu->ipo->curve.first;
+ icu= cu->ipo->curve.first;
if (icu==NULL || icu->totvert<2)
return;
@@ -5783,14 +5791,14 @@ static void drawtube(const float vec[3], float radius, float height, float tmat[
drawcircball(GL_LINE_LOOP, cur, radius, tmat);
glBegin(GL_LINES);
- glVertex3f(vec[0]+radius,vec[1],vec[2]);
- glVertex3f(cur[0]+radius,cur[1],cur[2]);
- glVertex3f(vec[0]-radius,vec[1],vec[2]);
- glVertex3f(cur[0]-radius,cur[1],cur[2]);
- glVertex3f(vec[0],vec[1]+radius,vec[2]);
- glVertex3f(cur[0],cur[1]+radius,cur[2]);
- glVertex3f(vec[0],vec[1]-radius,vec[2]);
- glVertex3f(cur[0],cur[1]-radius,cur[2]);
+ glVertex3f(vec[0]+radius,vec[1],vec[2]);
+ glVertex3f(cur[0]+radius,cur[1],cur[2]);
+ glVertex3f(vec[0]-radius,vec[1],vec[2]);
+ glVertex3f(cur[0]-radius,cur[1],cur[2]);
+ glVertex3f(vec[0],vec[1]+radius,vec[2]);
+ glVertex3f(cur[0],cur[1]+radius,cur[2]);
+ glVertex3f(vec[0],vec[1]-radius,vec[2]);
+ glVertex3f(cur[0],cur[1]-radius,cur[2]);
glEnd();
}
/* needs fixing if non-identity matrice used */
@@ -5804,14 +5812,14 @@ static void drawcone(const float vec[3], float radius, float height, float tmat[
drawcircball(GL_LINE_LOOP, cur, radius, tmat);
glBegin(GL_LINES);
- glVertex3f(vec[0],vec[1],vec[2]);
- glVertex3f(cur[0]+radius,cur[1],cur[2]);
- glVertex3f(vec[0],vec[1],vec[2]);
- glVertex3f(cur[0]-radius,cur[1],cur[2]);
- glVertex3f(vec[0],vec[1],vec[2]);
- glVertex3f(cur[0],cur[1]+radius,cur[2]);
- glVertex3f(vec[0],vec[1],vec[2]);
- glVertex3f(cur[0],cur[1]-radius,cur[2]);
+ glVertex3f(vec[0],vec[1],vec[2]);
+ glVertex3f(cur[0]+radius,cur[1],cur[2]);
+ glVertex3f(vec[0],vec[1],vec[2]);
+ glVertex3f(cur[0]-radius,cur[1],cur[2]);
+ glVertex3f(vec[0],vec[1],vec[2]);
+ glVertex3f(cur[0],cur[1]+radius,cur[2]);
+ glVertex3f(vec[0],vec[1],vec[2]);
+ glVertex3f(cur[0],cur[1]-radius,cur[2]);
glEnd();
}
/* return 1 if nothing was drawn */
@@ -5852,7 +5860,7 @@ static int drawmball(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
normalize_v3(imat[1]);
while (ml) {
-
+
/* draw radius */
if (mb->editelems) {
if ((ml->flag & SELECT) && (ml->flag & MB_SCALE_RAD)) cpack(0xA0A0F0);
@@ -5895,7 +5903,7 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d)
if (ob==OBACT) curcol= TH_ACTIVE;
else curcol= TH_SELECT;
}
- else curcol= TH_WIRE;
+ else curcol= TH_EMPTY;
/* scale size of circle etc with the empty drawsize */
if (ob->type == OB_EMPTY) size = ob->empty_drawsize;
@@ -5914,8 +5922,10 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d)
//if (has_ipo_code(ob->ipo, OB_PD_FSTR))
// force_val = IPO_GetFloatValue(ob->ipo, OB_PD_FSTR, scene->r.cfra);
- //else
+ //else
+ {
force_val = pd->f_strength;
+ }
force_val *= 0.1f;
drawcircball(GL_LINE_LOOP, vec, size, tmat);
vec[2]= 0.5f * force_val;
@@ -5930,10 +5940,12 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d)
else if (pd->forcefield == PFIELD_FORCE) {
float ffall_val;
- //if (has_ipo_code(ob->ipo, OB_PD_FFALL))
+ //if (has_ipo_code(ob->ipo, OB_PD_FFALL))
// ffall_val = IPO_GetFloatValue(ob->ipo, OB_PD_FFALL, scene->r.cfra);
- //else
+ //else
+ {
ffall_val = pd->f_power;
+ }
UI_ThemeColorBlend(curcol, TH_BACK, 0.5);
drawcircball(GL_LINE_LOOP, vec, size, imat);
@@ -5946,15 +5958,17 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d)
float /*ffall_val,*/ force_val;
unit_m4(tmat);
- //if (has_ipo_code(ob->ipo, OB_PD_FFALL))
+ //if (has_ipo_code(ob->ipo, OB_PD_FFALL))
// ffall_val = IPO_GetFloatValue(ob->ipo, OB_PD_FFALL, scene->r.cfra);
- //else
+ //else
// ffall_val = pd->f_power;
//if (has_ipo_code(ob->ipo, OB_PD_FSTR))
// force_val = IPO_GetFloatValue(ob->ipo, OB_PD_FSTR, scene->r.cfra);
- //else
+ //else
+ {
force_val = pd->f_strength;
+ }
UI_ThemeColorBlend(curcol, TH_BACK, 0.7f);
if (force_val < 0) {
@@ -5973,8 +5987,10 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d)
//if (has_ipo_code(ob->ipo, OB_PD_FSTR))
// mindist = IPO_GetFloatValue(ob->ipo, OB_PD_FSTR, scene->r.cfra);
- //else
+ //else
+ {
mindist = pd->f_strength;
+ }
/*path end*/
setlinestyle(3);
@@ -5998,7 +6014,7 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d)
if (pd->falloff==PFIELD_FALL_SPHERE) {
/* as last, guide curve alters it */
if (pd->flag & PFIELD_USEMAX)
- drawcircball(GL_LINE_LOOP, vec, pd->maxdist, imat);
+ drawcircball(GL_LINE_LOOP, vec, pd->maxdist, imat);
if (pd->flag & PFIELD_USEMIN)
drawcircball(GL_LINE_LOOP, vec, pd->mindist, imat);
@@ -6091,9 +6107,9 @@ static void get_local_bounds(Object *ob, float center[3], float size[3])
static void draw_bb_quadric(BoundBox *bb, char type)
{
float size[3], cent[3];
- GLUquadricObj *qobj = gluNewQuadric();
+ GLUquadricObj *qobj = gluNewQuadric();
- gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);
+ gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);
size[0]= 0.5f*fabsf(bb->vec[0][0] - bb->vec[4][0]);
size[1]= 0.5f*fabsf(bb->vec[0][1] - bb->vec[2][1]);
@@ -6108,7 +6124,7 @@ static void draw_bb_quadric(BoundBox *bb, char type)
glTranslatef(cent[0], cent[1], cent[2]);
glScalef(size[0], size[1], size[2]);
gluSphere(qobj, 1.0, 8, 5);
- }
+ }
else if (type==OB_BOUND_CYLINDER) {
float radius = size[0] > size[1] ? size[0] : size[1];
glTranslatef(cent[0], cent[1], cent[2]-size[2]);
@@ -6123,7 +6139,7 @@ static void draw_bb_quadric(BoundBox *bb, char type)
}
glPopMatrix();
- gluDeleteQuadric(qobj);
+ gluDeleteQuadric(qobj);
}
static void draw_bounding_volume(Scene *scene, Object *ob, char type)
@@ -6145,6 +6161,9 @@ static void draw_bounding_volume(Scene *scene, Object *ob, char type)
}
}
}
+ else if (ob->type == OB_ARMATURE) {
+ bb = BKE_armature_get_bb(ob);
+ }
else {
drawcube();
return;
@@ -6352,7 +6371,7 @@ static void drawRBpivot(bRigidBodyJointConstraint *data)
mul_m4_v3(mat,dir);
add_v3_v3(v, dir);
glVertex3fv(&data->pivX);
- glVertex3fv(v);
+ glVertex3fv(v);
glEnd();
view3d_cached_text_draw_add(v, axis_str[axis], 0, V3D_CACHE_TEXT_ASCII, tcol);
@@ -6380,11 +6399,14 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
if (ob!=scene->obedit) {
- if (ob->restrictflag & OB_RESTRICT_VIEW)
+ if (ob->restrictflag & OB_RESTRICT_VIEW) {
return;
- if ((ob->restrictflag & OB_RESTRICT_RENDER) &&
- (v3d->flag2 & V3D_RENDER_OVERRIDE))
+ }
+ else if ((ob->restrictflag & OB_RESTRICT_RENDER) &&
+ (v3d->flag2 & V3D_RENDER_OVERRIDE))
+ {
return;
+ }
}
/* XXX particles are not safe for simultaneous threaded render */
@@ -6438,9 +6460,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
project_short(ar, ob->obmat[3], &base->sx);
- if ( (scene->obedit == NULL) &&
- (G.moving & G_TRANSFORM_OBJ) &&
- (base->flag & (SELECT+BA_WAS_SEL)))
+ if ((scene->obedit == NULL) &&
+ (G.moving & G_TRANSFORM_OBJ) &&
+ (base->flag & (SELECT+BA_WAS_SEL)))
{
theme_id= TH_TRANSFORM;
}
@@ -6479,6 +6501,8 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
else {
if (ob->type==OB_LAMP) theme_id= TH_LAMP;
else if (ob->type==OB_SPEAKER) theme_id= TH_SPEAKER;
+ else if (ob->type==OB_CAMERA) theme_id= TH_CAMERA;
+ else if (ob->type==OB_EMPTY) theme_id= TH_EMPTY;
/* fallback to TH_WIRE */
}
}
@@ -6588,9 +6612,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
vec1[1] += cu->linedist * cu->fsize;
vec2[1] -= cu->lines * cu->linedist * cu->fsize;
setlinestyle(3);
- glBegin(GL_LINE_STRIP);
- glVertex2fv(vec1);
- glVertex2fv(vec2);
+ glBegin(GL_LINE_STRIP);
+ glVertex2fv(vec1);
+ glVertex2fv(vec2);
glEnd();
setlinestyle(0);
}
@@ -6646,7 +6670,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
}
else if (dt==OB_BOUNDBOX) {
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_WIRE) == 0) {
+ if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && v3d->drawtype >= OB_WIRE) == 0) {
draw_bounding_volume(scene, ob, ob->boundtype);
}
}
@@ -6664,8 +6688,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
drawnurb(scene, v3d, rv3d, base, nurbs->first, dt);
}
else if (dt==OB_BOUNDBOX) {
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_WIRE)==0)
+ if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && (v3d->drawtype >= OB_WIRE)) == 0) {
draw_bounding_volume(scene, ob, ob->boundtype);
+ }
}
else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) {
empty_object= drawDispList(scene, v3d, rv3d, base, dt);
@@ -6681,10 +6706,11 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if (mb->editelems)
drawmball(scene, v3d, rv3d, base, dt);
else if (dt==OB_BOUNDBOX) {
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE && v3d->drawtype >= OB_WIRE)==0)
+ if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && (v3d->drawtype >= OB_WIRE)) == 0) {
draw_bounding_volume(scene, ob, ob->boundtype);
+ }
}
- else
+ else
empty_object= drawmball(scene, v3d, rv3d, base, dt);
break;
}
@@ -6705,12 +6731,12 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
break;
case OB_CAMERA:
- if ( (v3d->flag2 & V3D_RENDER_OVERRIDE)==0 ||
- (rv3d->persp==RV3D_CAMOB && v3d->camera==ob)) /* special exception for active camera */
- {
- drawcamera(scene, v3d, rv3d, base, flag);
- break;
- }
+ if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0 ||
+ (rv3d->persp==RV3D_CAMOB && v3d->camera==ob)) /* special exception for active camera */
+ {
+ drawcamera(scene, v3d, rv3d, base, flag);
+ break;
+ }
case OB_SPEAKER:
if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0)
drawspeaker(scene, v3d, rv3d, ob, flag);
@@ -6721,10 +6747,20 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
break;
case OB_ARMATURE:
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
- if (dt>OB_WIRE) GPU_enable_material(0, NULL); // we use default material
- empty_object= draw_armature(scene, v3d, ar, base, dt, flag, FALSE);
- if (dt>OB_WIRE) GPU_disable_material();
+ if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
+ /* Do not allow boundbox in edit nor pose mode! */
+ if ((dt == OB_BOUNDBOX) && (ob->mode & (OB_MODE_EDIT | OB_MODE_POSE)))
+ dt = OB_WIRE;
+ if (dt == OB_BOUNDBOX) {
+ draw_bounding_volume(scene, ob, ob->boundtype);
+ }
+ else {
+ if (dt>OB_WIRE)
+ GPU_enable_material(0, NULL); /* we use default material */
+ empty_object = draw_armature(scene, v3d, ar, base, dt, flag, FALSE);
+ if (dt>OB_WIRE)
+ GPU_disable_material();
+ }
}
break;
default:
@@ -6736,7 +6772,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
if (ob->soft /*&& flag & OB_SBMOTION*/) {
- float mrt[3][3],msc[3][3],mtr[3][3];
+ float mrt[3][3],msc[3][3],mtr[3][3];
SoftBody *sb= NULL;
float tipw = 0.5f, tiph = 0.5f,drawsize = 4.0f;
if ((sb= ob->soft)) {
@@ -6745,7 +6781,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
glLoadMatrixf(rv3d->viewmat);
copy_m3_m3(msc,sb->lscale);
copy_m3_m3(mrt,sb->lrot);
- mul_m3_m3m3(mtr,mrt,msc);
+ mul_m3_m3m3(mtr,mrt,msc);
ob_draw_RE_motion(sb->lcom,mtr,tipw,tiph,drawsize);
glMultMatrixf(ob->obmat);
}
@@ -6758,11 +6794,12 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
/* code for new particle system */
- if ( (warning_recursive==0) &&
- (ob->particlesystem.first) &&
- (flag & DRAW_PICKING)==0 &&
- (ob!=scene->obedit)
- ) {
+ if ((warning_recursive==0) &&
+ (ob->particlesystem.first) &&
+ (flag & DRAW_PICKING)==0 &&
+ (ob!=scene->obedit)
+ )
+ {
ParticleSystem *psys;
if (col || (ob->flag & SELECT)) cpack(0xFFFFFF); /* for visibility, also while wpaint */
@@ -6866,7 +6903,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
float *density = smoke_get_density(smd->domain->fluid);
glLoadMatrixf(rv3d->viewmat);
- // glMultMatrixf(ob->obmat);
+ // glMultMatrixf(ob->obmat);
if (col || (ob->flag & SELECT)) cpack(0xFFFFFF);
glDepthMask(GL_FALSE);
@@ -6876,22 +6913,23 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
// glPointSize(3.0);
bglBegin(GL_POINTS);
- for (x = 0; x < smd->domain->res[0]; x++)
- for (y = 0; y < smd->domain->res[1]; y++)
- for (z = 0; z < smd->domain->res[2]; z++)
- {
- float tmp[3];
- int index = smoke_get_index(x, smd->domain->res[0], y, smd->domain->res[1], z);
-
- if (density[index] > FLT_EPSILON) {
- float color[3];
- copy_v3_v3(tmp, smd->domain->p0);
- tmp[0] += smd->domain->dx * x + smd->domain->dx * 0.5;
- tmp[1] += smd->domain->dx * y + smd->domain->dx * 0.5;
- tmp[2] += smd->domain->dx * z + smd->domain->dx * 0.5;
- color[0] = color[1] = color[2] = density[index];
- glColor3fv(color);
- bglVertex3fv(tmp);
+ for (x = 0; x < smd->domain->res[0]; x++) {
+ for (y = 0; y < smd->domain->res[1]; y++) {
+ for (z = 0; z < smd->domain->res[2]; z++) {
+ float tmp[3];
+ int index = smoke_get_index(x, smd->domain->res[0], y, smd->domain->res[1], z);
+
+ if (density[index] > FLT_EPSILON) {
+ float color[3];
+ copy_v3_v3(tmp, smd->domain->p0);
+ tmp[0] += smd->domain->dx * x + smd->domain->dx * 0.5;
+ tmp[1] += smd->domain->dx * y + smd->domain->dx * 0.5;
+ tmp[2] += smd->domain->dx * z + smd->domain->dx * 0.5;
+ color[0] = color[1] = color[2] = density[index];
+ glColor3fv(color);
+ bglVertex3fv(tmp);
+ }
+ }
}
}
@@ -6949,7 +6987,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
if (dtx & OB_DRAWNAME) {
/* patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing */
- /* but, we also dont draw names for sets or duplicators */
+ /* but, we also don't draw names for sets or duplicators */
if (flag == 0) {
float zero[3]= {0,0,0};
float curcol[4];
@@ -7003,7 +7041,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
int do_draw_center= -1; /* defines below are zero or positive... */
if (v3d->flag2 & V3D_RENDER_OVERRIDE) {
- /* dont draw */
+ /* don't draw */
}
else if ((scene->basact)==base)
do_draw_center= ACTIVE;
@@ -7018,7 +7056,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
glBegin(GL_POINTS);
glVertex3fv(ob->obmat[3]);
glEnd();
- }
+ }
else if ((flag & DRAW_CONSTCOLOR)==0) {
/* we don't draw centers for duplicators and sets */
if (U.obcenter_dia > 0) {
@@ -7097,7 +7135,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
for (ct= targets.first; ct; ct= ct->next) {
/* calculate target's matrix */
- if (cti->get_target_matrix)
+ if (cti->get_target_matrix)
cti->get_target_matrix(curcon, cob, ct, BKE_curframe(scene));
else
unit_m4(ct->matrix);
@@ -7231,7 +7269,7 @@ static void bbs_mesh_solid_EM(BMEditMesh *em, Scene *scene, View3D *v3d,
if (check_ob_drawface_dot(scene, v3d, ob->dt)) {
glPointSize(UI_GetThemeValuef(TH_FACEDOT_SIZE));
-
+
bglBegin(GL_POINTS);
dm->foreachMappedFaceCenter(dm, bbs_mesh_solid__drawCenter, ptrs);
bglEnd();
@@ -7299,64 +7337,64 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
glEnable(GL_DEPTH_TEST);
switch( ob->type) {
- case OB_MESH:
- if (ob->mode & OB_MODE_EDIT) {
- Mesh *me= ob->data;
- BMEditMesh *em= me->edit_btmesh;
+ case OB_MESH:
+ if (ob->mode & OB_MODE_EDIT) {
+ Mesh *me= ob->data;
+ BMEditMesh *em= me->edit_btmesh;
- DerivedMesh *dm = editbmesh_get_derived_cage(scene, ob, em, CD_MASK_BAREMESH);
+ DerivedMesh *dm = editbmesh_get_derived_cage(scene, ob, em, CD_MASK_BAREMESH);
- EDBM_init_index_arrays(em, 1, 1, 1);
+ EDBM_init_index_arrays(em, 1, 1, 1);
- bbs_mesh_solid_EM(em, scene, v3d, ob, dm, ts->selectmode & SCE_SELECT_FACE);
- if (ts->selectmode & SCE_SELECT_FACE)
- bm_solidoffs = 1+em->bm->totface;
- else
- bm_solidoffs= 1;
-
- bglPolygonOffset(rv3d->dist, 1.0);
-
- // we draw edges always, for loop (select) tools
- bbs_mesh_wire(em, dm, bm_solidoffs);
- bm_wireoffs= bm_solidoffs + em->bm->totedge;
-
- // we draw verts if vert select mode or if in transform (for snap).
- if (ts->selectmode & SCE_SELECT_VERTEX || G.moving & G_TRANSFORM_EDIT) {
- bbs_mesh_verts(em, dm, bm_wireoffs);
- bm_vertoffs= bm_wireoffs + em->bm->totvert;
- }
- else bm_vertoffs= bm_wireoffs;
-
- bglPolygonOffset(rv3d->dist, 0.0);
+ bbs_mesh_solid_EM(em, scene, v3d, ob, dm, ts->selectmode & SCE_SELECT_FACE);
+ if (ts->selectmode & SCE_SELECT_FACE)
+ bm_solidoffs = 1+em->bm->totface;
+ else
+ bm_solidoffs= 1;
- dm->release(dm);
+ bglPolygonOffset(rv3d->dist, 1.0);
- EDBM_free_index_arrays(em);
- }
- else {
- Mesh *me= ob->data;
- if ( (me->editflag & ME_EDIT_VERT_SEL) &&
- /* currently vertex select only supports weight paint */
- (ob->mode & OB_MODE_WEIGHT_PAINT))
- {
- DerivedMesh *dm = mesh_get_derived_final(scene, ob, scene->customdata_mask);
- glColor3ub(0, 0, 0);
+ // we draw edges always, for loop (select) tools
+ bbs_mesh_wire(em, dm, bm_solidoffs);
+ bm_wireoffs= bm_solidoffs + em->bm->totedge;
- dm->drawMappedFaces(dm, bbs_mesh_solid_hide2__setDrawOpts, GPU_enable_material, NULL, me, 0);
+ // we draw verts if vert select mode or if in transform (for snap).
+ if ((ts->selectmode & SCE_SELECT_VERTEX) || (G.moving & G_TRANSFORM_EDIT)) {
+ bbs_mesh_verts(em, dm, bm_wireoffs);
+ bm_vertoffs= bm_wireoffs + em->bm->totvert;
+ }
+ else bm_vertoffs= bm_wireoffs;
+
+ bglPolygonOffset(rv3d->dist, 0.0);
-
- bbs_obmode_mesh_verts(ob, dm, 1);
- bm_vertoffs = me->totvert+1;
dm->release(dm);
+
+ EDBM_free_index_arrays(em);
}
else {
- bbs_mesh_solid(scene, ob);
+ Mesh *me= ob->data;
+ if ( (me->editflag & ME_EDIT_VERT_SEL) &&
+ /* currently vertex select only supports weight paint */
+ (ob->mode & OB_MODE_WEIGHT_PAINT))
+ {
+ DerivedMesh *dm = mesh_get_derived_final(scene, ob, scene->customdata_mask);
+ glColor3ub(0, 0, 0);
+
+ dm->drawMappedFaces(dm, bbs_mesh_solid_hide2__setDrawOpts, GPU_enable_material, NULL, me, 0);
+
+
+ bbs_obmode_mesh_verts(ob, dm, 1);
+ bm_vertoffs = me->totvert+1;
+ dm->release(dm);
+ }
+ else {
+ bbs_mesh_solid(scene, ob);
+ }
}
- }
- break;
- case OB_CURVE:
- case OB_SURF:
- break;
+ break;
+ case OB_CURVE:
+ case OB_SURF:
+ break;
}
glLoadMatrixf(rv3d->viewmat);
@@ -7368,7 +7406,7 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
/* helper function for drawing object instances - meshes */
static void draw_object_mesh_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d,
- Object *ob, int dt, int outline)
+ Object *ob, int dt, int outline)
{
Mesh *me= ob->data;
DerivedMesh *dm=NULL, *edm=NULL;
@@ -7376,14 +7414,14 @@ static void draw_object_mesh_instance(Scene *scene, View3D *v3d, RegionView3D *r
if (ob->mode & OB_MODE_EDIT)
edm= editbmesh_get_derived_base(ob, me->edit_btmesh);
- else
+ else
dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
if (dt<=OB_WIRE) {
if (dm)
dm->drawEdges(dm, 1, 0);
else if (edm)
- edm->drawEdges(edm, 1, 0);
+ edm->drawEdges(edm, 1, 0);
}
else {
if (outline)
@@ -7418,9 +7456,9 @@ static void draw_object_mesh_instance(Scene *scene, View3D *v3d, RegionView3D *r
void draw_object_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, int dt, int outline)
{
- if (ob == NULL)
+ if (ob == NULL)
return;
-
+
switch (ob->type) {
case OB_MESH:
draw_object_mesh_instance(scene, v3d, rv3d, ob, dt, outline);
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 405ce80323b..0d0d1bd3139 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -384,72 +384,72 @@ static void view3d_main_area_init(wmWindowManager *wm, ARegion *ar)
/* object ops. */
/* important to be before Pose keymap since they can both be enabled at once */
- keymap= WM_keymap_find(wm->defaultconf, "Face Mask", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Face Mask", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Weight Paint Vertex Selection", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Weight Paint Vertex Selection", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
/* pose is not modal, operator poll checks for this */
- keymap= WM_keymap_find(wm->defaultconf, "Pose", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Pose", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Object Mode", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Object Mode", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Image Paint", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Image Paint", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Vertex Paint", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Vertex Paint", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Weight Paint", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Weight Paint", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Sculpt", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Sculpt", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Mesh", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Mesh", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Curve", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Curve", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Armature", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Armature", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Pose", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Pose", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Metaball", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Metaball", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Lattice", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Lattice", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
/* armature sketching needs to take over mouse */
- keymap= WM_keymap_find(wm->defaultconf, "Armature Sketch", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Armature Sketch", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Particle", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Particle", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
/* editfont keymap swallows all... */
- keymap= WM_keymap_find(wm->defaultconf, "Font", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Font", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Object Non-modal", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Object Non-modal", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "Frames", 0, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "Frames", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
/* own keymap, last so modes can override it */
- keymap= WM_keymap_find(wm->defaultconf, "3D View Generic", SPACE_VIEW3D, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "3D View Generic", SPACE_VIEW3D, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
- keymap= WM_keymap_find(wm->defaultconf, "3D View", SPACE_VIEW3D, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "3D View", SPACE_VIEW3D, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
/* add drop boxes */
@@ -812,7 +812,7 @@ static void view3d_main_area_cursor(wmWindow *win, ScrArea *UNUSED(sa), ARegion
/* add handlers, stuff you only do once or on area/region changes */
static void view3d_header_area_init(wmWindowManager *wm, ARegion *ar)
{
- wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "3D View Generic", SPACE_VIEW3D, 0);
+ wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "3D View Generic", SPACE_VIEW3D, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
@@ -856,7 +856,7 @@ static void view3d_buttons_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_find(wm->defaultconf, "3D View Generic", SPACE_VIEW3D, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "3D View Generic", SPACE_VIEW3D, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -955,7 +955,7 @@ static void view3d_tools_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_find(wm->defaultconf, "3D View Generic", SPACE_VIEW3D, 0);
+ keymap = WM_keymap_find(wm->defaultconf, "3D View Generic", SPACE_VIEW3D, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index a9521a61eb2..953f22a2b65 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -1004,11 +1004,11 @@ static void v3d_posearmature_buts(uiLayout *layout, Object *ob)
uiDefBut(block, LABEL, 0, "Location:", 0, 240, 100, 20, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
- but= uiDefButF(block, NUM, B_ARMATUREPANEL2, "X:", 0, 220, 120, 19, pchan->loc, -lim, lim, 100, 3, "");
+ but = uiDefButF(block, NUM, B_ARMATUREPANEL2, "X:", 0, 220, 120, 19, pchan->loc, -lim, lim, 100, 3, "");
uiButSetUnitType(but, PROP_UNIT_LENGTH);
- but= uiDefButF(block, NUM, B_ARMATUREPANEL2, "Y:", 0, 200, 120, 19, pchan->loc+1, -lim, lim, 100, 3, "");
+ but = uiDefButF(block, NUM, B_ARMATUREPANEL2, "Y:", 0, 200, 120, 19, pchan->loc+1, -lim, lim, 100, 3, "");
uiButSetUnitType(but, PROP_UNIT_LENGTH);
- but= uiDefButF(block, NUM, B_ARMATUREPANEL2, "Z:", 0, 180, 120, 19, pchan->loc+2, -lim, lim, 100, 3, "");
+ but = uiDefButF(block, NUM, B_ARMATUREPANEL2, "Z:", 0, 180, 120, 19, pchan->loc+2, -lim, lim, 100, 3, "");
uiButSetUnitType(but, PROP_UNIT_LENGTH);
uiBlockEndAlign(block);
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 3d570252126..1f6ec45f908 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -541,7 +541,7 @@ static void drawcursor(Scene *scene, ARegion *ar, View3D *v3d)
int mx, my, co[2];
int flag;
- /* we dont want the clipping for cursor */
+ /* we don't want the clipping for cursor */
flag= v3d->flag;
v3d->flag= 0;
project_int(ar, give_cursor(scene, v3d), co);
@@ -956,10 +956,10 @@ static void view3d_camera_border(Scene *scene, ARegion *ar, View3D *v3d, RegionV
rect_camera= params.viewplane;
/* get camera border within viewport */
- viewborder_r->xmin= ((rect_camera.xmin - rect_view.xmin)/(rect_view.xmax - rect_view.xmin))*ar->winx;
- viewborder_r->xmax= ((rect_camera.xmax - rect_view.xmin)/(rect_view.xmax - rect_view.xmin))*ar->winx;
- viewborder_r->ymin= ((rect_camera.ymin - rect_view.ymin)/(rect_view.ymax - rect_view.ymin))*ar->winy;
- viewborder_r->ymax= ((rect_camera.ymax - rect_view.ymin)/(rect_view.ymax - rect_view.ymin))*ar->winy;
+ viewborder_r->xmin = ((rect_camera.xmin - rect_view.xmin)/(rect_view.xmax - rect_view.xmin))*ar->winx;
+ viewborder_r->xmax = ((rect_camera.xmax - rect_view.xmin)/(rect_view.xmax - rect_view.xmin))*ar->winx;
+ viewborder_r->ymin = ((rect_camera.ymin - rect_view.ymin)/(rect_view.ymax - rect_view.ymin))*ar->winy;
+ viewborder_r->ymax = ((rect_camera.ymax - rect_view.ymin)/(rect_view.ymax - rect_view.ymin))*ar->winy;
}
void ED_view3d_calc_camera_border_size(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D *rv3d, float size_r[2])
@@ -1236,19 +1236,19 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
float sensor_scale = (x2i-x1i) / sensor_x;
float sensor_height = sensor_scale * sensor_y;
- rect.xmin= x1i;
- rect.xmax= x2i;
- rect.ymin= (y1i + y2i)*0.5f - sensor_height*0.5f;
- rect.ymax= rect.ymin + sensor_height;
+ rect.xmin = x1i;
+ rect.xmax = x2i;
+ rect.ymin = (y1i + y2i)*0.5f - sensor_height*0.5f;
+ rect.ymax = rect.ymin + sensor_height;
}
else {
float sensor_scale = (y2i-y1i) / sensor_y;
float sensor_width = sensor_scale * sensor_x;
- rect.xmin= (x1i + x2i)*0.5f - sensor_width*0.5f;
- rect.xmax= rect.xmin + sensor_width;
- rect.ymin= y1i;
- rect.ymax= y2i;
+ rect.xmin = (x1i + x2i)*0.5f - sensor_width*0.5f;
+ rect.xmax = rect.xmin + sensor_width;
+ rect.ymin = y1i;
+ rect.ymax = y2i;
}
/* draw */
@@ -1488,7 +1488,7 @@ unsigned int view3d_sample_backbuf_rect(ViewContext *vc, const int mval[2], int
goto exit;
}
}
- else{
+ else {
*dist= (short) sqrt( (float)distance ); // XXX, this distance is wrong -
index = *tbuf - min+1; // messy yah, but indices start at 1
goto exit;
@@ -1599,7 +1599,7 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d)
asp= ( (float)ibuf->y)/(float)ibuf->x;
- vec[0] = vec[1] = vec[2] = 0.0;
+ zero_v3(vec);
ED_view3d_project_float_v2(ar, vec, sco, rv3d->persmat);
cx = sco[0];
cy = sco[1];
@@ -1908,10 +1908,10 @@ void view3d_update_depths_rect(ARegion *ar, ViewDepths *d, rcti *rect)
rcti r;
/* clamp rect by area */
- r.xmin= 0;
- r.xmax= ar->winx-1;
- r.ymin= 0;
- r.ymax= ar->winy-1;
+ r.xmin = 0;
+ r.xmax = ar->winx-1;
+ r.ymin = 0;
+ r.ymax = ar->winy-1;
/* Constrain rect to depth bounds */
BLI_isect_rcti(&r, rect, rect);
@@ -2097,7 +2097,7 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (* func)(void *))
}
}
- /* this isnt that nice, draw xray objects as if they are normal */
+ /* this isn't that nice, draw xray objects as if they are normal */
if ( v3d->afterdraw_transp.first ||
v3d->afterdraw_xray.first ||
v3d->afterdraw_xraytransp.first
@@ -2301,7 +2301,7 @@ CustomDataMask ED_view3d_object_datamask(Scene *scene)
}
if (ob->mode & OB_MODE_WEIGHT_PAINT) {
- mask |= CD_MASK_WEIGHT_MCOL;
+ mask |= CD_MASK_PREVIEW_MCOL;
}
}
@@ -2403,10 +2403,10 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar,
ar->winx= winx;
ar->winy= winy;
- ar->winrct.xmin= 0;
- ar->winrct.ymin= 0;
- ar->winrct.xmax= winx;
- ar->winrct.ymax= winy;
+ ar->winrct.xmin = 0;
+ ar->winrct.ymin = 0;
+ ar->winrct.xmax = winx;
+ ar->winrct.ymax = winy;
/* set flags */
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 0b12db5d290..f8404937f7e 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -476,7 +476,7 @@ static void viewops_data_create(bContext *C, wmOperator *op, wmEvent *event)
ED_view3d_win_to_vector(vod->ar, mval_f, vod->mousevec);
}
- /* lookup, we dont pass on v3d to prevent confusement */
+ /* lookup, we don't pass on v3d to prevent confusement */
vod->grid= vod->v3d->grid;
vod->far= vod->v3d->far;
@@ -517,8 +517,6 @@ static void viewops_data_free(bContext *C, wmOperator *op)
/* ************************** viewrotate **********************************/
-static const float thres = 0.93f; //cos(20 deg);
-
#define COS45 0.7071068
#define SIN45 COS45
@@ -950,18 +948,18 @@ void VIEW3D_OT_rotate(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Rotate view";
+ ot->name = "Rotate view";
ot->description = "Rotate the view";
- ot->idname= "VIEW3D_OT_rotate";
+ ot->idname = "VIEW3D_OT_rotate";
/* api callbacks */
- ot->invoke= viewrotate_invoke;
- ot->modal= viewrotate_modal;
- ot->poll= ED_operator_region_view3d_active;
- ot->cancel= viewrotate_cancel;
+ ot->invoke = viewrotate_invoke;
+ ot->modal = viewrotate_modal;
+ ot->poll = ED_operator_region_view3d_active;
+ ot->cancel = viewrotate_cancel;
/* flags */
- ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
+ ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
}
/* NDOF utility functions
@@ -1377,18 +1375,18 @@ void VIEW3D_OT_move(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Move view";
+ ot->name = "Move view";
ot->description = "Move the view";
- ot->idname= "VIEW3D_OT_move";
+ ot->idname = "VIEW3D_OT_move";
/* api callbacks */
- ot->invoke= viewmove_invoke;
- ot->modal= viewmove_modal;
- ot->poll= ED_operator_view3d_active;
- ot->cancel= viewmove_cancel;
+ ot->invoke = viewmove_invoke;
+ ot->modal = viewmove_modal;
+ ot->poll = ED_operator_view3d_active;
+ ot->cancel = viewmove_cancel;
/* flags */
- ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
+ ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
}
/* ************************ viewzoom ******************************** */
@@ -1760,19 +1758,19 @@ static int viewzoom_cancel(bContext *C, wmOperator *op)
void VIEW3D_OT_zoom(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Zoom View";
+ ot->name = "Zoom View";
ot->description = "Zoom in/out in the view";
- ot->idname= "VIEW3D_OT_zoom";
+ ot->idname = "VIEW3D_OT_zoom";
/* api callbacks */
- ot->invoke= viewzoom_invoke;
- ot->exec= viewzoom_exec;
- ot->modal= viewzoom_modal;
- ot->poll= ED_operator_region_view3d_active;
- ot->cancel= viewzoom_cancel;
+ ot->invoke = viewzoom_invoke;
+ ot->exec = viewzoom_exec;
+ ot->modal = viewzoom_modal;
+ ot->poll = ED_operator_region_view3d_active;
+ ot->cancel = viewzoom_cancel;
/* flags */
- ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
+ ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, "Zoom Position X", "", 0, INT_MAX);
@@ -1993,19 +1991,19 @@ static int viewdolly_cancel(bContext *C, wmOperator *op)
void VIEW3D_OT_dolly(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Dolly view";
+ ot->name = "Dolly view";
ot->description = "Dolly in/out in the view";
- ot->idname= "VIEW3D_OT_dolly";
+ ot->idname = "VIEW3D_OT_dolly";
/* api callbacks */
- ot->invoke= viewdolly_invoke;
- ot->exec= viewdolly_exec;
- ot->modal= viewdolly_modal;
- ot->poll= viewdolly_poll;
- ot->cancel= viewdolly_cancel;
+ ot->invoke = viewdolly_invoke;
+ ot->exec = viewdolly_exec;
+ ot->modal = viewdolly_modal;
+ ot->poll = viewdolly_poll;
+ ot->cancel = viewdolly_cancel;
/* flags */
- ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
+ ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, "Zoom Position X", "", 0, INT_MAX);
@@ -2102,16 +2100,16 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in
void VIEW3D_OT_view_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View All";
+ ot->name = "View All";
ot->description = "View all objects in scene";
- ot->idname= "VIEW3D_OT_view_all";
+ ot->idname = "VIEW3D_OT_view_all";
/* api callbacks */
- ot->exec= view3d_all_exec;
- ot->poll= ED_operator_region_view3d_active;
+ ot->exec = view3d_all_exec;
+ ot->poll = ED_operator_region_view3d_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
RNA_def_boolean(ot->srna, "center", 0, "Center", "");
}
@@ -2135,8 +2133,8 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op))
INIT_MINMAX(min, max);
- if (ob && ob->mode & OB_MODE_WEIGHT_PAINT) {
- /* hardcoded exception, we look for the one selected armature */
+ if (ob && (ob->mode & OB_MODE_WEIGHT_PAINT)) {
+ /* hard-coded exception, we look for the one selected armature */
/* this is weak code this way, we should make a generic active/selection callback interface once... */
Base *base;
for (base=scene->base.first; base; base= base->next) {
@@ -2204,7 +2202,7 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op))
size= MAX3(afm[0], afm[1], afm[2]);
if (!rv3d->is_persp) {
- if (size < 0.0001f) { /* if its a sinble point. dont even re-scale */
+ if (size < 0.0001f) { /* if its a sinble point. don't even re-scale */
ok_dist= 0;
}
else {
@@ -2249,16 +2247,16 @@ void VIEW3D_OT_view_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Selected";
+ ot->name = "View Selected";
ot->description = "Move the view to the selection center";
- ot->idname= "VIEW3D_OT_view_selected";
+ ot->idname = "VIEW3D_OT_view_selected";
/* api callbacks */
- ot->exec= viewselected_exec;
- ot->poll= ED_operator_region_view3d_active;
+ ot->exec = viewselected_exec;
+ ot->poll = ED_operator_region_view3d_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
static int viewcenter_cursor_exec(bContext *C, wmOperator *UNUSED(op))
@@ -2284,16 +2282,16 @@ static int viewcenter_cursor_exec(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_view_center_cursor(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Center View to Cursor";
- ot->description= "Center the view so that the cursor is in the middle of the view";
- ot->idname= "VIEW3D_OT_view_center_cursor";
+ ot->name = "Center View to Cursor";
+ ot->description = "Center the view so that the cursor is in the middle of the view";
+ ot->idname = "VIEW3D_OT_view_center_cursor";
/* api callbacks */
- ot->exec= viewcenter_cursor_exec;
- ot->poll= ED_operator_view3d_active;
+ ot->exec = viewcenter_cursor_exec;
+ ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
static int view3d_center_camera_exec(bContext *C, wmOperator *UNUSED(op)) /* was view3d_home() in 2.4x */
@@ -2329,16 +2327,16 @@ static int view3d_center_camera_exec(bContext *C, wmOperator *UNUSED(op)) /* was
void VIEW3D_OT_view_center_camera(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Camera Center";
+ ot->name = "View Camera Center";
ot->description = "Center the camera view";
- ot->idname= "VIEW3D_OT_view_center_camera";
+ ot->idname = "VIEW3D_OT_view_center_camera";
/* api callbacks */
- ot->exec= view3d_center_camera_exec;
- ot->poll= view3d_camera_user_poll;
+ ot->exec = view3d_center_camera_exec;
+ ot->poll = view3d_camera_user_poll;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
/* ********************* Set render border operator ****************** */
@@ -2354,18 +2352,18 @@ static int render_border_exec(bContext *C, wmOperator *op)
rctf vb;
/* get border select values using rna */
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
/* calculate range */
ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &vb, FALSE);
- scene->r.border.xmin= ((float)rect.xmin-vb.xmin)/(vb.xmax-vb.xmin);
- scene->r.border.ymin= ((float)rect.ymin-vb.ymin)/(vb.ymax-vb.ymin);
- scene->r.border.xmax= ((float)rect.xmax-vb.xmin)/(vb.xmax-vb.xmin);
- scene->r.border.ymax= ((float)rect.ymax-vb.ymin)/(vb.ymax-vb.ymin);
+ scene->r.border.xmin = ((float)rect.xmin-vb.xmin)/(vb.xmax-vb.xmin);
+ scene->r.border.ymin = ((float)rect.ymin-vb.ymin)/(vb.ymax-vb.ymin);
+ scene->r.border.xmax = ((float)rect.xmax-vb.xmin)/(vb.xmax-vb.xmin);
+ scene->r.border.ymax = ((float)rect.ymax-vb.ymin)/(vb.ymax-vb.ymin);
/* actually set border */
CLAMP(scene->r.border.xmin, 0.0f, 1.0f);
@@ -2395,20 +2393,20 @@ static int render_border_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_render_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Render Border";
+ ot->name = "Set Render Border";
ot->description = "Set the boundaries of the border render and enables border render";
- ot->idname= "VIEW3D_OT_render_border";
+ ot->idname = "VIEW3D_OT_render_border";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= render_border_exec;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = render_border_exec;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= view3d_camera_active_poll;
+ ot->poll = view3d_camera_active_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* rna */
RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
@@ -2443,10 +2441,10 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op)
view3d_operator_needs_opengl(C);
/* get border select values using rna */
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
/* Get Z Depths, needed for perspective, nice for ortho */
bgl_get_mats(&mats);
@@ -2561,20 +2559,20 @@ static int view3d_zoom_border_invoke(bContext *C, wmOperator *op, wmEvent *event
void VIEW3D_OT_zoom_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Zoom";
+ ot->name = "Border Zoom";
ot->description = "Zoom in the view to the nearest object contained in the border";
- ot->idname= "VIEW3D_OT_zoom_border";
+ ot->idname = "VIEW3D_OT_zoom_border";
/* api callbacks */
- ot->invoke= view3d_zoom_border_invoke;
- ot->exec= view3d_zoom_border_exec;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = view3d_zoom_border_invoke;
+ ot->exec = view3d_zoom_border_exec;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= ED_operator_region_view3d_active;
+ ot->poll = ED_operator_region_view3d_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
/* rna */
RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
@@ -2617,16 +2615,16 @@ static int view3d_zoom_1_to_1_camera_exec(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_zoom_camera_1_to_1(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Zoom Camera 1:1";
+ ot->name = "Zoom Camera 1:1";
ot->description = "Match the camera to 1:1 to the render output";
- ot->idname= "VIEW3D_OT_zoom_camera_1_to_1";
+ ot->idname = "VIEW3D_OT_zoom_camera_1_to_1";
/* api callbacks */
- ot->exec= view3d_zoom_1_to_1_camera_exec;
- ot->poll= view3d_camera_user_poll;
+ ot->exec = view3d_zoom_1_to_1_camera_exec;
+ ot->poll = view3d_camera_user_poll;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
/* ********************* Changing view operator ****************** */
@@ -2681,16 +2679,20 @@ static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar,
/* normal operation */
if (rv3d->viewlock) {
/* only pass on if */
- if (rv3d->view==RV3D_VIEW_FRONT && view==RV3D_VIEW_BACK);
- else if (rv3d->view==RV3D_VIEW_BACK && view==RV3D_VIEW_FRONT);
- else if (rv3d->view==RV3D_VIEW_RIGHT && view==RV3D_VIEW_LEFT);
- else if (rv3d->view==RV3D_VIEW_LEFT && view==RV3D_VIEW_RIGHT);
- else if (rv3d->view==RV3D_VIEW_BOTTOM && view==RV3D_VIEW_TOP);
- else if (rv3d->view==RV3D_VIEW_TOP && view==RV3D_VIEW_BOTTOM);
- else return;
+
+ /* nice confusing if-block */
+ if (!((rv3d->view == RV3D_VIEW_FRONT && view == RV3D_VIEW_BACK) ||
+ (rv3d->view == RV3D_VIEW_BACK && view == RV3D_VIEW_FRONT) ||
+ (rv3d->view == RV3D_VIEW_RIGHT && view == RV3D_VIEW_LEFT) ||
+ (rv3d->view == RV3D_VIEW_LEFT && view == RV3D_VIEW_RIGHT) ||
+ (rv3d->view == RV3D_VIEW_BOTTOM && view == RV3D_VIEW_TOP) ||
+ (rv3d->view == RV3D_VIEW_TOP && view == RV3D_VIEW_BOTTOM)))
+ {
+ return;
+ }
}
- rv3d->view= view;
+ rv3d->view = view;
}
if (rv3d->viewlock) {
@@ -2811,7 +2813,7 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
}
}
- /* if the camera isnt found, check a number of options */
+ /* if the camera isn't found, check a number of options */
if (v3d->camera==NULL && ob && ob->type==OB_CAMERA)
v3d->camera= ob;
@@ -2822,7 +2824,7 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
if (v3d->camera==NULL)
return OPERATOR_CANCELLED;
- /* important these dont get out of sync for locked scenes */
+ /* important these don't get out of sync for locked scenes */
if (v3d->scenelock)
scene->camera= v3d->camera;
@@ -2831,7 +2833,7 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
smooth_view(C, v3d, ar, NULL, v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens);
}
- else{
+ else {
/* return to settings of last view */
/* does smooth_view too */
axis_set_view(C, v3d, ar,
@@ -2854,16 +2856,16 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_viewnumpad(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View numpad";
+ ot->name = "View numpad";
ot->description = "Set the view";
- ot->idname= "VIEW3D_OT_viewnumpad";
+ ot->idname = "VIEW3D_OT_viewnumpad";
/* api callbacks */
- ot->exec= viewnumpad_exec;
- ot->poll= ED_operator_rv3d_user_region_poll;
+ ot->exec = viewnumpad_exec;
+ ot->poll = ED_operator_rv3d_user_region_poll;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
RNA_def_enum(ot->srna, "type", prop_view_items, 0, "View", "The Type of view");
RNA_def_boolean(ot->srna, "align_active", 0, "Align Active", "Align to the active object's axis");
@@ -2927,16 +2929,16 @@ static int vieworbit_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_view_orbit(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Orbit";
+ ot->name = "View Orbit";
ot->description = "Orbit the view";
- ot->idname= "VIEW3D_OT_view_orbit";
+ ot->idname = "VIEW3D_OT_view_orbit";
/* api callbacks */
- ot->exec= vieworbit_exec;
- ot->poll= ED_operator_rv3d_user_region_poll;
+ ot->exec = vieworbit_exec;
+ ot->poll = ED_operator_rv3d_user_region_poll;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
RNA_def_enum(ot->srna, "type", prop_view_orbit_items, 0, "Orbit", "Direction of View Orbit");
}
@@ -2975,16 +2977,16 @@ static int viewpan_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_view_pan(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Pan";
+ ot->name = "View Pan";
ot->description = "Pan the view";
- ot->idname= "VIEW3D_OT_view_pan";
+ ot->idname = "VIEW3D_OT_view_pan";
/* api callbacks */
- ot->exec= viewpan_exec;
- ot->poll= ED_operator_region_view3d_active;
+ ot->exec = viewpan_exec;
+ ot->poll = ED_operator_region_view3d_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
RNA_def_enum(ot->srna, "type", prop_view_pan_items, 0, "Pan", "Direction of View Pan");
}
@@ -3012,16 +3014,16 @@ static int viewpersportho_exec(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_view_persportho(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "View Persp/Ortho";
+ ot->name = "View Persp/Ortho";
ot->description = "Switch the current view from perspective/orthographic";
- ot->idname= "VIEW3D_OT_view_persportho";
+ ot->idname = "VIEW3D_OT_view_persportho";
/* api callbacks */
- ot->exec= viewpersportho_exec;
- ot->poll= ED_operator_rv3d_user_region_poll;
+ ot->exec = viewpersportho_exec;
+ ot->poll = ED_operator_rv3d_user_region_poll;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
@@ -3081,7 +3083,7 @@ void VIEW3D_OT_background_image_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add Background Image";
- ot->description= "Add a new background image";
+ ot->description = "Add a new background image";
ot->idname = "VIEW3D_OT_background_image_add";
/* api callbacks */
@@ -3120,7 +3122,7 @@ void VIEW3D_OT_background_image_remove(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Remove Background Image";
- ot->description= "Remove a background image from the 3D view";
+ ot->description = "Remove a background image from the 3D view";
ot->idname = "VIEW3D_OT_background_image_remove";
/* api callbacks */
@@ -3178,10 +3180,10 @@ static int view3d_clipping_exec(bContext *C, wmOperator *op)
bglMats mats;
rcti rect;
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
rv3d->rflag |= RV3D_CLIPPING;
rv3d->clipbb= MEM_callocN(sizeof(BoundBox), "clipbb");
@@ -3218,20 +3220,20 @@ void VIEW3D_OT_clip_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clipping Border";
+ ot->name = "Clipping Border";
ot->description = "Set the view clipping border";
- ot->idname= "VIEW3D_OT_clip_border";
+ ot->idname = "VIEW3D_OT_clip_border";
/* api callbacks */
- ot->invoke= view3d_clipping_invoke;
- ot->exec= view3d_clipping_exec;
- ot->modal= WM_border_select_modal;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = view3d_clipping_invoke;
+ ot->exec = view3d_clipping_exec;
+ ot->modal = WM_border_select_modal;
+ ot->cancel = WM_border_select_cancel;
- ot->poll= ED_operator_region_view3d_active;
+ ot->poll = ED_operator_region_view3d_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
/* rna */
RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX);
@@ -3312,17 +3314,17 @@ void VIEW3D_OT_cursor3d(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set 3D Cursor";
+ ot->name = "Set 3D Cursor";
ot->description = "Set the location of the 3D cursor";
- ot->idname= "VIEW3D_OT_cursor3d";
+ ot->idname = "VIEW3D_OT_cursor3d";
/* api callbacks */
- ot->invoke= set_3dcursor_invoke;
+ ot->invoke = set_3dcursor_invoke;
- ot->poll= ED_operator_view3d_active;
+ ot->poll = ED_operator_view3d_active;
/* flags */
-// ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+// ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* rna later */
@@ -3354,14 +3356,14 @@ void VIEW3D_OT_manipulator(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "3D Manipulator";
+ ot->name = "3D Manipulator";
ot->description = "Manipulate selected item by axis";
- ot->idname= "VIEW3D_OT_manipulator";
+ ot->idname = "VIEW3D_OT_manipulator";
/* api callbacks */
- ot->invoke= manipulator_invoke;
+ ot->invoke = manipulator_invoke;
- ot->poll= ED_operator_view3d_active;
+ ot->poll = ED_operator_view3d_active;
/* properties to pass to transform */
Transform_Properties(ot, P_CONSTRAINT);
@@ -3388,13 +3390,13 @@ static int enable_manipulator_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE
void VIEW3D_OT_enable_manipulator(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Enable 3D Manipulator";
+ ot->name = "Enable 3D Manipulator";
ot->description = "Enable the transform manipulator for use";
- ot->idname= "VIEW3D_OT_enable_manipulator";
+ ot->idname = "VIEW3D_OT_enable_manipulator";
/* api callbacks */
- ot->invoke= enable_manipulator_invoke;
- ot->poll= ED_operator_view3d_active;
+ ot->invoke = enable_manipulator_invoke;
+ ot->poll = ED_operator_view3d_active;
/* rna later */
RNA_def_boolean(ot->srna, "translate", 0, "Translate", "Enable the translate manipulator");
@@ -3413,10 +3415,10 @@ static float view_autodist_depth_margin(ARegion *ar, const int mval[2], int marg
if (margin==0) {
/* Get Z Depths, needed for perspective, nice for ortho */
- rect.xmin= mval[0];
- rect.ymin= mval[1];
- rect.xmax= mval[0] + 1;
- rect.ymax= mval[1] + 1;
+ rect.xmin = mval[0];
+ rect.ymin = mval[1];
+ rect.xmax = mval[0] + 1;
+ rect.ymax = mval[1] + 1;
}
else {
rect.xmax = mval[0] + margin;
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index 614fa45771d..819d3e0ca4a 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -185,7 +185,7 @@ typedef struct FlyInfo {
* 0) disabled
* 1) enabled but not checking because mouse hasn't moved outside the margin since locking was checked an not needed
* when the mouse moves, locking is set to 2 so checks are done.
- * 2) mouse moved and checking needed, if no view altering is donem its changed back to 1 */
+ * 2) mouse moved and checking needed, if no view altering is done its changed back to 1 */
short xlock, zlock;
float xlock_momentum, zlock_momentum; /* nicer dynamics */
float grid; /* world scale 1.0 default */
@@ -314,7 +314,7 @@ static int initFlyInfo(bContext *C, FlyInfo *fly, wmOperator *op, wmEvent *event
#ifdef NDOF_FLY_DRAW_TOOMUCH
fly->redraw= 1;
#endif
- fly->dvec_prev[0] = fly->dvec_prev[1] = fly->dvec_prev[2] = 0.0f;
+ zero_v3(fly->dvec_prev);
fly->timer = WM_event_add_timer(CTX_wm_manager(C), win, TIMER, 0.01f);
@@ -525,7 +525,7 @@ static void flyEvent(FlyInfo *fly, wmEvent *event)
fly->time_lastdraw = PIL_check_seconds_timer();
break;
default:
- ; // should always be one of the above 3
+ break; /* should always be one of the above 3 */
}
}
/* handle modal keymap first */
@@ -813,7 +813,7 @@ static int flyApply(bContext *C, FlyInfo *fly)
/* scale the mouse movement by this value - scales mouse movement to the view size
* moffset[0]/(ar->winx-xmargin*2) - window size minus margin (same for y)
*
- * the mouse moves isnt linear */
+ * the mouse moves isn't linear */
if (moffset[0]) {
moffset[0] /= ar->winx - (xmargin * 2);
@@ -834,7 +834,7 @@ static int flyApply(bContext *C, FlyInfo *fly)
float dvec_tmp[3];
/* time how fast it takes for us to redraw,
- * this is so simple scenes dont fly too fast */
+ * this is so simple scenes don't fly too fast */
double time_current;
float time_redraw;
float time_redraw_clamped;
@@ -946,12 +946,12 @@ static int flyApply(bContext *C, FlyInfo *fly)
fly->zlock_momentum += FLY_ZUP_CORRECT_ACCEL;
}
else {
- fly->zlock = 1; /* dont check until the view rotates again */
+ fly->zlock = 1; /* don't check until the view rotates again */
fly->zlock_momentum = 0.0f;
}
}
- if (fly->xlock == 2 && moffset[1] == 0) { /*only apply xcorrect when mouse isnt applying x rot*/
+ if (fly->xlock == 2 && moffset[1] == 0) { /*only apply xcorrect when mouse isn't applying x rot*/
upvec[0] = 0;
upvec[1] = 0;
upvec[2] = 1;
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 17f5ab68633..c20ea004e9d 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -254,17 +254,17 @@ static int view3d_layers_poll(bContext *C)
void VIEW3D_OT_layers(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Layers";
- ot->description= "Toggle layer(s) visibility";
- ot->idname= "VIEW3D_OT_layers";
+ ot->name = "Layers";
+ ot->description = "Toggle layer(s) visibility";
+ ot->idname = "VIEW3D_OT_layers";
/* api callbacks */
- ot->invoke= view3d_layers_invoke;
- ot->exec= view3d_layers_exec;
- ot->poll= view3d_layers_poll;
+ ot->invoke = view3d_layers_invoke;
+ ot->exec = view3d_layers_exec;
+ ot->poll = view3d_layers_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_int(ot->srna, "nr", 1, 0, 20, "Number", "The layer number to set, zero for all layers", 0, 20);
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Add this layer to the current view layers");
@@ -455,9 +455,9 @@ void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C)
row= uiLayoutRow(layout, 1);
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, "Vertex select mode");
- uiDefIconButBitS(block, TOG, SCE_SELECT_EDGE, B_SEL_EDGE, ICON_EDGESEL, 0,0,UI_UNIT_X,UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, "Edge select mode");
- uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, 0,0,UI_UNIT_X,UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, "Face select mode");
+ 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, "Vertex select - Shift-Click for multiple modes");
+ uiDefIconButBitS(block, TOG, SCE_SELECT_EDGE, B_SEL_EDGE, ICON_EDGESEL, 0,0,UI_UNIT_X,UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, "Edge select - Shift-Click for multiple modes");
+ uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, 0,0,UI_UNIT_X,UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, "Face select - Shift-Click for multiple modes");
}
}
@@ -527,7 +527,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
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
- * so dont be totally strict and just check not-editmode for now */
+ * so don't be totally strict and just check not-editmode for now */
if (obedit == NULL) {
uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
}
@@ -538,11 +538,11 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
block= uiLayoutGetBlock(row);
if (v3d->twflag & V3D_USE_MANIPULATOR) {
- but= uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Translate manipulator mode"));
+ but = uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Translate manipulator - Shift-Click for multiple modes"));
uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
- but= uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Rotate manipulator mode"));
+ but = uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Rotate manipulator - Shift-Click for multiple modes"));
uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
- but= uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Scale manipulator mode"));
+ but = uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Scale manipulator - Shift-Click for multiple modes"));
uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
}
@@ -551,7 +551,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
}
str_menu = BIF_menustringTransformOrientation(C, "Orientation");
- but= uiDefButC(block, MENU, B_MAN_MODE, str_menu,0,0,70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, TIP_("Transform Orientation"));
+ but = uiDefButC(block, MENU, B_MAN_MODE, str_menu,0,0,70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, TIP_("Transform Orientation"));
uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
MEM_freeN((void *)str_menu);
}
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index 759f3edf20f..e4133723089 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -112,13 +112,13 @@ void view3d_keymap(wmKeyConfig *keyconf)
wmKeyMap *keymap;
wmKeyMapItem *kmi;
- keymap= WM_keymap_find(keyconf, "3D View Generic", SPACE_VIEW3D, 0);
+ keymap = WM_keymap_find(keyconf, "3D View Generic", SPACE_VIEW3D, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_properties", NKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_toolshelf", TKEY, KM_PRESS, 0, 0);
/* only for region 3D window */
- keymap= WM_keymap_find(keyconf, "3D View", SPACE_VIEW3D, 0);
+ 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);
@@ -196,22 +196,22 @@ void view3d_keymap(wmKeyConfig *keyconf)
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_orbit", WHEELDOWNMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0)->ptr, "type", V3D_VIEW_STEPDOWN);
/* active aligned, replaces '*' key in 2.4x */
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_SHIFT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_SHIFT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+ 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);
@@ -227,13 +227,13 @@ void view3d_keymap(wmKeyConfig *keyconf)
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_BOTTOM, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_BOTTOM);
/* 3D mouse align */
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_FRONT, KM_PRESS, KM_SHIFT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_RIGHT, KM_PRESS, KM_SHIFT, 0);
+ 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);
- kmi= WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_TOP, KM_PRESS, KM_SHIFT, 0);
+ 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);
@@ -275,12 +275,12 @@ void view3d_keymap(wmKeyConfig *keyconf)
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);
+ 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, "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);
+ 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, "center", FALSE);
RNA_boolean_set(kmi->ptr, "object", FALSE);
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 93cf656dea4..b15dc6ab3c7 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -458,14 +458,14 @@ static void lasso_select_boundbox(rcti *rect, int mcords[][2], short moves)
{
short a;
- rect->xmin= rect->xmax= mcords[0][0];
- rect->ymin= rect->ymax= mcords[0][1];
+ rect->xmin = rect->xmax = mcords[0][0];
+ rect->ymin = rect->ymax = mcords[0][1];
for (a=1; a<moves; a++) {
- if (mcords[a][0]<rect->xmin) rect->xmin= mcords[a][0];
- else if (mcords[a][0]>rect->xmax) rect->xmax= mcords[a][0];
- if (mcords[a][1]<rect->ymin) rect->ymin= mcords[a][1];
- else if (mcords[a][1]>rect->ymax) rect->ymax= mcords[a][1];
+ if (mcords[a][0]<rect->xmin) rect->xmin = mcords[a][0];
+ else if (mcords[a][0]>rect->xmax) rect->xmax = mcords[a][0];
+ if (mcords[a][1]<rect->ymin) rect->ymin = mcords[a][1];
+ else if (mcords[a][1]>rect->ymax) rect->ymax = mcords[a][1];
}
}
@@ -529,7 +529,7 @@ static void do_lasso_select_mesh(ViewContext *vc, int mcords[][2], short moves,
if (extend == 0 && select)
EDBM_flag_disable_all(vc->em, BM_ELEM_SELECT);
- /* for non zbuf projections, dont change the GL state */
+ /* for non zbuf projections, don't change the GL state */
ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d);
glLoadMatrixf(vc->rv3d->viewmat);
@@ -816,12 +816,11 @@ int do_paintvert_box_select(ViewContext *vc, rcti *rect, int select, int extend)
}
mvert= me->mvert;
- for (a=1; a<=me->totvert; a++, mvert++) {
+ for (a = 1; a <= me->totvert; a++, mvert++) {
if (selar[a]) {
- if (mvert->flag & ME_HIDE);
- else {
- if (select) mvert->flag |= SELECT;
- else mvert->flag &= ~SELECT;
+ if ((mvert->flag & ME_HIDE) == 0) {
+ if (select) mvert->flag |= SELECT;
+ else mvert->flag &= ~SELECT;
}
}
}
@@ -998,18 +997,18 @@ static int view3d_lasso_select_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_select_lasso(wmOperatorType *ot)
{
- ot->name= "Lasso Select";
- ot->description= "Select items using lasso selection";
- ot->idname= "VIEW3D_OT_select_lasso";
+ ot->name = "Lasso Select";
+ ot->description = "Select items using lasso selection";
+ ot->idname = "VIEW3D_OT_select_lasso";
- ot->invoke= WM_gesture_lasso_invoke;
- ot->modal= WM_gesture_lasso_modal;
- ot->exec= view3d_lasso_select_exec;
- ot->poll= view3d_selectable_data;
- ot->cancel= WM_gesture_lasso_cancel;
+ ot->invoke = WM_gesture_lasso_invoke;
+ ot->modal = WM_gesture_lasso_modal;
+ ot->exec = view3d_lasso_select_exec;
+ ot->poll = view3d_selectable_data;
+ ot->cancel = WM_gesture_lasso_cancel;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", "");
RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect rather than select items");
@@ -1087,7 +1086,7 @@ static EnumPropertyItem *object_select_menu_enum_itemf(bContext *C, PointerRNA *
int totitem= 0;
int i= 0;
- /* dont need context but avoid docgen using this */
+ /* don't need context but avoid docgen using this */
if (C == NULL || object_mouse_select_menu_data[i].idname[0] == '\0') {
return DummyRNA_NULL_items;
}
@@ -1151,22 +1150,22 @@ void VIEW3D_OT_select_menu(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Select Menu";
+ ot->name = "Select Menu";
ot->description = "Menu object selection";
- ot->idname= "VIEW3D_OT_select_menu";
+ ot->idname = "VIEW3D_OT_select_menu";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_select_menu_exec;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = object_select_menu_exec;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* keyingset to use (dynamic enum) */
prop= RNA_def_enum(ot->srna, "name", DummyRNA_NULL_items, 0, "Object Name", "");
RNA_def_enum_funcs(prop, object_select_menu_enum_itemf);
RNA_def_property_flag(prop, PROP_HIDDEN);
- ot->prop= prop;
+ ot->prop = prop;
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first");
}
@@ -1595,7 +1594,7 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce
WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE, basact->object);
/* in weightpaint, we use selected bone to select vertexgroup, so no switch to new active object */
- if (BASACT && BASACT->object->mode & OB_MODE_WEIGHT_PAINT) {
+ if (BASACT && (BASACT->object->mode & OB_MODE_WEIGHT_PAINT)) {
/* prevent activating */
basact= NULL;
}
@@ -1801,7 +1800,7 @@ static int do_mesh_box_select(ViewContext *vc, rcti *rect, int select, int exten
if (extend == 0 && select)
EDBM_flag_disable_all(vc->em, BM_ELEM_SELECT);
- /* for non zbuf projections, dont change the GL state */
+ /* for non zbuf projections, don't change the GL state */
ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d);
glLoadMatrixf(vc->rv3d->viewmat);
@@ -2064,10 +2063,10 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
view3d_set_viewcontext(C, &vc);
select= (RNA_int_get(op->ptr, "gesture_mode")==GESTURE_MODAL_SELECT);
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
extend = RNA_boolean_get(op->ptr, "extend");
if (vc.obedit) {
@@ -2137,19 +2136,19 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Select";
- ot->description= "Select items using border selection";
- ot->idname= "VIEW3D_OT_select_border";
+ ot->name = "Border Select";
+ ot->description = "Select items using border selection";
+ ot->idname = "VIEW3D_OT_select_border";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= view3d_borderselect_exec;
- ot->modal= WM_border_select_modal;
- ot->poll= view3d_selectable_data;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = view3d_borderselect_exec;
+ ot->modal = WM_border_select_modal;
+ ot->poll = view3d_selectable_data;
+ ot->cancel = WM_border_select_cancel;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* rna */
WM_operator_properties_gesture_border(ot, TRUE);
@@ -2270,16 +2269,16 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
void VIEW3D_OT_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Activate/Select";
- ot->description= "Activate/select item(s)";
- ot->idname= "VIEW3D_OT_select";
+ ot->name = "Activate/Select";
+ ot->description = "Activate/select item(s)";
+ ot->idname = "VIEW3D_OT_select";
/* api callbacks */
- ot->invoke= view3d_select_invoke;
- ot->poll= ED_operator_view3d_active;
+ ot->invoke = view3d_select_invoke;
+ ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first");
@@ -2727,18 +2726,18 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_select_circle(wmOperatorType *ot)
{
- ot->name= "Circle Select";
- ot->description= "Select items using circle selection";
- ot->idname= "VIEW3D_OT_select_circle";
+ ot->name = "Circle Select";
+ ot->description = "Select items using circle selection";
+ ot->idname = "VIEW3D_OT_select_circle";
- ot->invoke= WM_gesture_circle_invoke;
- ot->modal= WM_gesture_circle_modal;
- ot->exec= view3d_circle_select_exec;
- ot->poll= view3d_selectable_data;
- ot->cancel= WM_gesture_circle_cancel;
+ ot->invoke = WM_gesture_circle_invoke;
+ ot->modal = WM_gesture_circle_modal;
+ ot->exec = view3d_circle_select_exec;
+ ot->poll = view3d_selectable_data;
+ ot->cancel = WM_gesture_circle_cancel;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "y", 0, INT_MIN, INT_MAX, "Y", "", INT_MIN, INT_MAX);
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 5d2f0c432fb..fdaf34e2e3c 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -176,7 +176,7 @@ static void special_transvert_update(Object *obedit)
copy_v3_v3(ebo->head, ebo->parent->tail);
}
/* If this bone has a parent tip that has NOT been moved */
- else{
+ else {
copy_v3_v3(ebo->parent->tail, ebo->head);
}
}
@@ -225,7 +225,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
tottrans= 0; // global!
INIT_MINMAX(min, max);
- centroid[0]=centroid[1]=centroid[2]= 0.0;
+ zero_v3(centroid);
if (obedit->type==OB_MESH) {
Mesh *me= obedit->data;
@@ -331,7 +331,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
if (ebo->layer & arm->layer) {
short tipsel= (ebo->flag & BONE_TIPSEL);
short rootsel= (ebo->flag & BONE_ROOTSEL);
- short rootok= (!(ebo->parent && (ebo->flag & BONE_CONNECTED) && ebo->parent->flag & BONE_TIPSEL));
+ short rootok= (!(ebo->parent && (ebo->flag & BONE_CONNECTED) && (ebo->parent->flag & BONE_TIPSEL)));
if ((tipsel && rootsel) || (rootsel)) {
/* Don't add the tip (unless mode & TM_ALL_JOINTS, for getting all joints),
@@ -635,16 +635,16 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_snap_selected_to_grid(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap Selection to Grid";
- ot->description= "Snap selected item(s) to nearest grid node";
- ot->idname= "VIEW3D_OT_snap_selected_to_grid";
+ ot->name = "Snap Selection to Grid";
+ ot->description = "Snap selected item(s) to nearest grid node";
+ ot->idname = "VIEW3D_OT_snap_selected_to_grid";
/* api callbacks */
- ot->exec= snap_sel_to_grid;
- ot->poll= ED_operator_region_view3d_active;
+ ot->exec = snap_sel_to_grid;
+ ot->poll = ED_operator_region_view3d_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* *************************************************** */
@@ -759,16 +759,16 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_snap_selected_to_cursor(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap Selection to Cursor";
- ot->description= "Snap selected item(s) to cursor";
- ot->idname= "VIEW3D_OT_snap_selected_to_cursor";
+ ot->name = "Snap Selection to Cursor";
+ ot->description = "Snap selected item(s) to cursor";
+ ot->idname = "VIEW3D_OT_snap_selected_to_cursor";
/* api callbacks */
- ot->exec= snap_sel_to_curs;
- ot->poll= ED_operator_view3d_active;
+ ot->exec = snap_sel_to_curs;
+ ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* *************************************************** */
@@ -795,16 +795,16 @@ static int snap_curs_to_grid(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_snap_cursor_to_grid(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap Cursor to Grid";
- ot->description= "Snap cursor to nearest grid node";
- ot->idname= "VIEW3D_OT_snap_cursor_to_grid";
+ ot->name = "Snap Cursor to Grid";
+ ot->description = "Snap cursor to nearest grid node";
+ ot->idname = "VIEW3D_OT_snap_cursor_to_grid";
/* api callbacks */
- ot->exec= snap_curs_to_grid;
- ot->poll= ED_operator_region_view3d_active;
+ ot->exec = snap_curs_to_grid;
+ ot->poll = ED_operator_region_view3d_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* **************************************************** */
@@ -874,7 +874,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
count= 0;
INIT_MINMAX(min, max);
- centroid[0]= centroid[1]= centroid[2]= 0.0;
+ zero_v3(centroid);
if (obedit) {
tottrans=0;
@@ -958,16 +958,16 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_snap_cursor_to_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap Cursor to Selected";
- ot->description= "Snap cursor to center of selected item(s)";
- ot->idname= "VIEW3D_OT_snap_cursor_to_selected";
+ ot->name = "Snap Cursor to Selected";
+ ot->description = "Snap cursor to center of selected item(s)";
+ ot->idname = "VIEW3D_OT_snap_cursor_to_selected";
/* api callbacks */
- ot->exec= snap_curs_to_sel;
- ot->poll= ED_operator_view3d_active;
+ ot->exec = snap_curs_to_sel;
+ ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ********************************************** */
@@ -1008,16 +1008,16 @@ static int snap_curs_to_active(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_snap_cursor_to_active(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap Cursor to Active";
- ot->description= "Snap cursor to active item";
- ot->idname= "VIEW3D_OT_snap_cursor_to_active";
+ ot->name = "Snap Cursor to Active";
+ ot->description = "Snap cursor to active item";
+ ot->idname = "VIEW3D_OT_snap_cursor_to_active";
/* api callbacks */
- ot->exec= snap_curs_to_active;
- ot->poll= ED_operator_view3d_active;
+ ot->exec = snap_curs_to_active;
+ ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* **************************************************** */
@@ -1041,16 +1041,16 @@ static int snap_curs_to_center(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_snap_cursor_to_center(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap Cursor to Center";
- ot->description= "Snap cursor to the Center";
- ot->idname= "VIEW3D_OT_snap_cursor_to_center";
+ ot->name = "Snap Cursor to Center";
+ ot->description = "Snap cursor to the Center";
+ ot->idname = "VIEW3D_OT_snap_cursor_to_center";
/* api callbacks */
- ot->exec= snap_curs_to_center;
- ot->poll= ED_operator_view3d_active;
+ ot->exec = snap_curs_to_center;
+ ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* **************************************************** */
diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c
index 355febcde5d..88a490e23b8 100644
--- a/source/blender/editors/space_view3d/view3d_toolbar.c
+++ b/source/blender/editors/space_view3d/view3d_toolbar.c
@@ -176,7 +176,7 @@ static uiBlock *tool_search_menu(bContext *C, ARegion *ar, void *arg_listbase)
/* fake button, it holds space for search items */
uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL);
- but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, 19, 0, 0, "");
+ but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, 19, 0, 0, "");
uiButSetSearchFunc(but, operator_search_cb, arg_listbase, operator_call_cb, NULL);
uiBoundsBlock(block, 6);
@@ -257,14 +257,14 @@ static int view3d_toolshelf(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_toolshelf(wmOperatorType *ot)
{
- ot->name= "Tool Shelf";
- ot->description= "Toggles tool shelf display";
- ot->idname= "VIEW3D_OT_toolshelf";
+ ot->name = "Tool Shelf";
+ ot->description = "Toggles tool shelf display";
+ ot->idname = "VIEW3D_OT_toolshelf";
- ot->exec= view3d_toolshelf;
- ot->poll= ED_operator_view3d_active;
+ ot->exec = view3d_toolshelf;
+ ot->poll = ED_operator_view3d_active;
/* flags */
- ot->flag= 0;
+ ot->flag = 0;
}
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 88658b30662..19dc48c648c 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -145,7 +145,7 @@ void smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Objec
* we may be changing the view 'as if' there is no active camera, but infact
* there is an active camera which is locked to the view.
*
- * In the case where smooth view is moving _to_ a camera we dont want that
+ * In the case where smooth view is moving _to_ a camera we don't want that
* camera to be moved or changed, so only when the camera is not being set should
* we allow camera option locking to initialize the view settings from the camera.
*/
@@ -334,14 +334,14 @@ void VIEW3D_OT_smoothview(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Smooth View";
- ot->idname= "VIEW3D_OT_smoothview";
- ot->description="The time to animate the change of view (in milliseconds)";
+ ot->name = "Smooth View";
+ ot->idname = "VIEW3D_OT_smoothview";
+ ot->description = "The time to animate the change of view (in milliseconds)";
/* api callbacks */
- ot->invoke= view3d_smoothview_invoke;
+ ot->invoke = view3d_smoothview_invoke;
- ot->poll= ED_operator_view3d_active;
+ ot->poll = ED_operator_view3d_active;
}
/* ****************** change view operators ****************** */
@@ -389,16 +389,16 @@ static int view3d_camera_to_view_poll(bContext *C)
void VIEW3D_OT_camera_to_view(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Align Camera To View";
- ot->description= "Set camera view to active view";
- ot->idname= "VIEW3D_OT_camera_to_view";
+ ot->name = "Align Camera To View";
+ ot->description = "Set camera view to active view";
+ ot->idname = "VIEW3D_OT_camera_to_view";
/* api callbacks */
- ot->exec= view3d_camera_to_view_exec;
- ot->poll= view3d_camera_to_view_poll;
+ ot->exec = view3d_camera_to_view_exec;
+ ot->poll = view3d_camera_to_view_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* unlike VIEW3D_OT_view_selected this is for framing a render and not
@@ -456,16 +456,16 @@ static int view3d_camera_to_view_selected_poll(bContext *C)
void VIEW3D_OT_camera_to_view_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Camera Fit Frame to Selected";
- ot->description= "Move the camera so selected objects are framed";
- ot->idname= "VIEW3D_OT_camera_to_view_selected";
+ ot->name = "Camera Fit Frame to Selected";
+ ot->description = "Move the camera so selected objects are framed";
+ ot->idname = "VIEW3D_OT_camera_to_view_selected";
/* api callbacks */
- ot->exec= view3d_camera_to_view_selected_exec;
- ot->poll= view3d_camera_to_view_selected_poll;
+ ot->exec = view3d_camera_to_view_selected_exec;
+ ot->poll = view3d_camera_to_view_selected_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
@@ -510,16 +510,16 @@ void VIEW3D_OT_object_as_camera(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Active Object as Camera";
- ot->description= "Set the active object as the active camera for this view or scene";
- ot->idname= "VIEW3D_OT_object_as_camera";
+ ot->name = "Set Active Object as Camera";
+ ot->description = "Set the active object as the active camera for this view or scene";
+ ot->idname = "VIEW3D_OT_object_as_camera";
/* api callbacks */
- ot->exec= view3d_setobjectascamera_exec;
- ot->poll= ED_operator_rv3d_user_region_poll;
+ ot->exec = view3d_setobjectascamera_exec;
+ ot->poll = ED_operator_rv3d_user_region_poll;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
/* ********************************** */
@@ -807,7 +807,7 @@ void ED_view3d_project_float_v3(ARegion *ar, const float vec[3], float adr[3], f
adr[2] = vec4[2]/vec4[3];
}
else {
- adr[0] = adr[1] = adr[2] = 0.0f;
+ zero_v3(adr);
}
}
@@ -1049,13 +1049,13 @@ void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect) /* rect: for pick
if (rect) { /* picking */
rect->xmin/= (float)ar->winx;
- rect->xmin= x1+rect->xmin*(x2-x1);
+ rect->xmin = x1+rect->xmin*(x2-x1);
rect->ymin/= (float)ar->winy;
- rect->ymin= y1+rect->ymin*(y2-y1);
+ rect->ymin = y1+rect->ymin*(y2-y1);
rect->xmax/= (float)ar->winx;
- rect->xmax= x1+rect->xmax*(x2-x1);
+ rect->xmax = x1+rect->xmax*(x2-x1);
rect->ymax/= (float)ar->winy;
- rect->ymax= y1+rect->ymax*(y2-y1);
+ rect->ymax = y1+rect->ymax*(y2-y1);
if (orth) wmOrtho(rect->xmin, rect->xmax, rect->ymin, rect->ymax, -clipend, clipend);
else wmFrustum(rect->xmin, rect->xmax, rect->ymin, rect->ymax, clipsta, clipend);
@@ -1075,7 +1075,7 @@ static void obmat_to_viewmat(View3D *v3d, RegionView3D *rv3d, Object *ob, short
float bmat[4][4];
float tmat[3][3];
- rv3d->view= RV3D_VIEW_USER; /* dont show the grid */
+ rv3d->view= RV3D_VIEW_USER; /* don't show the grid */
copy_m4_m4(bmat, ob->obmat);
normalize_m4(bmat);
@@ -1150,7 +1150,7 @@ int ED_view3d_lock(RegionView3D *rv3d)
return TRUE;
}
-/* dont set windows active in here, is used by renderwin too */
+/* don't set windows active in here, is used by renderwin too */
void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d)
{
if (rv3d->persp==RV3D_CAMOB) { /* obs/camera */
@@ -1210,17 +1210,17 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b
G.f |= G_PICKSEL;
/* case not a border select */
- if (input->xmin==input->xmax) {
- rect.xmin= input->xmin-12; // seems to be default value for bones only now
- rect.xmax= input->xmin+12;
- rect.ymin= input->ymin-12;
- rect.ymax= input->ymin+12;
+ if (input->xmin ==input->xmax) {
+ rect.xmin = input->xmin-12; // seems to be default value for bones only now
+ rect.xmax = input->xmin+12;
+ rect.ymin = input->ymin-12;
+ rect.ymax = input->ymin+12;
}
else {
- rect.xmin= input->xmin;
- rect.xmax= input->xmax;
- rect.ymin= input->ymin;
- rect.ymax= input->ymax;
+ rect.xmin = input->xmin;
+ rect.xmax = input->xmax;
+ rect.ymin = input->ymin;
+ rect.ymax = input->ymax;
}
setwinmatrixview3d(ar, v3d, &rect);
@@ -1580,15 +1580,15 @@ void VIEW3D_OT_localview(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Local View";
- ot->description= "Toggle display of selected object(s) separately and centered in view";
- ot->idname= "VIEW3D_OT_localview";
+ ot->name = "Local View";
+ ot->description = "Toggle display of selected object(s) separately and centered in view";
+ ot->idname = "VIEW3D_OT_localview";
/* api callbacks */
- ot->exec= localview_exec;
- ot->flag= OPTYPE_UNDO; /* localview changes object layer bitflags */
+ ot->exec = localview_exec;
+ ot->flag = OPTYPE_UNDO; /* localview changes object layer bitflags */
- ot->poll= ED_operator_view3d_active;
+ ot->poll = ED_operator_view3d_active;
}
#ifdef WITH_GAMEENGINE
@@ -1814,14 +1814,14 @@ void VIEW3D_OT_game_start(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Start Game Engine";
- ot->description= "Start game engine";
- ot->idname= "VIEW3D_OT_game_start";
+ ot->name = "Start Game Engine";
+ ot->description = "Start game engine";
+ ot->idname = "VIEW3D_OT_game_start";
/* api callbacks */
- ot->exec= game_engine_exec;
+ ot->exec = game_engine_exec;
- ot->poll= game_engine_poll;
+ ot->poll = game_engine_poll;
}
/* ************************************** */
diff --git a/source/blender/editors/transform/CMakeLists.txt b/source/blender/editors/transform/CMakeLists.txt
index 98461918151..05a4f6f4ce5 100644
--- a/source/blender/editors/transform/CMakeLists.txt
+++ b/source/blender/editors/transform/CMakeLists.txt
@@ -49,4 +49,8 @@ set(SRC
transform.h
)
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_transform "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/transform/SConscript b/source/blender/editors/transform/SConscript
index 0cf3875aa2e..dbf6179035c 100644
--- a/source/blender/editors/transform/SConscript
+++ b/source/blender/editors/transform/SConscript
@@ -8,4 +8,9 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../render/extern/include'
incs += ' ../../gpu ../../makesrna ../../blenloader ../../bmesh'
-env.BlenderLib ( 'bf_editors_transform', sources, Split(incs), [], libtype=['core'], priority=[40] )
+defs = []
+
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
+env.BlenderLib ( 'bf_editors_transform', sources, Split(incs), defs, libtype=['core'], priority=[40] )
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 43427d0dbe8..fe224398980 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -104,7 +104,7 @@ static int doEdgeSlide(TransInfo *t, float perc);
void setTransformViewMatrices(TransInfo *t)
{
- if(t->spacetype==SPACE_VIEW3D && t->ar && t->ar->regiontype == RGN_TYPE_WINDOW) {
+ if (t->spacetype==SPACE_VIEW3D && t->ar && t->ar->regiontype == RGN_TYPE_WINDOW) {
RegionView3D *rv3d = t->ar->regiondata;
copy_m4_m4(t->viewmat, rv3d->viewmat);
@@ -136,53 +136,53 @@ static void convertViewVec2D(View2D *v2d, float vec[3], int dx, int dy)
vec[2]= 0.0f;
}
-void convertViewVec(TransInfo *t, float vec[3], int dx, int dy)
+void convertViewVec(TransInfo *t, float r_vec[3], int dx, int dy)
{
if ((t->spacetype == SPACE_VIEW3D) && (t->ar->regiontype == RGN_TYPE_WINDOW)) {
float mval_f[2];
mval_f[0] = dx;
mval_f[1] = dy;
- ED_view3d_win_to_delta(t->ar, mval_f, vec);
+ ED_view3d_win_to_delta(t->ar, mval_f, r_vec);
}
- else if(t->spacetype==SPACE_IMAGE) {
+ else if (t->spacetype==SPACE_IMAGE) {
float aspx, aspy;
- convertViewVec2D(t->view, vec, dx, dy);
+ convertViewVec2D(t->view, r_vec, dx, dy);
ED_space_image_uv_aspect(t->sa->spacedata.first, &aspx, &aspy);
- vec[0]*= aspx;
- vec[1]*= aspy;
+ r_vec[0] *= aspx;
+ r_vec[1] *= aspy;
}
- else if(ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)) {
- convertViewVec2D(t->view, vec, dx, dy);
+ else if (ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)) {
+ convertViewVec2D(t->view, r_vec, dx, dy);
}
- else if(ELEM(t->spacetype, SPACE_NODE, SPACE_SEQ)) {
- convertViewVec2D(&t->ar->v2d, vec, dx, dy);
+ else if (ELEM(t->spacetype, SPACE_NODE, SPACE_SEQ)) {
+ convertViewVec2D(&t->ar->v2d, r_vec, dx, dy);
}
- else if(t->spacetype==SPACE_CLIP) {
+ else if (t->spacetype==SPACE_CLIP) {
View2D *v2d = t->view;
float divx, divy;
divx= v2d->mask.xmax-v2d->mask.xmin;
divy= v2d->mask.ymax-v2d->mask.ymin;
- vec[0]= (v2d->cur.xmax-v2d->cur.xmin)*(dx)/divx;
- vec[1]= (v2d->cur.ymax-v2d->cur.ymin)*(dy)/divy;
- vec[2]= 0.0f;
+ r_vec[0] = (v2d->cur.xmax-v2d->cur.xmin)*(dx)/divx;
+ r_vec[1] = (v2d->cur.ymax-v2d->cur.ymin)*(dy)/divy;
+ r_vec[2] = 0.0f;
}
else {
printf("%s: called in an invalid context\n", __func__);
- zero_v3(vec);
+ zero_v3(r_vec);
}
}
-void projectIntView(TransInfo *t, float *vec, int *adr)
+void projectIntView(TransInfo *t, const float vec[3], int adr[2])
{
if (t->spacetype==SPACE_VIEW3D) {
- if(t->ar->regiontype == RGN_TYPE_WINDOW)
+ if (t->ar->regiontype == RGN_TYPE_WINDOW)
project_int_noclip(t->ar, vec, adr);
}
- else if(t->spacetype==SPACE_IMAGE) {
+ else if (t->spacetype==SPACE_IMAGE) {
float aspx, aspy, v[2];
ED_space_image_uv_aspect(t->sa->spacedata.first, &aspx, &aspy);
@@ -191,7 +191,7 @@ void projectIntView(TransInfo *t, float *vec, int *adr)
UI_view2d_to_region_no_clip(t->view, v[0], v[1], adr, adr+1);
}
- else if(t->spacetype == SPACE_ACTION) {
+ else if (t->spacetype == SPACE_ACTION) {
int out[2] = {0, 0};
#if 0
SpaceAction *sact = t->sa->spacedata.first;
@@ -210,45 +210,50 @@ void projectIntView(TransInfo *t, float *vec, int *adr)
adr[0]= out[0];
adr[1]= out[1];
}
- else if(ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)) {
+ else if (ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)) {
int out[2] = {0, 0};
UI_view2d_to_region_no_clip((View2D *)t->view, vec[0], vec[1], out, out+1);
adr[0]= out[0];
adr[1]= out[1];
}
- else if(t->spacetype==SPACE_SEQ) { /* XXX not tested yet, but should work */
+ else if (t->spacetype==SPACE_SEQ) { /* XXX not tested yet, but should work */
int out[2] = {0, 0};
UI_view2d_to_region_no_clip((View2D *)t->view, vec[0], vec[1], out, out+1);
adr[0]= out[0];
adr[1]= out[1];
}
- else if(t->spacetype==SPACE_CLIP) {
+ else if (t->spacetype==SPACE_CLIP) {
UI_view2d_to_region_no_clip(t->view, vec[0], vec[1], adr, adr+1);
}
}
-void projectFloatView(TransInfo *t, float *vec, float *adr)
+void projectFloatView(TransInfo *t, const float vec[3], float adr[2])
{
- if (t->spacetype==SPACE_VIEW3D) {
- if(t->ar->regiontype == RGN_TYPE_WINDOW)
- project_float_noclip(t->ar, vec, adr);
- }
- else if(ELEM(t->spacetype, SPACE_IMAGE, SPACE_CLIP)) {
- int a[2];
-
- projectIntView(t, vec, a);
- adr[0]= a[0];
- adr[1]= a[1];
+ switch (t->spacetype) {
+ case SPACE_VIEW3D:
+ {
+ if (t->ar->regiontype == RGN_TYPE_WINDOW) {
+ project_float_noclip(t->ar, vec, adr);
+ return;
+ }
+ break;
+ }
+ case SPACE_IMAGE:
+ case SPACE_CLIP:
+ case SPACE_IPO:
+ case SPACE_NLA:
+ {
+ int a[2];
+ projectIntView(t, vec, a);
+ adr[0] = a[0];
+ adr[1] = a[1];
+ return;
+ }
}
- else if(ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)) {
- int a[2];
- projectIntView(t, vec, a);
- adr[0]= a[0];
- adr[1]= a[1];
- }
+ zero_v2(adr);
}
void applyAspectRatio(TransInfo *t, float *vec)
@@ -257,7 +262,7 @@ void applyAspectRatio(TransInfo *t, float *vec)
SpaceImage *sima= t->sa->spacedata.first;
float aspx, aspy;
- if((sima->flag & SI_COORDFLOATS)==0) {
+ if ((sima->flag & SI_COORDFLOATS)==0) {
int width, height;
ED_space_image_size(sima, &width, &height);
@@ -277,7 +282,7 @@ void removeAspectRatio(TransInfo *t, float *vec)
SpaceImage *sima= t->sa->spacedata.first;
float aspx, aspy;
- if((sima->flag & SI_COORDFLOATS)==0) {
+ if ((sima->flag & SI_COORDFLOATS)==0) {
int width, height;
ED_space_image_size(sima, &width, &height);
@@ -296,7 +301,7 @@ static void viewRedrawForce(const bContext *C, TransInfo *t)
if (t->spacetype == SPACE_VIEW3D)
{
/* Do we need more refined tags? */
- if(t->flag & T_POSE)
+ if (t->flag & T_POSE)
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
else
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
@@ -318,17 +323,17 @@ static void viewRedrawForce(const bContext *C, TransInfo *t)
else if (t->spacetype == SPACE_NLA) {
WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL);
}
- else if(t->spacetype == SPACE_NODE) {
+ else if (t->spacetype == SPACE_NODE) {
//ED_area_tag_redraw(t->sa);
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
}
- else if(t->spacetype == SPACE_SEQ) {
+ else if (t->spacetype == SPACE_SEQ) {
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, NULL);
}
else if (t->spacetype==SPACE_IMAGE) {
// XXX how to deal with lock?
SpaceImage *sima= (SpaceImage*)t->sa->spacedata.first;
- if(sima->lock) WM_event_add_notifier(C, NC_GEOM|ND_DATA, t->obedit->data);
+ if (sima->lock) WM_event_add_notifier(C, NC_GEOM|ND_DATA, t->obedit->data);
else ED_area_tag_redraw(t->sa);
}
else if (t->spacetype==SPACE_CLIP) {
@@ -346,7 +351,7 @@ static void viewRedrawPost(bContext *C, TransInfo *t)
{
ED_area_headerprint(t->sa, NULL);
- if(t->spacetype == SPACE_VIEW3D) {
+ if (t->spacetype == SPACE_VIEW3D) {
/* if autokeying is enabled, send notifiers that keyframes were added */
if (IS_AUTOKEY_ON(t->scene))
WM_main_add_notifier(NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
@@ -357,15 +362,15 @@ static void viewRedrawPost(bContext *C, TransInfo *t)
}
#if 0 // TRANSFORM_FIX_ME
- if(t->spacetype==SPACE_VIEW3D) {
+ if (t->spacetype==SPACE_VIEW3D) {
allqueue(REDRAWBUTSOBJECT, 0);
allqueue(REDRAWVIEW3D, 0);
}
- else if(t->spacetype==SPACE_IMAGE) {
+ else if (t->spacetype==SPACE_IMAGE) {
allqueue(REDRAWIMAGE, 0);
allqueue(REDRAWVIEW3D, 0);
}
- else if(ELEM3(t->spacetype, SPACE_ACTION, SPACE_NLA, SPACE_IPO)) {
+ else if (ELEM3(t->spacetype, SPACE_ACTION, SPACE_NLA, SPACE_IPO)) {
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWACTION, 0);
allqueue(REDRAWNLA, 0);
@@ -388,7 +393,7 @@ void BIF_selectOrientation(void)
val= pupmenu(str_menu);
MEM_freeN(str_menu);
- if(val >= 0) {
+ if (val >= 0) {
G.vd->twmode = val;
}
#endif
@@ -413,23 +418,27 @@ static void view_editmove(unsigned short UNUSED(event))
switch(event) {
case WHEELUPMOUSE:
- if( G.qual & LR_SHIFTKEY ) {
- if( G.qual & LR_ALTKEY ) {
+ if ( G.qual & LR_SHIFTKEY ) {
+ if ( G.qual & LR_ALTKEY ) {
G.qual &= ~LR_SHIFTKEY;
persptoetsen(PAD2);
G.qual |= LR_SHIFTKEY;
- } else {
+ }
+ else {
persptoetsen(PAD2);
}
- } else if( G.qual & LR_CTRLKEY ) {
- if( G.qual & LR_ALTKEY ) {
+ }
+ else if ( G.qual & LR_CTRLKEY ) {
+ if ( G.qual & LR_ALTKEY ) {
G.qual &= ~LR_CTRLKEY;
persptoetsen(PAD4);
G.qual |= LR_CTRLKEY;
- } else {
+ }
+ else {
persptoetsen(PAD4);
}
- } else if(U.uiflag & USER_WHEELZOOMDIR)
+ }
+ else if (U.uiflag & USER_WHEELZOOMDIR)
persptoetsen(PADMINUS);
else
persptoetsen(PADPLUSKEY);
@@ -437,23 +446,27 @@ static void view_editmove(unsigned short UNUSED(event))
refresh = 1;
break;
case WHEELDOWNMOUSE:
- if( G.qual & LR_SHIFTKEY ) {
- if( G.qual & LR_ALTKEY ) {
+ if ( G.qual & LR_SHIFTKEY ) {
+ if ( G.qual & LR_ALTKEY ) {
G.qual &= ~LR_SHIFTKEY;
persptoetsen(PAD8);
G.qual |= LR_SHIFTKEY;
- } else {
+ }
+ else {
persptoetsen(PAD8);
}
- } else if( G.qual & LR_CTRLKEY ) {
- if( G.qual & LR_ALTKEY ) {
+ }
+ else if ( G.qual & LR_CTRLKEY ) {
+ if ( G.qual & LR_ALTKEY ) {
G.qual &= ~LR_CTRLKEY;
persptoetsen(PAD6);
G.qual |= LR_CTRLKEY;
- } else {
+ }
+ else {
persptoetsen(PAD6);
}
- } else if(U.uiflag & USER_WHEELZOOMDIR)
+ }
+ else if (U.uiflag & USER_WHEELZOOMDIR)
persptoetsen(PADPLUSKEY);
else
persptoetsen(PADMINUS);
@@ -526,7 +539,7 @@ wmKeyMap* transform_modal_keymap(wmKeyConfig *keyconf)
wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Transform Modal Map");
/* this function is called for each spacetype, only needs to add map once */
- if(keymap) return NULL;
+ if (keymap) return NULL;
keymap= WM_modalkeymap_add(keyconf, "Transform Modal Map", modal_items);
@@ -602,15 +615,15 @@ int transformEvent(TransInfo *t, wmEvent *event)
break;
case TFM_MODAL_TRANSLATE:
/* only switch when... */
- if( ELEM3(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL) ) {
+ if ( ELEM3(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL) ) {
resetTransRestrictions(t);
restoreTransObjects(t);
initTranslation(t);
initSnapping(t, NULL); // need to reinit after mode change
t->redraw |= TREDRAW_HARD;
}
- else if(t->mode == TFM_TRANSLATION) {
- if(t->options&CTX_MOVIECLIP) {
+ else if (t->mode == TFM_TRANSLATION) {
+ if (t->options&CTX_MOVIECLIP) {
restoreTransObjects(t);
t->flag^= T_ALT_TRANSFORM;
@@ -620,8 +633,8 @@ int transformEvent(TransInfo *t, wmEvent *event)
break;
case TFM_MODAL_ROTATE:
/* only switch when... */
- if(!(t->options & CTX_TEXTURE) && !(t->options & CTX_MOVIECLIP)) {
- if( ELEM4(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL, TFM_TRANSLATION) ) {
+ if (!(t->options & CTX_TEXTURE) && !(t->options & CTX_MOVIECLIP)) {
+ if ( ELEM4(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL, TFM_TRANSLATION) ) {
resetTransRestrictions(t);
@@ -640,7 +653,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
break;
case TFM_MODAL_RESIZE:
/* only switch when... */
- if( ELEM3(t->mode, TFM_ROTATION, TFM_TRANSLATION, TFM_TRACKBALL) ) {
+ if ( ELEM3(t->mode, TFM_ROTATION, TFM_TRANSLATION, TFM_TRACKBALL) ) {
resetTransRestrictions(t);
restoreTransObjects(t);
initResize(t);
@@ -752,9 +765,9 @@ int transformEvent(TransInfo *t, wmEvent *event)
t->redraw |= TREDRAW_HARD;
break;
case TFM_MODAL_PROPSIZE_UP:
- if(t->flag & T_PROP_EDIT) {
+ if (t->flag & T_PROP_EDIT) {
t->prop_size*= 1.1f;
- if(t->spacetype==SPACE_VIEW3D && t->persp != RV3D_ORTHO)
+ if (t->spacetype==SPACE_VIEW3D && t->persp != RV3D_ORTHO)
t->prop_size= MIN2(t->prop_size, ((View3D *)t->view)->far);
calculatePropRatio(t);
}
@@ -855,7 +868,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
break;
case GKEY:
/* only switch when... */
- if( ELEM3(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL) ) {
+ if ( ELEM3(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL) ) {
resetTransRestrictions(t);
restoreTransObjects(t);
initTranslation(t);
@@ -865,7 +878,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
break;
case SKEY:
/* only switch when... */
- if( ELEM3(t->mode, TFM_ROTATION, TFM_TRANSLATION, TFM_TRACKBALL) ) {
+ if ( ELEM3(t->mode, TFM_ROTATION, TFM_TRANSLATION, TFM_TRACKBALL) ) {
resetTransRestrictions(t);
restoreTransObjects(t);
initResize(t);
@@ -875,8 +888,8 @@ int transformEvent(TransInfo *t, wmEvent *event)
break;
case RKEY:
/* only switch when... */
- if(!(t->options & CTX_TEXTURE) && !(t->options & CTX_MOVIECLIP)) {
- if( ELEM4(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL, TFM_TRANSLATION) ) {
+ if (!(t->options & CTX_TEXTURE) && !(t->options & CTX_MOVIECLIP)) {
+ if ( ELEM4(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL, TFM_TRANSLATION) ) {
resetTransRestrictions(t);
@@ -910,21 +923,25 @@ int transformEvent(TransInfo *t, wmEvent *event)
if (t->flag & T_2D_EDIT) {
if (cmode == 'X') {
stopConstraint(t);
- } else {
+ }
+ else {
setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS0), "along X");
}
- } else {
+ }
+ else {
if (cmode == 'X') {
if (t->con.orientation != V3D_MANIP_GLOBAL) {
stopConstraint(t);
- } else {
+ }
+ else {
short orientation = t->current_orientation != V3D_MANIP_GLOBAL ? t->current_orientation : V3D_MANIP_LOCAL;
if ((t->modifiers & MOD_CONSTRAINT_PLANE) == 0)
setUserConstraint(t, orientation, (CON_AXIS0), "along %s X");
else if (t->modifiers & MOD_CONSTRAINT_PLANE)
setUserConstraint(t, orientation, (CON_AXIS1|CON_AXIS2), "locking %s X");
}
- } else {
+ }
+ else {
if ((t->modifiers & MOD_CONSTRAINT_PLANE) == 0)
setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS0), "along %s X");
else if (t->modifiers & MOD_CONSTRAINT_PLANE)
@@ -939,21 +956,25 @@ int transformEvent(TransInfo *t, wmEvent *event)
if (t->flag & T_2D_EDIT) {
if (cmode == 'Y') {
stopConstraint(t);
- } else {
+ }
+ else {
setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS1), "along Y");
}
- } else {
+ }
+ else {
if (cmode == 'Y') {
if (t->con.orientation != V3D_MANIP_GLOBAL) {
stopConstraint(t);
- } else {
+ }
+ else {
short orientation = t->current_orientation != V3D_MANIP_GLOBAL ? t->current_orientation : V3D_MANIP_LOCAL;
if ((t->modifiers & MOD_CONSTRAINT_PLANE) == 0)
setUserConstraint(t, orientation, (CON_AXIS1), "along %s Y");
else if (t->modifiers & MOD_CONSTRAINT_PLANE)
setUserConstraint(t, orientation, (CON_AXIS0|CON_AXIS2), "locking %s Y");
}
- } else {
+ }
+ else {
if ((t->modifiers & MOD_CONSTRAINT_PLANE) == 0)
setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS1), "along %s Y");
else if (t->modifiers & MOD_CONSTRAINT_PLANE)
@@ -968,14 +989,16 @@ int transformEvent(TransInfo *t, wmEvent *event)
if (cmode == 'Z') {
if (t->con.orientation != V3D_MANIP_GLOBAL) {
stopConstraint(t);
- } else {
+ }
+ else {
short orientation = t->current_orientation != V3D_MANIP_GLOBAL ? t->current_orientation : V3D_MANIP_LOCAL;
if ((t->modifiers & MOD_CONSTRAINT_PLANE) == 0)
setUserConstraint(t, orientation, (CON_AXIS2), "along %s Z");
else if (t->modifiers & MOD_CONSTRAINT_PLANE)
setUserConstraint(t, orientation, (CON_AXIS0|CON_AXIS1), "locking %s Z");
}
- } else {
+ }
+ else {
if ((t->modifiers & MOD_CONSTRAINT_PLANE) == 0)
setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS2), "along %s Z");
else if (t->modifiers & MOD_CONSTRAINT_PLANE)
@@ -992,9 +1015,9 @@ int transformEvent(TransInfo *t, wmEvent *event)
}
break;
case PADPLUSKEY:
- if(event->alt && t->flag & T_PROP_EDIT) {
+ if (event->alt && t->flag & T_PROP_EDIT) {
t->prop_size *= 1.1f;
- if(t->spacetype==SPACE_VIEW3D && t->persp != RV3D_ORTHO)
+ if (t->spacetype==SPACE_VIEW3D && t->persp != RV3D_ORTHO)
t->prop_size= MIN2(t->prop_size, ((View3D *)t->view)->far);
calculatePropRatio(t);
}
@@ -1009,7 +1032,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
t->redraw= 1;
break;
case PADMINUS:
- if(event->alt && t->flag & T_PROP_EDIT) {
+ if (event->alt && t->flag & T_PROP_EDIT) {
t->prop_size*= 0.90909090f;
calculatePropRatio(t);
}
@@ -1052,7 +1075,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
break;
// case LEFTMOUSE:
// case RIGHTMOUSE:
-// if(WM_modal_tweak_exit(event, t->event_type))
+// if (WM_modal_tweak_exit(event, t->event_type))
//// if (t->options & CTX_TWEAK)
// t->state = TRANS_CONFIRM;
// break;
@@ -1197,7 +1220,7 @@ static void drawArc(float size, float angle_start, float angle_end, int segments
glBegin(GL_LINE_STRIP);
- for( angle = angle_start; angle < angle_end; angle += delta)
+ for ( angle = angle_start; angle < angle_end; angle += delta)
{
glVertex2f( cosf(angle) * size, sinf(angle) * size);
}
@@ -1210,7 +1233,7 @@ static int helpline_poll(bContext *C)
{
ARegion *ar= CTX_wm_region(C);
- if(ar && ar->regiontype==RGN_TYPE_WINDOW)
+ if (ar && ar->regiontype==RGN_TYPE_WINDOW)
return 1;
return 0;
}
@@ -1228,13 +1251,13 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata)
mval[1]= y;
copy_v3_v3(vecrot, t->center);
- if(t->flag & T_EDIT) {
+ if (t->flag & T_EDIT) {
Object *ob= t->obedit;
- if(ob) mul_m4_v3(ob->obmat, vecrot);
+ if (ob) mul_m4_v3(ob->obmat, vecrot);
}
- else if(t->flag & T_POSE) {
+ else if (t->flag & T_POSE) {
Object *ob=t->poseobj;
- if(ob) mul_m4_v3(ob->obmat, vecrot);
+ if (ob) mul_m4_v3(ob->obmat, vecrot);
}
projectFloatView(t, vecrot, cent); // no overflow in extreme cases
@@ -1428,7 +1451,8 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
/* do we check for parameter? */
if (t->modifiers & MOD_SNAP) {
ts->snap_flag |= SCE_SNAP;
- } else {
+ }
+ else {
ts->snap_flag &= ~SCE_SNAP;
}
@@ -1466,7 +1490,8 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
* */
if (t->con.mode & CON_APPLY) {
RNA_enum_set(op->ptr, "constraint_orientation", t->con.orientation);
- } else {
+ }
+ else {
RNA_enum_set(op->ptr, "constraint_orientation", t->current_orientation);
}
@@ -1501,7 +1526,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
if ( (prop = RNA_struct_find_property(op->ptr, "texture_space")) && RNA_property_is_set(op->ptr, prop))
{
- if(RNA_property_boolean_get(op->ptr, prop)) {
+ if (RNA_property_boolean_get(op->ptr, prop)) {
options |= CTX_TEXTURE;
}
}
@@ -1532,7 +1557,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
return 0;
}
- if(t->spacetype == SPACE_VIEW3D)
+ if (t->spacetype == SPACE_VIEW3D)
{
//calc_manipulator_stats(curarea);
initTransformOrientation(C, t);
@@ -1542,12 +1567,13 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
//t->draw_handle_pixel = ED_region_draw_cb_activate(t->ar->type, drawTransformPixel, t, REGION_DRAW_POST_PIXEL);
t->draw_handle_cursor = WM_paint_cursor_activate(CTX_wm_manager(C), helpline_poll, drawHelpline, t);
}
- else if(t->spacetype == SPACE_IMAGE) {
+ else if (t->spacetype == SPACE_IMAGE) {
unit_m3(t->spacemtx);
t->draw_handle_view = ED_region_draw_cb_activate(t->ar->type, drawTransformView, t, REGION_DRAW_POST_VIEW);
//t->draw_handle_pixel = ED_region_draw_cb_activate(t->ar->type, drawTransformPixel, t, REGION_DRAW_POST_PIXEL);
+ t->draw_handle_cursor = WM_paint_cursor_activate(CTX_wm_manager(C), helpline_poll, drawHelpline, t);
}
- else if(t->spacetype == SPACE_CLIP) {
+ else if (t->spacetype == SPACE_CLIP) {
unit_m3(t->spacemtx);
t->draw_handle_view = ED_region_draw_cb_activate(t->ar->type, drawTransformView, t, REGION_DRAW_POST_VIEW);
t->options |= CTX_MOVIECLIP;
@@ -1563,7 +1589,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
}
/* Stupid code to have Ctrl-Click on manipulator work ok */
- if(event)
+ if (event)
{
wmKeyMap *keymap = WM_keymap_active(CTX_wm_manager(C), op->type->modalkeymap);
wmKeyMapItem *kmi;
@@ -1637,7 +1663,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
case TFM_BONESIZE:
{ /* used for both B-Bone width (bonesize) as for deform-dist (envelope) */
bArmature *arm= t->poseobj->data;
- if(arm->drawtype==ARM_ENVELOPE)
+ if (arm->drawtype==ARM_ENVELOPE)
initBoneEnvelope(t);
else
initBoneSize(t);
@@ -1702,7 +1728,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
break;
}
- if(t->state == TRANS_CANCEL)
+ if (t->state == TRANS_CANCEL)
{
postTrans(C, t);
return 0;
@@ -1714,9 +1740,10 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
{
float values[4]= {0}; /* in case value isn't length 4, avoid uninitialized memory */
- if(RNA_property_array_check(prop)) {
+ if (RNA_property_array_check(prop)) {
RNA_float_get_array(op->ptr, "value", values);
- } else {
+ }
+ else {
values[0]= RNA_float_get(op->ptr, "value");
}
@@ -1778,7 +1805,8 @@ void transformApply(bContext *C, TransInfo *t)
viewRedrawForce(C, t);
}
t->redraw = TREDRAW_NOTHING;
- } else if (t->redraw & TREDRAW_SOFT) {
+ }
+ else if (t->redraw & TREDRAW_SOFT) {
viewRedrawForce(C, t);
}
@@ -1817,10 +1845,10 @@ int transformEnd(bContext *C, TransInfo *t)
if (t->state != TRANS_STARTING && t->state != TRANS_RUNNING)
{
/* handle restoring objects */
- if(t->state == TRANS_CANCEL)
+ if (t->state == TRANS_CANCEL)
{
/* exception, edge slide transformed UVs too */
- if(t->mode==TFM_EDGE_SLIDE)
+ if (t->mode==TFM_EDGE_SLIDE)
doEdgeSlide(t, 0.0f);
exit_code = OPERATOR_CANCELLED;
@@ -1841,11 +1869,11 @@ int transformEnd(bContext *C, TransInfo *t)
/* Undo as last, certainly after special_trans_update! */
- if(t->state == TRANS_CANCEL) {
-// if(t->undostr) ED_undo_push(C, t->undostr);
+ if (t->state == TRANS_CANCEL) {
+// if (t->undostr) ED_undo_push(C, t->undostr);
}
else {
-// if(t->undostr) ED_undo_push(C, t->undostr);
+// if (t->undostr) ED_undo_push(C, t->undostr);
// else ED_undo_push(C, transform_to_undostr(t));
}
t->undostr= NULL;
@@ -1862,31 +1890,31 @@ int transformEnd(bContext *C, TransInfo *t)
static void protectedTransBits(short protectflag, float *vec)
{
- if(protectflag & OB_LOCK_LOCX)
+ if (protectflag & OB_LOCK_LOCX)
vec[0]= 0.0f;
- if(protectflag & OB_LOCK_LOCY)
+ if (protectflag & OB_LOCK_LOCY)
vec[1]= 0.0f;
- if(protectflag & OB_LOCK_LOCZ)
+ if (protectflag & OB_LOCK_LOCZ)
vec[2]= 0.0f;
}
static void protectedSizeBits(short protectflag, float *size)
{
- if(protectflag & OB_LOCK_SCALEX)
+ if (protectflag & OB_LOCK_SCALEX)
size[0]= 1.0f;
- if(protectflag & OB_LOCK_SCALEY)
+ if (protectflag & OB_LOCK_SCALEY)
size[1]= 1.0f;
- if(protectflag & OB_LOCK_SCALEZ)
+ if (protectflag & OB_LOCK_SCALEZ)
size[2]= 1.0f;
}
static void protectedRotateBits(short protectflag, float *eul, float *oldeul)
{
- if(protectflag & OB_LOCK_ROTX)
+ if (protectflag & OB_LOCK_ROTX)
eul[0]= oldeul[0];
- if(protectflag & OB_LOCK_ROTY)
+ if (protectflag & OB_LOCK_ROTY)
eul[1]= oldeul[1];
- if(protectflag & OB_LOCK_ROTZ)
+ if (protectflag & OB_LOCK_ROTZ)
eul[2]= oldeul[2];
}
@@ -2119,7 +2147,7 @@ static void constraintRotLim(TransInfo *UNUSED(t), TransData *td)
continue;
/* only do conversion if necessary, to preserve quats and eulers */
- if(!dolimit) {
+ if (!dolimit) {
constraintob_from_transdata(&cob, td);
dolimit= 1;
}
@@ -2143,7 +2171,7 @@ static void constraintRotLim(TransInfo *UNUSED(t), TransData *td)
}
}
- if(dolimit) {
+ if (dolimit) {
/* copy results from cob->matrix */
if (td->ext->rotOrder == ROT_MODE_QUAT) {
/* quats */
@@ -2272,7 +2300,7 @@ void initWarp(TransInfo *t)
t->flag |= T_NO_CONSTRAINT;
/* we need min/max in view space */
- for(i = 0; i < t->total; i++) {
+ for (i = 0; i < t->total; i++) {
float center[3];
copy_v3_v3(center, t->data[i].center);
mul_m3_v3(t->data[i].mtx, center);
@@ -2363,7 +2391,7 @@ int Warp(TransInfo *t, const int UNUSED(mval[2]))
circumfac /= 2; /* only need 180 on each side to make 360 */
- for(i = 0; i < t->total; i++, td++) {
+ for (i = 0; i < t->total; i++, td++) {
float loc[3];
if (td->flag & TD_NOACTION)
break;
@@ -2449,7 +2477,7 @@ int handleEventShear(TransInfo *t, wmEvent *event)
initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE);
t->customData = NULL;
}
-
+
status = 1;
}
@@ -2499,7 +2527,7 @@ int Shear(TransInfo *t, const int UNUSED(mval[2]))
mul_m3_m3m3(tmat, smat, persmat);
mul_m3_m3m3(totmat, persinv, tmat);
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -2614,9 +2642,9 @@ static void TransMat3ToSize( float mat[][3], float smat[][3], float *size)
size[2]= normalize_v3(vec);
/* first tried with dotproduct... but the sign flip is crucial */
- if( VECSIGNFLIP(mat[0], smat[0]) ) size[0]= -size[0];
- if( VECSIGNFLIP(mat[1], smat[1]) ) size[1]= -size[1];
- if( VECSIGNFLIP(mat[2], smat[2]) ) size[2]= -size[2];
+ if ( VECSIGNFLIP(mat[0], smat[0]) ) size[0]= -size[0];
+ if ( VECSIGNFLIP(mat[1], smat[1]) ) size[1]= -size[1];
+ if ( VECSIGNFLIP(mat[2], smat[2]) ) size[2]= -size[2];
}
@@ -2668,7 +2696,7 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3])
protectedSizeBits(td->protectflag, fsize);
if ((t->flag & T_V3D_ALIGN)==0) { // align mode doesn't resize objects itself
- if((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) {
+ if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) {
/* scale val and reset size */
*td->val = td->ival * (1 + (fsize[0] - 1) * td->factor);
@@ -2725,7 +2753,7 @@ int Resize(TransInfo *t, const int mval[2])
char str[200];
/* for manipulator, center handle, the scaling can't be done relative to center */
- if( (t->flag & T_USES_MANIPULATOR) && t->con.mode==0)
+ if ( (t->flag & T_USES_MANIPULATOR) && t->con.mode==0)
{
ratio = 1.0f - ((t->imval[0] - mval[0]) + (t->imval[1] - mval[1]))/100.0f;
}
@@ -2761,7 +2789,7 @@ int Resize(TransInfo *t, const int mval[2])
headerResize(t, size, str);
- for(i = 0, td=t->data; i < t->total; i++, td++) {
+ for (i = 0, td=t->data; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -2778,7 +2806,7 @@ int Resize(TransInfo *t, const int mval[2])
if (t->con.applySize)
t->con.applySize(t, NULL, mat);
- for(i = 0, td=t->data; i < t->total; i++, td++)
+ for (i = 0, td=t->data; i < t->total; i++, td++)
ElementResize(t, td, mat);
}
@@ -2813,7 +2841,7 @@ void initToSphere(TransInfo *t)
t->flag |= T_NO_CONSTRAINT;
// Calculate average radius
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
t->val += len_v3v3(t->center, td->iloc);
}
@@ -2855,7 +2883,7 @@ int ToSphere(TransInfo *t, const int UNUSED(mval[2]))
}
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
float tratio;
if (td->flag & TD_NOACTION)
break;
@@ -2947,11 +2975,11 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
add_v3_v3v3(td->loc, td->iloc, vec);
- if(td->flag & TD_USEQUAT) {
+ if (td->flag & TD_USEQUAT) {
mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL);
mat3_to_quat( quat,fmat); // Actual transform
- if(td->ext->quat) {
+ if (td->ext->quat) {
mul_qt_qtqt(td->ext->quat, quat, td->ext->iquat);
/* is there a reason not to have this here? -jahka */
@@ -2992,7 +3020,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
sub_v3_v3v3(vec, vec, td->center); // Translation needed from the initial location
/* special exception, see TD_PBONE_LOCAL_MTX definition comments */
- if(td->flag & TD_PBONE_LOCAL_MTX_P) {
+ if (td->flag & TD_PBONE_LOCAL_MTX_P) {
/* do nothing */
}
else if (td->flag & TD_PBONE_LOCAL_MTX_C) {
@@ -3142,7 +3170,7 @@ static void applyRotation(TransInfo *t, float angle, float axis[3])
vec_rot_to_mat3( mat,axis, angle);
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -3174,7 +3202,8 @@ int Rotation(TransInfo *t, const int UNUSED(mval[2]))
if ((t->con.mode & CON_APPLY) && t->con.applyRot) {
t->con.applyRot(t, NULL, t->axis, NULL);
- } else {
+ }
+ else {
/* reset axis if constraint is not set */
copy_v3_v3(t->axis, t->axis_orig);
}
@@ -3245,7 +3274,7 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a
mul_m3_m3m3(mat, smat, totmat);
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -3336,7 +3365,7 @@ void initTranslation(TransInfo *t)
t->num.flag = 0;
t->num.idx_max = t->idx_max;
- if(t->spacetype == SPACE_VIEW3D) {
+ if (t->spacetype == SPACE_VIEW3D) {
RegionView3D *rv3d = t->ar->regiondata;
if (rv3d) {
@@ -3345,7 +3374,7 @@ void initTranslation(TransInfo *t)
t->snap[2] = t->snap[1] * 0.1f;
}
}
- else if(ELEM(t->spacetype, SPACE_IMAGE, SPACE_CLIP)) {
+ else if (ELEM(t->spacetype, SPACE_IMAGE, SPACE_CLIP)) {
t->snap[0] = 0.0f;
t->snap[1] = 0.125f;
t->snap[2] = 0.0625f;
@@ -3377,10 +3406,10 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str)
applyAspectRatio(t, dvec);
dist = len_v3(vec);
- if(!(t->flag & T_2D_EDIT) && t->scene->unit.system) {
+ if (!(t->flag & T_2D_EDIT) && t->scene->unit.system) {
int i, do_split= t->scene->unit.flag & USER_UNIT_OPT_SPLIT ? 1:0;
- for(i=0; i<3; i++)
+ for (i=0; i<3; i++)
bUnit_AsString(&tvec[i*20], 20, dvec[i]*t->scene->unit.scale_length, 4, t->scene->unit.system, B_UNIT_LENGTH, do_split, 1);
}
else {
@@ -3390,17 +3419,17 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str)
}
}
- if(!(t->flag & T_2D_EDIT) && t->scene->unit.system)
+ if (!(t->flag & T_2D_EDIT) && t->scene->unit.system)
bUnit_AsString(distvec, sizeof(distvec), dist*t->scene->unit.scale_length, 4, t->scene->unit.system, B_UNIT_LENGTH, t->scene->unit.flag & USER_UNIT_OPT_SPLIT, 0);
- else if( dist > 1e10f || dist < -1e10f ) /* prevent string buffer overflow */
+ else if ( dist > 1e10f || dist < -1e10f ) /* prevent string buffer overflow */
sprintf(distvec, "%.4e", dist);
else
sprintf(distvec, "%.4f", dist);
- if(t->flag & T_AUTOIK) {
+ if (t->flag & T_AUTOIK) {
short chainlen= t->settings->autoik_chainlen;
- if(chainlen)
+ if (chainlen)
sprintf(autoik, "AutoIK-Len: %d", chainlen);
else
autoik[0]= '\0';
@@ -3421,7 +3450,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str)
}
}
else {
- if(t->flag & T_2D_EDIT)
+ if (t->flag & T_2D_EDIT)
spos += sprintf(spos, "Dx: %s Dy: %s (%s)%s %s", &tvec[0], &tvec[20], distvec, t->con.text, t->proptext);
else
spos += sprintf(spos, "Dx: %s Dy: %s Dz: %s (%s)%s %s %s", &tvec[0], &tvec[20], &tvec[40], distvec, t->con.text, t->proptext, &autoik[0]);
@@ -3439,7 +3468,7 @@ static void applyTranslation(TransInfo *t, float vec[3])
float tvec[3];
int i;
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -3588,7 +3617,7 @@ int ShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
}
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -3658,7 +3687,7 @@ int Tilt(TransInfo *t, const int UNUSED(mval[2]))
sprintf(str, "Tilt: %.2f %s", RAD2DEGF(final), t->proptext);
}
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -3725,14 +3754,14 @@ int CurveShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
sprintf(str, "Shrink/Fatten: %3f", ratio);
}
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
if (td->flag & TD_SKIP)
continue;
- if(td->val) {
+ if (td->val) {
// *td->val= ratio;
*td->val= td->ival*ratio;
if (*td->val <= 0.0f) *td->val = 0.001f;
@@ -3796,7 +3825,7 @@ int PushPull(TransInfo *t, const int UNUSED(mval[2]))
t->con.applyRot(t, NULL, axis, NULL);
}
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -3866,7 +3895,7 @@ void initBevel(TransInfo *t)
int handleEventBevel(TransInfo *t, wmEvent *event)
{
if (event->val==KM_PRESS) {
- if(!G.editBMesh) return 0;
+ if (!G.editBMesh) return 0;
switch (event->type) {
case MIDDLEMOUSE:
@@ -3927,7 +3956,7 @@ int Bevel(TransInfo *t, const int UNUSED(mval[2]))
}
if (distance < 0) distance = -distance;
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->axismtx[1][0] > 0 && distance > td->axismtx[1][0]) {
d = td->axismtx[1][0];
}
@@ -3999,7 +4028,7 @@ int BevelWeight(TransInfo *t, const int UNUSED(mval[2]))
sprintf(str, "Bevel Weight: %.3f %s", weight, t->proptext);
}
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -4072,7 +4101,7 @@ int Crease(TransInfo *t, const int UNUSED(mval[2]))
sprintf(str, "Crease: %.3f %s", crease, t->proptext);
}
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -4193,7 +4222,7 @@ int BoneSize(TransInfo *t, const int mval[2])
headerBoneSize(t, size, str);
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -4255,7 +4284,7 @@ int BoneEnvelope(TransInfo *t, const int UNUSED(mval[2]))
sprintf(str, "Envelope: %3f", ratio);
}
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -4308,7 +4337,8 @@ static BMLoop *get_next_loop(BMesh *UNUSED(bm), BMVert *v, BMLoop *l,
if (l->e == nexte) {
if (i) {
mul_v3_fl(a, 1.0f / (float)i);
- } else {
+ }
+ else {
float f1[3], f2[3], f3[3];
sub_v3_v3v3(f1, BM_edge_other_vert(olde, v)->co, v->co);
@@ -4324,7 +4354,8 @@ static BMLoop *get_next_loop(BMesh *UNUSED(bm), BMVert *v, BMLoop *l,
copy_v3_v3(vec, a);
return l;
- } else {
+ }
+ else {
sub_v3_v3v3(n, BM_edge_other_vert(l->e, v)->co, v->co);
add_v3_v3v3(a, a, n);
i += 1;
@@ -4355,7 +4386,7 @@ static int createSlideVerts(TransInfo *t)
BMEditMesh *em = me->edit_btmesh;
BMesh *bm = em->bm;
BMIter iter, iter2;
- BMEdge *e, *e1, *ee, *le;
+ BMEdge *e, *e1 /*, *ee, *le */ /* UNUSED */;
BMVert *v, *v2, *first;
BMLoop *l, *l1, *l2;
TransDataSlideVert *tempsv;
@@ -4367,13 +4398,14 @@ static int createSlideVerts(TransInfo *t)
ARegion *ar = t->ar;
float projectMat[4][4];
float start[3] = {0.0f, 0.0f, 0.0f}, dir[3], end[3] = {0.0f, 0.0f, 0.0f};
- float vec[3], vec2[3], lastvec[3], size, dis=0.0, z;
+ float vec[3], vec2[3], lastvec[3] /*, size, dis=0.0, z */ /* UNUSED */;
int numsel, i, j;
if (!v3d) {
/*ok, let's try to survive this*/
unit_m4(projectMat);
- } else {
+ }
+ else {
ED_view3d_ob_project_mat_get(rv3d, t->obedit, projectMat);
}
@@ -4474,7 +4506,8 @@ static int createSlideVerts(TransInfo *t)
if (l2 != l1) {
l = BM_face_other_edge_loop(l2->f, l2->e, v);
sub_v3_v3v3(vec2, BM_edge_other_vert(l->e, v)->co, v->co);
- } else {
+ }
+ else {
l2 = NULL;
}
@@ -4541,10 +4574,10 @@ static int createSlideVerts(TransInfo *t)
sld->totsv = j;
/*find mouse vector*/
- dis = z = -1.0f;
- size = 50.0;
+ /* dis = z = -1.0f; */ /* UNUSED */
+ /* size = 50.0; */ /* UNUSED */
zero_v3(lastvec); zero_v3(dir);
- ee = le = NULL;
+ /* ee = le = NULL; */ /* UNUSED */
BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
if (BM_elem_flag_test(e, BM_ELEM_SELECT)) {
BMIter iter2;
@@ -4552,7 +4585,7 @@ static int createSlideVerts(TransInfo *t)
float vec1[3], dis2, mval[2] = {t->mval[0], t->mval[1]}, d;
/* search cross edges for visible edge to the mouse cursor,
- * then use the shared vertex to calculate screen vector*/
+ * then use the shared vertex to calculate screen vector*/
dis2 = -1.0f;
for (i=0; i<2; i++) {
v = i?e->v1:e->v2;
@@ -4567,14 +4600,16 @@ static int createSlideVerts(TransInfo *t)
if (tempsv[j].down) {
ED_view3d_project_float_v3(ar, tempsv[j].down->co, vec1, projectMat);
- } else {
+ }
+ else {
add_v3_v3v3(vec1, v->co, tempsv[j].downvec);
ED_view3d_project_float_v3(ar, vec1, vec1, projectMat);
}
if (tempsv[j].up) {
ED_view3d_project_float_v3(ar, tempsv[j].up->co, vec2, projectMat);
- } else {
+ }
+ else {
add_v3_v3v3(vec1, v->co, tempsv[j].upvec);
ED_view3d_project_float_v3(ar, vec2, vec2, projectMat);
}
@@ -4582,16 +4617,15 @@ static int createSlideVerts(TransInfo *t)
d = dist_to_line_segment_v2(mval, vec1, vec2);
if (dis2 == -1.0f || d < dis2) {
dis2 = d;
- ee = e2;
- size = len_v3v3(vec1, vec2);
+ /* ee = e2; */ /* UNUSED */
+ /* size = len_v3v3(vec1, vec2); */ /* UNUSED */
sub_v3_v3v3(dir, vec1, vec2);
}
}
}
}
}
-
- em->bm->ob = t->obedit;
+
bmesh_edit_begin(em->bm, BMO_OP_FLAG_UNTAN_MULTIRES);
/*create copies of faces for customdata projection*/
@@ -4661,7 +4695,7 @@ void projectSVData(TransInfo *t, int final)
/* BMESH_TODO, (t->settings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT)
* currently all vertex data is interpolated which is nice mostly
- * except for shape keys where you dont want to modify UVs for eg.
+ * except for shape keys where you don't want to modify UVs for eg.
* current BMesh code doesnt make it easy to pick which data we interpolate
* - campbell */
@@ -4675,7 +4709,7 @@ void projectSVData(TransInfo *t, int final)
BMIter liter2;
BMFace *copyf, *copyf2;
BMLoop *l2;
- int sel, hide, do_vdata;
+ int sel, hide /*, do_vdata */ /* UNUSED */;
if (BLI_smallhash_haskey(&visit, (uintptr_t)f))
continue;
@@ -4693,19 +4727,20 @@ void projectSVData(TransInfo *t, int final)
/*project onto copied projection face*/
BM_ITER(l2, &liter2, em->bm, BM_LOOPS_OF_FACE, f) {
copyf = copyf2;
- do_vdata = l2->v==tempsv->v;
+ /* do_vdata = l2->v==tempsv->v; */ /* UNUSED */
if (BM_elem_flag_test(l2->e, BM_ELEM_SELECT) || BM_elem_flag_test(l2->prev->e, BM_ELEM_SELECT)) {
BMLoop *l3 = l2;
- do_vdata = 1;
+ /* do_vdata = 1; */ /* UNUSED */
if (!BM_elem_flag_test(l2->e, BM_ELEM_SELECT))
l3 = l3->prev;
if (sld->perc < 0.0 && BM_vert_in_face(l3->radial_next->f, tempsv->down)) {
copyf = BLI_smallhash_lookup(&sld->origfaces, (uintptr_t)l3->radial_next->f);
- } else if (sld->perc > 0.0 && BM_vert_in_face(l3->radial_next->f, tempsv->up)) {
+ }
+ else if (sld->perc > 0.0 && BM_vert_in_face(l3->radial_next->f, tempsv->up)) {
copyf = BLI_smallhash_lookup(&sld->origfaces, (uintptr_t)l3->radial_next->f);
}
if (!copyf)
@@ -4737,8 +4772,8 @@ void projectSVData(TransInfo *t, int final)
BLI_smallhash_release(&visit);
}
-void freeSlideTempFaces(SlideData *sld){
- if(sld->origfaces_init){
+void freeSlideTempFaces(SlideData *sld) {
+ if (sld->origfaces_init) {
SmallHashIter hiter;
BMFace *copyf;
@@ -4759,13 +4794,13 @@ void freeSlideVerts(TransInfo *t)
SlideData *sld = t->customData;
#if 0 /*BMESH_TODO*/
- if(me->drawflag & ME_DRAWEXTRA_EDGELEN) {
+ if (me->drawflag & ME_DRAWEXTRA_EDGELEN) {
TransDataSlideVert *tempsv;
LinkNode *look = sld->vertlist;
GHash *vertgh = sld->vhash;
- while(look) {
+ while (look) {
tempsv = BLI_ghash_lookup(vertgh,(EditVert*)look->link);
- if(tempsv != NULL) {
+ if (tempsv != NULL) {
tempsv->up->f &= !SELECT;
tempsv->down->f &= !SELECT;
}
@@ -4779,7 +4814,6 @@ void freeSlideVerts(TransInfo *t)
freeSlideTempFaces(sld);
- sld->em->bm->ob = t->obedit;
bmesh_edit_end(sld->em->bm, BMO_OP_FLAG_UNTAN_MULTIRES);
BLI_smallhash_release(&sld->vhash);
@@ -4799,7 +4833,7 @@ void initEdgeSlide(TransInfo *t)
t->mode = TFM_EDGE_SLIDE;
t->transform = EdgeSlide;
- if(!createSlideVerts(t)) {
+ if (!createSlideVerts(t)) {
t->state= TRANS_CANCEL;
return;
}
@@ -4989,7 +5023,7 @@ int BakeTime(TransInfo *t, const int mval[2])
float fac = 0.1f;
- if(t->mouse.precision) {
+ if (t->mouse.precision) {
/* calculate ratio for shiftkey pos, and for total, and blend these for precision */
time= (float)(t->center2d[0] - t->mouse.precision_mval[0]) * fac;
time+= 0.1f*((float)(t->center2d[0]*fac - mval[0]) -time);
@@ -5021,7 +5055,7 @@ int BakeTime(TransInfo *t, const int mval[2])
sprintf(str, "Time: %.3f %s", time, t->proptext);
}
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -5080,7 +5114,7 @@ int Mirror(TransInfo *t, const int UNUSED(mval[2]))
sprintf(str, "Mirror%s", t->con.text);
- for(i = 0, td=t->data; i < t->total; i++, td++) {
+ for (i = 0, td=t->data; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -5099,7 +5133,7 @@ int Mirror(TransInfo *t, const int UNUSED(mval[2]))
size_to_mat3( mat,size);
- for(i = 0, td=t->data; i < t->total; i++, td++) {
+ for (i = 0, td=t->data; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
@@ -5111,7 +5145,7 @@ int Mirror(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
- if(t->flag & T_2D_EDIT)
+ if (t->flag & T_2D_EDIT)
ED_area_headerprint(t->sa, "Select a mirror axis (X, Y)");
else
ED_area_headerprint(t->sa, "Select a mirror axis (X, Y, Z)");
@@ -5140,7 +5174,7 @@ int Align(TransInfo *t, const int UNUSED(mval[2]))
/* saving original center */
copy_v3_v3(center, t->center);
- for(i = 0 ; i < t->total; i++, td++)
+ for (i = 0 ; i < t->total; i++, td++)
{
float mat[3][3], invmat[3][3];
@@ -5155,7 +5189,7 @@ int Align(TransInfo *t, const int UNUSED(mval[2]))
copy_v3_v3(t->center, td->center);
}
else {
- if(t->settings->selectmode & SCE_SELECT_FACE) {
+ if (t->settings->selectmode & SCE_SELECT_FACE) {
copy_v3_v3(t->center, td->center);
}
}
@@ -5215,7 +5249,7 @@ static void applySeqSlide(TransInfo *t, float val[2])
TransData *td = t->data;
int i;
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
float tvec[2];
if (td->flag & TD_NOACTION)
@@ -5570,7 +5604,8 @@ void initTimeSlide(TransInfo *t)
/* set flag for drawing stuff */
saction->flag |= SACTION_MOVING;
- } else {
+ }
+ else {
t->state = TRANS_CANCEL;
}
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index 48c05f00ea8..0bef33149d7 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -444,9 +444,9 @@ void transformApply(struct bContext *C, TransInfo *t);
int transformEnd(struct bContext *C, TransInfo *t);
void setTransformViewMatrices(TransInfo *t);
-void convertViewVec(TransInfo *t, float *vec, int dx, int dy);
-void projectIntView(TransInfo *t, float *vec, int *adr);
-void projectFloatView(TransInfo *t, float *vec, float *adr);
+void convertViewVec(TransInfo *t, float r_vec[3], int dx, int dy);
+void projectIntView(TransInfo *t, const float vec[3], int adr[2]);
+void projectFloatView(TransInfo *t, const float vec[3], float adr[2]);
void applyAspectRatio(TransInfo *t, float *vec);
void removeAspectRatio(TransInfo *t, float *vec);
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 017501bd78e..18e9c1a47b8 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -183,21 +183,21 @@ static void postConstraintChecks(TransInfo *t, float vec[3], float pvec[3])
static void viewAxisCorrectCenter(TransInfo *t, float t_con_center[3])
{
- if(t->spacetype == SPACE_VIEW3D) {
+ if (t->spacetype == SPACE_VIEW3D) {
// View3D *v3d = t->sa->spacedata.first;
const float min_dist= 1.0f; // v3d->near;
float dir[3];
float l;
sub_v3_v3v3(dir, t_con_center, t->viewinv[3]);
- if(dot_v3v3(dir, t->viewinv[2]) < 0.0f) {
+ if (dot_v3v3(dir, t->viewinv[2]) < 0.0f) {
negate_v3(dir);
}
project_v3_v3v3(dir, dir, t->viewinv[2]);
l= len_v3(dir);
- if(l < min_dist) {
+ if (l < min_dist) {
float diff[3];
normalize_v3_v3(diff, t->viewinv[2]);
mul_v3_fl(diff, min_dist - l);
@@ -212,7 +212,7 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3
float norm[3], vec[3], factor, angle;
float t_con_center[3];
- if(in[0]==0.0f && in[1]==0.0f && in[2]==0.0f)
+ if (in[0]==0.0f && in[1]==0.0f && in[2]==0.0f)
return;
copy_v3_v3(t_con_center, t->con.center);
@@ -229,11 +229,11 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3
/* For when view is parallel to constraint... will cause NaNs otherwise
* So we take vertical motion in 3D space and apply it to the
* constraint axis. Nice for camera grab + MMB */
- if(angle < 5.0f) {
+ if (angle < 5.0f) {
project_v3_v3v3(vec, in, t->viewinv[1]);
factor = dot_v3v3(t->viewinv[1], vec) * 2.0f;
/* since camera distance is quite relative, use quadratic relationship. holding shift can compensate */
- if(factor<0.0f) factor*= -factor;
+ if (factor<0.0f) factor*= -factor;
else factor*= factor;
copy_v3_v3(out, axis);
@@ -261,10 +261,12 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3
copy_v3_v3(out, axis);
if (factor > 0) {
mul_v3_fl(out, 1000000000.0f);
- } else {
+ }
+ else {
mul_v3_fl(out, -1000000000.0f);
}
- } else {
+ }
+ else {
add_v3_v3v3(v2, t_con_center, axis);
add_v3_v3v3(v4, v, norm);
@@ -276,9 +278,9 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3
/* possible some values become nan when
* viewpoint and object are both zero */
- if(!finite(out[0])) out[0]= 0.0f;
- if(!finite(out[1])) out[1]= 0.0f;
- if(!finite(out[2])) out[2]= 0.0f;
+ if (!finite(out[0])) out[0]= 0.0f;
+ if (!finite(out[1])) out[1]= 0.0f;
+ if (!finite(out[2])) out[2]= 0.0f;
}
}
}
@@ -654,7 +656,7 @@ void drawConstraint(TransInfo *t)
/* nasty exception for Z constraint in camera view */
// TRANSFORM_FIX_ME
-// if((t->flag & T_OBJECT) && G.vd->camera==OBACT && G.vd->persp==V3D_CAMOB)
+// if ((t->flag & T_OBJECT) && G.vd->camera==OBACT && G.vd->persp==V3D_CAMOB)
// return;
if (tc->drawExtra) {
@@ -676,7 +678,7 @@ void drawConstraint(TransInfo *t)
glColor3ubv((GLubyte *)col2);
depth_test_enabled = glIsEnabled(GL_DEPTH_TEST);
- if(depth_test_enabled)
+ if (depth_test_enabled)
glDisable(GL_DEPTH_TEST);
setlinestyle(1);
@@ -686,7 +688,7 @@ void drawConstraint(TransInfo *t)
glEnd();
setlinestyle(0);
- if(depth_test_enabled)
+ if (depth_test_enabled)
glEnable(GL_DEPTH_TEST);
}
@@ -712,7 +714,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
UI_ThemeColor(TH_GRID);
- if(t->spacetype == SPACE_VIEW3D && rv3d != NULL) {
+ if (t->spacetype == SPACE_VIEW3D && rv3d != NULL) {
copy_m4_m4(tmat, rv3d->viewmat);
invert_m4_m4(imat, tmat);
}
@@ -725,10 +727,10 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
copy_v3_v3(center, t->center);
- if((t->spacetype == SPACE_VIEW3D) && t->obedit) {
+ if ((t->spacetype == SPACE_VIEW3D) && t->obedit) {
mul_m4_v3(t->obedit->obmat, center); /* because t->center is in local space */
}
- else if(t->spacetype == SPACE_IMAGE) {
+ else if (t->spacetype == SPACE_IMAGE) {
float aspx, aspy;
ED_space_image_uv_aspect(t->sa->spacedata.first, &aspx, &aspy);
@@ -766,7 +768,7 @@ static void drawObjectConstraint(TransInfo *t)
td++;
- for(i=1;i<t->total;i++,td++) {
+ for (i=1;i<t->total;i++,td++) {
if (t->con.mode & CON_AXIS0) {
drawLine(t, td->ob->obmat[3], td->axismtx[0], 'X', 0);
}
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 4dbf87fb500..6669bfdb3ca 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -56,6 +56,12 @@
#include "MEM_guardedalloc.h"
+#include "BLI_math.h"
+#include "BLI_blenlib.h"
+#include "BLI_array.h"
+#include "BLI_utildefines.h"
+#include "BLI_smallhash.h"
+
#include "BKE_DerivedMesh.h"
#include "BKE_action.h"
#include "BKE_armature.h"
@@ -103,16 +109,8 @@
#include "UI_view2d.h"
-#include "BLI_math.h"
-#include "BLI_blenlib.h"
-#include "BLI_array.h"
-#include "BLI_utildefines.h"
-#include "BLI_smallhash.h"
-
#include "RNA_access.h"
-extern ListBase editelems;
-
#include "transform.h"
#include "bmesh.h"
@@ -177,7 +175,7 @@ void sort_trans_data_dist(TransInfo *t)
TransData *start = t->data;
int i = 1;
- while(i < t->total && start->flag & TD_SELECTED) {
+ while (i < t->total && start->flag & TD_SELECTED) {
start++;
i++;
}
@@ -219,11 +217,11 @@ static void set_prop_dist(TransInfo *t, short with_dist)
TransData *tob;
int a;
- for(a=0, tob= t->data; a<t->total; a++, tob++) {
+ for (a=0, tob= t->data; a<t->total; a++, tob++) {
tob->rdist= 0.0f; // init, it was mallocced
- if((tob->flag & TD_SELECTED)==0) {
+ if ((tob->flag & TD_SELECTED)==0) {
TransData *td;
int i;
float dist, vec[3];
@@ -231,7 +229,7 @@ static void set_prop_dist(TransInfo *t, short with_dist)
tob->rdist = -1.0f; // signal for next loop
for (i = 0, td= t->data; i < t->total; i++, td++) {
- if(td->flag & TD_SELECTED) {
+ if (td->flag & TD_SELECTED) {
sub_v3_v3v3(vec, tob->center, td->center);
mul_m3_v3(tob->mtx, vec);
dist = normalize_v3(vec);
@@ -271,7 +269,7 @@ static void createTransTexspace(TransInfo *t)
}
id = ob->data;
- if(id == NULL || !ELEM3( GS(id->name), ID_ME, ID_CU, ID_MB )) {
+ if (id == NULL || !ELEM3( GS(id->name), ID_ME, ID_CU, ID_MB )) {
t->total = 0;
return;
}
@@ -321,7 +319,7 @@ static void createTransEdge(TransInfo *t)
if (countsel == 0)
return;
- if(propmode) {
+ if (propmode) {
t->total = count;
}
else {
@@ -334,7 +332,7 @@ static void createTransEdge(TransInfo *t)
invert_m3_m3(smtx, mtx);
BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
- if(!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && (BM_elem_flag_test(eed, BM_ELEM_SELECT) || propmode)) {
+ if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && (BM_elem_flag_test(eed, BM_ELEM_SELECT) || propmode)) {
float *bweight = CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_BWEIGHT);
float *crease = CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_CREASE);
@@ -373,13 +371,13 @@ static bKinematicConstraint *has_targetless_ik(bPoseChannel *pchan)
{
bConstraint *con= pchan->constraints.first;
- for(;con; con= con->next) {
- if(con->type==CONSTRAINT_TYPE_KINEMATIC && (con->enforce!=0.0f)) {
+ for (;con; con= con->next) {
+ if (con->type==CONSTRAINT_TYPE_KINEMATIC && (con->enforce!=0.0f)) {
bKinematicConstraint *data= con->data;
- if(data->tar==NULL)
+ if (data->tar==NULL)
return data;
- if(data->tar->type==OB_ARMATURE && data->subtarget[0]==0)
+ if (data->tar->type==OB_ARMATURE && data->subtarget[0]==0)
return data;
}
}
@@ -398,13 +396,13 @@ static short apply_targetless_ik(Object *ob)
for (pchan=ob->pose->chanbase.first; pchan; pchan=pchan->next) {
data= has_targetless_ik(pchan);
- if(data && (data->flag & CONSTRAINT_IK_AUTO)) {
+ if (data && (data->flag & CONSTRAINT_IK_AUTO)) {
/* fill the array with the bones of the chain (armature.c does same, keep it synced) */
segcount= 0;
/* exclude tip from chain? */
- if(!(data->flag & CONSTRAINT_IK_TIP))
+ if (!(data->flag & CONSTRAINT_IK_TIP))
parchan= pchan->parent;
else
parchan= pchan;
@@ -414,9 +412,9 @@ static short apply_targetless_ik(Object *ob)
chanlist[segcount]= parchan;
segcount++;
- if(segcount==data->rootbone || segcount>255) break; // 255 is weak
+ if (segcount==data->rootbone || segcount>255) break; // 255 is weak
}
- for(;segcount;segcount--) {
+ for (;segcount;segcount--) {
Bone *bone;
float rmat[4][4]/*, tmat[4][4], imat[4][4]*/;
@@ -431,7 +429,7 @@ static short apply_targetless_ik(Object *ob)
/* XXX Old code. Will remove it later. */
#if 0
- if(parchan->parent) {
+ if (parchan->parent) {
Bone *parbone= parchan->parent->bone;
float offs_bone[4][4];
@@ -445,7 +443,7 @@ static short apply_targetless_ik(Object *ob)
offs_bone[3][1]+= parbone->length;
/* pose_mat(b-1) * offs_bone */
- if(parchan->bone->flag & BONE_HINGE) {
+ if (parchan->bone->flag & BONE_HINGE) {
/* the rotation of the parent restposition */
copy_m4_m4(rmat, parbone->arm_mat); /* rmat used as temp */
@@ -456,7 +454,7 @@ static short apply_targetless_ik(Object *ob)
mult_m4_m4m4(tmat, rmat, offs_bone);
}
- else if(parchan->bone->flag & BONE_NO_SCALE) {
+ else if (parchan->bone->flag & BONE_NO_SCALE) {
mult_m4_m4m4(tmat, parchan->parent->pose_mat, offs_bone);
normalize_m4(tmat);
}
@@ -614,9 +612,9 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
copy_m3_m3(bmat, pchan->bone->bone_mat);
if (pchan->parent) {
- if(pchan->bone->flag & BONE_HINGE) {
+ if (pchan->bone->flag & BONE_HINGE) {
copy_m3_m4(pmat, pchan->parent->bone->arm_mat);
- if(!(pchan->bone->flag & BONE_NO_SCALE)) {
+ if (!(pchan->bone->flag & BONE_NO_SCALE)) {
float tsize[3], tsmat[3][3];
mat4_to_size(tsize, pchan->parent->pose_mat);
size_to_mat3(tsmat, tsize);
@@ -625,7 +623,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
}
else {
copy_m3_m4(pmat, pchan->parent->pose_mat);
- if(pchan->bone->flag & BONE_NO_SCALE)
+ if (pchan->bone->flag & BONE_NO_SCALE)
normalize_m3(pmat);
}
@@ -653,7 +651,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
/* exceptional case: rotate the pose bone which also applies transformation
* when a parentless bone has BONE_NO_LOCAL_LOCATION [] */
if (!ELEM(t->mode, TFM_TRANSLATION, TFM_RESIZE) && (pchan->bone->flag & BONE_NO_LOCAL_LOCATION)) {
- if(pchan->parent) {
+ if (pchan->parent) {
/* same as td->smtx but without pchan->bone->bone_mat */
td->flag |= TD_PBONE_LOCAL_MTX_C;
mul_m3_m3m3(td->ext->l_smtx, pchan->bone->bone_mat, td->smtx);
@@ -671,7 +669,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
if (t->mode==TFM_BONESIZE) {
bArmature *arm= t->poseobj->data;
- if(arm->drawtype==ARM_ENVELOPE) {
+ if (arm->drawtype==ARM_ENVELOPE) {
td->loc= NULL;
td->val= &bone->dist;
td->ival= bone->dist;
@@ -687,8 +685,8 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
/* in this case we can do target-less IK grabbing */
if (t->mode==TFM_TRANSLATION) {
bKinematicConstraint *data= has_targetless_ik(pchan);
- if(data) {
- if(data->flag & CONSTRAINT_IK_TIP) {
+ if (data) {
+ if (data->flag & CONSTRAINT_IK_TIP) {
copy_v3_v3(data->grabtarget, pchan->pose_tail);
}
else {
@@ -712,8 +710,8 @@ static void bone_children_clear_transflag(int mode, short around, ListBase *lb)
{
Bone *bone= lb->first;
- for(;bone;bone= bone->next) {
- if((bone->flag & BONE_HINGE) && (bone->flag & BONE_CONNECTED))
+ for (;bone;bone= bone->next) {
+ if ((bone->flag & BONE_HINGE) && (bone->flag & BONE_CONNECTED))
{
bone->flag |= BONE_HINGE_CHILD_TRANSFORM;
}
@@ -759,28 +757,28 @@ int count_set_pose_transflags(int *out_mode, short around, Object *ob)
/* make sure no bone can be transformed when a parent is transformed */
/* since pchans are depsgraph sorted, the parents are in beginning of list */
- if(mode != TFM_BONESIZE) {
- for(pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ if (mode != TFM_BONESIZE) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
bone = pchan->bone;
- if(bone->flag & BONE_TRANSFORM)
+ if (bone->flag & BONE_TRANSFORM)
bone_children_clear_transflag(mode, around, &bone->childbase);
}
}
/* now count, and check if we have autoIK or have to switch from translate to rotate */
hastranslation = 0;
- for(pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
bone = pchan->bone;
- if(bone->flag & BONE_TRANSFORM) {
+ if (bone->flag & BONE_TRANSFORM) {
total++;
- if(mode == TFM_TRANSLATION) {
- if( has_targetless_ik(pchan)==NULL ) {
- if(pchan->parent && (pchan->bone->flag & BONE_CONNECTED)) {
- if(pchan->bone->flag & BONE_HINGE_CHILD_TRANSFORM)
+ if (mode == TFM_TRANSLATION) {
+ if ( has_targetless_ik(pchan)==NULL ) {
+ if (pchan->parent && (pchan->bone->flag & BONE_CONNECTED)) {
+ if (pchan->bone->flag & BONE_HINGE_CHILD_TRANSFORM)
hastranslation = 1;
}
- else if((pchan->protectflag & OB_LOCK_LOC)!=OB_LOCK_LOC)
+ else if ((pchan->protectflag & OB_LOCK_LOC)!=OB_LOCK_LOC)
hastranslation = 1;
}
else
@@ -790,7 +788,7 @@ int count_set_pose_transflags(int *out_mode, short around, Object *ob)
}
/* if there are no translatable bones, do rotation */
- if(mode == TFM_TRANSLATION && !hastranslation)
+ if (mode == TFM_TRANSLATION && !hastranslation)
{
*out_mode = TFM_ROTATION;
}
@@ -878,7 +876,7 @@ static void pose_grab_with_ik_clear(Object *ob)
continue;
}
pchan->constflag |= PCHAN_HAS_IK;
- if(data->tar==NULL || (data->tar->type==OB_ARMATURE && data->subtarget[0]==0))
+ if (data->tar==NULL || (data->tar->type==OB_ARMATURE && data->subtarget[0]==0))
pchan->constflag |= PCHAN_HAS_TARGET;
}
}
@@ -1069,7 +1067,7 @@ static void createTransPose(TransInfo *t, Object *ob)
/* set flags and count total (warning, can change transform to rotate) */
t->total = count_set_pose_transflags(&t->mode, t->around, ob);
- if(t->total == 0) return;
+ if (t->total == 0) return;
t->flag |= T_POSE;
t->poseobj= ob; /* we also allow non-active objects to be transformed, in weightpaint */
@@ -1077,7 +1075,7 @@ static void createTransPose(TransInfo *t, Object *ob)
/* init trans data */
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransPoseBone");
tdx = t->ext = MEM_callocN(t->total*sizeof(TransDataExtension), "TransPoseBoneExt");
- for(i=0; i<t->total; i++, td++, tdx++) {
+ for (i=0; i<t->total; i++, td++, tdx++) {
td->ext= tdx;
td->val = NULL;
}
@@ -1091,7 +1089,7 @@ static void createTransPose(TransInfo *t, Object *ob)
}
}
- if(td != (t->data+t->total)) {
+ if (td != (t->data+t->total)) {
// XXX use transform operator reports
// BKE_report(op->reports, RPT_DEBUG, "Bone selection count error");
}
@@ -1193,7 +1191,7 @@ static void createTransArmatureVerts(TransInfo *t)
}
else if (t->mode==TFM_BONESIZE) {
if (ebo->flag & BONE_SELECTED) {
- if(arm->drawtype==ARM_ENVELOPE)
+ if (arm->drawtype==ARM_ENVELOPE)
{
td->loc= NULL;
td->val= &ebo->dist;
@@ -1307,15 +1305,15 @@ static void createTransMBallVerts(TransInfo *t)
int propmode = t->flag & T_PROP_EDIT;
/* count totals */
- for(ml= mb->editelems->first; ml; ml= ml->next) {
- if(ml->flag & SELECT) countsel++;
- if(propmode) count++;
+ for (ml= mb->editelems->first; ml; ml= ml->next) {
+ if (ml->flag & SELECT) countsel++;
+ if (propmode) count++;
}
/* note: in prop mode we need at least 1 selected */
if (countsel==0) return;
- if(propmode) t->total = count;
+ if (propmode) t->total = count;
else t->total = countsel;
td = t->data= MEM_callocN(t->total*sizeof(TransData), "TransObData(MBall EditMode)");
@@ -1324,13 +1322,13 @@ static void createTransMBallVerts(TransInfo *t)
copy_m3_m4(mtx, t->obedit->obmat);
invert_m3_m3(smtx, mtx);
- for(ml= mb->editelems->first; ml; ml= ml->next) {
- if(propmode || (ml->flag & SELECT)) {
+ for (ml= mb->editelems->first; ml; ml= ml->next) {
+ if (propmode || (ml->flag & SELECT)) {
td->loc= &ml->x;
copy_v3_v3(td->iloc, td->loc);
copy_v3_v3(td->center, td->loc);
- if(ml->flag & SELECT) td->flag= TD_SELECTED | TD_USEQUAT | TD_SINGLESIZE;
+ if (ml->flag & SELECT) td->flag= TD_SELECTED | TD_USEQUAT | TD_SINGLESIZE;
else td->flag= TD_USEQUAT;
copy_m3_m3(td->smtx, smtx);
@@ -1339,11 +1337,11 @@ static void createTransMBallVerts(TransInfo *t)
td->ext = tx;
/* Radius of MetaElem (mass of MetaElem influence) */
- if(ml->flag & MB_SCALE_RAD) {
+ if (ml->flag & MB_SCALE_RAD) {
td->val = &ml->rad;
td->ival = ml->rad;
}
- else{
+ else {
td->val = &ml->s;
td->ival = ml->s;
}
@@ -1376,7 +1374,7 @@ static void calc_distanceCurveVerts(TransData *head, TransData *tail)
td_near = td;
td->dist = 0.0f;
}
- else if(td_near) {
+ else if (td_near) {
float dist;
dist = len_v3v3(td_near->center, td->center);
if (dist < (td-1)->dist) {
@@ -1397,7 +1395,7 @@ static void calc_distanceCurveVerts(TransData *head, TransData *tail)
td_near = td;
td->dist = 0.0f;
}
- else if(td_near) {
+ else if (td_near) {
float dist;
dist = len_v3v3(td_near->center, td->center);
if (td->flag & TD_NOTCONNECTED || dist < td->dist || (td+1)->dist < td->dist) {
@@ -1442,31 +1440,32 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
ListBase *nurbs;
/* to be sure */
- if(cu->editnurb==NULL) return;
+ if (cu->editnurb==NULL) return;
/* count total of vertices, check identical as in 2nd loop for making transdata! */
nurbs= curve_editnurbs(cu);
- for(nu= nurbs->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
- for(a=0, bezt= nu->bezt; a<nu->pntsu; a++, bezt++) {
- if(bezt->hide==0) {
+ for (nu= nurbs->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
+ for (a=0, bezt= nu->bezt; a<nu->pntsu; a++, bezt++) {
+ if (bezt->hide==0) {
if (hide_handles) {
- if(bezt->f2 & SELECT) countsel+=3;
- if(propmode) count+= 3;
- } else {
- if(bezt->f1 & SELECT) countsel++;
- if(bezt->f2 & SELECT) countsel++;
- if(bezt->f3 & SELECT) countsel++;
- if(propmode) count+= 3;
+ if (bezt->f2 & SELECT) countsel+=3;
+ if (propmode) count+= 3;
+ }
+ else {
+ if (bezt->f1 & SELECT) countsel++;
+ if (bezt->f2 & SELECT) countsel++;
+ if (bezt->f3 & SELECT) countsel++;
+ if (propmode) count+= 3;
}
}
}
}
else {
- for(a= nu->pntsu*nu->pntsv, bp= nu->bp; a>0; a--, bp++) {
- if(bp->hide==0) {
- if(propmode) count++;
- if(bp->f1 & SELECT) countsel++;
+ for (a= nu->pntsu*nu->pntsv, bp= nu->bp; a>0; a--, bp++) {
+ if (bp->hide==0) {
+ if (propmode) count++;
+ if (bp->f1 & SELECT) countsel++;
}
}
}
@@ -1474,7 +1473,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
/* note: in prop mode we need at least 1 selected */
if (countsel==0) return;
- if(propmode) t->total = count;
+ if (propmode) t->total = count;
else t->total = countsel;
t->data= MEM_callocN(t->total*sizeof(TransData), "TransObData(Curve EditMode)");
@@ -1482,15 +1481,15 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
invert_m3_m3(smtx, mtx);
td = t->data;
- for(nu= nurbs->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ for (nu= nurbs->first; nu; nu= nu->next) {
+ if (nu->type == CU_BEZIER) {
TransData *head, *tail;
head = tail = td;
- for(a=0, bezt= nu->bezt; a<nu->pntsu; a++, bezt++) {
- if(bezt->hide==0) {
+ for (a=0, bezt= nu->bezt; a<nu->pntsu; a++, bezt++) {
+ if (bezt->hide==0) {
TransDataCurveHandleFlags *hdata = NULL;
- if( propmode ||
+ if ( propmode ||
((bezt->f2 & SELECT) && hide_handles) ||
((bezt->f1 & SELECT) && hide_handles == 0)
) {
@@ -1498,10 +1497,11 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
td->loc= bezt->vec[0];
copy_v3_v3(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:0]);
if (hide_handles) {
- if(bezt->f2 & SELECT) td->flag= TD_SELECTED;
+ if (bezt->f2 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
- } else {
- if(bezt->f1 & SELECT) td->flag= TD_SELECTED;
+ }
+ else {
+ if (bezt->f1 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
}
td->ext = NULL;
@@ -1518,21 +1518,23 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
}
/* This is the Curve Point, the other two are handles */
- if(propmode || (bezt->f2 & SELECT)) {
+ if (propmode || (bezt->f2 & SELECT)) {
copy_v3_v3(td->iloc, bezt->vec[1]);
td->loc= bezt->vec[1];
copy_v3_v3(td->center, td->loc);
- if(bezt->f2 & SELECT) td->flag= TD_SELECTED;
+ if (bezt->f2 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
td->ext = NULL;
if (t->mode==TFM_CURVE_SHRINKFATTEN) { /* || t->mode==TFM_RESIZE) {*/ /* TODO - make points scale */
td->val = &(bezt->radius);
td->ival = bezt->radius;
- } else if (t->mode==TFM_TILT) {
+ }
+ else if (t->mode==TFM_TILT) {
td->val = &(bezt->alfa);
td->ival = bezt->alfa;
- } else {
+ }
+ else {
td->val = NULL;
}
@@ -1549,7 +1551,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
count++;
tail++;
}
- if( propmode ||
+ if ( propmode ||
((bezt->f2 & SELECT) && hide_handles) ||
((bezt->f3 & SELECT) && hide_handles == 0)
) {
@@ -1557,10 +1559,11 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
td->loc= bezt->vec[2];
copy_v3_v3(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:2]);
if (hide_handles) {
- if(bezt->f2 & SELECT) td->flag= TD_SELECTED;
+ if (bezt->f2 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
- } else {
- if(bezt->f3 & SELECT) td->flag= TD_SELECTED;
+ }
+ else {
+ if (bezt->f3 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
}
td->ext = NULL;
@@ -1587,7 +1590,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
calc_distanceCurveVerts(head, tail-1);
/* TODO - in the case of tilt and radius we can also avoid allocating the initTransDataCurveHandles
- * but for now just dont change handle types */
+ * but for now just don't change handle types */
if (ELEM(t->mode, TFM_CURVE_SHRINKFATTEN, TFM_TILT) == 0) {
/* sets the handles based on their selection, do this after the data is copied to the TransData */
testhandlesNurb(nu);
@@ -1596,20 +1599,21 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
else {
TransData *head, *tail;
head = tail = td;
- for(a= nu->pntsu*nu->pntsv, bp= nu->bp; a>0; a--, bp++) {
- if(bp->hide==0) {
- if(propmode || (bp->f1 & SELECT)) {
+ for (a= nu->pntsu*nu->pntsv, bp= nu->bp; a>0; a--, bp++) {
+ if (bp->hide==0) {
+ if (propmode || (bp->f1 & SELECT)) {
copy_v3_v3(td->iloc, bp->vec);
td->loc= bp->vec;
copy_v3_v3(td->center, td->loc);
- if(bp->f1 & SELECT) td->flag= TD_SELECTED;
+ if (bp->f1 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
td->ext = NULL;
if (t->mode==TFM_CURVE_SHRINKFATTEN || t->mode==TFM_RESIZE) {
td->val = &(bp->radius);
td->ival = bp->radius;
- } else {
+ }
+ else {
td->val = &(bp->alfa);
td->ival = bp->alfa;
}
@@ -1647,10 +1651,10 @@ static void createTransLatticeVerts(TransInfo *t)
bp = latt->def;
a = latt->pntsu * latt->pntsv * latt->pntsw;
- while(a--) {
- if(bp->hide==0) {
- if(bp->f1 & SELECT) countsel++;
- if(propmode) count++;
+ while (a--) {
+ if (bp->hide==0) {
+ if (bp->f1 & SELECT) countsel++;
+ if (propmode) count++;
}
bp++;
}
@@ -1658,7 +1662,7 @@ static void createTransLatticeVerts(TransInfo *t)
/* note: in prop mode we need at least 1 selected */
if (countsel==0) return;
- if(propmode) t->total = count;
+ if (propmode) t->total = count;
else t->total = countsel;
t->data= MEM_callocN(t->total*sizeof(TransData), "TransObData(Lattice EditMode)");
@@ -1668,13 +1672,13 @@ static void createTransLatticeVerts(TransInfo *t)
td = t->data;
bp = latt->def;
a = latt->pntsu * latt->pntsv * latt->pntsw;
- while(a--) {
- if(propmode || (bp->f1 & SELECT)) {
- if(bp->hide==0) {
+ while (a--) {
+ if (propmode || (bp->f1 & SELECT)) {
+ if (bp->hide==0) {
copy_v3_v3(td->iloc, bp->vec);
td->loc= bp->vec;
copy_v3_v3(td->center, td->loc);
- if(bp->f1 & SELECT) td->flag= TD_SELECTED;
+ if (bp->f1 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
copy_m3_m3(td->smtx, smtx);
copy_m3_m3(td->mtx, mtx);
@@ -1708,33 +1712,33 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
int count = 0, hasselected = 0;
int propmode = t->flag & T_PROP_EDIT;
- if(edit==NULL || t->settings->particle.selectmode==SCE_SELECT_PATH) return;
+ if (edit==NULL || t->settings->particle.selectmode==SCE_SELECT_PATH) return;
psys = edit->psys;
- if(psys)
+ if (psys)
psmd = psys_get_modifier(ob,psys);
base->flag |= BA_HAS_RECALC_DATA;
- for(i=0, point=edit->points; i<edit->totpoint; i++, point++) {
+ for (i=0, point=edit->points; i<edit->totpoint; i++, point++) {
point->flag &= ~PEP_TRANSFORM;
transformparticle= 0;
- if((point->flag & PEP_HIDE)==0) {
- for(k=0, key=point->keys; k<point->totkey; k++, key++) {
- if((key->flag&PEK_HIDE)==0) {
- if(key->flag&PEK_SELECT) {
+ if ((point->flag & PEP_HIDE)==0) {
+ for (k=0, key=point->keys; k<point->totkey; k++, key++) {
+ if ((key->flag&PEK_HIDE)==0) {
+ if (key->flag&PEK_SELECT) {
hasselected= 1;
transformparticle= 1;
}
- else if(propmode)
+ else if (propmode)
transformparticle= 1;
}
}
}
- if(transformparticle) {
+ if (transformparticle) {
count += point->totkey;
point->flag |= PEP_TRANSFORM;
}
@@ -1746,7 +1750,7 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
t->total = count;
td = t->data = MEM_callocN(t->total * sizeof(TransData), "TransObData(Particle Mode)");
- if(t->mode == TFM_BAKE_TIME)
+ if (t->mode == TFM_BAKE_TIME)
tx = t->ext = MEM_callocN(t->total * sizeof(TransDataExtension), "Particle_TransExtension");
else
tx = t->ext = NULL;
@@ -1755,17 +1759,17 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
invert_m4_m4(ob->imat,ob->obmat);
- for(i=0, point=edit->points; i<edit->totpoint; i++, point++) {
+ for (i=0, point=edit->points; i<edit->totpoint; i++, point++) {
TransData *head, *tail;
head = tail = td;
- if(!(point->flag & PEP_TRANSFORM)) continue;
+ if (!(point->flag & PEP_TRANSFORM)) continue;
- if(psys && !(psys->flag & PSYS_GLOBAL_HAIR))
+ if (psys && !(psys->flag & PSYS_GLOBAL_HAIR))
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, psys->particles + i, mat);
- for(k=0, key=point->keys; k<point->totkey; k++, key++) {
- if(key->flag & PEK_USE_WCO) {
+ for (k=0, key=point->keys; k<point->totkey; k++, key++) {
+ if (key->flag & PEK_USE_WCO) {
copy_v3_v3(key->world_co, key->co);
mul_m4_v3(mat, key->world_co);
td->loc = key->world_co;
@@ -1776,34 +1780,34 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
copy_v3_v3(td->iloc, td->loc);
copy_v3_v3(td->center, td->loc);
- if(key->flag & PEK_SELECT)
+ if (key->flag & PEK_SELECT)
td->flag |= TD_SELECTED;
- else if(!propmode)
+ else if (!propmode)
td->flag |= TD_SKIP;
unit_m3(td->mtx);
unit_m3(td->smtx);
/* don't allow moving roots */
- if(k==0 && pset->flag & PE_LOCK_FIRST && (!psys || !(psys->flag & PSYS_GLOBAL_HAIR)))
+ if (k==0 && pset->flag & PE_LOCK_FIRST && (!psys || !(psys->flag & PSYS_GLOBAL_HAIR)))
td->protectflag |= OB_LOCK_LOC;
td->ob = ob;
td->ext = tx;
- if(t->mode == TFM_BAKE_TIME) {
+ if (t->mode == TFM_BAKE_TIME) {
td->val = key->time;
td->ival = *(key->time);
/* abuse size and quat for min/max values */
td->flag |= TD_NO_EXT;
- if(k==0) tx->size = NULL;
+ if (k==0) tx->size = NULL;
else tx->size = (key - 1)->time;
- if(k == point->totkey - 1) tx->quat = NULL;
+ if (k == point->totkey - 1) tx->quat = NULL;
else tx->quat = (key + 1)->time;
}
td++;
- if(tx)
+ if (tx)
tx++;
tail++;
}
@@ -1825,26 +1829,26 @@ void flushTransParticles(TransInfo *t)
float mat[4][4], imat[4][4], co[3];
int i, k, propmode = t->flag & T_PROP_EDIT;
- if(psys)
+ if (psys)
psmd = psys_get_modifier(ob, psys);
/* we do transform in world space, so flush world space position
* back to particle local space (only for hair particles) */
td= t->data;
- for(i=0, point=edit->points; i<edit->totpoint; i++, point++, td++) {
- if(!(point->flag & PEP_TRANSFORM)) continue;
+ for (i=0, point=edit->points; i<edit->totpoint; i++, point++, td++) {
+ if (!(point->flag & PEP_TRANSFORM)) continue;
- if(psys && !(psys->flag & PSYS_GLOBAL_HAIR)) {
+ if (psys && !(psys->flag & PSYS_GLOBAL_HAIR)) {
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, psys->particles + i, mat);
invert_m4_m4(imat,mat);
- for(k=0, key=point->keys; k<point->totkey; k++, key++) {
+ for (k=0, key=point->keys; k<point->totkey; k++, key++) {
copy_v3_v3(co, key->world_co);
mul_m4_v3(imat, co);
/* optimization for proportional edit */
- if(!propmode || !compare_v3v3(key->co, co, 0.0001f)) {
+ if (!propmode || !compare_v3v3(key->co, co, 0.0001f)) {
copy_v3_v3(key->co, co);
point->flag |= PEP_EDIT_RECALC;
}
@@ -1987,10 +1991,10 @@ static void VertsToTransData(TransInfo *t, TransData *td, BMEditMesh *em, BMVert
copy_v3_v3(td->center, td->loc);
- if(t->around==V3D_LOCAL) {
- if(em->selectmode & SCE_SELECT_FACE)
+ if (t->around==V3D_LOCAL) {
+ if (em->selectmode & SCE_SELECT_FACE)
get_face_center(td->center, em->bm, eve);
- else if(em->selectmode & SCE_SELECT_EDGE)
+ else if (em->selectmode & SCE_SELECT_EDGE)
get_edge_center(td->center, em->bm, eve);
}
copy_v3_v3(td->iloc, td->loc);
@@ -2046,19 +2050,19 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
* use the values for vertex mirror - campbell */
// transform now requires awareness for select mode, so we tag the f1 flags in verts
- if(selectmode & SCE_SELECT_VERTEX) {
+ if (selectmode & SCE_SELECT_VERTEX) {
BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
BM_elem_flag_set(eve, BM_ELEM_TAG, BM_elem_flag_test(eve, BM_ELEM_SELECT));
}
}
- else if(selectmode & SCE_SELECT_EDGE) {
+ else if (selectmode & SCE_SELECT_EDGE) {
BMEdge *eed;
eve = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL);
- for( ; eve; eve=BM_iter_step(&iter)) BM_elem_flag_disable(eve, BM_ELEM_TAG);
+ for ( ; eve; eve=BM_iter_step(&iter)) BM_elem_flag_disable(eve, BM_ELEM_TAG);
eed = BM_iter_new(&iter, bm, BM_EDGES_OF_MESH, NULL);
- for( ; eed; eed=BM_iter_step(&iter)) {
+ for ( ; eed; eed=BM_iter_step(&iter)) {
if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
BM_elem_flag_enable(eed->v1, BM_ELEM_TAG);
BM_elem_flag_enable(eed->v2, BM_ELEM_TAG);
@@ -2068,10 +2072,10 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
else {
BMFace *efa;
eve = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL);
- for( ; eve; eve=BM_iter_step(&iter)) BM_elem_flag_disable(eve, BM_ELEM_TAG);
+ for ( ; eve; eve=BM_iter_step(&iter)) BM_elem_flag_disable(eve, BM_ELEM_TAG);
efa = BM_iter_new(&iter, bm, BM_FACES_OF_MESH, NULL);
- for( ; efa; efa=BM_iter_step(&iter)) {
+ for ( ; efa; efa=BM_iter_step(&iter)) {
if (BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
BMIter liter;
BMLoop *l;
@@ -2089,13 +2093,13 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
* verts*/
selstate = MEM_callocN(sizeof(*selstate) * bm->totvert, __func__);
eve = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL);
- for(a=0; eve; eve=BM_iter_step(&iter), a++) {
+ for (a=0; eve; eve=BM_iter_step(&iter), a++) {
if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
if (BM_elem_flag_test(eve, BM_ELEM_TAG)) {
selstate[a] = 1;
countsel++;
}
- if(propmode) count++;
+ if (propmode) count++;
}
}
@@ -2113,7 +2117,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
}
- if(propmode) {
+ if (propmode) {
t->total = count;
/* allocating scratch arrays */
@@ -2127,13 +2131,13 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
copy_m3_m4(mtx, t->obedit->obmat);
invert_m3_m3(smtx, mtx);
- if(propmode & T_PROP_CONNECTED) {
+ if (propmode & T_PROP_CONNECTED) {
editmesh_set_connectivity_distance(em, mtx, dists);
}
/* detect CrazySpace [tm] */
- if(modifiers_getCageIndex(t->scene, t->obedit, NULL, 1)>=0) {
- if(modifiers_isCorrectableDeformed(t->obedit)) {
+ if (modifiers_getCageIndex(t->scene, t->obedit, NULL, 1)>=0) {
+ if (modifiers_isCorrectableDeformed(t->obedit)) {
/* check if we can use deform matrices for modifier from the
* start up to stack, they are more accurate than quats */
totleft= editbmesh_get_first_deform_matrices(t->scene, t->obedit, em, &defmats, &defcos);
@@ -2141,25 +2145,25 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
/* if we still have more modifiers, also do crazyspace
* correction with quats, relative to the coordinates after
* the modifiers that support deform matrices (defcos) */
- if(totleft > 0) {
+ if (totleft > 0) {
mappedcos= crazyspace_get_mapped_editverts(t->scene, t->obedit);
quats= MEM_mallocN( (t->total)*sizeof(float)*4, "crazy quats");
crazyspace_set_quats_editmesh(em, (float*)defcos, mappedcos, quats); /* BMESH_TODO, abuses vertex index, should use an int array */
- if(mappedcos)
+ if (mappedcos)
MEM_freeN(mappedcos);
}
- if(defcos)
+ if (defcos)
MEM_freeN(defcos);
}
}
/* find out which half we do */
- if(mirror) {
+ if (mirror) {
eve = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL);
- for(a=0; eve; eve=BM_iter_step(&iter), a++) {
- if(!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && selstate[a] && eve->co[0]!=0.0f) {
- if(eve->co[0]<0.0f)
+ for (a=0; eve; eve=BM_iter_step(&iter), a++) {
+ if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && selstate[a] && eve->co[0]!=0.0f) {
+ if (eve->co[0]<0.0f)
{
t->mirror = -1;
mirror = -1;
@@ -2170,37 +2174,38 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
}
eve = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL);
- for(a=0; eve; eve=BM_iter_step(&iter), a++) {
- if(!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
- if(propmode || selstate[a]) {
+ for (a=0; eve; eve=BM_iter_step(&iter), a++) {
+ if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
+ if (propmode || selstate[a]) {
float *bweight = CustomData_bmesh_get(&bm->vdata, eve->head.data, CD_BWEIGHT);
VertsToTransData(t, tob, em, eve, bweight);
/* selected */
- if(selstate[a]) tob->flag |= TD_SELECTED;
+ if (selstate[a]) tob->flag |= TD_SELECTED;
/* active */
- if(eve == eve_act) tob->flag |= TD_ACTIVE;
+ if (eve == eve_act) tob->flag |= TD_ACTIVE;
- if(propmode) {
+ if (propmode) {
if (propmode & T_PROP_CONNECTED) {
tob->dist = dists[a];
- } else {
+ }
+ else {
tob->flag |= TD_NOTCONNECTED;
tob->dist = MAXFLOAT;
}
}
/* CrazySpace */
- if(defmats || (quats && BM_elem_index_get(eve) != -1)) {
+ if (defmats || (quats && BM_elem_index_get(eve) != -1)) {
float mat[3][3], qmat[3][3], imat[3][3];
/* use both or either quat and defmat correction */
- if(quats && BM_elem_index_get(eve) != -1) {
+ if (quats && BM_elem_index_get(eve) != -1) {
quat_to_mat3(qmat, quats + 4*BM_elem_index_get(eve));
- if(defmats)
+ if (defmats)
mul_serie_m3(mat, mtx, qmat, defmats[a],
NULL, NULL, NULL, NULL, NULL);
else
@@ -2220,9 +2225,9 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
}
/* Mirror? */
- if( (mirror>0 && tob->iloc[0]>0.0f) || (mirror<0 && tob->iloc[0]<0.0f)) {
+ if ( (mirror>0 && tob->iloc[0]>0.0f) || (mirror<0 && tob->iloc[0]<0.0f)) {
BMVert *vmir= EDBM_GetMirrorVert(em, eve); //t->obedit, em, eve, tob->iloc, a);
- if(vmir && vmir != eve) {
+ if (vmir && vmir != eve) {
tob->extra = vmir;
}
}
@@ -2234,7 +2239,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
if (mirror != 0)
{
tob = t->data;
- for( a = 0; a < t->total; a++, tob++ )
+ for ( a = 0; a < t->total; a++, tob++ )
{
if (ABS(tob->loc[0]) <= 0.00001f)
{
@@ -2245,9 +2250,9 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
cleanup:
/* crazy space free */
- if(quats)
+ if (quats)
MEM_freeN(quats);
- if(defmats)
+ if (defmats)
MEM_freeN(defmats);
if (dists)
MEM_freeN(dists);
@@ -2267,13 +2272,13 @@ void flushTransNodes(TransInfo *t)
TransData2D *td;
/* flush to 2d vector from internally used 3d vector */
- for(a=0, td= t->data2d; a<t->total; a++, td++) {
+ for (a=0, td= t->data2d; a<t->total; a++, td++) {
td->loc2d[0]= td->loc[0];
td->loc2d[1]= td->loc[1];
}
/* handle intersection with noodles */
- if(t->total==1) {
+ if (t->total==1) {
ED_node_link_intersect_test(t->sa, 1);
}
@@ -2303,7 +2308,7 @@ void flushTransSeq(TransInfo *t)
Sequence *seq_prev= NULL;
/* flush to 2d vector from internally used 3d vector */
- for(a=0, td= t->data, td2d= t->data2d; a<t->total; a++, td++, td2d++) {
+ for (a=0, td= t->data, td2d= t->data2d; a<t->total; a++, td++, td2d++) {
tdsq= (TransDataSeq *)td->extra;
seq= tdsq->seq;
old_start = seq->start;
@@ -2336,17 +2341,17 @@ void flushTransSeq(TransInfo *t)
}
if (seq != seq_prev) {
- if(seq->depth==0) {
+ if (seq->depth==0) {
/* Calculate this strip and all nested strips
* children are ALWAYS transformed first
- * so we dont need to do this in another loop. */
+ * so we don't need to do this in another loop. */
calc_sequence(t->scene, seq);
}
else {
calc_sequence_disp(t->scene, seq);
}
- if(tdsq->sel_flag == SELECT)
+ if (tdsq->sel_flag == SELECT)
seq_offset_animdata(t->scene, seq, seq->start - old_start);
}
seq_prev= seq;
@@ -2372,16 +2377,16 @@ void flushTransSeq(TransInfo *t)
/* need to do the overlap check in a new loop otherwise adjacent strips
* will not be updated and we'll get false positives */
seq_prev= NULL;
- for(a=0, td= t->data, td2d= t->data2d; a<t->total; a++, td++, td2d++) {
+ for (a=0, td= t->data, td2d= t->data2d; a<t->total; a++, td++, td2d++) {
tdsq= (TransDataSeq *)td->extra;
seq= tdsq->seq;
if (seq != seq_prev) {
- if(seq->depth==0) {
+ if (seq->depth==0) {
/* test overlap, displayes red outline */
seq->flag &= ~SEQ_OVERLAP;
- if( seq_test_overlap(seqbasep, seq) ) {
+ if ( seq_test_overlap(seqbasep, seq) ) {
seq->flag |= SEQ_OVERLAP;
}
}
@@ -2417,7 +2422,7 @@ static void UVsToTransData(SpaceImage *sima, TransData *td, TransData2D *td2d, f
td->ext= NULL; td->val= NULL;
- if(selected) {
+ if (selected) {
td->flag |= TD_SELECTED;
td->dist= 0.0;
}
@@ -2444,13 +2449,13 @@ static void createTransUVs(bContext *C, TransInfo *t)
int count=0, countsel=0;
int propmode = t->flag & T_PROP_EDIT;
- if(!ED_space_image_show_uvedit(sima, t->obedit)) return;
+ if (!ED_space_image_show_uvedit(sima, t->obedit)) return;
/* count */
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf)) {
+ if (!uvedit_face_visible(scene, ima, efa, tf)) {
BM_elem_flag_disable(efa, BM_ELEM_TAG);
continue;
}
@@ -2460,7 +2465,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
if (uvedit_uv_selected(em, scene, l))
countsel++;
- if(propmode)
+ if (propmode)
count++;
}
}
@@ -2474,7 +2479,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
* treated just as if they were 3d verts */
t->data2d= MEM_callocN(t->total*sizeof(TransData2D), "TransObData2D(UV Editing)");
- if(sima->flag & SI_CLIP_UV)
+ if (sima->flag & SI_CLIP_UV)
t->flag |= T_CLIP_UV;
td= t->data;
@@ -2510,11 +2515,11 @@ void flushTransUVs(TransInfo *t)
invy= 1.0f/aspy;
/* flush to 2d vector from internally used 3d vector */
- for(a=0, td= t->data2d; a<t->total; a++, td++) {
+ for (a=0, td= t->data2d; a<t->total; a++, td++) {
td->loc2d[0]= td->loc[0]*invx;
td->loc2d[1]= td->loc[1]*invy;
- if((sima->flag & SI_PIXELSNAP) && (t->state != TRANS_CANCEL)) {
+ if ((sima->flag & SI_PIXELSNAP) && (t->state != TRANS_CANCEL)) {
td->loc2d[0]= (float)floor(width*td->loc2d[0] + 0.5f)/width;
td->loc2d[1]= (float)floor(height*td->loc2d[1] + 0.5f)/height;
}
@@ -2531,36 +2536,36 @@ int clipUVTransform(TransInfo *t, float *vec, int resize)
min[0]= min[1]= 0.0f;
max[0]= aspx; max[1]= aspy;
- for(a=0, td= t->data; a<t->total; a++, td++) {
+ for (a=0, td= t->data; a<t->total; a++, td++) {
DO_MINMAX2(td->loc, min, max);
}
- if(resize) {
- if(min[0] < 0.0f && t->center[0] > 0.0f && t->center[0] < aspx*0.5f)
+ if (resize) {
+ if (min[0] < 0.0f && t->center[0] > 0.0f && t->center[0] < aspx*0.5f)
vec[0] *= t->center[0]/(t->center[0] - min[0]);
- else if(max[0] > aspx && t->center[0] < aspx)
+ else if (max[0] > aspx && t->center[0] < aspx)
vec[0] *= (t->center[0] - aspx)/(t->center[0] - max[0]);
else
clipx= 0;
- if(min[1] < 0.0f && t->center[1] > 0.0f && t->center[1] < aspy*0.5f)
+ if (min[1] < 0.0f && t->center[1] > 0.0f && t->center[1] < aspy*0.5f)
vec[1] *= t->center[1]/(t->center[1] - min[1]);
- else if(max[1] > aspy && t->center[1] < aspy)
+ else if (max[1] > aspy && t->center[1] < aspy)
vec[1] *= (t->center[1] - aspy)/(t->center[1] - max[1]);
else
clipy= 0;
}
else {
- if(min[0] < 0.0f)
+ if (min[0] < 0.0f)
vec[0] -= min[0];
- else if(max[0] > aspx)
+ else if (max[0] > aspx)
vec[0] -= max[0]-aspx;
else
clipx= 0;
- if(min[1] < 0.0f)
+ if (min[1] < 0.0f)
vec[1] -= min[1];
- else if(max[1] > aspy)
+ else if (max[1] > aspy)
vec[1] -= max[1]-aspy;
else
clipy= 0;
@@ -3713,9 +3718,9 @@ static void beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totv
td2d->loc2d= (bezts + bezm->newIndex)->vec[1];
/* if only control point is selected, the handle pointers need to be updated as well */
- if(td2d->h1)
+ if (td2d->h1)
td2d->h1= (bezts + bezm->newIndex)->vec[0];
- if(td2d->h2)
+ if (td2d->h2)
td2d->h2= (bezts + bezm->newIndex)->vec[2];
adjusted[j] = 1;
@@ -3723,7 +3728,7 @@ static void beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totv
/* the handle type pointer has to be updated too */
if (adjusted[j] && td->flag & TD_BEZTRIPLE && td->hdata) {
- if(bezm->swapHs == 1) {
+ if (bezm->swapHs == 1) {
td->hdata->h1 = &(bezts + bezm->newIndex)->h2;
td->hdata->h2 = &(bezts + bezm->newIndex)->h1;
}
@@ -3840,7 +3845,7 @@ void flushTransGraphData(TransInfo *t)
/* ******************* Sequencer Transform data ******************* */
/* This function applies the rules for transforming a strip so duplicate
- * checks dont need to be added in multiple places.
+ * checks don't need to be added in multiple places.
*
* recursive, count and flag MUST be set.
*
@@ -3892,7 +3897,8 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
else *flag |= SEQ_LEFTSEL;
}
}
- } else {
+ }
+ else {
t->frame_side= 'B';
@@ -3912,7 +3918,8 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
if ((seq->flag & (SEQ_LEFTSEL|SEQ_RIGHTSEL)) == (SEQ_LEFTSEL|SEQ_RIGHTSEL)) {
*flag= seq->flag;
*count= 2; /* we need 2 transdata's */
- } else {
+ }
+ else {
*flag= seq->flag;
*count= 1; /* selected or with a handle selected */
}
@@ -3920,7 +3927,7 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
/* Recursive */
if ((seq->type == SEQ_META) && ((seq->flag & (SEQ_LEFTSEL|SEQ_RIGHTSEL)) == 0)) {
- /* if any handles are selected, dont recurse */
+ /* if any handles are selected, don't recurse */
*recursive = 1;
}
else {
@@ -3938,8 +3945,8 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
#else
if (seq->type == SEQ_META) {
/* Meta's can only directly be moved between channels since they
- * dont have their start and length set directly (children affect that)
- * since this Meta is nested we dont need any of its data infact.
+ * don't have their start and length set directly (children affect that)
+ * since this Meta is nested we don't need any of its data infact.
* calc_sequence() will update its settings when run on the toplevel meta */
*flag= 0;
*count= 0;
@@ -4088,7 +4095,7 @@ static void freeSeqData(TransInfo *t)
{
Editing *ed= seq_give_editing(t->scene, FALSE);
- if(ed != NULL) {
+ if (ed != NULL) {
ListBase *seqbasep= ed->seqbasep;
TransData *td= t->data;
int a;
@@ -4105,7 +4112,7 @@ static void freeSeqData(TransInfo *t)
#if 0 // default 2.4 behavior
/* flush to 2d vector from internally used 3d vector */
- for(a=0; a<t->total; a++, td++) {
+ for (a=0; a<t->total; a++, td++) {
if ((seq != seq_prev) && (seq->depth==0) && (seq->flag & SEQ_OVERLAP)) {
seq= ((TransDataSeq *)td->extra)->seq;
shuffle_seq(seqbasep, seq);
@@ -4118,7 +4125,7 @@ static void freeSeqData(TransInfo *t)
{
int overlap= 0;
- for(a=0; a<t->total; a++, td++) {
+ for (a=0; a<t->total; a++, td++) {
seq_prev= NULL;
seq= ((TransDataSeq *)td->extra)->seq;
if ((seq != seq_prev) && (seq->depth==0) && (seq->flag & SEQ_OVERLAP)) {
@@ -4128,18 +4135,18 @@ static void freeSeqData(TransInfo *t)
seq_prev= seq;
}
- if(overlap) {
+ if (overlap) {
int has_effect= 0;
- for(seq= seqbasep->first; seq; seq= seq->next)
+ for (seq= seqbasep->first; seq; seq= seq->next)
seq->tmp= NULL;
td= t->data;
seq_prev= NULL;
- for(a=0; a<t->total; a++, td++) {
+ for (a=0; a<t->total; a++, td++) {
seq= ((TransDataSeq *)td->extra)->seq;
if ((seq != seq_prev)) {
/* check effects strips, we cant change their time */
- if((seq->type & SEQ_EFFECT) && seq->seq1) {
+ if ((seq->type & SEQ_EFFECT) && seq->seq1) {
has_effect= TRUE;
}
else {
@@ -4151,14 +4158,14 @@ static void freeSeqData(TransInfo *t)
shuffle_seq_time(seqbasep, t->scene);
- if(has_effect) {
+ if (has_effect) {
/* update effects strips based on strips just moved in time */
td= t->data;
seq_prev= NULL;
- for(a=0; a<t->total; a++, td++) {
+ for (a=0; a<t->total; a++, td++) {
seq= ((TransDataSeq *)td->extra)->seq;
if ((seq != seq_prev)) {
- if((seq->type & SEQ_EFFECT) && seq->seq1) {
+ if ((seq->type & SEQ_EFFECT) && seq->seq1) {
calc_sequence(t->scene, seq);
}
}
@@ -4167,11 +4174,11 @@ static void freeSeqData(TransInfo *t)
/* now if any effects _still_ overlap, we need to move them up */
td= t->data;
seq_prev= NULL;
- for(a=0; a<t->total; a++, td++) {
+ for (a=0; a<t->total; a++, td++) {
seq= ((TransDataSeq *)td->extra)->seq;
if ((seq != seq_prev)) {
- if((seq->type & SEQ_EFFECT) && seq->seq1) {
- if(seq_test_overlap(seqbasep, seq)) {
+ if ((seq->type & SEQ_EFFECT) && seq->seq1) {
+ if (seq_test_overlap(seqbasep, seq)) {
shuffle_seq(seqbasep, seq, t->scene);
}
}
@@ -4183,9 +4190,9 @@ static void freeSeqData(TransInfo *t)
}
#endif
- for(seq= seqbasep->first; seq; seq= seq->next) {
+ for (seq= seqbasep->first; seq; seq= seq->next) {
/* We might want to build a list of effects that need to be updated during transform */
- if(seq->type & SEQ_EFFECT) {
+ if (seq->type & SEQ_EFFECT) {
if (seq->seq1 && seq->seq1->flag & SELECT) calc_sequence(t->scene, seq);
else if (seq->seq2 && seq->seq2->flag & SELECT) calc_sequence(t->scene, seq);
else if (seq->seq3 && seq->seq3->flag & SELECT) calc_sequence(t->scene, seq);
@@ -4196,7 +4203,7 @@ static void freeSeqData(TransInfo *t)
}
else {
/* Cancelled, need to update the strips display */
- for(a=0; a<t->total; a++, td++) {
+ for (a=0; a<t->total; a++, td++) {
seq= ((TransDataSeq *)td->extra)->seq;
if ((seq != seq_prev) && (seq->depth==0)) {
calc_sequence_disp(t->scene, seq);
@@ -4206,9 +4213,9 @@ static void freeSeqData(TransInfo *t)
}
}
- if (t->customData) {
+ if ((t->customData != NULL) && (t->flag & T_FREE_CUSTOMDATA)) {
MEM_freeN(t->customData);
- t->customData= NULL;
+ t->customData = NULL;
}
if (t->data) {
MEM_freeN(t->data); // XXX postTrans usually does this
@@ -4252,12 +4259,12 @@ static void createTransSeqData(bContext *C, TransInfo *t)
#ifdef XXX_DURIAN_ANIM_TX_HACK
{
Sequence *seq;
- for(seq= ed->seqbasep->first; seq; seq= seq->next) {
+ for (seq= ed->seqbasep->first; seq; seq= seq->next) {
/* hack */
- if((seq->flag & SELECT)==0 && seq->type & SEQ_EFFECT) {
+ if ((seq->flag & SELECT)==0 && seq->type & SEQ_EFFECT) {
Sequence *seq_user;
int i;
- for(i=0; i<3; i++) {
+ for (i=0; i<3; i++) {
seq_user= *((&seq->seq1) + i);
if ( seq_user && (seq_user->flag & SELECT) &&
!(seq_user->flag & SEQ_LOCK) &&
@@ -4283,7 +4290,8 @@ static void createTransSeqData(bContext *C, TransInfo *t)
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransSeq TransData");
td2d = t->data2d = MEM_callocN(t->total*sizeof(TransData2D), "TransSeq TransData2D");
- tdsq = t->customData= MEM_callocN(t->total*sizeof(TransDataSeq), "TransSeq TransDataSeq");
+ tdsq = t->customData = MEM_callocN(t->total*sizeof(TransDataSeq), "TransSeq TransDataSeq");
+ t->flag |= T_FREE_CUSTOMDATA;
@@ -4459,7 +4467,7 @@ static void set_trans_object_base_flags(TransInfo *t)
Base *base;
/* don't do it if we're not actually going to recalculate anything */
- if(t->mode == TFM_DUMMY)
+ if (t->mode == TFM_DUMMY)
return;
/* makes sure base flags and object flags are identical */
@@ -4467,22 +4475,22 @@ static void set_trans_object_base_flags(TransInfo *t)
/* handle pending update events, otherwise they got copied below */
for (base= scene->base.first; base; base= base->next) {
- if(base->object->recalc)
+ if (base->object->recalc)
object_handle_update(t->scene, base->object);
}
for (base= scene->base.first; base; base= base->next) {
base->flag &= ~BA_WAS_SEL;
- if(TESTBASELIB_BGMODE(v3d, scene, base)) {
+ if (TESTBASELIB_BGMODE(v3d, scene, base)) {
Object *ob= base->object;
Object *parsel= ob->parent;
/* if parent selected, deselect */
- while(parsel) {
- if(parsel->flag & SELECT) {
+ while (parsel) {
+ if (parsel->flag & SELECT) {
Base *parbase = object_in_scene(parsel, scene);
- if(parbase) { /* in rare cases this can fail */
+ if (parbase) { /* in rare cases this can fail */
if TESTBASELIB_BGMODE(v3d, scene, parbase) {
break;
}
@@ -4491,12 +4499,13 @@ static void set_trans_object_base_flags(TransInfo *t)
parsel= parsel->parent;
}
- if(parsel)
+ if (parsel)
{
/* rotation around local centers are allowed to propagate */
if ((t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL) && t->around == V3D_LOCAL) {
base->flag |= BA_TRANSFORM_CHILD;
- } else {
+ }
+ else {
base->flag &= ~SELECT;
base->flag |= BA_WAS_SEL;
}
@@ -4512,9 +4521,9 @@ static void set_trans_object_base_flags(TransInfo *t)
/* and we store them temporal in base (only used for transform code) */
/* this because after doing updates, the object->recalc is cleared */
for (base= scene->base.first; base; base= base->next) {
- if(base->object->recalc & OB_RECALC_OB)
+ if (base->object->recalc & OB_RECALC_OB)
base->flag |= BA_HAS_RECALC_OB;
- if(base->object->recalc & OB_RECALC_DATA)
+ if (base->object->recalc & OB_RECALC_DATA)
base->flag |= BA_HAS_RECALC_DATA;
}
}
@@ -4548,11 +4557,11 @@ static int count_proportional_objects(TransInfo *t)
{
/* mark all parents */
for (base= scene->base.first; base; base= base->next) {
- if(TESTBASELIB_BGMODE(v3d, scene, base)) {
+ if (TESTBASELIB_BGMODE(v3d, scene, base)) {
Object *parent = base->object->parent;
/* flag all parents */
- while(parent) {
+ while (parent) {
parent->flag |= BA_TRANSFORM_PARENT;
parent = parent->parent;
}
@@ -4592,9 +4601,9 @@ static int count_proportional_objects(TransInfo *t)
/* and we store them temporal in base (only used for transform code) */
/* this because after doing updates, the object->recalc is cleared */
for (base= scene->base.first; base; base= base->next) {
- if(base->object->recalc & OB_RECALC_OB)
+ if (base->object->recalc & OB_RECALC_OB)
base->flag |= BA_HAS_RECALC_OB;
- if(base->object->recalc & OB_RECALC_DATA)
+ if (base->object->recalc & OB_RECALC_DATA)
base->flag |= BA_HAS_RECALC_DATA;
}
@@ -4608,7 +4617,7 @@ static void clear_trans_object_base_flags(TransInfo *t)
for (base= sce->base.first; base; base = base->next)
{
- if(base->flag & BA_WAS_SEL)
+ if (base->flag & BA_WAS_SEL)
base->flag |= SELECT;
base->flag &= ~(BA_WAS_SEL|BA_HAS_RECALC_OB|BA_HAS_RECALC_DATA|BA_TEMP_TAG|BA_TRANSFORM_CHILD|BA_TRANSFORM_PARENT);
@@ -4733,7 +4742,7 @@ void autokeyframe_pose_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *o
float cfra= (float)CFRA;
short flag= 0;
- /* flag is initialised from UserPref keyframing settings
+ /* flag is initialized from UserPref keyframing settings
* - special exception for targetless IK - INSERTKEY_MATRIX keyframes should get
* visual keyframes even if flag not set, as it's not that useful otherwise
* (for quick animation recording)
@@ -4869,7 +4878,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
if (t->obedit) {
if (canceled==0) {
/* we need to delete the temporary faces before automerging */
- if(t->mode == TFM_EDGE_SLIDE){
+ if (t->mode == TFM_EDGE_SLIDE) {
SlideData *sld = t->customData;
/* handle multires re-projection, done
@@ -4911,8 +4920,8 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
/* cant use , TFM_TIME_EXTEND
* for some reason EXTEND is changed into TRANSLATE, so use frame_side instead */
- if(t->mode == TFM_SEQ_SLIDE) {
- if(t->frame_side == 'B')
+ if (t->mode == TFM_SEQ_SLIDE) {
+ if (t->frame_side == 'B')
ED_markers_post_apply_transform(&t->scene->markers, t->scene, TFM_TIME_TRANSLATE, t->values[0], t->frame_side);
}
else if (ELEM(t->frame_side, 'L', 'R')) {
@@ -4925,7 +4934,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
SpaceNode *snode= (SpaceNode *)t->sa->spacedata.first;
ED_node_update_hierarchy(C, snode->edittree);
- if(canceled == 0)
+ if (canceled == 0)
ED_node_link_insert(t->sa);
/* clear link line */
@@ -4935,7 +4944,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
SpaceClip *sc= t->sa->spacedata.first;
MovieClip *clip= ED_space_clip(sc);
- if(t->scene->nodetree) {
+ if (t->scene->nodetree) {
/* tracks can be used for stabilization nodes,
* flush update for such nodes */
nodeUpdateID(t->scene->nodetree, &clip->id);
@@ -5105,7 +5114,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
* Note: if the refresh is really needed after cancel then some way
* has to be added to not update handle types (see bug 22289).
*/
- if(!canceled)
+ if (!canceled)
ANIM_editkeyframes_refresh(&ac);
}
else if (t->spacetype == SPACE_NLA) {
@@ -5157,7 +5166,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
ob= t->poseobj;
arm= ob->data;
- if((t->flag & T_AUTOIK) && (t->options & CTX_AUTOCONFIRM)) {
+ if ((t->flag & T_AUTOIK) && (t->options & CTX_AUTOCONFIRM)) {
/* when running transform non-interactively (operator exec),
* we need to update the pose otherwise no updates get called during
* transform and the auto-ik is not applied. see [#26164] */
@@ -5176,7 +5185,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
/* not forget to clear the auto flag */
for (pchan=ob->pose->chanbase.first; pchan; pchan=pchan->next) {
bKinematicConstraint *data= has_targetless_ik(pchan);
- if(data) data->flag &= ~CONSTRAINT_IK_AUTO;
+ if (data) data->flag &= ~CONSTRAINT_IK_AUTO;
}
}
@@ -5221,8 +5230,8 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
/* flag object caches as outdated */
BKE_ptcache_ids_from_object(&pidlist, ob, t->scene, MAX_DUPLI_RECUR);
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pid->type != PTCACHE_TYPE_PARTICLES) /* particles don't need reset on geometry change */
+ for (pid=pidlist.first; pid; pid=pid->next) {
+ if (pid->type != PTCACHE_TYPE_PARTICLES) /* particles don't need reset on geometry change */
pid->cache->flag |= PTCACHE_OUTDATED;
}
BLI_freelistN(&pidlist);
@@ -5256,7 +5265,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
/* recalculating the frame positions means we loose our original transform if its not auto-keyed [#24451]
* this hack re-applies it, which is annoying, only alternatives are...
- * - dont recalc paths.
+ * - don't recalc paths.
* - have an object_handle_update() which gives is the new transform without touching the objects.
* - only recalc paths on auto-keying.
* - ED_objects_recalculate_paths could backup/restore transforms.
@@ -5271,7 +5280,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
#if 0 // TRANSFORM_FIX_ME
- if(resetslowpar)
+ if (resetslowpar)
reset_slowparents();
#endif
}
@@ -5287,7 +5296,7 @@ static void createTransObject(bContext *C, TransInfo *t)
/* count */
t->total= CTX_DATA_COUNT(C, selected_objects);
- if(!t->total) {
+ if (!t->total) {
/* clear here, main transform function escapes too */
clear_trans_object_base_flags(t);
return;
@@ -5391,7 +5400,7 @@ static void createTransNodeData(bContext *C, TransInfo *t)
SpaceNode *snode= t->sa->spacedata.first;
bNode *node;
- if(!snode->edittree) {
+ if (!snode->edittree) {
t->total= 0;
return;
}
@@ -5446,13 +5455,14 @@ static void markerToTransDataInit(TransData *td, TransData2D *td2d,
tdt->mode = transDataTracking_ModeTracks;
- if(anchor) {
+ if (anchor) {
td2d->loc[0] = rel[0]; /* hold original location */
td2d->loc[1] = rel[1];
tdt->loc= loc;
td2d->loc2d = loc; /* current location */
- } else {
+ }
+ else {
td2d->loc[0] = loc[0]; /* hold original location */
td2d->loc[1] = loc[1];
@@ -5466,8 +5476,8 @@ static void markerToTransDataInit(TransData *td, TransData2D *td2d,
tdt->markersnr= track->markersnr;
tdt->markers= track->markers;
- if(rel) {
- if(!anchor) {
+ if (rel) {
+ if (!anchor) {
td2d->loc[0]+= rel[0];
td2d->loc[1]+= rel[1];
}
@@ -5475,7 +5485,7 @@ static void markerToTransDataInit(TransData *td, TransData2D *td2d,
copy_v2_v2(tdt->srelative, rel);
}
- if(off)
+ if (off)
copy_v2_v2(tdt->soffset, off);
td->flag = 0;
@@ -5505,15 +5515,15 @@ static void trackToTransData(SpaceClip *sc, TransData *td, TransData2D *td2d,
markerToTransDataInit(td++, td2d++, tdt++, track, TRACK_AREA_POINT, track->offset, marker->pos, track->offset);
- if(track->flag&SELECT)
+ if (track->flag&SELECT)
markerToTransDataInit(td++, td2d++, tdt++, track, TRACK_AREA_POINT, marker->pos, NULL, NULL);
- if(track->pat_flag&SELECT) {
+ if (track->pat_flag&SELECT) {
markerToTransDataInit(td++, td2d++, tdt++, track, TRACK_AREA_PAT, track->pat_min, marker->pos, NULL);
markerToTransDataInit(td++, td2d++, tdt++, track, TRACK_AREA_PAT, track->pat_max, marker->pos, NULL);
}
- if(track->search_flag&SELECT) {
+ if (track->search_flag&SELECT) {
markerToTransDataInit(td++, td2d++, tdt++, track, TRACK_AREA_SEARCH, track->search_min, marker->pos, NULL);
markerToTransDataInit(td++, td2d++, tdt++, track, TRACK_AREA_SEARCH, track->search_max, marker->pos, NULL);
}
@@ -5523,8 +5533,8 @@ static void transDataTrackingFree(TransInfo *t)
{
TransDataTracking *tdt= t->customData;
- if(tdt) {
- if(tdt->smarkers) MEM_freeN(tdt->smarkers);
+ if (tdt) {
+ if (tdt->smarkers) MEM_freeN(tdt->smarkers);
MEM_freeN(tdt);
}
}
@@ -5545,21 +5555,21 @@ static void createTransTrackingTracksData(bContext *C, TransInfo *t)
t->total = 0;
track = tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) {
marker= BKE_tracking_get_marker(track, framenr);
t->total++; /* offset */
- if(track->flag&SELECT) t->total++;
- if(track->pat_flag&SELECT) t->total+= 2;
- if(track->search_flag&SELECT) t->total+= 2;
+ if (track->flag&SELECT) t->total++;
+ if (track->pat_flag&SELECT) t->total+= 2;
+ if (track->search_flag&SELECT) t->total+= 2;
}
track = track->next;
}
- if(t->total==0)
+ if (t->total==0)
return;
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransTracking TransData");
@@ -5570,8 +5580,8 @@ static void createTransTrackingTracksData(bContext *C, TransInfo *t)
/* create actual data */
track = tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) {
marker= BKE_tracking_get_marker(track, framenr);
trackToTransData(sc, td, td2d, tdt, track);
@@ -5581,17 +5591,17 @@ static void createTransTrackingTracksData(bContext *C, TransInfo *t)
td2d++;
tdt++;
- if((marker->flag&MARKER_DISABLED)==0) {
- if(track->flag&SELECT) {td++; td2d++; tdt++;}
- if(track->pat_flag&SELECT) {td+= 2; td2d+= 2;tdt+=2;}
+ if ((marker->flag&MARKER_DISABLED)==0) {
+ if (track->flag&SELECT) {td++; td2d++; tdt++;}
+ if (track->pat_flag&SELECT) {td+= 2; td2d+= 2;tdt+=2;}
}
- if(track->search_flag&SELECT) {
+ if (track->search_flag&SELECT) {
td+= 2;
td2d+= 2;
tdt+= 2;
- if(marker->flag&MARKER_DISABLED) {
+ if (marker->flag&MARKER_DISABLED) {
td+= 3;
td2d+= 3;
tdt+= 3;
@@ -5659,19 +5669,19 @@ static void createTransTrackingCurvesData(bContext *C, TransInfo *t)
t->total = 0;
track = tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) {
- for(i = 1; i < track->markersnr; i++) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) {
+ for (i = 1; i < track->markersnr; i++) {
marker = &track->markers[i];
prev_marker = &track->markers[i-1];
- if((marker->flag & MARKER_DISABLED) || (prev_marker->flag & MARKER_DISABLED))
+ if ((marker->flag & MARKER_DISABLED) || (prev_marker->flag & MARKER_DISABLED))
continue;
- if(marker->flag & MARKER_GRAPH_SEL_X)
+ if (marker->flag & MARKER_GRAPH_SEL_X)
t->total += 1;
- if(marker->flag & MARKER_GRAPH_SEL_Y)
+ if (marker->flag & MARKER_GRAPH_SEL_Y)
t->total += 1;
}
}
@@ -5679,7 +5689,7 @@ static void createTransTrackingCurvesData(bContext *C, TransInfo *t)
track = track->next;
}
- if(t->total==0)
+ if (t->total==0)
return;
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransTracking TransData");
@@ -5690,23 +5700,23 @@ static void createTransTrackingCurvesData(bContext *C, TransInfo *t)
/* create actual data */
track = tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) {
- for(i = 1; i < track->markersnr; i++) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) {
+ for (i = 1; i < track->markersnr; i++) {
marker = &track->markers[i];
prev_marker = &track->markers[i-1];
- if((marker->flag & MARKER_DISABLED) || (prev_marker->flag & MARKER_DISABLED))
+ if ((marker->flag & MARKER_DISABLED) || (prev_marker->flag & MARKER_DISABLED))
continue;
- if(marker->flag & MARKER_GRAPH_SEL_X) {
+ if (marker->flag & MARKER_GRAPH_SEL_X) {
markerToTransCurveDataInit(td, td2d, tdt, marker, &track->markers[i-1], 0, width);
td += 1;
td2d += 1;
tdt += 1;
}
- if(marker->flag & MARKER_GRAPH_SEL_Y) {
+ if (marker->flag & MARKER_GRAPH_SEL_Y) {
markerToTransCurveDataInit(td, td2d, tdt, marker, &track->markers[i-1], 1, height);
td += 1;
@@ -5728,13 +5738,13 @@ static void createTransTrackingData(bContext *C, TransInfo *t)
t->total = 0;
- if(!clip || !BKE_movieclip_has_frame(clip, &sc->user))
+ if (!clip || !BKE_movieclip_has_frame(clip, &sc->user))
return;
- if(!ELEM(t->mode, TFM_RESIZE, TFM_TRANSLATION))
+ if (!ELEM(t->mode, TFM_RESIZE, TFM_TRANSLATION))
return;
- if(ar->regiontype == RGN_TYPE_PREVIEW) {
+ if (ar->regiontype == RGN_TYPE_PREVIEW) {
/* transformation was called from graph editor */
createTransTrackingCurvesData(C, t);
}
@@ -5753,37 +5763,37 @@ static void cancelTransTracking(TransInfo *t)
MovieTrackingMarker *marker;
int a, framenr = sc->user.framenr;
- if(tdt->mode == transDataTracking_ModeTracks) {
+ if (tdt->mode == transDataTracking_ModeTracks) {
track = tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) {
marker = BKE_tracking_get_marker(track, framenr);
marker->flag = tdt->flag;
tdt++;
- if(track->flag&SELECT) tdt++;
- if(track->pat_flag&SELECT) tdt += 2;
- if(track->search_flag&SELECT) tdt += 2;
+ if (track->flag&SELECT) tdt++;
+ if (track->pat_flag&SELECT) tdt += 2;
+ if (track->search_flag&SELECT) tdt += 2;
}
track = track->next;
}
}
- else if(tdt->mode == transDataTracking_ModeCurves) {
+ else if (tdt->mode == transDataTracking_ModeCurves) {
MovieTrackingMarker *prev_marker;
track = tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) {
- for(a = 1; a < track->markersnr; a++) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) {
+ for (a = 1; a < track->markersnr; a++) {
marker = &track->markers[a];
prev_marker = &track->markers[a-1];
- if((marker->flag & MARKER_DISABLED) || (prev_marker->flag & MARKER_DISABLED))
+ if ((marker->flag & MARKER_DISABLED) || (prev_marker->flag & MARKER_DISABLED))
continue;
- if(marker->flag & (MARKER_GRAPH_SEL_X|MARKER_GRAPH_SEL_Y)) {
+ if (marker->flag & (MARKER_GRAPH_SEL_X|MARKER_GRAPH_SEL_Y)) {
marker->flag = tdt->flag;
}
}
@@ -5801,19 +5811,19 @@ void flushTransTracking(TransInfo *t)
TransDataTracking *tdt;
int a;
- if(t->state == TRANS_CANCEL)
+ if (t->state == TRANS_CANCEL)
cancelTransTracking(t);
/* flush to 2d vector from internally used 3d vector */
- for(a=0, td= t->data, td2d= t->data2d, tdt= t->customData; a<t->total; a++, td2d++, td++, tdt++) {
- if(tdt->mode == transDataTracking_ModeTracks) {
- if(t->flag&T_ALT_TRANSFORM) {
- if(tdt->area==TRACK_AREA_POINT && tdt->relative) {
+ for (a=0, td= t->data, td2d= t->data2d, tdt= t->customData; a<t->total; a++, td2d++, td++, tdt++) {
+ if (tdt->mode == transDataTracking_ModeTracks) {
+ if (t->flag&T_ALT_TRANSFORM) {
+ if (tdt->area==TRACK_AREA_POINT && tdt->relative) {
float d[2], d2[2];
- if(!tdt->smarkers) {
+ if (!tdt->smarkers) {
tdt->smarkers= MEM_callocN(sizeof(*tdt->smarkers)*tdt->markersnr, "flushTransTracking markers");
- for(a= 0; a<tdt->markersnr; a++)
+ for (a= 0; a<tdt->markersnr; a++)
copy_v2_v2(tdt->smarkers[a], tdt->markers[a].pos);
}
@@ -5822,22 +5832,22 @@ void flushTransTracking(TransInfo *t)
sub_v2_v2v2(d2, td2d->loc, tdt->srelative);
- for(a= 0; a<tdt->markersnr; a++)
+ for (a= 0; a<tdt->markersnr; a++)
add_v2_v2v2(tdt->markers[a].pos, tdt->smarkers[a], d2);
negate_v2_v2(td2d->loc2d, d);
}
}
- if(tdt->area!=TRACK_AREA_POINT || tdt->relative==0) {
+ if (tdt->area!=TRACK_AREA_POINT || tdt->relative==0) {
td2d->loc2d[0] = td2d->loc[0];
td2d->loc2d[1] = td2d->loc[1];
- if(tdt->relative)
+ if (tdt->relative)
sub_v2_v2(td2d->loc2d, tdt->relative);
}
}
- else if(tdt->mode == transDataTracking_ModeCurves) {
+ else if (tdt->mode == transDataTracking_ModeCurves) {
td2d->loc2d[tdt->coord] = tdt->prev_pos[tdt->coord] + td2d->loc[1] * tdt->scale;
}
}
@@ -5856,7 +5866,7 @@ void createTransData(bContext *C, TransInfo *t)
t->ext = NULL;
t->flag |= T_EDIT;
createTransEdge(t);
- if(t->data && t->flag & T_PROP_EDIT) {
+ if (t->data && t->flag & T_PROP_EDIT) {
sort_trans_data(t); // makes selected become first in array
set_prop_dist(t, 1);
sort_trans_data_dist(t);
@@ -5869,7 +5879,7 @@ void createTransData(bContext *C, TransInfo *t)
else if (t->spacetype == SPACE_IMAGE) {
t->flag |= T_POINTS|T_2D_EDIT;
createTransUVs(C, t);
- if(t->data && (t->flag & T_PROP_EDIT)) {
+ if (t->data && (t->flag & T_PROP_EDIT)) {
sort_trans_data(t); // makes selected become first in array
set_prop_dist(t, 1);
sort_trans_data_dist(t);
@@ -5899,7 +5909,7 @@ void createTransData(bContext *C, TransInfo *t)
}
#endif
}
- else if(t->spacetype == SPACE_NODE) {
+ else if (t->spacetype == SPACE_NODE) {
t->flag |= T_2D_EDIT|T_POINTS;
createTransNodeData(C, t);
if (t->data && (t->flag & T_PROP_EDIT)) {
@@ -5936,7 +5946,7 @@ void createTransData(bContext *C, TransInfo *t)
t->flag |= T_EDIT|T_POINTS;
- if(t->data && t->flag & T_PROP_EDIT) {
+ if (t->data && t->flag & T_PROP_EDIT) {
if (ELEM(t->obedit->type, OB_CURVE, OB_MESH)) {
sort_trans_data(t); // makes selected become first in array
set_prop_dist(t, 0);
@@ -5950,7 +5960,7 @@ void createTransData(bContext *C, TransInfo *t)
}
/* exception... hackish, we want bonesize to use bone orientation matrix (ton) */
- if(t->mode==TFM_BONESIZE) {
+ if (t->mode==TFM_BONESIZE) {
t->flag &= ~(T_EDIT|T_POINTS);
t->flag |= T_POSE;
t->poseobj = ob; /* <- tsk tsk, this is going to give issues one day */
@@ -5965,11 +5975,11 @@ void createTransData(bContext *C, TransInfo *t)
/* important that ob_armature can be set even when its not selected [#23412]
* lines below just check is also visible */
Object *ob_armature= modifiers_isDeformedByArmature(ob);
- if(ob_armature && ob_armature->mode & OB_MODE_POSE) {
+ if (ob_armature && ob_armature->mode & OB_MODE_POSE) {
Base *base_arm= object_in_scene(ob_armature, t->scene);
- if(base_arm) {
+ if (base_arm) {
View3D *v3d = t->view;
- if(BASE_VISIBLE(v3d, base_arm)) {
+ if (BASE_VISIBLE(v3d, base_arm)) {
createTransPose(t, ob_armature);
}
}
@@ -5981,7 +5991,7 @@ void createTransData(bContext *C, TransInfo *t)
createTransParticleVerts(C, t);
t->flag |= T_POINTS;
- if(t->data && t->flag & T_PROP_EDIT) {
+ if (t->data && t->flag & T_PROP_EDIT) {
sort_trans_data(t); // makes selected become first in array
set_prop_dist(t, 1);
sort_trans_data_dist(t);
@@ -5992,13 +6002,13 @@ void createTransData(bContext *C, TransInfo *t)
* transform ops redo clears sculpt/project undo stack.
*
* Could use 'OB_MODE_ALL_PAINT' since there are key conflicts,
- * transform + paint isnt well supported. */
+ * transform + paint isn't well supported. */
}
else {
createTransObject(C, t);
t->flag |= T_OBJECT;
- if(t->data && t->flag & T_PROP_EDIT) {
+ if (t->data && t->flag & T_PROP_EDIT) {
// selected objects are already first, no need to presort
set_prop_dist(t, 1);
sort_trans_data_dist(t);
@@ -6008,7 +6018,7 @@ void createTransData(bContext *C, TransInfo *t)
{
View3D *v3d = t->view;
RegionView3D *rv3d = CTX_wm_region_view3d(C);
- if(rv3d && (t->flag & T_OBJECT) && v3d->camera == OBACT && rv3d->persp==RV3D_CAMOB)
+ if (rv3d && (t->flag & T_OBJECT) && v3d->camera == OBACT && rv3d->persp==RV3D_CAMOB)
{
t->flag |= T_CAMERA;
}
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index d24081ae472..8e22ccd943d 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -50,6 +50,11 @@
#include "DNA_modifier_types.h"
#include "DNA_movieclip_types.h"
+#include "BLI_math.h"
+#include "BLI_blenlib.h"
+#include "BLI_rand.h"
+#include "BLI_utildefines.h"
+
#include "RNA_access.h"
//#include "BIF_screen.h"
@@ -91,11 +96,6 @@
//#include "BDR_unwrapper.h"
-#include "BLI_math.h"
-#include "BLI_blenlib.h"
-#include "BLI_rand.h"
-#include "BLI_utildefines.h"
-
#include "WM_types.h"
#include "WM_api.h"
@@ -107,8 +107,6 @@
#include "transform.h"
-extern ListBase editelems;
-
/* ************************** Functions *************************** */
void getViewVector(TransInfo *t, float coord[3], float vec[3])
@@ -149,17 +147,17 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
if ((md->type==eModifierType_Mirror) && (md->mode & eModifierMode_Realtime)) {
MirrorModifierData *mmd = (MirrorModifierData*) md;
- if(mmd->flag & MOD_MIR_CLIPPING) {
+ if (mmd->flag & MOD_MIR_CLIPPING) {
axis = 0;
- if(mmd->flag & MOD_MIR_AXIS_X) {
+ if (mmd->flag & MOD_MIR_AXIS_X) {
axis |= 1;
tolerance[0] = mmd->tolerance;
}
- if(mmd->flag & MOD_MIR_AXIS_Y) {
+ if (mmd->flag & MOD_MIR_AXIS_Y) {
axis |= 2;
tolerance[1] = mmd->tolerance;
}
- if(mmd->flag & MOD_MIR_AXIS_Z) {
+ if (mmd->flag & MOD_MIR_AXIS_Z) {
axis |= 4;
tolerance[2] = mmd->tolerance;
}
@@ -176,7 +174,7 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
invert_m4_m4(imtx, mtx);
}
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
int clip;
float loc[3], iloc[3];
@@ -197,8 +195,8 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
}
clip = 0;
- if(axis & 1) {
- if(fabsf(iloc[0])<=tolerance[0] ||
+ if (axis & 1) {
+ if (fabsf(iloc[0])<=tolerance[0] ||
loc[0]*iloc[0]<0.0f)
{
loc[0]= 0.0f;
@@ -206,16 +204,16 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
}
}
- if(axis & 2) {
- if(fabs(iloc[1])<=tolerance[1] ||
+ if (axis & 2) {
+ if (fabs(iloc[1])<=tolerance[1] ||
loc[1]*iloc[1]<0.0f)
{
loc[1]= 0.0f;
clip = 1;
}
}
- if(axis & 4) {
- if(fabs(iloc[2])<=tolerance[2] ||
+ if (axis & 4) {
+ if (fabs(iloc[2])<=tolerance[2] ||
loc[2]*iloc[2]<0.0f)
{
loc[2]= 0.0f;
@@ -243,7 +241,7 @@ static void editbmesh_apply_to_mirror(TransInfo *t)
BMVert *eve;
int i;
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_NOACTION)
break;
if (td->loc==NULL)
@@ -629,7 +627,7 @@ static void recalcData_image(TransInfo *t)
SpaceImage *sima= t->sa->spacedata.first;
flushTransUVs(t);
- if(sima->flag & SI_LIVE_UNWRAP)
+ if (sima->flag & SI_LIVE_UNWRAP)
ED_uvedit_live_unwrap_re_solve();
DAG_id_tag_update(t->obedit->data, 0);
@@ -647,18 +645,18 @@ static void recalcData_clip(TransInfo *t)
flushTransTracking(t);
track= tracksbase->first;
- while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) {
+ while (track) {
+ if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) {
if (t->mode == TFM_TRANSLATION) {
- if(TRACK_AREA_SELECTED(track, TRACK_AREA_PAT))
+ if (TRACK_AREA_SELECTED(track, TRACK_AREA_PAT))
BKE_tracking_clamp_track(track, CLAMP_PAT_POS);
- if(TRACK_AREA_SELECTED(track, TRACK_AREA_SEARCH))
+ if (TRACK_AREA_SELECTED(track, TRACK_AREA_SEARCH))
BKE_tracking_clamp_track(track, CLAMP_SEARCH_POS);
}
else if (t->mode == TFM_RESIZE) {
- if(TRACK_AREA_SELECTED(track, TRACK_AREA_PAT))
+ if (TRACK_AREA_SELECTED(track, TRACK_AREA_PAT))
BKE_tracking_clamp_track(track, CLAMP_PAT_DIM);
- if(TRACK_AREA_SELECTED(track, TRACK_AREA_SEARCH))
+ if (TRACK_AREA_SELECTED(track, TRACK_AREA_SEARCH))
BKE_tracking_clamp_track(track, CLAMP_SEARCH_DIM);
}
}
@@ -680,7 +678,7 @@ static void recalcData_view3d(TransInfo *t)
ListBase *nurbs= curve_editnurbs(cu);
Nurb *nu= nurbs->first;
- if(t->state != TRANS_CANCEL) {
+ if (t->state != TRANS_CANCEL) {
clipMirrorModifier(t, t->obedit);
applyProject(t);
}
@@ -688,40 +686,40 @@ static void recalcData_view3d(TransInfo *t)
DAG_id_tag_update(t->obedit->data, 0); /* sets recalc flags */
if (t->state == TRANS_CANCEL) {
- while(nu) {
+ while (nu) {
calchandlesNurb(nu); /* Cant do testhandlesNurb here, it messes up the h1 and h2 flags */
nu= nu->next;
}
}
else {
/* Normal updating */
- while(nu) {
+ while (nu) {
test2DNurb(nu);
calchandlesNurb(nu);
nu= nu->next;
}
}
}
- else if(t->obedit->type==OB_LATTICE) {
+ else if (t->obedit->type==OB_LATTICE) {
Lattice *la= t->obedit->data;
- if(t->state != TRANS_CANCEL) {
+ if (t->state != TRANS_CANCEL) {
applyProject(t);
}
DAG_id_tag_update(t->obedit->data, 0); /* sets recalc flags */
- if(la->editlatt->latt->flag & LT_OUTSIDE) outside_lattice(la->editlatt->latt);
+ if (la->editlatt->latt->flag & LT_OUTSIDE) outside_lattice(la->editlatt->latt);
}
else if (t->obedit->type == OB_MESH) {
BMEditMesh *em = BMEdit_FromObject(t->obedit);
/* mirror modifier clipping? */
- if(t->state != TRANS_CANCEL) {
+ if (t->state != TRANS_CANCEL) {
/* apply clipping after so we never project past the clip plane [#25423] */
applyProject(t);
clipMirrorModifier(t, t->obedit);
}
- if((t->options & CTX_NO_MIRROR) == 0 && (t->flag & T_MIRROR))
+ if ((t->options & CTX_NO_MIRROR) == 0 && (t->flag & T_MIRROR))
editbmesh_apply_to_mirror(t);
DAG_id_tag_update(t->obedit->data, 0); /* sets recalc flags */
@@ -729,14 +727,14 @@ static void recalcData_view3d(TransInfo *t)
EDBM_RecalcNormals(em);
BMEdit_RecalcTessellation(em);
}
- else if(t->obedit->type==OB_ARMATURE) { /* no recalc flag, does pose */
+ else if (t->obedit->type==OB_ARMATURE) { /* no recalc flag, does pose */
bArmature *arm= t->obedit->data;
ListBase *edbo = arm->edbo;
EditBone *ebo;
TransData *td = t->data;
int i;
- if(t->state != TRANS_CANCEL) {
+ if (t->state != TRANS_CANCEL) {
applyProject(t);
}
@@ -747,27 +745,27 @@ static void recalcData_view3d(TransInfo *t)
/* If this bone has a parent tip that has been moved */
if (ebo->parent->flag & BONE_TIPSEL) {
copy_v3_v3 (ebo->head, ebo->parent->tail);
- if(t->mode==TFM_BONE_ENVELOPE) ebo->rad_head= ebo->parent->rad_tail;
+ if (t->mode==TFM_BONE_ENVELOPE) ebo->rad_head= ebo->parent->rad_tail;
}
/* If this bone has a parent tip that has NOT been moved */
- else{
+ else {
copy_v3_v3 (ebo->parent->tail, ebo->head);
- if(t->mode==TFM_BONE_ENVELOPE) ebo->parent->rad_tail= ebo->rad_head;
+ if (t->mode==TFM_BONE_ENVELOPE) ebo->parent->rad_tail= ebo->rad_head;
}
}
/* on extrude bones, oldlength==0.0f, so we scale radius of points */
ebo->length= len_v3v3(ebo->head, ebo->tail);
- if(ebo->oldlength==0.0f) {
+ if (ebo->oldlength==0.0f) {
ebo->rad_head= 0.25f*ebo->length;
ebo->rad_tail= 0.10f*ebo->length;
ebo->dist= 0.25f*ebo->length;
- if(ebo->parent) {
- if(ebo->rad_head > ebo->parent->rad_tail)
+ if (ebo->parent) {
+ if (ebo->rad_head > ebo->parent->rad_tail)
ebo->rad_head= ebo->parent->rad_tail;
}
}
- else if(t->mode!=TFM_BONE_ENVELOPE) {
+ else if (t->mode!=TFM_BONE_ENVELOPE) {
/* if bones change length, lets do that for the deform distance as well */
ebo->dist*= ebo->length/ebo->oldlength;
ebo->rad_head*= ebo->length/ebo->oldlength;
@@ -780,7 +778,7 @@ static void recalcData_view3d(TransInfo *t)
if (t->mode != TFM_BONE_ROLL)
{
/* fix roll */
- for(i = 0; i < t->total; i++, td++)
+ for (i = 0; i < t->total; i++, td++)
{
if (td->extra)
{
@@ -806,18 +804,18 @@ static void recalcData_view3d(TransInfo *t)
}
}
- if(arm->flag & ARM_MIRROR_EDIT)
+ if (arm->flag & ARM_MIRROR_EDIT)
transform_armature_mirror_update(t->obedit);
}
else {
- if(t->state != TRANS_CANCEL) {
+ if (t->state != TRANS_CANCEL) {
applyProject(t);
}
DAG_id_tag_update(t->obedit->data, 0); /* sets recalc flags */
}
}
- else if( (t->flag & T_POSE) && t->poseobj) {
+ else if ( (t->flag & T_POSE) && t->poseobj) {
Object *ob= t->poseobj;
bArmature *arm= ob->data;
@@ -842,8 +840,8 @@ static void recalcData_view3d(TransInfo *t)
else
where_is_pose(t->scene, ob);
}
- else if(base && (base->object->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(t->scene, base->object)) {
- if(t->state != TRANS_CANCEL) {
+ else if (base && (base->object->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(t->scene, base->object)) {
+ if (t->state != TRANS_CANCEL) {
applyProject(t);
}
flushTransParticles(t);
@@ -851,7 +849,7 @@ static void recalcData_view3d(TransInfo *t)
else {
int i;
- if(t->state != TRANS_CANCEL) {
+ if (t->state != TRANS_CANCEL) {
applyProject(t);
}
@@ -967,8 +965,8 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
/* moving: is shown in drawobject() (transform color) */
// TRANSFORM_FIX_ME
-// if(obedit || (t->flag & T_POSE) ) G.moving= G_TRANSFORM_EDIT;
-// else if(G.f & G_PARTICLEEDIT) G.moving= G_TRANSFORM_PARTICLE;
+// if (obedit || (t->flag & T_POSE) ) G.moving= G_TRANSFORM_EDIT;
+// else if (G.f & G_PARTICLEEDIT) G.moving= G_TRANSFORM_PARTICLE;
// else G.moving= G_TRANSFORM_OBJ;
t->scene = sce;
@@ -1031,7 +1029,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
/* Assign the space type, some exceptions for running in different mode */
- if(sa == NULL) {
+ if (sa == NULL) {
/* background mode */
t->spacetype= SPACE_EMPTY;
}
@@ -1045,7 +1043,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
- if(t->spacetype == SPACE_VIEW3D)
+ if (t->spacetype == SPACE_VIEW3D)
{
View3D *v3d = sa->spacedata.first;
@@ -1059,7 +1057,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
v3d->twtype = 0;
}
- if(v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN;
+ if (v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN;
t->around = v3d->around;
if (op && RNA_struct_find_property(op->ptr, "constraint_orientation") && RNA_struct_property_is_set(op->ptr, "constraint_orientation"))
@@ -1076,16 +1074,16 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
/* exceptional case */
- if(t->around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) {
- if(ELEM3(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL)) {
+ if (t->around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) {
+ if (ELEM3(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL)) {
t->options |= CTX_NO_PET;
}
}
/* initialize UV transform from */
if (op && RNA_struct_find_property(op->ptr, "correct_uv")) {
- if(RNA_struct_property_is_set(op->ptr, "correct_uv")) {
- if(RNA_boolean_get(op->ptr, "correct_uv")) {
+ if (RNA_struct_property_is_set(op->ptr, "correct_uv")) {
+ if (RNA_boolean_get(op->ptr, "correct_uv")) {
t->settings->uvcalc_flag |= UVCALC_TRANSFORM_CORRECT;
}
else {
@@ -1098,24 +1096,24 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
}
- else if(t->spacetype==SPACE_IMAGE) {
+ else if (t->spacetype==SPACE_IMAGE) {
SpaceImage *sima = sa->spacedata.first;
// XXX for now, get View2D from the active region
t->view = &ar->v2d;
t->around = sima->around;
}
- else if(t->spacetype==SPACE_NODE) {
+ else if (t->spacetype==SPACE_NODE) {
// XXX for now, get View2D from the active region
t->view = &ar->v2d;
t->around = V3D_CENTER;
}
- else if(t->spacetype==SPACE_IPO) {
+ else if (t->spacetype==SPACE_IPO) {
SpaceIpo *sipo= sa->spacedata.first;
t->view = &ar->v2d;
t->around = sipo->around;
}
else {
- if(ar) {
+ if (ar) {
// XXX for now, get View2D from the active region
t->view = &ar->v2d;
// XXX for now, the center point is the midpoint of the data
@@ -1247,7 +1245,7 @@ void postTrans (bContext *C, TransInfo *t)
/* Can take over freeing t->data and data2d etc... */
t->customFree(t);
}
- else if (t->customData) {
+ else if ((t->customData != NULL) && (t->flag & T_FREE_CUSTOMDATA)) {
MEM_freeN(t->customData);
}
@@ -1256,7 +1254,7 @@ void postTrans (bContext *C, TransInfo *t)
int a;
/* free data malloced per trans-data */
- for(a=0, td= t->data; a<t->total; a++, td++) {
+ for (a=0, td= t->data; a<t->total; a++, td++) {
if (td->flag & TD_BEZTRIPLE)
MEM_freeN(td->hdata);
}
@@ -1271,12 +1269,12 @@ void postTrans (bContext *C, TransInfo *t)
t->data2d= NULL;
}
- if(t->spacetype==SPACE_IMAGE) {
+ if (t->spacetype==SPACE_IMAGE) {
SpaceImage *sima= t->sa->spacedata.first;
- if(sima->flag & SI_LIVE_UNWRAP)
+ if (sima->flag & SI_LIVE_UNWRAP)
ED_uvedit_live_unwrap_end(t->state == TRANS_CANCEL);
}
- else if(t->spacetype==SPACE_VIEW3D) {
+ else if (t->spacetype==SPACE_VIEW3D) {
View3D *v3d = t->sa->spacedata.first;
/* restore manipulator */
if (t->flag & T_MODAL) {
@@ -1320,10 +1318,10 @@ static void restoreElement(TransData *td)
if (td->ext->rot) {
copy_v3_v3(td->ext->rot, td->ext->irot);
}
- if(td->ext->rotAngle) {
+ if (td->ext->rotAngle) {
*td->ext->rotAngle= td->ext->irotAngle;
}
- if(td->ext->rotAxis) {
+ if (td->ext->rotAxis) {
copy_v3_v3(td->ext->rotAxis, td->ext->irotAxis);
}
/* XXX, drotAngle & drotAxis not used yet */
@@ -1407,7 +1405,7 @@ void calculateCenterCursor2D(TransInfo *t)
float aspx=1.0, aspy=1.0;
float *cursor= NULL;
- if(t->spacetype==SPACE_IMAGE) {
+ if (t->spacetype==SPACE_IMAGE) {
SpaceImage *sima= (SpaceImage *)t->sa->spacedata.first;
/* only space supported right now but may change */
ED_space_image_uv_aspect(sima, &aspx, &aspy);
@@ -1440,7 +1438,7 @@ void calculateCenterMedian(TransInfo *t)
int total = 0;
int i;
- for(i = 0; i < t->total; i++) {
+ for (i = 0; i < t->total; i++) {
if (t->data[i].flag & TD_SELECTED) {
if (!(t->data[i].flag & TD_NOCENTER))
{
@@ -1456,7 +1454,7 @@ void calculateCenterMedian(TransInfo *t)
break;
}
}
- if(i)
+ if (i)
mul_v3_fl(partial, 1.0f / total);
copy_v3_v3(t->center, partial);
@@ -1468,7 +1466,7 @@ void calculateCenterBound(TransInfo *t)
float max[3];
float min[3];
int i;
- for(i = 0; i < t->total; i++) {
+ for (i = 0; i < t->total; i++) {
if (i) {
if (t->data[i].flag & TD_SELECTED) {
if (!(t->data[i].flag & TD_NOCENTER))
@@ -1503,9 +1501,9 @@ void calculateCenter(TransInfo *t)
calculateCenterMedian(t);
break;
case V3D_CURSOR:
- if(t->spacetype==SPACE_IMAGE)
+ if (t->spacetype==SPACE_IMAGE)
calculateCenterCursor2D(t);
- else if(t->spacetype==SPACE_IPO)
+ else if (t->spacetype==SPACE_IPO)
calculateCenterCursorGraph2D(t);
else
calculateCenterCursor(t);
@@ -1544,7 +1542,7 @@ void calculateCenter(TransInfo *t)
} /* END EDIT MODE ACTIVE ELEMENT */
calculateCenterMedian(t);
- if((t->flag & (T_EDIT|T_POSE))==0)
+ if ((t->flag & (T_EDIT|T_POSE))==0)
{
Scene *scene = t->scene;
Object *ob= OBACT;
@@ -1585,7 +1583,7 @@ void calculateCenter(TransInfo *t)
projectIntView(t, axis, t->center2d);
/* rotate only needs correct 2d center, grab needs initgrabz() value */
- if(t->mode==TFM_TRANSLATION)
+ if (t->mode==TFM_TRANSLATION)
{
copy_v3_v3(t->center, axis);
copy_v3_v3(t->con.center, t->center);
@@ -1596,7 +1594,7 @@ void calculateCenter(TransInfo *t)
if (t->spacetype==SPACE_VIEW3D) {
/* initgrabz() defines a factor for perspective depth correction, used in window_to_3d_delta() */
- if(t->flag & (T_EDIT|T_POSE)) {
+ if (t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
float vec[3];
@@ -1618,7 +1616,7 @@ void calculatePropRatio(TransInfo *t)
short connected = t->flag & T_PROP_CONNECTED;
if (t->flag & T_PROP_EDIT) {
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
if (td->flag & TD_SELECTED) {
td->factor = 1.0f;
}
@@ -1712,7 +1710,7 @@ void calculatePropRatio(TransInfo *t)
}
}
else {
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
td->factor = 1.0;
}
t->proptext[0]= '\0';
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c
index 3faddeb6639..bd3fb20f77f 100644
--- a/source/blender/editors/transform/transform_input.c
+++ b/source/blender/editors/transform/transform_input.c
@@ -236,7 +236,7 @@ static void InputAngle(TransInfo *UNUSED(t), MouseInput *mi, const int mval[2],
float dphi;
dphi = saacos((float)deler);
- if( (dx1*dy2-dx2*dy1)>0.0 ) dphi= -dphi;
+ if ( (dx1*dy2-dx2*dy1)>0.0 ) dphi= -dphi;
/* If the angle is zero, because of lack of precision close to the 1.0 value in acos
* approximate the angle with the opposite side of the normalized triangle
@@ -256,7 +256,7 @@ static void InputAngle(TransInfo *UNUSED(t), MouseInput *mi, const int mval[2],
dy = dy1 - dy2;
dphi = sqrt(dx*dx + dy*dy);
- if( (dx1*dy2-dx2*dy1)>0.0 ) dphi= -dphi;
+ if ( (dx1*dy2-dx2*dy1)>0.0 ) dphi= -dphi;
}
if (mi->precision) {
@@ -307,7 +307,7 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode)
/* TODO, holding R-key can cause mem leak, but this causes [#28903]
* disable for now. */
#if 0
- if(mi->data) {
+ if (mi->data) {
MEM_freeN(mi->data);
mi->data= NULL;
}
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 9188d048154..eb1d8e1df5c 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -52,6 +52,9 @@
#include "DNA_scene_types.h"
#include "DNA_view3d_types.h"
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
+
#include "RNA_access.h"
#include "BKE_action.h"
@@ -63,9 +66,6 @@
#include "BKE_pointcache.h"
#include "BKE_tessmesh.h"
-#include "BLI_math.h"
-#include "BLI_utildefines.h"
-
#include "BIF_gl.h"
#include "WM_api.h"
@@ -120,25 +120,25 @@ static void calc_tw_center(Scene *scene, float *co)
static void protectflag_to_drawflags(short protectflag, short *drawflags)
{
- if(protectflag & OB_LOCK_LOCX)
+ if (protectflag & OB_LOCK_LOCX)
*drawflags &= ~MAN_TRANS_X;
- if(protectflag & OB_LOCK_LOCY)
+ if (protectflag & OB_LOCK_LOCY)
*drawflags &= ~MAN_TRANS_Y;
- if(protectflag & OB_LOCK_LOCZ)
+ if (protectflag & OB_LOCK_LOCZ)
*drawflags &= ~MAN_TRANS_Z;
- if(protectflag & OB_LOCK_ROTX)
+ if (protectflag & OB_LOCK_ROTX)
*drawflags &= ~MAN_ROT_X;
- if(protectflag & OB_LOCK_ROTY)
+ if (protectflag & OB_LOCK_ROTY)
*drawflags &= ~MAN_ROT_Y;
- if(protectflag & OB_LOCK_ROTZ)
+ if (protectflag & OB_LOCK_ROTZ)
*drawflags &= ~MAN_ROT_Z;
- if(protectflag & OB_LOCK_SCALEX)
+ if (protectflag & OB_LOCK_SCALEX)
*drawflags &= ~MAN_SCALE_X;
- if(protectflag & OB_LOCK_SCALEY)
+ if (protectflag & OB_LOCK_SCALEY)
*drawflags &= ~MAN_SCALE_Y;
- if(protectflag & OB_LOCK_SCALEZ)
+ if (protectflag & OB_LOCK_SCALEZ)
*drawflags &= ~MAN_SCALE_Z;
}
@@ -147,7 +147,7 @@ static void stats_pose(Scene *scene, RegionView3D *rv3d, bPoseChannel *pchan)
{
Bone *bone= pchan->bone;
- if(bone) {
+ if (bone) {
if (bone->flag & BONE_TRANSFORM) {
calc_tw_center(scene, pchan->pose_head);
protectflag_to_drawflags(pchan->protectflag, &rv3d->twdrawflag);
@@ -205,9 +205,9 @@ int gimbal_axis(Object *ob, float gmat[][3])
if (ob->mode & OB_MODE_POSE) {
bPoseChannel *pchan= get_active_posechannel(ob);
- if(pchan) {
+ if (pchan) {
float mat[3][3], tmat[3][3], obmat[3][3];
- if(test_rotmode_euler(pchan->rotmode)) {
+ if (test_rotmode_euler(pchan->rotmode)) {
eulO_to_gimbal_axis(mat, pchan->eul, pchan->rotmode);
}
else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
@@ -242,10 +242,10 @@ int gimbal_axis(Object *ob, float gmat[][3])
}
}
else {
- if(test_rotmode_euler(ob->rotmode)) {
+ if (test_rotmode_euler(ob->rotmode)) {
eulO_to_gimbal_axis(gmat, ob->rot, ob->rotmode);
}
- else if(ob->rotmode == ROT_MODE_AXISANGLE) {
+ else if (ob->rotmode == ROT_MODE_AXISANGLE) {
axis_angle_to_gimbal_axis(gmat, ob->rotAxis, ob->rotAngle);
}
else { /* quat */
@@ -287,14 +287,14 @@ int calc_manipulator_stats(const bContext *C)
rv3d->twdrawflag= 0xFFFF;
/* transform widget centroid/center */
- scene->twcent[0]= scene->twcent[1]= scene->twcent[2]= 0.0f;
INIT_MINMAX(scene->twmin, scene->twmax);
+ zero_v3(scene->twcent);
- if(obedit) {
+ if (obedit) {
ob= obedit;
- if((ob->lay & v3d->lay)==0) return 0;
+ if ((ob->lay & v3d->lay)==0) return 0;
- if(obedit->type==OB_MESH) {
+ if (obedit->type==OB_MESH) {
BMEditMesh *em = BMEdit_FromObject(obedit);
BMEditSelection ese;
float vec[3]= {0,0,0};
@@ -314,24 +314,24 @@ int calc_manipulator_stats(const bContext *C)
/* do vertices/edges/faces for center depending on selection
* mode. note we can't use just vertex selection flag because
* it is not flush down on changes */
- if(ts->selectmode & SCE_SELECT_VERTEX) {
+ if (ts->selectmode & SCE_SELECT_VERTEX) {
BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
- if(!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
- if(BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
+ if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
+ if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
totsel++;
calc_tw_center(scene, eve->co);
}
}
}
}
- else if(ts->selectmode & SCE_SELECT_EDGE) {
+ else if (ts->selectmode & SCE_SELECT_EDGE) {
BMIter itersub;
BMEdge *eed;
BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
- if(!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
+ if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
/* check the vertex has a selected edge, only add it once */
BM_ITER(eed, &itersub, bm, BM_EDGES_OF_VERT, eve) {
- if(BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
+ if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
totsel++;
calc_tw_center(scene, eve->co);
break;
@@ -344,10 +344,10 @@ int calc_manipulator_stats(const bContext *C)
BMIter itersub;
BMFace *efa;
BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
- if(!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
+ if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
/* check the vertex has a selected face, only add it once */
BM_ITER(efa, &itersub, bm, BM_FACES_OF_VERT, eve) {
- if(BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
+ if (BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
totsel++;
calc_tw_center(scene, eve->co);
break;
@@ -362,7 +362,7 @@ int calc_manipulator_stats(const bContext *C)
bArmature *arm= obedit->data;
EditBone *ebo;
for (ebo= arm->edbo->first; ebo; ebo=ebo->next) {
- if(EBONE_VISIBLE(arm, ebo)) {
+ if (EBONE_VISIBLE(arm, ebo)) {
if (ebo->flag & BONE_TIPSEL) {
calc_tw_center(scene, ebo->tail);
totsel++;
@@ -392,11 +392,11 @@ int calc_manipulator_stats(const bContext *C)
ListBase *nurbs= curve_editnurbs(cu);
nu= nurbs->first;
- while(nu) {
- if(nu->type == CU_BEZIER) {
+ while (nu) {
+ if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--) {
+ while (a--) {
/* exceptions
* if handles are hidden then only check the center points.
* If the center knot is selected then only use this as the center point.
@@ -412,11 +412,11 @@ int calc_manipulator_stats(const bContext *C)
totsel++;
}
else {
- if(bezt->f1) {
+ if (bezt->f1) {
calc_tw_center(scene, bezt->vec[0]);
totsel++;
}
- if(bezt->f3) {
+ if (bezt->f3) {
calc_tw_center(scene, bezt->vec[2]);
totsel++;
}
@@ -427,8 +427,8 @@ int calc_manipulator_stats(const bContext *C)
else {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
- while(a--) {
- if(bp->f1 & SELECT) {
+ while (a--) {
+ if (bp->f1 & SELECT) {
calc_tw_center(scene, bp->vec);
totsel++;
}
@@ -439,13 +439,13 @@ int calc_manipulator_stats(const bContext *C)
}
}
}
- else if(obedit->type==OB_MBALL) {
+ else if (obedit->type==OB_MBALL) {
MetaBall *mb = (MetaBall*)obedit->data;
MetaElem *ml /* , *ml_sel=NULL */ /* UNUSED */;
ml= mb->editelems->first;
- while(ml) {
- if(ml->flag & SELECT) {
+ while (ml) {
+ if (ml->flag & SELECT) {
calc_tw_center(scene, &ml->x);
/* ml_sel = ml; */ /* UNUSED */
totsel++;
@@ -453,15 +453,15 @@ int calc_manipulator_stats(const bContext *C)
ml= ml->next;
}
}
- else if(obedit->type==OB_LATTICE) {
+ else if (obedit->type==OB_LATTICE) {
BPoint *bp;
Lattice *lt= obedit->data;
bp= lt->editlatt->latt->def;
a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw;
- while(a--) {
- if(bp->f1 & SELECT) {
+ while (a--) {
+ if (bp->f1 & SELECT) {
calc_tw_center(scene, bp->vec);
totsel++;
}
@@ -470,24 +470,24 @@ int calc_manipulator_stats(const bContext *C)
}
/* selection center */
- if(totsel) {
+ if (totsel) {
mul_v3_fl(scene->twcent, 1.0f/(float)totsel); // centroid!
mul_m4_v3(obedit->obmat, scene->twcent);
mul_m4_v3(obedit->obmat, scene->twmin);
mul_m4_v3(obedit->obmat, scene->twmax);
}
}
- else if(ob && (ob->mode & OB_MODE_POSE)) {
+ 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
- if((ob->lay & v3d->lay)==0) return 0;
+ if ((ob->lay & v3d->lay)==0) return 0;
totsel = count_set_pose_transflags(&mode, 0, ob);
- if(totsel) {
+ if (totsel) {
/* use channels to get stats */
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
stats_pose(scene, rv3d, pchan);
}
@@ -497,22 +497,22 @@ int calc_manipulator_stats(const bContext *C)
mul_m4_v3(ob->obmat, scene->twmax);
}
}
- else if(ob && (ob->mode & OB_MODE_ALL_PAINT)) {
+ else if (ob && (ob->mode & OB_MODE_ALL_PAINT)) {
;
}
- else if(ob && ob->mode & OB_MODE_PARTICLE_EDIT) {
+ else if (ob && ob->mode & OB_MODE_PARTICLE_EDIT) {
PTCacheEdit *edit= PE_get_current(scene, ob);
PTCacheEditPoint *point;
PTCacheEditKey *ek;
int k;
- if(edit) {
+ if (edit) {
point = edit->points;
- for(a=0; a<edit->totpoint; a++,point++) {
- if(point->flag & PEP_HIDE) continue;
+ for (a=0; a<edit->totpoint; a++,point++) {
+ if (point->flag & PEP_HIDE) continue;
- for(k=0, ek=point->keys; k<point->totkey; k++, ek++) {
- if(ek->flag & PEK_SELECT) {
+ for (k=0, ek=point->keys; k<point->totkey; k++, ek++) {
+ if (ek->flag & PEK_SELECT) {
calc_tw_center(scene, ek->flag & PEK_USE_WCO ? ek->world_co : ek->co);
totsel++;
}
@@ -520,7 +520,7 @@ int calc_manipulator_stats(const bContext *C)
}
/* selection center */
- if(totsel)
+ if (totsel)
mul_v3_fl(scene->twcent, 1.0f/(float)totsel); // centroid!
}
}
@@ -528,11 +528,11 @@ int calc_manipulator_stats(const bContext *C)
/* we need the one selected object, if its not active */
ob= OBACT;
- if(ob && !(ob->flag & SELECT)) ob= NULL;
+ if (ob && !(ob->flag & SELECT)) ob= NULL;
- for(base= scene->base.first; base; base= base->next) {
+ for (base= scene->base.first; base; base= base->next) {
if TESTBASELIB(v3d, base) {
- if(ob==NULL)
+ if (ob==NULL)
ob= base->object;
calc_tw_center(scene, base->object->obmat[3]);
protectflag_to_drawflags(base->object->protectflag, &rv3d->twdrawflag);
@@ -541,13 +541,13 @@ int calc_manipulator_stats(const bContext *C)
}
/* selection center */
- if(totsel) {
+ if (totsel) {
mul_v3_fl(scene->twcent, 1.0f/(float)totsel); // centroid!
}
}
/* global, local or normal orientation? */
- if(ob && totsel) {
+ if (ob && totsel) {
switch(v3d->twmode) {
@@ -564,7 +564,7 @@ int calc_manipulator_stats(const bContext *C)
/* if not gimbal, fall through to normal */
}
case V3D_MANIP_NORMAL:
- if(obedit || ob->mode & OB_MODE_POSE) {
+ if (obedit || ob->mode & OB_MODE_POSE) {
float mat[3][3];
ED_getTransformOrientationMatrix(C, mat, (v3d->around == V3D_ACTIVE));
copy_m4_m3(rv3d->twmat, mat);
@@ -664,7 +664,7 @@ static void partial_doughnut(float radring, float radhole, int start, int end, i
float ring_delta, side_delta;
int i, j, docaps= 1;
- if(start==0 && end==nrings) docaps= 0;
+ if (start==0 && end==nrings) docaps= 0;
ring_delta= 2.0f*(float)M_PI/(float)nrings;
side_delta= 2.0f*(float)M_PI/(float)nsides;
@@ -673,15 +673,15 @@ static void partial_doughnut(float radring, float radhole, int start, int end, i
cos_theta= (float)cos(theta);
sin_theta= (float)sin(theta);
- for(i= nrings - 1; i >= 0; i--) {
+ for (i= nrings - 1; i >= 0; i--) {
theta1= theta + ring_delta;
cos_theta1= (float)cos(theta1);
sin_theta1= (float)sin(theta1);
- if(docaps && i==start) { // cap
+ if (docaps && i==start) { // cap
glBegin(GL_POLYGON);
phi= 0.0;
- for(j= nsides; j >= 0; j--) {
+ for (j= nsides; j >= 0; j--) {
float cos_phi, sin_phi, dist;
phi += side_delta;
@@ -693,10 +693,10 @@ static void partial_doughnut(float radring, float radhole, int start, int end, i
}
glEnd();
}
- if(i>=start && i<=end) {
+ if (i>=start && i<=end) {
glBegin(GL_QUAD_STRIP);
phi= 0.0;
- for(j= nsides; j >= 0; j--) {
+ for (j= nsides; j >= 0; j--) {
float cos_phi, sin_phi, dist;
phi += side_delta;
@@ -710,10 +710,10 @@ static void partial_doughnut(float radring, float radhole, int start, int end, i
glEnd();
}
- if(docaps && i==end) { // cap
+ if (docaps && i==end) { // cap
glBegin(GL_POLYGON);
phi= 0.0;
- for(j= nsides; j >= 0; j--) {
+ for (j= nsides; j >= 0; j--) {
float cos_phi, sin_phi, dist;
phi -= side_delta;
@@ -754,22 +754,22 @@ static void manipulator_setcolor(View3D *v3d, char axis, int colcode, unsigned c
unsigned char col[4]= {0};
col[3]= alpha;
- if(colcode==MAN_GHOST) {
+ if (colcode==MAN_GHOST) {
col[3]= 70;
}
- else if(colcode==MAN_MOVECOL) {
+ else if (colcode==MAN_MOVECOL) {
UI_GetThemeColor3ubv(TH_TRANSFORM, col);
}
else {
switch(axis) {
case 'C':
UI_GetThemeColor3ubv(TH_TRANSFORM, col);
- if(v3d->twmode == V3D_MANIP_LOCAL) {
+ if (v3d->twmode == V3D_MANIP_LOCAL) {
col[0]= col[0]>200?255:col[0]+55;
col[1]= col[1]>200?255:col[1]+55;
col[2]= col[2]>200?255:col[2]+55;
}
- else if(v3d->twmode == V3D_MANIP_NORMAL) {
+ else if (v3d->twmode == V3D_MANIP_NORMAL) {
col[0]= col[0]<55?0:col[0]-55;
col[1]= col[1]<55?0:col[1]-55;
col[2]= col[2]<55?0:col[2]-55;
@@ -799,27 +799,27 @@ static void draw_manipulator_axes(View3D *v3d, RegionView3D *rv3d, int colcode,
{
/* axes */
- if(flagx) {
+ if (flagx) {
manipulator_setcolor(v3d, 'X', colcode, axisBlendAngle(rv3d->twangle[0]));
- if(flagx & MAN_SCALE_X) glLoadName(MAN_SCALE_X);
- else if(flagx & MAN_TRANS_X) glLoadName(MAN_TRANS_X);
+ if (flagx & MAN_SCALE_X) glLoadName(MAN_SCALE_X);
+ else if (flagx & MAN_TRANS_X) glLoadName(MAN_TRANS_X);
glBegin(GL_LINES);
glVertex3f(0.2f, 0.0f, 0.0f);
glVertex3f(1.0f, 0.0f, 0.0f);
glEnd();
}
- if(flagy) {
- if(flagy & MAN_SCALE_Y) glLoadName(MAN_SCALE_Y);
- else if(flagy & MAN_TRANS_Y) glLoadName(MAN_TRANS_Y);
+ if (flagy) {
+ if (flagy & MAN_SCALE_Y) glLoadName(MAN_SCALE_Y);
+ else if (flagy & MAN_TRANS_Y) glLoadName(MAN_TRANS_Y);
manipulator_setcolor(v3d, 'Y', colcode, axisBlendAngle(rv3d->twangle[1]));
glBegin(GL_LINES);
glVertex3f(0.0f, 0.2f, 0.0f);
glVertex3f(0.0f, 1.0f, 0.0f);
glEnd();
}
- if(flagz) {
- if(flagz & MAN_SCALE_Z) glLoadName(MAN_SCALE_Z);
- else if(flagz & MAN_TRANS_Z) glLoadName(MAN_TRANS_Z);
+ if (flagz) {
+ if (flagz & MAN_SCALE_Z) glLoadName(MAN_SCALE_Z);
+ else if (flagz & MAN_TRANS_Z) glLoadName(MAN_TRANS_Z);
manipulator_setcolor(v3d, 'Z', colcode, axisBlendAngle(rv3d->twangle[2]));
glBegin(GL_LINES);
glVertex3f(0.0f, 0.0f, 0.2f);
@@ -859,11 +859,11 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
int colcode;
int ortho;
- if(moving) colcode= MAN_MOVECOL;
+ if (moving) colcode= MAN_MOVECOL;
else colcode= MAN_RGB;
/* when called while moving in mixed mode, do not draw when... */
- if((drawflags & MAN_ROT_C)==0) return;
+ if ((drawflags & MAN_ROT_C)==0) return;
/* Init stuff */
glDisable(GL_DEPTH_TEST);
@@ -877,7 +877,7 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
glPushMatrix();
glTranslatef(rv3d->twmat[3][0], rv3d->twmat[3][1], rv3d->twmat[3][2]);
- if(arcs) {
+ if (arcs) {
/* clipplane makes nice handles, calc here because of multmatrix but with translate! */
copy_v3db_v3fl(plane, rv3d->viewinv[2]);
plane[3]= -0.02f*size; // clip just a bit more
@@ -887,28 +887,28 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
glRotatef( -360.0f*saacos(rv3d->viewquat[0])/(float)M_PI, rv3d->viewquat[1], rv3d->viewquat[2], rv3d->viewquat[3]);
/* Screen aligned help circle */
- if(arcs) {
- if((G.f & G_PICKSEL)==0) {
+ if (arcs) {
+ if ((G.f & G_PICKSEL)==0) {
UI_ThemeColorShade(TH_BACK, -30);
drawcircball(GL_LINE_LOOP, unitmat[3], size, unitmat);
}
}
/* Screen aligned trackball rot circle */
- if(drawflags & MAN_ROT_T) {
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_T);
+ if (drawflags & MAN_ROT_T) {
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_T);
UI_ThemeColor(TH_TRANSFORM);
drawcircball(GL_LINE_LOOP, unitmat[3], 0.2f*size, unitmat);
}
/* Screen aligned view rot circle */
- if(drawflags & MAN_ROT_V) {
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_V);
+ if (drawflags & MAN_ROT_V) {
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_V);
UI_ThemeColor(TH_TRANSFORM);
drawcircball(GL_LINE_LOOP, unitmat[3], 1.2f*size, unitmat);
- if(moving) {
+ if (moving) {
float vec[3];
vec[0]= 0; // XXX (float)(t->imval[0] - t->center2d[0]);
vec[1]= 0; // XXX (float)(t->imval[1] - t->center2d[1]);
@@ -927,7 +927,7 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
ortho = is_orthogonal_m4(rv3d->twmat);
/* apply the transform delta */
- if(moving) {
+ if (moving) {
copy_m4_m4(matt, rv3d->twmat); // to copy the parts outside of [3][3]
// XXX mul_m4_m3m4(matt, t->mat, rv3d->twmat);
if (ortho) {
@@ -943,11 +943,11 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
}
/* axes */
- if(arcs==0) {
- if(!(G.f & G_PICKSEL)) {
- if( (combo & V3D_MANIP_SCALE)==0) {
+ if (arcs==0) {
+ if (!(G.f & G_PICKSEL)) {
+ if ( (combo & V3D_MANIP_SCALE)==0) {
/* axis */
- if( (drawflags & MAN_ROT_X) || (moving && (drawflags & MAN_ROT_Z)) ) {
+ if ( (drawflags & MAN_ROT_X) || (moving && (drawflags & MAN_ROT_Z)) ) {
preOrthoFront(ortho, rv3d->twmat, 2);
manipulator_setcolor(v3d, 'X', colcode, 255);
glBegin(GL_LINES);
@@ -956,7 +956,7 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
glEnd();
postOrtho(ortho);
}
- if( (drawflags & MAN_ROT_Y) || (moving && (drawflags & MAN_ROT_X)) ) {
+ if ( (drawflags & MAN_ROT_Y) || (moving && (drawflags & MAN_ROT_X)) ) {
preOrthoFront(ortho, rv3d->twmat, 0);
manipulator_setcolor(v3d, 'Y', colcode, 255);
glBegin(GL_LINES);
@@ -965,7 +965,7 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
glEnd();
postOrtho(ortho);
}
- if( (drawflags & MAN_ROT_Z) || (moving && (drawflags & MAN_ROT_Y)) ) {
+ if ( (drawflags & MAN_ROT_Z) || (moving && (drawflags & MAN_ROT_Y)) ) {
preOrthoFront(ortho, rv3d->twmat, 1);
manipulator_setcolor(v3d, 'Z', colcode, 255);
glBegin(GL_LINES);
@@ -978,20 +978,20 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
}
}
- if(arcs==0 && moving) {
+ if (arcs==0 && moving) {
/* Z circle */
- if(drawflags & MAN_ROT_Z) {
+ if (drawflags & MAN_ROT_Z) {
preOrthoFront(ortho, matt, 2);
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Z);
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_Z);
manipulator_setcolor(v3d, 'Z', colcode, 255);
drawcircball(GL_LINE_LOOP, unitmat[3], 1.0, unitmat);
postOrtho(ortho);
}
/* X circle */
- if(drawflags & MAN_ROT_X) {
+ if (drawflags & MAN_ROT_X) {
preOrthoFront(ortho, matt, 0);
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_X);
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_X);
glRotatef(90.0, 0.0, 1.0, 0.0);
manipulator_setcolor(v3d, 'X', colcode, 255);
drawcircball(GL_LINE_LOOP, unitmat[3], 1.0, unitmat);
@@ -999,9 +999,9 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
postOrtho(ortho);
}
/* Y circle */
- if(drawflags & MAN_ROT_Y) {
+ if (drawflags & MAN_ROT_Y) {
preOrthoFront(ortho, matt, 1);
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Y);
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_Y);
glRotatef(-90.0, 1.0, 0.0, 0.0);
manipulator_setcolor(v3d, 'Y', colcode, 255);
drawcircball(GL_LINE_LOOP, unitmat[3], 1.0, unitmat);
@@ -1009,24 +1009,24 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
postOrtho(ortho);
}
- if(arcs) glDisable(GL_CLIP_PLANE0);
+ if (arcs) glDisable(GL_CLIP_PLANE0);
}
// donut arcs
- if(arcs) {
+ if (arcs) {
glEnable(GL_CLIP_PLANE0);
/* Z circle */
- if(drawflags & MAN_ROT_Z) {
+ if (drawflags & MAN_ROT_Z) {
preOrthoFront(ortho, rv3d->twmat, 2);
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Z);
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_Z);
manipulator_setcolor(v3d, 'Z', colcode, 255);
partial_doughnut(cusize/4.0f, 1.0f, 0, 48, 8, 48);
postOrtho(ortho);
}
/* X circle */
- if(drawflags & MAN_ROT_X) {
+ if (drawflags & MAN_ROT_X) {
preOrthoFront(ortho, rv3d->twmat, 0);
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_X);
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_X);
glRotatef(90.0, 0.0, 1.0, 0.0);
manipulator_setcolor(v3d, 'X', colcode, 255);
partial_doughnut(cusize/4.0f, 1.0f, 0, 48, 8, 48);
@@ -1034,9 +1034,9 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
postOrtho(ortho);
}
/* Y circle */
- if(drawflags & MAN_ROT_Y) {
+ if (drawflags & MAN_ROT_Y) {
preOrthoFront(ortho, rv3d->twmat, 1);
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Y);
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_Y);
glRotatef(-90.0, 1.0, 0.0, 0.0);
manipulator_setcolor(v3d, 'Y', colcode, 255);
partial_doughnut(cusize/4.0f, 1.0f, 0, 48, 8, 48);
@@ -1047,13 +1047,13 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
glDisable(GL_CLIP_PLANE0);
}
- if(arcs==0) {
+ if (arcs==0) {
/* Z handle on X axis */
- if(drawflags & MAN_ROT_Z) {
+ if (drawflags & MAN_ROT_Z) {
preOrthoFront(ortho, rv3d->twmat, 2);
glPushMatrix();
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Z);
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_Z);
manipulator_setcolor(v3d, 'Z', colcode, 255);
partial_doughnut(0.7f*cusize, 1.0f, 31, 33, 8, 64);
@@ -1063,10 +1063,10 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
}
/* Y handle on X axis */
- if(drawflags & MAN_ROT_Y) {
+ if (drawflags & MAN_ROT_Y) {
preOrthoFront(ortho, rv3d->twmat, 1);
glPushMatrix();
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Y);
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_Y);
manipulator_setcolor(v3d, 'Y', colcode, 255);
glRotatef(90.0, 1.0, 0.0, 0.0);
@@ -1078,10 +1078,10 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
}
/* X handle on Z axis */
- if(drawflags & MAN_ROT_X) {
+ if (drawflags & MAN_ROT_X) {
preOrthoFront(ortho, rv3d->twmat, 0);
glPushMatrix();
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_X);
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_X);
manipulator_setcolor(v3d, 'X', colcode, 255);
glRotatef(-90.0, 0.0, 1.0, 0.0);
@@ -1097,27 +1097,26 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
/* restore */
glLoadMatrixf(rv3d->viewmat);
gluDeleteQuadric(qobj);
- if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
+ if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
}
static void drawsolidcube(float size)
{
static float cube[8][3] = {
- {-1.0, -1.0, -1.0},
- {-1.0, -1.0, 1.0},
- {-1.0, 1.0, 1.0},
- {-1.0, 1.0, -1.0},
- { 1.0, -1.0, -1.0},
- { 1.0, -1.0, 1.0},
- { 1.0, 1.0, 1.0},
- { 1.0, 1.0, -1.0}, };
- float n[3];
+ {-1.0, -1.0, -1.0},
+ {-1.0, -1.0, 1.0},
+ {-1.0, 1.0, 1.0},
+ {-1.0, 1.0, -1.0},
+ { 1.0, -1.0, -1.0},
+ { 1.0, -1.0, 1.0},
+ { 1.0, 1.0, 1.0},
+ { 1.0, 1.0, -1.0}, };
+ float n[3] = {0.0f};
glPushMatrix();
glScalef(size, size, size);
- n[0]=0; n[1]=0; n[2]=0;
glBegin(GL_QUADS);
n[0]= -1.0;
glNormal3fv(n);
@@ -1169,17 +1168,17 @@ static void draw_manipulator_scale(View3D *v3d, RegionView3D *rv3d, int moving,
float cusize= cywid*0.75f, dz;
/* when called while moving in mixed mode, do not draw when... */
- if((drawflags & MAN_SCALE_C)==0) return;
+ if ((drawflags & MAN_SCALE_C)==0) return;
glDisable(GL_DEPTH_TEST);
/* not in combo mode */
- if( (combo & (V3D_MANIP_TRANSLATE|V3D_MANIP_ROTATE))==0) {
+ if ( (combo & (V3D_MANIP_TRANSLATE|V3D_MANIP_ROTATE))==0) {
float size, unitmat[4][4];
int shift= 0; // XXX
/* center circle, do not add to selection when shift is pressed (planar constraint) */
- if( (G.f & G_PICKSEL) && shift==0) glLoadName(MAN_SCALE_C);
+ if ( (G.f & G_PICKSEL) && shift==0) glLoadName(MAN_SCALE_C);
manipulator_setcolor(v3d, 'C', colcode, 255);
glPushMatrix();
@@ -1192,7 +1191,7 @@ static void draw_manipulator_scale(View3D *v3d, RegionView3D *rv3d, int moving,
}
else dz= 1.0f-4.0f*cusize;
- if(moving) {
+ if (moving) {
float matt[4][4];
copy_m4_m4(matt, rv3d->twmat); // to copy the parts outside of [3][3]
@@ -1212,31 +1211,31 @@ static void draw_manipulator_scale(View3D *v3d, RegionView3D *rv3d, int moving,
/* Z cube */
glTranslatef(0.0, 0.0, dz);
- if(drawflags & MAN_SCALE_Z) {
- if(G.f & G_PICKSEL) glLoadName(MAN_SCALE_Z);
+ if (drawflags & MAN_SCALE_Z) {
+ if (G.f & G_PICKSEL) glLoadName(MAN_SCALE_Z);
manipulator_setcolor(v3d, 'Z', colcode, axisBlendAngle(rv3d->twangle[2]));
drawsolidcube(cusize);
}
/* X cube */
glTranslatef(dz, 0.0, -dz);
- if(drawflags & MAN_SCALE_X) {
- if(G.f & G_PICKSEL) glLoadName(MAN_SCALE_X);
+ if (drawflags & MAN_SCALE_X) {
+ if (G.f & G_PICKSEL) glLoadName(MAN_SCALE_X);
manipulator_setcolor(v3d, 'X', colcode, axisBlendAngle(rv3d->twangle[0]));
drawsolidcube(cusize);
}
/* Y cube */
glTranslatef(-dz, dz, 0.0);
- if(drawflags & MAN_SCALE_Y) {
- if(G.f & G_PICKSEL) glLoadName(MAN_SCALE_Y);
+ if (drawflags & MAN_SCALE_Y) {
+ if (G.f & G_PICKSEL) glLoadName(MAN_SCALE_Y);
manipulator_setcolor(v3d, 'Y', colcode, axisBlendAngle(rv3d->twangle[1]));
drawsolidcube(cusize);
}
/* if shiftkey, center point as last, for selectbuffer order */
- if(G.f & G_PICKSEL) {
+ if (G.f & G_PICKSEL) {
int shift= 0; // XXX
- if(shift) {
+ if (shift) {
glTranslatef(0.0, -dz, 0.0);
glLoadName(MAN_SCALE_C);
glBegin(GL_POINTS);
@@ -1248,7 +1247,7 @@ static void draw_manipulator_scale(View3D *v3d, RegionView3D *rv3d, int moving,
/* restore */
glLoadMatrixf(rv3d->viewmat);
- if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
+ if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
glFrontFace(GL_CCW);
}
@@ -1288,16 +1287,16 @@ static void draw_manipulator_translate(View3D *v3d, RegionView3D *rv3d, int UNUS
int shift= 0; // XXX
/* when called while moving in mixed mode, do not draw when... */
- if((drawflags & MAN_TRANS_C)==0) return;
+ if ((drawflags & MAN_TRANS_C)==0) return;
- // XXX if(moving) glTranslatef(t->vec[0], t->vec[1], t->vec[2]);
+ // XXX if (moving) glTranslatef(t->vec[0], t->vec[1], t->vec[2]);
glDisable(GL_DEPTH_TEST);
qobj= gluNewQuadric();
gluQuadricDrawStyle(qobj, GLU_FILL);
/* center circle, do not add to selection when shift is pressed (planar constraint) */
- if( (G.f & G_PICKSEL) && shift==0) glLoadName(MAN_TRANS_C);
+ if ( (G.f & G_PICKSEL) && shift==0) glLoadName(MAN_TRANS_C);
manipulator_setcolor(v3d, 'C', colcode, 255);
glPushMatrix();
@@ -1313,26 +1312,26 @@ static void draw_manipulator_translate(View3D *v3d, RegionView3D *rv3d, int UNUS
glLoadName(-1);
// translate drawn as last, only axis when no combo with scale, or for ghosting
- if((combo & V3D_MANIP_SCALE)==0 || colcode==MAN_GHOST)
+ if ((combo & V3D_MANIP_SCALE)==0 || colcode==MAN_GHOST)
draw_manipulator_axes(v3d, rv3d, colcode, drawflags & MAN_TRANS_X, drawflags & MAN_TRANS_Y, drawflags & MAN_TRANS_Z);
/* offset in combo mode, for rotate a bit more */
- if(combo & (V3D_MANIP_ROTATE)) dz= 1.0f+2.0f*cylen;
- else if(combo & (V3D_MANIP_SCALE)) dz= 1.0f+0.5f*cylen;
+ if (combo & (V3D_MANIP_ROTATE)) dz= 1.0f+2.0f*cylen;
+ else if (combo & (V3D_MANIP_SCALE)) dz= 1.0f+0.5f*cylen;
else dz= 1.0f;
/* Z Cone */
glTranslatef(0.0, 0.0, dz);
- if(drawflags & MAN_TRANS_Z) {
- if(G.f & G_PICKSEL) glLoadName(MAN_TRANS_Z);
+ if (drawflags & MAN_TRANS_Z) {
+ if (G.f & G_PICKSEL) glLoadName(MAN_TRANS_Z);
manipulator_setcolor(v3d, 'Z', colcode, axisBlendAngle(rv3d->twangle[2]));
draw_cone(qobj, cylen, cywid);
}
/* X Cone */
glTranslatef(dz, 0.0, -dz);
- if(drawflags & MAN_TRANS_X) {
- if(G.f & G_PICKSEL) glLoadName(MAN_TRANS_X);
+ if (drawflags & MAN_TRANS_X) {
+ if (G.f & G_PICKSEL) glLoadName(MAN_TRANS_X);
glRotatef(90.0, 0.0, 1.0, 0.0);
manipulator_setcolor(v3d, 'X', colcode, axisBlendAngle(rv3d->twangle[0]));
draw_cone(qobj, cylen, cywid);
@@ -1340,8 +1339,8 @@ static void draw_manipulator_translate(View3D *v3d, RegionView3D *rv3d, int UNUS
}
/* Y Cone */
glTranslatef(-dz, dz, 0.0);
- if(drawflags & MAN_TRANS_Y) {
- if(G.f & G_PICKSEL) glLoadName(MAN_TRANS_Y);
+ if (drawflags & MAN_TRANS_Y) {
+ if (G.f & G_PICKSEL) glLoadName(MAN_TRANS_Y);
glRotatef(-90.0, 1.0, 0.0, 0.0);
manipulator_setcolor(v3d, 'Y', colcode, axisBlendAngle(rv3d->twangle[1]));
draw_cone(qobj, cylen, cywid);
@@ -1350,7 +1349,7 @@ static void draw_manipulator_translate(View3D *v3d, RegionView3D *rv3d, int UNUS
gluDeleteQuadric(qobj);
glLoadMatrixf(rv3d->viewmat);
- if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
+ if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
}
@@ -1362,7 +1361,7 @@ static void draw_manipulator_rotate_cyl(View3D *v3d, RegionView3D *rv3d, int mov
float cywid= 0.25f*cylen;
/* when called while moving in mixed mode, do not draw when... */
- if((drawflags & MAN_ROT_C)==0) return;
+ if ((drawflags & MAN_ROT_C)==0) return;
/* prepare for screen aligned draw */
glPushMatrix();
@@ -1373,14 +1372,14 @@ static void draw_manipulator_rotate_cyl(View3D *v3d, RegionView3D *rv3d, int mov
qobj= gluNewQuadric();
/* Screen aligned view rot circle */
- if(drawflags & MAN_ROT_V) {
+ if (drawflags & MAN_ROT_V) {
float unitmat[4][4]= MAT4_UNITY;
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_V);
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_V);
UI_ThemeColor(TH_TRANSFORM);
drawcircball(GL_LINE_LOOP, unitmat[3], 1.2f*size, unitmat);
- if(moving) {
+ if (moving) {
float vec[3];
vec[0]= 0; // XXX (float)(t->imval[0] - t->center2d[0]);
vec[1]= 0; // XXX (float)(t->imval[1] - t->center2d[1]);
@@ -1396,7 +1395,7 @@ static void draw_manipulator_rotate_cyl(View3D *v3d, RegionView3D *rv3d, int mov
glPopMatrix();
/* apply the transform delta */
- if(moving) {
+ if (moving) {
float matt[4][4];
copy_m4_m4(matt, rv3d->twmat); // to copy the parts outside of [3][3]
// XXX if (t->flag & T_USES_MANIPULATOR) {
@@ -1411,10 +1410,10 @@ static void draw_manipulator_rotate_cyl(View3D *v3d, RegionView3D *rv3d, int mov
glFrontFace(is_negative_m4(rv3d->twmat) ? GL_CW:GL_CCW);
/* axis */
- if( (G.f & G_PICKSEL)==0 ) {
+ if ( (G.f & G_PICKSEL)==0 ) {
// only draw axis when combo didn't draw scale axes
- if((combo & V3D_MANIP_SCALE)==0)
+ if ((combo & V3D_MANIP_SCALE)==0)
draw_manipulator_axes(v3d, rv3d, colcode, drawflags & MAN_ROT_X, drawflags & MAN_ROT_Y, drawflags & MAN_ROT_Z);
/* only has to be set when not in picking */
@@ -1423,15 +1422,15 @@ static void draw_manipulator_rotate_cyl(View3D *v3d, RegionView3D *rv3d, int mov
/* Z cyl */
glTranslatef(0.0, 0.0, 1.0);
- if(drawflags & MAN_ROT_Z) {
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Z);
+ if (drawflags & MAN_ROT_Z) {
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_Z);
manipulator_setcolor(v3d, 'Z', colcode, 255);
draw_cylinder(qobj, cylen, cywid);
}
/* X cyl */
glTranslatef(1.0, 0.0, -1.0);
- if(drawflags & MAN_ROT_X) {
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_X);
+ if (drawflags & MAN_ROT_X) {
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_X);
glRotatef(90.0, 0.0, 1.0, 0.0);
manipulator_setcolor(v3d, 'X', colcode, 255);
draw_cylinder(qobj, cylen, cywid);
@@ -1439,8 +1438,8 @@ static void draw_manipulator_rotate_cyl(View3D *v3d, RegionView3D *rv3d, int mov
}
/* Y cylinder */
glTranslatef(-1.0, 1.0, 0.0);
- if(drawflags & MAN_ROT_Y) {
- if(G.f & G_PICKSEL) glLoadName(MAN_ROT_Y);
+ if (drawflags & MAN_ROT_Y) {
+ if (G.f & G_PICKSEL) glLoadName(MAN_ROT_Y);
glRotatef(-90.0, 1.0, 0.0, 0.0);
manipulator_setcolor(v3d, 'Y', colcode, 255);
draw_cylinder(qobj, cylen, cywid);
@@ -1451,7 +1450,7 @@ static void draw_manipulator_rotate_cyl(View3D *v3d, RegionView3D *rv3d, int mov
gluDeleteQuadric(qobj);
glLoadMatrixf(rv3d->viewmat);
- if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
+ if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
}
@@ -1471,15 +1470,15 @@ void BIF_draw_manipulator(const bContext *C)
RegionView3D *rv3d= ar->regiondata;
int totsel;
- if(!(v3d->twflag & V3D_USE_MANIPULATOR)) return;
-// if(G.moving && (G.moving & G_TRANSFORM_MANIP)==0) return;
+ if (!(v3d->twflag & V3D_USE_MANIPULATOR)) return;
+// if (G.moving && (G.moving & G_TRANSFORM_MANIP)==0) return;
-// if(G.moving==0) {
+// if (G.moving==0) {
{
v3d->twflag &= ~V3D_DRAW_MANIPULATOR;
totsel= calc_manipulator_stats(C);
- if(totsel==0) return;
+ if (totsel==0) return;
v3d->twflag |= V3D_DRAW_MANIPULATOR;
@@ -1490,9 +1489,9 @@ void BIF_draw_manipulator(const bContext *C)
rv3d->twmat[3][0]= (scene->twmin[0] + scene->twmax[0])/2.0f;
rv3d->twmat[3][1]= (scene->twmin[1] + scene->twmax[1])/2.0f;
rv3d->twmat[3][2]= (scene->twmin[2] + scene->twmax[2])/2.0f;
- if(v3d->around==V3D_ACTIVE && scene->obedit==NULL) {
+ if (v3d->around==V3D_ACTIVE && scene->obedit==NULL) {
Object *ob= OBACT;
- if(ob && !(ob->mode & OB_MODE_POSE))
+ if (ob && !(ob->mode & OB_MODE_POSE))
copy_v3_v3(rv3d->twmat[3], ob->obmat[3]);
}
break;
@@ -1511,23 +1510,23 @@ void BIF_draw_manipulator(const bContext *C)
test_manipulator_axis(C);
drawflags= rv3d->twdrawflag; /* set in calc_manipulator_stats */
- if(v3d->twflag & V3D_DRAW_MANIPULATOR) {
+ if (v3d->twflag & V3D_DRAW_MANIPULATOR) {
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
- if(v3d->twtype & V3D_MANIP_ROTATE) {
+ if (v3d->twtype & V3D_MANIP_ROTATE) {
- if(G.rt==3) {
- if(G.moving) draw_manipulator_rotate_cyl(v3d, rv3d, 1, drawflags, v3d->twtype, MAN_MOVECOL);
+ if (G.rt==3) {
+ if (G.moving) draw_manipulator_rotate_cyl(v3d, rv3d, 1, drawflags, v3d->twtype, MAN_MOVECOL);
else draw_manipulator_rotate_cyl(v3d, rv3d, 0, drawflags, v3d->twtype, MAN_RGB);
}
else
draw_manipulator_rotate(v3d, rv3d, 0 /* G.moving*/, drawflags, v3d->twtype);
}
- if(v3d->twtype & V3D_MANIP_SCALE) {
+ if (v3d->twtype & V3D_MANIP_SCALE) {
draw_manipulator_scale(v3d, rv3d, 0, drawflags, v3d->twtype, MAN_RGB);
}
- if(v3d->twtype & V3D_MANIP_TRANSLATE) {
+ if (v3d->twtype & V3D_MANIP_TRANSLATE) {
draw_manipulator_translate(v3d, rv3d, 0, drawflags, v3d->twtype, MAN_RGB);
}
@@ -1546,10 +1545,10 @@ static int manipulator_selectbuf(ScrArea *sa, ARegion *ar, const int mval[2], fl
G.f |= G_PICKSEL;
- rect.xmin= mval[0]-hotspot;
- rect.xmax= mval[0]+hotspot;
- rect.ymin= mval[1]-hotspot;
- rect.ymax= mval[1]+hotspot;
+ rect.xmin = mval[0]-hotspot;
+ rect.xmax = mval[0]+hotspot;
+ rect.ymin = mval[1]-hotspot;
+ rect.ymax = mval[1]+hotspot;
setwinmatrixview3d(ar, v3d, &rect);
mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat);
@@ -1560,13 +1559,13 @@ static int manipulator_selectbuf(ScrArea *sa, ARegion *ar, const int mval[2], fl
glPushName(-2);
/* do the drawing */
- if(v3d->twtype & V3D_MANIP_ROTATE) {
- if(G.rt==3) draw_manipulator_rotate_cyl(v3d, rv3d, 0, MAN_ROT_C & rv3d->twdrawflag, v3d->twtype, MAN_RGB);
+ if (v3d->twtype & V3D_MANIP_ROTATE) {
+ if (G.rt==3) draw_manipulator_rotate_cyl(v3d, rv3d, 0, MAN_ROT_C & rv3d->twdrawflag, v3d->twtype, MAN_RGB);
else draw_manipulator_rotate(v3d, rv3d, 0, MAN_ROT_C & rv3d->twdrawflag, v3d->twtype);
}
- if(v3d->twtype & V3D_MANIP_SCALE)
+ if (v3d->twtype & V3D_MANIP_SCALE)
draw_manipulator_scale(v3d, rv3d, 0, MAN_SCALE_C & rv3d->twdrawflag, v3d->twtype, MAN_RGB);
- if(v3d->twtype & V3D_MANIP_TRANSLATE)
+ if (v3d->twtype & V3D_MANIP_TRANSLATE)
draw_manipulator_translate(v3d, rv3d, 0, MAN_TRANS_C & rv3d->twdrawflag, v3d->twtype, MAN_RGB);
glPopName();
@@ -1576,29 +1575,29 @@ static int manipulator_selectbuf(ScrArea *sa, ARegion *ar, const int mval[2], fl
setwinmatrixview3d(ar, v3d, NULL);
mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat);
- if(hits==1) return buffer[3];
- else if(hits>1) {
+ if (hits==1) return buffer[3];
+ else if (hits>1) {
GLuint val, dep, mindep=0, mindeprot=0, minval=0, minvalrot=0;
int a;
/* we compare the hits in buffer, but value centers highest */
/* we also store the rotation hits separate (because of arcs) and return hits on other widgets if there are */
- for(a=0; a<hits; a++) {
+ for (a=0; a<hits; a++) {
dep= buffer[4*a + 1];
val= buffer[4*a + 3];
- if(val==MAN_TRANS_C) return MAN_TRANS_C;
- else if(val==MAN_SCALE_C) return MAN_SCALE_C;
+ if (val==MAN_TRANS_C) return MAN_TRANS_C;
+ else if (val==MAN_SCALE_C) return MAN_SCALE_C;
else {
- if(val & MAN_ROT_C) {
- if(minvalrot==0 || dep<mindeprot) {
+ if (val & MAN_ROT_C) {
+ if (minvalrot==0 || dep<mindeprot) {
mindeprot= dep;
minvalrot= val;
}
}
else {
- if(minval==0 || dep<mindep) {
+ if (minval==0 || dep<mindep) {
mindep= dep;
minval= val;
}
@@ -1606,7 +1605,7 @@ static int manipulator_selectbuf(ScrArea *sa, ARegion *ar, const int mval[2], fl
}
}
- if(minval)
+ if (minval)
return minval;
else
return minvalrot;
@@ -1625,26 +1624,26 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
int val;
int shift = event->shift;
- if(!(v3d->twflag & V3D_USE_MANIPULATOR)) return 0;
- if(!(v3d->twflag & V3D_DRAW_MANIPULATOR)) return 0;
+ if (!(v3d->twflag & V3D_USE_MANIPULATOR)) return 0;
+ if (!(v3d->twflag & V3D_DRAW_MANIPULATOR)) return 0;
/* Force orientation */
RNA_enum_set(op->ptr, "constraint_orientation", v3d->twmode);
// find the hotspots first test narrow hotspot
val= manipulator_selectbuf(sa, ar, event->mval, 0.5f*(float)U.tw_hotspot);
- if(val) {
+ if (val) {
// drawflags still global, for drawing call above
drawflags= manipulator_selectbuf(sa, ar, event->mval, 0.2f*(float)U.tw_hotspot);
- if(drawflags==0) drawflags= val;
+ if (drawflags==0) drawflags= val;
if (drawflags & MAN_TRANS_C) {
switch(drawflags) {
case MAN_TRANS_C:
break;
case MAN_TRANS_X:
- if(shift) {
+ if (shift) {
constraint_axis[1] = 1;
constraint_axis[2] = 1;
}
@@ -1652,7 +1651,7 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
constraint_axis[0] = 1;
break;
case MAN_TRANS_Y:
- if(shift) {
+ if (shift) {
constraint_axis[0] = 1;
constraint_axis[2] = 1;
}
@@ -1660,7 +1659,7 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
constraint_axis[1] = 1;
break;
case MAN_TRANS_Z:
- if(shift) {
+ if (shift) {
constraint_axis[0] = 1;
constraint_axis[1] = 1;
}
@@ -1675,7 +1674,7 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
else if (drawflags & MAN_SCALE_C) {
switch(drawflags) {
case MAN_SCALE_X:
- if(shift) {
+ if (shift) {
constraint_axis[1] = 1;
constraint_axis[2] = 1;
}
@@ -1683,7 +1682,7 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
constraint_axis[0] = 1;
break;
case MAN_SCALE_Y:
- if(shift) {
+ if (shift) {
constraint_axis[0] = 1;
constraint_axis[2] = 1;
}
@@ -1691,7 +1690,7 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
constraint_axis[1] = 1;
break;
case MAN_SCALE_Z:
- if(shift) {
+ if (shift) {
constraint_axis[0] = 1;
constraint_axis[1] = 1;
}
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 69d29633972..7c3bcb857eb 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -155,21 +155,21 @@ static int snap_type_exec(bContext *C, wmOperator *op)
static void TRANSFORM_OT_snap_type(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Snap Type";
- ot->description= "Set the snap element type";
- ot->idname= "TRANSFORM_OT_snap_type";
+ ot->name = "Snap Type";
+ ot->description = "Set the snap element type";
+ ot->idname = "TRANSFORM_OT_snap_type";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= snap_type_exec;
+ ot->invoke = WM_menu_invoke;
+ ot->exec = snap_type_exec;
- ot->poll= ED_operator_areaactive;
+ ot->poll = ED_operator_areaactive;
/* flags */
- ot->flag= OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* props */
- ot->prop= RNA_def_enum(ot->srna, "type", snap_element_items, 0, "Type", "Set the snap element type");
+ ot->prop = RNA_def_enum(ot->srna, "type", snap_element_items, 0, "Type", "Set the snap element type");
}
@@ -203,7 +203,7 @@ static void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Select Orientation";
- ot->description= "Select transformation orientation";
+ ot->description = "Select transformation orientation";
ot->idname = "TRANSFORM_OT_select_orientation";
ot->flag = OPTYPE_UNDO;
@@ -245,7 +245,7 @@ static int delete_orientation_poll(bContext *C)
return 0;
- if(v3d) {
+ if (v3d) {
selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
}
@@ -256,7 +256,7 @@ static void TRANSFORM_OT_delete_orientation(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Delete Orientation";
- ot->description= "Delete transformation orientation";
+ ot->description = "Delete transformation orientation";
ot->idname = "TRANSFORM_OT_delete_orientation";
ot->flag = OPTYPE_UNDO;
@@ -291,7 +291,7 @@ static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Create Orientation";
- ot->description= "Create transformation orientation from selection";
+ ot->description = "Create transformation orientation from selection";
ot->idname = "TRANSFORM_OT_create_orientation";
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -341,7 +341,7 @@ static int transformops_data(bContext *C, wmOperator *op, wmEvent *event)
G.moving = 1;
/* store data */
- if(retval) {
+ if (retval) {
op->customdata = t;
}
else {
@@ -429,7 +429,7 @@ static int transform_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_CANCELLED;
}
- if(RNA_struct_property_is_set(op->ptr, "value")) {
+ if (RNA_struct_property_is_set(op->ptr, "value")) {
return transform_exec(C, op);
}
else {
@@ -517,7 +517,7 @@ void TRANSFORM_OT_translate(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Translate";
- ot->description= "Translate selected items";
+ ot->description = "Translate selected items";
ot->idname = OP_TRANSLATION;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -525,7 +525,7 @@ void TRANSFORM_OT_translate(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_screenactive;
RNA_def_float_vector_xyz(ot->srna, "value", 3, NULL, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX);
@@ -537,7 +537,7 @@ void TRANSFORM_OT_resize(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Resize";
- ot->description= "Resize selected items";
+ ot->description = "Resize selected items";
ot->idname = OP_RESIZE;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -545,7 +545,7 @@ void TRANSFORM_OT_resize(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_screenactive;
RNA_def_float_vector(ot->srna, "value", 3, VecOne, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX);
@@ -558,7 +558,7 @@ void TRANSFORM_OT_trackball(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Trackball";
- ot->description= "Trackball style rotation of selected items";
+ ot->description = "Trackball style rotation of selected items";
ot->idname = OP_TRACKBALL;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -566,7 +566,7 @@ void TRANSFORM_OT_trackball(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_screenactive;
RNA_def_float_vector(ot->srna, "value", 2, VecOne, -FLT_MAX, FLT_MAX, "Angle", "", -FLT_MAX, FLT_MAX);
@@ -578,7 +578,7 @@ void TRANSFORM_OT_rotate(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Rotate";
- ot->description= "Rotate selected items";
+ ot->description = "Rotate selected items";
ot->idname = OP_ROTATION;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -586,7 +586,7 @@ void TRANSFORM_OT_rotate(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_screenactive;
RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI*2, M_PI*2);
@@ -601,7 +601,7 @@ void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
/* optionals -
* "Tilt selected vertices"
* "Specify an extra axis rotation for selected vertices of 3d curve" */
- ot->description= "Tilt selected control vertices of 3d curve";
+ ot->description = "Tilt selected control vertices of 3d curve";
ot->idname = OP_TILT;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -609,7 +609,7 @@ void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_editcurve_3d;
RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI*2, M_PI*2);
@@ -621,7 +621,7 @@ void TRANSFORM_OT_warp(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Warp";
- ot->description= "Warp selected items around the cursor";
+ ot->description = "Warp selected items around the cursor";
ot->idname = OP_WARP;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -629,7 +629,7 @@ void TRANSFORM_OT_warp(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_screenactive;
RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI*2, M_PI*2);
@@ -642,7 +642,7 @@ void TRANSFORM_OT_shear(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Shear";
- ot->description= "Shear selected items along the horizontal screen axis";
+ ot->description = "Shear selected items along the horizontal screen axis";
ot->idname = OP_SHEAR;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -650,7 +650,7 @@ void TRANSFORM_OT_shear(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_screenactive;
RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, "Offset", "", -FLT_MAX, FLT_MAX);
@@ -663,7 +663,7 @@ void TRANSFORM_OT_push_pull(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Push/Pull";
- ot->description= "Push/Pull selected items";
+ ot->description = "Push/Pull selected items";
ot->idname = OP_PUSH_PULL;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -671,7 +671,7 @@ void TRANSFORM_OT_push_pull(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_screenactive;
RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, "Distance", "", -FLT_MAX, FLT_MAX);
@@ -683,7 +683,7 @@ void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Shrink/Fatten";
- ot->description= "Shrink/fatten selected vertices along normals";
+ ot->description = "Shrink/fatten selected vertices along normals";
ot->idname = OP_SHRINK_FATTEN;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -691,7 +691,7 @@ void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_editmesh;
RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, "Offset", "", -FLT_MAX, FLT_MAX);
@@ -704,7 +704,7 @@ void TRANSFORM_OT_tosphere(struct wmOperatorType *ot)
/* identifiers */
ot->name = "To Sphere";
//added "around mesh center" to differentiate between "MESH_OT_vertices_to_sphere()"
- ot->description= "Move selected vertices outward in a spherical shape around mesh center";
+ ot->description = "Move selected vertices outward in a spherical shape around mesh center";
ot->idname = OP_TOSPHERE;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -712,7 +712,7 @@ void TRANSFORM_OT_tosphere(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_screenactive;
RNA_def_float_factor(ot->srna, "value", 0, 0, 1, "Factor", "", 0, 1);
@@ -724,7 +724,7 @@ void TRANSFORM_OT_mirror(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Mirror";
- ot->description= "Mirror selected vertices around one or more axes";
+ ot->description = "Mirror selected vertices around one or more axes";
ot->idname = OP_MIRROR;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -732,7 +732,7 @@ void TRANSFORM_OT_mirror(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_screenactive;
Transform_Properties(ot, P_CONSTRAINT|P_PROPORTIONAL);
@@ -742,7 +742,7 @@ void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Edge Slide";
- ot->description= "Slide an edge loop along a mesh";
+ ot->description = "Slide an edge loop along a mesh";
ot->idname = OP_EDGE_SLIDE;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -750,7 +750,7 @@ void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_editmesh;
RNA_def_float_factor(ot->srna, "value", 0, -1.0f, 1.0f, "Factor", "", -1.0f, 1.0f);
@@ -762,7 +762,7 @@ void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Edge Crease";
- ot->description= "Change the crease of edges";
+ ot->description = "Change the crease of edges";
ot->idname = OP_EDGE_CREASE;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -770,7 +770,7 @@ void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_editmesh;
RNA_def_float_factor(ot->srna, "value", 0, -1.0f, 1.0f, "Factor", "", -1.0f, 1.0f);
@@ -782,7 +782,7 @@ void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Sequence Slide";
- ot->description= "Slide a sequence strip in time";
+ ot->description = "Slide a sequence strip in time";
ot->idname = OP_SEQ_SLIDE;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -790,7 +790,7 @@ void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot)
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_sequencer_active;
RNA_def_float_vector(ot->srna, "value", 2, VecOne, -FLT_MAX, FLT_MAX, "Angle", "", -FLT_MAX, FLT_MAX);
@@ -804,15 +804,15 @@ void TRANSFORM_OT_transform(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Transform";
- ot->description= "Transform selected items by mode type";
+ ot->description = "Transform selected items by mode type";
ot->idname = "TRANSFORM_OT_transform";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* api callbacks */
ot->invoke = transform_invoke;
ot->exec = transform_exec;
ot->modal = transform_modal;
- ot->cancel = transform_cancel;
+ ot->cancel = transform_cancel;
ot->poll = ED_operator_screenactive;
prop= RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
@@ -897,19 +897,19 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
break;
case SPACE_ACTION:
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", GKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", GKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_TIME_TRANSLATE);
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EVT_TWEAK_S, KM_ANY, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EVT_TWEAK_S, KM_ANY, 0, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_TIME_TRANSLATE);
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_TIME_EXTEND);
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_TIME_SCALE);
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", TKEY, KM_PRESS, KM_SHIFT, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", TKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_TIME_SLIDE);
break;
case SPACE_IPO:
@@ -917,7 +917,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0);
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_TIME_EXTEND);
WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0);
@@ -925,24 +925,24 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0);
break;
case SPACE_NLA:
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", GKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", GKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_TRANSLATION);
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EVT_TWEAK_S, KM_ANY, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EVT_TWEAK_S, KM_ANY, 0, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_TRANSLATION);
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_TIME_EXTEND);
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_TIME_SCALE);
break;
case SPACE_NODE:
WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0);
- kmi= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_A, KM_ANY, 0, 0);
+ kmi = WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_A, KM_ANY, 0, 0);
RNA_boolean_set(kmi->ptr, "release_confirm", TRUE);
- kmi= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0);
+ kmi = WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0);
RNA_boolean_set(kmi->ptr, "release_confirm", TRUE);
WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0);
@@ -961,7 +961,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
WM_keymap_add_item(keymap, OP_SEQ_SLIDE, EVT_TWEAK_S, KM_ANY, 0, 0);
- kmi= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0);
+ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "mode", TFM_TIME_EXTEND);
break;
case SPACE_IMAGE:
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index ee5182c1a5f..d39be2fd7b5 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -38,6 +38,9 @@
#include "DNA_screen_types.h"
#include "DNA_view3d_types.h"
+#include "BLI_math.h"
+#include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
#include "BKE_armature.h"
#include "BKE_curve.h"
@@ -45,10 +48,6 @@
#include "BKE_tessmesh.h"
#include "BKE_report.h"
-#include "BLI_math.h"
-#include "BLI_blenlib.h"
-#include "BLI_utildefines.h"
-
#include "BLF_translation.h"
//#include "BIF_editmesh.h"
@@ -75,7 +74,7 @@ void BIF_clearTransformOrientation(bContext *C)
BLI_freelistN(transform_spaces);
// Need to loop over all view3d
- if(v3d && v3d->twmode >= V3D_MANIP_CUSTOM) {
+ if (v3d && v3d->twmode >= V3D_MANIP_CUSTOM) {
v3d->twmode = V3D_MANIP_GLOBAL; /* fallback to global */
}
}
@@ -298,7 +297,7 @@ void BIF_removeTransformOrientation(bContext *C, TransformOrientation *target)
for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) {
if (ts == target) {
View3D *v3d = CTX_wm_view3d(C);
- if(v3d) {
+ if (v3d) {
int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
// Transform_fix_me NEED TO DO THIS FOR ALL VIEW3D
@@ -324,7 +323,7 @@ void BIF_removeTransformOrientationIndex(bContext *C, int index)
if (ts) {
View3D *v3d = CTX_wm_view3d(C);
- if(v3d) {
+ if (v3d) {
int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
// Transform_fix_me NEED TO DO THIS FOR ALL VIEW3D
@@ -359,7 +358,7 @@ void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target)
void BIF_selectTransformOrientationValue(bContext *C, int orientation)
{
View3D *v3d = CTX_wm_view3d(C);
- if(v3d) /* currently using generic poll */
+ if (v3d) /* currently using generic poll */
v3d->twmode = orientation;
}
@@ -382,19 +381,19 @@ EnumPropertyItem *BIF_enumTransformOrientation(bContext *C)
RNA_enum_item_add(&item, &totitem, &local);
RNA_enum_item_add(&item, &totitem, &view);
- if(C) {
+ if (C) {
scene= CTX_data_scene(C);
- if(scene) {
+ if (scene) {
transform_spaces = &scene->transform_spaces;
ts = transform_spaces->first;
}
}
- if(ts)
+ if (ts)
RNA_enum_item_add_separator(&item, &totitem);
- for(; ts; ts = ts->next) {
+ for (; ts; ts = ts->next) {
tmp.identifier = "CUSTOM";
tmp.name= ts->name;
tmp.value = i++;
@@ -470,11 +469,11 @@ static int count_bone_select(bArmature *arm, ListBase *lb, int do_it)
int do_next;
int total = 0;
- for(bone= lb->first; bone; bone= bone->next) {
+ for (bone= lb->first; bone; bone= bone->next) {
bone->flag &= ~BONE_TRANSFORM;
do_next = do_it;
- if(do_it) {
- if(bone->layer & arm->layer) {
+ if (do_it) {
+ if (bone->layer & arm->layer) {
if (bone->flag & BONE_SELECTED) {
bone->flag |= BONE_TRANSFORM;
total++;
@@ -507,7 +506,7 @@ void initTransformOrientation(bContext *C, TransInfo *t)
}
/* no gimbal fallthrough to normal */
case V3D_MANIP_NORMAL:
- if(obedit || (ob && ob->mode & OB_MODE_POSE)) {
+ if (obedit || (ob && ob->mode & OB_MODE_POSE)) {
strcpy(t->spacename, "normal");
ED_getTransformOrientationMatrix(C, t->spacemtx, (v3d->around == V3D_ACTIVE));
break;
@@ -516,10 +515,11 @@ void initTransformOrientation(bContext *C, TransInfo *t)
case V3D_MANIP_LOCAL:
strcpy(t->spacename, "local");
- if(ob) {
+ if (ob) {
copy_m3_m4(t->spacemtx, ob->obmat);
normalize_m3(t->spacemtx);
- } else {
+ }
+ else {
unit_m3(t->spacemtx);
}
@@ -599,7 +599,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
BMIter iter;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- if(BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
+ if (BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
add_v3_v3(normal, efa->no);
sub_v3_v3v3(vec,
BM_FACE_FIRST_LOOP(efa)->v->co,
@@ -640,7 +640,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
BMIter iter;
BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
- if(BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
+ if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
sub_v3_v3v3(plane, eed->v2->co, eed->v1->co);
break;
}
@@ -654,7 +654,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
BMIter iter;
BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
- if(BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
+ if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
/* use average vert normals as plane and edge vector as normal */
copy_v3_v3(plane, eed->v1->no);
add_v3_v3(plane, eed->v2->no);
@@ -698,7 +698,8 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
}
else if (em->bm->totvertsel > 3) {
BMIter iter;
- normal[0] = normal[1] = normal[2] = 0.0f;
+
+ zero_v3(normal);
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
@@ -722,7 +723,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
if (nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
- while(a--)
+ while (a--)
{
/* exception */
if ((bezt->f1 & SELECT) + (bezt->f2 & SELECT) + (bezt->f3 & SELECT) > SELECT) {
@@ -748,10 +749,9 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
result = ORIENTATION_NORMAL;
}
}
- else if(obedit->type==OB_MBALL){
+ else if (obedit->type==OB_MBALL) {
#if 0 // XXX
/* editmball.c */
- extern ListBase editelems; /* go away ! */
MetaElem *ml, *ml_sel = NULL;
/* loop and check that only one element is selected */
@@ -820,17 +820,17 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
mul_m3_v3(mat, plane);
}
}
- else if(ob && (ob->mode & OB_MODE_POSE)) {
+ else if (ob && (ob->mode & OB_MODE_POSE)) {
bArmature *arm= ob->data;
bPoseChannel *pchan;
int totsel;
totsel = count_bone_select(arm, &arm->bonebase, 1);
- if(totsel) {
+ if (totsel) {
float imat[3][3], mat[3][3];
/* use channels to get stats */
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
if (pchan->bone && pchan->bone->flag & BONE_TRANSFORM) {
add_v3_v3(normal, pchan->pose_mat[2]);
add_v3_v3(plane, pchan->pose_mat[1]);
@@ -849,17 +849,17 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
result = ORIENTATION_EDGE;
}
}
- else if(ob && (ob->mode & (OB_MODE_ALL_PAINT|OB_MODE_PARTICLE_EDIT))) {
+ else if (ob && (ob->mode & (OB_MODE_ALL_PAINT|OB_MODE_PARTICLE_EDIT))) {
/* pass */
}
else {
/* we need the one selected object, if its not active */
ob = OBACT;
- if(ob && !(ob->flag & SELECT)) ob = NULL;
+ if (ob && !(ob->flag & SELECT)) ob = NULL;
- for(base= scene->base.first; base; base= base->next) {
+ for (base= scene->base.first; base; base= base->next) {
if TESTBASELIB(v3d, base) {
- if(ob == NULL) {
+ if (ob == NULL) {
ob= base->object;
break;
}
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index c4e871f83c5..7ad7b0f5c40 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -169,7 +169,8 @@ void drawSnapping(const struct bContext *C, TransInfo *t)
for (p = t->tsnap.points.first; p; p = p->next) {
if (p == t->tsnap.selectedPoint) {
glColor4ubv(selectedCol);
- } else {
+ }
+ else {
glColor4ubv(col);
}
@@ -195,7 +196,7 @@ void drawSnapping(const struct bContext *C, TransInfo *t)
glEnd();
}
- if(v3d->zbuf)
+ if (v3d->zbuf)
glEnable(GL_DEPTH_TEST);
}
else if (t->spacetype==SPACE_IMAGE) {
@@ -265,12 +266,12 @@ void applyProject(TransInfo *t)
float imat[4][4];
int i;
- if(t->flag & (T_EDIT|T_POSE)) {
+ if (t->flag & (T_EDIT|T_POSE)) {
Object *ob = t->obedit?t->obedit:t->poseobj;
invert_m4_m4(imat, ob->obmat);
}
- for(i = 0 ; i < t->total; i++, td++) {
+ for (i = 0 ; i < t->total; i++, td++) {
float iloc[3], loc[3], no[3];
float mval[2];
int dist = 1000;
@@ -297,7 +298,7 @@ void applyProject(TransInfo *t)
if (snapObjectsTransform(t, mval, &dist, loc, no, t->tsnap.modeSelect))
{
-// if(t->flag & (T_EDIT|T_POSE)) {
+// if (t->flag & (T_EDIT|T_POSE)) {
// mul_m4_v3(imat, loc);
// }
//
@@ -476,7 +477,7 @@ void initSnapping(TransInfo *t, wmOperator *op)
}
/* use scene defaults only when transform is modal */
else if (t->flag & T_MODAL) {
- if(ELEM(t->spacetype, SPACE_VIEW3D, SPACE_IMAGE)) {
+ if (ELEM(t->spacetype, SPACE_VIEW3D, SPACE_IMAGE)) {
if (ts->snap_flag & SCE_SNAP) {
t->modifiers |= MOD_SNAP;
}
@@ -569,7 +570,7 @@ int updateSelectedSnapPoint(TransInfo *t)
int closest_dist = 0;
int screen_loc[2];
- for( p = t->tsnap.points.first; p; p = p->next ) {
+ for ( p = t->tsnap.points.first; p; p = p->next ) {
int dx, dy;
int dist;
@@ -631,7 +632,8 @@ void getSnapPoint(TransInfo *t, float vec[3])
}
mul_v3_fl(vec, 1.0f / total);
- } else {
+ }
+ else {
copy_v3_v3(vec, t->tsnap.snapPoint);
}
}
@@ -681,7 +683,7 @@ static float RotationBetween(TransInfo *t, float p1[3], float p2[3])
float angle, start[3], end[3], center[3];
copy_v3_v3(center, t->center);
- if(t->flag & (T_EDIT|T_POSE)) {
+ if (t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
mul_m4_v3(ob->obmat, center);
}
@@ -737,7 +739,7 @@ static float ResizeBetween(TransInfo *t, float p1[3], float p2[3])
float d1[3], d2[3], center[3], len_d1;
copy_v3_v3(center, t->center);
- if(t->flag & (T_EDIT|T_POSE)) {
+ if (t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
mul_m4_v3(ob->obmat, center);
}
@@ -785,7 +787,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
depth_peels.first = depth_peels.last = NULL;
- peelObjectsTransForm(t, &depth_peels, mval);
+ peelObjectsTransForm(t, &depth_peels, mval, t->tsnap.modeSelect);
// if (LAST_SNAP_POINT_VALID)
// {
@@ -897,7 +899,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
UI_view2d_region_to_view(&t->ar->v2d, t->mval[0], t->mval[1], co, co+1);
- if(ED_uvedit_nearest_uv(t->scene, t->obedit, ima, co, t->tsnap.snapPoint))
+ if (ED_uvedit_nearest_uv(t->scene, t->obedit, ima, co, t->tsnap.snapPoint))
{
ED_space_image_uv_aspect(t->sa->spacedata.first, &aspx, &aspy);
t->tsnap.snapPoint[0] *= aspx;
@@ -919,7 +921,7 @@ static void TargetSnapCenter(TransInfo *t)
if ((t->tsnap.status & TARGET_INIT) == 0)
{
copy_v3_v3(t->tsnap.snapTarget, t->center);
- if(t->flag & (T_EDIT|T_POSE)) {
+ if (t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
mul_m4_v3(ob->obmat, t->tsnap.snapTarget);
}
@@ -937,7 +939,7 @@ static void TargetSnapActive(TransInfo *t)
TransData *active_td = NULL;
int i;
- for(td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++)
+ for (td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++)
{
if (td->flag & TD_ACTIVE)
{
@@ -950,7 +952,7 @@ static void TargetSnapActive(TransInfo *t)
{
copy_v3_v3(t->tsnap.snapTarget, active_td->center);
- if(t->flag & (T_EDIT|T_POSE)) {
+ if (t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
mul_m4_v3(ob->obmat, t->tsnap.snapTarget);
}
@@ -978,14 +980,14 @@ static void TargetSnapMedian(TransInfo *t)
t->tsnap.snapTarget[1] = 0;
t->tsnap.snapTarget[2] = 0;
- for(td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++)
+ for (td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++)
{
add_v3_v3(t->tsnap.snapTarget, td->center);
}
mul_v3_fl(t->tsnap.snapTarget, 1.0 / i);
- if(t->flag & (T_EDIT|T_POSE)) {
+ if (t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
mul_m4_v3(ob->obmat, t->tsnap.snapTarget);
}
@@ -1005,7 +1007,7 @@ static void TargetSnapClosest(TransInfo *t)
if (t->flag & T_OBJECT)
{
int i;
- for(td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++)
+ for (td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++)
{
struct BoundBox *bb = object_get_boundbox(td->ob);
@@ -1050,13 +1052,13 @@ static void TargetSnapClosest(TransInfo *t)
}
else {
int i;
- for(td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++) {
+ for (td = t->data, i = 0 ; i < t->total && td->flag & TD_SELECTED ; i++, td++) {
float loc[3];
float dist;
copy_v3_v3(loc, td->center);
- if(t->flag & (T_EDIT|T_POSE)) {
+ if (t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
mul_m4_v3(ob->obmat, loc);
}
@@ -1278,7 +1280,7 @@ static int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm
mul_m4_v3(imat, ray_start_local);
mul_mat3_m4_v3(imat, ray_normal_local);
- if(arm->edbo)
+ if (arm->edbo)
{
EditBone *eBone;
@@ -1381,9 +1383,9 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
hit.index = -1;
hit.dist = *r_depth * (*r_depth == FLT_MAX ? 1.0f : local_scale);
- if(treeData.tree && BLI_bvhtree_ray_cast(treeData.tree, ray_start_local, ray_normal_local, 0.0f, &hit, treeData.raycast_callback, &treeData) != -1)
+ if (treeData.tree && BLI_bvhtree_ray_cast(treeData.tree, ray_start_local, ray_normal_local, 0.0f, &hit, treeData.raycast_callback, &treeData) != -1)
{
- if(hit.dist/local_scale <= *r_depth) {
+ if (hit.dist/local_scale <= *r_depth) {
*r_depth= hit.dist/local_scale;
copy_v3_v3(r_loc, hit.co);
copy_v3_v3(r_no, hit.no);
@@ -1413,7 +1415,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
EDBM_init_index_arrays(em, 0, 0, 1);
}
- for( i = 0; i < totface; i++) {
+ for ( i = 0; i < totface; i++) {
BMFace *efa = NULL;
MFace *f = faces + i;
@@ -1437,7 +1439,8 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
if (efa && BM_elem_flag_test(efa, BM_ELEM_HIDDEN))
{
test = 0;
- } else if (efa) {
+ }
+ else if (efa) {
BMIter iter;
BMLoop *l;
@@ -1493,7 +1496,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
EDBM_init_index_arrays(em, 1, 0, 0);
}
- for( i = 0; i < totvert; i++) {
+ for ( i = 0; i < totvert; i++) {
BMVert *eve = NULL;
MVert *v = verts + i;
@@ -1548,7 +1551,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
EDBM_init_index_arrays(em, 0, 1, 0);
}
- for( i = 0; i < totedge; i++) {
+ for ( i = 0; i < totedge; i++) {
BMEdge *eed = NULL;
MEdge *e = edges + i;
@@ -1670,7 +1673,7 @@ static int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, c
DupliObject *dupli_ob;
ListBase *lb = object_duplilist(scene, ob);
- for(dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next)
+ for (dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next)
{
Object *dob = dupli_ob->ob;
@@ -1792,7 +1795,7 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4],
MFace *faces = dm->getTessFaceArray(dm);
int i;
- for( i = 0; i < totface; i++) {
+ for ( i = 0; i < totface; i++) {
MFace *f = faces + i;
float lambda;
int result;
@@ -1862,7 +1865,7 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4],
return retval;
}
-static int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, ListBase *depth_peels, const float mval[2])
+static int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, ListBase *depth_peels, const float mval[2], SnapMode mode)
{
Base *base;
int retval = 0;
@@ -1874,16 +1877,16 @@ static int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, L
if ( BASE_SELECTABLE(v3d, base) ) {
Object *ob = base->object;
+#if 0 //BMESH_TODO
if (ob->transflag & OB_DUPLI) {
DupliObject *dupli_ob;
ListBase *lb = object_duplilist(scene, ob);
- for(dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next)
+ for (dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next)
{
Object *dob = dupli_ob->ob;
if (dob->type == OB_MESH) {
-#if 0 //BMESH_TODO
EditMesh *em;
DerivedMesh *dm = NULL;
int val;
@@ -1903,33 +1906,32 @@ static int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, L
retval = retval || val;
dm->release(dm);
-#endif
}
}
free_object_duplilist(lb);
}
+#endif
if (ob->type == OB_MESH) {
- BMEditMesh *em;
- DerivedMesh *dm = NULL;
- int val;
+ int val = 0;
- if (ob != obedit) {
- dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
+ if (ob != obedit && ((mode == SNAP_NOT_SELECTED && (base->flag & (SELECT|BA_WAS_SEL)) == 0) || ELEM(mode, SNAP_ALL, SNAP_NOT_OBEDIT))) {
+ DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
val = peelDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, depth_peels);
+ dm->release(dm);
}
- else {
- em = BMEdit_FromObject(ob);
- dm = editbmesh_get_derived_cage(scene, obedit, em, CD_MASK_BAREMESH);
+ else if (ob == obedit && mode != SNAP_NOT_OBEDIT) {
+ BMEditMesh *em = BMEdit_FromObject(ob);
+ DerivedMesh *dm = editbmesh_get_derived_cage(scene, obedit, em, CD_MASK_BAREMESH);
val = peelDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, depth_peels);
+ dm->release(dm);
}
retval = retval || val;
- dm->release(dm);
}
}
}
@@ -1940,17 +1942,17 @@ static int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, L
return retval;
}
-int peelObjectsTransForm(TransInfo *t, ListBase *depth_peels, const float mval[2])
+int peelObjectsTransForm(TransInfo *t, ListBase *depth_peels, const float mval[2], SnapMode mode)
{
- return peelObjects(t->scene, t->view, t->ar, t->obedit, depth_peels, mval);
+ return peelObjects(t->scene, t->view, t->ar, t->obedit, depth_peels, mval, mode);
}
-int peelObjectsContext(bContext *C, ListBase *depth_peels, const float mval[2])
+int peelObjectsContext(bContext *C, ListBase *depth_peels, const float mval[2], SnapMode mode)
{
ScrArea *sa = CTX_wm_area(C);
View3D *v3d = sa->spacedata.first;
- return peelObjects(CTX_data_scene(C), v3d, CTX_wm_region(C), CTX_data_edit_object(C), depth_peels, mval);
+ return peelObjects(CTX_data_scene(C), v3d, CTX_wm_region(C), CTX_data_edit_object(C), depth_peels, mval, mode);
}
/*================================================================*/
@@ -1993,7 +1995,7 @@ static void applyGrid(TransInfo *t, float *val, int max_index, float fac[3], Gea
int i;
float asp[3] = {1.0f, 1.0f, 1.0f}; // TODO: Remove hard coded limit here (3)
- if(max_index > 2) {
+ if (max_index > 2) {
printf("applyGrid: invalid index %d, clamping\n", max_index);
max_index= 2;
}
@@ -2003,7 +2005,7 @@ static void applyGrid(TransInfo *t, float *val, int max_index, float fac[3], Gea
return;
/* evil hack - snapping needs to be adapted for image aspect ratio */
- if((t->spacetype==SPACE_IMAGE) && (t->mode==TFM_TRANSLATION)) {
+ if ((t->spacetype==SPACE_IMAGE) && (t->mode==TFM_TRANSLATION)) {
ED_space_image_uv_aspect(t->sa->spacedata.first, asp, asp+1);
}
diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c
index 06309293f9a..cef440668e6 100644
--- a/source/blender/editors/util/crazyspace.c
+++ b/source/blender/editors/util/crazyspace.c
@@ -38,15 +38,15 @@
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
+#include "BLI_utildefines.h"
+#include "BLI_math.h"
+
#include "BKE_DerivedMesh.h"
#include "BKE_modifier.h"
#include "BKE_multires.h"
#include "BKE_mesh.h"
#include "BKE_tessmesh.h"
-#include "BLI_utildefines.h"
-#include "BLI_math.h"
-
#include "ED_util.h"
typedef struct {
@@ -78,7 +78,7 @@ static void make_vertexcos__mapFunc(void *userData, int index, float *co, float
float *vec = mappedData->vertexcos;
vec+= 3*index;
- if(!mappedData->flags[index]) {
+ if (!mappedData->flags[index]) {
/* we need coord from prototype vertex, not it clones or images,
* suppose they stored in the beginning of vertex array stored in DM */
copy_v3_v3(vec, co);
@@ -91,9 +91,9 @@ static int modifiers_disable_subsurf_temporary(Object *ob)
ModifierData *md;
int disabled = 0;
- for(md=ob->modifiers.first; md; md=md->next)
- if(md->type==eModifierType_Subsurf)
- if(md->mode & eModifierMode_OnCage) {
+ for (md=ob->modifiers.first; md; md=md->next)
+ if (md->type==eModifierType_Subsurf)
+ if (md->mode & eModifierMode_OnCage) {
md->mode ^= eModifierMode_DisableTemporary;
disabled= 1;
}
@@ -112,7 +112,7 @@ float *crazyspace_get_mapped_editverts(Scene *scene, Object *obedit)
MappedUserData userData;
/* disable subsurf temporal, get mapped cos, and enable it */
- if(modifiers_disable_subsurf_temporary(obedit)) {
+ if (modifiers_disable_subsurf_temporary(obedit)) {
/* need to make new derivemesh */
makeDerivedMesh(scene, obedit, me->edit_btmesh, CD_MASK_BAREMESH, 0);
}
@@ -194,13 +194,13 @@ void crazyspace_set_quats_editmesh(BMEditMesh *em, float *origcos, float *mapped
intptr_t index= 0;
/* two abused locations in vertices */
- for(eve= em->verts.first; eve; eve= eve->next, index++) {
+ for (eve= em->verts.first; eve; eve= eve->next, index++) {
eve->tmp.p = NULL;
eve->prev= (EditVert *)index;
}
/* first store two sets of tangent vectors in vertices, we derive it just from the face-edges */
- for(efa= em->faces.first; efa; efa= efa->next) {
+ for (efa= em->faces.first; efa; efa= efa->next) {
/* retrieve mapped coordinates */
v1= mappedcos + 3*(intptr_t)(efa->v1->prev);
@@ -211,39 +211,39 @@ void crazyspace_set_quats_editmesh(BMEditMesh *em, float *origcos, float *mapped
co2= (origcos)? origcos + 3*(intptr_t)(efa->v2->prev): efa->v2->co;
co3= (origcos)? origcos + 3*(intptr_t)(efa->v3->prev): efa->v3->co;
- if(efa->v2->tmp.p==NULL && efa->v2->f1) {
+ if (efa->v2->tmp.p==NULL && efa->v2->f1) {
set_crazy_vertex_quat(quats, co2, co3, co1, v2, v3, v1);
efa->v2->tmp.p= (void*)quats;
quats+= 4;
}
- if(efa->v4) {
+ if (efa->v4) {
v4= mappedcos + 3*(intptr_t)(efa->v4->prev);
co4= (origcos)? origcos + 3*(intptr_t)(efa->v4->prev): efa->v4->co;
- if(efa->v1->tmp.p==NULL && efa->v1->f1) {
+ if (efa->v1->tmp.p==NULL && efa->v1->f1) {
set_crazy_vertex_quat(quats, co1, co2, co4, v1, v2, v4);
efa->v1->tmp.p= (void*)quats;
quats+= 4;
}
- if(efa->v3->tmp.p==NULL && efa->v3->f1) {
+ if (efa->v3->tmp.p==NULL && efa->v3->f1) {
set_crazy_vertex_quat(quats, co3, co4, co2, v3, v4, v2);
efa->v3->tmp.p= (void*)quats;
quats+= 4;
}
- if(efa->v4->tmp.p==NULL && efa->v4->f1) {
+ if (efa->v4->tmp.p==NULL && efa->v4->f1) {
set_crazy_vertex_quat(quats, co4, co1, co3, v4, v1, v3);
efa->v4->tmp.p= (void*)quats;
quats+= 4;
}
}
else {
- if(efa->v1->tmp.p==NULL && efa->v1->f1) {
+ if (efa->v1->tmp.p==NULL && efa->v1->f1) {
set_crazy_vertex_quat(quats, co1, co2, co3, v1, v2, v3);
efa->v1->tmp.p= (void*)quats;
quats+= 4;
}
- if(efa->v3->tmp.p==NULL && efa->v3->f1) {
+ if (efa->v3->tmp.p==NULL && efa->v3->f1) {
set_crazy_vertex_quat(quats, co3, co1, co2, v3, v1, v2);
efa->v3->tmp.p= (void*)quats;
quats+= 4;
@@ -252,7 +252,7 @@ void crazyspace_set_quats_editmesh(BMEditMesh *em, float *origcos, float *mapped
}
/* restore abused prev pointer */
- for(prev= NULL, eve= em->verts.first; eve; prev= eve, eve= eve->next)
+ for (prev= NULL, eve= em->verts.first; eve; prev= eve, eve= eve->next)
eve->prev= prev;
#endif
}
@@ -267,13 +267,13 @@ void crazyspace_set_quats_mesh(Mesh *me, float *origcos, float *mappedcos, float
float *v1, *v2, *v3, *v4, *co1, *co2, *co3, *co4;
mvert= me->mvert;
- for(i=0; i<me->totvert; i++, mvert++)
+ for (i=0; i<me->totvert; i++, mvert++)
mvert->flag&= ~ME_VERT_TMP_TAG;
/* first store two sets of tangent vectors in vertices, we derive it just from the face-edges */
mvert= me->mvert;
mface= me->mface;
- for(i=0; i<me->totface; i++, mface++) {
+ for (i=0; i<me->totface; i++, mface++) {
/* retrieve mapped coordinates */
v1= mappedcos + 3*mface->v1;
@@ -284,34 +284,34 @@ void crazyspace_set_quats_mesh(Mesh *me, float *origcos, float *mappedcos, float
co2= (origcos)? origcos + 3*mface->v2: mvert[mface->v2].co;
co3= (origcos)? origcos + 3*mface->v3: mvert[mface->v3].co;
- if((mvert[mface->v2].flag&ME_VERT_TMP_TAG)==0) {
+ if ((mvert[mface->v2].flag&ME_VERT_TMP_TAG)==0) {
set_crazy_vertex_quat(&quats[mface->v2*4], co2, co3, co1, v2, v3, v1);
mvert[mface->v2].flag|= ME_VERT_TMP_TAG;
}
- if(mface->v4) {
+ if (mface->v4) {
v4= mappedcos + 3*mface->v4;
co4= (origcos)? origcos + 3*mface->v4: mvert[mface->v4].co;
- if((mvert[mface->v1].flag&ME_VERT_TMP_TAG)==0) {
+ if ((mvert[mface->v1].flag&ME_VERT_TMP_TAG)==0) {
set_crazy_vertex_quat(&quats[mface->v1*4], co1, co2, co4, v1, v2, v4);
mvert[mface->v1].flag|= ME_VERT_TMP_TAG;
}
- if((mvert[mface->v3].flag&ME_VERT_TMP_TAG)==0) {
+ if ((mvert[mface->v3].flag&ME_VERT_TMP_TAG)==0) {
set_crazy_vertex_quat(&quats[mface->v3*4], co3, co4, co2, v3, v4, v2);
mvert[mface->v3].flag|= ME_VERT_TMP_TAG;
}
- if((mvert[mface->v4].flag&ME_VERT_TMP_TAG)==0) {
+ if ((mvert[mface->v4].flag&ME_VERT_TMP_TAG)==0) {
set_crazy_vertex_quat(&quats[mface->v4*4], co4, co1, co3, v4, v1, v3);
mvert[mface->v4].flag|= ME_VERT_TMP_TAG;
}
}
else {
- if((mvert[mface->v1].flag&ME_VERT_TMP_TAG)==0) {
+ if ((mvert[mface->v1].flag&ME_VERT_TMP_TAG)==0) {
set_crazy_vertex_quat(&quats[mface->v1*4], co1, co2, co3, v1, v2, v3);
mvert[mface->v1].flag|= ME_VERT_TMP_TAG;
}
- if((mvert[mface->v3].flag&ME_VERT_TMP_TAG)==0) {
+ if ((mvert[mface->v3].flag&ME_VERT_TMP_TAG)==0) {
set_crazy_vertex_quat(&quats[mface->v3*4], co3, co1, co2, v3, v1, v2);
mvert[mface->v3].flag|= ME_VERT_TMP_TAG;
}
@@ -336,19 +336,19 @@ int editbmesh_get_first_deform_matrices(Scene *scene, Object *ob, BMEditMesh *em
/* compute the deformation matrices and coordinates for the first
* modifiers with on cage editing that are enabled and support computing
* deform matrices */
- for(i = 0; md && i <= cageIndex; i++, md = md->next) {
+ for (i = 0; md && i <= cageIndex; i++, md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- if(!editbmesh_modifier_is_enabled(scene, md, dm))
+ if (!editbmesh_modifier_is_enabled(scene, md, dm))
continue;
- if(mti->type==eModifierTypeType_OnlyDeform && mti->deformMatricesEM) {
- if(!defmats) {
+ if (mti->type==eModifierTypeType_OnlyDeform && mti->deformMatricesEM) {
+ if (!defmats) {
dm= getEditDerivedBMesh(em, ob, NULL);
deformedVerts= editbmesh_get_vertex_cos(em, &numVerts);
defmats= MEM_callocN(sizeof(*defmats)*numVerts, "defmats");
- for(a=0; a<numVerts; a++)
+ for (a=0; a<numVerts; a++)
unit_m3(defmats[a]);
}
@@ -359,11 +359,11 @@ int editbmesh_get_first_deform_matrices(Scene *scene, Object *ob, BMEditMesh *em
break;
}
- for(; md && i <= cageIndex; md = md->next, i++)
- if(editbmesh_modifier_is_enabled(scene, md, dm) && modifier_isCorrectableDeformed(md))
+ for (; md && i <= cageIndex; md = md->next, i++)
+ if (editbmesh_modifier_is_enabled(scene, md, dm) && modifier_isCorrectableDeformed(md))
numleft++;
- if(dm)
+ if (dm)
dm->release(dm);
*deformmats= defmats;
@@ -382,7 +382,7 @@ int sculpt_get_first_deform_matrices(Scene *scene, Object *ob, float (**deformma
int has_multires = mmd != NULL && mmd->sculptlvl > 0;
int numleft= 0;
- if(has_multires) {
+ if (has_multires) {
*deformmats= NULL;
*deformcos= NULL;
return numleft;
@@ -391,37 +391,37 @@ int sculpt_get_first_deform_matrices(Scene *scene, Object *ob, float (**deformma
dm= NULL;
md= modifiers_getVirtualModifierList(ob);
- for(; md; md= md->next) {
+ for (; md; md= md->next) {
ModifierTypeInfo *mti= modifierType_getInfo(md->type);
- if(!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue;
+ if (!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue;
- if(mti->type==eModifierTypeType_OnlyDeform) {
- if(!defmats) {
+ if (mti->type==eModifierTypeType_OnlyDeform) {
+ if (!defmats) {
Mesh *me= (Mesh*)ob->data;
dm= mesh_create_derived(me, ob, NULL);
deformedVerts= mesh_getVertexCos(me, &numVerts);
defmats= MEM_callocN(sizeof(*defmats)*numVerts, "defmats");
- for(a=0; a<numVerts; a++)
+ for (a=0; a<numVerts; a++)
unit_m3(defmats[a]);
}
- if(mti->deformMatrices) mti->deformMatrices(md, ob, dm, deformedVerts, defmats, numVerts);
+ if (mti->deformMatrices) mti->deformMatrices(md, ob, dm, deformedVerts, defmats, numVerts);
else break;
}
}
- for(; md; md= md->next) {
+ for (; md; md= md->next) {
ModifierTypeInfo *mti= modifierType_getInfo(md->type);
- if(!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue;
+ if (!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue;
- if(mti->type==eModifierTypeType_OnlyDeform)
+ if (mti->type==eModifierTypeType_OnlyDeform)
numleft++;
}
- if(dm)
+ if (dm)
dm->release(dm);
*deformmats= defmats;
@@ -434,7 +434,7 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3
{
int totleft= sculpt_get_first_deform_matrices(scene, ob, deformmats, deformcos);
- if(totleft) {
+ if (totleft) {
/* there are deformation modifier which doesn't support deformation matrices
* calculation. Need additional crazyspace correction */
@@ -445,15 +445,15 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3
ModifierData *md= modifiers_getVirtualModifierList(ob);
Mesh *me= (Mesh*)ob->data;
- for(; md; md= md->next) {
+ for (; md; md= md->next) {
ModifierTypeInfo *mti= modifierType_getInfo(md->type);
- if(!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue;
+ if (!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue;
- if(mti->type==eModifierTypeType_OnlyDeform) {
+ if (mti->type==eModifierTypeType_OnlyDeform) {
/* skip leading modifiers which have been already
* handled in sculpt_get_first_deform_matrices */
- if(mti->deformMatrices && !deformed)
+ if (mti->deformMatrices && !deformed)
continue;
mti->deformVerts(md, ob, NULL, deformedVerts, me->totvert, 0, 0);
@@ -465,7 +465,7 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3
crazyspace_set_quats_mesh(me, (float*)origVerts, (float*)deformedVerts, quats);
- for(i=0; i<me->totvert; i++) {
+ for (i=0; i<me->totvert; i++) {
float qmat[3][3], tmat[3][3];
quat_to_mat3(qmat, &quats[i*4]);
@@ -477,14 +477,14 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3
MEM_freeN(quats);
}
- if(!*deformmats) {
+ if (!*deformmats) {
int a, numVerts;
Mesh *me= (Mesh*)ob->data;
*deformcos= mesh_getVertexCos(me, &numVerts);
*deformmats= MEM_callocN(sizeof(*(*deformmats))*numVerts, "defmats");
- for(a=0; a<numVerts; a++)
+ for (a=0; a<numVerts; a++)
unit_m3((*deformmats)[a]);
}
}
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index 15dced2f448..fcf95047414 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -75,14 +75,14 @@ void ED_editors_init(bContext *C)
/* toggle on modes for objects that were saved with these enabled. for
* e.g. linked objects we have to ensure that they are actually the
* active object in this scene. */
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
+ for (ob=bmain->object.first; ob; ob=ob->id.next) {
int mode= ob->mode;
- if(mode && (mode != OB_MODE_POSE)) {
+ if (mode && (mode != OB_MODE_POSE)) {
ob->mode= 0;
data= ob->data;
- if(ob == obact && !ob->id.lib && !(data && data->lib))
+ if (ob == obact && !ob->id.lib && !(data && data->lib))
ED_object_toggle_modes(C, mode);
}
}
@@ -94,27 +94,27 @@ void ED_editors_exit(bContext *C)
Main *bmain= CTX_data_main(C);
Scene *sce;
- if(!bmain)
+ if (!bmain)
return;
/* frees all editmode undos */
undo_editmode_clear();
ED_undo_paint_free();
- for(sce=bmain->scene.first; sce; sce= sce->id.next) {
- if(sce->obedit) {
+ for (sce=bmain->scene.first; sce; sce= sce->id.next) {
+ if (sce->obedit) {
Object *ob= sce->obedit;
- if(ob) {
- if(ob->type==OB_MESH) {
+ if (ob) {
+ if (ob->type==OB_MESH) {
Mesh *me= ob->data;
- if(me->edit_btmesh) {
+ if (me->edit_btmesh) {
EDBM_FreeEditBMesh(me->edit_btmesh);
MEM_freeN(me->edit_btmesh);
me->edit_btmesh= NULL;
}
}
- else if(ob->type==OB_ARMATURE) {
+ else if (ob->type==OB_ARMATURE) {
ED_armature_edit_free(ob);
}
}
@@ -135,17 +135,17 @@ void ED_editors_exit(bContext *C)
void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, float fac3, int invert)
{
/* fac1 is for 'nothing', fac2 for CTRL, fac3 for SHIFT */
- if(invert)
+ if (invert)
ctrl= !ctrl;
- if(ctrl && shift) {
- if(fac3 != 0.0f) *val= fac3*floorf(*val/fac3 +0.5f);
+ if (ctrl && shift) {
+ if (fac3 != 0.0f) *val= fac3*floorf(*val/fac3 +0.5f);
}
- else if(ctrl) {
- if(fac2 != 0.0f) *val= fac2*floorf(*val/fac2 +0.5f);
+ else if (ctrl) {
+ if (fac2 != 0.0f) *val= fac2*floorf(*val/fac2 +0.5f);
}
else {
- if(fac1 != 0.0f) *val= fac1*floorf(*val/fac1 +0.5f);
+ if (fac1 != 0.0f) *val= fac1*floorf(*val/fac1 +0.5f);
}
}
@@ -176,13 +176,13 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha
RNA_enum_set(&props_ptr, "method", PF_REMOVE);
RNA_string_set(&props_ptr, "id", id_name);
- if(G.relbase_valid) {
+ if (G.relbase_valid) {
char local_name[FILE_MAXDIR + FILE_MAX], fi[FILE_MAX];
BLI_strncpy(local_name, abs_name, sizeof(local_name));
BLI_splitdirstring(local_name, fi);
BLI_snprintf(local_name, sizeof(local_name), "//%s/%s", folder, fi);
- if(strcmp(abs_name, local_name)!=0) {
+ if (strcmp(abs_name, local_name)!=0) {
switch(checkPackedFile(local_name, pf)) {
case PF_NOFILE:
BLI_snprintf(line, sizeof(line), "Create %s", local_name);
diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c
index 8c0eb06be67..4416228e2d3 100644
--- a/source/blender/editors/util/editmode_undo.c
+++ b/source/blender/editors/util/editmode_undo.c
@@ -107,7 +107,7 @@ static UndoElem *curundo= NULL;
static void undo_restore(UndoElem *undo, void *editdata, void *obdata)
{
- if(undo) {
+ if (undo) {
undo->to_editmode(undo->undodata, editdata, obdata);
}
}
@@ -130,7 +130,7 @@ void undo_editmode_push(bContext *C, const char *name,
* this was giving conflicts for example when mesh changed due to keys or apply */
/* remove all undos after (also when curundo==NULL) */
- while(undobase.last != curundo) {
+ while (undobase.last != curundo) {
uel= undobase.last;
uel->freedata(uel->undodata);
BLI_freelinkN(&undobase, uel);
@@ -150,13 +150,13 @@ void undo_editmode_push(bContext *C, const char *name,
/* limit amount to the maximum amount*/
nr= 0;
uel= undobase.last;
- while(uel) {
+ while (uel) {
nr++;
- if(nr==U.undosteps) break;
+ if (nr==U.undosteps) break;
uel= uel->prev;
}
- if(uel) {
- while(undobase.first!=uel) {
+ if (uel) {
+ while (undobase.first!=uel) {
UndoElem *first= undobase.first;
first->freedata(first->undodata);
BLI_freelinkN(&undobase, first);
@@ -172,23 +172,23 @@ void undo_editmode_push(bContext *C, const char *name,
curundo->id= obedit->id;
curundo->type= obedit->type;
- if(U.undomemory != 0) {
+ if (U.undomemory != 0) {
/* limit to maximum memory (afterwards, we can't know in advance) */
totmem= 0;
maxmem= ((uintptr_t)U.undomemory)*1024*1024;
uel= undobase.last;
- while(uel && uel->prev) {
+ while (uel && uel->prev) {
totmem+= uel->undosize;
- if(totmem>maxmem) break;
+ if (totmem>maxmem) break;
uel= uel->prev;
}
- if(uel) {
- if(uel->prev && uel->prev->prev)
+ if (uel) {
+ if (uel->prev && uel->prev->prev)
uel= uel->prev;
- while(undobase.first!=uel) {
+ while (undobase.first!=uel) {
UndoElem *first= undobase.first;
first->freedata(first->undodata);
BLI_freelinkN(&undobase, first);
@@ -207,24 +207,24 @@ static void undo_clean_stack(bContext *C)
/* side effect: when deleting/renaming object and start editing new one with same name */
uel= undobase.first;
- while(uel) {
+ while (uel) {
void *editdata= uel->getdata(C);
int isvalid= 0;
next= uel->next;
/* for when objects are converted, renamed, or global undo changes pointers... */
- if(uel->type==obedit->type) {
- if(strcmp(uel->id.name, obedit->id.name)==0) {
- if(uel->validate_undo==NULL)
+ if (uel->type==obedit->type) {
+ if (strcmp(uel->id.name, obedit->id.name)==0) {
+ if (uel->validate_undo==NULL)
isvalid= 1;
- else if(uel->validate_undo(uel->undodata, editdata))
+ else if (uel->validate_undo(uel->undodata, editdata))
isvalid= 1;
}
}
- if(isvalid)
+ if (isvalid)
uel->ob= obedit;
else {
- if(uel == curundo)
+ if (uel == curundo)
curundo= NULL;
uel->freedata(uel->undodata);
@@ -234,7 +234,7 @@ static void undo_clean_stack(bContext *C)
uel= next;
}
- if(curundo == NULL) curundo= undobase.last;
+ if (curundo == NULL) curundo= undobase.last;
}
/* 1= an undo, -1 is a redo. we have to make sure 'curundo' remains at current situation */
@@ -245,14 +245,14 @@ void undo_editmode_step(bContext *C, int step)
/* prevent undo to happen on wrong object, stack can be a mix */
undo_clean_stack(C);
- if(step==0) {
+ if (step==0) {
undo_restore(curundo, curundo->getdata(C), obedit->data);
}
- else if(step==1) {
+ else if (step==1) {
- if(curundo==NULL || curundo->prev==NULL) error("No more steps to undo");
+ if (curundo==NULL || curundo->prev==NULL) error("No more steps to undo");
else {
- if(G.f & G_DEBUG) printf("undo %s\n", curundo->name);
+ if (G.f & G_DEBUG) printf("undo %s\n", curundo->name);
curundo= curundo->prev;
undo_restore(curundo, curundo->getdata(C), obedit->data);
}
@@ -260,16 +260,16 @@ void undo_editmode_step(bContext *C, int step)
else {
/* curundo has to remain current situation! */
- if(curundo==NULL || curundo->next==NULL) error("No more steps to redo");
+ if (curundo==NULL || curundo->next==NULL) error("No more steps to redo");
else {
undo_restore(curundo->next, curundo->getdata(C), obedit->data);
curundo= curundo->next;
- if(G.f & G_DEBUG) printf("redo %s\n", curundo->name);
+ if (G.f & G_DEBUG) printf("redo %s\n", curundo->name);
}
}
/* special case for editmesh, mode must be copied back to the scene */
- if(obedit->type == OB_MESH) {
+ if (obedit->type == OB_MESH) {
EDBM_selectmode_to_scene(C);
}
@@ -283,7 +283,7 @@ void undo_editmode_clear(void)
UndoElem *uel;
uel= undobase.first;
- while(uel) {
+ while (uel) {
uel->freedata(uel->undodata);
uel= uel->next;
}
@@ -297,8 +297,8 @@ void undo_editmode_number(bContext *C, int nr)
UndoElem *uel;
int a=1;
- for(uel= undobase.first; uel; uel= uel->next, a++) {
- if(a==nr) break;
+ for (uel= undobase.first; uel; uel= uel->next, a++) {
+ if (a==nr) break;
}
curundo= uel;
undo_editmode_step(C, 0);
@@ -308,11 +308,11 @@ void undo_editmode_name(bContext *C, const char *undoname)
{
UndoElem *uel;
- for(uel= undobase.last; uel; uel= uel->prev) {
- if(strcmp(undoname, uel->name)==0)
+ for (uel= undobase.last; uel; uel= uel->prev) {
+ if (strcmp(undoname, uel->name)==0)
break;
}
- if(uel && uel->prev) {
+ if (uel && uel->prev) {
curundo= uel->prev;
undo_editmode_step(C, 0);
}
@@ -321,11 +321,11 @@ void undo_editmode_name(bContext *C, const char *undoname)
/* undoname optionally, if NULL it just checks for existing undo steps */
int undo_editmode_valid(const char *undoname)
{
- if(undoname) {
+ if (undoname) {
UndoElem *uel;
- for(uel= undobase.last; uel; uel= uel->prev) {
- if(strcmp(undoname, uel->name)==0)
+ for (uel= undobase.last; uel; uel= uel->prev) {
+ if (strcmp(undoname, uel->name)==0)
break;
}
return uel != NULL;
@@ -343,11 +343,11 @@ const char *undo_editmode_get_name(bContext *C, int nr, int *active)
/* prevent wrong numbers to be returned */
undo_clean_stack(C);
- if(active) *active= 0;
+ if (active) *active= 0;
uel= BLI_findlink(&undobase, nr);
- if(uel) {
- if(active && uel==curundo)
+ if (uel) {
+ if (active && uel==curundo)
*active= 1;
return uel->name;
}
@@ -358,6 +358,6 @@ const char *undo_editmode_get_name(bContext *C, int nr, int *active)
void *undo_editmode_get_prev(Object *ob)
{
UndoElem *ue= undobase.last;
- if(ue && ue->prev && ue->prev->ob==ob) return ue->prev->undodata;
+ if (ue && ue->prev && ue->prev->ob==ob) return ue->prev->undodata;
return NULL;
}
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c
index a477a11e6c7..1d9e053376a 100644
--- a/source/blender/editors/util/numinput.c
+++ b/source/blender/editors/util/numinput.c
@@ -84,7 +84,7 @@ void outputNumInput(NumInput *n, char *str)
else
inv[0] = 0;
- if( n->val[i] > 1e10f || n->val[i] < -1e10f )
+ if ( n->val[i] > 1e10f || n->val[i] < -1e10f )
BLI_snprintf(&str[j*20], 20, "%s%.4e%c", inv, n->val[i], cur);
else
switch (n->ctrl[i]) {
@@ -181,7 +181,8 @@ char handleNumInput(NumInput *n, wmEvent *event)
default:
return 0;
}
- } else {
+ }
+ else {
switch (event->type) {
case BACKSPACEKEY:
if (n->ctrl[idx] == 0) {
@@ -217,7 +218,7 @@ char handleNumInput(NumInput *n, wmEvent *event)
}
break;
case PADMINUS:
- if(event->alt)
+ if (event->alt)
break;
case MINUSKEY:
if (n->flag & NUM_NO_NEGATIVE)
@@ -289,7 +290,7 @@ char handleNumInput(NumInput *n, wmEvent *event)
}
else {
/* float resolution breaks when over six digits after comma */
- if( ABS(n->ctrl[idx]) < 10000000) {
+ if ( ABS(n->ctrl[idx]) < 10000000) {
n->val[idx] += Val / (float)n->ctrl[idx];
n->ctrl[idx] *= 10;
}
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index d3049e97f9e..e46fe19d306 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -87,7 +87,7 @@ void ED_undo_push(bContext *C, const char *str)
if (G.f & G_DEBUG)
printf("undo push %s\n", str);
- if(obedit) {
+ if (obedit) {
#ifdef BMESH_EM_UNDO_RECALC_TESSFACE_WORKAROUND
/* undo is causing tessface recalc, so without we need to do explicitly */
@@ -103,7 +103,7 @@ void ED_undo_push(bContext *C, const char *str)
if (U.undosteps == 0) return;
- if(obedit->type==OB_MESH)
+ if (obedit->type==OB_MESH)
undo_push_mesh(C, str);
else if ELEM(obedit->type, OB_CURVE, OB_SURF)
undo_push_curve(C, str);
@@ -116,17 +116,17 @@ void ED_undo_push(bContext *C, const char *str)
else if (obedit->type==OB_ARMATURE)
undo_push_armature(C, str);
}
- else if(obact && obact->mode & OB_MODE_PARTICLE_EDIT) {
+ else if (obact && obact->mode & OB_MODE_PARTICLE_EDIT) {
if (U.undosteps == 0) return;
PE_undo_push(CTX_data_scene(C), str);
}
else {
- if(U.uiflag & USER_GLOBALUNDO)
+ if (U.uiflag & USER_GLOBALUNDO)
BKE_write_undo(C, str);
}
- if(wm->file_saved) {
+ if (wm->file_saved) {
wm->file_saved= 0;
/* notifier that data changed, for save-over warning or header */
WM_event_add_notifier(C, NC_WM|ND_DATACHANGED, NULL);
@@ -147,16 +147,16 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
}
/* grease pencil can be can be used in plenty of spaces, so check it first */
- if(ED_gpencil_session_active()) {
+ if (ED_gpencil_session_active()) {
return ED_undo_gpencil_step(C, step, undoname);
}
- if(sa && sa->spacetype==SPACE_IMAGE) {
+ if (sa && sa->spacetype==SPACE_IMAGE) {
SpaceImage *sima= (SpaceImage *)sa->spacedata.first;
- if((obact && obact->mode & OB_MODE_TEXTURE_PAINT) || sima->flag & SI_DRAWTOOL) {
- if(!ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step, undoname) && undoname)
- if(U.uiflag & USER_GLOBALUNDO)
+ if ((obact && obact->mode & OB_MODE_TEXTURE_PAINT) || sima->flag & SI_DRAWTOOL) {
+ if (!ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step, undoname) && undoname)
+ if (U.uiflag & USER_GLOBALUNDO)
BKE_undo_name(C, undoname);
WM_event_add_notifier(C, NC_WINDOW, NULL);
@@ -164,12 +164,12 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
}
}
- if(sa && sa->spacetype==SPACE_TEXT) {
+ if (sa && sa->spacetype==SPACE_TEXT) {
ED_text_undo_step(C, step);
}
- else if(obedit) {
+ else if (obedit) {
if ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE) {
- if(undoname)
+ if (undoname)
undo_editmode_name(C, undoname);
else
undo_editmode_step(C, step);
@@ -180,16 +180,16 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
else {
int do_glob_undo= 0;
- if(obact && obact->mode & OB_MODE_TEXTURE_PAINT) {
- if(!ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step, undoname))
+ if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) {
+ if (!ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step, undoname))
do_glob_undo= 1;
}
- else if(obact && obact->mode & OB_MODE_SCULPT) {
- if(!ED_undo_paint_step(C, UNDO_PAINT_MESH, step, undoname))
+ else if (obact && obact->mode & OB_MODE_SCULPT) {
+ if (!ED_undo_paint_step(C, UNDO_PAINT_MESH, step, undoname))
do_glob_undo= 1;
}
- else if(obact && obact->mode & OB_MODE_PARTICLE_EDIT) {
- if(step==1)
+ else if (obact && obact->mode & OB_MODE_PARTICLE_EDIT) {
+ if (step==1)
PE_undo(CTX_data_scene(C));
else
PE_redo(CTX_data_scene(C));
@@ -198,13 +198,13 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
do_glob_undo= 1;
}
- if(do_glob_undo) {
- if(U.uiflag & USER_GLOBALUNDO) {
+ if (do_glob_undo) {
+ if (U.uiflag & USER_GLOBALUNDO) {
// note python defines not valid here anymore.
//#ifdef WITH_PYTHON
// XXX BPY_scripts_clear_pyobjects();
//#endif
- if(undoname)
+ if (undoname)
BKE_undo_name(C, undoname);
else
BKE_undo_step(C, step);
@@ -248,18 +248,18 @@ int ED_undo_valid(const bContext *C, const char *undoname)
Object *obact= CTX_data_active_object(C);
ScrArea *sa= CTX_wm_area(C);
- if(sa && sa->spacetype==SPACE_IMAGE) {
+ if (sa && sa->spacetype==SPACE_IMAGE) {
SpaceImage *sima= (SpaceImage *)sa->spacedata.first;
- if((obact && obact->mode & OB_MODE_TEXTURE_PAINT) || sima->flag & SI_DRAWTOOL) {
+ if ((obact && obact->mode & OB_MODE_TEXTURE_PAINT) || sima->flag & SI_DRAWTOOL) {
return 1;
}
}
- if(sa && sa->spacetype==SPACE_TEXT) {
+ if (sa && sa->spacetype==SPACE_TEXT) {
return 1;
}
- else if(obedit) {
+ else if (obedit) {
if ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE) {
return undo_editmode_valid(undoname);
}
@@ -268,19 +268,19 @@ int ED_undo_valid(const bContext *C, const char *undoname)
/* if below tests fail, global undo gets executed */
- if(obact && obact->mode & OB_MODE_TEXTURE_PAINT) {
- if( ED_undo_paint_valid(UNDO_PAINT_IMAGE, undoname) )
+ if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) {
+ if ( ED_undo_paint_valid(UNDO_PAINT_IMAGE, undoname) )
return 1;
}
- else if(obact && obact->mode & OB_MODE_SCULPT) {
- if( ED_undo_paint_valid(UNDO_PAINT_MESH, undoname) )
+ else if (obact && obact->mode & OB_MODE_SCULPT) {
+ if ( ED_undo_paint_valid(UNDO_PAINT_MESH, undoname) )
return 1;
}
- else if(obact && obact->mode & OB_MODE_PARTICLE_EDIT) {
+ else if (obact && obact->mode & OB_MODE_PARTICLE_EDIT) {
return PE_undo_valid(CTX_data_scene(C));
}
- if(U.uiflag & USER_GLOBALUNDO) {
+ if (U.uiflag & USER_GLOBALUNDO) {
return BKE_undo_valid(undoname);
}
}
@@ -313,26 +313,26 @@ static int ed_redo_exec(bContext *C, wmOperator *UNUSED(op))
void ED_OT_undo(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Undo";
- ot->description= "Undo previous action";
- ot->idname= "ED_OT_undo";
+ ot->name = "Undo";
+ ot->description = "Undo previous action";
+ ot->idname = "ED_OT_undo";
/* api callbacks */
- ot->exec= ed_undo_exec;
- ot->poll= ED_operator_screenactive;
+ ot->exec = ed_undo_exec;
+ ot->poll = ED_operator_screenactive;
}
void ED_OT_undo_push(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Undo Push";
- ot->description= "Add an undo state (internal use only)";
- ot->idname= "ED_OT_undo_push";
+ ot->name = "Undo Push";
+ ot->description = "Add an undo state (internal use only)";
+ ot->idname = "ED_OT_undo_push";
/* api callbacks */
- ot->exec= ed_undo_push_exec;
+ ot->exec = ed_undo_push_exec;
- ot->flag= OPTYPE_INTERNAL;
+ ot->flag = OPTYPE_INTERNAL;
RNA_def_string(ot->srna, "message", "Add an undo step *function may be moved*", MAXUNDONAME, "Undo Message", "");
}
@@ -340,13 +340,13 @@ void ED_OT_undo_push(wmOperatorType *ot)
void ED_OT_redo(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Redo";
- ot->description= "Redo previous action";
- ot->idname= "ED_OT_redo";
+ ot->name = "Redo";
+ ot->description = "Redo previous action";
+ ot->idname = "ED_OT_redo";
/* api callbacks */
- ot->exec= ed_redo_exec;
- ot->poll= ED_operator_screenactive;
+ ot->exec = ed_redo_exec;
+ ot->poll = ED_operator_screenactive;
}
@@ -355,14 +355,14 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op)
{
int ret= 0;
- if(op) {
+ if (op) {
wmWindowManager *wm= CTX_wm_manager(C);
struct Scene *scene= CTX_data_scene(C);
ARegion *ar= CTX_wm_region(C);
ARegion *ar1= BKE_area_find_region_type(CTX_wm_area(C), RGN_TYPE_WINDOW);
- if(ar1)
+ if (ar1)
CTX_wm_region_set(C, ar1);
if ( (WM_operator_repeat_check(C, op)) &&
@@ -380,12 +380,12 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op)
printf("redo_cb: operator redo %s\n", op->type->name);
ED_undo_pop_op(C, op);
- if(op->type->check) {
+ if (op->type->check) {
op->type->check(C, op); /* ignore return value since its running again anyway */
}
retval= WM_operator_repeat(C, op);
- if((retval & OPERATOR_FINISHED)==0) {
+ if ((retval & OPERATOR_FINISHED)==0) {
if (G.f & G_DEBUG)
printf("redo_cb: operator redo failed: %s, return %d\n", op->type->name, retval);
ED_undo_redo(C);
@@ -435,16 +435,16 @@ static int get_undo_system(bContext *C)
Object *obedit= CTX_data_edit_object(C);
/* find out which undo system */
- if(obedit) {
+ if (obedit) {
if (ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE))
return UNDOSYSTEM_EDITMODE;
}
else {
Object *obact= CTX_data_active_object(C);
- if(obact && obact->mode & OB_MODE_PARTICLE_EDIT)
+ if (obact && obact->mode & OB_MODE_PARTICLE_EDIT)
return UNDOSYSTEM_PARTICLE;
- else if(U.uiflag & USER_GLOBALUNDO)
+ else if (U.uiflag & USER_GLOBALUNDO)
return UNDOSYSTEM_GLOBAL;
}
@@ -457,22 +457,22 @@ 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) {
+ if (undosys==UNDOSYSTEM_PARTICLE) {
name= PE_undo_get_name(CTX_data_scene(C), i, &active);
}
- else if(undosys==UNDOSYSTEM_EDITMODE) {
+ else if (undosys==UNDOSYSTEM_EDITMODE) {
name= undo_editmode_get_name(C, i, &active);
}
else {
name= BKE_undo_get_name(i, &active);
}
- if(name) {
+ if (name) {
item_tmp.identifier= item_tmp.name= name;
- if(active)
+ if (active)
item_tmp.icon= ICON_RESTRICT_VIEW_OFF;
else
item_tmp.icon= ICON_NONE;
@@ -495,19 +495,19 @@ static int undo_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
undosys= get_undo_system(C);
- if(undosys) {
+ if (undosys) {
EnumPropertyItem *item= rna_undo_itemf(C, undosys, &totitem);
- if(totitem > 0) {
+ if (totitem > 0) {
uiPopupMenu *pup= uiPupMenuBegin(C, op->type->name, ICON_NONE);
uiLayout *layout= uiPupMenuLayout(pup);
uiLayout *split= uiLayoutSplit(layout, 0, 0), *column = NULL;
int i, c;
- for(c=0, i=totitem-1; i >= 0; i--, c++) {
- if( (c % 20)==0 )
+ for (c=0, i=totitem-1; i >= 0; i--, c++) {
+ if ( (c % 20)==0 )
column= uiLayoutColumn(split, 0);
- if(item[i].identifier)
+ if (item[i].identifier)
uiItemIntO(column, item[i].name, item[i].icon, op->type->idname, "item", item[i].value);
}
@@ -524,14 +524,14 @@ static int undo_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
/* note: also check ed_undo_step() in top if you change notifiers */
static int undo_history_exec(bContext *C, wmOperator *op)
{
- if(RNA_struct_property_is_set(op->ptr, "item")) {
+ if (RNA_struct_property_is_set(op->ptr, "item")) {
int undosys= get_undo_system(C);
int item= RNA_int_get(op->ptr, "item");
- if(undosys==UNDOSYSTEM_PARTICLE) {
+ if (undosys==UNDOSYSTEM_PARTICLE) {
PE_undo_number(CTX_data_scene(C), item);
}
- else if(undosys==UNDOSYSTEM_EDITMODE) {
+ else if (undosys==UNDOSYSTEM_EDITMODE) {
undo_editmode_number(C, item+1);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, NULL);
}
@@ -549,14 +549,14 @@ static int undo_history_exec(bContext *C, wmOperator *op)
void ED_OT_undo_history(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Undo History";
- ot->description= "Redo specific action in history";
- ot->idname= "ED_OT_undo_history";
+ ot->name = "Undo History";
+ ot->description = "Redo specific action in history";
+ ot->idname = "ED_OT_undo_history";
/* api callbacks */
- ot->invoke= undo_history_invoke;
- ot->exec= undo_history_exec;
- ot->poll= ED_operator_screenactive;
+ ot->invoke = undo_history_invoke;
+ ot->exec = undo_history_exec;
+ ot->poll = ED_operator_screenactive;
RNA_def_int(ot->srna, "item", 0, 0, INT_MAX, "Item", "", 0, INT_MAX);
diff --git a/source/blender/editors/uvedit/uvedit_buttons.c b/source/blender/editors/uvedit/uvedit_buttons.c
index a45a3555b51..ff673fa0eab 100644
--- a/source/blender/editors/uvedit/uvedit_buttons.c
+++ b/source/blender/editors/uvedit/uvedit_buttons.c
@@ -81,7 +81,7 @@ static int uvedit_center(Scene *scene, BMEditMesh *em, Image *UNUSED(ima), float
}
}
- if(tot > 0) {
+ if (tot > 0) {
center[0] /= tot;
center[1] /= tot;
}
@@ -124,15 +124,15 @@ static void uvedit_vertex_buttons(const bContext *C, uiBlock *block)
em = BMEdit_FromObject(obedit);
- if(uvedit_center(scene, em, ima, center)) {
+ if (uvedit_center(scene, em, ima, center)) {
copy_v2_v2(uvedit_old_center, center);
- if(!(sima->flag & SI_COORDFLOATS)) {
+ if (!(sima->flag & SI_COORDFLOATS)) {
uvedit_old_center[0] *= imx;
uvedit_old_center[1] *= imy;
}
- if(sima->flag & SI_COORDFLOATS) {
+ if (sima->flag & SI_COORDFLOATS) {
step= 1;
digits= 3;
}
@@ -158,7 +158,7 @@ static void do_uvedit_vertex(bContext *C, void *UNUSED(arg), int event)
float center[2], delta[2];
int imx, imy;
- if(event != B_UVEDIT_VERTEX)
+ if (event != B_UVEDIT_VERTEX)
return;
em = BMEdit_FromObject(obedit);
@@ -166,7 +166,7 @@ static void do_uvedit_vertex(bContext *C, void *UNUSED(arg), int event)
ED_space_image_size(sima, &imx, &imy);
uvedit_center(scene, em, ima, center);
- if(sima->flag & SI_COORDFLOATS) {
+ if (sima->flag & SI_COORDFLOATS) {
delta[0]= uvedit_old_center[0] - center[0];
delta[1]= uvedit_old_center[1] - center[1];
}
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 66ba28e70a6..6767d543c5e 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -112,10 +112,10 @@ static int draw_uvs_face_check(Scene *scene)
ToolSettings *ts= scene->toolsettings;
/* checks if we are selecting only faces */
- if(ts->uv_flag & UV_SYNC_SELECTION) {
- if(ts->selectmode == SCE_SELECT_FACE)
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->selectmode == SCE_SELECT_FACE)
return 2;
- else if(ts->selectmode & SCE_SELECT_FACE)
+ else if (ts->selectmode & SCE_SELECT_FACE)
return 1;
else
return 0;
@@ -152,7 +152,7 @@ static int draw_uvs_dm_shadow(DerivedMesh *dm)
{
/* draw shadow mesh - this is the mesh with the modifier applied */
- if(dm && dm->drawUVEdges && CustomData_has_layer(&dm->loopData, CD_MLOOPUV)) {
+ if (dm && dm->drawUVEdges && CustomData_has_layer(&dm->loopData, CD_MLOOPUV)) {
glColor3ub(112, 112, 112);
dm->drawUVEdges(dm);
return 1;
@@ -204,22 +204,22 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
//totuvarea += tf_area(tf, efa->v4!=0);
totuvarea += poly_uv_area(tf_uv, efa->len);
- if(uvedit_face_visible(scene, ima, efa, tf)) {
+ if (uvedit_face_visible(scene, ima, efa, tf)) {
BM_elem_flag_enable(efa, BM_ELEM_TAG);
}
else {
- if(tf == activetf)
+ if (tf == activetf)
activetf= NULL;
BM_elem_flag_disable(efa, BM_ELEM_TAG);
}
}
- if(totarea < FLT_EPSILON || totuvarea < FLT_EPSILON) {
+ if (totarea < FLT_EPSILON || totuvarea < FLT_EPSILON) {
col[0] = 1.0;
col[1] = col[2] = 0.0;
glColor3fv(col);
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- if(BM_elem_flag_test(efa, BM_ELEM_TAG)) {
+ if (BM_elem_flag_test(efa, BM_ELEM_TAG)) {
glBegin(GL_POLYGON);
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
@@ -231,7 +231,7 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
}
else {
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- if(BM_elem_flag_test(efa, BM_ELEM_TAG)) {
+ if (BM_elem_flag_test(efa, BM_ELEM_TAG)) {
area = BM_face_area_calc(em->bm, efa) / totarea;
BLI_array_empty(tf_uv);
@@ -253,9 +253,9 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
//uvarea = tf_area(tf, efa->v4!=0) / totuvarea;
uvarea = poly_uv_area(tf_uv, efa->len) / totuvarea;
- if(area < FLT_EPSILON || uvarea < FLT_EPSILON)
+ if (area < FLT_EPSILON || uvarea < FLT_EPSILON)
areadiff = 1.0f;
- else if(area>uvarea)
+ else if (area>uvarea)
areadiff = 1.0f-(uvarea/area);
else
areadiff = 1.0f-(area/uvarea);
@@ -286,13 +286,13 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
glShadeModel(GL_SMOOTH);
- for(efa= em->faces.first; efa; efa= efa->next) {
+ for (efa= em->faces.first; efa; efa= efa->next) {
tf= CustomData_em_get(&em->fdata, efa->head.data, CD_MTFACE);
- if(uvedit_face_visible(scene, ima, efa, tf)) {
+ if (uvedit_face_visible(scene, ima, efa, tf)) {
efa->tmp.p = tf;
uv_copy_aspect(tf->uv, tf_uv, aspx, aspy);
- if(efa->v4) {
+ if (efa->v4) {
#if 0 /* Simple but slow, better reuse normalized vectors */
uvang1 = RAD2DEG(angle_v2v2v2(tf_uv[3], tf_uv[0], tf_uv[1]));
@@ -410,7 +410,7 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
glEnd();
}
else {
- if(tf == activetf)
+ if (tf == activetf)
activetf= NULL;
efa->tmp.p = NULL;
}
@@ -430,24 +430,24 @@ static void draw_uvs_other(Scene *scene, Object *obedit, Image *curimage)
glColor3ub(96, 96, 96);
- for(base=scene->base.first; base; base=base->next) {
+ for (base=scene->base.first; base; base=base->next) {
Object *ob= base->object;
- if(!(base->flag & SELECT)) continue;
- if(!(base->lay & scene->lay)) continue;
- if(ob->restrictflag & OB_RESTRICT_VIEW) continue;
+ if (!(base->flag & SELECT)) continue;
+ if (!(base->lay & scene->lay)) continue;
+ if (ob->restrictflag & OB_RESTRICT_VIEW) continue;
- if((ob->type==OB_MESH) && (ob!=obedit)) {
+ if ((ob->type==OB_MESH) && (ob!=obedit)) {
Mesh *me= ob->data;
- if(me->mtface) {
+ if (me->mtface) {
MPoly *mface= me->mpoly;
MTexPoly *tface= me->mtpoly;
MLoopUV *mloopuv;
int a, b;
- for(a=me->totpoly; a>0; a--, tface++, mface++) {
- if(tface->tpage == curimage) {
+ for (a=me->totpoly; a>0; a--, tface++, mface++) {
+ if (tface->tpage == curimage) {
glBegin(GL_LINE_LOOP);
mloopuv = me->mloopuv + mface->loopstart;
@@ -467,19 +467,19 @@ static void draw_uvs_texpaint(SpaceImage *sima, Scene *scene, Object *ob)
Mesh *me= ob->data;
Image *curimage = ED_space_image(sima);
- if(sima->flag & SI_DRAW_OTHER)
+ if (sima->flag & SI_DRAW_OTHER)
draw_uvs_other(scene, ob, curimage);
glColor3ub(112, 112, 112);
- if(me->mtface) {
+ if (me->mtface) {
MPoly *mface= me->mpoly;
MTexPoly *tface= me->mtpoly;
MLoopUV *mloopuv;
int a, b;
- for(a=me->totpoly; a>0; a--, tface++, mface++) {
- if(tface->tpage == curimage) {
+ for (a=me->totpoly; a>0; a--, tface++, mface++) {
+ if (tface->tpage == curimage) {
glBegin(GL_LINE_LOOP);
mloopuv = me->mloopuv + mface->loopstart;
@@ -517,13 +517,13 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
ts= scene->toolsettings;
drawfaces= draw_uvs_face_check(scene);
- if(ts->uv_flag & UV_SYNC_SELECTION)
+ if (ts->uv_flag & UV_SYNC_SELECTION)
interpedges= (ts->selectmode & SCE_SELECT_VERTEX);
else
interpedges= (ts->uv_selectmode == UV_SELECT_VERTEX);
/* draw other uvs */
- if(sima->flag & SI_DRAW_OTHER) {
+ if (sima->flag & SI_DRAW_OTHER) {
Image *curimage= (activetf)? activetf->tpage: NULL;
draw_uvs_other(scene, obedit, curimage);
@@ -531,29 +531,29 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
/* 1. draw shadow mesh */
- if(sima->flag & SI_DRAWSHADOW) {
+ if (sima->flag & SI_DRAWSHADOW) {
/* first try existing derivedmesh */
- if(!draw_uvs_dm_shadow(em->derivedFinal)) {
+ if (!draw_uvs_dm_shadow(em->derivedFinal)) {
/* create one if it does not exist */
cagedm = editbmesh_get_derived_cage_and_final(scene, obedit, me->edit_btmesh, &finaldm, CD_MASK_BAREMESH|CD_MASK_MTFACE);
/* when sync selection is enabled, all faces are drawn (except for hidden)
* so if cage is the same as the final, theres no point in drawing this */
- if(!((ts->uv_flag & UV_SYNC_SELECTION) && (cagedm == finaldm)))
+ if (!((ts->uv_flag & UV_SYNC_SELECTION) && (cagedm == finaldm)))
draw_uvs_dm_shadow(finaldm);
/* release derivedmesh again */
- if(cagedm != finaldm) cagedm->release(cagedm);
+ if (cagedm != finaldm) cagedm->release(cagedm);
finaldm->release(finaldm);
}
}
/* 2. draw colored faces */
- if(sima->flag & SI_DRAW_STRETCH) {
+ if (sima->flag & SI_DRAW_STRETCH) {
draw_uvs_stretch(sima, scene, em, activetf);
}
- else if(!(sima->flag & SI_NO_DRAWFACES)) {
+ else if (!(sima->flag & SI_NO_DRAWFACES)) {
/* draw transparent faces */
UI_GetThemeColor4ubv(TH_FACE, col1);
UI_GetThemeColor4ubv(TH_FACE_SELECT, col2);
@@ -563,11 +563,11 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(uvedit_face_visible(scene, ima, efa, tf)) {
+ if (uvedit_face_visible(scene, ima, efa, tf)) {
BM_elem_flag_enable(efa, BM_ELEM_TAG);
- if(tf==activetf) continue; /* important the temp boolean is set above */
+ if (tf==activetf) continue; /* important the temp boolean is set above */
- if(uvedit_face_selected(scene, em, efa))
+ if (uvedit_face_selected(scene, em, efa))
glColor4ubv((GLubyte *)col2);
else
glColor4ubv((GLubyte *)col1);
@@ -580,7 +580,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
glEnd();
}
else {
- if(tf == activetf)
+ if (tf == activetf)
activetf= NULL;
BM_elem_flag_disable(efa, BM_ELEM_TAG);
}
@@ -593,11 +593,11 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(uvedit_face_visible(scene, ima, efa, tf)) {
+ if (uvedit_face_visible(scene, ima, efa, tf)) {
BM_elem_flag_enable(efa, BM_ELEM_TAG);
}
else {
- if(tf == activetf)
+ if (tf == activetf)
activetf= NULL;
BM_elem_flag_disable(efa, BM_ELEM_TAG);
}
@@ -607,7 +607,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
/* 3. draw active face stippled */
- if(activef) {
+ if (activef) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
UI_ThemeColor4(TH_EDITMESH_ACTIVE);
@@ -628,7 +628,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
/* 4. draw edges */
- if(sima->flag & SI_SMOOTH_UV) {
+ if (sima->flag & SI_SMOOTH_UV) {
glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -641,7 +641,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
continue;
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(tf) {
+ if (tf) {
cpack(0x111111);
glBegin(GL_LINE_LOOP);
@@ -676,7 +676,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
break;
case SI_UVDT_BLACK: /* black/white */
case SI_UVDT_WHITE:
- if(sima->dt_uv==SI_UVDT_WHITE) glColor3f(1.0f, 1.0f, 1.0f);
+ if (sima->dt_uv==SI_UVDT_WHITE) glColor3f(1.0f, 1.0f, 1.0f);
else glColor3f(0.0f, 0.0f, 0.0f);
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
@@ -711,11 +711,11 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
col2[0] = col2[1] = col2[2] = 192; col2[3] = 255;
glColor4ubv((unsigned char *)col2);
- if(me->drawflag & ME_DRAWEDGES) {
+ if (me->drawflag & ME_DRAWEDGES) {
int sel, lastsel = -1;
UI_GetThemeColor4ubv(TH_VERTEX_SELECT, col1);
- if(interpedges) {
+ if (interpedges) {
glShadeModel(GL_SMOOTH);
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
@@ -743,7 +743,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
glBegin(GL_LINES);
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
sel = (uvedit_edge_selected(em, scene, l)? 1 : 0);
- if(sel != lastsel){
+ if (sel != lastsel) {
glColor4ubv(sel ? (GLubyte *)col1 : (GLubyte *)col2);
lastsel = sel;
}
@@ -774,14 +774,14 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
break;
}
- if(sima->flag & SI_SMOOTH_UV) {
+ if (sima->flag & SI_SMOOTH_UV) {
glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
}
/* 5. draw face centers */
- if(drawfaces) {
+ if (drawfaces) {
float cent[2];
pointsize = UI_GetThemeValuef(TH_FACEDOT_SIZE);
@@ -795,7 +795,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
if (!BM_elem_flag_test(efa, BM_ELEM_TAG))
continue;
- if(!uvedit_face_selected(scene, em, efa)) {
+ if (!uvedit_face_selected(scene, em, efa)) {
poly_uv_center(em, efa, cent);
bglVertex2fv(cent);
}
@@ -810,7 +810,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
if (!BM_elem_flag_test(efa, BM_ELEM_TAG))
continue;
- if(uvedit_face_selected(scene, em, efa)) {
+ if (uvedit_face_selected(scene, em, efa)) {
poly_uv_center(em, efa, cent);
bglVertex2fv(cent);
}
@@ -820,7 +820,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
/* 6. draw uv vertices */
- if(drawfaces != 2) { /* 2 means Mesh Face Mode */
+ if (drawfaces != 2) { /* 2 means Mesh Face Mode */
/* unselected uvs */
UI_ThemeColor(TH_VERTEX);
pointsize = UI_GetThemeValuef(TH_VERTEX_SIZE);
@@ -833,7 +833,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if(!uvedit_uv_selected(em, scene, l))
+ if (!uvedit_uv_selected(em, scene, l))
bglVertex2fv(luv->uv);
}
}
@@ -852,7 +852,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if(luv->flag & MLOOPUV_PINNED)
+ if (luv->flag & MLOOPUV_PINNED)
bglVertex2fv(luv->uv);
}
}
@@ -870,7 +870,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if(uvedit_uv_selected(em, scene, l))
+ if (uvedit_uv_selected(em, scene, l))
bglVertex2fv(luv->uv);
}
}
@@ -878,7 +878,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
}
/* finally draw stitch preview */
- if(stitch_preview) {
+ if (stitch_preview) {
int i, index = 0;
glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
glEnableClientState(GL_VERTEX_ARRAY);
@@ -891,7 +891,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
glDrawArrays(GL_TRIANGLES, 0, stitch_preview->num_static_tris*3);
glVertexPointer(2, GL_FLOAT, 0, stitch_preview->preview_polys);
- for(i = 0; i < stitch_preview->num_polys; i++){
+ for (i = 0; i < stitch_preview->num_polys; i++) {
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
UI_ThemeColor4(TH_STITCH_PREVIEW_FACE);
glDrawArrays(GL_POLYGON, index, stitch_preview->uvs_per_polygon[i]);
@@ -934,15 +934,15 @@ void draw_uvedit_main(SpaceImage *sima, ARegion *ar, Scene *scene, Object *obedi
show_uvedit= ED_space_image_show_uvedit(sima, obedit);
show_uvshadow= ED_space_image_show_uvshadow(sima, obedit);
- if(show_uvedit || show_uvshadow || show_texpaint_uvshadow) {
- if(show_uvshadow)
+ if (show_uvedit || show_uvshadow || show_texpaint_uvshadow) {
+ if (show_uvshadow)
draw_uvs_shadow(obedit);
- else if(show_uvedit)
+ else if (show_uvedit)
draw_uvs(sima, scene, obedit);
else
draw_uvs_texpaint(sima, scene, obact);
- if(show_uvedit && !(toolsettings->use_uv_sculpt))
+ if (show_uvedit && !(toolsettings->use_uv_sculpt))
drawcursor_sima(sima, ar);
}
}
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 28981d55793..3e6be67f233 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -94,7 +94,7 @@ int ED_uvedit_test(Object *obedit)
if (!obedit)
return 0;
- if(obedit->type != OB_MESH)
+ if (obedit->type != OB_MESH)
return 0;
em = BMEdit_FromObject(obedit);
@@ -116,10 +116,10 @@ static int UNUSED_FUNCTION(ED_operator_uvmap_mesh)(bContext *C)
{
Object *ob= CTX_data_active_object(C);
- if(ob && ob->type==OB_MESH) {
+ if (ob && ob->type==OB_MESH) {
Mesh *me = ob->data;
- if(CustomData_get_layer(&me->fdata, CD_MTFACE) != NULL)
+ if (CustomData_get_layer(&me->fdata, CD_MTFACE) != NULL)
return 1;
}
@@ -137,16 +137,16 @@ int ED_object_get_active_image(Object *ob, int mat_nr, Image **ima, ImageUser **
Material *ma= give_current_material(ob, mat_nr);
bNode *node= (ma && ma->use_nodes)? nodeGetActiveTexture(ma->nodetree): NULL;
- if(node && is_image_texture_node(node)) {
- if(ima) *ima= (Image*)node->id;
- if(iuser) *iuser= NULL;
- if(node_r) *node_r= node;
+ if (node && is_image_texture_node(node)) {
+ if (ima) *ima= (Image*)node->id;
+ if (iuser) *iuser= NULL;
+ if (node_r) *node_r= node;
return TRUE;
}
- if(ima) *ima= NULL;
- if(iuser) *iuser= NULL;
- if(node_r) *node_r= node;
+ if (ima) *ima= NULL;
+ if (iuser) *iuser= NULL;
+ if (node_r) *node_r= node;
return FALSE;
}
@@ -156,7 +156,7 @@ void ED_object_assign_active_image(Main *bmain, Object *ob, int mat_nr, Image *i
Material *ma= give_current_material(ob, mat_nr);
bNode *node= (ma && ma->use_nodes)? nodeGetActiveTexture(ma->nodetree): NULL;
- if(node && is_image_texture_node(node)) {
+ if (node && is_image_texture_node(node)) {
node->id= &ima->id;
ED_node_generic_update(bmain, ma->nodetree, node);
}
@@ -173,31 +173,31 @@ void ED_uvedit_assign_image(Main *bmain, Scene *scene, Object *obedit, Image *im
int update= 0;
/* skip assigning these procedural images... */
- if(ima && (ima->type==IMA_TYPE_R_RESULT || ima->type==IMA_TYPE_COMPOSITE))
+ if (ima && (ima->type==IMA_TYPE_R_RESULT || ima->type==IMA_TYPE_COMPOSITE))
return;
/* verify we have a mesh we can work with */
- if(!obedit || (obedit->type != OB_MESH))
+ if (!obedit || (obedit->type != OB_MESH))
return;
em = BMEdit_FromObject(obedit);
- if(!em || !em->bm->totface) {
+ if (!em || !em->bm->totface) {
return;
}
- if(scene_use_new_shading_nodes(scene)) {
+ if (scene_use_new_shading_nodes(scene)) {
/* new shading system, assign image in material */
int sloppy= 1;
BMFace *efa= BM_active_face_get(em->bm, sloppy);
- if(efa)
+ if (efa)
ED_object_assign_active_image(bmain, obedit, efa->mat_nr, ima);
}
else {
/* old shading system, assign image to selected faces */
/* ensure we have a uv map */
- if(!CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY)) {
+ if (!CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY)) {
BM_data_layer_add(em->bm, &em->bm->pdata, CD_MTEXPOLY);
BM_data_layer_add(em->bm, &em->bm->ldata, CD_MLOOPUV);
update= 1;
@@ -207,11 +207,11 @@ void ED_uvedit_assign_image(Main *bmain, Scene *scene, Object *obedit, Image *im
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(uvedit_face_visible(scene, previma, efa, tf)) {
- if(ima) {
+ if (uvedit_face_visible(scene, previma, efa, tf)) {
+ if (ima) {
tf->tpage= ima;
- if(ima->id.us==0) id_us_plus(&ima->id);
+ if (ima->id.us==0) id_us_plus(&ima->id);
else id_lib_extern(&ima->id);
}
else {
@@ -223,7 +223,7 @@ void ED_uvedit_assign_image(Main *bmain, Scene *scene, Object *obedit, Image *im
}
/* and update depdency graph */
- if(update)
+ if (update)
DAG_id_tag_update(obedit->data, 0);
}
@@ -239,14 +239,14 @@ static int uvedit_set_tile(Object *obedit, Image *ima, int curtile)
MTexPoly *tf;
/* verify if we have something to do */
- if(!ima || !ED_uvedit_test(obedit))
+ if (!ima || !ED_uvedit_test(obedit))
return 0;
- if((ima->tpageflag & IMA_TILES) == 0)
+ if ((ima->tpageflag & IMA_TILES) == 0)
return 0;
/* skip assigning these procedural images... */
- if(ima->type==IMA_TYPE_R_RESULT || ima->type==IMA_TYPE_COMPOSITE)
+ if (ima->type==IMA_TYPE_R_RESULT || ima->type==IMA_TYPE_COMPOSITE)
return 0;
em = BMEdit_FromObject(obedit);
@@ -254,7 +254,7 @@ static int uvedit_set_tile(Object *obedit, Image *ima, int curtile)
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && BM_elem_flag_test(efa, BM_ELEM_SELECT))
+ if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && BM_elem_flag_test(efa, BM_ELEM_SELECT))
tf->tile= curtile; /* set tile index */
}
@@ -269,7 +269,7 @@ static void uvedit_pixel_to_float(SpaceImage *sima, float *dist, float pixeldist
{
int width, height;
- if(sima) {
+ if (sima) {
ED_space_image_size(sima, &width, &height);
}
else {
@@ -287,7 +287,7 @@ int uvedit_face_visible_nolocal(Scene *scene, BMFace *efa)
{
ToolSettings *ts= scene->toolsettings;
- if(ts->uv_flag & UV_SYNC_SELECTION)
+ if (ts->uv_flag & UV_SYNC_SELECTION)
return (BM_elem_flag_test(efa, BM_ELEM_HIDDEN)==0);
else
return (BM_elem_flag_test(efa, BM_ELEM_HIDDEN)==0 && BM_elem_flag_test(efa, BM_ELEM_SELECT));
@@ -297,7 +297,7 @@ int uvedit_face_visible(Scene *scene, Image *ima, BMFace *efa, MTexPoly *tf)
{
ToolSettings *ts= scene->toolsettings;
- if(ts->uv_flag & UV_SHOW_SAME_IMAGE)
+ if (ts->uv_flag & UV_SHOW_SAME_IMAGE)
return (tf->tpage==ima)? uvedit_face_visible_nolocal(scene, efa): 0;
else
return uvedit_face_visible_nolocal(scene, efa);
@@ -307,7 +307,7 @@ int uvedit_face_selected(Scene *scene, BMEditMesh *em, BMFace *efa)
{
ToolSettings *ts= scene->toolsettings;
- if(ts->uv_flag & UV_SYNC_SELECTION)
+ if (ts->uv_flag & UV_SYNC_SELECTION)
return (BM_elem_flag_test(efa, BM_ELEM_SELECT));
else {
BMLoop *l;
@@ -328,7 +328,7 @@ int uvedit_face_select(Scene *scene, BMEditMesh *em, BMFace *efa)
{
ToolSettings *ts= scene->toolsettings;
- if(ts->uv_flag & UV_SYNC_SELECTION)
+ if (ts->uv_flag & UV_SYNC_SELECTION)
BM_elem_select_set(em->bm, efa, TRUE);
else {
BMLoop *l;
@@ -350,7 +350,7 @@ int uvedit_face_deselect(Scene *scene, BMEditMesh *em, BMFace *efa)
{
ToolSettings *ts= scene->toolsettings;
- if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
BM_elem_select_set(em->bm, efa, FALSE);
}
else {
@@ -373,7 +373,7 @@ int uvedit_edge_selected(BMEditMesh *em, Scene *scene, BMLoop *l)
{
ToolSettings *ts= scene->toolsettings;
- if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
if (ts->selectmode & SCE_SELECT_FACE) {
return BM_elem_flag_test(l->f, BM_ELEM_SELECT);
}
@@ -400,10 +400,10 @@ void uvedit_edge_select(BMEditMesh *em, Scene *scene, BMLoop *l)
{
ToolSettings *ts= scene->toolsettings;
- if(ts->uv_flag & UV_SYNC_SELECTION) {
- if(ts->selectmode & SCE_SELECT_FACE)
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->selectmode & SCE_SELECT_FACE)
BM_elem_select_set(em->bm, l->f, TRUE);
- else if(ts->selectmode & SCE_SELECT_EDGE)
+ else if (ts->selectmode & SCE_SELECT_EDGE)
BM_elem_select_set(em->bm, l->e, TRUE);
else {
BM_elem_select_set(em->bm, l->e->v1, TRUE);
@@ -426,10 +426,10 @@ void uvedit_edge_deselect(BMEditMesh *em, Scene *scene, BMLoop *l)
{
ToolSettings *ts= scene->toolsettings;
- if(ts->uv_flag & UV_SYNC_SELECTION) {
- if(ts->selectmode & SCE_SELECT_FACE)
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->selectmode & SCE_SELECT_FACE)
BM_elem_select_set(em->bm, l->f, FALSE);
- else if(ts->selectmode & SCE_SELECT_EDGE)
+ else if (ts->selectmode & SCE_SELECT_EDGE)
BM_elem_select_set(em->bm, l->e, FALSE);
else {
BM_elem_select_set(em->bm, l->e->v1, FALSE);
@@ -451,8 +451,8 @@ int uvedit_uv_selected(BMEditMesh *em, Scene *scene, BMLoop *l)
{
ToolSettings *ts= scene->toolsettings;
- if(ts->uv_flag & UV_SYNC_SELECTION) {
- if(ts->selectmode & SCE_SELECT_FACE)
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->selectmode & SCE_SELECT_FACE)
return BM_elem_flag_test(l->f, BM_ELEM_SELECT);
else
return BM_elem_flag_test(l->v, BM_ELEM_SELECT);
@@ -468,8 +468,8 @@ void uvedit_uv_select(BMEditMesh *em, Scene *scene, BMLoop *l)
{
ToolSettings *ts= scene->toolsettings;
- if(ts->uv_flag & UV_SYNC_SELECTION) {
- if(ts->selectmode & SCE_SELECT_FACE)
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->selectmode & SCE_SELECT_FACE)
BM_elem_select_set(em->bm, l->f, TRUE);
else
BM_elem_select_set(em->bm, l->v, TRUE);
@@ -485,8 +485,8 @@ void uvedit_uv_deselect(BMEditMesh *em, Scene *scene, BMLoop *l)
{
ToolSettings *ts= scene->toolsettings;
- if(ts->uv_flag & UV_SYNC_SELECTION) {
- if(ts->selectmode & SCE_SELECT_FACE)
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->selectmode & SCE_SELECT_FACE)
BM_elem_select_set(em->bm, l->f, FALSE);
else
BM_elem_select_set(em->bm, l->v, FALSE);
@@ -502,7 +502,7 @@ void uvedit_uv_deselect(BMEditMesh *em, Scene *scene, BMLoop *l)
void uvedit_live_unwrap_update(SpaceImage *sima, Scene *scene, Object *obedit)
{
- if(sima && (sima->flag & SI_LIVE_UNWRAP)) {
+ if (sima && (sima->flag & SI_LIVE_UNWRAP)) {
ED_uvedit_live_unwrap_begin(scene, obedit);
ED_uvedit_live_unwrap_re_solve();
ED_uvedit_live_unwrap_end(0);
@@ -529,7 +529,7 @@ void poly_uv_center(BMEditMesh *em, BMFace *f, float cent[2])
void uv_center(float uv[][2], float cent[2], int quad)
{
- if(quad) {
+ if (quad) {
cent[0] = (uv[0][0] + uv[1][0] + uv[2][0] + uv[3][0]) / 4.0f;
cent[1] = (uv[0][1] + uv[1][1] + uv[2][1] + uv[3][1]) / 4.0f;
}
@@ -541,7 +541,7 @@ void uv_center(float uv[][2], float cent[2], int quad)
float uv_area(float uv[][2], int quad)
{
- if(quad)
+ if (quad)
return area_tri_v2(uv[0], uv[1], uv[2]) + area_tri_v2(uv[0], uv[2], uv[3]);
else
return area_tri_v2(uv[0], uv[1], uv[2]);
@@ -552,7 +552,7 @@ float poly_uv_area(float uv[][2], int len)
//BMESH_TODO: make this not suck
//maybe use scanfill? I dunno.
- if(len >= 4)
+ if (len >= 4)
return area_tri_v2(uv[0], uv[1], uv[2]) + area_tri_v2(uv[0], uv[2], uv[3]);
else
return area_tri_v2(uv[0], uv[1], uv[2]);
@@ -599,7 +599,7 @@ int ED_uvedit_minmax(Scene *scene, Image *ima, Object *obedit, float *min, float
sel= 0;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -627,7 +627,7 @@ static int ED_uvedit_median(Scene *scene, Image *ima, Object *obedit, float co[3
zero_v3(co);
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -649,8 +649,8 @@ static int uvedit_center(Scene *scene, Image *ima, Object *obedit, float *cent,
float min[2], max[2];
int change= 0;
- if(mode==V3D_CENTER) { /* bounding box */
- if(ED_uvedit_minmax(scene, ima, obedit, min, max)) {
+ if (mode==V3D_CENTER) { /* bounding box */
+ if (ED_uvedit_minmax(scene, ima, obedit, min, max)) {
change = 1;
cent[0]= (min[0]+max[0])/2.0f;
@@ -658,13 +658,13 @@ static int uvedit_center(Scene *scene, Image *ima, Object *obedit, float *cent,
}
}
else {
- if(ED_uvedit_median(scene, ima, obedit, cent)) {
+ if (ED_uvedit_median(scene, ima, obedit, cent)) {
change = 1;
}
}
- if(change) {
+ if (change) {
return 1;
}
@@ -690,7 +690,7 @@ void uv_find_nearest_edge(Scene *scene, Image *ima, BMEditMesh *em, float co[2],
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
i = 0;
@@ -700,7 +700,7 @@ void uv_find_nearest_edge(Scene *scene, Image *ima, BMEditMesh *em, float co[2],
dist= dist_to_line_segment_v2(co, luv->uv, nextluv->uv);
- if(dist < mindist) {
+ if (dist < mindist) {
hit->tf= tf;
hit->efa= efa;
@@ -739,7 +739,7 @@ static void find_nearest_uv_face(Scene *scene, Image *ima, BMEditMesh *em, float
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
cent[0]= cent[1]= 0.0f;
@@ -753,7 +753,7 @@ static void find_nearest_uv_face(Scene *scene, Image *ima, BMEditMesh *em, float
cent[1] /= efa->len;
dist= fabs(co[0]- cent[0]) + fabs(co[1]- cent[1]);
- if(dist < mindist) {
+ if (dist < mindist) {
hit->tf= tf;
hit->efa= efa;
mindist= dist;
@@ -767,7 +767,7 @@ static int nearest_uv_between(BMEditMesh *em, BMFace *efa, int UNUSED(nverts), i
BMLoop *l;
MLoopUV *luv;
BMIter iter;
- float m[3], v1[3], v2[3], c1, c2, *uv1, *uv2, *uv3;
+ float m[3], v1[3], v2[3], c1, c2, *uv1, /* *uv2, */ /* UNUSED */ *uv3;
int id1, id2, i;
id1= (id+efa->len-1)%efa->len;
@@ -783,7 +783,7 @@ static int nearest_uv_between(BMEditMesh *em, BMFace *efa, int UNUSED(nverts), i
if (i == id1)
uv1 = luv->uv;
else if (i == id)
- uv2 = luv->uv;
+ ; /* uv2 = luv->uv; */ /* UNUSED */
else if (i == id2)
uv3 = luv->uv;
@@ -797,7 +797,7 @@ static int nearest_uv_between(BMEditMesh *em, BMFace *efa, int UNUSED(nverts), i
c1= v1[0]*m[1] - v1[1]*m[0];
c2= v1[0]*v2[1] - v1[1]*v2[0];
- if(c1*c2 < 0.0f)
+ if (c1*c2 < 0.0f)
return 0;
/* m and v1 on same side of v-v2? */
@@ -830,21 +830,21 @@ void uv_find_nearest_vert(Scene *scene, Image *ima, BMEditMesh *em,
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
i = 0;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if(penalty && uvedit_uv_selected(em, scene, l))
+ if (penalty && uvedit_uv_selected(em, scene, l))
dist= fabs(co[0]-luv->uv[0])+penalty[0] + fabs(co[1]-luv->uv[1])+penalty[1];
else
dist= fabs(co[0]-luv->uv[0]) + fabs(co[1]-luv->uv[1]);
- if(dist<=mindist) {
- if(dist==mindist)
- if(!nearest_uv_between(em, efa, efa->len, i, co, luv->uv)) {
+ if (dist<=mindist) {
+ if (dist==mindist)
+ if (!nearest_uv_between(em, efa, efa->len, i, co, luv->uv)) {
i++;
continue;
}
@@ -883,14 +883,14 @@ int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, float co[2],
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
dist= fabs(co[0]-luv->uv[0]) + fabs(co[1]-luv->uv[1]);
- if(dist<=mindist) {
+ if (dist<=mindist) {
mindist= dist;
uv[0]= luv->uv[0];
@@ -910,14 +910,14 @@ static void uv_vertex_loop_flag(UvMapVert *first)
UvMapVert *iterv;
int count= 0;
- for(iterv=first; iterv; iterv=iterv->next) {
- if(iterv->separate && iterv!=first)
+ for (iterv=first; iterv; iterv=iterv->next) {
+ if (iterv->separate && iterv!=first)
break;
count++;
}
- if(count < 5)
+ if (count < 5)
first->flag= 1;
}
@@ -929,10 +929,10 @@ static UvMapVert *uv_vertex_map_get(UvVertMap *vmap, BMFace *efa, int a)
l = BM_iter_at_index(NULL, BM_LOOPS_OF_FACE, efa, a);
first= EDBM_get_uv_map_vert(vmap, BM_elem_index_get(l->v));
- for(iterv=first; iterv; iterv=iterv->next) {
- if(iterv->separate)
+ for (iterv=first; iterv; iterv=iterv->next) {
+ if (iterv->separate)
first= iterv;
- if(iterv->f == BM_elem_index_get(efa))
+ if (iterv->f == BM_elem_index_get(efa))
return first;
}
@@ -945,8 +945,8 @@ UvElement *ED_get_uv_element(UvElementMap *map, BMFace *efa, BMLoop *l)
element = map->vert[BM_elem_index_get(l->v)];
- for(; element; element = element->next)
- if(element->face == efa)
+ for (; element; element = element->next)
+ if (element->face == efa)
return element;
return NULL;
@@ -959,18 +959,18 @@ static int uv_edge_tag_faces(BMEditMesh *em, UvMapVert *first1, UvMapVert *first
int tot = 0;
/* count number of faces this edge has */
- for(iterv1=first1; iterv1; iterv1=iterv1->next) {
- if(iterv1->separate && iterv1 != first1)
+ for (iterv1=first1; iterv1; iterv1=iterv1->next) {
+ if (iterv1->separate && iterv1 != first1)
break;
- for(iterv2=first2; iterv2; iterv2=iterv2->next) {
- if(iterv2->separate && iterv2 != first2)
+ for (iterv2=first2; iterv2; iterv2=iterv2->next) {
+ if (iterv2->separate && iterv2 != first2)
break;
- if(iterv1->f == iterv2->f) {
+ if (iterv1->f == iterv2->f) {
/* if face already tagged, don't do this edge */
efa= EDBM_get_face_for_index(em, iterv1->f);
- if(BMO_elem_flag_test(em->bm, efa, EFA_F1_FLAG))
+ if (BMO_elem_flag_test(em->bm, efa, EFA_F1_FLAG))
return 0;
tot++;
@@ -979,21 +979,21 @@ static int uv_edge_tag_faces(BMEditMesh *em, UvMapVert *first1, UvMapVert *first
}
}
- if(*totface == 0) /* start edge */
+ if (*totface == 0) /* start edge */
*totface= tot;
- else if(tot != *totface) /* check for same number of faces as start edge */
+ else if (tot != *totface) /* check for same number of faces as start edge */
return 0;
/* tag the faces */
- for(iterv1=first1; iterv1; iterv1=iterv1->next) {
- if(iterv1->separate && iterv1 != first1)
+ for (iterv1=first1; iterv1; iterv1=iterv1->next) {
+ if (iterv1->separate && iterv1 != first1)
break;
- for(iterv2=first2; iterv2; iterv2=iterv2->next) {
- if(iterv2->separate && iterv2 != first2)
+ for (iterv2=first2; iterv2; iterv2=iterv2->next) {
+ if (iterv2->separate && iterv2 != first2)
break;
- if(iterv1->f == iterv2->f) {
+ if (iterv1->f == iterv2->f) {
efa= EDBM_get_face_for_index(em, iterv1->f);
BMO_elem_flag_enable(em->bm, efa, EFA_F1_FLAG);
break;
@@ -1022,7 +1022,7 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
count = 0;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- if(!extend) {
+ if (!extend) {
uvedit_face_deselect(scene, em, efa);
}
@@ -1044,12 +1044,12 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
starttotf= 0;
uv_edge_tag_faces(em, iterv1, iterv2, &starttotf);
- /* sorry, first edge isnt even ok */
- if(iterv1->flag==0 && iterv2->flag==0) looking= 0;
+ /* sorry, first edge isn't even ok */
+ if (iterv1->flag==0 && iterv2->flag==0) looking= 0;
else looking= 1;
/* iterate */
- while(looking) {
+ while (looking) {
looking= 0;
/* find correct valence edges which are not tagged yet, but connect to tagged one */
@@ -1057,9 +1057,9 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!BMO_elem_flag_test(em->bm, efa, EFA_F1_FLAG) && uvedit_face_visible(scene, ima, efa, tf)) {
+ if (!BMO_elem_flag_test(em->bm, efa, EFA_F1_FLAG) && uvedit_face_visible(scene, ima, efa, tf)) {
nverts= efa->len;
- for(a=0; a<nverts; a++) {
+ for (a=0; a<nverts; a++) {
/* check face not hidden and not tagged */
iterv1= uv_vertex_map_get(vmap, efa, a);
iterv2= uv_vertex_map_get(vmap, efa, (a+1)%nverts);
@@ -1068,8 +1068,8 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
continue;
/* check if vertex is tagged and has right valence */
- if(iterv1->flag || iterv2->flag) {
- if(uv_edge_tag_faces(em, iterv1, iterv2, &starttotf)) {
+ if (iterv1->flag || iterv2->flag) {
+ if (uv_edge_tag_faces(em, iterv1, iterv2, &starttotf)) {
looking= 1;
BMO_elem_flag_enable(em->bm, efa, EFA_F1_FLAG);
@@ -1090,8 +1090,8 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
iterv1->flag= 1;
iterv2->flag= 1;
- if(extend) {
- if(uvedit_uv_selected(em, scene, hit->l))
+ if (extend) {
+ if (uvedit_uv_selected(em, scene, hit->l))
select= 0;
else
select= 1;
@@ -1104,8 +1104,8 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
iterv1= uv_vertex_map_get(vmap, efa, a);
- if(iterv1->flag) {
- if(select) uvedit_uv_select(em, scene, l);
+ if (iterv1->flag) {
+ if (select) uvedit_uv_select(em, scene, l);
else uvedit_uv_deselect(em, scene, l);
}
@@ -1131,25 +1131,24 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[
MLoopUV *luv;
UvVertMap *vmap;
UvMapVert *vlist, *iterv, *startv;
- int i, nverts, stacksize= 0, *stack;
+ int i, stacksize= 0, *stack;
unsigned int a;
char *flag;
EDBM_init_index_arrays(em, 0, 0, 1); /* we can use this too */
vmap= EDBM_make_uv_vert_map(em, 1, 1, limit);
- if(vmap == NULL)
+ if (vmap == NULL)
return;
stack= MEM_mallocN(sizeof(*stack)*(em->bm->totface+1), "UvLinkStack");
flag= MEM_callocN(sizeof(*flag)*em->bm->totface, "UvLinkFlag");
- if(!hit) {
- a = 0;
- BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+ if (!hit) {
+ BM_ITER_INDEX(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL, a) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(uvedit_face_visible(scene, ima, efa, tf)) {
+ if (uvedit_face_visible(scene, ima, efa, tf)) {
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
@@ -1163,12 +1162,11 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[
}
}
}
- a++;
}
else {
a = 0;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- if(efa == hit->efa) {
+ if (efa == hit->efa) {
stack[stacksize]= a;
stacksize++;
flag[a]= 1;
@@ -1179,7 +1177,7 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[
}
}
- while(stacksize > 0) {
+ while (stacksize > 0) {
int j;
stacksize--;
@@ -1187,14 +1185,12 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[
j = 0;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- if(j==a)
+ if (j==a)
break;
j++;
}
- nverts= efa->len;
-
i = 0;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -1203,17 +1199,17 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[
startv= vlist;
- for(iterv=vlist; iterv; iterv=iterv->next) {
- if(iterv->separate)
+ for (iterv=vlist; iterv; iterv=iterv->next) {
+ if (iterv->separate)
startv= iterv;
- if(iterv->f == a)
+ if (iterv->f == a)
break;
}
- for(iterv=startv; iterv; iterv=iterv->next) {
- if((startv != iterv) && (iterv->separate))
+ for (iterv=startv; iterv; iterv=iterv->next) {
+ if ((startv != iterv) && (iterv->separate))
break;
- else if(!flag[iterv->f]) {
+ else if (!flag[iterv->f]) {
flag[iterv->f]= 1;
stack[stacksize]= iterv->f;
stacksize++;
@@ -1224,7 +1220,7 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[
}
}
- if(!extend) {
+ if (!extend) {
a = 0;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -1259,7 +1255,7 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[
a++;
}
- if(efa) {
+ if (efa) {
a = 0;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
if (!flag[a]) {
@@ -1345,20 +1341,20 @@ static void weld_align_uv(bContext *C, int tool)
INIT_MINMAX2(min, max);
- if(tool == 'a') {
+ if (tool == 'a') {
BMFace *efa;
BMLoop *l;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
if (uvedit_uv_selected(em, scene, l)) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- DO_MINMAX2(luv->uv, min, max)
+ DO_MINMAX2(luv->uv, min, max);
}
}
}
@@ -1368,13 +1364,13 @@ static void weld_align_uv(bContext *C, int tool)
uvedit_center(scene, ima, obedit, cent, 0);
- if(tool == 'x' || tool == 'w') {
+ if (tool == 'x' || tool == 'w') {
BMFace *efa;
BMLoop *l;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -1387,13 +1383,13 @@ static void weld_align_uv(bContext *C, int tool)
}
}
- if(tool == 'y' || tool == 'w') {
+ if (tool == 'y' || tool == 'w') {
BMFace *efa;
BMLoop *l;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -1406,7 +1402,7 @@ static void weld_align_uv(bContext *C, int tool)
}
}
- if(tool == 's' || tool == 't' || tool == 'u') {
+ if (tool == 's' || tool == 't' || tool == 'u') {
BMEdge *eed;
BMLoop *l;
BMVert *eve;
@@ -1466,7 +1462,7 @@ static void weld_align_uv(bContext *C, int tool)
/* walk over edges, building an array of verts in a line */
while (eve) {
BLI_array_append(eve_line, eve);
- /* dont touch again */
+ /* don't touch again */
BM_elem_flag_disable(eve, BM_ELEM_TAG);
eve_next = NULL;
@@ -1553,14 +1549,14 @@ static void UV_OT_align(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Align";
- ot->description= "Align selected UV vertices to an axis";
- ot->idname= "UV_OT_align";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Align";
+ ot->description = "Align selected UV vertices to an axis";
+ ot->idname = "UV_OT_align";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= align_exec;
- ot->poll= ED_operator_image_active; /* requires space image */;
+ ot->exec = align_exec;
+ ot->poll = ED_operator_image_active; /* requires space image */;
/* properties */
RNA_def_enum(ot->srna, "axis", axis_items, 'a', "Axis", "Axis to align UV locations on");
@@ -1578,14 +1574,14 @@ static int weld_exec(bContext *C, wmOperator *UNUSED(op))
static void UV_OT_weld(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Weld";
- ot->description= "Weld selected UV vertices together";
- ot->idname= "UV_OT_weld";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Weld";
+ ot->description = "Weld selected UV vertices together";
+ ot->idname = "UV_OT_weld";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= weld_exec;
- ot->poll= ED_operator_uvedit;
+ ot->exec = weld_exec;
+ ot->poll = ED_operator_uvedit;
}
@@ -1610,11 +1606,11 @@ static void select_all_perform(bContext *C, int action)
em = BMEdit_FromObject(obedit);
ima = CTX_data_edit_image(C);
- if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
switch (action) {
case SEL_TOGGLE:
- EDBM_toggle_select_all(BMEdit_FromObject(obedit));
+ EDBM_select_toggle_all(BMEdit_FromObject(obedit));
break;
case SEL_SELECT:
EDBM_flag_enable_all(em, BM_ELEM_SELECT);
@@ -1633,7 +1629,7 @@ static void select_all_perform(bContext *C, int action)
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -1651,7 +1647,7 @@ static void select_all_perform(bContext *C, int action)
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -1688,14 +1684,14 @@ static int select_all_exec(bContext *C, wmOperator *op)
static void UV_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select or Deselect All";
- ot->description= "Change selection of all UV vertices";
- ot->idname= "UV_OT_select_all";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "(De)select All";
+ ot->description = "Change selection of all UV vertices";
+ ot->idname = "UV_OT_select_all";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= select_all_exec;
- ot->poll= ED_operator_uvedit;
+ ot->exec = select_all_exec;
+ ot->poll = ED_operator_uvedit;
WM_operator_properties_select_all(ot);
}
@@ -1708,16 +1704,16 @@ static int sticky_select(float *limit, int hitv[4], int v, float *hituv[4], floa
/* this function test if some vertex needs to selected
* in addition to the existing ones due to sticky select */
- if(sticky == SI_STICKY_DISABLE)
+ if (sticky == SI_STICKY_DISABLE)
return 0;
- for(i=0; i<hitlen; i++) {
- if(hitv[i] == v) {
- if(sticky == SI_STICKY_LOC) {
- if(fabsf(hituv[i][0]-uv[0]) < limit[0] && fabsf(hituv[i][1]-uv[1]) < limit[1])
+ for (i=0; i<hitlen; i++) {
+ if (hitv[i] == v) {
+ if (sticky == SI_STICKY_LOC) {
+ if (fabsf(hituv[i][0]-uv[0]) < limit[0] && fabsf(hituv[i][1]-uv[1]) < limit[1])
return 1;
}
- else if(sticky == SI_STICKY_VERTEX)
+ else if (sticky == SI_STICKY_VERTEX)
return 1;
}
}
@@ -1741,7 +1737,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
NearestHit hit;
int i, select = 1, selectmode, sticky, sync, *hitv=NULL, nvert;
BLI_array_declare(hitv);
- int flush = 0, hitlen=0; /* 0 == dont flush, 1 == sel, -1 == desel; only use when selection sync is enabled */
+ int flush = 0, hitlen=0; /* 0 == don't flush, 1 == sel, -1 == desel; only use when selection sync is enabled */
float limit[2], **hituv = NULL;
BLI_array_declare(hituv);
float penalty[2];
@@ -1756,12 +1752,12 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
uvedit_pixel_to_float(sima, penalty, 5.0f / sima->zoom);
/* retrieve operation mode */
- if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
sync= 1;
- if(ts->selectmode & SCE_SELECT_FACE)
+ if (ts->selectmode & SCE_SELECT_FACE)
selectmode= UV_SELECT_FACE;
- else if(ts->selectmode & SCE_SELECT_EDGE)
+ else if (ts->selectmode & SCE_SELECT_EDGE)
selectmode= UV_SELECT_EDGE;
else
selectmode= UV_SELECT_VERTEX;
@@ -1775,10 +1771,10 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
}
/* find nearest element */
- if(loop) {
+ if (loop) {
/* find edge */
uv_find_nearest_edge(scene, ima, em, co, &hit);
- if(hit.efa == NULL) {
+ if (hit.efa == NULL) {
BLI_array_free(hitv);
BLI_array_free(hituv);
return OPERATOR_CANCELLED;
@@ -1786,10 +1782,10 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
hitlen = 0;
}
- else if(selectmode == UV_SELECT_VERTEX) {
+ else if (selectmode == UV_SELECT_VERTEX) {
/* find vertex */
uv_find_nearest_vert(scene, ima, em, co, penalty, &hit);
- if(hit.efa == NULL) {
+ if (hit.efa == NULL) {
BLI_array_free(hitv);
BLI_array_free(hituv);
return OPERATOR_CANCELLED;
@@ -1798,7 +1794,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
/* mark 1 vertex as being hit */
BLI_array_growitems(hitv, hit.efa->len);
BLI_array_growitems(hituv, hit.efa->len);
- for(i=0; i<hit.efa->len; i++) {
+ for (i=0; i<hit.efa->len; i++) {
hitv[i]= 0xFFFFFFFF;
}
@@ -1807,10 +1803,10 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
hitlen = hit.efa->len;
}
- else if(selectmode == UV_SELECT_EDGE) {
+ else if (selectmode == UV_SELECT_EDGE) {
/* find edge */
uv_find_nearest_edge(scene, ima, em, co, &hit);
- if(hit.efa == NULL) {
+ if (hit.efa == NULL) {
BLI_array_free(hitv);
BLI_array_free(hituv);
return OPERATOR_CANCELLED;
@@ -1832,10 +1828,10 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
hitlen = hit.efa->len;
}
- else if(selectmode == UV_SELECT_FACE) {
+ else if (selectmode == UV_SELECT_FACE) {
/* find face */
find_nearest_uv_face(scene, ima, em, co, &hit);
- if(hit.efa == NULL) {
+ if (hit.efa == NULL) {
BLI_array_free(hitv);
BLI_array_free(hituv);
return OPERATOR_CANCELLED;
@@ -1858,10 +1854,10 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
hitlen = hit.efa->len;
}
- else if(selectmode == UV_SELECT_ISLAND) {
+ else if (selectmode == UV_SELECT_ISLAND) {
uv_find_nearest_vert(scene, ima, em, co, NULL, &hit);
- if(hit.efa==NULL) {
+ if (hit.efa==NULL) {
BLI_array_free(hitv);
BLI_array_free(hituv);
return OPERATOR_CANCELLED;
@@ -1877,16 +1873,16 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
}
/* do selection */
- if(loop) {
+ if (loop) {
flush= select_edgeloop(scene, ima, em, &hit, limit, extend);
}
- else if(selectmode == UV_SELECT_ISLAND) {
+ else if (selectmode == UV_SELECT_ISLAND) {
select_linked(scene, ima, em, limit, &hit, extend);
}
- else if(extend) {
- if(selectmode == UV_SELECT_VERTEX) {
+ else if (extend) {
+ if (selectmode == UV_SELECT_VERTEX) {
/* (de)select uv vertex */
- if(uvedit_uv_selected(em, scene, hit.l)) {
+ if (uvedit_uv_selected(em, scene, hit.l)) {
uvedit_uv_deselect(em, scene, hit.l);
select= 0;
}
@@ -1896,9 +1892,9 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
}
flush = 1;
}
- else if(selectmode == UV_SELECT_EDGE) {
+ else if (selectmode == UV_SELECT_EDGE) {
/* (de)select edge */
- if(uvedit_edge_selected(em, scene, hit.l)) {
+ if (uvedit_edge_selected(em, scene, hit.l)) {
uvedit_edge_deselect(em, scene, hit.l);
select= 0;
}
@@ -1908,9 +1904,9 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
}
flush = 1;
}
- else if(selectmode == UV_SELECT_FACE) {
+ else if (selectmode == UV_SELECT_FACE) {
/* (de)select face */
- if(uvedit_face_selected(scene, em, hit.efa)) {
+ if (uvedit_face_selected(scene, em, hit.efa)) {
uvedit_face_deselect(scene, em, hit.efa);
select= 0;
}
@@ -1922,20 +1918,20 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
}
/* (de)select sticky uv nodes */
- if(sticky != SI_STICKY_DISABLE) {
+ if (sticky != SI_STICKY_DISABLE) {
BM_mesh_elem_index_ensure(em->bm, BM_VERT);
/* deselect */
- if(select==0) {
+ if (select==0) {
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if(sticky_select(limit, hitv, BM_elem_index_get(l->v), hituv, luv->uv, sticky, hitlen))
+ if (sticky_select(limit, hitv, BM_elem_index_get(l->v), hituv, luv->uv, sticky, hitlen))
uvedit_uv_deselect(em, scene, l);
}
}
@@ -1945,12 +1941,12 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
else {
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if(sticky_select(limit, hitv, BM_elem_index_get(l->v), hituv, luv->uv, sticky, hitlen))
+ if (sticky_select(limit, hitv, BM_elem_index_get(l->v), hituv, luv->uv, sticky, hitlen))
uvedit_uv_select(em, scene, l);
}
}
@@ -1965,33 +1961,33 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
uvedit_face_deselect(scene, em, efa);
}
- if(selectmode == UV_SELECT_VERTEX) {
+ if (selectmode == UV_SELECT_VERTEX) {
/* select vertex */
uvedit_uv_select(em, scene, hit.l);
flush= 1;
}
- else if(selectmode == UV_SELECT_EDGE) {
+ else if (selectmode == UV_SELECT_EDGE) {
/* select edge */
uvedit_edge_select(em, scene, hit.l);
flush= 1;
}
- else if(selectmode == UV_SELECT_FACE) {
+ else if (selectmode == UV_SELECT_FACE) {
/* select face */
uvedit_face_select(scene, em, hit.efa);
}
/* select sticky uvs */
- if(sticky != SI_STICKY_DISABLE) {
+ if (sticky != SI_STICKY_DISABLE) {
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
- if(sticky == SI_STICKY_DISABLE) continue;
+ if (sticky == SI_STICKY_DISABLE) continue;
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if(sticky_select(limit, hitv, BM_elem_index_get(l->v), hituv, luv->uv, sticky, hitlen))
+ if (sticky_select(limit, hitv, BM_elem_index_get(l->v), hituv, luv->uv, sticky, hitlen))
uvedit_uv_select(em, scene, l);
flush= 1;
@@ -2002,14 +1998,16 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
#if 0 /* BM_elem_select_set API handles all of this? */
- if(sync) {
+ if (sync) {
/* flush for mesh selection */
- if(ts->selectmode != SCE_SELECT_FACE) {
- if(flush==1) EDBM_select_flush(em);
- else if(flush==-1) EDBM_deselect_flush(em);
+ if (ts->selectmode != SCE_SELECT_FACE) {
+ if (flush==1) EDBM_select_flush(em);
+ else if (flush==-1) EDBM_deselect_flush(em);
}
}
-
+#else
+ (void)flush; /* flush is otherwise UNUSED */
+ (void)sync; /* sync is otherwise UNUSED */
#endif
DAG_id_tag_update(obedit->data, 0);
@@ -2047,15 +2045,15 @@ static int select_invoke(bContext *C, wmOperator *op, wmEvent *event)
static void UV_OT_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select";
- ot->description= "Select UV vertices";
- ot->idname= "UV_OT_select";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Select";
+ ot->description = "Select UV vertices";
+ ot->idname = "UV_OT_select";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= select_exec;
- ot->invoke= select_invoke;
- ot->poll= ED_operator_image_active; /* requires space image */;
+ ot->exec = select_exec;
+ ot->invoke = select_invoke;
+ ot->poll = ED_operator_image_active; /* requires space image */;
/* properties */
RNA_def_boolean(ot->srna, "extend", 0,
@@ -2092,15 +2090,15 @@ static int select_loop_invoke(bContext *C, wmOperator *op, wmEvent *event)
static void UV_OT_select_loop(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Loop Select";
- ot->description= "Select a loop of connected UV vertices";
- ot->idname= "UV_OT_select_loop";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Loop Select";
+ ot->description = "Select a loop of connected UV vertices";
+ ot->idname = "UV_OT_select_loop";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= select_loop_exec;
- ot->invoke= select_loop_invoke;
- ot->poll= ED_operator_image_active; /* requires space image */;
+ ot->exec = select_loop_exec;
+ ot->invoke = select_loop_invoke;
+ ot->poll = ED_operator_image_active; /* requires space image */;
/* properties */
RNA_def_boolean(ot->srna, "extend", 0,
@@ -2124,7 +2122,7 @@ static int select_linked_internal(bContext *C, wmOperator *op, wmEvent *event, i
NearestHit hit, *hit_p= NULL;
- if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
BKE_report(op->reports, RPT_ERROR, "Can't select linked when sync selection is enabled");
return OPERATOR_CANCELLED;
}
@@ -2132,10 +2130,10 @@ static int select_linked_internal(bContext *C, wmOperator *op, wmEvent *event, i
extend= RNA_boolean_get(op->ptr, "extend");
uvedit_pixel_to_float(sima, limit, 0.05f);
- if(pick) {
+ if (pick) {
float co[2];
- if(event) {
+ if (event) {
/* invoke */
ARegion *ar= CTX_wm_region(C);
@@ -2167,14 +2165,14 @@ static int select_linked_exec(bContext *C, wmOperator *op)
static void UV_OT_select_linked(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Linked";
- ot->description= "Select all UV vertices linked to the active UV map";
- ot->idname= "UV_OT_select_linked";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Select Linked";
+ ot->description = "Select all UV vertices linked to the active UV map";
+ ot->idname = "UV_OT_select_linked";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= select_linked_exec;
- ot->poll= ED_operator_image_active; /* requires space image */
+ ot->exec = select_linked_exec;
+ ot->poll = ED_operator_image_active; /* requires space image */
/* properties */
RNA_def_boolean(ot->srna, "extend", 0,
@@ -2194,15 +2192,15 @@ static int select_linked_pick_exec(bContext *C, wmOperator *op)
static void UV_OT_select_linked_pick(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Linked Pick";
- ot->description= "Select all UV vertices linked under the mouse";
- ot->idname= "UV_OT_select_linked_pick";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Select Linked Pick";
+ ot->description = "Select all UV vertices linked under the mouse";
+ ot->idname = "UV_OT_select_linked_pick";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->invoke= select_linked_pick_invoke;
- ot->exec= select_linked_pick_exec;
- ot->poll= ED_operator_image_active; /* requires space image */;
+ ot->invoke = select_linked_pick_invoke;
+ ot->exec = select_linked_pick_exec;
+ ot->poll = ED_operator_image_active; /* requires space image */;
/* properties */
RNA_def_boolean(ot->srna, "extend", 0,
@@ -2227,7 +2225,7 @@ static int unlink_selection_exec(bContext *C, wmOperator *op)
MTexPoly *tf;
MLoopUV *luv;
- if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
BKE_report(op->reports, RPT_ERROR, "Can't unlink selection when sync selection is enabled");
return OPERATOR_CANCELLED;
}
@@ -2236,7 +2234,7 @@ static int unlink_selection_exec(bContext *C, wmOperator *op)
int desel = 0;
tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -2265,14 +2263,14 @@ static int unlink_selection_exec(bContext *C, wmOperator *op)
static void UV_OT_unlink_selected(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Unlink Selection";
- ot->description= "Unlink selected UV vertices from active UV map";
- ot->idname= "UV_OT_unlink_selected";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Unlink Selection";
+ ot->description = "Unlink selected UV vertices from active UV map";
+ ot->idname = "UV_OT_unlink_selected";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= unlink_selection_exec;
- ot->poll= ED_operator_uvedit;
+ ot->exec = unlink_selection_exec;
+ ot->poll = ED_operator_uvedit;
}
/* ******************** border select operator **************** */
@@ -2299,7 +2297,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
BMIter iter, liter;
/* MTexPoly *tf; */
- if((ts->uv_flag & UV_SYNC_SELECTION)==0 && sima->sticky == SI_STICKY_VERTEX) {
+ if ((ts->uv_flag & UV_SYNC_SELECTION)==0 && sima->sticky == SI_STICKY_VERTEX) {
/* Tag all verts as untouched, then touch the ones that have a face center
* in the loop and select all MLoopUV's that use a touched vert. */
BMVert *eve;
@@ -2330,7 +2328,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
}
}
}
- else if((ts->uv_flag & UV_SYNC_SELECTION)==0 && sima->sticky == SI_STICKY_LOC) {
+ else if ((ts->uv_flag & UV_SYNC_SELECTION)==0 && sima->sticky == SI_STICKY_LOC) {
BMFace *efa_vlist;
/* MTexPoly *tf_vlist; */ /* UNUSED */
UvMapVert *start_vlist=NULL, *vlist_iter;
@@ -2348,10 +2346,10 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
/* verts are numbered above in make_uv_vert_map_EM, make sure this stays true! */
/* BMESH_TODO - why keep this commented? - campbell */
#if 0
- for(a=0, eve= em->verts.first; eve; a++, eve= eve->next)
+ for (a=0, eve= em->verts.first; eve; a++, eve= eve->next)
eve->tmp.l = a;
#endif
- if(vmap == NULL) {
+ if (vmap == NULL) {
return;
}
@@ -2361,7 +2359,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
/* tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
- if(select)
+ if (select)
uvedit_uv_select(em, scene, l);
else
uvedit_uv_deselect(em, scene, l);
@@ -2369,10 +2367,10 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
vlist_iter= EDBM_get_uv_map_vert(vmap, BM_elem_index_get(l->v));
while (vlist_iter) {
- if(vlist_iter->separate)
+ if (vlist_iter->separate)
start_vlist = vlist_iter;
- if(efa_index == vlist_iter->f)
+ if (efa_index == vlist_iter->f)
break;
vlist_iter = vlist_iter->next;
@@ -2381,14 +2379,14 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
vlist_iter = start_vlist;
while (vlist_iter) {
- if(vlist_iter != start_vlist && vlist_iter->separate)
+ if (vlist_iter != start_vlist && vlist_iter->separate)
break;
- if(efa_index != vlist_iter->f) {
+ if (efa_index != vlist_iter->f) {
efa_vlist = EDBM_get_face_for_index(em, vlist_iter->f);
/* tf_vlist = CustomData_bmesh_get(&em->bm->pdata, efa_vlist->head.data, CD_MTEXPOLY); */ /* UNUSED */
- if(select)
+ if (select)
uvedit_uv_select(em, scene, BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa_vlist, vlist_iter->tfindex));
else
uvedit_uv_deselect(em, scene, BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa_vlist, vlist_iter->tfindex));
@@ -2405,7 +2403,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
else { /* SI_STICKY_DISABLE or ts->uv_flag & UV_SYNC_SELECTION */
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
if (BM_elem_flag_test(efa, BM_ELEM_TAG)) {
- if(select)
+ if (select)
uvedit_face_select(scene, em, efa);
else
uvedit_face_deselect(scene, em, efa);
@@ -2433,10 +2431,10 @@ static int border_select_exec(bContext *C, wmOperator *op)
int change, pinned, select, faces, extend;
/* get rectangle from operator */
- rect.xmin= RNA_int_get(op->ptr, "xmin");
- rect.ymin= RNA_int_get(op->ptr, "ymin");
- rect.xmax= RNA_int_get(op->ptr, "xmax");
- rect.ymax= RNA_int_get(op->ptr, "ymax");
+ rect.xmin = RNA_int_get(op->ptr, "xmin");
+ rect.ymin = RNA_int_get(op->ptr, "ymin");
+ rect.xmax = RNA_int_get(op->ptr, "xmax");
+ rect.ymax = RNA_int_get(op->ptr, "ymax");
UI_view2d_region_to_view(&ar->v2d, rect.xmin, rect.ymin, &rectf.xmin, &rectf.ymin);
UI_view2d_region_to_view(&ar->v2d, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax);
@@ -2446,16 +2444,16 @@ static int border_select_exec(bContext *C, wmOperator *op)
pinned= RNA_boolean_get(op->ptr, "pinned");
extend= RNA_boolean_get(op->ptr, "extend");
- if(!extend)
+ if (!extend)
select_all_perform(C, SEL_DESELECT);
- if(ts->uv_flag & UV_SYNC_SELECTION)
+ if (ts->uv_flag & UV_SYNC_SELECTION)
faces= (ts->selectmode == SCE_SELECT_FACE);
else
faces= (ts->uv_selectmode == UV_SELECT_FACE);
/* do actual selection */
- if(faces && !pinned) {
+ if (faces && !pinned) {
/* handle face selection mode */
float cent[2];
@@ -2466,9 +2464,9 @@ static int border_select_exec(bContext *C, wmOperator *op)
BM_elem_flag_disable(efa, BM_ELEM_TAG);
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(uvedit_face_visible(scene, ima, efa, tf)) {
+ if (uvedit_face_visible(scene, ima, efa, tf)) {
poly_uv_center(em, efa, cent);
- if(BLI_in_rctf(&rectf, cent[0], cent[1])) {
+ if (BLI_in_rctf(&rectf, cent[0], cent[1])) {
BM_elem_flag_enable(efa, BM_ELEM_TAG);
change = 1;
}
@@ -2476,7 +2474,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
}
/* (de)selects all tagged faces and deals with sticky modes */
- if(change)
+ if (change)
uv_faces_do_sticky(C, sima, scene, obedit, select);
}
else {
@@ -2485,22 +2483,23 @@ static int border_select_exec(bContext *C, wmOperator *op)
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tf))
+ if (!uvedit_face_visible(scene, ima, efa, tf))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if(!pinned || (ts->uv_flag & UV_SYNC_SELECTION) ) {
+ if (!pinned || (ts->uv_flag & UV_SYNC_SELECTION) ) {
/* UV_SYNC_SELECTION - can't do pinned selection */
- if(BLI_in_rctf(&rectf, luv->uv[0], luv->uv[1])) {
- if(select) uvedit_uv_select(em, scene, l);
+ if (BLI_in_rctf(&rectf, luv->uv[0], luv->uv[1])) {
+ if (select) uvedit_uv_select(em, scene, l);
else uvedit_uv_deselect(em, scene, l);
}
- } else if(pinned) {
+ }
+ else if (pinned) {
if ((luv->flag & MLOOPUV_PINNED) &&
BLI_in_rctf(&rectf, luv->uv[0], luv->uv[1])) {
- if(select) uvedit_uv_select(em, scene, l);
+ if (select) uvedit_uv_select(em, scene, l);
else uvedit_uv_deselect(em, scene, l);
}
}
@@ -2508,12 +2507,12 @@ static int border_select_exec(bContext *C, wmOperator *op)
}
}
- if(change) {
+ if (change) {
/* make sure newly selected vert selection is updated*/
#if 0 /* BM_elem_select_set API handles all of this? */
- if(ts->uv_flag & UV_SYNC_SELECTION) {
- if(ts->selectmode != SCE_SELECT_FACE) {
- if(select) EDBM_select_flush(em);
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->selectmode != SCE_SELECT_FACE) {
+ if (select) EDBM_select_flush(em);
else EDBM_deselect_flush(em);
}
}
@@ -2530,19 +2529,19 @@ static int border_select_exec(bContext *C, wmOperator *op)
static void UV_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Select";
- ot->description= "Select UV vertices using border selection";
- ot->idname= "UV_OT_select_border";
+ ot->name = "Border Select";
+ ot->description = "Select UV vertices using border selection";
+ ot->idname = "UV_OT_select_border";
/* api callbacks */
- ot->invoke= WM_border_select_invoke;
- ot->exec= border_select_exec;
- ot->modal= WM_border_select_modal;
- ot->poll= ED_operator_image_active; /* requires space image */;
- ot->cancel= WM_border_select_cancel;
+ ot->invoke = WM_border_select_invoke;
+ ot->exec = border_select_exec;
+ ot->modal = WM_border_select_modal;
+ ot->poll = ED_operator_image_active; /* requires space image */;
+ ot->cancel = WM_border_select_cancel;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_boolean(ot->srna, "pinned", 0, "Pinned", "Border select pinned UVs only");
@@ -2565,8 +2564,8 @@ static void select_uv_inside_ellipse(BMEditMesh *em, SpaceImage *UNUSED(sima), S
y= (uv[1] - offset[1])*ell[1];
r2 = x*x + y*y;
- if(r2 < 1.0f) {
- if(select) uvedit_uv_select(em, scene, l);
+ if (r2 < 1.0f) {
+ if (select) uvedit_uv_select(em, scene, l);
else uvedit_uv_deselect(em, scene, l);
}
}
@@ -2611,7 +2610,7 @@ static int circle_select_exec(bContext *C, wmOperator *op)
}
#if 0 //I think the BM_elem_select_set api stuff handles all this as necessary?
- if(select) EM_select_flush(em);
+ if (select) EM_select_flush(em);
else EM_deselect_flush(em);
#endif
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
@@ -2622,19 +2621,19 @@ static int circle_select_exec(bContext *C, wmOperator *op)
static void UV_OT_circle_select(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Circle Select";
- ot->description= "Select UV vertices using circle selection";
- ot->idname= "UV_OT_circle_select";
+ ot->name = "Circle Select";
+ ot->description = "Select UV vertices using circle selection";
+ ot->idname = "UV_OT_circle_select";
/* api callbacks */
- ot->invoke= WM_gesture_circle_invoke;
- ot->modal= WM_gesture_circle_modal;
- ot->exec= circle_select_exec;
- ot->poll= ED_operator_image_active; /* requires space image */;
- ot->cancel= WM_gesture_circle_cancel;
+ ot->invoke = WM_gesture_circle_invoke;
+ ot->modal = WM_gesture_circle_modal;
+ ot->exec = circle_select_exec;
+ ot->poll = ED_operator_image_active; /* requires space image */;
+ ot->cancel = WM_gesture_circle_cancel;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_int(ot->srna, "x", 0, INT_MIN, INT_MAX, "X", "", INT_MIN, INT_MAX);
@@ -2682,7 +2681,7 @@ static int snap_cursor_exec(bContext *C, wmOperator *op)
break;
}
- if(!change)
+ if (!change)
return OPERATOR_CANCELLED;
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_IMAGE, sima);
@@ -2698,14 +2697,14 @@ static void UV_OT_snap_cursor(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Snap Cursor";
- ot->description= "Snap cursor to target type";
- ot->idname= "UV_OT_snap_cursor";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Snap Cursor";
+ ot->description = "Snap cursor to target type";
+ ot->idname = "UV_OT_snap_cursor";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= snap_cursor_exec;
- ot->poll= ED_operator_image_active; /* requires space image */;
+ ot->exec = snap_cursor_exec;
+ ot->poll = ED_operator_image_active; /* requires space image */;
/* properties */
RNA_def_enum(ot->srna, "target", target_items, 0, "Target", "Target to snap the selected UVs to");
@@ -2725,11 +2724,11 @@ static int snap_uvs_to_cursor(Scene *scene, Image *ima, Object *obedit, SpaceIma
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tface= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tface))
+ if (!uvedit_face_visible(scene, ima, efa, tface))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
- if(uvedit_uv_selected(em, scene, l)) {
+ if (uvedit_uv_selected(em, scene, l)) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
copy_v2_v2(luv->uv, sima->cursor);
change= 1;
@@ -2767,10 +2766,11 @@ static int snap_uvs_to_adjacent_unselected(Scene *scene, Image *ima, Object *obe
* get unique indices and to count how much to malloc */
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tface= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tface)) {
+ if (!uvedit_face_visible(scene, ima, efa, tface)) {
BM_elem_flag_disable(efa, BM_ELEM_TAG);
continue;
- } else {
+ }
+ else {
BM_elem_flag_enable(efa, BM_ELEM_TAG);
}
@@ -2793,7 +2793,7 @@ static int snap_uvs_to_adjacent_unselected(Scene *scene, Image *ima, Object *obe
continue;
tface= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tface))
+ if (!uvedit_face_visible(scene, ima, efa, tface))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -2807,7 +2807,7 @@ static int snap_uvs_to_adjacent_unselected(Scene *scene, Image *ima, Object *obe
}
/* no other verts selected, bail out */
- if(!change) {
+ if (!change) {
MEM_freeN(coords);
MEM_freeN(usercount);
return change;
@@ -2819,7 +2819,7 @@ static int snap_uvs_to_adjacent_unselected(Scene *scene, Image *ima, Object *obe
continue;
tface= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tface))
+ if (!uvedit_face_visible(scene, ima, efa, tface))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -2856,7 +2856,7 @@ static int snap_uvs_to_pixels(SpaceImage *sima, Scene *scene, Object *obedit)
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tface= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tface))
+ if (!uvedit_face_visible(scene, ima, efa, tface))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -2892,7 +2892,7 @@ static int snap_selection_exec(bContext *C, wmOperator *op)
break;
}
- if(!change)
+ if (!change)
return OPERATOR_CANCELLED;
uvedit_live_unwrap_update(sima, scene, obedit);
@@ -2911,14 +2911,14 @@ static void UV_OT_snap_selected(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Snap Selection";
- ot->description= "Snap selected UV vertices to target type";
- ot->idname= "UV_OT_snap_selected";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Snap Selection";
+ ot->description = "Snap selected UV vertices to target type";
+ ot->idname = "UV_OT_snap_selected";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= snap_selection_exec;
- ot->poll= ED_operator_image_active; /* requires space image */;
+ ot->exec = snap_selection_exec;
+ ot->poll = ED_operator_image_active; /* requires space image */;
/* properties */
RNA_def_enum(ot->srna, "target", target_items, 0, "Target", "Target to snap the selected UVs to");
@@ -2941,16 +2941,17 @@ static int pin_exec(bContext *C, wmOperator *op)
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tface= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tface))
+ if (!uvedit_face_visible(scene, ima, efa, tface))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
- if(!clear) {
+ if (!clear) {
if (uvedit_uv_selected(em, scene, l))
luv->flag |= MLOOPUV_PINNED;
- } else {
+ }
+ else {
if (uvedit_uv_selected(em, scene, l))
luv->flag &= ~MLOOPUV_PINNED;
}
@@ -2965,14 +2966,14 @@ static int pin_exec(bContext *C, wmOperator *op)
static void UV_OT_pin(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Pin";
- ot->description= "Set/clear selected UV vertices as anchored between multiple unwrap operations";
- ot->idname= "UV_OT_pin";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Pin";
+ ot->description = "Set/clear selected UV vertices as anchored between multiple unwrap operations";
+ ot->idname = "UV_OT_pin";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= pin_exec;
- ot->poll= ED_operator_uvedit;
+ ot->exec = pin_exec;
+ ot->poll = ED_operator_uvedit;
/* properties */
RNA_def_boolean(ot->srna, "clear", 0, "Clear", "Clear pinning for the selection instead of setting it");
@@ -2994,7 +2995,7 @@ static int select_pinned_exec(bContext *C, wmOperator *UNUSED(op))
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
tface= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
- if(!uvedit_face_visible(scene, ima, efa, tface))
+ if (!uvedit_face_visible(scene, ima, efa, tface))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -3013,14 +3014,14 @@ static int select_pinned_exec(bContext *C, wmOperator *UNUSED(op))
static void UV_OT_select_pinned(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Selected Pinned";
- ot->description= "Select all pinned UV vertices";
- ot->idname= "UV_OT_select_pinned";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Selected Pinned";
+ ot->description = "Select all pinned UV vertices";
+ ot->idname = "UV_OT_select_pinned";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= select_pinned_exec;
- ot->poll= ED_operator_uvedit;
+ ot->exec = select_pinned_exec;
+ ot->poll = ED_operator_uvedit;
}
/********************** hide operator *********************/
@@ -3039,7 +3040,7 @@ static int hide_exec(bContext *C, wmOperator *op)
int swap = RNA_boolean_get(op->ptr, "unselected");
int facemode= sima ? sima->flag & SI_SELACTFACE : 0;
- if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
EDBM_hide_mesh(em, swap);
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
@@ -3075,7 +3076,8 @@ static int hide_exec(bContext *C, wmOperator *op)
BM_elem_select_set(em->bm, efa, FALSE);
uvedit_face_deselect(scene, em, efa);
}
- } else if(em->selectmode == SCE_SELECT_FACE) {
+ }
+ else if (em->selectmode == SCE_SELECT_FACE) {
/*check if a UV is selected*/
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
@@ -3084,7 +3086,8 @@ static int hide_exec(bContext *C, wmOperator *op)
}
luv->flag &= ~MLOOPUV_VERTSEL;
}
- } else {
+ }
+ else {
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
if (luv->flag & MLOOPUV_VERTSEL) {
@@ -3106,14 +3109,14 @@ static int hide_exec(bContext *C, wmOperator *op)
static void UV_OT_hide(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Hide Selected";
- ot->description= "Hide (un)selected UV vertices";
- ot->idname= "UV_OT_hide";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Hide Selected";
+ ot->description = "Hide (un)selected UV vertices";
+ ot->idname = "UV_OT_hide";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= hide_exec;
- ot->poll= ED_operator_uvedit;
+ ot->exec = hide_exec;
+ ot->poll = ED_operator_uvedit;
/* props */
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
@@ -3136,14 +3139,14 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
int stickymode= sima ? (sima->sticky != SI_STICKY_DISABLE) : 1;
/* call the mesh function if we are in mesh sync sel */
- if(ts->uv_flag & UV_SYNC_SELECTION) {
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
EDBM_reveal_mesh(em);
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
- if(facemode) {
- if(em->selectmode == SCE_SELECT_FACE) {
+ if (facemode) {
+ if (em->selectmode == SCE_SELECT_FACE) {
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && !BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
BM_elem_select_set(em->bm, efa, TRUE);
@@ -3156,7 +3159,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
}
else {
/* enable adjacent faces to have disconnected UV selections if sticky is disabled */
- if(!stickymode) {
+ if (!stickymode) {
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && !BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
int totsel=0;
@@ -3174,7 +3177,8 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
}
}
}
- } else {
+ }
+ else {
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && !BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -3189,7 +3193,8 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
}
}
}
- } else if(em->selectmode == SCE_SELECT_FACE) {
+ }
+ else if (em->selectmode == SCE_SELECT_FACE) {
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && !BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -3200,7 +3205,8 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
BM_elem_select_set(em->bm, efa, TRUE);
}
}
- } else {
+ }
+ else {
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && !BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -3223,14 +3229,14 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
static void UV_OT_reveal(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reveal Hidden";
- ot->description= "Reveal all hidden UV vertices";
- ot->idname= "UV_OT_reveal";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Reveal Hidden";
+ ot->description = "Reveal all hidden UV vertices";
+ ot->idname = "UV_OT_reveal";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= reveal_exec;
- ot->poll= ED_operator_uvedit;
+ ot->exec = reveal_exec;
+ ot->poll = ED_operator_uvedit;
}
/******************** set 3d cursor operator ********************/
@@ -3240,7 +3246,7 @@ static int set_2d_cursor_exec(bContext *C, wmOperator *op)
SpaceImage *sima = CTX_wm_space_image(C);
float location[2];
- if(!sima)
+ if (!sima)
return OPERATOR_CANCELLED;
RNA_float_get_array(op->ptr, "location", location);
@@ -3266,17 +3272,17 @@ static int set_2d_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event)
static void UV_OT_cursor_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set 2D Cursor";
- ot->description= "Set 2D cursor location";
- ot->idname= "UV_OT_cursor_set";
+ ot->name = "Set 2D Cursor";
+ ot->description = "Set 2D cursor location";
+ ot->idname = "UV_OT_cursor_set";
/* api callbacks */
- ot->exec= set_2d_cursor_exec;
- ot->invoke= set_2d_cursor_invoke;
- ot->poll= ED_operator_image_active; /* requires space image */;
+ ot->exec = set_2d_cursor_exec;
+ ot->invoke = set_2d_cursor_invoke;
+ ot->poll = ED_operator_image_active; /* requires space image */;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in normalised (0.0-1.0) coordinates", -10.0f, 10.0f);
@@ -3292,7 +3298,7 @@ static int set_tile_exec(bContext *C, wmOperator *op)
RNA_int_get_array(op->ptr, "tile", tile);
- if(uvedit_set_tile(obedit, ima, tile[0] + ima->xrep*tile[1])) {
+ if (uvedit_set_tile(obedit, ima, tile[0] + ima->xrep*tile[1])) {
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_IMAGE, NULL);
@@ -3310,12 +3316,12 @@ static int set_tile_invoke(bContext *C, wmOperator *op, wmEvent *event)
float fx, fy;
int tile[2];
- if(!ima || !(ima->tpageflag & IMA_TILES))
+ if (!ima || !(ima->tpageflag & IMA_TILES))
return OPERATOR_CANCELLED;
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fx, &fy);
- if(fx >= 0.0f && fy >= 0.0f && fx < 1.0f && fy < 1.0f) {
+ if (fx >= 0.0f && fy >= 0.0f && fx < 1.0f && fy < 1.0f) {
fx= fx*ima->xrep;
fy= fy*ima->yrep;
@@ -3332,17 +3338,17 @@ static int set_tile_invoke(bContext *C, wmOperator *op, wmEvent *event)
static void UV_OT_tile_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Tile";
- ot->description= "Set UV image tile coordinates";
- ot->idname= "UV_OT_tile_set";
+ ot->name = "Set Tile";
+ ot->description = "Set UV image tile coordinates";
+ ot->idname = "UV_OT_tile_set";
/* api callbacks */
- ot->exec= set_tile_exec;
- ot->invoke= set_tile_invoke;
- ot->poll= ED_operator_image_active; /* requires space image */;
+ ot->exec = set_tile_exec;
+ ot->invoke = set_tile_invoke;
+ ot->poll = ED_operator_image_active; /* requires space image */;
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
RNA_def_int_vector(ot->srna, "tile", 2, NULL, 0, INT_MAX, "Tile", "Tile coordinate", 0, 10);
@@ -3366,7 +3372,7 @@ static int seams_from_islands_exec(bContext *C, wmOperator *op)
em = me->edit_btmesh;
bm = em->bm;
- if(!EDBM_texFaceCheck(em)) {
+ if (!EDBM_texFaceCheck(em)) {
return OPERATOR_CANCELLED;
}
@@ -3392,34 +3398,34 @@ static int seams_from_islands_exec(bContext *C, wmOperator *op)
UvMapVert *mv2cache = NULL, *mv2sep = NULL;
mvinit1 = vmap->vert[BM_elem_index_get(editedge->v1)];
- if(mark_seams)
+ if (mark_seams)
BM_elem_flag_disable(editedge, BM_ELEM_SEAM);
- for(mv1 = mvinit1; mv1 && !faces_separated; mv1 = mv1->next) {
- if(mv1->separate && commonFaces)
+ for (mv1 = mvinit1; mv1 && !faces_separated; mv1 = mv1->next) {
+ if (mv1->separate && commonFaces)
v1coincident = 0;
separated2 = 0;
efa1 = EDBM_get_face_for_index(em, mv1->f);
mvinit2 = vmap->vert[BM_elem_index_get(editedge->v2)];
- for(mv2 = mvinit2; mv2; mv2 = mv2->next) {
- if(mv2->separate)
+ for (mv2 = mvinit2; mv2; mv2 = mv2->next) {
+ if (mv2->separate)
mv2sep = mv2;
efa2 = EDBM_get_face_for_index(em, mv2->f);
- if(efa1 == efa2) {
+ if (efa1 == efa2) {
/* if v1 is not coincident no point in comparing */
- if(v1coincident) {
+ if (v1coincident) {
/* have we found previously anything? */
- if(mv2cache) {
+ if (mv2cache) {
/* flag seam unless proved to be coincident with previous hit */
separated2 = 1;
- for(mviter = mv2cache; mviter; mviter = mviter->next) {
- if(mviter->separate && mviter != mv2cache)
+ for (mviter = mv2cache; mviter; mviter = mviter->next) {
+ if (mviter->separate && mviter != mv2cache)
break;
/* coincident with previous hit, do not flag seam */
- if(mviter == mv2)
+ if (mviter == mv2)
separated2 = 0;
}
}
@@ -3432,7 +3438,7 @@ static int seams_from_islands_exec(bContext *C, wmOperator *op)
else
separated1 = 1;
- if(separated1 || separated2) {
+ if (separated1 || separated2) {
faces_separated = 1;
break;
}
@@ -3440,10 +3446,10 @@ static int seams_from_islands_exec(bContext *C, wmOperator *op)
}
}
- if(faces_separated) {
- if(mark_seams)
+ if (faces_separated) {
+ if (mark_seams)
BM_elem_flag_enable(editedge, BM_ELEM_SEAM);
- if(mark_sharp)
+ if (mark_sharp)
BM_elem_flag_disable(editedge, BM_ELEM_SMOOTH);
}
}
@@ -3463,16 +3469,16 @@ static int seams_from_islands_exec(bContext *C, wmOperator *op)
static void UV_OT_seams_from_islands(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Seams From Islands";
- ot->description= "Set mesh seams according to island setup in the UV editor";
- ot->idname= "UV_OT_seams_from_islands";
+ ot->name = "Seams From Islands";
+ ot->description = "Set mesh seams according to island setup in the UV editor";
+ ot->idname = "UV_OT_seams_from_islands";
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= seams_from_islands_exec;
- ot->poll= ED_operator_uvedit;
+ ot->exec = seams_from_islands_exec;
+ ot->poll = ED_operator_uvedit;
RNA_def_boolean(ot->srna, "mark_seams", 1, "Mark Seams", "Mark boundary edges as seams");
RNA_def_boolean(ot->srna, "mark_sharp", 0, "Mark Sharp", "Mark boundary edges as sharp");
@@ -3492,7 +3498,7 @@ static int mark_seam_exec(bContext *C, wmOperator *UNUSED(op))
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
BM_ITER(loop, &liter, bm, BM_LOOPS_OF_FACE, efa) {
- if(uvedit_edge_selected(em, scene, loop)) {
+ if (uvedit_edge_selected(em, scene, loop)) {
BM_elem_flag_enable(loop, BM_ELEM_SEAM);
}
}
@@ -3500,7 +3506,7 @@ static int mark_seam_exec(bContext *C, wmOperator *UNUSED(op))
me->drawflag |= ME_DRAWSEAMS;
- if(scene->toolsettings->edge_mode_live_unwrap)
+ if (scene->toolsettings->edge_mode_live_unwrap)
ED_unwrap_lscm(scene, ob, FALSE);
DAG_id_tag_update(&me->id, 0);
@@ -3512,16 +3518,16 @@ static int mark_seam_exec(bContext *C, wmOperator *UNUSED(op))
static void UV_OT_mark_seam(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Mark Seams";
- ot->description= "Mark selected UV edges as seams";
- ot->idname= "UV_OT_mark_seam";
+ ot->name = "Mark Seams";
+ ot->description = "Mark selected UV edges as seams";
+ ot->idname = "UV_OT_mark_seam";
/* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= mark_seam_exec;
- ot->poll= ED_operator_uvedit;
+ ot->exec = mark_seam_exec;
+ ot->poll = ED_operator_uvedit;
}
@@ -3573,8 +3579,8 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf)
wmKeyMap *keymap;
wmKeyMapItem *kmi;
- keymap= WM_keymap_find(keyconf, "UV Editor", 0, 0);
- keymap->poll= ED_operator_uvedit_can_uv_sculpt;
+ keymap = WM_keymap_find(keyconf, "UV Editor", 0, 0);
+ keymap->poll = ED_operator_uvedit_can_uv_sculpt;
/* Uv sculpt toggle */
kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", QKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index d6035b08fd6..7d388e6206c 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -800,12 +800,12 @@ static PBool p_edge_implicit_seam(PEdge *e, PEdge *ep)
uvp2 = ep->orig_uv;
}
- if((fabsf(uv1[0]-uvp1[0]) > limit[0]) || (fabsf(uv1[1]-uvp1[1]) > limit[1])) {
+ if ((fabsf(uv1[0]-uvp1[0]) > limit[0]) || (fabsf(uv1[1]-uvp1[1]) > limit[1])) {
e->flag |= PEDGE_SEAM;
ep->flag |= PEDGE_SEAM;
return P_TRUE;
}
- if((fabsf(uv2[0]-uvp2[0]) > limit[0]) || (fabsf(uv2[1]-uvp2[1]) > limit[1])) {
+ if ((fabsf(uv2[0]-uvp2[0]) > limit[0]) || (fabsf(uv2[1]-uvp2[1]) > limit[1])) {
e->flag |= PEDGE_SEAM;
ep->flag |= PEDGE_SEAM;
return P_TRUE;
@@ -866,7 +866,7 @@ static PBool p_edge_connect_pair(PHandle *handle, PEdge *e, PEdge ***stack, PBoo
{
PEdge *pair = NULL;
- if(!e->pair && p_edge_has_pair(handle, e, &pair, impl)) {
+ if (!e->pair && p_edge_has_pair(handle, e, &pair, impl)) {
if (e->vert == pair->vert)
p_face_flip(pair->face);
@@ -1162,7 +1162,7 @@ static void p_chart_boundaries(PChart *chart, int *nboundaries, PEdge **outer)
be->flag |= PEDGE_DONE;
len += p_edge_length(be);
be = be->next->vert->edge;
- } while(be != e);
+ } while (be != e);
if (outer && (len > maxlen)) {
*outer = e;
@@ -1213,7 +1213,7 @@ static void p_chart_fill_boundary(PChart *chart, PEdge *be, int nedges)
e->u.heaplink = BLI_heap_insert(heap, angle, e);
e = p_boundary_edge_next(e);
- } while(e != be);
+ } while (e != be);
if (nedges == 2) {
/* no real boundary, but an isolated seam */
@@ -1297,7 +1297,7 @@ static void p_chart_fill_boundaries(PChart *chart, PEdge *outer)
be->flag |= PEDGE_FILLED;
be = be->next->vert->edge;
nedges++;
- } while(be != e);
+ } while (be != e);
if (e != outer)
p_chart_fill_boundary(chart, e, nedges);
@@ -2847,7 +2847,7 @@ static PBool p_chart_symmetry_pins(PChart *chart, PEdge *outer, PVert **pin1, PV
lastbe = be;
be = nextbe;
- } while(be != outer);
+ } while (be != outer);
/* make sure we also count a series of splits over the starting point */
if (cure && (cure != outer)) {
@@ -3180,7 +3180,7 @@ static void p_stretch_pin_boundary(PChart *chart)
{
PVert *v;
- for(v=chart->verts; v; v=v->nextlink)
+ for (v=chart->verts; v; v=v->nextlink)
if (v->edge->pair == NULL)
v->flag |= PVERT_PIN;
else
@@ -3261,8 +3261,8 @@ static void p_chart_stretch_minimize(PChart *chart, RNG *rng)
float orig_stretch, low, stretch_low, high, stretch_high, mid, stretch;
float orig_uv[2], dir[2], random_angle, trusted_radius;
- for(v=chart->verts; v; v=v->nextlink) {
- if((v->flag & PVERT_PIN) || !(v->flag & PVERT_SELECT))
+ for (v=chart->verts; v; v=v->nextlink) {
+ if ((v->flag & PVERT_PIN) || !(v->flag & PVERT_SELECT))
continue;
orig_stretch = p_stretch_compute_vertex(v);
@@ -3313,7 +3313,7 @@ static void p_chart_stretch_minimize(PChart *chart, RNG *rng)
}
/* no luck, stretch has increased, reset to old values */
- if(stretch >= orig_stretch)
+ if (stretch >= orig_stretch)
copy_v2_v2(v->uv, orig_uv);
}
}
@@ -3357,7 +3357,7 @@ static PBool p_chart_convex_hull(PChart *chart, PVert ***verts, int *nverts, int
do {
npoints++;
e = p_boundary_edge_next(e);
- } while(e != be);
+ } while (e != be);
p = points = (PVert**)MEM_mallocN(sizeof(PVert*)*npoints*2, "PCHullpoints");
U = (PVert**)MEM_mallocN(sizeof(PVert*)*npoints, "PCHullU");
@@ -3368,7 +3368,7 @@ static PBool p_chart_convex_hull(PChart *chart, PVert ***verts, int *nverts, int
*p = e->vert;
p++;
e = p_boundary_edge_next(e);
- } while(e != be);
+ } while (e != be);
qsort(points, npoints, sizeof(PVert*), p_compare_geometric_uv);
@@ -3792,7 +3792,7 @@ static void p_smooth(PChart *chart)
nwheel++;
e = e->next->next->pair;
- } while(e && (e != v->edge));
+ } while (e && (e != v->edge));
v->u.distortion /= nwheel;
}
@@ -4344,7 +4344,7 @@ void param_pack(ParamHandle *handle, float margin)
if (phandle->ncharts == 0)
return;
- if(phandle->aspx != phandle->aspy)
+ if (phandle->aspx != phandle->aspy)
param_scale(handle, 1.0f/phandle->aspx, 1.0f/phandle->aspy);
/* we may not use all these boxes */
@@ -4372,11 +4372,11 @@ void param_pack(ParamHandle *handle, float margin)
box->h = chart->u.pack.size[1] + trans[1];
box->index = i; /* warning this index skips PCHART_NOPACK boxes */
- if(margin>0.0f)
+ if (margin>0.0f)
area += sqrt(box->w*box->h);
}
- if(margin>0.0f) {
+ if (margin>0.0f) {
/* multiply the margin by the area to give predictable results not dependent on UV scale,
* ...Without using the area running pack multiple times also gives a bad feedback loop.
* multiply by 0.1 so the margin value from the UI can be from 0.0 to 1.0 but not give a massive margin */
@@ -4417,7 +4417,7 @@ void param_pack(ParamHandle *handle, float margin)
}
MEM_freeN(boxarray);
- if(phandle->aspx != phandle->aspy)
+ if (phandle->aspx != phandle->aspy)
param_scale(handle, phandle->aspx, phandle->aspy);
}
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 676701b9c2a..af87f4d4b07 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -185,24 +185,24 @@ static StitchPreviewer * stitch_preview_init(void)
/* destructor...yeah this should be C++ :) */
static void stitch_preview_delete(void)
{
- if(_stitch_preview) {
- if(_stitch_preview->preview_polys){
+ if (_stitch_preview) {
+ if (_stitch_preview->preview_polys) {
MEM_freeN(_stitch_preview->preview_polys);
_stitch_preview->preview_polys = NULL;
}
- if(_stitch_preview->uvs_per_polygon){
+ if (_stitch_preview->uvs_per_polygon) {
MEM_freeN(_stitch_preview->uvs_per_polygon);
_stitch_preview->uvs_per_polygon = NULL;
}
- if(_stitch_preview->preview_stitchable){
+ if (_stitch_preview->preview_stitchable) {
MEM_freeN(_stitch_preview->preview_stitchable);
_stitch_preview->preview_stitchable = NULL;
}
- if(_stitch_preview->preview_unstitchable){
+ if (_stitch_preview->preview_unstitchable) {
MEM_freeN(_stitch_preview->preview_unstitchable);
_stitch_preview->preview_unstitchable = NULL;
}
- if(_stitch_preview->static_tris){
+ if (_stitch_preview->static_tris) {
MEM_freeN(_stitch_preview->static_tris);
_stitch_preview->static_tris = NULL;
}
@@ -229,7 +229,7 @@ static void stitch_update_header(StitchState *stitch_state, bContext *C)
char msg[HEADER_LENGTH];
ScrArea *sa= CTX_wm_area(C);
- if(sa) {
+ if (sa) {
BLI_snprintf(msg, HEADER_LENGTH, str,
stitch_state->snap_islands? "On" : "Off",
stitch_state->midpoints? "On": "Off",
@@ -242,9 +242,10 @@ static void stitch_update_header(StitchState *stitch_state, bContext *C)
static int getNumOfIslandUvs(UvElementMap *elementMap, int island)
{
- if(island == elementMap->totalIslands-1){
+ if (island == elementMap->totalIslands-1) {
return elementMap->totalUVs - elementMap->islandIndices[island];
- }else{
+ }
+ else {
return elementMap->islandIndices[island+1] - elementMap->islandIndices[island];
}
}
@@ -268,14 +269,14 @@ static int stitch_check_uvs_stitchable(UvElement *element, UvElement *element_it
float limit;
int do_limit;
- if(element_iter == element){
+ if (element_iter == element) {
return 0;
}
limit = state->limit_dist;
do_limit = state->use_limit;
- if(do_limit){
+ if (do_limit) {
MLoopUV *luv_orig, *luv_iter;
BMLoop *l_orig, *l_iter;
@@ -285,19 +286,23 @@ static int stitch_check_uvs_stitchable(UvElement *element, UvElement *element_it
l_iter = element_iter->l;
luv_iter = CustomData_bmesh_get(&state->em->bm->ldata, l_iter->head.data, CD_MLOOPUV);
- if(fabs(luv_orig->uv[0] - luv_iter->uv[0]) < limit
- && fabs(luv_orig->uv[1] - luv_iter->uv[1]) < limit){
+ if (fabs(luv_orig->uv[0] - luv_iter->uv[0]) < limit
+ && fabs(luv_orig->uv[1] - luv_iter->uv[1]) < limit) {
return 1;
- }else
+ }
+ else {
return 0;
- }else
+ }
+ }
+ else {
return 1;
+ }
}
static int stitch_check_uvs_state_stitchable(UvElement *element, UvElement *element_iter, StitchState *state)
{
- if((state->snap_islands && element->island == element_iter->island) ||
+ if ((state->snap_islands && element->island == element_iter->island) ||
(!state->midpoints && element->island == element_iter->island))
return 0;
@@ -311,12 +316,12 @@ static void stitch_calculate_island_snapping(StitchState *state, PreviewPosition
int i;
UvElement *element;
- for(i = 0; i < state->element_map->totalIslands; i++){
- if(island_stitch_data[i].addedForPreview){
+ for (i = 0; i < state->element_map->totalIslands; i++) {
+ if (island_stitch_data[i].addedForPreview) {
int numOfIslandUVs = 0, j;
/* check to avoid divide by 0 */
- if(island_stitch_data[i].num_rot_elements>0){
+ if (island_stitch_data[i].num_rot_elements>0) {
island_stitch_data[i].rotation /= island_stitch_data[i].num_rot_elements;
island_stitch_data[i].medianPoint[0] /= island_stitch_data[i].numOfElements;
island_stitch_data[i].medianPoint[1] /= island_stitch_data[i].numOfElements;
@@ -325,16 +330,16 @@ static void stitch_calculate_island_snapping(StitchState *state, PreviewPosition
island_stitch_data[i].translation[1] /= island_stitch_data[i].numOfElements;
numOfIslandUVs = getNumOfIslandUvs(state->element_map, i);
element = &state->element_map->buf[state->element_map->islandIndices[i]];
- for(j = 0; j < numOfIslandUVs; j++, element++){
+ for (j = 0; j < numOfIslandUVs; j++, element++) {
/* stitchable uvs have already been processed, don't process */
- if(!(element->flag & STITCH_PROCESSED)){
+ if (!(element->flag & STITCH_PROCESSED)) {
MLoopUV *luv;
BMLoop *l;
l = element->l;
luv = CustomData_bmesh_get(&state->em->bm->ldata, l->head.data, CD_MLOOPUV);
- if(final){
+ if (final) {
stitch_uv_rotate(island_stitch_data[i].rotation, island_stitch_data[i].medianPoint, luv->uv);
@@ -410,7 +415,7 @@ static void stitch_island_calculate_vert_rotation(UvElement *element, StitchStat
float rotation = 0;
BMLoop *l;
- if(element->island == state->static_island && !state->midpoints)
+ if (element->island == state->static_island && !state->midpoints)
return;
l = element->l;
@@ -419,8 +424,8 @@ static void stitch_island_calculate_vert_rotation(UvElement *element, StitchStat
element_iter = state->element_map->vert[index];
- for(; element_iter; element_iter = element_iter->next){
- if(element_iter->separate && stitch_check_uvs_state_stitchable(element, element_iter, state)){
+ for (; element_iter; element_iter = element_iter->next) {
+ if (element_iter->separate && stitch_check_uvs_state_stitchable(element, element_iter, state)) {
int index_tmp1, index_tmp2;
float normal[2];
/* easily possible*/
@@ -437,7 +442,7 @@ static void stitch_island_calculate_vert_rotation(UvElement *element, StitchStat
}
}
- if(state->midpoints)
+ if (state->midpoints)
rotation /= 2.0;
island_stitch_data[element->island].num_rot_elements++;
island_stitch_data[element->island].rotation += rotation;
@@ -446,26 +451,26 @@ static void stitch_island_calculate_vert_rotation(UvElement *element, StitchStat
static void stitch_state_delete(StitchState *stitch_state)
{
- if(stitch_state){
- if(stitch_state->element_map){
+ if (stitch_state) {
+ if (stitch_state->element_map) {
EDBM_free_uv_element_map(stitch_state->element_map);
}
- if(stitch_state->uvs){
+ if (stitch_state->uvs) {
MEM_freeN(stitch_state->uvs);
}
- if(stitch_state->selection_stack){
+ if (stitch_state->selection_stack) {
MEM_freeN(stitch_state->selection_stack);
}
- if(stitch_state->tris_per_island){
+ if (stitch_state->tris_per_island) {
MEM_freeN(stitch_state->tris_per_island);
}
- if(stitch_state->map){
+ if (stitch_state->map) {
MEM_freeN(stitch_state->map);
}
- if(stitch_state->normals){
+ if (stitch_state->normals) {
MEM_freeN(stitch_state->normals);
}
- if(stitch_state->edges){
+ if (stitch_state->edges) {
MEM_freeN(stitch_state->edges);
}
MEM_freeN(stitch_state);
@@ -486,12 +491,12 @@ static void determine_uv_stitchability(UvElement *element, StitchState *state, I
vert_index = BM_elem_index_get(l->v);
element_iter = state->element_map->vert[vert_index];
- for(; element_iter; element_iter = element_iter->next){
- if(element_iter->separate){
- if(element_iter == element){
+ for (; element_iter; element_iter = element_iter->next) {
+ if (element_iter->separate) {
+ if (element_iter == element) {
continue;
}
- if(stitch_check_uvs_stitchable(element, element_iter, state)){
+ if (stitch_check_uvs_stitchable(element, element_iter, state)) {
island_stitch_data[element_iter->island].stitchableCandidate = 1;
island_stitch_data[element->island].stitchableCandidate = 1;
element->flag |= STITCH_STITCHABLE_CANDIDATE;
@@ -506,7 +511,7 @@ static void stitch_set_face_preview_buffer_position(BMFace *efa, StitchPreviewer
{
int index = BM_elem_index_get(efa);
- if(preview_position[index].data_position == STITCH_NO_PREVIEW) {
+ if (preview_position[index].data_position == STITCH_NO_PREVIEW) {
preview_position[index].data_position = preview->preview_uvs*2;
preview_position[index].polycount_position = preview->num_polys++;
preview->preview_uvs += efa->len;
@@ -516,27 +521,27 @@ static void stitch_set_face_preview_buffer_position(BMFace *efa, StitchPreviewer
/* setup face preview for all coincident uvs and their faces */
static void stitch_setup_face_preview_for_uv_group(UvElement *element, StitchState *state, IslandStitchData *island_stitch_data,
- PreviewPosition *preview_position){
+ PreviewPosition *preview_position) {
StitchPreviewer *preview = uv_get_stitch_previewer();
/* static island does not change so returning immediately */
- if(state->snap_islands && !state->midpoints && state->static_island == element->island)
+ if (state->snap_islands && !state->midpoints && state->static_island == element->island)
return;
- if(state->snap_islands){
+ if (state->snap_islands) {
island_stitch_data[element->island].addedForPreview = 1;
}
- do{
+ do {
stitch_set_face_preview_buffer_position(element->face, preview, preview_position);
element = element->next;
- }while(element && !element->separate);
+ } while (element && !element->separate);
}
/* checks if uvs are indeed stitchable and registers so that they can be shown in preview */
static void stitch_validate_stichability (UvElement *element, StitchState *state, IslandStitchData *island_stitch_data,
- PreviewPosition *preview_position){
+ PreviewPosition *preview_position) {
UvElement *element_iter;
StitchPreviewer *preview;
int vert_index;
@@ -549,12 +554,12 @@ static void stitch_validate_stichability (UvElement *element, StitchState *state
preview = uv_get_stitch_previewer();
element_iter = state->element_map->vert[vert_index];
- for(; element_iter; element_iter = element_iter->next){
- if(element_iter->separate){
- if(element_iter == element)
+ for (; element_iter; element_iter = element_iter->next) {
+ if (element_iter->separate) {
+ if (element_iter == element)
continue;
- if(stitch_check_uvs_state_stitchable(element, element_iter, state)){
- if((element_iter->island == state->static_island) || (element->island == state->static_island)){
+ if (stitch_check_uvs_state_stitchable(element, element_iter, state)) {
+ if ((element_iter->island == state->static_island) || (element->island == state->static_island)) {
element->flag |= STITCH_STITCHABLE;
preview->num_stitchable++;
stitch_setup_face_preview_for_uv_group(element, state, island_stitch_data, preview_position);
@@ -565,7 +570,7 @@ static void stitch_validate_stichability (UvElement *element, StitchState *state
}
/* this can happen if the uvs to be stitched are not on a stitchable island */
- if(!(element->flag & STITCH_STITCHABLE)){
+ if (!(element->flag & STITCH_STITCHABLE)) {
preview->num_unstitchable++;
}
}
@@ -589,17 +594,17 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
/* cleanup previous preview */
stitch_preview_delete();
preview = stitch_preview_init();
- if(preview == NULL)
+ if (preview == NULL)
return 0;
preview_position = MEM_mallocN(state->em->bm->totface*sizeof(*preview_position), "stitch_face_preview_position");
/* each face holds its position in the preview buffer in tmp. -1 is uninitialized */
- for(i = 0; i < state->em->bm->totface; i++){
+ for (i = 0; i < state->em->bm->totface; i++) {
preview_position[i].data_position = STITCH_NO_PREVIEW;
}
island_stitch_data = MEM_callocN(sizeof(*island_stitch_data)*state->element_map->totalIslands, "stitch_island_data");
- if(!island_stitch_data){
+ if (!island_stitch_data) {
return 0;
}
@@ -610,27 +615,28 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
* First determine stitchability of uvs *
*****************************************/
- for(i = 0; i < state->selection_size; i++){
+ for (i = 0; i < state->selection_size; i++) {
UvElement *element = state->selection_stack[i];
determine_uv_stitchability(element, state, island_stitch_data);
}
/* set static island to one that is added for preview */
state->static_island %= state->element_map->totalIslands;
- while(!(island_stitch_data[state->static_island].stitchableCandidate)){
+ while (!(island_stitch_data[state->static_island].stitchableCandidate)) {
state->static_island++;
state->static_island %= state->element_map->totalIslands;
/* this is entirely possible if for example limit stitching with no stitchable verts or no selection */
- if(state->static_island == previous_island)
+ if (state->static_island == previous_island)
break;
}
- for(i = 0; i < state->selection_size; i++){
+ for (i = 0; i < state->selection_size; i++) {
UvElement *element = state->selection_stack[i];
- if(element->flag & STITCH_STITCHABLE_CANDIDATE){
+ if (element->flag & STITCH_STITCHABLE_CANDIDATE) {
element->flag &= ~STITCH_STITCHABLE_CANDIDATE;
stitch_validate_stichability(element, state, island_stitch_data, preview_position);
- }else{
+ }
+ else {
/* add to preview for unstitchable */
preview->num_unstitchable++;
}
@@ -639,14 +645,14 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
/*****************************************
* Setup preview for stitchable islands *
*****************************************/
- if(state->snap_islands){
- for(i = 0; i < state->element_map->totalIslands; i++){
- if(island_stitch_data[i].addedForPreview){
+ if (state->snap_islands) {
+ for (i = 0; i < state->element_map->totalIslands; i++) {
+ if (island_stitch_data[i].addedForPreview) {
int numOfIslandUVs = 0, j;
UvElement *element;
numOfIslandUVs = getNumOfIslandUvs(state->element_map, i);
element = &state->element_map->buf[state->element_map->islandIndices[i]];
- for(j = 0; j < numOfIslandUVs; j++, element++){
+ for (j = 0; j < numOfIslandUVs; j++, element++) {
stitch_set_face_preview_buffer_position(element->face, preview, preview_position);
}
}
@@ -656,7 +662,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
/*********************************************************************
* Setup the preview buffers and fill them with the appropriate data *
*********************************************************************/
- if(!final){
+ if (!final) {
BMIter liter;
BMLoop *l;
MLoopUV *luv;
@@ -672,7 +678,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
preview->num_static_tris = state->tris_per_island[state->static_island];
/* will cause cancel and freeing of all data structures so OK */
- if(!preview->preview_polys || !preview->preview_stitchable || !preview->preview_unstitchable){
+ if (!preview->preview_polys || !preview->preview_stitchable || !preview->preview_unstitchable) {
return 0;
}
@@ -681,11 +687,11 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
/* just to test if face was added for processing. uvs of inselected vertices will return NULL */
UvElement *element = ED_get_uv_element(state->element_map, efa, BM_FACE_FIRST_LOOP(efa));
- if(element){
+ if (element) {
int numoftris = efa->len - 2;
int index = BM_elem_index_get(efa);
int face_preview_pos = preview_position[index].data_position;
- if(face_preview_pos != STITCH_NO_PREVIEW){
+ if (face_preview_pos != STITCH_NO_PREVIEW) {
preview->uvs_per_polygon[preview_position[index].polycount_position] = efa->len;
BM_ITER_INDEX(l, &liter, state->em->bm, BM_LOOPS_OF_FACE, efa, i) {
luv = CustomData_bmesh_get(&state->em->bm->ldata, l->head.data, CD_MLOOPUV);
@@ -693,12 +699,12 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
}
}
- if(element->island == state->static_island){
+ if (element->island == state->static_island) {
BMLoop *fl = BM_FACE_FIRST_LOOP(efa);
MLoopUV *fuv = CustomData_bmesh_get(&state->em->bm->ldata, fl->head.data, CD_MLOOPUV);
BM_ITER_INDEX(l, &liter, state->em->bm, BM_LOOPS_OF_FACE, efa, i) {
- if(i < numoftris){
+ if (i < numoftris) {
/* using next since the first uv is already accounted for */
BMLoop *lnext = l->next;
MLoopUV *luvnext = CustomData_bmesh_get(&state->em->bm->ldata, lnext->next->head.data, CD_MLOOPUV);
@@ -708,16 +714,19 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
memcpy(preview->static_tris + buffer_index + 2, luv->uv, 2*sizeof(float));
memcpy(preview->static_tris + buffer_index + 4, luvnext->uv, 2*sizeof(float));
buffer_index += 6;
- }else break;
+ }
+ else {
+ break;
+ }
}
}
}
}
/* fill the appropriate preview buffers */
- for(i = 0; i < state->total_separate_uvs; i++){
+ for (i = 0; i < state->total_separate_uvs; i++) {
UvElement *element = (UvElement *)state->uvs[i];
- if(element->flag & STITCH_STITCHABLE){
+ if (element->flag & STITCH_STITCHABLE) {
l = element->l;
luv = CustomData_bmesh_get(&state->em->bm->ldata, l->head.data, CD_MLOOPUV);
@@ -725,7 +734,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
stitchBufferIndex++;
}
- else if(element->flag & STITCH_SELECTED){
+ else if (element->flag & STITCH_SELECTED) {
l = element->l;
luv = CustomData_bmesh_get(&state->em->bm->ldata, l->head.data, CD_MLOOPUV);
@@ -743,9 +752,9 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
uvfinal_map = MEM_mallocN(state->element_map->totalUVs*sizeof(*uvfinal_map), "stitch_uv_final_map");
/* first pass, calculate final position for stitchable uvs of the static island */
- for(i = 0; i < state->selection_size; i++){
+ for (i = 0; i < state->selection_size; i++) {
UvElement *element = state->selection_stack[i];
- if(element->flag & STITCH_STITCHABLE){
+ if (element->flag & STITCH_STITCHABLE) {
BMLoop *l;
MLoopUV *luv;
UvElement *element_iter;
@@ -759,20 +768,21 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
copy_v2_v2(final_position[i].uv, luv->uv);
final_position[i].count = 1;
- if(state->snap_islands && element->island == state->static_island && !stitch_midpoints)
+ if (state->snap_islands && element->island == state->static_island && !stitch_midpoints)
continue;
element_iter = state->element_map->vert[BM_elem_index_get(l->v)];
- for(;element_iter; element_iter = element_iter->next){
- if(element_iter->separate){
- if(stitch_check_uvs_state_stitchable(element, element_iter, state)){
+ for (;element_iter; element_iter = element_iter->next) {
+ if (element_iter->separate) {
+ if (stitch_check_uvs_state_stitchable(element, element_iter, state)) {
l = element_iter->l;
luv = CustomData_bmesh_get(&state->em->bm->ldata, l->head.data, CD_MLOOPUV);
- if(stitch_midpoints){
+ if (stitch_midpoints) {
add_v2_v2(final_position[i].uv, luv->uv);
final_position[i].count++;
- }else if(element_iter->island == state->static_island){
+ }
+ else if (element_iter->island == state->static_island) {
/* if multiple uvs on the static island exist,
* last checked remains. to disambiguate we need to limit or use
* edge stitch */
@@ -782,17 +792,17 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
}
}
}
- if(stitch_midpoints){
+ if (stitch_midpoints) {
final_position[i].uv[0] /= final_position[i].count;
final_position[i].uv[1] /= final_position[i].count;
}
}
/* second pass, calculate island rotation and translation before modifying any uvs */
- if(state->snap_islands){
- for(i = 0; i < state->selection_size; i++){
+ if (state->snap_islands) {
+ for (i = 0; i < state->selection_size; i++) {
UvElement *element = state->selection_stack[i];
- if(element->flag & STITCH_STITCHABLE){
+ if (element->flag & STITCH_STITCHABLE) {
BMLoop *l;
MLoopUV *luv;
@@ -810,18 +820,18 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
}
/* only calculate rotation when an edge has been fully selected */
- for(i = 0; i < state->total_boundary_edges; i++){
+ for (i = 0; i < state->total_boundary_edges; i++) {
UvEdge *edge = state->edges+i;
- if((state->uvs[edge->uv1]->flag & STITCH_STITCHABLE) && (state->uvs[edge->uv2]->flag & STITCH_STITCHABLE)){
+ if ((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 = 1;
}
}
- for(i = 0; i < state->selection_size; i++){
+ for (i = 0; i < state->selection_size; i++) {
UvElement *element = state->selection_stack[i];
- if(!island_stitch_data[element->island].use_edge_rotation){
- if(element->flag & STITCH_STITCHABLE){
+ if (!island_stitch_data[element->island].use_edge_rotation) {
+ if (element->flag & STITCH_STITCHABLE) {
stitch_island_calculate_vert_rotation(element, state, island_stitch_data);
}
}
@@ -830,12 +840,12 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
}
/* third pass, propagate changes to coincident uvs */
- for(i = 0; i < state->selection_size; i++){
+ for (i = 0; i < state->selection_size; i++) {
UvElement *element = state->selection_stack[i];
- if(element->flag & STITCH_STITCHABLE){
+ if (element->flag & STITCH_STITCHABLE) {
UvElement *element_iter = element;
/* propagate to coincident uvs */
- do{
+ do {
BMLoop *l;
MLoopUV *luv;
@@ -844,30 +854,31 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
element_iter->flag |= STITCH_PROCESSED;
/* either flush to preview or to the MTFace, if final */
- if(final){
+ if (final) {
copy_v2_v2(luv->uv, final_position[i].uv);
uvedit_uv_select(state->em, scene, l);
- }else {
+ }
+ else {
int face_preview_pos = preview_position[BM_elem_index_get(element_iter->face)].data_position;
- if(face_preview_pos != STITCH_NO_PREVIEW){
+ if (face_preview_pos != STITCH_NO_PREVIEW) {
copy_v2_v2(preview->preview_polys + face_preview_pos + 2*element_iter->tfindex,
final_position[i].uv);
}
}
/* end of calculations, keep only the selection flag */
- if( (!state->snap_islands) || ((!stitch_midpoints) && (element_iter->island == state->static_island))) {
+ if ( (!state->snap_islands) || ((!stitch_midpoints) && (element_iter->island == state->static_island))) {
element_iter->flag &= STITCH_SELECTED;
}
element_iter = element_iter->next;
- }while(element_iter && !element_iter->separate);
+ } while (element_iter && !element_iter->separate);
}
}
/* final pass, calculate Island translation/rotation if needed */
- if(state->snap_islands){
+ if (state->snap_islands) {
stitch_calculate_island_snapping(state, preview_position, preview, island_stitch_data, final);
}
@@ -893,7 +904,7 @@ static int uv_edge_compare(const void *a, const void *b)
UvEdge *edge1 = (UvEdge *)a;
UvEdge *edge2 = (UvEdge *)b;
- if((edge1->uv1 == edge2->uv1) && (edge1->uv2 == edge2->uv2)){
+ if ((edge1->uv1 == edge2->uv1) && (edge1->uv2 == edge2->uv2)) {
return 0;
}
return 1;
@@ -911,23 +922,24 @@ static void stitch_select_uv(UvElement *element, StitchState *state, int always_
element_iter = state->element_map->vert[BM_elem_index_get(l->v)];
/* first deselect all common uvs */
- for(; element_iter; element_iter = element_iter->next){
- if(element_iter->separate){
+ for (; element_iter; element_iter = element_iter->next) {
+ if (element_iter->separate) {
/* only separators go to selection */
- if(element_iter->flag & STITCH_SELECTED){
+ if (element_iter->flag & STITCH_SELECTED) {
int i;
- if(always_select)
+ if (always_select)
continue;
element_iter->flag &= ~STITCH_SELECTED;
- for(i = 0; i < state->selection_size; i++){
- if(selection_stack[i] == element_iter){
+ for (i = 0; i < state->selection_size; i++) {
+ if (selection_stack[i] == element_iter) {
(state->selection_size)--;
selection_stack[i] = selection_stack[state->selection_size];
break;
}
}
- }else{
+ }
+ else {
element_iter->flag |= STITCH_SELECTED;
selection_stack[state->selection_size++] = element_iter;
}
@@ -977,7 +989,7 @@ static int stitch_init(bContext *C, wmOperator *op)
op->customdata = state;
- if(!state)
+ if (!state)
return 0;
/* initialize state */
@@ -988,12 +1000,13 @@ static int stitch_init(bContext *C, wmOperator *op)
state->static_island = RNA_int_get(op->ptr, "static_island");
state->midpoints = RNA_boolean_get(op->ptr, "midpoint_snap");
/* in uv synch selection, all uv's are visible */
- if(ts->uv_flag & UV_SYNC_SELECTION){
+ if (ts->uv_flag & UV_SYNC_SELECTION) {
state->element_map = EDBM_make_uv_element_map(state->em, 0, 1);
- }else{
+ }
+ else {
state->element_map = EDBM_make_uv_element_map(state->em, 1, 1);
}
- if(!state->element_map){
+ if (!state->element_map) {
stitch_state_delete(state);
return 0;
}
@@ -1003,8 +1016,8 @@ static int stitch_init(bContext *C, wmOperator *op)
state->static_island %= state->element_map->totalIslands;
/* Count 'unique' uvs */
- for(i = 0; i < state->element_map->totalUVs; i++){
- if(state->element_map->buf[i].separate){
+ for (i = 0; i < state->element_map->totalUVs; i++) {
+ if (state->element_map->buf[i].separate) {
counter++;
}
}
@@ -1023,7 +1036,7 @@ static int stitch_init(bContext *C, wmOperator *op)
edgeHash = BLI_ghash_new(uv_edge_hash, uv_edge_compare, "stitch_edge_hash");
all_edges = MEM_mallocN(sizeof(*all_edges)*state->element_map->totalUVs, "stitch_all_edges");
- if(!state->selection_stack || !state->uvs || !map || !edgeHash || !all_edges){
+ if (!state->selection_stack || !state->uvs || !map || !edgeHash || !all_edges) {
stitch_state_delete(state);
return 0;
}
@@ -1031,10 +1044,10 @@ static int stitch_init(bContext *C, wmOperator *op)
/* So that we can use this as index for the UvElements */
counter = -1;
/* initialize the unique UVs and map */
- for(i = 0; i < em->bm->totvert; i++){
+ for (i = 0; i < em->bm->totvert; i++) {
UvElement *element = state->element_map->vert[i];
- for(; element; element = element->next){
- if(element->separate){
+ for (; element; element = element->next) {
+ if (element->separate) {
counter++;
state->uvs[counter] = element;
}
@@ -1061,20 +1074,20 @@ static int stitch_init(bContext *C, wmOperator *op)
all_edges[counter].element = element;
/* using an order policy, sort uvs according to address space. This avoids
* Having two different UvEdges with the same uvs on different positions */
- if(offset1 < offset2){
+ if (offset1 < offset2) {
all_edges[counter].uv1 = offset1;
all_edges[counter].uv2 = offset2;
}
- else{
+ else {
all_edges[counter].uv1 = offset2;
all_edges[counter].uv2 = offset1;
}
- if(BLI_ghash_haskey(edgeHash, &all_edges[counter])){
+ if (BLI_ghash_haskey(edgeHash, &all_edges[counter])) {
char *flag = BLI_ghash_lookup(edgeHash, &all_edges[counter]);
*flag = 0;
}
- else{
+ else {
BLI_ghash_insert(edgeHash, &all_edges[counter], &(all_edges[counter].flag));
all_edges[counter].flag = STITCH_BOUNDARY;
}
@@ -1086,14 +1099,14 @@ static int stitch_init(bContext *C, wmOperator *op)
ghi = BLI_ghashIterator_new(edgeHash);
total_edges = 0;
/* fill the edges with data */
- for(; !BLI_ghashIterator_isDone(ghi); BLI_ghashIterator_step(ghi)){
+ for (; !BLI_ghashIterator_isDone(ghi); BLI_ghashIterator_step(ghi)) {
UvEdge *edge = ((UvEdge *)BLI_ghashIterator_getKey(ghi));
- if(edge->flag & STITCH_BOUNDARY){
+ if (edge->flag & STITCH_BOUNDARY) {
total_edges++;
}
}
state->edges = edges = MEM_mallocN(sizeof(*edges)*total_edges, "stitch_edges");
- if(!ghi || !edges){
+ if (!ghi || !edges) {
MEM_freeN(all_edges);
stitch_state_delete(state);
return 0;
@@ -1102,9 +1115,9 @@ static int stitch_init(bContext *C, wmOperator *op)
state->total_boundary_edges = total_edges;
/* fill the edges with data */
- for(i = 0, BLI_ghashIterator_init(ghi, edgeHash); !BLI_ghashIterator_isDone(ghi); BLI_ghashIterator_step(ghi)){
+ for (i = 0, BLI_ghashIterator_init(ghi, edgeHash); !BLI_ghashIterator_isDone(ghi); BLI_ghashIterator_step(ghi)) {
UvEdge *edge = ((UvEdge *)BLI_ghashIterator_getKey(ghi));
- if(edge->flag & STITCH_BOUNDARY){
+ if (edge->flag & STITCH_BOUNDARY) {
edges[i++] = *((UvEdge *)BLI_ghashIterator_getKey(ghi));
}
}
@@ -1123,7 +1136,7 @@ static int stitch_init(bContext *C, wmOperator *op)
* a point "inside" the island, that can be provided by
* the opposite uv for a quad, or the next uv for a triangle. */
- for(i = 0; i < total_edges; i++){
+ for (i = 0; i < total_edges; i++) {
float normal[2];
stitch_calculate_edge_normal(em, edges + i, normal);
@@ -1140,7 +1153,7 @@ static int stitch_init(bContext *C, wmOperator *op)
state->selection_size = 0;
/* Load old selection if redoing operator with different settings */
- if(RNA_struct_property_is_set(op->ptr, "selection")){
+ if (RNA_struct_property_is_set(op->ptr, "selection")) {
int faceIndex, elementIndex;
UvElement *element;
@@ -1159,11 +1172,12 @@ static int stitch_init(bContext *C, wmOperator *op)
/* Clear the selection */
RNA_collection_clear(op->ptr, "selection");
- } else {
+ }
+ else {
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
i = 0;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
- if(uvedit_uv_selected(em, scene, l)){
+ if (uvedit_uv_selected(em, scene, l)) {
UvElement *element = ED_get_uv_element(state->element_map, efa, l);
stitch_select_uv(element, state, 1);
}
@@ -1176,19 +1190,19 @@ static int stitch_init(bContext *C, wmOperator *op)
state->tris_per_island = MEM_mallocN(sizeof(*state->tris_per_island)*state->element_map->totalIslands,
"stitch island tris");
- for(i = 0; i < state->element_map->totalIslands; i++){
+ for (i = 0; i < state->element_map->totalIslands; i++) {
state->tris_per_island[i] = 0;
}
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
UvElement *element = ED_get_uv_element(state->element_map, efa, BM_FACE_FIRST_LOOP(efa));
- if(element){
+ if (element) {
state->tris_per_island[element->island] += (efa->len > 2)? efa->len-2 : 0;
}
}
- if(!stitch_process_data(state, scene, 0)){
+ if (!stitch_process_data(state, scene, 0)) {
stitch_state_delete(state);
return 0;
}
@@ -1200,7 +1214,7 @@ static int stitch_init(bContext *C, wmOperator *op)
static int stitch_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
Object *obedit = CTX_data_edit_object(C);
- if(!stitch_init(C, op))
+ if (!stitch_init(C, op))
return OPERATOR_CANCELLED;
WM_event_add_modal_handler(C, op);
@@ -1222,7 +1236,7 @@ static void stitch_exit(bContext *C, wmOperator *op, int finished)
stitch_state = (StitchState *)op->customdata;
- if(finished){
+ if (finished) {
int i;
RNA_float_set(op->ptr, "limit", stitch_state->limit_dist);
@@ -1232,7 +1246,7 @@ static void stitch_exit(bContext *C, wmOperator *op, int finished)
RNA_boolean_set(op->ptr, "midpoint_snap", stitch_state->midpoints);
/* Store selection for re-execution of stitch */
- for(i = 0; i < stitch_state->selection_size; i++){
+ for (i = 0; i < stitch_state->selection_size; i++) {
PointerRNA itemptr;
UvElement *element = stitch_state->selection_stack[i];
@@ -1247,7 +1261,7 @@ static void stitch_exit(bContext *C, wmOperator *op, int finished)
uvedit_live_unwrap_update(sima, scene, obedit);
}
- if(sa)
+ if (sa)
ED_area_headerprint(sa, NULL);
DAG_id_tag_update(obedit->data, 0);
@@ -1271,12 +1285,13 @@ static int stitch_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
- if(!stitch_init(C, op))
+ if (!stitch_init(C, op))
return OPERATOR_CANCELLED;
- if(stitch_process_data((StitchState *)op->customdata, scene, 1)){
+ if (stitch_process_data((StitchState *)op->customdata, scene, 1)) {
stitch_exit(C, op, 1);
return OPERATOR_FINISHED;
- }else {
+ }
+ else {
return stitch_cancel(C, op);
}
}
@@ -1311,7 +1326,7 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
stitch_state = (StitchState *)op->customdata;
- switch(event->type){
+ switch(event->type) {
case MIDDLEMOUSE:
return OPERATOR_PASS_THROUGH;
@@ -1321,11 +1336,11 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
case LEFTMOUSE:
- if(event->shift && (U.flag & USER_LMOUSESELECT)){
- if(event->val == KM_RELEASE){
+ if (event->shift && (U.flag & USER_LMOUSESELECT)) {
+ if (event->val == KM_RELEASE) {
stitch_select(C, scene, event, stitch_state);
- if(!stitch_process_data(stitch_state, scene, 0)){
+ if (!stitch_process_data(stitch_state, scene, 0)) {
return stitch_cancel(C, op);
}
}
@@ -1333,7 +1348,7 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
}
case PADENTER:
case RETKEY:
- if(stitch_process_data(stitch_state, scene, 1)){
+ if (stitch_process_data(stitch_state, scene, 1)) {
stitch_exit(C, op, 1);
return OPERATOR_FINISHED;
}
@@ -1344,35 +1359,36 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
/* Increase limit */
case PADPLUSKEY:
case WHEELUPMOUSE:
- if(event->alt){
+ if (event->alt) {
stitch_state->limit_dist += 0.01;
- if(!stitch_process_data(stitch_state, scene, 0)){
+ if (!stitch_process_data(stitch_state, scene, 0)) {
return stitch_cancel(C, op);
}
break;
}
- else{
+ else {
return OPERATOR_PASS_THROUGH;
}
/* Decrease limit */
case PADMINUS:
case WHEELDOWNMOUSE:
- if(event->alt){
+ if (event->alt) {
stitch_state->limit_dist -= 0.01;
stitch_state->limit_dist = MAX2(0.01, stitch_state->limit_dist);
- if(!stitch_process_data(stitch_state, scene, 0)){
+ if (!stitch_process_data(stitch_state, scene, 0)) {
return stitch_cancel(C, op);
}
break;
- }else{
+ }
+ else {
return OPERATOR_PASS_THROUGH;
}
/* Use Limit (Default off)*/
case LKEY:
- if(event->val == KM_PRESS){
+ if (event->val == KM_PRESS) {
stitch_state->use_limit = !stitch_state->use_limit;
- if(!stitch_process_data(stitch_state, scene, 0)){
+ if (!stitch_process_data(stitch_state, scene, 0)) {
return stitch_cancel(C, op);
}
break;
@@ -1380,11 +1396,11 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_RUNNING_MODAL;
case IKEY:
- if(event->val == KM_PRESS){
+ if (event->val == KM_PRESS) {
stitch_state->static_island++;
stitch_state->static_island %= stitch_state->element_map->totalIslands;
- if(!stitch_process_data(stitch_state, scene, 0)){
+ if (!stitch_process_data(stitch_state, scene, 0)) {
return stitch_cancel(C, op);
}
break;
@@ -1392,9 +1408,9 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_RUNNING_MODAL;
case MKEY:
- if(event->val == KM_PRESS){
+ if (event->val == KM_PRESS) {
stitch_state->midpoints = !stitch_state->midpoints;
- if(!stitch_process_data(stitch_state, scene, 0)){
+ if (!stitch_process_data(stitch_state, scene, 0)) {
return stitch_cancel(C, op);
}
}
@@ -1402,13 +1418,13 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
/* Select geometry*/
case RIGHTMOUSE:
- if(!event->shift){
+ if (!event->shift) {
return stitch_cancel(C, op);
}
- if(event->val == KM_RELEASE && !(U.flag & USER_LMOUSESELECT)){
+ if (event->val == KM_RELEASE && !(U.flag & USER_LMOUSESELECT)) {
stitch_select(C, scene, event, stitch_state);
- if(!stitch_process_data(stitch_state, scene, 0)){
+ if (!stitch_process_data(stitch_state, scene, 0)) {
return stitch_cancel(C, op);
}
break;
@@ -1417,13 +1433,14 @@ static int stitch_modal(bContext *C, wmOperator *op, wmEvent *event)
/* snap islands on/off */
case SKEY:
- if(event->val == KM_PRESS){
+ if (event->val == KM_PRESS) {
stitch_state->snap_islands = !stitch_state->snap_islands;
- if(!stitch_process_data(stitch_state, scene, 0)){
+ if (!stitch_process_data(stitch_state, scene, 0)) {
return stitch_cancel(C, op);
}
break;
- } else
+ }
+ else
return OPERATOR_RUNNING_MODAL;
default:
@@ -1451,7 +1468,7 @@ void UV_OT_stitch(wmOperatorType *ot)
ot->modal = stitch_modal;
ot->exec = stitch_exec;
ot->cancel = stitch_cancel;
- ot->poll= ED_operator_uvedit;
+ ot->poll = ED_operator_uvedit;
/* properties */
RNA_def_boolean(ot->srna, "use_limit", 0, "Use Limit", "Stitch UVs within a specified limit distance");
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index cfb0128486a..107a92fd3ef 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -98,33 +98,33 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit)
SpaceLink *slink;
SpaceImage *sima;
- if(ED_uvedit_test(obedit)) {
+ if (ED_uvedit_test(obedit)) {
return 1;
}
- if(em && em->bm->totface && !CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY)) {
+ if (em && em->bm->totface && !CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY)) {
BM_data_layer_add(em->bm, &em->bm->pdata, CD_MTEXPOLY);
BM_data_layer_add(em->bm, &em->bm->ldata, CD_MLOOPUV);
}
- if(!ED_uvedit_test(obedit)) {
+ if (!ED_uvedit_test(obedit)) {
return 0;
}
ima= CTX_data_edit_image(C);
- if(!ima) {
+ if (!ima) {
/* no image in context in the 3d view, we find first image window .. */
sc= CTX_wm_screen(C);
- for(sa=sc->areabase.first; sa; sa=sa->next) {
+ for (sa=sc->areabase.first; sa; sa=sa->next) {
slink= sa->spacedata.first;
- if(slink->spacetype == SPACE_IMAGE) {
+ if (slink->spacetype == SPACE_IMAGE) {
sima= (SpaceImage*)slink;
ima= sima->image;
- if(ima) {
- if(ima->type==IMA_TYPE_R_RESULT || ima->type==IMA_TYPE_COMPOSITE)
+ if (ima) {
+ if (ima->type==IMA_TYPE_R_RESULT || ima->type==IMA_TYPE_COMPOSITE)
ima= NULL;
else
break;
@@ -133,7 +133,7 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit)
}
}
- if(ima)
+ if (ima)
ED_uvedit_assign_image(bmain, scene, obedit, ima, NULL);
/* select new UV's */
@@ -156,11 +156,11 @@ static int uvedit_have_selection(Scene *scene, BMEditMesh *em, short implicit)
/* verify if we have any selected uv's before unwrapping,
* so we can cancel the operator early */
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
- if(BM_elem_flag_test(efa, BM_ELEM_HIDDEN))
+ if (scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
+ if (BM_elem_flag_test(efa, BM_ELEM_HIDDEN))
continue;
}
- else if(BM_elem_flag_test(efa, BM_ELEM_HIDDEN) || !BM_elem_flag_test(efa, BM_ELEM_SELECT))
+ else if (BM_elem_flag_test(efa, BM_ELEM_HIDDEN) || !BM_elem_flag_test(efa, BM_ELEM_SELECT))
continue;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
@@ -194,16 +194,16 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
handle = param_construct_begin();
- if(correct_aspect) {
+ if (correct_aspect) {
efa = BM_active_face_get(em->bm, TRUE);
- if(efa) {
+ if (efa) {
float aspx, aspy;
tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
ED_image_uv_aspect(tf->tpage, &aspx, &aspy);
- if(aspx!=aspy)
+ if (aspx!=aspy)
param_aspect_ratio(handle, aspx, aspy);
}
}
@@ -222,7 +222,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
float *uv[4];
int lsel;
- if((BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) || (sel && BM_elem_flag_test(efa, BM_ELEM_SELECT)==0))
+ if ((BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) || (sel && BM_elem_flag_test(efa, BM_ELEM_SELECT)==0))
continue;
/* tf= (MTexPoly *)CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */
@@ -305,9 +305,9 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
BLI_end_edgefill();
}
- if(!implicit) {
+ if (!implicit) {
BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
- if(BM_elem_flag_test(eed, BM_ELEM_SEAM)) {
+ if (BM_elem_flag_test(eed, BM_ELEM_SEAM)) {
ParamKey vkeys[2];
vkeys[0] = (ParamKey)BM_elem_index_get(eed->v1);
vkeys[1] = (ParamKey)BM_elem_index_get(eed->v2);
@@ -332,11 +332,11 @@ static void texface_from_original_index(BMFace *efa, int index, float **uv, Para
*pin = 0;
*select = 1;
- if(index == ORIGINDEX_NONE)
+ if (index == ORIGINDEX_NONE)
return;
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
- if(BM_elem_index_get(l->v) == index) {
+ if (BM_elem_index_get(l->v) == index) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
*uv = luv->uv;
*pin = (luv->flag & MLOOPUV_PINNED)? 1 : 0;
@@ -376,17 +376,17 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, BMEditMesh *e
handle = param_construct_begin();
- if(correct_aspect) {
+ if (correct_aspect) {
editFace = BM_active_face_get(em->bm, TRUE);
- if(editFace) {
+ if (editFace) {
MTexPoly *tf;
float aspx, aspy;
tf= CustomData_bmesh_get(&em->bm->pdata, editFace->head.data, CD_MTEXPOLY);
ED_image_uv_aspect(tf->tpage, &aspx, &aspy);
- if(aspx!=aspy)
+ if (aspx!=aspy)
param_aspect_ratio(handle, aspx, aspy);
}
}
@@ -419,13 +419,13 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, BMEditMesh *e
EDBM_init_index_arrays(em, 0, 1, 1);
/* map subsurfed faces to original editFaces */
- for(i = 0; i < numOfFaces; i++)
+ for (i = 0; i < numOfFaces; i++)
faceMap[i] = EDBM_get_face_for_index(em, origFaceIndices[i]);
edgeMap = MEM_mallocN(numOfEdges*sizeof(BMEdge *), "unwrap_edit_edge_map");
/* map subsurfed edges to original editEdges */
- for(i = 0; i < numOfEdges; i++) {
+ for (i = 0; i < numOfEdges; i++) {
/* not all edges correspond to an old edge */
edgeMap[i] = (origEdgeIndices[i] != -1)?
EDBM_get_edge_for_index(em, origEdgeIndices[i]) : NULL;
@@ -434,7 +434,7 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, BMEditMesh *e
EDBM_free_index_arrays(em);
/* Prepare and feed faces to the solver */
- for(i = 0; i < numOfFaces; i++) {
+ for (i = 0; i < numOfFaces; i++) {
ParamKey key, vkeys[4];
ParamBool pin[4], select[4];
float *co[4];
@@ -443,12 +443,12 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, BMEditMesh *e
face = subsurfedFaces+i;
- if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
- if(BM_elem_flag_test(origFace, BM_ELEM_HIDDEN))
+ if (scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
+ if (BM_elem_flag_test(origFace, BM_ELEM_HIDDEN))
continue;
}
else {
- if(BM_elem_flag_test(origFace, BM_ELEM_HIDDEN) || (sel && !BM_elem_flag_test(origFace, BM_ELEM_SELECT)))
+ if (BM_elem_flag_test(origFace, BM_ELEM_HIDDEN) || (sel && !BM_elem_flag_test(origFace, BM_ELEM_SELECT)))
continue;
}
@@ -475,8 +475,8 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, BMEditMesh *e
}
/* these are calculated from original mesh too */
- for(edge = subsurfedEdges, i = 0; i < numOfEdges; i++, edge++) {
- if((edgeMap[i] != NULL) && BM_elem_flag_test(edgeMap[i], BM_ELEM_SEAM)) {
+ for (edge = subsurfedEdges, i = 0; i < numOfEdges; i++, edge++) {
+ if ((edgeMap[i] != NULL) && BM_elem_flag_test(edgeMap[i], BM_ELEM_SEAM)) {
ParamKey vkeys[2];
vkeys[0] = (ParamKey)edge->v1;
vkeys[1] = (ParamKey)edge->v2;
@@ -516,7 +516,7 @@ static int minimize_stretch_init(bContext *C, wmOperator *op)
int fill_holes = RNA_boolean_get(op->ptr, "fill_holes");
short implicit = 1;
- if(!uvedit_have_selection(scene, em, implicit)) {
+ if (!uvedit_have_selection(scene, em, implicit)) {
return 0;
}
@@ -531,7 +531,7 @@ static int minimize_stretch_init(bContext *C, wmOperator *op)
ms->lasttime= PIL_check_seconds_timer();
param_stretch_begin(ms->handle);
- if(ms->blend != 0.0f)
+ if (ms->blend != 0.0f)
param_stretch_blend(ms->handle, ms->blend);
op->customdata= ms;
@@ -550,12 +550,12 @@ static void minimize_stretch_iteration(bContext *C, wmOperator *op, int interact
ms->i++;
RNA_int_set(op->ptr, "iterations", ms->i);
- if(interactive && (PIL_check_seconds_timer() - ms->lasttime > 0.5)) {
+ if (interactive && (PIL_check_seconds_timer() - ms->lasttime > 0.5)) {
char str[100];
param_flush(ms->handle);
- if(sa) {
+ if (sa) {
BLI_snprintf(str, sizeof(str), "Minimize Stretch. Blend %.2f", ms->blend);
ED_area_headerprint(sa, str);
}
@@ -572,12 +572,12 @@ static void minimize_stretch_exit(bContext *C, wmOperator *op, int cancel)
MinStretch *ms= op->customdata;
ScrArea *sa= CTX_wm_area(C);
- if(sa)
+ if (sa)
ED_area_headerprint(sa, NULL);
- if(ms->timer)
+ if (ms->timer)
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), ms->timer);
- if(cancel)
+ if (cancel)
param_flush_restore(ms->handle);
else
param_flush(ms->handle);
@@ -596,11 +596,11 @@ static int minimize_stretch_exec(bContext *C, wmOperator *op)
{
int i, iterations;
- if(!minimize_stretch_init(C, op))
+ if (!minimize_stretch_init(C, op))
return OPERATOR_CANCELLED;
iterations= RNA_int_get(op->ptr, "iterations");
- for(i=0; i<iterations; i++)
+ for (i=0; i<iterations; i++)
minimize_stretch_iteration(C, op, 0);
minimize_stretch_exit(C, op, 0);
@@ -611,7 +611,7 @@ static int minimize_stretch_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(
{
MinStretch *ms;
- if(!minimize_stretch_init(C, op))
+ if (!minimize_stretch_init(C, op))
return OPERATOR_CANCELLED;
minimize_stretch_iteration(C, op, 1);
@@ -639,7 +639,7 @@ static int minimize_stretch_modal(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_FINISHED;
case PADPLUSKEY:
case WHEELUPMOUSE:
- if(ms->blend < 0.95f) {
+ if (ms->blend < 0.95f) {
ms->blend += 0.1f;
ms->lasttime= 0.0f;
RNA_float_set(op->ptr, "blend", ms->blend);
@@ -648,7 +648,7 @@ static int minimize_stretch_modal(bContext *C, wmOperator *op, wmEvent *event)
break;
case PADMINUS:
case WHEELDOWNMOUSE:
- if(ms->blend > 0.05f) {
+ if (ms->blend > 0.05f) {
ms->blend -= 0.1f;
ms->lasttime= 0.0f;
RNA_float_set(op->ptr, "blend", ms->blend);
@@ -656,17 +656,17 @@ static int minimize_stretch_modal(bContext *C, wmOperator *op, wmEvent *event)
}
break;
case TIMER:
- if(ms->timer == event->customdata) {
+ if (ms->timer == event->customdata) {
double start= PIL_check_seconds_timer();
do {
minimize_stretch_iteration(C, op, 1);
- } while(PIL_check_seconds_timer() - start < 0.01);
+ } while (PIL_check_seconds_timer() - start < 0.01);
}
break;
}
- if(ms->iterations && ms->i >= ms->iterations) {
+ if (ms->iterations && ms->i >= ms->iterations) {
minimize_stretch_exit(C, op, 0);
return OPERATOR_FINISHED;
}
@@ -684,17 +684,17 @@ static int minimize_stretch_cancel(bContext *C, wmOperator *op)
void UV_OT_minimize_stretch(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Minimize Stretch";
- ot->idname= "UV_OT_minimize_stretch";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_GRAB_POINTER|OPTYPE_BLOCKING;
- ot->description="Reduce UV stretching by relaxing angles";
+ ot->name = "Minimize Stretch";
+ ot->idname = "UV_OT_minimize_stretch";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_GRAB_POINTER|OPTYPE_BLOCKING;
+ ot->description = "Reduce UV stretching by relaxing angles";
/* api callbacks */
- ot->exec= minimize_stretch_exec;
- ot->invoke= minimize_stretch_invoke;
- ot->modal= minimize_stretch_modal;
- ot->cancel= minimize_stretch_cancel;
- ot->poll= ED_operator_uvedit;
+ ot->exec = minimize_stretch_exec;
+ ot->invoke = minimize_stretch_invoke;
+ ot->modal = minimize_stretch_modal;
+ ot->cancel = minimize_stretch_cancel;
+ ot->poll = ED_operator_uvedit;
/* properties */
RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes", "Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry");
@@ -712,11 +712,11 @@ static int pack_islands_exec(bContext *C, wmOperator *op)
ParamHandle *handle;
short implicit = 1;
- if(!uvedit_have_selection(scene, em, implicit)) {
+ if (!uvedit_have_selection(scene, em, implicit)) {
return OPERATOR_CANCELLED;
}
- if(RNA_struct_property_is_set(op->ptr, "margin")) {
+ if (RNA_struct_property_is_set(op->ptr, "margin")) {
scene->toolsettings->uvcalc_margin= RNA_float_get(op->ptr, "margin");
}
else {
@@ -737,13 +737,13 @@ static int pack_islands_exec(bContext *C, wmOperator *op)
void UV_OT_pack_islands(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Pack Islands";
- ot->idname= "UV_OT_pack_islands";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Pack Islands";
+ ot->idname = "UV_OT_pack_islands";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= pack_islands_exec;
- ot->poll= ED_operator_uvedit;
+ ot->exec = pack_islands_exec;
+ ot->poll = ED_operator_uvedit;
/* properties */
RNA_def_float_factor(ot->srna, "margin", 0.0f, 0.0f, 1.0f, "Margin", "Space between islands", 0.0f, 1.0f);
@@ -759,7 +759,7 @@ static int average_islands_scale_exec(bContext *C, wmOperator *UNUSED(op))
ParamHandle *handle;
short implicit = 1;
- if(!uvedit_have_selection(scene, em, implicit)) {
+ if (!uvedit_have_selection(scene, em, implicit)) {
return OPERATOR_CANCELLED;
}
@@ -777,13 +777,13 @@ static int average_islands_scale_exec(bContext *C, wmOperator *UNUSED(op))
void UV_OT_average_islands_scale(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Average Islands Scale";
- ot->idname= "UV_OT_average_islands_scale";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Average Islands Scale";
+ ot->idname = "UV_OT_average_islands_scale";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= average_islands_scale_exec;
- ot->poll= ED_operator_uvedit;
+ ot->exec = average_islands_scale_exec;
+ ot->poll = ED_operator_uvedit;
}
/**************** Live Unwrap *****************/
@@ -797,11 +797,11 @@ void ED_uvedit_live_unwrap_begin(Scene *scene, Object *obedit)
short fillholes = scene->toolsettings->uvcalc_flag & UVCALC_FILLHOLES;
short use_subsurf = scene->toolsettings->uvcalc_flag & UVCALC_USESUBSURF;
- if(!ED_uvedit_test(obedit)) {
+ if (!ED_uvedit_test(obedit)) {
return;
}
- if(use_subsurf)
+ if (use_subsurf)
liveHandle = construct_param_handle_subsurfed(scene, em, fillholes, 0, 1);
else
liveHandle = construct_param_handle(scene, em, 0, fillholes, 0, 1);
@@ -811,7 +811,7 @@ void ED_uvedit_live_unwrap_begin(Scene *scene, Object *obedit)
void ED_uvedit_live_unwrap_re_solve(void)
{
- if(liveHandle) {
+ if (liveHandle) {
param_lscm_solve(liveHandle);
param_flush(liveHandle);
}
@@ -819,9 +819,9 @@ void ED_uvedit_live_unwrap_re_solve(void)
void ED_uvedit_live_unwrap_end(short cancel)
{
- if(liveHandle) {
+ if (liveHandle) {
param_lscm_end(liveHandle);
- if(cancel)
+ if (cancel)
param_flush_restore(liveHandle);
param_delete(liveHandle);
liveHandle = NULL;
@@ -854,7 +854,7 @@ static void uv_map_transform_center(Scene *scene, View3D *v3d, float *result,
max[0]= max[1]= max[2]= -1e20f;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- if(BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
+ if (BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
DO_MINMAX(l->v->co, min, max);
}
@@ -887,20 +887,20 @@ static void uv_map_rotation_matrix(float result[][4], RegionView3D *rv3d, Object
int k;
/* get rotation of the current view matrix */
- if(rv3d)
+ if (rv3d)
copy_m4_m4(viewmatrix, rv3d->viewmat);
else
unit_m4(viewmatrix);
/* but shifting */
- for(k=0; k<4; k++)
+ for (k=0; k<4; k++)
viewmatrix[3][k] =0.0f;
/* get rotation of the current object matrix */
copy_m4_m4(rotobj,ob->obmat);
/* but shifting */
- for(k=0; k<4; k++)
+ for (k=0; k<4; k++)
rotobj[3][k] =0.0f;
zero_m4(rotup);
@@ -943,18 +943,18 @@ static void uv_map_transform(bContext *C, wmOperator *op, float center[3], float
uv_map_transform_center(scene, v3d, center, obedit, em);
- if(direction == VIEW_ON_EQUATOR) {
+ if (direction == VIEW_ON_EQUATOR) {
upangledeg= 90.0f;
sideangledeg= 0.0f;
}
else {
upangledeg= 0.0f;
- if(align == POLAR_ZY) sideangledeg= 0.0f;
+ if (align == POLAR_ZY) sideangledeg= 0.0f;
else sideangledeg= 90.0f;
}
/* be compatible to the "old" sphere/cylinder mode */
- if(direction == ALIGN_TO_OBJECT)
+ if (direction == ALIGN_TO_OBJECT)
unit_m4(rotmat);
else
uv_map_rotation_matrix(rotmat, rv3d, obedit, upangledeg, sideangledeg, radius);
@@ -979,7 +979,7 @@ static void uv_transform_properties(wmOperatorType *ot, int radius)
"Direction of the sphere or cylinder");
RNA_def_enum(ot->srna, "align", align_items, VIEW_ON_EQUATOR, "Align",
"How to determine rotation around the pole");
- if(radius)
+ if (radius)
RNA_def_float(ot->srna, "radius", 1.0f, 0.0f, FLT_MAX, "Radius",
"Radius of the sphere or cylinder", 0.0001f, 100.0f);
}
@@ -999,10 +999,10 @@ static void correct_uv_aspect(BMEditMesh *em)
ED_image_uv_aspect(tf->tpage, &aspx, &aspy);
}
- if(aspx == aspy)
+ if (aspx == aspy)
return;
- if(aspx > aspy) {
+ if (aspx > aspy) {
scale= aspy/aspx;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
@@ -1054,10 +1054,10 @@ static void uv_map_clip_correct(BMEditMesh *em, wmOperator *op)
int scale_to_bounds= RNA_boolean_get(op->ptr, "scale_to_bounds");
/* correct for image aspect ratio */
- if(correct_aspect)
+ if (correct_aspect)
correct_uv_aspect(em);
- if(scale_to_bounds) {
+ if (scale_to_bounds) {
INIT_MINMAX2(min, max);
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
@@ -1074,9 +1074,9 @@ static void uv_map_clip_correct(BMEditMesh *em, wmOperator *op)
dx= (max[0]-min[0]);
dy= (max[1]-min[1]);
- if(dx > 0.0f)
+ if (dx > 0.0f)
dx= 1.0f/dx;
- if(dy > 0.0f)
+ if (dy > 0.0f)
dy= 1.0f/dy;
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
@@ -1091,7 +1091,7 @@ static void uv_map_clip_correct(BMEditMesh *em, wmOperator *op)
}
}
}
- else if(clip_to_bounds) {
+ else if (clip_to_bounds) {
/* clipping and wrapping */
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
if (!BM_elem_flag_test(efa, BM_ELEM_SELECT))
@@ -1118,7 +1118,7 @@ void ED_unwrap_lscm(Scene *scene, Object *obedit, const short sel)
const short correct_aspect= !(scene->toolsettings->uvcalc_flag & UVCALC_NO_ASPECT_CORRECT);
const short use_subsurf = scene->toolsettings->uvcalc_flag & UVCALC_USESUBSURF;
- if(use_subsurf)
+ if (use_subsurf)
handle = construct_param_handle_subsurfed(scene, em, fill_holes, sel, correct_aspect);
else
handle= construct_param_handle(scene, em, 0, fill_holes, sel, correct_aspect);
@@ -1147,17 +1147,17 @@ static int unwrap_exec(bContext *C, wmOperator *op)
float obsize[3], unitsize[3] = {1.0f, 1.0f, 1.0f};
short implicit= 0;
- if(!uvedit_have_selection(scene, em, implicit)) {
+ if (!uvedit_have_selection(scene, em, implicit)) {
return OPERATOR_CANCELLED;
}
/* add uvs if they don't exist yet */
- if(!ED_uvedit_ensure_uvs(C, scene, obedit)) {
+ if (!ED_uvedit_ensure_uvs(C, scene, obedit)) {
return OPERATOR_CANCELLED;
}
mat4_to_size(obsize, obedit->obmat);
- if(!compare_v3v3(obsize, unitsize, 1e-4f))
+ if (!compare_v3v3(obsize, unitsize, 1e-4f))
BKE_report(op->reports, RPT_INFO, "Object scale is not 1.0. Unwrap will operate on a non-scaled version of the mesh.");
/* remember last method for live unwrap */
@@ -1165,13 +1165,13 @@ static int unwrap_exec(bContext *C, wmOperator *op)
scene->toolsettings->uv_subsurf_level = subsurf_level;
- if(fill_holes) scene->toolsettings->uvcalc_flag |= UVCALC_FILLHOLES;
+ if (fill_holes) scene->toolsettings->uvcalc_flag |= UVCALC_FILLHOLES;
else scene->toolsettings->uvcalc_flag &= ~UVCALC_FILLHOLES;
- if(correct_aspect) scene->toolsettings->uvcalc_flag &= ~UVCALC_NO_ASPECT_CORRECT;
+ if (correct_aspect) scene->toolsettings->uvcalc_flag &= ~UVCALC_NO_ASPECT_CORRECT;
else scene->toolsettings->uvcalc_flag |= UVCALC_NO_ASPECT_CORRECT;
- if(use_subsurf) scene->toolsettings->uvcalc_flag |= UVCALC_USESUBSURF;
+ if (use_subsurf) scene->toolsettings->uvcalc_flag |= UVCALC_USESUBSURF;
else scene->toolsettings->uvcalc_flag &= ~UVCALC_USESUBSURF;
/* execute unwrap */
@@ -1191,14 +1191,14 @@ void UV_OT_unwrap(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Unwrap";
- ot->description= "Unwrap the mesh of the object being edited";
- ot->idname= "UV_OT_unwrap";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Unwrap";
+ ot->description = "Unwrap the mesh of the object being edited";
+ ot->idname = "UV_OT_unwrap";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= unwrap_exec;
- ot->poll= ED_operator_uvmap;
+ ot->exec = unwrap_exec;
+ ot->poll = ED_operator_uvmap;
/* properties */
RNA_def_enum(ot->srna, "method", method_items, 0, "Method",
@@ -1230,7 +1230,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
float rotmat[4][4];
/* add uvs if they don't exist yet */
- if(!ED_uvedit_ensure_uvs(C, scene, obedit)) {
+ if (!ED_uvedit_ensure_uvs(C, scene, obedit)) {
return OPERATOR_CANCELLED;
}
@@ -1239,7 +1239,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
camera= v3d->camera->data;
}
- if(RNA_boolean_get(op->ptr, "orthographic")) {
+ if (RNA_boolean_get(op->ptr, "orthographic")) {
uv_map_rotation_matrix(rotmat, rv3d, obedit, 90.0f, 0.0f, 1.0f);
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
@@ -1255,7 +1255,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
else if (camera) {
struct UvCameraInfo *uci= project_camera_info(v3d->camera, obedit->obmat, scene->r.xsch, scene->r.ysch);
- if(uci) {
+ if (uci) {
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
if (!BM_elem_flag_test(efa, BM_ELEM_SELECT))
continue;
@@ -1295,7 +1295,7 @@ static int uv_from_view_poll(bContext *C)
{
RegionView3D *rv3d= CTX_wm_region_view3d(C);
- if(!ED_operator_uvmap(C))
+ if (!ED_operator_uvmap(C))
return 0;
return (rv3d != NULL);
@@ -1304,13 +1304,13 @@ static int uv_from_view_poll(bContext *C)
void UV_OT_from_view(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Project From View";
- ot->idname= "UV_OT_project_from_view";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Project From View";
+ ot->idname = "UV_OT_project_from_view";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= uv_from_view_exec;
- ot->poll= uv_from_view_poll;
+ ot->exec = uv_from_view_exec;
+ ot->poll = uv_from_view_poll;
/* properties */
RNA_def_boolean(ot->srna, "orthographic", 0, "Orthographic", "Use orthographic projection");
@@ -1343,13 +1343,13 @@ static int reset_exec(bContext *C, wmOperator *UNUSED(op))
void UV_OT_reset(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reset";
- ot->idname= "UV_OT_reset";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Reset";
+ ot->idname = "UV_OT_reset";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= reset_exec;
- ot->poll= ED_operator_uvmap;
+ ot->exec = reset_exec;
+ ot->poll = ED_operator_uvmap;
}
/****************** Sphere Project operator ***************/
@@ -1364,7 +1364,7 @@ static void uv_sphere_project(float target[2], float source[3], float center[3],
map_to_sphere( &target[0], &target[1],pv[0], pv[1], pv[2]);
/* split line is always zero */
- if(target[0] >= 1.0f)
+ if (target[0] >= 1.0f)
target[0] -= 1.0f;
}
@@ -1386,14 +1386,14 @@ static void uv_map_mirror(BMEditMesh *em, BMFace *efa, MTexPoly *UNUSED(tf))
}
mi = 0;
- for(i=1; i<efa->len; i++)
- if(uvs[i][0] > uvs[mi][0])
+ for (i=1; i<efa->len; i++)
+ if (uvs[i][0] > uvs[mi][0])
mi = i;
- for(i=0; i<efa->len; i++) {
- if(i != mi) {
+ for (i=0; i<efa->len; i++) {
+ if (i != mi) {
dx = uvs[mi][0] - uvs[i][0];
- if(dx > 0.5f) uvs[i][0] += 1.0f;
+ if (dx > 0.5f) uvs[i][0] += 1.0f;
}
}
@@ -1413,7 +1413,7 @@ static int sphere_project_exec(bContext *C, wmOperator *op)
float center[3], rotmat[4][4];
/* add uvs if they don't exist yet */
- if(!ED_uvedit_ensure_uvs(C, scene, obedit)) {
+ if (!ED_uvedit_ensure_uvs(C, scene, obedit)) {
return OPERATOR_CANCELLED;
}
@@ -1444,13 +1444,13 @@ static int sphere_project_exec(bContext *C, wmOperator *op)
void UV_OT_sphere_project(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Sphere Projection";
- ot->idname= "UV_OT_sphere_project";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Sphere Projection";
+ ot->idname = "UV_OT_sphere_project";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= sphere_project_exec;
- ot->poll= ED_operator_uvmap;
+ ot->exec = sphere_project_exec;
+ ot->poll = ED_operator_uvmap;
/* properties */
uv_transform_properties(ot, 0);
@@ -1469,7 +1469,7 @@ static void uv_cylinder_project(float target[2], float source[3], float center[3
map_to_tube( &target[0], &target[1],pv[0], pv[1], pv[2]);
/* split line is always zero */
- if(target[0] >= 1.0f)
+ if (target[0] >= 1.0f)
target[0] -= 1.0f;
}
@@ -1486,7 +1486,7 @@ static int cylinder_project_exec(bContext *C, wmOperator *op)
float center[3], rotmat[4][4];
/* add uvs if they don't exist yet */
- if(!ED_uvedit_ensure_uvs(C, scene, obedit)) {
+ if (!ED_uvedit_ensure_uvs(C, scene, obedit)) {
return OPERATOR_CANCELLED;
}
@@ -1517,13 +1517,13 @@ static int cylinder_project_exec(bContext *C, wmOperator *op)
void UV_OT_cylinder_project(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Cylinder Projection";
- ot->idname= "UV_OT_cylinder_project";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Cylinder Projection";
+ ot->idname = "UV_OT_cylinder_project";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= cylinder_project_exec;
- ot->poll= ED_operator_uvmap;
+ ot->exec = cylinder_project_exec;
+ ot->poll = ED_operator_uvmap;
/* properties */
uv_transform_properties(ot, 1);
@@ -1546,7 +1546,7 @@ static int cube_project_exec(bContext *C, wmOperator *op)
int cox, coy;
/* add uvs if they don't exist yet */
- if(!ED_uvedit_ensure_uvs(C, scene, obedit)) {
+ if (!ED_uvedit_ensure_uvs(C, scene, obedit)) {
return OPERATOR_CANCELLED;
}
@@ -1595,13 +1595,13 @@ static int cube_project_exec(bContext *C, wmOperator *op)
void UV_OT_cube_project(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Cube Projection";
- ot->idname= "UV_OT_cube_project";
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->name = "Cube Projection";
+ ot->idname = "UV_OT_cube_project";
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->exec= cube_project_exec;
- ot->poll= ED_operator_uvmap;
+ ot->exec = cube_project_exec;
+ ot->poll = ED_operator_uvmap;
/* properties */
RNA_def_float(ot->srna, "cube_size", 1.0f, 0.0f, FLT_MAX, "Cube Size", "Size of the cube to project on", 0.001f, 100.0f);