SonyWWS / ATF

Authoring Tools Framework (ATF) is a set of C#/.NET components for making tools on Windows. ATF has been in continuous development in Sony Computer Entertainment's (SCE) Worldwide Studios central tools group since early 2005. ATF has been used by most SCE first party studios to make many custom tools such as Naughty Dog’s level editor and shader editor for The Last of Us, Guerrilla Games’ sequence editor for Killzone games (including the Killzone: Shadow Fall PS4 launch title), an animation blending tool at Santa Monica Studio, a level editor at Bend Studio, a visual state machine editor for Quantic Dream, sound editing tools, and many others.
Apache License 2.0
1.89k stars 262 forks source link

Property Editor which enumerates based on XPath #4

Closed pdrasko closed 10 years ago

pdrasko commented 10 years ago

Does ATF support a Property Editor which would enumerate based on an XPath evaluation?

abeckus commented 10 years ago

Hi pdrasko,

ATF PropertyEditor uses the following editors to handle enums. public class LongEnumEditor : IPropertyEditor, IAnnotatedParams and public class FlagsUITypeEditor : UITypeEditor, IAnnotatedParams

Browse the source and docs for more info.

Both classes have a public method used to define enums names and values. Instantiate either one using default constructor then call public void DefineEnum(string[] names, int[] values) to populate enum names and values.

Look at SchemaLoader.cs in DomPropertyEditorSample. The SchemaLoader.cs shows how to expose DomNode properties to PropertyEditor.

Most of the PropertyDescriptors made to work on DomNode if you are not planning to use ATF Dom then you need to implement your own Descriptors.

pdrasko commented 10 years ago

Thanks,

I extended the FlagsUITypeEditor class to suit my needs.