diff options
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/animation.cpp | 4 | ||||
-rw-r--r-- | scene/resources/packed_scene.cpp | 2 | ||||
-rw-r--r-- | scene/resources/shader_graph.cpp | 4 | ||||
-rw-r--r-- | scene/resources/theme.cpp | 18 |
4 files changed, 19 insertions, 9 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 0f11a66703..095406dad9 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -1216,8 +1216,8 @@ T Animation::_interpolate( const Vector< TKey<T> >& p_keys, float p_time, Inter if (p_ok) *p_ok=true; - - int next; + + int next=0; float c=0; // prepare for all cases of interpolation diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 9f36510739..a1cb1205e5 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -182,6 +182,8 @@ Node *PackedScene::instance(bool p_gen_edit_state) const { if (get_path()!="" && get_path().find("::")==-1) s->set_filename(get_path()); + + s->notification(Node::NOTIFICATION_INSTANCED); return ret_nodes[0]; } diff --git a/scene/resources/shader_graph.cpp b/scene/resources/shader_graph.cpp index 131b0e193f..24d5978856 100644 --- a/scene/resources/shader_graph.cpp +++ b/scene/resources/shader_graph.cpp @@ -2160,7 +2160,7 @@ void ShaderGraph::_add_node_code(ShaderType p_type,Node *p_node,const Vector<Str "floor($)", "round($)", "ceil($)", - "frac($)", + "fract($)", "min(max($,0),1)", "-($)", }; @@ -2378,7 +2378,7 @@ void ShaderGraph::_add_node_code(ShaderType p_type,Node *p_node,const Vector<Str String name = p_node->param1; Vector3 dv=p_node->param2; - code +="uniform float "+name+"=vec3("+rtos(dv.x)+","+rtos(dv.y)+","+rtos(dv.z)+");\n"; + code +="uniform vec3 "+name+"=vec3("+rtos(dv.x)+","+rtos(dv.y)+","+rtos(dv.z)+");\n"; code += OUTNAME(p_node->id,0)+"="+name+";\n"; }break; case NODE_RGB_INPUT: { diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp index 8350bf8cc8..21bdb6c0ab 100644 --- a/scene/resources/theme.cpp +++ b/scene/resources/theme.cpp @@ -105,6 +105,9 @@ bool Theme::_get(const StringName& p_name,Variant &r_ret) const { void Theme::_get_property_list( List<PropertyInfo> *p_list) const { + + List<PropertyInfo> list; + const StringName *key=NULL; while((key=icon_map.next(key))) { @@ -113,7 +116,7 @@ void Theme::_get_property_list( List<PropertyInfo> *p_list) const { while((key2=icon_map[*key].next(key2))) { - p_list->push_back( PropertyInfo( Variant::OBJECT, String()+*key+"/icons/"+*key2, PROPERTY_HINT_RESOURCE_TYPE, "Texture" ) ); + list.push_back( PropertyInfo( Variant::OBJECT, String()+*key+"/icons/"+*key2, PROPERTY_HINT_RESOURCE_TYPE, "Texture" ) ); } } @@ -125,7 +128,7 @@ void Theme::_get_property_list( List<PropertyInfo> *p_list) const { while((key2=style_map[*key].next(key2))) { - p_list->push_back( PropertyInfo( Variant::OBJECT, String()+*key+"/styles/"+*key2, PROPERTY_HINT_RESOURCE_TYPE, "StyleBox" ) ); + list.push_back( PropertyInfo( Variant::OBJECT, String()+*key+"/styles/"+*key2, PROPERTY_HINT_RESOURCE_TYPE, "StyleBox" ) ); } } @@ -138,7 +141,7 @@ void Theme::_get_property_list( List<PropertyInfo> *p_list) const { while((key2=font_map[*key].next(key2))) { - p_list->push_back( PropertyInfo( Variant::OBJECT, String()+*key+"/fonts/"+*key2, PROPERTY_HINT_RESOURCE_TYPE, "Font" ) ); + list.push_back( PropertyInfo( Variant::OBJECT, String()+*key+"/fonts/"+*key2, PROPERTY_HINT_RESOURCE_TYPE, "Font" ) ); } } @@ -150,7 +153,7 @@ void Theme::_get_property_list( List<PropertyInfo> *p_list) const { while((key2=color_map[*key].next(key2))) { - p_list->push_back( PropertyInfo( Variant::COLOR, String()+*key+"/colors/"+*key2 ) ); + list.push_back( PropertyInfo( Variant::COLOR, String()+*key+"/colors/"+*key2 ) ); } } @@ -162,9 +165,14 @@ void Theme::_get_property_list( List<PropertyInfo> *p_list) const { while((key2=constant_map[*key].next(key2))) { - p_list->push_back( PropertyInfo( Variant::INT, String()+*key+"/constants/"+*key2 ) ); + list.push_back( PropertyInfo( Variant::INT, String()+*key+"/constants/"+*key2 ) ); } } + + list.sort(); + for(List<PropertyInfo>::Element *E=list.front();E;E=E->next()) { + p_list->push_back(E->get()); + } } |