A major code update for making the DNA file specification of Freestyle settings
and RNA for it independent of the build flag for enabling Freestyle. Suggested by Sergey Sharybin through a code review of the branch. * Many #ifdef WITH_FREESTYLE blocks were removed to always have Freestyle-specific DNA file specification and RNA for it built in Blender. This will allow Freestyle setting survive even when a non-Freestyle build is used for loading and saving files. It is noted that operations are still conditionally built through #ifdef WITH_FREESTYLE blocks. * To this end, new blenkernel files BKE_freestyle.h and intern/freestyle.c have been added. All API functions in FRS_freestyle_config.h as well as some of those in FRS_freestyle.h were moved to the new files. Now the relocated API functions have BKE_ prefix instead of FRS_.
This commit is contained in:
@@ -57,9 +57,7 @@ EnumPropertyItem id_type_items[] = {
|
||||
{ID_KE, "KEY", ICON_SHAPEKEY_DATA, "Key", ""},
|
||||
{ID_LA, "LAMP", ICON_LAMP_DATA, "Lamp", ""},
|
||||
{ID_LI, "LIBRARY", ICON_LIBRARY_DATA_DIRECT, "Library", ""},
|
||||
#ifdef WITH_FREESTYLE
|
||||
{ID_LS, "LINESTYLE", ICON_PARTICLE_DATA, "FreestyleLineStyle", ""}, /* FIXME proper icon */
|
||||
#endif
|
||||
{ID_LT, "LATTICE", ICON_LATTICE_DATA, "Lattice", ""},
|
||||
{ID_MA, "MATERIAL", ICON_MATERIAL_DATA, "Material", ""},
|
||||
{ID_MB, "META", ICON_META_DATA, "MetaBall", ""},
|
||||
@@ -135,9 +133,7 @@ short RNA_type_to_ID_code(StructRNA *type)
|
||||
if (RNA_struct_is_a(type, &RNA_Key)) return ID_KE;
|
||||
if (RNA_struct_is_a(type, &RNA_Lamp)) return ID_LA;
|
||||
if (RNA_struct_is_a(type, &RNA_Library)) return ID_LI;
|
||||
#ifdef WITH_FREESTYLE
|
||||
if (RNA_struct_is_a(type, &RNA_FreestyleLineStyle)) return ID_LS;
|
||||
#endif
|
||||
if (RNA_struct_is_a(type, &RNA_Lattice)) return ID_LT;
|
||||
if (RNA_struct_is_a(type, &RNA_Material)) return ID_MA;
|
||||
if (RNA_struct_is_a(type, &RNA_MetaBall)) return ID_MB;
|
||||
@@ -174,9 +170,7 @@ StructRNA *ID_code_to_RNA_type(short idcode)
|
||||
case ID_KE: return &RNA_Key;
|
||||
case ID_LA: return &RNA_Lamp;
|
||||
case ID_LI: return &RNA_Library;
|
||||
#ifdef WITH_FREESTYLE
|
||||
case ID_LS: return &RNA_FreestyleLineStyle;
|
||||
#endif
|
||||
case ID_LT: return &RNA_Lattice;
|
||||
case ID_MA: return &RNA_Material;
|
||||
case ID_MB: return &RNA_MetaBall;
|
||||
|
||||
Reference in New Issue
Block a user