-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add support for pure-binary grease pencil line art files #248
Conversation
This PR also adds support for Blender 4.2+ via a second, identical version of the Blender addon that has the proper blender_manifest.toml alongside the script. |
} | ||
|
||
// Codes: 0 - Parsing failed | 1 - No frames read | 2 - No valid frames | ||
void BinaryLineArtParser::parsingFailed(int code) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing an implementation - please could you also change code
to be an enum so that it's more readable?
auto json = juce::JSON::parse(message.get()); | ||
|
||
juce::Array<juce::var> objects = *json.getProperty("objects", juce::Array<juce::var>()).getArray(); | ||
double focalLength = json.getProperty("focalLength", 1); | ||
|
||
std::vector<Line> frameContainer = LineArtParser::generateFrame(objects, focalLength); | ||
std::vector<Line> frameContainer = BinaryLineArtParser::generateJsonFrame(objects, focalLength); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How much work would it be to change this over to the binary format instead of sending json? I imagine it would lead to a big performance improvement when live-sending frames from Blender
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
james to check whether this can be made into just a single file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DJLevel3 it works fine if you install a single zip file on both versions where:
zip contains blender_manifest.toml
with Blender 4.2 minimum
__init__.py
contains bl_info
with Blender 3.1.2 minimum
I tested on both 3.1.2 and 4.2 and the same zip file worked for both, so we should be good to make those changes and collapse it into a single file, and it also means we only need to distribute a single plugin which is a nice bonus.
This reverts commit 762b183. Revert changes that were done badly
1ee2c25
to
899f27d
Compare
I'll have to redo these changes as they're not compatible with the LuaJIT changes in #259. Closing for now, I'll get back to it once things are finalized with LuaJIT. |
Pretty much as described in the title, this improves line-art loading and parsing performance immensely at the expense of making the files non-human-readable (though they were pretty unreadable before, lmao) and deprecates the JSON format (though preserving the format's useability).