work: restore shift+spacebar for media play/pause
maybe put in maya config? idk what funiman's preference is
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
# goo_physics
|
||||
StudioGoo bone physics addon
|
||||
@@ -0,0 +1,34 @@
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from bpy.utils import register_submodule_factory
|
||||
|
||||
bl_info = {
|
||||
"name": "Goo Physics",
|
||||
"author": "Cody Winchester (CodyWinch)",
|
||||
"description": "",
|
||||
"blender": (4, 1, 0),
|
||||
"version": (1, 0, 4),
|
||||
"location": "",
|
||||
"warning": "",
|
||||
"category": "Animation",
|
||||
}
|
||||
|
||||
|
||||
submodules = [
|
||||
"ui",
|
||||
"properties",
|
||||
"operators",
|
||||
]
|
||||
|
||||
register, unregister = register_submodule_factory(__name__, submodules)
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"DEFAULTCLOTH": {
|
||||
"Name": "Default Cloth",
|
||||
"Description": "Default settings for cloth physics",
|
||||
"Settings": {
|
||||
"gp_chain_speed": 2.0,
|
||||
"gp_chain_mass": 0.3,
|
||||
"gp_chain_air_dampening": 0.5,
|
||||
"gp_chain_bend_damping": 0.5,
|
||||
"gp_chain_collision_dist": 0.025,
|
||||
"gp_chain_gravity": 1.0,
|
||||
"gp_sim_influence": 1.0
|
||||
}
|
||||
},
|
||||
"STIFFCLOTH": {
|
||||
"Name": "Stiff Cloth",
|
||||
"Description": "Best used for stiff chained rigs falling down, like a flag. First bone in the chain will not be simulated",
|
||||
"Settings": {
|
||||
"gp_chain_speed": 0.8,
|
||||
"gp_chain_mass": 0.3,
|
||||
"gp_chain_air_dampening": 2.0,
|
||||
"gp_chain_bend_damping": 10.0,
|
||||
"gp_chain_collision_dist": 0.025,
|
||||
"gp_chain_gravity": 1.0,
|
||||
"gp_sim_influence": 1.0
|
||||
}
|
||||
},
|
||||
"FLOPPYCLOTH": {
|
||||
"Name": "Floppy Cloth",
|
||||
"Description": "Best used for a heavy floppy chained rigs dangling down",
|
||||
"Settings": {
|
||||
"gp_chain_speed": 2.0,
|
||||
"gp_chain_mass": 1.0,
|
||||
"gp_chain_air_dampening": 2.0,
|
||||
"gp_chain_bend_damping": 2.0,
|
||||
"gp_chain_collision_dist": 0.025,
|
||||
"gp_chain_gravity": 1.0,
|
||||
"gp_sim_influence": 1.0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"DEFAULTGEONODES": {
|
||||
"Name": "Default Geo Nodes",
|
||||
"Description": "Default settings for geo nodes physics",
|
||||
"Settings": {
|
||||
"gp_chain_velocity": 1.0,
|
||||
"gp_chain_dampening": 0.1,
|
||||
"gp_chain_gravity": 0.02,
|
||||
"gp_chain_root_falloff": 0.25,
|
||||
"gp_chain_stiffness": 0.25,
|
||||
"gp_chain_stiff_end_fac": 0.25,
|
||||
"gp_chain_stiff_vel_fac": 0.2,
|
||||
"gp_chain_stiff_vel_min": 0.1,
|
||||
"gp_chain_stiff_vel_max": 1.0,
|
||||
"gp_chain_wind_strength": 0.25,
|
||||
"gp_chain_wind_noise_strength": 1.0,
|
||||
"gp_chain_wind_noise_scale": 1.0,
|
||||
"gp_chain_collision_dist": 0.01,
|
||||
"gp_chain_collision_friction": 0.25,
|
||||
"gp_sim_influence": 1.0
|
||||
}
|
||||
},
|
||||
"HAIRFRINGE": {
|
||||
"Name": "Hair Fringe",
|
||||
"Description": "Used for Bangs/Fringe, where the base doesnt move much and theres slight movement at the tips to prevent the character going off model",
|
||||
"Settings": {
|
||||
"gp_chain_velocity": 1.0,
|
||||
"gp_chain_dampening": 0.1,
|
||||
"gp_chain_gravity": 0.02,
|
||||
"gp_chain_root_falloff": 0.92,
|
||||
"gp_chain_stiffness": 0.5,
|
||||
"gp_chain_stiff_end_fac": 0.2,
|
||||
"gp_chain_stiff_vel_fac": 0.2,
|
||||
"gp_chain_stiff_vel_min": 0.1,
|
||||
"gp_chain_stiff_vel_max": 1.0,
|
||||
"gp_chain_wind_strength": 0.06,
|
||||
"gp_chain_wind_noise_strength": 2.1,
|
||||
"gp_chain_wind_noise_scale": 10.0,
|
||||
"gp_chain_collision_dist": 0.01,
|
||||
"gp_chain_collision_friction": 0.25,
|
||||
"gp_sim_influence": 1.0
|
||||
}
|
||||
},
|
||||
"HAIRSIDE": {
|
||||
"Name": "Hair Side",
|
||||
"Description": "Medium length hair strands, usually for side burns longer than the bangs. Can also be used for skirts",
|
||||
"Settings": {
|
||||
"gp_chain_velocity": 1.0,
|
||||
"gp_chain_dampening": 0.1,
|
||||
"gp_chain_gravity": 0.02,
|
||||
"gp_chain_root_falloff": 0.5,
|
||||
"gp_chain_stiffness": 0.4,
|
||||
"gp_chain_stiff_end_fac": 0.2,
|
||||
"gp_chain_stiff_vel_fac": 0.2,
|
||||
"gp_chain_stiff_vel_min": 0.1,
|
||||
"gp_chain_stiff_vel_max": 1.0,
|
||||
"gp_chain_wind_strength": 0.08,
|
||||
"gp_chain_wind_noise_strength": 2.0,
|
||||
"gp_chain_wind_noise_scale": 5.0,
|
||||
"gp_chain_collision_dist": 0.01,
|
||||
"gp_chain_collision_friction": 0.25,
|
||||
"gp_sim_influence": 0.5
|
||||
}
|
||||
},
|
||||
"HAIRPONYTAIL": {
|
||||
"Name": "Hair Ponytail",
|
||||
"Description": "Long length bone chains with lots of drag at the end. Can be used for dresses and capes as well",
|
||||
"Settings": {
|
||||
"gp_chain_velocity": 1.0,
|
||||
"gp_chain_dampening": 0.1,
|
||||
"gp_chain_gravity": 0.02,
|
||||
"gp_chain_root_falloff": 0.42,
|
||||
"gp_chain_stiffness": 0.0,
|
||||
"gp_chain_stiff_end_fac": 0.2,
|
||||
"gp_chain_stiff_vel_fac": 0.2,
|
||||
"gp_chain_stiff_vel_min": 0.1,
|
||||
"gp_chain_stiff_vel_max": 1.0,
|
||||
"gp_chain_wind_strength": 0.125,
|
||||
"gp_chain_wind_noise_strength": 2.02,
|
||||
"gp_chain_wind_noise_scale": 5.0,
|
||||
"gp_chain_collision_dist": 0.01,
|
||||
"gp_chain_collision_friction": 0.25,
|
||||
"gp_sim_influence": 0.5
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"DEFAULTJIGGLE": {
|
||||
"Name": "Default Jiggle",
|
||||
"Description": "Default settings for jiggle physics",
|
||||
"Settings": {
|
||||
"gp_sim_speed": 0.8,
|
||||
"gp_sim_friction": 5.0,
|
||||
"gp_sim_mass": 0.15,
|
||||
"gp_sim_stiffness": 0.1,
|
||||
"gp_sim_damping": 8.0,
|
||||
"gp_sim_influence": 1.0,
|
||||
"gp_sim_gravity": 1.0
|
||||
}
|
||||
},
|
||||
"JIGGLELOOSE": {
|
||||
"Name": "Jiggle Loose",
|
||||
"Description": "Location based Jiggle offset for Secondary Animation",
|
||||
"Settings": {
|
||||
"gp_sim_speed": 0.77,
|
||||
"gp_sim_friction": 5.0,
|
||||
"gp_sim_mass": 0.2,
|
||||
"gp_sim_stiffness": 0.1,
|
||||
"gp_sim_damping": 10.06,
|
||||
"gp_sim_influence": 1.0,
|
||||
"gp_sim_gravity": 1.0
|
||||
}
|
||||
},
|
||||
"JIGGLESTIFF": {
|
||||
"Name": "Jiggle Stiff",
|
||||
"Description": "Location based Jiggle offset for Secondary Animation with less bounce",
|
||||
"Settings": {
|
||||
"gp_sim_speed": 0.83,
|
||||
"gp_sim_friction": 5.0,
|
||||
"gp_sim_mass": 0.15,
|
||||
"gp_sim_stiffness": 0.3,
|
||||
"gp_sim_damping": 10.06,
|
||||
"gp_sim_influence": 1.0,
|
||||
"gp_sim_gravity": 1.0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,494 @@
|
||||
{
|
||||
"DEFAULTSOFTBODY": {
|
||||
"Name": "Default Soft Body",
|
||||
"Description": "Default settings for soft body physics",
|
||||
"Settings": {
|
||||
"gp_sim_speed": 0.8,
|
||||
"gp_sim_friction": 5.0,
|
||||
"gp_sim_mass": 0.15,
|
||||
"gp_sim_stiffness": 0.1,
|
||||
"gp_sim_damping": 8.0,
|
||||
"gp_sim_strength": 0.95,
|
||||
"gp_sim_influence": 1.0,
|
||||
"gp_sim_gravity": 1.0
|
||||
}
|
||||
},
|
||||
"SLOWMO": {
|
||||
"Name": "Slowmo",
|
||||
"Description": "Preset for Slow motion or underwater scenarios",
|
||||
"Settings": {
|
||||
"gp_sim_speed": 0.4,
|
||||
"gp_sim_friction": 10.0,
|
||||
"gp_sim_mass": 0.2,
|
||||
"gp_sim_stiffness": 0.22,
|
||||
"gp_sim_damping": 15.0,
|
||||
"gp_sim_strength": 0.68,
|
||||
"gp_sim_influence": 0.44,
|
||||
"gp_sim_gravity": 1.0
|
||||
}
|
||||
},
|
||||
"GOOFLAPPY": {
|
||||
"Name": "Goo Flappy",
|
||||
"Description": "Settings for very light objects with a lot of drag (end chains of hair/skirts)",
|
||||
"Settings": {
|
||||
"gp_sim_speed": 0.8,
|
||||
"gp_sim_friction": 10.0,
|
||||
"gp_sim_mass": 0.2,
|
||||
"gp_sim_stiffness": 0.1,
|
||||
"gp_sim_damping": 1.0,
|
||||
"gp_sim_strength": 0.8,
|
||||
"gp_sim_influence": 1.0,
|
||||
"gp_sim_gravity": 1.0
|
||||
}
|
||||
},
|
||||
"GOOSTIFF": {
|
||||
"Name": "Goo Stiff",
|
||||
"Description": "Settings for stiff objects with resistance, used for the first bone in long chains where the base shouldnt move much",
|
||||
"Settings": {
|
||||
"gp_sim_speed": 0.8,
|
||||
"gp_sim_friction": 5.0,
|
||||
"gp_sim_mass": 0.15,
|
||||
"gp_sim_stiffness": 0.1,
|
||||
"gp_sim_damping": 8.0,
|
||||
"gp_sim_strength": 0.95,
|
||||
"gp_sim_influence": 0.5,
|
||||
"gp_sim_gravity": 1.0
|
||||
}
|
||||
},
|
||||
"METAL/JEWELRY": {
|
||||
"Name": "Metal/Jewelry",
|
||||
"Description": "Mainly for earrings and necklaces",
|
||||
"Settings": {
|
||||
"gp_sim_speed": 0.8,
|
||||
"gp_sim_friction": 10.0,
|
||||
"gp_sim_mass": 0.25,
|
||||
"gp_sim_stiffness": 1.0,
|
||||
"gp_sim_damping": 4.57,
|
||||
"gp_sim_strength": 0.43,
|
||||
"gp_sim_influence": 1.0,
|
||||
"gp_sim_gravity": 1.0
|
||||
}
|
||||
},
|
||||
"GOOSIM": {
|
||||
"Name": "Goo Sim_CHAIN",
|
||||
"Description": "Chain preset with Goo Stiff at the base and Goo Flappy with a influence falloff down the chain",
|
||||
"Settings": {
|
||||
"gp_sim_speed": [
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8,
|
||||
0.8
|
||||
],
|
||||
"gp_sim_friction": [
|
||||
5.0,
|
||||
6.018315315246582,
|
||||
7.02327823638916,
|
||||
7.975924968719482,
|
||||
8.800024032592773,
|
||||
9.410675048828125,
|
||||
9.774394989013672,
|
||||
9.93781852722168,
|
||||
9.989137649536133,
|
||||
9.999103546142578,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0,
|
||||
10.0
|
||||
],
|
||||
"gp_sim_mass": [
|
||||
0.15000000596046448,
|
||||
0.1601831614971161,
|
||||
0.17023277282714844,
|
||||
0.17975923418998718,
|
||||
0.18800023198127747,
|
||||
0.19410674273967743,
|
||||
0.1977439522743225,
|
||||
0.19937819242477417,
|
||||
0.19989138841629028,
|
||||
0.19999104738235474,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224,
|
||||
0.20000000298023224
|
||||
],
|
||||
"gp_sim_stiffness": [
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1
|
||||
],
|
||||
"gp_sim_damping": [
|
||||
8.0,
|
||||
6.574358940124512,
|
||||
5.1674113273620605,
|
||||
3.8337059020996094,
|
||||
2.679966688156128,
|
||||
1.8250558376312256,
|
||||
1.3158482313156128,
|
||||
1.0870535373687744,
|
||||
1.0152064561843872,
|
||||
1.0012555122375488,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0
|
||||
],
|
||||
"gp_sim_strength": [
|
||||
0.9499989748001099,
|
||||
0.9194496870040894,
|
||||
0.889301061630249,
|
||||
0.8607218265533447,
|
||||
0.835999071598053,
|
||||
0.8176796436309814,
|
||||
0.8067681789398193,
|
||||
0.8018654584884644,
|
||||
0.800325870513916,
|
||||
0.8000268936157227,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929
|
||||
],
|
||||
"gp_sim_influence": [
|
||||
0.00826446246355772,
|
||||
0.013331254944205284,
|
||||
0.018442191183567047,
|
||||
0.023726072162389755,
|
||||
0.029434900730848312,
|
||||
0.035850003361701965,
|
||||
0.04309063404798508,
|
||||
0.05104939639568329,
|
||||
0.059576407074928284,
|
||||
0.06869472563266754,
|
||||
0.07856345176696777,
|
||||
0.08924980461597443,
|
||||
0.10063616931438446,
|
||||
0.11259077489376068,
|
||||
0.12515480816364288,
|
||||
0.13848046958446503,
|
||||
0.15261253714561462,
|
||||
0.16742651164531708,
|
||||
0.18280872702598572,
|
||||
0.19881850481033325,
|
||||
0.2156010866165161,
|
||||
0.23317888379096985,
|
||||
0.25142043828964233,
|
||||
0.2702302634716034,
|
||||
0.28968575596809387,
|
||||
0.30992525815963745,
|
||||
0.33094877004623413,
|
||||
0.35261791944503784,
|
||||
0.3748553693294525,
|
||||
0.39775657653808594,
|
||||
0.42145299911499023,
|
||||
0.44592225551605225,
|
||||
0.47101902961730957,
|
||||
0.49668407440185547,
|
||||
0.5230309963226318,
|
||||
0.5501843690872192,
|
||||
0.578099250793457,
|
||||
0.606623649597168,
|
||||
0.6357163190841675,
|
||||
0.6655089855194092,
|
||||
0.6961193084716797,
|
||||
0.7274799346923828,
|
||||
0.7594319581985474,
|
||||
0.7919522523880005,
|
||||
0.8251906037330627,
|
||||
0.8592544794082642,
|
||||
0.8940246105194092,
|
||||
0.9292197227478027,
|
||||
0.9645878076553345,
|
||||
1.0
|
||||
],
|
||||
"gp_sim_gravity": [
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,689 @@
|
||||
from .functions import *
|
||||
|
||||
|
||||
#
|
||||
# UI
|
||||
#
|
||||
|
||||
|
||||
def draw_subpanel(layout, prefs, menu_name, label, icon):
|
||||
|
||||
box = layout.box()
|
||||
row = box.row()
|
||||
row.alignment = "LEFT"
|
||||
row.prop(
|
||||
prefs,
|
||||
menu_name,
|
||||
icon="TRIA_DOWN" if getattr(prefs, menu_name) else "TRIA_RIGHT",
|
||||
icon_only=True,
|
||||
emboss=False,
|
||||
)
|
||||
row.label(text=label, icon=icon)
|
||||
|
||||
return box, getattr(prefs, menu_name)
|
||||
|
||||
|
||||
#
|
||||
|
||||
|
||||
class GOO_PT_main_panel(bpy.types.Panel):
|
||||
"""Creates a Panel in the scene context of the properties editor"""
|
||||
|
||||
bl_idname = "GOO_PT_main_panel"
|
||||
bl_label = "Goo Animation Tools"
|
||||
bl_space_type = "VIEW_3D"
|
||||
bl_region_type = "UI"
|
||||
bl_category = "Goo Animation Tools"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
|
||||
class GP_PT_goophys_panel(Panel):
|
||||
"""Creates a Panel in the scene context of the properties editor"""
|
||||
|
||||
bl_idname = "GP_PT_goophys_panel"
|
||||
bl_label = "Goo Physics"
|
||||
bl_parent_id = "GOO_PT_main_panel"
|
||||
bl_space_type = "VIEW_3D"
|
||||
bl_region_type = "UI"
|
||||
bl_category = "Goo Animation Tools"
|
||||
bl_order = 1
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
pb = context.active_pose_bone
|
||||
scn = context.scene
|
||||
prefs = context.preferences.addons["goo_physics"].preferences
|
||||
|
||||
if pb is not None:
|
||||
box = layout.box()
|
||||
|
||||
if (pb.gp_has_sb_physics or pb.gp_has_cl_physics or pb.gp_has_gn_physics or pb.gp_has_jg_physics) == False:
|
||||
|
||||
row = box.row(align=True)
|
||||
row.label(text="Mode:")
|
||||
row = box.row(align=True)
|
||||
row.prop(prefs, "gp_physics_type", text="")
|
||||
|
||||
if prefs.gp_physics_type == "GEO_NODES":
|
||||
row = box.row(align=True)
|
||||
row.operator(
|
||||
"goophys.add_geonodes_physics_to_selected",
|
||||
text="Add Physics",
|
||||
)
|
||||
row.scale_y = 2.5
|
||||
|
||||
if prefs.gp_physics_type == "SIMP_SOFTBODY":
|
||||
row = box.row(align=True)
|
||||
row.operator(
|
||||
"goophys.add_soft_physics_to_selected",
|
||||
text="Add Physics",
|
||||
)
|
||||
row.scale_y = 2.5
|
||||
|
||||
if prefs.gp_physics_type == "CLOTH":
|
||||
row = box.row(align=True)
|
||||
row.operator(
|
||||
"goophys.add_cloth_physics_to_selected",
|
||||
text="Add Physics",
|
||||
)
|
||||
row.scale_y = 2.5
|
||||
|
||||
if prefs.gp_physics_type == "JIGGLE":
|
||||
row = box.row(align=True)
|
||||
row.operator(
|
||||
"goophys.add_jiggle_physics_to_selected",
|
||||
text="Add Physics",
|
||||
)
|
||||
row.scale_y = 2.5
|
||||
|
||||
row = box.row(align=True)
|
||||
row.alignment = "CENTER"
|
||||
row.prop(prefs, "gp_physics_active", text="Physics Active")
|
||||
row.alignment = "CENTER"
|
||||
|
||||
else:
|
||||
|
||||
#
|
||||
|
||||
row = box.row(align=True)
|
||||
row.operator(
|
||||
"goophys.remove_physics_from_selected",
|
||||
text="Remove Physics from Selected Bones",
|
||||
)
|
||||
row.scale_y = 1.5
|
||||
|
||||
row = box.row(align=True)
|
||||
row.operator("goophys.bake_physics", text="Bake Bone Physics")
|
||||
row.scale_y = 2
|
||||
|
||||
box = layout.box()
|
||||
row = box.row(align=True)
|
||||
row.operator("goophys.select_dynamic_bones", text="Select Physics Bones")
|
||||
|
||||
row = box.row(align=True)
|
||||
row.operator("goophys.select_last_dynamic_bones", text="Select Last Bone in Chains")
|
||||
|
||||
row = box.row(align=True)
|
||||
row.alignment = "CENTER"
|
||||
row.prop(prefs, "gp_physics_active", text="Physics Active")
|
||||
row.alignment = "CENTER"
|
||||
|
||||
#
|
||||
|
||||
box = layout.box()
|
||||
|
||||
if pb.gp_has_cl_physics:
|
||||
label = "Cloth Physics Settings"
|
||||
icon = "MOD_CLOTH"
|
||||
|
||||
row = box.row(align=True)
|
||||
row.label(text="Presets:")
|
||||
row = box.row(align=True)
|
||||
row.prop(prefs, "cl_presets", text="")
|
||||
row.operator("goophys.add_preset", text="", icon="ADD")
|
||||
row.operator("goophys.delete_preset", text="", icon="REMOVE")
|
||||
|
||||
row = box.row(align=True)
|
||||
row.operator("goophys.apply_preset", text="Apply Preset")
|
||||
|
||||
if pb.gp_has_sb_physics:
|
||||
label = "Soft Body Physics Settings"
|
||||
icon = "MOD_SOFT"
|
||||
|
||||
row = box.row(align=True)
|
||||
row.label(text="Presets:")
|
||||
row = box.row(align=True)
|
||||
row.prop(prefs, "sb_presets", text="")
|
||||
row.operator("goophys.add_preset", text="", icon="ADD")
|
||||
row.operator("goophys.delete_preset", text="", icon="REMOVE")
|
||||
|
||||
row = box.row(align=True)
|
||||
row.operator("goophys.apply_preset", text="Apply Preset")
|
||||
|
||||
if pb.gp_has_jg_physics:
|
||||
label = "Jiggle Physics Settings"
|
||||
icon = "MOD_SCREW"
|
||||
|
||||
row = box.row(align=True)
|
||||
row.label(text="Presets:")
|
||||
row = box.row(align=True)
|
||||
row.prop(prefs, "jg_presets", text="")
|
||||
row.operator("goophys.add_preset", text="", icon="ADD")
|
||||
row.operator("goophys.delete_preset", text="", icon="REMOVE")
|
||||
|
||||
row = box.row(align=True)
|
||||
row.operator("goophys.apply_preset", text="Apply Preset")
|
||||
|
||||
if pb.gp_has_gn_physics:
|
||||
label = "Geo Nodes Physics Settings"
|
||||
icon = "GEOMETRY_NODES"
|
||||
|
||||
row = box.row(align=True)
|
||||
row.label(text="Presets:")
|
||||
row = box.row(align=True)
|
||||
row.prop(prefs, "gn_presets", text="")
|
||||
row.operator("goophys.add_preset", text="", icon="ADD")
|
||||
row.operator("goophys.delete_preset", text="", icon="REMOVE")
|
||||
|
||||
row = box.row(align=True)
|
||||
row.operator("goophys.apply_preset", text="Apply Preset")
|
||||
|
||||
boxx, expanded = draw_subpanel(box, prefs, "settings_menu", label, icon)
|
||||
if expanded:
|
||||
|
||||
if pb.gp_has_cl_physics:
|
||||
|
||||
row = boxx.row(align=True)
|
||||
row.prop(prefs, "apply_to_all_chains")
|
||||
|
||||
boxxx, expanded = draw_subpanel(boxx, prefs, "chain_menu", "Chain Settings", "RESTRICT_INSTANCED_OFF")
|
||||
if expanded:
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "cl_time_menu", "Time", "TIME")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_speed", text="Sim Speed")
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "cl_physical_menu", "Physical", "MOD_SOLIDIFY")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_mass", text="Sim Mass")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_gravity", text="Gravity")
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "cl_structure_menu", "Structure", "SELECT_INTERSECT")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_air_dampening", text="Sim Air Dampening")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_bend_damping", text="Sim Bend Damping")
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "cl_collision_menu", "Collision", "MOD_PHYSICS")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_use_collision", text="Use Collision")
|
||||
|
||||
if pb.gp_chain_use_collision:
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_collision_dist", text="Collision Distance")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.refresh_collision_collection",
|
||||
text="Refresh Collision Objects")
|
||||
|
||||
if pb.gp_chain_limit_collision:
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.limit_to_type",
|
||||
text="Set Collisions to All")
|
||||
else:
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.limit_to_type",
|
||||
text="Limit Collisions to Collection")
|
||||
|
||||
row = boxx.row(align=True)
|
||||
row.prop(prefs, "apply_to_all_bones")
|
||||
|
||||
boxxx, expanded = draw_subpanel(boxx, prefs, "bone_menu", "Bone Settings", "BONE_DATA")
|
||||
if expanded:
|
||||
|
||||
row = boxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_influence", text="Sim Influence")
|
||||
|
||||
row = boxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.apply_falloff_to_selected",
|
||||
text="Apply Linear Sim Influence Falloff",
|
||||
).type = 0
|
||||
row = boxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.apply_falloff_to_selected",
|
||||
text="Apply Quadratic Sim Influence Falloff",
|
||||
).type = 1
|
||||
|
||||
if pb.gp_has_sb_physics:
|
||||
|
||||
row = boxx.row(align=True)
|
||||
row.prop(prefs, "apply_to_all_bones")
|
||||
|
||||
boxxx, expanded = draw_subpanel(boxx, prefs, "bone_menu", "Bone Settings", "BONE_DATA")
|
||||
if expanded:
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "sb_time_menu", "Time", "TIME")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_speed", text="Sim Speed")
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "sb_physical_menu", "Physical", "MOD_SOLIDIFY")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_friction", text="Sim Friction")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_mass", text="Sim Mass")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_gravity", text="Gravity")
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "sb_structure_menu", "Structure", "SELECT_INTERSECT")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_stiffness", text="Sim Stiffness")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_damping", text="Sim Damping")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_strength", text="Sim Strength")
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "sb_collision_menu", "Collision", "MOD_PHYSICS")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_use_collision", text="Use Collision")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.refresh_collision_collection",
|
||||
text="Refresh Collision Objects")
|
||||
|
||||
if pb.gp_sim_limit_collision:
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.limit_to_type",
|
||||
text="Set Collisions to All")
|
||||
else:
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.limit_to_type",
|
||||
text="Limit Collisions to Collection")
|
||||
|
||||
row = boxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_influence", text="Sim Influence")
|
||||
|
||||
row = boxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.apply_falloff_to_selected",
|
||||
text="Apply Linear Sim Influence Falloff",
|
||||
).type = 0
|
||||
row = boxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.apply_falloff_to_selected",
|
||||
text="Apply Quadratic Sim Influence Falloff",
|
||||
).type = 1
|
||||
|
||||
if pb.gp_has_jg_physics:
|
||||
|
||||
row = boxx.row(align=True)
|
||||
row.prop(prefs, "apply_to_all_bones")
|
||||
|
||||
boxxx, expanded = draw_subpanel(boxx, prefs, "bone_menu", "Bone Settings", "BONE_DATA")
|
||||
if expanded:
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "sb_time_menu", "Time", "TIME")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_speed", text="Sim Speed")
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "sb_physical_menu", "Physical", "MOD_SOLIDIFY")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_friction", text="Sim Friction")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_mass", text="Sim Mass")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_gravity", text="Gravity")
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "jg_physical_menu", "Physical", "MOD_SOLIDIFY")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_stiffness", text="Sim Stiffness")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_damping", text="Sim Damping")
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "jg_collision_menu", "Collision", "MOD_PHYSICS")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_use_collision", text="Use Collision")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.refresh_collision_collection",
|
||||
text="Refresh Collision Objects")
|
||||
|
||||
if pb.gp_sim_limit_collision:
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.limit_to_type",
|
||||
text="Set Collisions to All")
|
||||
else:
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.limit_to_type",
|
||||
text="Limit Collisions to Collection")
|
||||
|
||||
row = boxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_influence", text="Sim Influence")
|
||||
|
||||
if pb.gp_has_gn_physics:
|
||||
|
||||
row = boxx.row(align=True)
|
||||
row.prop(prefs, "apply_to_all_chains")
|
||||
|
||||
boxxx, expanded = draw_subpanel(boxx, prefs, "chain_menu", "Chain Settings", "RESTRICT_INSTANCED_OFF")
|
||||
if expanded:
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "gn_general_menu", "General", "OUTLINER_DATA_GP_LAYER")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_velocity", text="Velocity Scaler")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_dampening", text="Velocity Dampening")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_gravity", text="Gravity")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_root_falloff", text="Root Falloff")
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "gn_stiff_menu", "Stiffness", "AUTOMERGE_ON")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_stiffness", text="Stiffness")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(
|
||||
pb, "gp_chain_stiff_end_fac", text="Tip Stiffness Factor"
|
||||
)
|
||||
|
||||
boxxxxx, expanded = draw_subpanel(boxxxx, prefs, "gn_stiff_adv_menu", "Advanced Stiffness", "CON_TRANSLIKE")
|
||||
if expanded:
|
||||
|
||||
row = boxxxxx.row(align=True)
|
||||
row.prop(
|
||||
pb, "gp_chain_stiff_vel_fac", text="Stiffness Velocity Factor"
|
||||
)
|
||||
|
||||
row = boxxxxx.row(align=True)
|
||||
row.prop(
|
||||
pb, "gp_chain_stiff_vel_min", text="Stiffness Velocity Min"
|
||||
)
|
||||
|
||||
row = boxxxxx.row(align=True)
|
||||
row.prop(
|
||||
pb, "gp_chain_stiff_vel_max", text="Stiffness Velocity Max"
|
||||
)
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "gn_wind_menu", "Wind", "FORCE_WIND")
|
||||
if expanded:
|
||||
has_wind = False
|
||||
ob = bpy.data.objects.get(pb.gp_sim_object)
|
||||
mod = None
|
||||
if ob:
|
||||
mod = ob.modifiers.get("GP_Nodes Sim")
|
||||
if mod:
|
||||
has_wind = get_geo_nodes_input(mod, "Wind Object") is not None
|
||||
|
||||
if has_wind == False:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.add_wind_objects", text="Add Wind Controller to Chains"
|
||||
)
|
||||
row.scale_y = 2.0
|
||||
|
||||
boxxxx.separator()
|
||||
|
||||
if mod is not None:
|
||||
wind_ob_ctr, wind_ob_str = get_geo_nodes_input_str(mod, "Wind Object")
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(wind_ob_ctr, wind_ob_str, text="Wind Controller")
|
||||
|
||||
else:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_wind_strength", text="Wind Strength")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_wind_noise_strength", text="Wind Noise Strength")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_wind_noise_scale", text="Wind Noise Scale")
|
||||
|
||||
boxxxx.separator()
|
||||
|
||||
if mod is not None:
|
||||
wind_ob_ctr, wind_ob_str = get_geo_nodes_input_str(mod, "Wind Object")
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(wind_ob_ctr, wind_ob_str, text="Wind Controller")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.copy_active_wind_controller",
|
||||
text="Copy Controller to Selected Chains",
|
||||
)
|
||||
row.scale_y = 1.5
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.remove_wind_objects", text="Remove Controller from Chains"
|
||||
)
|
||||
row.scale_y = 2.0
|
||||
|
||||
boxxxx, expanded = draw_subpanel(boxxx, prefs, "gn_collision_menu", "Collision", "MOD_PHYSICS")
|
||||
if expanded:
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_use_collision", text="Use Collision")
|
||||
|
||||
if pb.gp_chain_use_collision:
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(pb, "gp_chain_collision_dist", text="Collision Distance")
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.prop(
|
||||
pb, "gp_chain_collision_friction", text="Collision Friction"
|
||||
)
|
||||
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.refresh_collision_collection",
|
||||
text="Refresh Collision Objects")
|
||||
|
||||
if pb.gp_chain_limit_collision:
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.limit_to_type",
|
||||
text="Set Collisions to All")
|
||||
else:
|
||||
row = boxxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.limit_to_type",
|
||||
text="Limit Collisions to Collection")
|
||||
|
||||
row = boxx.row(align=True)
|
||||
row.prop(prefs, "apply_to_all_bones")
|
||||
|
||||
boxxx, expanded = draw_subpanel(boxx, prefs, "bone_menu", "Bone Settings", "BONE_DATA")
|
||||
if expanded:
|
||||
row = boxxx.row(align=True)
|
||||
row.prop(pb, "gp_sim_influence", text="Sim Influence")
|
||||
|
||||
row = boxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.apply_falloff_to_selected",
|
||||
text="Apply Linear Sim Influence Falloff",
|
||||
).type = 0
|
||||
row = boxxx.row(align=True)
|
||||
row.operator(
|
||||
"goophys.apply_falloff_to_selected",
|
||||
text="Apply Quadratic Sim Influence Falloff",
|
||||
).type = 1
|
||||
|
||||
#
|
||||
|
||||
elif context.mode == "POSE":
|
||||
box = layout.box()
|
||||
row = box.row(align=True)
|
||||
row.operator("goophys.select_dynamic_bones", text="Select Physics Bones")
|
||||
|
||||
row = box.row(align=True)
|
||||
row.operator("goophys.select_last_dynamic_bones", text="Select Last Bone in Chains")
|
||||
|
||||
row = box.row(align=True)
|
||||
row.alignment = "CENTER"
|
||||
row.prop(prefs, "gp_physics_active", text="Physics Active")
|
||||
row.alignment = "CENTER"
|
||||
|
||||
|
||||
class GP_PT_goophys_collider_panel(Panel):
|
||||
"""Creates a Panel in the scene context of the properties editor"""
|
||||
|
||||
bl_idname = "GP_PT_goophys_collider_panel"
|
||||
bl_label = "Colliders"
|
||||
bl_parent_id = "GP_PT_goophys_panel"
|
||||
bl_space_type = "VIEW_3D"
|
||||
bl_region_type = "UI"
|
||||
bl_category = "Goo Animation Tools"
|
||||
bl_order = 1
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.active_object and context.mode == "OBJECT"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.operator(
|
||||
"goophys.add_collider", text="Collider From Selected Objects"
|
||||
)
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.operator(
|
||||
"goophys.colliders_from_mesh", text="Colliders From Mesh Deform Weights"
|
||||
)
|
||||
|
||||
|
||||
class GP_PT_goophys_advanced_panel(Panel):
|
||||
"""Creates a Panel in the scene context of the properties editor"""
|
||||
|
||||
bl_idname = "GP_PT_goophys_advanced_panel"
|
||||
bl_label = "Advanced"
|
||||
bl_parent_id = "GP_PT_goophys_panel"
|
||||
bl_space_type = "VIEW_3D"
|
||||
bl_region_type = "UI"
|
||||
bl_category = "Goo Animation Tools"
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
bl_order = 2
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.active_object and context.mode == "POSE"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
prefs = context.preferences.addons["goo_physics"].preferences
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.label(text="Bone Map Presets:")
|
||||
row = layout.row(align=True)
|
||||
row.prop(prefs, "bm_presets", text="")
|
||||
row.operator("goophys.add_bone_map_preset", text="", icon="ADD")
|
||||
row.operator("goophys.delete_bone_map_preset", text="", icon="REMOVE")
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.operator("goophys.apply_bone_map_preset", text="Apply Bone Map Preset")
|
||||
|
||||
|
||||
class GP_PT_goophys_trouble_panel(Panel):
|
||||
"""Creates a Panel in the scene context of the properties editor"""
|
||||
|
||||
bl_idname = "GP_PT_goophys_trouble_panel"
|
||||
bl_label = "Troubleshooting"
|
||||
bl_parent_id = "GP_PT_goophys_panel"
|
||||
bl_space_type = "VIEW_3D"
|
||||
bl_region_type = "UI"
|
||||
bl_category = "Goo Animation Tools"
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
bl_order = 3
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.operator("goophys.sync_frame_range", text="Sync Frame Range")
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.operator(
|
||||
"goophys.refresh_physics_status", text="Refresh Bone Physics Status"
|
||||
)
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
_classes = [
|
||||
GP_PT_goophys_panel,
|
||||
GP_PT_goophys_collider_panel,
|
||||
GP_PT_goophys_advanced_panel,
|
||||
GP_PT_goophys_trouble_panel,
|
||||
]
|
||||
|
||||
|
||||
_register, _unregister = register_classes_factory(_classes)
|
||||
|
||||
|
||||
def register():
|
||||
if hasattr(bpy.types, "GOO_PT_main_panel") == False:
|
||||
bpy.utils.register_class(GOO_PT_main_panel)
|
||||
_register()
|
||||
|
||||
|
||||
def unregister():
|
||||
_unregister()
|
||||
Reference in New Issue
Block a user