diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-06-29 00:29:49 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-06-29 00:29:49 -0300 |
commit | 95047562d743b1c1fdc007432c8a0c145a455c5d (patch) | |
tree | f563e5c900c4330fcc602b6e5a721bc63022b253 /scene | |
parent | 2b64f73b0459190d20b2f6de39275ee7979317c4 (diff) |
Several performance improvements, mainly in loading and instancing scenes and resources.
A general speedup should be apparent, with even more peformance increase when compiling optimized.
WARNING: Tested and it seems to work, but if something breaks, please report.
Diffstat (limited to 'scene')
31 files changed, 221 insertions, 177 deletions
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index e350a34013..0b00ac9560 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -330,11 +330,11 @@ void AnimatedSprite::_bind_methods() { ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "frames",PROPERTY_HINT_RESOURCE_TYPE,"SpriteFrames"), _SCS("set_sprite_frames"),_SCS("get_sprite_frames")); ADD_PROPERTYNZ( PropertyInfo( Variant::INT, "frame",PROPERTY_HINT_SPRITE_FRAME), _SCS("set_frame"),_SCS("get_frame")); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "centered"), _SCS("set_centered"),_SCS("is_centered")); + ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "centered"), _SCS("set_centered"),_SCS("is_centered")); ADD_PROPERTYNZ( PropertyInfo( Variant::VECTOR2, "offset"), _SCS("set_offset"),_SCS("get_offset")); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "flip_h"), _SCS("set_flip_h"),_SCS("is_flipped_h")); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "flip_v"), _SCS("set_flip_v"),_SCS("is_flipped_v")); - ADD_PROPERTY( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate")); + ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "flip_h"), _SCS("set_flip_h"),_SCS("is_flipped_h")); + ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "flip_v"), _SCS("set_flip_v"),_SCS("is_flipped_v")); + ADD_PROPERTYNO( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate")); } diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index f9e79e25bc..c44b46adbf 100644 --- a/scene/2d/area_2d.cpp +++ b/scene/2d/area_2d.cpp @@ -428,8 +428,9 @@ void Area2D::set_enable_monitoring(bool p_enable) { if (monitoring) { - Physics2DServer::get_singleton()->area_set_monitor_callback(get_rid(),this,"_body_inout"); - Physics2DServer::get_singleton()->area_set_area_monitor_callback(get_rid(),this,"_area_inout"); + Physics2DServer::get_singleton()->area_set_monitor_callback(get_rid(),this,SceneStringNames::get_singleton()->_body_inout); + Physics2DServer::get_singleton()->area_set_area_monitor_callback(get_rid(),this,SceneStringNames::get_singleton()->_area_inout); + } else { Physics2DServer::get_singleton()->area_set_monitor_callback(get_rid(),NULL,StringName()); Physics2DServer::get_singleton()->area_set_area_monitor_callback(get_rid(),NULL,StringName()); @@ -652,17 +653,17 @@ void Area2D::_bind_methods() { ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"space_override",PROPERTY_HINT_ENUM,"Disabled,Combine,Replace"),_SCS("set_space_override_mode"),_SCS("get_space_override_mode")); - ADD_PROPERTY( PropertyInfo(Variant::BOOL,"gravity_point"),_SCS("set_gravity_is_point"),_SCS("is_gravity_a_point")); - ADD_PROPERTY( PropertyInfo(Variant::REAL,"gravity_distance_scale", PROPERTY_HINT_RANGE,"0,1024,0.001"),_SCS("set_gravity_distance_scale"),_SCS("get_gravity_distance_scale")); + ADD_PROPERTYNZ( PropertyInfo(Variant::BOOL,"gravity_point"),_SCS("set_gravity_is_point"),_SCS("is_gravity_a_point")); + ADD_PROPERTYNZ( PropertyInfo(Variant::REAL,"gravity_distance_scale", PROPERTY_HINT_RANGE,"0,1024,0.001"),_SCS("set_gravity_distance_scale"),_SCS("get_gravity_distance_scale")); ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"gravity_vec"),_SCS("set_gravity_vector"),_SCS("get_gravity_vector")); ADD_PROPERTY( PropertyInfo(Variant::REAL,"gravity",PROPERTY_HINT_RANGE,"-1024,1024,0.01"),_SCS("set_gravity"),_SCS("get_gravity")); ADD_PROPERTY( PropertyInfo(Variant::REAL,"linear_damp",PROPERTY_HINT_RANGE,"0,1024,0.001"),_SCS("set_linear_damp"),_SCS("get_linear_damp")); ADD_PROPERTY( PropertyInfo(Variant::REAL,"angular_damp",PROPERTY_HINT_RANGE,"0,1024,0.001"),_SCS("set_angular_damp"),_SCS("get_angular_damp")); ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"priority",PROPERTY_HINT_RANGE,"0,128,1"),_SCS("set_priority"),_SCS("get_priority")); - ADD_PROPERTY( PropertyInfo(Variant::BOOL,"monitoring"),_SCS("set_enable_monitoring"),_SCS("is_monitoring_enabled")); - ADD_PROPERTY( PropertyInfo(Variant::BOOL,"monitorable"),_SCS("set_monitorable"),_SCS("is_monitorable")); - ADD_PROPERTY( PropertyInfo(Variant::INT,"collision/layers",PROPERTY_HINT_ALL_FLAGS),_SCS("set_layer_mask"),_SCS("get_layer_mask")); - ADD_PROPERTY( PropertyInfo(Variant::INT,"collision/mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_collision_mask"),_SCS("get_collision_mask")); + ADD_PROPERTYNO( PropertyInfo(Variant::BOOL,"monitoring"),_SCS("set_enable_monitoring"),_SCS("is_monitoring_enabled")); + ADD_PROPERTYNO( PropertyInfo(Variant::BOOL,"monitorable"),_SCS("set_monitorable"),_SCS("is_monitorable")); + ADD_PROPERTYNO( PropertyInfo(Variant::INT,"collision/layers",PROPERTY_HINT_ALL_FLAGS),_SCS("set_layer_mask"),_SCS("get_layer_mask")); + ADD_PROPERTYNO( PropertyInfo(Variant::INT,"collision/mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_collision_mask"),_SCS("get_collision_mask")); } diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 6a1ea0728d..789c6bdbe4 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -1103,14 +1103,14 @@ void CanvasItem::_bind_methods() { BIND_VMETHOD(MethodInfo("_draw")); - ADD_PROPERTY( PropertyInfo(Variant::BOOL,"visibility/visible"), _SCS("_set_visible_"),_SCS("_is_visible_") ); - ADD_PROPERTY( PropertyInfo(Variant::REAL,"visibility/opacity",PROPERTY_HINT_RANGE, "0,1,0.01"), _SCS("set_opacity"),_SCS("get_opacity") ); - ADD_PROPERTY( PropertyInfo(Variant::REAL,"visibility/self_opacity",PROPERTY_HINT_RANGE, "0,1,0.01"), _SCS("set_self_opacity"),_SCS("get_self_opacity") ); + ADD_PROPERTYNO( PropertyInfo(Variant::BOOL,"visibility/visible"), _SCS("_set_visible_"),_SCS("_is_visible_") ); + ADD_PROPERTYNO( PropertyInfo(Variant::REAL,"visibility/opacity",PROPERTY_HINT_RANGE, "0,1,0.01"), _SCS("set_opacity"),_SCS("get_opacity") ); + ADD_PROPERTYNO( PropertyInfo(Variant::REAL,"visibility/self_opacity",PROPERTY_HINT_RANGE, "0,1,0.01"), _SCS("set_self_opacity"),_SCS("get_self_opacity") ); ADD_PROPERTYNZ( PropertyInfo(Variant::BOOL,"visibility/behind_parent"), _SCS("set_draw_behind_parent"),_SCS("is_draw_behind_parent_enabled") ); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"visibility/on_top",PROPERTY_HINT_NONE,"",0), _SCS("_set_on_top"),_SCS("_is_on_top") ); //compatibility ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"visibility/blend_mode",PROPERTY_HINT_ENUM, "Mix,Add,Sub,Mul,PMAlpha"), _SCS("set_blend_mode"),_SCS("get_blend_mode") ); - ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"visibility/light_mask",PROPERTY_HINT_ALL_FLAGS), _SCS("set_light_mask"),_SCS("get_light_mask") ); + ADD_PROPERTYNO( PropertyInfo(Variant::INT,"visibility/light_mask",PROPERTY_HINT_ALL_FLAGS), _SCS("set_light_mask"),_SCS("get_light_mask") ); ADD_PROPERTYNZ( PropertyInfo(Variant::OBJECT,"material/material",PROPERTY_HINT_RESOURCE_TYPE, "CanvasItemMaterial"), _SCS("set_material"),_SCS("get_material") ); ADD_PROPERTYNZ( PropertyInfo(Variant::BOOL,"material/use_parent"), _SCS("set_use_parent_material"),_SCS("get_use_parent_material") ); //exporting these two things doesn't really make much sense i think diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index f577b81598..8b8caf13d3 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -115,19 +115,16 @@ void CollisionObject2D::_update_shapes() { bool CollisionObject2D::_set(const StringName& p_name, const Variant& p_value) { String name=p_name; - if (name=="shape_count") { + if (name.begins_with("shapes/")) { - shapes.resize(p_value); - _update_shapes(); - _change_notify(); - - } else if (name.begins_with("shapes/")) { - - int idx=name.get_slice("/",1).to_int(); - String what=name.get_slice("/",2); - if (what=="shape") - set_shape(idx,RefPtr(p_value)); - else if (what=="transform") + int idx=name.get_slicec('/',1).to_int(); + String what=name.get_slicec('/',2); + if (what=="shape") { + if (idx>=shapes.size()) + add_shape(RefPtr(p_value)); + else + set_shape(idx,RefPtr(p_value)); + } else if (what=="transform") set_shape_transform(idx,p_value); else if (what=="trigger") set_shape_as_trigger(idx,p_value); @@ -143,12 +140,10 @@ bool CollisionObject2D::_get(const StringName& p_name,Variant &r_ret) const { String name=p_name; - if (name=="shape_count") { - r_ret= shapes.size(); - } else if (name.begins_with("shapes/")) { + if (name.begins_with("shapes/")) { - int idx=name.get_slice("/",1).to_int(); - String what=name.get_slice("/",2); + int idx=name.get_slicec('/',1).to_int(); + String what=name.get_slicec('/',2); if (what=="shape") r_ret= get_shape(idx); else if (what=="transform") @@ -163,7 +158,7 @@ bool CollisionObject2D::_get(const StringName& p_name,Variant &r_ret) const { void CollisionObject2D::_get_property_list( List<PropertyInfo> *p_list) const { - p_list->push_back( PropertyInfo(Variant::INT,"shape_count",PROPERTY_HINT_RANGE,"0,256,1",PROPERTY_USAGE_NOEDITOR|PROPERTY_USAGE_NO_INSTANCE_STATE) ); + //p_list->push_back( PropertyInfo(Variant::INT,"shape_count",PROPERTY_HINT_RANGE,"0,256,1",PROPERTY_USAGE_NOEDITOR|PROPERTY_USAGE_NO_INSTANCE_STATE) ); for(int i=0;i<shapes.size();i++) { String path="shapes/"+itos(i)+"/"; @@ -254,12 +249,19 @@ void CollisionObject2D::_bind_methods() { void CollisionObject2D::add_shape(const Ref<Shape2D>& p_shape, const Matrix32& p_transform) { + ERR_FAIL_COND(p_shape.is_null()); + ShapeData sdata; sdata.shape=p_shape; sdata.xform=p_transform; sdata.trigger=false; - shapes.push_back(sdata); - _update_shapes(); + + if (area) + Physics2DServer::get_singleton()->area_add_shape(get_rid(),p_shape->get_rid(),p_transform); + else + Physics2DServer::get_singleton()->body_add_shape(get_rid(),p_shape->get_rid(),p_transform); + + shapes.push_back(sdata); } int CollisionObject2D::get_shape_count() const { @@ -270,8 +272,15 @@ int CollisionObject2D::get_shape_count() const { void CollisionObject2D::set_shape(int p_shape_idx, const Ref<Shape2D>& p_shape) { ERR_FAIL_INDEX(p_shape_idx,shapes.size()); + ERR_FAIL_COND(p_shape.is_null()); + shapes[p_shape_idx].shape=p_shape; - _update_shapes(); + if (area) + Physics2DServer::get_singleton()->area_set_shape(get_rid(),p_shape_idx,p_shape->get_rid()); + else + Physics2DServer::get_singleton()->body_set_shape(get_rid(),p_shape_idx,p_shape->get_rid()); + +// _update_shapes(); } void CollisionObject2D::set_shape_transform(int p_shape_idx, const Matrix32& p_transform) { @@ -279,7 +288,12 @@ void CollisionObject2D::set_shape_transform(int p_shape_idx, const Matrix32& p_t ERR_FAIL_INDEX(p_shape_idx,shapes.size()); shapes[p_shape_idx].xform=p_transform; - _update_shapes(); + if (area) + Physics2DServer::get_singleton()->area_set_shape_transform(get_rid(),p_shape_idx,p_transform); + else + Physics2DServer::get_singleton()->body_set_shape_transform(get_rid(),p_shape_idx,p_transform); + +// _update_shapes(); } Ref<Shape2D> CollisionObject2D::get_shape(int p_shape_idx) const { diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp index 99c33c787d..6141b6a09e 100644 --- a/scene/2d/node_2d.cpp +++ b/scene/2d/node_2d.cpp @@ -398,11 +398,11 @@ void Node2D::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_relative_transform"),&Node2D::get_relative_transform); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"transform/pos"),_SCS("set_pos"),_SCS("get_pos")); - ADD_PROPERTY(PropertyInfo(Variant::REAL,"transform/rot",PROPERTY_HINT_RANGE,"-1440,1440,0.1"),_SCS("_set_rotd"),_SCS("_get_rotd")); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"transform/scale"),_SCS("set_scale"),_SCS("get_scale")); - ADD_PROPERTY(PropertyInfo(Variant::INT,"z/z",PROPERTY_HINT_RANGE,itos(VS::CANVAS_ITEM_Z_MIN)+","+itos(VS::CANVAS_ITEM_Z_MAX)+",1"),_SCS("set_z"),_SCS("get_z")); - ADD_PROPERTY(PropertyInfo(Variant::BOOL,"z/relative"),_SCS("set_z_as_relative"),_SCS("is_z_relative")); + ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2,"transform/pos"),_SCS("set_pos"),_SCS("get_pos")); + ADD_PROPERTYNZ(PropertyInfo(Variant::REAL,"transform/rot",PROPERTY_HINT_RANGE,"-1440,1440,0.1"),_SCS("_set_rotd"),_SCS("_get_rotd")); + ADD_PROPERTYNO(PropertyInfo(Variant::VECTOR2,"transform/scale"),_SCS("set_scale"),_SCS("get_scale")); + ADD_PROPERTYNZ(PropertyInfo(Variant::INT,"z/z",PROPERTY_HINT_RANGE,itos(VS::CANVAS_ITEM_Z_MIN)+","+itos(VS::CANVAS_ITEM_Z_MAX)+",1"),_SCS("set_z"),_SCS("get_z")); + ADD_PROPERTYNO(PropertyInfo(Variant::BOOL,"z/relative"),_SCS("set_z_as_relative"),_SCS("is_z_relative")); } diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp index f0b7c2be60..8f805ceba2 100644 --- a/scene/2d/particles_2d.cpp +++ b/scene/2d/particles_2d.cpp @@ -1072,19 +1072,19 @@ void Particles2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT,"config/amount",PROPERTY_HINT_EXP_RANGE,"1,1024"),_SCS("set_amount"),_SCS("get_amount") ); ADD_PROPERTY(PropertyInfo(Variant::REAL,"config/lifetime",PROPERTY_HINT_EXP_RANGE,"0.1,3600,0.1"),_SCS("set_lifetime"),_SCS("get_lifetime") ); - ADD_PROPERTY(PropertyInfo(Variant::REAL,"config/time_scale",PROPERTY_HINT_EXP_RANGE,"0.01,128,0.01"),_SCS("set_time_scale"),_SCS("get_time_scale") ); - ADD_PROPERTY(PropertyInfo(Variant::REAL,"config/preprocess",PROPERTY_HINT_EXP_RANGE,"0.1,3600,0.1"),_SCS("set_pre_process_time"),_SCS("get_pre_process_time") ); - ADD_PROPERTY(PropertyInfo(Variant::REAL,"config/emit_timeout",PROPERTY_HINT_RANGE,"0,3600,0.1"),_SCS("set_emit_timeout"),_SCS("get_emit_timeout") ); - ADD_PROPERTY(PropertyInfo(Variant::BOOL,"config/emitting"),_SCS("set_emitting"),_SCS("is_emitting") ); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"config/offset"),_SCS("set_emissor_offset"),_SCS("get_emissor_offset")); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"config/half_extents"),_SCS("set_emission_half_extents"),_SCS("get_emission_half_extents")); - ADD_PROPERTY(PropertyInfo(Variant::BOOL,"config/local_space"),_SCS("set_use_local_space"),_SCS("is_using_local_space")); - ADD_PROPERTY(PropertyInfo(Variant::REAL,"config/explosiveness",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_explosiveness"),_SCS("get_explosiveness")); - ADD_PROPERTY(PropertyInfo(Variant::BOOL,"config/flip_h"),_SCS("set_flip_h"),_SCS("is_flipped_h")); - ADD_PROPERTY(PropertyInfo(Variant::BOOL,"config/flip_v"),_SCS("set_flip_v"),_SCS("is_flipped_v")); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"config/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture")); - ADD_PROPERTY(PropertyInfo(Variant::INT,"config/h_frames",PROPERTY_HINT_RANGE,"1,512,1"),_SCS("set_h_frames"),_SCS("get_h_frames")); - ADD_PROPERTY(PropertyInfo(Variant::INT,"config/v_frames",PROPERTY_HINT_RANGE,"1,512,1"),_SCS("set_v_frames"),_SCS("get_v_frames")); + ADD_PROPERTYNO(PropertyInfo(Variant::REAL,"config/time_scale",PROPERTY_HINT_EXP_RANGE,"0.01,128,0.01"),_SCS("set_time_scale"),_SCS("get_time_scale") ); + ADD_PROPERTYNZ(PropertyInfo(Variant::REAL,"config/preprocess",PROPERTY_HINT_EXP_RANGE,"0.1,3600,0.1"),_SCS("set_pre_process_time"),_SCS("get_pre_process_time") ); + ADD_PROPERTYNZ(PropertyInfo(Variant::REAL,"config/emit_timeout",PROPERTY_HINT_RANGE,"0,3600,0.1"),_SCS("set_emit_timeout"),_SCS("get_emit_timeout") ); + ADD_PROPERTYNO(PropertyInfo(Variant::BOOL,"config/emitting"),_SCS("set_emitting"),_SCS("is_emitting") ); + ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2,"config/offset"),_SCS("set_emissor_offset"),_SCS("get_emissor_offset")); + ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2,"config/half_extents"),_SCS("set_emission_half_extents"),_SCS("get_emission_half_extents")); + ADD_PROPERTYNO(PropertyInfo(Variant::BOOL,"config/local_space"),_SCS("set_use_local_space"),_SCS("is_using_local_space")); + ADD_PROPERTYNO(PropertyInfo(Variant::REAL,"config/explosiveness",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_explosiveness"),_SCS("get_explosiveness")); + ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL,"config/flip_h"),_SCS("set_flip_h"),_SCS("is_flipped_h")); + ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL,"config/flip_v"),_SCS("set_flip_v"),_SCS("is_flipped_v")); + ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"config/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture")); + ADD_PROPERTYNO(PropertyInfo(Variant::INT,"config/h_frames",PROPERTY_HINT_RANGE,"1,512,1"),_SCS("set_h_frames"),_SCS("get_h_frames")); + ADD_PROPERTYNO(PropertyInfo(Variant::INT,"config/v_frames",PROPERTY_HINT_RANGE,"1,512,1"),_SCS("set_v_frames"),_SCS("get_v_frames")); for(int i=0;i<PARAM_MAX;i++) { @@ -1092,10 +1092,10 @@ void Particles2D::_bind_methods() { } for(int i=0;i<PARAM_MAX;i++) { - ADD_PROPERTYI(PropertyInfo(Variant::REAL,_particlesframe_property_rnames[i],PROPERTY_HINT_RANGE,"-1,1,0.01"),_SCS("set_randomness"),_SCS("get_randomness"),i); + ADD_PROPERTYINZ(PropertyInfo(Variant::REAL,_particlesframe_property_rnames[i],PROPERTY_HINT_RANGE,"-1,1,0.01"),_SCS("set_randomness"),_SCS("get_randomness"),i); } - ADD_PROPERTY( PropertyInfo( Variant::INT, "color_phases/count",PROPERTY_HINT_RANGE,"0,4,1", 0), _SCS("set_color_phases"), _SCS("get_color_phases")); + ADD_PROPERTYNZ( PropertyInfo( Variant::INT, "color_phases/count",PROPERTY_HINT_RANGE,"0,4,1", 0), _SCS("set_color_phases"), _SCS("get_color_phases")); //Backward compatibility. They will be converted to color ramp for(int i=0;i<MAX_COLOR_PHASES;i++) { @@ -1104,10 +1104,10 @@ void Particles2D::_bind_methods() { ADD_PROPERTYI( PropertyInfo( Variant::COLOR, phase+"color", PROPERTY_HINT_NONE, "", 0),_SCS("set_color_phase_color"),_SCS("get_color_phase_color"),i ); } - ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color/color"),_SCS("set_color"),_SCS("get_color")); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"color/color_ramp",PROPERTY_HINT_RESOURCE_TYPE,"ColorRamp"),_SCS("set_color_ramp"),_SCS("get_color_ramp")); + ADD_PROPERTYNO(PropertyInfo(Variant::COLOR, "color/color"),_SCS("set_color"),_SCS("get_color")); + ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"color/color_ramp",PROPERTY_HINT_RESOURCE_TYPE,"ColorRamp"),_SCS("set_color_ramp"),_SCS("get_color_ramp")); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2_ARRAY,"emission_points",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("set_emission_points"),_SCS("get_emission_points")); + ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2_ARRAY,"emission_points",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("set_emission_points"),_SCS("get_emission_points")); BIND_CONSTANT( PARAM_DIRECTION ); BIND_CONSTANT( PARAM_SPREAD ); diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index 0485033691..c521952f9b 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -103,14 +103,18 @@ void Sprite::set_texture(const Ref<Texture>& p_texture) { if (p_texture==texture) return; +#ifdef DEBUG_ENABLED if (texture.is_valid()) { texture->disconnect(CoreStringNames::get_singleton()->changed,this,SceneStringNames::get_singleton()->update); } +#endif texture=p_texture; +#ifdef DEBUG_ENABLED if (texture.is_valid()) { texture->set_flags(texture->get_flags()); //remove repeat from texture, it looks bad in sprites texture->connect(CoreStringNames::get_singleton()->changed,this,SceneStringNames::get_singleton()->update); } +#endif update(); item_rect_changed(); } @@ -313,17 +317,17 @@ void Sprite::_bind_methods() { ADD_SIGNAL(MethodInfo("frame_changed")); - ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_texture"),_SCS("get_texture")); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "centered"), _SCS("set_centered"),_SCS("is_centered")); - ADD_PROPERTY( PropertyInfo( Variant::VECTOR2, "offset"), _SCS("set_offset"),_SCS("get_offset")); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "flip_h"), _SCS("set_flip_h"),_SCS("is_flipped_h")); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "flip_v"), _SCS("set_flip_v"),_SCS("is_flipped_v")); - ADD_PROPERTY( PropertyInfo( Variant::INT, "vframes"), _SCS("set_vframes"),_SCS("get_vframes")); - ADD_PROPERTY( PropertyInfo( Variant::INT, "hframes"), _SCS("set_hframes"),_SCS("get_hframes")); - ADD_PROPERTY( PropertyInfo( Variant::INT, "frame",PROPERTY_HINT_SPRITE_FRAME), _SCS("set_frame"),_SCS("get_frame")); - ADD_PROPERTY( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate")); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "region"), _SCS("set_region"),_SCS("is_region")); - ADD_PROPERTY( PropertyInfo( Variant::RECT2, "region_rect"), _SCS("set_region_rect"),_SCS("get_region_rect")); + ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_texture"),_SCS("get_texture")); + ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "centered"), _SCS("set_centered"),_SCS("is_centered")); + ADD_PROPERTYNZ( PropertyInfo( Variant::VECTOR2, "offset"), _SCS("set_offset"),_SCS("get_offset")); + ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "flip_h"), _SCS("set_flip_h"),_SCS("is_flipped_h")); + ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "flip_v"), _SCS("set_flip_v"),_SCS("is_flipped_v")); + ADD_PROPERTYNO( PropertyInfo( Variant::INT, "vframes"), _SCS("set_vframes"),_SCS("get_vframes")); + ADD_PROPERTYNO( PropertyInfo( Variant::INT, "hframes"), _SCS("set_hframes"),_SCS("get_hframes")); + ADD_PROPERTYNZ( PropertyInfo( Variant::INT, "frame",PROPERTY_HINT_SPRITE_FRAME), _SCS("set_frame"),_SCS("get_frame")); + ADD_PROPERTYNO( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate")); + ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "region"), _SCS("set_region"),_SCS("is_region")); + ADD_PROPERTYNZ( PropertyInfo( Variant::RECT2, "region_rect"), _SCS("set_region_rect"),_SCS("get_region_rect")); } @@ -530,10 +534,10 @@ void ViewportSprite::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_modulate","modulate"),&ViewportSprite::set_modulate); ObjectTypeDB::bind_method(_MD("get_modulate"),&ViewportSprite::get_modulate); - ADD_PROPERTY( PropertyInfo( Variant::NODE_PATH, "viewport"), _SCS("set_viewport_path"),_SCS("get_viewport_path")); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "centered"), _SCS("set_centered"),_SCS("is_centered")); - ADD_PROPERTY( PropertyInfo( Variant::VECTOR2, "offset"), _SCS("set_offset"),_SCS("get_offset")); - ADD_PROPERTY( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate")); + ADD_PROPERTYNZ( PropertyInfo( Variant::NODE_PATH, "viewport"), _SCS("set_viewport_path"),_SCS("get_viewport_path")); + ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "centered"), _SCS("set_centered"),_SCS("is_centered")); + ADD_PROPERTYNZ( PropertyInfo( Variant::VECTOR2, "offset"), _SCS("set_offset"),_SCS("get_offset")); + ADD_PROPERTYNO( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate")); } diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp index a00946a07a..58cbbdba22 100644 --- a/scene/3d/area.cpp +++ b/scene/3d/area.cpp @@ -299,8 +299,8 @@ void Area::set_enable_monitoring(bool p_enable) { if (monitoring) { - PhysicsServer::get_singleton()->area_set_monitor_callback(get_rid(),this,"_body_inout"); - PhysicsServer::get_singleton()->area_set_area_monitor_callback(get_rid(),this,"_area_inout"); + PhysicsServer::get_singleton()->area_set_monitor_callback(get_rid(),this,SceneStringNames::get_singleton()->_body_inout); + PhysicsServer::get_singleton()->area_set_area_monitor_callback(get_rid(),this,SceneStringNames::get_singleton()->_area_inout); } else { PhysicsServer::get_singleton()->area_set_monitor_callback(get_rid(),NULL,StringName()); PhysicsServer::get_singleton()->area_set_area_monitor_callback(get_rid(),NULL,StringName()); diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp index efc5db50e1..5ecadb48b8 100644 --- a/scene/3d/collision_object.cpp +++ b/scene/3d/collision_object.cpp @@ -122,8 +122,8 @@ bool CollisionObject::_set(const StringName& p_name, const Variant& p_value) { } else if (name.begins_with("shapes/")) { - int idx=name.get_slice("/",1).to_int(); - String what=name.get_slice("/",2); + int idx=name.get_slicec('/',1).to_int(); + String what=name.get_slicec('/',2); if (what=="shape") set_shape(idx,RefPtr(p_value)); else if (what=="transform") @@ -148,8 +148,8 @@ bool CollisionObject::_get(const StringName& p_name,Variant &r_ret) const { r_ret= shapes.size(); } else if (name.begins_with("shapes/")) { - int idx=name.get_slice("/",1).to_int(); - String what=name.get_slice("/",2); + int idx=name.get_slicec('/',1).to_int(); + String what=name.get_slicec('/',2); if (what=="shape") r_ret= get_shape(idx); else if (what=="transform") diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp index ee1b28a8ae..9df29f70ec 100644 --- a/scene/3d/skeleton.cpp +++ b/scene/3d/skeleton.cpp @@ -41,8 +41,8 @@ bool Skeleton::_set(const StringName& p_path, const Variant& p_value) { if (!path.begins_with("bones/")) return false; - int which=path.get_slice("/",1).to_int(); - String what=path.get_slice("/",2); + int which=path.get_slicec('/',1).to_int(); + String what=path.get_slicec('/',2); if (which==bones.size() && what=="name") { @@ -88,8 +88,8 @@ bool Skeleton::_get(const StringName& p_name,Variant &r_ret) const { if (!path.begins_with("bones/")) return false; - int which=path.get_slice("/",1).to_int(); - String what=path.get_slice("/",2); + int which=path.get_slicec('/',1).to_int(); + String what=path.get_slicec('/',2); ERR_FAIL_INDEX_V( which, bones.size(), false ); diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index c672d0e94f..7117c59176 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -758,7 +758,7 @@ void Spatial::_bind_methods() { ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"transform/rotation",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR), _SCS("_set_rotation_deg"), _SCS("_get_rotation_deg") ); ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"transform/rotation_rad",PROPERTY_HINT_NONE,"",0), _SCS("set_rotation"), _SCS("get_rotation") ); ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"transform/scale",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR), _SCS("set_scale"), _SCS("get_scale") ); - ADD_PROPERTY( PropertyInfo(Variant::BOOL,"visibility/visible"), _SCS("_set_visible_"), _SCS("_is_visible_") ); + ADD_PROPERTYNO( PropertyInfo(Variant::BOOL,"visibility/visible"), _SCS("_set_visible_"), _SCS("_is_visible_") ); //ADD_PROPERTY( PropertyInfo(Variant::TRANSFORM,"transform/local"), _SCS("set_transform"), _SCS("get_transform") ); ADD_SIGNAL( MethodInfo("visibility_changed" ) ); diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 74ae2c0d55..f8b58b5cb5 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -35,10 +35,10 @@ bool AnimationPlayer::_set(const StringName& p_name, const Variant& p_value) { String name=p_name; - if (name=="playback/speed" || name=="speed") { //bw compatibility + if (p_name==SceneStringNames::get_singleton()->playback_speed || p_name==SceneStringNames::get_singleton()->speed) { //bw compatibility set_speed(p_value); - } else if (name=="playback/active") { + } else if (p_name==SceneStringNames::get_singleton()->playback_active) { set_active(p_value); } else if (name.begins_with("playback/play")) { @@ -52,16 +52,16 @@ bool AnimationPlayer::_set(const StringName& p_name, const Variant& p_value) { } else if (name.begins_with("anims/")) { - String which=name.get_slice("/",1); + String which=name.get_slicec('/',1); add_animation(which,p_value); } else if (name.begins_with("next/")) { - String which=name.get_slice("/",1); + String which=name.get_slicec('/',1); animation_set_next(which,p_value); - } else if (name=="blend_times") { + } else if (p_name==SceneStringNames::get_singleton()->blend_times) { Array array=p_value; int len = array.size(); @@ -77,7 +77,7 @@ bool AnimationPlayer::_set(const StringName& p_name, const Variant& p_value) { set_blend_time(from,to,time); } - } else if (name=="autoplay") { + } else if (p_name==SceneStringNames::get_singleton()->autoplay) { autoplay=p_value; } else @@ -106,12 +106,12 @@ bool AnimationPlayer::_get(const StringName& p_name,Variant &r_ret) const { } else if (name.begins_with("anims/")) { - String which=name.get_slice("/",1); + String which=name.get_slicec('/',1); r_ret= get_animation(which).get_ref_ptr(); } else if (name.begins_with("next/")) { - String which=name.get_slice("/",1); + String which=name.get_slicec('/',1); r_ret= animation_get_next(which); @@ -661,8 +661,11 @@ void AnimationPlayer::_animation_process(float p_delta) { Error AnimationPlayer::add_animation(const StringName& p_name, const Ref<Animation>& p_animation) { +#ifdef DEBUG_ENABLED ERR_EXPLAIN("Invalid animation name: "+String(p_name)); ERR_FAIL_COND_V( String(p_name).find("/")!=-1 || String(p_name).find(":")!=-1 || String(p_name).find(",")!=-1 || String(p_name).find("[")!=-1, ERR_INVALID_PARAMETER ); +#endif + ERR_FAIL_COND_V( p_animation.is_null() , ERR_INVALID_PARAMETER ); //print_line("Add anim: "+String(p_name)+" name: "+p_animation->get_name()); @@ -1271,7 +1274,7 @@ AnimationPlayer::AnimationPlayer() { animation_process_mode=ANIMATION_PROCESS_IDLE; processing=false; default_blend_time=0; - root=NodePath(".."); + root=SceneStringNames::get_singleton()->path_pp; playing = false; active=true; } diff --git a/scene/audio/sample_player.cpp b/scene/audio/sample_player.cpp index 25e83df39d..b93f7e7ddd 100644 --- a/scene/audio/sample_player.cpp +++ b/scene/audio/sample_player.cpp @@ -102,7 +102,7 @@ bool SamplePlayer::_get(const StringName& p_name,Variant &r_ret) const { r_ret= get_sample_library(); } else if (name.begins_with("default/")) { - String what=name.get_slice("/",1); + String what=name.get_slicec('/',1); if (what=="volume_db") r_ret= get_default_volume_db(); diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 8b6f433c9c..965e7f399d 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -390,10 +390,10 @@ void BaseButton::_bind_methods() { ADD_SIGNAL( MethodInfo("pressed" ) ); ADD_SIGNAL( MethodInfo("released" ) ); ADD_SIGNAL( MethodInfo("toggled", PropertyInfo( Variant::BOOL,"pressed") ) ); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "disabled"), _SCS("set_disabled"), _SCS("is_disabled")); + ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "disabled"), _SCS("set_disabled"), _SCS("is_disabled")); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "toggle_mode"), _SCS("set_toggle_mode"), _SCS("is_toggle_mode")); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "is_pressed"), _SCS("set_pressed"), _SCS("is_pressed")); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "click_on_press"), _SCS("set_click_on_press"), _SCS("get_click_on_press")); + ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "is_pressed"), _SCS("set_pressed"), _SCS("is_pressed")); + ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "click_on_press"), _SCS("set_click_on_press"), _SCS("get_click_on_press")); BIND_CONSTANT( DRAW_NORMAL ); diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index b465db5c80..edeb18bfc1 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -225,11 +225,11 @@ void Button::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_text_align"),&Button::get_text_align); ObjectTypeDB::bind_method(_MD("is_flat"),&Button::is_flat); - ADD_PROPERTY( PropertyInfo( Variant::STRING, "text", PROPERTY_HINT_NONE,"",PROPERTY_USAGE_DEFAULT_INTL ), _SCS("set_text"),_SCS("get_text") ); - ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture" ), _SCS("set_button_icon"),_SCS("get_button_icon") ); + ADD_PROPERTYNZ( PropertyInfo( Variant::STRING, "text", PROPERTY_HINT_NONE,"",PROPERTY_USAGE_DEFAULT_INTL ), _SCS("set_text"),_SCS("get_text") ); + ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture" ), _SCS("set_button_icon"),_SCS("get_button_icon") ); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "flat" ), _SCS("set_flat"),_SCS("is_flat") ); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "clip_text" ), _SCS("set_clip_text"),_SCS("get_clip_text") ); - ADD_PROPERTY( PropertyInfo( Variant::INT, "align",PROPERTY_HINT_ENUM,"Left,Center,Right" ), _SCS("set_text_align"),_SCS("get_text_align") ); + ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "clip_text" ), _SCS("set_clip_text"),_SCS("get_clip_text") ); + ADD_PROPERTYNO( PropertyInfo( Variant::INT, "align",PROPERTY_HINT_ENUM,"Left,Center,Right" ), _SCS("set_text_align"),_SCS("get_text_align") ); } diff --git a/scene/gui/button_array.cpp b/scene/gui/button_array.cpp index 7f565de244..b86e32dda7 100644 --- a/scene/gui/button_array.cpp +++ b/scene/gui/button_array.cpp @@ -34,7 +34,7 @@ bool ButtonArray::_set(const StringName& p_name, const Variant& p_value) { String n=String(p_name); if (n.begins_with("button/")) { - String what = n.get_slice("/",1); + String what = n.get_slicec('/',1); if (what=="count") { int new_size=p_value; if (new_size>0 && buttons.size()==0) { @@ -57,7 +57,7 @@ bool ButtonArray::_set(const StringName& p_name, const Variant& p_value) { } else { int idx=what.to_int(); ERR_FAIL_INDEX_V(idx,buttons.size(),false); - String f = n.get_slice("/",2); + String f = n.get_slicec('/',2); if (f=="text") buttons[idx].text=p_value; else if (f=="icon") @@ -80,7 +80,7 @@ bool ButtonArray::_get(const StringName& p_name,Variant &r_ret) const { String n=String(p_name); if (n.begins_with("button/")) { - String what = n.get_slice("/",1); + String what = n.get_slicec('/',1); if (what=="count") { r_ret=buttons.size(); } else if (what=="align") { @@ -92,7 +92,7 @@ bool ButtonArray::_get(const StringName& p_name,Variant &r_ret) const { } else { int idx=what.to_int(); ERR_FAIL_INDEX_V(idx,buttons.size(),false); - String f = n.get_slice("/",2); + String f = n.get_slicec('/',2); if (f=="text") r_ret=buttons[idx].text; else if (f=="icon") diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 2367c03e99..a1c0644650 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -136,27 +136,27 @@ bool Control::_set(const StringName& p_name, const Variant& p_value) { if (p_value.get_type()==Variant::NIL) { if (name.begins_with("custom_icons/")) { - String dname = name.get_slice("/",1); + String dname = name.get_slicec('/',1); data.icon_override.erase(dname); notification(NOTIFICATION_THEME_CHANGED); update(); } else if (name.begins_with("custom_styles/")) { - String dname = name.get_slice("/",1); + String dname = name.get_slicec('/',1); data.style_override.erase(dname); notification(NOTIFICATION_THEME_CHANGED); update(); } else if (name.begins_with("custom_fonts/")) { - String dname = name.get_slice("/",1); + String dname = name.get_slicec('/',1); data.font_override.erase(dname); notification(NOTIFICATION_THEME_CHANGED); update(); } else if (name.begins_with("custom_colors/")) { - String dname = name.get_slice("/",1); + String dname = name.get_slicec('/',1); data.color_override.erase(dname); notification(NOTIFICATION_THEME_CHANGED); update(); } else if (name.begins_with("custom_constants/")) { - String dname = name.get_slice("/",1); + String dname = name.get_slicec('/',1); data.constant_override.erase(dname); notification(NOTIFICATION_THEME_CHANGED); update(); @@ -165,23 +165,23 @@ bool Control::_set(const StringName& p_name, const Variant& p_value) { } else { if (name.begins_with("custom_icons/")) { - String dname = name.get_slice("/",1); + String dname = name.get_slicec('/',1); notification(NOTIFICATION_THEME_CHANGED); add_icon_override(dname,p_value); } else if (name.begins_with("custom_styles/")) { - String dname = name.get_slice("/",1); + String dname = name.get_slicec('/',1); add_style_override(dname,p_value); notification(NOTIFICATION_THEME_CHANGED); } else if (name.begins_with("custom_fonts/")) { - String dname = name.get_slice("/",1); + String dname = name.get_slicec('/',1); add_font_override(dname,p_value); notification(NOTIFICATION_THEME_CHANGED); } else if (name.begins_with("custom_colors/")) { - String dname = name.get_slice("/",1); + String dname = name.get_slicec('/',1); add_color_override(dname,p_value); notification(NOTIFICATION_THEME_CHANGED); } else if (name.begins_with("custom_constants/")) { - String dname = name.get_slice("/",1); + String dname = name.get_slicec('/',1); add_constant_override(dname,p_value); notification(NOTIFICATION_THEME_CHANGED); } else @@ -217,22 +217,22 @@ bool Control::_get(const StringName& p_name,Variant &r_ret) const { return false; if (sname.begins_with("custom_icons/")) { - String name = sname.get_slice("/",1); + String name = sname.get_slicec('/',1); r_ret= data.icon_override.has(name)?Variant(data.icon_override[name]):Variant(); } else if (sname.begins_with("custom_styles/")) { - String name = sname.get_slice("/",1); + String name = sname.get_slicec('/',1); r_ret= data.style_override.has(name)?Variant(data.style_override[name]):Variant(); } else if (sname.begins_with("custom_fonts/")) { - String name = sname.get_slice("/",1); + String name = sname.get_slicec('/',1); r_ret= data.font_override.has(name)?Variant(data.font_override[name]):Variant(); } else if (sname.begins_with("custom_colors/")) { - String name = sname.get_slice("/",1); + String name = sname.get_slicec('/',1); r_ret= data.color_override.has(name)?Variant(data.color_override[name]):Variant(); } else if (sname.begins_with("custom_constants/")) { - String name = sname.get_slice("/",1); + String name = sname.get_slicec('/',1); r_ret= data.constant_override.has(name)?Variant(data.constant_override[name]):Variant(); } else @@ -2832,16 +2832,16 @@ void Control::_bind_methods() { ADD_PROPERTYNZ( PropertyInfo(Variant::VECTOR2,"rect/size", PROPERTY_HINT_NONE, "",PROPERTY_USAGE_EDITOR), _SCS("set_size"),_SCS("get_size") ); ADD_PROPERTYNZ( PropertyInfo(Variant::VECTOR2,"rect/min_size"), _SCS("set_custom_minimum_size"),_SCS("get_custom_minimum_size") ); ADD_PROPERTYNZ( PropertyInfo(Variant::STRING,"hint/tooltip", PROPERTY_HINT_MULTILINE_TEXT), _SCS("set_tooltip"),_SCS("_get_tooltip") ); - ADD_PROPERTYI( PropertyInfo(Variant::NODE_PATH,"focus_neighbour/left" ), _SCS("set_focus_neighbour"),_SCS("get_focus_neighbour"),MARGIN_LEFT ); - ADD_PROPERTYI( PropertyInfo(Variant::NODE_PATH,"focus_neighbour/top" ), _SCS("set_focus_neighbour"),_SCS("get_focus_neighbour"),MARGIN_TOP ); - ADD_PROPERTYI( PropertyInfo(Variant::NODE_PATH,"focus_neighbour/right" ), _SCS("set_focus_neighbour"),_SCS("get_focus_neighbour"),MARGIN_RIGHT ); - ADD_PROPERTYI( PropertyInfo(Variant::NODE_PATH,"focus_neighbour/bottom" ), _SCS("set_focus_neighbour"),_SCS("get_focus_neighbour"),MARGIN_BOTTOM ); + ADD_PROPERTYINZ( PropertyInfo(Variant::NODE_PATH,"focus_neighbour/left" ), _SCS("set_focus_neighbour"),_SCS("get_focus_neighbour"),MARGIN_LEFT ); + ADD_PROPERTYINZ( PropertyInfo(Variant::NODE_PATH,"focus_neighbour/top" ), _SCS("set_focus_neighbour"),_SCS("get_focus_neighbour"),MARGIN_TOP ); + ADD_PROPERTYINZ( PropertyInfo(Variant::NODE_PATH,"focus_neighbour/right" ), _SCS("set_focus_neighbour"),_SCS("get_focus_neighbour"),MARGIN_RIGHT ); + ADD_PROPERTYINZ( PropertyInfo(Variant::NODE_PATH,"focus_neighbour/bottom" ), _SCS("set_focus_neighbour"),_SCS("get_focus_neighbour"),MARGIN_BOTTOM ); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"focus/ignore_mouse"), _SCS("set_ignore_mouse"),_SCS("is_ignoring_mouse") ); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"focus/stop_mouse"), _SCS("set_stop_mouse"),_SCS("is_stopping_mouse") ); ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"size_flags/horizontal", PROPERTY_HINT_FLAGS, "Expand,Fill"), _SCS("set_h_size_flags"),_SCS("get_h_size_flags") ); ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"size_flags/vertical", PROPERTY_HINT_FLAGS, "Expand,Fill"), _SCS("set_v_size_flags"),_SCS("get_v_size_flags") ); - ADD_PROPERTY( PropertyInfo(Variant::INT,"size_flags/stretch_ratio", PROPERTY_HINT_RANGE, "1,128,0.01"), _SCS("set_stretch_ratio"),_SCS("get_stretch_ratio") ); + ADD_PROPERTYNO( PropertyInfo(Variant::INT,"size_flags/stretch_ratio", PROPERTY_HINT_RANGE, "1,128,0.01"), _SCS("set_stretch_ratio"),_SCS("get_stretch_ratio") ); ADD_PROPERTYNZ( PropertyInfo(Variant::OBJECT,"theme/theme", PROPERTY_HINT_RESOURCE_TYPE, "Theme"), _SCS("set_theme"),_SCS("get_theme") ); BIND_CONSTANT( ANCHOR_BEGIN ); diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 27d0f568a2..e7af4fa349 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -613,11 +613,11 @@ void Label::_bind_methods() { BIND_CONSTANT( VALIGN_BOTTOM ); BIND_CONSTANT( VALIGN_FILL ); - ADD_PROPERTY( PropertyInfo( Variant::STRING, "text",PROPERTY_HINT_MULTILINE_TEXT,"",PROPERTY_USAGE_DEFAULT_INTL), _SCS("set_text"),_SCS("get_text") ); - ADD_PROPERTY( PropertyInfo( Variant::INT, "align", PROPERTY_HINT_ENUM,"Left,Center,Right,Fill" ),_SCS("set_align"),_SCS("get_align") ); - ADD_PROPERTY( PropertyInfo( Variant::INT, "valign", PROPERTY_HINT_ENUM,"Top,Center,Bottom,Fill" ),_SCS("set_valign"),_SCS("get_valign") ); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "autowrap"),_SCS("set_autowrap"),_SCS("has_autowrap") ); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "uppercase"),_SCS("set_uppercase"),_SCS("is_uppercase") ); + ADD_PROPERTYNZ( PropertyInfo( Variant::STRING, "text",PROPERTY_HINT_MULTILINE_TEXT,"",PROPERTY_USAGE_DEFAULT_INTL), _SCS("set_text"),_SCS("get_text") ); + ADD_PROPERTYNZ( PropertyInfo( Variant::INT, "align", PROPERTY_HINT_ENUM,"Left,Center,Right,Fill" ),_SCS("set_align"),_SCS("get_align") ); + ADD_PROPERTYNZ( PropertyInfo( Variant::INT, "valign", PROPERTY_HINT_ENUM,"Top,Center,Bottom,Fill" ),_SCS("set_valign"),_SCS("get_valign") ); + ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "autowrap"),_SCS("set_autowrap"),_SCS("has_autowrap") ); + ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "uppercase"),_SCS("set_uppercase"),_SCS("is_uppercase") ); ADD_PROPERTY( PropertyInfo( Variant::REAL, "percent_visible", PROPERTY_HINT_RANGE,"0,1,0.001"),_SCS("set_percent_visible"),_SCS("get_percent_visible") ); } diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp index 823fd55c6e..5b2caecb5b 100644 --- a/scene/gui/texture_button.cpp +++ b/scene/gui/texture_button.cpp @@ -157,14 +157,14 @@ void TextureButton::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_scale"),&TextureButton::get_scale); ObjectTypeDB::bind_method(_MD("get_modulate"),&TextureButton::get_modulate); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"textures/normal",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_normal_texture"), _SCS("get_normal_texture")); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"textures/pressed",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_pressed_texture"), _SCS("get_pressed_texture")); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"textures/hover",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_hover_texture"), _SCS("get_hover_texture")); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"textures/disabled",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_disabled_texture"), _SCS("get_disabled_texture")); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"textures/focused",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_focused_texture"), _SCS("get_focused_texture")); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"textures/click_mask",PROPERTY_HINT_RESOURCE_TYPE,"BitMap"), _SCS("set_click_mask"), _SCS("get_click_mask")) ; - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"params/scale",PROPERTY_HINT_RANGE,"0.01,1024,0.01"), _SCS("set_scale"), _SCS("get_scale")); - ADD_PROPERTY(PropertyInfo(Variant::COLOR,"params/modulate"), _SCS("set_modulate"), _SCS("get_modulate")); + ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"textures/normal",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_normal_texture"), _SCS("get_normal_texture")); + ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"textures/pressed",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_pressed_texture"), _SCS("get_pressed_texture")); + ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"textures/hover",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_hover_texture"), _SCS("get_hover_texture")); + ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"textures/disabled",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_disabled_texture"), _SCS("get_disabled_texture")); + ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"textures/focused",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_focused_texture"), _SCS("get_focused_texture")); + ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"textures/click_mask",PROPERTY_HINT_RESOURCE_TYPE,"BitMap"), _SCS("set_click_mask"), _SCS("get_click_mask")) ; + ADD_PROPERTYNO(PropertyInfo(Variant::VECTOR2,"params/scale",PROPERTY_HINT_RANGE,"0.01,1024,0.01"), _SCS("set_scale"), _SCS("get_scale")); + ADD_PROPERTYNO(PropertyInfo(Variant::COLOR,"params/modulate"), _SCS("set_modulate"), _SCS("get_modulate")); } diff --git a/scene/gui/texture_frame.cpp b/scene/gui/texture_frame.cpp index 931fb1cb1a..5a6bc86638 100644 --- a/scene/gui/texture_frame.cpp +++ b/scene/gui/texture_frame.cpp @@ -77,9 +77,9 @@ void TextureFrame::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_expand","enable"), & TextureFrame::set_expand ); ObjectTypeDB::bind_method(_MD("has_expand"), & TextureFrame::has_expand ); - ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), _SCS("set_texture"),_SCS("get_texture") ); - ADD_PROPERTY( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate") ); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "expand" ), _SCS("set_expand"),_SCS("has_expand") ); + ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), _SCS("set_texture"),_SCS("get_texture") ); + ADD_PROPERTYNO( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate") ); + ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "expand" ), _SCS("set_expand"),_SCS("has_expand") ); } diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index a09920cb2b..6c15f1cae4 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -1106,7 +1106,7 @@ int Tree::draw_item(const Point2i& p_pos,const Point2& p_draw_ofs, const Size2& int option = (int)p_item->cells[i].val; String s = p_item->cells[i].text; - s=s.get_slice(",",option); + s=s.get_slicec(',',option); Ref<Texture> downarrow = cache.select_arrow; @@ -1527,7 +1527,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos,int x_ofs,int y_ofs,bool p_ popup_menu->clear(); for (int i=0;i<c.text.get_slice_count(",");i++) { - String s = c.text.get_slice(",",i); + String s = c.text.get_slicec(',',i); popup_menu->add_item(s,i); } @@ -2234,7 +2234,7 @@ bool Tree::edit_selected() { popup_menu->clear(); for (int i=0;i<c.text.get_slice_count(",");i++) { - String s = c.text.get_slice(",",i); + String s = c.text.get_slicec(',',i); popup_menu->add_item(s,i); } diff --git a/scene/main/node.cpp b/scene/main/node.cpp index b7fa5c8301..7e31bf8dd0 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1891,7 +1891,7 @@ void Node::_bind_methods() { #ifdef TOOLS_ENABLED ObjectTypeDB::bind_method(_MD("_set_import_path","import_path"),&Node::set_import_path); ObjectTypeDB::bind_method(_MD("_get_import_path"),&Node::get_import_path); - ADD_PROPERTY( PropertyInfo(Variant::NODE_PATH,"_import_path",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_import_path"),_SCS("_get_import_path")); + ADD_PROPERTYNZ( PropertyInfo(Variant::NODE_PATH,"_import_path",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_import_path"),_SCS("_get_import_path")); #endif diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 095406dad9..9d668a5716 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -42,8 +42,8 @@ bool Animation::_set(const StringName& p_name, const Variant& p_value) { set_step(p_value); else if (name.begins_with("tracks/")) { - int track=name.get_slice("/",1).to_int(); - String what=name.get_slice("/",2); + int track=name.get_slicec('/',1).to_int(); + String what=name.get_slicec('/',2); if (tracks.size()==track && what=="type") { @@ -257,8 +257,8 @@ bool Animation::_get(const StringName& p_name,Variant &r_ret) const { r_ret= step; else if (name.begins_with("tracks/")) { - int track=name.get_slice("/",1).to_int(); - String what=name.get_slice("/",2); + int track=name.get_slicec('/',1).to_int(); + String what=name.get_slicec('/',2); ERR_FAIL_INDEX_V( track, tracks.size(), false ); if (what=="type") { diff --git a/scene/resources/baked_light.cpp b/scene/resources/baked_light.cpp index 226edec9ae..31282a0274 100644 --- a/scene/resources/baked_light.cpp +++ b/scene/resources/baked_light.cpp @@ -311,11 +311,11 @@ bool BakedLight::_set(const StringName& p_name, const Variant& p_value) { String n = p_name; if (!n.begins_with("lightmap")) return false; - int idx = n.get_slice("/",1).to_int(); + int idx = n.get_slicec('/',1).to_int(); ERR_FAIL_COND_V(idx<0,false); ERR_FAIL_COND_V(idx>lightmaps.size(),false); - String what = n.get_slice("/",2); + String what = n.get_slicec('/',2); Ref<Texture> tex; Size2 gens; @@ -343,11 +343,11 @@ bool BakedLight::_get(const StringName& p_name,Variant &r_ret) const{ String n = p_name; if (!n.begins_with("lightmap")) return false; - int idx = n.get_slice("/",1).to_int(); + int idx = n.get_slicec('/',1).to_int(); ERR_FAIL_COND_V(idx<0,false); ERR_FAIL_COND_V(idx>lightmaps.size(),false); - String what = n.get_slice("/",2); + String what = n.get_slicec('/',2); if (what=="texture") { if (idx==lightmaps.size()) diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 039a4788d5..8cb0904415 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -99,7 +99,7 @@ bool Mesh::_set(const StringName& p_name, const Variant& p_value) { if (sl==-1) return false; int idx=sname.substr(8,sl-8).to_int()-1; - String what = sname.get_slice("/",1); + String what = sname.get_slicec('/',1); if (what=="material") surface_set_material(idx,p_value); else if (what=="name") @@ -117,8 +117,8 @@ bool Mesh::_set(const StringName& p_name, const Variant& p_value) { return false; - int idx=sname.get_slice("/",1).to_int(); - String what=sname.get_slice("/",2); + int idx=sname.get_slicec('/',1).to_int(); + String what=sname.get_slicec('/',2); if (idx==surfaces.size()) { @@ -180,7 +180,7 @@ bool Mesh::_get(const StringName& p_name,Variant &r_ret) const { if (sl==-1) return false; int idx=sname.substr(8,sl-8).to_int()-1; - String what = sname.get_slice("/",1); + String what = sname.get_slicec('/',1); if (what=="material") r_ret=surface_get_material(idx); else if (what=="name") @@ -195,7 +195,7 @@ bool Mesh::_get(const StringName& p_name,Variant &r_ret) const { return false; - int idx=sname.get_slice("/",1).to_int(); + int idx=sname.get_slicec('/',1).to_int(); ERR_FAIL_INDEX_V(idx,surfaces.size(),false); Dictionary d; diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp index ffa29572ff..5ebab9be76 100644 --- a/scene/resources/mesh_library.cpp +++ b/scene/resources/mesh_library.cpp @@ -35,8 +35,8 @@ bool MeshLibrary::_set(const StringName& p_name, const Variant& p_value) { String name=p_name; if (name.begins_with("item/")) { - int idx = name.get_slice("/",1).to_int(); - String what = name.get_slice("/",2); + int idx = name.get_slicec('/',1).to_int(); + String what = name.get_slicec('/',2); if (!item_map.has(idx)) create_item(idx); @@ -60,9 +60,9 @@ bool MeshLibrary::_set(const StringName& p_name, const Variant& p_value) { bool MeshLibrary::_get(const StringName& p_name,Variant &r_ret) const { String name=p_name; - int idx = name.get_slice("/",1).to_int(); + int idx = name.get_slicec('/',1).to_int(); ERR_FAIL_COND_V(!item_map.has(idx),false); - String what = name.get_slice("/",2); + String what = name.get_slicec('/',2); if(what=="name") r_ret= get_item_name(idx); diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index a1cb1205e5..b6082c3a76 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -53,7 +53,7 @@ Node *PackedScene::instance(bool p_gen_edit_state) const { if (prop_count) props=&variants[0]; - Vector<Variant> properties; + //Vector<Variant> properties; const NodeData *nd = &nodes[0]; @@ -257,10 +257,13 @@ Error PackedScene::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map< String name = E->get().name; Variant value = p_node->get( E->get().name ); - if (E->get().usage & PROPERTY_USAGE_STORE_IF_NONZERO && value.is_zero()) { + if (nd.instance<0 && ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONZERO) && value.is_zero()) || ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONONE) && value.is_one())) { continue; } + print_line("PASSED!"); + print_line("at: "+String(p_node->get_name())+"::"+name+": - nz: "+itos(E->get().usage&PROPERTY_USAGE_STORE_IF_NONZERO)+" no: "+itos(E->get().usage&PROPERTY_USAGE_STORE_IF_NONONE)); + print_line("value: "+String(value)+" is zero: "+itos(value.is_zero())+" is one" +itos(value.is_one())); if (nd.instance>=0) { //only save changed properties in instance @@ -278,7 +281,7 @@ Error PackedScene::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map< continue; } - if (instance_state[name]==value) { + if (instance_state.has(name) && instance_state[name]==value) { continue; } diff --git a/scene/resources/sample_library.cpp b/scene/resources/sample_library.cpp index 6bb9bc0d06..ffcaa1e675 100644 --- a/scene/resources/sample_library.cpp +++ b/scene/resources/sample_library.cpp @@ -34,7 +34,7 @@ bool SampleLibrary::_set(const StringName& p_name, const Variant& p_value) { if (String(p_name).begins_with("samples/")) { - String name=String(p_name).get_slice("/",1); + String name=String(p_name).get_slicec('/',1); if (p_value.get_type()==Variant::NIL) sample_map.erase(name); else { @@ -66,7 +66,7 @@ bool SampleLibrary::_get(const StringName& p_name,Variant &r_ret) const { if (String(p_name).begins_with("samples/")) { - String name=String(p_name).get_slice("/",1); + String name=String(p_name).get_slicec('/',1); if(sample_map.has(name)) { Dictionary d; d["sample"]=sample_map[name].sample; diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp index 21bdb6c0ab..3060fe41b4 100644 --- a/scene/resources/theme.cpp +++ b/scene/resources/theme.cpp @@ -40,9 +40,9 @@ bool Theme::_set(const StringName& p_name, const Variant& p_value) { if (sname.find("/")!=-1) { - String type=sname.get_slice("/",1); - String node_type=sname.get_slice("/",0); - String name=sname.get_slice("/",2); + String type=sname.get_slicec('/',1); + String node_type=sname.get_slicec('/',0); + String name=sname.get_slicec('/',2); if (type=="icons") { @@ -75,9 +75,9 @@ bool Theme::_get(const StringName& p_name,Variant &r_ret) const { if (sname.find("/")!=-1) { - String type=sname.get_slice("/",1); - String node_type=sname.get_slice("/",0); - String name=sname.get_slice("/",2); + String type=sname.get_slicec('/',1); + String node_type=sname.get_slicec('/',0); + String name=sname.get_slicec('/',2); if (type=="icons") { diff --git a/scene/scene_string_names.cpp b/scene/scene_string_names.cpp index 2689c14718..9509878dc9 100644 --- a/scene/scene_string_names.cpp +++ b/scene/scene_string_names.cpp @@ -68,6 +68,8 @@ SceneStringNames::SceneStringNames() { area_enter_shape = StaticCString::create("area_enter_shape"); area_exit_shape = StaticCString::create("area_exit_shape"); + _body_inout = StaticCString::create("_body_inout"); + _area_inout = StaticCString::create("_area_inout"); idle=StaticCString::create("idle"); iteration=StaticCString::create("iteration"); @@ -161,4 +163,11 @@ SceneStringNames::SceneStringNames() { frame_changed=StaticCString::create("frame_changed"); + playback_speed=StaticCString::create("playback/speed"); + playback_active=StaticCString::create("playback/active"); + autoplay=StaticCString::create("autoplay"); + blend_times=StaticCString::create("blend_times"); + speed=StaticCString::create("speed"); + + path_pp=NodePath(".."); } diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h index 83e817dbf7..48f17ed38b 100644 --- a/scene/scene_string_names.h +++ b/scene/scene_string_names.h @@ -30,7 +30,7 @@ #define SCENE_STRING_NAMES_H #include "string_db.h" - +#include "path_db.h" class SceneStringNames { friend void register_scene_types(); @@ -87,6 +87,8 @@ public: StringName area_enter_shape; StringName area_exit_shape; + StringName _body_inout; + StringName _area_inout; StringName _get_gizmo_geometry; @@ -170,6 +172,14 @@ public: StringName frame_changed; + StringName playback_speed; + StringName playback_active; + StringName autoplay; + StringName blend_times; + StringName speed; + + NodePath path_pp; + }; |