Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light remove mapping requires additional parameters #16

Open
hblasins opened this issue Nov 5, 2016 · 1 comment
Open

Light remove mapping requires additional parameters #16

hblasins opened this issue Nov 5, 2016 · 1 comment

Comments

@hblasins
Copy link
Contributor

hblasins commented Nov 5, 2016

In the mappings file I create an entry to remove a point source from the scene:

mappings{id}.name = 'PointLight';
mappings{id}.broadType = 'lights';
mappings{id}.specificType = 'point';
mappings{id}.operation = 'remove';
mappings{id}.desitnation = 'generic';

This entry causes an error:

mapping = 

       broadType: 'lights'
     destination: 'Generic'
           group: ''
           index: []
            name: 'PointLight'
       operation: 'remove'
      properties: []
    specificType: 'point'

Struct contents reference from a non-struct array object.

Error in rtbGetMappingProperty (line 26)
propertyNames = {mapping.properties.name};

Error in rtbApplyMPbrtGenericMappings>setSpectrumOrTexture (line 178)
[value, property] = rtbGetMappingProperty(mapping, getName, defaultValue);

Error in rtbApplyMPbrtGenericMappings (line 105)
                    setSpectrumOrTexture(element, mapping, ...

Error in RtbAssimpPBRTConverter/applyMappings (line 136)
            nativeScene = rtbApplyMPbrtGenericMappings(nativeScene, groupMappings);

Error in rtbMakeSceneFiles>makeSceneForCondition (line 170)
nativeScene = strategy.converter.applyMappings(scene, nativeScene, mappings, names, conditionValues, cc);

Error in rtbMakeSceneFiles (line 127)
        nativeScenes{cc} = makeSceneForCondition(strategy, ...

Error in CoralColors (line 236)
                nativeSceneFiles = rtbMakeSceneFiles(scene, 'hints', hints, ...

The issue can be avoided by adding something in the parameters field to make it non-empty, but conceptually we shouldn't need to do this, since we are removing the object anyway.

@benjamin-heasly
Copy link
Contributor

This makes sense. I agree it's a bug. We should make it work with an empty properties field.

Thanks for posting the work-around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants