Thanks Chrislesage,
All great pointsā¦ An yea, I can hide them, tuck them away, but there still there, itās still an extra node that needs maintaining? I know thereās lots of reasons itās a good idea to have a picker node (moving files around, dealing with outsourcers ect.) So this is all purely a suggestion and maybe not a good oneā¦
My initial thought was to those Attrs on a specific location on the rig itself (maybe the rigs top assemble node?). That way it always goes along for the ride with the rig. You could maybe use the namespace when the rig is referenced as default naming or something for the animpicker. We would always know where those attrs are as well. Anyways, Iām sure thereās very good reasons against thisā¦
Thanks for the links to the conversations about updating and creating Picker nodes. Sorry if Iām overlooking something here. The issue is if I make a new node in my animation source file and save my scene then someone else opens up my scene but is mapped to a different drive they will have to create another node?
Your script that updates the picker node based off of the file is close to what i need and i can probably get something working off of that. But It would be super nice to get that [ANIM_PICKER_VAR] token to work?
Iām trying the following:
First Iām manually creating a Environment variable called ANIM_PICKER_VAR with the first half of my path.
import pymel.core as pm
from mgear import anim_picker
# If you already have picker nodes in the scene, you can find them this way.
pickerNodes = anim_picker.picker_node.get_nodes()
# Set the file path on the node
yourDataPath = ā[ANIM_PICKER_VAR]/Drone/Drone_Picker.pkrā
pickerNodes[0]._set_str_attr(newPicker.FILE_ATTR, value=yourDataPath)
# This writes ā[ANIM_PICKER_VAR]/MyPickerDir/My_Picker.pkrā string in the FILE_ATTR
# Reads the data from the file attribute on the picker node
pickerDataFromFile = pickerNodes[0].read_data_from_file()
# pickerDataFromFile is None after running this.
Also I noticed a little thing hereā¦ On this function the env is called two different things (ANIM_PICKER_PATH, and ANIM_PICKER_VAR?). I went with ANIM_PICKER_VAR as that is what seems to be what the function is looking for but no diceā¦
At the end of the day i just need a relative path for the file
FILE_ATTR but canāt seem to get it working.