Merge pull request #1383 from Sandy10000/master
Logic node that loads url
This commit is contained in:
commit
da793004c8
2 changed files with 32 additions and 0 deletions
16
Sources/armory/logicnode/LoadUrlNode.hx
Normal file
16
Sources/armory/logicnode/LoadUrlNode.hx
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
// This node does not work with Krom. "Browser compilation only" node.
|
||||||
|
|
||||||
|
package armory.logicnode;
|
||||||
|
|
||||||
|
import kha.System;
|
||||||
|
|
||||||
|
class LoadUrlNode extends LogicNode {
|
||||||
|
|
||||||
|
public function new(tree:LogicTree) {
|
||||||
|
super(tree);
|
||||||
|
}
|
||||||
|
|
||||||
|
override function run(from:Int) {
|
||||||
|
System.loadUrl(inputs[1].get());
|
||||||
|
}
|
||||||
|
}
|
16
blender/arm/logicnode/native_loadUrl.py
Normal file
16
blender/arm/logicnode/native_loadUrl.py
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
import bpy
|
||||||
|
from bpy.props import *
|
||||||
|
from bpy.types import Node, NodeSocket
|
||||||
|
from arm.logicnode.arm_nodes import *
|
||||||
|
|
||||||
|
class LoadUrlNode(Node, ArmLogicTreeNode):
|
||||||
|
'''Load Url'''
|
||||||
|
bl_idname = 'LNLoadUrlNode'
|
||||||
|
bl_label = 'Load Url (Browser only)'
|
||||||
|
bl_icon = 'QUESTION'
|
||||||
|
|
||||||
|
def init(self, context):
|
||||||
|
self.inputs.new('ArmNodeSocketAction', 'In')
|
||||||
|
self.inputs.new('NodeSocketString', 'URL')
|
||||||
|
|
||||||
|
add_node(LoadUrlNode, category='native')
|
Loading…
Reference in a new issue