Fix #148164: Rigify hide drivers not generated correctly

Some less obvious uses of the `Bone.hide` property were missed in the last fix.
Since the property was moved to the pose bone this no longer worked
and has been replaced with `PoseBone.hide`

Pull Request: https://projects.blender.org/blender/blender/pulls/148183
This commit is contained in:
Christoph Lendenfeld
2025-10-16 08:31:00 +02:00
committed by Christoph Lendenfeld
parent e059c75ef5
commit 174279a2a5
2 changed files with 3 additions and 3 deletions

View File

@@ -708,7 +708,7 @@ class BaseLimbRig(BaseRig):
def rig_hide_pole_control(self, name: str): def rig_hide_pole_control(self, name: str):
self.make_driver( self.make_driver(
self.get_bone(name).bone, "hide", self.get_bone(name), "hide",
variables=[(self.prop_bone, 'pole_vector')], polynomial=[1.0, -1.0], variables=[(self.prop_bone, 'pole_vector')], polynomial=[1.0, -1.0],
) )

View File

@@ -533,7 +533,7 @@ class Rig(SimpleChainRig):
self.make_constraint(ctrl, 'MAINTAIN_VOLUME', mode='UNIFORM', owner_space='LOCAL') self.make_constraint(ctrl, 'MAINTAIN_VOLUME', mode='UNIFORM', owner_space='LOCAL')
self.rig_enable_control_driver( self.rig_enable_control_driver(
self.get_bone(ctrl).bone, 'hide', subtype, index, disable=True) self.get_bone(ctrl), 'hide', subtype, index, disable=True)
@stage.generate_widgets @stage.generate_widgets
def make_main_control_widgets(self): def make_main_control_widgets(self):
@@ -1009,7 +1009,7 @@ class RigifySplineTentacleIk2FkBase:
# Find currently enabled controls # Find currently enabled controls
visible_ctrls = [ visible_ctrls = [
bone for bone in ctrl_bones[1:-1] bone for bone in ctrl_bones[1:-1]
if not (bone.bone.hide and obj.data.animation_data.drivers.find(bone.bone.path_from_id("hide"))) if not (bone.hide and obj.animation_data.drivers.find(bone.path_from_id("hide")))
] ]
ctrl_count = len(visible_ctrls) + (0 if self.use_tip else 1) ctrl_count = len(visible_ctrls) + (0 if self.use_tip else 1)
max_pos = 1 - 0.25 / ctrl_count max_pos = 1 - 0.25 / ctrl_count