mgear-dev / mgear4

mGear v.4.x.x (python 3 ready) https://mgear4.readthedocs.io
MIT License
266 stars 94 forks source link

Fixed a bug in the splineIK function where the createCurve argument was set to True even if a curve was already assigned in the function. #269

Closed joji2468ng closed 1 year ago

joji2468ng commented 1 year ago

Overall, the new version is more concise, uses more Pythonic methods, and handles the curve argument in a clearer manner.

  1. Simplified the dictionary creation using direct assignments.
  2. Used more descriptive variable names.
  3. Removed unnecessary conversions.
  4. Uses the more Pythonic method.
miquelcampos commented 1 year ago

@joji2468ng Thanks for all the PR I will check and merge all now

miquelcampos commented 1 year ago

@joji2468ng i have reverted the PR because I have found a cycle issue. For example just building a EPIC_spine_02 in a new scene will output this

Initial Hierarchy
Init : spine_C0 (EPIC_spine_02)
Objects : spine_C0 (EPIC_spine_02)
Properties : spine_C0 (EPIC_spine_02)
Operators : spine_C0 (EPIC_spine_02)
# Warning: Cycle on 'spine_C0_spineTwist_crvShape.worldSpace[0]' may not evaluate as expected.  (Use 'cycleCheck -e off' to disable this warning.) # 
# Warning: Selected item spine_C0_spineTwist_crvShape is not deformable. # 
# Error: line 1: RuntimeError: file C:\Program Files\Autodesk\Maya2020\Python\lib\site-packages\pymel\internal\pmcmds.py line 130: No deformable objects selected. # 

Please check the issue and feel free to send another PR Thanks!

joji2468ng commented 1 year ago

@miquelcampos , I've just tried building a EPIC_spine_02 in a new scene but I didn't encounter the issue. And I don't think there is a factor to make a cycle error in the script. Could you check it again, please?