~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
#include "BLF_translation.h"
44
44
 
45
45
#include "BKE_animsys.h"
46
 
#include "BKE_bmesh.h" /* For BevelModifierData */
47
46
#include "BKE_dynamicpaint.h"
48
47
#include "BKE_multires.h"
49
48
#include "BKE_smoke.h" /* For smokeModifier_free & smokeModifier_createType */
493
492
        mmd->simple = value;
494
493
}
495
494
 
496
 
static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
 
495
static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max,
 
496
                                             int *UNUSED(softmin), int *UNUSED(softmax))
497
497
{
498
498
        MultiresModifierData *mmd = (MultiresModifierData *)ptr->data;
499
499
 
668
668
        UVProjectModifierData *md = (UVProjectModifierData *)ptr->data;
669
669
        int a;
670
670
 
671
 
        md->num_projectors = CLAMPIS(value, 1, MOD_UVPROJECT_MAX);
672
 
        for (a = md->num_projectors; a < MOD_UVPROJECT_MAX; a++)
 
671
        md->num_projectors = CLAMPIS(value, 1, MOD_UVPROJECT_MAXPROJECTORS);
 
672
        for (a = md->num_projectors; a < MOD_UVPROJECT_MAXPROJECTORS; a++)
673
673
                md->projectors[a] = NULL;
674
674
}
675
675
 
1721
1721
        RNA_def_property_int_sdna(prop, NULL, "num_projectors");
1722
1722
        RNA_def_property_ui_text(prop, "Number of Projectors", "Number of projectors to use");
1723
1723
        RNA_def_property_int_funcs(prop, NULL, "rna_UVProjectModifier_num_projectors_set", NULL);
1724
 
        RNA_def_property_range(prop, 1, MOD_UVPROJECT_MAX);
 
1724
        RNA_def_property_range(prop, 1, MOD_UVPROJECT_MAXPROJECTORS);
1725
1725
        RNA_def_property_update(prop, 0, "rna_Modifier_update");
1726
1726
 
1727
1727
        prop = RNA_def_property(srna, "projectors", PROP_COLLECTION, PROP_NONE);
2300
2300
 
2301
2301
        static EnumPropertyItem prop_limit_method_items[] = {
2302
2302
                {0, "NONE", 0, "None", "Bevel the entire mesh by a constant amount"},
2303
 
                {BME_BEVEL_ANGLE, "ANGLE", 0, "Angle", "Only bevel edges with sharp enough angles between faces"},
2304
 
                {BME_BEVEL_WEIGHT, "WEIGHT", 0, "Weight",
 
2303
                {MOD_BEVEL_ANGLE, "ANGLE", 0, "Angle", "Only bevel edges with sharp enough angles between faces"},
 
2304
                {MOD_BEVEL_WEIGHT, "WEIGHT", 0, "Weight",
2305
2305
                                   "Use bevel weights to determine how much bevel is applied in edge mode"},
2306
 
                {BME_BEVEL_VGROUP, "VGROUP", 0, "Vertex Group",
 
2306
                {MOD_BEVEL_VGROUP, "VGROUP", 0, "Vertex Group",
2307
2307
                                   "Use vertex group weights to determine how much bevel is applied in vertex mode"},
2308
2308
                {0, NULL, 0, NULL, NULL}
2309
2309
        };
2311
2311
        /* TO BE DEPRECATED */
2312
2312
        static EnumPropertyItem prop_edge_weight_method_items[] = {
2313
2313
                {0, "AVERAGE", 0, "Average", ""},
2314
 
                {BME_BEVEL_EMIN, "SHARPEST", 0, "Sharpest", ""},
2315
 
                {BME_BEVEL_EMAX, "LARGEST", 0, "Largest", ""},
 
2314
                {MOD_BEVEL_EMIN, "SHARPEST", 0, "Sharpest", ""},
 
2315
                {MOD_BEVEL_EMAX, "LARGEST", 0, "Largest", ""},
2316
2316
                {0, NULL, 0, NULL, NULL}
2317
2317
        };
2318
2318
 
2335
2335
        RNA_def_property_update(prop, 0, "rna_Modifier_update");
2336
2336
 
2337
2337
        prop = RNA_def_property(srna, "use_only_vertices", PROP_BOOLEAN, PROP_NONE);
2338
 
        RNA_def_property_boolean_sdna(prop, NULL, "flags", BME_BEVEL_VERT);
 
2338
        RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_BEVEL_VERT);
2339
2339
        RNA_def_property_ui_text(prop, "Only Vertices", "Bevel verts/corners, not edges");
2340
2340
        RNA_def_property_update(prop, 0, "rna_Modifier_update");
2341
2341
 
2352
2352
        RNA_def_property_ui_text(prop, "Edge Weight Method", "What edge weight to use for weighting a vertex");
2353
2353
        RNA_def_property_update(prop, 0, "rna_Modifier_update");
2354
2354
 
2355
 
#if 1 /* expose as radians */
2356
2355
        prop = RNA_def_property(srna, "angle_limit", PROP_FLOAT, PROP_ANGLE);
2357
2356
        RNA_def_property_float_funcs(prop, "rna_BevelModifier_angle_limit_get",
2358
2357
                                     "rna_BevelModifier_angle_limit_set", NULL);
2359
2358
        RNA_def_property_range(prop, 0, DEG2RAD(180));
2360
2359
        RNA_def_property_ui_range(prop, 0, DEG2RAD(180), 100, 2);
2361
 
#else
2362
 
        prop = RNA_def_property(srna, "angle_limit", PROP_FLOAT, PROP_NONE);
2363
 
        RNA_def_property_float_sdna(prop, NULL, "bevel_angle");
2364
 
        RNA_def_property_range(prop, 0, 180);
2365
 
        RNA_def_property_ui_range(prop, 0, 180, 100, 2);
2366
 
#endif
2367
2360
        RNA_def_property_ui_text(prop, "Angle", "Angle above which to bevel edges");
2368
2361
        RNA_def_property_update(prop, 0, "rna_Modifier_update");
2369
2362
 
2370
 
#ifdef USE_BM_BEVEL_OP_AS_MOD
2371
2363
        prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
2372
2364
        RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
2373
2365
        RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
2375
2367
        RNA_def_property_update(prop, 0, "rna_Modifier_update");
2376
2368
 
2377
2369
        prop = RNA_def_property(srna, "use_clamp_overlap", PROP_BOOLEAN, PROP_NONE);
2378
 
        RNA_def_property_boolean_negative_sdna(prop, NULL, "flags", BME_BEVEL_OVERLAP_OK);
 
2370
        RNA_def_property_boolean_negative_sdna(prop, NULL, "flags", MOD_BEVEL_OVERLAP_OK);
2379
2371
        RNA_def_property_ui_text(prop, "Clamp Overlap", "Clamp the width to avoid overlap");
2380
2372
        RNA_def_property_update(prop, 0, "rna_Modifier_update");
2381
 
#endif
2382
 
 
2383
2373
}
2384
2374
 
2385
2375
static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
2592
2582
        RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
2593
2583
        RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
2594
2584
 
2595
 
        prop = RNA_def_property(srna, "use_relative", PROP_BOOLEAN, PROP_NONE);
2596
 
        RNA_def_property_boolean_sdna(prop, NULL, "originOpts", MOD_SIMPLEDEFORM_ORIGIN_LOCAL);
2597
 
        RNA_def_property_ui_text(prop, "Relative", "Set the origin of deform space to be relative to the object");
2598
 
        RNA_def_property_update(prop, 0, "rna_Modifier_update");
2599
 
 
2600
2585
        prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
2601
2586
        RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2602
2587
        RNA_def_property_ui_range(prop, -10, 10, 1, 3);
2797
2782
        RNA_def_property_update(prop, 0, "rna_Modifier_update");
2798
2783
 
2799
2784
        prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
2800
 
        RNA_def_property_ui_range(prop, 0, -M_PI * 2, M_PI * 2, 2);
 
2785
        RNA_def_property_ui_range(prop, -M_PI * 2, M_PI * 2, 2, -1);
2801
2786
        RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2802
2787
        RNA_def_property_ui_text(prop, "Angle", "Angle of revolution");
2803
2788
        RNA_def_property_update(prop, 0, "rna_Modifier_update");