119
119
bone = context.bone
120
120
pchan = ob.pose.bones[bone.name]
124
col.prop(pchan, "lock_location")
125
col.active = not (bone.parent and bone.use_connect)
122
split = layout.split(percentage=0.1)
124
col = split.column(align=True)
132
sub.active = not (bone.parent and bone.use_connect)
133
sub.column().prop(pchan, "lock_location", text="Location")
134
col.column().prop(pchan, "lock_rotation", text="Rotation")
135
col.column().prop(pchan, "lock_scale", text="Scale")
128
137
if pchan.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
129
col.prop(pchan, "lock_rotations_4d", text="Lock Rotation")
130
if pchan.lock_rotations_4d:
131
col.prop(pchan, "lock_rotation_w", text="W")
132
col.prop(pchan, "lock_rotation", text="")
134
col.prop(pchan, "lock_rotation", text="Rotation")
139
row.prop(pchan, "lock_rotations_4d", text="Lock Rotation")
136
row.column().prop(pchan, "lock_scale")
142
sub.active = pchan.lock_rotations_4d
143
sub.prop(pchan, "lock_rotation_w", text="W")
139
146
class BONE_PT_relations(BoneButtonsPanel, Panel):
174
183
sub = col.column()
175
184
sub.active = (bone.parent is not None)
176
185
sub.prop(bone, "use_connect")
177
sub.prop(bone, "use_inherit_rotation", text="Inherit Rotation")
178
sub.prop(bone, "use_inherit_scale", text="Inherit Scale")
186
sub.prop(bone, "use_inherit_rotation")
187
sub.prop(bone, "use_inherit_scale")
179
188
sub = col.column()
180
189
sub.active = (not bone.parent or not bone.use_connect)
181
sub.prop(bone, "use_local_location", text="Local Location")
190
sub.prop(bone, "use_local_location")
184
193
class BONE_PT_display(BoneButtonsPanel, Panel):
237
246
pchan = ob.pose.bones[bone.name]
239
248
row = layout.row()
240
row.prop(ob.pose, "ik_solver")
250
active = pchan.is_in_ik_chain
242
252
split = layout.split(percentage=0.25)
243
253
split.prop(pchan, "lock_ik_x", icon='LOCKED' if pchan.lock_ik_x else 'UNLOCKED', text="X")
244
split.active = pchan.is_in_ik_chain
254
split.active = active
245
255
row = split.row()
246
256
row.prop(pchan, "ik_stiffness_x", text="Stiffness", slider=True)
247
row.active = pchan.lock_ik_x == False and pchan.is_in_ik_chain
257
row.active = pchan.lock_ik_x is False and active
249
259
split = layout.split(percentage=0.25)
250
260
sub = split.row()
252
262
sub.prop(pchan, "use_ik_limit_x", text="Limit")
253
sub.active = pchan.lock_ik_x == False and pchan.is_in_ik_chain
263
sub.active = pchan.lock_ik_x is False and active
254
264
sub = split.row(align=True)
255
265
sub.prop(pchan, "ik_min_x", text="")
256
266
sub.prop(pchan, "ik_max_x", text="")
257
sub.active = pchan.lock_ik_x == False and pchan.use_ik_limit_x and pchan.is_in_ik_chain
267
sub.active = pchan.lock_ik_x is False and pchan.use_ik_limit_x and active
259
269
split = layout.split(percentage=0.25)
260
270
split.prop(pchan, "lock_ik_y", icon='LOCKED' if pchan.lock_ik_y else 'UNLOCKED', text="Y")
261
split.active = pchan.is_in_ik_chain
271
split.active = active
262
272
row = split.row()
263
273
row.prop(pchan, "ik_stiffness_y", text="Stiffness", slider=True)
264
row.active = pchan.lock_ik_y == False and pchan.is_in_ik_chain
274
row.active = pchan.lock_ik_y is False and active
266
276
split = layout.split(percentage=0.25)
267
277
sub = split.row()
269
279
sub.prop(pchan, "use_ik_limit_y", text="Limit")
270
sub.active = pchan.lock_ik_y == False and pchan.is_in_ik_chain
280
sub.active = pchan.lock_ik_y is False and active
272
282
sub = split.row(align=True)
273
283
sub.prop(pchan, "ik_min_y", text="")
274
284
sub.prop(pchan, "ik_max_y", text="")
275
sub.active = pchan.lock_ik_y == False and pchan.use_ik_limit_y and pchan.is_in_ik_chain
285
sub.active = pchan.lock_ik_y is False and pchan.use_ik_limit_y and active
277
287
split = layout.split(percentage=0.25)
278
288
split.prop(pchan, "lock_ik_z", icon='LOCKED' if pchan.lock_ik_z else 'UNLOCKED', text="Z")
279
split.active = pchan.is_in_ik_chain
289
split.active = active
280
290
sub = split.row()
281
291
sub.prop(pchan, "ik_stiffness_z", text="Stiffness", slider=True)
282
sub.active = pchan.lock_ik_z == False and pchan.is_in_ik_chain
292
sub.active = pchan.lock_ik_z is False and active
284
294
split = layout.split(percentage=0.25)
285
295
sub = split.row()
287
297
sub.prop(pchan, "use_ik_limit_z", text="Limit")
288
sub.active = pchan.lock_ik_z == False and pchan.is_in_ik_chain
298
sub.active = pchan.lock_ik_z is False and active
289
299
sub = split.row(align=True)
290
300
sub.prop(pchan, "ik_min_z", text="")
291
301
sub.prop(pchan, "ik_max_z", text="")
292
sub.active = pchan.lock_ik_z == False and pchan.use_ik_limit_z and pchan.is_in_ik_chain
302
sub.active = pchan.lock_ik_z is False and pchan.use_ik_limit_z and active
294
304
split = layout.split(percentage=0.25)
295
305
split.label(text="Stretch:")
296
306
sub = split.row()
297
307
sub.prop(pchan, "ik_stretch", text="", slider=True)
298
sub.active = pchan.is_in_ik_chain
300
310
if ob.pose.ik_solver == 'ITASC':
301
311
split = layout.split()
302
312
col = split.column()
303
313
col.prop(pchan, "use_ik_rotation_control", text="Control Rotation")
304
col.active = pchan.is_in_ik_chain
305
315
col = split.column()
306
316
col.prop(pchan, "ik_rotation_weight", text="Weight", slider=True)
307
col.active = pchan.is_in_ik_chain
308
318
# not supported yet
309
319
#row = layout.row()
310
320
#row.prop(pchan, "use_ik_linear_control", text="Joint Size")