1
1
//
2
- // Copyright (C) 2022 David Cattermole.
2
+ // Copyright (C) 2022, 2024 David Cattermole.
3
3
//
4
4
// This file is part of mmSolver.
5
5
//
@@ -97,11 +97,14 @@ global proc AEmmImagePlaneShape_browser(
97
97
string $cmd = "";
98
98
$cmd = $cmd + "import mmSolver.tools.createimageplane.tool as tool;\n";
99
99
$cmd = $cmd + "import mmSolver.tools.createimageplane.lib as lib;\n";
100
+ $cmd = $cmd + "\n";
100
101
$cmd = $cmd + "image_seq = tool.prompt_user_for_image_sequence();\n";
102
+ $cmd = $cmd + "\n";
103
+ $cmd = $cmd + "mm_ip_shp = \"" + $image_plane_shp + "\";\n";
104
+ $cmd = $cmd + "attr_name = \"" + $attr_name + "\";\n";
105
+ $cmd = $cmd + "current_slot_attr = \"" + $slot_attr_name + "\";\n";
106
+ $cmd = $cmd + "\n";
101
107
$cmd = $cmd + "if image_seq:\n";
102
- $cmd = $cmd + " mm_ip_shp = \"" + $image_plane_shp + "\";\n";
103
- $cmd = $cmd + " attr_name = \"" + $attr_name + "\";\n";
104
- $cmd = $cmd + " current_slot_attr = \"" + $slot_attr_name + "\";\n";
105
108
$cmd = $cmd + " if attr_name == current_slot_attr:\n";
106
109
$cmd = $cmd + " lib.set_image_sequence(\n";
107
110
$cmd = $cmd + " mm_ip_shp,\n";
@@ -132,16 +135,18 @@ global proc AEmmImagePlaneShape_sequenceSlotChanged(
132
135
AEmmImagePlaneShape_setSlotValue($image_plane_shp, $slot_attr_value);
133
136
134
137
string $cmd = "";
135
- $cmd = $cmd + "import os.path;\n";
136
138
$cmd = $cmd + "import mmSolver.tools.createimageplane.tool as tool;\n";
137
139
$cmd = $cmd + "import mmSolver.tools.createimageplane.lib as lib;\n";
140
+ $cmd = $cmd + "\n";
138
141
$cmd = $cmd + "mm_ip_shp = \"" + $image_plane_shp + "\";\n";
139
142
$cmd = $cmd + "attr_name = \"" + $attr_name + "\";\n";
140
143
$cmd = $cmd + "current_slot_attr = \"" + $slot_attr_name + "\";\n";
144
+ $cmd = $cmd + "\n";
141
145
$cmd = $cmd + "image_seq = maya.cmds.getAttr(\n";
142
146
$cmd = $cmd + " mm_ip_shp + '.' + current_slot_attr) or ''\n";
143
- $cmd = $cmd + "if len(image_seq) == 0 or not os.path.isfile(image_seq) :\n";
147
+ $cmd = $cmd + "if len(image_seq) == 0:\n";
144
148
$cmd = $cmd + " image_seq = lib.get_default_image_path();\n";
149
+ $cmd = $cmd + "\n";
145
150
$cmd = $cmd + "lib.set_image_sequence(\n";
146
151
$cmd = $cmd + " mm_ip_shp,\n";
147
152
$cmd = $cmd + " image_seq,\n";
@@ -233,12 +238,15 @@ global proc AEmmImagePlaneShapeTemplate(string $nodeName)
233
238
editorTemplate -beginLayout "Display" -collapse 0;
234
239
editorTemplate -addControl "visibleToCameraOnly";
235
240
editorTemplate -addSeparator;
236
- editorTemplate -addControl "exposure";
237
- editorTemplate -addControl "gamma";
238
241
editorTemplate -addControl "colorGain";
242
+ editorTemplate -addControl "colorExposure";
243
+ editorTemplate -addControl "colorGamma";
244
+ editorTemplate -addControl "colorSaturation";
245
+ editorTemplate -addControl "colorSoftClip";
239
246
editorTemplate -addControl "alphaGain";
240
- // editorTemplate -addSeparator;
241
- // editorTemplate -addControl "colorSpace"; // Might not be possible.
247
+ editorTemplate -addSeparator;
248
+ editorTemplate -addControl "imageIgnoreAlpha";
249
+ editorTemplate -addControl "displayChannel";
242
250
editorTemplate -endLayout;
243
251
244
252
editorTemplate -beginLayout "Image Sequence" -collapse 0;
@@ -270,6 +278,18 @@ global proc AEmmImagePlaneShapeTemplate(string $nodeName)
270
278
"AEmmImagePlaneShape_imageSequenceReplace"
271
279
"imageSequenceAlternate3";
272
280
281
+ editorTemplate -addSeparator;
282
+ editorTemplate -addControl "imageWidth";
283
+ editorTemplate -addControl "imageHeight";
284
+ editorTemplate -addControl "imagePixelAspect";
285
+ editorTemplate -addSeparator;
286
+ editorTemplate -addControl "imageSequenceStartFrame";
287
+ editorTemplate -addControl "imageSequenceEndFrame";
288
+ editorTemplate -addSeparator;
289
+ // TODO: Use mmColorIO results to allow users to manually give the
290
+ // inputColorSpace.
291
+ editorTemplate -addControl "inputColorSpace";
292
+ editorTemplate -addSeparator;
273
293
// TODO: Add radio button to choose what will connect to the
274
294
// 'imageSequenceFrame' value? Options are:
275
295
// - Scene Time (time1)
@@ -279,15 +299,8 @@ global proc AEmmImagePlaneShapeTemplate(string $nodeName)
279
299
editorTemplate -addControl "imageSequenceFirstFrame";
280
300
editorTemplate -addControl "imageSequenceFrameOutput";
281
301
editorTemplate -addSeparator;
282
- editorTemplate -addControl "imageLoadEnable";
283
- editorTemplate -addControl "imageUseAlphaChannel";
284
- editorTemplate -addSeparator;
285
- editorTemplate -addControl "imageWidth";
286
- editorTemplate -addControl "imageHeight";
287
- editorTemplate -addControl "imagePixelAspect";
288
- editorTemplate -addSeparator;
289
- editorTemplate -addControl "imageSequenceStartFrame";
290
- editorTemplate -addControl "imageSequenceEndFrame";
302
+ editorTemplate -addControl "imageFlip";
303
+ editorTemplate -addControl "imageFlop";
291
304
editorTemplate -endLayout;
292
305
293
306
editorTemplate -beginLayout "HUD" -collapse 0;
@@ -298,24 +311,31 @@ global proc AEmmImagePlaneShapeTemplate(string $nodeName)
298
311
// TODO: Add 'hudTextColor' - control the HUD text color.
299
312
editorTemplate -endLayout;
300
313
314
+ // editorTemplate -beginLayout "Image Cache" -collapse 1;
315
+ // // TODO: Add controls to view and edit the image cache.
316
+ // editorTemplate -endLayout;
317
+
301
318
editorTemplate -beginLayout "Miscellaneous" -collapse 1;
302
319
editorTemplate -addControl "meshResolution";
303
320
editorTemplate -addControl "imageDefaultColor"; // Cannot be textured.
321
+ editorTemplate -addControl "shaderIsTransparent";
304
322
editorTemplate -endLayout;
305
323
306
324
editorTemplate -beginLayout "Nodes" -collapse 1;
307
- editorTemplate -addControl "shaderNode";
308
- editorTemplate -addControl "shaderFileNode";
309
325
editorTemplate -addControl "geometryNode";
310
326
editorTemplate -addControl "cameraNode";
311
327
editorTemplate -addControl "imagePlaneShapeNode";
312
328
editorTemplate -endLayout;
313
329
314
- editorTemplate -suppress "imageSequencePadding";
315
- editorTemplate -suppress "cameraWidthInch";
316
- editorTemplate -suppress "cameraHeightInch";
317
- editorTemplate -suppress "lensHashCurrent";
318
- editorTemplate -suppress "lensHashPrevious";
330
+ // // Internals that we don't want the user to see.
331
+ // editorTemplate -suppress "imageSequencePadding";
332
+ // editorTemplate -suppress "cameraWidthInch";
333
+ // editorTemplate -suppress "cameraHeightInch";
334
+ // editorTemplate -suppress "lensHashCurrent";
335
+ // editorTemplate -suppress "lensHashPrevious";
336
+ // editorTemplate -suppress "imageFilePath";
337
+ // editorTemplate -suppress "inputColorSpace";
338
+ // editorTemplate -suppress "outputColorSpace";
319
339
320
340
AEmmNodeShapeTemplateCommonEnd($nodeName);
321
341
}
0 commit comments