summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/editor_help.cpp9
-rw-r--r--tools/editor/editor_node.cpp7
-rw-r--r--tools/editor/editor_settings.cpp3
-rw-r--r--tools/editor/editor_themes.cpp5
-rw-r--r--tools/editor/icons/2x/icon_mini_aabb.pngbin697 -> 695 bytes
-rw-r--r--tools/editor/icons/2x/icon_mini_transform.pngbin431 -> 539 bytes
-rw-r--r--tools/editor/icons/icon_mini_aabb.pngbin367 -> 360 bytes
-rw-r--r--tools/editor/icons/icon_mini_transform.pngbin264 -> 321 bytes
-rw-r--r--tools/editor/icons/source/icon_mini_aabb.svg8
-rw-r--r--tools/editor/icons/source/icon_mini_transform.svg34
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp141
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.h3
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp11
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.cpp47
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.h2
-rw-r--r--tools/editor/project_manager.cpp7
-rw-r--r--tools/editor/property_editor.cpp2
18 files changed, 180 insertions, 109 deletions
diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp
index 8f486ba0c2..4f83dc2f66 100644
--- a/tools/editor/editor_help.cpp
+++ b/tools/editor/editor_help.cpp
@@ -882,6 +882,15 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->pop();
}
+ if (cd.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"));
+ class_desc->add_text(" ... ");
+ class_desc->pop();
+ 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->pop();
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index f4b67f6e2b..11c51991e1 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -1228,7 +1228,7 @@ void EditorNode::_dialog_action(String p_file) {
//_save_scene(p_file);
_save_scene_with_preview(p_file);
- _run(false);
+ _run(true);
}
} break;
@@ -6543,11 +6543,6 @@ EditorNode::EditorNode() {
Globals::get_singleton()->set("debug/indicators_enabled",true);
Globals::get_singleton()->set("render/room_cull_enabled",false);
- theme->set_color("prop_category","Editor",Color::hex(0x3f3a44ff));
- theme->set_color("prop_section","Editor",Color::hex(0x35313aff));
- theme->set_color("prop_subsection","Editor",Color::hex(0x312e37ff));
- theme->set_color("fg_selected","Editor",Color::html("ffbd8e8e"));
- theme->set_color("fg_error","Editor",Color::html("ffbd8e8e"));
reference_resource_mem=true;
save_external_resources_mem=true;
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp
index 99c80fdc36..ad5cd86b4b 100644
--- a/tools/editor/editor_settings.cpp
+++ b/tools/editor/editor_settings.cpp
@@ -574,6 +574,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("grid_map/pick_distance", 5000.0);
+ set("3d_editor/grid_color",Color(0,1,0,0.2));
+ hints["3d_editor/grid_color"]=PropertyInfo(Variant::COLOR,"3d_editor/grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
+
set("3d_editor/default_fov",45.0);
set("3d_editor/default_z_near",0.1);
set("3d_editor/default_z_far",500.0);
diff --git a/tools/editor/editor_themes.cpp b/tools/editor/editor_themes.cpp
index 44e21aee85..7130044490 100644
--- a/tools/editor/editor_themes.cpp
+++ b/tools/editor/editor_themes.cpp
@@ -48,6 +48,11 @@ Ref<Theme> create_default_theme()
}
focus_sbt->set_draw_center(false);
theme->set_stylebox("EditorFocus","EditorStyles",focus_sbt);
+ theme->set_color("prop_category","Editor",Color::hex(0x3f3a44ff));
+ theme->set_color("prop_section","Editor",Color::hex(0x35313aff));
+ theme->set_color("prop_subsection","Editor",Color::hex(0x312e37ff));
+ theme->set_color("fg_selected","Editor",Color::html("ffbd8e8e"));
+ theme->set_color("fg_error","Editor",Color::html("ffbd8e8e"));
return theme;
}
diff --git a/tools/editor/icons/2x/icon_mini_aabb.png b/tools/editor/icons/2x/icon_mini_aabb.png
index f0fd5620e9..25603eec49 100644
--- a/tools/editor/icons/2x/icon_mini_aabb.png
+++ b/tools/editor/icons/2x/icon_mini_aabb.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_mini_transform.png b/tools/editor/icons/2x/icon_mini_transform.png
index cb106ba5fa..5144871c5c 100644
--- a/tools/editor/icons/2x/icon_mini_transform.png
+++ b/tools/editor/icons/2x/icon_mini_transform.png
Binary files differ
diff --git a/tools/editor/icons/icon_mini_aabb.png b/tools/editor/icons/icon_mini_aabb.png
index 3a6be5605a..eebc4633e4 100644
--- a/tools/editor/icons/icon_mini_aabb.png
+++ b/tools/editor/icons/icon_mini_aabb.png
Binary files differ
diff --git a/tools/editor/icons/icon_mini_transform.png b/tools/editor/icons/icon_mini_transform.png
index 0107107a96..068ea0506c 100644
--- a/tools/editor/icons/icon_mini_transform.png
+++ b/tools/editor/icons/icon_mini_transform.png
Binary files differ
diff --git a/tools/editor/icons/source/icon_mini_aabb.svg b/tools/editor/icons/source/icon_mini_aabb.svg
index f6cc3feda1..ebfd505bea 100644
--- a/tools/editor/icons/source/icon_mini_aabb.svg
+++ b/tools/editor/icons/source/icon_mini_aabb.svg
@@ -29,8 +29,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="45.254835"
- inkscape:cx="3.148993"
- inkscape:cy="6.4579802"
+ inkscape:cx="5.0272453"
+ inkscape:cy="5.132155"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -76,7 +76,7 @@
id="path4893"
inkscape:connector-curvature="0" />
<path
- style="fill:#f5acbb;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="fill:#f39bad;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 3,1046.3622 a 3,3 0 0 0 -3,3 3,3 0 0 0 3,3 l 2,0 0,-6 -2,0 z m 0,2 0,2 a 1.0000174,1.0000174 0 0 1 -1,-1 1.0000174,1.0000174 0 0 1 1,-1 z"
id="path4234"
inkscape:connector-curvature="0" />
@@ -99,7 +99,7 @@
id="rect4149"
style="fill:#ee7991;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
- style="fill:#f5acbb;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="fill:#f39bad;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 8,1044.3622 0,8 2,0 a 3,3 0 0 0 3,-3 3,3 0 0 0 -3,-3 l 0,-2 -2,0 z m 2,4 a 1.0000174,1.0000174 0 0 1 1,1 1.0000174,1.0000174 0 0 1 -1,1 l 0,-2 z"
id="path4151"
inkscape:connector-curvature="0" />
diff --git a/tools/editor/icons/source/icon_mini_transform.svg b/tools/editor/icons/source/icon_mini_transform.svg
index a844171dd4..6da4eb806d 100644
--- a/tools/editor/icons/source/icon_mini_transform.svg
+++ b/tools/editor/icons/source/icon_mini_transform.svg
@@ -29,8 +29,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="32"
- inkscape:cx="5.8969613"
- inkscape:cy="6.372864"
+ inkscape:cx="8.2643591"
+ inkscape:cy="7.6152896"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -71,26 +71,20 @@
id="layer1"
transform="translate(0,-1040.3622)">
<path
- style="fill:#f3e49c;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 3,1042.3622 a 3,3 0 0 0 -3,3 l 0,5 2,0 0,-2 1,0 0,-2 -1,0 0,-1 a 1.0000174,1.0000174 0 0 1 1,-1 l 0,-2 z"
- id="rect4455"
- inkscape:connector-curvature="0" />
+ style="fill:#f6a86e;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 4,1042.3622 3.0917969,1044.5438 2,1042.3622 l -2,0 2,4 -2,4 2,0 0.9082031,-2.1816 L 4,1050.3622 l 2,0 -2,-4 2,-4 z"
+ id="rect4214"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccc" />
<path
- style="fill:#ecd669;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 8,1044.3622 0,6 2,0 0,-4 a 1.0000174,1.0000174 0 0 1 1,1 l 0,3 2,0 0,-3 0,-1 a 1.0000174,1.0000174 0 0 1 1,1 l 0,3 2,0 0,-3 a 3,3 0 0 0 -3,-3 l -2,0 0,0.1758 a 3,3 0 0 0 -1,-0.1758 l -2,0 z"
- id="path4771"
+ style="fill:#f8bf95;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 9,1042.3622 a 3,3 0 0 0 -3,3 l 0,5 2,0 0,-2 1,0 0,-2 -1,0 0,-1 a 1.0000174,1.0000174 0 0 1 1,-1 l 1,0 0,-2 -1,0 z"
+ id="rect4455"
inkscape:connector-curvature="0" />
<path
- style="fill:#ecd669;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 7,1044.3622 a 3,3 0 0 0 -3,3 l 0,3 2,0 0,-3 a 1.0000174,1.0000174 0 0 1 1,-1 l 0,-2 z"
- id="rect4601"
- inkscape:connector-curvature="0" />
- <rect
- style="fill:#f3e49c;fill-opacity:1;stroke:none"
- id="rect4139"
- width="1"
- height="2"
- x="3"
- y="1042.3622" />
+ style="fill:#f6a86e;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 10 4 L 10 6 L 10 8 L 10 10 L 12 10 L 12 8 L 13 9 L 14 8 L 14 10 L 16 10 L 16 8 L 16 6 L 16 4 L 14 4 L 13 6 L 12 4 L 10 4 z "
+ transform="translate(0,1040.3622)"
+ id="rect4231" />
</g>
</svg>
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp
index 57707ffa72..3468f42a6c 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp
@@ -290,6 +290,7 @@ Dictionary CanvasItemEditor::get_state() const {
state["snap_rotation"]=snap_rotation;
state["snap_relative"]=snap_relative;
state["snap_pixel"]=snap_pixel;
+ state["skeleton_show_bones"]=skeleton_show_bones;
return state;
}
void CanvasItemEditor::set_state(const Dictionary& p_state){
@@ -351,6 +352,12 @@ void CanvasItemEditor::set_state(const Dictionary& p_state){
int idx = edit_menu->get_popup()->get_item_index(SNAP_USE_PIXEL);
edit_menu->get_popup()->set_item_checked(idx,snap_pixel);
}
+
+ if (state.has("skeleton_show_bones")) {
+ skeleton_show_bones=state["skeleton_show_bones"];
+ int idx = skeleton_menu->get_item_index(SKELETON_SHOW_BONES);
+ skeleton_menu->set_item_checked(idx,skeleton_show_bones);
+ }
}
@@ -2083,76 +2090,78 @@ void CanvasItemEditor::_viewport_draw() {
}
- int bone_width = EditorSettings::get_singleton()->get("2d_editor/bone_width");
- Color bone_color1 = EditorSettings::get_singleton()->get("2d_editor/bone_color1");
- Color bone_color2 = EditorSettings::get_singleton()->get("2d_editor/bone_color2");
- Color bone_ik_color = EditorSettings::get_singleton()->get("2d_editor/bone_ik_color");
- Color bone_selected_color = EditorSettings::get_singleton()->get("2d_editor/bone_selected_color");
+ if (skeleton_show_bones) {
+ int bone_width = EditorSettings::get_singleton()->get("2d_editor/bone_width");
+ Color bone_color1 = EditorSettings::get_singleton()->get("2d_editor/bone_color1");
+ Color bone_color2 = EditorSettings::get_singleton()->get("2d_editor/bone_color2");
+ Color bone_ik_color = EditorSettings::get_singleton()->get("2d_editor/bone_ik_color");
+ Color bone_selected_color = EditorSettings::get_singleton()->get("2d_editor/bone_selected_color");
- for(Map<ObjectID,BoneList>::Element*E=bone_list.front();E;E=E->next()) {
+ for(Map<ObjectID,BoneList>::Element*E=bone_list.front();E;E=E->next()) {
- E->get().from=Vector2();
- E->get().to=Vector2();
+ E->get().from=Vector2();
+ E->get().to=Vector2();
- Object *obj = ObjectDB::get_instance(E->get().bone);
- if (!obj)
- continue;
+ Object *obj = ObjectDB::get_instance(E->get().bone);
+ if (!obj)
+ continue;
- Node2D* n2d = obj->cast_to<Node2D>();
- if (!n2d)
- continue;
+ Node2D* n2d = obj->cast_to<Node2D>();
+ if (!n2d)
+ continue;
- if (!n2d->get_parent())
- continue;
+ if (!n2d->get_parent())
+ continue;
- CanvasItem *pi = n2d->get_parent_item();
+ CanvasItem *pi = n2d->get_parent_item();
- Node2D* pn2d=n2d->get_parent()->cast_to<Node2D>();
+ Node2D* pn2d=n2d->get_parent()->cast_to<Node2D>();
- if (!pn2d)
- continue;
+ 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_pos());
+ Vector2 to = transform.xform(n2d->get_global_pos());
- E->get().from=from;
- E->get().to=to;
+ E->get().from=from;
+ E->get().to=to;
- Vector2 rel = to-from;
- Vector2 relt = rel.tangent().normalized()*bone_width;
+ Vector2 rel = to-from;
+ Vector2 relt = rel.tangent().normalized()*bone_width;
- Vector<Vector2> bone_shape;
- bone_shape.push_back(from);
- bone_shape.push_back(from+rel*0.2+relt);
- bone_shape.push_back(to);
- bone_shape.push_back(from+rel*0.2-relt);
- Vector<Color> colors;
- if (pi->has_meta("_edit_ik_")) {
+ Vector<Vector2> bone_shape;
+ bone_shape.push_back(from);
+ bone_shape.push_back(from+rel*0.2+relt);
+ bone_shape.push_back(to);
+ bone_shape.push_back(from+rel*0.2-relt);
+ Vector<Color> colors;
+ if (pi->has_meta("_edit_ik_")) {
- colors.push_back(bone_ik_color);
- colors.push_back(bone_ik_color);
- colors.push_back(bone_ik_color);
- colors.push_back(bone_ik_color);
- } else {
- colors.push_back(bone_color1);
- colors.push_back(bone_color2);
- colors.push_back(bone_color1);
- colors.push_back(bone_color2);
- }
+ colors.push_back(bone_ik_color);
+ colors.push_back(bone_ik_color);
+ colors.push_back(bone_ik_color);
+ colors.push_back(bone_ik_color);
+ } else {
+ colors.push_back(bone_color1);
+ colors.push_back(bone_color2);
+ colors.push_back(bone_color1);
+ colors.push_back(bone_color2);
+ }
- VisualServer::get_singleton()->canvas_item_add_primitive(ci,bone_shape,colors,Vector<Vector2>(),RID());
+ VisualServer::get_singleton()->canvas_item_add_primitive(ci,bone_shape,colors,Vector<Vector2>(),RID());
- if (editor_selection->is_selected(pi)) {
- for(int i=0;i<bone_shape.size();i++) {
+ if (editor_selection->is_selected(pi)) {
+ for(int i=0;i<bone_shape.size();i++) {
- VisualServer::get_singleton()->canvas_item_add_line(ci,bone_shape[i],bone_shape[(i+1)%bone_shape.size()],bone_selected_color,2);
+ VisualServer::get_singleton()->canvas_item_add_line(ci,bone_shape[i],bone_shape[(i+1)%bone_shape.size()],bone_selected_color,2);
+ }
}
- }
+ }
}
}
@@ -2536,6 +2545,12 @@ void CanvasItemEditor::_popup_callback(int p_op) {
((SnapDialog *)snap_dialog)->set_fields(snap_offset, snap_step, snap_rotation_offset, snap_rotation_step);
snap_dialog->popup_centered(Size2(220,160));
} break;
+ case SKELETON_SHOW_BONES: {
+ skeleton_show_bones = !skeleton_show_bones;
+ int idx = skeleton_menu->get_item_index(SKELETON_SHOW_BONES);
+ skeleton_menu->set_item_checked(idx,skeleton_show_bones);
+ viewport->update();
+ } break;
case ZOOM_IN: {
if (zoom>MAX_ZOOM)
return;
@@ -2999,6 +3014,8 @@ void CanvasItemEditor::_popup_callback(int p_op) {
continue;
n2d->set_meta("_edit_bone_",true);
+ if (!skeleton_show_bones)
+ skeleton_menu->activate_item(skeleton_menu->get_item_index(SKELETON_SHOW_BONES));
}
viewport->update();
@@ -3017,6 +3034,8 @@ void CanvasItemEditor::_popup_callback(int p_op) {
continue;
n2d->set_meta("_edit_bone_",Variant());
+ if (!skeleton_show_bones)
+ skeleton_menu->activate_item(skeleton_menu->get_item_index(SKELETON_SHOW_BONES));
}
viewport->update();
@@ -3036,6 +3055,8 @@ void CanvasItemEditor::_popup_callback(int p_op) {
continue;
canvas_item->set_meta("_edit_ik_",true);
+ if (!skeleton_show_bones)
+ skeleton_menu->activate_item(skeleton_menu->get_item_index(SKELETON_SHOW_BONES));
}
@@ -3055,6 +3076,8 @@ void CanvasItemEditor::_popup_callback(int p_op) {
continue;
n2d->set_meta("_edit_ik_",Variant());
+ if (!skeleton_show_bones)
+ skeleton_menu->activate_item(skeleton_menu->get_item_index(SKELETON_SHOW_BONES));
}
viewport->update();
@@ -3401,15 +3424,17 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/expand_to_parent", TTR("Expand to Parent"), KEY_MASK_CMD | KEY_P), EXPAND_TO_PARENT);
p->add_separator();
p->add_submenu_item(TTR("Skeleton.."),"skeleton");
- PopupMenu *p2 = memnew(PopupMenu);
- p->add_child(p2);
- p2->set_name("skeleton");
- p2->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_make_bones", TTR("Make Bones"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B ),SKELETON_MAKE_BONES);
- p2->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_bones", TTR("Clear Bones")), SKELETON_CLEAR_BONES);
- p2->add_separator();
- p2->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_set_ik_chain", TTR("Make IK Chain")), SKELETON_SET_IK_CHAIN);
- p2->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_ik_chain", TTR("Clear IK Chain")), SKELETON_CLEAR_IK_CHAIN);
- p2->connect("item_pressed", this,"_popup_callback");
+ skeleton_menu = memnew(PopupMenu);
+ p->add_child(skeleton_menu);
+ skeleton_menu->set_name("skeleton");
+ skeleton_menu->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_make_bones", TTR("Make Bones"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B ),SKELETON_MAKE_BONES);
+ skeleton_menu->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_bones", TTR("Clear Bones")), SKELETON_CLEAR_BONES);
+ skeleton_menu->add_separator();
+ skeleton_menu->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_show_bones", TTR("Show Bones")), SKELETON_SHOW_BONES);
+ skeleton_menu->add_separator();
+ skeleton_menu->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_set_ik_chain", TTR("Make IK Chain")), SKELETON_SET_IK_CHAIN);
+ skeleton_menu->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_ik_chain", TTR("Clear IK Chain")), SKELETON_CLEAR_IK_CHAIN);
+ skeleton_menu->connect("item_pressed", this,"_popup_callback");
/*
@@ -3535,6 +3560,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
snap_show_grid=false;
snap_rotation=false;
snap_pixel=false;
+ skeleton_show_bones=true;
+ skeleton_menu->set_item_checked(skeleton_menu->get_item_index(SKELETON_SHOW_BONES),true);
updating_value_dialog=false;
box_selecting=false;
//zoom=0.5;
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.h b/tools/editor/plugins/canvas_item_editor_plugin.h
index ea582f6fa7..9f4bc46eb4 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.h
+++ b/tools/editor/plugins/canvas_item_editor_plugin.h
@@ -124,6 +124,7 @@ class CanvasItemEditor : public VBoxContainer {
VIEW_FRAME_TO_SELECTION,
SKELETON_MAKE_BONES,
SKELETON_CLEAR_BONES,
+ SKELETON_SHOW_BONES,
SKELETON_SET_IK_CHAIN,
SKELETON_CLEAR_IK_CHAIN
@@ -175,6 +176,7 @@ class CanvasItemEditor : public VBoxContainer {
bool snap_rotation;
bool snap_relative;
bool snap_pixel;
+ bool skeleton_show_bones;
bool box_selecting;
Point2 box_selecting_to;
bool key_pos;
@@ -256,6 +258,7 @@ class CanvasItemEditor : public VBoxContainer {
ToolButton *ungroup_button;
MenuButton *edit_menu;
+ PopupMenu *skeleton_menu;
MenuButton *view_menu;
HBoxContainer *animation_hb;
MenuButton *animation_menu;
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index fdb7856b83..1f931fb492 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -1292,6 +1292,7 @@ struct _ScriptEditorItemData {
void ScriptEditor::_update_script_colors() {
bool enabled = EditorSettings::get_singleton()->get("text_editor/script_temperature_enabled");
+ bool highlight_current = EditorSettings::get_singleton()->get("text_editor/highlight_current_script");
if (!enabled)
return;
@@ -1319,8 +1320,12 @@ void ScriptEditor::_update_script_colors() {
int non_zero_hist_size = ( hist_size == 0 ) ? 1 : hist_size;
float v = Math::ease((edit_pass-pass)/float(non_zero_hist_size),0.4);
-
- script_list->set_item_custom_bg_color(i,hot_color.linear_interpolate(cold_color,v));
+ bool current = tab_container->get_current_tab() == c;
+ if (current && highlight_current) {
+ script_list->set_item_custom_bg_color(i, EditorSettings::get_singleton()->get("text_editor/current_script_background_color"));
+ } else {
+ script_list->set_item_custom_bg_color(i,hot_color.linear_interpolate(cold_color,v));
+ }
}
}
@@ -2356,9 +2361,11 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
EDITOR_DEF("external_editor/use_external_editor",false);
EDITOR_DEF("external_editor/exec_path","");
EDITOR_DEF("text_editor/script_temperature_enabled",true);
+ EDITOR_DEF("text_editor/highlight_current_script", true);
EDITOR_DEF("text_editor/script_temperature_history_size",15);
EDITOR_DEF("text_editor/script_temperature_hot_color",Color(1,0,0,0.3));
EDITOR_DEF("text_editor/script_temperature_cold_color",Color(0,0,1,0.3));
+ EDITOR_DEF("text_editor/current_script_background_color",Color(0.81,0.81,0.14,0.63));
EDITOR_DEF("text_editor/group_help_pages",true);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"external_editor/exec_path",PROPERTY_HINT_GLOBAL_FILE));
EDITOR_DEF("external_editor/exec_flags","");
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index 95106d2c81..41956747e1 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -3151,6 +3151,8 @@ void SpatialEditor::_init_indicators() {
Vector<Color> origin_colors;
Vector<Vector3> origin_points;
+ Color grid_color = EditorSettings::get_singleton()->get("3d_editor/grid_color");
+
for(int i=0;i<3;i++) {
Vector3 axis;
axis[i]=1;
@@ -3168,10 +3170,10 @@ void SpatialEditor::_init_indicators() {
for(int j=-ORIGIN_GRID_SIZE;j<=ORIGIN_GRID_SIZE;j++) {
- grid_colors[i].push_back(Color(axis.x,axis.y,axis.z,0.2));
- grid_colors[i].push_back(Color(axis.x,axis.y,axis.z,0.2));
- grid_colors[i].push_back(Color(axis.x,axis.y,axis.z,0.2));
- grid_colors[i].push_back(Color(axis.x,axis.y,axis.z,0.2));
+ grid_colors[i].push_back(grid_color);
+ grid_colors[i].push_back(grid_color);
+ grid_colors[i].push_back(grid_color);
+ grid_colors[i].push_back(grid_color);
grid_points[i].push_back(axis_n1*ORIGIN_GRID_SIZE+axis_n2*j);
grid_points[i].push_back(-axis_n1*ORIGIN_GRID_SIZE+axis_n2*j);
grid_points[i].push_back(axis_n2*ORIGIN_GRID_SIZE+axis_n1*j);
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp
index 822d9e6c87..43fe7d7ea9 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_map_editor_plugin.cpp
@@ -289,15 +289,16 @@ void TileMapEditor::_pick_tile(const Point2& p_pos) {
canvas_item_editor->update();
}
-DVector<Vector2> TileMapEditor::_bucket_fill(const Point2i& p_start) {
+DVector<Vector2> TileMapEditor::_bucket_fill(const Point2i& p_start, bool erase) {
- if (node->get_cell(p_start.x, p_start.y) != TileMap::INVALID_CELL)
- return DVector<Vector2>();
+ int prev_id = node->get_cell(p_start.x, p_start.y);
+ int id = TileMap::INVALID_CELL;
+ if (!erase) {
+ id = get_selected_tile();
- int id = get_selected_tile();
-
- if (id == TileMap::INVALID_CELL)
- return DVector<Vector2>();
+ if (id == TileMap::INVALID_CELL)
+ return DVector<Vector2>();
+ }
Rect2 r = node->get_item_rect();
r.pos = r.pos/node->get_cell_size();
@@ -316,7 +317,7 @@ DVector<Vector2> TileMapEditor::_bucket_fill(const Point2i& p_start) {
if (!r.has_point(n))
continue;
- if (node->get_cell(n.x, n.y) == TileMap::INVALID_CELL) {
+ if (node->get_cell(n.x, n.y) == prev_id) {
node->set_cellv(n, id, flip_h, flip_v, transpose);
@@ -685,6 +686,12 @@ bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
} else if (tool==TOOL_BUCKET) {
+ Dictionary pop;
+ pop["id"] = node->get_cell(over_tile.x, over_tile.y);
+ pop["flip_h"] = node->is_cell_x_flipped(over_tile.x, over_tile.y);
+ pop["flip_v"] = node->is_cell_y_flipped(over_tile.x, over_tile.y);
+ pop["transpose"] = node->is_cell_transposed(over_tile.x, over_tile.y);
+
DVector<Vector2> points = _bucket_fill(over_tile);
if (points.size() == 0)
@@ -699,7 +706,7 @@ bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
undo_redo->create_action("Bucket Fill");
undo_redo->add_do_method(this, "_fill_points", points, op);
- undo_redo->add_undo_method(this, "_erase_points", points);
+ undo_redo->add_undo_method(this, "_fill_points", points, pop);
undo_redo->commit_action();
}
@@ -782,6 +789,26 @@ bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
tool=TOOL_NONE;
return true;
+
+ } else if (tool==TOOL_BUCKET) {
+
+ Dictionary pop;
+ pop["id"] = node->get_cell(over_tile.x, over_tile.y);
+ pop["flip_h"] = node->is_cell_x_flipped(over_tile.x, over_tile.y);
+ pop["flip_v"] = node->is_cell_y_flipped(over_tile.x, over_tile.y);
+ pop["transpose"] = node->is_cell_transposed(over_tile.x, over_tile.y);
+
+ DVector<Vector2> points = _bucket_fill(over_tile, true);
+
+ if (points.size() == 0)
+ return false;
+
+ undo_redo->create_action("Bucket Fill");
+
+ undo_redo->add_do_method(this, "_erase_points", points);
+ undo_redo->add_undo_method(this, "_fill_points", points, pop);
+
+ undo_redo->commit_action();
}
}
}
@@ -798,7 +825,7 @@ bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
canvas_item_editor->update();
}
- int tile_under = node->get_cell(over_tile.x, over_tile.y);
+ int tile_under = node->get_cell(over_tile.x, over_tile.y);
String tile_name = "none";
if (node->get_tileset()->has_tile(tile_under))
diff --git a/tools/editor/plugins/tile_map_editor_plugin.h b/tools/editor/plugins/tile_map_editor_plugin.h
index 666290489b..4b47dccd15 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.h
+++ b/tools/editor/plugins/tile_map_editor_plugin.h
@@ -129,7 +129,7 @@ class TileMapEditor : public VBoxContainer {
void _pick_tile(const Point2& p_pos);
- DVector<Vector2> _bucket_fill(const Point2i& p_start);
+ DVector<Vector2> _bucket_fill(const Point2i& p_start, bool erase=false);
void _fill_points(const DVector<Vector2> p_points, const Dictionary& p_op);
void _erase_points(const DVector<Vector2> p_points);
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp
index dc1d6ec0f9..0c734436cd 100644
--- a/tools/editor/project_manager.cpp
+++ b/tools/editor/project_manager.cpp
@@ -1196,15 +1196,12 @@ ProjectManager::ProjectManager() {
FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"));
set_area_as_parent_rect();
+ set_theme(create_default_theme());
gui_base = memnew( Control );
add_child(gui_base);
gui_base->set_area_as_parent_rect();
- set_theme(create_default_theme());
- Ref<Theme> theme = create_editor_theme();
- gui_base->set_theme(theme);
-
Panel *panel = memnew( Panel );
gui_base->add_child(panel);
panel->set_area_as_parent_rect();
@@ -1391,6 +1388,8 @@ ProjectManager::ProjectManager() {
last_clicked = "";
SceneTree::get_singleton()->connect("files_dropped", this, "_files_dropped");
+
+ gui_base->set_theme(create_editor_theme());
}
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index 2ea28e26ad..de10e68f33 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -4557,7 +4557,7 @@ void SectionedPropertyEditor::update_category_list() {
else if ( !(pi.usage&PROPERTY_USAGE_EDITOR) )
continue;
- if (pi.name.find(":")!=-1 || pi.name=="script/script")
+ if (pi.name.find(":")!=-1 || pi.name=="script/script" || pi.name.begins_with("resource/"))
continue;
int sp = pi.name.find("/");
if (sp!=-1) {