-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Hubs-Foundation:master' into LightMapBakeOperator
- Loading branch information
Showing
54 changed files
with
976 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
from bpy.props import BoolProperty | ||
from ..hubs_component import HubsComponent | ||
from ..types import NodeType, PanelType, Category | ||
from ..utils import remove_component, add_component | ||
from .networked_transform import NetworkedTransform | ||
|
||
|
||
class Grabbable(HubsComponent): | ||
_definition = { | ||
'name': 'grabbable', | ||
'display_name': 'Grabbable', | ||
'category': Category.OBJECT, | ||
'node_type': NodeType.NODE, | ||
'panel_type': [PanelType.OBJECT], | ||
'icon': 'VIEW_PAN', | ||
'deps': ['rigidbody', 'networked-transform'], | ||
'version': (1, 0, 1) | ||
} | ||
|
||
cursor: BoolProperty( | ||
name="By Cursor", description="Can be grabbed by a cursor", default=True) | ||
|
||
hand: BoolProperty( | ||
name="By Hand", description="Can be grabbed by VR hands", default=True) | ||
|
||
@classmethod | ||
def init(cls, obj): | ||
obj.hubs_component_list.items.get('rigidbody').isDependency = True | ||
|
||
def migrate(self, migration_type, panel_type, instance_version, host, migration_report, ob=None): | ||
migration_occurred = False | ||
if instance_version <= (1, 0, 0): | ||
migration_occurred = True | ||
|
||
# This was a component that has disappeared but it was usually added together with grababble so we try to remove those instances. | ||
if "capturable" in host.hubs_component_list.items: | ||
remove_component(host, "capturable") | ||
|
||
if "networked-object-properties" in host.hubs_component_list.items: | ||
remove_component(host, "networked-object-properties") | ||
|
||
add_component(host, NetworkedTransform.get_name()) | ||
|
||
return migration_occurred |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
addons/io_hubs_addon/components/definitions/networked_transform.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from io_hubs_addon.components.hubs_component import HubsComponent | ||
from io_hubs_addon.components.types import NodeType, PanelType | ||
|
||
|
||
class NetworkedTransform(HubsComponent): | ||
_definition = { | ||
'name': 'networked-transform', | ||
'display_name': 'Networked Transform', | ||
'node_type': NodeType.NODE, | ||
'panel_type': [PanelType.OBJECT], | ||
'icon': 'EMPTY_AXIS', | ||
'deps': ['networked'], | ||
'version': (1, 0, 0) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.