-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproperties.py
More file actions
52 lines (39 loc) · 1.63 KB
/
properties.py
File metadata and controls
52 lines (39 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import bpy
from bpy.props import IntProperty, BoolProperty
from zpy import utils
class Animation(bpy.types.AddonPreferences, utils.Preferences):
bl_idname = __package__
def draw(self, context):
layout = self.layout
self.draw_keymaps(context)
# row = layout.row(align=True)
# row.active = self.on_steps
# row.prop(self, 'on_steps', icon=('IPO_CONSTANT'), icon_only=True)
# sub = row.row(align=True)
# sub.scale_x = 0.75
# sub.prop(self, 'frame_step', icon_only=True)
class motion(bpy.types.PropertyGroup):
use_relative_range: BoolProperty(
name="Bake Using Relative Frame Range",
description="Bake frames using range relative to current frame",
default=True, options={'SKIP_SAVE'},
)
frame_before: IntProperty(
name="Frame Range Before",
description="Number of frames to bake before the current frame",
default=50, min=1, soft_max=250, options={'SKIP_SAVE'},
)
frame_after: IntProperty(
name="Frame Range After",
description="Number of frames to bake after the current frame",
default=50, min=1, soft_max=250, options={'SKIP_SAVE'},
)
show_panel: BoolProperty()
motion: utils.register_pointer(motion)
class step_frames(bpy.types.PropertyGroup):
frame_step: IntProperty(name="Frame Step", default=2, min=1)
on_steps: BoolProperty(name="On Steps", default=False)
def register():
bpy.types.Scene.step_frames = utils.register_pointer(step_frames)
def unregister():
del bpy.types.Scene.step_frames