From ee0bc7b7ff1ba586486afe095966394a6c1ae100 Mon Sep 17 00:00:00 2001 From: Maikel de Vries Date: Mon, 2 Mar 2015 20:42:34 +0100 Subject: [PATCH] introduce a constant for no category --- docs/sdk/definition/category.xml | 5 +++++ docs/sdk/script/fn/C4D_None.xml | 19 +++++++++++++++++ src/object/C4Def.cpp | 1 + src/object/C4Def.h | 35 ++++++++++++++++---------------- src/object/C4ObjectScript.cpp | 1 + 5 files changed, 44 insertions(+), 17 deletions(-) create mode 100644 docs/sdk/script/fn/C4D_None.xml diff --git a/docs/sdk/definition/category.xml b/docs/sdk/definition/category.xml index 56ddd13a7..56b3e7e19 100644 --- a/docs/sdk/definition/category.xml +++ b/docs/sdk/definition/category.xml @@ -15,6 +15,11 @@ Description Default plane + + C4D_None + No category. + + C4D_StaticBack Immovable object. diff --git a/docs/sdk/script/fn/C4D_None.xml b/docs/sdk/script/fn/C4D_None.xml new file mode 100644 index 000000000..c82c412a2 --- /dev/null +++ b/docs/sdk/script/fn/C4D_None.xml @@ -0,0 +1,19 @@ + + + + + + C4D_None + Objects + Category + 6.0 OC + int + No category, can be used for GUI and HUD objects. Only set this category for an object if you are aware of the consequences. + + GetCategory + SetCategory + + + Maikel2015 + diff --git a/src/object/C4Def.cpp b/src/object/C4Def.cpp index 7b05c407b..61abc892c 100644 --- a/src/object/C4Def.cpp +++ b/src/object/C4Def.cpp @@ -197,6 +197,7 @@ void C4Def::CompileFunc(StdCompiler *pComp) const StdBitfieldEntry Categories[] = { + { "C4D_None", C4D_None }, { "C4D_StaticBack", C4D_StaticBack }, { "C4D_Structure", C4D_Structure }, { "C4D_Vehicle", C4D_Vehicle }, diff --git a/src/object/C4Def.h b/src/object/C4Def.h index 48d91472b..ce7415ffa 100644 --- a/src/object/C4Def.h +++ b/src/object/C4Def.h @@ -38,26 +38,27 @@ #include const int32_t -C4D_All = ~0, -C4D_StaticBack = 1<<0, -C4D_Structure = 1<<1, -C4D_Vehicle = 1<<2, -C4D_Living = 1<<3, -C4D_Object = 1<<4, +C4D_None = 0, +C4D_All = ~0, +C4D_StaticBack = 1<<0, +C4D_Structure = 1<<1, +C4D_Vehicle = 1<<2, +C4D_Living = 1<<3, +C4D_Object = 1<<4, -C4D_Goal = 1<<5, -C4D_Rule = 1<<6, -C4D_Environment = 1<<7, +C4D_Goal = 1<<5, +C4D_Rule = 1<<6, +C4D_Environment = 1<<7, -C4D_Background = 1<<12, -C4D_Parallax = 1<<13, -C4D_MouseSelect = 1<<14, -C4D_Foreground = 1<<15, -C4D_MouseIgnore = 1<<16, -C4D_IgnoreFoW = 1<<17, +C4D_Background = 1<<12, +C4D_Parallax = 1<<13, +C4D_MouseSelect = 1<<14, +C4D_Foreground = 1<<15, +C4D_MouseIgnore = 1<<16, +C4D_IgnoreFoW = 1<<17, -C4D_SortLimit = C4D_StaticBack | C4D_Structure | C4D_Vehicle | C4D_Living | C4D_Object - | C4D_Background | C4D_Foreground; +C4D_SortLimit = C4D_StaticBack | C4D_Structure | C4D_Vehicle | C4D_Living | C4D_Object + | C4D_Background | C4D_Foreground; const int32_t C4Plane_Structure = 200; diff --git a/src/object/C4ObjectScript.cpp b/src/object/C4ObjectScript.cpp index 634d67c61..f6b42c26e 100644 --- a/src/object/C4ObjectScript.cpp +++ b/src/object/C4ObjectScript.cpp @@ -2343,6 +2343,7 @@ static bool FnCreateParticleAtBone(C4Object* Obj, C4String* szName, C4String* sz C4ScriptConstDef C4ScriptObjectConstMap[]= { + { "C4D_None" ,C4V_Int, C4D_None}, { "C4D_All" ,C4V_Int, C4D_All}, { "C4D_StaticBack" ,C4V_Int, C4D_StaticBack}, { "C4D_Structure" ,C4V_Int, C4D_Structure},