You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* When type check is enabled a RuntimeException is thrown if
87
95
* an object of the wrong type is passed to setValue.
88
-
* @param v (default = true)
96
+
*
97
+
* @param typeCheck (default = true)
89
98
*/
90
-
publicvoidsetTypeCheckEnabled(booleanv) {
91
-
typeCheck = v;
99
+
publicvoidsetTypeCheckEnabled(booleantypeCheck) {
100
+
this.typeCheck = typeCheck;
92
101
}
93
102
94
103
/**
@@ -102,6 +111,7 @@ public VarType getVarType() {
102
111
103
112
/**
104
113
* Returns the name of the material parameter.
114
+
*
105
115
* @return the name of the material parameter.
106
116
*/
107
117
publicStringgetName() {
@@ -158,15 +168,16 @@ public void setValue(Object value) {
158
168
}
159
169
}
160
170
if (!valid) {
161
-
thrownewRuntimeException("Trying to assign a value of type " + value.getClass() + " to " + this.getName() + " of type " + type.name() + ". Valid types are "
162
-
+ Arrays.deepToString(type.getJavaType()));
171
+
thrownewRuntimeException("Trying to assign a value of type " + value.getClass()
172
+
+ " to " + this.getName()
173
+
+ " of type " + type.name()
174
+
+ ". Valid types are " + Arrays.deepToString(type.getJavaType()));
163
175
}
164
176
}
165
177
}
166
178
this.value = value;
167
179
}
168
180
169
-
170
181
/**
171
182
* Returns the material parameter value as it would appear in a J3M
172
183
* file. E.g.
@@ -274,35 +285,35 @@ public String getValueAsString() {
274
285
caseTextureCubeMap:
275
286
TexturetexVal = (Texture) value;
276
287
TextureKeytexKey = (TextureKey) texVal.getKey();
277
-
if (texKey == null){
278
-
//throw new UnsupportedOperationException("The specified MatParam cannot be represented in J3M");
288
+
if (texKey == null){
289
+
// throw new UnsupportedOperationException("The specified MatParam cannot be represented in J3M");
279
290
// this is used in toString and the above line causes blender materials to throw this exception.
280
291
// toStrings should be very robust IMO as even debuggers often invoke toString and logging code
0 commit comments