-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug Issues + Basic Support of Move by Maxon
- Fixed Morphs becoming zero when applied at pass the maximum. - Updated The Genesis 8.1 Facs Preset to represent the necessary morphs for Move By Maxon. - Added an Option Automatic Weight the mesh when subdivision is present. - Fixed Facs being Deleted on Children objects. where not needed too. - Can now try out Move By Maxon and disconnect it head rotation is a wip.
- Loading branch information
Showing
9 changed files
with
206 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
Cinema 4D/appdir_common/plugins/DazToC4D/lib/DtC4DWeights.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import c4d | ||
|
||
|
||
class Weights: | ||
subdivsion_level = 0 | ||
|
||
def store_subdivision(self, dtu): | ||
self.subdivsion_level = dtu.get_subdivision() | ||
|
||
def check_level(self): | ||
if self.subdivsion_level > 0: | ||
return True | ||
|
||
def auto_calculate_weights(self, body): | ||
doc = c4d.documents.GetActiveDocument() | ||
weight_tag = body.GetTag(c4d.Tweights) | ||
if weight_tag: | ||
doc.SetActiveTag(weight_tag, c4d.SELECTION_NEW) | ||
c4d.modules.character.CAWeightMgr.Update(doc) | ||
c4d.modules.character.CAWeightMgr.SelectAllJoints(doc) | ||
c4d.modules.character.CAWeightMgr.AutoWeight(doc) | ||
c4d.EventAdd() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
Cinema 4D/appdir_common/plugins/DazToC4D/lib/MaxonTracking.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import c4d | ||
from . import Utilities | ||
|
||
|
||
class Tracking: | ||
@staticmethod | ||
def create_node(node_parent, obj, x, y): | ||
node = node_parent.CreateNode( | ||
node_parent.GetRoot(), c4d.ID_OPERATOR_OBJECT, None, x, y | ||
) | ||
node[c4d.GV_OBJECT_OBJECT_ID] = obj | ||
return node | ||
|
||
@staticmethod | ||
def create_xpresso_node(node_parent, type, x, y): | ||
node = node_parent.CreateNode(node_parent.GetRoot(), type, None, x, y) | ||
return node | ||
|
||
@staticmethod | ||
def add_head_tracking(face_capture): | ||
"""Need to removed Hardcoding of Neck_Ctrl""" | ||
neck_name = Utilities.get_daz_name() + "_Neck_ctrl" | ||
doc = c4d.documents.GetActiveDocument() | ||
neck_ctrl = doc.SearchObject(neck_name) | ||
if neck_ctrl: | ||
xpresso_tag = c4d.BaseTag(c4d.Texpresso) | ||
# Set Tag priority to Animation | ||
pd = xpresso_tag[c4d.EXPRESSION_PRIORITY] | ||
pd.SetPriorityValue(c4d.PRIORITYVALUE_MODE, 1) | ||
xpresso_tag[c4d.EXPRESSION_PRIORITY] = pd | ||
xpresso_tag[c4d.ID_BASELIST_NAME] = "Movement Tracking" | ||
neck_ctrl.InsertTag(xpresso_tag) | ||
node_master = xpresso_tag.GetNodeMaster() | ||
neck_node = Tracking.create_node(node_master, neck_ctrl, 600, 0) | ||
face_node = Tracking.create_node(node_master, face_capture, 0, 0) | ||
vect_real = Tracking.create_xpresso_node( | ||
node_master, c4d.GV_VECT2REAL_, 100, 0 | ||
) | ||
degrees_to_rad = Tracking.create_xpresso_node( | ||
node_master, c4d.GV_DEGREE_, 200, 0 | ||
) | ||
degrees_to_rad[c4d.GV_DEGREE_FUNCTION_ID] = c4d.GV_DEGREE2RAD_NODE_FUNCTION | ||
math_node = Tracking.create_xpresso_node(node_master, c4d.GV_MATH_, 300, 0) | ||
rad_to_degrees = Tracking.create_xpresso_node( | ||
node_master, c4d.GV_DEGREE_, 400, 0 | ||
) | ||
degrees_to_rad[c4d.GV_DEGREE_FUNCTION_ID] = c4d.GV_RAD2DEGREE_NODE_FUNCTION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.