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

CircuitEditor: DefineModuleType Enhancement #19

Closed vkashkash closed 10 years ago

vkashkash commented 10 years ago

Hello,

I am creating new types inheriting off moduleType in the XSD and I found a few possible enhancements to DefineModuleType in ModulePlugin.cs that you may want to implement:

I have made these changes locally and they seem to be fine except for a small rendering issue. When having a module with no inputs/outputs and no image name, the module renders correctly except for the fact that it still renders the line. Can we not render the line if this is the case?

group

Thanks

jhshen commented 10 years ago

I agree with you that the separate line between title and contents should not be drawn when the element has empty contents.

I have submitted a fix for Ron to review. It should be checked into GitHub by tomorrow.

Thanks,

Shen

vkashkash commented 10 years ago

Thanks for the quick response. What do you think of the other changes (support for null image and passing in a DomNodeType)?

jhshen commented 10 years ago

I checked in a change "Extract circuit type metadata creation in DefineModuleType() to a new method DefineCircuitType() to allow null image name, and different base types other than Schema.moduleType.Type". You need to call DefineCircuitType() directly in your code. I hope this meets your needs; let us know otherwise. Thanks,

Shen

vkashkash commented 10 years ago

Thanks for the line drawing fix.

Regarding DefineCircuitType, I actually also wanted to add an item to m_paletteService as well as the loader. On my local change, I added a new parameter DomNodeType nodeType and added the check for a null/empty image name. This allows for the exact same logic as before, but now I can pass in any type.

For my app, I am trying to inherit as much as possible from the CircuitEditor so I can make it easier to update any changes. Although I do have solutions for some of the issues I am bringing up, I would prefer they would go in the CircuitEditor classes. On this note, can you also make DefineModuleType protected. This will allow people to inherit from ModulePlugin and create new types without having to modify CircuitEditor's version. This would also require access to m_schemaLoader. Lastly, in order to get correct initialization, I made IInitializable.Initialize call a virtual Initialize function. This allows a derived class to correctly initialize the base as well as itself.

Once again, thanks for the quick response to my issues/requests.

jhshen commented 10 years ago

I have checked in a new version of ModulePlugin.cs to address the issues you mentioned above. Thanks for sharing your thoughts, and it's always nice to share the source wherever possible.

Shen

vkashkash commented 10 years ago

Thanks Shen. All the changes seem to be working.

jhshen commented 10 years ago

Glad to hear that.

vkashkash commented 10 years ago

I just noticed that the line does not get drawn when there is a node with an output. I think the previous functionality would still draw a line when there was at least one input/output.

jhshen commented 10 years ago

Thanks for reporting the new problem. I checked in fix "Improved estimation for empty-content node height".