mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	-Many fixes to VisualScript, fixed property names, etc.
-Added ability to set/get a field in GetSet, as well as assignment ops -Added a Select node -Fixed update bugs related to variable list and exported properties, closes #9458
This commit is contained in:
		
							parent
							
								
									e2e73ec906
								
							
						
					
					
						commit
						2a3e00c8c7
					
				
					 36 changed files with 1091 additions and 295 deletions
				
			
		|  | @ -140,7 +140,7 @@ VisualScriptNode::TypeGuess VisualScriptNode::guess_output_type(TypeGuess *p_inp | |||
| 
 | ||||
| 	tg.type = pinfo.type; | ||||
| 	if (pinfo.hint == PROPERTY_HINT_RESOURCE_TYPE) { | ||||
| 		tg.GDCLASS = pinfo.hint_string; | ||||
| 		tg.gdclass = pinfo.hint_string; | ||||
| 	} | ||||
| 
 | ||||
| 	return tg; | ||||
|  | @ -660,6 +660,9 @@ void VisualScript::set_variable_export(const StringName &p_name, bool p_export) | |||
| 	ERR_FAIL_COND(!variables.has(p_name)); | ||||
| 
 | ||||
| 	variables[p_name]._export = p_export; | ||||
| #ifdef TOOLS_ENABLED | ||||
| 	_update_placeholders(); | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
| bool VisualScript::get_variable_export(const StringName &p_name) const { | ||||
|  | @ -1067,9 +1070,11 @@ void VisualScript::get_script_property_list(List<PropertyInfo> *p_list) const { | |||
| 	get_variable_list(&vars); | ||||
| 
 | ||||
| 	for (List<StringName>::Element *E = vars.front(); E; E = E->next()) { | ||||
| 		if (!variables[E->get()]._export) | ||||
| 			continue; | ||||
| 		p_list->push_back(variables[E->get()].info); | ||||
| 		//if (!variables[E->get()]._export)
 | ||||
| 		//	continue;
 | ||||
| 		PropertyInfo pi = variables[E->get()].info; | ||||
| 		pi.usage |= PROPERTY_USAGE_SCRIPT_VARIABLE; | ||||
| 		p_list->push_back(pi); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  | @ -1358,6 +1363,7 @@ void VisualScriptInstance::get_property_list(List<PropertyInfo> *p_properties) c | |||
| 			continue; | ||||
| 		PropertyInfo p = E->get().info; | ||||
| 		p.name = String(E->key()); | ||||
| 		p.usage |= PROPERTY_USAGE_SCRIPT_VARIABLE; | ||||
| 		p_properties->push_back(p); | ||||
| 	} | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Juan Linietsky
						Juan Linietsky