Cleanup: Remove deprecated ghosting code
authorJacques Lucke <mail@jlucke.com>
Wed, 6 Feb 2019 11:05:34 +0000 (12:05 +0100)
committerJacques Lucke <mail@jlucke.com>
Wed, 6 Feb 2019 11:05:34 +0000 (12:05 +0100)
Most of this code is deprecated for many years already and does not
work at all in Blender 2.8.

Reviewers: brecht, aligorith

Differential Revision: https://developer.blender.org/D4271

12 files changed:
release/scripts/startup/bl_ui/properties_animviz.py
release/scripts/startup/bl_ui/properties_data_armature.py
release/scripts/startup/bl_ui/properties_object.py
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/armature.c
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/versioning_legacy.c
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_armature_types.h
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_animviz.c
source/blender/makesrna/intern/rna_armature.c

index 9a100a654b1a77431926d4f30011e75e71699ae0..4ee721b01753590429373c0cd430841e23e7c24a 100644 (file)
@@ -120,38 +120,6 @@ class MotionPathButtonsPanel_display:
             sub.prop(mpath, "color", text="")
 
 
-# FIXME: this panel still needs to be ported so that it will work correctly with animviz
-class OnionSkinButtonsPanel:
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_label = "Onion Skinning"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        arm = context.armature
-
-        layout.row().prop(arm, "ghost_type", expand=True)
-
-        split = layout.split()
-
-        col = split.column()
-
-        sub = col.column(align=True)
-        if arm.ghost_type == 'RANGE':
-            sub.prop(arm, "ghost_frame_start", text="Start")
-            sub.prop(arm, "ghost_frame_end", text="End")
-            sub.prop(arm, "ghost_size", text="Step")
-        elif arm.ghost_type == 'CURRENT_FRAME':
-            sub.prop(arm, "ghost_step", text="Range")
-            sub.prop(arm, "ghost_size", text="Step")
-
-        col = split.column()
-        col.label(text="Display:")
-        col.prop(arm, "show_only_ghost_selected", text="Selected Only")
-
-
 classes = (
 )
 
index 6df338dbc00c6084354f46b2809196888e4ff1ca..9e694bef51d937a41c6c6b81c95a5d9ca452ed33 100644 (file)
@@ -210,33 +210,6 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
                 col.operator("poselib.pose_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
 
 
-# TODO: this panel will soon be deprecated too
-class DATA_PT_ghost(ArmatureButtonsPanel, Panel):
-    bl_label = "Ghost"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        arm = context.armature
-
-        layout.row().prop(arm, "ghost_type", expand=True)
-
-        layout.use_property_split = True
-
-        col = layout.column(align=True)
-
-        if arm.ghost_type == 'RANGE':
-            col.prop(arm, "ghost_frame_start", text="Frame Start")
-            col.prop(arm, "ghost_frame_end", text="End")
-            col.prop(arm, "ghost_size", text="Step")
-        elif arm.ghost_type == 'CURRENT_FRAME':
-            col.prop(arm, "ghost_step", text="Frame Range")
-            col.prop(arm, "ghost_size", text="Step")
-
-        col.prop(arm, "show_only_ghost_selected", text="Display Selected Only")
-
-
 class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
     bl_label = "Inverse Kinematics"
     bl_options = {'DEFAULT_CLOSED'}
@@ -291,7 +264,6 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
 from .properties_animviz import (
     MotionPathButtonsPanel,
     MotionPathButtonsPanel_display,
-    OnionSkinButtonsPanel,
 )
 
 
@@ -340,21 +312,6 @@ class DATA_PT_motion_paths_display(MotionPathButtonsPanel_display, Panel):
         self.draw_settings(context, avs, mpath, bones=True)
 
 
-class DATA_PT_onion_skinning(OnionSkinButtonsPanel):  # , Panel): # inherit from panel when ready
-    #bl_label = "Bones Onion Skinning"
-    bl_context = "data"
-
-    @classmethod
-    def poll(cls, context):
-        # XXX: include pose-mode check?
-        return context.object and context.armature
-
-    def draw(self, context):
-        ob = context.object
-
-        self.draw_settings(context, ob.pose.animation_visualization, bones=True)
-
-
 class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
     _context_path = "object.data"
@@ -370,7 +327,6 @@ classes = (
     DATA_PT_pose_library,
     DATA_PT_motion_paths,
     DATA_PT_motion_paths_display,
-    DATA_PT_ghost,
     DATA_PT_iksolver_itasc,
     DATA_PT_custom_props_arm,
 )
index 3f1ea64bf3069e56503c4b95bb8f95ae5c035a59..b7367a80e1244f30a2681f6eaf8a8b100f339a01 100644 (file)
@@ -311,7 +311,6 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
 from .properties_animviz import (
     MotionPathButtonsPanel,
     MotionPathButtonsPanel_display,
-    OnionSkinButtonsPanel,
 )
 
 
@@ -354,20 +353,6 @@ class OBJECT_PT_motion_paths_display(MotionPathButtonsPanel_display, Panel):
         self.draw_settings(context, avs, mpath)
 
 
-class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel):  # , Panel): # inherit from panel when ready
-    #bl_label = "Object Onion Skinning"
-    bl_context = "object"
-
-    @classmethod
-    def poll(cls, context):
-        return (context.object)
-
-    def draw(self, context):
-        ob = context.object
-
-        self.draw_settings(context, ob.animation_visualization)
-
-
 class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
     _context_path = "object"
index e9a8b921cdb0d5519b8f6cbb71a1b079e81ff25b..8033ea248f2f64f9475f0bbdbff126e3fcdec795 100644 (file)
@@ -74,15 +74,6 @@ void animviz_settings_init(bAnimVizSettings *avs)
        if (avs == NULL)
                return;
 
-       /* ghosting settings */
-       avs->ghost_bc = avs->ghost_ac = 10;
-
-       avs->ghost_sf = 1; /* xxx - take from scene instead? */
-       avs->ghost_ef = 250; /* xxx - take from scene instead? */
-
-       avs->ghost_step = 1;
-
-
        /* path settings */
        avs->path_bc = avs->path_ac = 10;
 
index 36f684c1d2e882463633cdadf586201ea4d8f73d..aca29c0349af1204f75ab151bde36f32df41f47c 100644 (file)
@@ -82,7 +82,6 @@ bArmature *BKE_armature_add(Main *bmain, const char *name)
        arm->deformflag = ARM_DEF_VGROUP | ARM_DEF_ENVELOPE;
        arm->flag = ARM_COL_CUSTOM; /* custom bone-group colors */
        arm->layer = 1;
-       arm->ghostsize = 1;
        return arm;
 }
 
index 538a38ba0b492e9a0f4c6e07ea4e413bc14689f8..08c1cefb0a0d739b7eb5d716901b77760f5e7920 100644 (file)
@@ -1228,41 +1228,13 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
                                if (arm) { /* XXX - why does this fail in some cases? */
                                        bAnimVizSettings *avs = &ob->pose->avs;
 
-                                       /* ghosting settings ---------------- */
-                                       /* ranges */
-                                       avs->ghost_bc = avs->ghost_ac = arm->ghostep;
-
-                                       avs->ghost_sf = arm->ghostsf;
-                                       avs->ghost_ef = arm->ghostef;
-                                       if ((avs->ghost_sf == avs->ghost_ef) && (avs->ghost_sf == 0)) {
-                                               avs->ghost_sf = 1;
-                                               avs->ghost_ef = 100;
-                                       }
-
-                                       /* type */
-                                       if (arm->ghostep == 0)
-                                               avs->ghost_type = GHOST_TYPE_NONE;
-                                       else
-                                               avs->ghost_type = arm->ghosttype + 1;
-
-                                       /* stepsize */
-                                       avs->ghost_step = arm->ghostsize;
-                                       if (avs->ghost_step == 0)
-                                               avs->ghost_step = 1;
-
                                        /* path settings --------------------- */
                                        /* ranges */
-                                       avs->path_bc = arm->pathbc;
-                                       avs->path_ac = arm->pathac;
-                                       if ((avs->path_bc == avs->path_ac) && (avs->path_bc == 0))
-                                               avs->path_bc = avs->path_ac = 10;
-
-                                       avs->path_sf = arm->pathsf;
-                                       avs->path_ef = arm->pathef;
-                                       if ((avs->path_sf == avs->path_ef) && (avs->path_sf == 0)) {
-                                               avs->path_sf = 1;
-                                               avs->path_ef = 250;
-                                       }
+                                       avs->path_bc = 10;
+                                       avs->path_ac = 10;
+
+                                       avs->path_sf = 1;
+                                       avs->path_ef = 250;
 
                                        /* flags */
                                        if (arm->pathflag & ARM_PATH_FNUMS)
@@ -1281,9 +1253,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
                                                avs->path_type = MOTIONPATH_TYPE_ACFRA;
 
                                        /* stepsize */
-                                       avs->path_step = arm->pathsize;
-                                       if (avs->path_step == 0)
-                                               avs->path_step = 1;
+                                       avs->path_step = 1;
                                }
                                else
                                        animviz_settings_init(&ob->pose->avs);
index 0a8e34d16fd469f507baedc553d1ab284c1f6c0b..3bb6cbc401e669df35b959ed9989d93a9b87d49c 100644 (file)
@@ -1511,8 +1511,6 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
 
                /* updating stepsize for ghost drawing */
                for (arm = bmain->armature.first; arm; arm = arm->id.next) {
-                       if (arm->ghostsize == 0)
-                               arm->ghostsize = 1;
                        bone_version_239(&arm->bonebase);
                        if (arm->layer == 0)
                                arm->layer = 1;
index 8c3e61c4aa13a1c6aaffde954a2d9b98e5d4ee6e..a9447efb19d3d1a3c53a88eac53e4d4a00557e9d 100644 (file)
@@ -105,20 +105,6 @@ typedef enum eMotionPath_Flag {
 
 /* Animation Visualization Settings (avs) */
 typedef struct bAnimVizSettings {
-       /* Onion-Skinning Settings ----------------- */
-       /** Start and end frames of ghost-drawing range (only used for GHOST_TYPE_RANGE). */
-       int ghost_sf, ghost_ef;
-       /** Number of frames befo.re/after current frame to show */
-       int ghost_bc, ghost_ac;
-
-       /** #eOnionSkin_Types. */
-       short ghost_type;
-       /** Number of frames between each ghost shown (not for GHOST_TYPE_KEYS). */
-       short ghost_step;
-
-       /** #eOnionSkin_Flag. */
-       short ghost_flag;
-
        /* General Settings ------------------------ */
        /** #eAnimViz_RecalcFlags. */
        short recalc;
@@ -133,6 +119,7 @@ typedef struct bAnimVizSettings {
        short path_viewflag;
        /** #eMotionPaths_BakeFlag. */
        short path_bakeflag;
+       char pad[6];
 
        /** Start and end frames of path-calculation range. */
        int path_sf, path_ef;
@@ -147,26 +134,6 @@ typedef enum eAnimViz_RecalcFlags {
        ANIMVIZ_RECALC_PATHS    = (1 << 0),
 } eAnimViz_RecalcFlags;
 
-
-/* bAnimVizSettings->ghost_type */
-typedef enum eOnionSkin_Types {
-       /* no ghosts at all */
-       GHOST_TYPE_NONE = 0,
-       /* around current frame */
-       GHOST_TYPE_ACFRA = 1,
-       /* show ghosts within the specified frame range */
-       GHOST_TYPE_RANGE = 2,
-       /* show ghosts on keyframes within the specified range only */
-       GHOST_TYPE_KEYS = 3,
-} eOnionSkin_Types;
-
-/* bAnimVizSettings->ghost_flag */
-typedef enum eOnionSkin_Flag {
-       /* only show selected bones in ghosts */
-       GHOST_FLAG_ONLYSEL  = (1 << 0),
-} eOnionSkin_Flag;
-
-
 /* bAnimVizSettings->path_type */
 typedef enum eMotionPaths_Types {
        /* show the paths along their entire ranges */
index 86955f07d60f0b29944e4a1698c72e1ba6667478..a800dd2ac781a46ebd8b24bc94c2cc11699eed86 100644 (file)
@@ -129,19 +129,6 @@ typedef struct bArmature {
        unsigned int layer_used;
        /** For buttons to work, both variables in this order together. */
        unsigned int layer, layer_protected;
-
-// XXX deprecated... old animation system (armature only viz) ---
-       /** Number of frames to ghosts to show, and step between them . */
-       short       ghostep, ghostsize;
-       /** Ghost drawing options and number of frames between points of path. */
-       short       ghosttype, pathsize;
-       /** Start and end frames of ghost-drawing range. */
-       int         ghostsf, ghostef;
-       /** Start and end frames of path-calculation range for all bones. */
-       int         pathsf, pathef;
-       /** Number of frames before/after current frame of path-calculation for all bones . */
-       int         pathbc, pathac;
-// XXX end of deprecated code ----------------------------------
 } bArmature;
 
 /* armature->flag */
@@ -208,14 +195,6 @@ typedef enum eArmature_PathFlag {
 } eArmature_PathFlag;
 #endif
 
-/* armature->ghosttype */
-// XXX deprecated... old animation system (armature only viz)
-typedef enum eArmature_GhostType {
-       ARM_GHOST_CUR = 0,
-       ARM_GHOST_RANGE = 1,
-       ARM_GHOST_KEYS = 2,
-} eArmature_GhostType;
-
 /* bone->flag */
 typedef enum eBone_Flag {
        BONE_SELECTED               = (1 << 0),
index e402c68efbfc18b28fa363655ea0b683fa8457ba..143e2c475d08da9366f258ad8a19e09f1bc0bcc5 100644 (file)
@@ -60,7 +60,6 @@ extern StructRNA RNA_AndController;
 extern StructRNA RNA_AnimData;
 extern StructRNA RNA_AnimViz;
 extern StructRNA RNA_AnimVizMotionPaths;
-extern StructRNA RNA_AnimVizOnionSkinning;
 extern StructRNA RNA_AnyType;
 extern StructRNA RNA_Area;
 extern StructRNA RNA_AreaLight;
index 6e714ed4477e3c645b5b8e6a5f494dc926b4c5f9..8f064e8d8754367c6388e5601c359cb44a3ddd6c 100644 (file)
@@ -45,32 +45,11 @@ const EnumPropertyItem rna_enum_motionpath_bake_location_items[] = {
 
 #ifdef RNA_RUNTIME
 
-static PointerRNA rna_AnimViz_onion_skinning_get(PointerRNA *ptr)
-{
-       return rna_pointer_inherit_refine(ptr, &RNA_AnimVizOnionSkinning, ptr->data);
-}
-
 static PointerRNA rna_AnimViz_motion_paths_get(PointerRNA *ptr)
 {
        return rna_pointer_inherit_refine(ptr, &RNA_AnimVizMotionPaths, ptr->data);
 }
 
-static void rna_AnimViz_ghost_start_frame_set(PointerRNA *ptr, int value)
-{
-       bAnimVizSettings *data = (bAnimVizSettings *)ptr->data;
-
-       data->ghost_sf = value;
-       CLAMP(data->ghost_ef, data->ghost_sf, MAXFRAME / 2);
-}
-
-static void rna_AnimViz_ghost_end_frame_set(PointerRNA *ptr, int value)
-{
-       bAnimVizSettings *data = (bAnimVizSettings *)ptr->data;
-
-       data->ghost_ef = value;
-       CLAMP(data->ghost_sf, 1, data->ghost_ef);
-}
-
 static void rna_AnimViz_path_start_frame_set(PointerRNA *ptr, int value)
 {
        bAnimVizSettings *data = (bAnimVizSettings *)ptr->data;
@@ -188,81 +167,6 @@ static void rna_def_animviz_motion_path(BlenderRNA *brna)
 
 /* --- */
 
-static void rna_def_animviz_ghosts(BlenderRNA *brna)
-{
-       StructRNA *srna;
-       PropertyRNA *prop;
-
-       static const EnumPropertyItem prop_type_items[] = {
-               {GHOST_TYPE_NONE, "NONE", 0, "No Ghosts", "Do not show any ghosts"},
-               {GHOST_TYPE_ACFRA, "CURRENT_FRAME", 0, "Around Current Frame", "Show ghosts from around the current frame"},
-               {GHOST_TYPE_RANGE, "RANGE", 0, "In Range", "Show ghosts for the specified frame range"},
-               {GHOST_TYPE_KEYS, "KEYS", 0, "On Keyframes", "Show ghosts on keyframes"},
-               {0, NULL, 0, NULL, NULL},
-       };
-
-
-       srna = RNA_def_struct(brna, "AnimVizOnionSkinning", NULL);
-       RNA_def_struct_sdna(srna, "bAnimVizSettings");
-       RNA_def_struct_nested(brna, srna, "AnimViz");
-       RNA_def_struct_ui_text(srna, "Onion Skinning Settings", "Onion Skinning settings for animation visualization");
-
-       /* Enums */
-       prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
-       RNA_def_property_enum_sdna(prop, NULL, "ghost_type");
-       RNA_def_property_enum_items(prop, prop_type_items);
-       RNA_def_property_ui_text(prop, "Type", "Method used for determining what ghosts get drawn");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
-
-       /* Settings */
-       prop = RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "ghost_flag", GHOST_FLAG_ONLYSEL);
-       RNA_def_property_ui_text(prop, "On Selected Bones Only",
-                                "For Pose-Mode drawing, only draw ghosts for selected bones");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
-
-       prop = RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
-       RNA_def_property_int_sdna(prop, NULL, "ghost_step");
-       RNA_def_property_range(prop, 1, 20);
-       RNA_def_property_ui_text(prop, "Frame Step",
-                                "Number of frames between ghosts shown (not for 'On Keyframes' Onion-skinning method)");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
-
-       /* Playback Ranges */
-       prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
-       RNA_def_property_int_sdna(prop, NULL, "ghost_sf");
-       RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_ghost_start_frame_set", NULL);
-       RNA_def_property_ui_text(prop, "Start Frame",
-                                "Starting frame of range of Ghosts to display "
-                                "(not for 'Around Current Frame' Onion-skinning method)");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
-
-       prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
-       RNA_def_property_int_sdna(prop, NULL, "ghost_ef");
-       RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_ghost_end_frame_set", NULL);
-       RNA_def_property_ui_text(prop, "End Frame",
-                                "End frame of range of Ghosts to display "
-                                "(not for 'Around Current Frame' Onion-skinning method)");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
-
-       /* Around Current Ranges */
-       prop = RNA_def_property(srna, "frame_before", PROP_INT, PROP_TIME);
-       RNA_def_property_int_sdna(prop, NULL, "ghost_bc");
-       RNA_def_property_range(prop, 0, 30);
-       RNA_def_property_ui_text(prop, "Before Current",
-                                "Number of frames to show before the current frame "
-                                "(only for 'Around Current Frame' Onion-skinning method)");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
-
-       prop = RNA_def_property(srna, "frame_after", PROP_INT, PROP_TIME);
-       RNA_def_property_int_sdna(prop, NULL, "ghost_ac");
-       RNA_def_property_range(prop, 0, 30);
-       RNA_def_property_ui_text(prop, "After Current",
-                                "Number of frames to show after the current frame "
-                                "(only for 'Around Current Frame' Onion-skinning method)");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
-}
-
 static void rna_def_animviz_paths(BlenderRNA *brna)
 {
        StructRNA *srna;
@@ -387,13 +291,6 @@ static void rna_def_animviz(BlenderRNA *brna)
        RNA_def_struct_sdna(srna, "bAnimVizSettings");
        RNA_def_struct_ui_text(srna, "Animation Visualization", "Settings for the visualization of motion");
 
-       /* onion-skinning settings (nested struct) */
-       prop = RNA_def_property(srna, "onion_skin_frames", PROP_POINTER, PROP_NONE);
-       RNA_def_property_flag(prop, PROP_NEVER_NULL);
-       RNA_def_property_struct_type(prop, "AnimVizOnionSkinning");
-       RNA_def_property_pointer_funcs(prop, "rna_AnimViz_onion_skinning_get", NULL, NULL, NULL);
-       RNA_def_property_ui_text(prop, "Onion Skinning", "Onion Skinning (ghosting) settings for visualization");
-
        /* motion path settings (nested struct) */
        prop = RNA_def_property(srna, "motion_path", PROP_POINTER, PROP_NONE);
        RNA_def_property_flag(prop, PROP_NEVER_NULL);
@@ -407,7 +304,6 @@ static void rna_def_animviz(BlenderRNA *brna)
 void RNA_def_animviz(BlenderRNA *brna)
 {
        rna_def_animviz(brna);
-       rna_def_animviz_ghosts(brna);
        rna_def_animviz_paths(brna);
 
        rna_def_animviz_motion_path(brna);
index 5f11f1e360b1f79f7bd6541e66efc58e0af69875..6b8cfaae028f90a1f608fd4e0b61fab0d3336454 100644 (file)
@@ -311,30 +311,6 @@ static void rna_Armature_layer_set(PointerRNA *ptr, const bool *values)
        }
 }
 
-/* XXX deprecated.... old armature only animviz */
-static void rna_Armature_ghost_start_frame_set(PointerRNA *ptr, int value)
-{
-       bArmature *data = (bArmature *)ptr->data;
-       CLAMP(value, 1, (int)(MAXFRAMEF / 2));
-       data->ghostsf = value;
-
-       if (data->ghostsf >= data->ghostef) {
-               data->ghostef = MIN2(data->ghostsf, (int)(MAXFRAMEF / 2));
-       }
-}
-
-static void rna_Armature_ghost_end_frame_set(PointerRNA *ptr, int value)
-{
-       bArmature *data = (bArmature *)ptr->data;
-       CLAMP(value, 1, (int)(MAXFRAMEF / 2));
-       data->ghostef = value;
-
-       if (data->ghostsf >= data->ghostef) {
-               data->ghostsf = MAX2(data->ghostef, 1);
-       }
-}
-/* XXX deprecated... old armature only animviz */
-
 static void rna_EditBone_name_set(PointerRNA *ptr, const char *value)
 {
        bArmature *arm = (bArmature *)ptr->id.data;
@@ -1149,13 +1125,6 @@ static void rna_def_armature(BlenderRNA *brna)
                {ARM_WIRE, "WIRE", 0, "Wire", "Display bones as thin wires, showing subdivision and B-Splines"},
                {0, NULL, 0, NULL, NULL},
        };
-       static const EnumPropertyItem prop_ghost_type_items[] = {
-               {ARM_GHOST_CUR, "CURRENT_FRAME", 0, "Around Frame",
-                               "Display Ghosts of poses within a fixed number of frames around the current frame"},
-               {ARM_GHOST_RANGE, "RANGE", 0, "In Range", "Display Ghosts of poses within specified range"},
-               {ARM_GHOST_KEYS, "KEYS", 0, "On Keyframes", "Display Ghosts of poses on Keyframes"},
-               {0, NULL, 0, NULL, NULL},
-       };
        static const EnumPropertyItem prop_pose_position_items[] = {
                {0, "POSE", 0, "Pose Position", "Show armature in posed state"},
                {ARM_RESTPOS, "REST", 0, "Rest Position", "Show Armature in binding pose state (no posing possible)"},
@@ -1206,15 +1175,6 @@ static void rna_def_armature(BlenderRNA *brna)
        RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
        RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
 
-/* XXX deprecated ....... old animviz for armatures only */
-       prop = RNA_def_property(srna, "ghost_type", PROP_ENUM, PROP_NONE);
-       RNA_def_property_enum_sdna(prop, NULL, "ghosttype");
-       RNA_def_property_enum_items(prop, prop_ghost_type_items);
-       RNA_def_property_ui_text(prop, "Ghost Type", "Method of Onion-skinning for active Action");
-       RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-       RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
-/* XXX deprecated ....... old animviz for armatures only        */
-
        /* Boolean values */
        /* layer */
        prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
@@ -1274,54 +1234,6 @@ static void rna_def_armature(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Display Bone Group Colors", "Display bone group colors");
        RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
 
-/* XXX deprecated ....... old animviz for armatures only */
-       prop = RNA_def_property(srna, "show_only_ghost_selected", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_GHOST_ONLYSEL);
-       RNA_def_property_ui_text(prop, "Display Ghosts on Selected Bones Only", "");
-       RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-       RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
-/* XXX deprecated ....... old animviz for armatures only */
-
-       /* Number fields */
-/* XXX deprecated ....... old animviz for armatures only */
-       /* ghost/onionskining settings */
-       prop = RNA_def_property(srna, "ghost_step", PROP_INT, PROP_NONE);
-       RNA_def_property_int_sdna(prop, NULL, "ghostep");
-       RNA_def_property_range(prop, 0, 30);
-       RNA_def_property_ui_text(prop, "Ghosting Step",
-                                "Number of frame steps on either side of current frame to show as ghosts "
-                                "(only for 'Around Current Frame' Onion-skinning method)");
-       RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-       RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
-
-       prop = RNA_def_property(srna, "ghost_size", PROP_INT, PROP_NONE);
-       RNA_def_property_int_sdna(prop, NULL, "ghostsize");
-       RNA_def_property_range(prop, 1, 20);
-       RNA_def_property_ui_text(prop, "Ghosting Frame Step",
-                                "Frame step for Ghosts (not for 'On Keyframes' Onion-skinning method)");
-       RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-       RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
-
-       prop = RNA_def_property(srna, "ghost_frame_start", PROP_INT, PROP_TIME);
-       RNA_def_property_int_sdna(prop, NULL, "ghostsf");
-       RNA_def_property_int_funcs(prop, NULL, "rna_Armature_ghost_start_frame_set", NULL);
-       RNA_def_property_ui_text(prop, "Ghosting Start Frame",
-                                "Starting frame of range of Ghosts to display (not for "
-                                "'Around Current Frame' Onion-skinning method)");
-       RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-       RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
-
-       prop = RNA_def_property(srna, "ghost_frame_end", PROP_INT, PROP_TIME);
-       RNA_def_property_int_sdna(prop, NULL, "ghostef");
-       RNA_def_property_int_funcs(prop, NULL, "rna_Armature_ghost_end_frame_set", NULL);
-       RNA_def_property_ui_text(prop, "Ghosting End Frame",
-                                "End frame of range of Ghosts to display "
-                                "(not for 'Around Current Frame' Onion-skinning method)");
-       RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-       RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
-/* XXX deprecated ....... old animviz for armatures only */
-
-
        prop = RNA_def_property(srna, "is_editmode", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_funcs(prop, "rna_Armature_is_editmode_get", NULL);
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);