-Conversion of most properties to a simpler syntax, easier to use by script
-Modified help to display properties GDScript can still not make use of them, though.
This commit is contained in:
parent
3fae505128
commit
b085c40edf
|
@ -957,6 +957,40 @@ Variant::Type ClassDB::get_property_type(const StringName& p_class, const String
|
|||
|
||||
}
|
||||
|
||||
StringName ClassDB::get_property_setter(StringName p_class,const StringName p_property) {
|
||||
|
||||
ClassInfo *type=classes.getptr(p_class);
|
||||
ClassInfo *check=type;
|
||||
while(check) {
|
||||
const PropertySetGet *psg = check->property_setget.getptr(p_property);
|
||||
if (psg) {
|
||||
|
||||
return psg->setter;
|
||||
}
|
||||
|
||||
check=check->inherits_ptr;
|
||||
}
|
||||
|
||||
return StringName();
|
||||
}
|
||||
|
||||
StringName ClassDB::get_property_getter(StringName p_class,const StringName p_property) {
|
||||
|
||||
ClassInfo *type=classes.getptr(p_class);
|
||||
ClassInfo *check=type;
|
||||
while(check) {
|
||||
const PropertySetGet *psg = check->property_setget.getptr(p_property);
|
||||
if (psg) {
|
||||
|
||||
return psg->getter;
|
||||
}
|
||||
|
||||
check=check->inherits_ptr;
|
||||
}
|
||||
|
||||
return StringName();
|
||||
}
|
||||
|
||||
|
||||
void ClassDB::set_method_flags(StringName p_class,StringName p_method,int p_flags) {
|
||||
|
||||
|
|
|
@ -482,6 +482,8 @@ public:
|
|||
static bool set_property(Object* p_object, const StringName& p_property, const Variant& p_value, bool *r_valid=NULL);
|
||||
static bool get_property(Object* p_object,const StringName& p_property, Variant& r_value);
|
||||
static Variant::Type get_property_type(const StringName& p_class, const StringName& p_property,bool *r_is_valid=NULL);
|
||||
static StringName get_property_setter(StringName p_class,const StringName p_property);
|
||||
static StringName get_property_getter(StringName p_class,const StringName p_property);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -302,8 +302,9 @@ void Resource::_bind_methods() {
|
|||
|
||||
ClassDB::bind_method(_MD("duplicate","subresources"),&Resource::duplicate,DEFVAL(false));
|
||||
ADD_SIGNAL( MethodInfo("changed") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::STRING,"resource/path",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR ), _SCS("set_path"),_SCS("get_path"));
|
||||
ADD_PROPERTYNZ( PropertyInfo(Variant::STRING,"resource/name"), _SCS("set_name"),_SCS("get_name"));
|
||||
ADD_GROUP("Resource","resource_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::STRING,"resource_path",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR ), _SCS("set_path"),_SCS("get_path"));
|
||||
ADD_PROPERTYNZ( PropertyInfo(Variant::STRING,"resource_name"), _SCS("set_name"),_SCS("get_name"));
|
||||
}
|
||||
|
||||
RID Resource::get_rid() const {
|
||||
|
|
|
@ -318,7 +318,7 @@ bool GridMapEditor::do_input_action(Camera* p_camera,const Point2& p_point,bool
|
|||
p.d=edit_floor[edit_axis]*node->get_cell_size();
|
||||
|
||||
Vector3 inters;
|
||||
if (!p.intersects_segment(from, from + normal * settings_pick_distance->get_val(), &inters))
|
||||
if (!p.intersects_segment(from, from + normal * settings_pick_distance->get_value(), &inters))
|
||||
return false;
|
||||
|
||||
|
||||
|
@ -548,12 +548,12 @@ bool GridMapEditor::forward_spatial_input_event(Camera* p_camera,const InputEven
|
|||
|
||||
if (p_event.mouse_button.button_index==BUTTON_WHEEL_UP && (p_event.mouse_button.mod.command || p_event.mouse_button.mod.shift)) {
|
||||
if (p_event.mouse_button.pressed)
|
||||
floor->set_val( floor->get_val() +1);
|
||||
floor->set_value( floor->get_value() +1);
|
||||
|
||||
return true; //eaten
|
||||
} else if (p_event.mouse_button.button_index==BUTTON_WHEEL_DOWN && (p_event.mouse_button.mod.command || p_event.mouse_button.mod.shift)) {
|
||||
if (p_event.mouse_button.pressed)
|
||||
floor->set_val( floor->get_val() -1);
|
||||
floor->set_value( floor->get_value() -1);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -981,7 +981,7 @@ void GridMapEditor::update_grid() {
|
|||
}
|
||||
|
||||
updating=true;
|
||||
floor->set_val(edit_floor[edit_axis]);
|
||||
floor->set_value(edit_floor[edit_axis]);
|
||||
updating=false;
|
||||
|
||||
}
|
||||
|
@ -1263,7 +1263,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
|
|||
settings_pick_distance->set_max(10000.0f);
|
||||
settings_pick_distance->set_min(500.0f);
|
||||
settings_pick_distance->set_step(1.0f);
|
||||
settings_pick_distance->set_val(EDITOR_DEF("grid_map/pick_distance", 5000.0));
|
||||
settings_pick_distance->set_value(EDITOR_DEF("grid_map/pick_distance", 5000.0));
|
||||
settings_vbc->add_margin_child("Pick Distance:", settings_pick_distance);
|
||||
|
||||
clip_mode=CLIP_DISABLED;
|
||||
|
|
473
prop_renames.txt
473
prop_renames.txt
|
@ -33,3 +33,476 @@ material/material = material
|
|||
material/use_parent = use_parent_material
|
||||
|
||||
|
||||
[Resource]
|
||||
|
||||
resource/path = resource_path
|
||||
resource/name = resource_name
|
||||
|
||||
|
||||
[Area2D]
|
||||
|
||||
collision/layers = collision_layers
|
||||
collision/mask = collision_mask
|
||||
|
||||
[Camera2D]
|
||||
|
||||
limit/left = limit_left
|
||||
limit/right = limit_right
|
||||
limit/bottom = limit_bottom
|
||||
limit/top = limit_top
|
||||
limit/smoothed = limit_smoothed
|
||||
|
||||
draw_margin/h_enabled = draw_margin_h_enabled
|
||||
draw_margin/v_enabled = draw_margin_v_enabled
|
||||
|
||||
smoothing/enable = smoothing_enabled
|
||||
smoothing/speed = smoothing_speed
|
||||
|
||||
drag_margin/left = drag_margin_left
|
||||
drag_margin/top = drag_margin_top
|
||||
drag_margin/right = drag_margin_right
|
||||
drag_margin/bottom = drag_margin_bottom
|
||||
|
||||
[CollisionObject2D]
|
||||
|
||||
input/pickable = input_pickable
|
||||
|
||||
[Joint2D]
|
||||
|
||||
bias/bias = bias
|
||||
collision/exclude_nodes = disable_collision
|
||||
|
||||
[Light2D]
|
||||
|
||||
range/height = range_height
|
||||
range/z_min = range_z_min
|
||||
range/z_max = range_z_max
|
||||
range/layer_max = range_layer_max
|
||||
range/item_cull_mask = range_item_cull_max
|
||||
|
||||
shadow/enabled = shadow_enabled
|
||||
shadow/color = shadow_color
|
||||
shadow/buffer_size = shadow_buffer_size
|
||||
shadow/gradient_length = shadow_gradient_length
|
||||
shadow/filter = shadow_filter
|
||||
shadow/item_cull_mask = shadow_item_cull_mask
|
||||
|
||||
[Node2D]
|
||||
|
||||
transform/pos = position
|
||||
transform/rot = rotation
|
||||
transform/scale = scale
|
||||
z/z = z
|
||||
z/relative = z_as_relative
|
||||
|
||||
[ParallaxBackground]
|
||||
|
||||
scroll/offset = scroll_offset
|
||||
scroll/base_offset = scroll_base_offset
|
||||
scroll/base_scale = scroll_base_scale
|
||||
scroll/limit_begin = scroll_limit_begin
|
||||
scroll/limit_end = scroll_limit_end
|
||||
scroll/ignore_camera_zoom = scroll_ignore_camera_zoom
|
||||
|
||||
[ParallaxLayer]
|
||||
|
||||
motion/scale = motion_scale
|
||||
motion/offset = motion_offset
|
||||
motion/mirroring = motion_mirroring
|
||||
|
||||
[PhysicsBody2D]
|
||||
|
||||
collision/layers = collision_layers
|
||||
collision/mask = collision_mask
|
||||
|
||||
[Polygon2D]
|
||||
|
||||
texture/texture = texture
|
||||
texture/offset = texture_offset
|
||||
texture/rotation = texture_rotation
|
||||
texture/scale = texture_scale
|
||||
|
||||
invert/enable = invert_enable
|
||||
invert/border = invert_border
|
||||
|
||||
[SamplePlayer2D]
|
||||
|
||||
config/polyphony = polyphony
|
||||
config/samples = samples
|
||||
config/pitch_random = random_pitch
|
||||
|
||||
[SoundPlayer2D]
|
||||
|
||||
params/volume_db = volume_db
|
||||
params/pitch_scale = pitch_scale
|
||||
params/attenuation/min_distance = attenuation_min_distance
|
||||
params/attenuation/max_distance = attenuation_max_distance
|
||||
params/attenuation/distance_exp = attenuation_distance_exp
|
||||
|
||||
[TileMap]
|
||||
|
||||
cell/size = cell_size
|
||||
cell/quadrant_size = cell_quadrant_size
|
||||
cell/half_offset = cell_half_offset
|
||||
cell/tile_origin = cell_tile_origin
|
||||
cell/y_sort = cell_y_sort
|
||||
|
||||
collision/use_kinematic = collision_use_kinematic
|
||||
collision/friction = collision_friction
|
||||
collision/bounce = collision_bounce
|
||||
collision/layers = collision_layers
|
||||
collision/mask = collision_mask
|
||||
|
||||
occluder/light_mask = occluder_light_mask
|
||||
|
||||
[VisibilityEnabler2D]
|
||||
|
||||
enabler/pause_animations = pause_animations
|
||||
enabler/freeze_bodies = freeze_bodies
|
||||
enabler/pause_particles = pause_particles
|
||||
enabler/pause_animated_sprites = pause_animated_sprites
|
||||
enabler/process_parent = process_parent
|
||||
enabler/fixed_process_parent = fixed_process_parent
|
||||
|
||||
|
||||
[YSort]
|
||||
|
||||
sort/enabled = sort_enabled
|
||||
|
||||
|
||||
[Area]
|
||||
|
||||
collision/layers = collision_layers
|
||||
collision/mask = collision_mask
|
||||
|
||||
|
||||
[CollisionObject]
|
||||
|
||||
input/ray_pickable = input_ray_pickable
|
||||
input/capture_on_drag = input_capture_on_drag
|
||||
|
||||
[Light]
|
||||
|
||||
light/color = light_color
|
||||
light/energy = light_energy
|
||||
light/negative = light_negative
|
||||
light/specular = light_specular
|
||||
light/cull_mask = light_cull_mask
|
||||
|
||||
shadow/enabled = shadow_enabled
|
||||
shadow/color = shadow_color
|
||||
shadow/bias = shadow_bias
|
||||
shadow/max_distance = shadow_max_distance
|
||||
editor/editor_only = editor_only
|
||||
|
||||
[DirectionalLight]
|
||||
|
||||
directional_shadow/mode = directional_shadow_mode
|
||||
directional_shadow/split_1 = directional_shadow_split_1
|
||||
directional_shadow/split_2 = directional_shadow_split_2
|
||||
directional_shadow/split_3 = directional_shadow_split_3
|
||||
directional_shadow/blend_splits = directional_shadow_blend_splits
|
||||
directional_shadow/normal_bias = directional_shadow_normal_bias
|
||||
directional_shadow/bias_split_scale = directional_shadow_bias_split_scale
|
||||
|
||||
[OmniLight]
|
||||
|
||||
omni/range = omni_range
|
||||
omni/attenuation = omni_attenuation
|
||||
omni/shadow_mode = omni_shadow_mode
|
||||
omni/shadow_detail = omni_shadow_detail
|
||||
|
||||
[SpotLight]
|
||||
|
||||
spot/range = spot_range
|
||||
spot/attenuation = spot_attenuation
|
||||
spot/angle = spot_angle
|
||||
spot/spot_attenuation = spot_angle_attenuation
|
||||
|
||||
[MeshInstance]
|
||||
|
||||
mesh/mesh = mesh
|
||||
mesh/skeleton = skeleton
|
||||
|
||||
|
||||
[PhysicsBody]
|
||||
|
||||
collision/layers = collision_layers
|
||||
collision/mask = collision_mask
|
||||
|
||||
[Quad]
|
||||
|
||||
quad/axis = axis
|
||||
quad/size = size
|
||||
quad/offset = offset
|
||||
quad/centered = centered
|
||||
|
||||
[Spatial]
|
||||
|
||||
transform/local = transform
|
||||
transform/transiation = translation
|
||||
transform/rotation = rotation
|
||||
transform/scale = scale
|
||||
visibility/visible = visible
|
||||
|
||||
[SpatialPlayer]
|
||||
|
||||
params/volume_db = volume_db
|
||||
params/pitch_scale = pitch_scale
|
||||
params/attenuation/min_distance = attenuation_min_distance
|
||||
params/attenuation/max_distance = attenuation_max_distance
|
||||
params/attenuation/distance_exp = attenuation_distance_exp
|
||||
params/emission_cone/degrees = emission_cone_degrees
|
||||
params/emission_cone/attenuation_db = emission_cone_attenuation_db
|
||||
|
||||
[SpatialSamplePlayer]
|
||||
|
||||
config/polyphony = polyphony
|
||||
config/samples = samples
|
||||
|
||||
[Sprite3D]
|
||||
|
||||
flags/transparent = transparent
|
||||
flags/shaded = shaded
|
||||
flags/alpha_cut = alpha_cut
|
||||
|
||||
[VehicleWheel]
|
||||
|
||||
type/traction = use_as_traction
|
||||
type/steering = use_as_steering
|
||||
|
||||
wheel/radius = wheel_radius
|
||||
wheel/rest_length = wheel_rest_length
|
||||
wheel/friction_slip = wheel_friction_sleep
|
||||
|
||||
suspension/travel = suspension_travel
|
||||
suspension/stiffness = suspension_stiffness
|
||||
suspension/max_force = suspension_max_force
|
||||
damping/compression = damping_compression
|
||||
damping/relaxation = damping_relaxation
|
||||
|
||||
[VehicleBody]
|
||||
|
||||
motion/engine_force = engine_force
|
||||
motion/breake = breake
|
||||
motion/steering = steering
|
||||
body/mass = mass
|
||||
body/friction = friction
|
||||
|
||||
[VisibilityEnabler]
|
||||
|
||||
enabler/pause_animations = pause_animations
|
||||
enabler/freeze_bodies = freeze_bodies
|
||||
|
||||
[GeometryInstance]
|
||||
|
||||
geometry/material_override = material_override
|
||||
geometry/cast_shadow = cast_shadow
|
||||
geometry/extra_cull_margin = extra_cull_margin
|
||||
geometry/billboard = use_as_billboard
|
||||
geometry/billboard_y = use_as_y_billboard
|
||||
geometry/depth_scale = use_depth_scale
|
||||
geometry/visible_in_all_rooms = visible_in_all_rooms
|
||||
geometry/use_baked_light = use_in_baked_light
|
||||
|
||||
|
||||
|
||||
[AnimationPlayer]
|
||||
|
||||
playback/process_mode = playback_process_mode
|
||||
playback/default_blend_time = playback_default_blend_time
|
||||
root/root = root_node
|
||||
|
||||
[AnimationTreePlayer]
|
||||
|
||||
playback/process_mode = playback_process_mode
|
||||
|
||||
[EventPlayer]
|
||||
|
||||
stream/stream = stream
|
||||
stream/play = play
|
||||
stream/loop = loop
|
||||
stream/volume_db = volume_db
|
||||
stream/pitch_scale = pitch_scale
|
||||
stream/tempo_scale = tempo_scale
|
||||
stream/autoplay = autoplay
|
||||
stream/paused = paused
|
||||
|
||||
[StreamPlayer]
|
||||
|
||||
stream/stream = stream
|
||||
stream/play = play
|
||||
stream/loop = loop
|
||||
stream/volume_db = volume_db
|
||||
stream/autoplay = autoplay
|
||||
stream/paused = paused
|
||||
stream/loop_restart_time = loop_restart_time
|
||||
stream/buffering_ms = buffering_ms
|
||||
|
||||
[SpatialStreamPlayer]
|
||||
|
||||
stream/stream = stream
|
||||
stream/play = play
|
||||
stream/loop = loop
|
||||
stream/volume_db = volume_db
|
||||
stream/autoplay = autoplay
|
||||
stream/paused = paused
|
||||
stream/loop_restart_time = loop_restart_time
|
||||
stream/buffering_ms = buffering_ms
|
||||
|
||||
[WindowDialog]
|
||||
|
||||
window/title = window_title
|
||||
|
||||
[AcceptDialog]
|
||||
|
||||
dialog/text = dialog_text
|
||||
dialog/hide_on_ok = dialog_hide_on_ok
|
||||
|
||||
[LineEdit]
|
||||
|
||||
placeholder/text = placeholder_text
|
||||
placeholder/alpha = placeholder_alpha
|
||||
caret/caret_blink = caret_blink
|
||||
caret/caret_blink_speed = caret_blink_speed
|
||||
|
||||
[Patch9Frame]
|
||||
|
||||
patch_margin/left = patch_margin_left
|
||||
patch_margin/right = patch_margin_right
|
||||
patch_margin/top = patch_margin_top
|
||||
patch_margin/bottom = patch_margin_bottom
|
||||
|
||||
|
||||
[Popup]
|
||||
|
||||
popup/exclusive = popup_exclusive
|
||||
|
||||
[ProgressBar]
|
||||
|
||||
percent/visible = percent_visible
|
||||
|
||||
[Range]
|
||||
|
||||
range/min = min_value
|
||||
range/max = max_value
|
||||
range/step = step
|
||||
range/page = page
|
||||
range/value = value
|
||||
range/exp_edit = exp_edit
|
||||
range/rounded = rounded
|
||||
|
||||
|
||||
[RigidBody2D]
|
||||
|
||||
velocity/linear = linear_velocity
|
||||
velocity/angular = angular_velocity
|
||||
damp_override_linear = linear_damp
|
||||
damp_override_angular = angular_damp
|
||||
|
||||
|
||||
[RigidBody]
|
||||
|
||||
velocity/linear = linear_velocity
|
||||
velocity/angular = angular_velocity
|
||||
damp_override_linear = linear_damp
|
||||
damp_override_angular = angular_damp
|
||||
|
||||
[Tween]
|
||||
|
||||
playback/process_mode = playback_process_mode
|
||||
|
||||
[RichTextLabel]
|
||||
|
||||
bbcode/enabled = bbcode_enabled
|
||||
bbcode/bbcode = bbcode_text
|
||||
|
||||
[ScrollContainer]
|
||||
|
||||
scroll/horizontal = scroll_horizontal
|
||||
scroll/vertical = scroll_vertical
|
||||
|
||||
[SplitContainer]
|
||||
|
||||
split/offset = split_offset
|
||||
split/collapsed = collapsed
|
||||
split/dragger_visibility = dragger_visibility
|
||||
|
||||
[TextEdit]
|
||||
|
||||
caret/block_caret = caret_block_mode
|
||||
caret/caret_blink = caret_blink
|
||||
caret/caret_blink_speed = caret_blink_speed
|
||||
|
||||
[TextureButton]
|
||||
|
||||
textures/normal = texture_normal
|
||||
textures/pressed = texture_pressed
|
||||
textures/hover = texture_hover
|
||||
textures/disabled = texture_disabled
|
||||
textures/focused = texture_focused
|
||||
textures/click_mask = texture_click_mask
|
||||
params/scale = texture_scale
|
||||
params/modulate = self_modulate
|
||||
|
||||
[TextureProgress]
|
||||
|
||||
texture/under = texture_under
|
||||
texture/over = texture_over
|
||||
texture/progress = texture_progress
|
||||
mode = fill_mode
|
||||
radial_fill/initial_angle = radial_initial_angle
|
||||
radial_fill/fill_degrees = radial_fill_degrees
|
||||
radial_fill/center_offset = radial_center_offset
|
||||
|
||||
[VideoPlayer]
|
||||
|
||||
stream/audio_track = audio_track
|
||||
stream/stream = stream
|
||||
stream/volume_db = volume_db
|
||||
stream/autoplay = stream_autoplay
|
||||
stream/paused = stream_paused
|
||||
|
||||
[DynamicFont]
|
||||
|
||||
font/size = size
|
||||
extra_spacing/top = extra_spacing_top
|
||||
extra_spacing/bottom = extra_spacing_bottom
|
||||
extra_spacing/char = extra_spacing_char
|
||||
extra_spacing/space = extra_spacing_space
|
||||
font/use_mipmaps = use_mipmaps
|
||||
font/use_filter = use_filter
|
||||
font/font=font_data
|
||||
|
||||
[StyleBox]
|
||||
|
||||
content_margin/left = content_margin_left
|
||||
content_margin/right = content_margin_right
|
||||
content_margin/bottom = content_margin_bottom
|
||||
content_margin/top = content_margin_top
|
||||
|
||||
|
||||
[StyleBoxTexture]
|
||||
|
||||
margin/left = margin_left
|
||||
margin/top = margin_top
|
||||
margin/bottom = margin_bottom
|
||||
margin/right = margin_right
|
||||
|
||||
expand_margin/left = expand_margin_left
|
||||
expand_margin/top = expand_margin_top
|
||||
expand_margin/bottom = expand_margin_bottom
|
||||
expand_margin/right = expand_margin_right
|
||||
|
||||
modulate/color = modulate_color
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -666,8 +666,9 @@ void Area2D::_bind_methods() {
|
|||
ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"priority",PROPERTY_HINT_RANGE,"0,128,1"),_SCS("set_priority"),_SCS("get_priority"));
|
||||
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"));
|
||||
ADD_GROUP("Collision","collision_");
|
||||
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"));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -656,25 +656,26 @@ void Camera2D::_bind_methods() {
|
|||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"current"),_SCS("_set_current"),_SCS("is_current"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"zoom"),_SCS("set_zoom"),_SCS("get_zoom") );
|
||||
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"limit/left"),_SCS("set_limit"),_SCS("get_limit"),MARGIN_LEFT);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"limit/top"),_SCS("set_limit"),_SCS("get_limit"),MARGIN_TOP);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"limit/right"),_SCS("set_limit"),_SCS("get_limit"),MARGIN_RIGHT);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"limit/bottom"),_SCS("set_limit"),_SCS("get_limit"),MARGIN_BOTTOM);
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"limit/smoothed"),_SCS("set_limit_smoothing_enabled"),_SCS("is_limit_smoothing_enabled") );
|
||||
ADD_GROUP("Limit","limit_");
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"limit_left"),_SCS("set_limit"),_SCS("get_limit"),MARGIN_LEFT);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"limit_top"),_SCS("set_limit"),_SCS("get_limit"),MARGIN_TOP);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"limit_right"),_SCS("set_limit"),_SCS("get_limit"),MARGIN_RIGHT);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"limit_bottom"),_SCS("set_limit"),_SCS("get_limit"),MARGIN_BOTTOM);
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"limit_smoothed"),_SCS("set_limit_smoothing_enabled"),_SCS("is_limit_smoothing_enabled") );
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"drag_margin/h_enabled"),_SCS("set_h_drag_enabled"),_SCS("is_h_drag_enabled") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"drag_margin/v_enabled"),_SCS("set_v_drag_enabled"),_SCS("is_v_drag_enabled") );
|
||||
ADD_GROUP("Draw Margin","draw_margin_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"drag_margin_h_enabled"),_SCS("set_h_drag_enabled"),_SCS("is_h_drag_enabled") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"drag_margin_v_enabled"),_SCS("set_v_drag_enabled"),_SCS("is_v_drag_enabled") );
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"smoothing/enable"),_SCS("set_enable_follow_smoothing"),_SCS("is_follow_smoothing_enabled") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"smoothing/speed"),_SCS("set_follow_smoothing"),_SCS("get_follow_smoothing") );
|
||||
ADD_GROUP("Smoothing","smoothing_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"smoothing_enabled"),_SCS("set_enable_follow_smoothing"),_SCS("is_follow_smoothing_enabled") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"smoothing_speed"),_SCS("set_follow_smoothing"),_SCS("get_follow_smoothing") );
|
||||
|
||||
//compatibility
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"smoothing",PROPERTY_HINT_NONE,"",0),_SCS("_set_old_smoothing"),_SCS("get_follow_smoothing") );
|
||||
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"drag_margin/left",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_drag_margin"),_SCS("get_drag_margin"),MARGIN_LEFT);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"drag_margin/top",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_drag_margin"),_SCS("get_drag_margin"),MARGIN_TOP);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"drag_margin/right",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_drag_margin"),_SCS("get_drag_margin"),MARGIN_RIGHT);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"drag_margin/bottom",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_drag_margin"),_SCS("get_drag_margin"),MARGIN_BOTTOM);
|
||||
ADD_GROUP("Drag Margin","drag_margin_");
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"drag_margin_left",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_drag_margin"),_SCS("get_drag_margin"),MARGIN_LEFT);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"drag_margin_top",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_drag_margin"),_SCS("get_drag_margin"),MARGIN_TOP);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"drag_margin_right",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_drag_margin"),_SCS("get_drag_margin"),MARGIN_RIGHT);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"drag_margin_bottom",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_drag_margin"),_SCS("get_drag_margin"),MARGIN_BOTTOM);
|
||||
|
||||
|
||||
BIND_CONSTANT( ANCHOR_MODE_DRAG_CENTER );
|
||||
|
|
|
@ -242,7 +242,9 @@ void CollisionObject2D::_bind_methods() {
|
|||
ADD_SIGNAL( MethodInfo("mouse_enter"));
|
||||
ADD_SIGNAL( MethodInfo("mouse_exit"));
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"input/pickable"),_SCS("set_pickable"),_SCS("is_pickable"));
|
||||
ADD_GROUP("Pickable","input_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"input_pickable"),_SCS("set_pickable"),_SCS("is_pickable"));
|
||||
ADD_GROUP("","");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -142,8 +142,8 @@ void Joint2D::_bind_methods() {
|
|||
|
||||
ADD_PROPERTY( PropertyInfo( Variant::NODE_PATH, "node_a"), _SCS("set_node_a"),_SCS("get_node_a") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::NODE_PATH, "node_b"), _SCS("set_node_b"),_SCS("get_node_b") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "bias/bias",PROPERTY_HINT_RANGE,"0,0.9,0.001"), _SCS("set_bias"),_SCS("get_bias") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "collision/exclude_nodes"), _SCS("set_exclude_nodes_from_collision"),_SCS("get_exclude_nodes_from_collision") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "bias",PROPERTY_HINT_RANGE,"0,0.9,0.001"), _SCS("set_bias"),_SCS("get_bias") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "disable_collision"), _SCS("set_exclude_nodes_from_collision"),_SCS("get_exclude_nodes_from_collision") );
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -436,18 +436,21 @@ void Light2D::_bind_methods() {
|
|||
ADD_PROPERTY( PropertyInfo(Variant::COLOR,"color"),_SCS("set_color"),_SCS("get_color"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"energy",PROPERTY_HINT_RANGE,"0.01,100,0.01"),_SCS("set_energy"),_SCS("get_energy"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"mode",PROPERTY_HINT_ENUM,"Add,Sub,Mix,Mask"),_SCS("set_mode"),_SCS("get_mode"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"range/height",PROPERTY_HINT_RANGE,"-100,100,0.1"),_SCS("set_height"),_SCS("get_height"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"range/z_min",PROPERTY_HINT_RANGE,itos(VS::CANVAS_ITEM_Z_MIN)+","+itos(VS::CANVAS_ITEM_Z_MAX)+",1"),_SCS("set_z_range_min"),_SCS("get_z_range_min"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"range/z_max",PROPERTY_HINT_RANGE,itos(VS::CANVAS_ITEM_Z_MIN)+","+itos(VS::CANVAS_ITEM_Z_MAX)+",1"),_SCS("set_z_range_max"),_SCS("get_z_range_max"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"range/layer_min",PROPERTY_HINT_RANGE,"-512,512,1"),_SCS("set_layer_range_min"),_SCS("get_layer_range_min"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"range/layer_max",PROPERTY_HINT_RANGE,"-512,512,1"),_SCS("set_layer_range_max"),_SCS("get_layer_range_max"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"range/item_cull_mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_item_cull_mask"),_SCS("get_item_cull_mask"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"shadow/enabled"),_SCS("set_shadow_enabled"),_SCS("is_shadow_enabled"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::COLOR,"shadow/color"),_SCS("set_shadow_color"),_SCS("get_shadow_color"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"shadow/buffer_size",PROPERTY_HINT_RANGE,"32,16384,1"),_SCS("set_shadow_buffer_size"),_SCS("get_shadow_buffer_size"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"shadow/gradient_length",PROPERTY_HINT_RANGE,"1,4096,0.1"),_SCS("set_shadow_gradient_length"),_SCS("get_shadow_gradient_length"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"shadow/filter",PROPERTY_HINT_ENUM,"None,PCF3,PCF5,PCF9,PCF13"),_SCS("set_shadow_filter"),_SCS("get_shadow_filter"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"shadow/item_cull_mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_item_shadow_cull_mask"),_SCS("get_item_shadow_cull_mask"));
|
||||
ADD_GROUP("Range","range_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"range_height",PROPERTY_HINT_RANGE,"-100,100,0.1"),_SCS("set_height"),_SCS("get_height"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"range_z_min",PROPERTY_HINT_RANGE,itos(VS::CANVAS_ITEM_Z_MIN)+","+itos(VS::CANVAS_ITEM_Z_MAX)+",1"),_SCS("set_z_range_min"),_SCS("get_z_range_min"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"range_z_max",PROPERTY_HINT_RANGE,itos(VS::CANVAS_ITEM_Z_MIN)+","+itos(VS::CANVAS_ITEM_Z_MAX)+",1"),_SCS("set_z_range_max"),_SCS("get_z_range_max"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"range_layer_min",PROPERTY_HINT_RANGE,"-512,512,1"),_SCS("set_layer_range_min"),_SCS("get_layer_range_min"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"range_layer_max",PROPERTY_HINT_RANGE,"-512,512,1"),_SCS("set_layer_range_max"),_SCS("get_layer_range_max"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"range_item_cull_mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_item_cull_mask"),_SCS("get_item_cull_mask"));
|
||||
|
||||
ADD_GROUP("Shadow","shadow_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"shadow_enabled"),_SCS("set_shadow_enabled"),_SCS("is_shadow_enabled"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::COLOR,"shadow_color"),_SCS("set_shadow_color"),_SCS("get_shadow_color"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"shadow_buffer_size",PROPERTY_HINT_RANGE,"32,16384,1"),_SCS("set_shadow_buffer_size"),_SCS("get_shadow_buffer_size"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"shadow_gradient_length",PROPERTY_HINT_RANGE,"1,4096,0.1"),_SCS("set_shadow_gradient_length"),_SCS("get_shadow_gradient_length"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"shadow_filter",PROPERTY_HINT_ENUM,"None,PCF3,PCF5,PCF9,PCF13"),_SCS("set_shadow_filter"),_SCS("get_shadow_filter"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"shadow_item_cull_mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_item_shadow_cull_mask"),_SCS("get_item_shadow_cull_mask"));
|
||||
|
||||
BIND_CONSTANT( MODE_ADD );
|
||||
BIND_CONSTANT( MODE_SUB );
|
||||
|
|
|
@ -51,8 +51,8 @@ bool Node2D::edit_has_pivot() const {
|
|||
Variant Node2D::edit_get_state() const {
|
||||
|
||||
Array state;
|
||||
state.push_back(get_pos());
|
||||
state.push_back(get_rot());
|
||||
state.push_back(get_position());
|
||||
state.push_back(get_rotation());
|
||||
state.push_back(get_scale());
|
||||
|
||||
return state;
|
||||
|
@ -137,7 +137,7 @@ void Node2D::_update_transform() {
|
|||
_notify_transform();
|
||||
}
|
||||
|
||||
void Node2D::set_pos(const Point2& p_pos) {
|
||||
void Node2D::set_position(const Point2& p_pos) {
|
||||
|
||||
if (_xform_dirty)
|
||||
((Node2D*)this)->_update_xform_values();
|
||||
|
@ -148,7 +148,7 @@ void Node2D::set_pos(const Point2& p_pos) {
|
|||
|
||||
}
|
||||
|
||||
void Node2D::set_rot(float p_radians) {
|
||||
void Node2D::set_rotation(float p_radians) {
|
||||
|
||||
if (_xform_dirty)
|
||||
((Node2D*)this)->_update_xform_values();
|
||||
|
@ -157,9 +157,9 @@ void Node2D::set_rot(float p_radians) {
|
|||
_change_notify("transform/rot");
|
||||
}
|
||||
|
||||
void Node2D::set_rotd(float p_degrees) {
|
||||
void Node2D::set_rotation_in_degrees(float p_degrees) {
|
||||
|
||||
set_rot(Math::deg2rad(p_degrees));
|
||||
set_rotation(Math::deg2rad(p_degrees));
|
||||
}
|
||||
|
||||
// Kept for compatibility after rename to set_rotd.
|
||||
|
@ -167,7 +167,7 @@ void Node2D::set_rotd(float p_degrees) {
|
|||
void Node2D::_set_rotd(float p_degrees) {
|
||||
|
||||
WARN_PRINT("Deprecated method Node2D._set_rotd(): This method was renamed to set_rotd. Please adapt your code accordingly, as the old method will be obsoleted.");
|
||||
set_rotd(p_degrees);
|
||||
set_rotation_in_degrees(p_degrees);
|
||||
}
|
||||
|
||||
void Node2D::set_scale(const Size2& p_scale) {
|
||||
|
@ -184,28 +184,28 @@ void Node2D::set_scale(const Size2& p_scale) {
|
|||
|
||||
}
|
||||
|
||||
Point2 Node2D::get_pos() const {
|
||||
Point2 Node2D::get_position() const {
|
||||
|
||||
if (_xform_dirty)
|
||||
((Node2D*)this)->_update_xform_values();
|
||||
return pos;
|
||||
}
|
||||
float Node2D::get_rot() const {
|
||||
float Node2D::get_rotation() const {
|
||||
if (_xform_dirty)
|
||||
((Node2D*)this)->_update_xform_values();
|
||||
|
||||
return angle;
|
||||
}
|
||||
float Node2D::get_rotd() const {
|
||||
float Node2D::get_rotation_in_degrees() const {
|
||||
|
||||
return Math::rad2deg(get_rot());
|
||||
return Math::rad2deg(get_rotation());
|
||||
}
|
||||
// Kept for compatibility after rename to get_rotd.
|
||||
// Could be removed after a couple releases.
|
||||
float Node2D::_get_rotd() const {
|
||||
|
||||
WARN_PRINT("Deprecated method Node2D._get_rotd(): This method was renamed to get_rotd. Please adapt your code accordingly, as the old method will be obsoleted.");
|
||||
return get_rotd();
|
||||
return get_rotation_in_degrees();
|
||||
}
|
||||
Size2 Node2D::get_scale() const {
|
||||
if (_xform_dirty)
|
||||
|
@ -240,17 +240,17 @@ Rect2 Node2D::get_item_rect() const {
|
|||
|
||||
void Node2D::rotate(float p_radians) {
|
||||
|
||||
set_rot( get_rot() + p_radians);
|
||||
set_rotation( get_rotation() + p_radians);
|
||||
}
|
||||
|
||||
void Node2D::translate(const Vector2& p_amount) {
|
||||
|
||||
set_pos( get_pos() + p_amount );
|
||||
set_position( get_position() + p_amount );
|
||||
}
|
||||
|
||||
void Node2D::global_translate(const Vector2& p_amount) {
|
||||
|
||||
set_global_pos( get_global_pos() + p_amount );
|
||||
set_global_position( get_global_position() + p_amount );
|
||||
}
|
||||
|
||||
void Node2D::scale(const Size2& p_amount) {
|
||||
|
@ -265,7 +265,7 @@ void Node2D::move_x(float p_delta,bool p_scaled){
|
|||
Vector2 m = t[0];
|
||||
if (!p_scaled)
|
||||
m.normalize();
|
||||
set_pos(t[2]+m*p_delta);
|
||||
set_position(t[2]+m*p_delta);
|
||||
}
|
||||
|
||||
void Node2D::move_y(float p_delta,bool p_scaled){
|
||||
|
@ -274,53 +274,53 @@ void Node2D::move_y(float p_delta,bool p_scaled){
|
|||
Vector2 m = t[1];
|
||||
if (!p_scaled)
|
||||
m.normalize();
|
||||
set_pos(t[2]+m*p_delta);
|
||||
set_position(t[2]+m*p_delta);
|
||||
}
|
||||
|
||||
|
||||
Point2 Node2D::get_global_pos() const {
|
||||
Point2 Node2D::get_global_position() const {
|
||||
|
||||
return get_global_transform().get_origin();
|
||||
}
|
||||
|
||||
void Node2D::set_global_pos(const Point2& p_pos) {
|
||||
void Node2D::set_global_position(const Point2& p_pos) {
|
||||
|
||||
Matrix32 inv;
|
||||
CanvasItem *pi = get_parent_item();
|
||||
if (pi) {
|
||||
inv = pi->get_global_transform().affine_inverse();
|
||||
set_pos(inv.xform(p_pos));
|
||||
set_position(inv.xform(p_pos));
|
||||
} else {
|
||||
set_pos(p_pos);
|
||||
set_position(p_pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
float Node2D::get_global_rot() const {
|
||||
float Node2D::get_global_rotation() const {
|
||||
|
||||
return get_global_transform().get_rotation();
|
||||
}
|
||||
|
||||
void Node2D::set_global_rot(float p_radians) {
|
||||
void Node2D::set_global_rotation(float p_radians) {
|
||||
|
||||
CanvasItem *pi = get_parent_item();
|
||||
if (pi) {
|
||||
const float parent_global_rot = pi->get_global_transform().get_rotation();
|
||||
set_rot(p_radians - parent_global_rot);
|
||||
set_rotation(p_radians - parent_global_rot);
|
||||
} else {
|
||||
set_rot(p_radians);
|
||||
set_rotation(p_radians);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
float Node2D::get_global_rotd() const {
|
||||
float Node2D::get_global_rotation_in_degrees() const {
|
||||
|
||||
return Math::rad2deg(get_global_rot());
|
||||
return Math::rad2deg(get_global_rotation());
|
||||
}
|
||||
|
||||
void Node2D::set_global_rotd(float p_degrees) {
|
||||
void Node2D::set_global_rotation_in_degrees(float p_degrees) {
|
||||
|
||||
set_global_rot(Math::deg2rad(p_degrees));
|
||||
set_global_rotation(Math::deg2rad(p_degrees));
|
||||
}
|
||||
|
||||
|
||||
|
@ -426,14 +426,14 @@ void Node2D::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("_get_rotd"),&Node2D::_get_rotd);
|
||||
ClassDB::bind_method(_MD("_set_rotd","degrees"),&Node2D::_set_rotd);
|
||||
|
||||
ClassDB::bind_method(_MD("set_pos","pos"),&Node2D::set_pos);
|
||||
ClassDB::bind_method(_MD("set_rot","radians"),&Node2D::set_rot);
|
||||
ClassDB::bind_method(_MD("set_rotd","degrees"),&Node2D::set_rotd);
|
||||
ClassDB::bind_method(_MD("set_position","pos"),&Node2D::set_position);
|
||||
ClassDB::bind_method(_MD("set_rotation","radians"),&Node2D::set_rotation);
|
||||
ClassDB::bind_method(_MD("set_rotation_in_degrees","degrees"),&Node2D::set_rotation_in_degrees);
|
||||
ClassDB::bind_method(_MD("set_scale","scale"),&Node2D::set_scale);
|
||||
|
||||
ClassDB::bind_method(_MD("get_pos"),&Node2D::get_pos);
|
||||
ClassDB::bind_method(_MD("get_rot"),&Node2D::get_rot);
|
||||
ClassDB::bind_method(_MD("get_rotd"),&Node2D::get_rotd);
|
||||
ClassDB::bind_method(_MD("get_position"),&Node2D::get_position);
|
||||
ClassDB::bind_method(_MD("get_rotation"),&Node2D::get_rotation);
|
||||
ClassDB::bind_method(_MD("get_rotation_in_degrees"),&Node2D::get_rotation_in_degrees);
|
||||
ClassDB::bind_method(_MD("get_scale"),&Node2D::get_scale);
|
||||
|
||||
ClassDB::bind_method(_MD("rotate","radians"),&Node2D::rotate);
|
||||
|
@ -443,12 +443,12 @@ void Node2D::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("global_translate","offset"),&Node2D::global_translate);
|
||||
ClassDB::bind_method(_MD("scale","ratio"),&Node2D::scale);
|
||||
|
||||
ClassDB::bind_method(_MD("set_global_pos","pos"),&Node2D::set_global_pos);
|
||||
ClassDB::bind_method(_MD("get_global_pos"),&Node2D::get_global_pos);
|
||||
ClassDB::bind_method(_MD("set_global_rot","radians"),&Node2D::set_global_rot);
|
||||
ClassDB::bind_method(_MD("get_global_rot"),&Node2D::get_global_rot);
|
||||
ClassDB::bind_method(_MD("set_global_rotd","degrees"),&Node2D::set_global_rotd);
|
||||
ClassDB::bind_method(_MD("get_global_rotd"),&Node2D::get_global_rotd);
|
||||
ClassDB::bind_method(_MD("set_global_position","pos"),&Node2D::set_global_position);
|
||||
ClassDB::bind_method(_MD("get_global_position"),&Node2D::get_global_position);
|
||||
ClassDB::bind_method(_MD("set_global_rotation","radians"),&Node2D::set_global_rotation);
|
||||
ClassDB::bind_method(_MD("get_global_rotation"),&Node2D::get_global_rotation);
|
||||
ClassDB::bind_method(_MD("set_global_rotation_in_degrees","degrees"),&Node2D::set_global_rotation_in_degrees);
|
||||
ClassDB::bind_method(_MD("get_global_rotation_in_degrees"),&Node2D::get_global_rotation_in_degrees);
|
||||
ClassDB::bind_method(_MD("set_global_scale","scale"),&Node2D::set_global_scale);
|
||||
ClassDB::bind_method(_MD("get_global_scale"),&Node2D::get_global_scale);
|
||||
|
||||
|
@ -468,11 +468,22 @@ void Node2D::_bind_methods() {
|
|||
|
||||
ClassDB::bind_method(_MD("get_relative_transform_to_parent","parent"),&Node2D::get_relative_transform_to_parent);
|
||||
|
||||
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"));
|
||||
ADD_GROUP("Transform","");
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2,"position"),_SCS("set_position"),_SCS("get_position"));
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL,"rotation",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("set_rotation"),_SCS("get_rotation"));
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL,"rotation_deg",PROPERTY_HINT_RANGE,"-1440,1440,0.1",PROPERTY_USAGE_EDITOR),_SCS("set_rotation_in_degrees"),_SCS("get_rotation_in_degrees"));
|
||||
ADD_PROPERTYNO(PropertyInfo(Variant::VECTOR2,"scale"),_SCS("set_scale"),_SCS("get_scale"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::MATRIX32,"transform",PROPERTY_HINT_NONE,"",0),_SCS("set_transform"),_SCS("get_transform"));
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"global_position",PROPERTY_HINT_NONE,"",0),_SCS("set_global_position"),_SCS("get_global_position"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"global_rotation",PROPERTY_HINT_NONE,"",0),_SCS("set_global_rotation"),_SCS("get_global_rotation"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"global_rotation_deg",PROPERTY_HINT_NONE,"",0),_SCS("set_global_rotation_in_degrees"),_SCS("get_global_rotation_in_degrees"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"global_scale",PROPERTY_HINT_NONE,"",0),_SCS("set_global_scale"),_SCS("get_global_scale"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::MATRIX32,"global_transform",PROPERTY_HINT_NONE,"",0),_SCS("set_global_transform"),_SCS("get_global_transform"));
|
||||
|
||||
ADD_GROUP("Z","");
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::INT,"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_as_relative"),_SCS("set_z_as_relative"),_SCS("is_z_relative"));
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -69,9 +69,9 @@ public:
|
|||
virtual Point2 edit_get_pivot() const;
|
||||
virtual bool edit_has_pivot() const;
|
||||
|
||||
void set_pos(const Point2& p_pos);
|
||||
void set_rot(float p_radians);
|
||||
void set_rotd(float p_degrees);
|
||||
void set_position(const Point2& p_pos);
|
||||
void set_rotation(float p_radians);
|
||||
void set_rotation_in_degrees(float p_degrees);
|
||||
void set_scale(const Size2& p_scale);
|
||||
|
||||
void rotate(float p_radians);
|
||||
|
@ -81,22 +81,22 @@ public:
|
|||
void global_translate(const Vector2& p_amount);
|
||||
void scale(const Size2& p_amount);
|
||||
|
||||
Point2 get_pos() const;
|
||||
float get_rot() const;
|
||||
float get_rotd() const;
|
||||
Point2 get_position() const;
|
||||
float get_rotation() const;
|
||||
float get_rotation_in_degrees() const;
|
||||
Size2 get_scale() const;
|
||||
|
||||
Point2 get_global_pos() const;
|
||||
float get_global_rot() const;
|
||||
float get_global_rotd() const;
|
||||
Point2 get_global_position() const;
|
||||
float get_global_rotation() const;
|
||||
float get_global_rotation_in_degrees() const;
|
||||
Size2 get_global_scale() const;
|
||||
virtual Rect2 get_item_rect() const;
|
||||
|
||||
void set_transform(const Matrix32& p_transform);
|
||||
void set_global_transform(const Matrix32& p_transform);
|
||||
void set_global_pos(const Point2& p_pos);
|
||||
void set_global_rot(float p_radians);
|
||||
void set_global_rotd(float p_degrees);
|
||||
void set_global_position(const Point2& p_pos);
|
||||
void set_global_rotation(float p_radians);
|
||||
void set_global_rotation_in_degrees(float p_degrees);
|
||||
void set_global_scale(const Size2& p_scale);
|
||||
|
||||
void set_z(int p_z);
|
||||
|
|
|
@ -204,12 +204,13 @@ void ParallaxBackground::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("is_ignore_camera_zoom"), &ParallaxBackground::is_ignore_camera_zoom);
|
||||
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"scroll/offset"),_SCS("set_scroll_offset"),_SCS("get_scroll_offset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"scroll/base_offset"),_SCS("set_scroll_base_offset"),_SCS("get_scroll_base_offset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"scroll/base_scale"),_SCS("set_scroll_base_scale"),_SCS("get_scroll_base_scale"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"scroll/limit_begin"),_SCS("set_limit_begin"),_SCS("get_limit_begin"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"scroll/limit_end"),_SCS("set_limit_end"),_SCS("get_limit_end"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "scroll/ignore_camera_zoom"), _SCS("set_ignore_camera_zoom"), _SCS("is_ignore_camera_zoom"));
|
||||
ADD_GROUP("Scroll","scroll_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"scroll_offset"),_SCS("set_scroll_offset"),_SCS("get_scroll_offset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"scroll_base_offset"),_SCS("set_scroll_base_offset"),_SCS("get_scroll_base_offset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"scroll_base_scale"),_SCS("set_scroll_base_scale"),_SCS("get_scroll_base_scale"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"scroll_limit_begin"),_SCS("set_limit_begin"),_SCS("get_limit_begin"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"scroll_limit_end"),_SCS("set_limit_end"),_SCS("get_limit_end"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "scroll_ignore_camera_zoom"), _SCS("set_ignore_camera_zoom"), _SCS("is_ignore_camera_zoom"));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ void ParallaxLayer::_notification(int p_what) {
|
|||
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
|
||||
orig_offset=get_pos();
|
||||
orig_offset=get_position();
|
||||
orig_scale=get_scale();
|
||||
_update_mirroring();
|
||||
} break;
|
||||
|
@ -132,7 +132,7 @@ void ParallaxLayer::set_base_offset_and_scale(const Point2& p_offset,float p_sca
|
|||
new_ofs.y -= den*ceil(new_ofs.y/den);
|
||||
}
|
||||
|
||||
set_pos(new_ofs);
|
||||
set_position(new_ofs);
|
||||
set_scale(Vector2(1,1)*p_scale);
|
||||
|
||||
|
||||
|
@ -157,9 +157,10 @@ void ParallaxLayer::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("set_mirroring","mirror"),&ParallaxLayer::set_mirroring);
|
||||
ClassDB::bind_method(_MD("get_mirroring"),&ParallaxLayer::get_mirroring);
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"motion/scale"),_SCS("set_motion_scale"),_SCS("get_motion_scale"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"motion/offset"),_SCS("set_motion_offset"),_SCS("get_motion_offset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"motion/mirroring"),_SCS("set_mirroring"),_SCS("get_mirroring"));
|
||||
ADD_GROUP("Motion","motion_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"motion_scale"),_SCS("set_motion_scale"),_SCS("get_motion_scale"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"motion_offset"),_SCS("set_motion_offset"),_SCS("get_motion_offset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"motion_mirroring"),_SCS("set_mirroring"),_SCS("get_mirroring"));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -299,7 +299,7 @@ void Particles2D::_process_particles(float p_delta) {
|
|||
}
|
||||
for (Set<ParticleAttractor2D*>::Element *E=attractors.front();E;E=E->next()) {
|
||||
|
||||
attractor_cache[idx].pos=m.xform( E->get()->get_global_pos() );
|
||||
attractor_cache[idx].pos=m.xform( E->get()->get_global_position() );
|
||||
attractor_cache[idx].attractor=E->get();
|
||||
idx++;
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ void PathFollow2D::_update_transform() {
|
|||
pos+=n*h_offset;
|
||||
pos+=t*v_offset;
|
||||
|
||||
set_rot(t.angle());
|
||||
set_rotation(t.angle());
|
||||
|
||||
} else {
|
||||
|
||||
|
@ -132,7 +132,7 @@ void PathFollow2D::_update_transform() {
|
|||
pos.y+=v_offset;
|
||||
}
|
||||
|
||||
set_pos(pos);
|
||||
set_position(pos);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -102,8 +102,10 @@ void PhysicsBody2D::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("add_collision_exception_with","body:PhysicsBody2D"),&PhysicsBody2D::add_collision_exception_with);
|
||||
ClassDB::bind_method(_MD("remove_collision_exception_with","body:PhysicsBody2D"),&PhysicsBody2D::remove_collision_exception_with);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"layers",PROPERTY_HINT_ALL_FLAGS,"",0),_SCS("_set_layers"),_SCS("_get_layers")); //for backwards compat
|
||||
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_GROUP("Collision","collision_");
|
||||
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_GROUP("","");
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2,"one_way_collision/direction"),_SCS("set_one_way_collision_direction"),_SCS("get_one_way_collision_direction"));
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL,"one_way_collision/max_depth"),_SCS("set_one_way_collision_max_depth"),_SCS("get_one_way_collision_max_depth"));
|
||||
}
|
||||
|
@ -963,10 +965,12 @@ void RigidBody2D::_bind_methods() {
|
|||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"contact_monitor"),_SCS("set_contact_monitor"),_SCS("is_contact_monitor_enabled"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"sleeping"),_SCS("set_sleeping"),_SCS("is_sleeping"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"can_sleep"),_SCS("set_can_sleep"),_SCS("is_able_to_sleep"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"velocity/linear"),_SCS("set_linear_velocity"),_SCS("get_linear_velocity"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"velocity/angular"),_SCS("set_angular_velocity"),_SCS("get_angular_velocity"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"damp_override/linear",PROPERTY_HINT_RANGE,"-1,128,0.01"),_SCS("set_linear_damp"),_SCS("get_linear_damp"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"damp_override/angular",PROPERTY_HINT_RANGE,"-1,128,0.01"),_SCS("set_angular_damp"),_SCS("get_angular_damp"));
|
||||
ADD_GROUP("Linear","linear_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"linear_velocity"),_SCS("set_linear_velocity"),_SCS("get_linear_velocity"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"linear_damp",PROPERTY_HINT_RANGE,"-1,128,0.01"),_SCS("set_linear_damp"),_SCS("get_linear_damp"));
|
||||
ADD_GROUP("Angular","angular_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"angular_velocity"),_SCS("set_angular_velocity"),_SCS("get_angular_velocity"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"angular_damp",PROPERTY_HINT_RANGE,"-1,128,0.01"),_SCS("set_angular_damp"),_SCS("get_angular_damp"));
|
||||
|
||||
ADD_SIGNAL( MethodInfo("body_enter_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"local_shape")));
|
||||
ADD_SIGNAL( MethodInfo("body_exit_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"local_shape")));
|
||||
|
@ -1311,7 +1315,7 @@ Array KinematicBody2D::get_move_and_slide_colliders() const{
|
|||
|
||||
Vector2 KinematicBody2D::move_to(const Vector2& p_position) {
|
||||
|
||||
return move(p_position-get_global_pos());
|
||||
return move(p_position-get_global_position());
|
||||
}
|
||||
|
||||
bool KinematicBody2D::test_move(const Matrix32& p_from,const Vector2& p_motion) {
|
||||
|
|
|
@ -377,12 +377,16 @@ void Polygon2D::_bind_methods() {
|
|||
ADD_PROPERTY( PropertyInfo(Variant::COLOR,"color"),_SCS("set_color"),_SCS("get_color"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::COLOR_ARRAY,"vertex_colors"),_SCS("set_vertex_colors"),_SCS("get_vertex_colors"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"offset"),_SCS("set_offset"),_SCS("get_offset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"texture/offset"),_SCS("set_texture_offset"),_SCS("get_texture_offset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"texture/scale"),_SCS("set_texture_scale"),_SCS("get_texture_scale"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"texture/rotation",PROPERTY_HINT_RANGE,"-1440,1440,0.1"),_SCS("_set_texture_rotationd"),_SCS("_get_texture_rotationd"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"invert/enable"),_SCS("set_invert"),_SCS("get_invert"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"invert/border",PROPERTY_HINT_RANGE,"0.1,16384,0.1"),_SCS("set_invert_border"),_SCS("get_invert_border"));
|
||||
ADD_GROUP("Texture","");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"));
|
||||
ADD_GROUP("Texture","texture_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"texture_offset"),_SCS("set_texture_offset"),_SCS("get_texture_offset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"texture_scale"),_SCS("set_texture_scale"),_SCS("get_texture_scale"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"texture_rotation",PROPERTY_HINT_RANGE,"-1440,1440,0.1"),_SCS("_set_texture_rotationd"),_SCS("_get_texture_rotationd"));
|
||||
|
||||
ADD_GROUP("Invert","invert_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"invert_enable"),_SCS("set_invert"),_SCS("get_invert"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"invert_border",PROPERTY_HINT_RANGE,"0.1,16384,0.1"),_SCS("set_invert_border"),_SCS("get_invert_border"));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -241,9 +241,10 @@ void SamplePlayer2D::_bind_methods() {
|
|||
BIND_CONSTANT( INVALID_VOICE );
|
||||
BIND_CONSTANT( NEXT_VOICE );
|
||||
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "config/polyphony", PROPERTY_HINT_RANGE, "1,64,1"),_SCS("set_polyphony"),_SCS("get_polyphony"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "config/samples", PROPERTY_HINT_RESOURCE_TYPE,"SampleLibrary"),_SCS("set_sample_library"),_SCS("get_sample_library"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "config/pitch_random", PROPERTY_HINT_RESOURCE_TYPE,"SampleLibrary"),_SCS("set_random_pitch_scale"),_SCS("get_random_pitch_scale"));
|
||||
ADD_GROUP("Config","");
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "polyphony", PROPERTY_HINT_RANGE, "1,64,1"),_SCS("set_polyphony"),_SCS("get_polyphony"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "samples", PROPERTY_HINT_RESOURCE_TYPE,"SampleLibrary"),_SCS("set_sample_library"),_SCS("get_sample_library"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "pitch_random", PROPERTY_HINT_RESOURCE_TYPE,"SampleLibrary"),_SCS("set_random_pitch_scale"),_SCS("get_random_pitch_scale"));
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -97,11 +97,13 @@ void SoundPlayer2D::_bind_methods() {
|
|||
BIND_CONSTANT( PARAM_ATTENUATION_DISTANCE_EXP );
|
||||
BIND_CONSTANT( PARAM_MAX );
|
||||
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/volume_db",PROPERTY_HINT_RANGE, "-80,24,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_VOLUME_DB);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/pitch_scale",PROPERTY_HINT_RANGE, "0.001,32,0.001"),_SCS("set_param"),_SCS("get_param"),PARAM_PITCH_SCALE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/attenuation/min_distance",PROPERTY_HINT_EXP_RANGE, "16,16384,1"),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION_MIN_DISTANCE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/attenuation/max_distance",PROPERTY_HINT_EXP_RANGE, "16,16384,1"),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION_MAX_DISTANCE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/attenuation/distance_exp",PROPERTY_HINT_EXP_EASING, "attenuation"),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION_DISTANCE_EXP);
|
||||
ADD_GROUP("Parameters","");
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "volume_db",PROPERTY_HINT_RANGE, "-80,24,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_VOLUME_DB);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "pitch_scale",PROPERTY_HINT_RANGE, "0.001,32,0.001"),_SCS("set_param"),_SCS("get_param"),PARAM_PITCH_SCALE);
|
||||
ADD_GROUP("Attenuation","attenuation_");
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "attenuation_min_distance",PROPERTY_HINT_EXP_RANGE, "16,16384,1"),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION_MIN_DISTANCE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "attenuation_max_distance",PROPERTY_HINT_EXP_RANGE, "16,16384,1"),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION_MAX_DISTANCE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "attenuation_distance_exp",PROPERTY_HINT_EXP_EASING, "attenuation"),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION_DISTANCE_EXP);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1261,20 +1261,25 @@ void TileMap::_bind_methods() {
|
|||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"mode",PROPERTY_HINT_ENUM,"Square,Isometric,Custom"),_SCS("set_mode"),_SCS("get_mode"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"tile_set",PROPERTY_HINT_RESOURCE_TYPE,"TileSet"),_SCS("set_tileset"),_SCS("get_tileset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"cell_size",PROPERTY_HINT_RANGE,"1,8192,1",0),_SCS("_set_old_cell_size"),_SCS("_get_old_cell_size"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"cell/size",PROPERTY_HINT_RANGE,"1,8192,1"),_SCS("set_cell_size"),_SCS("get_cell_size"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"cell/quadrant_size",PROPERTY_HINT_RANGE,"1,128,1"),_SCS("set_quadrant_size"),_SCS("get_quadrant_size"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::MATRIX32,"cell/custom_transform"),_SCS("set_custom_transform"),_SCS("get_custom_transform"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"cell/half_offset",PROPERTY_HINT_ENUM,"Offset X,Offset Y,Disabled"),_SCS("set_half_offset"),_SCS("get_half_offset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"cell/tile_origin",PROPERTY_HINT_ENUM,"Top Left,Center,Bottom Left"),_SCS("set_tile_origin"),_SCS("get_tile_origin"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"cell/y_sort"),_SCS("set_y_sort_mode"),_SCS("is_y_sort_mode_enabled"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"collision/use_kinematic",PROPERTY_HINT_NONE,""),_SCS("set_collision_use_kinematic"),_SCS("get_collision_use_kinematic"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"collision/friction",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_collision_friction"),_SCS("get_collision_friction"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"collision/bounce",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_collision_bounce"),_SCS("get_collision_bounce"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"collision/layers",PROPERTY_HINT_ALL_FLAGS),_SCS("set_collision_layer"),_SCS("get_collision_layer"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"collision/mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_collision_mask"),_SCS("get_collision_mask"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"occluder/light_mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_occluder_light_mask"),_SCS("get_occluder_light_mask"));
|
||||
|
||||
ADD_GROUP("Cell","cell_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"cell_size",PROPERTY_HINT_RANGE,"1,8192,1"),_SCS("set_cell_size"),_SCS("get_cell_size"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"cell_quadrant_size",PROPERTY_HINT_RANGE,"1,128,1"),_SCS("set_quadrant_size"),_SCS("get_quadrant_size"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::MATRIX32,"cell_custom_transform"),_SCS("set_custom_transform"),_SCS("get_custom_transform"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"cell_half_offset",PROPERTY_HINT_ENUM,"Offset X,Offset Y,Disabled"),_SCS("set_half_offset"),_SCS("get_half_offset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"cell_tile_origin",PROPERTY_HINT_ENUM,"Top Left,Center,Bottom Left"),_SCS("set_tile_origin"),_SCS("get_tile_origin"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"cell_y_sort"),_SCS("set_y_sort_mode"),_SCS("is_y_sort_mode_enabled"));
|
||||
|
||||
ADD_GROUP("Collision","collision_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"collision_use_kinematic",PROPERTY_HINT_NONE,""),_SCS("set_collision_use_kinematic"),_SCS("get_collision_use_kinematic"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"collision_friction",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_collision_friction"),_SCS("get_collision_friction"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"collision_bounce",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_collision_bounce"),_SCS("get_collision_bounce"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"collision_layers",PROPERTY_HINT_ALL_FLAGS),_SCS("set_collision_layer"),_SCS("get_collision_layer"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"collision_mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_collision_mask"),_SCS("get_collision_mask"));
|
||||
|
||||
ADD_GROUP("Occluder","occluder_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"occluder_light_mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_occluder_light_mask"),_SCS("get_occluder_light_mask"));
|
||||
ADD_GROUP("","");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"tile_data",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_tile_data"),_SCS("_get_tile_data"));
|
||||
|
||||
ADD_SIGNAL(MethodInfo("settings_changed"));
|
||||
|
|
|
@ -358,12 +358,12 @@ void VisibilityEnabler2D::_bind_methods(){
|
|||
ClassDB::bind_method(_MD("is_enabler_enabled","enabler"),&VisibilityEnabler2D::is_enabler_enabled);
|
||||
ClassDB::bind_method(_MD("_node_removed"),&VisibilityEnabler2D::_node_removed);
|
||||
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"enabler/pause_animations"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_PAUSE_ANIMATIONS );
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"enabler/freeze_bodies"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_FREEZE_BODIES);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"enabler/pause_particles"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_PAUSE_PARTICLES);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"enabler/pause_animated_sprites"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_PAUSE_ANIMATED_SPRITES);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"enabler/process_parent"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_PARENT_PROCESS);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"enabler/fixed_process_parent"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_PARENT_FIXED_PROCESS);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"pause_animations"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_PAUSE_ANIMATIONS );
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"freeze_bodies"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_FREEZE_BODIES);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"pause_particles"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_PAUSE_PARTICLES);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"pause_animated_sprites"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_PAUSE_ANIMATED_SPRITES);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"process_parent"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_PARENT_PROCESS);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"fixed_process_parent"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_PARENT_FIXED_PROCESS);
|
||||
|
||||
BIND_CONSTANT( ENABLER_FREEZE_BODIES );
|
||||
BIND_CONSTANT( ENABLER_PAUSE_ANIMATIONS );
|
||||
|
|
|
@ -46,7 +46,8 @@ void YSort::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("set_sort_enabled","enabled"),&YSort::set_sort_enabled);
|
||||
ClassDB::bind_method(_MD("is_sort_enabled"),&YSort::is_sort_enabled);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"sort/enabled"),_SCS("set_sort_enabled"),_SCS("is_sort_enabled"));
|
||||
ADD_GROUP("Sort","sort_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"sort_enabled"),_SCS("set_sort_enabled"),_SCS("is_sort_enabled"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -655,8 +655,9 @@ void Area::_bind_methods() {
|
|||
ADD_PROPERTY( 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_GROUP("Collision","collision_");
|
||||
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"));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -250,8 +250,8 @@ void CollisionObject::_bind_methods() {
|
|||
ADD_SIGNAL( MethodInfo("mouse_enter"));
|
||||
ADD_SIGNAL( MethodInfo("mouse_exit"));
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"input/ray_pickable"),_SCS("set_ray_pickable"),_SCS("is_ray_pickable"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"input/capture_on_drag"),_SCS("set_capture_input_on_drag"),_SCS("get_capture_input_on_drag"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"input_ray_pickable"),_SCS("set_ray_pickable"),_SCS("is_ray_pickable"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"input_capture_on_drag"),_SCS("set_capture_input_on_drag"),_SCS("get_capture_input_on_drag"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -243,16 +243,20 @@ void Light::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("set_shadow_color","shadow_color"), &Light::set_shadow_color );
|
||||
ClassDB::bind_method(_MD("get_shadow_color"), &Light::get_shadow_color );
|
||||
|
||||
ADD_PROPERTY( PropertyInfo( Variant::COLOR, "light/color",PROPERTY_HINT_COLOR_NO_ALPHA), _SCS("set_color"), _SCS("get_color"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "light/energy",PROPERTY_HINT_RANGE,"0,16,0.01"), _SCS("set_param"), _SCS("get_param"), PARAM_ENERGY);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "light/negative"), _SCS("set_negative"), _SCS("is_negative"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "light/specular",PROPERTY_HINT_RANGE,"0,1,0.01"), _SCS("set_param"), _SCS("get_param"), PARAM_SPECULAR);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "light/cull_mask",PROPERTY_HINT_ALL_FLAGS), _SCS("set_cull_mask"), _SCS("get_cull_mask"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "shadow/enabled"), _SCS("set_shadow"), _SCS("has_shadow"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::COLOR, "shadow/color",PROPERTY_HINT_COLOR_NO_ALPHA), _SCS("set_shadow_color"), _SCS("get_shadow_color"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "shadow/bias",PROPERTY_HINT_RANGE,"-16,16,0.01"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_BIAS);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "shadow/max_distance",PROPERTY_HINT_RANGE,"0,65536,0.1"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_MAX_DISTANCE);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "editor/editor_only"), _SCS("set_editor_only"), _SCS("is_editor_only"));
|
||||
ADD_GROUP("Light","light_");
|
||||
ADD_PROPERTY( PropertyInfo( Variant::COLOR, "light_color",PROPERTY_HINT_COLOR_NO_ALPHA), _SCS("set_color"), _SCS("get_color"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "light_energy",PROPERTY_HINT_RANGE,"0,16,0.01"), _SCS("set_param"), _SCS("get_param"), PARAM_ENERGY);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "light_negative"), _SCS("set_negative"), _SCS("is_negative"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "light_specular",PROPERTY_HINT_RANGE,"0,1,0.01"), _SCS("set_param"), _SCS("get_param"), PARAM_SPECULAR);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "light_cull_mask",PROPERTY_HINT_ALL_FLAGS), _SCS("set_cull_mask"), _SCS("get_cull_mask"));
|
||||
ADD_GROUP("Shadow","shadow_");
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "shadow_enabled"), _SCS("set_shadow"), _SCS("has_shadow"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::COLOR, "shadow_color",PROPERTY_HINT_COLOR_NO_ALPHA), _SCS("set_shadow_color"), _SCS("get_shadow_color"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "shadow_bias",PROPERTY_HINT_RANGE,"-16,16,0.01"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_BIAS);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "shadow_max_distance",PROPERTY_HINT_RANGE,"0,65536,0.1"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_MAX_DISTANCE);
|
||||
ADD_GROUP("Editor","");
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "editor_only"), _SCS("set_editor_only"), _SCS("is_editor_only"));
|
||||
ADD_GROUP("","");
|
||||
|
||||
BIND_CONSTANT( PARAM_ENERGY );
|
||||
BIND_CONSTANT( PARAM_SPECULAR );
|
||||
|
@ -351,13 +355,14 @@ void DirectionalLight::_bind_methods() {
|
|||
ClassDB::bind_method( _MD("set_blend_splits","enabled"),&DirectionalLight::set_blend_splits);
|
||||
ClassDB::bind_method( _MD("is_blend_splits_enabled"),&DirectionalLight::is_blend_splits_enabled);
|
||||
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "directional_shadow/mode",PROPERTY_HINT_ENUM,"Orthogonal,PSSM 2 Splits,PSSM 4 Splits"), _SCS("set_shadow_mode"), _SCS("get_shadow_mode"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "directional_shadow/split_1",PROPERTY_HINT_RANGE,"0,1,0.001"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_SPLIT_1_OFFSET);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "directional_shadow/split_2",PROPERTY_HINT_RANGE,"0,1,0.001"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_SPLIT_2_OFFSET);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "directional_shadow/split_3",PROPERTY_HINT_RANGE,"0,1,0.001"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_SPLIT_3_OFFSET);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "directional_shadow/blend_splits"), _SCS("set_blend_splits"), _SCS("is_blend_splits_enabled"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "directional_shadow/normal_bias",PROPERTY_HINT_RANGE,"0,16,0.01"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_NORMAL_BIAS);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "directional_shadow/bias_split_scale",PROPERTY_HINT_RANGE,"0,16,0.01"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_BIAS_SPLIT_SCALE);
|
||||
ADD_GROUP("Directional Shadow","directional_shadow_");
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "directional_shadow_mode",PROPERTY_HINT_ENUM,"Orthogonal,PSSM 2 Splits,PSSM 4 Splits"), _SCS("set_shadow_mode"), _SCS("get_shadow_mode"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "directional_shadow_split_1",PROPERTY_HINT_RANGE,"0,1,0.001"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_SPLIT_1_OFFSET);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "directional_shadow_split_2",PROPERTY_HINT_RANGE,"0,1,0.001"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_SPLIT_2_OFFSET);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "directional_shadow_split_3",PROPERTY_HINT_RANGE,"0,1,0.001"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_SPLIT_3_OFFSET);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "directional_shadow_blend_splits"), _SCS("set_blend_splits"), _SCS("is_blend_splits_enabled"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "directional_shadow_normal_bias",PROPERTY_HINT_RANGE,"0,16,0.01"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_NORMAL_BIAS);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "directional_shadow_bias_split_scale",PROPERTY_HINT_RANGE,"0,16,0.01"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_BIAS_SPLIT_SCALE);
|
||||
|
||||
BIND_CONSTANT( SHADOW_ORTHOGONAL );
|
||||
BIND_CONSTANT( SHADOW_PARALLEL_2_SPLITS );
|
||||
|
@ -404,10 +409,11 @@ void OmniLight::_bind_methods() {
|
|||
ClassDB::bind_method( _MD("set_shadow_detail","detail"),&OmniLight::set_shadow_detail);
|
||||
ClassDB::bind_method( _MD("get_shadow_detail"),&OmniLight::get_shadow_detail);
|
||||
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "omni/range",PROPERTY_HINT_RANGE,"0,65536,0.1"), _SCS("set_param"), _SCS("get_param"), PARAM_RANGE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "omni/attenuation",PROPERTY_HINT_EXP_EASING), _SCS("set_param"), _SCS("get_param"), PARAM_ATTENUATION);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "omni/shadow_mode",PROPERTY_HINT_ENUM,"Dual Paraboloid,Cube"), _SCS("set_shadow_mode"), _SCS("get_shadow_mode"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "omni/shadow_detail",PROPERTY_HINT_ENUM,"Vertical,Horizontal"), _SCS("set_shadow_detail"), _SCS("get_shadow_detail"));
|
||||
ADD_GROUP("Omni","omni_");
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "omni_range",PROPERTY_HINT_RANGE,"0,65536,0.1"), _SCS("set_param"), _SCS("get_param"), PARAM_RANGE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "omni_attenuation",PROPERTY_HINT_EXP_EASING), _SCS("set_param"), _SCS("get_param"), PARAM_ATTENUATION);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "omni_shadow_mode",PROPERTY_HINT_ENUM,"Dual Paraboloid,Cube"), _SCS("set_shadow_mode"), _SCS("get_shadow_mode"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "omni_shadow_detail",PROPERTY_HINT_ENUM,"Vertical,Horizontal"), _SCS("set_shadow_detail"), _SCS("get_shadow_detail"));
|
||||
|
||||
}
|
||||
|
||||
|
@ -420,9 +426,10 @@ OmniLight::OmniLight() : Light( VisualServer::LIGHT_OMNI ) {
|
|||
|
||||
void SpotLight::_bind_methods() {
|
||||
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "spot/range",PROPERTY_HINT_RANGE,"0,65536,0.1"), _SCS("set_param"), _SCS("get_param"), PARAM_RANGE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "spot/attenuation",PROPERTY_HINT_EXP_EASING), _SCS("set_param"), _SCS("get_param"), PARAM_ATTENUATION);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "spot/spot_angle",PROPERTY_HINT_RANGE,"0,180,0.1"), _SCS("set_param"), _SCS("get_param"), PARAM_SPOT_ANGLE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "spot/spot_attenuation",PROPERTY_HINT_EXP_EASING), _SCS("set_param"), _SCS("get_param"), PARAM_SPOT_ATTENUATION);
|
||||
ADD_GROUP("Spot","spot_");
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "spot_range",PROPERTY_HINT_RANGE,"0,65536,0.1"), _SCS("set_param"), _SCS("get_param"), PARAM_RANGE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "spot_attenuation",PROPERTY_HINT_EXP_EASING), _SCS("set_param"), _SCS("get_param"), PARAM_ATTENUATION);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "spot_angle",PROPERTY_HINT_RANGE,"0,180,0.1"), _SCS("set_param"), _SCS("get_param"), PARAM_SPOT_ANGLE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "spot_angle_attenuation",PROPERTY_HINT_EXP_EASING), _SCS("set_param"), _SCS("get_param"), PARAM_SPOT_ATTENUATION);
|
||||
|
||||
}
|
||||
|
|
|
@ -304,8 +304,9 @@ void MeshInstance::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("create_convex_collision"),&MeshInstance::create_convex_collision);
|
||||
ClassDB::set_method_flags("MeshInstance","create_convex_collision",METHOD_FLAGS_DEFAULT);
|
||||
ClassDB::bind_method(_MD("_mesh_changed"),&MeshInstance::_mesh_changed);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "mesh/mesh", PROPERTY_HINT_RESOURCE_TYPE, "Mesh" ), _SCS("set_mesh"), _SCS("get_mesh"));
|
||||
ADD_PROPERTY( PropertyInfo (Variant::NODE_PATH, "mesh/skeleton"), _SCS("set_skeleton_path"), _SCS("get_skeleton_path"));
|
||||
|
||||
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "mesh", PROPERTY_HINT_RESOURCE_TYPE, "Mesh" ), _SCS("set_mesh"), _SCS("get_mesh"));
|
||||
ADD_PROPERTY( PropertyInfo (Variant::NODE_PATH, "skeleton"), _SCS("set_skeleton_path"), _SCS("get_skeleton_path"));
|
||||
}
|
||||
|
||||
MeshInstance::MeshInstance()
|
||||
|
|
|
@ -163,8 +163,8 @@ void PhysicsBody::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("_get_layers"),&PhysicsBody::_get_layers);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"layers",PROPERTY_HINT_ALL_FLAGS,"",0),_SCS("_set_layers"),_SCS("_get_layers")); //for backwards compat
|
||||
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_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"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -876,10 +876,12 @@ void RigidBody::_bind_methods() {
|
|||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"sleeping"),_SCS("set_sleeping"),_SCS("is_sleeping"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"can_sleep"),_SCS("set_can_sleep"),_SCS("is_able_to_sleep"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"axis_lock",PROPERTY_HINT_ENUM,"Disabled,Lock X,Lock Y,Lock Z"),_SCS("set_axis_lock"),_SCS("get_axis_lock"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"velocity/linear"),_SCS("set_linear_velocity"),_SCS("get_linear_velocity"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"velocity/angular"),_SCS("set_angular_velocity"),_SCS("get_angular_velocity"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"damp_override/linear",PROPERTY_HINT_RANGE,"-1,128,0.01"),_SCS("set_linear_damp"),_SCS("get_linear_damp"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"damp_override/angular",PROPERTY_HINT_RANGE,"-1,128,0.01"),_SCS("set_angular_damp"),_SCS("get_angular_damp"));
|
||||
ADD_GROUP("Linear","linear_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"linear_velocity"),_SCS("set_linear_velocity"),_SCS("get_linear_velocity"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"linear_damp",PROPERTY_HINT_RANGE,"-1,128,0.01"),_SCS("set_linear_damp"),_SCS("get_linear_damp"));
|
||||
ADD_GROUP("Angular","angular_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"angular_velocity"),_SCS("set_angular_velocity"),_SCS("get_angular_velocity"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"angular_damp",PROPERTY_HINT_RANGE,"-1,128,0.01"),_SCS("set_angular_damp"),_SCS("get_angular_damp"));
|
||||
|
||||
ADD_SIGNAL( MethodInfo("body_enter_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"local_shape")));
|
||||
ADD_SIGNAL( MethodInfo("body_exit_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"local_shape")));
|
||||
|
|
|
@ -211,10 +211,10 @@ void Quad::_bind_methods(){
|
|||
ClassDB::bind_method(_MD("set_offset","offset"),&Quad::set_offset);
|
||||
ClassDB::bind_method(_MD("get_offset"),&Quad::get_offset);
|
||||
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "quad/axis", PROPERTY_HINT_ENUM,"X,Y,Z" ), _SCS("set_axis"), _SCS("get_axis"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::VECTOR2, "quad/size" ), _SCS("set_size"), _SCS("get_size"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::VECTOR2, "quad/offset" ), _SCS("set_offset"), _SCS("get_offset"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "quad/centered" ), _SCS("set_centered"), _SCS("is_centered"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "axis", PROPERTY_HINT_ENUM,"X,Y,Z" ), _SCS("set_axis"), _SCS("get_axis"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::VECTOR2, "size" ), _SCS("set_size"), _SCS("get_size"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::VECTOR2, "offset" ), _SCS("set_offset"), _SCS("get_offset"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "centered" ), _SCS("set_centered"), _SCS("is_centered"));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -230,10 +230,12 @@ void ReflectionProbe::_bind_methods() {
|
|||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"box_projection"),_SCS("set_enable_box_projection"),_SCS("is_box_projection_enabled"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"enable_shadows"),_SCS("set_enable_shadows"),_SCS("are_shadows_enabled"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"cull_mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_cull_mask"),_SCS("get_cull_mask"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"interior/enable"),_SCS("set_as_interior"),_SCS("is_set_as_interior"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::COLOR,"interior/ambient_color",PROPERTY_HINT_COLOR_NO_ALPHA),_SCS("set_interior_ambient"),_SCS("get_interior_ambient"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"interior/ambient_energy",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_interior_ambient_energy"),_SCS("get_interior_ambient_energy"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"interior/ambient_contrib",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_interior_ambient_probe_contribution"),_SCS("get_interior_ambient_probe_contribution"));
|
||||
|
||||
ADD_GROUP("Interior","interior_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"interior_enable"),_SCS("set_as_interior"),_SCS("is_set_as_interior"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::COLOR,"interior_ambient_color",PROPERTY_HINT_COLOR_NO_ALPHA),_SCS("set_interior_ambient"),_SCS("get_interior_ambient"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"interior_ambient_energy",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_interior_ambient_energy"),_SCS("get_interior_ambient_energy"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"interior_ambient_contrib",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_interior_ambient_probe_contribution"),_SCS("get_interior_ambient_probe_contribution"));
|
||||
|
||||
|
||||
BIND_CONSTANT( UPDATE_ONCE );
|
||||
|
|
|
@ -362,7 +362,7 @@ void Spatial::set_rotation(const Vector3& p_euler_rad){
|
|||
|
||||
}
|
||||
|
||||
void Spatial::set_rotation_deg(const Vector3& p_euler_deg) {
|
||||
void Spatial::set_rotation_in_degrees(const Vector3& p_euler_deg) {
|
||||
|
||||
set_rotation(p_euler_deg * Math_PI / 180.0);
|
||||
}
|
||||
|
@ -370,7 +370,7 @@ void Spatial::set_rotation_deg(const Vector3& p_euler_deg) {
|
|||
void Spatial::_set_rotation_deg(const Vector3& p_euler_deg) {
|
||||
|
||||
WARN_PRINT("Deprecated method Spatial._set_rotation_deg(): This method was renamed to set_rotation_deg. Please adapt your code accordingly, as the old method will be obsoleted.");
|
||||
set_rotation_deg(p_euler_deg);
|
||||
set_rotation_in_degrees(p_euler_deg);
|
||||
}
|
||||
|
||||
void Spatial::set_scale(const Vector3& p_scale){
|
||||
|
@ -405,7 +405,7 @@ Vector3 Spatial::get_rotation() const{
|
|||
return data.rotation;
|
||||
}
|
||||
|
||||
Vector3 Spatial::get_rotation_deg() const {
|
||||
Vector3 Spatial::get_rotation_in_degrees() const {
|
||||
|
||||
return get_rotation() * 180.0 / Math_PI;
|
||||
}
|
||||
|
@ -415,7 +415,7 @@ Vector3 Spatial::get_rotation_deg() const {
|
|||
Vector3 Spatial::_get_rotation_deg() const {
|
||||
|
||||
WARN_PRINT("Deprecated method Spatial._get_rotation_deg(): This method was renamed to get_rotation_deg. Please adapt your code accordingly, as the old method will be obsoleted.");
|
||||
return get_rotation_deg();
|
||||
return get_rotation_in_degrees();
|
||||
}
|
||||
|
||||
Vector3 Spatial::get_scale() const{
|
||||
|
@ -750,8 +750,8 @@ void Spatial::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("get_translation"), &Spatial::get_translation);
|
||||
ClassDB::bind_method(_MD("set_rotation","rotation_rad"), &Spatial::set_rotation);
|
||||
ClassDB::bind_method(_MD("get_rotation"), &Spatial::get_rotation);
|
||||
ClassDB::bind_method(_MD("set_rotation_deg","rotation_deg"), &Spatial::set_rotation_deg);
|
||||
ClassDB::bind_method(_MD("get_rotation_deg"), &Spatial::get_rotation_deg);
|
||||
ClassDB::bind_method(_MD("set_rotation_deg","rotation_deg"), &Spatial::set_rotation_in_degrees);
|
||||
ClassDB::bind_method(_MD("get_rotation_deg"), &Spatial::get_rotation_in_degrees);
|
||||
ClassDB::bind_method(_MD("set_scale","scale"), &Spatial::set_scale);
|
||||
ClassDB::bind_method(_MD("get_scale"), &Spatial::get_scale);
|
||||
ClassDB::bind_method(_MD("set_global_transform","global"), &Spatial::set_global_transform);
|
||||
|
@ -817,12 +817,15 @@ void Spatial::_bind_methods() {
|
|||
BIND_CONSTANT( NOTIFICATION_VISIBILITY_CHANGED );
|
||||
|
||||
//ADD_PROPERTY( PropertyInfo(Variant::TRANSFORM,"transform/global",PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR ), _SCS("set_global_transform"), _SCS("get_global_transform") );
|
||||
ADD_PROPERTYNZ( PropertyInfo(Variant::TRANSFORM,"transform/local",PROPERTY_HINT_NONE,""), _SCS("set_transform"), _SCS("get_transform") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"transform/translation",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR), _SCS("set_translation"), _SCS("get_translation") );
|
||||
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_PROPERTYNO( PropertyInfo(Variant::BOOL,"visibility/visible"), _SCS("_set_visible_"), _SCS("_is_visible_") );
|
||||
ADD_GROUP("Transform","");
|
||||
ADD_PROPERTYNZ( PropertyInfo(Variant::TRANSFORM,"transform",PROPERTY_HINT_NONE,""), _SCS("set_transform"), _SCS("get_transform") );
|
||||
ADD_PROPERTYNZ( PropertyInfo(Variant::TRANSFORM,"global_transform",PROPERTY_HINT_NONE,"",0), _SCS("set_global_transform"), _SCS("get_global_transform") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"translation",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR), _SCS("set_translation"), _SCS("get_translation") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"rotation_deg",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR), _SCS("set_rotation_deg"), _SCS("get_rotation_deg") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"rotation",PROPERTY_HINT_NONE,"",0), _SCS("set_rotation"), _SCS("get_rotation") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"scale",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR), _SCS("set_scale"), _SCS("get_scale") );
|
||||
ADD_GROUP("Visibility","");
|
||||
ADD_PROPERTYNO( PropertyInfo(Variant::BOOL,"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" ) );
|
||||
|
|
|
@ -146,12 +146,12 @@ public:
|
|||
|
||||
void set_translation(const Vector3& p_translation);
|
||||
void set_rotation(const Vector3& p_euler_rad);
|
||||
void set_rotation_deg(const Vector3& p_euler_deg);
|
||||
void set_rotation_in_degrees(const Vector3& p_euler_deg);
|
||||
void set_scale(const Vector3& p_scale);
|
||||
|
||||
Vector3 get_translation() const;
|
||||
Vector3 get_rotation() const;
|
||||
Vector3 get_rotation_deg() const;
|
||||
Vector3 get_rotation_in_degrees() const;
|
||||
Vector3 get_scale() const;
|
||||
|
||||
void set_transform(const Transform& p_transform);
|
||||
|
|
|
@ -103,13 +103,15 @@ void SpatialPlayer::_bind_methods() {
|
|||
BIND_CONSTANT( PARAM_EMISSION_CONE_ATTENUATION_DB );
|
||||
BIND_CONSTANT( PARAM_MAX );
|
||||
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/volume_db",PROPERTY_HINT_RANGE, "-80,24,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_VOLUME_DB);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/pitch_scale",PROPERTY_HINT_RANGE, "0.001,32,0.001"),_SCS("set_param"),_SCS("get_param"),PARAM_PITCH_SCALE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/attenuation/min_distance",PROPERTY_HINT_RANGE, "0.01,4096,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION_MIN_DISTANCE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/attenuation/max_distance",PROPERTY_HINT_RANGE, "0.01,4096,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION_MAX_DISTANCE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/attenuation/distance_exp",PROPERTY_HINT_EXP_EASING, "attenuation"),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION_DISTANCE_EXP);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/emission_cone/degrees",PROPERTY_HINT_RANGE, "0,180,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_EMISSION_CONE_DEGREES);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/emission_cone/attenuation_db",PROPERTY_HINT_RANGE, "-80,24,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_EMISSION_CONE_ATTENUATION_DB);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "volume_db",PROPERTY_HINT_RANGE, "-80,24,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_VOLUME_DB);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "pitch_scale",PROPERTY_HINT_RANGE, "0.001,32,0.001"),_SCS("set_param"),_SCS("get_param"),PARAM_PITCH_SCALE);
|
||||
ADD_GROUP("Attenuation","attenuation_");
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "attenuation_min_distance",PROPERTY_HINT_RANGE, "0.01,4096,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION_MIN_DISTANCE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "attenuation_max_distance",PROPERTY_HINT_RANGE, "0.01,4096,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION_MAX_DISTANCE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "attenuation_distance_exp",PROPERTY_HINT_EXP_EASING, "attenuation"),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION_DISTANCE_EXP);
|
||||
ADD_GROUP("Emission Cone","emission_cone_");
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "emission_cone_degrees",PROPERTY_HINT_RANGE, "0,180,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_EMISSION_CONE_DEGREES);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "emission_cone_attenuation_db",PROPERTY_HINT_RANGE, "-80,24,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_EMISSION_CONE_ATTENUATION_DB);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -222,8 +222,8 @@ void SpatialSamplePlayer::_bind_methods() {
|
|||
BIND_CONSTANT( INVALID_VOICE );
|
||||
BIND_CONSTANT( NEXT_VOICE );
|
||||
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "config/polyphony", PROPERTY_HINT_RANGE, "1,64,1"),_SCS("set_polyphony"),_SCS("get_polyphony"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "config/samples", PROPERTY_HINT_RESOURCE_TYPE,"SampleLibrary"),_SCS("set_sample_library"),_SCS("get_sample_library"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "polyphony", PROPERTY_HINT_RANGE, "1,64,1"),_SCS("set_polyphony"),_SCS("get_polyphony"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "samples", PROPERTY_HINT_RESOURCE_TYPE,"SampleLibrary"),_SCS("set_sample_library"),_SCS("get_sample_library"));
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -369,14 +369,14 @@ void SpatialStreamPlayer::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("_set_play","play"),&SpatialStreamPlayer::_set_play);
|
||||
ClassDB::bind_method(_MD("_get_play"),&SpatialStreamPlayer::_get_play);
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream/stream", PROPERTY_HINT_RESOURCE_TYPE,"AudioStream"), _SCS("set_stream"), _SCS("get_stream") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/play"), _SCS("_set_play"), _SCS("_get_play") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/loop"), _SCS("set_loop"), _SCS("has_loop") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "stream/volume_db", PROPERTY_HINT_RANGE,"-80,24,0.01"), _SCS("set_volume_db"), _SCS("get_volume_db") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/autoplay"), _SCS("set_autoplay"), _SCS("has_autoplay") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/paused"), _SCS("set_paused"), _SCS("is_paused") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT, "stream/loop_restart_time"), _SCS("set_loop_restart_time"), _SCS("get_loop_restart_time") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT, "stream/buffering_ms"), _SCS("set_buffering_msec"), _SCS("get_buffering_msec") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE,"AudioStream"), _SCS("set_stream"), _SCS("get_stream") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "play"), _SCS("_set_play"), _SCS("_get_play") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "loop"), _SCS("set_loop"), _SCS("has_loop") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE,"-80,24,0.01"), _SCS("set_volume_db"), _SCS("get_volume_db") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "autoplay"), _SCS("set_autoplay"), _SCS("has_autoplay") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "paused"), _SCS("set_paused"), _SCS("is_paused") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT, "loop_restart_time"), _SCS("set_loop_restart_time"), _SCS("get_loop_restart_time") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT, "buffering_ms"), _SCS("set_buffering_msec"), _SCS("get_buffering_msec") );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -291,9 +291,10 @@ void SpriteBase3D::_bind_methods() {
|
|||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "opacity",PROPERTY_HINT_RANGE,"0,1,0.01"), _SCS("set_opacity"),_SCS("get_opacity"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "pixel_size",PROPERTY_HINT_RANGE,"0.0001,128,0.0001"), _SCS("set_pixel_size"),_SCS("get_pixel_size"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "axis",PROPERTY_HINT_ENUM,"X-Axis,Y-Axis,Z-Axis"), _SCS("set_axis"),_SCS("get_axis"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "flags/transparent"), _SCS("set_draw_flag"),_SCS("get_draw_flag"),FLAG_TRANSPARENT);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "flags/shaded"), _SCS("set_draw_flag"),_SCS("get_draw_flag"),FLAG_SHADED);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "flags/alpha_cut",PROPERTY_HINT_ENUM,"Disabled,Discard,Opaque Pre-Pass"), _SCS("set_alpha_cut_mode"),_SCS("get_alpha_cut_mode"));
|
||||
ADD_GROUP("Flags","");
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "transparent"), _SCS("set_draw_flag"),_SCS("get_draw_flag"),FLAG_TRANSPARENT);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "shaded"), _SCS("set_draw_flag"),_SCS("get_draw_flag"),FLAG_SHADED);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "alpha_cut",PROPERTY_HINT_ENUM,"Disabled,Discard,Opaque Pre-Pass"), _SCS("set_alpha_cut_mode"),_SCS("get_alpha_cut_mode"));
|
||||
|
||||
|
||||
BIND_CONSTANT( FLAG_TRANSPARENT );
|
||||
|
|
|
@ -264,16 +264,20 @@ void VehicleWheel::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("get_friction_slip"),&VehicleWheel::get_friction_slip);
|
||||
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"type/traction"),_SCS("set_use_as_traction"),_SCS("is_used_as_traction"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"type/steering"),_SCS("set_use_as_steering"),_SCS("is_used_as_steering"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"wheel/radius"),_SCS("set_radius"),_SCS("get_radius"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"wheel/rest_length"),_SCS("set_suspension_rest_length"),_SCS("get_suspension_rest_length"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"wheel/friction_slip"),_SCS("set_friction_slip"),_SCS("get_friction_slip"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"suspension/travel"),_SCS("set_suspension_travel"),_SCS("get_suspension_travel"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"suspension/stiffness"),_SCS("set_suspension_stiffness"),_SCS("get_suspension_stiffness"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"suspension/max_force"),_SCS("set_suspension_max_force"),_SCS("get_suspension_max_force"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"damping/compression"),_SCS("set_damping_compression"),_SCS("get_damping_compression"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"damping/relaxation"),_SCS("set_damping_relaxation"),_SCS("get_damping_relaxation"));
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"use_as_traction"),_SCS("set_use_as_traction"),_SCS("is_used_as_traction"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"use_as_steering"),_SCS("set_use_as_steering"),_SCS("is_used_as_steering"));
|
||||
ADD_GROUP("Wheel","wheel_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"wheel_radius"),_SCS("set_radius"),_SCS("get_radius"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"wheel_rest_length"),_SCS("set_suspension_rest_length"),_SCS("get_suspension_rest_length"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"wheel_friction_slip"),_SCS("set_friction_slip"),_SCS("get_friction_slip"));
|
||||
ADD_GROUP("Suspension","suspension_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"suspension_travel"),_SCS("set_suspension_travel"),_SCS("get_suspension_travel"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"suspension_stiffness"),_SCS("set_suspension_stiffness"),_SCS("get_suspension_stiffness"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"suspension_max_force"),_SCS("set_suspension_max_force"),_SCS("get_suspension_max_force"));
|
||||
ADD_GROUP("Damping","damping_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"damping_compression"),_SCS("set_damping_compression"),_SCS("get_damping_compression"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"damping_relaxation"),_SCS("set_damping_relaxation"),_SCS("get_damping_relaxation"));
|
||||
|
||||
}
|
||||
|
||||
|
@ -1038,11 +1042,13 @@ void VehicleBody::_bind_methods(){
|
|||
|
||||
ClassDB::bind_method(_MD("_direct_state_changed"),&VehicleBody::_direct_state_changed);
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"motion/engine_force",PROPERTY_HINT_RANGE,"0.00,1024.0,0.01"),_SCS("set_engine_force"),_SCS("get_engine_force"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"motion/brake",PROPERTY_HINT_RANGE,"0.0,1.0,0.01"),_SCS("set_brake"),_SCS("get_brake"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"motion/steering",PROPERTY_HINT_RANGE,"-180,180.0,0.01"),_SCS("set_steering"),_SCS("get_steering"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"body/mass",PROPERTY_HINT_RANGE,"0.01,65536,0.01"),_SCS("set_mass"),_SCS("get_mass"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"body/friction",PROPERTY_HINT_RANGE,"0.01,1,0.01"),_SCS("set_friction"),_SCS("get_friction"));
|
||||
ADD_GROUP("Motion","");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"engine_force",PROPERTY_HINT_RANGE,"0.00,1024.0,0.01"),_SCS("set_engine_force"),_SCS("get_engine_force"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"brake",PROPERTY_HINT_RANGE,"0.0,1.0,0.01"),_SCS("set_brake"),_SCS("get_brake"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"steering",PROPERTY_HINT_RANGE,"-180,180.0,0.01"),_SCS("set_steering"),_SCS("get_steering"));
|
||||
ADD_GROUP("Mass","");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"mass",PROPERTY_HINT_RANGE,"0.01,65536,0.01"),_SCS("set_mass"),_SCS("get_mass"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"friction",PROPERTY_HINT_RANGE,"0.01,1,0.01"),_SCS("set_friction"),_SCS("get_friction"));
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -271,8 +271,8 @@ void VisibilityEnabler::_bind_methods(){
|
|||
ClassDB::bind_method(_MD("is_enabler_enabled","enabler"),&VisibilityEnabler::is_enabler_enabled);
|
||||
ClassDB::bind_method(_MD("_node_removed"),&VisibilityEnabler::_node_removed);
|
||||
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"enabler/pause_animations"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_PAUSE_ANIMATIONS );
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"enabler/freeze_bodies"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_FREEZE_BODIES);
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"pause_animations"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_PAUSE_ANIMATIONS );
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"freeze_bodies"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_FREEZE_BODIES);
|
||||
|
||||
BIND_CONSTANT( ENABLER_FREEZE_BODIES );
|
||||
BIND_CONSTANT( ENABLER_PAUSE_ANIMATIONS );
|
||||
|
|
|
@ -39,6 +39,15 @@ AABB VisualInstance::get_transformed_aabb() const {
|
|||
}
|
||||
|
||||
|
||||
void VisualInstance::_update_visibility() {
|
||||
|
||||
if (!is_inside_tree())
|
||||
return;
|
||||
|
||||
_change_notify("visible");
|
||||
VS::get_singleton()->instance_set_visible(get_instance(),is_visible());
|
||||
}
|
||||
|
||||
|
||||
void VisualInstance::_notification(int p_what) {
|
||||
|
||||
|
@ -79,6 +88,8 @@ void VisualInstance::_notification(int p_what) {
|
|||
*/
|
||||
|
||||
VisualServer::get_singleton()->instance_set_scenario( instance, get_world()->get_scenario() );
|
||||
_update_visibility();
|
||||
|
||||
|
||||
} break;
|
||||
case NOTIFICATION_TRANSFORM_CHANGED: {
|
||||
|
@ -93,8 +104,12 @@ void VisualInstance::_notification(int p_what) {
|
|||
VisualServer::get_singleton()->instance_attach_skeleton( instance, RID() );
|
||||
// VS::get_singleton()->instance_geometry_set_baked_light_sampler(instance, RID() );
|
||||
|
||||
|
||||
} break;
|
||||
case NOTIFICATION_VISIBILITY_CHANGED: {
|
||||
|
||||
_update_visibility();
|
||||
} break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -228,7 +243,6 @@ void GeometryInstance::_notification(int p_what) {
|
|||
|
||||
}
|
||||
|
||||
_update_visibility();
|
||||
|
||||
} else if (p_what==NOTIFICATION_EXIT_WORLD) {
|
||||
|
||||
|
@ -237,21 +251,8 @@ void GeometryInstance::_notification(int p_what) {
|
|||
|
||||
}
|
||||
|
||||
} if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
|
||||
|
||||
_update_visibility();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void GeometryInstance::_update_visibility() {
|
||||
|
||||
if (!is_inside_tree())
|
||||
return;
|
||||
|
||||
_change_notify("geometry/visible");
|
||||
VS::get_singleton()->instance_geometry_set_flag(get_instance(),VS::INSTANCE_FLAG_VISIBLE,is_visible() && flags[FLAG_VISIBLE]);
|
||||
}
|
||||
|
||||
void GeometryInstance::set_flag(Flags p_flag,bool p_value) {
|
||||
|
@ -271,9 +272,6 @@ void GeometryInstance::set_flag(Flags p_flag,bool p_value) {
|
|||
|
||||
flags[p_flag]=p_value;
|
||||
VS::get_singleton()->instance_geometry_set_flag(get_instance(),(VS::InstanceFlags)p_flag,p_value);
|
||||
if (p_flag==FLAG_VISIBLE) {
|
||||
_update_visibility();
|
||||
}
|
||||
if (p_flag==FLAG_USE_BAKED_LIGHT) {
|
||||
|
||||
}
|
||||
|
@ -353,23 +351,24 @@ void GeometryInstance::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("get_aabb"),&GeometryInstance::get_aabb);
|
||||
|
||||
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "geometry/visible"), _SCS("set_flag"), _SCS("get_flag"),FLAG_VISIBLE);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "geometry/material_override",PROPERTY_HINT_RESOURCE_TYPE,"Material"), _SCS("set_material_override"), _SCS("get_material_override"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "geometry/cast_shadow", PROPERTY_HINT_ENUM, "Off,On,Double-Sided,Shadows Only"), _SCS("set_cast_shadows_setting"), _SCS("get_cast_shadows_setting"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "geometry/extra_cull_margin",PROPERTY_HINT_RANGE,"0,16384,0"), _SCS("set_extra_cull_margin"), _SCS("get_extra_cull_margin"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "geometry/billboard"), _SCS("set_flag"), _SCS("get_flag"),FLAG_BILLBOARD);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "geometry/billboard_y"), _SCS("set_flag"), _SCS("get_flag"),FLAG_BILLBOARD_FIX_Y);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "geometry/depth_scale"), _SCS("set_flag"), _SCS("get_flag"),FLAG_DEPH_SCALE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "geometry/visible_in_all_rooms"), _SCS("set_flag"), _SCS("get_flag"),FLAG_VISIBLE_IN_ALL_ROOMS);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "geometry/use_baked_light"), _SCS("set_flag"), _SCS("get_flag"),FLAG_USE_BAKED_LIGHT);
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "lod/min_distance",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_min_distance"), _SCS("get_lod_min_distance"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "lod/min_hysteresis",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_min_hysteresis"), _SCS("get_lod_min_hysteresis"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "lod/max_distance",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_max_distance"), _SCS("get_lod_max_distance"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "lod/max_hysteresis",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_max_hysteresis"), _SCS("get_lod_max_hysteresis"));
|
||||
ADD_GROUP("Geometry","");
|
||||
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "material_override",PROPERTY_HINT_RESOURCE_TYPE,"Material"), _SCS("set_material_override"), _SCS("get_material_override"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "cast_shadow", PROPERTY_HINT_ENUM, "Off,On,Double-Sided,Shadows Only"), _SCS("set_cast_shadows_setting"), _SCS("get_cast_shadows_setting"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "extra_cull_margin",PROPERTY_HINT_RANGE,"0,16384,0"), _SCS("set_extra_cull_margin"), _SCS("get_extra_cull_margin"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "use_as_billboard"), _SCS("set_flag"), _SCS("get_flag"),FLAG_BILLBOARD);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "use_as_y_billboard"), _SCS("set_flag"), _SCS("get_flag"),FLAG_BILLBOARD_FIX_Y);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "use_depth_scale"), _SCS("set_flag"), _SCS("get_flag"),FLAG_DEPH_SCALE);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "visible_in_all_rooms"), _SCS("set_flag"), _SCS("get_flag"),FLAG_VISIBLE_IN_ALL_ROOMS);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "use_in_baked_light"), _SCS("set_flag"), _SCS("get_flag"),FLAG_USE_BAKED_LIGHT);
|
||||
|
||||
ADD_GROUP("LOD","lod_");
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "lod_min_distance",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_min_distance"), _SCS("get_lod_min_distance"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "lod_min_hysteresis",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_min_hysteresis"), _SCS("get_lod_min_hysteresis"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "lod_max_distance",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_max_distance"), _SCS("get_lod_max_distance"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "lod_max_hysteresis",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_max_hysteresis"), _SCS("get_lod_max_hysteresis"));
|
||||
|
||||
// ADD_SIGNAL( MethodInfo("visibility_changed"));
|
||||
|
||||
BIND_CONSTANT(FLAG_VISIBLE );
|
||||
BIND_CONSTANT(FLAG_CAST_SHADOW );
|
||||
BIND_CONSTANT(FLAG_BILLBOARD );
|
||||
BIND_CONSTANT(FLAG_BILLBOARD_FIX_Y );
|
||||
|
@ -394,7 +393,7 @@ GeometryInstance::GeometryInstance() {
|
|||
flags[i]=false;
|
||||
}
|
||||
|
||||
flags[FLAG_VISIBLE]=true;
|
||||
|
||||
flags[FLAG_CAST_SHADOW]=true;
|
||||
|
||||
shadow_casting_setting=SHADOW_CASTING_SETTING_ON;
|
||||
|
|
|
@ -48,8 +48,10 @@ class VisualInstance : public Spatial {
|
|||
RID _get_visual_instance_rid() const;
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
void _update_visibility();
|
||||
|
||||
void _notification(int p_what);
|
||||
static void _bind_methods();
|
||||
|
@ -87,7 +89,6 @@ class GeometryInstance : public VisualInstance {
|
|||
public:
|
||||
|
||||
enum Flags {
|
||||
FLAG_VISIBLE=VS::INSTANCE_FLAG_VISIBLE,
|
||||
FLAG_CAST_SHADOW=VS::INSTANCE_FLAG_CAST_SHADOW,
|
||||
FLAG_BILLBOARD=VS::INSTANCE_FLAG_BILLBOARD,
|
||||
FLAG_BILLBOARD_FIX_Y=VS::INSTANCE_FLAG_BILLBOARD_FIX_Y,
|
||||
|
@ -117,7 +118,6 @@ private:
|
|||
|
||||
float extra_cull_margin;
|
||||
|
||||
void _update_visibility();
|
||||
protected:
|
||||
|
||||
void _notification(int p_what);
|
||||
|
|
|
@ -465,7 +465,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData* p_anim,float p
|
|||
ERR_PRINTS("Position key at time "+rtos(p_time)+" in Animation Track '"+String(pa->owner->path)+"' not of type Vector2()");
|
||||
}
|
||||
#endif
|
||||
static_cast<Node2D*>(pa->object)->set_pos(value);
|
||||
static_cast<Node2D*>(pa->object)->set_position(value);
|
||||
} break;
|
||||
case SP_NODE2D_ROT: {
|
||||
#ifdef DEBUG_ENABLED
|
||||
|
@ -474,7 +474,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData* p_anim,float p
|
|||
}
|
||||
#endif
|
||||
|
||||
static_cast<Node2D*>(pa->object)->set_rot(Math::deg2rad(value));
|
||||
static_cast<Node2D*>(pa->object)->set_rotation(Math::deg2rad(value));
|
||||
} break;
|
||||
case SP_NODE2D_SCALE: {
|
||||
#ifdef DEBUG_ENABLED
|
||||
|
@ -679,7 +679,7 @@ void AnimationPlayer::_animation_update_transforms() {
|
|||
ERR_PRINTS("Position key at time "+rtos(playback.current.pos)+" in Animation '"+get_current_animation()+"', Track '"+String(pa->owner->path)+"' not of type Vector2()");
|
||||
}
|
||||
#endif
|
||||
static_cast<Node2D*>(pa->object)->set_pos(pa->value_accum);
|
||||
static_cast<Node2D*>(pa->object)->set_position(pa->value_accum);
|
||||
} break;
|
||||
case SP_NODE2D_ROT: {
|
||||
#ifdef DEBUG_ENABLED
|
||||
|
@ -688,7 +688,7 @@ void AnimationPlayer::_animation_update_transforms() {
|
|||
}
|
||||
#endif
|
||||
|
||||
static_cast<Node2D*>(pa->object)->set_rot(Math::deg2rad(pa->value_accum));
|
||||
static_cast<Node2D*>(pa->object)->set_rotation(Math::deg2rad(pa->value_accum));
|
||||
} break;
|
||||
case SP_NODE2D_SCALE: {
|
||||
#ifdef DEBUG_ENABLED
|
||||
|
@ -1348,9 +1348,10 @@ void AnimationPlayer::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("advance","delta"),&AnimationPlayer::advance);
|
||||
|
||||
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "playback/process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), _SCS("set_animation_process_mode"), _SCS("get_animation_process_mode"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "playback/default_blend_time", PROPERTY_HINT_RANGE, "0,4096,0.01"), _SCS("set_default_blend_time"), _SCS("get_default_blend_time"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::NODE_PATH, "root/root"), _SCS("set_root"), _SCS("get_root"));
|
||||
ADD_GROUP("Playback","playback_");
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), _SCS("set_animation_process_mode"), _SCS("get_animation_process_mode"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "playback_default_blend_time", PROPERTY_HINT_RANGE, "0,4096,0.01"), _SCS("set_default_blend_time"), _SCS("get_default_blend_time"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::NODE_PATH, "root_node"), _SCS("set_root"), _SCS("get_root"));
|
||||
|
||||
ADD_SIGNAL( MethodInfo("finished") );
|
||||
ADD_SIGNAL( MethodInfo("animation_changed", PropertyInfo(Variant::STRING,"old_name"), PropertyInfo(Variant::STRING,"new_name")) );
|
||||
|
|
|
@ -1926,7 +1926,8 @@ void AnimationTreePlayer::_bind_methods() {
|
|||
|
||||
ClassDB::bind_method(_MD("recompute_caches"),&AnimationTreePlayer::recompute_caches);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "playback/process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), _SCS("set_animation_process_mode"), _SCS("get_animation_process_mode"));
|
||||
ADD_GROUP("Playback","playback_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), _SCS("set_animation_process_mode"), _SCS("get_animation_process_mode"));
|
||||
|
||||
BIND_CONSTANT( NODE_OUTPUT );
|
||||
BIND_CONSTANT( NODE_ANIMATION );
|
||||
|
|
|
@ -225,7 +225,7 @@ void Tween::_bind_methods() {
|
|||
ADD_SIGNAL( MethodInfo("tween_step", PropertyInfo( Variant::OBJECT,"object"), PropertyInfo( Variant::STRING,"key"), PropertyInfo( Variant::REAL,"elapsed"), PropertyInfo( Variant::OBJECT,"value")) );
|
||||
ADD_SIGNAL( MethodInfo("tween_complete", PropertyInfo( Variant::OBJECT,"object"), PropertyInfo( Variant::STRING,"key")) );
|
||||
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "playback/process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), _SCS("set_tween_process_mode"), _SCS("get_tween_process_mode"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), _SCS("set_tween_process_mode"), _SCS("get_tween_process_mode"));
|
||||
|
||||
BIND_CONSTANT(TWEEN_PROCESS_FIXED);
|
||||
BIND_CONSTANT(TWEEN_PROCESS_IDLE);
|
||||
|
|
|
@ -326,14 +326,14 @@ void EventPlayer::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("_set_play","play"),&EventPlayer::_set_play);
|
||||
ClassDB::bind_method(_MD("_get_play"),&EventPlayer::_get_play);
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream/stream", PROPERTY_HINT_RESOURCE_TYPE,"EventStream"), _SCS("set_stream"), _SCS("get_stream") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/play"), _SCS("_set_play"), _SCS("_get_play") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/loop"), _SCS("set_loop"), _SCS("has_loop") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "stream/volume_db", PROPERTY_HINT_RANGE,"-80,24,0.01"), _SCS("set_volume_db"), _SCS("get_volume_db") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "stream/pitch_scale", PROPERTY_HINT_RANGE,"0.001,16,0.001"), _SCS("set_pitch_scale"), _SCS("get_pitch_scale") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "stream/tempo_scale", PROPERTY_HINT_RANGE,"0.001,16,0.001"), _SCS("set_tempo_scale"), _SCS("get_tempo_scale") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/autoplay"), _SCS("set_autoplay"), _SCS("has_autoplay") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/paused"), _SCS("set_paused"), _SCS("is_paused") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE,"EventStream"), _SCS("set_stream"), _SCS("get_stream") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "play"), _SCS("_set_play"), _SCS("_get_play") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "loop"), _SCS("set_loop"), _SCS("has_loop") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE,"-80,24,0.01"), _SCS("set_volume_db"), _SCS("get_volume_db") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE,"0.001,16,0.001"), _SCS("set_pitch_scale"), _SCS("get_pitch_scale") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "tempo_scale", PROPERTY_HINT_RANGE,"0.001,16,0.001"), _SCS("set_tempo_scale"), _SCS("get_tempo_scale") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "autoplay"), _SCS("set_autoplay"), _SCS("has_autoplay") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "paused"), _SCS("set_paused"), _SCS("is_paused") );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -386,14 +386,14 @@ void StreamPlayer::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("_get_play"),&StreamPlayer::_get_play);
|
||||
ClassDB::bind_method(_MD("_do_stop"),&StreamPlayer::_do_stop);
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream/stream", PROPERTY_HINT_RESOURCE_TYPE,"AudioStream"), _SCS("set_stream"), _SCS("get_stream") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/play"), _SCS("_set_play"), _SCS("_get_play") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/loop"), _SCS("set_loop"), _SCS("has_loop") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "stream/volume_db", PROPERTY_HINT_RANGE,"-80,24,0.01"), _SCS("set_volume_db"), _SCS("get_volume_db") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/autoplay"), _SCS("set_autoplay"), _SCS("has_autoplay") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/paused"), _SCS("set_paused"), _SCS("is_paused") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "stream/loop_restart_time"), _SCS("set_loop_restart_time"), _SCS("get_loop_restart_time") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT, "stream/buffering_ms"), _SCS("set_buffering_msec"), _SCS("get_buffering_msec") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE,"AudioStream"), _SCS("set_stream"), _SCS("get_stream") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "play"), _SCS("_set_play"), _SCS("_get_play") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "loop"), _SCS("set_loop"), _SCS("has_loop") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE,"-80,24,0.01"), _SCS("set_volume_db"), _SCS("get_volume_db") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "autoplay"), _SCS("set_autoplay"), _SCS("has_autoplay") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "paused"), _SCS("set_paused"), _SCS("is_paused") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "loop_restart_time"), _SCS("set_loop_restart_time"), _SCS("get_loop_restart_time") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT, "buffering_ms"), _SCS("set_buffering_msec"), _SCS("get_buffering_msec") );
|
||||
|
||||
ADD_SIGNAL(MethodInfo("finished"));
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ void ColorPicker::_value_changed(double) {
|
|||
return;
|
||||
|
||||
for(int i=0;i<4;i++) {
|
||||
color.components[i] = scroll[i]->get_val()/(raw_mode_enabled?1.0:255.0);
|
||||
color.components[i] = scroll[i]->get_value()/(raw_mode_enabled?1.0:255.0);
|
||||
}
|
||||
|
||||
set_color(color);
|
||||
|
@ -157,9 +157,9 @@ void ColorPicker::_update_color() {
|
|||
if (raw_mode_enabled) {
|
||||
if (i == 3)
|
||||
scroll[i]->set_max(1);
|
||||
scroll[i]->set_val(color.components[i]);
|
||||
scroll[i]->set_value(color.components[i]);
|
||||
} else {
|
||||
scroll[i]->set_val(color.components[i] * 255);
|
||||
scroll[i]->set_value(color.components[i] * 255);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ void WindowDialog::_bind_methods() {
|
|||
ClassDB::bind_method( _MD("_closed"),&WindowDialog::_closed);
|
||||
ClassDB::bind_method( _MD("get_close_button:TextureButton"),&WindowDialog::get_close_button);
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::STRING,"window/title",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_DEFAULT_INTL),_SCS("set_title"),_SCS("get_title"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::STRING,"window_title",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_DEFAULT_INTL),_SCS("set_title"),_SCS("get_title"));
|
||||
}
|
||||
|
||||
WindowDialog::WindowDialog() {
|
||||
|
@ -376,8 +376,9 @@ void AcceptDialog::_bind_methods() {
|
|||
ADD_SIGNAL( MethodInfo("confirmed") );
|
||||
ADD_SIGNAL( MethodInfo("custom_action",PropertyInfo(Variant::STRING,"action")) );
|
||||
|
||||
ADD_PROPERTYNZ( PropertyInfo(Variant::STRING,"dialog/text",PROPERTY_HINT_MULTILINE_TEXT,"",PROPERTY_USAGE_DEFAULT_INTL),_SCS("set_text"),_SCS("get_text"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "dialog/hide_on_ok"),_SCS("set_hide_on_ok"),_SCS("get_hide_on_ok") );
|
||||
ADD_GROUP("Dialog","dialog");
|
||||
ADD_PROPERTYNZ( PropertyInfo(Variant::STRING,"dialog_text",PROPERTY_HINT_MULTILINE_TEXT,"",PROPERTY_USAGE_DEFAULT_INTL),_SCS("set_text"),_SCS("get_text"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "dialog_hide_on_ok"),_SCS("set_hide_on_ok"),_SCS("get_hide_on_ok") );
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -107,15 +107,15 @@ void GraphEdit::get_connection_list(List<Connection> *r_connections) const {
|
|||
void GraphEdit::set_scroll_ofs(const Vector2& p_ofs) {
|
||||
|
||||
setting_scroll_ofs=true;
|
||||
h_scroll->set_val(p_ofs.x);
|
||||
v_scroll->set_val(p_ofs.y);
|
||||
h_scroll->set_value(p_ofs.x);
|
||||
v_scroll->set_value(p_ofs.y);
|
||||
_update_scroll();
|
||||
setting_scroll_ofs=false;
|
||||
}
|
||||
|
||||
Vector2 GraphEdit::get_scroll_ofs() const{
|
||||
|
||||
return Vector2(h_scroll->get_val(),v_scroll->get_val());
|
||||
return Vector2(h_scroll->get_value(),v_scroll->get_value());
|
||||
}
|
||||
|
||||
void GraphEdit::_scroll_moved(double) {
|
||||
|
@ -144,14 +144,14 @@ void GraphEdit::_update_scroll_offset() {
|
|||
continue;
|
||||
|
||||
Point2 pos=gn->get_offset()*zoom;
|
||||
pos-=Point2(h_scroll->get_val(),v_scroll->get_val());
|
||||
pos-=Point2(h_scroll->get_value(),v_scroll->get_value());
|
||||
gn->set_pos(pos);
|
||||
if (gn->get_scale()!=Vector2(zoom,zoom)) {
|
||||
gn->set_scale(Vector2(zoom,zoom));
|
||||
}
|
||||
}
|
||||
|
||||
connections_layer->set_pos(-Point2(h_scroll->get_val(),v_scroll->get_val()));
|
||||
connections_layer->set_pos(-Point2(h_scroll->get_value(),v_scroll->get_value()));
|
||||
set_block_minimum_size_adjust(false);
|
||||
awaiting_scroll_offset_update=false;
|
||||
|
||||
|
@ -796,8 +796,8 @@ void GraphEdit::set_selected(Node* p_child) {
|
|||
void GraphEdit::_input_event(const InputEvent& p_ev) {
|
||||
|
||||
if (p_ev.type==InputEvent::MOUSE_MOTION && (p_ev.mouse_motion.button_mask&BUTTON_MASK_MIDDLE || (p_ev.mouse_motion.button_mask&BUTTON_MASK_LEFT && Input::get_singleton()->is_key_pressed(KEY_SPACE)))) {
|
||||
h_scroll->set_val( h_scroll->get_val() - p_ev.mouse_motion.relative_x );
|
||||
v_scroll->set_val( v_scroll->get_val() - p_ev.mouse_motion.relative_y );
|
||||
h_scroll->set_value( h_scroll->get_value() - p_ev.mouse_motion.relative_x );
|
||||
v_scroll->set_value( v_scroll->get_value() - p_ev.mouse_motion.relative_y );
|
||||
}
|
||||
|
||||
if (p_ev.type==InputEvent::MOUSE_MOTION && dragging) {
|
||||
|
@ -1047,7 +1047,7 @@ void GraphEdit::set_zoom(float p_zoom) {
|
|||
zoom_minus->set_disabled(zoom==MIN_ZOOM);
|
||||
zoom_plus->set_disabled(zoom==MAX_ZOOM);
|
||||
|
||||
Vector2 sbofs = (Vector2( h_scroll->get_val(), v_scroll->get_val() ) + get_size()/2)/zoom;
|
||||
Vector2 sbofs = (Vector2( h_scroll->get_value(), v_scroll->get_value() ) + get_size()/2)/zoom;
|
||||
|
||||
zoom = p_zoom;
|
||||
top_layer->update();
|
||||
|
@ -1058,8 +1058,8 @@ void GraphEdit::set_zoom(float p_zoom) {
|
|||
if (is_visible()) {
|
||||
|
||||
Vector2 ofs = sbofs*zoom - get_size()/2;
|
||||
h_scroll->set_val( ofs.x );
|
||||
v_scroll->set_val( ofs.y );
|
||||
h_scroll->set_value( ofs.x );
|
||||
v_scroll->set_value( ofs.y );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1181,13 +1181,13 @@ bool GraphEdit::is_using_snap() const{
|
|||
|
||||
int GraphEdit::get_snap() const{
|
||||
|
||||
return snap_amount->get_val();
|
||||
return snap_amount->get_value();
|
||||
}
|
||||
|
||||
void GraphEdit::set_snap(int p_snap) {
|
||||
|
||||
ERR_FAIL_COND(p_snap<5);
|
||||
snap_amount->set_val(p_snap);
|
||||
snap_amount->set_value(p_snap);
|
||||
update();
|
||||
}
|
||||
void GraphEdit::_snap_toggled() {
|
||||
|
@ -1331,7 +1331,7 @@ GraphEdit::GraphEdit() {
|
|||
snap_amount->set_min(5);
|
||||
snap_amount->set_max(100);
|
||||
snap_amount->set_step(1);
|
||||
snap_amount->set_val(20);
|
||||
snap_amount->set_value(20);
|
||||
snap_amount->connect("value_changed",this,"_snap_value_changed");
|
||||
zoom_hb->add_child(snap_amount);
|
||||
|
||||
|
|
|
@ -471,7 +471,7 @@ void ItemList::_input_event(const InputEvent& p_event) {
|
|||
Vector2 pos(mb.x,mb.y);
|
||||
Ref<StyleBox> bg = get_stylebox("bg");
|
||||
pos-=bg->get_offset();
|
||||
pos.y+=scroll_bar->get_val();
|
||||
pos.y+=scroll_bar->get_value();
|
||||
|
||||
int closest = -1;
|
||||
|
||||
|
@ -561,12 +561,12 @@ void ItemList::_input_event(const InputEvent& p_event) {
|
|||
}
|
||||
if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==BUTTON_WHEEL_UP && p_event.mouse_button.pressed) {
|
||||
|
||||
scroll_bar->set_val( scroll_bar->get_val()-scroll_bar->get_page()/8 );
|
||||
scroll_bar->set_value( scroll_bar->get_value()-scroll_bar->get_page()/8 );
|
||||
|
||||
}
|
||||
if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==BUTTON_WHEEL_DOWN && p_event.mouse_button.pressed) {
|
||||
|
||||
scroll_bar->set_val( scroll_bar->get_val()+scroll_bar->get_page()/8 );
|
||||
scroll_bar->set_value( scroll_bar->get_value()+scroll_bar->get_page()/8 );
|
||||
|
||||
}
|
||||
|
||||
|
@ -949,7 +949,7 @@ void ItemList::_notification(int p_what) {
|
|||
scroll_bar->set_max(max);
|
||||
//print_line("max: "+rtos(max)+" page "+rtos(page));
|
||||
if (max<=page) {
|
||||
scroll_bar->set_val(0);
|
||||
scroll_bar->set_value(0);
|
||||
scroll_bar->hide();
|
||||
} else {
|
||||
scroll_bar->show();
|
||||
|
@ -966,13 +966,13 @@ void ItemList::_notification(int p_what) {
|
|||
if (ensure_selected_visible && current>=0 && current <=items.size()) {
|
||||
|
||||
Rect2 r = items[current].rect_cache;
|
||||
int from = scroll_bar->get_val();
|
||||
int from = scroll_bar->get_value();
|
||||
int to = from + scroll_bar->get_page();
|
||||
|
||||
if (r.pos.y < from) {
|
||||
scroll_bar->set_val(r.pos.y);
|
||||
scroll_bar->set_value(r.pos.y);
|
||||
} else if (r.pos.y+r.size.y > to) {
|
||||
scroll_bar->set_val(r.pos.y+r.size.y - (to-from));
|
||||
scroll_bar->set_value(r.pos.y+r.size.y - (to-from));
|
||||
}
|
||||
|
||||
|
||||
|
@ -981,9 +981,9 @@ void ItemList::_notification(int p_what) {
|
|||
ensure_selected_visible=false;
|
||||
|
||||
Vector2 base_ofs = bg->get_offset();
|
||||
base_ofs.y-=int(scroll_bar->get_val());
|
||||
base_ofs.y-=int(scroll_bar->get_value());
|
||||
|
||||
Rect2 clip(Point2(),size-bg->get_minimum_size()+Vector2(0,scroll_bar->get_val()));
|
||||
Rect2 clip(Point2(),size-bg->get_minimum_size()+Vector2(0,scroll_bar->get_value()));
|
||||
|
||||
for(int i=0;i<items.size();i++) {
|
||||
|
||||
|
@ -1178,7 +1178,7 @@ int ItemList::get_item_at_pos(const Point2& p_pos, bool p_exact) const {
|
|||
Vector2 pos=p_pos;
|
||||
Ref<StyleBox> bg = get_stylebox("bg");
|
||||
pos-=bg->get_offset();
|
||||
pos.y+=scroll_bar->get_val();
|
||||
pos.y+=scroll_bar->get_value();
|
||||
|
||||
int closest = -1;
|
||||
int closest_dist=0x7FFFFFFF;
|
||||
|
|
|
@ -1312,16 +1312,18 @@ void LineEdit::_bind_methods() {
|
|||
BIND_CONSTANT( MENU_MAX );
|
||||
|
||||
ADD_PROPERTYNZ( PropertyInfo( Variant::STRING, "text" ), _SCS("set_text"),_SCS("get_text") );
|
||||
ADD_PROPERTYNZ( PropertyInfo( Variant::STRING, "placeholder/text" ), _SCS("set_placeholder"),_SCS("get_placeholder") );
|
||||
ADD_PROPERTYNZ( PropertyInfo( Variant::REAL, "placeholder/alpha",PROPERTY_HINT_RANGE,"0,1,0.001" ), _SCS("set_placeholder_alpha"),_SCS("get_placeholder_alpha") );
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "align", PROPERTY_HINT_ENUM, "Left,Center,Right,Fill"), _SCS("set_align"), _SCS("get_align"));
|
||||
ADD_PROPERTYNZ( PropertyInfo( Variant::INT, "max_length" ), _SCS("set_max_length"),_SCS("get_max_length") );
|
||||
ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "editable" ), _SCS("set_editable"),_SCS("is_editable") );
|
||||
ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "secret" ), _SCS("set_secret"),_SCS("is_secret") );
|
||||
ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "expand_to_len" ), _SCS("set_expand_to_text_length"),_SCS("get_expand_to_text_length") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::INT,"focus_mode", PROPERTY_HINT_ENUM, "None,Click,All" ), _SCS("set_focus_mode"), _SCS("get_focus_mode") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret/caret_blink"), _SCS("cursor_set_blink_enabled"), _SCS("cursor_get_blink_enabled"));;
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "caret/caret_blink_speed",PROPERTY_HINT_RANGE,"0.1,10,0.1"), _SCS("cursor_set_blink_speed"),_SCS("cursor_get_blink_speed") );
|
||||
ADD_GROUP("Placeholder","placeholder_");
|
||||
ADD_PROPERTYNZ( PropertyInfo( Variant::STRING, "placeholder_text" ), _SCS("set_placeholder"),_SCS("get_placeholder") );
|
||||
ADD_PROPERTYNZ( PropertyInfo( Variant::REAL, "placeholder_alpha",PROPERTY_HINT_RANGE,"0,1,0.001" ), _SCS("set_placeholder_alpha"),_SCS("get_placeholder_alpha") );
|
||||
ADD_GROUP("Caret","caret_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_blink"), _SCS("cursor_set_blink_enabled"), _SCS("cursor_get_blink_enabled"));;
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "caret_blink_speed",PROPERTY_HINT_RANGE,"0.1,10,0.1"), _SCS("cursor_set_blink_speed"),_SCS("cursor_get_blink_speed") );
|
||||
}
|
||||
|
||||
LineEdit::LineEdit() {
|
||||
|
|
|
@ -85,10 +85,12 @@ void Patch9Frame::_bind_methods() {
|
|||
ADD_PROPERTYNO( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate") );
|
||||
ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "draw_center"), _SCS("set_draw_center"),_SCS("get_draw_center") );
|
||||
ADD_PROPERTYNZ( PropertyInfo( Variant::RECT2, "region_rect"), _SCS("set_region_rect"),_SCS("get_region_rect"));
|
||||
ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin/left",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_LEFT );
|
||||
ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin/top",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_TOP );
|
||||
ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin/right",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_RIGHT );
|
||||
ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin/bottom",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_BOTTOM );
|
||||
|
||||
ADD_GROUP("Patch Margin","patch_margin_");
|
||||
ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin_left",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_LEFT );
|
||||
ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin_top",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_TOP );
|
||||
ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin_right",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_RIGHT );
|
||||
ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin_bottom",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_BOTTOM );
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -265,7 +265,8 @@ void Popup::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("is_exclusive"),&Popup::is_exclusive);
|
||||
ADD_SIGNAL( MethodInfo("about_to_show") );
|
||||
ADD_SIGNAL( MethodInfo("popup_hide") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "popup/exclusive"), _SCS("set_exclusive"),_SCS("is_exclusive") );
|
||||
ADD_GROUP("Popup","popup_");
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "popup_exclusive"), _SCS("set_exclusive"),_SCS("is_exclusive") );
|
||||
BIND_CONSTANT(NOTIFICATION_POST_POPUP);
|
||||
BIND_CONSTANT(NOTIFICATION_POPUP_HIDE);
|
||||
|
||||
|
|
|
@ -84,7 +84,8 @@ void ProgressBar::_bind_methods() {
|
|||
|
||||
ClassDB::bind_method(_MD("set_percent_visible","visible"),&ProgressBar::set_percent_visible);
|
||||
ClassDB::bind_method(_MD("is_percent_visible"),&ProgressBar::is_percent_visible);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"percent/visible"),_SCS("set_percent_visible"),_SCS("is_percent_visible"));
|
||||
ADD_GROUP("Percent","percent_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"percent_visible"),_SCS("set_percent_visible"),_SCS("is_percent_visible"));
|
||||
}
|
||||
|
||||
ProgressBar::ProgressBar() {
|
||||
|
|
|
@ -66,7 +66,7 @@ void Range::Shared::emit_changed(const char *p_what) {
|
|||
}
|
||||
|
||||
|
||||
void Range::set_val(double p_val) {
|
||||
void Range::set_value(double p_val) {
|
||||
|
||||
if(_rounded_values){
|
||||
p_val = Math::round(p_val);
|
||||
|
@ -88,14 +88,14 @@ void Range::set_val(double p_val) {
|
|||
void Range::set_min(double p_min) {
|
||||
|
||||
shared->min=p_min;
|
||||
set_val(shared->val);
|
||||
set_value(shared->val);
|
||||
|
||||
shared->emit_changed("range/min");
|
||||
}
|
||||
void Range::set_max(double p_max) {
|
||||
|
||||
shared->max=p_max;
|
||||
set_val(shared->val);
|
||||
set_value(shared->val);
|
||||
|
||||
shared->emit_changed("range/max");
|
||||
|
||||
|
@ -109,12 +109,12 @@ void Range::set_step(double p_step) {
|
|||
void Range::set_page(double p_page) {
|
||||
|
||||
shared->page=p_page;
|
||||
set_val(shared->val);
|
||||
set_value(shared->val);
|
||||
|
||||
shared->emit_changed("range/page");
|
||||
}
|
||||
|
||||
double Range::get_val() const {
|
||||
double Range::get_value() const {
|
||||
|
||||
return shared->val;
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ void Range::set_unit_value(double p_value) {
|
|||
v = percent + get_min();
|
||||
}
|
||||
}
|
||||
set_val( v );
|
||||
set_value( v );
|
||||
}
|
||||
double Range::get_unit_value() const {
|
||||
|
||||
|
@ -162,13 +162,13 @@ double Range::get_unit_value() const {
|
|||
|
||||
double exp_min = Math::log(get_min())/Math::log(2);
|
||||
double exp_max = Math::log(get_max())/Math::log(2);
|
||||
double v = Math::log(get_val())/Math::log(2);
|
||||
double v = Math::log(get_value())/Math::log(2);
|
||||
|
||||
return (v - exp_min) / (exp_max - exp_min);
|
||||
|
||||
} else {
|
||||
|
||||
return (get_val() - get_min()) / (get_max() - get_min());
|
||||
return (get_value() - get_min()) / (get_max() - get_min());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -222,15 +222,13 @@ void Range::_unref_shared() {
|
|||
|
||||
void Range::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(_MD("get_val"),&Range::get_val);
|
||||
ClassDB::bind_method(_MD("get_value"),&Range::get_val);
|
||||
ClassDB::bind_method(_MD("get_value"),&Range::get_value);
|
||||
ClassDB::bind_method(_MD("get_min"),&Range::get_min);
|
||||
ClassDB::bind_method(_MD("get_max"),&Range::get_max);
|
||||
ClassDB::bind_method(_MD("get_step"),&Range::get_step);
|
||||
ClassDB::bind_method(_MD("get_page"),&Range::get_page);
|
||||
ClassDB::bind_method(_MD("get_unit_value"),&Range::get_unit_value);
|
||||
ClassDB::bind_method(_MD("set_val","value"),&Range::set_val);
|
||||
ClassDB::bind_method(_MD("set_value","value"),&Range::set_val);
|
||||
ClassDB::bind_method(_MD("set_value","value"),&Range::set_value);
|
||||
ClassDB::bind_method(_MD("set_min","minimum"),&Range::set_min);
|
||||
ClassDB::bind_method(_MD("set_max","maximum"),&Range::set_max);
|
||||
ClassDB::bind_method(_MD("set_step","step"),&Range::set_step);
|
||||
|
@ -247,13 +245,13 @@ void Range::_bind_methods() {
|
|||
ADD_SIGNAL( MethodInfo("value_changed", PropertyInfo(Variant::REAL,"value")));
|
||||
ADD_SIGNAL( MethodInfo("changed"));
|
||||
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "range/min" ), _SCS("set_min"), _SCS("get_min") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "range/max" ), _SCS("set_max"), _SCS("get_max") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "range/step" ), _SCS("set_step"), _SCS("get_step") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "range/page" ), _SCS("set_page"), _SCS("get_page") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "range/value" ), _SCS("set_val"), _SCS("get_val") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "range/exp_edit" ), _SCS("set_exp_unit_value"), _SCS("is_unit_value_exp") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "range/rounded" ), _SCS("set_rounded_values"), _SCS("is_rounded_values") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "min_value" ), _SCS("set_min"), _SCS("get_min") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "max_value" ), _SCS("set_max"), _SCS("get_max") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "step" ), _SCS("set_step"), _SCS("get_step") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "page" ), _SCS("set_page"), _SCS("get_page") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::REAL, "value" ), _SCS("set_value"), _SCS("get_value") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "exp_edit" ), _SCS("set_exp_unit_value"), _SCS("is_unit_value_exp") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "rounded" ), _SCS("set_rounded_values"), _SCS("is_rounded_values") );
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -66,14 +66,14 @@ protected:
|
|||
bool _rounded_values;
|
||||
public:
|
||||
|
||||
void set_val(double p_val);
|
||||
void set_value(double p_val);
|
||||
void set_min(double p_min);
|
||||
void set_max(double p_max);
|
||||
void set_step(double p_step);
|
||||
void set_page(double p_page);
|
||||
void set_unit_value(double p_value);
|
||||
|
||||
double get_val() const;
|
||||
double get_value() const;
|
||||
double get_min() const;
|
||||
double get_max() const;
|
||||
double get_step() const;
|
||||
|
|
|
@ -610,7 +610,7 @@ void RichTextLabel::_scroll_changed(double) {
|
|||
if (updating_scroll)
|
||||
return;
|
||||
|
||||
if (scroll_follow && vscroll->get_val()>=(vscroll->get_max()-vscroll->get_page()))
|
||||
if (scroll_follow && vscroll->get_value()>=(vscroll->get_max()-vscroll->get_page()))
|
||||
scroll_following=true;
|
||||
else
|
||||
scroll_following=false;
|
||||
|
@ -695,7 +695,7 @@ void RichTextLabel::_notification(int p_what) {
|
|||
VisualServer::get_singleton()->canvas_item_add_clip_ignore(ci,false);
|
||||
}
|
||||
|
||||
int ofs = vscroll->get_val();
|
||||
int ofs = vscroll->get_value();
|
||||
|
||||
//todo, change to binary search
|
||||
|
||||
|
@ -734,7 +734,7 @@ void RichTextLabel::_find_click(ItemFrame* p_frame,const Point2i& p_click,Item *
|
|||
|
||||
Size2 size = get_size();
|
||||
|
||||
int ofs = vscroll->get_val();
|
||||
int ofs = vscroll->get_value();
|
||||
|
||||
//todo, change to binary search
|
||||
int from_line = 0;
|
||||
|
@ -838,12 +838,12 @@ void RichTextLabel::_input_event(InputEvent p_event) {
|
|||
if (b.button_index==BUTTON_WHEEL_UP) {
|
||||
|
||||
if (scroll_active)
|
||||
vscroll->set_val( vscroll->get_val()-vscroll->get_page()/8 );
|
||||
vscroll->set_value( vscroll->get_value()-vscroll->get_page()/8 );
|
||||
}
|
||||
if (b.button_index==BUTTON_WHEEL_DOWN) {
|
||||
|
||||
if (scroll_active)
|
||||
vscroll->set_val( vscroll->get_val()+vscroll->get_page()/8 );
|
||||
vscroll->set_value( vscroll->get_value()+vscroll->get_page()/8 );
|
||||
}
|
||||
} break;
|
||||
case InputEvent::KEY: {
|
||||
|
@ -855,32 +855,32 @@ void RichTextLabel::_input_event(InputEvent p_event) {
|
|||
case KEY_PAGEUP: {
|
||||
|
||||
if (vscroll->is_visible())
|
||||
vscroll->set_val( vscroll->get_val() - vscroll->get_page() );
|
||||
vscroll->set_value( vscroll->get_value() - vscroll->get_page() );
|
||||
} break;
|
||||
case KEY_PAGEDOWN: {
|
||||
|
||||
if (vscroll->is_visible())
|
||||
vscroll->set_val( vscroll->get_val() + vscroll->get_page() );
|
||||
vscroll->set_value( vscroll->get_value() + vscroll->get_page() );
|
||||
} break;
|
||||
case KEY_UP: {
|
||||
|
||||
if (vscroll->is_visible())
|
||||
vscroll->set_val( vscroll->get_val() - get_font("normal_font")->get_height() );
|
||||
vscroll->set_value( vscroll->get_value() - get_font("normal_font")->get_height() );
|
||||
} break;
|
||||
case KEY_DOWN: {
|
||||
|
||||
if (vscroll->is_visible())
|
||||
vscroll->set_val( vscroll->get_val() + get_font("normal_font")->get_height() );
|
||||
vscroll->set_value( vscroll->get_value() + get_font("normal_font")->get_height() );
|
||||
} break;
|
||||
case KEY_HOME: {
|
||||
|
||||
if (vscroll->is_visible())
|
||||
vscroll->set_val( 0 );
|
||||
vscroll->set_value( 0 );
|
||||
} break;
|
||||
case KEY_END: {
|
||||
|
||||
if (vscroll->is_visible())
|
||||
vscroll->set_val( vscroll->get_max() );
|
||||
vscroll->set_value( vscroll->get_max() );
|
||||
} break;
|
||||
case KEY_INSERT:
|
||||
case KEY_C: {
|
||||
|
@ -1113,7 +1113,7 @@ void RichTextLabel::_validate_line_caches(ItemFrame* p_frame) {
|
|||
vscroll->set_max(total_height);
|
||||
vscroll->set_page(size.height);
|
||||
if (scroll_follow && scroll_following)
|
||||
vscroll->set_val(total_height-size.height);
|
||||
vscroll->set_value(total_height-size.height);
|
||||
|
||||
updating_scroll=false;
|
||||
|
||||
|
@ -1411,7 +1411,7 @@ bool RichTextLabel::is_meta_underlined() const {
|
|||
|
||||
void RichTextLabel::set_offset(int p_pixel) {
|
||||
|
||||
vscroll->set_val(p_pixel);
|
||||
vscroll->set_value(p_pixel);
|
||||
}
|
||||
|
||||
void RichTextLabel::set_scroll_active(bool p_active) {
|
||||
|
@ -1431,7 +1431,7 @@ bool RichTextLabel::is_scroll_active() const {
|
|||
void RichTextLabel::set_scroll_follow(bool p_follow) {
|
||||
|
||||
scroll_follow=p_follow;
|
||||
if (!vscroll->is_visible() || vscroll->get_val()>=(vscroll->get_max()-vscroll->get_page()))
|
||||
if (!vscroll->is_visible() || vscroll->get_value()>=(vscroll->get_max()-vscroll->get_page()))
|
||||
scroll_following=true;
|
||||
}
|
||||
|
||||
|
@ -1728,7 +1728,7 @@ void RichTextLabel::scroll_to_line(int p_line) {
|
|||
|
||||
ERR_FAIL_INDEX(p_line,main->lines.size());
|
||||
_validate_line_caches(main);
|
||||
vscroll->set_val(main->lines[p_line].height_accum_cache-main->lines[p_line].height_cache);
|
||||
vscroll->set_value(main->lines[p_line].height_accum_cache-main->lines[p_line].height_cache);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1795,7 +1795,7 @@ bool RichTextLabel::search(const String& p_string,bool p_from_selection) {
|
|||
}
|
||||
item=item->parent;
|
||||
}
|
||||
vscroll->set_val(offset-fh);
|
||||
vscroll->set_value(offset-fh);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1955,8 +1955,9 @@ void RichTextLabel::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("set_use_bbcode","enable"),&RichTextLabel::set_use_bbcode);
|
||||
ClassDB::bind_method(_MD("is_using_bbcode"),&RichTextLabel::is_using_bbcode);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"bbcode/enabled"),_SCS("set_use_bbcode"),_SCS("is_using_bbcode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING,"bbcode/bbcode",PROPERTY_HINT_MULTILINE_TEXT),_SCS("set_bbcode"),_SCS("get_bbcode"));
|
||||
ADD_GROUP("BBCode","bbcode_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"bbcode_enabled"),_SCS("set_use_bbcode"),_SCS("is_using_bbcode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING,"bbcode_text",PROPERTY_HINT_MULTILINE_TEXT),_SCS("set_bbcode"),_SCS("get_bbcode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"visible_characters",PROPERTY_HINT_RANGE,"-1,128000,1"),_SCS("set_visible_characters"),_SCS("get_visible_characters"));
|
||||
|
||||
ADD_SIGNAL( MethodInfo("meta_clicked",PropertyInfo(Variant::NIL,"meta")));
|
||||
|
|
|
@ -54,7 +54,7 @@ void ScrollBar::_input_event(InputEvent p_event) {
|
|||
//if (orientation==VERTICAL)
|
||||
// set_val( get_val() + get_page() / 4.0 );
|
||||
//else
|
||||
set_val( get_val() + get_page() / 4.0 );
|
||||
set_value( get_value() + get_page() / 4.0 );
|
||||
accept_event();
|
||||
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ void ScrollBar::_input_event(InputEvent p_event) {
|
|||
//if (orientation==HORIZONTAL)
|
||||
// set_val( get_val() - get_page() / 4.0 );
|
||||
//else
|
||||
set_val( get_val() - get_page() / 4.0 );
|
||||
set_value( get_value() - get_page() / 4.0 );
|
||||
accept_event();
|
||||
}
|
||||
|
||||
|
@ -87,13 +87,13 @@ void ScrollBar::_input_event(InputEvent p_event) {
|
|||
|
||||
if (ofs < decr_size ) {
|
||||
|
||||
set_val( get_val() - (custom_step>=0?custom_step:get_step()) );
|
||||
set_value( get_value() - (custom_step>=0?custom_step:get_step()) );
|
||||
break;
|
||||
}
|
||||
|
||||
if (ofs > total-incr_size ) {
|
||||
|
||||
set_val( get_val() + (custom_step>=0?custom_step:get_step()) );
|
||||
set_value( get_value() + (custom_step>=0?custom_step:get_step()) );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ void ScrollBar::_input_event(InputEvent p_event) {
|
|||
|
||||
if ( ofs < grabber_ofs ) {
|
||||
|
||||
set_val( get_val() - get_page() );
|
||||
set_value( get_value() - get_page() );
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ void ScrollBar::_input_event(InputEvent p_event) {
|
|||
} else {
|
||||
|
||||
|
||||
set_val( get_val() + get_page() );
|
||||
set_value( get_value() + get_page() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -194,14 +194,14 @@ void ScrollBar::_input_event(InputEvent p_event) {
|
|||
|
||||
if (orientation!=HORIZONTAL)
|
||||
return;
|
||||
set_val( get_val() - (custom_step>=0?custom_step:get_step()) );
|
||||
set_value( get_value() - (custom_step>=0?custom_step:get_step()) );
|
||||
|
||||
} break;
|
||||
case KEY_RIGHT: {
|
||||
|
||||
if (orientation!=HORIZONTAL)
|
||||
return;
|
||||
set_val( get_val() + (custom_step>=0?custom_step:get_step()) );
|
||||
set_value( get_value() + (custom_step>=0?custom_step:get_step()) );
|
||||
|
||||
} break;
|
||||
case KEY_UP: {
|
||||
|
@ -209,7 +209,7 @@ void ScrollBar::_input_event(InputEvent p_event) {
|
|||
if (orientation!=VERTICAL)
|
||||
return;
|
||||
|
||||
set_val( get_val() - (custom_step>=0?custom_step:get_step()) );
|
||||
set_value( get_value() - (custom_step>=0?custom_step:get_step()) );
|
||||
|
||||
|
||||
} break;
|
||||
|
@ -217,17 +217,17 @@ void ScrollBar::_input_event(InputEvent p_event) {
|
|||
|
||||
if (orientation!=VERTICAL)
|
||||
return;
|
||||
set_val( get_val() + (custom_step>=0?custom_step:get_step()) );
|
||||
set_value( get_value() + (custom_step>=0?custom_step:get_step()) );
|
||||
|
||||
} break;
|
||||
case KEY_HOME: {
|
||||
|
||||
set_val( get_min() );
|
||||
set_value( get_min() );
|
||||
|
||||
} break;
|
||||
case KEY_END: {
|
||||
|
||||
set_val( get_max() );
|
||||
set_value( get_max() );
|
||||
|
||||
} break;
|
||||
|
||||
|
@ -325,7 +325,7 @@ void ScrollBar::_notification(int p_what) {
|
|||
|
||||
if (drag_slave_touching_deaccel) {
|
||||
|
||||
Vector2 pos = Vector2(orientation==HORIZONTAL?get_val():0,orientation==VERTICAL?get_val():0);
|
||||
Vector2 pos = Vector2(orientation==HORIZONTAL?get_value():0,orientation==VERTICAL?get_value():0);
|
||||
pos+=drag_slave_speed*get_fixed_process_delta_time();
|
||||
|
||||
bool turnoff=false;
|
||||
|
@ -342,7 +342,7 @@ void ScrollBar::_notification(int p_what) {
|
|||
turnoff=true;
|
||||
}
|
||||
|
||||
set_val(pos.x);
|
||||
set_value(pos.x);
|
||||
|
||||
float sgn_x = drag_slave_speed.x<0? -1 : 1;
|
||||
float val_x = Math::abs(drag_slave_speed.x);
|
||||
|
@ -367,7 +367,7 @@ void ScrollBar::_notification(int p_what) {
|
|||
turnoff=true;
|
||||
}
|
||||
|
||||
set_val(pos.y);
|
||||
set_value(pos.y);
|
||||
|
||||
float sgn_y = drag_slave_speed.y<0? -1 : 1;
|
||||
float val_y = Math::abs(drag_slave_speed.y);
|
||||
|
@ -580,7 +580,7 @@ void ScrollBar::_drag_slave_input(const InputEvent& p_input) {
|
|||
drag_slave_accum=Vector2();
|
||||
last_drag_slave_accum=Vector2();
|
||||
//drag_slave_from=Vector2(h_scroll->get_val(),v_scroll->get_val());
|
||||
drag_slave_from= Vector2(orientation==HORIZONTAL?get_val():0,orientation==VERTICAL?get_val():0);
|
||||
drag_slave_from= Vector2(orientation==HORIZONTAL?get_value():0,orientation==VERTICAL?get_value():0);
|
||||
|
||||
drag_slave_touching=OS::get_singleton()->has_touchscreen_ui_hint();
|
||||
drag_slave_touching_deaccel=false;
|
||||
|
@ -619,11 +619,11 @@ void ScrollBar::_drag_slave_input(const InputEvent& p_input) {
|
|||
Vector2 diff = drag_slave_from+drag_slave_accum;
|
||||
|
||||
if (orientation==HORIZONTAL)
|
||||
set_val(diff.x);
|
||||
set_value(diff.x);
|
||||
//else
|
||||
// drag_slave_accum.x=0;
|
||||
if (orientation==VERTICAL)
|
||||
set_val(diff.y);
|
||||
set_value(diff.y);
|
||||
//else
|
||||
// drag_slave_accum.y=0;
|
||||
time_since_motion=0;
|
||||
|
|
|
@ -91,18 +91,18 @@ void ScrollContainer::_input_event(const InputEvent& p_input_event) {
|
|||
if (mb.button_index==BUTTON_WHEEL_UP && mb.pressed) {
|
||||
if (h_scroll->is_visible() && !v_scroll->is_visible()){
|
||||
// only horizontal is enabled, scroll horizontally
|
||||
h_scroll->set_val( h_scroll->get_val()-h_scroll->get_page()/8 );
|
||||
h_scroll->set_value( h_scroll->get_value()-h_scroll->get_page()/8 );
|
||||
} else if (v_scroll->is_visible()) {
|
||||
v_scroll->set_val( v_scroll->get_val()-v_scroll->get_page()/8 );
|
||||
v_scroll->set_value( v_scroll->get_value()-v_scroll->get_page()/8 );
|
||||
}
|
||||
}
|
||||
|
||||
if (mb.button_index==BUTTON_WHEEL_DOWN && mb.pressed) {
|
||||
if (h_scroll->is_visible() && !v_scroll->is_visible()){
|
||||
// only horizontal is enabled, scroll horizontally
|
||||
h_scroll->set_val( h_scroll->get_val()+h_scroll->get_page()/8 );
|
||||
h_scroll->set_value( h_scroll->get_value()+h_scroll->get_page()/8 );
|
||||
} else if (v_scroll->is_visible()) {
|
||||
v_scroll->set_val( v_scroll->get_val()+v_scroll->get_page()/8 );
|
||||
v_scroll->set_value( v_scroll->get_value()+v_scroll->get_page()/8 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ void ScrollContainer::_input_event(const InputEvent& p_input_event) {
|
|||
drag_speed=Vector2();
|
||||
drag_accum=Vector2();
|
||||
last_drag_accum=Vector2();
|
||||
drag_from=Vector2(h_scroll->get_val(),v_scroll->get_val());
|
||||
drag_from=Vector2(h_scroll->get_value(),v_scroll->get_value());
|
||||
drag_touching=OS::get_singleton()->has_touchscreen_ui_hint();
|
||||
drag_touching_deaccel=false;
|
||||
time_since_motion=0;
|
||||
|
@ -167,11 +167,11 @@ void ScrollContainer::_input_event(const InputEvent& p_input_event) {
|
|||
Vector2 diff = drag_from+drag_accum;
|
||||
|
||||
if (scroll_h)
|
||||
h_scroll->set_val(diff.x);
|
||||
h_scroll->set_value(diff.x);
|
||||
else
|
||||
drag_accum.x=0;
|
||||
if (scroll_v)
|
||||
v_scroll->set_val(diff.y);
|
||||
v_scroll->set_value(diff.y);
|
||||
else
|
||||
drag_accum.y=0;
|
||||
time_since_motion=0;
|
||||
|
@ -270,7 +270,7 @@ void ScrollContainer::_notification(int p_what) {
|
|||
|
||||
if (drag_touching_deaccel) {
|
||||
|
||||
Vector2 pos = Vector2(h_scroll->get_val(),v_scroll->get_val());
|
||||
Vector2 pos = Vector2(h_scroll->get_value(),v_scroll->get_value());
|
||||
pos+=drag_speed*get_fixed_process_delta_time();
|
||||
|
||||
bool turnoff_h=false;
|
||||
|
@ -295,9 +295,9 @@ void ScrollContainer::_notification(int p_what) {
|
|||
}
|
||||
|
||||
if (scroll_h)
|
||||
h_scroll->set_val(pos.x);
|
||||
h_scroll->set_value(pos.x);
|
||||
if (scroll_v)
|
||||
v_scroll->set_val(pos.y);
|
||||
v_scroll->set_value(pos.y);
|
||||
|
||||
float sgn_x = drag_speed.x<0? -1 : 1;
|
||||
float val_x = Math::abs(drag_speed.x);
|
||||
|
@ -359,7 +359,7 @@ void ScrollContainer::update_scrollbars() {
|
|||
} else {
|
||||
|
||||
v_scroll->show();
|
||||
scroll.y=v_scroll->get_val();
|
||||
scroll.y=v_scroll->get_value();
|
||||
|
||||
}
|
||||
|
||||
|
@ -376,14 +376,14 @@ void ScrollContainer::update_scrollbars() {
|
|||
h_scroll->show();
|
||||
h_scroll->set_max(min.width);
|
||||
h_scroll->set_page(size.width - vmin.width);
|
||||
scroll.x=h_scroll->get_val();
|
||||
scroll.x=h_scroll->get_value();
|
||||
}
|
||||
}
|
||||
|
||||
void ScrollContainer::_scroll_moved(float) {
|
||||
|
||||
scroll.x=h_scroll->get_val();
|
||||
scroll.y=v_scroll->get_val();
|
||||
scroll.x=h_scroll->get_value();
|
||||
scroll.y=v_scroll->get_value();
|
||||
queue_sort();
|
||||
|
||||
update();
|
||||
|
@ -415,21 +415,21 @@ bool ScrollContainer::is_v_scroll_enabled() const{
|
|||
int ScrollContainer::get_v_scroll() const {
|
||||
|
||||
|
||||
return v_scroll->get_val();
|
||||
return v_scroll->get_value();
|
||||
}
|
||||
void ScrollContainer::set_v_scroll(int p_pos) {
|
||||
|
||||
v_scroll->set_val(p_pos);
|
||||
v_scroll->set_value(p_pos);
|
||||
_cancel_drag();
|
||||
}
|
||||
|
||||
int ScrollContainer::get_h_scroll() const {
|
||||
|
||||
return h_scroll->get_val();
|
||||
return h_scroll->get_value();
|
||||
}
|
||||
void ScrollContainer::set_h_scroll(int p_pos) {
|
||||
|
||||
h_scroll->set_val(p_pos);
|
||||
h_scroll->set_value(p_pos);
|
||||
_cancel_drag();
|
||||
|
||||
}
|
||||
|
@ -449,8 +449,9 @@ void ScrollContainer::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("set_v_scroll","val"),&ScrollContainer::set_v_scroll);
|
||||
ClassDB::bind_method(_MD("get_v_scroll"),&ScrollContainer::get_v_scroll);
|
||||
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "scroll/horizontal"), _SCS("set_enable_h_scroll"),_SCS("is_h_scroll_enabled"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "scroll/vertical"), _SCS("set_enable_v_scroll"),_SCS("is_v_scroll_enabled"));
|
||||
ADD_GROUP("Scroll","scroll_");
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "scroll_horizontal"), _SCS("set_enable_h_scroll"),_SCS("is_h_scroll_enabled"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "scroll_vertical"), _SCS("set_enable_v_scroll"),_SCS("is_v_scroll_enabled"));
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -63,9 +63,9 @@ void Slider::_input_event(InputEvent p_event) {
|
|||
}
|
||||
} else if (mb.pressed && mb.button_index==BUTTON_WHEEL_UP) {
|
||||
|
||||
set_val( get_val() + get_step());
|
||||
set_value( get_value() + get_step());
|
||||
} else if (mb.pressed && mb.button_index==BUTTON_WHEEL_DOWN) {
|
||||
set_val( get_val() - get_step());
|
||||
set_value( get_value() - get_step());
|
||||
}
|
||||
|
||||
} else if (p_event.type==InputEvent::MOUSE_MOTION) {
|
||||
|
@ -89,26 +89,26 @@ void Slider::_input_event(InputEvent p_event) {
|
|||
|
||||
if (orientation!=HORIZONTAL)
|
||||
return;
|
||||
set_val( get_val() - (custom_step>=0?custom_step:get_step()) );
|
||||
set_value( get_value() - (custom_step>=0?custom_step:get_step()) );
|
||||
accept_event();
|
||||
} else if (p_event.is_action("ui_right") && p_event.is_pressed()) {
|
||||
|
||||
if (orientation!=HORIZONTAL)
|
||||
return;
|
||||
set_val( get_val() + (custom_step>=0?custom_step:get_step()) );
|
||||
set_value( get_value() + (custom_step>=0?custom_step:get_step()) );
|
||||
accept_event();
|
||||
} else if (p_event.is_action("ui_up") && p_event.is_pressed()) {
|
||||
|
||||
if (orientation!=VERTICAL)
|
||||
return;
|
||||
|
||||
set_val( get_val() + (custom_step>=0?custom_step:get_step()) );
|
||||
set_value( get_value() + (custom_step>=0?custom_step:get_step()) );
|
||||
accept_event();
|
||||
} else if (p_event.is_action("ui_down") && p_event.is_pressed()) {
|
||||
|
||||
if (orientation!=VERTICAL)
|
||||
return;
|
||||
set_val( get_val() - (custom_step>=0?custom_step:get_step()) );
|
||||
set_value( get_value() - (custom_step>=0?custom_step:get_step()) );
|
||||
accept_event();
|
||||
|
||||
} else if (p_event.type==InputEvent::KEY) {
|
||||
|
@ -122,12 +122,12 @@ void Slider::_input_event(InputEvent p_event) {
|
|||
|
||||
case KEY_HOME: {
|
||||
|
||||
set_val( get_min() );
|
||||
set_value( get_min() );
|
||||
accept_event();
|
||||
} break;
|
||||
case KEY_END: {
|
||||
|
||||
set_val( get_max() );
|
||||
set_value( get_max() );
|
||||
accept_event();
|
||||
|
||||
} break;
|
||||
|
|
|
@ -39,7 +39,7 @@ Size2 SpinBox::get_minimum_size() const {
|
|||
|
||||
void SpinBox::_value_changed(double) {
|
||||
|
||||
String value = String::num(get_val(),Math::step_decimals(get_step()));
|
||||
String value = String::num(get_value(),Math::step_decimals(get_step()));
|
||||
if (prefix!="")
|
||||
value=prefix+" "+value;
|
||||
if (suffix!="")
|
||||
|
@ -54,7 +54,7 @@ void SpinBox::_text_entered(const String& p_string) {
|
|||
String value = p_string;
|
||||
if (prefix!="" && p_string.begins_with(prefix))
|
||||
value = p_string.substr(prefix.length(), p_string.length()-prefix.length());
|
||||
set_val( value.to_double() );
|
||||
set_value( value.to_double() );
|
||||
_value_changed(0);
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ void SpinBox::_range_click_timeout() {
|
|||
if (!drag.enabled && Input::get_singleton()->is_mouse_button_pressed(BUTTON_LEFT)) {
|
||||
|
||||
bool up = get_local_mouse_pos().y < (get_size().height/2);
|
||||
set_val( get_val() + (up?get_step():-get_step()));
|
||||
set_value( get_value() + (up?get_step():-get_step()));
|
||||
|
||||
if (range_click_timer->is_one_shot()) {
|
||||
range_click_timer->set_wait_time(0.075);
|
||||
|
@ -107,7 +107,7 @@ void SpinBox::_input_event(const InputEvent& p_event) {
|
|||
|
||||
case BUTTON_LEFT: {
|
||||
|
||||
set_val( get_val() + (up?get_step():-get_step()));
|
||||
set_value( get_value() + (up?get_step():-get_step()));
|
||||
|
||||
range_click_timer->set_wait_time(0.6);
|
||||
range_click_timer->set_one_shot(true);
|
||||
|
@ -117,18 +117,18 @@ void SpinBox::_input_event(const InputEvent& p_event) {
|
|||
} break;
|
||||
case BUTTON_RIGHT: {
|
||||
|
||||
set_val( (up?get_max():get_min()) );
|
||||
set_value( (up?get_max():get_min()) );
|
||||
line_edit->grab_focus();
|
||||
} break;
|
||||
case BUTTON_WHEEL_UP: {
|
||||
if (line_edit->has_focus()) {
|
||||
set_val( get_val() + get_step() );
|
||||
set_value( get_value() + get_step() );
|
||||
accept_event();
|
||||
}
|
||||
} break;
|
||||
case BUTTON_WHEEL_DOWN: {
|
||||
if (line_edit->has_focus()) {
|
||||
set_val( get_val() - get_step() );
|
||||
set_value( get_value() - get_step() );
|
||||
accept_event();
|
||||
}
|
||||
} break;
|
||||
|
@ -166,13 +166,13 @@ void SpinBox::_input_event(const InputEvent& p_event) {
|
|||
drag.mouse_pos=cpos;
|
||||
drag.base_val=CLAMP(drag.base_val + get_step() * diff_y, get_min(), get_max());
|
||||
|
||||
set_val( drag.base_val);
|
||||
set_value( drag.base_val);
|
||||
|
||||
} else if (drag.mouse_pos.distance_to(cpos)>2) {
|
||||
|
||||
Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED);
|
||||
drag.enabled=true;
|
||||
drag.base_val=get_val();
|
||||
drag.base_val=get_value();
|
||||
drag.mouse_pos=cpos;
|
||||
drag.capture_pos=cpos;
|
||||
|
||||
|
|
|
@ -434,9 +434,9 @@ void SplitContainer::_bind_methods() {
|
|||
|
||||
ADD_SIGNAL( MethodInfo("dragged",PropertyInfo(Variant::INT,"offset")));
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"split/offset"),_SCS("set_split_offset"),_SCS("get_split_offset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"split/collapsed"),_SCS("set_collapsed"),_SCS("is_collapsed"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"split/dragger_visibility",PROPERTY_HINT_ENUM,"Visible,Hidden,Hidden & Collapsed"),_SCS("set_dragger_visibility"),_SCS("get_dragger_visibility"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"split_offset"),_SCS("set_split_offset"),_SCS("get_split_offset"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"collapsed"),_SCS("set_collapsed"),_SCS("is_collapsed"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"dragger_visibility",PROPERTY_HINT_ENUM,"Visible,Hidden,Hidden & Collapsed"),_SCS("set_dragger_visibility"),_SCS("get_dragger_visibility"));
|
||||
|
||||
BIND_CONSTANT( DRAGGER_VISIBLE );
|
||||
BIND_CONSTANT( DRAGGER_HIDDEN );
|
||||
|
|
|
@ -347,7 +347,7 @@ void TextEdit::_update_scrollbars() {
|
|||
v_scroll->show();
|
||||
v_scroll->set_max(total_rows);
|
||||
v_scroll->set_page(visible_rows);
|
||||
v_scroll->set_val(cursor.line_ofs);
|
||||
v_scroll->set_value(cursor.line_ofs);
|
||||
|
||||
} else {
|
||||
cursor.line_ofs = 0;
|
||||
|
@ -359,7 +359,7 @@ void TextEdit::_update_scrollbars() {
|
|||
h_scroll->show();
|
||||
h_scroll->set_max(total_width);
|
||||
h_scroll->set_page(visible_width);
|
||||
h_scroll->set_val(cursor.x_ofs);
|
||||
h_scroll->set_value(cursor.x_ofs);
|
||||
|
||||
} else {
|
||||
|
||||
|
@ -1515,16 +1515,16 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
|
|||
|
||||
if (mb.pressed) {
|
||||
if (mb.button_index==BUTTON_WHEEL_UP && !mb.mod.command) {
|
||||
v_scroll->set_val( v_scroll->get_val() -3 );
|
||||
v_scroll->set_value( v_scroll->get_value() -3 );
|
||||
}
|
||||
if (mb.button_index==BUTTON_WHEEL_DOWN && !mb.mod.command) {
|
||||
v_scroll->set_val( v_scroll->get_val() +3 );
|
||||
v_scroll->set_value( v_scroll->get_value() +3 );
|
||||
}
|
||||
if (mb.button_index==BUTTON_WHEEL_LEFT) {
|
||||
h_scroll->set_val( h_scroll->get_val() -3 );
|
||||
h_scroll->set_value( h_scroll->get_value() -3 );
|
||||
}
|
||||
if (mb.button_index==BUTTON_WHEEL_RIGHT) {
|
||||
h_scroll->set_val( h_scroll->get_val() +3 );
|
||||
h_scroll->set_value( h_scroll->get_value() +3 );
|
||||
}
|
||||
if (mb.button_index==BUTTON_LEFT) {
|
||||
|
||||
|
@ -3206,9 +3206,9 @@ void TextEdit::_scroll_moved(double p_to_val) {
|
|||
return;
|
||||
|
||||
if (h_scroll->is_visible())
|
||||
cursor.x_ofs=h_scroll->get_val();
|
||||
cursor.x_ofs=h_scroll->get_value();
|
||||
if (v_scroll->is_visible())
|
||||
cursor.line_ofs=v_scroll->get_val();
|
||||
cursor.line_ofs=v_scroll->get_value();
|
||||
update();
|
||||
}
|
||||
|
||||
|
@ -4155,21 +4155,21 @@ void TextEdit::tag_saved_version() {
|
|||
|
||||
int TextEdit::get_v_scroll() const {
|
||||
|
||||
return v_scroll->get_val();
|
||||
return v_scroll->get_value();
|
||||
}
|
||||
void TextEdit::set_v_scroll(int p_scroll) {
|
||||
|
||||
v_scroll->set_val(p_scroll);
|
||||
v_scroll->set_value(p_scroll);
|
||||
cursor.line_ofs=p_scroll;
|
||||
}
|
||||
|
||||
int TextEdit::get_h_scroll() const {
|
||||
|
||||
return h_scroll->get_val();
|
||||
return h_scroll->get_value();
|
||||
}
|
||||
void TextEdit::set_h_scroll(int p_scroll) {
|
||||
|
||||
h_scroll->set_val(p_scroll);
|
||||
h_scroll->set_value(p_scroll);
|
||||
}
|
||||
|
||||
void TextEdit::set_completion(bool p_enabled,const Vector<String>& p_prefixes) {
|
||||
|
@ -4686,9 +4686,11 @@ void TextEdit::_bind_methods() {
|
|||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_line_numbers"), _SCS("set_show_line_numbers"), _SCS("is_show_line_numbers_enabled"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "highlight_all_occurrences"), _SCS("set_highlight_all_occurrences"), _SCS("is_highlight_all_occurrences_enabled"));
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret/block_caret"), _SCS("cursor_set_block_mode"), _SCS("cursor_is_block_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret/caret_blink"), _SCS("cursor_set_blink_enabled"), _SCS("cursor_get_blink_enabled"));
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "caret/caret_blink_speed",PROPERTY_HINT_RANGE,"0.1,10,0.1"), _SCS("cursor_set_blink_speed"),_SCS("cursor_get_blink_speed") );
|
||||
|
||||
ADD_GROUP("Caret","caret_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_block_mode"), _SCS("cursor_set_block_mode"), _SCS("cursor_is_block_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "caret_blink"), _SCS("cursor_set_blink_enabled"), _SCS("cursor_get_blink_enabled"));
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "caret_blink_speed",PROPERTY_HINT_RANGE,"0.1,10,0.1"), _SCS("cursor_set_blink_speed"),_SCS("cursor_get_blink_speed") );
|
||||
|
||||
ADD_SIGNAL(MethodInfo("cursor_changed"));
|
||||
ADD_SIGNAL(MethodInfo("text_changed"));
|
||||
|
|
|
@ -154,14 +154,14 @@ void TextureButton::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("get_texture_scale"),&TextureButton::get_texture_scale);
|
||||
ClassDB::bind_method(_MD("get_modulate"),&TextureButton::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_texture_scale"), _SCS("get_texture_scale"));
|
||||
ADD_PROPERTYNO(PropertyInfo(Variant::COLOR,"params/modulate"), _SCS("set_modulate"), _SCS("get_modulate"));
|
||||
ADD_GROUP("Textures","texture_");
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"texture_normal",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_normal_texture"), _SCS("get_normal_texture"));
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"texture_pressed",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_pressed_texture"), _SCS("get_pressed_texture"));
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"texture_hover",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_hover_texture"), _SCS("get_hover_texture"));
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"texture_disabled",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_disabled_texture"), _SCS("get_disabled_texture"));
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"texture_focused",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_focused_texture"), _SCS("get_focused_texture"));
|
||||
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"texture_click_mask",PROPERTY_HINT_RESOURCE_TYPE,"BitMap"), _SCS("set_click_mask"), _SCS("get_click_mask")) ;
|
||||
ADD_PROPERTYNO(PropertyInfo(Variant::VECTOR2,"texture_scale",PROPERTY_HINT_RANGE,"0.01,1024,0.01"), _SCS("set_texture_scale"), _SCS("get_texture_scale"));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -276,13 +276,15 @@ void TextureProgress::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("set_fill_degrees","mode"),&TextureProgress::set_fill_degrees);
|
||||
ClassDB::bind_method(_MD("get_fill_degrees"), &TextureProgress::get_fill_degrees);
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture/under",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_under_texture"),_SCS("get_under_texture"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture/over",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_over_texture"),_SCS("get_over_texture"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture/progress",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_progress_texture"),_SCS("get_progress_texture"));
|
||||
ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"mode",PROPERTY_HINT_ENUM,"Left to Right,Right to Left,Top to Bottom,Bottom to Top,Clockwise,Counter Clockwise"),_SCS("set_fill_mode"),_SCS("get_fill_mode"));
|
||||
ADD_PROPERTYNZ( PropertyInfo(Variant::REAL,"radial_fill/initial_angle",PROPERTY_HINT_RANGE,"0.0,360.0,0.1,slider"),_SCS("set_radial_initial_angle"),_SCS("get_radial_initial_angle"));
|
||||
ADD_PROPERTYNZ( PropertyInfo(Variant::REAL,"radial_fill/fill_degrees",PROPERTY_HINT_RANGE,"0.0,360.0,0.1,slider"),_SCS("set_fill_degrees"),_SCS("get_fill_degrees"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"radial_fill/center_offset"),_SCS("set_radial_center_offset"),_SCS("get_radial_center_offset"));
|
||||
ADD_GROUP("Textures","texture_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture_under",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_under_texture"),_SCS("get_under_texture"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture_over",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_over_texture"),_SCS("get_over_texture"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture_progress",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_progress_texture"),_SCS("get_progress_texture"));
|
||||
ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"fill_mode",PROPERTY_HINT_ENUM,"Left to Right,Right to Left,Top to Bottom,Bottom to Top,Clockwise,Counter Clockwise"),_SCS("set_fill_mode"),_SCS("get_fill_mode"));
|
||||
ADD_GROUP("Radial Fill","radial_");
|
||||
ADD_PROPERTYNZ( PropertyInfo(Variant::REAL,"radial_initial_angle",PROPERTY_HINT_RANGE,"0.0,360.0,0.1,slider"),_SCS("set_radial_initial_angle"),_SCS("get_radial_initial_angle"));
|
||||
ADD_PROPERTYNZ( PropertyInfo(Variant::REAL,"radial_fill_degrees",PROPERTY_HINT_RANGE,"0.0,360.0,0.1,slider"),_SCS("set_fill_degrees"),_SCS("get_fill_degrees"));
|
||||
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"radial_center_offset"),_SCS("set_radial_center_offset"),_SCS("get_radial_center_offset"));
|
||||
|
||||
BIND_CONSTANT( FILL_LEFT_TO_RIGHT );
|
||||
BIND_CONSTANT( FILL_RIGHT_TO_LEFT );
|
||||
|
|
|
@ -2278,9 +2278,9 @@ void Tree::_input_event(InputEvent p_event) {
|
|||
if (mpos.y>=0) {
|
||||
|
||||
if (h_scroll->is_visible())
|
||||
mpos.x+=h_scroll->get_val();
|
||||
mpos.x+=h_scroll->get_value();
|
||||
if (v_scroll->is_visible())
|
||||
mpos.y+=v_scroll->get_val();
|
||||
mpos.y+=v_scroll->get_value();
|
||||
|
||||
int col,h,section;
|
||||
TreeItem *it = _find_item_at_pos(root,mpos,col,h,section);
|
||||
|
@ -2329,7 +2329,7 @@ void Tree::_input_event(InputEvent p_event) {
|
|||
|
||||
|
||||
drag_accum-=b.relative_y;
|
||||
v_scroll->set_val(drag_from+drag_accum);
|
||||
v_scroll->set_value(drag_from+drag_accum);
|
||||
drag_speed=-b.speed_y;
|
||||
|
||||
}
|
||||
|
@ -2471,7 +2471,7 @@ void Tree::_input_event(InputEvent p_event) {
|
|||
drag_speed=0;
|
||||
drag_accum=0;
|
||||
// last_drag_accum=0;
|
||||
drag_from=v_scroll->get_val();
|
||||
drag_from=v_scroll->get_value();
|
||||
drag_touching=OS::get_singleton()->has_touchscreen_ui_hint();
|
||||
drag_touching_deaccel=false;
|
||||
if (drag_touching) {
|
||||
|
@ -2483,11 +2483,11 @@ void Tree::_input_event(InputEvent p_event) {
|
|||
} break;
|
||||
case BUTTON_WHEEL_UP: {
|
||||
|
||||
v_scroll->set_val( v_scroll->get_val()-v_scroll->get_page()/8 );
|
||||
v_scroll->set_value( v_scroll->get_value()-v_scroll->get_page()/8 );
|
||||
} break;
|
||||
case BUTTON_WHEEL_DOWN: {
|
||||
|
||||
v_scroll->set_val( v_scroll->get_val()+v_scroll->get_page()/8 );
|
||||
v_scroll->set_value( v_scroll->get_value()+v_scroll->get_page()/8 );
|
||||
} break;
|
||||
}
|
||||
|
||||
|
@ -2566,7 +2566,7 @@ bool Tree::edit_selected() {
|
|||
value_editor->set_min( c.min );
|
||||
value_editor->set_max( c.max );
|
||||
value_editor->set_step( c.step );
|
||||
value_editor->set_val( c.val );
|
||||
value_editor->set_value( c.val );
|
||||
value_editor->set_exp_unit_value( c.expr );
|
||||
updating_value_editor=false;
|
||||
}
|
||||
|
@ -2626,7 +2626,7 @@ void Tree::update_scrollbars() {
|
|||
v_scroll->show();
|
||||
v_scroll->set_max(min.height);
|
||||
v_scroll->set_page(size.height - hmin.height - tbh);
|
||||
cache.offset.y=v_scroll->get_val();
|
||||
cache.offset.y=v_scroll->get_value();
|
||||
}
|
||||
|
||||
if (min.width < size.width - vmin.width) {
|
||||
|
@ -2638,7 +2638,7 @@ void Tree::update_scrollbars() {
|
|||
h_scroll->show();
|
||||
h_scroll->set_max(min.width);
|
||||
h_scroll->set_page(size.width - vmin.width);
|
||||
cache.offset.x=h_scroll->get_val();
|
||||
cache.offset.x=h_scroll->get_value();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2692,7 +2692,7 @@ void Tree::_notification(int p_what) {
|
|||
|
||||
if (drag_touching_deaccel) {
|
||||
|
||||
float pos = v_scroll->get_val();
|
||||
float pos = v_scroll->get_value();
|
||||
pos+=drag_speed*get_fixed_process_delta_time();
|
||||
|
||||
bool turnoff=false;
|
||||
|
@ -2709,7 +2709,7 @@ void Tree::_notification(int p_what) {
|
|||
|
||||
}
|
||||
|
||||
v_scroll->set_val(pos);
|
||||
v_scroll->set_value(pos);
|
||||
float sgn = drag_speed<0? -1 : 1;
|
||||
float val = Math::abs(drag_speed);
|
||||
val-=1000*get_fixed_process_delta_time();
|
||||
|
@ -2749,8 +2749,8 @@ void Tree::_notification(int p_what) {
|
|||
}
|
||||
point *= cache.scroll_speed * get_fixed_process_delta_time();
|
||||
point += get_scroll();
|
||||
h_scroll->set_val(point.x);
|
||||
v_scroll->set_val(point.y);
|
||||
h_scroll->set_value(point.x);
|
||||
v_scroll->set_value(point.y);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3187,10 +3187,10 @@ void Tree::ensure_cursor_is_visible() {
|
|||
int h = compute_item_height(selected)+cache.vseparation;
|
||||
int screenh=get_size().height-h_scroll->get_combined_minimum_size().height;
|
||||
|
||||
if (ofs+h>v_scroll->get_val()+screenh)
|
||||
if (ofs+h>v_scroll->get_value()+screenh)
|
||||
v_scroll->call_deferred("set_val", ofs-screenh+h);
|
||||
else if (ofs < v_scroll->get_val())
|
||||
v_scroll->set_val(ofs);
|
||||
else if (ofs < v_scroll->get_value())
|
||||
v_scroll->set_value(ofs);
|
||||
}
|
||||
|
||||
int Tree::get_pressed_button() const {
|
||||
|
@ -3257,9 +3257,9 @@ Point2 Tree::get_scroll() const {
|
|||
|
||||
Point2 ofs;
|
||||
if (h_scroll->is_visible())
|
||||
ofs.x=h_scroll->get_val();
|
||||
ofs.x=h_scroll->get_value();
|
||||
if (v_scroll->is_visible())
|
||||
ofs.y=v_scroll->get_val();
|
||||
ofs.y=v_scroll->get_value();
|
||||
return ofs;
|
||||
|
||||
}
|
||||
|
@ -3398,9 +3398,9 @@ int Tree::get_column_at_pos(const Point2& p_pos) const {
|
|||
return -1;
|
||||
|
||||
if (h_scroll->is_visible())
|
||||
pos.x+=h_scroll->get_val();
|
||||
pos.x+=h_scroll->get_value();
|
||||
if (v_scroll->is_visible())
|
||||
pos.y+=v_scroll->get_val();
|
||||
pos.y+=v_scroll->get_value();
|
||||
|
||||
int col,h,section;
|
||||
TreeItem *it = _find_item_at_pos(root,pos,col,h,section);
|
||||
|
@ -3425,9 +3425,9 @@ int Tree::get_drop_section_at_pos(const Point2& p_pos) const {
|
|||
return -100;
|
||||
|
||||
if (h_scroll->is_visible())
|
||||
pos.x+=h_scroll->get_val();
|
||||
pos.x+=h_scroll->get_value();
|
||||
if (v_scroll->is_visible())
|
||||
pos.y+=v_scroll->get_val();
|
||||
pos.y+=v_scroll->get_value();
|
||||
|
||||
int col,h,section;
|
||||
TreeItem *it = _find_item_at_pos(root,pos,col,h,section);
|
||||
|
@ -3452,9 +3452,9 @@ TreeItem* Tree::get_item_at_pos(const Point2& p_pos) const {
|
|||
return NULL;
|
||||
|
||||
if (h_scroll->is_visible())
|
||||
pos.x+=h_scroll->get_val();
|
||||
pos.x+=h_scroll->get_value();
|
||||
if (v_scroll->is_visible())
|
||||
pos.y+=v_scroll->get_val();
|
||||
pos.y+=v_scroll->get_value();
|
||||
|
||||
int col,h,section;
|
||||
TreeItem *it = _find_item_at_pos(root,pos,col,h,section);
|
||||
|
@ -3480,9 +3480,9 @@ String Tree::get_tooltip(const Point2& p_pos) const {
|
|||
return Control::get_tooltip(p_pos);
|
||||
|
||||
if (h_scroll->is_visible())
|
||||
pos.x+=h_scroll->get_val();
|
||||
pos.x+=h_scroll->get_value();
|
||||
if (v_scroll->is_visible())
|
||||
pos.y+=v_scroll->get_val();
|
||||
pos.y+=v_scroll->get_value();
|
||||
|
||||
int col,h,section;
|
||||
TreeItem *it = _find_item_at_pos(root,pos,col,h,section);
|
||||
|
|
|
@ -392,12 +392,12 @@ void VideoPlayer::_bind_methods() {
|
|||
|
||||
ClassDB::bind_method(_MD("get_video_texture:Texture"), &VideoPlayer::get_video_texture );
|
||||
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT, "stream/audio_track",PROPERTY_HINT_RANGE,"0,128,1"), _SCS("set_audio_track"), _SCS("get_audio_track") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream/stream", PROPERTY_HINT_RESOURCE_TYPE,"VideoStream"), _SCS("set_stream"), _SCS("get_stream") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT, "audio_track",PROPERTY_HINT_RANGE,"0,128,1"), _SCS("set_audio_track"), _SCS("get_audio_track") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE,"VideoStream"), _SCS("set_stream"), _SCS("get_stream") );
|
||||
// ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/loop"), _SCS("set_loop"), _SCS("has_loop") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "stream/volume_db", PROPERTY_HINT_RANGE,"-80,24,0.01"), _SCS("set_volume_db"), _SCS("get_volume_db") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/autoplay"), _SCS("set_autoplay"), _SCS("has_autoplay") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/paused"), _SCS("set_paused"), _SCS("is_paused") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE,"-80,24,0.01"), _SCS("set_volume_db"), _SCS("get_volume_db") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "autoplay"), _SCS("set_autoplay"), _SCS("has_autoplay") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "paused"), _SCS("set_paused"), _SCS("is_paused") );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "expand" ), _SCS("set_expand"),_SCS("has_expand") );
|
||||
}
|
||||
|
||||
|
|
|
@ -2731,21 +2731,27 @@ void Viewport::_bind_methods() {
|
|||
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"world",PROPERTY_HINT_RESOURCE_TYPE,"World"), _SCS("set_world"), _SCS("get_world") );
|
||||
// ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"world_2d",PROPERTY_HINT_RESOURCE_TYPE,"World2D"), _SCS("set_world_2d"), _SCS("get_world_2d") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"transparent_bg"), _SCS("set_transparent_background"), _SCS("has_transparent_background") );
|
||||
ADD_GROUP("Rendering","");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"msaa",PROPERTY_HINT_ENUM,"Disabled,2x,4x,8x,16x"), _SCS("set_msaa"), _SCS("get_msaa") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"hdr"), _SCS("set_hdr"), _SCS("get_hdr") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"render_target/v_flip"), _SCS("set_vflip"), _SCS("get_vflip") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"render_target/clear_on_new_frame"), _SCS("set_clear_on_new_frame"), _SCS("get_clear_on_new_frame") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"render_target/update_mode",PROPERTY_HINT_ENUM,"Disabled,Once,When Visible,Always"), _SCS("set_update_mode"), _SCS("get_update_mode") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"audio_listener/enable_2d"), _SCS("set_as_audio_listener_2d"), _SCS("is_audio_listener_2d") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"audio_listener/enable_3d"), _SCS("set_as_audio_listener"), _SCS("is_audio_listener") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"physics/object_picking"), _SCS("set_physics_object_picking"), _SCS("get_physics_object_picking") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"gui/disable_input"), _SCS("set_disable_input"), _SCS("is_input_disabled") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"3d/disable_3d"), _SCS("set_disable_3d"), _SCS("is_3d_disabled") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"shadow_atlas/size"), _SCS("set_shadow_atlas_size"), _SCS("get_shadow_atlas_size") );
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"shadow_atlas/quad_0",PROPERTY_HINT_ENUM,"Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), _SCS("set_shadow_atlas_quadrant_subdiv"), _SCS("get_shadow_atlas_quadrant_subdiv"),0 );
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"shadow_atlas/quad_1",PROPERTY_HINT_ENUM,"Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), _SCS("set_shadow_atlas_quadrant_subdiv"), _SCS("get_shadow_atlas_quadrant_subdiv"),1 );
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"shadow_atlas/quad_2",PROPERTY_HINT_ENUM,"Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), _SCS("set_shadow_atlas_quadrant_subdiv"), _SCS("get_shadow_atlas_quadrant_subdiv"),2 );
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"shadow_atlas/quad_3",PROPERTY_HINT_ENUM,"Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), _SCS("set_shadow_atlas_quadrant_subdiv"), _SCS("get_shadow_atlas_quadrant_subdiv"),3 );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"disable_3d"), _SCS("set_disable_3d"), _SCS("is_3d_disabled") );
|
||||
ADD_GROUP("Render Target","render_target_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"render_target_v_flip"), _SCS("set_vflip"), _SCS("get_vflip") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"render_target_clear_on_new_frame"), _SCS("set_clear_on_new_frame"), _SCS("get_clear_on_new_frame") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"render_target_update_mode",PROPERTY_HINT_ENUM,"Disabled,Once,When Visible,Always"), _SCS("set_update_mode"), _SCS("get_update_mode") );
|
||||
ADD_GROUP("Audio Listener","audio_listener_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"audio_listener_enable_2d"), _SCS("set_as_audio_listener_2d"), _SCS("is_audio_listener_2d") );
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"audio_listener_enable_3d"), _SCS("set_as_audio_listener"), _SCS("is_audio_listener") );
|
||||
ADD_GROUP("Physics","physics_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"physics_object_picking"), _SCS("set_physics_object_picking"), _SCS("get_physics_object_picking") );
|
||||
ADD_GROUP("GUI","gui_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"gui_disable_input"), _SCS("set_disable_input"), _SCS("is_input_disabled") );
|
||||
ADD_GROUP("Shadow Atlas","shadow_atlas_");
|
||||
ADD_PROPERTY( PropertyInfo(Variant::INT,"shadow_atlas_size"), _SCS("set_shadow_atlas_size"), _SCS("get_shadow_atlas_size") );
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"shadow_atlas_quad_0",PROPERTY_HINT_ENUM,"Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), _SCS("set_shadow_atlas_quadrant_subdiv"), _SCS("get_shadow_atlas_quadrant_subdiv"),0 );
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"shadow_atlas_quad_1",PROPERTY_HINT_ENUM,"Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), _SCS("set_shadow_atlas_quadrant_subdiv"), _SCS("get_shadow_atlas_quadrant_subdiv"),1 );
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"shadow_atlas_quad_2",PROPERTY_HINT_ENUM,"Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), _SCS("set_shadow_atlas_quadrant_subdiv"), _SCS("get_shadow_atlas_quadrant_subdiv"),2 );
|
||||
ADD_PROPERTYI( PropertyInfo(Variant::INT,"shadow_atlas_quad_3",PROPERTY_HINT_ENUM,"Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), _SCS("set_shadow_atlas_quadrant_subdiv"), _SCS("get_shadow_atlas_quadrant_subdiv"),3 );
|
||||
|
||||
ADD_SIGNAL(MethodInfo("size_changed"));
|
||||
|
||||
|
|
|
@ -899,14 +899,17 @@ void DynamicFont::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("get_fallback_count"),&DynamicFont::get_fallback_count);
|
||||
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"font/size"),_SCS("set_size"),_SCS("get_size"));
|
||||
ADD_PROPERTYINZ(PropertyInfo(Variant::INT,"extra_spacing/top"),_SCS("set_spacing"),_SCS("get_spacing"),SPACING_TOP);
|
||||
ADD_PROPERTYINZ(PropertyInfo(Variant::INT,"extra_spacing/bottom"),_SCS("set_spacing"),_SCS("get_spacing"),SPACING_BOTTOM);
|
||||
ADD_PROPERTYINZ(PropertyInfo(Variant::INT,"extra_spacing/char"),_SCS("set_spacing"),_SCS("get_spacing"),SPACING_CHAR);
|
||||
ADD_PROPERTYINZ(PropertyInfo(Variant::INT,"extra_spacing/space"),_SCS("set_spacing"),_SCS("get_spacing"),SPACING_SPACE);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"font/use_mipmaps"),_SCS("set_use_mipmaps"),_SCS("get_use_mipmaps"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"font/use_filter"),_SCS("set_use_filter"),_SCS("get_use_filter"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"font/font",PROPERTY_HINT_RESOURCE_TYPE,"DynamicFontData"),_SCS("set_font_data"),_SCS("get_font_data"));
|
||||
ADD_GROUP("Settings","");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"size"),_SCS("set_size"),_SCS("get_size"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"use_mipmaps"),_SCS("set_use_mipmaps"),_SCS("get_use_mipmaps"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"use_filter"),_SCS("set_use_filter"),_SCS("get_use_filter"));
|
||||
ADD_GROUP("Extra Spacing","extra_spacing");
|
||||
ADD_PROPERTYINZ(PropertyInfo(Variant::INT,"extra_spacing_top"),_SCS("set_spacing"),_SCS("get_spacing"),SPACING_TOP);
|
||||
ADD_PROPERTYINZ(PropertyInfo(Variant::INT,"extra_spacing_bottom"),_SCS("set_spacing"),_SCS("get_spacing"),SPACING_BOTTOM);
|
||||
ADD_PROPERTYINZ(PropertyInfo(Variant::INT,"extra_spacing_char"),_SCS("set_spacing"),_SCS("get_spacing"),SPACING_CHAR);
|
||||
ADD_PROPERTYINZ(PropertyInfo(Variant::INT,"extra_spacing_space"),_SCS("set_spacing"),_SCS("get_spacing"),SPACING_SPACE);
|
||||
ADD_GROUP("Font","");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"font_data",PROPERTY_HINT_RESOURCE_TYPE,"DynamicFontData"),_SCS("set_font_data"),_SCS("get_font_data"));
|
||||
|
||||
BIND_CONSTANT( SPACING_TOP );
|
||||
BIND_CONSTANT( SPACING_BOTTOM );
|
||||
|
|
|
@ -723,15 +723,17 @@ void Environment::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("get_ambient_light_skybox_contribution"),&Environment::get_ambient_light_skybox_contribution);
|
||||
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"background/mode",PROPERTY_HINT_ENUM,"Clear Color,Custom Color,Skybox,Canvas,Keep"),_SCS("set_background"),_SCS("get_background") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"background/skybox",PROPERTY_HINT_RESOURCE_TYPE,"SkyBox"),_SCS("set_skybox"),_SCS("get_skybox") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"background/skybox_scale",PROPERTY_HINT_RANGE,"0,32,0.01"),_SCS("set_skybox_scale"),_SCS("get_skybox_scale") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"background/color"),_SCS("set_bg_color"),_SCS("get_bg_color") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"background/energy",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_bg_energy"),_SCS("get_bg_energy") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"background/canvas_max_layer",PROPERTY_HINT_RANGE,"-1000,1000,1"),_SCS("set_canvas_max_layer"),_SCS("get_canvas_max_layer") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"ambient_light/color"),_SCS("set_ambient_light_color"),_SCS("get_ambient_light_color") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ambient_light/energy",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_ambient_light_energy"),_SCS("get_ambient_light_energy") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ambient_light/skybox_contribution",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_ambient_light_skybox_contribution"),_SCS("get_ambient_light_skybox_contribution") );
|
||||
ADD_GROUP("Background","background_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"background_mode",PROPERTY_HINT_ENUM,"Clear Color,Custom Color,Skybox,Canvas,Keep"),_SCS("set_background"),_SCS("get_background") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"background_skybox",PROPERTY_HINT_RESOURCE_TYPE,"SkyBox"),_SCS("set_skybox"),_SCS("get_skybox") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"background_skybox_scale",PROPERTY_HINT_RANGE,"0,32,0.01"),_SCS("set_skybox_scale"),_SCS("get_skybox_scale") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"background_color"),_SCS("set_bg_color"),_SCS("get_bg_color") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"background_energy",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_bg_energy"),_SCS("get_bg_energy") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"background_canvas_max_layer",PROPERTY_HINT_RANGE,"-1000,1000,1"),_SCS("set_canvas_max_layer"),_SCS("get_canvas_max_layer") );
|
||||
ADD_GROUP("Ambient Light","ambient_light_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"ambient_light_color"),_SCS("set_ambient_light_color"),_SCS("get_ambient_light_color") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ambient_light_energy",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_ambient_light_energy"),_SCS("get_ambient_light_energy") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ambient_light_skybox_contribution",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_ambient_light_skybox_contribution"),_SCS("get_ambient_light_skybox_contribution") );
|
||||
|
||||
|
||||
ClassDB::bind_method(_MD("set_ssr_enabled","enabled"),&Environment::set_ssr_enabled);
|
||||
|
@ -755,13 +757,14 @@ void Environment::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("set_ssr_rough","rough"),&Environment::set_ssr_rough);
|
||||
ClassDB::bind_method(_MD("is_ssr_rough"),&Environment::is_ssr_rough);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ss_reflections/enabled"),_SCS("set_ssr_enabled"),_SCS("is_ssr_enabled") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"ss_reflections/max_steps",PROPERTY_HINT_RANGE,"1,512,1"),_SCS("set_ssr_max_steps"),_SCS("get_ssr_max_steps") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ss_reflections/accel",PROPERTY_HINT_RANGE,"0,4,0.01"),_SCS("set_ssr_accel"),_SCS("get_ssr_accel") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ss_reflections/fade",PROPERTY_HINT_EXP_EASING),_SCS("set_ssr_fade"),_SCS("get_ssr_fade") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ss_reflections/depth_tolerance",PROPERTY_HINT_RANGE,"0.1,128,0.1"),_SCS("set_ssr_depth_tolerance"),_SCS("get_ssr_depth_tolerance") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ss_reflections/accel_smooth"),_SCS("set_ssr_smooth"),_SCS("is_ssr_smooth") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ss_reflections/roughness"),_SCS("set_ssr_rough"),_SCS("is_ssr_rough") );
|
||||
ADD_GROUP("SS Reflections","ss_reflections_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ss_reflections_enabled"),_SCS("set_ssr_enabled"),_SCS("is_ssr_enabled") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"ss_reflections_max_steps",PROPERTY_HINT_RANGE,"1,512,1"),_SCS("set_ssr_max_steps"),_SCS("get_ssr_max_steps") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ss_reflections_accel",PROPERTY_HINT_RANGE,"0,4,0.01"),_SCS("set_ssr_accel"),_SCS("get_ssr_accel") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ss_reflections_fade",PROPERTY_HINT_EXP_EASING),_SCS("set_ssr_fade"),_SCS("get_ssr_fade") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ss_reflections_depth_tolerance",PROPERTY_HINT_RANGE,"0.1,128,0.1"),_SCS("set_ssr_depth_tolerance"),_SCS("get_ssr_depth_tolerance") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ss_reflections_accel_smooth"),_SCS("set_ssr_smooth"),_SCS("is_ssr_smooth") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ss_reflections_roughness"),_SCS("set_ssr_rough"),_SCS("is_ssr_rough") );
|
||||
|
||||
ClassDB::bind_method(_MD("set_ssao_enabled","enabled"),&Environment::set_ssao_enabled);
|
||||
ClassDB::bind_method(_MD("is_ssao_enabled"),&Environment::is_ssao_enabled);
|
||||
|
@ -790,15 +793,16 @@ void Environment::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("set_ssao_blur","enabled"),&Environment::set_ssao_blur);
|
||||
ClassDB::bind_method(_MD("is_ssao_blur_enabled"),&Environment::is_ssao_blur_enabled);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ambient_occlusion/enabled"),_SCS("set_ssao_enabled"),_SCS("is_ssao_enabled") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ambient_occlusion/radius",PROPERTY_HINT_RANGE,"0.1,16,0.1"),_SCS("set_ssao_radius"),_SCS("get_ssao_radius") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ambient_occlusion/intensity",PROPERTY_HINT_RANGE,"0.0,9,0.1"),_SCS("set_ssao_intensity"),_SCS("get_ssao_intensity") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ambient_occlusion/radius2",PROPERTY_HINT_RANGE,"0.0,16,0.1"),_SCS("set_ssao_radius2"),_SCS("get_ssao_radius2") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ambient_occlusion/intensity2",PROPERTY_HINT_RANGE,"0.0,9,0.1"),_SCS("set_ssao_intensity2"),_SCS("get_ssao_intensity2") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ambient_occlusion/bias",PROPERTY_HINT_RANGE,"0.001,8,0.001"),_SCS("set_ssao_bias"),_SCS("get_ssao_bias") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ambient_occlusion/light_affect",PROPERTY_HINT_RANGE,"0.00,1,0.01"),_SCS("set_ssao_direct_light_affect"),_SCS("get_ssao_direct_light_affect") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"ambient_occlusion/color",PROPERTY_HINT_COLOR_NO_ALPHA),_SCS("set_ssao_color"),_SCS("get_ssao_color") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ambient_occlusion/blur"),_SCS("set_ssao_blur"),_SCS("is_ssao_blur_enabled") );
|
||||
ADD_GROUP("SSAO","ssao_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ssao_enabled"),_SCS("set_ssao_enabled"),_SCS("is_ssao_enabled") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ssao_radius",PROPERTY_HINT_RANGE,"0.1,16,0.1"),_SCS("set_ssao_radius"),_SCS("get_ssao_radius") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ssao_intensity",PROPERTY_HINT_RANGE,"0.0,9,0.1"),_SCS("set_ssao_intensity"),_SCS("get_ssao_intensity") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ssao_radius2",PROPERTY_HINT_RANGE,"0.0,16,0.1"),_SCS("set_ssao_radius2"),_SCS("get_ssao_radius2") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ssao_intensity2",PROPERTY_HINT_RANGE,"0.0,9,0.1"),_SCS("set_ssao_intensity2"),_SCS("get_ssao_intensity2") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ssao_bias",PROPERTY_HINT_RANGE,"0.001,8,0.001"),_SCS("set_ssao_bias"),_SCS("get_ssao_bias") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ssao_light_affect",PROPERTY_HINT_RANGE,"0.00,1,0.01"),_SCS("set_ssao_direct_light_affect"),_SCS("get_ssao_direct_light_affect") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"ssao_color",PROPERTY_HINT_COLOR_NO_ALPHA),_SCS("set_ssao_color"),_SCS("get_ssao_color") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ssao_blur"),_SCS("set_ssao_blur"),_SCS("is_ssao_blur_enabled") );
|
||||
|
||||
ClassDB::bind_method(_MD("set_dof_blur_far_enabled","enabled"),&Environment::set_dof_blur_far_enabled);
|
||||
ClassDB::bind_method(_MD("is_dof_blur_far_enabled"),&Environment::is_dof_blur_far_enabled);
|
||||
|
@ -830,17 +834,19 @@ void Environment::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("set_dof_blur_near_quality","level"),&Environment::set_dof_blur_near_quality);
|
||||
ClassDB::bind_method(_MD("get_dof_blur_near_quality"),&Environment::get_dof_blur_near_quality);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"dof_blur_far/enabled"),_SCS("set_dof_blur_far_enabled"),_SCS("is_dof_blur_far_enabled") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"dof_blur_far/distance",PROPERTY_HINT_EXP_RANGE,"0.01,8192,0.01"),_SCS("set_dof_blur_far_distance"),_SCS("get_dof_blur_far_distance") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"dof_blur_far/transition",PROPERTY_HINT_EXP_RANGE,"0.01,8192,0.01"),_SCS("set_dof_blur_far_transition"),_SCS("get_dof_blur_far_transition") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"dof_blur_far/amount",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_dof_blur_far_amount"),_SCS("get_dof_blur_far_amount") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"dof_blur_far/quality",PROPERTY_HINT_ENUM,"Low,Medium,High"),_SCS("set_dof_blur_far_quality"),_SCS("get_dof_blur_far_quality") );
|
||||
ADD_GROUP("DOF Far Blur","dof_blur_far_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"dof_blur_far_enabled"),_SCS("set_dof_blur_far_enabled"),_SCS("is_dof_blur_far_enabled") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"dof_blur_far_distance",PROPERTY_HINT_EXP_RANGE,"0.01,8192,0.01"),_SCS("set_dof_blur_far_distance"),_SCS("get_dof_blur_far_distance") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"dof_blur_far_transition",PROPERTY_HINT_EXP_RANGE,"0.01,8192,0.01"),_SCS("set_dof_blur_far_transition"),_SCS("get_dof_blur_far_transition") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"dof_blur_far_amount",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_dof_blur_far_amount"),_SCS("get_dof_blur_far_amount") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"dof_blur_far_quality",PROPERTY_HINT_ENUM,"Low,Medium,High"),_SCS("set_dof_blur_far_quality"),_SCS("get_dof_blur_far_quality") );
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"dof_blur_near/enabled"),_SCS("set_dof_blur_near_enabled"),_SCS("is_dof_blur_near_enabled") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"dof_blur_near/distance",PROPERTY_HINT_EXP_RANGE,"0.01,8192,0.01"),_SCS("set_dof_blur_near_distance"),_SCS("get_dof_blur_near_distance") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"dof_blur_near/transition",PROPERTY_HINT_EXP_RANGE,"0.01,8192,0.01"),_SCS("set_dof_blur_near_transition"),_SCS("get_dof_blur_near_transition") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"dof_blur_near/amount",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_dof_blur_near_amount"),_SCS("get_dof_blur_near_amount") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"dof_blur_near/quality",PROPERTY_HINT_ENUM,"Low,Medium,High"),_SCS("set_dof_blur_near_quality"),_SCS("get_dof_blur_near_quality") );
|
||||
ADD_GROUP("DOF Far Near","dof_blur_near_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"dof_blur_near_enabled"),_SCS("set_dof_blur_near_enabled"),_SCS("is_dof_blur_near_enabled") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"dof_blur_near_distance",PROPERTY_HINT_EXP_RANGE,"0.01,8192,0.01"),_SCS("set_dof_blur_near_distance"),_SCS("get_dof_blur_near_distance") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"dof_blur_near_transition",PROPERTY_HINT_EXP_RANGE,"0.01,8192,0.01"),_SCS("set_dof_blur_near_transition"),_SCS("get_dof_blur_near_transition") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"dof_blur_near_amount",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_dof_blur_near_amount"),_SCS("get_dof_blur_near_amount") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"dof_blur_near_quality",PROPERTY_HINT_ENUM,"Low,Medium,High"),_SCS("set_dof_blur_near_quality"),_SCS("get_dof_blur_near_quality") );
|
||||
|
||||
|
||||
ClassDB::bind_method(_MD("set_glow_enabled","enabled"),&Environment::set_glow_enabled);
|
||||
|
@ -870,22 +876,23 @@ void Environment::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("set_glow_bicubic_upscale","enabled"),&Environment::set_glow_bicubic_upscale);
|
||||
ClassDB::bind_method(_MD("is_glow_bicubic_upscale_enabled"),&Environment::is_glow_bicubic_upscale_enabled);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"glow/enabled"),_SCS("set_glow_enabled"),_SCS("is_glow_enabled") );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow/levels/1"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),0 );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow/levels/2"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),1 );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow/levels/3"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),2 );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow/levels/4"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),3 );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow/levels/5"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),4 );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow/levels/6"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),5 );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow/levels/7"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),6 );
|
||||
ADD_GROUP("Glow","glow_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"glow_enabled"),_SCS("set_glow_enabled"),_SCS("is_glow_enabled") );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow_levels/1"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),0 );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow_levels/2"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),1 );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow_levels/3"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),2 );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow_levels/4"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),3 );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow_levels/5"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),4 );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow_levels/6"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),5 );
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow_levels/7"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),6 );
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"glow/intensity",PROPERTY_HINT_RANGE,"0.0,8.0,0.01"),_SCS("set_glow_intensity"),_SCS("get_glow_intensity") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"glow/strength",PROPERTY_HINT_RANGE,"0.0,2.0,0.01"),_SCS("set_glow_strength"),_SCS("get_glow_strength") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"glow/bloom",PROPERTY_HINT_RANGE,"0.0,1.0,0.01"),_SCS("set_glow_bloom"),_SCS("get_glow_bloom") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"glow/blend_mode",PROPERTY_HINT_ENUM,"Additive,Screen,Softlight,Replace"),_SCS("set_glow_blend_mode"),_SCS("get_glow_blend_mode") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"glow/hdr_treshold",PROPERTY_HINT_RANGE,"0.0,4.0,0.01"),_SCS("set_glow_hdr_bleed_treshold"),_SCS("get_glow_hdr_bleed_treshold") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"glow/hdr_scale",PROPERTY_HINT_RANGE,"0.0,4.0,0.01"),_SCS("set_glow_hdr_bleed_scale"),_SCS("get_glow_hdr_bleed_scale") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"glow/bicubic_upscale"),_SCS("set_glow_bicubic_upscale"),_SCS("is_glow_bicubic_upscale_enabled") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"glow_intensity",PROPERTY_HINT_RANGE,"0.0,8.0,0.01"),_SCS("set_glow_intensity"),_SCS("get_glow_intensity") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"glow_strength",PROPERTY_HINT_RANGE,"0.0,2.0,0.01"),_SCS("set_glow_strength"),_SCS("get_glow_strength") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"glow_bloom",PROPERTY_HINT_RANGE,"0.0,1.0,0.01"),_SCS("set_glow_bloom"),_SCS("get_glow_bloom") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"glow_blend_mode",PROPERTY_HINT_ENUM,"Additive,Screen,Softlight,Replace"),_SCS("set_glow_blend_mode"),_SCS("get_glow_blend_mode") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"glow_hdr_treshold",PROPERTY_HINT_RANGE,"0.0,4.0,0.01"),_SCS("set_glow_hdr_bleed_treshold"),_SCS("get_glow_hdr_bleed_treshold") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"glow_hdr_scale",PROPERTY_HINT_RANGE,"0.0,4.0,0.01"),_SCS("set_glow_hdr_bleed_scale"),_SCS("get_glow_hdr_bleed_scale") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"glow_bicubic_upscale"),_SCS("set_glow_bicubic_upscale"),_SCS("is_glow_bicubic_upscale_enabled") );
|
||||
|
||||
|
||||
ClassDB::bind_method(_MD("set_tonemapper","mode"),&Environment::set_tonemapper);
|
||||
|
@ -913,14 +920,16 @@ void Environment::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("get_tonemap_auto_exposure_grey"),&Environment::get_tonemap_auto_exposure_grey);
|
||||
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"tonemap/mode",PROPERTY_HINT_ENUM,"Linear,Reindhart,Filmic,Aces"),_SCS("set_tonemapper"),_SCS("get_tonemapper") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"tonemap/exposure",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_tonemap_exposure"),_SCS("get_tonemap_exposure") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"tonemap/white",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_tonemap_white"),_SCS("get_tonemap_white") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"auto_exposure/enabled"),_SCS("set_tonemap_auto_exposure"),_SCS("get_tonemap_auto_exposure") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"auto_exposure/scale",PROPERTY_HINT_RANGE,"0.01,64,0.01"),_SCS("set_tonemap_auto_exposure_grey"),_SCS("get_tonemap_auto_exposure_grey") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"auto_exposure/min_luma",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_tonemap_auto_exposure_min"),_SCS("get_tonemap_auto_exposure_min") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"auto_exposure/max_luma",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_tonemap_auto_exposure_max"),_SCS("get_tonemap_auto_exposure_max") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"auto_exposure/speed",PROPERTY_HINT_RANGE,"0.01,64,0.01"),_SCS("set_tonemap_auto_exposure_speed"),_SCS("get_tonemap_auto_exposure_speed") );
|
||||
ADD_GROUP("Tonemap","tonemap_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"tonemap_mode",PROPERTY_HINT_ENUM,"Linear,Reindhart,Filmic,Aces"),_SCS("set_tonemapper"),_SCS("get_tonemapper") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"tonemap_exposure",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_tonemap_exposure"),_SCS("get_tonemap_exposure") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"tonemap_white",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_tonemap_white"),_SCS("get_tonemap_white") );
|
||||
ADD_GROUP("Auto Exposure","auto_exposure_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"auto_expoure_enabled"),_SCS("set_tonemap_auto_exposure"),_SCS("get_tonemap_auto_exposure") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"auto_expoure_scale",PROPERTY_HINT_RANGE,"0.01,64,0.01"),_SCS("set_tonemap_auto_exposure_grey"),_SCS("get_tonemap_auto_exposure_grey") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"auto_expoure_min_luma",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_tonemap_auto_exposure_min"),_SCS("get_tonemap_auto_exposure_min") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"auto_expoure_max_luma",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_tonemap_auto_exposure_max"),_SCS("get_tonemap_auto_exposure_max") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"auto_expoure_speed",PROPERTY_HINT_RANGE,"0.01,64,0.01"),_SCS("set_tonemap_auto_exposure_speed"),_SCS("get_tonemap_auto_exposure_speed") );
|
||||
|
||||
ClassDB::bind_method(_MD("set_adjustment_enable","enabled"),&Environment::set_adjustment_enable);
|
||||
ClassDB::bind_method(_MD("is_adjustment_enabled"),&Environment::is_adjustment_enabled);
|
||||
|
@ -937,11 +946,12 @@ void Environment::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("set_adjustment_color_correction","color_correction"),&Environment::set_adjustment_color_correction);
|
||||
ClassDB::bind_method(_MD("get_adjustment_color_correction"),&Environment::get_adjustment_color_correction);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"adjustment/enabled"),_SCS("set_adjustment_enable"),_SCS("is_adjustment_enabled") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"adjustment/brightness",PROPERTY_HINT_RANGE,"0.01,8,0.01"),_SCS("set_adjustment_brightness"),_SCS("get_adjustment_brightness") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"adjustment/contrast",PROPERTY_HINT_RANGE,"0.01,8,0.01"),_SCS("set_adjustment_contrast"),_SCS("get_adjustment_contrast") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"adjustment/saturation",PROPERTY_HINT_RANGE,"0.01,8,0.01"),_SCS("set_adjustment_saturation"),_SCS("get_adjustment_saturation") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"adjustment/color_correction",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_adjustment_color_correction"),_SCS("get_adjustment_color_correction") );
|
||||
ADD_GROUP("Adjustments","adjustment_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"adjustment_enabled"),_SCS("set_adjustment_enable"),_SCS("is_adjustment_enabled") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"adjustment_brightness",PROPERTY_HINT_RANGE,"0.01,8,0.01"),_SCS("set_adjustment_brightness"),_SCS("get_adjustment_brightness") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"adjustment_contrast",PROPERTY_HINT_RANGE,"0.01,8,0.01"),_SCS("set_adjustment_contrast"),_SCS("get_adjustment_contrast") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"adjustment_saturation",PROPERTY_HINT_RANGE,"0.01,8,0.01"),_SCS("set_adjustment_saturation"),_SCS("get_adjustment_saturation") );
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"adjustment_color_correction",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_adjustment_color_correction"),_SCS("get_adjustment_color_correction") );
|
||||
|
||||
|
||||
GLOBAL_DEF("rendering/skybox/irradiance_cube_resolution",256);
|
||||
|
|
|
@ -927,79 +927,97 @@ void FixedSpatialMaterial::_bind_methods() {
|
|||
ClassDB::bind_method(_MD("set_uv2_offset","offset"),&FixedSpatialMaterial::set_uv2_offset);
|
||||
ClassDB::bind_method(_MD("get_uv2_offset"),&FixedSpatialMaterial::get_uv2_offset);
|
||||
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"flags/transparent"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_TRANSPARENT);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"flags/unshaded"),_SCS("set_flag"),_SCS("get_flag"),FLAG_UNSHADED);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"flags/on_top"),_SCS("set_flag"),_SCS("get_flag"),FLAG_ONTOP);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"flags/use_point_size"),_SCS("set_flag"),_SCS("get_flag"),FLAG_USE_POINT_SIZE);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"vertex_color/use_as_albedo"),_SCS("set_flag"),_SCS("get_flag"),FLAG_ALBEDO_FROM_VERTEX_COLOR);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"vertex_color/is_srgb"),_SCS("set_flag"),_SCS("get_flag"),FLAG_SRGB_VERTEX_COLOR);
|
||||
ADD_GROUP("Flags","flags_");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"flags_transparent"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_TRANSPARENT);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"flags_unshaded"),_SCS("set_flag"),_SCS("get_flag"),FLAG_UNSHADED);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"flags_on_top"),_SCS("set_flag"),_SCS("get_flag"),FLAG_ONTOP);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"flags_use_point_size"),_SCS("set_flag"),_SCS("get_flag"),FLAG_USE_POINT_SIZE);
|
||||
ADD_GROUP("Vertex Color","vertex_color");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"vertex_color_use_as_albedo"),_SCS("set_flag"),_SCS("get_flag"),FLAG_ALBEDO_FROM_VERTEX_COLOR);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"vertex_color_is_srgb"),_SCS("set_flag"),_SCS("get_flag"),FLAG_SRGB_VERTEX_COLOR);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"params/diffuse_mode",PROPERTY_HINT_ENUM,"Labert,Lambert Wrap,Oren Nayar,Burley"),_SCS("set_diffuse_mode"),_SCS("get_diffuse_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"params/blend_mode",PROPERTY_HINT_ENUM,"Mix,Add,Sub,Mul"),_SCS("set_blend_mode"),_SCS("get_blend_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"params/cull_mode",PROPERTY_HINT_ENUM,"Back,Front,Disabled"),_SCS("set_cull_mode"),_SCS("get_cull_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"params/depth_draw_mode",PROPERTY_HINT_ENUM,"Opaque Only,Always,Never,Opaque Pre-Pass"),_SCS("set_depth_draw_mode"),_SCS("get_depth_draw_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"params/line_width",PROPERTY_HINT_RANGE,"0.1,128,0.1"),_SCS("set_line_width"),_SCS("get_line_width"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"params/point_size",PROPERTY_HINT_RANGE,"0.1,128,0.1"),_SCS("set_point_size"),_SCS("get_point_size"));
|
||||
ADD_GROUP("Parameters","params_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"params_diffuse_mode",PROPERTY_HINT_ENUM,"Labert,Lambert Wrap,Oren Nayar,Burley"),_SCS("set_diffuse_mode"),_SCS("get_diffuse_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"params_blend_mode",PROPERTY_HINT_ENUM,"Mix,Add,Sub,Mul"),_SCS("set_blend_mode"),_SCS("get_blend_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"params_cull_mode",PROPERTY_HINT_ENUM,"Back,Front,Disabled"),_SCS("set_cull_mode"),_SCS("get_cull_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"params_depth_draw_mode",PROPERTY_HINT_ENUM,"Opaque Only,Always,Never,Opaque Pre-Pass"),_SCS("set_depth_draw_mode"),_SCS("get_depth_draw_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"params_line_width",PROPERTY_HINT_RANGE,"0.1,128,0.1"),_SCS("set_line_width"),_SCS("get_line_width"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"params_point_size",PROPERTY_HINT_RANGE,"0.1,128,0.1"),_SCS("set_point_size"),_SCS("get_point_size"));
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"albedo/color"),_SCS("set_albedo"),_SCS("get_albedo"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"albedo/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_ALBEDO);
|
||||
ADD_GROUP("Albedo","albedo_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"albedo_color"),_SCS("set_albedo"),_SCS("get_albedo"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"albedo_texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_ALBEDO);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"specular/mode",PROPERTY_HINT_ENUM,"Metallic,Specular"),_SCS("set_specular_mode"),_SCS("get_specular_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"specular/color",PROPERTY_HINT_COLOR_NO_ALPHA),_SCS("set_specular"),_SCS("get_specular"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"specular/metalness",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_metalness"),_SCS("get_metalness"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"specular/roughness",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_roughness"),_SCS("get_roughness"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"specular/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_SPECULAR);
|
||||
ADD_GROUP("Specular","specular_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"specular_mode",PROPERTY_HINT_ENUM,"Metallic,Specular"),_SCS("set_specular_mode"),_SCS("get_specular_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"specular_color",PROPERTY_HINT_COLOR_NO_ALPHA),_SCS("set_specular"),_SCS("get_specular"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"specular_metalness",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_metalness"),_SCS("get_metalness"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"specular_roughness",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_roughness"),_SCS("get_roughness"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"specular_texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_SPECULAR);
|
||||
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"emission/enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_EMISSION);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"emission/color",PROPERTY_HINT_COLOR_NO_ALPHA),_SCS("set_emission"),_SCS("get_emission"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"emission/energy",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_emission_energy"),_SCS("get_emission_energy"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"emission/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_EMISSION);
|
||||
ADD_GROUP("Emission","emission_");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"emission_enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_EMISSION);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"emission_color",PROPERTY_HINT_COLOR_NO_ALPHA),_SCS("set_emission"),_SCS("get_emission"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"emission_energy",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_emission_energy"),_SCS("get_emission_energy"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"emission_texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_EMISSION);
|
||||
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"normal/enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_NORMAL_MAPPING);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"normal/scale",PROPERTY_HINT_RANGE,"-16,16,0.01"),_SCS("set_normal_scale"),_SCS("get_normal_scale"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"normal/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_NORMAL);
|
||||
ADD_GROUP("NormapMap","normal_");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"normal_enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_NORMAL_MAPPING);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"normal_scale",PROPERTY_HINT_RANGE,"-16,16,0.01"),_SCS("set_normal_scale"),_SCS("get_normal_scale"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"normal_texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_NORMAL);
|
||||
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"rim/enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_RIM);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"rim/amount",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_rim"),_SCS("get_rim"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"rim/tint",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_rim_tint"),_SCS("get_rim_tint"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"rim/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_RIM);
|
||||
ADD_GROUP("Rim","rim_");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"rim_enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_RIM);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"rim_amount",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_rim"),_SCS("get_rim"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"rim_tint",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_rim_tint"),_SCS("get_rim_tint"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"rim_texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_RIM);
|
||||
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"clearcoat/enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_CLEARCOAT);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"clearcoat/amount",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_clearcoat"),_SCS("get_clearcoat"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"clearcoat/gloss",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_clearcoat_gloss"),_SCS("get_clearcoat_gloss"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"clearcoat/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_CLEARCOAT);
|
||||
ADD_GROUP("Clearcoat","clearcoat_");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"clearcoat_enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_CLEARCOAT);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"clearcoat_amount",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_clearcoat"),_SCS("get_clearcoat"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"clearcoat_gloss",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_clearcoat_gloss"),_SCS("get_clearcoat_gloss"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"clearcoat_texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_CLEARCOAT);
|
||||
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"anisotropy/enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_ANISOTROPY);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"anisotropy/anisotropy",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_anisotropy"),_SCS("get_anisotropy"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"anisotropy/flowmap",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_FLOWMAP);
|
||||
ADD_GROUP("Anisotropy","anisotropy_");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"anisotropy_enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_ANISOTROPY);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"anisotropy_anisotropy",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_anisotropy"),_SCS("get_anisotropy"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"anisotropy_flowmap",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_FLOWMAP);
|
||||
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"ao/enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_AMBIENT_OCCLUSION);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"ao/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_AMBIENT_OCCLUSION);
|
||||
ADD_GROUP("Ambient Occlusion","ao_");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"ao_enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_AMBIENT_OCCLUSION);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"ao_texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_AMBIENT_OCCLUSION);
|
||||
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"height/enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_HEIGHT_MAPPING);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"height/scale",PROPERTY_HINT_RANGE,"-16,16,0.01"),_SCS("set_height_scale"),_SCS("get_height_scale"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"height/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_HEIGHT);
|
||||
ADD_GROUP("Height","height_");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"height_enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_HEIGHT_MAPPING);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"height_scale",PROPERTY_HINT_RANGE,"-16,16,0.01"),_SCS("set_height_scale"),_SCS("get_height_scale"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"height_texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_HEIGHT);
|
||||
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"subsurf_scatter/enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_SUBSURACE_SCATTERING);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"subsurf_scatter/strength",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_subsurface_scattering_strength"),_SCS("get_subsurface_scattering_strength"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"subsurf_scatter/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_SUBSURFACE_SCATTERING);
|
||||
ADD_GROUP("Subsurf Scatter","subsurf_scatter_");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"subsurf_scatter_enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_SUBSURACE_SCATTERING);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"subsurf_scatter_strength",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_subsurface_scattering_strength"),_SCS("get_subsurface_scattering_strength"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"subsurf_scatter_texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_SUBSURFACE_SCATTERING);
|
||||
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"refraction/enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_REFRACTION);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"refraction/displacement",PROPERTY_HINT_RANGE,"-1,1,0.01"),_SCS("set_refraction"),_SCS("get_refraction"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"refraction/roughness",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_refraction_roughness"),_SCS("get_refraction_roughness"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"refraction/texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_REFRACTION);
|
||||
ADD_GROUP("Refraction","refraction_");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"refraction_enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_REFRACTION);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"refraction_displacement",PROPERTY_HINT_RANGE,"-1,1,0.01"),_SCS("set_refraction"),_SCS("get_refraction"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL,"refraction_roughness",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_refraction_roughness"),_SCS("get_refraction_roughness"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"refraction_texture",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_REFRACTION);
|
||||
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"detail/enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_DETAIL);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"detail/mask",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_DETAIL_MASK);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"detail/blend_mode",PROPERTY_HINT_ENUM,"Mix,Add,Sub,Mul"),_SCS("set_detail_blend_mode"),_SCS("get_detail_blend_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"detail/uv_layer",PROPERTY_HINT_ENUM,"UV1,UV2"),_SCS("set_detail_uv"),_SCS("get_detail_uv"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"detail/albedo",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_DETAIL_ALBEDO);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"detail/normal",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_DETAIL_NORMAL);
|
||||
ADD_GROUP("Detail","detail_");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"detail_enabled"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_DETAIL);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"detail_mask",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_DETAIL_MASK);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"detail_blend_mode",PROPERTY_HINT_ENUM,"Mix,Add,Sub,Mul"),_SCS("set_detail_blend_mode"),_SCS("get_detail_blend_mode"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT,"detail_uv_layer",PROPERTY_HINT_ENUM,"UV1,UV2"),_SCS("set_detail_uv"),_SCS("get_detail_uv"));
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"detail_albedo",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_DETAIL_ALBEDO);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT,"detail_normal",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"),TEXTURE_DETAIL_NORMAL);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"uv1/scale"),_SCS("set_uv1_scale"),_SCS("get_uv1_scale"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"uv1/offset"),_SCS("set_uv1_offset"),_SCS("get_uv1_offset"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"uv2/scale"),_SCS("set_uv2_scale"),_SCS("get_uv2_scale"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"uv2/offset"),_SCS("set_uv2_offset"),_SCS("get_uv2_offset"));
|
||||
ADD_GROUP("UV1","uv1_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"uv1_scale"),_SCS("set_uv1_scale"),_SCS("get_uv1_scale"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"uv1_offset"),_SCS("set_uv1_offset"),_SCS("get_uv1_offset"));
|
||||
|
||||
ADD_GROUP("UV2","uv2_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"uv2_scale"),_SCS("set_uv2_scale"),_SCS("get_uv2_scale"));
|
||||
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"uv2_offset"),_SCS("set_uv2_offset"),_SCS("get_uv2_offset"));
|
||||
|
||||
|
||||
BIND_CONSTANT( TEXTURE_ALBEDO );
|
||||
|
|
|
@ -126,12 +126,13 @@ void ImageSkyBox::_bind_methods() {
|
|||
hints+="*."+E->get();
|
||||
}
|
||||
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::STRING,"image_path/negative_x",PROPERTY_HINT_FILE,hints),_SCS("set_image_path"),_SCS("get_image_path"),IMAGE_PATH_NEGATIVE_X);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::STRING,"image_path/positive_x",PROPERTY_HINT_FILE,hints),_SCS("set_image_path"),_SCS("get_image_path"),IMAGE_PATH_POSITIVE_X);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::STRING,"image_path/negative_y",PROPERTY_HINT_FILE,hints),_SCS("set_image_path"),_SCS("get_image_path"),IMAGE_PATH_NEGATIVE_Y);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::STRING,"image_path/positive_y",PROPERTY_HINT_FILE,hints),_SCS("set_image_path"),_SCS("get_image_path"),IMAGE_PATH_POSITIVE_Y);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::STRING,"image_path/negative_z",PROPERTY_HINT_FILE,hints),_SCS("set_image_path"),_SCS("get_image_path"),IMAGE_PATH_NEGATIVE_Z);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::STRING,"image_path/positive_z",PROPERTY_HINT_FILE,hints),_SCS("set_image_path"),_SCS("get_image_path"),IMAGE_PATH_POSITIVE_Z);
|
||||
ADD_GROUP("Image Path","image_path_");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::STRING,"image_path_negative_x",PROPERTY_HINT_FILE,hints),_SCS("set_image_path"),_SCS("get_image_path"),IMAGE_PATH_NEGATIVE_X);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::STRING,"image_path_positive_x",PROPERTY_HINT_FILE,hints),_SCS("set_image_path"),_SCS("get_image_path"),IMAGE_PATH_POSITIVE_X);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::STRING,"image_path_negative_y",PROPERTY_HINT_FILE,hints),_SCS("set_image_path"),_SCS("get_image_path"),IMAGE_PATH_NEGATIVE_Y);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::STRING,"image_path_positive_y",PROPERTY_HINT_FILE,hints),_SCS("set_image_path"),_SCS("get_image_path"),IMAGE_PATH_POSITIVE_Y);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::STRING,"image_path_negative_z",PROPERTY_HINT_FILE,hints),_SCS("set_image_path"),_SCS("get_image_path"),IMAGE_PATH_NEGATIVE_Z);
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::STRING,"image_path_positive_z",PROPERTY_HINT_FILE,hints),_SCS("set_image_path"),_SCS("get_image_path"),IMAGE_PATH_POSITIVE_Z);
|
||||
|
||||
BIND_CONSTANT( IMAGE_PATH_NEGATIVE_X );
|
||||
BIND_CONSTANT( IMAGE_PATH_POSITIVE_X );
|
||||
|
|
|
@ -85,10 +85,11 @@ void StyleBox::_bind_methods() {
|
|||
|
||||
ClassDB::bind_method(_MD("draw","canvas_item","rect"),&StyleBox::draw);
|
||||
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "content_margin/left", PROPERTY_HINT_RANGE,"-1,2048,1" ), _SCS("set_default_margin"),_SCS("get_default_margin"), MARGIN_LEFT );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "content_margin/right", PROPERTY_HINT_RANGE,"-1,2048,1" ), _SCS("set_default_margin"),_SCS("get_default_margin"), MARGIN_RIGHT );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "content_margin/top", PROPERTY_HINT_RANGE,"-1,2048,1" ), _SCS("set_default_margin"),_SCS("get_default_margin"), MARGIN_TOP);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "content_margin/bottom", PROPERTY_HINT_RANGE,"-1,2048,1" ), _SCS("set_default_margin"),_SCS("get_default_margin"), MARGIN_BOTTOM );
|
||||
ADD_GROUP("Content Margin","content_margin_");
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "content_margin_left", PROPERTY_HINT_RANGE,"-1,2048,1" ), _SCS("set_default_margin"),_SCS("get_default_margin"), MARGIN_LEFT );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "content_margin_right", PROPERTY_HINT_RANGE,"-1,2048,1" ), _SCS("set_default_margin"),_SCS("get_default_margin"), MARGIN_RIGHT );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "content_margin_top", PROPERTY_HINT_RANGE,"-1,2048,1" ), _SCS("set_default_margin"),_SCS("get_default_margin"), MARGIN_TOP);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "content_margin_bottom", PROPERTY_HINT_RANGE,"-1,2048,1" ), _SCS("set_default_margin"),_SCS("get_default_margin"), MARGIN_BOTTOM );
|
||||
|
||||
|
||||
}
|
||||
|
@ -231,15 +232,18 @@ void StyleBoxTexture::_bind_methods() {
|
|||
|
||||
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture" ), _SCS("set_texture"),_SCS("get_texture") );
|
||||
ADD_PROPERTYNZ( PropertyInfo( Variant::RECT2, "region_rect"), _SCS("set_region_rect"),_SCS("get_region_rect"));
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin/left", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_LEFT );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin/right", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_RIGHT );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin/top", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_TOP);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin/bottom", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_BOTTOM );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin/left", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_LEFT );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin/right", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_RIGHT );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin/top", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_TOP );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin/bottom", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_BOTTOM );
|
||||
ADD_PROPERTY( PropertyInfo( Variant::COLOR, "modulate/color" ), _SCS("set_modulate"),_SCS("get_modulate"));
|
||||
ADD_GROUP("Margin","margin_");
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin_left", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_LEFT );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin_right", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_RIGHT );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin_top", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_TOP);
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin_bottom", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_BOTTOM );
|
||||
ADD_GROUP("Expand Margin","expand_margin_");
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin_left", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_LEFT );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin_right", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_RIGHT );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin_top", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_TOP );
|
||||
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin_bottom", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_BOTTOM );
|
||||
ADD_GROUP("Modulate","modulate_");
|
||||
ADD_PROPERTY( PropertyInfo( Variant::COLOR, "modulate_color" ), _SCS("set_modulate"),_SCS("get_modulate"));
|
||||
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "draw_center" ) , _SCS("set_draw_center"),_SCS("get_draw_center"));
|
||||
|
||||
}
|
||||
|
|
|
@ -105,6 +105,7 @@ public:
|
|||
bool billboard :8;
|
||||
bool billboard_y :8;
|
||||
bool receive_shadows : 8;
|
||||
bool visible : 8;
|
||||
|
||||
float depth; //used for sorting
|
||||
|
||||
|
@ -124,10 +125,12 @@ public:
|
|||
depth_scale=false;
|
||||
billboard=false;
|
||||
billboard_y=false;
|
||||
visible=true;
|
||||
depth_layer=0;
|
||||
layer_mask=1;
|
||||
baked_light=NULL;
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -978,6 +978,8 @@ public:
|
|||
BIND2(instance_attach_object_instance_ID,RID,ObjectID )
|
||||
BIND3(instance_set_morph_target_weight,RID,int , float )
|
||||
BIND3(instance_set_surface_material,RID,int , RID )
|
||||
BIND2(instance_set_visible,RID ,bool)
|
||||
|
||||
|
||||
BIND2(instance_attach_skeleton,RID,RID )
|
||||
BIND2(instance_set_exterior, RID, bool )
|
||||
|
|
|
@ -866,6 +866,41 @@ void VisualServerScene::instance_set_surface_material(RID p_instance,int p_surfa
|
|||
|
||||
}
|
||||
|
||||
void VisualServerScene::instance_set_visible(RID p_instance,bool p_visible) {
|
||||
|
||||
Instance *instance = instance_owner.get( p_instance );
|
||||
ERR_FAIL_COND( !instance );
|
||||
|
||||
if (instance->visible==p_visible)
|
||||
return;
|
||||
|
||||
instance->visible=p_visible;
|
||||
|
||||
|
||||
switch(instance->base_type) {
|
||||
case VS::INSTANCE_LIGHT: {
|
||||
if (VSG::storage->light_get_type(instance->base)!=VS::LIGHT_DIRECTIONAL && instance->octree_id && instance->scenario) {
|
||||
instance->scenario->octree.set_pairable(instance->octree_id,p_visible,1<<VS::INSTANCE_LIGHT,p_visible?VS::INSTANCE_GEOMETRY_MASK:0);
|
||||
}
|
||||
|
||||
} break;
|
||||
case VS::INSTANCE_REFLECTION_PROBE: {
|
||||
if (instance->octree_id && instance->scenario) {
|
||||
instance->scenario->octree.set_pairable(instance->octree_id,p_visible,1<<VS::INSTANCE_REFLECTION_PROBE,p_visible?VS::INSTANCE_GEOMETRY_MASK:0);
|
||||
}
|
||||
|
||||
} break;
|
||||
case VS::INSTANCE_GI_PROBE: {
|
||||
if (instance->octree_id && instance->scenario) {
|
||||
instance->scenario->octree.set_pairable(instance->octree_id,p_visible,1<<VS::INSTANCE_GI_PROBE,p_visible?(VS::INSTANCE_GEOMETRY_MASK|(1<<VS::INSTANCE_LIGHT)):0);
|
||||
}
|
||||
|
||||
} break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void VisualServerScene::instance_attach_skeleton(RID p_instance,RID p_skeleton){
|
||||
|
||||
Instance *instance = instance_owner.get( p_instance );
|
||||
|
@ -981,11 +1016,6 @@ void VisualServerScene::instance_geometry_set_flag(RID p_instance,VS::InstanceFl
|
|||
|
||||
switch(p_flags) {
|
||||
|
||||
case VS::INSTANCE_FLAG_VISIBLE: {
|
||||
|
||||
instance->visible=p_enabled;
|
||||
|
||||
} break;
|
||||
case VS::INSTANCE_FLAG_BILLBOARD: {
|
||||
|
||||
instance->billboard=p_enabled;
|
||||
|
|
|
@ -214,7 +214,6 @@ public:
|
|||
AABB transformed_aabb;
|
||||
float extra_margin;
|
||||
uint32_t object_ID;
|
||||
bool visible;
|
||||
|
||||
float lod_begin;
|
||||
float lod_end;
|
||||
|
@ -494,6 +493,8 @@ public:
|
|||
virtual void instance_attach_object_instance_ID(RID p_instance,ObjectID p_ID);
|
||||
virtual void instance_set_morph_target_weight(RID p_instance,int p_shape, float p_weight);
|
||||
virtual void instance_set_surface_material(RID p_instance,int p_surface, RID p_material);
|
||||
virtual void instance_set_visible(RID p_instance,bool p_visible);
|
||||
|
||||
|
||||
virtual void instance_attach_skeleton(RID p_instance,RID p_skeleton);
|
||||
virtual void instance_set_exterior( RID p_instance, bool p_enabled );
|
||||
|
|
|
@ -716,6 +716,7 @@ public:
|
|||
virtual void instance_attach_object_instance_ID(RID p_instance,ObjectID p_ID)=0;
|
||||
virtual void instance_set_morph_target_weight(RID p_instance,int p_shape, float p_weight)=0;
|
||||
virtual void instance_set_surface_material(RID p_instance,int p_surface, RID p_material)=0;
|
||||
virtual void instance_set_visible(RID p_instance,bool p_visible)=0;
|
||||
|
||||
virtual void instance_attach_skeleton(RID p_instance,RID p_skeleton)=0;
|
||||
virtual void instance_set_exterior( RID p_instance, bool p_enabled )=0;
|
||||
|
@ -729,7 +730,6 @@ public:
|
|||
virtual Vector<ObjectID> instances_cull_convex(const Vector<Plane>& p_convex, RID p_scenario=RID()) const=0;
|
||||
|
||||
enum InstanceFlags {
|
||||
INSTANCE_FLAG_VISIBLE,
|
||||
INSTANCE_FLAG_BILLBOARD,
|
||||
INSTANCE_FLAG_BILLBOARD_FIX_Y,
|
||||
INSTANCE_FLAG_CAST_SHADOW,
|
||||
|
|
|
@ -132,6 +132,9 @@ void DocData::merge_from(const DocData& p_data) {
|
|||
const PropertyDoc &pf = cf.properties[j];
|
||||
|
||||
p.description=pf.description;
|
||||
p.setter=pf.setter;
|
||||
p.getter=pf.getter;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -175,6 +178,30 @@ void DocData::generate(bool p_basic_types) {
|
|||
c.inherits=ClassDB::get_parent_class(name);
|
||||
c.category=ClassDB::get_category(name);
|
||||
|
||||
|
||||
List<PropertyInfo> properties;
|
||||
ClassDB::get_property_list(name,&properties,true);
|
||||
|
||||
for(List<PropertyInfo>::Element *E=properties.front();E;E=E->next()) {
|
||||
if (E->get().usage& PROPERTY_USAGE_GROUP || E->get().usage& PROPERTY_USAGE_CATEGORY)
|
||||
continue;
|
||||
|
||||
PropertyDoc prop;
|
||||
StringName setter = ClassDB::get_property_setter(name,E->get().name);
|
||||
StringName getter = ClassDB::get_property_getter(name,E->get().name);
|
||||
|
||||
prop.name=E->get().name;
|
||||
prop.setter=setter;
|
||||
prop.getter=getter;
|
||||
if (E->get().type==Variant::OBJECT && E->get().hint==PROPERTY_HINT_RESOURCE_TYPE)
|
||||
prop.type=E->get().hint_string;
|
||||
else
|
||||
prop.type=Variant::get_type_name(E->get().type);
|
||||
|
||||
c.properties.push_back(prop);
|
||||
}
|
||||
|
||||
|
||||
List<MethodInfo> method_list;
|
||||
ClassDB::get_method_list(name,&method_list,true);
|
||||
method_list.sort();
|
||||
|
@ -825,6 +852,13 @@ Error DocData::_load(Ref<XMLParser> parser) {
|
|||
prop.name=parser->get_attribute_value("name");
|
||||
ERR_FAIL_COND_V(!parser->has_attribute("type"),ERR_FILE_CORRUPT);
|
||||
prop.type=parser->get_attribute_value("type");
|
||||
if (parser->has_attribute("setter"))
|
||||
prop.setter=parser->get_attribute_value("setter");
|
||||
if (parser->has_attribute("getter"))
|
||||
prop.getter=parser->get_attribute_value("getter");
|
||||
if (parser->has_attribute("brief"))
|
||||
prop.brief_description=parser->get_attribute_value("brief").xml_unescape();
|
||||
|
||||
parser->read();
|
||||
if (parser->get_node_type()==XMLParser::NODE_TEXT)
|
||||
prop.description=parser->get_node_data().strip_edges();
|
||||
|
@ -1009,7 +1043,7 @@ Error DocData::save(const String& p_path) {
|
|||
|
||||
|
||||
PropertyDoc &p=c.properties[i];
|
||||
_write_string(f,2,"<member name=\""+p.name+"\" type=\""+p.type+"\">");
|
||||
_write_string(f,2,"<member name=\""+p.name+"\" type=\""+p.type+"\" setter=\""+p.setter+"\" getter=\""+p.getter+"\" brief=\""+p.brief_description.xml_escape(true)+"\">");
|
||||
if (p.description!="")
|
||||
_write_string(f,3,p.description.xml_escape());
|
||||
_write_string(f,2,"</member>");
|
||||
|
|
|
@ -66,7 +66,9 @@ public:
|
|||
|
||||
String name;
|
||||
String type;
|
||||
String brief_description;
|
||||
String description;
|
||||
String setter,getter;
|
||||
bool operator<(const PropertyDoc& p_prop) const {
|
||||
return name<p_prop.name;
|
||||
}
|
||||
|
|
|
@ -1040,7 +1040,7 @@ void AnimationKeyEditor::_animation_optimize() {
|
|||
|
||||
|
||||
|
||||
animation->optimize(optimize_linear_error->get_val(),optimize_angular_error->get_val(),optimize_max_angle->get_val());
|
||||
animation->optimize(optimize_linear_error->get_value(),optimize_angular_error->get_value(),optimize_max_angle->get_value());
|
||||
track_editor->update();
|
||||
undo_redo->clear_history();
|
||||
|
||||
|
@ -1049,7 +1049,7 @@ void AnimationKeyEditor::_animation_optimize() {
|
|||
|
||||
float AnimationKeyEditor::_get_zoom_scale() const {
|
||||
|
||||
float zv = zoom->get_val();
|
||||
float zv = zoom->get_value();
|
||||
if (zv<1) {
|
||||
zv = 1.0-zv;
|
||||
return Math::pow(1.0+zv,8.0)*100;
|
||||
|
@ -1072,7 +1072,7 @@ void AnimationKeyEditor::_track_pos_draw() {
|
|||
int settings_limit = size.width - right_data_size_cache;
|
||||
int name_limit = settings_limit * name_column_ratio;
|
||||
|
||||
float keys_from= h_scroll->get_val();
|
||||
float keys_from= h_scroll->get_value();
|
||||
float zoom_scale = _get_zoom_scale();
|
||||
float keys_to=keys_from+(settings_limit-name_limit) / zoom_scale;
|
||||
|
||||
|
@ -1081,7 +1081,7 @@ void AnimationKeyEditor::_track_pos_draw() {
|
|||
//will move to separate control! (for speedup)
|
||||
if (timeline_pos >= keys_from && timeline_pos<keys_to) {
|
||||
//draw position
|
||||
int pixel = (timeline_pos - h_scroll->get_val()) * zoom_scale;
|
||||
int pixel = (timeline_pos - h_scroll->get_value()) * zoom_scale;
|
||||
pixel+=name_limit;
|
||||
track_pos->draw_line(ofs+Point2(pixel,0),ofs+Point2(pixel,size.height),Color(1,0.3,0.3,0.8));
|
||||
|
||||
|
@ -1227,8 +1227,8 @@ void AnimationKeyEditor::_track_editor_draw() {
|
|||
if (l<=0)
|
||||
l=0.001; //avoid crashor
|
||||
|
||||
int end_px = (l - h_scroll->get_val()) * scale;
|
||||
int begin_px = -h_scroll->get_val() * scale;
|
||||
int end_px = (l - h_scroll->get_value()) * scale;
|
||||
int begin_px = -h_scroll->get_value() * scale;
|
||||
Color notimecol;
|
||||
notimecol.r=timecolor.gray();
|
||||
notimecol.g=notimecol.r;
|
||||
|
@ -1254,7 +1254,7 @@ void AnimationKeyEditor::_track_editor_draw() {
|
|||
|
||||
|
||||
|
||||
keys_from= h_scroll->get_val();
|
||||
keys_from= h_scroll->get_value();
|
||||
keys_to=keys_from+zoomw / scale;
|
||||
|
||||
{
|
||||
|
@ -1331,8 +1331,8 @@ void AnimationKeyEditor::_track_editor_draw() {
|
|||
|
||||
for(int i=0;i<zoomw;i++) {
|
||||
|
||||
float pos = h_scroll->get_val() + double(i)/scale;
|
||||
float prev = h_scroll->get_val() + (double(i)-1.0)/scale;
|
||||
float pos = h_scroll->get_value() + double(i)/scale;
|
||||
float prev = h_scroll->get_value() + (double(i)-1.0)/scale;
|
||||
|
||||
|
||||
int sc = int(Math::floor(pos*SC_ADJ));
|
||||
|
@ -1356,7 +1356,7 @@ void AnimationKeyEditor::_track_editor_draw() {
|
|||
|
||||
//this code sucks, i always forget how it works
|
||||
|
||||
int idx = v_scroll->get_val() + i;
|
||||
int idx = v_scroll->get_value() + i;
|
||||
if (idx>=animation->get_track_count())
|
||||
break;
|
||||
int y = h+i*h+sep;
|
||||
|
@ -1552,14 +1552,14 @@ void AnimationKeyEditor::_track_editor_draw() {
|
|||
}
|
||||
|
||||
float motion = from_t+(click.to.x - click.at.x)/zoom_scale;
|
||||
if (step->get_val())
|
||||
motion = Math::stepify(motion,step->get_val());
|
||||
if (step->get_value())
|
||||
motion = Math::stepify(motion,step->get_value());
|
||||
|
||||
for(Map<SelectedKey,KeyInfo>::Element *E=selection.front();E;E=E->next()) {
|
||||
|
||||
|
||||
int idx = E->key().track;
|
||||
int i = idx-v_scroll->get_val();
|
||||
int i = idx-v_scroll->get_value();
|
||||
if (i<0 || i>=fit)
|
||||
continue;
|
||||
int y = h+i*h+sep;
|
||||
|
@ -1896,8 +1896,8 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
|
||||
|
||||
if (v_scroll->is_visible()) {
|
||||
if (v_scroll->get_val() > selected_track)
|
||||
v_scroll->set_val(selected_track);
|
||||
if (v_scroll->get_value() > selected_track)
|
||||
v_scroll->set_value(selected_track);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1916,8 +1916,8 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
if (selected_track >= animation->get_track_count())
|
||||
selected_track=animation->get_track_count()-1;
|
||||
|
||||
if (v_scroll->is_visible() && v_scroll->get_page()+v_scroll->get_val() < selected_track+1) {
|
||||
v_scroll->set_val(selected_track-v_scroll->get_page()+1);
|
||||
if (v_scroll->is_visible() && v_scroll->get_page()+v_scroll->get_value() < selected_track+1) {
|
||||
v_scroll->set_value(selected_track-v_scroll->get_page()+1);
|
||||
}
|
||||
|
||||
track_editor->update();
|
||||
|
@ -1934,18 +1934,18 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
if (mb.button_index==BUTTON_WHEEL_UP && mb.pressed) {
|
||||
|
||||
if (mb.mod.command) {
|
||||
zoom->set_val(zoom->get_val() + zoom->get_step());
|
||||
zoom->set_value(zoom->get_value() + zoom->get_step());
|
||||
} else {
|
||||
v_scroll->set_val( v_scroll->get_val() - v_scroll->get_page() / 8 );
|
||||
v_scroll->set_value( v_scroll->get_value() - v_scroll->get_page() / 8 );
|
||||
}
|
||||
}
|
||||
|
||||
if (mb.button_index==BUTTON_WHEEL_DOWN && mb.pressed) {
|
||||
|
||||
if (mb.mod.command) {
|
||||
zoom->set_val(zoom->get_val() - zoom->get_step());
|
||||
zoom->set_value(zoom->get_value() - zoom->get_step());
|
||||
} else {
|
||||
v_scroll->set_val( v_scroll->get_val() + v_scroll->get_page() / 8 );
|
||||
v_scroll->set_value( v_scroll->get_value() + v_scroll->get_page() / 8 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1966,7 +1966,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
mpos.y -= h;
|
||||
|
||||
int idx = mpos.y / h;
|
||||
idx+=v_scroll->get_val();
|
||||
idx+=v_scroll->get_value();
|
||||
if (idx <0 || idx>=animation->get_track_count())
|
||||
break;
|
||||
|
||||
|
@ -1974,7 +1974,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
} else if (mpos.x < settings_limit) {
|
||||
float pos = mpos.x - name_limit;
|
||||
pos/=_get_zoom_scale();
|
||||
pos+=h_scroll->get_val();
|
||||
pos+=h_scroll->get_value();
|
||||
float w_time = (type_icon[0]->get_width() / _get_zoom_scale())/2.0;
|
||||
|
||||
int kidx = animation->track_find_key(idx,pos);
|
||||
|
@ -2083,7 +2083,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
//seek
|
||||
//int zoomw = settings_limit-name_limit;
|
||||
float scale = _get_zoom_scale();
|
||||
float pos = h_scroll->get_val() + (mpos.x-name_limit) / scale;
|
||||
float pos = h_scroll->get_value() + (mpos.x-name_limit) / scale;
|
||||
if (animation->get_step())
|
||||
pos=Math::stepify(pos,animation->get_step());
|
||||
|
||||
|
@ -2105,7 +2105,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
mpos.y -= h;
|
||||
|
||||
int idx = mpos.y / h;
|
||||
idx+=v_scroll->get_val();
|
||||
idx+=v_scroll->get_value();
|
||||
if (idx <0)
|
||||
break;
|
||||
|
||||
|
@ -2146,7 +2146,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
|
||||
float pos = mpos.x - name_limit;
|
||||
pos/=_get_zoom_scale();
|
||||
pos+=h_scroll->get_val();
|
||||
pos+=h_scroll->get_value();
|
||||
float w_time = (type_icon[0]->get_width() / _get_zoom_scale())/2.0;
|
||||
|
||||
int kidx = animation->track_find_key(idx,pos);
|
||||
|
@ -2403,7 +2403,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
|
||||
|
||||
float zoom_scale=_get_zoom_scale();
|
||||
float keys_from = h_scroll->get_val();
|
||||
float keys_from = h_scroll->get_value();
|
||||
float keys_to = keys_from + (settings_limit-name_limit) / zoom_scale;
|
||||
|
||||
float from_time = keys_from + ( click.at.x - (name_limit+ofs.x)) / zoom_scale;
|
||||
|
@ -2423,8 +2423,8 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
to_time = keys_to;
|
||||
|
||||
|
||||
int from_track = int(click.at.y-ofs.y-h-sep) / h + v_scroll->get_val();
|
||||
int to_track = int(click.to.y-ofs.y-h-sep) / h + v_scroll->get_val();
|
||||
int from_track = int(click.at.y-ofs.y-h-sep) / h + v_scroll->get_value();
|
||||
int to_track = int(click.to.y-ofs.y-h-sep) / h + v_scroll->get_value();
|
||||
int from_mod = int(click.at.y-ofs.y-sep) % h;
|
||||
int to_mod = int(click.to.y-ofs.y-sep) % h;
|
||||
|
||||
|
@ -2452,8 +2452,8 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
break;
|
||||
}
|
||||
|
||||
int tracks_from = v_scroll->get_val();
|
||||
int tracks_to = v_scroll->get_val()+fit-1;
|
||||
int tracks_from = v_scroll->get_value();
|
||||
int tracks_to = v_scroll->get_value()+fit-1;
|
||||
if (tracks_to>=animation->get_track_count())
|
||||
tracks_to=animation->get_track_count()-1;
|
||||
|
||||
|
@ -2536,8 +2536,8 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
}
|
||||
|
||||
float motion = from_t+(click.to.x - click.at.x)/_get_zoom_scale();
|
||||
if (step->get_val())
|
||||
motion = Math::stepify(motion,step->get_val());
|
||||
if (step->get_value())
|
||||
motion = Math::stepify(motion,step->get_value());
|
||||
|
||||
|
||||
|
||||
|
@ -2700,7 +2700,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
|
||||
//int zoomw = settings_limit-name_limit;
|
||||
float scale = _get_zoom_scale();
|
||||
float pos = h_scroll->get_val() + (mpos.x-name_limit) / scale;
|
||||
float pos = h_scroll->get_value() + (mpos.x-name_limit) / scale;
|
||||
if (animation->get_step()) {
|
||||
pos=Math::stepify(pos,animation->get_step());
|
||||
|
||||
|
@ -2710,10 +2710,10 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
if (pos>=animation->get_length())
|
||||
pos=animation->get_length();
|
||||
|
||||
if (pos < h_scroll->get_val()) {
|
||||
h_scroll->set_val(pos);
|
||||
} else if (pos > h_scroll->get_val() + (settings_limit - name_limit) / scale) {
|
||||
h_scroll->set_val( pos - (settings_limit - name_limit) / scale );
|
||||
if (pos < h_scroll->get_value()) {
|
||||
h_scroll->set_value(pos);
|
||||
} else if (pos > h_scroll->get_value() + (settings_limit - name_limit) / scale) {
|
||||
h_scroll->set_value( pos - (settings_limit - name_limit) / scale );
|
||||
}
|
||||
|
||||
timeline_pos=pos;
|
||||
|
@ -2727,18 +2727,18 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
click.to=Point2(mb.x,mb.y);
|
||||
if (click.to.y<h && click.at.y>h && mb.relative_y<0) {
|
||||
|
||||
float prev = v_scroll->get_val();
|
||||
v_scroll->set_val( v_scroll->get_val() -1 );
|
||||
if (prev!=v_scroll->get_val())
|
||||
float prev = v_scroll->get_value();
|
||||
v_scroll->set_value( v_scroll->get_value() -1 );
|
||||
if (prev!=v_scroll->get_value())
|
||||
click.at.y+=h;
|
||||
|
||||
|
||||
}
|
||||
if (click.to.y>size.height && click.at.y<size.height && mb.relative_y>0) {
|
||||
|
||||
float prev = v_scroll->get_val();
|
||||
v_scroll->set_val( v_scroll->get_val() +1 );
|
||||
if (prev!=v_scroll->get_val())
|
||||
float prev = v_scroll->get_value();
|
||||
v_scroll->set_value( v_scroll->get_value() +1 );
|
||||
if (prev!=v_scroll->get_value())
|
||||
click.at.y-=h;
|
||||
}
|
||||
|
||||
|
@ -2755,7 +2755,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
|
||||
int rel = mb.relative_x;
|
||||
float relf = rel / _get_zoom_scale();
|
||||
h_scroll->set_val( h_scroll->get_val() - relf );
|
||||
h_scroll->set_value( h_scroll->get_value() - relf );
|
||||
}
|
||||
|
||||
if (mb.button_mask==0) {
|
||||
|
@ -2781,7 +2781,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
mpos.y -= h;
|
||||
|
||||
int idx = mpos.y / h;
|
||||
idx+=v_scroll->get_val();
|
||||
idx+=v_scroll->get_value();
|
||||
if (idx <0 || idx>=animation->get_track_count())
|
||||
break;
|
||||
|
||||
|
@ -2797,7 +2797,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||
|
||||
float pos = mpos.x - name_limit;
|
||||
pos/=_get_zoom_scale();
|
||||
pos+=h_scroll->get_val();
|
||||
pos+=h_scroll->get_value();
|
||||
float w_time = (type_icon[0]->get_width() / _get_zoom_scale())/2.0;
|
||||
|
||||
int kidx = animation->track_find_key(idx,pos);
|
||||
|
@ -3112,8 +3112,8 @@ void AnimationKeyEditor::_update_paths() {
|
|||
//timeline->set_max(animation->get_length());
|
||||
//timeline->set_step(0.01);
|
||||
track_editor->update();
|
||||
length->set_val(animation->get_length());
|
||||
step->set_val(animation->get_step());
|
||||
length->set_value(animation->get_length());
|
||||
step->set_value(animation->get_step());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3130,9 +3130,9 @@ void AnimationKeyEditor::_update_menu() {
|
|||
|
||||
if (animation.is_valid()) {
|
||||
|
||||
length->set_val(animation->get_length());
|
||||
length->set_value(animation->get_length());
|
||||
loop->set_pressed(animation->has_loop());
|
||||
step->set_val(animation->get_step());
|
||||
step->set_value(animation->get_step());
|
||||
}
|
||||
|
||||
track_editor->update();
|
||||
|
@ -3710,7 +3710,7 @@ void AnimationKeyEditor::_scale() {
|
|||
|
||||
}
|
||||
|
||||
float s = scale->get_val();
|
||||
float s = scale->get_value();
|
||||
if (s==0) {
|
||||
ERR_PRINT("Can't scale to 0");
|
||||
}
|
||||
|
@ -3914,7 +3914,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
|
|||
h_scroll = memnew( HScrollBar );
|
||||
h_scroll->connect("value_changed",this,"_scroll_changed");
|
||||
add_child(h_scroll);
|
||||
h_scroll->set_val(0);
|
||||
h_scroll->set_value(0);
|
||||
|
||||
|
||||
HBoxContainer *hb = memnew( HBoxContainer );
|
||||
|
@ -3936,7 +3936,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
|
|||
zoom->set_step(0.01);
|
||||
zoom->set_min(0.0);
|
||||
zoom->set_max(2.0);
|
||||
zoom->set_val(1.0);
|
||||
zoom->set_value(1.0);
|
||||
zoom->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
zoom->set_stretch_ratio(2);
|
||||
hb->add_child(zoom);
|
||||
|
@ -3968,7 +3968,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
|
|||
step->set_min(0.00);
|
||||
step->set_max(128);
|
||||
step->set_step(0.01);
|
||||
step->set_val(0.0);
|
||||
step->set_value(0.0);
|
||||
step->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
step->set_stretch_ratio(1);
|
||||
step->set_tooltip(TTR("Cursor step snap (in seconds)."));
|
||||
|
@ -4035,13 +4035,13 @@ AnimationKeyEditor::AnimationKeyEditor() {
|
|||
optimize_linear_error->set_max(1.0);
|
||||
optimize_linear_error->set_min(0.001);
|
||||
optimize_linear_error->set_step(0.001);
|
||||
optimize_linear_error->set_val(0.05);
|
||||
optimize_linear_error->set_value(0.05);
|
||||
optimize_vb->add_margin_child(TTR("Max. Linear Error:"),optimize_linear_error);
|
||||
optimize_angular_error = memnew( SpinBox );
|
||||
optimize_angular_error->set_max(1.0);
|
||||
optimize_angular_error->set_min(0.001);
|
||||
optimize_angular_error->set_step(0.001);
|
||||
optimize_angular_error->set_val(0.01);
|
||||
optimize_angular_error->set_value(0.01);
|
||||
|
||||
optimize_vb->add_margin_child(TTR("Max. Angular Error:"),optimize_angular_error);
|
||||
optimize_max_angle = memnew( SpinBox );
|
||||
|
@ -4049,7 +4049,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
|
|||
optimize_max_angle->set_max(360.0);
|
||||
optimize_max_angle->set_min(0.0);
|
||||
optimize_max_angle->set_step(0.1);
|
||||
optimize_max_angle->set_val(22);
|
||||
optimize_max_angle->set_value(22);
|
||||
|
||||
optimize_dialog->get_ok()->set_text(TTR("Optimize"));
|
||||
|
||||
|
@ -4107,7 +4107,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
|
|||
v_scroll = memnew( VScrollBar );
|
||||
hb->add_child(v_scroll);
|
||||
v_scroll->connect("value_changed",this,"_scroll_changed");
|
||||
v_scroll->set_val(0);
|
||||
v_scroll->set_value(0);
|
||||
|
||||
key_editor_tab = memnew(TabContainer);
|
||||
hb->add_child(key_editor_tab);
|
||||
|
|
|
@ -379,12 +379,12 @@ void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int
|
|||
}
|
||||
|
||||
progress->set_max( download->get_body_size() );
|
||||
progress->set_val(download->get_downloaded_bytes());
|
||||
progress->set_value(download->get_downloaded_bytes());
|
||||
|
||||
print_line("max: "+itos(download->get_body_size())+" bytes: "+itos(download->get_downloaded_bytes()));
|
||||
install->set_disabled(false);
|
||||
|
||||
progress->set_val(download->get_downloaded_bytes());
|
||||
progress->set_value(download->get_downloaded_bytes());
|
||||
|
||||
status->set_text("Success! ("+String::humanize_size(download->get_downloaded_bytes())+")");
|
||||
set_process(false);
|
||||
|
@ -411,7 +411,7 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) {
|
|||
if (p_what==NOTIFICATION_PROCESS) {
|
||||
|
||||
progress->set_max( download->get_body_size() );
|
||||
progress->set_val(download->get_downloaded_bytes());
|
||||
progress->set_value(download->get_downloaded_bytes());
|
||||
|
||||
int cstatus = download->get_http_client_status();
|
||||
|
||||
|
@ -582,16 +582,16 @@ void EditorAssetLibrary::_notification(int p_what) {
|
|||
switch(s) {
|
||||
|
||||
case HTTPClient::STATUS_RESOLVING: {
|
||||
load_status->set_val(0.1);
|
||||
load_status->set_value(0.1);
|
||||
} break;
|
||||
case HTTPClient::STATUS_CONNECTING: {
|
||||
load_status->set_val(0.2);
|
||||
load_status->set_value(0.2);
|
||||
} break;
|
||||
case HTTPClient::STATUS_REQUESTING: {
|
||||
load_status->set_val(0.3);
|
||||
load_status->set_value(0.3);
|
||||
} break;
|
||||
case HTTPClient::STATUS_BODY: {
|
||||
load_status->set_val(0.4);
|
||||
load_status->set_value(0.4);
|
||||
} break;
|
||||
default: {}
|
||||
|
||||
|
|
|
@ -814,14 +814,109 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
|
|||
class_desc->add_newline();
|
||||
}
|
||||
|
||||
Set<String> skip_methods;
|
||||
bool property_descr=false;
|
||||
|
||||
if (cd.properties.size()) {
|
||||
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
||||
class_desc->push_font(doc_title_font);
|
||||
class_desc->add_text(TTR("Members:"));
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
// class_desc->add_newline();
|
||||
|
||||
class_desc->push_indent(1);
|
||||
class_desc->push_table(2);
|
||||
class_desc->set_table_column_expand(1,1);
|
||||
|
||||
for(int i=0;i<cd.properties.size();i++) {
|
||||
property_line[cd.properties[i].name]=class_desc->get_line_count()-2; //gets overriden if description
|
||||
|
||||
class_desc->push_cell();
|
||||
class_desc->push_align(RichTextLabel::ALIGN_RIGHT);
|
||||
class_desc->push_font(doc_code_font);
|
||||
_add_type(cd.properties[i].type);
|
||||
class_desc->add_text(" ");
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
|
||||
bool describe=false;
|
||||
|
||||
if (cd.properties[i].setter!="") {
|
||||
skip_methods.insert(cd.properties[i].setter);
|
||||
describe=true;
|
||||
|
||||
}
|
||||
if (cd.properties[i].getter!="") {
|
||||
skip_methods.insert(cd.properties[i].getter);
|
||||
describe=true;
|
||||
}
|
||||
|
||||
if (cd.properties[i].description!="") {
|
||||
describe=true;
|
||||
|
||||
}
|
||||
class_desc->push_cell();
|
||||
if (describe) {
|
||||
class_desc->push_meta("@"+cd.properties[i].name);
|
||||
}
|
||||
|
||||
class_desc->push_font(doc_code_font);
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
|
||||
_add_text(cd.properties[i].name);
|
||||
|
||||
if (describe) {
|
||||
class_desc->pop();
|
||||
}
|
||||
|
||||
|
||||
if (cd.properties[i].brief_description!="") {
|
||||
class_desc->push_font(doc_font);
|
||||
class_desc->add_text(" ");
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/comment_color"));
|
||||
_add_text(cd.properties[i].description);
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
|
||||
}
|
||||
|
||||
if (describe) {
|
||||
property_descr=true;
|
||||
}
|
||||
|
||||
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
|
||||
}
|
||||
|
||||
|
||||
class_desc->pop(); //table
|
||||
class_desc->pop();
|
||||
class_desc->add_newline();
|
||||
class_desc->add_newline();
|
||||
}
|
||||
|
||||
|
||||
bool method_descr=false;
|
||||
bool sort_methods = EditorSettings::get_singleton()->get("help/sort_functions_alphabetically");
|
||||
|
||||
Vector<DocData::MethodDoc> methods;
|
||||
|
||||
if (cd.methods.size()) {
|
||||
for(int i=0;i<cd.methods.size();i++) {
|
||||
if (skip_methods.has(cd.methods[i].name))
|
||||
continue;
|
||||
methods.push_back(cd.methods[i]);
|
||||
}
|
||||
|
||||
if (methods.size()) {
|
||||
|
||||
if (sort_methods)
|
||||
cd.methods.sort();
|
||||
methods.sort();
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
||||
class_desc->push_font(doc_title_font);
|
||||
|
@ -836,15 +931,15 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
|
|||
class_desc->push_table(2);
|
||||
class_desc->set_table_column_expand(1,1);
|
||||
|
||||
for(int i=0;i<cd.methods.size();i++) {
|
||||
for(int i=0;i<methods.size();i++) {
|
||||
|
||||
class_desc->push_cell();
|
||||
|
||||
|
||||
method_line[cd.methods[i].name]=class_desc->get_line_count()-2; //gets overriden if description
|
||||
method_line[methods[i].name]=class_desc->get_line_count()-2; //gets overriden if description
|
||||
class_desc->push_align(RichTextLabel::ALIGN_RIGHT);
|
||||
class_desc->push_font(doc_code_font);
|
||||
_add_type(cd.methods[i].return_type);
|
||||
_add_type(methods[i].return_type);
|
||||
//class_desc->add_text(" ");
|
||||
class_desc->pop(); //align
|
||||
class_desc->pop(); //font
|
||||
|
@ -852,37 +947,37 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
|
|||
class_desc->push_cell();
|
||||
class_desc->push_font(doc_code_font);
|
||||
|
||||
if (cd.methods[i].description!="") {
|
||||
if (methods[i].description!="") {
|
||||
method_descr=true;
|
||||
class_desc->push_meta("@"+cd.methods[i].name);
|
||||
class_desc->push_meta("@"+methods[i].name);
|
||||
}
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
|
||||
_add_text(cd.methods[i].name);
|
||||
_add_text(methods[i].name);
|
||||
class_desc->pop();
|
||||
if (cd.methods[i].description!="")
|
||||
if (methods[i].description!="")
|
||||
class_desc->pop();
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
|
||||
class_desc->add_text(cd.methods[i].arguments.size()?"( ":"(");
|
||||
class_desc->add_text(methods[i].arguments.size()?"( ":"(");
|
||||
class_desc->pop();
|
||||
for(int j=0;j<cd.methods[i].arguments.size();j++) {
|
||||
for(int j=0;j<methods[i].arguments.size();j++) {
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
|
||||
if (j>0)
|
||||
class_desc->add_text(", ");
|
||||
_add_type(cd.methods[i].arguments[j].type);
|
||||
_add_type(methods[i].arguments[j].type);
|
||||
class_desc->add_text(" ");
|
||||
_add_text(cd.methods[i].arguments[j].name);
|
||||
if (cd.methods[i].arguments[j].default_value!="") {
|
||||
_add_text(methods[i].arguments[j].name);
|
||||
if (methods[i].arguments[j].default_value!="") {
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
|
||||
class_desc->add_text("=");
|
||||
class_desc->pop();
|
||||
_add_text(cd.methods[i].arguments[j].default_value);
|
||||
_add_text(methods[i].arguments[j].default_value);
|
||||
}
|
||||
|
||||
class_desc->pop();
|
||||
}
|
||||
|
||||
if (cd.methods[i].qualifiers.find("vararg")!=-1) {
|
||||
if (methods[i].qualifiers.find("vararg")!=-1) {
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
|
||||
class_desc->add_text(",");
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
|
||||
|
@ -892,13 +987,13 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
|
|||
}
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
|
||||
class_desc->add_text(cd.methods[i].arguments.size()?" )":")");
|
||||
class_desc->add_text(methods[i].arguments.size()?" )":")");
|
||||
class_desc->pop();
|
||||
if (cd.methods[i].qualifiers!="") {
|
||||
if (methods[i].qualifiers!="") {
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
||||
class_desc->add_text(" ");
|
||||
_add_text(cd.methods[i].qualifiers);
|
||||
_add_text(methods[i].qualifiers);
|
||||
class_desc->pop();
|
||||
|
||||
}
|
||||
|
@ -914,48 +1009,6 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
|
|||
|
||||
}
|
||||
|
||||
if (cd.properties.size()) {
|
||||
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
||||
class_desc->push_font(doc_title_font);
|
||||
class_desc->add_text(TTR("Members:"));
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
class_desc->add_newline();
|
||||
|
||||
class_desc->push_indent(1);
|
||||
|
||||
//class_desc->add_newline();
|
||||
|
||||
for(int i=0;i<cd.properties.size();i++) {
|
||||
|
||||
property_line[cd.properties[i].name]=class_desc->get_line_count()-2; //gets overriden if description
|
||||
class_desc->push_font(doc_code_font);
|
||||
_add_type(cd.properties[i].type);
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
|
||||
class_desc->add_text(" ");
|
||||
_add_text(cd.properties[i].name);
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
|
||||
if (cd.properties[i].description!="") {
|
||||
class_desc->push_font(doc_font);
|
||||
class_desc->add_text(" ");
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/comment_color"));
|
||||
_add_text(cd.properties[i].description);
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
|
||||
}
|
||||
|
||||
class_desc->add_newline();
|
||||
}
|
||||
|
||||
|
||||
class_desc->pop();
|
||||
class_desc->add_newline();
|
||||
}
|
||||
|
||||
if (cd.theme_properties.size()) {
|
||||
|
||||
|
@ -1133,6 +1186,89 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
|
|||
class_desc->add_newline();
|
||||
}
|
||||
|
||||
if (property_descr) {
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
||||
class_desc->push_font(doc_title_font);
|
||||
class_desc->add_text(TTR("Property Description:"));
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
|
||||
class_desc->add_newline();
|
||||
class_desc->add_newline();
|
||||
|
||||
|
||||
for(int i=0;i<cd.properties.size();i++) {
|
||||
|
||||
method_line[cd.properties[i].name]=class_desc->get_line_count()-2;
|
||||
|
||||
class_desc->push_font(doc_code_font);
|
||||
_add_type(cd.properties[i].type);
|
||||
|
||||
class_desc->add_text(" ");
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
|
||||
_add_text(cd.properties[i].name);
|
||||
class_desc->pop(); //color
|
||||
|
||||
class_desc->add_text(" ");
|
||||
|
||||
class_desc->pop(); //font
|
||||
|
||||
if (cd.properties[i].setter!="") {
|
||||
|
||||
class_desc->push_font( doc_font );
|
||||
|
||||
class_desc->push_indent(2);
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
||||
class_desc->add_text("Setter: ");
|
||||
class_desc->pop();
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
|
||||
class_desc->add_text(cd.properties[i].setter+"(value)");
|
||||
class_desc->pop(); //color
|
||||
|
||||
class_desc->pop(); //indent
|
||||
|
||||
class_desc->pop(); //font
|
||||
|
||||
}
|
||||
|
||||
if (cd.properties[i].getter!="") {
|
||||
|
||||
class_desc->push_font( doc_font );
|
||||
|
||||
class_desc->push_indent(2);
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
||||
class_desc->add_text("Getter: ");
|
||||
class_desc->pop();
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
|
||||
class_desc->add_text(cd.properties[i].getter+"()");
|
||||
class_desc->pop(); //color
|
||||
|
||||
class_desc->pop(); //indent
|
||||
|
||||
class_desc->pop(); //font
|
||||
|
||||
}
|
||||
|
||||
class_desc->add_newline();
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
|
||||
class_desc->push_font( doc_font );
|
||||
class_desc->push_indent(1);
|
||||
_add_text(cd.properties[i].description);
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
class_desc->add_newline();
|
||||
class_desc->add_newline();
|
||||
class_desc->add_newline();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (method_descr) {
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
||||
|
@ -1145,46 +1281,46 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
|
|||
class_desc->add_newline();
|
||||
|
||||
|
||||
for(int i=0;i<cd.methods.size();i++) {
|
||||
for(int i=0;i<methods.size();i++) {
|
||||
|
||||
method_line[cd.methods[i].name]=class_desc->get_line_count()-2;
|
||||
method_line[methods[i].name]=class_desc->get_line_count()-2;
|
||||
|
||||
class_desc->push_font(doc_code_font);
|
||||
_add_type(cd.methods[i].return_type);
|
||||
_add_type(methods[i].return_type);
|
||||
|
||||
class_desc->add_text(" ");
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
|
||||
_add_text(cd.methods[i].name);
|
||||
_add_text(methods[i].name);
|
||||
class_desc->pop();
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
|
||||
class_desc->add_text(cd.methods[i].arguments.size()?"( ":"(");
|
||||
class_desc->add_text(methods[i].arguments.size()?"( ":"(");
|
||||
class_desc->pop();
|
||||
for(int j=0;j<cd.methods[i].arguments.size();j++) {
|
||||
for(int j=0;j<methods[i].arguments.size();j++) {
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
|
||||
if (j>0)
|
||||
class_desc->add_text(", ");
|
||||
_add_type(cd.methods[i].arguments[j].type);
|
||||
_add_type(methods[i].arguments[j].type);
|
||||
class_desc->add_text(" ");
|
||||
_add_text(cd.methods[i].arguments[j].name);
|
||||
if (cd.methods[i].arguments[j].default_value!="") {
|
||||
_add_text(methods[i].arguments[j].name);
|
||||
if (methods[i].arguments[j].default_value!="") {
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
|
||||
class_desc->add_text("=");
|
||||
class_desc->pop();
|
||||
_add_text(cd.methods[i].arguments[j].default_value);
|
||||
_add_text(methods[i].arguments[j].default_value);
|
||||
}
|
||||
|
||||
class_desc->pop();
|
||||
}
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
|
||||
class_desc->add_text(cd.methods[i].arguments.size()?" )":")");
|
||||
class_desc->add_text(methods[i].arguments.size()?" )":")");
|
||||
class_desc->pop();
|
||||
if (cd.methods[i].qualifiers!="") {
|
||||
if (methods[i].qualifiers!="") {
|
||||
|
||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
||||
class_desc->add_text(" ");
|
||||
_add_text(cd.methods[i].qualifiers);
|
||||
_add_text(methods[i].qualifiers);
|
||||
class_desc->pop();
|
||||
|
||||
}
|
||||
|
@ -1195,7 +1331,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
|
|||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
|
||||
class_desc->push_font( doc_font );
|
||||
class_desc->push_indent(1);
|
||||
_add_text(cd.methods[i].description);
|
||||
_add_text(methods[i].description);
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
class_desc->pop();
|
||||
|
@ -1640,12 +1776,12 @@ void EditorHelp::search_again() {
|
|||
|
||||
int EditorHelp::get_scroll() const {
|
||||
|
||||
return class_desc->get_v_scroll()->get_val();
|
||||
return class_desc->get_v_scroll()->get_value();
|
||||
}
|
||||
void EditorHelp::set_scroll(int p_scroll) {
|
||||
|
||||
|
||||
class_desc->get_v_scroll()->set_val(p_scroll);
|
||||
class_desc->get_v_scroll()->set_value(p_scroll);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -285,16 +285,16 @@ void EditorNode::_notification(int p_what) {
|
|||
|
||||
if (peak<-80)
|
||||
peak=-80;
|
||||
float vu = audio_vu->get_val();
|
||||
float vu = audio_vu->get_value();
|
||||
|
||||
if (peak > vu) {
|
||||
audio_vu->set_val(peak);
|
||||
audio_vu->set_value(peak);
|
||||
} else {
|
||||
float new_vu = vu - get_process_delta_time()*70.0;
|
||||
if (new_vu<-80)
|
||||
new_vu=-80;
|
||||
if (new_vu !=-80 && vu !=-80)
|
||||
audio_vu->set_val(new_vu);
|
||||
audio_vu->set_value(new_vu);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3468,8 +3468,8 @@ Dictionary EditorNode::_get_main_scene_state() {
|
|||
|
||||
Dictionary state;
|
||||
state["main_tab"]=_get_current_main_editor();
|
||||
state["scene_tree_offset"]=scene_tree_dock->get_tree_editor()->get_scene_tree()->get_vscroll_bar()->get_val();
|
||||
state["property_edit_offset"]=get_property_editor()->get_scene_tree()->get_vscroll_bar()->get_val();
|
||||
state["scene_tree_offset"]=scene_tree_dock->get_tree_editor()->get_scene_tree()->get_vscroll_bar()->get_value();
|
||||
state["property_edit_offset"]=get_property_editor()->get_scene_tree()->get_vscroll_bar()->get_value();
|
||||
state["saved_version"]=saved_version;
|
||||
state["node_filter"]=scene_tree_dock->get_filter();
|
||||
//print_line(" getting main tab: "+itos(state["main_tab"]));
|
||||
|
@ -3535,9 +3535,9 @@ void EditorNode::_set_main_scene_state(Dictionary p_state,Node* p_for_scene) {
|
|||
|
||||
|
||||
if (p_state.has("scene_tree_offset"))
|
||||
scene_tree_dock->get_tree_editor()->get_scene_tree()->get_vscroll_bar()->set_val(p_state["scene_tree_offset"]);
|
||||
scene_tree_dock->get_tree_editor()->get_scene_tree()->get_vscroll_bar()->set_value(p_state["scene_tree_offset"]);
|
||||
if (p_state.has("property_edit_offset"))
|
||||
get_property_editor()->get_scene_tree()->get_vscroll_bar()->set_val(p_state["property_edit_offset"]);
|
||||
get_property_editor()->get_scene_tree()->get_vscroll_bar()->set_value(p_state["property_edit_offset"]);
|
||||
|
||||
if (p_state.has("node_filter"))
|
||||
scene_tree_dock->set_filter(p_state["node_filter"]);
|
||||
|
@ -6026,7 +6026,7 @@ EditorNode::EditorNode() {
|
|||
audio_vu->set_max(24);
|
||||
audio_vu->set_min(-80);
|
||||
audio_vu->set_step(0.01);
|
||||
audio_vu->set_val(0);
|
||||
audio_vu->set_value(0);
|
||||
|
||||
{
|
||||
Control *sp = memnew( Control );
|
||||
|
|
|
@ -28,7 +28,7 @@ void EditorProfiler::add_frame_metric(const Metric& p_metric,bool p_final) {
|
|||
|
||||
|
||||
if (!seeking) {
|
||||
cursor_metric_edit->set_val(frame_metrics[last_metric].frame_number);
|
||||
cursor_metric_edit->set_value(frame_metrics[last_metric].frame_number);
|
||||
if (hover_metric!=-1) {
|
||||
hover_metric++;
|
||||
if (hover_metric>=frame_metrics.size()) {
|
||||
|
@ -70,7 +70,7 @@ void EditorProfiler::clear() {
|
|||
updating_frame=true;
|
||||
cursor_metric_edit->set_min(0);
|
||||
cursor_metric_edit->set_max(0);
|
||||
cursor_metric_edit->set_val(0);
|
||||
cursor_metric_edit->set_value(0);
|
||||
updating_frame=false;
|
||||
hover_metric=-1;
|
||||
seeking=false;
|
||||
|
@ -453,7 +453,7 @@ void EditorProfiler::_graph_tex_draw() {
|
|||
if (seeking) {
|
||||
|
||||
int max_frames = frame_metrics.size();
|
||||
int frame = cursor_metric_edit->get_val() - (frame_metrics[last_metric].frame_number-max_frames+1);
|
||||
int frame = cursor_metric_edit->get_value() - (frame_metrics[last_metric].frame_number-max_frames+1);
|
||||
if (frame<0)
|
||||
frame=0;
|
||||
|
||||
|
@ -559,7 +559,7 @@ void EditorProfiler::_graph_tex_input(const InputEvent& p_ev){
|
|||
}
|
||||
|
||||
if (valid)
|
||||
cursor_metric_edit->set_val(frame_metrics[metric].frame_number);
|
||||
cursor_metric_edit->set_value(frame_metrics[metric].frame_number);
|
||||
|
||||
updating_frame=false;
|
||||
|
||||
|
@ -590,7 +590,7 @@ int EditorProfiler::_get_cursor_index() const {
|
|||
if (!frame_metrics[last_metric].valid)
|
||||
return 0;
|
||||
|
||||
int diff = (frame_metrics[last_metric].frame_number-cursor_metric_edit->get_val());
|
||||
int diff = (frame_metrics[last_metric].frame_number-cursor_metric_edit->get_value());
|
||||
|
||||
int idx = last_metric - diff;
|
||||
while (idx<0) {
|
||||
|
|
|
@ -174,7 +174,7 @@ void FileSystemDock::_notification(int p_what) {
|
|||
} break;
|
||||
case NOTIFICATION_PROCESS: {
|
||||
if (EditorFileSystem::get_singleton()->is_scanning()) {
|
||||
scanning_progress->set_val(EditorFileSystem::get_singleton()->get_scanning_progress()*100);
|
||||
scanning_progress->set_value(EditorFileSystem::get_singleton()->get_scanning_progress()*100);
|
||||
}
|
||||
} break;
|
||||
case NOTIFICATION_EXIT_TREE: {
|
||||
|
@ -668,9 +668,9 @@ void FileSystemDock::_set_scannig_mode() {
|
|||
scanning_vb->show();
|
||||
set_process(true);
|
||||
if (EditorFileSystem::get_singleton()->is_scanning()) {
|
||||
scanning_progress->set_val(EditorFileSystem::get_singleton()->get_scanning_progress()*100);
|
||||
scanning_progress->set_value(EditorFileSystem::get_singleton()->get_scanning_progress()*100);
|
||||
} else {
|
||||
scanning_progress->set_val(0);
|
||||
scanning_progress->set_value(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -418,7 +418,7 @@ class EditorFontImportDialog : public ConfirmationDialog {
|
|||
//print_line("pre src path "+source->get_line_edit()->get_text());
|
||||
//print_line("src path "+src_path);
|
||||
imd->add_source(src_path);
|
||||
imd->set_option("font/size",font_size->get_val());
|
||||
imd->set_option("font/size",font_size->get_value());
|
||||
|
||||
return imd;
|
||||
|
||||
|
@ -619,7 +619,7 @@ public:
|
|||
}
|
||||
source->get_line_edit()->set_text(src);
|
||||
|
||||
font_size->set_val(rimd->get_option("font/size"));
|
||||
font_size->set_value(rimd->get_option("font/size"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -658,7 +658,7 @@ public:
|
|||
vbl->add_margin_child(TTR("Source Font Size:"),font_size);
|
||||
font_size->set_min(3);
|
||||
font_size->set_max(256);
|
||||
font_size->set_val(16);
|
||||
font_size->set_value(16);
|
||||
font_size->connect("value_changed",this,"_font_size_changed");
|
||||
dest = memnew( EditorLineEditFileChooser );
|
||||
//
|
||||
|
|
|
@ -106,12 +106,12 @@ void EditorImportTextureOptions::set_flags(uint32_t p_flags){
|
|||
|
||||
void EditorImportTextureOptions::set_quality(float p_quality) {
|
||||
|
||||
quality->set_val(p_quality);
|
||||
quality->set_value(p_quality);
|
||||
}
|
||||
|
||||
float EditorImportTextureOptions::get_quality() const {
|
||||
|
||||
return quality->get_val();
|
||||
return quality->get_value();
|
||||
}
|
||||
|
||||
|
||||
|
@ -200,7 +200,7 @@ EditorImportTextureOptions::EditorImportTextureOptions() {
|
|||
hs->set_min(0);
|
||||
hs->set_max(1.0);
|
||||
hs->set_step(0.01);
|
||||
hs->set_val(0.7);
|
||||
hs->set_value(0.7);
|
||||
quality=hs;
|
||||
quality_vb->add_margin_child(TTR("Texture Compression Quality (WebP):"),quality_hb);
|
||||
|
||||
|
@ -396,7 +396,7 @@ void EditorTextureImportDialog::_import() {
|
|||
imd->set_option("flags",texture_options->get_flags());
|
||||
imd->set_option("quality",texture_options->get_quality());
|
||||
imd->set_option("atlas",true);
|
||||
imd->set_option("atlas_size",int(size->get_val()));
|
||||
imd->set_option("atlas_size",int(size->get_value()));
|
||||
imd->set_option("large",false);
|
||||
imd->set_option("crop",crop_source->is_pressed());
|
||||
imd->set_option("mode",mode);
|
||||
|
@ -430,7 +430,7 @@ void EditorTextureImportDialog::_import() {
|
|||
imd->set_option("quality",texture_options->get_quality());
|
||||
imd->set_option("atlas",false);
|
||||
imd->set_option("large",true);
|
||||
imd->set_option("large_cell_size",int(size->get_val()));
|
||||
imd->set_option("large_cell_size",int(size->get_value()));
|
||||
imd->set_option("crop",crop_source->is_pressed());
|
||||
imd->set_option("mode",mode);
|
||||
|
||||
|
@ -569,7 +569,7 @@ void EditorTextureImportDialog::_mode_changed(int p_mode) {
|
|||
if (p_mode==EditorTextureImportPlugin::MODE_ATLAS) {
|
||||
|
||||
size_label->set_text(TTR("Max Texture Size:"));
|
||||
size->set_val(2048);
|
||||
size->set_value(2048);
|
||||
crop_source->show();
|
||||
size_label->show();
|
||||
size->show();
|
||||
|
@ -587,7 +587,7 @@ void EditorTextureImportDialog::_mode_changed(int p_mode) {
|
|||
if (p_mode==EditorTextureImportPlugin::MODE_LARGE) {
|
||||
|
||||
size_label->set_text(TTR("Cell Size:"));
|
||||
size->set_val(256);
|
||||
size->set_value(256);
|
||||
size_label->show();
|
||||
size->show();
|
||||
|
||||
|
@ -727,7 +727,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
|
|||
size->set_max(16384);
|
||||
|
||||
|
||||
size->set_val(256);
|
||||
size->set_value(256);
|
||||
size_mc=vbc->add_margin_child(TTR("Cell Size:"),size);
|
||||
size_label=vbc->get_child(size_mc->get_index()-1)->cast_to<Label>();
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ void OutputStrings::_notification(int p_what) {
|
|||
if (following) {
|
||||
|
||||
updating=true;
|
||||
v_scroll->set_val( v_scroll->get_max() - v_scroll->get_page() );
|
||||
v_scroll->set_value( v_scroll->get_max() - v_scroll->get_page() );
|
||||
updating=false;
|
||||
}
|
||||
|
||||
|
@ -85,8 +85,8 @@ void OutputStrings::_notification(int p_what) {
|
|||
// int lines = (size_height-(int)margin.y) / font_height;
|
||||
Point2 ofs=tree_st->get_offset();
|
||||
|
||||
LineMap::Element *E = line_map.find(v_scroll->get_val());
|
||||
float h_ofs = (int)h_scroll->get_val();
|
||||
LineMap::Element *E = line_map.find(v_scroll->get_value());
|
||||
float h_ofs = (int)h_scroll->get_value();
|
||||
Point2 icon_ofs=Point2(0,(font_height-(int)icon_error->get_height())/2);
|
||||
|
||||
while( E && ofs.y < (size_height-(int)margin.y) ) {
|
||||
|
|
|
@ -77,14 +77,14 @@ void AnimationPlayerEditor::_notification(int p_what) {
|
|||
}
|
||||
}
|
||||
}
|
||||
frame->set_val(player->get_current_animation_pos());
|
||||
frame->set_value(player->get_current_animation_pos());
|
||||
key_editor->set_anim_pos(player->get_current_animation_pos());
|
||||
EditorNode::get_singleton()->get_property_editor()->refresh();
|
||||
|
||||
} else if (last_active) {
|
||||
//need the last frame after it stopped
|
||||
|
||||
frame->set_val(player->get_current_animation_pos());
|
||||
frame->set_value(player->get_current_animation_pos());
|
||||
}
|
||||
|
||||
last_active=player->is_playing();
|
||||
|
@ -1108,7 +1108,7 @@ void AnimationPlayerEditor::_animation_key_editor_seek(float p_pos,bool p_drag)
|
|||
return;
|
||||
|
||||
updating=true;
|
||||
frame->set_val(p_pos);
|
||||
frame->set_value(p_pos);
|
||||
updating=false;
|
||||
_seek_value_changed(p_pos,!p_drag);
|
||||
|
||||
|
|
|
@ -183,20 +183,20 @@ void AnimationTreeEditor::_edit_dialog_changed() {
|
|||
|
||||
case AnimationTreePlayer::NODE_MIX:
|
||||
|
||||
anim_tree->mix_node_set_amount(edited_node,edit_scroll[0]->get_val());
|
||||
anim_tree->mix_node_set_amount(edited_node,edit_scroll[0]->get_value());
|
||||
break;
|
||||
case AnimationTreePlayer::NODE_BLEND2:
|
||||
anim_tree->blend2_node_set_amount(edited_node,edit_scroll[0]->get_val());
|
||||
anim_tree->blend2_node_set_amount(edited_node,edit_scroll[0]->get_value());
|
||||
|
||||
break;
|
||||
|
||||
case AnimationTreePlayer::NODE_BLEND3:
|
||||
anim_tree->blend3_node_set_amount(edited_node,edit_scroll[0]->get_val());
|
||||
anim_tree->blend3_node_set_amount(edited_node,edit_scroll[0]->get_value());
|
||||
|
||||
break;
|
||||
case AnimationTreePlayer::NODE_BLEND4:
|
||||
|
||||
anim_tree->blend4_node_set_amount(edited_node,Point2(edit_scroll[0]->get_val(),edit_scroll[1]->get_val()));
|
||||
anim_tree->blend4_node_set_amount(edited_node,Point2(edit_scroll[0]->get_value(),edit_scroll[1]->get_value()));
|
||||
|
||||
break;
|
||||
|
||||
|
@ -265,7 +265,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
|
|||
filter_button->hide();
|
||||
edit_check->hide();;
|
||||
|
||||
Point2 pos = anim_tree->node_get_pos(edited_node)-Point2(h_scroll->get_val(),v_scroll->get_val());
|
||||
Point2 pos = anim_tree->node_get_pos(edited_node)-Point2(h_scroll->get_value(),v_scroll->get_value());
|
||||
Ref<StyleBox> style = get_stylebox("panel","PopupMenu");
|
||||
Size2 size = get_node_size(edited_node);
|
||||
Point2 popup_pos( pos.x+style->get_margin(MARGIN_LEFT), pos.y+size.y-style->get_margin(MARGIN_BOTTOM));
|
||||
|
@ -380,7 +380,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
|
|||
edit_label[0]->show();
|
||||
edit_scroll[0]->set_min(0);
|
||||
edit_scroll[0]->set_max(1);
|
||||
edit_scroll[0]->set_val(anim_tree->mix_node_get_amount(edited_node));
|
||||
edit_scroll[0]->set_value(anim_tree->mix_node_get_amount(edited_node));
|
||||
edit_scroll[0]->set_begin(Point2(15,25));
|
||||
edit_scroll[0]->show();
|
||||
edit_dialog->set_size(Size2(150,50));
|
||||
|
@ -392,7 +392,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
|
|||
edit_label[0]->show();
|
||||
edit_scroll[0]->set_min(0);
|
||||
edit_scroll[0]->set_max(1);
|
||||
edit_scroll[0]->set_val(anim_tree->blend2_node_get_amount(edited_node));
|
||||
edit_scroll[0]->set_value(anim_tree->blend2_node_get_amount(edited_node));
|
||||
edit_scroll[0]->set_begin(Point2(15,25));
|
||||
edit_scroll[0]->show();
|
||||
filter_button->set_begin(Point2(10,47));
|
||||
|
@ -407,7 +407,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
|
|||
edit_label[0]->show();
|
||||
edit_scroll[0]->set_min(-1);
|
||||
edit_scroll[0]->set_max(1);
|
||||
edit_scroll[0]->set_val(anim_tree->blend3_node_get_amount(edited_node));
|
||||
edit_scroll[0]->set_value(anim_tree->blend3_node_get_amount(edited_node));
|
||||
edit_scroll[0]->set_begin(Point2(15,25));
|
||||
edit_scroll[0]->show();
|
||||
edit_dialog->set_size(Size2(150,50));
|
||||
|
@ -420,7 +420,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
|
|||
edit_label[0]->show();
|
||||
edit_scroll[0]->set_min(0);
|
||||
edit_scroll[0]->set_max(1);
|
||||
edit_scroll[0]->set_val(anim_tree->blend4_node_get_amount(edited_node).x);
|
||||
edit_scroll[0]->set_value(anim_tree->blend4_node_get_amount(edited_node).x);
|
||||
edit_scroll[0]->set_begin(Point2(15,25));
|
||||
edit_scroll[0]->show();
|
||||
edit_label[1]->set_text(TTR("Blend 1:"));
|
||||
|
@ -428,7 +428,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
|
|||
edit_label[1]->show();
|
||||
edit_scroll[1]->set_min(0);
|
||||
edit_scroll[1]->set_max(1);
|
||||
edit_scroll[1]->set_val(anim_tree->blend4_node_get_amount(edited_node).y);
|
||||
edit_scroll[1]->set_value(anim_tree->blend4_node_get_amount(edited_node).y);
|
||||
edit_scroll[1]->set_begin(Point2(15,75));
|
||||
edit_scroll[1]->show();
|
||||
edit_dialog->set_size(Size2(150,100));
|
||||
|
@ -500,7 +500,7 @@ void AnimationTreeEditor::_draw_node(const StringName& p_node) {
|
|||
|
||||
}
|
||||
|
||||
pos-=Point2(h_scroll->get_val(),v_scroll->get_val());
|
||||
pos-=Point2(h_scroll->get_value(),v_scroll->get_value());
|
||||
|
||||
style->draw(ci,Rect2(pos,size));
|
||||
|
||||
|
@ -644,7 +644,7 @@ AnimationTreeEditor::ClickType AnimationTreeEditor::_locate_click(const Point2&
|
|||
Point2 pos = anim_tree->node_get_pos(node);
|
||||
Size2 size = get_node_size(node);
|
||||
|
||||
pos-=Point2(h_scroll->get_val(),v_scroll->get_val());
|
||||
pos-=Point2(h_scroll->get_value(),v_scroll->get_value());
|
||||
|
||||
if (!Rect2(pos,size).has_point(p_click))
|
||||
continue;
|
||||
|
@ -709,7 +709,7 @@ Point2 AnimationTreeEditor::_get_slot_pos(const StringName& p_node,bool p_input,
|
|||
|
||||
}
|
||||
|
||||
pos-=Point2(h_scroll->get_val(),v_scroll->get_val());
|
||||
pos-=Point2(h_scroll->get_value(),v_scroll->get_value());
|
||||
|
||||
|
||||
float w = size.width-style->get_minimum_size().width;
|
||||
|
@ -892,8 +892,8 @@ void AnimationTreeEditor::_input_event(InputEvent p_event) {
|
|||
}
|
||||
if ((p_event.mouse_motion.button_mask&4 || Input::get_singleton()->is_key_pressed(KEY_SPACE))) {
|
||||
|
||||
h_scroll->set_val( h_scroll->get_val() - p_event.mouse_motion.relative_x );
|
||||
v_scroll->set_val( v_scroll->get_val() - p_event.mouse_motion.relative_y );
|
||||
h_scroll->set_value( h_scroll->get_value() - p_event.mouse_motion.relative_x );
|
||||
v_scroll->set_value( v_scroll->get_value() - p_event.mouse_motion.relative_y );
|
||||
update();
|
||||
}
|
||||
|
||||
|
@ -1026,7 +1026,7 @@ void AnimationTreeEditor::_update_scrollbars() {
|
|||
v_scroll->show();
|
||||
v_scroll->set_max(min.height);
|
||||
v_scroll->set_page(size.height - hmin.height);
|
||||
offset.y=v_scroll->get_val();
|
||||
offset.y=v_scroll->get_value();
|
||||
}
|
||||
|
||||
if (min.width < size.width - vmin.width) {
|
||||
|
@ -1038,14 +1038,14 @@ void AnimationTreeEditor::_update_scrollbars() {
|
|||
h_scroll->show();
|
||||
h_scroll->set_max(min.width);
|
||||
h_scroll->set_page(size.width - vmin.width);
|
||||
offset.x=h_scroll->get_val();
|
||||
offset.x=h_scroll->get_value();
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationTreeEditor::_scroll_moved(float) {
|
||||
|
||||
offset.x=h_scroll->get_val();
|
||||
offset.y=v_scroll->get_val();
|
||||
offset.x=h_scroll->get_value();
|
||||
offset.y=v_scroll->get_value();
|
||||
update();
|
||||
}
|
||||
|
||||
|
|
|
@ -149,21 +149,21 @@ public:
|
|||
}
|
||||
|
||||
void set_fields(const Point2 p_grid_offset, const Size2 p_grid_step, const float p_rotation_offset, const float p_rotation_step) {
|
||||
grid_offset_x->set_val(p_grid_offset.x);
|
||||
grid_offset_y->set_val(p_grid_offset.y);
|
||||
grid_step_x->set_val(p_grid_step.x);
|
||||
grid_step_y->set_val(p_grid_step.y);
|
||||
rotation_offset->set_val(p_rotation_offset * (180 / Math_PI));
|
||||
rotation_step->set_val(p_rotation_step * (180 / Math_PI));
|
||||
grid_offset_x->set_value(p_grid_offset.x);
|
||||
grid_offset_y->set_value(p_grid_offset.y);
|
||||
grid_step_x->set_value(p_grid_step.x);
|
||||
grid_step_y->set_value(p_grid_step.y);
|
||||
rotation_offset->set_value(p_rotation_offset * (180 / Math_PI));
|
||||
rotation_step->set_value(p_rotation_step * (180 / Math_PI));
|
||||
}
|
||||
|
||||
void get_fields(Point2 &p_grid_offset, Size2 &p_grid_step, float &p_rotation_offset, float &p_rotation_step) {
|
||||
p_grid_offset.x = grid_offset_x->get_val();
|
||||
p_grid_offset.y = grid_offset_y->get_val();
|
||||
p_grid_step.x = grid_step_x->get_val();
|
||||
p_grid_step.y = grid_step_y->get_val();
|
||||
p_rotation_offset = rotation_offset->get_val() / (180 / Math_PI);
|
||||
p_rotation_step = rotation_step->get_val() / (180 / Math_PI);
|
||||
p_grid_offset.x = grid_offset_x->get_value();
|
||||
p_grid_offset.y = grid_offset_y->get_value();
|
||||
p_grid_step.x = grid_step_x->get_value();
|
||||
p_grid_step.y = grid_step_y->get_value();
|
||||
p_rotation_offset = rotation_offset->get_value() / (180 / Math_PI);
|
||||
p_rotation_step = rotation_step->get_value() / (180 / Math_PI);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -179,7 +179,7 @@ void CanvasItemEditor::_edit_set_pivot(const Vector2& mouse_pos) {
|
|||
if (n2d && n2d->edit_has_pivot()) {
|
||||
|
||||
Vector2 offset = n2d->edit_get_pivot();
|
||||
Vector2 gpos = n2d->get_global_pos();
|
||||
Vector2 gpos = n2d->get_global_position();
|
||||
|
||||
Vector2 local_mouse_pos = n2d->get_canvas_transform().affine_inverse().xform(mouse_pos);
|
||||
|
||||
|
@ -194,8 +194,8 @@ void CanvasItemEditor::_edit_set_pivot(const Vector2& mouse_pos) {
|
|||
if (!n2dc)
|
||||
continue;
|
||||
|
||||
undo_redo->add_do_method(n2dc,"set_global_pos",n2dc->get_global_pos());
|
||||
undo_redo->add_undo_method(n2dc,"set_global_pos",n2dc->get_global_pos());
|
||||
undo_redo->add_do_method(n2dc,"set_global_pos",n2dc->get_global_position());
|
||||
undo_redo->add_undo_method(n2dc,"set_global_pos",n2dc->get_global_position());
|
||||
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ Dictionary CanvasItemEditor::get_state() const {
|
|||
|
||||
Dictionary state;
|
||||
state["zoom"]=zoom;
|
||||
state["ofs"]=Point2(h_scroll->get_val(),v_scroll->get_val());
|
||||
state["ofs"]=Point2(h_scroll->get_value(),v_scroll->get_value());
|
||||
// state["ofs"]=-transform.get_origin();
|
||||
state["snap_offset"]=snap_offset;
|
||||
state["snap_step"]=snap_step;
|
||||
|
@ -310,8 +310,8 @@ void CanvasItemEditor::set_state(const Dictionary& p_state){
|
|||
if (state.has("ofs")) {
|
||||
_update_scrollbars(); // i wonder how safe is calling this here..
|
||||
Point2 ofs=p_state["ofs"];
|
||||
h_scroll->set_val(ofs.x);
|
||||
v_scroll->set_val(ofs.y);
|
||||
h_scroll->set_value(ofs.x);
|
||||
v_scroll->set_value(ofs.y);
|
||||
}
|
||||
|
||||
if (state.has("snap_step")) {
|
||||
|
@ -709,10 +709,10 @@ void CanvasItemEditor::_key_move(const Vector2& p_dir, bool p_snap, KeyMoveMODE
|
|||
|
||||
if (p_move_mode == MOVE_LOCAL_WITH_ROT) {
|
||||
Matrix32 m;
|
||||
m.rotate( node_2d->get_rot() );
|
||||
m.rotate( node_2d->get_rotation() );
|
||||
drag = m.xform(drag);
|
||||
}
|
||||
node_2d->set_pos(node_2d->get_pos() + drag);
|
||||
node_2d->set_position(node_2d->get_position() + drag);
|
||||
|
||||
} else if (Control *control = canvas_item->cast_to<Control>()) {
|
||||
|
||||
|
@ -961,7 +961,7 @@ void CanvasItemEditor::_dialog_value_changed(double) {
|
|||
|
||||
case ZOOM_SET: {
|
||||
|
||||
zoom=dialog_val->get_val()/100.0;
|
||||
zoom=dialog_val->get_value()/100.0;
|
||||
_update_scroll(0);
|
||||
viewport->update();
|
||||
|
||||
|
@ -1096,8 +1096,8 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
|
|||
{
|
||||
Point2 ofs(b.x,b.y);
|
||||
ofs = ofs/prev_zoom - ofs/zoom;
|
||||
h_scroll->set_val( h_scroll->get_val() + ofs.x );
|
||||
v_scroll->set_val( v_scroll->get_val() + ofs.y );
|
||||
h_scroll->set_value( h_scroll->get_value() + ofs.x );
|
||||
v_scroll->set_value( v_scroll->get_value() + ofs.y );
|
||||
}
|
||||
_update_scroll(0);
|
||||
viewport->update();
|
||||
|
@ -1114,8 +1114,8 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
|
|||
{
|
||||
Point2 ofs(b.x,b.y);
|
||||
ofs = ofs/prev_zoom - ofs/zoom;
|
||||
h_scroll->set_val( h_scroll->get_val() + ofs.x );
|
||||
v_scroll->set_val( v_scroll->get_val() + ofs.y );
|
||||
h_scroll->set_value( h_scroll->get_value() + ofs.x );
|
||||
v_scroll->set_value( v_scroll->get_value() + ofs.y );
|
||||
}
|
||||
|
||||
_update_scroll(0);
|
||||
|
@ -1355,7 +1355,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
|
|||
if (!pi)
|
||||
break;
|
||||
|
||||
float len=pi->get_global_transform().get_origin().distance_to(b->get_global_pos());
|
||||
float len=pi->get_global_transform().get_origin().distance_to(b->get_global_position());
|
||||
b=pi->cast_to<Node2D>();
|
||||
if (!b)
|
||||
break;
|
||||
|
@ -1554,8 +1554,8 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
|
|||
|
||||
if ( (m.button_mask&BUTTON_MASK_LEFT && tool == TOOL_PAN) || m.button_mask&BUTTON_MASK_MIDDLE || (m.button_mask&BUTTON_MASK_LEFT && Input::get_singleton()->is_key_pressed(KEY_SPACE))) {
|
||||
|
||||
h_scroll->set_val( h_scroll->get_val() - m.relative_x/zoom);
|
||||
v_scroll->set_val( v_scroll->get_val() - m.relative_y/zoom);
|
||||
h_scroll->set_value( h_scroll->get_value() - m.relative_x/zoom);
|
||||
v_scroll->set_value( v_scroll->get_value() - m.relative_y/zoom);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -1604,7 +1604,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
|
|||
Matrix32 rot;
|
||||
rot.elements[1] = (dfrom - center).normalized();
|
||||
rot.elements[0] = rot.elements[1].tangent();
|
||||
node->set_rot(snap_angle(rot.xform_inv(dto-center).angle() + node->get_rot(), node->get_rot()));
|
||||
node->set_rotation(snap_angle(rot.xform_inv(dto-center).angle() + node->get_rotation(), node->get_rotation()));
|
||||
display_rotate_to = dto;
|
||||
display_rotate_from = center;
|
||||
viewport->update();
|
||||
|
@ -1854,11 +1854,11 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
|
|||
|
||||
if (!E->prev()) {
|
||||
//last goes to what it was
|
||||
final_xform.set_origin(n->get_global_pos());
|
||||
final_xform.set_origin(n->get_global_position());
|
||||
n->set_global_transform(final_xform);
|
||||
|
||||
} else {
|
||||
Vector2 rel = (E->prev()->get().node->get_global_pos() - n->get_global_pos()).normalized();
|
||||
Vector2 rel = (E->prev()->get().node->get_global_position() - n->get_global_position()).normalized();
|
||||
Vector2 rel2 = (E->prev()->get().pos - E->get().pos).normalized();
|
||||
float rot = rel.angle_to(rel2);
|
||||
if (n->get_global_transform().basis_determinant()<0) {
|
||||
|
@ -2147,8 +2147,8 @@ void CanvasItemEditor::_viewport_draw() {
|
|||
if (!pn2d)
|
||||
continue;
|
||||
|
||||
Vector2 from = transform.xform(pn2d->get_global_pos());
|
||||
Vector2 to = transform.xform(n2d->get_global_pos());
|
||||
Vector2 from = transform.xform(pn2d->get_global_position());
|
||||
Vector2 to = transform.xform(n2d->get_global_position());
|
||||
|
||||
E->get().from=from;
|
||||
E->get().to=to;
|
||||
|
@ -2456,13 +2456,13 @@ void CanvasItemEditor::_update_scrollbars() {
|
|||
v_scroll->set_page(local_rect.size.y/zoom);
|
||||
if (first_update) {
|
||||
//so 0,0 is visible
|
||||
v_scroll->set_val(-10);
|
||||
h_scroll->set_val(-10);
|
||||
v_scroll->set_value(-10);
|
||||
h_scroll->set_value(-10);
|
||||
first_update=false;
|
||||
|
||||
}
|
||||
|
||||
ofs.y=v_scroll->get_val();
|
||||
ofs.y=v_scroll->get_value();
|
||||
}
|
||||
|
||||
if (canvas_item_rect.size.width <= (local_rect.size.x/zoom)) {
|
||||
|
@ -2475,7 +2475,7 @@ void CanvasItemEditor::_update_scrollbars() {
|
|||
h_scroll->set_min(canvas_item_rect.pos.x);
|
||||
h_scroll->set_max(canvas_item_rect.pos.x+canvas_item_rect.size.x);
|
||||
h_scroll->set_page(local_rect.size.x/zoom);
|
||||
ofs.x=h_scroll->get_val();
|
||||
ofs.x=h_scroll->get_value();
|
||||
}
|
||||
|
||||
// transform=Matrix32();
|
||||
|
@ -2497,8 +2497,8 @@ void CanvasItemEditor::_update_scroll(float) {
|
|||
return;
|
||||
|
||||
Point2 ofs;
|
||||
ofs.x=h_scroll->get_val();
|
||||
ofs.y=v_scroll->get_val();
|
||||
ofs.x=h_scroll->get_value();
|
||||
ofs.y=v_scroll->get_value();
|
||||
|
||||
// current_window->set_scroll(-ofs);
|
||||
|
||||
|
@ -2611,7 +2611,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
|
|||
dialog_val->set_min(0.1);
|
||||
dialog_val->set_step(0.1);
|
||||
dialog_val->set_max(800);
|
||||
dialog_val->set_val(zoom*100);
|
||||
dialog_val->set_value(zoom*100);
|
||||
value_dialog->popup_centered(Size2(200,85));
|
||||
updating_value_dialog=false;
|
||||
|
||||
|
@ -2833,9 +2833,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
|
|||
Node2D *n2d = canvas_item->cast_to<Node2D>();
|
||||
|
||||
if (key_pos)
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/pos",n2d->get_pos(),existing);
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/pos",n2d->get_position(),existing);
|
||||
if (key_rot)
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/rot",Math::rad2deg(n2d->get_rot()),existing);
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/rot",Math::rad2deg(n2d->get_rotation()),existing);
|
||||
if (key_scale)
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/scale",n2d->get_scale(),existing);
|
||||
|
||||
|
@ -2865,9 +2865,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
|
|||
for(List<Node2D*>::Element *F=ik_chain.front();F;F=F->next()) {
|
||||
|
||||
if (key_pos)
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/pos",F->get()->get_pos(),existing);
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/pos",F->get()->get_position(),existing);
|
||||
if (key_rot)
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/rot",Math::rad2deg(F->get()->get_rot()),existing);
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/rot",Math::rad2deg(F->get()->get_rotation()),existing);
|
||||
if (key_scale)
|
||||
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/scale",F->get()->get_scale(),existing);
|
||||
|
||||
|
@ -2947,8 +2947,8 @@ void CanvasItemEditor::_popup_callback(int p_op) {
|
|||
|
||||
Node2D *n2d = canvas_item->cast_to<Node2D>();
|
||||
PoseClipboard pc;
|
||||
pc.pos=n2d->get_pos();
|
||||
pc.rot=n2d->get_rot();
|
||||
pc.pos=n2d->get_position();
|
||||
pc.rot=n2d->get_rotation();
|
||||
pc.scale=n2d->get_scale();
|
||||
pc.id=n2d->get_instance_ID();
|
||||
pose_clipboard.push_back(pc);
|
||||
|
@ -2974,8 +2974,8 @@ void CanvasItemEditor::_popup_callback(int p_op) {
|
|||
undo_redo->add_do_method(n2d,"set_pos",E->get().pos);
|
||||
undo_redo->add_do_method(n2d,"set_rot",E->get().rot);
|
||||
undo_redo->add_do_method(n2d,"set_scale",E->get().scale);
|
||||
undo_redo->add_undo_method(n2d,"set_pos",n2d->get_pos());
|
||||
undo_redo->add_undo_method(n2d,"set_rot",n2d->get_rot());
|
||||
undo_redo->add_undo_method(n2d,"set_pos",n2d->get_position());
|
||||
undo_redo->add_undo_method(n2d,"set_rot",n2d->get_rotation());
|
||||
undo_redo->add_undo_method(n2d,"set_scale",n2d->get_scale());
|
||||
}
|
||||
undo_redo->commit_action();
|
||||
|
@ -2998,9 +2998,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
|
|||
Node2D *n2d = canvas_item->cast_to<Node2D>();
|
||||
|
||||
if (key_pos)
|
||||
n2d->set_pos(Vector2());
|
||||
n2d->set_position(Vector2());
|
||||
if (key_rot)
|
||||
n2d->set_rot(0);
|
||||
n2d->set_rotation(0);
|
||||
if (key_scale)
|
||||
n2d->set_scale(Vector2(1,1));
|
||||
} else if (canvas_item->cast_to<Control>()) {
|
||||
|
@ -3180,8 +3180,8 @@ void CanvasItemEditor::_focus_selection(int p_op) {
|
|||
|
||||
center = rect.pos + rect.size/2;
|
||||
Vector2 offset = viewport->get_size()/2 - editor->get_scene_root()->get_global_canvas_transform().xform(center);
|
||||
h_scroll->set_val(h_scroll->get_val() - offset.x/zoom);
|
||||
v_scroll->set_val(v_scroll->get_val() - offset.y/zoom);
|
||||
h_scroll->set_value(h_scroll->get_value() - offset.x/zoom);
|
||||
v_scroll->set_value(v_scroll->get_value() - offset.y/zoom);
|
||||
|
||||
} else { // VIEW_FRAME_TO_SELECTION
|
||||
|
||||
|
@ -3825,7 +3825,7 @@ bool CanvasItemEditorViewport::_create_instance(Node* parent, String& path, cons
|
|||
Point2 pos;
|
||||
Node2D* parent_node2d=parent->cast_to<Node2D>();
|
||||
if (parent_node2d) {
|
||||
pos=parent_node2d->get_global_pos();
|
||||
pos=parent_node2d->get_global_position();
|
||||
} else {
|
||||
Control* parent_control=parent->cast_to<Control>();
|
||||
if (parent_control) {
|
||||
|
@ -3913,7 +3913,7 @@ bool CanvasItemEditorViewport::can_drop_data(const Point2& p_point,const Variant
|
|||
_create_preview(files);
|
||||
}
|
||||
Matrix32 trans=canvas->get_canvas_transform();
|
||||
preview->set_pos((p_point-trans.get_origin())/trans.get_scale().x);
|
||||
preview->set_position((p_point-trans.get_origin())/trans.get_scale().x);
|
||||
label->set_text(vformat(TTR("Adding %s..."),default_type));
|
||||
}
|
||||
return can_instance;
|
||||
|
|
|
@ -189,7 +189,7 @@ void MeshInstanceEditor::_create_outline_mesh() {
|
|||
return;
|
||||
}
|
||||
|
||||
Ref<Mesh> mesho = mesh->create_outline(outline_size->get_val());
|
||||
Ref<Mesh> mesho = mesh->create_outline(outline_size->get_value());
|
||||
|
||||
if (mesho.is_null()) {
|
||||
err_dialog->set_text(TTR("Could not create outline!"));
|
||||
|
@ -255,7 +255,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
|
|||
outline_size->set_min(0.001);
|
||||
outline_size->set_max(1024);
|
||||
outline_size->set_step(0.001);
|
||||
outline_size->set_val(0.05);
|
||||
outline_size->set_value(0.05);
|
||||
outline_dialog_vbc->add_margin_child(TTR("Outline Size:"),outline_size);
|
||||
|
||||
add_child(outline_dialog);
|
||||
|
|
|
@ -193,16 +193,16 @@ void MultiMeshEditor::_populate() {
|
|||
Ref<MultiMesh> multimesh = memnew( MultiMesh );
|
||||
multimesh->set_mesh(mesh);
|
||||
|
||||
int instance_count=populate_amount->get_val();
|
||||
int instance_count=populate_amount->get_value();
|
||||
|
||||
multimesh->set_transform_format(MultiMesh::TRANSFORM_3D);
|
||||
multimesh->set_color_format(MultiMesh::COLOR_NONE);
|
||||
multimesh->set_instance_count(instance_count);
|
||||
|
||||
float _tilt_random = populate_tilt_random->get_val();
|
||||
float _rotate_random = populate_rotate_random->get_val();
|
||||
float _scale_random = populate_scale_random->get_val();
|
||||
float _scale = populate_scale->get_val();
|
||||
float _tilt_random = populate_tilt_random->get_value();
|
||||
float _rotate_random = populate_rotate_random->get_value();
|
||||
float _scale_random = populate_scale_random->get_value();
|
||||
float _scale = populate_scale->get_value();
|
||||
int axis = populate_axis->get_selected();
|
||||
|
||||
Transform axis_xform;
|
||||
|
@ -283,11 +283,11 @@ void MultiMeshEditor::_menu_option(int p_option) {
|
|||
surface_source->set_text("..");
|
||||
mesh_source->set_text("..");
|
||||
populate_axis->select(1);
|
||||
populate_rotate_random->set_val(0);
|
||||
populate_tilt_random->set_val(0);
|
||||
populate_scale_random->set_val(0);
|
||||
populate_scale->set_val(1);
|
||||
populate_amount->set_val(128);
|
||||
populate_rotate_random->set_value(0);
|
||||
populate_tilt_random->set_value(0);
|
||||
populate_scale_random->set_value(0);
|
||||
populate_scale->set_value(1);
|
||||
populate_amount->set_value(128);
|
||||
|
||||
_last_pp_node=node;
|
||||
}
|
||||
|
@ -387,7 +387,7 @@ MultiMeshEditor::MultiMeshEditor() {
|
|||
populate_scale_random = memnew( SpinBox );
|
||||
populate_scale_random->set_min(0);
|
||||
populate_scale_random->set_max(1);
|
||||
populate_scale_random->set_val(0);
|
||||
populate_scale_random->set_value(0);
|
||||
populate_scale_random->set_step(0.01);
|
||||
|
||||
vbc->add_margin_child(TTR("Random Scale:"),populate_scale_random);
|
||||
|
@ -395,7 +395,7 @@ MultiMeshEditor::MultiMeshEditor() {
|
|||
populate_scale = memnew( SpinBox );
|
||||
populate_scale->set_min(0.001);
|
||||
populate_scale->set_max(4096);
|
||||
populate_scale->set_val(1);
|
||||
populate_scale->set_value(1);
|
||||
populate_scale->set_step(0.01);
|
||||
|
||||
vbc->add_margin_child(TTR("Scale:"),populate_scale);
|
||||
|
@ -407,7 +407,7 @@ MultiMeshEditor::MultiMeshEditor() {
|
|||
populate_amount->set_end( Point2(5,237));
|
||||
populate_amount->set_min(1);
|
||||
populate_amount->set_max(65536);
|
||||
populate_amount->set_val(128);
|
||||
populate_amount->set_value(128);
|
||||
vbc->add_margin_child(TTR("Amount:"),populate_amount);
|
||||
|
||||
populate_dialog->get_ok()->set_text(TTR("Populate"));
|
||||
|
|
|
@ -62,7 +62,7 @@ void Particles2DEditorPlugin::_file_selected(const String& p_file) {
|
|||
|
||||
print_line("file: "+p_file);
|
||||
|
||||
int epc=epoints->get_val();
|
||||
int epc=epoints->get_value();
|
||||
|
||||
Image img;
|
||||
Error err = ImageLoader::load_image(p_file,&img);
|
||||
|
@ -189,7 +189,7 @@ Particles2DEditorPlugin::Particles2DEditorPlugin(EditorNode *p_node) {
|
|||
epoints->set_min(1);
|
||||
epoints->set_max(8192);
|
||||
epoints->set_step(1);
|
||||
epoints->set_val(512);
|
||||
epoints->set_value(512);
|
||||
file->get_vbox()->add_margin_child(TTR("Generated Point Count:"),epoints);
|
||||
}
|
||||
|
||||
|
|
|
@ -567,10 +567,10 @@ void Polygon2DEditor::_uv_input(const InputEvent& p_input) {
|
|||
|
||||
} else if (mb.button_index==BUTTON_WHEEL_UP && mb.pressed) {
|
||||
|
||||
uv_zoom->set_val( uv_zoom->get_val()/0.9 );
|
||||
uv_zoom->set_value( uv_zoom->get_value()/0.9 );
|
||||
} else if (mb.button_index==BUTTON_WHEEL_DOWN && mb.pressed) {
|
||||
|
||||
uv_zoom->set_val( uv_zoom->get_val()*0.9);
|
||||
uv_zoom->set_value( uv_zoom->get_value()*0.9);
|
||||
}
|
||||
|
||||
} else if (p_input.type==InputEvent::MOUSE_MOTION) {
|
||||
|
@ -580,8 +580,8 @@ void Polygon2DEditor::_uv_input(const InputEvent& p_input) {
|
|||
if (mm.button_mask&BUTTON_MASK_MIDDLE || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
|
||||
|
||||
Vector2 drag(mm.relative_x,mm.relative_y);
|
||||
uv_hscroll->set_val( uv_hscroll->get_val()-drag.x );
|
||||
uv_vscroll->set_val( uv_vscroll->get_val()-drag.y );
|
||||
uv_hscroll->set_value( uv_hscroll->get_value()-drag.x );
|
||||
uv_vscroll->set_value( uv_vscroll->get_value()-drag.y );
|
||||
|
||||
} else if (uv_drag) {
|
||||
|
||||
|
@ -668,9 +668,9 @@ void Polygon2DEditor::_uv_scroll_changed(float) {
|
|||
if (updating_uv_scroll)
|
||||
return;
|
||||
|
||||
uv_draw_ofs.x=uv_hscroll->get_val();
|
||||
uv_draw_ofs.y=uv_vscroll->get_val();
|
||||
uv_draw_zoom=uv_zoom->get_val();
|
||||
uv_draw_ofs.x=uv_hscroll->get_value();
|
||||
uv_draw_ofs.y=uv_vscroll->get_value();
|
||||
uv_draw_zoom=uv_zoom->get_value();
|
||||
uv_edit_draw->update();
|
||||
}
|
||||
|
||||
|
@ -735,13 +735,13 @@ void Polygon2DEditor::_uv_draw() {
|
|||
uv_hscroll->set_min(rect.pos.x);
|
||||
uv_hscroll->set_max(rect.pos.x+rect.size.x);
|
||||
uv_hscroll->set_page(uv_edit_draw->get_size().x);
|
||||
uv_hscroll->set_val(uv_draw_ofs.x);
|
||||
uv_hscroll->set_value(uv_draw_ofs.x);
|
||||
uv_hscroll->set_step(0.001);
|
||||
|
||||
uv_vscroll->set_min(rect.pos.y);
|
||||
uv_vscroll->set_max(rect.pos.y+rect.size.y);
|
||||
uv_vscroll->set_page(uv_edit_draw->get_size().y);
|
||||
uv_vscroll->set_val(uv_draw_ofs.y);
|
||||
uv_vscroll->set_value(uv_draw_ofs.y);
|
||||
uv_vscroll->set_step(0.001);
|
||||
updating_uv_scroll=false;
|
||||
|
||||
|
@ -914,7 +914,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
|
|||
sb_off_x->set_min(-256);
|
||||
sb_off_x->set_max(256);
|
||||
sb_off_x->set_step(1);
|
||||
sb_off_x->set_val(snap_offset.x);
|
||||
sb_off_x->set_value(snap_offset.x);
|
||||
sb_off_x->set_suffix("px");
|
||||
sb_off_x->connect("value_changed", this, "_set_snap_off_x");
|
||||
uv_mode_hb->add_child(sb_off_x);
|
||||
|
@ -923,7 +923,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
|
|||
sb_off_y->set_min(-256);
|
||||
sb_off_y->set_max(256);
|
||||
sb_off_y->set_step(1);
|
||||
sb_off_y->set_val(snap_offset.y);
|
||||
sb_off_y->set_value(snap_offset.y);
|
||||
sb_off_y->set_suffix("px");
|
||||
sb_off_y->connect("value_changed", this, "_set_snap_off_y");
|
||||
uv_mode_hb->add_child(sb_off_y);
|
||||
|
@ -935,7 +935,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
|
|||
sb_step_x->set_min(-256);
|
||||
sb_step_x->set_max(256);
|
||||
sb_step_x->set_step(1);
|
||||
sb_step_x->set_val(snap_step.x);
|
||||
sb_step_x->set_value(snap_step.x);
|
||||
sb_step_x->set_suffix("px");
|
||||
sb_step_x->connect("value_changed", this, "_set_snap_step_x");
|
||||
uv_mode_hb->add_child(sb_step_x);
|
||||
|
@ -944,7 +944,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
|
|||
sb_step_y->set_min(-256);
|
||||
sb_step_y->set_max(256);
|
||||
sb_step_y->set_step(1);
|
||||
sb_step_y->set_val(snap_step.y);
|
||||
sb_step_y->set_value(snap_step.y);
|
||||
sb_step_y->set_suffix("px");
|
||||
sb_step_y->connect("value_changed", this, "_set_snap_step_y");
|
||||
uv_mode_hb->add_child(sb_step_y);
|
||||
|
@ -955,7 +955,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
|
|||
uv_zoom = memnew( HSlider );
|
||||
uv_zoom->set_min(0.01);
|
||||
uv_zoom->set_max(4);
|
||||
uv_zoom->set_val(1);
|
||||
uv_zoom->set_value(1);
|
||||
uv_zoom->set_step(0.01);
|
||||
uv_mode_hb->add_child(uv_zoom);
|
||||
uv_zoom->set_custom_minimum_size(Size2(200,0));
|
||||
|
|
|
@ -2116,7 +2116,7 @@ void SpatialEditorViewport::_init_gizmo_instance(int p_idx) {
|
|||
move_gizmo_instance[i]=VS::get_singleton()->instance_create();
|
||||
VS::get_singleton()->instance_set_base(move_gizmo_instance[i],spatial_editor->get_move_gizmo(i)->get_rid());
|
||||
VS::get_singleton()->instance_set_scenario(move_gizmo_instance[i],get_tree()->get_root()->get_world()->get_scenario());
|
||||
VS::get_singleton()->instance_geometry_set_flag(move_gizmo_instance[i],VS::INSTANCE_FLAG_VISIBLE,false);
|
||||
VS::get_singleton()->instance_set_visible(move_gizmo_instance[i],false);
|
||||
//VS::get_singleton()->instance_geometry_set_flag(move_gizmo_instance[i],VS::INSTANCE_FLAG_DEPH_SCALE,true);
|
||||
VS::get_singleton()->instance_geometry_set_cast_shadows_setting(move_gizmo_instance[i], VS::SHADOW_CASTING_SETTING_OFF);
|
||||
VS::get_singleton()->instance_set_layer_mask(move_gizmo_instance[i],layer);
|
||||
|
@ -2124,7 +2124,7 @@ void SpatialEditorViewport::_init_gizmo_instance(int p_idx) {
|
|||
rotate_gizmo_instance[i]=VS::get_singleton()->instance_create();
|
||||
VS::get_singleton()->instance_set_base(rotate_gizmo_instance[i],spatial_editor->get_rotate_gizmo(i)->get_rid());
|
||||
VS::get_singleton()->instance_set_scenario(rotate_gizmo_instance[i],get_tree()->get_root()->get_world()->get_scenario());
|
||||
VS::get_singleton()->instance_geometry_set_flag(rotate_gizmo_instance[i],VS::INSTANCE_FLAG_VISIBLE,false);
|
||||
VS::get_singleton()->instance_set_visible(rotate_gizmo_instance[i],false);
|
||||
//VS::get_singleton()->instance_geometry_set_flag(rotate_gizmo_instance[i],VS::INSTANCE_FLAG_DEPH_SCALE,true);
|
||||
VS::get_singleton()->instance_geometry_set_cast_shadows_setting(rotate_gizmo_instance[i], VS::SHADOW_CASTING_SETTING_OFF);
|
||||
VS::get_singleton()->instance_set_layer_mask(rotate_gizmo_instance[i],layer);
|
||||
|
@ -2233,9 +2233,9 @@ void SpatialEditorViewport::update_transform_gizmo_view() {
|
|||
|
||||
for(int i=0;i<3;i++) {
|
||||
VisualServer::get_singleton()->instance_set_transform(move_gizmo_instance[i], xform );
|
||||
VisualServer::get_singleton()->instance_geometry_set_flag(move_gizmo_instance[i],VS::INSTANCE_FLAG_VISIBLE,spatial_editor->is_gizmo_visible()&& (spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_MOVE) );
|
||||
VisualServer::get_singleton()->instance_set_visible(move_gizmo_instance[i],spatial_editor->is_gizmo_visible()&& (spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_MOVE) );
|
||||
VisualServer::get_singleton()->instance_set_transform(rotate_gizmo_instance[i], xform );
|
||||
VisualServer::get_singleton()->instance_geometry_set_flag(rotate_gizmo_instance[i],VS::INSTANCE_FLAG_VISIBLE,spatial_editor->is_gizmo_visible() && (spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_ROTATE) );
|
||||
VisualServer::get_singleton()->instance_set_visible(rotate_gizmo_instance[i],spatial_editor->is_gizmo_visible() && (spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_ROTATE) );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2691,11 +2691,11 @@ void SpatialEditor::set_state(const Dictionary& p_state) {
|
|||
}
|
||||
|
||||
if (d.has("zfar"))
|
||||
settings_zfar->set_val(float(d["zfar"]));
|
||||
settings_zfar->set_value(float(d["zfar"]));
|
||||
if (d.has("znear"))
|
||||
settings_znear->set_val(float(d["znear"]));
|
||||
settings_znear->set_value(float(d["znear"]));
|
||||
if (d.has("fov"))
|
||||
settings_fov->set_val(float(d["fov"]));
|
||||
settings_fov->set_value(float(d["fov"]));
|
||||
|
||||
if (d.has("default_light")) {
|
||||
bool use = d["default_light"];
|
||||
|
@ -2738,7 +2738,7 @@ void SpatialEditor::set_state(const Dictionary& p_state) {
|
|||
|
||||
if (use!=view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_ORIGIN))) {
|
||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_ORIGIN), use );
|
||||
VisualServer::get_singleton()->instance_geometry_set_flag(origin_instance,VS::INSTANCE_FLAG_VISIBLE,use);
|
||||
VisualServer::get_singleton()->instance_set_visible(origin_instance,use);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3121,7 +3121,7 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
|
|||
bool is_checked = view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(p_option) );
|
||||
|
||||
is_checked=!is_checked;
|
||||
VisualServer::get_singleton()->instance_geometry_set_flag(origin_instance,VS::INSTANCE_FLAG_VISIBLE,is_checked);
|
||||
VisualServer::get_singleton()->instance_set_visible(origin_instance,is_checked);
|
||||
|
||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(p_option), is_checked);
|
||||
} break;
|
||||
|
@ -3133,7 +3133,7 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
|
|||
|
||||
for(int i=0;i<3;++i) {
|
||||
if (grid_enable[i]) {
|
||||
VisualServer::get_singleton()->instance_geometry_set_flag(grid_instance[i],VS::INSTANCE_FLAG_VISIBLE,grid_enabled);
|
||||
VisualServer::get_singleton()->instance_set_visible(grid_instance[i],grid_enabled);
|
||||
grid_visible[i]=grid_enabled;
|
||||
}
|
||||
}
|
||||
|
@ -3225,7 +3225,7 @@ void SpatialEditor::_init_indicators() {
|
|||
|
||||
grid_visible[i]=false;
|
||||
grid_enable[i]=false;
|
||||
VisualServer::get_singleton()->instance_geometry_set_flag(grid_instance[i],VS::INSTANCE_FLAG_VISIBLE,false);
|
||||
VisualServer::get_singleton()->instance_set_visible(grid_instance[i],false);
|
||||
VisualServer::get_singleton()->instance_geometry_set_cast_shadows_setting(grid_instance[i], VS::SHADOW_CASTING_SETTING_OFF);
|
||||
VS::get_singleton()->instance_set_layer_mask(grid_instance[i], 1 << SpatialEditorViewport::GIZMO_GRID_LAYER);
|
||||
|
||||
|
@ -3252,7 +3252,7 @@ void SpatialEditor::_init_indicators() {
|
|||
|
||||
|
||||
|
||||
VisualServer::get_singleton()->instance_geometry_set_flag(grid_instance[1],VS::INSTANCE_FLAG_VISIBLE,true);
|
||||
VisualServer::get_singleton()->instance_set_visible(grid_instance[1],true);
|
||||
grid_enable[1]=true;
|
||||
grid_visible[1]=true;
|
||||
grid_enabled=true;
|
||||
|
@ -3721,9 +3721,9 @@ void SpatialEditor::_bind_methods() {
|
|||
|
||||
void SpatialEditor::clear() {
|
||||
|
||||
settings_fov->set_val(EDITOR_DEF("3d_editor/default_fov",60.0));
|
||||
settings_znear->set_val(EDITOR_DEF("3d_editor/default_z_near",0.1));
|
||||
settings_zfar->set_val(EDITOR_DEF("3d_editor/default_z_far",1500.0));
|
||||
settings_fov->set_value(EDITOR_DEF("3d_editor/default_fov",60.0));
|
||||
settings_znear->set_value(EDITOR_DEF("3d_editor/default_z_near",0.1));
|
||||
settings_zfar->set_value(EDITOR_DEF("3d_editor/default_z_far",1500.0));
|
||||
|
||||
for(int i=0;i<4;i++) {
|
||||
viewports[i]->reset();
|
||||
|
@ -3733,11 +3733,11 @@ void SpatialEditor::clear() {
|
|||
_menu_item_pressed(MENU_VIEW_DISPLAY_NORMAL);
|
||||
|
||||
|
||||
VisualServer::get_singleton()->instance_geometry_set_flag(origin_instance,VS::INSTANCE_FLAG_VISIBLE,true);
|
||||
VisualServer::get_singleton()->instance_set_visible(origin_instance,true);
|
||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_ORIGIN), true);
|
||||
for(int i=0;i<3;++i) {
|
||||
if (grid_enable[i]) {
|
||||
VisualServer::get_singleton()->instance_geometry_set_flag(grid_instance[i],VS::INSTANCE_FLAG_VISIBLE,true);
|
||||
VisualServer::get_singleton()->instance_set_visible(grid_instance[i],true);
|
||||
grid_visible[i]=true;
|
||||
}
|
||||
}
|
||||
|
@ -4045,21 +4045,21 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
|
|||
settings_fov->set_max(179);
|
||||
settings_fov->set_min(1);
|
||||
settings_fov->set_step(0.01);
|
||||
settings_fov->set_val(EDITOR_DEF("3d_editor/default_fov",60.0));
|
||||
settings_fov->set_value(EDITOR_DEF("3d_editor/default_fov",60.0));
|
||||
settings_vbc->add_margin_child(TTR("Perspective FOV (deg.):"),settings_fov);
|
||||
|
||||
settings_znear = memnew( SpinBox );
|
||||
settings_znear->set_max(10000);
|
||||
settings_znear->set_min(0.1);
|
||||
settings_znear->set_step(0.01);
|
||||
settings_znear->set_val(EDITOR_DEF("3d_editor/default_z_near",0.1));
|
||||
settings_znear->set_value(EDITOR_DEF("3d_editor/default_z_near",0.1));
|
||||
settings_vbc->add_margin_child(TTR("View Z-Near:"),settings_znear);
|
||||
|
||||
settings_zfar = memnew( SpinBox );
|
||||
settings_zfar->set_max(10000);
|
||||
settings_zfar->set_min(0.1);
|
||||
settings_zfar->set_step(0.01);
|
||||
settings_zfar->set_val(EDITOR_DEF("3d_editor/default_z_far",1500));
|
||||
settings_zfar->set_value(EDITOR_DEF("3d_editor/default_z_far",1500));
|
||||
settings_vbc->add_margin_child(TTR("View Z-Far:"),settings_zfar);
|
||||
|
||||
//settings_dialog->get_cancel()->hide();
|
||||
|
|
|
@ -491,9 +491,9 @@ public:
|
|||
static SpatialEditor *get_singleton() { return singleton; }
|
||||
void snap_cursor_to_plane(const Plane& p_plane);
|
||||
|
||||
float get_znear() const { return settings_znear->get_val(); }
|
||||
float get_zfar() const { return settings_zfar->get_val(); }
|
||||
float get_fov() const { return settings_fov->get_val(); }
|
||||
float get_znear() const { return settings_znear->get_value(); }
|
||||
float get_zfar() const { return settings_zfar->get_value(); }
|
||||
float get_fov() const { return settings_fov->get_value(); }
|
||||
|
||||
Transform get_gizmo_transform() const { return gizmo.transform; }
|
||||
bool is_gizmo_visible() const { return gizmo.visible; }
|
||||
|
|
|
@ -605,7 +605,7 @@ void SpriteFramesEditor::_update_library(bool p_skip_selector) {
|
|||
tree->select(tree->get_item_count()-1);
|
||||
}
|
||||
|
||||
anim_speed->set_val(frames->get_animation_speed(edited_anim));
|
||||
anim_speed->set_value(frames->get_animation_speed(edited_anim));
|
||||
anim_loop->set_pressed(frames->get_animation_loop(edited_anim));
|
||||
|
||||
updating=false;
|
||||
|
|
|
@ -166,13 +166,13 @@ void TextureRegionEditor::_region_draw()
|
|||
hscroll->set_min(scroll_rect.pos.x);
|
||||
hscroll->set_max(scroll_rect.pos.x+scroll_rect.size.x);
|
||||
hscroll->set_page(edit_draw->get_size().x);
|
||||
hscroll->set_val(draw_ofs.x);
|
||||
hscroll->set_value(draw_ofs.x);
|
||||
hscroll->set_step(0.001);
|
||||
|
||||
vscroll->set_min(scroll_rect.pos.y);
|
||||
vscroll->set_max(scroll_rect.pos.y+scroll_rect.size.y);
|
||||
vscroll->set_page(edit_draw->get_size().y);
|
||||
vscroll->set_val(draw_ofs.y);
|
||||
vscroll->set_value(draw_ofs.y);
|
||||
vscroll->set_step(0.001);
|
||||
updating_scroll=false;
|
||||
|
||||
|
@ -400,8 +400,8 @@ void TextureRegionEditor::_region_input(const InputEvent& p_input)
|
|||
if (mm.button_mask&BUTTON_MASK_MIDDLE || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
|
||||
|
||||
Vector2 draged(mm.relative_x,mm.relative_y);
|
||||
hscroll->set_val( hscroll->get_val()-draged.x );
|
||||
vscroll->set_val( vscroll->get_val()-draged.y );
|
||||
hscroll->set_value( hscroll->get_value()-draged.x );
|
||||
vscroll->set_value( vscroll->get_value()-draged.y );
|
||||
|
||||
} else if (drag) {
|
||||
|
||||
|
@ -500,8 +500,8 @@ void TextureRegionEditor::_scroll_changed(float)
|
|||
if (updating_scroll)
|
||||
return;
|
||||
|
||||
draw_ofs.x=hscroll->get_val();
|
||||
draw_ofs.y=vscroll->get_val();
|
||||
draw_ofs.x=hscroll->get_value();
|
||||
draw_ofs.y=vscroll->get_value();
|
||||
edit_draw->update();
|
||||
}
|
||||
|
||||
|
@ -829,7 +829,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
|
|||
sb_off_x->set_min(-256);
|
||||
sb_off_x->set_max(256);
|
||||
sb_off_x->set_step(1);
|
||||
sb_off_x->set_val(snap_offset.x);
|
||||
sb_off_x->set_value(snap_offset.x);
|
||||
sb_off_x->set_suffix("px");
|
||||
sb_off_x->connect("value_changed", this, "_set_snap_off_x");
|
||||
hb_grid->add_child(sb_off_x);
|
||||
|
@ -838,7 +838,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
|
|||
sb_off_y->set_min(-256);
|
||||
sb_off_y->set_max(256);
|
||||
sb_off_y->set_step(1);
|
||||
sb_off_y->set_val(snap_offset.y);
|
||||
sb_off_y->set_value(snap_offset.y);
|
||||
sb_off_y->set_suffix("px");
|
||||
sb_off_y->connect("value_changed", this, "_set_snap_off_y");
|
||||
hb_grid->add_child(sb_off_y);
|
||||
|
@ -850,7 +850,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
|
|||
sb_step_x->set_min(-256);
|
||||
sb_step_x->set_max(256);
|
||||
sb_step_x->set_step(1);
|
||||
sb_step_x->set_val(snap_step.x);
|
||||
sb_step_x->set_value(snap_step.x);
|
||||
sb_step_x->set_suffix("px");
|
||||
sb_step_x->connect("value_changed", this, "_set_snap_step_x");
|
||||
hb_grid->add_child(sb_step_x);
|
||||
|
@ -859,7 +859,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
|
|||
sb_step_y->set_min(-256);
|
||||
sb_step_y->set_max(256);
|
||||
sb_step_y->set_step(1);
|
||||
sb_step_y->set_val(snap_step.y);
|
||||
sb_step_y->set_value(snap_step.y);
|
||||
sb_step_y->set_suffix("px");
|
||||
sb_step_y->connect("value_changed", this, "_set_snap_step_y");
|
||||
hb_grid->add_child(sb_step_y);
|
||||
|
@ -871,7 +871,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
|
|||
sb_sep_x->set_min(0);
|
||||
sb_sep_x->set_max(256);
|
||||
sb_sep_x->set_step(1);
|
||||
sb_sep_x->set_val(snap_separation.x);
|
||||
sb_sep_x->set_value(snap_separation.x);
|
||||
sb_sep_x->set_suffix("px");
|
||||
sb_sep_x->connect("value_changed", this, "_set_snap_sep_x");
|
||||
hb_grid->add_child(sb_sep_x);
|
||||
|
@ -880,7 +880,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
|
|||
sb_sep_y->set_min(0);
|
||||
sb_sep_y->set_max(256);
|
||||
sb_sep_y->set_step(1);
|
||||
sb_sep_y->set_val(snap_separation.y);
|
||||
sb_sep_y->set_value(snap_separation.y);
|
||||
sb_sep_y->set_suffix("px");
|
||||
sb_sep_y->connect("value_changed", this, "_set_snap_sep_y");
|
||||
hb_grid->add_child(sb_sep_y);
|
||||
|
@ -971,22 +971,22 @@ void TextureRegionEditorPlugin::set_state(const Dictionary& p_state){
|
|||
|
||||
if (state.has("snap_step")) {
|
||||
Vector2 s = state["snap_step"];
|
||||
region_editor->sb_step_x->set_val(s.x);
|
||||
region_editor->sb_step_y->set_val(s.y);
|
||||
region_editor->sb_step_x->set_value(s.x);
|
||||
region_editor->sb_step_y->set_value(s.y);
|
||||
region_editor->snap_step = s;
|
||||
}
|
||||
|
||||
if (state.has("snap_offset")) {
|
||||
Vector2 ofs = state["snap_offset"];
|
||||
region_editor->sb_off_x->set_val(ofs.x);
|
||||
region_editor->sb_off_y->set_val(ofs.y);
|
||||
region_editor->sb_off_x->set_value(ofs.x);
|
||||
region_editor->sb_off_y->set_value(ofs.y);
|
||||
region_editor->snap_offset = ofs;
|
||||
}
|
||||
|
||||
if (state.has("snap_separation")) {
|
||||
Vector2 sep = state["snap_separation"];
|
||||
region_editor->sb_sep_x->set_val(sep.x);
|
||||
region_editor->sb_sep_y->set_val(sep.y);
|
||||
region_editor->sb_sep_x->set_value(sep.x);
|
||||
region_editor->sb_sep_y->set_value(sep.y);
|
||||
region_editor->snap_separation = sep;
|
||||
}
|
||||
|
||||
|
|
|
@ -750,7 +750,7 @@ ThemeEditor::ThemeEditor() {
|
|||
first_vb->add_child( memnew( HScrollBar ));
|
||||
first_vb->add_child( memnew( SpinBox ));
|
||||
ProgressBar *pb=memnew( ProgressBar );
|
||||
pb->set_val(50);
|
||||
pb->set_value(50);
|
||||
first_vb->add_child( pb);
|
||||
Panel *pn=memnew( Panel );
|
||||
pn->set_custom_minimum_size(Size2(40,40)*EDSCALE);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue