Help write this code, please

Hi python gurus and enthusiasts.

I need help about a code but my knowledge in python is very limited yet. I have 2 files .: one is a script that print lists about timeline (sequence name, and shot name), information that i need pass for ftrack (task type, task status), and other is a simple GUI (main window) created in qt desing with tables.
I don’t know how i insert this information lists in tables like a spreadsheet ? running this inside flame.
I currently use the google spreadsheet to create these information tables, but having that inside the flame would be one less step.

Thanks and greetings from Brazil.
Wilton Matos

ftrack_info.zip (3.8 KB)

This image better illustrates the idea of ​​what it would look like…

Hi

We have ftrack at the mill. We have had it for 7 years. We still haven’t created something like this. Personally I think ftrack is a white elephant. If I could have my way, we would use shotgun. I wish you the best of luck in your endeavors.

John

PS these views in no way reflect the official company views. They are my own personal views and are not trying to say ftrack is a bad product.

1 Like

thanks for the opinion, for now i’m not trying to use anything that requires the ftrack api, because i know it’s something very complex. In reality, I only need to create a python function that takes the script I already created from lists and inserts it into the columns interface that I also created. with that I just need to select the columns information and add it to the ftrack manually (copy / paste). I will continue to study the language to try to finish this code but with the jobs I have many times I need stopping my studies.

1 Like

Perhaps @andymilkis or @MikeV might have a steer?

Hey Wilton

I just wacked this together quickly. Hopefully it helps a little.

timeline_info_for_ftrack.py (5.6 KB)

When you right click on a sequence it will populate a treewidget with all the shot names. I prefer using treewidgets to to tables since they seem to be a little more flexible in what you can do with them. The Select All button will select everything in the list. The Copy button will copy all the selected items into the clip board so they can be pasted wherever.

If you need any other flame gui elements I’ve put some up on a github page here:

Mike

6 Likes

Thank you so much Mike, you have no idea how much this will help me, you are an amazing guy and I am proud to be part of this community . I will look at your code a lot to understand what you did, maybe in a next versiors i try add more columns and data such as comment markers, tape name, and shot timecode . Great work… :clap: :clap: :clap:

1 Like

Hi @MikeV

I was looking at what you did and changing some things (adding 2 more columns) according to what i needed. It is possible to use some attribute of treewidgets to make the table editable? For example, renaming or deleting an item after it appears on the screen. Thanks


timeline_ftrack_info.py (5.9 KB)

This video shows the purpose of the script, I was not able to get it to get the comments from the markers of the sequence just by taking the comment inside the segment .:

Adding this to the end of the line where the segment gets added to the tree should make it editable:

.setFlags(QtCore.Qt.ItemIsEditable | QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable)

3 Likes

Perfect it worked, thanks.

Is here in case anyone else wants to use.:
timeline_ftrack_info.py (6.0 KB)

3 Likes