Collada export custom properties #29357

Closed
opened 2011-11-21 18:33:05 +01:00 by Micael Dias · 37 comments

%%%This patch adds functionality to the Collada exporter to export blender's custom properties on geometry, materials and scene nodes.

I'm not sure this is the best way to export this data to collada, but I tried to make it as clean as possible.

The main purpose I created this patch is because I'm about to begin a project with which I need to use Blender as my level editor, and the best way I see to export waypoints/triggers/etc from blender, is using custom properties and Collada format seems optimal.%%%

%%%This patch adds functionality to the Collada exporter to export blender's custom properties on geometry, materials and scene nodes. I'm not sure this is the best way to export this data to collada, but I tried to make it as clean as possible. The main purpose I created this patch is because I'm about to begin a project with which I need to use Blender as my level editor, and the best way I see to export waypoints/triggers/etc from blender, is using custom properties and Collada format seems optimal.%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Member

%%%Assigning to myself. I'm short on time currently so if someone else has time to review feel free to reassign and work on it.%%%

%%%Assigning to myself. I'm short on time currently so if someone else has time to review feel free to reassign and work on it.%%%
Member

%%%Ressigning to Arystanbek, since Nathan doesn't seem to have and and Arystanbek he is back doing collada fixing. Thanks for the patch.%%%

%%%Ressigning to Arystanbek, since Nathan doesn't seem to have and and Arystanbek he is back doing collada fixing. Thanks for the patch.%%%

Added subscriber: @anibalmorales

Added subscriber: @anibalmorales

I need this capability as well. Has this been included in a Blender release?
I would like to be able to export ANY custom properties into collada... and maybe establish a mechanism by which they can be imported as well, maybe by setting up a special attribute to be looked for by the importer.

I need this capability as well. Has this been included in a Blender release? I would like to be able to export ANY custom properties into collada... and maybe establish a mechanism by which they can be imported as well, maybe by setting up a special attribute to be looked for by the importer.
Arystanbek Dyussenov was unassigned by Sergey Sharybin 2015-02-26 11:37:49 +01:00
Gaia Clary was assigned by Sergey Sharybin 2015-02-26 11:37:49 +01:00

Added subscriber: @Sergey

Added subscriber: @Sergey

Sergey,
I see that you re-assigned this task recently. Please let me know if help is needed. I am not familiar with the Blender codebase but I am an expert C++ developer and architect, and I am willing to invest some of my time to get this capability, and the import capability, implemented sooner than later.

Sergey, I see that you re-assigned this task recently. Please let me know if help is needed. I am not familiar with the Blender codebase but I am an expert C++ developer and architect, and I am willing to invest some of my time to get this capability, and the import capability, implemented sooner than later.
Member

Any help from a good developer is very welcome. In this particular issue we probably would add something to the "blender collada profile". Please feel free to give us a helping hand here. Thanks.

Any help from a good developer is very welcome. In this particular issue we probably would add something to the "blender collada profile". Please feel free to give us a helping hand here. Thanks.

Added subscriber: @charlie.hoey

Added subscriber: @charlie.hoey
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Gaia Clary was unassigned by Aaron Carlisle 2015-08-24 02:37:03 +02:00
Aaron Carlisle self-assigned this 2015-08-24 02:37:03 +02:00
Member

@GaiaClary are you still up for working on this?

@GaiaClary are you still up for working on this?
Aaron Carlisle removed their assignment 2015-08-24 02:39:24 +02:00

Added subscriber: @Promethe42

Added subscriber: @Promethe42

I'm very interested in this feature. Any progress?
If I wanted to implement this, where should I start?

Thank you,

I'm very interested in this feature. Any progress? If I wanted to implement this, where should I start? Thank you,
Member

The Collada exporter/importer is implemented in C++ and it is in the blender source code. IMHO the correct implementation should be done by defining (improving) a Collada Profile. We already have some basic Blender Collada profile defined (but i doubt this has ever ben made official).

The Blender Collada module is based on the OpenCollada libraries.

It might be interesting to first check if the Autodesk/MAYA Collada profile already contains the necessary elements. Then this profile could possibly be reused (i am not sure if this is good or bad). The benefit of doing this could be that Imports to/from Maya could become less troublesome.

The Collada exporter/importer is implemented in C++ and it is in the blender source code. IMHO the correct implementation should be done by defining (improving) a Collada Profile. We already have some basic Blender Collada profile defined (but i doubt this has ever ben made official). The Blender Collada module is based on the OpenCollada libraries. It might be interesting to first check if the Autodesk/MAYA Collada profile already contains the necessary elements. Then this profile could possibly be reused (i am not sure if this is good or bad). The benefit of doing this could be that Imports to/from Maya could become less troublesome.

I am also still interested, sorry if I was disconnected for a while.
I also would like to know how to start. I see that it is C++... which is great.

Do we have a stand-alone implementation of the "Profile" that we can study to learn about it... and some test data?

I hope I don't need to learn the whole Blender architecture from scratch.

Any pointers are appreciated.

I am also still interested, sorry if I was disconnected for a while. I also would like to know how to start. I see that it is C++... which is great. Do we have a stand-alone implementation of the "Profile" that we can study to learn about it... and some test data? I hope I don't need to learn the whole Blender architecture from scratch. Any pointers are appreciated.
Member

Closed as duplicate of #43298

Closed as duplicate of #43298

Changed status from 'Duplicate' to: 'Open'

Changed status from 'Duplicate' to: 'Open'
Member

Sorry forgot collada was not treated as an add on

Sorry forgot collada was not treated as an add on

Added subscriber: @godlike

Added subscriber: @godlike

I am also interested in this and IMHO this is an important feature for those engines that use blender as a level editor.

In my case, I maintain a patch that exports some custom variables somewhere in the .dae file (https://github.com/godlikepanos/anki-3d-engine/blob/master/tools/blender_anki_additions.patch). It's really annoying when I have to convince people to apply this patch and build blender from source (especially if they are artists).

I am also interested in this and IMHO this is an important feature for those engines that use blender as a level editor. In my case, I maintain a patch that exports some custom variables somewhere in the .dae file (https://github.com/godlikepanos/anki-3d-engine/blob/master/tools/blender_anki_additions.patch). It's really annoying when I have to convince people to apply this patch and build blender from source (especially if they are artists).

@Panaglotis:
Can you store custom data on a per-vertex basis?

@Panaglotis: Can you store custom data on a per-vertex basis?

In #29357#364524, @anibalmorales wrote:
@Panaglotis:
Can you store custom data on a per-vertex basis?

No I haven't tried that. Since COLLADA supports vertex color + bone weights (as fas as I remember) I am covered. Hope I understood the question.

> In #29357#364524, @anibalmorales wrote: > @Panaglotis: > Can you store custom data on a per-vertex basis? No I haven't tried that. Since COLLADA supports vertex color + bone weights (as fas as I remember) I am covered. Hope I understood the question.

Added subscriber: @tjpalmer

Added subscriber: @tjpalmer

Added subscriber: @sdyatkovskiy

Added subscriber: @sdyatkovskiy

Hi! Will this patch support game properties exporting?
Thanks!

Hi! Will this patch support game properties exporting? Thanks!

This comment was removed by @godlike

*This comment was removed by @godlike*
Member

I am starting a big rewrite soon to make this module easier to maintain and easier to understand :)
And i will begin with Mesh export/import. We can have the custom properties added there...

Have you checked if the autodesk/Maya profile supports custom properties? Or any other published profile? Then we should take care to match with that profile. I believe it makes some sense to also support the import of custom properties. Especially if a common profile has them defined.

Is there any chance to take a quick look at that ?

I am starting a big rewrite soon to make this module easier to maintain and easier to understand :) And i will begin with Mesh export/import. We can have the custom properties added there... Have you checked if the autodesk/Maya profile supports custom properties? Or any other published profile? Then we should take care to match with that profile. I believe it makes some sense to also support the import of custom properties. Especially if a common profile has them defined. Is there any chance to take a quick look at that ?

Added subscriber: @RecepAslantas

Added subscriber: @RecepAslantas

There are list of custom profiles/extensions published on khronos wiki page:

https://www.khronos.org/collada/wiki/List_of_extensions_by_profile_name

I don't think these are updated recently, maybe Blender can adopt some of them? AFAIK modo still uses some of these profiles (modo401, MAX3D, MAYA, OKINO) when exporting (maybe when importing too)

There are list of custom profiles/extensions published on khronos wiki page: https://www.khronos.org/collada/wiki/List_of_extensions_by_profile_name I don't think these are updated recently, maybe Blender can adopt some of them? AFAIK modo still uses some of these profiles (modo401, MAX3D, MAYA, OKINO) when exporting (maybe when importing too)
Member

I think that adopting is the better option only if those profiles are actually used by anybody. It would be helpful to see if Maya can export custom properties with its Collada exporter.

I have looked up which profiles are actually used in Blender and i found besides a lot of references to the still undocumented "blender" profile some sparse references to

MAYA, MAX3D, FCOLLADA

I also found one comment about FCOLLADA which implies this is "the most common used profile". However i can't tell if this is more an opinion or more a knowing. But since FCOLLADA supports custom properties, we should use this profile:

https://www.khronos.org/collada/wiki/Entity_user-defined_attributes_FCOLLADA_extension

and add support for import as well :)

I think that adopting is the better option only if those profiles are actually used by anybody. It would be helpful to see if Maya can export custom properties with its Collada exporter. I have looked up which profiles are actually used in Blender and i found besides a lot of references to the still undocumented "blender" profile some sparse references to MAYA, MAX3D, FCOLLADA I also found one comment about FCOLLADA which implies this is "the most common used profile". However i can't tell if this is more an opinion or more a knowing. But since FCOLLADA supports custom properties, we should use this profile: https://www.khronos.org/collada/wiki/Entity_user-defined_attributes_FCOLLADA_extension and add support for import as well :)

AFAIK, FCOLLADA is discontinued software and I'm not sure anybody still uses it (I'm taking about software not profile),

If you are looking for Maya compatibility then;

Maya seems use this:
https://github.com/KhronosGroup/OpenCOLLADA/tree/master/COLLADAMaya

Take a look at bottom of README, It seems OpenCOLLADA for Maya exports extra maya properties under "OpenCOLLADAMaya" profile:

Extract from README:

Extra Attributes

This plug-in currently supports export of Maya extra attributes for the following Maya node types:
. Transform (in )
. Mesh shape (in )
. Light shape (in )
. PhysX RigidBody (in <rigid_body>)
. PhysX PhysicsShape (in )
. PhysX RigidConstraint (in <rigid_constraint>)

Extra attributes are exported in / section of corresponding COLLADA element with the following syntax:

attribute_value

. attribute_name is the name of the extra attribute.
. attribute_type is the type of the extra attribute. Supported types are:
. "int" (Maya extra attribute type: Integer)
. "string" (Maya extra attribute type: String or Enum)
. "float" (Maya extra attribute type: Float)
. "bool" (Maya extra attribute type: Boolean)
. "double3" (Maya extra attribute type: Vector)
. attribute_value is the extra attribute value as text.

I couldn't see any documentation about these custom params, just wanted to share it

AFAIK, FCOLLADA is discontinued software and I'm not sure anybody still uses it (I'm taking about software not profile), If you are looking for Maya compatibility then; Maya seems use this: https://github.com/KhronosGroup/OpenCOLLADA/tree/master/COLLADAMaya Take a look at bottom of README, It seems OpenCOLLADA for Maya exports extra maya properties under "**OpenCOLLADAMaya**" profile: Extract from README: > Extra Attributes > > This plug-in currently supports export of Maya extra attributes for the following Maya node types: > . Transform (in <node>) > . Mesh shape (in <geometry>) > . Light shape (in <light>) > . PhysX RigidBody (in <rigid_body>) > . PhysX PhysicsShape (in <shape>) > . PhysX RigidConstraint (in <rigid_constraint>) > > Extra attributes are exported in <extra>/<technique profile="OpenCOLLADAMaya"> section of corresponding COLLADA element with the following syntax: > > <param name="attribute_name" type="attribute_type">attribute_value</param> > > . attribute_name is the name of the extra attribute. > . attribute_type is the type of the extra attribute. Supported types are: > . "int" (Maya extra attribute type: Integer) > . "string" (Maya extra attribute type: String or Enum) > . "float" (Maya extra attribute type: Float) > . "bool" (Maya extra attribute type: Boolean) > . "double3" (Maya extra attribute type: Vector) > . attribute_value is the extra attribute value as text. I couldn't see any documentation about these custom params, just wanted to share it

Added subscriber: @thothonegan

Added subscriber: @thothonegan

Added subscriber: @BlenderUser.428

Added subscriber: @BlenderUser.428
Member

Removed subscriber: @Blendify

Removed subscriber: @Blendify

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Dalai Felinto self-assigned this 2019-12-23 18:52:05 +01:00

Hi, thanks for your patch.

We are undergoing a Tracker Curfew where we are automatically closing old patches.

If you think the patch is still relevant please update and re-submit it. For new features make sure there is a clear design from the user level perspective.

Hi, thanks for your patch. We are undergoing a [Tracker Curfew ](https://code.blender.org/?p=3861) where we are automatically closing old patches. If you think the patch is still relevant please update and re-submit it. For new features make sure there is a clear design from the user level perspective.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
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
18 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#29357
No description provided.