Skip to content

Commit a9381e7

Browse files
committed
implemented to show custom user data.
1 parent e7b76b8 commit a9381e7

3 files changed

Lines changed: 13 additions & 11 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ dependencies {
5959

6060
compile 'com.github.JavaSaBr:RlibFX:4.1.2'
6161
compile 'com.github.JavaSaBr:RLib:6.3.4'
62-
compile 'com.github.JavaSaBr:JME3-JFX:1.6.0'
62+
compile 'com.github.JavaSaBr:JME3-JFX:1.6.1'
6363

6464
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
6565
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.6'

src/main/java/com/ss/editor/Editor.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,6 @@ private static void configureLogger() {
188188
@Nullable
189189
private LightProbe previewLightProbe;
190190

191-
/**
192-
* The processor of post effects.
193-
*/
194-
@Nullable
195-
private FilterPostProcessor postProcessor;
196-
197191
/**
198192
* The FXAA filter.
199193
*/
@@ -259,6 +253,8 @@ public Camera getCamera() {
259253

260254
@Override
261255
public void simpleInitApp() {
256+
super.simpleInitApp();
257+
262258
renderManager.setPreferredLightMode(TechniqueDef.LightMode.SinglePass);
263259
renderManager.setSinglePassLightBatchSize(15);
264260

@@ -296,8 +292,8 @@ public void simpleInitApp() {
296292
flyCam.setDragToRotate(true);
297293
flyCam.setEnabled(false);
298294

299-
postProcessor = new FilterPostProcessor(assetManager);
300-
postProcessor.initialize(renderManager, viewPort);
295+
296+
final FilterPostProcessor postProcessor = getPostProcessor();
301297

302298
fxaaFilter = new FXAAFilter();
303299
fxaaFilter.setEnabled(editorConfig.isFXAA());
@@ -318,8 +314,6 @@ public void simpleInitApp() {
318314

319315
SceneLoader.install(this, postProcessor);
320316

321-
viewPort.addProcessor(postProcessor);
322-
323317
if (Config.ENABLE_PBR) {
324318
environmentCamera = new EnvironmentCamera(64, Vector3f.ZERO);
325319
previewEnvironmentCamera = new EnvironmentCamera(64, Vector3f.ZERO);

src/main/java/com/ss/editor/ui/control/model/property/builder/impl/SpatialPropertyBuilder.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,14 @@ protected void buildForImpl(@NotNull final Object object, @Nullable final Object
233233
control.setSyncHandler(sp -> sp.getUserData(key));
234234
control.setEditObject(spatial);
235235

236+
FXUtils.addToPane(control, container);
237+
238+
} else {
239+
240+
final DefaultModelSinglePropertyControl<Spatial, Object> control = new DefaultModelSinglePropertyControl<>(data, key, changeConsumer);
241+
control.setSyncHandler(sp -> sp.getUserData(key));
242+
control.setEditObject(spatial);
243+
236244
FXUtils.addToPane(control, container);
237245
}
238246
}

0 commit comments

Comments
 (0)