Closed booomji closed 1 year ago
Hello @booomji,
When you select the meshes you want to see in the scene, in Build options
select only joints and run Process
. I would not add a skin cluster
as it would deform mesh when you move joints, but if that is what you want - go ahead. The only thing you should not include is rig logic
as that would ‘lock’ things.
Hello marijavik, Thank you for replying.
Here ae my steps :
My intention is to tweak a joint then save it back to the dna file.
The script im using to do that is
"dna_viewer_grab_changes_from_scene_and_propagate_to_dna "
These are the steps im following from the script .
1.load the example ada dna file via the dna viewer (check joints in the build options and leave everything else at default. no gui loaded) 2.This brings all of the ada sample mh head lods on top of each other
What am I doing wrong ?
EDIT 01 - after making this post I intentionally didn't run the code from lines 205 - 210
config = RigConfig( gui_path=f"{DATA_DIR}/gui.ma", analog_gui_path=f"{DATA_DIR}/analog_gui.ma", aas_path=ADDITIONAL_ASSEMBLE_SCRIPT, ) build_rig(dna=dna, config=config)
now my tweak is saved with the dna file. The block above is bringing in the gui which locks editing of bones.
Thank you for any help. b
That is correct - that block of code is working in the same way DNAViewer GUI does when you select everything. Usually I would use something else for getting rig elements into scene:
def show_meshes(dna_path, add_skinning=False, add_blend_shapes=False):
cmds.file(force=True, new=True)
dna = DNA(dna_path)
# Builds and returns the created mesh paths in the scene
config = Config(
add_joints=True,
add_blend_shapes=add_blend_shapes,
add_skin_cluster=add_skinning,
add_ctrl_attributes_on_root_joint=True,
add_animated_map_attributes_on_root_joint=True,
add_mesh_name_to_blend_shape_channel_name=True,
add_key_frames=True
)
# Build meshes
build_meshes(dna, config)
And call this function whenever I need to inspect what is in DNA file.
show_meshes(character_dna)
reader = read_dna(character_dna)
calibrated = DNACalibDNAReader(reader)
That is correct - that block of code is working in the same way DNAViewer GUI does when you select everything. Usually I would use something else for getting rig elements into scene:
def show_meshes(dna_path, add_skinning=False, add_blend_shapes=False): cmds.file(force=True, new=True) dna = DNA(dna_path) # Builds and returns the created mesh paths in the scene config = Config( add_joints=True, add_blend_shapes=add_blend_shapes, add_skin_cluster=add_skinning, add_ctrl_attributes_on_root_joint=True, add_animated_map_attributes_on_root_joint=True, add_mesh_name_to_blend_shape_channel_name=True, add_key_frames=True ) # Build meshes build_meshes(dna, config)
And call this function whenever I need to inspect what is in DNA file.
show_meshes(character_dna) reader = read_dna(character_dna) calibrated = DNACalibDNAReader(reader)
Thank you for sharing marijavik. Do you feel we should change the comment section to make people aware of this ? Because if you follow the instruction "3. Run this script to the part called "load data" then it is bound to not work leading to frustration for someone else.
If we want to keep the comment the same then perhaps we should comment that part of the code out ? How would this go ? should I make a pull request of will someone from Epic fix this . Thank you so much. b
No worries, I'll update comments. Thanks for pointing this out.
No worries, I'll update comments. Thanks for pointing this out.
Thanks Marijavik. Once I learn which script to use to add my own custom head blendshape (same topology) , I will make a tutorial .
Cheers, b
I have documented the process of adding a blend shape and swapping out the original head with a custom one using the same script. It worked for me. I hope this works for you too.
Hello, I'm using the script example dna_viewer_grab_changes_from_scene_and_propagate_to_dna I use option 2.1 - start DNA Viewer GUI (dna_viewer_run_in_maya.py)
Then I run the script upto the load Data part - 3 However this also loads the faceboard gui thereby disabling the ability to adjust the bones !
What am i doing wrong ?
Thanks, b