~ubuntu-branches/ubuntu/trusty/blender/trusty-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2013-08-14 10:43:49 UTC
  • mfrom: (14.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20130814104349-t1d5mtwkphp12dyj
Tags: 2.68a-3
* Upload to unstable
* debian/: python3.3 Depends simplified
  - debian/control: python3.3 Depends dropped
    for blender-data package
  - 0001-blender_thumbnailer.patch refreshed
* debian/control: libavcodec b-dep versioning dropped

Show diffs side-by-side

added added

removed removed

Lines of Context:
279
279
        return BLI_strdup("tool_settings.particle_edit.brush");
280
280
}
281
281
 
 
282
static void rna_Paint_brush_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
 
283
{
 
284
        Brush *br = (Brush *)ptr->data;
 
285
        BKE_paint_invalidate_overlay_all();
 
286
        WM_main_add_notifier(NC_BRUSH | NA_EDITED, br);
 
287
}
282
288
#else
283
289
 
284
290
static void rna_def_paint(BlenderRNA *brna)
294
300
        RNA_def_property_flag(prop, PROP_EDITABLE);
295
301
        RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Brush_mode_poll");
296
302
        RNA_def_property_ui_text(prop, "Brush", "Active Brush");
297
 
        RNA_def_property_update(prop, NC_BRUSH | NA_EDITED, NULL);
 
303
        RNA_def_property_update(prop, 0, "rna_Paint_brush_update");
298
304
 
299
305
        prop = RNA_def_property(srna, "show_brush", PROP_BOOLEAN, PROP_NONE);
300
306
        RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_SHOW_BRUSH);
310
316
 
311
317
        prop = RNA_def_property(srna, "input_samples", PROP_INT, PROP_UNSIGNED);
312
318
        RNA_def_property_int_sdna(prop, NULL, "num_input_samples");
313
 
        RNA_def_property_ui_range(prop, 1, PAINT_MAX_INPUT_SAMPLES, 0, 0);
 
319
        RNA_def_property_ui_range(prop, 1, PAINT_MAX_INPUT_SAMPLES, 0, -1);
314
320
        RNA_def_property_ui_text(prop, "Input Samples", "Average multiple input samples together to smooth the brush stroke");
315
321
}
316
322
 
379
385
        RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Sculpt_ShowDiffuseColor_update");
380
386
 
381
387
        prop = RNA_def_property(srna, "detail_size", PROP_INT, PROP_NONE);
382
 
        RNA_def_property_ui_range(prop, 2, 100, 0, 0);
 
388
        RNA_def_property_ui_range(prop, 2, 100, 0, -1);
383
389
        RNA_def_property_ui_text(prop, "Detail Size", "Maximum edge length for dynamic topology sculpting (in pixels)");
384
390
 
385
391
        prop = RNA_def_property(srna, "use_smooth_shading", PROP_BOOLEAN, PROP_NONE);
438
444
        /* weight paint only */
439
445
        prop = RNA_def_property(srna, "use_group_restrict", PROP_BOOLEAN, PROP_NONE);
440
446
        RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_ONLYVGROUP);
441
 
        RNA_def_property_ui_text(prop, "Restrict", "Restrict painting to verts already apart of the vertex group");
 
447
        RNA_def_property_ui_text(prop, "Restrict", "Restrict painting to vertices in the group");
442
448
}
443
449
 
444
450
static void rna_def_image_paint(BlenderRNA *brna)
451
457
        RNA_def_struct_path_func(srna, "rna_ImagePaintSettings_path");
452
458
        RNA_def_struct_ui_text(srna, "Image Paint", "Properties of image and texture painting mode");
453
459
        
454
 
        /* booleans */
455
 
        prop = RNA_def_property(srna, "use_projection", PROP_BOOLEAN, PROP_NONE);
456
 
        RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_DISABLE);
457
 
        RNA_def_property_ui_text(prop, "Project Paint",
458
 
                                 "Use projection painting for improved consistency in the brush strokes");
459
 
        
 
460
        /* booleans */  
460
461
        prop = RNA_def_property(srna, "use_occlude", PROP_BOOLEAN, PROP_NONE);
461
462
        RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_XRAY);
462
463
        RNA_def_property_ui_text(prop, "Occlude", "Only paint onto the faces directly under the brush (slower)");
485
486
        /* integers */
486
487
        
487
488
        prop = RNA_def_property(srna, "seam_bleed", PROP_INT, PROP_UNSIGNED);
488
 
        RNA_def_property_ui_range(prop, 0, 8, 0, 0);
 
489
        RNA_def_property_ui_range(prop, 0, 8, 0, -1);
489
490
        RNA_def_property_ui_text(prop, "Bleed", "Extend paint beyond the faces UVs to reduce seams (in pixels, slower)");
490
491
 
491
492
        prop = RNA_def_property(srna, "normal_angle", PROP_INT, PROP_UNSIGNED);