@@ -170,10 +170,20 @@ private async Task ApplyDataToActor(EntityId actorId, ActorFile actorFile)
170
170
171
171
await _framework . RunOnTick ( async ( ) =>
172
172
{
173
-
174
- if ( actorFile . AnamnesisCharaFile . IsExtendedAppearanceValid )
173
+ // only import shaders if the appearance is valid and it's not a prop (characters only)
174
+ if ( actorFile . AnamnesisCharaFile . IsExtendedAppearanceValid && ! actorFile . IsProp )
175
+ {
175
176
BrioUtilities . ImportShadersFromFile ( ref appearanceCapability . _modelShaderOverride , actorFile . AnamnesisCharaFile ) ;
176
- await appearanceCapability . SetAppearance ( actorFile . AnamnesisCharaFile , AppearanceImportOptions . All ) ;
177
+ await appearanceCapability . SetAppearance ( actorFile . AnamnesisCharaFile , AppearanceImportOptions . All ) ;
178
+ }
179
+ else if ( actorFile . IsProp ) // if it's a prop, only import the appearance
180
+ {
181
+ await appearanceCapability . SetAppearance ( actorFile . AnamnesisCharaFile , AppearanceImportOptions . Customize ) ;
182
+ }
183
+ else // chars with invalid extended appearances
184
+ {
185
+ await appearanceCapability . SetAppearance ( actorFile . AnamnesisCharaFile , AppearanceImportOptions . Default ) ;
186
+ }
177
187
178
188
await _framework . RunOnTick ( async ( ) =>
179
189
{
@@ -182,7 +192,7 @@ await _framework.RunOnTick(async () =>
182
192
mountPose = true ;
183
193
184
194
if ( mountPose == false )
185
- posingCapability . ImportPose ( actorFile . PoseFile , asScene : true ) ;
195
+ posingCapability . ImportPose ( actorFile . PoseFile , asScene : true , asProp : actorFile . IsProp ) ;
186
196
187
197
if ( attachedActor . HasCapability < CompanionCapability > ( ) == true && actorFile . HasChild && actorFile . Child is not null )
188
198
{
@@ -191,20 +201,20 @@ await _framework.RunOnTick(async () =>
191
201
companionCapability . SetCompanion ( actorFile . Child . Companion ) ;
192
202
193
203
await _framework . RunOnTick ( ( ) =>
204
+ {
205
+ if ( actorFile . Child . PoseFile is not null )
194
206
{
195
- if ( actorFile . Child . PoseFile is not null )
196
- {
197
- var companionEntity = companionCapability . GetCompanionAsEntity ( ) ;
207
+ var companionEntity = companionCapability . GetCompanionAsEntity ( ) ;
198
208
199
- if ( companionEntity is not null && companionEntity . TryGetCapability < PosingCapability > ( out var posingCapability ) )
200
- {
201
- posingCapability . ImportPose ( actorFile . Child . PoseFile , asScene : true , freezeOnLoad : true ) ;
202
- }
209
+ if ( companionEntity is not null && companionEntity . TryGetCapability < PosingCapability > ( out var posingCapability ) )
210
+ {
211
+ posingCapability . ImportPose ( actorFile . Child . PoseFile , asScene : true , freezeOnLoad : true , asProp : actorFile . IsProp ) ;
203
212
}
213
+ }
204
214
205
- if ( mountPose == true )
206
- posingCapability . ImportPose ( actorFile . PoseFile , asScene : true ) ;
207
- } ) ;
215
+ if ( mountPose == true )
216
+ posingCapability . ImportPose ( actorFile . PoseFile , asScene : true , asProp : actorFile . IsProp ) ;
217
+ } ) ;
208
218
}
209
219
} , delayTicks : 10 ) ; // I don't like having to set delayTicks to this but I don't think I have another way without more rework
210
220
} ) ;
0 commit comments