Commit graph

307 commits

Author SHA1 Message Date
Hugo Locurcio 31b7f02a29
Remove ToolButton in favor of Button
ToolButton has no redeeming differences with Button;
it's just a Button with the Flat property enabled by default.
Removing it avoids some confusion when creating GUIs.

Existing ToolButtons will be converted to Buttons, but the Flat
property won't be enabled automatically.

This closes https://github.com/godotengine/godot-proposals/issues/1081.
2020-06-19 20:49:49 +02:00
Yuri Roubinsky cb9cbf840d Added Texture2DArray support to visual shaders 2020-06-19 18:02:05 +03:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +02:00
Rémi Verschelde 42649565e9
Merge pull request #38475 from Chaosus/vs_quals
Added uniform qualifiers to visual shaders
2020-05-06 07:27:35 +02:00
Yuri Roubinsky 463e4ad0f5 Some fixes for canvas item visual shader inputs 2020-05-05 13:19:36 +03:00
Yuri Roubinsky 082542b525 Added uniform qualifiers to visual shaders 2020-05-05 11:25:48 +03:00
Rémi Verschelde fdf58a5858 Rename InputFilter back to Input
It changed name as part of the DisplayServer and input refactoring
in #37317, with the rationale that input no longer goes through the
main loop, so the previous Input singleton now only does filtering.

But the gains in consistency are quite limited in the renaming, and
it breaks compatibility for all scripts and tutorials that access
the Input singleton via the scripting language. A temporary option
was suggested to keep the scripting singleton named `Input` even if
its type is `InputFilter`, but that adds inconsistency and breaks C#.

Fixes godotengine/godot-proposals#639.
Fixes #37319.
Fixes #37690.
2020-04-28 15:19:49 +02:00
Juan Linietsky 0e1c66d9fc Implement global and per instance shader uniforms.
Adds two keywords to shader language for uniforms:
-'global'
-'instance'

This allows them to reference values outside the material.
2020-04-17 12:35:41 -03:00
Yuri Roubinsky 8dfe6716ec Adds warning to the uniform name in visual shader if its equal to keyword 2020-04-06 12:29:50 +03:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Juan Linietsky a6f3bc7c69 Renaming of servers for coherency.
VisualServer -> RenderingServer
PhysicsServer -> PhysicsServer3D
Physics2DServer -> PhysicsServer2D
NavigationServer -> NavigationServer3D
Navigation2DServer -> NavigationServer2D

Also renamed corresponding files.
2020-03-27 15:21:27 -03:00
Juan Linietsky 441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky 4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +01:00
Juan Linietsky 8e6960a69e Refactored input, goes all via windows now.
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26 15:49:39 +01:00
Juan Linietsky 9e08742de8 Added a Window node, and made it the scene root.
Still a lot of work to do.
2020-03-26 15:49:38 +01:00
Juan Linietsky f8a79a97c7 Effective DisplayServer separation, rename X11 -> LinuxBSD 2020-03-26 15:49:34 +01:00
Juan Linietsky 4396e98834 Refactored Input, create DisplayServer and DisplayServerX11 2020-03-26 15:49:32 +01:00
Yuri Roubinsky 898b843718 Added sky shader mode to visual shaders 2020-03-25 19:04:42 +03:00
Rémi Verschelde fdda39a506 Signals: Don't pass default binds to EditorProperty property_changed
This was done by mistake in #36758, but it's not necessary and actual
causes a bug.

`property_changed` is only emitted via `emit_changed()`, which already
has default values for `p_field` and `p_changing`.

Also reverted to using `String` for now to be on the safe side, even if
it's inconsistent with `emit_changed()`. I had only changed it
partially in #36758 so it was inconsistent. It probably does make sense
to port `EditorInspector` and related property editors to use
`StringName` where relevant, but that's for a dedicated PR.

Fixes #36799.
2020-03-05 15:35:44 +01:00
Rémi Verschelde 48ed841dd0 Signals: Fix some regressions from #36426
- Fix `callable_mp` bindings to methods which used to have default
  arguments passed to `bind_method`. We now have to re-specify them
  manually when connecting.
- Re-add `GroupsEditor::update_tree` binding.
- Misc code quality changes along the way.
2020-03-03 11:44:06 +01:00
Rémi Verschelde e2b66cacf7
Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodes
Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
2020-03-01 23:00:42 +01:00
Rémi Verschelde f742dabafe Signals: Manually port most of remaining connect_compat uses
It's tedious work...

Some can't be ported as they depend on private or protected methods
of different classes, which is not supported by callable_mp (even if
it's a class inherited by the current one).
2020-02-28 14:24:09 +01:00
Rémi Verschelde 01afc442c7 Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.

No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
2020-02-28 14:24:09 +01:00
Yuri Roubinsky 7aaad99afb Place paste after copy in new popup menu in visual shader
+ renamed _on_nodes_delete to _delete_nodes
2020-02-27 13:55:41 +03:00
Yuri Roubinsky 2d548b4d1a Added popup menu for some actions in visual shaders 2020-02-27 12:54:26 +03:00
Yuri Roubinsky 9cfd2ed564 Fix resizer icon color in VisualScripts/Shaders when graph headers is on 2020-02-26 17:48:58 +03:00
Yuri Roubinsky 1e8108310a Changed float type to int for INDEX visual shader input 2020-02-26 16:39:42 +03:00
Yuri Roubinsky 4a3d277623 Add support for integer type in visual shaders 2020-02-26 10:12:06 +03:00
Juan Linietsky 33b5c57199 Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
- Renames PackedIntArray to PackedInt32Array.
- Renames PackedFloatArray to PackedFloat32Array.
- Adds PackedInt64Array and PackedFloat64Array.
- Renames Variant::REAL to Variant::FLOAT for consistency.

Packed arrays are for storing large amount of data and creating stuff like
meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of
memory. That said, many users requested the ability to have 64 bits packed
arrays for their games, so this is just an optional added type.

For Variant, the float datatype is always 64 bits, and exposed as `float`.

We still have `real_t` which is the datatype that can change from 32 to 64
bits depending on a compile flag (not entirely working right now, but that's
the idea). It affects math related datatypes and code only.

Neither Variant nor PackedArray make use of real_t, which is only intended
for math precision, so the term is removed from there to keep only float.
2020-02-25 12:55:53 +01:00
bruvzg 1af06d3d46
Rename scancode to keycode.
Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap.
Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
2020-02-25 12:30:33 +02:00
Yuri Roubinsky b78b37ed3f Refactor node processing in visual shader member dialog 2020-02-21 18:34:31 +03:00
Juan Linietsky 69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
Juan Linietsky 3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
Juan Linietsky 867d073b98 Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr. 2020-02-15 08:36:04 -03:00
Yuri Roubinsky b798e26e28 Restore cubemaps in visual shaders 2020-02-14 12:51:46 +03:00
Yuri Roubinsky 7aad7df574 Restore drag&drop textures in visual shaders 2020-02-13 19:19:41 +03:00
Yuri Roubinsky bc647393ba Added virtual method to VisualShaderNodeCustom to enable high-end mark 2020-02-13 09:43:43 +03:00
Yuri Roubinsky 516cd821c0 Added high-end (Vulkan) label to some functions in visual shader 2020-02-12 23:17:00 +03:00
Juan Linietsky 3f335ce3d4 Texture refactor
-Texture renamed to Texture2D
-TextureLayered as base now inherits 2Darray, cubemap and cubemap array
-Removed all references to flags in textures (they will go in the shader)
-Texture3D gone for now (will come back later done properly)
-Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11 11:53:26 +01:00
Yuri Roubinsky 22ad83edae Implemented hint_range for VisualShaderNodeScalarUniform 2020-02-07 17:04:24 +03:00
Haoyu Qiu 65e2230f6e Fixes min size of various editor plugins on HiDPI
* AnimationTree
* AudioStream
* ResourcePreloader
* ShaderEditor
* VisualShaderEditor
2020-01-12 15:24:15 +08:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Haoyu Qiu 078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Tomasz Chabora 2bde99f790 Fix some small text mistakes 2019-11-08 23:31:29 +01:00
Yuri Roubinsky 8243afb0e9 Added sampler inputs for visual shaders 2019-11-03 17:59:15 +03:00
Yuri Roubinsky 84a0ad36b6 Sort custom vshader nodes+prevents them from divide to different folders 2019-11-02 12:04:48 +03:00
Yuri Roubinsky b76ae23392 Prevents folding of member tree on drag&drop in visual shader 2019-10-10 14:19:48 +03:00
Yuri Roubinsky 0a34fa701f Fix VisualShaderInput (if compiled with MinGW) (correct, tested version) 2019-10-04 10:43:59 +03:00
Yuri Roubinsky bc67a18fe0 Fix VisualShaderInput if compiled with MinGW 2019-10-04 10:52:07 +03:00
Yuri Roubinsky b11d15d5c3 Makes Texture and TextureUniform in visual shaders to use UV by default 2019-10-03 16:59:49 +03:00
Yuri Roubinsky 1bafadb629 Drag&drop custom nodes from filesystem to visual shader
+ better loading of custom nodes
2019-10-02 23:42:14 +03:00
Chaosus f14bcd8cc5 Added sampler port type for visual shaders 2019-10-01 13:20:08 +03:00
Chaosus 71d6990e1e Added drag&drop possibility for textures from filesystem to visual shader 2019-10-01 09:00:55 +03:00
Michael Alexsander Silva Dias 13e752190f Fix VS editor's "Create Function" dialog 2019-09-28 11:57:13 -03:00
Yuri Roubinsky aadbb66dc2
Merge pull request #31926 from Chaosus/vs_switch
Some improvements for Switch node in visual shaders
2019-09-04 19:21:54 +03:00
Chaosus89 bf3024c172 Added missing OUTPUT_IS_SRGB and FRONT_FACING to visual shaders 2019-09-04 18:24:44 +03:00
Chaosus89 a79d8e3b8f Some improvements for Switch node in visual shaders 2019-09-03 15:11:02 +03:00
Chaosus89 8fd8589547 Fix resizer icon visiblity on light theme in GraphNode 2019-09-01 09:12:26 +03:00
Rémi Verschelde 816ddd7817
Merge pull request #31556 from Chaosus/gles2_inverse
Implemented inverse shader function to GLES2
2019-08-26 13:52:03 +02:00
Yuri Roubinski ac4e6f0041 Fix _get_description param name (visual shaders) 2019-08-25 13:06:16 +03:00
Yuri Roubinski 1d2e5f281e Fixes for visual shader member filter 2019-08-25 11:01:42 +03:00
Yuri Roubinski 494ea78610 Small performance fix for preview in visual shader 2019-08-25 09:22:09 +03:00
Yuri Roubinski 7f350a2c71 Enhanced preview for a visual shader to show errors 2019-08-25 08:42:21 +03:00
Yuri Roubinski 4dcee2035a Implemented inverse shader function to GLES2 2019-08-22 08:22:49 +03:00
Tomasz Chabora 7e075029c8 Fix various typos and style errors in text 2019-08-19 20:43:42 +02:00
Michael Alexsander Silva Dias c19a66d72f Simplify structure of preview text in visual shader editor 2019-08-18 13:27:08 -03:00
Rémi Verschelde ef37f00525
Merge pull request #31453 from Chaosus/vs_code_preview
Added code preview to visual shader
2019-08-18 17:32:49 +02:00
Yuri Roubinski 808e44df6d Added code preview to visual shader 2019-08-18 17:28:19 +03:00
Yuri Roubinski e3b43771aa Added global expressions to visual shaders 2019-08-18 08:49:56 +03:00
Yuri Roubinski 33e9fce1bb Plugin support for visual shaders 2019-08-14 15:52:27 +03:00
Yuri Roubinski 6c8a55aa0d Fix incorrect search member in visual shaders 2019-08-08 22:19:42 +03:00
Yuri Roubinski 5e9052fae3 Allow copy/paste nodes between vertex/fragment/light modes in visual shaders 2019-08-07 16:46:47 +03:00
Rémi Verschelde 78e84c29e6
Merge pull request #31057 from Chaosus/vs_mix_improvements
Some improvements to Mix visual shader function
2019-08-07 08:22:08 +02:00
Yuri Roubinski d0dc195da8 Some improvements to Mix visual shader function 2019-08-06 08:06:49 +03:00
Yuri Roubinski 43ee35431e Fix opening of sub-resource properties in visual shaders 2019-08-05 17:13:02 +03:00
Yuri Roubinski 8a0767d883 Return back spacer for non-expression nodes in visual shader 2019-08-03 18:54:04 +03:00
Rémi Verschelde 3a6102a6f7
Merge pull request #31010 from Chaosus/vs_fix_expression
Some visual fixes for Expression node in visual shaders
2019-08-01 10:50:33 +02:00
Chaosus 82e2efe591 Some visual fixes for Expression node 2019-08-01 11:03:23 +03:00
Chaosus 8b4c538ab2 Expose several GLES3 built-ins to GLES2 2019-07-31 19:00:10 +03:00
Chaosus f704506807 Implement copy/paste in visual shaders 2019-07-31 12:43:29 +03:00
clayjohn 3f25dde6b4 added round function to gles2 2019-07-29 11:17:08 -07:00
Rémi Verschelde d15cf7b672
Merge pull request #30576 from qarmin/lgtm_coverage
Changed some code reported by LGTM and Coverity
2019-07-20 12:00:13 +02:00
qarmin 6cbaf7662f Changed some code showed in LGTM and Coverage 2019-07-20 08:09:57 +02:00
Rémi Verschelde 9384b6ab0e i18n: Sync translation template with current source
Fix a few typos in new strings.
2019-07-19 16:08:40 +02:00
Rémi Verschelde 23f5154de7
Merge pull request #30532 from Chaosus/vs_triplanar
Added triplanar uniform texture node to visual shaders
2019-07-15 07:56:06 +02:00
Chaosus e82b5e910a Better boolean indication in visual shaders 2019-07-15 08:31:51 +03:00
Chaosus d56fc13cad Highlight GLES3 functions in the visual shader member panel 2019-07-12 17:58:13 +03:00
Rémi Verschelde 584ca0f156
Merge pull request #30466 from Chaosus/vs_boolean_funcs
Added "Is" and "Compare" functions to visual shaders
2019-07-12 13:20:44 +02:00
Chaosus 9d6e1e3109 Added "Is" and "Compare" functions to visual shaders 2019-07-12 13:43:37 +03:00
Chaosus 0727caadd1 Added triplanar uniform texture node to visual shaders 2019-07-12 12:14:34 +03:00
Rémi Verschelde 34d7484039
Merge pull request #30455 from qarmin/const_reference
Pass by reference to const
2019-07-10 15:43:15 +02:00
qarmin 01cc7a996b Use reference to constant in functions 2019-07-10 11:54:12 +02:00
Hugo Locurcio 28d3a6051c
Use base Color() constructors instead of Color::html()
This results in slightly smaller binaries (-17 KB for an editor binary)
as no strings need to be allocated.
2019-07-08 21:17:10 +02:00
Rémi Verschelde bc00332286 Fix TTR strings for VisualShaderNodes
It had been done wrongly in #30185, but I missed it.
2019-07-02 13:29:26 +02:00
Rémi Verschelde 187d8addf9
Merge pull request #30152 from Chaosus/vs_conversion
Added convertor from VisualShader to Shader
2019-06-29 18:40:28 +02:00
hbina085 f531a92057 use vformat for duplicate strings
many strings in visual_shader_editor_plugin.cpp does not use vformat for duplicate strings making it harder to translate
2019-06-29 07:52:09 -04:00
Chaosus da7cf8b49f Added convertor from VisualShader to Shader 2019-06-28 19:54:43 +03:00
Rémi Verschelde f35fd681ac
Merge pull request #30114 from Chaosus/vs_context_menu
Shows menu when dragging connection on empty space in visual shader
2019-06-27 15:14:54 +02:00
Chaosus 0aec3c3113 Shows menu when dragging connection on empty space in visual shader graph 2019-06-27 10:48:18 +03:00
qarmin 4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Rémi Verschelde 5c66771e3e
Merge pull request #29283 from qarmin/fix_some_always_same_values
Remove always true/false values
2019-06-20 21:10:10 +02:00
qarmin 072e40368e Fix always true/false values 2019-06-20 16:59:48 +02:00
JohnJLight 38d3bfe971 Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
Chaosus cd3d538f12 Fix incorrect scroll when the user perform first action on visual shader 2019-05-29 07:41:29 +03:00
Chaosus 44de8b4964 Added a bunch of scalar constants to visual shaders 2019-05-27 18:39:59 +03:00
Chaosus e70ea5d97b Makes the expression node to apply expression only when the focus leaves out 2019-05-22 07:46:47 +03:00
Chaosus 6f2abd68f2 Fix few bugs in expression node 2019-05-21 18:37:31 +03:00
Chaosus 5648924eef Expression node for visual shaders 2019-05-21 12:11:41 +03:00
Chaosus 719a9a9c1c Added Fresnel and OneMinus to visual shaders 2019-05-19 13:44:30 +03:00
Chaosus 8a8b7af638 Fix collapse visual shader tree 2019-05-03 11:10:08 +03:00
Chaosus e57d761f9b Fix build visual_shader_editor_plugin 2019-05-03 08:50:00 +03:00
Chaosus 62b7132947 Fix input entries when switching to new visual shader 2019-05-02 10:00:08 +03:00
Chaosus 3c159ea379 Added missed inputs for other modes in visual shaders 2019-05-01 17:04:39 +03:00
Chaosus 7a9735eef4 Fix uniform title color in visual shaders(regression) 2019-04-26 10:53:40 +03:00
Chaosus 446f8a2cc2 Fix crash regression in visual shader 2019-04-25 07:46:18 +03:00
Chaosus 3a3df84d3b Fix connection lines glitch in visual shaders 2019-04-24 12:47:54 +03:00
Yuri Roubinsky 93e7eb0ddb
Merge pull request #28375 from Chaosus/fix_vs_loopback
Disallow loopback connection in visual shaders
2019-04-24 09:41:06 +03:00
Chaosus 21ca9f6c7c Disallow loopback connection in visual scripts and visual shaders 2019-04-24 09:14:45 +03:00
Chaosus 9ac770be45 Removes preview from existing transform nodes in visual shader 2019-04-24 08:08:29 +03:00
Rémi Verschelde 0453e6eddc
Merge pull request #28348 from Chaosus/fix_vs_transform_preview
Removed incorrect "Transform" preview from visual shaders
2019-04-23 23:19:31 +02:00
Chaosus be11b6f04d Removed incorrect "Transform" preview from visual shaders 2019-04-23 21:52:06 +03:00
Chaosus eb53c0fb32 Enlarge Vector3 constant node in visual shaders 2019-04-23 21:21:17 +03:00
homer666 557122fdda Misc improvements to visual shader Add Node dialog 2019-04-16 15:40:54 +10:00
Chaosus 24faddc211 Added possibilty to delete multiple nodes in visual shaders via Delete key 2019-04-14 09:49:51 +03:00
Chaosus 87f87839a6 Added conditional nodes to visual shaders 2019-04-13 18:17:20 +03:00
Rémi Verschelde c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
Chaosus 54bf313e07 Small hotfix to visual shader entries.. 2019-04-07 16:25:32 +03:00
Rémi Verschelde 3dabe862af
Merge pull request #26164 from Chaosus/vshader_improvements
Major update for visual shader system
2019-04-07 14:24:23 +02:00
Chaosus 5fd671b8a7 Major improvements for visual shader system 2019-04-07 08:17:38 +03:00
PouleyKetchoupp 8346d90c5e Properly handle different border widths in rounded corner aa
Note: removed (unused and not implemented) support for multiple border colors
2019-03-19 11:51:32 +01:00
Michael Alexsander Silva Dias 3ef8238c1c Make translatable some undo/redo operations in the editor 2019-02-21 16:41:01 -03:00
marxin 8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Juan Linietsky 541422a4a2 Clean up and fix issues after merging #21701 , closes #21104 2019-01-18 13:01:24 -03:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Michael Alexsander Silva Dias 9d4a996a08 Fix titles in graph editors being invisible when headers are enabled 2018-12-16 23:18:04 -02:00
Andrii Doroshenko (Xrayez) feb12559e6 Properly reselect duplicated visual shader nodes
This makes it much easier to drag duplicated nodes away from original ones.
2018-12-10 14:20:58 +02:00
Andrii Doroshenko (Xrayez) 86eb6951c7 Fix duplicating visual shader nodes 2018-12-09 15:37:57 +02:00
Michael Alexsander Silva Dias 3ae5eec366 Add tooltips to GraphEdit node 2018-12-04 15:00:27 -02:00
Rémi Verschelde 14632cf88f
Merge pull request #22239 from Chaosus/fix_vs_connection
Disconnects previous visual shader node before making a new connection
2018-09-20 18:46:02 +02:00
Chaosus a3fdaa4f21 Disconnect previous visual shader node connection before new connect 2018-09-19 10:30:45 +03:00
elasota 37595e183d Fix visual shader color constants not retaining edits 2018-09-15 02:47:38 -04:00
Rémi Verschelde 1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz 08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Rémi Verschelde 9eb4d4ab2d Add missing copyright headers 2018-08-29 22:41:17 +02:00
Hein-Pieter van Braam 2a02f44ad9 Don't try to update the visual shader graph if it doesn't exist yet
When setting shader mode on a visual shader that was just created in the
editor we try to _update_graph(). However, the graph does not yet exist
in the visualshadereditor. This gets populated in
VisualShaderEditor::edit() which hasn't been called yet.

This PR simply changes the logic to not try to update the non-existent
graph.

This fixes #20322
2018-08-12 22:33:35 +02:00
Hein-Pieter van Braam 0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Nufflee 228bd21e26 Fix #20171. 2018-07-20 22:25:18 +02:00
Rémi Verschelde 95d99cb2ac
Merge pull request #20176 from Chaosus/vs_namefixes
Several name fixes for visual shaders
2018-07-17 13:54:22 +02:00
Thomas Herzog 72430b041e
Merge pull request #20169 from Chaosus/rightclick_vs
Visual shaders - make "Add node" menu showed by right click
2018-07-16 15:46:18 +02:00
Chaosus 3af81427a1 Several name fixes for visual shader 2018-07-15 17:28:06 +03:00
Chaosus f8417ac682 Visual shaders - make "Add node" menu showed by right click 2018-07-15 10:33:11 +03:00
Chaosus c88da2fce5 Fix display scale bug in visual shaders 2018-07-15 08:55:41 +03:00
Juan Linietsky f6ce73f724 Visual Shaders are back. 2018-07-14 18:16:18 -03:00