Commit: 45478158479d3aa695de9dfafc2fe433d1ae0f51
Author: Jacques Lucke
Date:   Wed Feb 6 12:05:34 2019 +0100
Branches: master
https://developer.blender.org/rB45478158479d3aa695de9dfafc2fe433d1ae0f51

Cleanup: Remove deprecated ghosting code

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

===================================================================

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

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_animviz.py 
b/release/scripts/startup/bl_ui/properties_animviz.py
index 9a100a654b1..4ee721b0175 100644
--- a/release/scripts/startup/bl_ui/properties_animviz.py
+++ b/release/scripts/startup/bl_ui/properties_animviz.py
@@ -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 = (
 )
 
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py 
b/release/scripts/startup/bl_ui/properties_data_armature.py
index 6df338dbc00..9e694bef51d 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -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,
 )
diff --git a/release/scripts/startup/bl_ui/properties_object.py 
b/release/scripts/startup/bl_ui/properties_object.py
index 3f1ea64bf30..b7367a80e12 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -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"
diff --git a/source/blender/blenkernel/intern/anim.c 
b/source/blender/blenkernel/intern/anim.c
index e9a8b921cdb..8033ea248f2 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -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;
 
diff --git a/source/blender/blenkernel/intern/armature.c 
b/source/blender/blenkernel/intern/armature.c
index 36f684c1d2e..aca29c0349a 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -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;
 }
 
diff --git a/source/blender/blenloader/intern/versioning_250.c 
b/source/blender/blenloader/intern/versioning_250.c
index 538a38ba0b4..08c1cefb0a0 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -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);
diff --git a/source/blender/blenloader/intern/versioning_legacy.c 
b/source/blender/blenloader/intern/versioning_legacy.c
index 0a8e34d16fd..3bb6cbc401e 100644
--- a/source/blender/blenloader/intern/versioning_legacy.c
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -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;
diff --git a/source/blender/makesdna/DNA_action_types.h 
b/source/blender/makesdna/DNA_action_types.h
index 8c3e61c4aa1..a9447efb19d 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -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 en

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to