Post #3888: bpy.ops.pme.input_box(func = lambda value: print(value) )
📋 Metadata
- Author: wilBr
- Date: 2021-06-07 20:32:45
- Type:
question - Quality Score: 7/10
🏷️ Tags
python-scripting intermediate solved
⚙️ Related PME Features
- Popup Dialog Editor
- Macro Editor
- Python Scripting
💬 Content
bpy.ops.pme.input_box(func = lambda value: print(value) )
Dont working???
TypeError: Converting py args to operator properties: : keyword “func” unrecognized
Edit: I found the answer… I need to call input_box func and not the bpy.ops.pme.input_box operator… 
command to create a new collection, set name to input box query dialog, add selected objects to new collection and remove from anothers collections:
input_box(func = lambda value: [ {None for C.scene[‘tempCol’] in [bpy.data.collections.new(name=value)]}, C.scene.collection.children.link(C.scene[‘tempCol’]), [ (C.scene[‘tempCol’] not in o.users_collection and C.scene[‘tempCol’].objects.link(o), [col.objects.unlink(o) for col in o.users_collection if col != C.scene[‘tempCol’] ]) for o in C.selected_objects] ] )