ASE importer has error importing #73848
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#73848
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Darwin-15.6.0-x86_64-i386-64bit 64 Bits
Graphics card: Intel Iris Pro OpenGL Engine Intel Inc. 4.1 INTEL-10.14.74
Blender Version
Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-02-12 16:20, hash:
blender/blender@77d23b0bd7
Worked: (optional)
Short description of error
Trying to test with ASE file from Adobe Color. I was busy as well making such an addon when noticed this one was released now with 2.82
First runs give me error about getting data but return key error. I noticed that somehow the files also show a single quote when importing them. These however dont show in my system?
File under OSX
File in blender now has single quote at the end?
Exact steps for others to reproduce the error
01 Enable addon in preferences
02 Download attached ase file from Adobe Color
03 Go to FIle > Import > Import ASE
04 See console log, error below
After checking the data, it seems okay. This is what i get from print data out of that file. I did beautify it for readability
AdobeColor-Various.ase
Added subscriber: @RomboutVersluijs
PS lots of code looks same as the source ive found on github. The one from github import the data without issues.
https://github.com/nsfmc/swatch
Using that version from Github also allows you to export to ASE files. I also get Pablos part to work using the normal palette in Blender
Okay took a while to get it to work. Basically this uses exact same code as mine. But they stripped out the exporter part and also implemented a different method for importing the 2 separate importers. The issue is that the original script sends a the results to itself again when it find the word "swatches". But the mehtod they use now for loading filepath causes big issues with that.
So i made a different approach to loop over the jason data. Im not really formilliar with get data from json files. i tried getting them direct but it kept returning keyerror?!
Also fixed the issue with naming the palette. They used wrong method for this. Now it names the palette to the ASE filename. Though this is not always a good method. These palettes have palette names most of the time.
Im dont exactly know how to make a pull request for this or where original code is kept. I can make a pull if i get the original repo. Ive attached fixed script
PS that issue with the single quote in the filename, see first post. I think that is due to the swatch name. Inside this ASE file you can see its called Various' i think somehow Blender renders that name?!?!? Now i fixed the script, i dont see it anymore?
import_ase.py
Just noticed a new issue. ASE files exported from Photoshop on OSX dont seem to get imported, i dont see any error. I did export a version with more than the standard 5 colors they normally have.
I see that the structure of an ASE file from photoshop is different than the one from https://color.adobe.com/
See attached files, photoshop seems to make stripped down vresion, while the only generator makes different version with more options.
Photoshop ASE
Adobe.color.com ASE
AdobeColor-Various.ase
Allusion_Swatches_15022020.ase
EDIT
I test it with a dirty fix and both version work now for me. Ill try to make a it clear, shorter code
Well many hours later now, i finally got it working properly. It took me ages to find test files for Krita. I only found gpl (gimp) files. I have not found their new palette file KPL yet. I noticed with GPL files that sometimes there are empty lines, so i now skip over those. Also here i go the naming for the palette properly working now. I also added function that it makes the palette active, i think that is what a user wants right?
I also give the user feedback with the operator. So if there is an issue with the file, i let the user know. Also when imported is a success i let the user know.
In addition, i append the importers to the palette panel. I find it tedious to go to file > import. It much easier if that import is near where your working
Though im not really familiar with the new GUI methods, so i used a simple align method to align the import buttons
PS in my personal addon i got it also to work with the paint addon which comes with Blender now. Is it an idea to add this in the preferences, so a user can decide to add the imported palettes to that one as well? I tried looking into adding a preset, but its setup is completely different. I am able to add the colors. But adding a palette for that one is hard for me to achieve
I added an option to the preferences so user can choose whether or not to show the importers in the Color Palettes
Do i need to make a pull request on this repo? I found a couple of Blender Github pages, 2 seem legit. Im not sure which is the real one. I guess the blender.org linked one.
https://github.com/blender/blender-addons/tree/master/io_import_palette
I think i got a cleaner solution for the part adding it to the color palette. Adding it as a sub-panel is much cleaner and also confirm Blenders UI. This setup also allows for possible expansion. I want to see if i can add more file types like XML and CSS for instance
EDIT
I cant seem to comment anymore?
Ill check out those links and check if i get that to work. As long as dont need to fork or got all addons.
PS this is a addon. I did tag this in addon section. Its a bit awkward tagging need to be done after post is made by the way?
Ive also added option for CSS file import now. It checks all colors and filters out the doubles
Added subscriber: @ankitm
@RomboutVersluijs you need to create a commit on https://developer.blender.org/differential/ using raw diff (or
arc
preferably)If this is an add-on, it would be a bit different, but I'm not sure how.. see https://wiki.blender.org/wiki/Process/Addons
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @ideasman42
Marking as patch, since this task includes a fix.
However fixes normally go via differential as noted by @ankitm.
Added subscriber: @BrendonMurphy
Added subscriber: @neo_phi
Could I get a link to a repo/files for the fixed version of this addon? I couldn't find it in https://developer.blender.org/diffusion/BAC/
IM sorry, i did have much time to look into how to work with this method of setting up a repo. I normally use Github for it's kind of work.
The original version is also an addon so i didn't change that part. I changed the the location though. I added it to the location in the color palleters since that made more sense and is much easier accessible.
I have also implemented the same color sorting methods and added 1 extra which works better. Im still working on a function which can reset the sorting to the original order. I think in some cases this is useful since the sorting sometimes gives weird results.
Is it okay if I set up a Github repo and pass the link? My current state is that i still need a to-do some work on that resetting part. My idea for this is running a loop over all colors and add them in the scene data. All other parts work, one thing is that my sorting is added to my layout since the new sorting option wasn't available at that time.
The 2 extra sorting methods are "step" and "step noise". They sort really nice i think. I got the code from this source and have added all my sources in the py files as links http://www.alanzucconi.com/2015/09/30/colour-sorting/
The work you've done looks great to me and I'd love to test it out. Also, I am starting a new project and this add-on would be super useful (I found this bug report as the version in 2.83 LTS is completely broken).
Unfortunately, I don't know what the official workflow is on the submission of code for review in core add-ons but I'd can't see why anyone would mind if you have a working Github repo in the interim. Users like myself would be grateful to just get a working version. It can always be merged back and reviewed when time is right.
Did you ever create a repo for this? I notice that the add-on version in 2.83.2 is still completely broken. I'd love to try out the version you have enhanced.
Added subscriber: @Radivarig