~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/makesrna/intern/rna_sequencer.c

  • Committer: Reinhard Tartler
  • Date: 2014-05-31 01:50:05 UTC
  • mfrom: (14.2.27 sid)
  • Revision ID: siretart@tauware.de-20140531015005-ml6druahuj82nsav
mergeĀ fromĀ debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
#include "WM_api.h"
77
77
#include "WM_types.h"
78
78
 
 
79
#include "IMB_imbuf.h"
 
80
 
79
81
typedef struct SequenceSearchData {
80
82
        Sequence *seq;
81
83
        void *data;
291
293
 
292
294
        seq->machine = value;
293
295
        
294
 
        if (BKE_sequence_test_overlap(seqbase, seq) ) {
 
296
        if (BKE_sequence_test_overlap(seqbase, seq)) {
295
297
                BKE_sequence_base_shuffle(seqbase, seq, scene);  /* XXX - BROKEN!, uses context seqbasep */
296
298
        }
297
299
        BKE_sequencer_sort(scene);
601
603
{
602
604
        StripProxy *proxy = (StripProxy *)(ptr->data);
603
605
        BLI_split_dirfile(value, proxy->dir, proxy->file, sizeof(proxy->dir), sizeof(proxy->file));
 
606
        if (proxy->anim) {
 
607
                IMB_free_anim(proxy->anim);
 
608
                proxy->anim = NULL;
 
609
        }
604
610
}
605
611
 
606
612
static void rna_Sequence_proxy_filepath_get(PointerRNA *ptr, char *value)
884
890
                ed->over_ofs = value;
885
891
}
886
892
 
887
 
 
888
 
static void rna_WipeSequence_angle_set(PointerRNA *ptr, float value)
889
 
{
890
 
        Sequence *seq = (Sequence *)(ptr->data);
891
 
        value = RAD2DEGF(value);
892
 
        CLAMP(value, -90.0f, 90.0f);
893
 
        ((WipeVars *)seq->effectdata)->angle = value;
894
 
}
895
 
 
896
 
static float rna_WipeSequence_angle_get(PointerRNA *ptr)
897
 
{
898
 
        Sequence *seq = (Sequence *)(ptr->data);
899
 
 
900
 
        return DEG2RADF(((WipeVars *)seq->effectdata)->angle);
901
 
}
902
 
 
903
893
static int modifier_seq_cmp_cb(Sequence *seq, void *arg_pt)
904
894
{
905
895
        SequenceSearchData *data = arg_pt;
1012
1002
        if (seq == cur)
1013
1003
                return FALSE;
1014
1004
 
1015
 
        if (BKE_sequence_check_depend(seq, cur))
1016
 
                return FALSE;
1017
 
 
1018
1005
        return TRUE;
1019
1006
}
1020
1007
 
1420
1407
 
1421
1408
        prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
1422
1409
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MUTE);
 
1410
        RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, true);
1423
1411
        RNA_def_property_ui_text(prop, "Mute", "");
1424
1412
        RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_mute_update");
1425
1413
 
1426
1414
        prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
1427
1415
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LOCK);
 
1416
        RNA_def_property_ui_icon(prop, ICON_UNLOCKED, true);
1428
1417
        RNA_def_property_ui_text(prop, "Lock", "Lock strip so that it can't be transformed");
1429
1418
        RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
1430
1419
 
2042
2031
                                 "Width of the blur edge, in percentage relative to the image size");
2043
2032
        RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
2044
2033
 
2045
 
#if 1 /* expose as radians */
2046
2034
        prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
2047
 
        RNA_def_property_float_funcs(prop, "rna_WipeSequence_angle_get", "rna_WipeSequence_angle_set", NULL);
2048
 
        RNA_def_property_range(prop, DEG2RAD(-90.0), DEG2RAD(90.0));
2049
 
#else
2050
 
        prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
2051
 
        RNA_def_property_float_sdna(prop, NULL, "angle");
2052
 
        RNA_def_property_range(prop, -90.0f, 90.0f);
2053
 
#endif
 
2035
        RNA_def_property_range(prop, DEG2RADF(-90.0f), DEG2RADF(90.0f));
2054
2036
        RNA_def_property_ui_text(prop, "Angle", "Edge angle");
2055
2037
        RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
2056
 
        
 
2038
 
2057
2039
        prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
2058
2040
        RNA_def_property_enum_sdna(prop, NULL, "forward");
2059
2041
        RNA_def_property_enum_items(prop, wipe_direction_items);
2148
2130
        prop = RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE);
2149
2131
        RNA_def_property_float_sdna(prop, NULL, "xIni");
2150
2132
        RNA_def_property_ui_text(prop, "Translate X", "");
2151
 
        RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 6);
 
2133
        RNA_def_property_ui_range(prop, -4000.0f, 4000.0f, 3, 6);
2152
2134
        RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
2153
2135
        
2154
2136
        prop = RNA_def_property(srna, "translate_start_y", PROP_FLOAT, PROP_NONE);
2155
2137
        RNA_def_property_float_sdna(prop, NULL, "yIni");
2156
2138
        RNA_def_property_ui_text(prop, "Translate Y", "");
2157
 
        RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 6);
 
2139
        RNA_def_property_ui_range(prop, -4000.0f, 4000.0f, 3, 6);
2158
2140
        RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
2159
2141
        
2160
2142
        prop = RNA_def_property(srna, "rotation_start", PROP_FLOAT, PROP_NONE);