Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_operators/wm.py
| Show All 20 Lines | |||||
| import bpy | import bpy | ||||
| from bpy.types import Operator | from bpy.types import Operator | ||||
| from bpy.props import ( | from bpy.props import ( | ||||
| StringProperty, | StringProperty, | ||||
| BoolProperty, | BoolProperty, | ||||
| IntProperty, | IntProperty, | ||||
| FloatProperty, | FloatProperty, | ||||
| EnumProperty, | EnumProperty, | ||||
| CollectionProperty, | |||||
| ) | ) | ||||
| from bpy.app.translations import pgettext_tip as tip_ | from bpy.app.translations import pgettext_tip as tip_ | ||||
| rna_path_prop = StringProperty( | rna_path_prop = StringProperty( | ||||
| name="Context Attributes", | name="Context Attributes", | ||||
| description="RNA context string", | description="RNA context string", | ||||
| ▲ Show 20 Lines • Show All 2,071 Lines • ▼ Show 20 Lines | def execute(self, context): | ||||
| module_name = self.module | module_name = self.module | ||||
| mod = addon_utils.addons_fake_modules.get(module_name) | mod = addon_utils.addons_fake_modules.get(module_name) | ||||
| if mod is not None: | if mod is not None: | ||||
| info = addon_utils.module_bl_info(mod) | info = addon_utils.module_bl_info(mod) | ||||
| info["show_expanded"] = not info["show_expanded"] | info["show_expanded"] = not info["show_expanded"] | ||||
| return {'FINISHED'} | return {'FINISHED'} | ||||
campbellbarton: nice to pass `-noaudio` too :) | |||||
Done Inline Actionswould just use a list in this and append. campbellbarton: would just use a list in this and append. | |||||
Done Inline Actions*picky* - would prefer to have release/scripts/startup/bl_operators/file.py - wm.py is is already getting a bit messy. campbellbarton: *picky* - would prefer to have `release/scripts/startup/bl_operators/file.py` - `wm.py` is is… | |||||
Not Done Inline ActionsI never needed to do this? - what fails if its removed? campbellbarton: I never needed to do this? - what fails if its removed? | |||||
Not Done Inline ActionsNot sure which parser you are using, but I can assure you argparse needs this, otherwise it 'eats'/ignores the first given arg... mont29: Not sure which parser you are using, but I can assure you `argparse` needs this, otherwise it… | |||||
Done Inline ActionsIts possible to use argparse in a way that its not needed. See: release/scripts/templates_py/background_job.py -> parser.parse_args(argv). campbellbarton: Its possible to use `argparse` in a way that its not needed. See… | |||||
nice to pass -noaudio too :)