~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to release/scripts/startup/bl_ui/properties_material.py

  • 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:
77
77
        slot = item
78
78
        ma = slot.material
79
79
        if self.layout_type in {'DEFAULT', 'COMPACT'}:
80
 
            layout.label(text=ma.name if ma else "", translate=False, icon_value=icon)
 
80
            if ma:
 
81
                layout.prop(ma, "name", text="", emboss=False, icon_value=icon)
 
82
            else:
 
83
                layout.label(text="", icon_value=icon)
81
84
            if ma and not context.scene.render.use_shading_nodes:
82
85
                manode = ma.active_node_material
83
86
                if manode:
124
127
        if ob:
125
128
            row = layout.row()
126
129
 
127
 
            row.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=2)
 
130
            row.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=1)
128
131
 
129
132
            col = row.column(align=True)
130
133
            col.operator("object.material_slot_add", icon='ZOOMIN', text="")
409
412
        col.active = (not mat.use_shadeless)
410
413
        col.prop(rayt, "fresnel")
411
414
        sub = col.column()
412
 
        sub.active = rayt.fresnel > 0
 
415
        sub.active = (rayt.fresnel > 0.0)
413
416
        sub.prop(rayt, "fresnel_factor", text="Blend")
414
417
 
415
418
        if base_mat.transparency_method == 'RAYTRACE':
466
469
        col = split.column()
467
470
        col.prop(raym, "fresnel")
468
471
        sub = col.column()
469
 
        sub.active = raym.fresnel > 0
 
472
        sub.active = (raym.fresnel > 0.0)
470
473
        sub.prop(raym, "fresnel_factor", text="Blend")
471
474
 
472
475
        split = layout.split()
477
480
        col.prop(raym, "distance", text="Max Dist")
478
481
        col.separator()
479
482
        sub = col.split(percentage=0.4)
480
 
        sub.active = raym.distance > 0.0
 
483
        sub.active = (raym.distance > 0.0)
481
484
        sub.label(text="Fade To:")
482
485
        sub.prop(raym, "fade_to", text="")
483
486
 
485
488
        col.label(text="Gloss:")
486
489
        col.prop(raym, "gloss_factor", text="Amount")
487
490
        sub = col.column()
488
 
        sub.active = raym.gloss_factor < 1.0
 
491
        sub.active = (raym.gloss_factor < 1.0)
489
492
        sub.prop(raym, "gloss_threshold", text="Threshold")
490
493
        sub.prop(raym, "gloss_samples", text="Samples")
491
494
        sub.prop(raym, "gloss_anisotropic", text="Anisotropic")