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

New structure for JSON files and new approach of adding changes into the JSON format #4118

Merged
merged 30 commits into from
Jun 7, 2021

Conversation

Durman
Copy link
Collaborator

@Durman Durman commented May 22, 2021

Addressed problem description

This PR should make it easier to add new features into JSON format like saving mesh data blocks, text script files etc.
Also it adds supporting serialization of node groups into JSON

closes #4096 #4100

What's new:

  • JSON file format
  • Group tree export/import
  • Node presets for group nodes
  • Node presets inside group trees

Preflight checklist

  • Code changes complete.
  • Code documentation complete.
  • Manual testing done.
  • Unit-tests implemented.
  • Ready for merge.

@Durman Durman linked an issue May 22, 2021 that may be closed by this pull request
Durman added 28 commits May 23, 2021 17:05
… but particular in this case I did not think about back capability because JSON files of this format was not created yet
…nd add pointer type property. This changes are required by new JSON serialization module
…ut and output nodes. They have dynamic modifiers which are determine when interface sockets of group tree are creating. Solution was to keep socket identifiers in similar way as new socket names. For Group input and output nodes there is decision not saving their sockets. Data blocks of pointer properties, export of that is not supported, are ignored during export. Also fixing some bugs.
…ructures, fix some load_from_json methods according to new importer
…pporting can be added easily but group input/output nodes should be excluded from exported nodes because in other way they can get into a normal tree during an import. Also for preset panel node group tree should get extra properties. Probably I did not switched off in all possible places (context menus?)
# Conflicts:
#	json_examples/Advanced/Pineapple.json
#	node_tree.py
#	utils/__init__.py
@Durman Durman merged commit 2c1026c into master Jun 7, 2021
@Durman Durman deleted the node_groups_to_json branch June 7, 2021 06:35
@@ -199,6 +185,7 @@ def draw(self, context):
col = self.layout.column() # old syntax in <= 2.83

col.use_property_split = True
col.prop(self, 'compact')
Copy link
Collaborator

Choose a reason for hiding this comment

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

OK. i like that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSON export does not preserve socket menu choice Import / exprot json for new node groups
2 participants