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
This commit is contained in:
parent
6202bc82b8
commit
4547815847
|
@ -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 = (
|
||||
)
|
||||
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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_bc = 10;
|
||||
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_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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue