Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified ladybug_grasshopper/icon/LB Export UserObject.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ladybug_grasshopper/json/LB_Export_UserObject.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.2.0",
"version": "1.10.0",
"nickname": "ExportUO",
"outputs": [
[]
Expand Down Expand Up @@ -35,7 +35,7 @@
}
],
"subcategory": "5 :: Version",
"code": "\ntry:\n from ladybug_{{cad}}.versioning.gather import gather_canvas_components, \\\n gather_connected_components\n from ladybug_{{cad}}.versioning.diff import validate_change_type\n from ladybug_{{cad}}.versioning.export import export_component, refresh_toolbar\n from ladybug_{{cad}}.{{plugin}} import turn_off_old_tag\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_{{cad}}:\\n\\t{}'.format(e))\nturn_off_old_tag(ghenv.Component)\n\n\nif _export and _folder and len(_components) != 0:\n change_type = validate_change_type(_change_type_)\n comps_to_export = gather_connected_components(ghenv.Component) \\\n if str(_components[0]) != '*' \\\n else gather_canvas_components(ghenv.Component)\n for comp in comps_to_export:\n print('Processing %s...' % comp.Name)\n export_component(_folder, comp, _change_type_)\n refresh_toolbar() # try to update the toolbar\nelse:\n print('Connect _components and _folder')\n",
"code": "\ntry:\n from ladybug_{{cad}}.versioning.gather import gather_canvas_components, \\\n gather_connected_components\n from ladybug_{{cad}}.versioning.diff import validate_change_type\n from ladybug_{{cad}}.versioning.export import export_component, refresh_toolbar\n from ladybug_{{cad}}.{{plugin}} import turn_off_old_tag\nexcept ImportError as e:\n raise ImportError('\\nFailed to import ladybug_{{cad}}:\\n\\t{}'.format(e))\nturn_off_old_tag(ghenv.Component) # turn off the OLD tag in {{Cad}} 8\n\n\nif _export and _folder and len(_components) != 0:\n change_type = validate_change_type(_change_type_)\n comps_to_export = gather_connected_components(ghenv.Component) \\\n if str(_components[0]) != '*' \\\n else gather_canvas_components(ghenv.Component)\n for comp in comps_to_export:\n print('Processing %s...' % comp.Name)\n export_component(_folder, comp, _change_type_)\n refresh_toolbar() # try to update the toolbar\nelse:\n print('Connect _components and _folder')\n",
"category": "Ladybug",
"name": "LB Export UserObject",
"description": "Export a Ladybug Tools Grasshopper GHPython component as a UserObject that can\nbe installed on other's machines.\n-"
Expand Down
10 changes: 5 additions & 5 deletions ladybug_grasshopper/src/LB Export UserObject.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Ladybug: A Plugin for Environmental Analysis (GPL)
# This file is part of Ladybug.
#
# Copyright (c) 2020, Ladybug Tools.
# You should have received a copy of the GNU General Public License
# Copyright (c) 2026, Ladybug Tools.
# You should have received a copy of the GNU Affero General Public License
# along with Ladybug; If not, see <http://www.gnu.org/licenses/>.
#
# @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>
# @license AGPL-3.0-or-later <https://spdx.org/licenses/AGPL-3.0-or-later>

"""
Export a Ladybug Tools Grasshopper GHPython component as a UserObject that can
Expand Down Expand Up @@ -56,7 +56,7 @@

ghenv.Component.Name = 'LB Export UserObject'
ghenv.Component.NickName = 'ExportUO'
ghenv.Component.Message = '1.2.0'
ghenv.Component.Message = '1.10.0'
ghenv.Component.Category = 'Ladybug'
ghenv.Component.SubCategory = '5 :: Version'
ghenv.Component.AdditionalHelpFromDocStrings = '0'
Expand All @@ -69,7 +69,7 @@
from ladybug_rhino.grasshopper import turn_off_old_tag
except ImportError as e:
raise ImportError('\nFailed to import ladybug_rhino:\n\t{}'.format(e))
turn_off_old_tag(ghenv.Component)
turn_off_old_tag(ghenv.Component) # turn off the OLD tag in Rhino 8


if _export and _folder and len(_components) != 0:
Expand Down
Binary file modified ladybug_grasshopper/user_objects/LB Export UserObject.ghuser
Binary file not shown.