Home › Forums › Programming › Rename Materials?
- This topic has 5 replies, 1 voice, and was last updated 4 years, 5 months ago by GLiFTeK.
-
AuthorPosts
-
2020-06-11 at 1:10 pm #28721GLiFTeKCustomer
Hi,
I’m appending a scene that has just a plane with a material (Image_Plane_Material” on it with a stand in texture.I’m appending the scene many times, each time successfully renaming the Image_Plane object with an iterated number (Image_Plane.001, 002 etc)
I’m doing this with a JS function changing myObj.name.
I want to do the same with the material that comes in with the object.
All I see in the Three.js literature is that materials are given UUID’s?
Is there a way to accomplish this?
Thanks!
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-06-11 at 1:45 pm #28729GLiFTeKCustomerah.. did it with
myObj.material.name = newName;
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-06-11 at 5:40 pm #28740GLiFTeKCustomerok this one has me stumped.. as i bring the objects in they all get the same animation clip.
so how does one go about changing the animation clip name?i’m trying
app.ExternalInterface.changeAnimationClipName = function(clip,newName) { // var clips = mesh.animations; var myClip = v3d.AnimationClip.findByName(clip); myClip.name = newName; console.log ("New Image Plane Animation Added: "+ myClip.name); return myClip.name; };
getting “type error n is undefined” from v3d.js.
The animation is keyframed RGB color (not vertex paint) values, by right clicking on the rgb color nodes color.
Works fine in verge, just need to rename the clip!
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-06-11 at 7:21 pm #28743GLiFTeKCustomerusing this now..
app.ExternalInterface.changeAnimationClipName = function(obj,clip,newName) { var myObj = app.scene.getObjectByName(obj); var animations = myObj.animations; var myClip = THREE.AnimationClip.findByName(animations, clip); myClip.name = newName; console.log ("New Image Plane Animation Added: "+ myClip.name); return myClip.name; };
getting “TypeError: e is undefined”… e is an Array right?
should be getting the array “animations” from the object…
booooooo!Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-06-11 at 11:13 pm #28751GLiFTeKCustomerDoes “clone animation” help with this issue? I didn’t really understand what clone animation does differently than just using the original.
Can you use a cloned animation on a different object? Is it essentially timeline a cropping tool?
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-06-13 at 2:08 pm #28807GLiFTeKCustomerk 2 days with the clone animation puzzle didn’t help. all the animation clones only animated the first object.
…. just… need.. to.. rename.. animations.. as i load objects…
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature! -
AuthorPosts
- You must be logged in to reply to this topic.