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:
authorMiika Hamalainen <blender@miikah.org>2011-10-28 21:00:53 +0400
committerMiika Hamalainen <blender@miikah.org>2011-10-28 21:00:53 +0400
commit46ae692710467d3622f58e0c5ce371674a6a7d9b (patch)
treeebd27a8cc3adad65343a6a8d3d22ce02cad24db8 /source/blender/editors
parentfae903e263fd11d788a4e55900ff25f4fc8b26db (diff)
parent7627a742ab6e630522186b04a71fa40533d87db2 (diff)
Merge with trunk r41342
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/CMakeLists.txt1
-rw-r--r--source/blender/editors/animation/CMakeLists.txt1
-rw-r--r--source/blender/editors/animation/keyframes_general.c10
-rw-r--r--source/blender/editors/animation/keyingsets.c17
-rw-r--r--source/blender/editors/armature/BIF_generate.h2
-rw-r--r--source/blender/editors/armature/BIF_retarget.h2
-rw-r--r--source/blender/editors/armature/CMakeLists.txt1
-rw-r--r--source/blender/editors/armature/editarmature.c8
-rw-r--r--source/blender/editors/armature/editarmature_generate.c2
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c2
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c2
-rw-r--r--source/blender/editors/armature/meshlaplacian.c2
-rw-r--r--source/blender/editors/armature/meshlaplacian.h2
-rw-r--r--source/blender/editors/armature/poseSlide.c4
-rw-r--r--source/blender/editors/armature/poseUtils.c22
-rw-r--r--source/blender/editors/armature/poselib.c4
-rw-r--r--source/blender/editors/armature/poseobject.c30
-rw-r--r--source/blender/editors/armature/reeb.c2
-rw-r--r--source/blender/editors/armature/reeb.h2
-rw-r--r--source/blender/editors/curve/CMakeLists.txt1
-rw-r--r--source/blender/editors/curve/curve_intern.h2
-rw-r--r--source/blender/editors/curve/curve_ops.c2
-rw-r--r--source/blender/editors/curve/editcurve.c2
-rw-r--r--source/blender/editors/curve/editfont.c12
-rw-r--r--source/blender/editors/curve/lorem.c2
-rw-r--r--source/blender/editors/datafiles/Bfont.c1
-rw-r--r--source/blender/editors/datafiles/CMakeLists.txt3
-rw-r--r--source/blender/editors/datafiles/blender_icons.png.c (renamed from source/blender/editors/datafiles/blenderbuttons.c)6
-rw-r--r--source/blender/editors/gpencil/CMakeLists.txt1
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c14
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c30
-rw-r--r--source/blender/editors/gpencil/gpencil_undo.c2
-rw-r--r--source/blender/editors/include/BIF_gl.h2
-rw-r--r--source/blender/editors/include/BIF_glutil.h2
-rw-r--r--source/blender/editors/include/ED_armature.h2
-rw-r--r--source/blender/editors/include/ED_curve.h2
-rw-r--r--source/blender/editors/include/ED_datafiles.h6
-rw-r--r--source/blender/editors/include/ED_fileselect.h2
-rw-r--r--source/blender/editors/include/ED_fluidsim.h1
-rw-r--r--source/blender/editors/include/ED_gpencil.h3
-rw-r--r--source/blender/editors/include/ED_image.h2
-rw-r--r--source/blender/editors/include/ED_info.h2
-rw-r--r--source/blender/editors/include/ED_keyframing.h8
-rw-r--r--source/blender/editors/include/ED_lattice.h2
-rw-r--r--source/blender/editors/include/ED_logic.h2
-rw-r--r--source/blender/editors/include/ED_mball.h2
-rw-r--r--source/blender/editors/include/ED_mesh.h2
-rw-r--r--source/blender/editors/include/ED_node.h2
-rw-r--r--source/blender/editors/include/ED_numinput.h2
-rw-r--r--source/blender/editors/include/ED_object.h2
-rw-r--r--source/blender/editors/include/ED_particle.h1
-rw-r--r--source/blender/editors/include/ED_physics.h1
-rw-r--r--source/blender/editors/include/ED_screen.h2
-rw-r--r--source/blender/editors/include/ED_screen_types.h2
-rw-r--r--source/blender/editors/include/ED_sculpt.h2
-rw-r--r--source/blender/editors/include/ED_sequencer.h2
-rw-r--r--source/blender/editors/include/ED_sound.h2
-rw-r--r--source/blender/editors/include/ED_space_api.h2
-rw-r--r--source/blender/editors/include/ED_text.h2
-rw-r--r--source/blender/editors/include/ED_transform.h2
-rw-r--r--source/blender/editors/include/ED_types.h2
-rw-r--r--source/blender/editors/include/ED_util.h2
-rw-r--r--source/blender/editors/include/ED_uvedit.h2
-rw-r--r--source/blender/editors/include/ED_view3d.h2
-rw-r--r--source/blender/editors/include/UI_icons.h2
-rw-r--r--source/blender/editors/include/UI_interface.h9
-rw-r--r--source/blender/editors/include/UI_interface_icons.h2
-rw-r--r--source/blender/editors/include/UI_resources.h1
-rw-r--r--source/blender/editors/include/UI_view2d.h2
-rw-r--r--source/blender/editors/interface/CMakeLists.txt1
-rw-r--r--source/blender/editors/interface/interface.c21
-rw-r--r--source/blender/editors/interface/interface_anim.c2
-rw-r--r--source/blender/editors/interface/interface_draw.c2
-rw-r--r--source/blender/editors/interface/interface_handlers.c83
-rw-r--r--source/blender/editors/interface/interface_icons.c12
-rw-r--r--source/blender/editors/interface/interface_intern.h7
-rw-r--r--source/blender/editors/interface/interface_layout.c2
-rw-r--r--source/blender/editors/interface/interface_ops.c243
-rw-r--r--source/blender/editors/interface/interface_panel.c2
-rw-r--r--source/blender/editors/interface/interface_style.c2
-rw-r--r--source/blender/editors/interface/interface_templates.c55
-rw-r--r--source/blender/editors/interface/interface_widgets.c2
-rw-r--r--source/blender/editors/interface/resources.c2
-rw-r--r--source/blender/editors/interface/view2d.c2
-rw-r--r--source/blender/editors/interface/view2d_ops.c2
-rw-r--r--source/blender/editors/mesh/CMakeLists.txt1
-rw-r--r--source/blender/editors/mesh/editface.c2
-rw-r--r--source/blender/editors/mesh/editmesh.c2
-rw-r--r--source/blender/editors/mesh/editmesh_add.c2
-rw-r--r--source/blender/editors/mesh/editmesh_lib.c2
-rw-r--r--source/blender/editors/mesh/editmesh_loop.c2
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c6
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c3
-rw-r--r--source/blender/editors/mesh/loopcut.c2
-rw-r--r--source/blender/editors/mesh/mesh_data.c2
-rw-r--r--source/blender/editors/mesh/mesh_intern.h2
-rw-r--r--source/blender/editors/mesh/mesh_navmesh.c56
-rw-r--r--source/blender/editors/mesh/mesh_ops.c2
-rw-r--r--source/blender/editors/mesh/meshtools.c2
-rw-r--r--source/blender/editors/metaball/CMakeLists.txt1
-rw-r--r--source/blender/editors/metaball/mball_edit.c6
-rw-r--r--source/blender/editors/metaball/mball_intern.h2
-rw-r--r--source/blender/editors/metaball/mball_ops.c2
-rw-r--r--source/blender/editors/object/CMakeLists.txt1
-rw-r--r--source/blender/editors/object/object_add.c2
-rw-r--r--source/blender/editors/object/object_bake.c2
-rw-r--r--source/blender/editors/object/object_constraint.c9
-rw-r--r--source/blender/editors/object/object_edit.c2
-rw-r--r--source/blender/editors/object/object_group.c2
-rw-r--r--source/blender/editors/object/object_hook.c2
-rw-r--r--source/blender/editors/object/object_intern.h2
-rw-r--r--source/blender/editors/object/object_lattice.c6
-rw-r--r--source/blender/editors/object/object_modifier.c2
-rw-r--r--source/blender/editors/object/object_ops.c2
-rw-r--r--source/blender/editors/object/object_relations.c5
-rw-r--r--source/blender/editors/object/object_select.c2
-rw-r--r--source/blender/editors/object/object_shapekey.c2
-rw-r--r--source/blender/editors/object/object_transform.c8
-rw-r--r--source/blender/editors/object/object_vgroup.c16
-rw-r--r--source/blender/editors/physics/CMakeLists.txt1
-rw-r--r--source/blender/editors/physics/particle_boids.c2
-rw-r--r--source/blender/editors/physics/particle_edit.c6
-rw-r--r--source/blender/editors/physics/particle_object.c2
-rw-r--r--source/blender/editors/physics/physics_fluid.c1
-rw-r--r--source/blender/editors/physics/physics_intern.h2
-rw-r--r--source/blender/editors/physics/physics_ops.c2
-rw-r--r--source/blender/editors/physics/physics_pointcache.c2
-rw-r--r--source/blender/editors/render/CMakeLists.txt1
-rw-r--r--source/blender/editors/render/render_intern.h2
-rw-r--r--source/blender/editors/render/render_internal.c66
-rw-r--r--source/blender/editors/render/render_opengl.c2
-rw-r--r--source/blender/editors/render/render_ops.c2
-rw-r--r--source/blender/editors/render/render_preview.c3
-rw-r--r--source/blender/editors/render/render_shading.c2
-rw-r--r--source/blender/editors/render/render_update.c2
-rw-r--r--source/blender/editors/render/render_view.c2
-rw-r--r--source/blender/editors/screen/CMakeLists.txt1
-rw-r--r--source/blender/editors/screen/area.c2
-rw-r--r--source/blender/editors/screen/glutil.c2
-rw-r--r--source/blender/editors/screen/screen_context.c2
-rw-r--r--source/blender/editors/screen/screen_edit.c2
-rw-r--r--source/blender/editors/screen/screen_intern.h2
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/screen/screendump.c2
-rw-r--r--source/blender/editors/sculpt_paint/CMakeLists.txt1
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c1
-rw-r--r--source/blender/editors/sculpt_paint/paint_intern.h2
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c1
-rw-r--r--source/blender/editors/sculpt_paint/paint_undo.c1
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c2
-rw-r--r--source/blender/editors/sound/CMakeLists.txt1
-rw-r--r--source/blender/editors/sound/sound_intern.h2
-rw-r--r--source/blender/editors/sound/sound_ops.c62
-rw-r--r--source/blender/editors/space_action/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_action/action_edit.c16
-rw-r--r--source/blender/editors/space_api/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_api/space.c2
-rw-r--r--source/blender/editors/space_api/spacetypes.c2
-rw-r--r--source/blender/editors/space_buttons/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c2
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c2
-rw-r--r--source/blender/editors/space_buttons/buttons_intern.h2
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c2
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c2
-rw-r--r--source/blender/editors/space_console/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_console/console_draw.c2
-rw-r--r--source/blender/editors/space_console/console_intern.h2
-rw-r--r--source/blender/editors/space_console/console_ops.c62
-rw-r--r--source/blender/editors/space_console/space_console.c2
-rw-r--r--source/blender/editors/space_file/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_file/file_draw.c2
-rw-r--r--source/blender/editors/space_file/file_intern.h2
-rw-r--r--source/blender/editors/space_file/file_ops.c2
-rw-r--r--source/blender/editors/space_file/file_panels.c2
-rw-r--r--source/blender/editors/space_file/filelist.c4
-rw-r--r--source/blender/editors/space_file/filelist.h2
-rw-r--r--source/blender/editors/space_file/filesel.c2
-rw-r--r--source/blender/editors/space_file/fsmenu.c2
-rw-r--r--source/blender/editors/space_file/fsmenu.h2
-rw-r--r--source/blender/editors/space_file/space_file.c2
-rw-r--r--source/blender/editors/space_graph/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_graph/graph_edit.c9
-rw-r--r--source/blender/editors/space_graph/graph_intern.h2
-rw-r--r--source/blender/editors/space_graph/graph_ops.c2
-rw-r--r--source/blender/editors/space_graph/graph_select.c2
-rw-r--r--source/blender/editors/space_graph/graph_utils.c2
-rw-r--r--source/blender/editors/space_graph/space_graph.c2
-rw-r--r--source/blender/editors/space_image/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_image/image_buttons.c2
-rw-r--r--source/blender/editors/space_image/image_draw.c2
-rw-r--r--source/blender/editors/space_image/image_intern.h2
-rw-r--r--source/blender/editors/space_image/image_ops.c282
-rw-r--r--source/blender/editors/space_image/space_image.c2
-rw-r--r--source/blender/editors/space_info/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_info/info_draw.c2
-rw-r--r--source/blender/editors/space_info/info_intern.h2
-rw-r--r--source/blender/editors/space_info/info_ops.c19
-rw-r--r--source/blender/editors/space_info/info_report.c2
-rw-r--r--source/blender/editors/space_info/info_stats.c2
-rw-r--r--source/blender/editors/space_info/space_info.c2
-rw-r--r--source/blender/editors/space_info/textview.c2
-rw-r--r--source/blender/editors/space_info/textview.h2
-rw-r--r--source/blender/editors/space_logic/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_logic/logic_buttons.c2
-rw-r--r--source/blender/editors/space_logic/logic_intern.h2
-rw-r--r--source/blender/editors/space_logic/logic_ops.c2
-rw-r--r--source/blender/editors/space_logic/logic_window.c2
-rw-r--r--source/blender/editors/space_logic/space_logic.c2
-rw-r--r--source/blender/editors/space_nla/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_node/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_node/drawnode.c2
-rw-r--r--source/blender/editors/space_node/node_buttons.c2
-rw-r--r--source/blender/editors/space_node/node_draw.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c2
-rw-r--r--source/blender/editors/space_node/node_header.c2
-rw-r--r--source/blender/editors/space_node/node_intern.h2
-rw-r--r--source/blender/editors/space_node/node_ops.c2
-rw-r--r--source/blender/editors/space_node/node_select.c2
-rw-r--r--source/blender/editors/space_node/node_state.c2
-rw-r--r--source/blender/editors/space_node/space_node.c2
-rw-r--r--source/blender/editors/space_outliner/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c10
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c4
-rw-r--r--source/blender/editors/space_script/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_script/script_edit.c2
-rw-r--r--source/blender/editors/space_script/script_header.c2
-rw-r--r--source/blender/editors/space_script/script_intern.h2
-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/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c1
-rw-r--r--source/blender/editors/space_sequencer/sequencer_buttons.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c11
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_intern.h2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_ops.c1
-rw-r--r--source/blender/editors/space_sequencer/sequencer_scopes.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c1
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c2
-rw-r--r--source/blender/editors/space_sound/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_sound/sound_header.c2
-rw-r--r--source/blender/editors/space_sound/sound_intern.h2
-rw-r--r--source/blender/editors/space_sound/space_sound.c2
-rw-r--r--source/blender/editors/space_text/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_text/space_text.c2
-rw-r--r--source/blender/editors/space_text/text_draw.c2
-rw-r--r--source/blender/editors/space_text/text_header.c10
-rw-r--r--source/blender/editors/space_text/text_intern.h2
-rw-r--r--source/blender/editors/space_text/text_ops.c338
-rw-r--r--source/blender/editors/space_text/text_python.c2
-rw-r--r--source/blender/editors/space_time/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_userpref/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_userpref/space_userpref.c2
-rw-r--r--source/blender/editors/space_userpref/userpref_intern.h2
-rw-r--r--source/blender/editors/space_userpref/userpref_ops.c2
-rw-r--r--source/blender/editors/space_view3d/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_view3d/drawanimviz.c2
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c2
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c5
-rw-r--r--source/blender/editors/space_view3d/drawobject.c2
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c2
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c52
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_intern.h2
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c24
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c48
-rw-r--r--source/blender/editors/space_view3d/view3d_toolbar.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c2
-rw-r--r--source/blender/editors/transform/CMakeLists.txt1
-rw-r--r--source/blender/editors/transform/transform.c6
-rw-r--r--source/blender/editors/transform/transform.h2
-rw-r--r--source/blender/editors/transform/transform_constraints.c2
-rw-r--r--source/blender/editors/transform/transform_conversions.c26
-rw-r--r--source/blender/editors/transform/transform_generics.c4
-rw-r--r--source/blender/editors/transform/transform_input.c2
-rw-r--r--source/blender/editors/transform/transform_manipulator.c2
-rw-r--r--source/blender/editors/transform/transform_ops.c2
-rw-r--r--source/blender/editors/transform/transform_orientations.c2
-rw-r--r--source/blender/editors/transform/transform_snap.c2
-rw-r--r--source/blender/editors/util/CMakeLists.txt1
-rw-r--r--source/blender/editors/util/crazyspace.c2
-rw-r--r--source/blender/editors/util/ed_util.c2
-rw-r--r--source/blender/editors/util/editmode_undo.c2
-rw-r--r--source/blender/editors/util/numinput.c2
-rw-r--r--source/blender/editors/util/undo.c2
-rw-r--r--source/blender/editors/util/util_intern.h2
-rw-r--r--source/blender/editors/uvedit/CMakeLists.txt1
-rw-r--r--source/blender/editors/uvedit/uvedit_buttons.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_intern.h2
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c2
301 files changed, 1042 insertions, 1205 deletions
diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt
index abda4f11a2c..16c0d4a2c79 100644
--- a/source/blender/editors/CMakeLists.txt
+++ b/source/blender/editors/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/animation/CMakeLists.txt b/source/blender/editors/animation/CMakeLists.txt
index 83fe91d6f76..0386af9776c 100644
--- a/source/blender/editors/animation/CMakeLists.txt
+++ b/source/blender/editors/animation/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 0f4546968ba..732f84bb33d 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -757,7 +757,9 @@ EnumPropertyItem keyframe_paste_merge_items[] = {
{0, NULL, 0, NULL, NULL}};
-/* This function pastes data from the keyframes copy/paste buffer */
+/* This function pastes data from the keyframes copy/paste buffer
+ * > return status code is whether the method FAILED to do anything
+ */
short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data,
const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode)
{
@@ -773,17 +775,17 @@ short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data,
/* check if buffer is empty */
if (animcopybuf.first == NULL) {
- BKE_report(ac->reports, RPT_WARNING, "No data in buffer to paste");
+ BKE_report(ac->reports, RPT_ERROR, "No animation data in buffer to paste");
return -1;
}
if (anim_data->first == NULL) {
- BKE_report(ac->reports, RPT_WARNING, "No FCurves to paste into");
+ BKE_report(ac->reports, RPT_ERROR, "No selected F-Curves to paste into");
return -1;
}
/* mathods of offset */
- switch(offset_mode) {
+ switch (offset_mode) {
case KEYFRAME_PASTE_OFFSET_CFRA_START:
offset= (float)(CFRA - animcopy_firstframe);
break;
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 7c2f969e187..3b65e777200 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -552,7 +552,12 @@ KeyingSet *ANIM_builtin_keyingset_get_named (KeyingSet *prevKS, const char name[
if (strcmp(name, ks->name) == 0)
return ks;
}
-
+
+ /* complain about missing keying sets on debug builds */
+#ifndef NDEBUG
+ printf("%s: '%s' not found\n", __func__, name);
+#endif
+
/* no matches found */
return NULL;
}
@@ -687,7 +692,7 @@ KeyingSet *ANIM_get_keyingset_for_autokeying(Scene *scene, const char *tranformK
if (IS_AUTOKEY_FLAG(scene, ONLYKEYINGSET) && (scene->active_keyingset))
return ANIM_scene_get_active_keyingset(scene);
else if (IS_AUTOKEY_FLAG(scene, INSERTAVAIL))
- return ANIM_builtin_keyingset_get_named(NULL, "Available");
+ return ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_AVAILABLE_ID);
else
return ANIM_builtin_keyingset_get_named(NULL, tranformKSName);
}
@@ -726,10 +731,10 @@ EnumPropertyItem *ANIM_keying_sets_enum_itemf (bContext *C, PointerRNA *UNUSED(p
* - these are listed in the order in which they were defined for the active scene
*/
if (scene->keyingsets.first) {
- for (ks= scene->keyingsets.first; ks; ks= ks->next) {
+ for (ks= scene->keyingsets.first; ks; ks= ks->next, i++) {
if (ANIM_keyingset_context_ok_poll(C, ks)) {
item_tmp.identifier= item_tmp.name= ks->name;
- item_tmp.value= i++;
+ item_tmp.value= i;
RNA_enum_item_add(&item, &totitem, &item_tmp);
}
}
@@ -740,11 +745,11 @@ EnumPropertyItem *ANIM_keying_sets_enum_itemf (bContext *C, PointerRNA *UNUSED(p
/* builtin Keying Sets */
i= -1;
- for (ks= builtin_keyingsets.first; ks; ks= ks->next) {
+ for (ks= builtin_keyingsets.first; ks; ks= ks->next, i--) {
/* only show KeyingSet if context is suitable */
if (ANIM_keyingset_context_ok_poll(C, ks)) {
item_tmp.identifier= item_tmp.name= ks->name;
- item_tmp.value= i--;
+ item_tmp.value= i;
RNA_enum_item_add(&item, &totitem, &item_tmp);
}
}
diff --git a/source/blender/editors/armature/BIF_generate.h b/source/blender/editors/armature/BIF_generate.h
index 0614bd26c00..311b110a3f6 100644
--- a/source/blender/editors/armature/BIF_generate.h
+++ b/source/blender/editors/armature/BIF_generate.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/armature/BIF_retarget.h b/source/blender/editors/armature/BIF_retarget.h
index e0604f3cefb..ad3d3555250 100644
--- a/source/blender/editors/armature/BIF_retarget.h
+++ b/source/blender/editors/armature/BIF_retarget.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/armature/CMakeLists.txt b/source/blender/editors/armature/CMakeLists.txt
index 7ecbdc9ebe5..8c1243ee300 100644
--- a/source/blender/editors/armature/CMakeLists.txt
+++ b/source/blender/editors/armature/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 11fd932eed6..15c8868f9b9 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -4948,7 +4948,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op,
static int pose_clear_scale_exec(bContext *C, wmOperator *op)
{
- return pose_clear_transform_generic_exec(C, op, pchan_clear_scale, "Scaling");
+ return pose_clear_transform_generic_exec(C, op, pchan_clear_scale, ANIM_KS_SCALING_ID);
}
void POSE_OT_scale_clear(wmOperatorType *ot)
@@ -4969,7 +4969,7 @@ void POSE_OT_scale_clear(wmOperatorType *ot)
static int pose_clear_rot_exec(bContext *C, wmOperator *op)
{
- return pose_clear_transform_generic_exec(C, op, pchan_clear_rot, "Rotation");
+ return pose_clear_transform_generic_exec(C, op, pchan_clear_rot, ANIM_KS_ROTATION_ID);
}
void POSE_OT_rot_clear(wmOperatorType *ot)
@@ -4990,7 +4990,7 @@ void POSE_OT_rot_clear(wmOperatorType *ot)
static int pose_clear_loc_exec(bContext *C, wmOperator *op)
{
- return pose_clear_transform_generic_exec(C, op, pchan_clear_loc, "Location");
+ return pose_clear_transform_generic_exec(C, op, pchan_clear_loc, ANIM_KS_LOCATION_ID);
}
void POSE_OT_loc_clear(wmOperatorType *ot)
@@ -5011,7 +5011,7 @@ void POSE_OT_loc_clear(wmOperatorType *ot)
static int pose_clear_transforms_exec(bContext *C, wmOperator *op)
{
- return pose_clear_transform_generic_exec(C, op, pchan_clear_transforms, "LocRotScale");
+ return pose_clear_transform_generic_exec(C, op, pchan_clear_transforms, ANIM_KS_LOC_ROT_SCALE_ID);
}
void POSE_OT_transforms_clear(wmOperatorType *ot)
diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c
index 17bd43ff2d8..3d020067700 100644
--- a/source/blender/editors/armature/editarmature_generate.c
+++ b/source/blender/editors/armature/editarmature_generate.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 14891826260..6f1da5757c6 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index bcd9d746a44..31be1efdc1f 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 6c721660e9c..53d0141f44d 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/armature/meshlaplacian.h b/source/blender/editors/armature/meshlaplacian.h
index 45c539b8ef5..6ec67997d24 100644
--- a/source/blender/editors/armature/meshlaplacian.h
+++ b/source/blender/editors/armature/meshlaplacian.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c
index 0497c0507dc..efc8ffe4c7d 100644
--- a/source/blender/editors/armature/poseSlide.c
+++ b/source/blender/editors/armature/poseSlide.c
@@ -421,7 +421,7 @@ static void pose_slide_apply_quat (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
sub_qt_qtqt(quat_diff, pchan->quat, quat_prev);
/* make a copy of the original rotation */
- QUATCOPY(quat_orig, pchan->quat);
+ copy_qt_qt(quat_orig, pchan->quat);
/* increase the original by the delta transform, by an amount determined by percentage */
add_qt_qtqt(pchan->quat, quat_orig, quat_diff, pso->percentage);
@@ -436,7 +436,7 @@ static void pose_slide_apply_quat (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
interp_qt_qtqt(quat_interp, quat_prev, quat_next, (cframe-pso->prevFrame) / (pso->nextFrame-pso->prevFrame) );
/* make a copy of the original rotation */
- QUATCOPY(quat_orig, pchan->quat);
+ copy_qt_qt(quat_orig, pchan->quat);
/* tricky interpolations - blending between original and new */
interp_qt_qtqt(pchan->quat, quat_orig, quat_interp, 1.0f/6.0f);
diff --git a/source/blender/editors/armature/poseUtils.c b/source/blender/editors/armature/poseUtils.c
index 4b22d76ad0b..71cdda7fe15 100644
--- a/source/blender/editors/armature/poseUtils.c
+++ b/source/blender/editors/armature/poseUtils.c
@@ -111,11 +111,11 @@ static void fcurves_to_pchan_links_get (ListBase *pfLinks, Object *ob, bAction *
pchan->flag |= POSE_SIZE;
/* store current transforms */
- VECCOPY(pfl->oldloc, pchan->loc);
- VECCOPY(pfl->oldrot, pchan->eul);
- VECCOPY(pfl->oldscale, pchan->size);
- QUATCOPY(pfl->oldquat, pchan->quat);
- VECCOPY(pfl->oldaxis, pchan->rotAxis);
+ copy_v3_v3(pfl->oldloc, pchan->loc);
+ copy_v3_v3(pfl->oldrot, pchan->eul);
+ copy_v3_v3(pfl->oldscale, pchan->size);
+ copy_qt_qt(pfl->oldquat, pchan->quat);
+ copy_v3_v3(pfl->oldaxis, pchan->rotAxis);
pfl->oldangle = pchan->rotAngle;
/* make copy of custom properties */
@@ -205,11 +205,11 @@ void poseAnim_mapping_reset (ListBase *pfLinks)
bPoseChannel *pchan= pfl->pchan;
/* just copy all the values over regardless of whether they changed or not */
- VECCOPY(pchan->loc, pfl->oldloc);
- VECCOPY(pchan->eul, pfl->oldrot);
- VECCOPY(pchan->size, pfl->oldscale);
- QUATCOPY(pchan->quat, pfl->oldquat);
- VECCOPY(pchan->rotAxis, pfl->oldaxis);
+ copy_v3_v3(pchan->loc, pfl->oldloc);
+ copy_v3_v3(pchan->eul, pfl->oldrot);
+ copy_v3_v3(pchan->size, pfl->oldscale);
+ copy_qt_qt(pchan->quat, pfl->oldquat);
+ copy_v3_v3(pchan->rotAxis, pfl->oldaxis);
pchan->rotAngle = pfl->oldangle;
/* just overwrite values of properties from the stored copies (there should be some) */
@@ -223,7 +223,7 @@ void poseAnim_mapping_autoKeyframe (bContext *C, Scene *scene, Object *ob, ListB
{
/* insert keyframes as necessary if autokeyframing */
if (autokeyframe_cfra_can_key(scene, &ob->id)) {
- KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "Whole Character");
+ KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_WHOLE_CHARACTER_ID);
ListBase dsources = {NULL, NULL};
tPChanFCurveLink *pfl;
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index 8e9f5c7543c..064defb1aef 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -433,7 +433,7 @@ static int poselib_add_exec (bContext *C, wmOperator *op)
bAction *act = poselib_validate(ob);
bPose *pose= (ob) ? ob->pose : NULL;
TimeMarker *marker;
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Whole Character"); /* this includes custom props :)*/
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_WHOLE_CHARACTER_ID); /* this includes custom props :)*/
int frame= RNA_int_get(op->ptr, "frame");
char name[64];
@@ -903,7 +903,7 @@ static void poselib_keytag_pose (bContext *C, Scene *scene, tPoseLib_PreviewData
bAction *act= pld->act;
bActionGroup *agrp;
- KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "Whole Character");
+ KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_WHOLE_CHARACTER_ID);
ListBase dsources = {NULL, NULL};
short autokey = autokeyframe_cfra_can_key(scene, &pld->ob->id);
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index a978f327993..e89674e8a37 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -783,14 +783,14 @@ static void pose_copy_menu(Scene *scene)
{
switch (nr) {
case 1: /* Local Location */
- VECCOPY(pchan->loc, pchanact->loc);
+ copy_v3_v3(pchan->loc, pchanact->loc);
break;
case 2: /* Local Rotation */
- QUATCOPY(pchan->quat, pchanact->quat);
- VECCOPY(pchan->eul, pchanact->eul);
+ copy_qt_qt(pchan->quat, pchanact->quat);
+ copy_v3_v3(pchan->eul, pchanact->eul);
break;
case 3: /* Local Size */
- VECCOPY(pchan->size, pchanact->size);
+ copy_v3_v3(pchan->size, pchanact->size);
break;
case 4: /* All Constraints */
{
@@ -822,9 +822,9 @@ static void pose_copy_menu(Scene *scene)
case 7: /* IK (DOF) settings */
{
pchan->ikflag = pchanact->ikflag;
- VECCOPY(pchan->limitmin, pchanact->limitmin);
- VECCOPY(pchan->limitmax, pchanact->limitmax);
- VECCOPY(pchan->stiffness, pchanact->stiffness);
+ copy_v3_v3(pchan->limitmin, pchanact->limitmin);
+ copy_v3_v3(pchan->limitmax, pchanact->limitmax);
+ copy_v3_v3(pchan->stiffness, pchanact->stiffness);
pchan->ikstretch= pchanact->ikstretch;
pchan->ikrotweight= pchanact->ikrotweight;
pchan->iklinweight= pchanact->iklinweight;
@@ -861,7 +861,7 @@ static void pose_copy_menu(Scene *scene)
armature_mat_pose_to_bone(pchan, pchanact->pose_mat, delta_mat);
mat4_to_size( size,delta_mat);
- VECCOPY(pchan->size, size);
+ copy_v3_v3(pchan->size, size);
}
}
}
@@ -1014,22 +1014,22 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s
/* only loc rot size
* - only copies transform info for the pose
*/
- VECCOPY(pchan->loc, chan->loc);
- VECCOPY(pchan->size, chan->size);
+ copy_v3_v3(pchan->loc, chan->loc);
+ copy_v3_v3(pchan->size, chan->size);
pchan->flag= chan->flag;
/* check if rotation modes are compatible (i.e. do they need any conversions) */
if (pchan->rotmode == chan->rotmode) {
/* copy the type of rotation in use */
if (pchan->rotmode > 0) {
- VECCOPY(pchan->eul, chan->eul);
+ copy_v3_v3(pchan->eul, chan->eul);
}
else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
- VECCOPY(pchan->rotAxis, chan->rotAxis);
+ copy_v3_v3(pchan->rotAxis, chan->rotAxis);
pchan->rotAngle = chan->rotAngle;
}
else {
- QUATCOPY(pchan->quat, chan->quat);
+ copy_qt_qt(pchan->quat, chan->quat);
}
}
else if (pchan->rotmode > 0) {
@@ -1151,7 +1151,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
int selOnly= RNA_boolean_get(op->ptr, "selected_mask");
/* get KeyingSet to use */
- KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "LocRotScale");
+ KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOC_ROT_SCALE_ID);
/* sanity checks */
if ELEM(NULL, ob, ob->pose)
@@ -2165,7 +2165,7 @@ static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
Object *ob= object_pose_armature_get(CTX_data_active_object(C));
- KeyingSet *ks = ANIM_builtin_keyingset_get_named(NULL, "LocRotScale");
+ KeyingSet *ks = ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOC_ROT_SCALE_ID);
/* loop through all selected pchans, flipping and keying (as needed) */
CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index 78c9e601d87..0b214e48b6a 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/armature/reeb.h b/source/blender/editors/armature/reeb.h
index 3ef33c4e2c4..0080bbec120 100644
--- a/source/blender/editors/armature/reeb.h
+++ b/source/blender/editors/armature/reeb.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/curve/CMakeLists.txt b/source/blender/editors/curve/CMakeLists.txt
index 9bad02eca1f..25df17d232a 100644
--- a/source/blender/editors/curve/CMakeLists.txt
+++ b/source/blender/editors/curve/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h
index 63ba8ded7e6..2557c7f7c72 100644
--- a/source/blender/editors/curve/curve_intern.h
+++ b/source/blender/editors/curve/curve_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c
index 6b85523ac82..be6b322e6b4 100644
--- a/source/blender/editors/curve/curve_ops.c
+++ b/source/blender/editors/curve/curve_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 0a05086a3a4..4087002598e 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index c80f5c85c25..b1c266482ae 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -1656,14 +1654,14 @@ static void font_ui_template_init(bContext *C, wmOperator *op)
uiIDContextProperty(C, &pprop->ptr, &pprop->prop);
}
-static int open_cancel(bContext *UNUSED(C), wmOperator *op)
+static int font_open_cancel(bContext *UNUSED(C), wmOperator *op)
{
MEM_freeN(op->customdata);
op->customdata= NULL;
return OPERATOR_CANCELLED;
}
-static int open_exec(bContext *C, wmOperator *op)
+static int font_open_exec(bContext *C, wmOperator *op)
{
struct Main *bmain= CTX_data_main(C);
VFont *font;
@@ -1721,7 +1719,7 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0)? font->name: U.fontdir;
if(RNA_property_is_set(op->ptr, "filepath"))
- return open_exec(C, op);
+ return font_open_exec(C, op);
RNA_string_set(op->ptr, "filepath", path);
WM_event_add_fileselect(C, op);
@@ -1736,9 +1734,9 @@ void FONT_OT_open(wmOperatorType *ot)
ot->idname= "FONT_OT_open";
/* api callbacks */
- ot->exec= open_exec;
+ ot->exec= font_open_exec;
ot->invoke= open_invoke;
- ot->cancel= open_cancel;
+ ot->cancel= font_open_cancel;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
diff --git a/source/blender/editors/curve/lorem.c b/source/blender/editors/curve/lorem.c
index bd65cdddec4..66b358e04e5 100644
--- a/source/blender/editors/curve/lorem.c
+++ b/source/blender/editors/curve/lorem.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/datafiles/Bfont.c b/source/blender/editors/datafiles/Bfont.c
index 6f8adae5f3f..8a9e2748983 100644
--- a/source/blender/editors/datafiles/Bfont.c
+++ b/source/blender/editors/datafiles/Bfont.c
@@ -1,6 +1,5 @@
/* DataToC output of file <Bfont> */
/*
- * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt
index 17e3a868a8c..946e1c66ad7 100644
--- a/source/blender/editors/datafiles/CMakeLists.txt
+++ b/source/blender/editors/datafiles/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
@@ -48,7 +47,7 @@ if(WITH_BLENDER)
# images
splash.png.c
- blenderbuttons.c
+ blender_icons.png.c
# brushes
add.png.c
diff --git a/source/blender/editors/datafiles/blenderbuttons.c b/source/blender/editors/datafiles/blender_icons.png.c
index 8f1507e12e0..c4ea4601ed2 100644
--- a/source/blender/editors/datafiles/blenderbuttons.c
+++ b/source/blender/editors/datafiles/blender_icons.png.c
@@ -1,7 +1,7 @@
-/* DataToC output of file <blenderbuttons> */
+/* DataToC output of file <blender_icons_png> */
-int datatoc_blenderbuttons_size= 200029;
-char datatoc_blenderbuttons[]= {
+int datatoc_blender_icons_png_size= 200029;
+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, 0, 4,103, 65, 77, 65, 0, 0,177,142,124,251, 81,147, 0, 0, 0, 32, 99, 72, 82, 77, 0, 0,135, 15,
0, 0,140, 15, 0, 0,253, 82, 0, 0,129, 64, 0, 0,125,121, 0, 0,233,139, 0, 0, 60,229, 0, 0, 25,204,115, 60,133,119,
diff --git a/source/blender/editors/gpencil/CMakeLists.txt b/source/blender/editors/gpencil/CMakeLists.txt
index b312f397939..15707bfc4d0 100644
--- a/source/blender/editors/gpencil/CMakeLists.txt
+++ b/source/blender/editors/gpencil/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 8e83b01fc2f..64da61f8f55 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -580,8 +580,8 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
/* set color, stroke thickness, and point size */
glLineWidth(lthick);
- QUATCOPY(color, gpl->color); // just for copying 4 array elements
- QUATCOPY(tcolor, gpl->color); // additional copy of color (for ghosting)
+ copy_v4_v4(color, gpl->color); // just for copying 4 array elements
+ copy_v4_v4(tcolor, gpl->color); // additional copy of color (for ghosting)
glColor4fv(color);
glPointSize((float)(gpl->thickness + 2));
@@ -778,7 +778,7 @@ void draw_gpencil_view2d (bContext *C, short onlyv2d)
* Note: this gets called twice - first time with only3d=1 to draw 3d-strokes, second time with only3d=0 for screen-aligned strokes
*/
-void draw_gpencil_view3d_ext (Scene *scene, View3D *v3d, ARegion *ar, short only3d)
+void draw_gpencil_view3d (Scene *scene, View3D *v3d, ARegion *ar, short only3d)
{
bGPdata *gpd;
int dflag = 0;
@@ -809,12 +809,4 @@ void draw_gpencil_view3d_ext (Scene *scene, View3D *v3d, ARegion *ar, short only
gp_draw_data(gpd, rect.xmin, rect.ymin, rect.xmax, rect.ymax, CFRA, dflag);
}
-void draw_gpencil_view3d (bContext *C, short only3d)
-{
- ARegion *ar= CTX_wm_region(C);
- View3D *v3d= CTX_wm_view3d(C);
- Scene *scene= CTX_data_scene(C);
- draw_gpencil_view3d_ext(scene, v3d, ar, only3d);
-}
-
/* ************************************************** */
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 1bab362fe55..ff3b69c2bf6 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -385,9 +385,10 @@ static short gp_stroke_addpoint (tGPsdata *p, const int mval[2], float pressure)
pt->y= mval[1];
pt->pressure= pressure;
- /* if there's stroke fir this poly line session add (or replace last) point
- to stroke. This allows to draw lines more interactively (see new segment
- during mouse slide, i.e.) */
+ /* if there's stroke for this poly line session add (or replace last) point
+ * to stroke. This allows to draw lines more interactively (see new segment
+ * during mouse slide, i.e.)
+ */
if (p->flags & GP_PAINTFLAG_STROKEADDED) {
bGPDstroke *gps= p->gpf->strokes.last;
bGPDspoint *pts;
@@ -401,7 +402,8 @@ static short gp_stroke_addpoint (tGPsdata *p, const int mval[2], float pressure)
pts = &gps->points[gps->totpoints-1];
/* special case for poly lines: normally, depth is needed only when creating new stroke from buffer,
- but poly lines are converting to stroke instantly, so initialize depth buffer before converting coordinates */
+ * but poly lines are converting to stroke instantly, so initialize depth buffer before converting coordinates
+ */
if (gpencil_project_check(p)) {
View3D *v3d= p->sa->spacedata.first;
@@ -1122,7 +1124,7 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
p->gpd= *gpd_ptr;
}
- if(ED_gpencil_session_active()==0) {
+ if (ED_gpencil_session_active()==0) {
/* initialize undo stack,
also, existing undo stack would make buffer drawn */
gpencil_undo_init(p->gpd);
@@ -1693,9 +1695,11 @@ static int gpencil_area_exists(bContext *C, ScrArea *satest)
bScreen *sc= CTX_wm_screen(C);
ScrArea *sa;
- for(sa= sc->areabase.first; sa; sa= sa->next)
- if(sa==satest)
+ for (sa= sc->areabase.first; sa; sa= sa->next) {
+ if (sa==satest)
return 1;
+ }
+
return 0;
}
@@ -1781,9 +1785,9 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
/* basically, this should be mouse-button up = end stroke
* BUT what happens next depends on whether we 'painting sessions' is enabled
*/
- sketch|= GPENCIL_SKETCH_SESSIONS_ON(p->scene);
- /* polyline drawig is also 'sketching' -- all knots should be added during one session */
- sketch|= p->paintmode == GP_PAINTMODE_DRAW_POLY;
+ sketch |= GPENCIL_SKETCH_SESSIONS_ON(p->scene);
+ /* polyline drawing is also 'sketching' -- all knots should be added during one session */
+ sketch |= p->paintmode == GP_PAINTMODE_DRAW_POLY;
if (sketch) {
/* end stroke only, and then wait to resume painting soon */
@@ -1804,13 +1808,13 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
}
else if (event->val == KM_PRESS) {
/* not painting, so start stroke (this should be mouse-button down) */
-
p= gpencil_stroke_begin(C, op);
if (p->status == GP_STATUS_ERROR) {
estate = OPERATOR_CANCELLED;
}
- } else {
+ }
+ else {
p->status = GP_STATUS_IDLING;
}
}
@@ -1845,7 +1849,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
}
/* gpencil modal operator stores area, which can be removed while using it (like fullscreen) */
- if(0==gpencil_area_exists(C, p->sa))
+ if (0==gpencil_area_exists(C, p->sa))
estate= OPERATOR_CANCELLED;
else
/* update status indicators - cursor, header, etc. */
diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c
index 1154975e3cc..1ab00082043 100644
--- a/source/blender/editors/gpencil/gpencil_undo.c
+++ b/source/blender/editors/gpencil/gpencil_undo.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h
index 873b4e52a20..940a5866fcd 100644
--- a/source/blender/editors/include/BIF_gl.h
+++ b/source/blender/editors/include/BIF_gl.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h
index 27bd31c20ff..cd3d87a8979 100644
--- a/source/blender/editors/include/BIF_glutil.h
+++ b/source/blender/editors/include/BIF_glutil.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index b73684d43d8..121c53f7c65 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h
index b4782a5919b..1f9b034b2e5 100644
--- a/source/blender/editors/include/ED_curve.h
+++ b/source/blender/editors/include/ED_curve.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h
index ee29df3fffb..2c4472c4636 100644
--- a/source/blender/editors/include/ED_datafiles.h
+++ b/source/blender/editors/include/ED_datafiles.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -38,8 +36,8 @@
extern int datatoc_startup_blend_size;
extern char datatoc_startup_blend[];
-extern int datatoc_blenderbuttons_size;
-extern char datatoc_blenderbuttons[];
+extern int datatoc_blender_icons_png_size;
+extern char datatoc_blender_icons_png[];
extern int datatoc_prvicons_size;
extern char datatoc_prvicons[];
diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h
index df4113ca07a..dc362f9f99b 100644
--- a/source/blender/editors/include/ED_fileselect.h
+++ b/source/blender/editors/include/ED_fileselect.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_fluidsim.h b/source/blender/editors/include/ED_fluidsim.h
index 3388280e5fa..f48b5df56c0 100644
--- a/source/blender/editors/include/ED_fluidsim.h
+++ b/source/blender/editors/include/ED_fluidsim.h
@@ -1,7 +1,6 @@
/*
* BKE_fluidsim.h
*
- * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index bfd16487ae5..a640b5c911c 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -78,8 +78,7 @@ void ED_operatortypes_gpencil(void);
void draw_gpencil_2dimage(struct bContext *C, struct ImBuf *ibuf);
void draw_gpencil_view2d(struct bContext *C, short onlyv2d);
-void draw_gpencil_view3d(struct bContext *C, short only3d);
-void draw_gpencil_view3d_ext(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, short only3d);
+void draw_gpencil_view3d(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, short only3d);
void gpencil_panel_standard(const struct bContext *C, struct Panel *pa);
diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h
index cfe9ea53d9a..4e8aadecfc7 100644
--- a/source/blender/editors/include/ED_image.h
+++ b/source/blender/editors/include/ED_image.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_info.h b/source/blender/editors/include/ED_info.h
index c76c478c6d6..7044ab63cad 100644
--- a/source/blender/editors/include/ED_info.h
+++ b/source/blender/editors/include/ED_info.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index 8dd543d8f63..eda84d0e7a4 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -317,6 +317,14 @@ typedef enum eAnimFilterFlags {
int ED_autokeyframe_object(struct bContext *C, struct Scene *scene, struct Object *ob, struct KeyingSet *ks);
int ED_autokeyframe_pchan(struct bContext *C, struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, struct KeyingSet *ks);
+/* Names for builtin keying sets so we don't confuse these with labels/text,
+ * defined in python script: keyingsets_builtins.py */
+#define ANIM_KS_LOCATION_ID "Location"
+#define ANIM_KS_ROTATION_ID "Rotation"
+#define ANIM_KS_SCALING_ID "Scaling"
+#define ANIM_KS_LOC_ROT_SCALE_ID "LocRotScale"
+#define ANIM_KS_AVAILABLE_ID "Available"
+#define ANIM_KS_WHOLE_CHARACTER_ID "Whole Character"
#ifdef __cplusplus
}
diff --git a/source/blender/editors/include/ED_lattice.h b/source/blender/editors/include/ED_lattice.h
index 066dd23a629..15e5c3dba8f 100644
--- a/source/blender/editors/include/ED_lattice.h
+++ b/source/blender/editors/include/ED_lattice.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_logic.h b/source/blender/editors/include/ED_logic.h
index 00fc6ccac26..e6026eb5fee 100644
--- a/source/blender/editors/include/ED_logic.h
+++ b/source/blender/editors/include/ED_logic.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h
index 2afc3155398..259004864fb 100644
--- a/source/blender/editors/include/ED_mball.h
+++ b/source/blender/editors/include/ED_mball.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 07390deb6c7..28650452b3f 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h
index 1cbf45960d3..b6cb59e2f4a 100644
--- a/source/blender/editors/include/ED_node.h
+++ b/source/blender/editors/include/ED_node.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_numinput.h b/source/blender/editors/include/ED_numinput.h
index d605a9b3377..e2387c3e9dd 100644
--- a/source/blender/editors/include/ED_numinput.h
+++ b/source/blender/editors/include/ED_numinput.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index b451e278d47..4e0f59afc15 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h
index f2973d0d070..48232acf562 100644
--- a/source/blender/editors/include/ED_particle.h
+++ b/source/blender/editors/include/ED_particle.h
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/include/ED_physics.h b/source/blender/editors/include/ED_physics.h
index c58e70a0768..eadd1566671 100644
--- a/source/blender/editors/include/ED_physics.h
+++ b/source/blender/editors/include/ED_physics.h
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index f2ef4e16852..f92ee724f6f 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h
index 71e3780fe24..544d366c926 100644
--- a/source/blender/editors/include/ED_screen_types.h
+++ b/source/blender/editors/include/ED_screen_types.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h
index 85a8d8945bb..7993e11ea55 100644
--- a/source/blender/editors/include/ED_sculpt.h
+++ b/source/blender/editors/include/ED_sculpt.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_sequencer.h b/source/blender/editors/include/ED_sequencer.h
index 5be1403c97b..da2fce2596b 100644
--- a/source/blender/editors/include/ED_sequencer.h
+++ b/source/blender/editors/include/ED_sequencer.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_sound.h b/source/blender/editors/include/ED_sound.h
index 3c6b12da076..a4e90094e19 100644
--- a/source/blender/editors/include/ED_sound.h
+++ b/source/blender/editors/include/ED_sound.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_space_api.h b/source/blender/editors/include/ED_space_api.h
index 053b1d4fd9c..5c42dfc5d05 100644
--- a/source/blender/editors/include/ED_space_api.h
+++ b/source/blender/editors/include/ED_space_api.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_text.h b/source/blender/editors/include/ED_text.h
index bc8c9958e18..da01e25f4d9 100644
--- a/source/blender/editors/include/ED_text.h
+++ b/source/blender/editors/include/ED_text.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index 00ae7dda2e3..c644b1d27b4 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_types.h b/source/blender/editors/include/ED_types.h
index c1c31372011..6ea45c995c9 100644
--- a/source/blender/editors/include/ED_types.h
+++ b/source/blender/editors/include/ED_types.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h
index 5e004fd8d47..c08e5eabbd3 100644
--- a/source/blender/editors/include/ED_util.h
+++ b/source/blender/editors/include/ED_util.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h
index f6106e62533..2b4c213bc52 100644
--- a/source/blender/editors/include/ED_uvedit.h
+++ b/source/blender/editors/include/ED_uvedit.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index d574ddd3030..f69abb0996a 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index 887d069fdaa..f310b8b78f8 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 43f6b36f5eb..cb18ea37ffc 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -751,7 +749,7 @@ void uiTemplateTextureImage(uiLayout *layout, struct bContext *C, struct Tex *te
void uiTemplateReportsBanner(uiLayout *layout, struct bContext *C);
void uiTemplateKeymapItemProperties(uiLayout *layout, struct PointerRNA *ptr);
-void uiTemplateList(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *activeptr, const char *activeprop, int rows, int maxrows, int type);
+void uiTemplateList(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *activeptr, const char *activeprop, const char *prop_list, int rows, int maxrows, int type);
/* items */
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname);
@@ -787,6 +785,7 @@ void uiItemMenuEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propn
void UI_buttons_operatortypes(void);
/* Helpers for Operators */
+uiBut *uiContextActiveButton(const struct bContext *C);
void uiContextActiveProperty(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index);
void uiContextActivePropertyHandle(struct bContext *C);
void uiContextAnimUpdate(const struct bContext *C);
@@ -817,5 +816,9 @@ const char *UI_translate_do_tooltip(const char *msgid);
#define IFACE_(msgid) UI_translate_do_iface(msgid)
#define TIP_(msgid) UI_translate_do_tooltip(msgid)
+/* UI_OT_editsource helpers */
+int UI_editsource_enable_check(void);
+void UI_editsource_active_but_test(uiBut *but);
+
#endif /* UI_INTERFACE_H */
diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h
index 54400accbc2..e9c213dec35 100644
--- a/source/blender/editors/include/UI_interface_icons.h
+++ b/source/blender/editors/include/UI_interface_icons.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index ab5b8e8aff3..9c46a5d28de 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index 1aadb63181d..7ff27a5bbde 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/interface/CMakeLists.txt b/source/blender/editors/interface/CMakeLists.txt
index 678be82f160..8ba86673f87 100644
--- a/source/blender/editors/interface/CMakeLists.txt
+++ b/source/blender/editors/interface/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index b7b572e7217..5b27fe88b4b 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -2562,23 +2560,10 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
if(block->curlayout)
ui_layout_add_but(block->curlayout, but);
-#ifdef WITH_PYTHON_UI_INFO
- {
- extern void PyC_FileAndNum_Safe(const char **filename, int *lineno);
-
- const char *fn;
- int lineno= -1;
- PyC_FileAndNum_Safe(&fn, &lineno);
- if (lineno != -1) {
- BLI_strncpy(but->py_dbg_fn, fn, sizeof(but->py_dbg_fn));
- but->py_dbg_ln= lineno;
- }
- else {
- but->py_dbg_fn[0]= '\0';
- but->py_dbg_ln= -1;
- }
+ /* if the 'UI_OT_editsource' is running, extract the source info from the button */
+ if (UI_editsource_enable_check()) {
+ UI_editsource_active_but_test(but);
}
-#endif /* WITH_PYTHON_UI_INFO */
return but;
}
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index aeb8ad99dd2..1edd43d4e01 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index aefe773fdad..3d08e761090 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 32c4ec21e13..e49cb4898d9 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -1437,8 +1437,11 @@ static void ui_textedit_set_cursor_select(uiBut *but, uiHandleButtonData *data,
ui_check_but(but);
}
-/* note: utf8 & ascii funcs should be merged */
-static int ui_textedit_type_utf8(uiBut *but, uiHandleButtonData *data, const char utf8_buf[6])
+/* this is used for both utf8 and ascii, its meant to be used for single keys,
+ * notie the buffer is either copied or not, so its not suitable for pasting in
+ * - campbell */
+static int ui_textedit_type_buf(uiBut *but, uiHandleButtonData *data,
+ const char *utf8_buf, int utf8_buf_len)
{
char *str;
int len, changed= 0;
@@ -1447,7 +1450,7 @@ static int ui_textedit_type_utf8(uiBut *but, uiHandleButtonData *data, const cha
len= strlen(str);
if(len-(but->selend - but->selsta)+1 <= data->maxlen) {
- int step= BLI_strnlen(utf8_buf, sizeof(utf8_buf));
+ int step= utf8_buf_len;
/* type over the current selection */
if ((but->selend - but->selsta) > 0) {
@@ -1468,8 +1471,17 @@ static int ui_textedit_type_utf8(uiBut *but, uiHandleButtonData *data, const cha
static int ui_textedit_type_ascii(uiBut *but, uiHandleButtonData *data, char ascii)
{
- char utf8_buf[6]= {ascii, '\0'};
- return ui_textedit_type_utf8(but, data, utf8_buf);
+ char buf[2]= {ascii, '\0'};
+
+ if (ui_is_but_utf8(but) && (BLI_str_utf8_size(buf) == -1)) {
+ printf("%s: entering invalid ascii char into an ascii key (%d)\n",
+ __func__, (int)(unsigned char)ascii);
+
+ return 0;
+ }
+
+ /* in some cases we want to allow invalid utf8 chars */
+ return ui_textedit_type_buf(but, data, buf, 1);
}
static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int select, uiButtonJumpType jump)
@@ -1932,18 +1944,26 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
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))
- 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(event->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 */
- printf("%s: utf8 char '%s'\n", __func__, event->utf8_buf);
- // strcpy(event->utf8_buf, "12345");
- changed= ui_textedit_type_utf8(but, data, event->utf8_buf);
+ if (utf8_buf_len != 1) {
+ printf("%s: utf8 char '%.*s'\n", __func__, utf8_buf_len, utf8_buf);
+ }
+
+ // strcpy(utf8_buf, "12345");
+ changed= ui_textedit_type_buf(but, data, event->utf8_buf, utf8_buf_len);
}
else {
changed= ui_textedit_type_ascii(but, data, ascii);
@@ -4443,16 +4463,8 @@ static int ui_but_menu(bContext *C, uiBut *but)
}
}
-#ifdef WITH_PYTHON_UI_INFO
- if (but->py_dbg_ln != -1) {
- PointerRNA ptr_props;
-
- WM_operator_properties_create(&ptr_props, "WM_OT_text_edit");
- RNA_string_set(&ptr_props, "filepath", but->py_dbg_fn);
- RNA_int_set(&ptr_props, "line", but->py_dbg_ln);
- uiItemFullO(layout, "WM_OT_text_edit", "Edit Source", ICON_NONE, ptr_props.data, WM_OP_EXEC_DEFAULT, 0);
- }
-#endif /* WITH_PYTHON_UI_INFO */
+ /* perhaps we should move this into (G.f & G_DEBUG) - campbell */
+ uiItemFullO(layout, "UI_OT_editsource", "Edit Source", ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0);
uiPupMenuEnd(C, pup);
@@ -5146,9 +5158,10 @@ void ui_button_active_free(const bContext *C, uiBut *but)
}
}
-static uiBut *ui_context_rna_button_active(const bContext *C)
+/* returns the active button with an optional checking function */
+static uiBut *ui_context_button_active(const bContext *C, int (*but_check_cb)(uiBut *))
{
- uiBut *rnabut= NULL;
+ uiBut *but_found= NULL;
ARegion *ar= CTX_wm_region(C);
@@ -5166,26 +5179,40 @@ static uiBut *ui_context_rna_button_active(const bContext *C)
}
}
- if(activebut && activebut->rnapoin.data) {
+ if(activebut && (but_check_cb == NULL || but_check_cb(activebut))) {
uiHandleButtonData *data= activebut->active;
- rnabut= activebut;
+ but_found= activebut;
/* recurse into opened menu, like colorpicker case */
if(data && data->menu && (ar != data->menu->region)) {
ar = data->menu->region;
}
else {
- return rnabut;
+ return but_found;
}
}
else {
/* no active button */
- return rnabut;
+ return but_found;
}
}
- return rnabut;
+ return but_found;
+}
+
+static int ui_context_rna_button_active_test(uiBut *but)
+{
+ return (but->rnapoin.data != NULL);
+}
+static uiBut *ui_context_rna_button_active(const bContext *C)
+{
+ return ui_context_button_active(C, ui_context_rna_button_active_test);
+}
+
+uiBut *uiContextActiveButton(const struct bContext *C)
+{
+ return ui_context_button_active(C, NULL);
}
/* helper function for insert keyframe, reset to default, etc operators */
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index f987aa9c4e6..089458f1da4 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -464,10 +462,10 @@ static void vicon_move_down_draw(int x, int y, int w, int h, float UNUSED(alpha)
static void init_brush_icons(void)
{
-#define INIT_BRUSH_ICON(icon_id, name) \
- bbuf = IMB_ibImageFromMemory((unsigned char*)datatoc_ ##name## _png, \
- datatoc_ ##name## _png_size, IB_rect); \
- def_internal_icon(bbuf, icon_id, 0, 0, w, ICON_TYPE_BUFFER); \
+#define INIT_BRUSH_ICON(icon_id, name) \
+ bbuf = IMB_ibImageFromMemory((unsigned char*)datatoc_ ##name## _png, \
+ datatoc_ ##name## _png_size, IB_rect, "<brush icon>"); \
+ def_internal_icon(bbuf, icon_id, 0, 0, w, ICON_TYPE_BUFFER); \
IMB_freeImBuf(bbuf);
// end INIT_BRUSH_ICON
@@ -529,7 +527,7 @@ static void init_internal_icons(void)
}
}
if(bbuf==NULL)
- bbuf = IMB_ibImageFromMemory((unsigned char*)datatoc_blenderbuttons, datatoc_blenderbuttons_size, IB_rect);
+ bbuf = IMB_ibImageFromMemory((unsigned char*)datatoc_blender_icons_png, datatoc_blender_icons_png_size, IB_rect, "<blender icons>");
if(bbuf) {
/* free existing texture if any */
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index b7a2227f98a..9c5fafaf167 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -252,11 +250,6 @@ struct uiBut {
/* pointer back */
uiBlock *block;
-
-#ifdef WITH_PYTHON_UI_INFO
- char py_dbg_fn[240];
- int py_dbg_ln;
-#endif
};
struct uiBlock {
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index be6c89eb37d..add023c940b 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 081b528d153..27f94ae8e49 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -61,6 +59,10 @@
#include "WM_api.h"
#include "WM_types.h"
+/* only for UI_OT_editsource */
+#include "ED_screen.h"
+#include "BKE_main.h"
+#include "BLI_ghash.h"
/* ********************************************************** */
@@ -474,6 +476,242 @@ static void UI_OT_reports_to_textblock(wmOperatorType *ot)
ot->exec= reports_to_text_exec;
}
+
+/* ------------------------------------------------------------------------- */
+/* EditSource Utility funcs and operator,
+ * note, this includes itility functions and button matching checks */
+
+struct uiEditSourceStore {
+ uiBut but_orig;
+ GHash *hash;
+} uiEditSourceStore;
+
+struct uiEditSourceButStore {
+ char py_dbg_fn[240];
+ int py_dbg_ln;
+} uiEditSourceButStore;
+
+/* should only ever be set while the edit source operator is running */
+struct uiEditSourceStore *ui_editsource_info= NULL;
+
+int UI_editsource_enable_check(void)
+{
+ return (ui_editsource_info != NULL);
+}
+
+static void ui_editsource_active_but_set(uiBut *but)
+{
+ BLI_assert(ui_editsource_info == NULL);
+
+ ui_editsource_info= MEM_callocN(sizeof(uiEditSourceStore), __func__);
+ memcpy(&ui_editsource_info->but_orig, but, sizeof(uiBut));
+
+ ui_editsource_info->hash = BLI_ghash_new(BLI_ghashutil_ptrhash,
+ BLI_ghashutil_ptrcmp,
+ __func__);
+}
+
+static void ui_editsource_active_but_clear(void)
+{
+ BLI_ghash_free(ui_editsource_info->hash, NULL, (GHashValFreeFP)MEM_freeN);
+ MEM_freeN(ui_editsource_info);
+ ui_editsource_info= NULL;
+}
+
+static int ui_editsource_uibut_match(uiBut *but_a, uiBut *but_b)
+{
+#if 0
+ printf("matching buttons: '%s' == '%s'\n",
+ but_a->drawstr, but_b->drawstr);
+#endif
+
+ /* 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) &&
+ (but_a->x2 == but_b->x2) &&
+ (but_a->y1 == but_b->y1) &&
+ (but_a->y2 == but_b->y2) &&
+ (but_a->type == but_b->type) &&
+ (but_a->rnaprop == but_b->rnaprop) &&
+ (but_a->optype == but_b->optype) &&
+ (but_a->unit_type == but_b->unit_type) &&
+ strncmp(but_a->drawstr, but_b->drawstr, UI_MAX_DRAW_STR) == 0
+ ) {
+ return TRUE;
+ }
+ else {
+ return FALSE;
+ }
+}
+
+void UI_editsource_active_but_test(uiBut *but)
+{
+ extern void PyC_FileAndNum_Safe(const char **filename, int *lineno);
+
+ struct uiEditSourceButStore *but_store= MEM_callocN(sizeof(uiEditSourceButStore), __func__);
+
+ const char *fn;
+ int lineno= -1;
+
+#if 0
+ printf("comparing buttons: '%s' == '%s'\n",
+ but->drawstr, ui_editsource_info->but_orig.drawstr);
+#endif
+
+ PyC_FileAndNum_Safe(&fn, &lineno);
+
+ if (lineno != -1) {
+ BLI_strncpy(but_store->py_dbg_fn, fn,
+ sizeof(but_store->py_dbg_fn));
+ but_store->py_dbg_ln= lineno;
+ }
+ else {
+ but_store->py_dbg_fn[0]= '\0';
+ but_store->py_dbg_ln= -1;
+ }
+
+ BLI_ghash_insert(ui_editsource_info->hash, but, but_store);
+}
+
+/* editsource operator component */
+
+static ScrArea *biggest_text_view(bContext *C)
+{
+ bScreen *sc= CTX_wm_screen(C);
+ ScrArea *sa, *big= NULL;
+ int size, maxsize= 0;
+
+ for(sa= sc->areabase.first; sa; sa= sa->next) {
+ if(sa->spacetype==SPACE_TEXT) {
+ size= sa->winx * sa->winy;
+ if(size > maxsize) {
+ maxsize= size;
+ big= sa;
+ }
+ }
+ }
+ return big;
+}
+
+static int editsource_text_edit(bContext *C, wmOperator *op,
+ char filepath[240], int line)
+{
+ struct Main *bmain= CTX_data_main(C);
+ Text *text;
+
+ for (text=bmain->text.first; text; text=text->id.next) {
+ if (text->name && BLI_path_cmp(text->name, filepath) == 0) {
+ break;
+ }
+ }
+
+ if (text == NULL) {
+ text= add_text(filepath, bmain->name);
+ }
+
+ if (text == NULL) {
+ BKE_reportf(op->reports, RPT_WARNING,
+ "file: '%s' can't be opened", filepath);
+ return OPERATOR_CANCELLED;
+ }
+ else {
+ /* naughty!, find text area to set, not good behavior
+ * but since this is a dev tool lets allow it - campbell */
+ ScrArea *sa= biggest_text_view(C);
+ if(sa) {
+ SpaceText *st= sa->spacedata.first;
+ st->text= text;
+ }
+ else {
+ BKE_reportf(op->reports, RPT_INFO,
+ "See '%s' in the text editor", text->id.name + 2);
+ }
+
+ txt_move_toline(text, line - 1, FALSE);
+ WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text);
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+static int editsource_exec(bContext *C, wmOperator *op)
+{
+ uiBut *but= uiContextActiveButton(C);
+
+ if (but) {
+ GHashIterator ghi;
+ struct uiEditSourceButStore *but_store= NULL;
+
+ ARegion *ar= CTX_wm_region(C);
+ int ret;
+
+ /* needed else the active button does not get tested */
+ uiFreeActiveButtons(C, CTX_wm_screen(C));
+
+ // printf("%s: begin\n", __func__);
+
+ /* take care not to return before calling ui_editsource_active_but_clear */
+ ui_editsource_active_but_set(but);
+
+ /* redraw and get active button python info */
+ ED_region_do_draw(C, ar);
+
+ for(BLI_ghashIterator_init(&ghi, ui_editsource_info->hash);
+ !BLI_ghashIterator_isDone(&ghi);
+ BLI_ghashIterator_step(&ghi))
+ {
+ uiBut *but= BLI_ghashIterator_getKey(&ghi);
+ if (but && ui_editsource_uibut_match(&ui_editsource_info->but_orig, but)) {
+ but_store= BLI_ghashIterator_getValue(&ghi);
+ break;
+ }
+
+ }
+
+ if (but_store) {
+ if (but_store->py_dbg_ln != -1) {
+ ret= editsource_text_edit(C, op,
+ but_store->py_dbg_fn,
+ but_store->py_dbg_ln);
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR,
+ "Active button isn't from a script, cant edit source.");
+ ret= OPERATOR_CANCELLED;
+ }
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR,
+ "Active button match can't be found.");
+ ret= OPERATOR_CANCELLED;
+ }
+
+
+ ui_editsource_active_but_clear();
+
+ // printf("%s: end\n", __func__);
+
+ return ret;
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR, "Active button not found");
+ return OPERATOR_CANCELLED;
+ }
+}
+
+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";
+
+ /* callbacks */
+ ot->exec= editsource_exec;
+}
+
+
/* ********************************************************* */
/* Registration */
@@ -485,5 +723,6 @@ void UI_buttons_operatortypes(void)
WM_operatortype_append(UI_OT_reset_default_button);
WM_operatortype_append(UI_OT_copy_to_selected_button);
WM_operatortype_append(UI_OT_reports_to_textblock); // XXX: temp?
+ WM_operatortype_append(UI_OT_editsource);
}
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 546f4f0b639..9a253952e6d 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 92d02ff3dc2..0e9dbaf3022 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -1,5 +1,5 @@
/*
-* ***** BEGIN GPL LICENSE BLOCK *****
+ * ***** 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
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 7d1d0508e15..0391c16a8f7 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -2070,7 +2068,7 @@ static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon, int
return rnaicon;
}
-static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *itemptr, int i, int rnaicon, PointerRNA *activeptr, PropertyRNA *activeprop)
+static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *itemptr, int i, int rnaicon, PointerRNA *activeptr, PropertyRNA *activeprop, const char *prop_list)
{
uiBlock *block= uiLayoutGetBlock(layout);
uiBut *but;
@@ -2193,6 +2191,53 @@ 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);
}
+
+ /* There is a last chance to display custom controls (in addition to the name/label):
+ * If the given item property group features a string property named as prop_list,
+ * this tries to add controls for all properties of the item listed in that string property.
+ * (colon-separated names).
+ *
+ * This is especially useful for python. E.g., if you list a collection of this property
+ * group:
+ *
+ * class TestPropertyGroup(bpy.types.PropertyGroup):
+ * bool = BoolProperty(default=False)
+ * integer = IntProperty()
+ * string = StringProperty()
+ *
+ * # A string of all identifiers (colon-separated) which property’s controls should be
+ * # displayed in a template_list.
+ * template_list_controls = StringProperty(default="integer:bool:string", options={"HIDDEN"})
+ *
+ * … you’ll get a numfield for the integer prop, a check box for the bool prop, and a textfield
+ * for the string prop, after the name of each item of the collection.
+ */
+ else if (prop_list) {
+ PropertyRNA *prop_ctrls;
+ row = uiLayoutRow(sub, 1);
+ uiItemL(row, name, icon);
+
+ /* XXX: Check, as sometimes we get an itemptr looking like
+ * {id = {data = 0x0}, type = 0x0, data = 0x0}
+ * which would obviously produce a sigsev… */
+ if (itemptr->type) {
+ /* If the special property is set for the item, and it is a collection… */
+ prop_ctrls = RNA_struct_find_property(itemptr, prop_list);
+ if(prop_ctrls) {
+ if(RNA_property_type(prop_ctrls) == PROP_STRING) {
+ char *prop_names = RNA_property_string_get_alloc(itemptr, prop_ctrls, NULL, 0, NULL);
+ char *id = NULL;
+ char *ctx = NULL;
+ for(id = BLI_strtok_r(prop_names, ":", &ctx); id; id = BLI_strtok_r(NULL, ":", &ctx)) {
+ uiItemR(row, itemptr, id, 0, NULL, 0);
+ MEM_freeN(id);
+ }
+ MEM_freeN(prop_names);
+ }
+ }
+ }
+ }
+
else
uiItemL(sub, name, icon); /* fails, backdrop LISTROW... */
@@ -2201,7 +2246,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
MEM_freeN(namebuf);
}
-void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *activeptr, const char *activepropname, int rows, int maxrows, int listtype)
+void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *activeptr, const char *activepropname, const char *prop_list, int rows, int maxrows, int listtype)
{
//Scene *scene= CTX_data_scene(C);
PropertyRNA *prop= NULL, *activeprop;
@@ -2355,7 +2400,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
/* create list items */
RNA_PROP_BEGIN(ptr, itemptr, prop) {
if(i >= pa->list_scroll && i<pa->list_scroll+items)
- list_item_row(C, col, ptr, &itemptr, i, rnaicon, activeptr, activeprop);
+ list_item_row(C, col, ptr, &itemptr, i, rnaicon, activeptr, activeprop, prop_list);
i++;
}
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 0215cc05d36..c5ac4f5aa88 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1,5 +1,5 @@
/*
-* ***** BEGIN GPL LICENSE BLOCK *****
+ * ***** 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
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 61936fba931..d3a5c6691ef 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 18db1c8c894..5e97e01aed6 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 30ae69b71b8..998e70d5e25 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt
index f45f706b892..7849b71307b 100644
--- a/source/blender/editors/mesh/CMakeLists.txt
+++ b/source/blender/editors/mesh/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index ab62c88deaa..279657e71c2 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index 6a263fca915..85ac87d8bcb 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index 98cca08fd7a..64fa322f2a5 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c
index 8945cac428b..0c0163d0f24 100644
--- a/source/blender/editors/mesh/editmesh_lib.c
+++ b/source/blender/editors/mesh/editmesh_lib.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c
index acbe5ef2144..a671de71636 100644
--- a/source/blender/editors/mesh/editmesh_loop.c
+++ b/source/blender/editors/mesh/editmesh_loop.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index 3f9d793cd70..b4bee60e415 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -3437,7 +3435,7 @@ void EM_deselect_all(EditMesh *em)
EM_clear_flag_all(em, SELECT);
}
-static int select_all_exec(bContext *C, wmOperator *op)
+static int editmesh_select_all_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
@@ -3472,7 +3470,7 @@ void MESH_OT_select_all(wmOperatorType *ot)
ot->idname= "MESH_OT_select_all";
/* api callbacks */
- ot->exec= select_all_exec;
+ ot->exec= editmesh_select_all_exec;
ot->poll= ED_operator_editmesh;
/* flags */
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 40d3ccb015c..5455bf966ef 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -1,5 +1,4 @@
- /* $Id$
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c
index 0ec356a88ae..9bbfea1291f 100644
--- a/source/blender/editors/mesh/loopcut.c
+++ b/source/blender/editors/mesh/loopcut.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 2e638294807..5a7414d8edd 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index 9e6b4e84e54..3831d858340 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c
index 84943ecc777..48d2c629148 100644
--- a/source/blender/editors/mesh/mesh_navmesh.c
+++ b/source/blender/editors/mesh/mesh_navmesh.c
@@ -1,32 +1,30 @@
-/**
-* $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) 2011 by Blender Foundation
-* All rights reserved.
-*
-* The Original Code is: all of this file.
-*
-* Contributor(s): Benoit Bolsee,
-* Nick Samarin
-*
-* ***** END GPL LICENSE BLOCK *****
-*/
+/*
+ * ***** 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) 2011 by Blender Foundation
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Benoit Bolsee,
+ * Nick Samarin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
#include <math.h>
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index b1f0daeaddc..bd067948e59 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index e6836d7d5aa..3caafb12f82 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/metaball/CMakeLists.txt b/source/blender/editors/metaball/CMakeLists.txt
index 76561b12183..4ea596cefbf 100644
--- a/source/blender/editors/metaball/CMakeLists.txt
+++ b/source/blender/editors/metaball/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index a58d74d250c..a77a34e05ec 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -123,7 +121,7 @@ MetaElem *add_metaball_primitive(bContext *C, float mat[4][4], int type, int UNU
/***************************** Select/Deselect operator *****************************/
/* Select or deselect all MetaElements */
-static int select_all_exec(bContext *C, wmOperator *op)
+static int mball_select_all_exec(bContext *C, wmOperator *op)
{
//Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
@@ -173,7 +171,7 @@ void MBALL_OT_select_all(wmOperatorType *ot)
ot->idname= "MBALL_OT_select_all";
/* callback functions */
- ot->exec= select_all_exec;
+ ot->exec= mball_select_all_exec;
ot->poll= ED_operator_editmball;
/* flags */
diff --git a/source/blender/editors/metaball/mball_intern.h b/source/blender/editors/metaball/mball_intern.h
index 42cc609bec3..792fa80e0c5 100644
--- a/source/blender/editors/metaball/mball_intern.h
+++ b/source/blender/editors/metaball/mball_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/metaball/mball_ops.c b/source/blender/editors/metaball/mball_ops.c
index 1b50cc6523a..4d04fc3e80e 100644
--- a/source/blender/editors/metaball/mball_ops.c
+++ b/source/blender/editors/metaball/mball_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt
index c78c9fddbe8..e7232524a21 100644
--- a/source/blender/editors/object/CMakeLists.txt
+++ b/source/blender/editors/object/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 5d8781e0a6d..452e7e4857c 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 446c359b9f2..e29dfaa0a23 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index ec7c6cc6108..50b798c5bea 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -1270,9 +1268,10 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o
else
mul_v3_m4v3(obt->loc, obact->obmat, pchanact->pose_head);
}
- else
- VECCOPY(obt->loc, obact->obmat[3]);
-
+ else {
+ copy_v3_v3(obt->loc, obact->obmat[3]);
+ }
+
/* restore, add_object sets active */
BASACT= base;
base->flag |= SELECT;
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 0ad11d1a997..04272b48d51 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index b1ab68ff087..bf0439b7044 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index 9f1ad8e4c3c..5bb1b634fe0 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index 7bb98f4aeb1..a6e8d4a0a3a 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index 14ce223db5e..25c1e32f4ae 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -188,7 +186,7 @@ void ED_setflagsLatt(Object *obedit, int flag)
}
}
-static int select_all_exec(bContext *C, wmOperator *op)
+static int lattice_select_all_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
Lattice *lt= obedit->data;
@@ -246,7 +244,7 @@ void LATTICE_OT_select_all(wmOperatorType *ot)
ot->idname= "LATTICE_OT_select_all";
/* api callbacks */
- ot->exec= select_all_exec;
+ ot->exec= lattice_select_all_exec;
ot->poll= ED_operator_editlattice;
/* flags */
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 20ca50581bf..129d9df86a5 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 5a2437b1911..2df49570ee4 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 49a71018719..74da705965a 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -1715,6 +1713,7 @@ static void make_local_makelocalmaterial(Material *ma)
static int make_local_exec(bContext *C, wmOperator *op)
{
+ Main *bmain= CTX_data_main(C);
AnimData *adt;
ParticleSystem *psys;
Material *ma, ***matarar;
@@ -1723,7 +1722,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
int a, b, mode= RNA_enum_get(op->ptr, "type");
if(mode==3) {
- all_local(NULL, 0); /* NULL is all libs */
+ BKE_library_make_local(bmain, NULL, 0); /* NULL is all libs */
WM_event_add_notifier(C, NC_WINDOW, NULL);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index a4c45e033b3..d10a6be1988 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index 962aac06474..28f9c88f950 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 4ca7d272503..1efe79fff9e 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -252,7 +250,7 @@ static int object_clear_transform_generic_exec(bContext *C, wmOperator *op,
static int object_location_clear_exec(bContext *C, wmOperator *op)
{
- return object_clear_transform_generic_exec(C, op, object_clear_loc, "Location");
+ return object_clear_transform_generic_exec(C, op, object_clear_loc, ANIM_KS_LOCATION_ID);
}
void OBJECT_OT_location_clear(wmOperatorType *ot)
@@ -272,7 +270,7 @@ void OBJECT_OT_location_clear(wmOperatorType *ot)
static int object_rotation_clear_exec(bContext *C, wmOperator *op)
{
- return object_clear_transform_generic_exec(C, op, object_clear_rot, "Rotation");
+ return object_clear_transform_generic_exec(C, op, object_clear_rot, ANIM_KS_ROTATION_ID);
}
void OBJECT_OT_rotation_clear(wmOperatorType *ot)
@@ -292,7 +290,7 @@ void OBJECT_OT_rotation_clear(wmOperatorType *ot)
static int object_scale_clear_exec(bContext *C, wmOperator *op)
{
- return object_clear_transform_generic_exec(C, op, object_clear_scale, "Scaling");
+ return object_clear_transform_generic_exec(C, op, object_clear_scale, ANIM_KS_SCALING_ID);
}
void OBJECT_OT_scale_clear(wmOperatorType *ot)
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index c1b21865504..d4ee68f8b72 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -1529,7 +1527,7 @@ static void vgroup_clean_all(Object *ob, float eul, int keep_single)
static void dvert_mirror_op(MDeformVert *dvert, MDeformVert *dvert_mirr,
const char sel, const char sel_mirr,
- const int *flip_map,
+ const int *flip_map, const int flip_map_len,
const short mirror_weights, const short flip_vgroups)
{
BLI_assert(sel || sel_mirr);
@@ -1539,8 +1537,8 @@ static void dvert_mirror_op(MDeformVert *dvert, MDeformVert *dvert_mirr,
if(mirror_weights)
SWAP(MDeformVert, *dvert, *dvert_mirr);
if(flip_vgroups) {
- defvert_flip(dvert, flip_map);
- defvert_flip(dvert_mirr, flip_map);
+ defvert_flip(dvert, flip_map, flip_map_len);
+ defvert_flip(dvert_mirr, flip_map, flip_map_len);
}
}
else {
@@ -1552,24 +1550,24 @@ static void dvert_mirror_op(MDeformVert *dvert, MDeformVert *dvert_mirr,
if(mirror_weights)
defvert_copy(dvert, dvert_mirr);
if(flip_vgroups) {
- defvert_flip(dvert, flip_map);
+ defvert_flip(dvert, flip_map, flip_map_len);
}
}
}
void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_vgroups)
{
-#define VGROUP_MIRR_OP dvert_mirror_op(dvert, dvert_mirr, sel, sel_mirr, flip_map, mirror_weights, flip_vgroups)
+#define VGROUP_MIRR_OP dvert_mirror_op(dvert, dvert_mirr, sel, sel_mirr, flip_map, flip_map_len, mirror_weights, flip_vgroups)
EditVert *eve, *eve_mirr;
MDeformVert *dvert, *dvert_mirr;
short sel, sel_mirr;
- int *flip_map;
+ int *flip_map, flip_map_len;
if(mirror_weights==0 && flip_vgroups==0)
return;
- flip_map= defgroup_flip_map(ob, 0);
+ flip_map= defgroup_flip_map(ob, &flip_map_len, FALSE);
/* only the active group */
if(ob->type == OB_MESH) {
diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt
index 0455e80ea33..3fc05684fc9 100644
--- a/source/blender/editors/physics/CMakeLists.txt
+++ b/source/blender/editors/physics/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c
index 3b7d6743e42..54bd19164e0 100644
--- a/source/blender/editors/physics/particle_boids.c
+++ b/source/blender/editors/physics/particle_boids.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index c0b81efe18c..3694102fa5b 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -1298,7 +1296,7 @@ static void toggle_key_select(PEData *data, int point_index, int key_index)
/************************ de select all operator ************************/
-static int select_all_exec(bContext *C, wmOperator *op)
+static int pe_select_all_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
@@ -1360,7 +1358,7 @@ void PARTICLE_OT_select_all(wmOperatorType *ot)
ot->idname= "PARTICLE_OT_select_all";
/* api callbacks */
- ot->exec= select_all_exec;
+ ot->exec= pe_select_all_exec;
ot->poll= PE_poll;
/* flags */
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 8ec95e9b107..101a6744e9a 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 188bab9dced..f0c327b9279 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -1,7 +1,6 @@
/*
* fluidsim.c
*
- * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h
index f5ddbd65a3c..9d6b5884cbd 100644
--- a/source/blender/editors/physics/physics_intern.h
+++ b/source/blender/editors/physics/physics_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c
index 0235ccd5c89..e39b4b97d72 100644
--- a/source/blender/editors/physics/physics_ops.c
+++ b/source/blender/editors/physics/physics_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index 34f4a1e472b..f826d0ec41a 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/render/CMakeLists.txt b/source/blender/editors/render/CMakeLists.txt
index cf6c4290ee0..cf6846f5f98 100644
--- a/source/blender/editors/render/CMakeLists.txt
+++ b/source/blender/editors/render/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/render/render_intern.h b/source/blender/editors/render/render_intern.h
index ab09acd67f4..08001688e3f 100644
--- a/source/blender/editors/render/render_intern.h
+++ b/source/blender/editors/render/render_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index d80f3fef125..2f0958371f9 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -189,10 +187,42 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat
/* set callbacks, exported to sequence render too.
Only call in foreground (UI) renders. */
+static void screen_render_scene_layer_set(wmOperator *op, Main *mainp, Scene **scene, SceneRenderLayer **srl)
+{
+ /* single layer re-render */
+ if(RNA_property_is_set(op->ptr, "scene")) {
+ Scene *scn;
+ char scene_name[MAX_ID_NAME-2];
+
+ RNA_string_get(op->ptr, "scene", scene_name);
+ scn = (Scene *)BLI_findstring(&mainp->scene, scene_name, offsetof(ID, name) + 2);
+
+ if (scn) {
+ /* camera switch wont have updated */
+ scn->r.cfra= (*scene)->r.cfra;
+ scene_camera_switch_update(scn);
+
+ *scene = scn;
+ }
+ }
+
+ if(RNA_property_is_set(op->ptr, "layer")) {
+ SceneRenderLayer *rl;
+ char rl_name[RE_MAXNAME];
+
+ RNA_string_get(op->ptr, "layer", rl_name);
+ rl = (SceneRenderLayer *)BLI_findstring(&(*scene)->r.layers, rl_name, offsetof(SceneRenderLayer, name));
+
+ if (rl)
+ *srl = rl;
+ }
+}
+
/* executes blocking render */
static int screen_render_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
+ SceneRenderLayer *srl= NULL;
Render *re= RE_NewRender(scene->id.name);
Image *ima;
View3D *v3d= CTX_wm_view3d(C);
@@ -222,10 +252,13 @@ static int screen_render_exec(bContext *C, wmOperator *op)
RE_SetReports(re, op->reports);
+ /* custom scene and single layer re-render */
+ screen_render_scene_layer_set(op, mainp, &scene, &srl);
+
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, NULL, camera_override, lay, scene->r.cfra, is_write_still);
+ RE_BlenderFrame(re, mainp, scene, srl, camera_override, lay, scene->r.cfra, is_write_still);
RE_SetReports(re, NULL);
@@ -520,28 +553,11 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
jobflag= WM_JOB_EXCL_RENDER|WM_JOB_PRIORITY|WM_JOB_PROGRESS;
- /* single layer re-render */
- if(RNA_property_is_set(op->ptr, "layer")) {
- SceneRenderLayer *rl;
- Scene *scn;
- char scene_name[MAX_ID_NAME-2], rl_name[RE_MAXNAME];
-
- RNA_string_get(op->ptr, "layer", rl_name);
- RNA_string_get(op->ptr, "scene", scene_name);
+ /* custom scene and single layer re-render */
+ screen_render_scene_layer_set(op, mainp, &scene, &srl);
- scn = (Scene *)BLI_findstring(&mainp->scene, scene_name, offsetof(ID, name) + 2);
- rl = (SceneRenderLayer *)BLI_findstring(&scene->r.layers, rl_name, offsetof(SceneRenderLayer, name));
-
- if (scn && rl) {
- /* camera switch wont have updated */
- scn->r.cfra= scene->r.cfra;
- scene_camera_switch_update(scn);
-
- scene = scn;
- srl = rl;
- }
+ if(RNA_property_is_set(op->ptr, "layer"))
jobflag |= WM_JOB_SUSPEND;
- }
/* job custom data */
rj= MEM_callocN(sizeof(RenderJob), "render job");
@@ -613,7 +629,7 @@ void RENDER_OT_render(wmOperatorType *ot)
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)");
- RNA_def_string(ot->srna, "layer", "", RE_MAXNAME, "Render Layer", "Single render layer to re-render");
- RNA_def_string(ot->srna, "scene", "", MAX_ID_NAME-2, "Scene", "Re-render single layer in this scene");
+ RNA_def_string(ot->srna, "layer", "", RE_MAXNAME, "Render Layer", "Single render layer to re-render (used only when animation is disabled)");
+ RNA_def_string(ot->srna, "scene", "", MAX_ID_NAME-2, "Scene", "Scene to render, current scene if not specified");
}
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 5a8e930e1a4..feeb2fefca7 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/render/render_ops.c b/source/blender/editors/render/render_ops.c
index dd488154198..c9e6dc90515 100644
--- a/source/blender/editors/render/render_ops.c
+++ b/source/blender/editors/render/render_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 697cddfcee0..49bdb103139 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -122,8 +121,6 @@ ImBuf* get_brush_icon(Brush *brush)
if (!(brush->icon_imbuf)) {
folder= BLI_get_folder(BLENDER_DATAFILES, "brushicons");
- path[0]= 0;
-
BLI_make_file_string(G.main->name, path, folder, brush->icon_filepath);
if (path[0])
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 582a8596dd1..35d679146fe 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 85e1eb016d7..e80c3d85670 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c
index 9dfcde6ed0d..47957c0bb5a 100644
--- a/source/blender/editors/render/render_view.c
+++ b/source/blender/editors/render/render_view.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/screen/CMakeLists.txt b/source/blender/editors/screen/CMakeLists.txt
index 4282110901b..3614052684c 100644
--- a/source/blender/editors/screen/CMakeLists.txt
+++ b/source/blender/editors/screen/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 2b007f55706..7e79849ba40 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 827c14b1c0d..0bba9838005 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index 2e8dc32ad6d..cb42cd786ed 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 5e875e40f14..72fb0a019b6 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h
index f15b1a70afa..b882a0881a1 100644
--- a/source/blender/editors/screen/screen_intern.h
+++ b/source/blender/editors/screen/screen_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index bae6fa9d6b0..0a7e3a2763a 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index 27c311aa04f..017325c535e 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/sculpt_paint/CMakeLists.txt b/source/blender/editors/sculpt_paint/CMakeLists.txt
index 94e08a020f6..30f49264e90 100644
--- a/source/blender/editors/sculpt_paint/CMakeLists.txt
+++ b/source/blender/editors/sculpt_paint/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index b6b22c391b8..d49ce0cf49a 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1,5 +1,4 @@
/*
- * $Id$
* imagepaint.c
*
* Functions to paint images in 2D and 3D.
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index f671b7b1713..3b001a8fcdc 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 287d204115c..2d0ad349be8 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/sculpt_paint/paint_undo.c b/source/blender/editors/sculpt_paint/paint_undo.c
index 345cda63f5a..b00910195ff 100644
--- a/source/blender/editors/sculpt_paint/paint_undo.c
+++ b/source/blender/editors/sculpt_paint/paint_undo.c
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* Undo system for painting and sculpting.
*
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index d332dc6ec0d..b1c0b571d49 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 87411b97061..3e2c4666528 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 5a888e6f595..0b009dba651 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index c1da29aeb27..42205a8da04 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 7656e51d241..4c54a5891b1 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/sound/CMakeLists.txt b/source/blender/editors/sound/CMakeLists.txt
index 11da4165ec8..6bbb3483d11 100644
--- a/source/blender/editors/sound/CMakeLists.txt
+++ b/source/blender/editors/sound/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/sound/sound_intern.h b/source/blender/editors/sound/sound_intern.h
index cde0b3c4479..91c1b5d1456 100644
--- a/source/blender/editors/sound/sound_intern.h
+++ b/source/blender/editors/sound/sound_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index 50dda49bead..623cfc48827 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -79,14 +77,14 @@
/******************** open sound operator ********************/
-static int open_cancel(bContext *UNUSED(C), wmOperator *op)
+static int sound_open_cancel(bContext *UNUSED(C), wmOperator *op)
{
MEM_freeN(op->customdata);
op->customdata= NULL;
return OPERATOR_CANCELLED;
}
-static void open_init(bContext *C, wmOperator *op)
+static void sound_open_init(bContext *C, wmOperator *op)
{
PropertyPointerRNA *pprop;
@@ -95,7 +93,7 @@ static void open_init(bContext *C, wmOperator *op)
}
#ifdef WITH_AUDASPACE
-static int open_exec(bContext *C, wmOperator *op)
+static int sound_open_exec(bContext *C, wmOperator *op)
{
char path[FILE_MAX];
bSound *sound;
@@ -108,7 +106,7 @@ static int open_exec(bContext *C, wmOperator *op)
sound = sound_new_file(bmain, path);
if(!op->customdata)
- open_init(C, op);
+ sound_open_init(C, op);
if (sound==NULL || sound->playback_handle == NULL) {
if(op->customdata) MEM_freeN(op->customdata);
@@ -153,7 +151,7 @@ static int open_exec(bContext *C, wmOperator *op)
#else //WITH_AUDASPACE
-static int open_exec(bContext *UNUSED(C), wmOperator *op)
+static int sound_open_exec(bContext *UNUSED(C), wmOperator *op)
{
BKE_report(op->reports, RPT_ERROR, "Compiled without sound support");
@@ -162,12 +160,12 @@ static int open_exec(bContext *UNUSED(C), wmOperator *op)
#endif
-static int open_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int sound_open_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
if(RNA_property_is_set(op->ptr, "filepath"))
- return open_exec(C, op);
+ return sound_open_exec(C, op);
- open_init(C, op);
+ sound_open_init(C, op);
return WM_operator_filesel(C, op, event);
}
@@ -180,9 +178,9 @@ static void SOUND_OT_open(wmOperatorType *ot)
ot->idname= "SOUND_OT_open";
/* api callbacks */
- ot->exec= open_exec;
- ot->invoke= open_invoke;
- ot->cancel= open_cancel;
+ ot->exec= sound_open_exec;
+ ot->invoke= sound_open_invoke;
+ ot->cancel= sound_open_cancel;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -201,9 +199,9 @@ static void SOUND_OT_open_mono(wmOperatorType *ot)
ot->idname= "SOUND_OT_open_mono";
/* api callbacks */
- ot->exec= open_exec;
- ot->invoke= open_invoke;
- ot->cancel= open_cancel;
+ ot->exec= sound_open_exec;
+ ot->invoke= sound_open_invoke;
+ ot->cancel= sound_open_cancel;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -216,7 +214,7 @@ static void SOUND_OT_open_mono(wmOperatorType *ot)
/******************** mixdown operator ********************/
-static int mixdown_exec(bContext *C, wmOperator *op)
+static int sound_mixdown_exec(bContext *C, wmOperator *op)
{
#ifdef WITH_AUDASPACE
char path[FILE_MAX];
@@ -259,15 +257,15 @@ static int mixdown_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int mixdown_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int sound_mixdown_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
if(RNA_property_is_set(op->ptr, "filepath"))
- return mixdown_exec(C, op);
+ return sound_mixdown_exec(C, op);
return WM_operator_filesel(C, op, event);
}
-static int mixdown_draw_check_prop(PropertyRNA *prop)
+static int sound_mixdown_draw_check_prop(PropertyRNA *prop)
{
const char *prop_id= RNA_property_identifier(prop);
return !( strcmp(prop_id, "filepath") == 0 ||
@@ -277,7 +275,7 @@ static int mixdown_draw_check_prop(PropertyRNA *prop)
}
#ifdef WITH_AUDASPACE
-static void mixdown_draw(bContext *C, wmOperator *op)
+static void sound_mixdown_draw(bContext *C, wmOperator *op)
{
static EnumPropertyItem pcm_format_items[] = {
{AUD_FORMAT_U8, "U8", 0, "U8", "8 bit unsigned"},
@@ -426,7 +424,7 @@ static void mixdown_draw(bContext *C, wmOperator *op)
RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
/* main draw call */
- uiDefAutoButsRNA(layout, &ptr, mixdown_draw_check_prop, '\0');
+ uiDefAutoButsRNA(layout, &ptr, sound_mixdown_draw_check_prop, '\0');
}
#endif // WITH_AUDASPACE
@@ -478,11 +476,11 @@ static void SOUND_OT_mixdown(wmOperatorType *ot)
ot->idname= "SOUND_OT_mixdown";
/* api callbacks */
- ot->exec= mixdown_exec;
- ot->invoke= mixdown_invoke;
+ ot->exec= sound_mixdown_exec;
+ ot->invoke= sound_mixdown_invoke;
#ifdef WITH_AUDASPACE
- ot->ui= mixdown_draw;
+ ot->ui= sound_mixdown_draw;
#endif
/* flags */
ot->flag= OPTYPE_REGISTER;
@@ -511,7 +509,7 @@ static int sound_poll(bContext *C)
}
/********************* pack operator *********************/
-static int pack_exec(bContext *C, wmOperator *op)
+static int sound_pack_exec(bContext *C, wmOperator *op)
{
Main *bmain= CTX_data_main(C);
Editing* ed = CTX_data_scene(C)->ed;
@@ -539,7 +537,7 @@ static void SOUND_OT_pack(wmOperatorType *ot)
ot->idname= "SOUND_OT_pack";
/* api callbacks */
- ot->exec= pack_exec;
+ ot->exec= sound_pack_exec;
ot->poll= sound_poll;
/* flags */
@@ -617,7 +615,7 @@ static void SOUND_OT_unpack(wmOperatorType *ot)
/* ******************************************************* */
-static int update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op))
+static int sound_update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op))
{
Sequence* seq;
Scene* scene = CTX_data_scene(C);
@@ -669,7 +667,7 @@ static void SOUND_OT_update_animation_flags(wmOperatorType *ot)
ot->idname= "SOUND_OT_update_animation_flags";
/* api callbacks */
- ot->exec= update_animation_flags_exec;
+ ot->exec= sound_update_animation_flags_exec;
/* flags */
ot->flag= OPTYPE_REGISTER;
@@ -677,14 +675,14 @@ static void SOUND_OT_update_animation_flags(wmOperatorType *ot)
/* ******************************************************* */
-static int bake_animation_exec(bContext *C, wmOperator *UNUSED(op))
+static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op))
{
Main* bmain = CTX_data_main(C);
Scene* scene = CTX_data_scene(C);
int oldfra = scene->r.cfra;
int cfra;
- update_animation_flags_exec(C, NULL);
+ sound_update_animation_flags_exec(C, NULL);
for(cfra = scene->r.sfra > 0 ? scene->r.sfra - 1 : 0; cfra <= scene->r.efra + 1; cfra++)
{
@@ -706,7 +704,7 @@ static void SOUND_OT_bake_animation(wmOperatorType *ot)
ot->idname= "SOUND_OT_bake_animation";
/* api callbacks */
- ot->exec= bake_animation_exec;
+ ot->exec= sound_bake_animation_exec;
/* flags */
ot->flag= OPTYPE_REGISTER;
diff --git a/source/blender/editors/space_action/CMakeLists.txt b/source/blender/editors/space_action/CMakeLists.txt
index edebaa8273a..f53d26d323f 100644
--- a/source/blender/editors/space_action/CMakeLists.txt
+++ b/source/blender/editors/space_action/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 7bf0f98b471..a044651652e 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -261,7 +261,7 @@ static void get_keyframe_extents (bAnimContext *ac, float *min, float *max, cons
float tmin, tmax;
/* get range and apply necessary scaling before processing */
- calc_fcurve_range(fcu, &tmin, &tmax, onlySel);
+ calc_fcurve_range(fcu, &tmin, &tmax, onlySel, TRUE);
if (adt) {
tmin= BKE_nla_tweakedit_remap(adt, tmin, NLATIME_CONVERT_MAP);
@@ -492,7 +492,6 @@ void ACTION_OT_copy (wmOperatorType *ot)
ot->description= "Copy selected keyframes to the copy/paste buffer";
/* api callbacks */
-// ot->invoke= WM_operator_props_popup; // better wait for graph redo panel
ot->exec= actkeys_copy_exec;
ot->poll= ED_operator_action_active;
@@ -510,10 +509,9 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
-
- if (ac.reports==NULL) {
- ac.reports= op->reports;
- }
+
+ /* ac.reports by default will be the global reports list, which won't show warnings */
+ ac.reports= op->reports;
/* paste keyframes */
if (ac.datatype == ANIMCONT_GPENCIL) {
@@ -522,8 +520,8 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
else {
+ /* non-zero return means an error occurred while trying to paste */
if (paste_action_keys(&ac, offset_mode, merge_mode)) {
- BKE_report(op->reports, RPT_ERROR, "No keyframes to paste");
return OPERATOR_CANCELLED;
}
}
@@ -545,12 +543,14 @@ void ACTION_OT_paste (wmOperatorType *ot)
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;
/* flags */
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");
RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merging pasted keys and existing");
}
diff --git a/source/blender/editors/space_api/CMakeLists.txt b/source/blender/editors/space_api/CMakeLists.txt
index 4cbb290be76..6f2a0385231 100644
--- a/source/blender/editors/space_api/CMakeLists.txt
+++ b/source/blender/editors/space_api/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_api/space.c b/source/blender/editors/space_api/space.c
index 1ba8f00995c..e677014decf 100644
--- a/source/blender/editors/space_api/space.c
+++ b/source/blender/editors/space_api/space.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index 4f8cb8a57b2..99ab356ac5f 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_buttons/CMakeLists.txt b/source/blender/editors/space_buttons/CMakeLists.txt
index a9aaf6a6d58..dbb96b68587 100644
--- a/source/blender/editors/space_buttons/CMakeLists.txt
+++ b/source/blender/editors/space_buttons/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 9316b96d8fb..98295f21cd4 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c
index dfbb2a543cb..1c352b1cb21 100644
--- a/source/blender/editors/space_buttons/buttons_header.c
+++ b/source/blender/editors/space_buttons/buttons_header.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h
index d25bd7940ab..27084488163 100644
--- a/source/blender/editors/space_buttons/buttons_intern.h
+++ b/source/blender/editors/space_buttons/buttons_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 5dbcfbba5be..39fae43a877 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index ef927fd69fc..4c328d174e9 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_console/CMakeLists.txt b/source/blender/editors/space_console/CMakeLists.txt
index f89d782c7f2..2f1c3f4a244 100644
--- a/source/blender/editors/space_console/CMakeLists.txt
+++ b/source/blender/editors/space_console/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c
index 905fed4f30b..4855121a4de 100644
--- a/source/blender/editors/space_console/console_draw.c
+++ b/source/blender/editors/space_console/console_draw.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_console/console_intern.h b/source/blender/editors/space_console/console_intern.h
index ad20c026e6c..1c7aef01450 100644
--- a/source/blender/editors/space_console/console_intern.h
+++ b/source/blender/editors/space_console/console_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index cb2b5c47ff3..23316616a57 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -284,7 +282,7 @@ static int console_line_insert(ConsoleLine *ci, char *str)
/* static funcs for text editing */
/* similar to the text editor, with some not used. keep compatible */
-static EnumPropertyItem move_type_items[]= {
+static EnumPropertyItem console_move_type_items[]= {
{LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""},
{LINE_END, "LINE_END", 0, "Line End", ""},
{PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
@@ -293,7 +291,7 @@ static EnumPropertyItem move_type_items[]= {
{NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
{0, NULL, 0, NULL, NULL}};
-static int move_exec(bContext *C, wmOperator *op)
+static int console_move_exec(bContext *C, wmOperator *op)
{
ConsoleLine *ci= console_history_verify(C);
@@ -366,15 +364,15 @@ void CONSOLE_OT_move(wmOperatorType *ot)
ot->idname= "CONSOLE_OT_move";
/* api callbacks */
- ot->exec= move_exec;
+ ot->exec= console_move_exec;
ot->poll= ED_operator_console_active;
/* properties */
- RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to");
+ RNA_def_enum(ot->srna, "type", console_move_type_items, LINE_BEGIN, "Type", "Where to move cursor to");
}
#define TAB_LENGTH 4
-static int insert_exec(bContext *C, wmOperator *op)
+static int console_insert_exec(bContext *C, wmOperator *op)
{
SpaceConsole *sc= CTX_wm_space_console(C);
ARegion *ar= CTX_wm_region(C);
@@ -410,7 +408,7 @@ static int insert_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int console_insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
// if(!RNA_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */
if(!RNA_string_length(op->ptr, "text")) {
@@ -426,7 +424,7 @@ static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
RNA_string_set(op->ptr, "text", str);
}
}
- return insert_exec(C, op);
+ return console_insert_exec(C, op);
}
void CONSOLE_OT_insert(wmOperatorType *ot)
@@ -437,8 +435,8 @@ void CONSOLE_OT_insert(wmOperatorType *ot)
ot->idname= "CONSOLE_OT_insert";
/* api callbacks */
- ot->exec= insert_exec;
- ot->invoke= insert_invoke;
+ ot->exec= console_insert_exec;
+ ot->invoke= console_insert_invoke;
ot->poll= ED_operator_console_active;
/* properties */
@@ -446,14 +444,14 @@ void CONSOLE_OT_insert(wmOperatorType *ot)
}
-static EnumPropertyItem delete_type_items[]= {
+static EnumPropertyItem console_delete_type_items[]= {
{DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
{DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
// {DEL_NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
// {DEL_PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""},
{0, NULL, 0, NULL, NULL}};
-static int delete_exec(bContext *C, wmOperator *op)
+static int console_delete_exec(bContext *C, wmOperator *op)
{
SpaceConsole *sc= CTX_wm_space_console(C);
ARegion *ar= CTX_wm_region(C);
@@ -508,16 +506,16 @@ void CONSOLE_OT_delete(wmOperatorType *ot)
ot->idname= "CONSOLE_OT_delete";
/* api callbacks */
- ot->exec= delete_exec;
+ ot->exec= console_delete_exec;
ot->poll= ED_operator_console_active;
/* properties */
- RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete");
+ RNA_def_enum(ot->srna, "type", console_delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete");
}
/* the python exec operator uses this */
-static int clear_exec(bContext *C, wmOperator *op)
+static int console_clear_exec(bContext *C, wmOperator *op)
{
SpaceConsole *sc= CTX_wm_space_console(C);
ARegion *ar= CTX_wm_region(C);
@@ -551,7 +549,7 @@ void CONSOLE_OT_clear(wmOperatorType *ot)
ot->idname= "CONSOLE_OT_clear";
/* api callbacks */
- ot->exec= clear_exec;
+ ot->exec= console_clear_exec;
ot->poll= ED_operator_console_active;
/* properties */
@@ -562,7 +560,7 @@ void CONSOLE_OT_clear(wmOperatorType *ot)
/* the python exec operator uses this */
-static int history_cycle_exec(bContext *C, wmOperator *op)
+static int console_history_cycle_exec(bContext *C, wmOperator *op)
{
SpaceConsole *sc= CTX_wm_space_console(C);
ARegion *ar= CTX_wm_region(C);
@@ -619,7 +617,7 @@ void CONSOLE_OT_history_cycle(wmOperatorType *ot)
ot->idname= "CONSOLE_OT_history_cycle";
/* api callbacks */
- ot->exec= history_cycle_exec;
+ ot->exec= console_history_cycle_exec;
ot->poll= ED_operator_console_active;
/* properties */
@@ -628,7 +626,7 @@ void CONSOLE_OT_history_cycle(wmOperatorType *ot)
/* the python exec operator uses this */
-static int history_append_exec(bContext *C, wmOperator *op)
+static int console_history_append_exec(bContext *C, wmOperator *op)
{
SpaceConsole *sc= CTX_wm_space_console(C);
ARegion *ar= CTX_wm_region(C);
@@ -670,7 +668,7 @@ void CONSOLE_OT_history_append(wmOperatorType *ot)
ot->idname= "CONSOLE_OT_history_append";
/* api callbacks */
- ot->exec= history_append_exec;
+ ot->exec= console_history_append_exec;
ot->poll= ED_operator_console_active;
/* properties */
@@ -681,7 +679,7 @@ void CONSOLE_OT_history_append(wmOperatorType *ot)
/* the python exec operator uses this */
-static int scrollback_append_exec(bContext *C, wmOperator *op)
+static int console_scrollback_append_exec(bContext *C, wmOperator *op)
{
SpaceConsole *sc= CTX_wm_space_console(C);
ARegion *ar= CTX_wm_region(C);
@@ -724,7 +722,7 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot)
ot->idname= "CONSOLE_OT_scrollback_append";
/* api callbacks */
- ot->exec= scrollback_append_exec;
+ ot->exec= console_scrollback_append_exec;
ot->poll= ED_operator_console_active;
/* properties */
@@ -733,7 +731,7 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot)
}
-static int copy_exec(bContext *C, wmOperator *UNUSED(op))
+static int console_copy_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceConsole *sc= CTX_wm_space_console(C);
@@ -808,12 +806,12 @@ void CONSOLE_OT_copy(wmOperatorType *ot)
/* api callbacks */
ot->poll= ED_operator_console_active;
- ot->exec= copy_exec;
+ ot->exec= console_copy_exec;
/* properties */
}
-static int paste_exec(bContext *C, wmOperator *UNUSED(op))
+static int console_paste_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceConsole *sc= CTX_wm_space_console(C);
ARegion *ar= CTX_wm_region(C);
@@ -861,7 +859,7 @@ void CONSOLE_OT_paste(wmOperatorType *ot)
/* api callbacks */
ot->poll= ED_operator_console_active;
- ot->exec= paste_exec;
+ ot->exec= console_paste_exec;
/* properties */
}
@@ -872,7 +870,7 @@ typedef struct SetConsoleCursor {
} SetConsoleCursor;
// TODO, cursor placement without selection
-static void set_cursor_to_pos(SpaceConsole *sc, ARegion *ar, SetConsoleCursor *scu, int mval[2], int UNUSED(sel))
+static void console_cursor_set_to_pos(SpaceConsole *sc, ARegion *ar, SetConsoleCursor *scu, int mval[2], int UNUSED(sel))
{
int pos;
pos= console_char_pick(sc, ar, mval);
@@ -910,7 +908,7 @@ static void console_modal_select_apply(bContext *C, wmOperator *op, wmEvent *eve
sel_prev[0]= sc->sel_start;
sel_prev[1]= sc->sel_end;
- set_cursor_to_pos(sc, ar, scu, mval, TRUE);
+ console_cursor_set_to_pos(sc, ar, scu, mval, TRUE);
/* only redraw if the selection changed */
if(sel_prev[0] != sc->sel_start || sel_prev[1] != sc->sel_end) {
@@ -918,7 +916,7 @@ static void console_modal_select_apply(bContext *C, wmOperator *op, wmEvent *eve
}
}
-static void set_cursor_exit(bContext *UNUSED(C), wmOperator *op)
+static void console_cursor_set_exit(bContext *UNUSED(C), wmOperator *op)
{
// SpaceConsole *sc= CTX_wm_space_console(C);
SetConsoleCursor *scu= op->customdata;
@@ -960,7 +958,7 @@ static int console_modal_select(bContext *C, wmOperator *op, wmEvent *event)
case LEFTMOUSE:
case MIDDLEMOUSE:
case RIGHTMOUSE:
- set_cursor_exit(C, op);
+ console_cursor_set_exit(C, op);
return OPERATOR_FINISHED;
case MOUSEMOVE:
console_modal_select_apply(C, op, event);
@@ -972,7 +970,7 @@ static int console_modal_select(bContext *C, wmOperator *op, wmEvent *event)
static int console_modal_select_cancel(bContext *C, wmOperator *op)
{
- set_cursor_exit(C, op);
+ console_cursor_set_exit(C, op);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index 1b9e3fdfb4a..4867552cc52 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_file/CMakeLists.txt b/source/blender/editors/space_file/CMakeLists.txt
index 4aa6cdbcf2f..6d959d0b739 100644
--- a/source/blender/editors/space_file/CMakeLists.txt
+++ b/source/blender/editors/space_file/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 8a7e4ce3ec1..d91282e768f 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h
index 1965c661685..d9de804404e 100644
--- a/source/blender/editors/space_file/file_intern.h
+++ b/source/blender/editors/space_file/file_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 079b1c96d24..d6bab41f719 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index fae10c0d84e..7bcaf722827 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 89a34c62200..e739c5fe22e 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -376,7 +374,7 @@ void filelist_init_icons(void)
#ifdef WITH_HEADLESS
bbuf = NULL;
#else
- bbuf = IMB_ibImageFromMemory((unsigned char*)datatoc_prvicons, datatoc_prvicons_size, IB_rect);
+ bbuf = IMB_ibImageFromMemory((unsigned char*)datatoc_prvicons, datatoc_prvicons_size, IB_rect, "<splash>");
#endif
if (bbuf) {
for (y=0; y<SPECIAL_IMG_ROWS; y++) {
diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h
index c5535b22f22..a7f2a0d1af9 100644
--- a/source/blender/editors/space_file/filelist.h
+++ b/source/blender/editors/space_file/filelist.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 29d8242e26d..65473bde0d1 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index a843129c4d9..6b3477d1fe5 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_file/fsmenu.h b/source/blender/editors/space_file/fsmenu.h
index c300dd84986..5947db073f6 100644
--- a/source/blender/editors/space_file/fsmenu.h
+++ b/source/blender/editors/space_file/fsmenu.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 726a2a80be1..7bc71e333ea 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_graph/CMakeLists.txt b/source/blender/editors/space_graph/CMakeLists.txt
index 28383b29b36..50ab985d1e0 100644
--- a/source/blender/editors/space_graph/CMakeLists.txt
+++ b/source/blender/editors/space_graph/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 90bfadd0b5a..460e46fce30 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -729,11 +727,10 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op)
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
- if(ac.reports==NULL) {
- ac.reports= op->reports;
- }
+ /* ac.reports by default will be the global reports list, which won't show warnings */
+ ac.reports= op->reports;
- /* paste keyframes */
+ /* paste keyframes - non-zero return means an error occurred while trying to paste */
if (paste_graph_keys(&ac, offset_mode, merge_mode)) {
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h
index 2aefb7c64dd..d0efdefe5a5 100644
--- a/source/blender/editors/space_graph/graph_intern.h
+++ b/source/blender/editors/space_graph/graph_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index fb148a73ed2..90e99519600 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index 40380db03d4..e74c7d50adc 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c
index 3f2993fd793..e7dc5e8408c 100644
--- a/source/blender/editors/space_graph/graph_utils.c
+++ b/source/blender/editors/space_graph/graph_utils.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 3cc83b12124..50178f73d89 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_image/CMakeLists.txt b/source/blender/editors/space_image/CMakeLists.txt
index 0d4408faf49..15c90fb701e 100644
--- a/source/blender/editors/space_image/CMakeLists.txt
+++ b/source/blender/editors/space_image/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index beeb5e3532f..5445f2e8c44 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 112359726ea..505452f504c 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h
index 399157da85c..051926bf689 100644
--- a/source/blender/editors/space_image/image_intern.h
+++ b/source/blender/editors/space_image/image_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index dba60586b29..c83baf24c1c 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -136,18 +134,27 @@ static int space_image_file_exists_poll(bContext *C)
SpaceImage *sima= CTX_wm_space_image(C);
ImBuf *ibuf;
void *lock;
- int poll= 0;
+ int ret= FALSE;
char name[FILE_MAX];
ibuf= ED_space_image_acquire_buffer(sima, &lock);
if(ibuf) {
BLI_strncpy(name, ibuf->name, FILE_MAX);
BLI_path_abs(name, bmain->name);
- poll= (BLI_exists(name) && BLI_file_is_writable(name));
+
+ if(BLI_exists(name) == FALSE) {
+ CTX_wm_operator_poll_msg_set(C, "image file not found");
+ }
+ else if (BLI_file_is_writable(name) == FALSE) {
+ CTX_wm_operator_poll_msg_set(C, "image path can't be written to");
+ }
+ else {
+ ret= TRUE;
+ }
}
ED_space_image_release_buffer(sima, lock);
- return poll;
+ return ret;
}
return 0;
}
@@ -179,7 +186,7 @@ typedef struct ViewPanData {
int event_type;
} ViewPanData;
-static void view_pan_init(bContext *C, wmOperator *op, wmEvent *event)
+static void image_view_pan_init(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceImage *sima= CTX_wm_space_image(C);
ViewPanData *vpd;
@@ -196,7 +203,7 @@ static void view_pan_init(bContext *C, wmOperator *op, wmEvent *event)
WM_event_add_modal_handler(C, op);
}
-static void view_pan_exit(bContext *C, wmOperator *op, int cancel)
+static void image_view_pan_exit(bContext *C, wmOperator *op, int cancel)
{
SpaceImage *sima= CTX_wm_space_image(C);
ViewPanData *vpd= op->customdata;
@@ -211,7 +218,7 @@ static void view_pan_exit(bContext *C, wmOperator *op, int cancel)
MEM_freeN(op->customdata);
}
-static int view_pan_exec(bContext *C, wmOperator *op)
+static int image_view_pan_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
float offset[2];
@@ -234,7 +241,7 @@ static int view_pan_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int image_view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
if (event->type == MOUSEPAN) {
SpaceImage *sima= CTX_wm_space_image(C);
@@ -244,16 +251,16 @@ static int view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event)
offset[1]= (event->y - event->prevy)/sima->zoom;
RNA_float_set_array(op->ptr, "offset", offset);
- view_pan_exec(C, op);
+ image_view_pan_exec(C, op);
return OPERATOR_FINISHED;
}
else {
- view_pan_init(C, op, event);
+ image_view_pan_init(C, op, event);
return OPERATOR_RUNNING_MODAL;
}
}
-static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
+static int image_view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceImage *sima= CTX_wm_space_image(C);
ViewPanData *vpd= op->customdata;
@@ -266,11 +273,11 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
offset[0]= (vpd->x - event->x)/sima->zoom;
offset[1]= (vpd->y - event->y)/sima->zoom;
RNA_float_set_array(op->ptr, "offset", offset);
- view_pan_exec(C, op);
+ image_view_pan_exec(C, op);
break;
default:
if(event->type==vpd->event_type && event->val==KM_RELEASE) {
- view_pan_exit(C, op, 0);
+ image_view_pan_exit(C, op, 0);
return OPERATOR_FINISHED;
}
break;
@@ -279,9 +286,9 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
-static int view_pan_cancel(bContext *C, wmOperator *op)
+static int image_view_pan_cancel(bContext *C, wmOperator *op)
{
- view_pan_exit(C, op, 1);
+ image_view_pan_exit(C, op, 1);
return OPERATOR_CANCELLED;
}
@@ -292,10 +299,10 @@ void IMAGE_OT_view_pan(wmOperatorType *ot)
ot->idname= "IMAGE_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->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 */
@@ -314,7 +321,7 @@ typedef struct ViewZoomData {
int event_type;
} ViewZoomData;
-static void view_zoom_init(bContext *C, wmOperator *op, wmEvent *event)
+static void image_view_zoom_init(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceImage *sima= CTX_wm_space_image(C);
ViewZoomData *vpd;
@@ -330,7 +337,7 @@ static void view_zoom_init(bContext *C, wmOperator *op, wmEvent *event)
WM_event_add_modal_handler(C, op);
}
-static void view_zoom_exit(bContext *C, wmOperator *op, int cancel)
+static void image_view_zoom_exit(bContext *C, wmOperator *op, int cancel)
{
SpaceImage *sima= CTX_wm_space_image(C);
ViewZoomData *vpd= op->customdata;
@@ -344,7 +351,7 @@ static void view_zoom_exit(bContext *C, wmOperator *op, int cancel)
MEM_freeN(op->customdata);
}
-static int view_zoom_exec(bContext *C, wmOperator *op)
+static int image_view_zoom_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
ARegion *ar= CTX_wm_region(C);
@@ -365,7 +372,7 @@ static int view_zoom_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int view_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int image_view_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
if (event->type == MOUSEZOOM) {
SpaceImage *sima= CTX_wm_space_image(C);
@@ -380,12 +387,12 @@ static int view_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_FINISHED;
}
else {
- view_zoom_init(C, op, event);
+ image_view_zoom_init(C, op, event);
return OPERATOR_RUNNING_MODAL;
}
}
-static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
+static int image_view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceImage *sima= CTX_wm_space_image(C);
ARegion *ar= CTX_wm_region(C);
@@ -401,7 +408,7 @@ static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
break;
default:
if(event->type==vpd->event_type && event->val==KM_RELEASE) {
- view_zoom_exit(C, op, 0);
+ image_view_zoom_exit(C, op, 0);
return OPERATOR_FINISHED;
}
break;
@@ -410,9 +417,9 @@ static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
-static int view_zoom_cancel(bContext *C, wmOperator *op)
+static int image_view_zoom_cancel(bContext *C, wmOperator *op)
{
- view_zoom_exit(C, op, 1);
+ image_view_zoom_exit(C, op, 1);
return OPERATOR_CANCELLED;
}
@@ -423,10 +430,10 @@ void IMAGE_OT_view_zoom(wmOperatorType *ot)
ot->idname= "IMAGE_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->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 */
@@ -445,7 +452,7 @@ void IMAGE_OT_view_zoom(wmOperatorType *ot)
* that explains the negative signs in the code below
*/
-static int view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
+static int image_view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
if (event->type != NDOF_MOTION)
return OPERATOR_CANCELLED;
@@ -491,7 +498,7 @@ void IMAGE_OT_view_ndof(wmOperatorType *ot)
ot->idname= "IMAGE_OT_view_ndof";
/* api callbacks */
- ot->invoke= view_ndof_invoke;
+ ot->invoke= image_view_ndof_invoke;
}
/********************** view all operator *********************/
@@ -500,7 +507,7 @@ void IMAGE_OT_view_ndof(wmOperatorType *ot)
* Default behavior is to reset the position of the image and set the zoom to 1
* If the image will not fit within the window rectangle, the zoom is adjusted */
-static int view_all_exec(bContext *C, wmOperator *UNUSED(op))
+static int image_view_all_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceImage *sima;
ARegion *ar;
@@ -544,13 +551,13 @@ void IMAGE_OT_view_all(wmOperatorType *ot)
ot->idname= "IMAGE_OT_view_all";
/* api callbacks */
- ot->exec= view_all_exec;
+ ot->exec= image_view_all_exec;
ot->poll= space_image_main_area_poll;
}
/********************** view selected operator *********************/
-static int view_selected_exec(bContext *C, wmOperator *UNUSED(op))
+static int image_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceImage *sima;
ARegion *ar;
@@ -593,7 +600,7 @@ static int view_selected_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-static int view_selected_poll(bContext *C)
+static int image_view_selected_poll(bContext *C)
{
return (space_image_main_area_poll(C) && ED_operator_uvedit(C));
}
@@ -605,13 +612,13 @@ void IMAGE_OT_view_selected(wmOperatorType *ot)
ot->idname= "IMAGE_OT_view_selected";
/* api callbacks */
- ot->exec= view_selected_exec;
- ot->poll= view_selected_poll;
+ ot->exec= image_view_selected_exec;
+ ot->poll= image_view_selected_poll;
}
/********************** view zoom in/out operator *********************/
-static int view_zoom_in_exec(bContext *C, wmOperator *UNUSED(op))
+static int image_view_zoom_in_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceImage *sima= CTX_wm_space_image(C);
ARegion *ar= CTX_wm_region(C);
@@ -630,11 +637,11 @@ void IMAGE_OT_view_zoom_in(wmOperatorType *ot)
ot->idname= "IMAGE_OT_view_zoom_in";
/* api callbacks */
- ot->exec= view_zoom_in_exec;
+ ot->exec= image_view_zoom_in_exec;
ot->poll= space_image_main_area_poll;
}
-static int view_zoom_out_exec(bContext *C, wmOperator *UNUSED(op))
+static int image_view_zoom_out_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceImage *sima= CTX_wm_space_image(C);
ARegion *ar= CTX_wm_region(C);
@@ -653,13 +660,13 @@ void IMAGE_OT_view_zoom_out(wmOperatorType *ot)
ot->idname= "IMAGE_OT_view_zoom_out";
/* api callbacks */
- ot->exec= view_zoom_out_exec;
+ ot->exec= image_view_zoom_out_exec;
ot->poll= space_image_main_area_poll;
}
/********************** view zoom ratio operator *********************/
-static int view_zoom_ratio_exec(bContext *C, wmOperator *op)
+static int image_view_zoom_ratio_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
ARegion *ar= CTX_wm_region(C);
@@ -691,7 +698,7 @@ void IMAGE_OT_view_zoom_ratio(wmOperatorType *ot)
ot->idname= "IMAGE_OT_view_zoom_ratio";
/* api callbacks */
- ot->exec= view_zoom_ratio_exec;
+ ot->exec= image_view_zoom_ratio_exec;
ot->poll= space_image_main_area_poll;
/* properties */
@@ -742,7 +749,7 @@ static void image_filesel(bContext *C, wmOperator *op, const char *path)
/******************** open image operator ********************/
-static void open_init(bContext *C, wmOperator *op)
+static void image_open_init(bContext *C, wmOperator *op)
{
PropertyPointerRNA *pprop;
@@ -750,14 +757,14 @@ static void open_init(bContext *C, wmOperator *op)
uiIDContextProperty(C, &pprop->ptr, &pprop->prop);
}
-static int open_cancel(bContext *UNUSED(C), wmOperator *op)
+static int image_open_cancel(bContext *UNUSED(C), wmOperator *op)
{
MEM_freeN(op->customdata);
op->customdata= NULL;
return OPERATOR_CANCELLED;
}
-static int open_exec(bContext *C, wmOperator *op)
+static int image_open_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C); /* XXX other space types can call */
Scene *scene= CTX_data_scene(C);
@@ -782,7 +789,7 @@ static int open_exec(bContext *C, wmOperator *op)
}
if(!op->customdata)
- open_init(C, op);
+ image_open_init(C, op);
/* hook into UI */
pprop= op->customdata;
@@ -825,7 +832,7 @@ static int open_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int image_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
SpaceImage *sima= CTX_wm_space_image(C); /* XXX other space types can call */
char *path=U.textudir;
@@ -845,9 +852,9 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
path= ima->name;
if(RNA_property_is_set(op->ptr, "filepath"))
- return open_exec(C, op);
+ return image_open_exec(C, op);
- open_init(C, op);
+ image_open_init(C, op);
image_filesel(C, op, path);
@@ -863,9 +870,9 @@ void IMAGE_OT_open(wmOperatorType *ot)
ot->idname= "IMAGE_OT_open";
/* api callbacks */
- ot->exec= open_exec;
- ot->invoke= open_invoke;
- ot->cancel= open_cancel;
+ ot->exec= image_open_exec;
+ ot->invoke= image_open_invoke;
+ ot->cancel= image_open_cancel;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -876,7 +883,7 @@ void IMAGE_OT_open(wmOperatorType *ot)
/******************** replace image operator ********************/
-static int replace_exec(bContext *C, wmOperator *op)
+static int image_replace_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
char str[FILE_MAX];
@@ -896,7 +903,7 @@ static int replace_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int image_replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
SpaceImage *sima= CTX_wm_space_image(C);
@@ -904,7 +911,7 @@ static int replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
return OPERATOR_CANCELLED;
if(RNA_property_is_set(op->ptr, "filepath"))
- return replace_exec(C, op);
+ return image_replace_exec(C, op);
if(!RNA_property_is_set(op->ptr, "relative_path"))
RNA_boolean_set(op->ptr, "relative_path", (strncmp(sima->image->name, "//", 2))==0);
@@ -921,8 +928,8 @@ void IMAGE_OT_replace(wmOperatorType *ot)
ot->idname= "IMAGE_OT_replace";
/* api callbacks */
- ot->exec= replace_exec;
- ot->invoke= replace_invoke;
+ ot->exec= image_replace_exec;
+ ot->invoke= image_replace_invoke;
ot->poll= space_image_poll;
/* flags */
@@ -1034,7 +1041,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock);
if (ibuf) {
- Main *bmain= CTX_data_main(C);
+ const char *relbase= ID_BLEND_PATH(CTX_data_main(C), &ima->id);
const short relative= (RNA_struct_find_property(op->ptr, "relative_path") && RNA_boolean_get(op->ptr, "relative_path"));
const short save_copy= (RNA_struct_find_property(op->ptr, "copy") && RNA_boolean_get(op->ptr, "copy"));
short ok= FALSE;
@@ -1077,19 +1084,11 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
ok= TRUE;
}
- if(ok) {
- if(relative)
- BLI_path_rel(simopts->filepath, bmain->name); /* only after saving */
-
- if(ibuf->name[0]==0) {
- BLI_strncpy(ibuf->name, simopts->filepath, sizeof(ibuf->name));
- BLI_strncpy(ima->name, simopts->filepath, sizeof(ima->name));
- }
-
+ if (ok) {
if(!save_copy) {
if(do_newpath) {
- BLI_strncpy(ima->name, simopts->filepath, sizeof(ima->name));
BLI_strncpy(ibuf->name, simopts->filepath, sizeof(ibuf->name));
+ BLI_strncpy(ima->name, simopts->filepath, sizeof(ima->name));
}
ibuf->userflags &= ~IB_BITMAPDIRTY;
@@ -1114,6 +1113,11 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
ima->source= IMA_SRC_FILE;
ima->type= IMA_TYPE_IMAGE;
}
+
+ /* only image path, never ibuf */
+ if(relative) {
+ BLI_path_rel(ima->name, relbase); /* only after saving */
+ }
}
}
else {
@@ -1129,7 +1133,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
ED_space_image_release_buffer(sima, lock);
}
-static int save_as_exec(bContext *C, wmOperator *op)
+static int image_save_as_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
SaveImageOptions simopts;
@@ -1145,7 +1149,7 @@ static int save_as_exec(bContext *C, wmOperator *op)
}
-static int save_as_check(bContext *UNUSED(C), wmOperator *op)
+static int image_save_as_check(bContext *UNUSED(C), wmOperator *op)
{
char filepath[FILE_MAX];
RNA_string_get(op->ptr, "filepath", filepath);
@@ -1156,7 +1160,7 @@ static int save_as_check(bContext *UNUSED(C), wmOperator *op)
return FALSE;
}
-static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int image_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
SpaceImage *sima= CTX_wm_space_image(C);
Image *ima = ED_space_image(sima);
@@ -1164,7 +1168,7 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
SaveImageOptions simopts;
if(RNA_property_is_set(op->ptr, "filepath"))
- return save_as_exec(C, op);
+ return image_save_as_exec(C, op);
if (save_image_options_init(&simopts, sima, scene, TRUE) == 0)
return OPERATOR_CANCELLED;
@@ -1190,9 +1194,9 @@ void IMAGE_OT_save_as(wmOperatorType *ot)
ot->idname= "IMAGE_OT_save_as";
/* api callbacks */
- ot->exec= save_as_exec;
- ot->check= save_as_check;
- ot->invoke= save_as_invoke;
+ ot->exec= image_save_as_exec;
+ ot->check= image_save_as_check;
+ ot->invoke= image_save_as_invoke;
ot->poll= space_image_buffer_exists_poll;
/* flags */
@@ -1213,7 +1217,7 @@ void IMAGE_OT_save_as(wmOperatorType *ot)
/******************** save image operator ********************/
-static int save_exec(bContext *C, wmOperator *op)
+static int image_save_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
Scene *scene= CTX_data_scene(C);
@@ -1241,7 +1245,7 @@ void IMAGE_OT_save(wmOperatorType *ot)
ot->idname= "IMAGE_OT_save";
/* api callbacks */
- ot->exec= save_exec;
+ ot->exec= image_save_exec;
ot->poll= space_image_file_exists_poll;
/* flags */
@@ -1250,7 +1254,7 @@ void IMAGE_OT_save(wmOperatorType *ot)
/******************* save sequence operator ********************/
-static int save_sequence_exec(bContext *C, wmOperator *op)
+static int image_save_sequence_exec(bContext *C, wmOperator *op)
{
Main *bmain= CTX_data_main(C);
SpaceImage *sima= CTX_wm_space_image(C);
@@ -1318,7 +1322,7 @@ void IMAGE_OT_save_sequence(wmOperatorType *ot)
ot->idname= "IMAGE_OT_save_sequence";
/* api callbacks */
- ot->exec= save_sequence_exec;
+ ot->exec= image_save_sequence_exec;
ot->poll= space_image_buffer_exists_poll;
/* flags */
@@ -1327,7 +1331,7 @@ void IMAGE_OT_save_sequence(wmOperatorType *ot)
/******************** reload image operator ********************/
-static int reload_exec(bContext *C, wmOperator *UNUSED(op))
+static int image_reload_exec(bContext *C, wmOperator *UNUSED(op))
{
Image *ima= CTX_data_edit_image(C);
SpaceImage *sima= CTX_wm_space_image(C);
@@ -1353,7 +1357,7 @@ void IMAGE_OT_reload(wmOperatorType *ot)
ot->idname= "IMAGE_OT_reload";
/* api callbacks */
- ot->exec= reload_exec;
+ ot->exec= image_reload_exec;
/* flags */
ot->flag= OPTYPE_REGISTER; /* no undo, image buffer is not handled by undo */
@@ -1540,7 +1544,7 @@ void IMAGE_OT_invert(wmOperatorType *ot)
/********************* pack operator *********************/
-static int pack_test(bContext *C, wmOperator *op)
+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");
@@ -1558,14 +1562,14 @@ static int pack_test(bContext *C, wmOperator *op)
return 1;
}
-static int pack_exec(bContext *C, wmOperator *op)
+static int image_pack_exec(bContext *C, wmOperator *op)
{
struct Main *bmain= CTX_data_main(C);
Image *ima= CTX_data_edit_image(C);
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
int as_png= RNA_boolean_get(op->ptr, "as_png");
- if(!pack_test(C, op))
+ if(!image_pack_test(C, op))
return OPERATOR_CANCELLED;
if(!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) {
@@ -1583,7 +1587,7 @@ static int pack_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int image_pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
Image *ima= CTX_data_edit_image(C);
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
@@ -1591,7 +1595,7 @@ static int pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
uiLayout *layout;
int as_png= RNA_boolean_get(op->ptr, "as_png");
- if(!pack_test(C, op))
+ if(!image_pack_test(C, op))
return OPERATOR_CANCELLED;
if(!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) {
@@ -1603,7 +1607,7 @@ static int pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
return OPERATOR_CANCELLED;
}
- return pack_exec(C, op);
+ return image_pack_exec(C, op);
}
void IMAGE_OT_pack(wmOperatorType *ot)
@@ -1614,8 +1618,8 @@ void IMAGE_OT_pack(wmOperatorType *ot)
ot->idname= "IMAGE_OT_pack";
/* api callbacks */
- ot->exec= pack_exec;
- ot->invoke= pack_invoke;
+ ot->exec= image_pack_exec;
+ ot->invoke= image_pack_invoke;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1723,7 +1727,7 @@ typedef struct ImageSampleInfo {
int draw;
} ImageSampleInfo;
-static void sample_draw(const bContext *UNUSED(C), ARegion *ar, void *arg_info)
+static void image_sample_draw(const bContext *UNUSED(C), ARegion *ar, void *arg_info)
{
ImageSampleInfo *info= arg_info;
if(info->draw) {
@@ -1732,7 +1736,7 @@ static void sample_draw(const bContext *UNUSED(C), ARegion *ar, void *arg_info)
}
}
-static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
+static void image_sample_apply(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceImage *sima= CTX_wm_space_image(C);
ARegion *ar= CTX_wm_region(C);
@@ -1842,7 +1846,7 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
ED_area_tag_redraw(CTX_wm_area(C));
}
-static void sample_exit(bContext *C, wmOperator *op)
+static void image_sample_exit(bContext *C, wmOperator *op)
{
ImageSampleInfo *info= op->customdata;
@@ -1851,7 +1855,7 @@ static void sample_exit(bContext *C, wmOperator *op)
MEM_freeN(info);
}
-static int sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int image_sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceImage *sima= CTX_wm_space_image(C);
ARegion *ar= CTX_wm_region(C);
@@ -1862,34 +1866,34 @@ static int sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
info= MEM_callocN(sizeof(ImageSampleInfo), "ImageSampleInfo");
info->art= ar->type;
- info->draw_handle = ED_region_draw_cb_activate(ar->type, sample_draw, info, REGION_DRAW_POST_PIXEL);
+ info->draw_handle = ED_region_draw_cb_activate(ar->type, image_sample_draw, info, REGION_DRAW_POST_PIXEL);
op->customdata= info;
- sample_apply(C, op, event);
+ image_sample_apply(C, op, event);
WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
}
-static int sample_modal(bContext *C, wmOperator *op, wmEvent *event)
+static int image_sample_modal(bContext *C, wmOperator *op, wmEvent *event)
{
switch(event->type) {
case LEFTMOUSE:
case RIGHTMOUSE: // XXX hardcoded
- sample_exit(C, op);
+ image_sample_exit(C, op);
return OPERATOR_CANCELLED;
case MOUSEMOVE:
- sample_apply(C, op, event);
+ image_sample_apply(C, op, event);
break;
}
return OPERATOR_RUNNING_MODAL;
}
-static int sample_cancel(bContext *C, wmOperator *op)
+static int image_sample_cancel(bContext *C, wmOperator *op)
{
- sample_exit(C, op);
+ image_sample_exit(C, op);
return OPERATOR_CANCELLED;
}
@@ -1900,9 +1904,9 @@ void IMAGE_OT_sample(wmOperatorType *ot)
ot->idname= "IMAGE_OT_sample";
/* api callbacks */
- ot->invoke= sample_invoke;
- ot->modal= sample_modal;
- ot->cancel= sample_cancel;
+ ot->invoke= image_sample_invoke;
+ ot->modal= image_sample_modal;
+ ot->cancel= image_sample_cancel;
ot->poll= space_image_main_area_poll;
/* flags */
@@ -1910,7 +1914,7 @@ void IMAGE_OT_sample(wmOperatorType *ot)
}
/******************** sample line operator ********************/
-static int sample_line_exec(bContext *C, wmOperator *op)
+static int image_sample_line_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
ARegion *ar= CTX_wm_region(C);
@@ -1991,7 +1995,7 @@ static int sample_line_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int sample_line_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int image_sample_line_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceImage *sima= CTX_wm_space_image(C);
@@ -2008,9 +2012,9 @@ void IMAGE_OT_sample_line(wmOperatorType *ot)
ot->idname= "IMAGE_OT_sample_line";
/* api callbacks */
- ot->invoke= sample_line_invoke;
+ ot->invoke= image_sample_line_invoke;
ot->modal= WM_gesture_straightline_modal;
- ot->exec= sample_line_exec;
+ ot->exec= image_sample_line_exec;
ot->poll= space_image_main_area_poll;
ot->cancel= WM_gesture_straightline_cancel;
@@ -2037,9 +2041,9 @@ void IMAGE_OT_curves_point_set(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* api callbacks */
- ot->invoke= sample_invoke;
- ot->modal= sample_modal;
- ot->cancel= sample_cancel;
+ ot->invoke= image_sample_invoke;
+ ot->modal= image_sample_modal;
+ ot->cancel= image_sample_cancel;
ot->poll= space_image_main_area_poll;
/* properties */
@@ -2054,7 +2058,7 @@ typedef struct RecordCompositeData {
int sfra, efra;
} RecordCompositeData;
-static int record_composite_apply(bContext *C, wmOperator *op)
+static int image_record_composite_apply(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
RecordCompositeData *rcd= op->customdata;
@@ -2082,7 +2086,7 @@ static int record_composite_apply(bContext *C, wmOperator *op)
return (scene->r.cfra <= rcd->efra);
}
-static int record_composite_init(bContext *C, wmOperator *op)
+static int image_record_composite_init(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
Scene *scene= CTX_data_scene(C);
@@ -2103,7 +2107,7 @@ static int record_composite_init(bContext *C, wmOperator *op)
return 1;
}
-static void record_composite_exit(bContext *C, wmOperator *op)
+static void image_record_composite_exit(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
SpaceImage *sima= CTX_wm_space_image(C);
@@ -2124,60 +2128,60 @@ static void record_composite_exit(bContext *C, wmOperator *op)
MEM_freeN(rcd);
}
-static int record_composite_exec(bContext *C, wmOperator *op)
+static int image_record_composite_exec(bContext *C, wmOperator *op)
{
- if(!record_composite_init(C, op))
+ if(!image_record_composite_init(C, op))
return OPERATOR_CANCELLED;
- while(record_composite_apply(C, op))
+ while(image_record_composite_apply(C, op))
;
- record_composite_exit(C, op);
+ image_record_composite_exit(C, op);
return OPERATOR_FINISHED;
}
-static int record_composite_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int image_record_composite_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
RecordCompositeData *rcd;
- if(!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(!record_composite_apply(C, op))
+ if(!image_record_composite_apply(C, op))
return OPERATOR_FINISHED;
return OPERATOR_RUNNING_MODAL;
}
-static int record_composite_modal(bContext *C, wmOperator *op, wmEvent *event)
+static int image_record_composite_modal(bContext *C, wmOperator *op, wmEvent *event)
{
RecordCompositeData *rcd= op->customdata;
switch(event->type) {
case TIMER:
if(rcd->timer == event->customdata) {
- if(!record_composite_apply(C, op)) {
- record_composite_exit(C, op);
+ if(!image_record_composite_apply(C, op)) {
+ image_record_composite_exit(C, op);
return OPERATOR_FINISHED;
}
}
break;
case ESCKEY:
- record_composite_exit(C, op);
+ image_record_composite_exit(C, op);
return OPERATOR_FINISHED;
}
return OPERATOR_RUNNING_MODAL;
}
-static int record_composite_cancel(bContext *C, wmOperator *op)
+static int image_record_composite_cancel(bContext *C, wmOperator *op)
{
- record_composite_exit(C, op);
+ image_record_composite_exit(C, op);
return OPERATOR_CANCELLED;
}
@@ -2188,23 +2192,23 @@ void IMAGE_OT_record_composite(wmOperatorType *ot)
ot->idname= "IMAGE_OT_record_composite";
/* api callbacks */
- ot->exec= record_composite_exec;
- ot->invoke= record_composite_invoke;
- ot->modal= record_composite_modal;
- ot->cancel= record_composite_cancel;
+ 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 *********************/
-static int cycle_render_slot_poll(bContext *C)
+static int image_cycle_render_slot_poll(bContext *C)
{
Image *ima= CTX_data_edit_image(C);
return (ima && ima->type == IMA_TYPE_R_RESULT);
}
-static int cycle_render_slot_exec(bContext *C, wmOperator *op)
+static int image_cycle_render_slot_exec(bContext *C, wmOperator *op)
{
Image *ima= CTX_data_edit_image(C);
int a, slot, cur= ima->render_slot;
@@ -2243,8 +2247,8 @@ void IMAGE_OT_cycle_render_slot(wmOperatorType *ot)
ot->idname= "IMAGE_OT_cycle_render_slot";
/* api callbacks */
- ot->exec= cycle_render_slot_exec;
- ot->poll= 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;
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index e345caf1359..3b9876329ec 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_info/CMakeLists.txt b/source/blender/editors/space_info/CMakeLists.txt
index 22347df93a3..4c1c13c1092 100644
--- a/source/blender/editors/space_info/CMakeLists.txt
+++ b/source/blender/editors/space_info/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_info/info_draw.c b/source/blender/editors/space_info/info_draw.c
index 126d75e76cb..d2be3bd2812 100644
--- a/source/blender/editors/space_info/info_draw.c
+++ b/source/blender/editors/space_info/info_draw.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_info/info_intern.h b/source/blender/editors/space_info/info_intern.h
index 00aee75768f..fc0615a914b 100644
--- a/source/blender/editors/space_info/info_intern.h
+++ b/source/blender/editors/space_info/info_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index 6c5a6f78e90..deff1c77912 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -255,10 +253,12 @@ void FILE_OT_make_paths_absolute(wmOperatorType *ot)
/********************* report missing files operator *********************/
-static int report_missing_files_exec(bContext *UNUSED(C), wmOperator *op)
+static int report_missing_files_exec(bContext *C, wmOperator *op)
{
+ Main *bmain= CTX_data_main(C);
+
/* run the missing file check */
- checkMissingFiles(G.main, op->reports);
+ checkMissingFiles(bmain, op->reports);
return OPERATOR_FINISHED;
}
@@ -278,13 +278,12 @@ void FILE_OT_report_missing_files(wmOperatorType *ot)
/********************* find missing files operator *********************/
-static int find_missing_files_exec(bContext *UNUSED(C), wmOperator *op)
+static int find_missing_files_exec(bContext *C, wmOperator *op)
{
- char *path;
-
- path= RNA_string_get_alloc(op->ptr, "filepath", NULL, 0);
- findMissingFiles(G.main, path);
- MEM_freeN(path);
+ Main *bmain= CTX_data_main(C);
+ const char *searchpath= RNA_string_get_alloc(op->ptr, "filepath", NULL, 0);
+ findMissingFiles(bmain, searchpath, op->reports);
+ MEM_freeN((void *)searchpath);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c
index 52930626964..eab6cb5402f 100644
--- a/source/blender/editors/space_info/info_report.c
+++ b/source/blender/editors/space_info/info_report.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 182e5242a1d..25e1d2f2816 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index bafcf36e646..b9ef57e6850 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c
index afe8aa39c16..70c4ebd445a 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_info/textview.h b/source/blender/editors/space_info/textview.h
index a30c082575a..33fbe556245 100644
--- a/source/blender/editors/space_info/textview.h
+++ b/source/blender/editors/space_info/textview.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_logic/CMakeLists.txt b/source/blender/editors/space_logic/CMakeLists.txt
index c4f9f49c9a1..8859d1d8bfd 100644
--- a/source/blender/editors/space_logic/CMakeLists.txt
+++ b/source/blender/editors/space_logic/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c
index 16e916928a9..388f9470cb5 100644
--- a/source/blender/editors/space_logic/logic_buttons.c
+++ b/source/blender/editors/space_logic/logic_buttons.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_logic/logic_intern.h b/source/blender/editors/space_logic/logic_intern.h
index dc17297fa9e..457fe14352c 100644
--- a/source/blender/editors/space_logic/logic_intern.h
+++ b/source/blender/editors/space_logic/logic_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c
index b1c0dd02e4b..ce6b7d2e910 100644
--- a/source/blender/editors/space_logic/logic_ops.c
+++ b/source/blender/editors/space_logic/logic_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index eec8bfb469b..c36cb1bf00e 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c
index f420d0ef690..a9b1acbcc04 100644
--- a/source/blender/editors/space_logic/space_logic.c
+++ b/source/blender/editors/space_logic/space_logic.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_nla/CMakeLists.txt b/source/blender/editors/space_nla/CMakeLists.txt
index 819e80d7b2e..cae31f86388 100644
--- a/source/blender/editors/space_nla/CMakeLists.txt
+++ b/source/blender/editors/space_nla/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_node/CMakeLists.txt b/source/blender/editors/space_node/CMakeLists.txt
index dcd6bcd3403..8a27bcca8af 100644
--- a/source/blender/editors/space_node/CMakeLists.txt
+++ b/source/blender/editors/space_node/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 150847ce825..7a9cf644b55 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c
index 7b14e35e8fe..3886c709196 100644
--- a/source/blender/editors/space_node/node_buttons.c
+++ b/source/blender/editors/space_node/node_buttons.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index baa47d4147e..fd7a6ee21fd 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 59e62c9b0e4..4c98028644a 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c
index b64685e3984..68f5dd6bf14 100644
--- a/source/blender/editors/space_node/node_header.c
+++ b/source/blender/editors/space_node/node_header.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 8bc0ae51415..655d54ac8a7 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c
index 87f98f2bb8d..8309181ddda 100644
--- a/source/blender/editors/space_node/node_ops.c
+++ b/source/blender/editors/space_node/node_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index e2b0b9c65d0..593beedc765 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_node/node_state.c b/source/blender/editors/space_node/node_state.c
index 13a5f3cb3dc..bfebd087c3f 100644
--- a/source/blender/editors/space_node/node_state.c
+++ b/source/blender/editors/space_node/node_state.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 1d9723f598b..35b8666f274 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt
index d969a80a678..27b4a568860 100644
--- a/source/blender/editors/space_outliner/CMakeLists.txt
+++ b/source/blender/editors/space_outliner/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 91365e9e7de..cf9bf3de1b8 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -310,11 +310,15 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
}
/* Check the library target exists */
if (te->idcode == ID_LI) {
- char expanded[FILE_MAXDIR + FILE_MAXFILE];
- BLI_strncpy(expanded, ((Library *)tselem->id)->name, FILE_MAXDIR + FILE_MAXFILE);
+ Library *lib= (Library *)tselem->id;
+ char expanded[FILE_MAX];
+
+ BKE_library_filepath_set(lib, lib->name);
+
+ BLI_strncpy(expanded, lib->name, sizeof(expanded));
BLI_path_abs(expanded, G.main->name);
if (!BLI_exists(expanded)) {
- BKE_report(CTX_wm_reports(C), RPT_ERROR, "This path does not exist, correct this before saving");
+ BKE_reportf(CTX_wm_reports(C), RPT_ERROR, "Library path '%s' does not exist, correct this before saving", expanded);
}
}
}
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 78907fbd1ed..a4f67f91763 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -310,9 +310,7 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto
static void id_local_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
if (tselem->id->lib && (tselem->id->flag & LIB_EXTERN)) {
- tselem->id->lib= NULL;
- tselem->id->flag= LIB_LOCAL;
- new_id(NULL, tselem->id, NULL);
+ id_clear_lib_data(NULL, tselem->id);
}
}
diff --git a/source/blender/editors/space_script/CMakeLists.txt b/source/blender/editors/space_script/CMakeLists.txt
index 9d3bd4a67aa..fb88d81ddf6 100644
--- a/source/blender/editors/space_script/CMakeLists.txt
+++ b/source/blender/editors/space_script/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index 02cbc81aaa5..b0c2de390a2 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_script/script_header.c b/source/blender/editors/space_script/script_header.c
index d88d4296008..8354dc1e996 100644
--- a/source/blender/editors/space_script/script_header.c
+++ b/source/blender/editors/space_script/script_header.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_script/script_intern.h b/source/blender/editors/space_script/script_intern.h
index c818a4e1f9b..a3565d070eb 100644
--- a/source/blender/editors/space_script/script_intern.h
+++ b/source/blender/editors/space_script/script_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_script/script_ops.c b/source/blender/editors/space_script/script_ops.c
index 215c66b2519..3ae89eefda3 100644
--- a/source/blender/editors/space_script/script_ops.c
+++ b/source/blender/editors/space_script/script_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c
index b81394a87e2..dbda276b20c 100644
--- a/source/blender/editors/space_script/space_script.c
+++ b/source/blender/editors/space_script/space_script.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_sequencer/CMakeLists.txt b/source/blender/editors/space_sequencer/CMakeLists.txt
index 9ce5f8e5279..bfd9ed95ee4 100644
--- a/source/blender/editors/space_sequencer/CMakeLists.txt
+++ b/source/blender/editors/space_sequencer/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 2f57bc2d93b..458e6453b77 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_sequencer/sequencer_buttons.c b/source/blender/editors/space_sequencer/sequencer_buttons.c
index 01a43fd7fe1..9aefdea9fb0 100644
--- a/source/blender/editors/space_sequencer/sequencer_buttons.c
+++ b/source/blender/editors/space_sequencer/sequencer_buttons.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 13e54c9a4c0..ddfa2fd915f 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -74,7 +72,8 @@
#define SEQ_RIGHTHANDLE 2
-/* Note, Dont use WHILE_SEQ while drawing! - it messes up transform, - Campbell */
+/* Note, Dont 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);
static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[3])
@@ -255,8 +254,10 @@ static void drawmeta_stipple(int value)
static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1, float x2, float y2)
{
- /* Note, this used to use WHILE_SEQ, but it messes up the seq->depth value, (needed by transform when doing overlap checks)
- * so for now, just use the meta's immediate children, could be fixed but its only drawing - Campbell */
+ /* note: this used to use SEQ_BEGIN/SEQ_END, but it messes up the
+ * seq->depth value, (needed by transform when doing overlap checks)
+ * so for now, just use the meta's immediate children, could be fixed but
+ * its only drawing - campbell */
Sequence *seq;
unsigned char col[4];
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index a20ab260379..8575d0348ab 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h
index a0999c9a03b..4359e3a6652 100644
--- a/source/blender/editors/space_sequencer/sequencer_intern.h
+++ b/source/blender/editors/space_sequencer/sequencer_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c
index b53284136de..720081d946b 100644
--- a/source/blender/editors/space_sequencer/sequencer_ops.c
+++ b/source/blender/editors/space_sequencer/sequencer_ops.c
@@ -1,6 +1,5 @@
/*
- * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c
index b617d012237..8c189d96062 100644
--- a/source/blender/editors/space_sequencer/sequencer_scopes.c
+++ b/source/blender/editors/space_sequencer/sequencer_scopes.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 53a520a355d..d749371a636 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -1,5 +1,4 @@
/*
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 9468603be7f..bf268b0e304 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_sound/CMakeLists.txt b/source/blender/editors/space_sound/CMakeLists.txt
index 870065966cc..ae605760975 100644
--- a/source/blender/editors/space_sound/CMakeLists.txt
+++ b/source/blender/editors/space_sound/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_sound/sound_header.c b/source/blender/editors/space_sound/sound_header.c
index 2246eb310b5..6e2010c0c63 100644
--- a/source/blender/editors/space_sound/sound_header.c
+++ b/source/blender/editors/space_sound/sound_header.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_sound/sound_intern.h b/source/blender/editors/space_sound/sound_intern.h
index 05a67fac03c..88891ff4913 100644
--- a/source/blender/editors/space_sound/sound_intern.h
+++ b/source/blender/editors/space_sound/sound_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_sound/space_sound.c b/source/blender/editors/space_sound/space_sound.c
index 1879469d288..83d1b5b06c2 100644
--- a/source/blender/editors/space_sound/space_sound.c
+++ b/source/blender/editors/space_sound/space_sound.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_text/CMakeLists.txt b/source/blender/editors/space_text/CMakeLists.txt
index acf00d205a6..ead7de92c5c 100644
--- a/source/blender/editors/space_text/CMakeLists.txt
+++ b/source/blender/editors/space_text/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 51f4f1e579c..7e6af8ea789 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 10d355bd0c3..d59d947f0c8 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c
index 165cec238c0..b8e53f752e2 100644
--- a/source/blender/editors/space_text/text_header.c
+++ b/source/blender/editors/space_text/text_header.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -100,12 +98,12 @@ static ARegion *text_has_properties_region(ScrArea *sa)
return arnew;
}
-static int properties_poll(bContext *C)
+static int text_properties_poll(bContext *C)
{
return (CTX_wm_space_text(C) != NULL);
}
-static int properties_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_properties_exec(bContext *C, wmOperator *UNUSED(op))
{
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= text_has_properties_region(sa);
@@ -124,8 +122,8 @@ void TEXT_OT_properties(wmOperatorType *ot)
ot->idname= "TEXT_OT_properties";
/* api callbacks */
- ot->exec= properties_exec;
- ot->poll= properties_poll;
+ ot->exec= text_properties_exec;
+ ot->poll= text_properties_poll;
}
/******************** XXX popup menus *******************/
diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h
index b34c7815f35..565d531975b 100644
--- a/source/blender/editors/space_text/text_intern.h
+++ b/source/blender/editors/space_text/text_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 242bccd2376..e36cdd32ab8 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -155,7 +153,7 @@ void text_update_edited(Text *text)
/******************* new operator *********************/
-static int new_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_new_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceText *st= CTX_wm_space_text(C);
Text *text;
@@ -198,7 +196,7 @@ void TEXT_OT_new(wmOperatorType *ot)
/* api callbacks */
ot->invoke= WM_operator_confirm;
- ot->exec= new_exec;
+ ot->exec= text_new_exec;
ot->poll= text_new_poll;
/* flags */
@@ -207,7 +205,7 @@ void TEXT_OT_new(wmOperatorType *ot)
/******************* open operator *********************/
-static void open_init(bContext *C, wmOperator *op)
+static void text_open_init(bContext *C, wmOperator *op)
{
PropertyPointerRNA *pprop;
@@ -215,13 +213,13 @@ static void open_init(bContext *C, wmOperator *op)
uiIDContextProperty(C, &pprop->ptr, &pprop->prop);
}
-static int open_cancel(bContext *UNUSED(C), wmOperator *op)
+static int text_open_cancel(bContext *UNUSED(C), wmOperator *op)
{
MEM_freeN(op->customdata);
return OPERATOR_CANCELLED;
}
-static int open_exec(bContext *C, wmOperator *op)
+static int text_open_exec(bContext *C, wmOperator *op)
{
SpaceText *st= CTX_wm_space_text(C);
Text *text;
@@ -240,7 +238,7 @@ static int open_exec(bContext *C, wmOperator *op)
}
if(!op->customdata)
- open_init(C, op);
+ text_open_init(C, op);
/* hook into UI */
pprop= op->customdata;
@@ -274,15 +272,15 @@ static int open_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+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_property_is_set(op->ptr, "filepath"))
- return open_exec(C, op);
+ return text_open_exec(C, op);
- open_init(C, op);
+ text_open_init(C, op);
RNA_string_set(op->ptr, "filepath", path);
WM_event_add_fileselect(C, op);
@@ -297,9 +295,9 @@ void TEXT_OT_open(wmOperatorType *ot)
ot->description= "Open a new text data block";
/* api callbacks */
- ot->exec= open_exec;
- ot->invoke= open_invoke;
- ot->cancel= open_cancel;
+ ot->exec= text_open_exec;
+ ot->invoke= text_open_invoke;
+ ot->cancel= text_open_cancel;
ot->poll= text_new_poll;
/* flags */
@@ -312,7 +310,7 @@ void TEXT_OT_open(wmOperatorType *ot)
/******************* reload operator *********************/
-static int reload_exec(bContext *C, wmOperator *op)
+static int text_reload_exec(bContext *C, wmOperator *op)
{
Text *text= CTX_data_edit_text(C);
@@ -342,7 +340,7 @@ void TEXT_OT_reload(wmOperatorType *ot)
ot->description= "Reload active text data block from its file";
/* api callbacks */
- ot->exec= reload_exec;
+ ot->exec= text_reload_exec;
ot->invoke= WM_operator_confirm;
ot->poll= text_edit_poll;
}
@@ -355,7 +353,7 @@ static int text_unlink_poll(bContext *C)
return CTX_data_edit_text(C) != NULL;
}
-static int unlink_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_unlink_exec(bContext *C, wmOperator *UNUSED(op))
{
Main *bmain= CTX_data_main(C);
SpaceText *st= CTX_wm_space_text(C);
@@ -392,7 +390,7 @@ void TEXT_OT_unlink(wmOperatorType *ot)
ot->description= "Unlink active text data block";
/* api callbacks */
- ot->exec= unlink_exec;
+ ot->exec= text_unlink_exec;
ot->invoke= WM_operator_confirm;
ot->poll= text_unlink_poll;
@@ -402,7 +400,7 @@ void TEXT_OT_unlink(wmOperatorType *ot)
/******************* make internal operator *********************/
-static int make_internal_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_make_internal_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
@@ -427,7 +425,7 @@ void TEXT_OT_make_internal(wmOperatorType *ot)
ot->description= "Make active text file internal";
/* api callbacks */
- ot->exec= make_internal_exec;
+ ot->exec= text_make_internal_exec;
ot->poll= text_edit_poll;
/* flags */
@@ -436,7 +434,7 @@ void TEXT_OT_make_internal(wmOperatorType *ot)
/******************* save operator *********************/
-static int save_poll(bContext *C)
+static int text_save_poll(bContext *C)
{
Text *text= CTX_data_edit_text(C);
@@ -484,7 +482,7 @@ static void txt_write_file(Text *text, ReportList *reports)
text->flags ^= TXT_ISDIRTY;
}
-static int save_exec(bContext *C, wmOperator *op)
+static int text_save_exec(bContext *C, wmOperator *op)
{
Text *text= CTX_data_edit_text(C);
@@ -504,13 +502,13 @@ void TEXT_OT_save(wmOperatorType *ot)
ot->description= "Save active text data block";
/* api callbacks */
- ot->exec= save_exec;
- ot->poll= save_poll;
+ ot->exec= text_save_exec;
+ ot->poll= text_save_poll;
}
/******************* save as operator *********************/
-static int save_as_exec(bContext *C, wmOperator *op)
+static int text_save_as_exec(bContext *C, wmOperator *op)
{
Text *text= CTX_data_edit_text(C);
char str[FILE_MAX];
@@ -532,13 +530,13 @@ static int save_as_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int text_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
Text *text= CTX_data_edit_text(C);
char *str;
if(RNA_property_is_set(op->ptr, "filepath"))
- return save_as_exec(C, op);
+ return text_save_as_exec(C, op);
if(text->name)
str= text->name;
@@ -561,8 +559,8 @@ void TEXT_OT_save_as(wmOperatorType *ot)
ot->description= "Save active text file with options";
/* api callbacks */
- ot->exec= save_as_exec;
- ot->invoke= save_as_invoke;
+ ot->exec= text_save_as_exec;
+ ot->invoke= text_save_as_invoke;
ot->poll= text_edit_poll;
/* properties */
@@ -571,12 +569,12 @@ void TEXT_OT_save_as(wmOperatorType *ot)
/******************* run script operator *********************/
-static int run_script_poll(bContext *C)
+static int text_run_script_poll(bContext *C)
{
return (CTX_data_edit_text(C) != NULL);
}
-static int run_script(bContext *C, ReportList *reports)
+static int text_run_script(bContext *C, ReportList *reports)
{
#ifdef WITH_PYTHON
Text *text= CTX_data_edit_text(C);
@@ -610,7 +608,7 @@ static int run_script(bContext *C, ReportList *reports)
return OPERATOR_CANCELLED;
}
-static int run_script_exec(bContext *C, wmOperator *op)
+static int text_run_script_exec(bContext *C, wmOperator *op)
{
#ifndef WITH_PYTHON
(void)C; /* unused */
@@ -619,7 +617,7 @@ static int run_script_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
#else
- return run_script(C, op->reports);
+ return text_run_script(C, op->reports);
#endif
}
@@ -631,8 +629,8 @@ void TEXT_OT_run_script(wmOperatorType *ot)
ot->description= "Run active script";
/* api callbacks */
- ot->poll= run_script_poll;
- ot->exec= run_script_exec;
+ ot->poll= text_run_script_poll;
+ ot->exec= text_run_script_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -640,7 +638,7 @@ void TEXT_OT_run_script(wmOperatorType *ot)
/******************* refresh pyconstraints operator *********************/
-static int refresh_pyconstraints_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
+static int text_refresh_pyconstraints_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
{
#ifdef WITH_PYTHON
#if 0
@@ -691,7 +689,7 @@ void TEXT_OT_refresh_pyconstraints(wmOperatorType *ot)
ot->description= "Refresh all pyconstraints";
/* api callbacks */
- ot->exec= refresh_pyconstraints_exec;
+ ot->exec= text_refresh_pyconstraints_exec;
ot->poll= text_edit_poll;
}
@@ -779,7 +777,7 @@ static char *txt_copy_selected(Text *text)
return buf;
}
-static int paste_exec(bContext *C, wmOperator *op)
+static int text_paste_exec(bContext *C, wmOperator *op)
{
Text *text= CTX_data_edit_text(C);
char *buf;
@@ -802,7 +800,7 @@ static int paste_exec(bContext *C, wmOperator *op)
/* run the script while editing, evil but useful */
if(CTX_wm_space_text(C)->live_edit)
- run_script(C, NULL);
+ text_run_script(C, NULL);
return OPERATOR_FINISHED;
}
@@ -815,7 +813,7 @@ void TEXT_OT_paste(wmOperatorType *ot)
ot->description= "Paste text from clipboard";
/* api callbacks */
- ot->exec= paste_exec;
+ ot->exec= text_paste_exec;
ot->poll= text_edit_poll;
/* properties */
@@ -836,7 +834,7 @@ static void txt_copy_clipboard(Text *text)
}
}
-static int copy_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_copy_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
@@ -853,13 +851,13 @@ void TEXT_OT_copy(wmOperatorType *ot)
ot->description= "Copy selected text to clipboard";
/* api callbacks */
- ot->exec= copy_exec;
+ ot->exec= text_copy_exec;
ot->poll= text_edit_poll;
}
/******************* cut operator *********************/
-static int cut_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_cut_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
@@ -873,7 +871,7 @@ static int cut_exec(bContext *C, wmOperator *UNUSED(op))
/* run the script while editing, evil but useful */
if(CTX_wm_space_text(C)->live_edit)
- run_script(C, NULL);
+ text_run_script(C, NULL);
return OPERATOR_FINISHED;
}
@@ -886,13 +884,13 @@ void TEXT_OT_cut(wmOperatorType *ot)
ot->description= "Cut selected text to clipboard";
/* api callbacks */
- ot->exec= cut_exec;
+ ot->exec= text_cut_exec;
ot->poll= text_edit_poll;
}
/******************* indent operator *********************/
-static int indent_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_indent_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
@@ -921,13 +919,13 @@ void TEXT_OT_indent(wmOperatorType *ot)
ot->description= "Indent selected text";
/* api callbacks */
- ot->exec= indent_exec;
+ ot->exec= text_indent_exec;
ot->poll= text_edit_poll;
}
/******************* unindent operator *********************/
-static int unindent_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_unindent_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
@@ -956,13 +954,13 @@ void TEXT_OT_unindent(wmOperatorType *ot)
ot->description= "Unindent selected text";
/* api callbacks */
- ot->exec= unindent_exec;
+ ot->exec= text_unindent_exec;
ot->poll= text_edit_poll;
}
/******************* line break operator *********************/
-static int line_break_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_line_break_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceText *st= CTX_wm_space_text(C);
Text *text= CTX_data_edit_text(C);
@@ -1003,13 +1001,13 @@ void TEXT_OT_line_break(wmOperatorType *ot)
ot->description= "Insert line break at cursor position";
/* api callbacks */
- ot->exec= line_break_exec;
+ ot->exec= text_line_break_exec;
ot->poll= text_edit_poll;
}
/******************* comment operator *********************/
-static int comment_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_comment_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
@@ -1036,13 +1034,13 @@ void TEXT_OT_comment(wmOperatorType *ot)
ot->description= "Convert selected text to comment";
/* api callbacks */
- ot->exec= comment_exec;
+ ot->exec= text_comment_exec;
ot->poll= text_edit_poll;
}
/******************* uncomment operator *********************/
-static int uncomment_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_uncomment_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
@@ -1070,7 +1068,7 @@ void TEXT_OT_uncomment(wmOperatorType *ot)
ot->description= "Convert selected comment to text";
/* api callbacks */
- ot->exec= uncomment_exec;
+ ot->exec= text_uncomment_exec;
ot->poll= text_edit_poll;
}
@@ -1082,7 +1080,7 @@ static EnumPropertyItem whitespace_type_items[]= {
{TO_TABS, "TABS", 0, "To Tabs", NULL},
{0, NULL, 0, NULL, NULL}};
-static int convert_whitespace_exec(bContext *C, wmOperator *op)
+static int text_convert_whitespace_exec(bContext *C, wmOperator *op)
{
SpaceText *st= CTX_wm_space_text(C);
Text *text= CTX_data_edit_text(C);
@@ -1210,7 +1208,7 @@ void TEXT_OT_convert_whitespace(wmOperatorType *ot)
ot->description= "Convert whitespaces by type";
/* api callbacks */
- ot->exec= convert_whitespace_exec;
+ ot->exec= text_convert_whitespace_exec;
ot->poll= text_edit_poll;
/* properties */
@@ -1219,7 +1217,7 @@ void TEXT_OT_convert_whitespace(wmOperatorType *ot)
/******************* select all operator *********************/
-static int select_all_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_select_all_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
@@ -1239,13 +1237,13 @@ void TEXT_OT_select_all(wmOperatorType *ot)
ot->description= "Select all text";
/* api callbacks */
- ot->exec= select_all_exec;
+ ot->exec= text_select_all_exec;
ot->poll= text_edit_poll;
}
/******************* select line operator *********************/
-static int select_line_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_select_line_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
@@ -1265,13 +1263,13 @@ void TEXT_OT_select_line(wmOperatorType *ot)
ot->description= "Select text by line";
/* api callbacks */
- ot->exec= select_line_exec;
+ ot->exec= text_select_line_exec;
ot->poll= text_edit_poll;
}
/******************* select word operator *********************/
-static int select_word_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_select_word_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
@@ -1292,13 +1290,13 @@ void TEXT_OT_select_word(wmOperatorType *ot)
ot->description= "Select word under cursor";
/* api callbacks */
- ot->exec= select_word_exec;
+ ot->exec= text_select_word_exec;
ot->poll= text_edit_poll;
}
/******************* previous marker operator *********************/
-static int previous_marker_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_previous_marker_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
TextMarker *mrk;
@@ -1328,13 +1326,13 @@ void TEXT_OT_previous_marker(wmOperatorType *ot)
ot->description= "Move to previous marker";
/* api callbacks */
- ot->exec= previous_marker_exec;
+ ot->exec= text_previous_marker_exec;
ot->poll= text_edit_poll;
}
/******************* next marker operator *********************/
-static int next_marker_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_next_marker_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
TextMarker *mrk;
@@ -1364,13 +1362,13 @@ void TEXT_OT_next_marker(wmOperatorType *ot)
ot->description= "Move to next marker";
/* api callbacks */
- ot->exec= next_marker_exec;
+ ot->exec= text_next_marker_exec;
ot->poll= text_edit_poll;
}
/******************* clear all markers operator *********************/
-static int clear_all_markers_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_clear_all_markers_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text= CTX_data_edit_text(C);
@@ -1390,7 +1388,7 @@ void TEXT_OT_markers_clear(wmOperatorType *ot)
ot->description= "Clear all markers";
/* api callbacks */
- ot->exec= clear_all_markers_exec;
+ ot->exec= text_clear_all_markers_exec;
ot->poll= text_edit_poll;
}
@@ -1575,7 +1573,7 @@ static int cursor_skip_find_line(SpaceText* st, ARegion *ar,
return 1;
}
-static void wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
{
Text *text= st->text;
TextLine **linep;
@@ -1643,7 +1641,7 @@ static void wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, oldl, oldc, oldl, *charp);
}
-static void wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
{
Text *text= st->text;
TextLine **linep;
@@ -1707,7 +1705,7 @@ static void wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, oldl, oldc, oldl, *charp);
}
-static void wrap_move_up(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_up(SpaceText *st, ARegion *ar, short sel)
{
Text *text= st->text;
TextLine **linep;
@@ -1743,7 +1741,7 @@ static void wrap_move_up(SpaceText *st, ARegion *ar, short sel)
txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, oldl, oldc, newl, *charp);
}
-static void wrap_move_down(SpaceText *st, ARegion *ar, short sel)
+static void txt_wrap_move_down(SpaceText *st, ARegion *ar, short sel)
{
Text *text= st->text;
TextLine **linep;
@@ -1816,7 +1814,7 @@ static void cursor_skip(SpaceText* st, ARegion *ar, Text *text, int lines, int s
txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, oldl, oldc, txt_get_span(text->lines.first, *linep), *charp);
}
-static int move_cursor(bContext *C, int type, int select)
+static int text_move_cursor(bContext *C, int type, int select)
{
SpaceText *st= CTX_wm_space_text(C);
Text *text= CTX_data_edit_text(C);
@@ -1828,12 +1826,12 @@ static int move_cursor(bContext *C, int type, int select)
switch(type) {
case LINE_BEGIN:
- if(st && st->wordwrap && ar) 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) 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;
@@ -1862,12 +1860,12 @@ static int move_cursor(bContext *C, int type, int select)
break;
case PREV_LINE:
- if(st && st->wordwrap && ar) 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) 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;
@@ -1888,11 +1886,11 @@ static int move_cursor(bContext *C, int type, int select)
return OPERATOR_FINISHED;
}
-static int move_exec(bContext *C, wmOperator *op)
+static int text_move_exec(bContext *C, wmOperator *op)
{
int type= RNA_enum_get(op->ptr, "type");
- return move_cursor(C, type, 0);
+ return text_move_cursor(C, type, 0);
}
void TEXT_OT_move(wmOperatorType *ot)
@@ -1903,7 +1901,7 @@ void TEXT_OT_move(wmOperatorType *ot)
ot->description= "Move cursor to position type";
/* api callbacks */
- ot->exec= move_exec;
+ ot->exec= text_move_exec;
ot->poll= text_edit_poll;
/* properties */
@@ -1912,11 +1910,11 @@ void TEXT_OT_move(wmOperatorType *ot)
/******************* move select operator ********************/
-static int move_select_exec(bContext *C, wmOperator *op)
+static int text_move_select_exec(bContext *C, wmOperator *op)
{
int type= RNA_enum_get(op->ptr, "type");
- return move_cursor(C, type, 1);
+ return text_move_cursor(C, type, 1);
}
void TEXT_OT_move_select(wmOperatorType *ot)
@@ -1927,7 +1925,7 @@ void TEXT_OT_move_select(wmOperatorType *ot)
ot->description= "Make selection from current cursor position to new cursor position type";
/* api callbacks */
- ot->exec= move_select_exec;
+ ot->exec= text_move_select_exec;
ot->poll= text_space_edit_poll;
/* properties */
@@ -1936,7 +1934,7 @@ void TEXT_OT_move_select(wmOperatorType *ot)
/******************* jump operator *********************/
-static int jump_exec(bContext *C, wmOperator *op)
+static int text_jump_exec(bContext *C, wmOperator *op)
{
Text *text= CTX_data_edit_text(C);
int line= RNA_int_get(op->ptr, "line");
@@ -1955,7 +1953,7 @@ static int jump_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int jump_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int text_jump_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
return WM_operator_props_dialog_popup(C,op,200,100);
@@ -1969,8 +1967,8 @@ void TEXT_OT_jump(wmOperatorType *ot)
ot->description= "Jump cursor to line";
/* api callbacks */
- ot->invoke= jump_invoke;
- ot->exec= jump_exec;
+ ot->invoke= text_jump_invoke;
+ ot->exec= text_jump_exec;
ot->poll= text_edit_poll;
/* properties */
@@ -1986,7 +1984,7 @@ static EnumPropertyItem delete_type_items[]= {
{DEL_PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""},
{0, NULL, 0, NULL, NULL}};
-static int delete_exec(bContext *C, wmOperator *op)
+static int text_delete_exec(bContext *C, wmOperator *op)
{
Text *text= CTX_data_edit_text(C);
int type= RNA_enum_get(op->ptr, "type");
@@ -2009,7 +2007,7 @@ static int delete_exec(bContext *C, wmOperator *op)
/* run the script while editing, evil but useful */
if(CTX_wm_space_text(C)->live_edit)
- run_script(C, NULL);
+ text_run_script(C, NULL);
return OPERATOR_FINISHED;
}
@@ -2022,7 +2020,7 @@ void TEXT_OT_delete(wmOperatorType *ot)
ot->description= "Delete text by cursor position";
/* api callbacks */
- ot->exec= delete_exec;
+ ot->exec= text_delete_exec;
ot->poll= text_edit_poll;
/* properties */
@@ -2031,7 +2029,7 @@ void TEXT_OT_delete(wmOperatorType *ot)
/******************* toggle overwrite operator **********************/
-static int toggle_overwrite_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_toggle_overwrite_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceText *st= CTX_wm_space_text(C);
@@ -2050,14 +2048,14 @@ void TEXT_OT_overwrite_toggle(wmOperatorType *ot)
ot->description= "Toggle overwrite while typing";
/* api callbacks */
- ot->exec= toggle_overwrite_exec;
+ ot->exec= text_toggle_overwrite_exec;
ot->poll= text_space_edit_poll;
}
/******************* scroll operator **********************/
/* Moves the view vertically by the specified number of lines */
-static void screen_skip(SpaceText *st, ARegion *ar, int lines)
+static void txt_screen_skip(SpaceText *st, ARegion *ar, int lines)
{
int last;
@@ -2093,7 +2091,7 @@ static int text_scroll_poll(bContext *C)
return CTX_data_edit_text(C) != NULL;
}
-static int scroll_exec(bContext *C, wmOperator *op)
+static int text_scroll_exec(bContext *C, wmOperator *op)
{
SpaceText *st= CTX_wm_space_text(C);
ARegion *ar= CTX_wm_region(C);
@@ -2103,14 +2101,14 @@ static int scroll_exec(bContext *C, wmOperator *op)
if(lines == 0)
return OPERATOR_CANCELLED;
- screen_skip(st, ar, lines*U.wheellinescroll);
+ txt_screen_skip(st, ar, lines*U.wheellinescroll);
ED_area_tag_redraw(CTX_wm_area(C));
return OPERATOR_FINISHED;
}
-static void scroll_apply(bContext *C, wmOperator *op, wmEvent *event)
+static void text_scroll_apply(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceText *st= CTX_wm_space_text(C);
ARegion *ar= CTX_wm_region(C);
@@ -2142,7 +2140,7 @@ static void scroll_apply(bContext *C, wmOperator *op, wmEvent *event)
}
if(txtdelta[0] || txtdelta[1]) {
- screen_skip(st, ar, txtdelta[1]);
+ txt_screen_skip(st, ar, txtdelta[1]);
if(st->wordwrap) {
st->left= 0;
@@ -2167,7 +2165,7 @@ static void scroll_exit(bContext *C, wmOperator *op)
MEM_freeN(op->customdata);
}
-static int scroll_modal(bContext *C, wmOperator *op, wmEvent *event)
+static int text_scroll_modal(bContext *C, wmOperator *op, wmEvent *event)
{
TextScroll *tsc= op->customdata;
SpaceText *st= CTX_wm_space_text(C);
@@ -2176,7 +2174,7 @@ static int scroll_modal(bContext *C, wmOperator *op, wmEvent *event)
switch(event->type) {
case MOUSEMOVE:
if(tsc->zone == SCROLLHANDLE_BAR)
- scroll_apply(C, op, event);
+ text_scroll_apply(C, op, event);
break;
case LEFTMOUSE:
case RIGHTMOUSE:
@@ -2200,20 +2198,20 @@ static int scroll_modal(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
-static int scroll_cancel(bContext *C, wmOperator *op)
+static int text_scroll_cancel(bContext *C, wmOperator *op)
{
scroll_exit(C, op);
return OPERATOR_CANCELLED;
}
-static int scroll_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int text_scroll_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceText *st= CTX_wm_space_text(C);
TextScroll *tsc;
if(RNA_property_is_set(op->ptr, "lines"))
- return scroll_exec(C, op);
+ return text_scroll_exec(C, op);
tsc= MEM_callocN(sizeof(TextScroll), "TextScroll");
tsc->first= 1;
@@ -2226,13 +2224,13 @@ static int scroll_invoke(bContext *C, wmOperator *op, wmEvent *event)
text_update_character_width(st);
tsc->old[0] = event->x;
- tsc->old[1] = event->x;
+ tsc->old[1] = event->y;
/* Sensitivity of scroll set to 4pix per line/char */
tsc->delta[0] = (event->x - event->prevx)*st->cwidth/4;
tsc->delta[1] = (event->y - event->prevy)*st->lheight/4;
tsc->first = 0;
tsc->scrollbar = 0;
- scroll_apply(C, op, event);
+ text_scroll_apply(C, op, event);
scroll_exit(C, op);
return OPERATOR_FINISHED;
}
@@ -2253,10 +2251,10 @@ void TEXT_OT_scroll(wmOperatorType *ot)
ot->description= "Scroll text screen";
/* api callbacks */
- ot->exec= scroll_exec;
- ot->invoke= scroll_invoke;
- ot->modal= scroll_modal;
- ot->cancel= scroll_cancel;
+ 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 */
@@ -2284,7 +2282,7 @@ static int text_region_scroll_poll(bContext *C)
return 1;
}
-static int scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int text_scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceText *st= CTX_wm_space_text(C);
ARegion *ar= CTX_wm_region(C);
@@ -2293,7 +2291,7 @@ static int scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event)
int zone= -1;
if(RNA_property_is_set(op->ptr, "lines"))
- return scroll_exec(C, op);
+ return text_scroll_exec(C, op);
/* verify we are in the right zone */
if(mval[0]>st->txtbar.xmin && mval[0]<st->txtbar.xmax) {
@@ -2336,9 +2334,9 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot)
ot->description= "Scroll text screen";
/* api callbacks */
- ot->invoke= scroll_bar_invoke;
- ot->modal= scroll_modal;
- ot->cancel= scroll_cancel;
+ ot->invoke= text_scroll_bar_invoke;
+ ot->modal= text_scroll_modal;
+ ot->cancel= text_scroll_cancel;
ot->poll= text_region_scroll_poll;
/* flags */
@@ -2356,7 +2354,7 @@ typedef struct SetSelection {
short old[2];
} SetSelection;
-static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel)
+static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel)
{
FlattenString fs;
Text *text= st->text;
@@ -2516,7 +2514,7 @@ static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel)
if(!sel) txt_pop_sel(text);
}
-static void set_cursor_apply(bContext *C, wmOperator *op, wmEvent *event)
+static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceText *st= CTX_wm_space_text(C);
ARegion *ar= CTX_wm_region(C);
@@ -2524,9 +2522,9 @@ static void set_cursor_apply(bContext *C, wmOperator *op, wmEvent *event)
if(event->mval[1]<0 || event->mval[1]>ar->winy) {
int d= (ssel->old[1]-event->mval[1])*st->pix_per_line;
- if(d) screen_skip(st, ar, d);
+ if(d) txt_screen_skip(st, ar, d);
- set_cursor_to_pos(st, ar, event->mval[0], event->mval[1]<0?0:ar->winy, 1);
+ 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);
@@ -2535,14 +2533,14 @@ static void set_cursor_apply(bContext *C, wmOperator *op, wmEvent *event)
if(event->mval[0]>ar->winx) st->left++;
else if(event->mval[0]<0 && st->left>0) st->left--;
- set_cursor_to_pos(st, ar, event->mval[0], event->mval[1], 1);
+ text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1], 1);
text_update_cursor_moved(C);
WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text);
// XXX PIL_sleep_ms(10);
}
else {
- set_cursor_to_pos(st, ar, event->mval[0], event->mval[1], 1);
+ text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1], 1);
text_update_cursor_moved(C);
WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text);
@@ -2552,7 +2550,7 @@ static void set_cursor_apply(bContext *C, wmOperator *op, wmEvent *event)
}
}
-static void set_cursor_exit(bContext *C, wmOperator *op)
+static void text_cursor_set_exit(bContext *C, wmOperator *op)
{
SpaceText *st= CTX_wm_space_text(C);
Text *text= st->text;
@@ -2578,7 +2576,7 @@ static void set_cursor_exit(bContext *C, wmOperator *op)
MEM_freeN(ssel);
}
-static int set_selection_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int text_set_selection_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceText *st= CTX_wm_space_text(C);
SetSelection *ssel;
@@ -2598,30 +2596,30 @@ static int set_selection_invoke(bContext *C, wmOperator *op, wmEvent *event)
WM_event_add_modal_handler(C, op);
- set_cursor_apply(C, op, event);
+ text_cursor_set_apply(C, op, event);
return OPERATOR_RUNNING_MODAL;
}
-static int set_selection_modal(bContext *C, wmOperator *op, wmEvent *event)
+static int text_set_selection_modal(bContext *C, wmOperator *op, wmEvent *event)
{
switch(event->type) {
case LEFTMOUSE:
case MIDDLEMOUSE:
case RIGHTMOUSE:
- set_cursor_exit(C, op);
+ text_cursor_set_exit(C, op);
return OPERATOR_FINISHED;
case MOUSEMOVE:
- set_cursor_apply(C, op, event);
+ text_cursor_set_apply(C, op, event);
break;
}
return OPERATOR_RUNNING_MODAL;
}
-static int set_selection_cancel(bContext *C, wmOperator *op)
+static int text_set_selection_cancel(bContext *C, wmOperator *op)
{
- set_cursor_exit(C, op);
+ text_cursor_set_exit(C, op);
return OPERATOR_FINISHED;
}
@@ -2633,9 +2631,9 @@ void TEXT_OT_selection_set(wmOperatorType *ot)
ot->description= "Set cursor selection";
/* api callbacks */
- ot->invoke= set_selection_invoke;
- ot->modal= set_selection_modal;
- ot->cancel= set_selection_cancel;
+ 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 */
@@ -2644,7 +2642,7 @@ void TEXT_OT_selection_set(wmOperatorType *ot)
/******************* set cursor operator **********************/
-static int set_cursor_exec(bContext *C, wmOperator *op)
+static int text_cursor_set_exec(bContext *C, wmOperator *op)
{
SpaceText *st= CTX_wm_space_text(C);
Text *text= st->text;
@@ -2656,7 +2654,7 @@ static int set_cursor_exec(bContext *C, wmOperator *op)
oldl= txt_get_span(text->lines.first, text->curl);
oldc= text->curc;
- set_cursor_to_pos(st, ar, x, y, 0);
+ text_cursor_set_to_pos(st, ar, x, y, 0);
txt_undo_add_toop(text, UNDO_CTO, oldl, oldc, txt_get_span(text->lines.first, text->curl), text->curc);
@@ -2666,7 +2664,7 @@ static int set_cursor_exec(bContext *C, wmOperator *op)
return OPERATOR_PASS_THROUGH;
}
-static int set_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int text_cursor_set_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceText *st= CTX_wm_space_text(C);
@@ -2676,7 +2674,7 @@ static int set_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event)
RNA_int_set(op->ptr, "x", event->mval[0]);
RNA_int_set(op->ptr, "y", event->mval[1]);
- return set_cursor_exec(C, op);
+ return text_cursor_set_exec(C, op);
}
void TEXT_OT_cursor_set(wmOperatorType *ot)
@@ -2687,8 +2685,8 @@ void TEXT_OT_cursor_set(wmOperatorType *ot)
ot->description= "Set cursor position";
/* api callbacks */
- ot->invoke= set_cursor_invoke;
- ot->exec= set_cursor_exec;
+ ot->invoke= text_cursor_set_invoke;
+ ot->exec= text_cursor_set_exec;
ot->poll= text_region_edit_poll;
/* properties */
@@ -2698,7 +2696,7 @@ void TEXT_OT_cursor_set(wmOperatorType *ot)
/******************* line number operator **********************/
-static int line_number_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
+static int text_line_number_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
SpaceText *st= CTX_wm_space_text(C);
Text *text= CTX_data_edit_text(C);
@@ -2743,13 +2741,13 @@ void TEXT_OT_line_number(wmOperatorType *ot)
ot->description= "The current line number";
/* api callbacks */
- ot->invoke= line_number_invoke;
+ ot->invoke= text_line_number_invoke;
ot->poll= text_region_edit_poll;
}
/******************* insert operator **********************/
-static int insert_exec(bContext *C, wmOperator *op)
+static int text_insert_exec(bContext *C, wmOperator *op)
{
SpaceText *st= CTX_wm_space_text(C);
Text *text= CTX_data_edit_text(C);
@@ -2783,7 +2781,7 @@ static int insert_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int text_insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
int ret;
@@ -2801,11 +2799,11 @@ static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
}
- ret = insert_exec(C, op);
+ 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)
- run_script(C, NULL);
+ text_run_script(C, NULL);
return ret;
}
@@ -2818,8 +2816,8 @@ void TEXT_OT_insert(wmOperatorType *ot)
ot->description= "Insert text at cursor position";
/* api callbacks */
- ot->exec= insert_exec;
- ot->invoke= insert_invoke;
+ ot->exec= text_insert_exec;
+ ot->invoke= text_insert_invoke;
ot->poll= text_edit_poll;
/* properties */
@@ -2833,7 +2831,7 @@ void TEXT_OT_insert(wmOperatorType *ot)
#define TEXT_REPLACE 1
#define TEXT_MARK_ALL 2
-static int find_and_replace(bContext *C, wmOperator *op, short mode)
+static int text_find_and_replace(bContext *C, wmOperator *op, short mode)
{
Main *bmain= CTX_data_main(C);
SpaceText *st= CTX_wm_space_text(C);
@@ -2924,9 +2922,9 @@ static int find_and_replace(bContext *C, wmOperator *op, short mode)
return OPERATOR_FINISHED;
}
-static int find_exec(bContext *C, wmOperator *op)
+static int text_find_exec(bContext *C, wmOperator *op)
{
- return find_and_replace(C, op, TEXT_FIND);
+ return text_find_and_replace(C, op, TEXT_FIND);
}
void TEXT_OT_find(wmOperatorType *ot)
@@ -2937,15 +2935,15 @@ void TEXT_OT_find(wmOperatorType *ot)
ot->description= "Find specified text";
/* api callbacks */
- ot->exec= find_exec;
+ ot->exec= text_find_exec;
ot->poll= text_space_edit_poll;
}
/******************* replace operator *********************/
-static int replace_exec(bContext *C, wmOperator *op)
+static int text_replace_exec(bContext *C, wmOperator *op)
{
- return find_and_replace(C, op, TEXT_REPLACE);
+ return text_find_and_replace(C, op, TEXT_REPLACE);
}
void TEXT_OT_replace(wmOperatorType *ot)
@@ -2956,15 +2954,15 @@ void TEXT_OT_replace(wmOperatorType *ot)
ot->description= "Replace text with the specified text";
/* api callbacks */
- ot->exec= replace_exec;
+ ot->exec= text_replace_exec;
ot->poll= text_space_edit_poll;
}
/******************* mark all operator *********************/
-static int mark_all_exec(bContext *C, wmOperator *op)
+static int text_mark_all_exec(bContext *C, wmOperator *op)
{
- return find_and_replace(C, op, TEXT_MARK_ALL);
+ return text_find_and_replace(C, op, TEXT_MARK_ALL);
}
void TEXT_OT_mark_all(wmOperatorType *ot)
@@ -2975,13 +2973,13 @@ void TEXT_OT_mark_all(wmOperatorType *ot)
ot->description= "Mark all specified text";
/* api callbacks */
- ot->exec= mark_all_exec;
+ ot->exec= text_mark_all_exec;
ot->poll= text_space_edit_poll;
}
/******************* find set selected *********************/
-static int find_set_selected_exec(bContext *C, wmOperator *op)
+static int text_find_set_selected_exec(bContext *C, wmOperator *op)
{
SpaceText *st= CTX_wm_space_text(C);
Text *text= CTX_data_edit_text(C);
@@ -2994,7 +2992,7 @@ static int find_set_selected_exec(bContext *C, wmOperator *op)
if(!st->findstr[0])
return OPERATOR_FINISHED;
- return find_and_replace(C, op, TEXT_FIND);
+ return text_find_and_replace(C, op, TEXT_FIND);
}
void TEXT_OT_find_set_selected(wmOperatorType *ot)
@@ -3005,13 +3003,13 @@ void TEXT_OT_find_set_selected(wmOperatorType *ot)
ot->description= "Find specified text and set as selected";
/* api callbacks */
- ot->exec= find_set_selected_exec;
+ ot->exec= text_find_set_selected_exec;
ot->poll= text_space_edit_poll;
}
/******************* replace set selected *********************/
-static int replace_set_selected_exec(bContext *C, wmOperator *UNUSED(op))
+static int text_replace_set_selected_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceText *st= CTX_wm_space_text(C);
Text *text= CTX_data_edit_text(C);
@@ -3032,7 +3030,7 @@ void TEXT_OT_replace_set_selected(wmOperatorType *ot)
ot->description= "Replace text with specified text and set as selected";
/* api callbacks */
- ot->exec= replace_set_selected_exec;
+ ot->exec= text_replace_set_selected_exec;
ot->poll= text_space_edit_poll;
}
@@ -3101,18 +3099,18 @@ static void text_ignore_modified(Text *text)
text->mtime= st.st_mtime;
}
-static int resolve_conflict_exec(bContext *C, wmOperator *op)
+static int text_resolve_conflict_exec(bContext *C, wmOperator *op)
{
Text *text= CTX_data_edit_text(C);
int resolution= RNA_enum_get(op->ptr, "resolution");
switch(resolution) {
case RESOLVE_RELOAD:
- return reload_exec(C, op);
+ return text_reload_exec(C, op);
case RESOLVE_SAVE:
- return save_exec(C, op);
+ return text_save_exec(C, op);
case RESOLVE_MAKE_INTERNAL:
- return make_internal_exec(C, op);
+ return text_make_internal_exec(C, op);
case RESOLVE_IGNORE:
text_ignore_modified(text);
return OPERATOR_FINISHED;
@@ -3121,7 +3119,7 @@ static int resolve_conflict_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
-static int resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
Text *text= CTX_data_edit_text(C);
uiPopupMenu *pup;
@@ -3167,9 +3165,9 @@ void TEXT_OT_resolve_conflict(wmOperatorType *ot)
ot->description= "When external text is out of sync, resolve the conflict";
/* api callbacks */
- ot->exec= resolve_conflict_exec;
- ot->invoke= resolve_conflict_invoke;
- ot->poll= 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");
@@ -3177,7 +3175,7 @@ void TEXT_OT_resolve_conflict(wmOperatorType *ot)
/********************** to 3d object operator *****************/
-static int to_3d_object_exec(bContext *C, wmOperator *op)
+static int text_to_3d_object_exec(bContext *C, wmOperator *op)
{
Text *text= CTX_data_edit_text(C);
int split_lines= RNA_boolean_get(op->ptr, "split_lines");
@@ -3195,7 +3193,7 @@ void TEXT_OT_to_3d_object(wmOperatorType *ot)
ot->description= "Create 3d text object from active text data block";
/* api callbacks */
- ot->exec= to_3d_object_exec;
+ ot->exec= text_to_3d_object_exec;
ot->poll= text_edit_poll;
/* flags */
diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c
index 08008f455e6..efe744696df 100644
--- a/source/blender/editors/space_text/text_python.c
+++ b/source/blender/editors/space_text/text_python.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_time/CMakeLists.txt b/source/blender/editors/space_time/CMakeLists.txt
index 758d1e629f9..6e51d7829f6 100644
--- a/source/blender/editors/space_time/CMakeLists.txt
+++ b/source/blender/editors/space_time/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_userpref/CMakeLists.txt b/source/blender/editors/space_userpref/CMakeLists.txt
index 43ac90dce94..2ff683a007c 100644
--- a/source/blender/editors/space_userpref/CMakeLists.txt
+++ b/source/blender/editors/space_userpref/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_userpref/space_userpref.c b/source/blender/editors/space_userpref/space_userpref.c
index 248b65e4e9c..e9bf9345b5c 100644
--- a/source/blender/editors/space_userpref/space_userpref.c
+++ b/source/blender/editors/space_userpref/space_userpref.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_userpref/userpref_intern.h b/source/blender/editors/space_userpref/userpref_intern.h
index 66f394af0e4..fc6d218b20c 100644
--- a/source/blender/editors/space_userpref/userpref_intern.h
+++ b/source/blender/editors/space_userpref/userpref_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_userpref/userpref_ops.c b/source/blender/editors/space_userpref/userpref_ops.c
index 0f0cbc0ee3f..8dd6c3c0271 100644
--- a/source/blender/editors/space_userpref/userpref_ops.c
+++ b/source/blender/editors/space_userpref/userpref_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_view3d/CMakeLists.txt b/source/blender/editors/space_view3d/CMakeLists.txt
index c6e936606c8..f1ef35936fa 100644
--- a/source/blender/editors/space_view3d/CMakeLists.txt
+++ b/source/blender/editors/space_view3d/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c
index 4a51cb3be09..30042433ef2 100644
--- a/source/blender/editors/space_view3d/drawanimviz.c
+++ b/source/blender/editors/space_view3d/drawanimviz.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index eed86467eaa..a7bb1fb3ee6 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 63b7d0b4353..0a332875cae 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -55,7 +53,6 @@
#include "BKE_paint.h"
#include "BKE_property.h"
-
#include "BIF_gl.h"
#include "BIF_glutil.h"
@@ -227,7 +224,7 @@ static int set_draw_settings_cached(int clearcache, MTFace *texface, Material *m
static int c_lit;
Object *litob = NULL; //to get mode to turn off mipmap in painting mode
- int backculled = 0;
+ int backculled = GEMAT_BACKCULL;
int alphablend = 0;
int textured = 0;
int lit = 0;
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 2c6c4572948..036223ce577 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index e87ace19edb..7c89ce0f689 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index c46b6b6d70b..f868cda485f 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 0ad36657196..63b0f68f158 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -615,9 +613,9 @@ static void editvert_mirror_update(Object *ob, EditVert *eve, int def_nr, int in
if(dvert_dst) {
if(def_nr == -1) {
/* all vgroups, add groups where neded */
-
- int *flip_map= defgroup_flip_map(ob, 1);
- defvert_sync_mapped(dvert_dst, dvert_src, flip_map, 1);
+ int flip_map_len;
+ int *flip_map= defgroup_flip_map(ob, &flip_map_len, TRUE);
+ defvert_sync_mapped(dvert_dst, dvert_src, flip_map, flip_map_len, TRUE);
MEM_freeN(flip_map);
}
else {
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index ba9faf7682e..20b1df6ef2c 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -1917,7 +1915,7 @@ void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d)
v3d->zbuf= TRUE;
glEnable(GL_DEPTH_TEST);
- draw_gpencil_view3d_ext(scene, v3d, ar, 1);
+ draw_gpencil_view3d(scene, v3d, ar, 1);
v3d->zbuf= zbuf;
@@ -2151,6 +2149,7 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d)
CustomDataMask ED_view3d_datamask(Scene *scene, View3D *v3d)
{
CustomDataMask mask= 0;
+
if((v3d->drawtype == OB_TEXTURE) || ((v3d->drawtype == OB_SOLID) && (v3d->flag2 & V3D_SOLID_TEX))) {
mask |= CD_MASK_MTFACE | CD_MASK_MCOL;
@@ -2331,7 +2330,7 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx,
/* must be before xray draw which clears the depth buffer */
if(v3d->zbuf) glDisable(GL_DEPTH_TEST);
- draw_gpencil_view3d_ext(scene, v3d, ar, 1);
+ draw_gpencil_view3d(scene, v3d, ar, 1);
if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
/* transp and X-ray afterdraw stuff */
@@ -2352,7 +2351,7 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx,
ED_region_pixelspace(ar);
/* draw grease-pencil stuff - needed to get paint-buffer shown too (since it's 2D) */
- draw_gpencil_view3d_ext(scene, v3d, ar, 0);
+ draw_gpencil_view3d(scene, v3d, ar, 0);
/* freeing the images again here could be done after the operator runs, leaving for now */
GPU_free_images_anim();
@@ -2513,16 +2512,14 @@ static void draw_viewport_fps(Scene *scene, ARegion *ar)
}
/* warning: this function has duplicate drawing in ED_view3d_draw_offscreen() */
-void view3d_main_area_draw(const bContext *C, ARegion *ar)
+static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const char **grid_unit)
{
Scene *scene= CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d= CTX_wm_region_view3d(C);
Base *base;
- Object *ob;
float backcol[3];
unsigned int lay_used;
- const char *grid_unit= NULL;
/* shadow buffers, before we setup matrices */
if(draw_glsl_material(scene, NULL, v3d, v3d->drawtype))
@@ -2572,7 +2569,7 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
if((rv3d->view == RV3D_VIEW_USER) || (rv3d->persp != RV3D_ORTHO)) {
if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
- drawfloor(scene, v3d, &grid_unit);
+ drawfloor(scene, v3d, grid_unit);
}
if(rv3d->persp==RV3D_CAMOB) {
if(scene->world) {
@@ -2589,7 +2586,7 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
else {
if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
ED_region_pixelspace(ar);
- drawgrid(&scene->unit, ar, v3d, &grid_unit);
+ drawgrid(&scene->unit, ar, v3d, grid_unit);
/* XXX make function? replaces persp(1) */
glMatrixMode(GL_PROJECTION);
glLoadMatrixf(rv3d->winmat);
@@ -2664,7 +2661,7 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
/* must be before xray draw which clears the depth buffer */
if(v3d->zbuf) glDisable(GL_DEPTH_TEST);
- draw_gpencil_view3d((bContext *)C, 1);
+ draw_gpencil_view3d(scene, v3d, ar, 1);
if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
}
@@ -2697,13 +2694,16 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
// TODO: draw something else (but not this) during fly mode
draw_rotation_guide(rv3d);
- ED_region_pixelspace(ar);
-
-// retopo_paint_view_update(v3d);
-// retopo_draw_paint_lines();
-
- /* Draw particle edit brush XXX (removed) */
-
+}
+
+static void view3d_main_area_draw_info(const bContext *C, ARegion *ar, const char *grid_unit)
+{
+ Scene *scene= CTX_data_scene(C);
+ View3D *v3d = CTX_wm_view3d(C);
+ RegionView3D *rv3d= CTX_wm_region_view3d(C);
+ bScreen *screen= CTX_wm_screen(C);
+
+ Object *ob;
if(rv3d->persp==RV3D_CAMOB)
drawviewborder(scene, ar, v3d);
@@ -2711,7 +2711,7 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
/* draw grease-pencil stuff - needed to get paint-buffer shown too (since it's 2D) */
// if (v3d->flag2 & V3D_DISPGP)
- draw_gpencil_view3d((bContext *)C, 0);
+ draw_gpencil_view3d(scene, v3d, ar, 0);
drawcursor(scene, ar, v3d);
}
@@ -2721,7 +2721,7 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
else
draw_view_icon(rv3d);
- if((U.uiflag & USER_SHOW_FPS) && (CTX_wm_screen(C)->animtimer)) {
+ if((U.uiflag & USER_SHOW_FPS) && screen->animtimer) {
draw_viewport_fps(scene, ar);
}
else if(U.uiflag & USER_SHOW_VIEWPORTNAME) {
@@ -2741,8 +2741,18 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
ob= OBACT;
if(U.uiflag & USER_DRAWVIEWINFO)
draw_selected_name(scene, ob);
+}
+
+void view3d_main_area_draw(const bContext *C, ARegion *ar)
+{
+ View3D *v3d = CTX_wm_view3d(C);
+ const char *grid_unit= NULL;
+
+ view3d_main_area_draw_objects(C, ar, &grid_unit);
+
+ ED_region_pixelspace(ar);
- /* XXX here was the blockhandlers for floating panels */
+ view3d_main_area_draw_info(C, ar, grid_unit);
v3d->flag |= V3D_INVALID_BACKBUF;
}
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 115b3756029..99f11554aa6 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index b66440738b2..e9db9fe1d7e 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -699,11 +697,11 @@ static void move_camera(bContext* C, RegionView3D* rv3d, FlyInfo* fly, int orien
* TODO: need to check in future that frame changed before doing this
*/
if (orientationChanged) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Rotation");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_ROTATION_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA);
}
if (positionChanged) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Location");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOCATION_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA);
}
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 55f49654f32..fa6611b9925 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index 8f322047283..78af6a823ab 100644
--- a/source/blender/editors/space_view3d/view3d_intern.h
+++ b/source/blender/editors/space_view3d/view3d_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index 8416b37fd5e..6e26fb15873 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -163,17 +161,6 @@ void view3d_keymap(wmKeyConfig *keyconf)
RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", HOMEKEY, KM_PRESS, 0, 0)->ptr, "center", 0); /* only without camera view */
RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", CKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "center", 1);
- /* 3D mouse */
- WM_keymap_add_item(keymap, "VIEW3D_OT_ndof_orbit", NDOF_MOTION, 0, 0, 0);
- WM_keymap_add_item(keymap, "VIEW3D_OT_ndof_pan", NDOF_MOTION, 0, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "VIEW3D_OT_view_selected", NDOF_BUTTON_FIT, KM_PRESS, 0, 0);
- RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_FRONT, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_FRONT);
- RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_BACK, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_BACK);
- RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_LEFT, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_LEFT);
- RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_RIGHT, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_RIGHT);
- RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_TOP, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_TOP);
- RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_BOTTOM, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_BOTTOM);
-
/* numpad view hotkeys*/
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD0, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_CAMERA);
RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_FRONT);
@@ -222,6 +209,17 @@ void view3d_keymap(wmKeyConfig *keyconf)
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);
+
+ /* 3D mouse */
+ WM_keymap_add_item(keymap, "VIEW3D_OT_ndof_orbit", NDOF_MOTION, 0, 0, 0);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_ndof_pan", NDOF_MOTION, 0, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_view_selected", NDOF_BUTTON_FIT, KM_PRESS, 0, 0);
+ RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_FRONT, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_FRONT);
+ RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_BACK, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_BACK);
+ RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_LEFT, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_LEFT);
+ RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_RIGHT, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_RIGHT);
+ RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_TOP, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_TOP);
+ 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);
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 4f5e98a24ce..94d3469dc8c 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index fa3007d2fb7..1b726cd90b3 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -170,11 +168,11 @@ static void special_transvert_update(Object *obedit)
if ((ebo->flag & BONE_CONNECTED) && ebo->parent){
/* If this bone has a parent tip that has been moved */
if (ebo->parent->flag & BONE_TIPSEL){
- VECCOPY (ebo->head, ebo->parent->tail);
+ copy_v3_v3(ebo->head, ebo->parent->tail);
}
/* If this bone has a parent tip that has NOT been moved */
else{
- VECCOPY (ebo->parent->tail, ebo->head);
+ copy_v3_v3(ebo->parent->tail, ebo->head);
}
}
}
@@ -252,7 +250,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
for(eve= em->verts.first; eve; eve= eve->next) {
if(eve->f1) {
- VECCOPY(tv->oldloc, eve->co);
+ copy_v3_v3(tv->oldloc, eve->co);
tv->loc= eve->co;
if(eve->no[0] != 0.0f || eve->no[1] != 0.0f ||eve->no[2] != 0.0f)
tv->nor= eve->no; // note this is a hackish signal (ton)
@@ -282,7 +280,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
* location as heads.
*/
if (rootok) {
- VECCOPY (tv->oldloc, ebo->head);
+ copy_v3_v3(tv->oldloc, ebo->head);
tv->loc= ebo->head;
tv->nor= NULL;
tv->flag= 1;
@@ -291,7 +289,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
}
if ((mode & TM_ALL_JOINTS) && (tipsel)) {
- VECCOPY (tv->oldloc, ebo->tail);
+ copy_v3_v3(tv->oldloc, ebo->tail);
tv->loc= ebo->tail;
tv->nor= NULL;
tv->flag= 1;
@@ -300,7 +298,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
}
}
else if (tipsel) {
- VECCOPY (tv->oldloc, ebo->tail);
+ copy_v3_v3(tv->oldloc, ebo->tail);
tv->loc= ebo->tail;
tv->nor= NULL;
tv->flag= 1;
@@ -335,14 +333,14 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
skip_handle= mode & TM_SKIP_HANDLES;
if((bezt->f1 & SELECT) && !skip_handle) {
- VECCOPY(tv->oldloc, bezt->vec[0]);
+ copy_v3_v3(tv->oldloc, bezt->vec[0]);
tv->loc= bezt->vec[0];
tv->flag= bezt->f1 & SELECT;
tv++;
tottrans++;
}
if(bezt->f2 & SELECT) {
- VECCOPY(tv->oldloc, bezt->vec[1]);
+ copy_v3_v3(tv->oldloc, bezt->vec[1]);
tv->loc= bezt->vec[1];
tv->val= &(bezt->alfa);
tv->oldval= bezt->alfa;
@@ -351,7 +349,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
tottrans++;
}
if((bezt->f3 & SELECT) && !skip_handle) {
- VECCOPY(tv->oldloc, bezt->vec[2]);
+ copy_v3_v3(tv->oldloc, bezt->vec[2]);
tv->loc= bezt->vec[2];
tv->flag= bezt->f3 & SELECT;
tv++;
@@ -367,7 +365,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
while(a--) {
if(bp->hide==0) {
if(bp->f1 & SELECT) {
- VECCOPY(tv->oldloc, bp->vec);
+ copy_v3_v3(tv->oldloc, bp->vec);
tv->loc= bp->vec;
tv->val= &(bp->alfa);
tv->oldval= bp->alfa;
@@ -476,7 +474,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
tv= transvmain;
for(a=0; a<tottrans; a++, tv++) {
- VECCOPY(vec, tv->loc);
+ copy_v3_v3(vec, tv->loc);
mul_m3_v3(bmat, vec);
add_v3_v3(vec, obedit->obmat[3]);
vec[0]= gridf*floorf(0.5f+ vec[0]/gridf);
@@ -485,7 +483,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
sub_v3_v3(vec, obedit->obmat[3]);
mul_m3_v3(imat, vec);
- VECCOPY(tv->loc, vec);
+ copy_v3_v3(tv->loc, vec);
}
special_transvert_update(obedit);
@@ -495,7 +493,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
}
else {
- struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "Location");
+ struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID);
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
if(ob->mode & OB_MODE_POSE) {
@@ -509,7 +507,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
float vecN[3], nLoc[3];
/* get nearest grid point to snap to */
- VECCOPY(nLoc, pchan->pose_mat[3]);
+ copy_v3_v3(nLoc, pchan->pose_mat[3]);
vec[0]= gridf * (float)(floor(0.5f+ nLoc[0]/gridf));
vec[1]= gridf * (float)(floor(0.5f+ nLoc[1]/gridf));
vec[2]= gridf * (float)(floor(0.5f+ nLoc[2]/gridf));
@@ -625,7 +623,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
}
else {
- struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "Location");
+ struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID);
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
if(ob->mode & OB_MODE_POSE) {
@@ -634,7 +632,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
float cursp[3];
invert_m4_m4(ob->imat, ob->obmat);
- VECCOPY(cursp, curs);
+ copy_v3_v3(cursp, curs);
mul_m4_v3(ob->imat, cursp);
for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) {
@@ -781,7 +779,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
tv= transvmain;
for(a=0; a<tottrans; a++, tv++) {
- VECCOPY(vec, tv->loc);
+ copy_v3_v3(vec, tv->loc);
mul_m3_v3(bmat, vec);
add_v3_v3(vec, obedit->obmat[3]);
add_v3_v3(centroid, vec);
@@ -790,7 +788,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
if(v3d->around==V3D_CENTROID) {
mul_v3_fl(centroid, 1.0f/(float)tottrans);
- VECCOPY(curs, centroid);
+ copy_v3_v3(curs, centroid);
}
else {
mid_v3_v3v3(curs, min, max);
@@ -807,7 +805,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
for (pchan = obact->pose->chanbase.first; pchan; pchan=pchan->next) {
if(arm->layer & pchan->bone->layer) {
if(pchan->bone->flag & BONE_SELECTED) {
- VECCOPY(vec, pchan->pose_head);
+ copy_v3_v3(vec, pchan->pose_head);
mul_m4_v3(obact->obmat, vec);
add_v3_v3(centroid, vec);
DO_MINMAX(vec, min, max);
@@ -818,7 +816,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
}
else {
CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
- VECCOPY(vec, ob->obmat[3]);
+ copy_v3_v3(vec, ob->obmat[3]);
add_v3_v3(centroid, vec);
DO_MINMAX(vec, min, max);
count++;
@@ -828,7 +826,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
if(count) {
if(v3d->around==V3D_CENTROID) {
mul_v3_fl(centroid, 1.0f/(float)count);
- VECCOPY(curs, centroid);
+ copy_v3_v3(curs, centroid);
}
else {
mid_v3_v3v3(curs, min, max);
@@ -883,7 +881,7 @@ static int snap_curs_to_active(bContext *C, wmOperator *UNUSED(op))
}
else {
if (obact) {
- VECCOPY(curs, obact->obmat[3]);
+ copy_v3_v3(curs, obact->obmat[3]);
}
}
@@ -960,7 +958,7 @@ int minmax_verts(Object *obedit, float *min, float *max)
tv= transvmain;
for(a=0; a<tottrans; a++, tv++) {
- VECCOPY(vec, tv->loc);
+ copy_v3_v3(vec, tv->loc);
mul_m3_v3(bmat, vec);
add_v3_v3(vec, obedit->obmat[3]);
add_v3_v3(centroid, vec);
diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c
index 58058722a82..5d65202d7df 100644
--- a/source/blender/editors/space_view3d/view3d_toolbar.c
+++ b/source/blender/editors/space_view3d/view3d_toolbar.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index bec1206a983..93c577619de 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/transform/CMakeLists.txt b/source/blender/editors/transform/CMakeLists.txt
index c4305ed6a9f..a659afbbada 100644
--- a/source/blender/editors/transform/CMakeLists.txt
+++ b/source/blender/editors/transform/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index e3eb14e2fe6..9c1d5adcd1b 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -1692,8 +1690,8 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
values[0]= RNA_float_get(op->ptr, "value");
}
- QUATCOPY(t->values, values);
- QUATCOPY(t->auto_values, values);
+ copy_v4_v4(t->values, values);
+ copy_v4_v4(t->auto_values, values);
t->flag |= T_AUTOVALUES;
}
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index 7fccbcb0097..77e7cfb4d12 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index a06de9fa1ce..bfb96149ed3 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 879dc425091..6de854ff6c9 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -557,7 +555,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
td->ext->rotAngle= NULL;
td->ext->quat= pchan->quat;
- QUATCOPY(td->ext->iquat, pchan->quat);
+ copy_qt_qt(td->ext->iquat, pchan->quat);
}
td->ext->rotOrder= pchan->rotmode;
@@ -1307,7 +1305,7 @@ static void createTransMBallVerts(TransInfo *t)
/* quat is used for rotation of MetaElem */
tx->quat = ml->quat;
- QUATCOPY(tx->iquat, ml->quat);
+ copy_qt_qt(tx->iquat, ml->quat);
tx->rot = NULL;
@@ -4301,8 +4299,8 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
td->ext->rotAngle= NULL;
td->ext->quat= ob->quat;
- QUATCOPY(td->ext->iquat, ob->quat);
- QUATCOPY(td->ext->dquat, ob->dquat);
+ copy_qt_qt(td->ext->iquat, ob->quat);
+ copy_qt_qt(td->ext->dquat, ob->dquat);
}
td->ext->rotOrder=ob->rotmode;
@@ -4582,21 +4580,21 @@ void autokeyframe_ob_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *ob,
/* insert keyframes for the affected sets of channels using the builtin KeyingSets found */
if (doLoc) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Location");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOCATION_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
if (doRot) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Rotation");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_ROTATION_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
if (doScale) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Scale");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_SCALING_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
}
/* insert keyframe in all (transform) channels */
else {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOC_ROT_SCALE_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
@@ -4697,21 +4695,21 @@ void autokeyframe_pose_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *o
}
if (doLoc) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Location");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOCATION_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
if (doRot) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Rotation");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_ROTATION_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
if (doScale) {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "Scale");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_SCALING_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
}
/* insert keyframe in all (transform) channels */
else {
- KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale");
+ KeyingSet *ks= ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOC_ROT_SCALE_ID);
ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra);
}
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index b5f622b747b..2c69cc85214 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -1301,7 +1299,7 @@ static void restoreElement(TransData *td)
copy_v3_v3(td->ext->size, td->ext->isize);
}
if (td->ext->quat) {
- QUATCOPY(td->ext->quat, td->ext->iquat);
+ copy_qt_qt(td->ext->quat, td->ext->iquat);
}
}
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c
index 1c3241237f5..cc3ffe086f1 100644
--- a/source/blender/editors/transform/transform_input.c
+++ b/source/blender/editors/transform/transform_input.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 36373562956..5b275a572cb 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -1,6 +1,4 @@
/*
-* $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index d6e8e4aa695..2d3c1d80d8d 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 3a7fad24d6b..a09778726d5 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 4342d0de751..fa19d12d5ad 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/util/CMakeLists.txt b/source/blender/editors/util/CMakeLists.txt
index 72f13c14f5d..69f576d8aa7 100644
--- a/source/blender/editors/util/CMakeLists.txt
+++ b/source/blender/editors/util/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c
index 53ccd37952d..9ca990c4193 100644
--- a/source/blender/editors/util/crazyspace.c
+++ b/source/blender/editors/util/crazyspace.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index d46f4b0ed30..fef42866e29 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c
index f38ae136f71..a312b0abbb4 100644
--- a/source/blender/editors/util/editmode_undo.c
+++ b/source/blender/editors/util/editmode_undo.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c
index 1b58a1e2a58..6c8713aa03e 100644
--- a/source/blender/editors/util/numinput.c
+++ b/source/blender/editors/util/numinput.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 55fda84874d..6a1819736a2 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/util/util_intern.h b/source/blender/editors/util/util_intern.h
index bfa758b3faa..3e2833ec89a 100644
--- a/source/blender/editors/util/util_intern.h
+++ b/source/blender/editors/util/util_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/uvedit/CMakeLists.txt b/source/blender/editors/uvedit/CMakeLists.txt
index 552e1b60154..ce078c2b1f1 100644
--- a/source/blender/editors/uvedit/CMakeLists.txt
+++ b/source/blender/editors/uvedit/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/uvedit/uvedit_buttons.c b/source/blender/editors/uvedit/uvedit_buttons.c
index 5380f514a73..a6712bf8efa 100644
--- a/source/blender/editors/uvedit/uvedit_buttons.c
+++ b/source/blender/editors/uvedit/uvedit_buttons.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index d5a94c9b56a..8a50ec28bd6 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/uvedit/uvedit_intern.h b/source/blender/editors/uvedit/uvedit_intern.h
index 58626ccbf64..7d83f529d92 100644
--- a/source/blender/editors/uvedit/uvedit_intern.h
+++ b/source/blender/editors/uvedit/uvedit_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index b1d7ab7f786..3593d94b400 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 7f6394e822b..29a9ae84cd5 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or