Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-05-29 16:49:21 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-29 16:49:21 +0300
commitf7af08b5feecd89ea32c8905de1e61d575ff4bf1 (patch)
treeb23f8e58157285ce3c6287f664f66bfcba85a69d /source/blender/blenkernel/BKE_material.h
parentc72a204001ae32ab082af66b373ce19b64e28e2d (diff)
Cleanup: Get rid of G.main in BKE_material.
Note that in some cases, this only moves the G.main case to somne other places - in particular, RNA getters/setters are becoming annoying here...
Diffstat (limited to 'source/blender/blenkernel/BKE_material.h')
-rw-r--r--source/blender/blenkernel/BKE_material.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h
index f7850913014..431d1df1ff6 100644
--- a/source/blender/blenkernel/BKE_material.h
+++ b/source/blender/blenkernel/BKE_material.h
@@ -47,7 +47,7 @@ struct Scene;
void init_def_material(void);
void BKE_material_free(struct Material *ma);
void BKE_material_free_ex(struct Material *ma, bool do_id_user);
-void test_object_materials(struct Object *ob, struct ID *id);
+void test_object_materials(struct Main *bmain, struct Object *ob, struct ID *id);
void test_all_objects_materials(struct Main *bmain, struct ID *id);
void BKE_material_resize_object(struct Main *bmain, struct Object *ob, const short totcol, bool do_id_user);
void BKE_material_init(struct Material *ma);
@@ -79,13 +79,13 @@ enum {
};
struct Material *give_current_material(struct Object *ob, short act);
-void assign_material_id(struct ID *id, struct Material *ma, short act);
-void assign_material(struct Object *ob, struct Material *ma, short act, int assign_type);
-void assign_matarar(struct Object *ob, struct Material ***matar, short totcol);
+void assign_material_id(struct Main *bmain, struct ID *id, struct Material *ma, short act);
+void assign_material(struct Main *bmain, struct Object *ob, struct Material *ma, short act, int assign_type);
+void assign_matarar(struct Main *bmain, struct Object *ob, struct Material ***matar, short totcol);
short BKE_object_material_slot_find_index(struct Object *ob, struct Material *ma);
-bool BKE_object_material_slot_add(struct Object *ob);
-bool BKE_object_material_slot_remove(struct Object *ob);
+bool BKE_object_material_slot_add(struct Main *bmain, struct Object *ob);
+bool BKE_object_material_slot_remove(struct Main *bmain, struct Object *ob);
void BKE_texpaint_slot_refresh_cache(struct Scene *scene, struct Material *ma);
void BKE_texpaint_slots_refresh_object(struct Scene *scene, struct Object *ob);
@@ -97,7 +97,7 @@ struct Material *BKE_material_pop_id(struct Main *bmain, struct ID *id, int inde
void BKE_material_clear_id(struct Main *bmain, struct ID *id, bool update_data);
/* rendering */
-void init_render_material(struct Material *, int, float *);
+void init_render_material(struct Main *bmain, struct Material *, int, float *);
void init_render_materials(struct Main *, int r_mode, float *amd, bool do_default_material);
void end_render_material(struct Material *);
void end_render_materials(struct Main *);
@@ -112,8 +112,8 @@ void material_drivers_update(struct Scene *scene, struct Material *mat, float ct
/* copy/paste */
void clear_matcopybuf(void);
void free_matcopybuf(void);
-void copy_matcopybuf(struct Material *ma);
-void paste_matcopybuf(struct Material *ma);
+void copy_matcopybuf(struct Main *bmain, struct Material *ma);
+void paste_matcopybuf(struct Main *bmain, struct Material *ma);
/* handle backward compatibility for tface/materials called from doversion */
int do_version_tface(struct Main *main);