weixin_39912580
weixin_39912580
2020-11-29 18:01

Boolean List is not existed anymore in 2.1?What is the substitute node?

该提问来源于开源项目:JacquesLucke/animation_nodes

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

12条回答

  • weixin_39672194 jck????? 5月前

    Boolean List still exist. What is the issue you are having?

    点赞 评论 复制链接分享
  • weixin_39912580 weixin_39912580 5月前

    How to add a Boolean List? Can not find it by search!Is it a BooleanCreateList?

    点赞 评论 复制链接分享
  • weixin_39672194 jck????? 5月前

    It is called Create Boolean List node.

    点赞 评论 复制链接分享
  • weixin_39912580 weixin_39912580 5月前

    Thanks! How to make the Invokesubprogram node’s output as Boolean List?

    点赞 评论 复制链接分享
  • weixin_39672194 jck????? 5月前

    See: https://animation-nodes-manual.readthedocs.io/en/latest/user_guide/subprograms/loop.html#generators

    点赞 评论 复制链接分享
  • weixin_39912580 weixin_39912580 5月前

    Thanks! Based on your previous coding: import bpy import animation_nodes as AN

    nodeTree = bpy.data.node_groups["NodeTree"]

    evalFalloff = nodeTree.nodes.new("an_EvaluateFalloffNode") evalFalloff.falloffType = "Transformation Matrix" evalFalloff.useList = True evalFalloff.location = (0, 140)

    loopInput = nodeTree.nodes.new("an_LoopInputNode") loopInput.location = (0, 0) loopInput.newIterator("Float List")

    invokeNode = nodeTree.nodes.new("an_InvokeSubprogramNode") AN.tree_info.update() invokeNode.subprogramIdentifier = loopInput.network.identifier invokeNode.location = (200, 140)

    nodeTree.links.new(invokeNode.inputs[0], evalFalloff.outputs[0])

    I wants to add loopGeneratorOutput for Boolean List,both below do not work. Please clarify! 1. loopGeneratorOutput =loopInput.createGeneratorOutputNode("Boolean") loopGeneratorOutput.location=(980,-360) 2. loopGeneratorOutput = ng.nodes.new("an_LoopGeneratorOutputNode") loopGeneratorOutput.location=(980,-360) loopGeneratorOutput.identifier=loopInput.network.identifier Thanks

    点赞 评论 复制链接分享
  • weixin_39672194 jck????? 5月前

    Please just look at the code in Animation Nodes. Most of this stuff is intuitive enough.

    python
    import bpy
    import animation_nodes as AN
    
    nodeTree = bpy.data.node_groups["NodeTree"]
    
    evalFalloff = nodeTree.nodes.new("an_EvaluateFalloffNode")
    evalFalloff.falloffType = "Transformation Matrix"
    evalFalloff.useList = True
    evalFalloff.location = (0, 140)
    
    loopInput = nodeTree.nodes.new("an_LoopInputNode")
    loopInput.location = (0, 0)
    loopInput.newIterator("Float List")
    
    invokeNode = nodeTree.nodes.new("an_InvokeSubprogramNode")
    AN.tree_info.update()
    invokeNode.subprogramIdentifier = loopInput.network.identifier
    invokeNode.location = (200, 140)
    
    nodeTree.links.new(invokeNode.inputs[0], evalFalloff.outputs[0])
    
    loopGenerator = nodeTree.nodes.new("an_LoopGeneratorOutputNode")
    loopGenerator.location = (500, 0)
    loopGenerator.loopInputIdentifier = loopInput.identifier
    loopGenerator.listDataType = "Boolean List"
    
    点赞 评论 复制链接分享
  • weixin_39912580 weixin_39912580 5月前

    Thanks! Also how can invokeNode’s output be updated to Boolean list as well?

    点赞 评论 复制链接分享
  • weixin_39672194 jck????? 5月前

    It will update automatically.

    点赞 评论 复制链接分享
  • weixin_39912580 weixin_39912580 5月前

    Thanks! In my case, if by python script, it will not update automatically. def createGeneratorOutputNode(self, dataType): node = newNodeAtCursor("an_LoopGeneratorOutputNode") node.loopInputIdentifier = self.identifier node.listDataType = dataType node.outputName = dataType invokeTranslation() subprogramInterfaceChanged()

    If the last two functions were not called, then it will not be updated automatically

    AN.utils.nodes.invokeTranslation() AN.utils.nodes.subprogramInterfaceChanged()

    But it did not work.

    点赞 评论 复制链接分享
  • weixin_39672194 jck????? 5月前

    Just create the generator before adding the invoke node then.

    点赞 评论 复制链接分享
  • weixin_39912580 weixin_39912580 5月前

    Thanks a lot! It works.

    点赞 评论 复制链接分享

相关推荐