Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Duplicate and Input nodes creating objects only once in a for-loop #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomoaki-e33
Copy link

Example node tree:
スクリーンショット 2020-02-06 8 48 10
Result in v3.1.4:
スクリーンショット 2020-02-06 8 51 59
Result after this PR:
スクリーンショット 2020-02-06 8 48 29

Copy link
Owner

@aachman98 aachman98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like how you handled the object creation when the node is re-executed, but I think there might be an easier workaround.
Consider the following steps:

  1. Create an object: bpy.ops.mesh.primitive_something_add(something)
  2. Go to edit mode
  3. Use same function used in Step 1 to append geometry into same object without creating a separate mesh.

So instead of manually keeping record of all the objects generated, it would be better to create additional set of nodes that call bpy.ops.mesh, but in Edit Mode of the input object. The class "ScEditOperatorNode" would be the parent class for those nodes (rather than "ScInputNode").

We can think of something similar for "Duplicate Object" node.

@aachman98
Copy link
Owner

We'll have to add a prefix to the current input nodes, like "Create Cube".
Then we can have edit operator nodes like "Add Cube", but keep them in the "Inputs" category.

@aachman98 aachman98 added the question Further information is requested label Mar 6, 2020
@aachman98 aachman98 added the scheduled Feature to be released soon label Jul 12, 2020
@aachman98 aachman98 removed the question Further information is requested label Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scheduled Feature to be released soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants