private string Get(string name) { string value = null; if (!OnlyDefault && CanSet) { var tenant = CoreBaseSettings.Standalone ? Tenant.DEFAULT_TENANT : TenantManager.GetCurrentTenant().TenantId; value = CoreSettings.GetSetting(GetSettingsKey(name), tenant); } if (string.IsNullOrEmpty(value)) { if (AllProps.ContainsKey(name)) { value = AllProps[name]; } } return(value); }
public bool TryGetValue(string key, out string value) { return(AllProps.TryGetValue(key, out value)); }
public bool ContainsKey(string key) { return(AllProps.ContainsKey(key)); }
public bool Remove(KeyValuePair <string, string> item) { return(AllProps.Remove(item.Key)); }
public bool Contains(KeyValuePair <string, string> item) { return(AllProps.Contains(item)); }
public IEnumerator <KeyValuePair <string, string> > GetEnumerator() { return(AllProps.GetEnumerator()); }
public static void LoadTrackedActorsAndProps() { List <OCIFolder> folders = scene_get_all_folders_raw(); AllActors.Clear(); AllProps.Clear(); foreach (OCIFolder fld in folders) { string fldName = fld.name; if (fldName.StartsWith(actor_folder_prefix)) { string actorAlias; string actorColor = "ffffff"; string actorTitle = null; // analysis actor tag var tagElements = fldName.Split(':'); if (tagElements.Length == 2) { actorAlias = tagElements[1]; } else if (tagElements.Length == 3) { actorAlias = tagElements[1]; actorColor = tagElements[2]; } else { actorAlias = tagElements[1]; actorColor = tagElements[2]; actorTitle = tagElements[3]; } if (!AllActors.ContainsKey(actorAlias)) { var hsociChar = NeoOCI.create_from_treenode(fld.treeNodeObject.parent.parent.parent); if (hsociChar is VNActor.Actor chara) { if (actorTitle is null) { actorTitle = hsociChar.text_name; } AllActors[actorAlias] = chara; //register_char(actorAlias, actorColor, actorTitle); StudioController.Instance.GetLogger.LogDebug("Registered actor: '" + actorAlias + "' as " + actorTitle + " (#" + actorColor + ")"); } } } else if (fldName.StartsWith(prop_folder_prefix)) { // analysis props tag string propAlias = fldName.Substring(prop_folder_prefix.Length).Trim(); // register props if (!AllProps.ContainsKey(propAlias)) { NeoOCI oci = NeoOCI.create_from_treenode(fld.treeNodeObject.parent); if (oci is Prop propOci) { AllProps[propAlias] = propOci; StudioController.Instance.GetLogger.LogDebug("Registered prop: '" + Utils.to_roman(propAlias) + "' as " + Utils.to_roman(oci.text_name)); } } } else if (fldName.StartsWith(light_folder_prefix)) { string propAlias = fldName.Substring(light_folder_prefix.Length).Trim(); // register props if (!AllProps.ContainsKey(propAlias)) { NeoOCI oci = NeoOCI.create_from_treenode(fld.treeNodeObject.child[0]); if (oci is VNActor.Light propOci) { AllProps[propAlias] = propOci; StudioController.Instance.GetLogger.LogDebug("Registered light: '" + Utils.to_roman(propAlias) + "' as " + Utils.to_roman(oci.text_name)); } } } } }