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:
Diffstat (limited to 'source/blender/editors/space_nla/nla_buttons.c')
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c74
1 files changed, 39 insertions, 35 deletions
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index a728cc900c2..a7e16d056d1 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -33,6 +33,8 @@
#include "DNA_anim_types.h"
+#include "BLI_utildefines.h"
+
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
@@ -66,7 +68,7 @@
/* -------------- */
-static void do_nla_region_buttons(bContext *C, void *arg, int event)
+static void do_nla_region_buttons(bContext *C, void *UNUSED(arg), int event)
{
//Scene *scene= CTX_data_scene(C);
@@ -172,25 +174,25 @@ static int nla_panel_poll(const bContext *C, PanelType *pt)
}
#endif
-static int nla_animdata_panel_poll(const bContext *C, PanelType *pt)
+static int nla_animdata_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{
PointerRNA ptr;
return (nla_panel_context(C, &ptr, NULL, NULL) && (ptr.data != NULL));
}
-static int nla_track_panel_poll(const bContext *C, PanelType *pt)
+static int nla_track_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{
PointerRNA ptr;
return (nla_panel_context(C, NULL, &ptr, NULL) && (ptr.data != NULL));
}
-static int nla_strip_panel_poll(const bContext *C, PanelType *pt)
+static int nla_strip_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{
PointerRNA ptr;
return (nla_panel_context(C, NULL, NULL, &ptr) && (ptr.data != NULL));
}
-static int nla_strip_actclip_panel_poll(const bContext *C, PanelType *pt)
+static int nla_strip_actclip_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{
PointerRNA ptr;
NlaStrip *strip;
@@ -210,7 +212,7 @@ static int nla_strip_actclip_panel_poll(const bContext *C, PanelType *pt)
static void nla_panel_animdata (const bContext *C, Panel *pa)
{
PointerRNA adt_ptr;
- AnimData *adt;
+ /* AnimData *adt; */
uiLayout *layout= pa->layout;
uiLayout *row;
uiBlock *block;
@@ -218,7 +220,8 @@ static void nla_panel_animdata (const bContext *C, Panel *pa)
/* check context and also validity of pointer */
if (!nla_panel_context(C, &adt_ptr, NULL, NULL))
return;
- adt= adt_ptr.data;
+
+ /* adt= adt_ptr.data; */
block= uiLayoutGetBlock(layout);
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
@@ -230,15 +233,15 @@ static void nla_panel_animdata (const bContext *C, Panel *pa)
/* extrapolation */
row= uiLayoutRow(layout, 1);
- uiItemR(row, &adt_ptr, "action_extrapolation", 0, NULL, 0);
+ uiItemR(row, &adt_ptr, "action_extrapolation", 0, NULL, ICON_NULL);
/* blending */
row= uiLayoutRow(layout, 1);
- uiItemR(row, &adt_ptr, "action_blend_type", 0, NULL, 0);
+ uiItemR(row, &adt_ptr, "action_blend_type", 0, NULL, ICON_NULL);
/* influence */
row= uiLayoutRow(layout, 1);
- uiItemR(row, &adt_ptr, "action_influence", 0, NULL, 0);
+ uiItemR(row, &adt_ptr, "action_influence", 0, NULL, ICON_NULL);
}
/* active NLA-Track */
@@ -279,40 +282,40 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
/* strip type */
row= uiLayoutColumn(layout, 1);
uiItemR(row, &strip_ptr, "name", 0, NULL, ICON_NLA); // XXX icon?
- uiItemR(row, &strip_ptr, "type", 0, NULL, 0);
+ uiItemR(row, &strip_ptr, "type", 0, NULL, ICON_NULL);
/* strip extents */
column= uiLayoutColumn(layout, 1);
- uiItemL(column, "Strip Extents:", 0);
- uiItemR(column, &strip_ptr, "frame_start", 0, NULL, 0);
- uiItemR(column, &strip_ptr, "frame_end", 0, NULL, 0);
+ uiItemL(column, "Strip Extents:", ICON_NULL);
+ uiItemR(column, &strip_ptr, "frame_start", 0, NULL, ICON_NULL);
+ uiItemR(column, &strip_ptr, "frame_end", 0, NULL, ICON_NULL);
/* extrapolation */
row= uiLayoutRow(layout, 1);
- uiItemR(row, &strip_ptr, "extrapolation", 0, NULL, 0);
+ uiItemR(row, &strip_ptr, "extrapolation", 0, NULL, ICON_NULL);
/* blending */
row= uiLayoutRow(layout, 1);
- uiItemR(row, &strip_ptr, "blend_type", 0, NULL, 0);
+ uiItemR(row, &strip_ptr, "blend_type", 0, NULL, ICON_NULL);
/* blend in/out + autoblending
* - blend in/out can only be set when autoblending is off
*/
column= uiLayoutColumn(layout, 1);
uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence")==0);
- uiItemR(column, &strip_ptr, "use_auto_blend", 0, NULL, 0); // XXX as toggle?
+ uiItemR(column, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NULL); // XXX as toggle?
subcol= uiLayoutColumn(column, 1);
uiLayoutSetActive(subcol, RNA_boolean_get(&strip_ptr, "use_auto_blend")==0);
- uiItemR(subcol, &strip_ptr, "blend_in", 0, NULL, 0);
- uiItemR(subcol, &strip_ptr, "blend_out", 0, NULL, 0);
+ uiItemR(subcol, &strip_ptr, "blend_in", 0, NULL, ICON_NULL);
+ uiItemR(subcol, &strip_ptr, "blend_out", 0, NULL, ICON_NULL);
/* settings */
column= uiLayoutColumn(layout, 1);
uiLayoutSetActive(column, !(RNA_boolean_get(&strip_ptr, "use_animated_influence") || RNA_boolean_get(&strip_ptr, "use_animated_time")));
- uiItemL(column, "Playback Settings:", 0);
- uiItemR(column, &strip_ptr, "mute", 0, NULL, 0);
- uiItemR(column, &strip_ptr, "use_reverse", 0, NULL, 0);
+ uiItemL(column, "Playback Settings:", ICON_NULL);
+ uiItemR(column, &strip_ptr, "mute", 0, NULL, ICON_NULL);
+ uiItemR(column, &strip_ptr, "use_reverse", 0, NULL, ICON_NULL);
}
@@ -339,17 +342,17 @@ static void nla_panel_actclip(const bContext *C, Panel *pa)
/* action extents */
// XXX custom names were used here (to avoid the prefixes)... probably not necessary in future?
column= uiLayoutColumn(layout, 1);
- uiItemL(column, "Action Extents:", 0);
- uiItemR(column, &strip_ptr, "action_frame_start", 0, "Start Frame", 0);
- uiItemR(column, &strip_ptr, "action_frame_end", 0, "End Frame", 0);
- uiItemO(column, NULL, 0, "NLA_OT_action_sync_length");
+ uiItemL(column, "Action Extents:", ICON_NULL);
+ uiItemR(column, &strip_ptr, "action_frame_start", 0, "Start Frame", ICON_NULL);
+ uiItemR(column, &strip_ptr, "action_frame_end", 0, "End Frame", ICON_NULL);
+ uiItemO(column, NULL, ICON_NULL, "NLA_OT_action_sync_length");
/* action usage */
column= uiLayoutColumn(layout, 1);
uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time")==0);
- uiItemL(column, "Playback Settings:", 0);
- uiItemR(column, &strip_ptr, "scale", 0, NULL, 0);
- uiItemR(column, &strip_ptr, "repeat", 0, NULL, 0);
+ uiItemL(column, "Playback Settings:", ICON_NULL);
+ uiItemR(column, &strip_ptr, "scale", 0, NULL, ICON_NULL);
+ uiItemR(column, &strip_ptr, "repeat", 0, NULL, ICON_NULL);
}
/* evaluation settings for active NLA-Strip */
@@ -368,22 +371,22 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa)
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
column= uiLayoutColumn(layout, 1);
- uiItemR(column, &strip_ptr, "use_animated_influence", 0, NULL, 0);
+ uiItemR(column, &strip_ptr, "use_animated_influence", 0, NULL, ICON_NULL);
subcolumn= uiLayoutColumn(column, 1);
uiLayoutSetEnabled(subcolumn, RNA_boolean_get(&strip_ptr, "use_animated_influence"));
- uiItemR(subcolumn, &strip_ptr, "influence", 0, NULL, 0);
+ uiItemR(subcolumn, &strip_ptr, "influence", 0, NULL, ICON_NULL);
column= uiLayoutColumn(layout, 1);
subrow= uiLayoutRow(column, 0);
- uiItemR(subrow, &strip_ptr, "use_animated_time", 0, NULL, 0);
- uiItemR(subrow, &strip_ptr, "use_animated_time_cyclic", 0, NULL, 0);
+ uiItemR(subrow, &strip_ptr, "use_animated_time", 0, NULL, ICON_NULL);
+ uiItemR(subrow, &strip_ptr, "use_animated_time_cyclic", 0, NULL, ICON_NULL);
subcolumn= uiLayoutColumn(column, 1);
subrow= uiLayoutRow(subcolumn, 0);
uiLayoutSetEnabled(subrow, RNA_boolean_get(&strip_ptr, "use_animated_time"));
- uiItemR(subcolumn, &strip_ptr, "strip_time", 0, NULL, 0);
+ uiItemR(subcolumn, &strip_ptr, "strip_time", 0, NULL, ICON_NULL);
}
/* F-Modifiers for active NLA-Strip */
@@ -477,7 +480,7 @@ void nla_buttons_register(ARegionType *art)
BLI_addtail(&art->paneltypes, pt);
}
-static int nla_properties(bContext *C, wmOperator *op)
+static int nla_properties(bContext *C, wmOperator *UNUSED(op))
{
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= nla_has_buttons_region(sa);
@@ -492,6 +495,7 @@ void NLA_OT_properties(wmOperatorType *ot)
{
ot->name= "Properties";
ot->idname= "NLA_OT_properties";
+ ot->description= "Toggle display properties panel";
ot->exec= nla_properties;
ot->poll= ED_operator_nla_active;