Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ivmi-Builder
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Damien Marchal
Ivmi-Builder
Commits
0ab84732
Commit
0ab84732
authored
1 year ago
by
Florent Berthaut
Browse files
Options
Downloads
Patches
Plain Diff
Add global position to default properties
parent
772aac5e
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
core/IvmiNode.gd
+4
-0
4 additions, 0 deletions
core/IvmiNode.gd
core/IvmiScene.gd
+1
-1
1 addition, 1 deletion
core/IvmiScene.gd
core/net/GodOSC.gd
+10
-3
10 additions, 3 deletions
core/net/GodOSC.gd
core/net/IvmiDiscov.gd
+0
-2
0 additions, 2 deletions
core/net/IvmiDiscov.gd
with
15 additions
and
6 deletions
core/IvmiNode.gd
+
4
−
0
View file @
0ab84732
...
@@ -18,6 +18,7 @@ func _ready():
...
@@ -18,6 +18,7 @@ func _ready():
#add default properties
#add default properties
_add_property
(
"position"
,
[
position
.
x
,
position
.
y
,
position
.
z
])
_add_property
(
"position"
,
[
position
.
x
,
position
.
y
,
position
.
z
])
_add_property
(
"global_position"
,
[
position
.
x
,
position
.
y
,
position
.
z
])
_add_property
(
"scale"
,
[
scale
.
x
,
scale
.
y
,
scale
.
z
])
_add_property
(
"scale"
,
[
scale
.
x
,
scale
.
y
,
scale
.
z
])
_add_property
(
"selected"
,
[
0
])
_add_property
(
"selected"
,
[
0
])
_add_property
(
"triggered"
,
[
0
])
_add_property
(
"triggered"
,
[
0
])
...
@@ -78,6 +79,9 @@ func set_property(prop, vals):
...
@@ -78,6 +79,9 @@ func set_property(prop, vals):
"position"
:
"position"
:
if
_can_be_moved
:
if
_can_be_moved
:
position
=
Vector3
(
vals
[
0
],
vals
[
1
],
vals
[
2
])
position
=
Vector3
(
vals
[
0
],
vals
[
1
],
vals
[
2
])
"global_position"
:
if
_can_be_moved
:
global_position
=
Vector3
(
vals
[
0
],
vals
[
1
],
vals
[
2
])
"rotation"
:
"rotation"
:
if
_can_be_rotated
:
if
_can_be_rotated
:
rotation_degrees
=
Vector3
(
vals
[
0
],
vals
[
1
],
vals
[
2
])
rotation_degrees
=
Vector3
(
vals
[
0
],
vals
[
1
],
vals
[
2
])
...
...
This diff is collapsed.
Click to expand it.
core/IvmiScene.gd
+
1
−
1
View file @
0ab84732
...
@@ -38,7 +38,7 @@ enum VRMode {SplitHorizontal, SplitVertical, Anaglyph, QuadBuffer}
...
@@ -38,7 +38,7 @@ enum VRMode {SplitHorizontal, SplitVertical, Anaglyph, QuadBuffer}
@
export
var
_screen_vr_screen_size
=
Vector2
(
3
,
2
)
:
set
=
set_screen_vr_screen_size
@
export
var
_screen_vr_screen_size
=
Vector2
(
3
,
2
)
:
set
=
set_screen_vr_screen_size
@
export
var
_screen_vr_window_size
=
Vector2
(
1024
,
600
)
:
set
=
set_screen_vr_window_size
@
export
var
_screen_vr_window_size
=
Vector2
(
1024
,
600
)
:
set
=
set_screen_vr_window_size
@
export
var
_screen_vr_window_position
=
Vector2
(
640
,
480
)
:
set
=
set_screen_vr_window_position
@
export
var
_screen_vr_window_position
=
Vector2
(
640
,
480
)
:
set
=
set_screen_vr_window_position
var
_xr_interface
var
_xr_interface
:
XRInterface
var
_config
var
_config
# Network variables
# Network variables
...
...
This diff is collapsed.
Click to expand it.
core/net/GodOSC.gd
+
10
−
3
View file @
0ab84732
...
@@ -7,6 +7,10 @@ var _socket = PacketPeerUDP.new()
...
@@ -7,6 +7,10 @@ var _socket = PacketPeerUDP.new()
var
_output_address
=
"127.0.0.1"
var
_output_address
=
"127.0.0.1"
var
_output_port
=
7770
var
_output_port
=
7770
var
_input_port
=
7771
var
_input_port
=
7771
var
_verbose
=
false
func
set_verbose
(
v
:
bool
)
->
void
:
_verbose
=
v
func
set_output
(
address
,
port
)
:
func
set_output
(
address
,
port
)
:
_output_address
=
address
_output_address
=
address
...
@@ -14,14 +18,16 @@ func set_output(address, port) :
...
@@ -14,14 +18,16 @@ func set_output(address, port) :
if
_socket
.
set_dest_address
(
_output_address
,
_output_port
)
!=
OK
:
if
_socket
.
set_dest_address
(
_output_address
,
_output_port
)
!=
OK
:
print
(
"GodOSC : Error setting output "
,
address
,
":"
,
port
)
print
(
"GodOSC : Error setting output "
,
address
,
":"
,
port
)
else
:
else
:
print
(
"GodOSC : Setting output to "
,
address
,
":"
,
port
)
if
_verbose
:
print
(
"GodOSC : Setting output to "
,
address
,
":"
,
port
)
func
set_input_port
(
port
)
:
func
set_input_port
(
port
)
:
_input_port
=
port
_input_port
=
port
if
_socket
.
bind
(
_input_port
)
!=
OK
:
if
_socket
.
bind
(
_input_port
)
!=
OK
:
print
(
"GodOSC : Error setting input "
,
port
)
print
(
"GodOSC : Error setting input "
,
port
)
else
:
else
:
print
(
"GodOSC : Listening to port "
,
port
)
if
_verbose
:
print
(
"GodOSC : Listening to port "
,
port
)
func
set_multicast
(
addr
)
:
func
set_multicast
(
addr
)
:
...
@@ -30,7 +36,8 @@ func set_multicast(addr) :
...
@@ -30,7 +36,8 @@ func set_multicast(addr) :
if
_socket
.
join_multicast_group
(
addr
,
interf
.
name
)
!=
OK
:
if
_socket
.
join_multicast_group
(
addr
,
interf
.
name
)
!=
OK
:
print
(
"GodOSC : Error joining multicast on "
,
interf
.
name
)
print
(
"GodOSC : Error joining multicast on "
,
interf
.
name
)
else
:
else
:
print
(
"GodOSC : Joining multicast on "
,
interf
.
name
)
if
_verbose
:
print
(
"GodOSC : Joining multicast on "
,
interf
.
name
)
func
send_msg
(
address
,
tags
,
args
)
:
func
send_msg
(
address
,
tags
,
args
)
:
...
...
This diff is collapsed.
Click to expand it.
core/net/IvmiDiscov.gd
+
0
−
2
View file @
0ab84732
...
@@ -31,8 +31,6 @@ func start() :
...
@@ -31,8 +31,6 @@ func start() :
_osc_discov
.
set_input_port
(
mcprt
)
_osc_discov
.
set_input_port
(
mcprt
)
_osc_discov
.
set_multicast
(
mcadd
)
_osc_discov
.
set_multicast
(
mcadd
)
print
(
_osc_discov
.
get_local_address
())
#retrieve local address
#retrieve local address
_local_addr
=
_osc_discov
.
get_local_address
()
_local_addr
=
_osc_discov
.
get_local_address
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment