nodes library
Closed this issue · 0 comments
So I think I know how I would like the user lib to work.
The perfect solution will be to just add it to a new menu with manually populated command.
let's say user press W and he sees the menu with 4 options object, edit, hops, bc and then when he hovers under obj he got the more detailed options for specific operators lets say he takes one called transform
now what he gets is not the new node but the classic command node with a filed output socket
with the command of the transform
if that makes sense
@proxeIO
so the question is, can we do it?
first, can we build custom menus, that call nodes? (called from other buttons then shift A)
and then can we create an entry that will bring command node with the filled output socked (command and text info)?
in py examples, there is a way to use settings that way
# all categories in a list
node_categories = [
# identifier, label, items list
MyNodeCategory('SOMENODES', "Some Nodes", items=[
# our basic node
NodeItem("CustomNodeType"),
]),
MyNodeCategory('OTHERNODES', "Other Nodes", items=[
# the node item can have additional settings,
# which are applied to new nodes
# NB: settings values are stored as string expressions,
# for this reason they should be converted to strings using repr()
NodeItem("CustomNodeType", label="Node A", settings={
"my_string_prop": repr("Lorem ipsum dolor sit amet"),
"my_float_prop": repr(1.0),
}),
NodeItem("CustomNodeType", label="Node B", settings={
"my_string_prop": repr("consectetur adipisicing elit"),
"my_float_prop": repr(2.0),
}),
]),
]
but it's a little more problematic in our case
I can't find any other info in documentation