MCPcopy Create free account
hub / github.com/baldurk/renderdoc / SaveEdits

Method SaveEdits

qrenderdoc/Code/CaptureContext.cpp:1975–1997  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1973}
1974
1975bool CaptureContext::SaveEdits()
1976{
1977 // make sure this format matches SetCaptureFileComments in app_api.cpp if it changes
1978 QVariantList editors;
1979
1980 for(ShaderViewer *e : m_ShaderEditors)
1981 {
1982 QVariantMap editor = e->SaveEditor();
1983 if(!editor.isEmpty())
1984 editors.push_back(e->SaveEditor());
1985 }
1986
1987 QVariantMap root;
1988 root[lit("editors")] = editors;
1989
1990 QString json = VariantToJSON(root);
1991
1992 SectionProperties props;
1993 props.type = SectionType::EditedShaders;
1994 props.version = 1;
1995
1996 return Replay().GetCaptureFile()->WriteSection(props, json.toUtf8()).OK();
1997}
1998
1999void CaptureContext::LoadEdits(const QString &data)
2000{

Callers

nothing calls this directly

Calls 7

VariantToJSONFunction · 0.85
SaveEditorMethod · 0.80
GetCaptureFileMethod · 0.80
toUtf8Method · 0.80
isEmptyMethod · 0.45
push_backMethod · 0.45
WriteSectionMethod · 0.45

Tested by

no test coverage detected