diff options
5 files changed, 6 insertions, 4 deletions
diff --git a/release/ui/buttons_data_mesh.py b/release/ui/buttons_data_mesh.py index e5c1b8fc9ee..6f64de312ed 100644 --- a/release/ui/buttons_data_mesh.py +++ b/release/ui/buttons_data_mesh.py @@ -62,7 +62,7 @@ class DATA_PT_materials(DataButtonsPanel): row = layout.row() - row.template_list(ob, "materials", "active_material_index", items=10) + row.template_list(ob, "materials", "active_material_index") col = row.column(align=True) col.itemO("OBJECT_OT_material_slot_add", icon="ICON_ZOOMIN", text="") diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index a27788530ce..4dcf1590a65 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1617,7 +1617,8 @@ void uiTemplateList(uiLayout *layout, PointerRNA *ptr, char *propname, char *act uiBlockSetEmboss(block, UI_EMBOSSN); len= RNA_property_collection_length(ptr, prop); - CLAMP(scroll, 1, len); + scroll= MIN2(scroll, len-items+1); + scroll= MAX2(scroll, 1); RNA_BEGIN(ptr, itemptr, propname) { if(i >= scroll && i<scroll+items) { diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index cba9a4cf8fc..01794d1bba8 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -552,7 +552,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r if(ptr) { Object *ob= ptr->data; - if(ob && ob->type && (ob->type<OB_LAMP)) + if(ob && ob->type && (ob->type<OB_LAMP) && ob->totcol) CTX_data_pointer_set(result, &ob->id, &RNA_MaterialSlot, ob->mat+ob->actcol-1); } diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 8aa955f0b34..a08a23c1263 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -383,6 +383,7 @@ static void image_editcursor_buts(const bContext *C, View2D *v2d, uiBlock *block } } +#if 0 static void image_panel_view_properties(const bContext *C, Panel *pa) { SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); @@ -439,6 +440,7 @@ static void image_panel_view_properties(const bContext *C, Panel *pa) } image_editcursor_buts(C, &ar->v2d, block); } +#endif void brush_buttons(const bContext *C, uiBlock *block, short fromsima, int evt_nop, int evt_change, diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index ea9fb66dae0..05490e2fce1 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -3566,7 +3566,6 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv static void draw_particle_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, ParticleSystem *psys, int dt) { - ToolSettings *ts= scene->toolsettings; ParticleEdit *edit = psys->edit; ParticleData *pa; ParticleCacheKey **path; |