-
Notifications
You must be signed in to change notification settings - Fork 29
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
Unknown Entity General KV Property Support #181
Comments
I quickly did the Rust side of this in this branch, so only the Python import code would need to be edited to import this information. So if you want to experiment with how to get the properties to Blender using the Python API, you can clone this branch and edit the file unknown_entity.py, where the properties would be accessible by calling the properties() function returning a dict in the UnknownEntity class. You would need to build the Rust code to get the new function there, but there are instructions for that in the readme. This is only for unknown point entities imported by the "import unknown entities" option though. |
Wow thanks! I will try this and report back |
Pushed up a commit to https://github.com/Cobertos/Plumber/tree/feature/unknown-entity-properties , I can make a PR if desired? Only open questions I thought of while working on this:
|
Ah, I realized this does not work for brush entities, This is further complicated by brush entities not mapping to a single object datablock, as the solids are unpacked. |
Thanks, looks good! A PR would be great! Could you check if this works in Blender 2.90? It is still supported according to the readme, but I think the minimum supported version can be raised if needed. I think if we want to add the entity class to all objects, might as well add all the properties for them in the same way as for unknown entities. It should be fairly easy to do this the same way as for the unknown entities. But yeah, we would need a flag for that to avoid the clutter, and it could also make the import slower. This could be also further extended to also include the properties in vmt files for materials, for example, if it's possible to add custom properties for materials. I don't think it makes sense to ignore any properties as it would complicate the code without that much benefits. For the brush entities, if the merge solids option is enabled, there is one object for one brush entity so the properties could be added there in that case. If the solids are separated, the same properties could be imported for all solids of the brush entity, or not imported at all, not sure which one would make more sense. But even with just this I think a flag for whether to import the properties or not should be added. |
PR - Okay, I will get the PR in later today. |
Sounds good! I can also test it with 2.90 at some point, but not sure when I would have time for that. Good to hear you got the brush entity support in, from what I checked looked like it would require edits to plumber_core as well, were you able to do those or did you find some other workaround? |
Describe the solution you'd like
For unknown entities (brush or point) current the only extended data you can get from it is the name of the entity as the object name prefix, it would be nice to have the option to import the entity type and associated properties to Blender's custom KV props that are stored under the object datablock.
As an alternative, just plain strings or even more influence on the import name would even be enough to hack with.
Additional context
This is useful for example to convert something from Hammer -> Blender -> Game Engine where an importer on the engine side would be able to read the entities and act on the data. Unity's asset importer has a method to hook into for converting/doing stuff based on these properties.
The text was updated successfully, but these errors were encountered: