-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize package structure and add gltfpack as a compression option.
- Loading branch information
Showing
23 changed files
with
249 additions
and
201 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
File renamed without changes
File renamed without changes.
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 echo import SelectionCallbackProperty | ||
from glue.config import DictRegistry | ||
from glue.core.data_combo_helper import ComboHelper | ||
from glue.core.state_objects import State | ||
|
||
|
||
__all__ = ['ar_layer_export'] | ||
|
||
|
||
class ARExportLayerOptionsRegistry(DictRegistry): | ||
|
||
def add(self, layer_state_cls, layer_options_state): | ||
if not issubclass(layer_options_state, State): | ||
raise ValueError("Layer options must be a glue State type") | ||
self._members[layer_state_cls] = layer_options_state | ||
|
||
def __call__(self, layer_state_cls): | ||
def adder(export_state_class): | ||
self.add(layer_state_cls, export_state_class) | ||
return adder | ||
|
||
|
||
ar_layer_export = ARExportLayerOptionsRegistry() | ||
|
||
|
||
class ARExportDialogState(State): | ||
|
||
filetype = SelectionCallbackProperty() | ||
layer = SelectionCallbackProperty() | ||
compression = SelectionCallbackProperty(True) | ||
|
||
def __init__(self, layers): | ||
|
||
super(ARExportDialogState, self).__init__() | ||
|
||
self.filetype_helper = ComboHelper(self, 'filetype') | ||
self.filetype_helper.choices = ['glTF', 'glB', 'OBJ'] | ||
|
||
self.compression_helper = ComboHelper(self, 'compression') | ||
self.compression_helper.choices = ['None', 'Draco', 'Meshoptimizer'] | ||
|
||
self.layers = layers | ||
self.layer_helper = ComboHelper(self, 'layer') | ||
self.layer_helper.choices = [state.layer.label for state in self.layers] |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
glue_ar/export_scatter.py → glue_ar/common/scatter_export_options.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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
glue_ar/export_volume.py → glue_ar/common/volume_export_options.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
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
Oops, something went wrong.