Jump to content

Custom attributes defined for project


laura.c

Recommended Posts

Hi,

 

I try to define a custom attribute on Project. It should be Expression type and return Text. It should be a substring of project Code, but when trying to access {self.name}, I get "Expression could not be parsed".  Is this attribute (name) not available for projects?

 

I would like to convert python expression "prj-"+"-".join(project.get("name").split("-")[1:]) into an expression for a custom attribute. Is it possible?

 

Thanks.

Laura

 

 

 

Link to comment
Share on other sites

Hi Laura,

 

The expression attribute type is not available on projects at present. I've added a ticket on making that more clear in that dialog.

 

If you want to add an expression type attribute to another level, the corresponding expression would be:

prj-{func.substring(Project.fullname, func.locate('-', Project.fullname)+1)}

Mattias

Link to comment
Share on other sites

  • 2 weeks later...

Hi Mattias,

 

it works, thanks a lot.

 

What it's a bit annoying is,  that, once a custom attribute is defined as an expression assigned to an object (for eg shot), the user can't change the object anymore (for eg. to asset version). It needs to be redefined. Is there a reason for this behavior?

 

Also, it would be great to have more documentation for this topic.

 

Cheers,

Laura

Link to comment
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...