diff options
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index a0d2a76a82d..7bfd5cf61c7 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -414,7 +414,7 @@ int rna_IDMaterials_assign_int(PointerRNA *ptr, int key, const PointerRNA *assig short *totcol = give_totcolp_id(id); Material *mat_id = assign_ptr->id.data; if (totcol && (key >= 0 && key < *totcol)) { - assign_material_id(id, mat_id, key + 1); + assign_material_id(G.main, id, mat_id, key + 1); return 1; } else { diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 4aa4eddaddb..18a69ca4d88 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -244,7 +244,7 @@ static Object *rna_Main_objects_new(Main *bmain, ReportList *reports, const char id_us_min(&ob->id); ob->data = data; - test_object_materials(ob, ob->data); + test_object_materials(bmain, ob, ob->data); return ob; } diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 49d8bd796d9..b1fcfcb9aa6 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -393,7 +393,7 @@ static void rna_Object_data_set(PointerRNA *ptr, PointerRNA value) } } else if (ob->type == OB_MESH) { - BKE_mesh_assign_object(ob, (Mesh *)id); + BKE_mesh_assign_object(G.main, ob, (Mesh *)id); } else { if (ob->data) { @@ -405,7 +405,7 @@ static void rna_Object_data_set(PointerRNA *ptr, PointerRNA value) id_us_plus(id); ob->data = id; - test_object_materials(ob, id); + test_object_materials(G.main, ob, id); if (GS(id->name) == ID_CU) BKE_curve_type_test(ob); @@ -713,7 +713,7 @@ static void rna_Object_active_material_set(PointerRNA *ptr, PointerRNA value) Object *ob = (Object *)ptr->id.data; DAG_id_tag_update(value.data, 0); - assign_material(ob, value.data, ob->actcol, BKE_MAT_ASSIGN_EXISTING); + assign_material(G.main, ob, value.data, ob->actcol, BKE_MAT_ASSIGN_EXISTING); } static int rna_Object_active_material_editable(PointerRNA *ptr, const char **UNUSED(r_info)) @@ -885,7 +885,7 @@ static void rna_MaterialSlot_material_set(PointerRNA *ptr, PointerRNA value) Object *ob = (Object *)ptr->id.data; int index = (Material **)ptr->data - ob->mat; - assign_material(ob, value.data, index + 1, BKE_MAT_ASSIGN_EXISTING); + assign_material(G.main, ob, value.data, index + 1, BKE_MAT_ASSIGN_EXISTING); } static int rna_MaterialSlot_link_get(PointerRNA *ptr) |