* Added Armature data filter buttons in Dopesheet/Graph editor headers
* Fixed an RNA typo to fix ranges in action constraint
This commit is contained in:
@@ -349,6 +349,7 @@ void action_header_buttons(const bContext *C, ARegion *ar)
|
||||
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Cameras");
|
||||
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Curves");
|
||||
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display MetaBalls");
|
||||
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOARM, B_REDR, ICON_ARMATURE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Armature/Bone");
|
||||
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Particles");
|
||||
uiBlockEndAlign(block);
|
||||
xco += 30;
|
||||
|
||||
@@ -313,6 +313,7 @@ void graph_header_buttons(const bContext *C, ARegion *ar)
|
||||
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Cameras");
|
||||
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Curves");
|
||||
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display MetaBalls");
|
||||
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOARM, B_REDR, ICON_ARMATURE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Armature/Bone data");
|
||||
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Particles");
|
||||
uiBlockEndAlign(block);
|
||||
xco += 30;
|
||||
|
||||
@@ -253,6 +253,22 @@ static EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *C, PointerR
|
||||
return space_object_items;
|
||||
}
|
||||
|
||||
static void rna_ActionConstraint_minmax_range(PointerRNA *ptr, float *min, float *max)
|
||||
{
|
||||
bConstraint *con= (bConstraint*)ptr->data;
|
||||
bActionConstraint *acon = (bActionConstraint *)con->data;
|
||||
|
||||
/* 0, 1, 2 = magic numbers for rotX, rotY, rotZ */
|
||||
if (ELEM3(acon->type, 0, 1, 2)) {
|
||||
*min= -90.f;
|
||||
*max= 90.f;
|
||||
} else {
|
||||
*min= -1000.f;
|
||||
*max= 1000.f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
static void rna_def_constrainttarget(BlenderRNA *brna)
|
||||
@@ -781,15 +797,17 @@ static void rna_def_constraint_action(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "maximum", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "max");
|
||||
RNA_def_property_range(prop, 0.0, 1000.f);
|
||||
RNA_def_property_range(prop, -1000.f, 1000.f);
|
||||
RNA_def_property_ui_text(prop, "Maximum", "Maximum value for target channel range.");
|
||||
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
|
||||
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_ActionConstraint_minmax_range");
|
||||
|
||||
prop= RNA_def_property(srna, "minimum", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "min");
|
||||
RNA_def_property_range(prop, 0.0, 1000.f);
|
||||
RNA_def_property_range(prop, -1000.f, 1000.f);
|
||||
RNA_def_property_ui_text(prop, "Minimum", "Minimum value for target channel range.");
|
||||
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
|
||||
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_ActionConstraint_minmax_range");
|
||||
}
|
||||
|
||||
static void rna_def_constraint_locked_track(BlenderRNA *brna)
|
||||
|
||||
Reference in New Issue
Block a user