From eb4e3bbe68c8fb1d717d5f0380d61cd015de8767 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 20 Apr 2020 10:37:38 +0200 Subject: Simulations: Add new simulation data block This data block will be the container for simulation node trees. It will be used for the new particle node system (T73324). The new data block has the type `ID_SIM`. It is not visible to users and other developers by default yet. To enable it, activate the cmake option `WITH_NEW_SIMULATION_TYPE`. New simulation data blocks can be created by running `bpy.data.simulations.new("name")`. Reviewers: brecht Differential Revision: https://developer.blender.org/D7225 --- source/blender/blenkernel/intern/idtype.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenkernel/intern/idtype.c') diff --git a/source/blender/blenkernel/intern/idtype.c b/source/blender/blenkernel/intern/idtype.c index 5a6e8f532c9..fafd223a0e5 100644 --- a/source/blender/blenkernel/intern/idtype.c +++ b/source/blender/blenkernel/intern/idtype.c @@ -92,6 +92,7 @@ static void id_type_init(void) INIT_TYPE(ID_HA); INIT_TYPE(ID_PT); INIT_TYPE(ID_VO); + INIT_TYPE(ID_SIM); /* Special naughty boy... */ BLI_assert(IDType_ID_LINK_PLACEHOLDER.main_listbase_index == INDEX_ID_NULL); @@ -251,6 +252,7 @@ uint64_t BKE_idtype_idcode_to_idfilter(const short idcode) CASE_IDFILTER(PT); CASE_IDFILTER(LP); CASE_IDFILTER(SCE); + CASE_IDFILTER(SIM); CASE_IDFILTER(SPK); CASE_IDFILTER(SO); CASE_IDFILTER(TE); @@ -302,6 +304,7 @@ short BKE_idtype_idcode_from_idfilter(const uint64_t idfilter) CASE_IDFILTER(PT); CASE_IDFILTER(LP); CASE_IDFILTER(SCE); + CASE_IDFILTER(SIM); CASE_IDFILTER(SPK); CASE_IDFILTER(SO); CASE_IDFILTER(TE); @@ -356,6 +359,7 @@ int BKE_idtype_idcode_to_index(const short idcode) CASE_IDINDEX(LP); CASE_IDINDEX(SCE); CASE_IDINDEX(SCR); + CASE_IDINDEX(SIM); CASE_IDINDEX(SPK); CASE_IDINDEX(SO); CASE_IDINDEX(TE); @@ -417,6 +421,7 @@ short BKE_idtype_idcode_from_index(const int index) CASE_IDCODE(LP); CASE_IDCODE(SCE); CASE_IDCODE(SCR); + CASE_IDCODE(SIM); CASE_IDCODE(SPK); CASE_IDCODE(SO); CASE_IDCODE(TE); -- cgit v1.2.3